@hpcc-js/map 2.74.1 → 2.75.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -1
- package/dist/index.es6.js +19752 -19548
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +19757 -19553
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +21 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +13 -29
- package/src/__package__.ts +2 -2
- package/types/__package__.d.ts +2 -2
- package/types-3.4/__package__.d.ts +2 -2
package/dist/index.min.js
CHANGED
|
@@ -1,2 +1,22 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@hpcc-js/common"),require("@hpcc-js/api"),require("@hpcc-js/layout"),require("@hpcc-js/util"),require("@hpcc-js/graph"),require("@hpcc-js/other")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common","@hpcc-js/api","@hpcc-js/layout","@hpcc-js/util","@hpcc-js/graph","@hpcc-js/other"],e):e((t=t||self)["@hpcc-js/map"]={},t["@hpcc-js/common"],t["@hpcc-js/api"],t["@hpcc-js/layout"],t["@hpcc-js/util"],t["@hpcc-js/graph"],t["@hpcc-js/other"])}(this,function(t,e,i,n,o,r,a){"use strict";var s=function(t,e){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var h=function(){return(h=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function u(t,e,i){if(i||2===arguments.length)for(var n,o=0,r=e.length;o<r;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||e)}function c(t,e,i,n){if(isNaN(e)||isNaN(i))return t;var o,r,a,s,l,h,u,c,p,d=t._root,f={data:n},_=t._x0,m=t._y0,g=t._x1,y=t._y1;if(!d)return t._root=f,t;for(;d.length;)if((h=e>=(r=(_+g)/2))?_=r:g=r,(u=i>=(a=(m+y)/2))?m=a:y=a,o=d,!(d=d[c=u<<1|h]))return o[c]=f,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&i===l)return f.next=d,o?o[c]=f:t._root=f,t;do{o=o?o[c]=new Array(4):t._root=new Array(4),(h=e>=(r=(_+g)/2))?_=r:g=r,(u=i>=(a=(m+y)/2))?m=a:y=a}while((c=u<<1|h)==(p=(l>=a)<<1|s>=r));return o[p]=d,o[c]=f,t}function p(t,e,i,n,o){this.node=t,this.x0=e,this.y0=i,this.x1=n,this.y1=o}function d(t){return t[0]}function f(t){return t[1]}function _(t,e,i){var n=new m(null==e?d:e,null==i?f:i,NaN,NaN,NaN,NaN);return null==t?n:n.addAll(t)}function m(t,e,i,n,o,r){this._x=t,this._y=e,this._x0=i,this._y0=n,this._x1=o,this._y1=r,this._root=void 0}function g(t){for(var e={data:t.data},i=e;t=t.next;)i=i.next={data:t.data};return e}var y=_.prototype=m.prototype;y.copy=function(){var t,e,i=new m(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return i;if(!n.length)return i._root=g(n),i;for(t=[{source:n,target:i._root=new Array(4)}];n=t.pop();)for(var o=0;o<4;++o)(e=n.source[o])&&(e.length?t.push({source:e,target:n.target[o]=new Array(4)}):n.target[o]=g(e));return i},y.add=function(t){var e=+this._x.call(null,t),i=+this._y.call(null,t);return c(this.cover(e,i),e,i,t)},y.addAll=function(t){var e,i,n,o,r=t.length,a=new Array(r),s=new Array(r),l=1/0,h=1/0,u=-1/0,p=-1/0;for(i=0;i<r;++i)isNaN(n=+this._x.call(null,e=t[i]))||isNaN(o=+this._y.call(null,e))||(a[i]=n,s[i]=o,n<l&&(l=n),n>u&&(u=n),o<h&&(h=o),o>p&&(p=o));if(l>u||h>p)return this;for(this.cover(l,h).cover(u,p),i=0;i<r;++i)c(this,a[i],s[i],t[i]);return this},y.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var i=this._x0,n=this._y0,o=this._x1,r=this._y1;if(isNaN(i))o=(i=Math.floor(t))+1,r=(n=Math.floor(e))+1;else{for(var a,s,l=o-i,h=this._root;i>t||t>=o||n>e||e>=r;)switch(s=(e<n)<<1|t<i,(a=new Array(4))[s]=h,h=a,l*=2,s){case 0:o=i+l,r=n+l;break;case 1:i=o-l,r=n+l;break;case 2:o=i+l,n=r-l;break;case 3:i=o-l,n=r-l}this._root&&this._root.length&&(this._root=h)}return this._x0=i,this._y0=n,this._x1=o,this._y1=r,this},y.data=function(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t},y.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},y.find=function(t,e,i){var n,o,r,a,s,l,h,u=this._x0,c=this._y0,d=this._x1,f=this._y1,_=[],m=this._root;for(m&&_.push(new p(m,u,c,d,f)),null==i?i=1/0:(u=t-i,c=e-i,d=t+i,f=e+i,i*=i);l=_.pop();)if(!(!(m=l.node)||(o=l.x0)>d||(r=l.y0)>f||(a=l.x1)<u||(s=l.y1)<c))if(m.length){var g=(o+a)/2,y=(r+s)/2;_.push(new p(m[3],g,y,a,s),new p(m[2],o,y,g,s),new p(m[1],g,r,a,y),new p(m[0],o,r,g,y)),(h=(e>=y)<<1|t>=g)&&(l=_[_.length-1],_[_.length-1]=_[_.length-1-h],_[_.length-1-h]=l)}else{var v=t-+this._x.call(null,m.data),b=e-+this._y.call(null,m.data),L=v*v+b*b;if(L<i){var w=Math.sqrt(i=L);u=t-w,c=e-w,d=t+w,f=e+w,n=m.data}}return n},y.remove=function(t){if(isNaN(r=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,i,n,o,r,a,s,l,h,u,c,p,d=this._root,f=this._x0,_=this._y0,m=this._x1,g=this._y1;if(!d)return this;if(d.length)for(;;){if((h=r>=(s=(f+m)/2))?f=s:m=s,(u=a>=(l=(_+g)/2))?_=l:g=l,e=d,!(d=d[c=u<<1|h]))return this;if(!d.length)break;(e[c+1&3]||e[c+2&3]||e[c+3&3])&&(i=e,p=c)}for(;d.data!==t;)if(n=d,!(d=d.next))return this;return(o=d.next)&&delete d.next,n?(o?n.next=o:delete n.next,this):e?(o?e[c]=o:delete e[c],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(i?i[p]=d:this._root=d),this):(this._root=o,this)},y.removeAll=function(t){for(var e=0,i=t.length;e<i;++e)this.remove(t[e]);return this},y.root=function(){return this._root},y.size=function(){var t=0;return this.visit(function(e){if(!e.length)do{++t}while(e=e.next)}),t},y.visit=function(t){var e,i,n,o,r,a,s=[],l=this._root;for(l&&s.push(new p(l,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(l=e.node,n=e.x0,o=e.y0,r=e.x1,a=e.y1)&&l.length){var h=(n+r)/2,u=(o+a)/2;(i=l[3])&&s.push(new p(i,h,u,r,a)),(i=l[2])&&s.push(new p(i,n,u,h,a)),(i=l[1])&&s.push(new p(i,h,o,r,u)),(i=l[0])&&s.push(new p(i,n,o,h,u))}return this},y.visitAfter=function(t){var e,i=[],n=[];for(this._root&&i.push(new p(this._root,this._x0,this._y0,this._x1,this._y1));e=i.pop();){var o=e.node;if(o.length){var r,a=e.x0,s=e.y0,l=e.x1,h=e.y1,u=(a+l)/2,c=(s+h)/2;(r=o[0])&&i.push(new p(r,a,s,u,c)),(r=o[1])&&i.push(new p(r,u,s,l,c)),(r=o[2])&&i.push(new p(r,a,c,u,h)),(r=o[3])&&i.push(new p(r,u,c,l,h))}n.push(e)}for(;e=n.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},y.x=function(t){return arguments.length?(this._x=t,this):this._x},y.y=function(t){return arguments.length?(this._y=t,this):this._y};var v=function(){function t(t,e,i,n){this._pin_h=0,this._pin_w=0,this._pin_h=i,this._pin_w=n,this._tree=_().extent(t).addAll(e)}return t.prototype.searchRect=function(t,e,i,n){var o=[];return this._tree.visit(function(r,a,s,l,h){var u,c,p=!1;do{if(!r.length)if(r.data&&!r.data.already_flagged)(u={left:t,right:i,top:e,bottom:n},((c=r.data)[0]<u.right||c[0]>u.left)&&(c[1]<u.bottom||c[1]>u.top))&&(r.data.already_flagged=!0,o.push(r.data));p=r=r.next}while(p);return a>=i||s>=n||l<t||h<e}),o},t.prototype.getTreeRects=function(){var t=[];return this._tree.visit(function(e,i,n,o,r){t.push([i,n,o-i,r-n])}),t},t}(),b=function(t){function e(){var e=t.call(this)||this;return e._overlap_count=0,e._sub_overlap_count=0,e}return l(e,t),e.prototype.enter=function(e,i){t.prototype.enter.apply(this,arguments),this.resize(this._size)},e.prototype.update=function(e,i){t.prototype.update.apply(this,arguments),this._ctx=this.element().node().getContext("2d");var n=(this.topLeftX_exists()&&this.topLeftY_exists()&&this.bottomRightX_exists()&&this.bottomRightY_exists()?this.skewedData():this.data()).map(function(t){return u([],t)}).map(function(t){return t.is_cluster=!1,t.already_flagged=!1,t.weight=t[2],t.fillStyle="#FFFFFF",t.strokeStyle="#000000",t.overlap_arr=[],t});this._ctx.clearRect(0,0,this.width(),this.height()),this._drawData=this.enableClustering()?this.applyClustering(n):n,this.draw(this._drawData)},e.prototype.applyClustering=function(t){var e=this,i=this;this._overlap_count=0;var n=this.pinHeight(),o=this.pinWidth(),r=o/2,a=n/2,s=new v([[0,0],[this.size().width,this.size().height]],t,n,o);switch(this._quadtree_rect_arr=s.getTreeRects(),this.clusterMode()){case"default":var l=t.map(function(t){if(!t.already_flagged){var i=e.searchRectMult(),n=t[0]-r*i,o=t[1]-a*i-8,l=t[0]+r*i,h=t[1]+a*i-8;t.overlap_arr=s.searchRect(n,o,l,h).filter(function(e){return e!==t}),0===t.overlap_arr.length&&(t.already_flagged=!1)}return t});return l.forEach(function(t){t.already_flagged&&t.overlap_arr.length&&l.push(M(u([t],t.overlap_arr)))}),l;case"grid":for(var h=u([],t),c=this.gridCellSize(),p=this.gridCellSize(),d=Math.ceil(this.size().width/c),f=Math.ceil(this.size().height/p),_=0;_<f;_++)for(var m=0;m<d;m++){var g=c*m,y=p*_,b=c*(m+1),L=p*(_+1),w=s.searchRect(g,y,b,L);if(w.length>1){var x=g+c/2,C=y+p/2;h.push(M(w,x,C))}}return h}return t;function M(t,e,n){var o=t.reduce(function(t,e){return e.already_flagged=!0,t+e[2]},0);return{0:void 0!==e?e:i.useAveragePos()?t.reduce(function(t,e){return t+e[0]*e[2]},0)/o:t[0][0],1:void 0!==n?n:i.useAveragePos()?t.reduce(function(t,e){return t+e[1]*e[2]},0)/o:t[0][1],weight:t.reduce(function(t,e){return t+e[2]},0),is_cluster:!0,already_flagged:!1,fillStyle:"#FFFFFF",strokeStyle:"#000000",overlap_arr:[]}}},e.prototype.drawQuadtree=function(){var t=this;this._quadtree_rect_arr&&(this._ctx.strokeStyle="#000000",this._quadtree_rect_arr.forEach(function(e){t._ctx.strokeRect(e[0],e[1],e[2],e[3])}))},e.prototype.draw=function(t){var e=this,i=this,n=this._ctx;this.showQuadtree()&&this.drawQuadtree();var o=this.arrowHeight(),r=this.arrowWidth(),a=this.pinHeight(),s=this.pinWidth(),l=this.radiusWeightMult(),h=0;function u(t){n.font=i.pinFontSize()+"px '"+i.pinFontFamily()+"'";var e=t.left+t.width/2,o=t.top+t.height/2;n.textAlign="center",n.textBaseline="middle",n.fillStyle="#000000";for(var r=0,a=n.measureText(t.icon).width;a>t.width||!i.shrinkFontToPin();)r++,n.font=i.pinFontSize()-r+"px '"+i.pinFontFamily()+"'",a=n.measureText(t.icon).width;n.fillText(t.icon,e,o)}this.useWeightedRadius()&&t.filter(function(t){return t.is_cluster}).forEach(function(t){h<t.weight&&(h=t.weight)}),t.filter(function(t){return!t.already_flagged}).sort(function(t,e){return t[1]>e[1]?1:-1}).forEach(function(t){if(t.is_cluster||e.allCircles()){var i=s/2;e.useWeightedRadius()&&(i+=s*(l*t.weight/h)),(c={icon:t.weight,left:Math.floor(t[0]-i)+.5,top:Math.floor(t[1]-i-o)+.5,radius:i,arrow_height:o,arrow_width:r}).width=2*c.radius,c.height=c.width,n.fillStyle="#FFFFFF",n.strokeStyle="#000000",n.beginPath(),n.arc(c.left+c.width/2,c.top+c.height/2,c.radius,0,2*Math.PI),n.closePath(),n.fill(),n.stroke(),u(c)}else!function(t){n.fillStyle=t.fillStyle,n.strokeStyle="#000000",n.fillRect(t.left,t.top,t.width,t.height),n.strokeRect(t.left,t.top,t.width,t.height),function t(e,i){var o=e.left+e.width/2-e.arrow_width/2;var r=e.left+e.width/2;var a=e.left+e.width/2+e.arrow_width/2;var s=e.top+e.height;var l=s+e.arrow_height;var h=s;i?(n.fillStyle="#FFFFFF",n.strokeStyle="#FFFFFF",s-=2,l-=2,h-=2):(n.fillStyle="#FFFFFF",n.strokeStyle="#000000");n.beginPath();n.moveTo(o,s);n.lineTo(r,l);n.lineTo(a,h);n.lineTo(o,s);n.closePath();n.stroke();n.fill();i||t(e,!0)}(t),u(t)}({fillStyle:t.fillStyle,strokeStyle:t.strokeStyle,icon:t.weight,left:Math.floor(t[0]-s/2)+.5,top:Math.floor(t[1]-a-o)+.5,width:s,height:a,arrow_height:o,arrow_width:r});var c})},e.prototype.skewedData=function(){var t=this,e=[],i=this.data(),n=this.size(),o=this.bottomRightX()-this.topLeftX(),r=this.bottomRightY()-this.topLeftY(),a=o/n.width,s=r/n.height;return i.forEach(function(i){var n=Math.abs(i[0]-t.topLeftX()),o=Math.abs(i[1]-t.topLeftY()),r=n/a,l=o/s;e.push([r,l,i[2]])}),e},e}(e.CanvasWidget);function w(){return new x}function x(){this.reset()}b.prototype._class+=" map_CanvasPins",b.prototype.publish("clusterMode","default","set","clusterMode",["defualt","grid"],{tags:["Basic"],optional:!0}),b.prototype.publish("gridCellSize",80,"number","gridCellSize",null,{tags:["Basic"],optional:!0}),b.prototype.publish("allCircles",!1,"boolean","allCircles",null,{tags:["Basic"],optional:!0}),b.prototype.publish("showQuadtree",!1,"boolean","showQuadtree",null,{tags:["Basic"],optional:!0}),b.prototype.publish("useAveragePos",!1,"boolean","useAveragePos",null,{tags:["Basic"],optional:!0}),b.prototype.publish("shrinkFontToPin",!0,"boolean","shrinkFontToPin",null,{tags:["Basic"],optional:!0}),b.prototype.publish("enableClustering",!0,"boolean","enableClustering",null,{tags:["Basic"],optional:!0}),b.prototype.publish("useWeightedRadius",!1,"boolean","useWeightedRadius",null,{tags:["Basic"],optional:!0}),b.prototype.publish("radiusWeightMult",.5,"number","radiusWeightMult",null,{tags:["Basic"],optional:!0}),b.prototype.publish("searchRectMult",3,"number","searchRectMult",null,{tags:["Basic"],optional:!0}),b.prototype.publish("bottomRightX",null,"number","Bottom right x-value",null,{tags:["Basic"],optional:!0}),b.prototype.publish("bottomRightY",null,"number","Bottom right y-value",null,{tags:["Basic"],optional:!0}),b.prototype.publish("topLeftX",null,"number","Top left x-value",null,{tags:["Basic"],optional:!0}),b.prototype.publish("topLeftY",null,"number","Top left y-value",null,{tags:["Basic"],optional:!0}),b.prototype.publish("pinHeight",20,"number","pinHeight",null,{tags:["Basic"],optional:!0}),b.prototype.publish("pinWidth",20,"number","pinWidth",null,{tags:["Basic"],optional:!0}),b.prototype.publish("pinFontFamily","Arial","string","pinFontFamily",null,{tags:["Basic"],optional:!0}),b.prototype.publish("pinFontSize",14,"number","pinFontSize",null,{tags:["Basic"],optional:!0}),b.prototype.publish("arrowHeight",8,"number","arrowHeight",null,{tags:["Basic"],optional:!0}),b.prototype.publish("arrowWidth",8,"number","arrowWidth",null,{tags:["Basic"],optional:!0}),x.prototype={constructor:x,reset:function(){this.s=this.t=0},add:function(t){M(C,t,this.t),M(this,C.s,this.s),this.s?this.t+=C.t:this.s=C.t},valueOf:function(){return this.s}};var C=new x;function M(t,e,i){var n=t.s=e+i,o=n-e,r=n-o;t.t=e-r+(i-o)}var k=1e-6,P=1e-12,I=Math.PI,E=I/2,A=I/4,T=2*I,S=180/I,z=I/180,D=Math.abs,O=Math.atan,N=Math.atan2,B=Math.cos,Z=Math.ceil,j=Math.exp,R=Math.log,G=Math.pow,H=Math.sin,U=Math.sign||function(t){return t>0?1:t<0?-1:0},W=Math.sqrt,F=Math.tan;function V(t){return t>1?0:t<-1?I:Math.acos(t)}function Y(t){return t>1?E:t<-1?-E:Math.asin(t)}function q(t){return(t=H(t/2))*t}function X(){}function K(t,e){t&&Q.hasOwnProperty(t.type)&&Q[t.type](t,e)}var J={Feature:function(t,e){K(t.geometry,e)},FeatureCollection:function(t,e){for(var i=t.features,n=-1,o=i.length;++n<o;)K(i[n].geometry,e)}},Q={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var i=t.coordinates,n=-1,o=i.length;++n<o;)t=i[n],e.point(t[0],t[1],t[2])},LineString:function(t,e){$(t.coordinates,e,0)},MultiLineString:function(t,e){for(var i=t.coordinates,n=-1,o=i.length;++n<o;)$(i[n],e,0)},Polygon:function(t,e){tt(t.coordinates,e)},MultiPolygon:function(t,e){for(var i=t.coordinates,n=-1,o=i.length;++n<o;)tt(i[n],e)},GeometryCollection:function(t,e){for(var i=t.geometries,n=-1,o=i.length;++n<o;)K(i[n],e)}};function $(t,e,i){var n,o=-1,r=t.length-i;for(e.lineStart();++o<r;)n=t[o],e.point(n[0],n[1],n[2]);e.lineEnd()}function tt(t,e){var i=-1,n=t.length;for(e.polygonStart();++i<n;)$(t[i],e,1);e.polygonEnd()}function et(t,e){t&&J.hasOwnProperty(t.type)?J[t.type](t,e):K(t,e)}var it,nt,ot,rt,at,st=w(),lt=w(),ht={point:X,lineStart:X,lineEnd:X,polygonStart:function(){st.reset(),ht.lineStart=ut,ht.lineEnd=ct},polygonEnd:function(){var t=+st;lt.add(t<0?T+t:t),this.lineStart=this.lineEnd=this.point=X},sphere:function(){lt.add(T)}};function ut(){ht.point=pt}function ct(){dt(it,nt)}function pt(t,e){ht.point=dt,it=t,nt=e,ot=t*=z,rt=B(e=(e*=z)/2+A),at=H(e)}function dt(t,e){var i=(t*=z)-ot,n=i>=0?1:-1,o=n*i,r=B(e=(e*=z)/2+A),a=H(e),s=at*a,l=rt*r+s*B(o),h=s*n*H(o);st.add(N(h,l)),ot=t,rt=r,at=a}function ft(t){return[N(t[1],t[0]),Y(t[2])]}function _t(t){var e=t[0],i=t[1],n=B(i);return[n*B(e),n*H(e),H(i)]}function mt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function gt(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function yt(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function vt(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function bt(t){var e=W(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var Lt,wt,xt,Ct,Mt,kt,Pt,It,Et,At,Tt,St,zt,Dt,Ot,Nt,Bt,Zt,jt,Rt,Gt,Ht,Ut,Wt,Ft,Vt,Yt=w(),qt={point:Xt,lineStart:Jt,lineEnd:Qt,polygonStart:function(){qt.point=$t,qt.lineStart=te,qt.lineEnd=ee,Yt.reset(),ht.polygonStart()},polygonEnd:function(){ht.polygonEnd(),qt.point=Xt,qt.lineStart=Jt,qt.lineEnd=Qt,st<0?(Lt=-(xt=180),wt=-(Ct=90)):Yt>k?Ct=90:Yt<-k&&(wt=-90),At[0]=Lt,At[1]=xt},sphere:function(){Lt=-(xt=180),wt=-(Ct=90)}};function Xt(t,e){Et.push(At=[Lt=t,xt=t]),e<wt&&(wt=e),e>Ct&&(Ct=e)}function Kt(t,e){var i=_t([t*z,e*z]);if(It){var n=gt(It,i),o=gt([n[1],-n[0],0],n);bt(o),o=ft(o);var r,a=t-Mt,s=a>0?1:-1,l=o[0]*S*s,h=D(a)>180;h^(s*Mt<l&&l<s*t)?(r=o[1]*S)>Ct&&(Ct=r):h^(s*Mt<(l=(l+360)%360-180)&&l<s*t)?(r=-o[1]*S)<wt&&(wt=r):(e<wt&&(wt=e),e>Ct&&(Ct=e)),h?t<Mt?ie(Lt,t)>ie(Lt,xt)&&(xt=t):ie(t,xt)>ie(Lt,xt)&&(Lt=t):xt>=Lt?(t<Lt&&(Lt=t),t>xt&&(xt=t)):t>Mt?ie(Lt,t)>ie(Lt,xt)&&(xt=t):ie(t,xt)>ie(Lt,xt)&&(Lt=t)}else Et.push(At=[Lt=t,xt=t]);e<wt&&(wt=e),e>Ct&&(Ct=e),It=i,Mt=t}function Jt(){qt.point=Kt}function Qt(){At[0]=Lt,At[1]=xt,qt.point=Xt,It=null}function $t(t,e){if(It){var i=t-Mt;Yt.add(D(i)>180?i+(i>0?360:-360):i)}else kt=t,Pt=e;ht.point(t,e),Kt(t,e)}function te(){ht.lineStart()}function ee(){$t(kt,Pt),ht.lineEnd(),D(Yt)>k&&(Lt=-(xt=180)),At[0]=Lt,At[1]=xt,It=null}function ie(t,e){return(e-=t)<0?e+360:e}function ne(t,e){return t[0]-e[0]}function oe(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var re={sphere:X,point:ae,lineStart:le,lineEnd:ce,polygonStart:function(){re.lineStart=pe,re.lineEnd=de},polygonEnd:function(){re.lineStart=le,re.lineEnd=ce}};function ae(t,e){t*=z;var i=B(e*=z);se(i*B(t),i*H(t),H(e))}function se(t,e,i){zt+=(t-zt)/++Tt,Dt+=(e-Dt)/Tt,Ot+=(i-Ot)/Tt}function le(){re.point=he}function he(t,e){t*=z;var i=B(e*=z);Wt=i*B(t),Ft=i*H(t),Vt=H(e),re.point=ue,se(Wt,Ft,Vt)}function ue(t,e){t*=z;var i=B(e*=z),n=i*B(t),o=i*H(t),r=H(e),a=N(W((a=Ft*r-Vt*o)*a+(a=Vt*n-Wt*r)*a+(a=Wt*o-Ft*n)*a),Wt*n+Ft*o+Vt*r);St+=a,Nt+=a*(Wt+(Wt=n)),Bt+=a*(Ft+(Ft=o)),Zt+=a*(Vt+(Vt=r)),se(Wt,Ft,Vt)}function ce(){re.point=ae}function pe(){re.point=fe}function de(){_e(Ht,Ut),re.point=ae}function fe(t,e){Ht=t,Ut=e,t*=z,e*=z,re.point=_e;var i=B(e);Wt=i*B(t),Ft=i*H(t),Vt=H(e),se(Wt,Ft,Vt)}function _e(t,e){t*=z;var i=B(e*=z),n=i*B(t),o=i*H(t),r=H(e),a=Ft*r-Vt*o,s=Vt*n-Wt*r,l=Wt*o-Ft*n,h=W(a*a+s*s+l*l),u=Y(h),c=h&&-u/h;jt+=c*a,Rt+=c*s,Gt+=c*l,St+=u,Nt+=u*(Wt+(Wt=n)),Bt+=u*(Ft+(Ft=o)),Zt+=u*(Vt+(Vt=r)),se(Wt,Ft,Vt)}function me(t){return function(){return t}}function ge(t,e){function i(i,n){return i=t(i,n),e(i[0],i[1])}return t.invert&&e.invert&&(i.invert=function(i,n){return(i=e.invert(i,n))&&t.invert(i[0],i[1])}),i}function ye(t,e){return[D(t)>I?t+Math.round(-t/T)*T:t,e]}function ve(t,e,i){return(t%=T)?e||i?ge(Le(t),we(e,i)):Le(t):e||i?we(e,i):ye}function be(t){return function(e,i){return[(e+=t)>I?e-T:e<-I?e+T:e,i]}}function Le(t){var e=be(t);return e.invert=be(-t),e}function we(t,e){var i=B(t),n=H(t),o=B(e),r=H(e);function a(t,e){var a=B(e),s=B(t)*a,l=H(t)*a,h=H(e),u=h*i+s*n;return[N(l*o-u*r,s*i-h*n),Y(u*o+l*r)]}return a.invert=function(t,e){var a=B(e),s=B(t)*a,l=H(t)*a,h=H(e),u=h*o-l*r;return[N(l*o+h*r,s*i+u*n),Y(u*i-s*n)]},a}function xe(t){function e(e){return(e=t(e[0]*z,e[1]*z))[0]*=S,e[1]*=S,e}return t=ve(t[0]*z,t[1]*z,t.length>2?t[2]*z:0),e.invert=function(e){return(e=t.invert(e[0]*z,e[1]*z))[0]*=S,e[1]*=S,e},e}function Ce(t,e,i,n,o,r){if(i){var a=B(e),s=H(e),l=n*i;null==o?(o=e+n*T,r=e-l/2):(o=Me(a,o),r=Me(a,r),(n>0?o<r:o>r)&&(o+=n*T));for(var h,u=o;n>0?u>r:u<r;u-=l)h=ft([a,-s*B(u),-s*H(u)]),t.point(h[0],h[1])}}function Me(t,e){(e=_t(e))[0]-=t,bt(e);var i=V(-e[1]);return((-e[2]<0?-i:i)+T-k)%T}function ke(){var t,e=[];return{point:function(e,i,n){t.push([e,i,n])},lineStart:function(){e.push(t=[])},lineEnd:X,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var i=e;return e=[],t=null,i}}}function Pe(t,e){return D(t[0]-e[0])<k&&D(t[1]-e[1])<k}function Ie(t,e,i,n){this.x=t,this.z=e,this.o=i,this.e=n,this.v=!1,this.n=this.p=null}function Ee(t,e,i,n,o){var r,a,s=[],l=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,i,n=t[0],a=t[e];if(Pe(n,a)){if(!n[2]&&!a[2]){for(o.lineStart(),r=0;r<e;++r)o.point((n=t[r])[0],n[1]);return void o.lineEnd()}a[0]+=2*k}s.push(i=new Ie(n,t,null,!0)),l.push(i.o=new Ie(n,null,i,!1)),s.push(i=new Ie(a,t,null,!1)),l.push(i.o=new Ie(a,null,i,!0))}}),s.length){for(l.sort(e),Ae(s),Ae(l),r=0,a=l.length;r<a;++r)l[r].e=i=!i;for(var h,u,c=s[0];;){for(var p=c,d=!0;p.v;)if((p=p.n)===c)return;h=p.z,o.lineStart();do{if(p.v=p.o.v=!0,p.e){if(d)for(r=0,a=h.length;r<a;++r)o.point((u=h[r])[0],u[1]);else n(p.x,p.n.x,1,o);p=p.n}else{if(d)for(h=p.p.z,r=h.length-1;r>=0;--r)o.point((u=h[r])[0],u[1]);else n(p.x,p.p.x,-1,o);p=p.p}h=(p=p.o).z,d=!d}while(!p.v);o.lineEnd()}}}function Ae(t){if(e=t.length){for(var e,i,n=0,o=t[0];++n<e;)o.n=i=t[n],i.p=o,o=i;o.n=i=t[0],i.p=o}}ye.invert=ye;var Te=w();function Se(t){return D(t[0])<=I?t[0]:U(t[0])*((D(t[0])+I)%T-I)}function ze(t,e){var i=Se(e),n=e[1],o=H(n),r=[H(i),-B(i),0],a=0,s=0;Te.reset(),1===o?n=E+k:-1===o&&(n=-E-k);for(var l=0,h=t.length;l<h;++l)if(c=(u=t[l]).length)for(var u,c,p=u[c-1],d=Se(p),f=p[1]/2+A,_=H(f),m=B(f),g=0;g<c;++g,d=v,_=L,m=w,p=y){var y=u[g],v=Se(y),b=y[1]/2+A,L=H(b),w=B(b),x=v-d,C=x>=0?1:-1,M=C*x,P=M>I,S=_*L;if(Te.add(N(S*C*H(M),m*w+S*B(M))),a+=P?x+C*T:x,P^d>=i^v>=i){var z=gt(_t(p),_t(y));bt(z);var D=gt(r,z);bt(D);var O=(P^x>=0?-1:1)*Y(D[2]);(n>O||n===O&&(z[0]||z[1]))&&(s+=P^x>=0?1:-1)}}return(a<-k||a<k&&Te<-k)^1&s}function De(t,i,n,o){return function(r){var a,s,l,h=i(r),u=ke(),c=i(u),p=!1,d={point:f,lineStart:m,lineEnd:g,polygonStart:function(){d.point=y,d.lineStart=v,d.lineEnd=b,s=[],a=[]},polygonEnd:function(){d.point=f,d.lineStart=m,d.lineEnd=g,s=e.merge(s);var t=ze(a,o);s.length?(p||(r.polygonStart(),p=!0),Ee(s,Ne,t,n,r)):t&&(p||(r.polygonStart(),p=!0),r.lineStart(),n(null,null,1,r),r.lineEnd()),p&&(r.polygonEnd(),p=!1),s=a=null},sphere:function(){r.polygonStart(),r.lineStart(),n(null,null,1,r),r.lineEnd(),r.polygonEnd()}};function f(e,i){t(e,i)&&r.point(e,i)}function _(t,e){h.point(t,e)}function m(){d.point=_,h.lineStart()}function g(){d.point=f,h.lineEnd()}function y(t,e){l.push([t,e]),c.point(t,e)}function v(){c.lineStart(),l=[]}function b(){y(l[0][0],l[0][1]),c.lineEnd();var t,e,i,n,o=c.clean(),h=u.result(),d=h.length;if(l.pop(),a.push(l),l=null,d)if(1&o){if((e=(i=h[0]).length-1)>0){for(p||(r.polygonStart(),p=!0),r.lineStart(),t=0;t<e;++t)r.point((n=i[t])[0],n[1]);r.lineEnd()}}else d>1&&2&o&&h.push(h.pop().concat(h.shift())),s.push(h.filter(Oe))}return d}}function Oe(t){return t.length>1}function Ne(t,e){return((t=t.x)[0]<0?t[1]-E-k:E-t[1])-((e=e.x)[0]<0?e[1]-E-k:E-e[1])}var Be=De(function(){return!0},function(t){var e,i=NaN,n=NaN,o=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(r,a){var s=r>0?I:-I,l=D(r-i);D(l-I)<k?(t.point(i,n=(n+a)/2>0?E:-E),t.point(o,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(r,n),e=0):o!==s&&l>=I&&(D(i-o)<k&&(i-=o*k),D(r-s)<k&&(r-=s*k),n=function(t,e,i,n){var o,r,a=H(t-i);return D(a)>k?O((H(e)*(r=B(n))*H(i)-H(n)*(o=B(e))*H(t))/(o*r*a)):(e+n)/2}(i,n,r,a),t.point(o,n),t.lineEnd(),t.lineStart(),t.point(s,n),e=0),t.point(i=r,n=a),o=s},lineEnd:function(){t.lineEnd(),i=n=NaN},clean:function(){return 2-e}}},function(t,e,i,n){var o;if(null==t)o=i*E,n.point(-I,o),n.point(0,o),n.point(I,o),n.point(I,0),n.point(I,-o),n.point(0,-o),n.point(-I,-o),n.point(-I,0),n.point(-I,o);else if(D(t[0]-e[0])>k){var r=t[0]<e[0]?I:-I;o=i*r/2,n.point(-r,o),n.point(0,o),n.point(r,o)}else n.point(e[0],e[1])},[-I,-E]);function Ze(t){var e=B(t),i=6*z,n=e>0,o=D(e)>k;function r(t,i){return B(t)*B(i)>e}function a(t,i,n){var o=[1,0,0],r=gt(_t(t),_t(i)),a=mt(r,r),s=r[0],l=a-s*s;if(!l)return!n&&t;var h=e*a/l,u=-e*s/l,c=gt(o,r),p=vt(o,h);yt(p,vt(r,u));var d=c,f=mt(p,d),_=mt(d,d),m=f*f-_*(mt(p,p)-1);if(!(m<0)){var g=W(m),y=vt(d,(-f-g)/_);if(yt(y,p),y=ft(y),!n)return y;var v,b=t[0],L=i[0],w=t[1],x=i[1];L<b&&(v=b,b=L,L=v);var C=L-b,M=D(C-I)<k;if(!M&&x<w&&(v=w,w=x,x=v),M||C<k?M?w+x>0^y[1]<(D(y[0]-b)<k?w:x):w<=y[1]&&y[1]<=x:C>I^(b<=y[0]&&y[0]<=L)){var P=vt(d,(-f+g)/_);return yt(P,p),[y,ft(P)]}}}function s(e,i){var o=n?t:I-t,r=0;return e<-o?r|=1:e>o&&(r|=2),i<-o?r|=4:i>o&&(r|=8),r}return De(r,function(t){var e,i,l,h,u;return{lineStart:function(){h=l=!1,u=1},point:function(c,p){var d,f=[c,p],_=r(c,p),m=n?_?0:s(c,p):_?s(c+(c<0?I:-I),p):0;if(!e&&(h=l=_)&&t.lineStart(),_!==l&&(!(d=a(e,f))||Pe(e,d)||Pe(f,d))&&(f[2]=1),_!==l)u=0,_?(t.lineStart(),d=a(f,e),t.point(d[0],d[1])):(d=a(e,f),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(o&&e&&n^_){var g;m&i||!(g=a(f,e,!0))||(u=0,n?(t.lineStart(),t.point(g[0][0],g[0][1]),t.point(g[1][0],g[1][1]),t.lineEnd()):(t.point(g[1][0],g[1][1]),t.lineEnd(),t.lineStart(),t.point(g[0][0],g[0][1],3)))}!_||e&&Pe(e,f)||t.point(f[0],f[1]),e=f,l=_,i=m},lineEnd:function(){l&&t.lineEnd(),e=null},clean:function(){return u|(h&&l)<<1}}},function(e,n,o,r){Ce(r,t,i,o,e,n)},n?[0,-t]:[-I,t-I])}var je=1e9,Re=-je;function Ge(t,i,n,o){function r(e,r){return t<=e&&e<=n&&i<=r&&r<=o}function a(e,r,a,l){var u=0,c=0;if(null==e||(u=s(e,a))!==(c=s(r,a))||h(e,r)<0^a>0)do{l.point(0===u||3===u?t:n,u>1?o:i)}while((u=(u+a+4)%4)!==c);else l.point(r[0],r[1])}function s(e,o){return D(e[0]-t)<k?o>0?0:3:D(e[0]-n)<k?o>0?2:1:D(e[1]-i)<k?o>0?1:0:o>0?3:2}function l(t,e){return h(t.x,e.x)}function h(t,e){var i=s(t,1),n=s(e,1);return i!==n?i-n:0===i?e[1]-t[1]:1===i?t[0]-e[0]:2===i?t[1]-e[1]:e[0]-t[0]}return function(s){var h,u,c,p,d,f,_,m,g,y,v,b=s,L=ke(),w={point:x,lineStart:function(){w.point=C,u&&u.push(c=[]);y=!0,g=!1,_=m=NaN},lineEnd:function(){h&&(C(p,d),f&&g&&L.rejoin(),h.push(L.result()));w.point=x,g&&b.lineEnd()},polygonStart:function(){b=L,h=[],u=[],v=!0},polygonEnd:function(){var i=function(){for(var e=0,i=0,n=u.length;i<n;++i)for(var r,a,s=u[i],l=1,h=s.length,c=s[0],p=c[0],d=c[1];l<h;++l)r=p,a=d,c=s[l],p=c[0],d=c[1],a<=o?d>o&&(p-r)*(o-a)>(d-a)*(t-r)&&++e:d<=o&&(p-r)*(o-a)<(d-a)*(t-r)&&--e;return e}(),n=v&&i,r=(h=e.merge(h)).length;(n||r)&&(s.polygonStart(),n&&(s.lineStart(),a(null,null,1,s),s.lineEnd()),r&&Ee(h,l,i,a,s),s.polygonEnd());b=s,h=u=c=null}};function x(t,e){r(t,e)&&b.point(t,e)}function C(e,a){var s=r(e,a);if(u&&c.push([e,a]),y)p=e,d=a,f=s,y=!1,s&&(b.lineStart(),b.point(e,a));else if(s&&g)b.point(e,a);else{var l=[_=Math.max(Re,Math.min(je,_)),m=Math.max(Re,Math.min(je,m))],h=[e=Math.max(Re,Math.min(je,e)),a=Math.max(Re,Math.min(je,a))];!function(t,e,i,n,o,r){var a,s=t[0],l=t[1],h=0,u=1,c=e[0]-s,p=e[1]-l;if(a=i-s,c||!(a>0)){if(a/=c,c<0){if(a<h)return;a<u&&(u=a)}else if(c>0){if(a>u)return;a>h&&(h=a)}if(a=o-s,c||!(a<0)){if(a/=c,c<0){if(a>u)return;a>h&&(h=a)}else if(c>0){if(a<h)return;a<u&&(u=a)}if(a=n-l,p||!(a>0)){if(a/=p,p<0){if(a<h)return;a<u&&(u=a)}else if(p>0){if(a>u)return;a>h&&(h=a)}if(a=r-l,p||!(a<0)){if(a/=p,p<0){if(a>u)return;a>h&&(h=a)}else if(p>0){if(a<h)return;a<u&&(u=a)}return h>0&&(t[0]=s+h*c,t[1]=l+h*p),u<1&&(e[0]=s+u*c,e[1]=l+u*p),!0}}}}}(l,h,t,i,n,o)?s&&(b.lineStart(),b.point(e,a),v=!1):(g||(b.lineStart(),b.point(l[0],l[1])),b.point(h[0],h[1]),s||b.lineEnd(),v=!1)}_=e,m=a,g=s}return w}}var He,Ue,We,Fe=w(),Ve={sphere:X,point:X,lineStart:function(){Ve.point=qe,Ve.lineEnd=Ye},lineEnd:X,polygonStart:X,polygonEnd:X};function Ye(){Ve.point=Ve.lineEnd=X}function qe(t,e){He=t*=z,Ue=H(e*=z),We=B(e),Ve.point=Xe}function Xe(t,e){t*=z;var i=H(e*=z),n=B(e),o=D(t-He),r=B(o),a=n*H(o),s=We*i-Ue*n*r,l=Ue*i+We*n*r;Fe.add(N(W(a*a+s*s),l)),He=t,Ue=i,We=n}function Ke(t){return Fe.reset(),et(t,Ve),+Fe}var Je=[null,null],Qe={type:"LineString",coordinates:Je};function $e(t,e){return Je[0]=t,Je[1]=e,Ke(Qe)}var ti={Feature:function(t,e){return ii(t.geometry,e)},FeatureCollection:function(t,e){for(var i=t.features,n=-1,o=i.length;++n<o;)if(ii(i[n].geometry,e))return!0;return!1}},ei={Sphere:function(){return!0},Point:function(t,e){return ni(t.coordinates,e)},MultiPoint:function(t,e){for(var i=t.coordinates,n=-1,o=i.length;++n<o;)if(ni(i[n],e))return!0;return!1},LineString:function(t,e){return oi(t.coordinates,e)},MultiLineString:function(t,e){for(var i=t.coordinates,n=-1,o=i.length;++n<o;)if(oi(i[n],e))return!0;return!1},Polygon:function(t,e){return ri(t.coordinates,e)},MultiPolygon:function(t,e){for(var i=t.coordinates,n=-1,o=i.length;++n<o;)if(ri(i[n],e))return!0;return!1},GeometryCollection:function(t,e){for(var i=t.geometries,n=-1,o=i.length;++n<o;)if(ii(i[n],e))return!0;return!1}};function ii(t,e){return!(!t||!ei.hasOwnProperty(t.type))&&ei[t.type](t,e)}function ni(t,e){return 0===$e(t,e)}function oi(t,e){for(var i,n,o,r=0,a=t.length;r<a;r++){if(0===(n=$e(t[r],e)))return!0;if(r>0&&(o=$e(t[r],t[r-1]))>0&&i<=o&&n<=o&&(i+n-o)*(1-Math.pow((i-n)/o,2))<P*o)return!0;i=n}return!1}function ri(t,e){return!!ze(t.map(ai),si(e))}function ai(t){return(t=t.map(si)).pop(),t}function si(t){return[t[0]*z,t[1]*z]}function li(t,i,n){var o=e.range(t,i-k,n).concat(i);return function(t){return o.map(function(e){return[t,e]})}}function hi(t,i,n){var o=e.range(t,i-k,n).concat(i);return function(t){return o.map(function(e){return[e,t]})}}function ui(){var t,i,n,o,r,a,s,l,h,u,c,p,d=10,f=d,_=90,m=360,g=2.5;function y(){return{type:"MultiLineString",coordinates:v()}}function v(){return e.range(Z(o/_)*_,n,_).map(c).concat(e.range(Z(l/m)*m,s,m).map(p)).concat(e.range(Z(i/d)*d,t,d).filter(function(t){return D(t%_)>k}).map(h)).concat(e.range(Z(a/f)*f,r,f).filter(function(t){return D(t%m)>k}).map(u))}return y.lines=function(){return v().map(function(t){return{type:"LineString",coordinates:t}})},y.outline=function(){return{type:"Polygon",coordinates:[c(o).concat(p(s).slice(1),c(n).reverse().slice(1),p(l).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.extentMajor(t).extentMinor(t):y.extentMinor()},y.extentMajor=function(t){return arguments.length?(o=+t[0][0],n=+t[1][0],l=+t[0][1],s=+t[1][1],o>n&&(t=o,o=n,n=t),l>s&&(t=l,l=s,s=t),y.precision(g)):[[o,l],[n,s]]},y.extentMinor=function(e){return arguments.length?(i=+e[0][0],t=+e[1][0],a=+e[0][1],r=+e[1][1],i>t&&(e=i,i=t,t=e),a>r&&(e=a,a=r,r=e),y.precision(g)):[[i,a],[t,r]]},y.step=function(t){return arguments.length?y.stepMajor(t).stepMinor(t):y.stepMinor()},y.stepMajor=function(t){return arguments.length?(_=+t[0],m=+t[1],y):[_,m]},y.stepMinor=function(t){return arguments.length?(d=+t[0],f=+t[1],y):[d,f]},y.precision=function(e){return arguments.length?(g=+e,h=li(a,r,90),u=hi(i,t,g),c=li(l,s,90),p=hi(o,n,g),y):g},y.extentMajor([[-180,-90+k],[180,90-k]]).extentMinor([[-180,-80-k],[180,80+k]])}function ci(t){return t}var pi,di,fi,_i,mi=w(),gi=w(),yi={point:X,lineStart:X,lineEnd:X,polygonStart:function(){yi.lineStart=vi,yi.lineEnd=wi},polygonEnd:function(){yi.lineStart=yi.lineEnd=yi.point=X,mi.add(D(gi)),gi.reset()},result:function(){var t=mi/2;return mi.reset(),t}};function vi(){yi.point=bi}function bi(t,e){yi.point=Li,pi=fi=t,di=_i=e}function Li(t,e){gi.add(_i*t-fi*e),fi=t,_i=e}function wi(){Li(pi,di)}var xi=1/0,Ci=xi,Mi=-xi,ki=Mi,Pi={point:function(t,e){t<xi&&(xi=t);t>Mi&&(Mi=t);e<Ci&&(Ci=e);e>ki&&(ki=e)},lineStart:X,lineEnd:X,polygonStart:X,polygonEnd:X,result:function(){var t=[[xi,Ci],[Mi,ki]];return Mi=ki=-(Ci=xi=1/0),t}};var Ii,Ei,Ai,Ti,Si=0,zi=0,Di=0,Oi=0,Ni=0,Bi=0,Zi=0,ji=0,Ri=0,Gi={point:Hi,lineStart:Ui,lineEnd:Vi,polygonStart:function(){Gi.lineStart=Yi,Gi.lineEnd=qi},polygonEnd:function(){Gi.point=Hi,Gi.lineStart=Ui,Gi.lineEnd=Vi},result:function(){var t=Ri?[Zi/Ri,ji/Ri]:Bi?[Oi/Bi,Ni/Bi]:Di?[Si/Di,zi/Di]:[NaN,NaN];return Si=zi=Di=Oi=Ni=Bi=Zi=ji=Ri=0,t}};function Hi(t,e){Si+=t,zi+=e,++Di}function Ui(){Gi.point=Wi}function Wi(t,e){Gi.point=Fi,Hi(Ai=t,Ti=e)}function Fi(t,e){var i=t-Ai,n=e-Ti,o=W(i*i+n*n);Oi+=o*(Ai+t)/2,Ni+=o*(Ti+e)/2,Bi+=o,Hi(Ai=t,Ti=e)}function Vi(){Gi.point=Hi}function Yi(){Gi.point=Xi}function qi(){Ki(Ii,Ei)}function Xi(t,e){Gi.point=Ki,Hi(Ii=Ai=t,Ei=Ti=e)}function Ki(t,e){var i=t-Ai,n=e-Ti,o=W(i*i+n*n);Oi+=o*(Ai+t)/2,Ni+=o*(Ti+e)/2,Bi+=o,Zi+=(o=Ti*t-Ai*e)*(Ai+t),ji+=o*(Ti+e),Ri+=3*o,Hi(Ai=t,Ti=e)}function Ji(t){this._context=t}Ji.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,T)}},result:X};var Qi,$i,tn,en,nn,on=w(),rn={point:X,lineStart:function(){rn.point=an},lineEnd:function(){Qi&&sn($i,tn),rn.point=X},polygonStart:function(){Qi=!0},polygonEnd:function(){Qi=null},result:function(){var t=+on;return on.reset(),t}};function an(t,e){rn.point=sn,$i=en=t,tn=nn=e}function sn(t,e){en-=t,nn-=e,on.add(W(en*en+nn*nn)),en=t,nn=e}function ln(){this._string=[]}function hn(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function un(t,e){var i,n,o=4.5;function r(t){return t&&("function"==typeof o&&n.pointRadius(+o.apply(this,arguments)),et(t,i(n))),n.result()}return r.area=function(t){return et(t,i(yi)),yi.result()},r.measure=function(t){return et(t,i(rn)),rn.result()},r.bounds=function(t){return et(t,i(Pi)),Pi.result()},r.centroid=function(t){return et(t,i(Gi)),Gi.result()},r.projection=function(e){return arguments.length?(i=null==e?(t=null,ci):(t=e).stream,r):t},r.context=function(t){return arguments.length?(n=null==t?(e=null,new ln):new Ji(e=t),"function"!=typeof o&&n.pointRadius(o),r):e},r.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(n.pointRadius(+t),+t),r):o},r.projection(t).context(e)}function cn(t){return function(e){var i=new pn;for(var n in t)i[n]=t[n];return i.stream=e,i}}function pn(){}function dn(t,e,i){var n=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=n&&t.clipExtent(null),et(i,t.stream(Pi)),e(Pi.result()),null!=n&&t.clipExtent(n),t}function fn(t,e,i){return dn(t,function(i){var n=e[1][0]-e[0][0],o=e[1][1]-e[0][1],r=Math.min(n/(i[1][0]-i[0][0]),o/(i[1][1]-i[0][1])),a=+e[0][0]+(n-r*(i[1][0]+i[0][0]))/2,s=+e[0][1]+(o-r*(i[1][1]+i[0][1]))/2;t.scale(150*r).translate([a,s])},i)}function _n(t,e,i){return fn(t,[[0,0],e],i)}function mn(t,e,i){return dn(t,function(i){var n=+e,o=n/(i[1][0]-i[0][0]),r=(n-o*(i[1][0]+i[0][0]))/2,a=-o*i[0][1];t.scale(150*o).translate([r,a])},i)}function gn(t,e,i){return dn(t,function(i){var n=+e,o=n/(i[1][1]-i[0][1]),r=-o*i[0][0],a=(n-o*(i[1][1]+i[0][1]))/2;t.scale(150*o).translate([r,a])},i)}ln.prototype={_radius:4.5,_circle:hn(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=hn(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},pn.prototype={constructor:pn,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var yn=16,vn=B(30*z);function bn(t,e){return+e?function(t,e){function i(n,o,r,a,s,l,h,u,c,p,d,f,_,m){var g=h-n,y=u-o,v=g*g+y*y;if(v>4*e&&_--){var b=a+p,L=s+d,w=l+f,x=W(b*b+L*L+w*w),C=Y(w/=x),M=D(D(w)-1)<k||D(r-c)<k?(r+c)/2:N(L,b),P=t(M,C),I=P[0],E=P[1],A=I-n,T=E-o,S=y*A-g*T;(S*S/v>e||D((g*A+y*T)/v-.5)>.3||a*p+s*d+l*f<vn)&&(i(n,o,r,a,s,l,I,E,M,b/=x,L/=x,w,_,m),m.point(I,E),i(I,E,M,b,L,w,h,u,c,p,d,f,_,m))}}return function(e){var n,o,r,a,s,l,h,u,c,p,d,f,_={point:m,lineStart:g,lineEnd:v,polygonStart:function(){e.polygonStart(),_.lineStart=b},polygonEnd:function(){e.polygonEnd(),_.lineStart=g}};function m(i,n){i=t(i,n),e.point(i[0],i[1])}function g(){u=NaN,_.point=y,e.lineStart()}function y(n,o){var r=_t([n,o]),a=t(n,o);i(u,c,h,p,d,f,u=a[0],c=a[1],h=n,p=r[0],d=r[1],f=r[2],yn,e),e.point(u,c)}function v(){_.point=m,e.lineEnd()}function b(){g(),_.point=L,_.lineEnd=w}function L(t,e){y(n=t,e),o=u,r=c,a=p,s=d,l=f,_.point=y}function w(){i(u,c,h,p,d,f,o,r,n,a,s,l,yn,e),_.lineEnd=v,v()}return _}}(t,e):function(t){return cn({point:function(e,i){e=t(e,i),this.stream.point(e[0],e[1])}})}(t)}var Ln=cn({point:function(t,e){this.stream.point(t*z,e*z)}});function wn(t,e,i,n,o,r){var a=B(r),s=H(r),l=a*t,h=s*t,u=a/t,c=s/t,p=(s*i-a*e)/t,d=(s*e+a*i)/t;function f(t,r){return[l*(t*=n)-h*(r*=o)+e,i-h*t-l*r]}return f.invert=function(t,e){return[n*(u*t-c*e+p),o*(d-c*t-u*e)]},f}function xn(t){return Cn(function(){return t})()}function Cn(t){var e,i,n,o,r,a,s,l,h,u,c=150,p=480,d=250,f=0,_=0,m=0,g=0,y=0,v=0,b=1,L=1,w=null,x=Be,C=null,M=ci,k=.5;function P(t){return l(t[0]*z,t[1]*z)}function I(t){return(t=l.invert(t[0],t[1]))&&[t[0]*S,t[1]*S]}function E(){var t=wn(c,0,0,b,L,v).apply(null,e(f,_)),n=(v?wn:function(t,e,i,n,o){function r(r,a){return[e+t*(r*=n),i-t*(a*=o)]}return r.invert=function(r,a){return[(r-e)/t*n,(i-a)/t*o]},r})(c,p-t[0],d-t[1],b,L,v);return i=ve(m,g,y),s=ge(e,n),l=ge(i,s),a=bn(s,k),A()}function A(){return h=u=null,P}return P.stream=function(t){return h&&u===t?h:h=Ln(function(t){return cn({point:function(e,i){var n=t(e,i);return this.stream.point(n[0],n[1])}})}(i)(x(a(M(u=t)))))},P.preclip=function(t){return arguments.length?(x=t,w=void 0,A()):x},P.postclip=function(t){return arguments.length?(M=t,C=n=o=r=null,A()):M},P.clipAngle=function(t){return arguments.length?(x=+t?Ze(w=t*z):(w=null,Be),A()):w*S},P.clipExtent=function(t){return arguments.length?(M=null==t?(C=n=o=r=null,ci):Ge(C=+t[0][0],n=+t[0][1],o=+t[1][0],r=+t[1][1]),A()):null==C?null:[[C,n],[o,r]]},P.scale=function(t){return arguments.length?(c=+t,E()):c},P.translate=function(t){return arguments.length?(p=+t[0],d=+t[1],E()):[p,d]},P.center=function(t){return arguments.length?(f=t[0]%360*z,_=t[1]%360*z,E()):[f*S,_*S]},P.rotate=function(t){return arguments.length?(m=t[0]%360*z,g=t[1]%360*z,y=t.length>2?t[2]%360*z:0,E()):[m*S,g*S,y*S]},P.angle=function(t){return arguments.length?(v=t%360*z,E()):v*S},P.reflectX=function(t){return arguments.length?(b=t?-1:1,E()):b<0},P.reflectY=function(t){return arguments.length?(L=t?-1:1,E()):L<0},P.precision=function(t){return arguments.length?(a=bn(s,k=t*t),A()):W(k)},P.fitExtent=function(t,e){return fn(P,t,e)},P.fitSize=function(t,e){return _n(P,t,e)},P.fitWidth=function(t,e){return mn(P,t,e)},P.fitHeight=function(t,e){return gn(P,t,e)},function(){return e=t.apply(this,arguments),P.invert=e.invert&&I,E()}}function Mn(t){var e=0,i=I/3,n=Cn(t),o=n(e,i);return o.parallels=function(t){return arguments.length?n(e=t[0]*z,i=t[1]*z):[e*S,i*S]},o}function kn(t,e){var i=H(t),n=(i+H(e))/2;if(D(n)<k)return function(t){var e=B(t);function i(t,i){return[t*e,H(i)/e]}return i.invert=function(t,i){return[t/e,Y(i*e)]},i}(t);var o=1+i*(2*n-i),r=W(o)/n;function a(t,e){var i=W(o-2*n*H(e))/n;return[i*H(t*=n),r-i*B(t)]}return a.invert=function(t,e){var i=r-e,a=N(t,D(i))*U(i);return i*n<0&&(a-=I*U(t)*U(i)),[a/n,Y((o-(t*t+i*i)*n*n)/(2*n))]},a}function Pn(){return Mn(kn).scale(155.424).center([0,33.6442])}function In(){return Pn().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function En(t){return function(e,i){var n=B(e),o=B(i),r=t(n*o);return[r*o*H(e),r*H(i)]}}function An(t){return function(e,i){var n=W(e*e+i*i),o=t(n),r=H(o),a=B(o);return[N(e*r,n*a),Y(n&&i*r/n)]}}var Tn=En(function(t){return W(2/(1+t))});Tn.invert=An(function(t){return 2*Y(t/2)});var Sn=En(function(t){return(t=V(t))&&t/H(t)});function zn(t,e){return[t,R(F((E+e)/2))]}function Dn(){return On(zn).scale(961/T)}function On(t){var e,i,n,o=xn(t),r=o.center,a=o.scale,s=o.translate,l=o.clipExtent,h=null;function u(){var r=I*a(),s=o(xe(o.rotate()).invert([0,0]));return l(null==h?[[s[0]-r,s[1]-r],[s[0]+r,s[1]+r]]:t===zn?[[Math.max(s[0]-r,h),e],[Math.min(s[0]+r,i),n]]:[[h,Math.max(s[1]-r,e)],[i,Math.min(s[1]+r,n)]])}return o.scale=function(t){return arguments.length?(a(t),u()):a()},o.translate=function(t){return arguments.length?(s(t),u()):s()},o.center=function(t){return arguments.length?(r(t),u()):r()},o.clipExtent=function(t){return arguments.length?(null==t?h=e=i=n=null:(h=+t[0][0],e=+t[0][1],i=+t[1][0],n=+t[1][1]),u()):null==h?null:[[h,e],[i,n]]},u()}function Nn(t){return F((E+t)/2)}function Bn(t,e){var i=B(t),n=t===e?H(t):R(i/B(e))/R(Nn(e)/Nn(t)),o=i*G(Nn(t),n)/n;if(!n)return zn;function r(t,e){o>0?e<-E+k&&(e=-E+k):e>E-k&&(e=E-k);var i=o/G(Nn(e),n);return[i*H(n*t),o-i*B(n*t)]}return r.invert=function(t,e){var i=o-e,r=U(n)*W(t*t+i*i),a=N(t,D(i))*U(i);return i*n<0&&(a-=I*U(t)*U(i)),[a/n,2*O(G(o/r,1/n))-E]},r}function Zn(t,e){return[t,e]}function jn(t,e){var i=B(t),n=t===e?H(t):(i-B(e))/(e-t),o=i/n+t;if(D(n)<k)return Zn;function r(t,e){var i=o-e,r=n*t;return[i*H(r),o-i*B(r)]}return r.invert=function(t,e){var i=o-e,r=N(t,D(i))*U(i);return i*n<0&&(r-=I*U(t)*U(i)),[r/n,o-U(n)*W(t*t+i*i)]},r}Sn.invert=An(function(t){return t}),zn.invert=function(t,e){return[t,2*O(j(e))-E]},Zn.invert=Zn;var Rn=1.340264,Gn=-.081106,Hn=893e-6,Un=.003796,Wn=W(3)/2;function Fn(t,e){var i=Y(Wn*H(e)),n=i*i,o=n*n*n;return[t*B(i)/(Wn*(Rn+3*Gn*n+o*(7*Hn+9*Un*n))),i*(Rn+Gn*n+o*(Hn+Un*n))]}function Vn(t,e){var i=B(e),n=B(t)*i;return[i*H(t)/n,H(e)/n]}function Yn(t,e){var i=e*e,n=i*i;return[t*(.8707-.131979*i+n*(n*(.003971*i-.001529*n)-.013791)),e*(1.007226+i*(.015085+n*(.028874*i-.044475-.005916*n)))]}function qn(t,e){return[B(e)*H(t),H(e)]}function Xn(t,e){var i=B(e),n=1+B(t)*i;return[i*H(t)/n,H(e)/n]}function Kn(t,e){return[R(F((E+e)/2)),-t]}Fn.invert=function(t,e){for(var i,n=e,o=n*n,r=o*o*o,a=0;a<12&&(r=(o=(n-=i=(n*(Rn+Gn*o+r*(Hn+Un*o))-e)/(Rn+3*Gn*o+r*(7*Hn+9*Un*o)))*n)*o*o,!(D(i)<P));++a);return[Wn*t*(Rn+3*Gn*o+r*(7*Hn+9*Un*o))/B(n),Y(H(n)/Wn)]},Vn.invert=An(O),Yn.invert=function(t,e){var i,n=e,o=25;do{var r=n*n,a=r*r;n-=i=(n*(1.007226+r*(.015085+a*(.028874*r-.044475-.005916*a)))-e)/(1.007226+r*(.045255+a*(.259866*r-.311325-.005916*11*a)))}while(D(i)>k&&--o>0);return[t/(.8707+(r=n*n)*(r*(r*r*r*(.003971-.001529*r)-.013791)-.131979)),n]},qn.invert=An(Y),Xn.invert=An(function(t){return 2*O(t)}),Kn.invert=function(t,e){return[-e,2*O(j(t))-E]};var Jn=Object.freeze({__proto__:null,geoArea:function(t){return lt.reset(),et(t,ht),2*lt},geoBounds:function(t){var e,i,n,o,r,a,s;if(Ct=xt=-(Lt=wt=1/0),Et=[],et(t,qt),i=Et.length){for(Et.sort(ne),e=1,r=[n=Et[0]];e<i;++e)oe(n,(o=Et[e])[0])||oe(n,o[1])?(ie(n[0],o[1])>ie(n[0],n[1])&&(n[1]=o[1]),ie(o[0],n[1])>ie(n[0],n[1])&&(n[0]=o[0])):r.push(n=o);for(a=-1/0,e=0,n=r[i=r.length-1];e<=i;n=o,++e)o=r[e],(s=ie(n[1],o[0]))>a&&(a=s,Lt=o[0],xt=n[1])}return Et=At=null,Lt===1/0||wt===1/0?[[NaN,NaN],[NaN,NaN]]:[[Lt,wt],[xt,Ct]]},geoCentroid:function(t){Tt=St=zt=Dt=Ot=Nt=Bt=Zt=jt=Rt=Gt=0,et(t,re);var e=jt,i=Rt,n=Gt,o=e*e+i*i+n*n;return o<P&&(e=Nt,i=Bt,n=Zt,St<k&&(e=zt,i=Dt,n=Ot),(o=e*e+i*i+n*n)<P)?[NaN,NaN]:[N(i,e)*S,Y(n/W(o))*S]},geoCircle:function(){var t,e,i=me([0,0]),n=me(90),o=me(6),r={point:function(i,n){t.push(i=e(i,n)),i[0]*=S,i[1]*=S}};function a(){var a=i.apply(this,arguments),s=n.apply(this,arguments)*z,l=o.apply(this,arguments)*z;return t=[],e=ve(-a[0]*z,-a[1]*z,0).invert,Ce(r,s,l,1),a={type:"Polygon",coordinates:[t]},t=e=null,a}return a.center=function(t){return arguments.length?(i="function"==typeof t?t:me([+t[0],+t[1]]),a):i},a.radius=function(t){return arguments.length?(n="function"==typeof t?t:me(+t),a):n},a.precision=function(t){return arguments.length?(o="function"==typeof t?t:me(+t),a):o},a},geoClipAntimeridian:Be,geoClipCircle:Ze,geoClipExtent:function(){var t,e,i,n=0,o=0,r=960,a=500;return i={stream:function(i){return t&&e===i?t:t=Ge(n,o,r,a)(e=i)},extent:function(s){return arguments.length?(n=+s[0][0],o=+s[0][1],r=+s[1][0],a=+s[1][1],t=e=null,i):[[n,o],[r,a]]}}},geoClipRectangle:Ge,geoContains:function(t,e){return(t&&ti.hasOwnProperty(t.type)?ti[t.type]:ii)(t,e)},geoDistance:$e,geoGraticule:ui,geoGraticule10:function(){return ui()()},geoInterpolate:function(t,e){var i=t[0]*z,n=t[1]*z,o=e[0]*z,r=e[1]*z,a=B(n),s=H(n),l=B(r),h=H(r),u=a*B(i),c=a*H(i),p=l*B(o),d=l*H(o),f=2*Y(W(q(r-n)+a*l*q(o-i))),_=H(f),m=f?function(t){var e=H(t*=f)/_,i=H(f-t)/_,n=i*u+e*p,o=i*c+e*d,r=i*s+e*h;return[N(o,n)*S,N(r,W(n*n+o*o))*S]}:function(){return[i*S,n*S]};return m.distance=f,m},geoLength:Ke,geoPath:un,geoAlbers:In,geoAlbersUsa:function(){var t,e,i,n,o,r,a=In(),s=Pn().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=Pn().rotate([157,0]).center([-3,19.9]).parallels([8,18]),h={point:function(t,e){r=[t,e]}};function u(t){var e=t[0],a=t[1];return r=null,i.point(e,a),r||(n.point(e,a),r)||(o.point(e,a),r)}function c(){return t=e=null,u}return u.invert=function(t){var e=a.scale(),i=a.translate(),n=(t[0]-i[0])/e,o=(t[1]-i[1])/e;return(o>=.12&&o<.234&&n>=-.425&&n<-.214?s:o>=.166&&o<.234&&n>=-.214&&n<-.115?l:a).invert(t)},u.stream=function(i){return t&&e===i?t:(n=[a.stream(e=i),s.stream(i),l.stream(i)],o=n.length,t={point:function(t,e){for(var i=-1;++i<o;)n[i].point(t,e)},sphere:function(){for(var t=-1;++t<o;)n[t].sphere()},lineStart:function(){for(var t=-1;++t<o;)n[t].lineStart()},lineEnd:function(){for(var t=-1;++t<o;)n[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<o;)n[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<o;)n[t].polygonEnd()}});var n,o},u.precision=function(t){return arguments.length?(a.precision(t),s.precision(t),l.precision(t),c()):a.precision()},u.scale=function(t){return arguments.length?(a.scale(t),s.scale(.35*t),l.scale(t),u.translate(a.translate())):a.scale()},u.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),r=+t[0],u=+t[1];return i=a.translate(t).clipExtent([[r-.455*e,u-.238*e],[r+.455*e,u+.238*e]]).stream(h),n=s.translate([r-.307*e,u+.201*e]).clipExtent([[r-.425*e+k,u+.12*e+k],[r-.214*e-k,u+.234*e-k]]).stream(h),o=l.translate([r-.205*e,u+.212*e]).clipExtent([[r-.214*e+k,u+.166*e+k],[r-.115*e-k,u+.234*e-k]]).stream(h),c()},u.fitExtent=function(t,e){return fn(u,t,e)},u.fitSize=function(t,e){return _n(u,t,e)},u.fitWidth=function(t,e){return mn(u,t,e)},u.fitHeight=function(t,e){return gn(u,t,e)},u.scale(1070)},geoAzimuthalEqualArea:function(){return xn(Tn).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:Tn,geoAzimuthalEquidistant:function(){return xn(Sn).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:Sn,geoConicConformal:function(){return Mn(Bn).scale(109.5).parallels([30,30])},geoConicConformalRaw:Bn,geoConicEqualArea:Pn,geoConicEqualAreaRaw:kn,geoConicEquidistant:function(){return Mn(jn).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:jn,geoEqualEarth:function(){return xn(Fn).scale(177.158)},geoEqualEarthRaw:Fn,geoEquirectangular:function(){return xn(Zn).scale(152.63)},geoEquirectangularRaw:Zn,geoGnomonic:function(){return xn(Vn).scale(144.049).clipAngle(60)},geoGnomonicRaw:Vn,geoIdentity:function(){var t,e,i,n,o,r,a,s=1,l=0,h=0,u=1,c=1,p=0,d=null,f=1,_=1,m=cn({point:function(t,e){var i=v([t,e]);this.stream.point(i[0],i[1])}}),g=ci;function y(){return f=s*u,_=s*c,r=a=null,v}function v(i){var n=i[0]*f,o=i[1]*_;if(p){var r=o*t-n*e;n=n*t+o*e,o=r}return[n+l,o+h]}return v.invert=function(i){var n=i[0]-l,o=i[1]-h;if(p){var r=o*t+n*e;n=n*t-o*e,o=r}return[n/f,o/_]},v.stream=function(t){return r&&a===t?r:r=m(g(a=t))},v.postclip=function(t){return arguments.length?(g=t,d=i=n=o=null,y()):g},v.clipExtent=function(t){return arguments.length?(g=null==t?(d=i=n=o=null,ci):Ge(d=+t[0][0],i=+t[0][1],n=+t[1][0],o=+t[1][1]),y()):null==d?null:[[d,i],[n,o]]},v.scale=function(t){return arguments.length?(s=+t,y()):s},v.translate=function(t){return arguments.length?(l=+t[0],h=+t[1],y()):[l,h]},v.angle=function(i){return arguments.length?(e=H(p=i%360*z),t=B(p),y()):p*S},v.reflectX=function(t){return arguments.length?(u=t?-1:1,y()):u<0},v.reflectY=function(t){return arguments.length?(c=t?-1:1,y()):c<0},v.fitExtent=function(t,e){return fn(v,t,e)},v.fitSize=function(t,e){return _n(v,t,e)},v.fitWidth=function(t,e){return mn(v,t,e)},v.fitHeight=function(t,e){return gn(v,t,e)},v},geoProjection:xn,geoProjectionMutator:Cn,geoMercator:Dn,geoMercatorRaw:zn,geoNaturalEarth1:function(){return xn(Yn).scale(175.295)},geoNaturalEarth1Raw:Yn,geoOrthographic:function(){return xn(qn).scale(249.5).clipAngle(90+k)},geoOrthographicRaw:qn,geoStereographic:function(){return xn(Xn).scale(250).clipAngle(142)},geoStereographicRaw:Xn,geoTransverseMercator:function(){var t=On(Kn),e=t.center,i=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?i([t[0],t[1],t.length>2?t[2]+90:90]):[(t=i())[0],t[1],t[2]-90]},i([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:Kn,geoRotation:xe,geoStream:et,geoTransform:function(t){return{stream:cn(t)}}});function Qn(){}var $n=1/0,to=$n,eo=-$n,io=eo;var no={point:function(t,e){t<$n&&($n=t),t>eo&&(eo=t),e<to&&(to=e),e>io&&(io=e)},lineStart:Qn,lineEnd:Qn,polygonStart:Qn,polygonEnd:Qn,result:function(){var t=[[$n,to],[eo,io]];return eo=io=-(to=$n=1/0),t}};function oo(t,e,i){var n=e[1][0]-e[0][0],o=e[1][1]-e[0][1],r=t.clipExtent&&t.clipExtent();t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),et(i,t.stream(no));var a=no.result(),s=Math.min(n/(a[1][0]-a[0][0]),o/(a[1][1]-a[0][1])),l=+e[0][0]+(n-s*(a[1][0]+a[0][0]))/2,h=+e[0][1]+(o-s*(a[1][1]+a[0][1]))/2;return null!=r&&t.clipExtent(r),t.scale(150*s).translate([l,h])}var ro,ao=function(){function t(){}return t.prototype.encode=function(e,i,n){if(void 0===n){for(var o=1;o<=12;o++){var r=this.encode(e,i,o),a=this.decode(r);if(a.lat===e&&a.lon===i)return r}n=12}if(e=Number(e),i=Number(i),n=Number(n),isNaN(e)||isNaN(i)||isNaN(n))throw new Error("Invalid geohash");for(var s=0,l=0,h=!0,u="",c=-90,p=90,d=-180,f=180;u.length<n;){if(h){var _=(d+f)/2;i>_?(s=2*s+1,d=_):(s*=2,f=_)}else{var m=(c+p)/2;e>m?(s=2*s+1,c=m):(s*=2,p=m)}h=!h,5==++l&&(u+=t.base32.charAt(s),l=0,s=0)}return u},t.prototype.decode=function(t){var e=this.bounds(t),i=e.sw.lat,n=e.sw.lon,o=e.ne.lat,r=e.ne.lon,a=(i+o)/2,s=(n+r)/2;return{lat:a=Number(a.toFixed(Math.floor(2-Math.log(o-i)/Math.LN10))),lon:s=Number(s.toFixed(Math.floor(2-Math.log(r-n)/Math.LN10)))}},t.prototype.bounds=function(e){if(0===e.length)throw new Error("Invalid geohash");e=e.toLowerCase();for(var i=!0,n=-90,o=90,r=-180,a=180,s=0;s<e.length;s++){var l=e.charAt(s),h=t.base32.indexOf(l);if(-1===h)throw new Error("Invalid geohash");for(var u=4;u>=0;u--){var c=h>>u&1;if(i){var p=(r+a)/2;1===c?r=p:a=p}else{var d=(n+o)/2;1===c?n=d:o=d}i=!i}}return{sw:{lat:n,lon:r},ne:{lat:o,lon:a}}},t.prototype.adjacent=function(e,i){if(e=e.toLowerCase(),i=i.toLowerCase(),0===e.length)throw new Error("Invalid geohash");if(-1==="nsew".indexOf(i))throw new Error("Invalid direction");var n=e.slice(-1),o=e.slice(0,-1),r=e.length%2;return-1!=={n:["prxz","bcfguvyz"],s:["028b","0145hjnp"],e:["bcfguvyz","prxz"],w:["0145hjnp","028b"]}[i][r].indexOf(n)&&""!==o&&(o=this.adjacent(o,i)),o+t.base32.charAt({n:["p0r21436x8zb9dcf5h7kjnmqesgutwvy","bc01fg45238967deuvhjyznpkmstqrwx"],s:["14365h7k9dcfesgujnmqp0r2twvyx8zb","238967debc01fg45kmstqrwxuvhjyznp"],e:["bc01fg45238967deuvhjyznpkmstqrwx","p0r21436x8zb9dcf5h7kjnmqesgutwvy"],w:["238967debc01fg45kmstqrwxuvhjyznp","14365h7k9dcfesgujnmqp0r2twvyx8zb"]}[i][r].indexOf(n))},t.prototype.neighbours=function(t){return{n:this.adjacent(t,"n"),ne:this.adjacent(this.adjacent(t,"n"),"e"),e:this.adjacent(t,"e"),se:this.adjacent(this.adjacent(t,"s"),"e"),s:this.adjacent(t,"s"),sw:this.adjacent(this.adjacent(t,"s"),"w"),w:this.adjacent(t,"w"),nw:this.adjacent(this.adjacent(t,"n"),"w")}},t.prototype.contained=function(t,e,i,n,o){(isNaN(e)||e>=90)&&(e=89),(isNaN(i)||i>180)&&(i=180),(isNaN(n)||n<=-90)&&(n=-89),(isNaN(t)||t<-180)&&(t=-180),o=o||1;for(var r=this.encode(e,t,o),a=this.encode(e,i,o),s=this.encode(n,i,o),l=r,h=0,u=-1,c=[r,s],p=this.adjacent(r,"e");p!==s;)c.push(p),++h,p===a||u===h?(u=h+1,h=0,l=p=this.adjacent(l,"s")):p=this.adjacent(p,"e");return c},t.prototype.calculateWidthDegrees=function(t){var e;return e=t%2==0?-1:-.5,180/Math.pow(2,2.5*t+e)},t.prototype.width=function(t){return 180/(2^(5*t+t%2)/2-1)},t.base32="0123456789bcdefghjkmnpqrstuvwxyz",t}();function so(){var t,e,i,n,o,r,a,s=1e-6,l=In(),h=Pn().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=Pn().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c=Pn().rotate([66,0]).center([0,18]).parallels([8,18]),p={point:function(t,e){a=[t,e]}},d=function(t){var e=t[0],s=t[1];return a=null,i.point(e,s),a||(n.point(e,s),a)||(o.point(e,s),a)||r.point(e,s),a};function f(){return t=e=null,d}return d.invert=function(t){var e=l.scale(),i=l.translate(),n=(t[0]-i[0])/e,o=(t[1]-i[1])/e;return(o>=.12&&o<.234&&n>=-.425&&n<-.214?h:o>=.166&&o<.234&&n>=-.214&&n<-.115?u:o>=.204&&o<.234&&n>=.32&&n<.38?c:l).invert(t)},d.stream=function(i){return t&&e===i?t:(n=[l.stream(e=i),h.stream(i),u.stream(i),c.stream(i)],o=n.length,t={point:function(t,e){for(var i=-1;++i<o;)n[i].point(t,e)},sphere:function(){for(var t=-1;++t<o;)n[t].sphere()},lineStart:function(){for(var t=-1;++t<o;)n[t].lineStart()},lineEnd:function(){for(var t=-1;++t<o;)n[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<o;)n[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<o;)n[t].polygonEnd()}});var n,o},d.precision=function(t){return arguments.length?(l.precision(t),h.precision(t),u.precision(t),c.precision(t),f()):l.precision()},d.scale=function(t){return arguments.length?(l.scale(t),h.scale(.35*t),u.scale(t),c.scale(t),d.translate(l.translate())):l.scale()},d.translate=function(t){if(!arguments.length)return l.translate();var e=l.scale(),a=+t[0],d=+t[1];return i=l.translate(t).clipExtent([[a-.455*e,d-.238*e],[a+.455*e,d+.238*e]]).stream(p),n=h.translate([a-.307*e,d+.201*e]).clipExtent([[a-.425*e+s,d+.12*e+s],[a-.214*e-s,d+.234*e-s]]).stream(p),o=u.translate([a-.205*e,d+.212*e]).clipExtent([[a-.214*e+s,d+.166*e+s],[a-.115*e-s,d+.234*e-s]]).stream(p),r=c.translate([a+.35*e,d+.224*e]).clipExtent([[a+.32*e,d+.204*e],[a+.38*e,d+.234*e]]).stream(p),f()},d.fitExtent=function(t,e){return oo(d,t,e)},d.fitSize=function(t,e){return function(t,e,i){return oo(t,[[0,0],e],i)}(d,t,e)},d.scale(1070)}!function(t){t[t.AzimuthalEqualArea=0]="AzimuthalEqualArea",t[t.AzimuthalEquidistant=1]="AzimuthalEquidistant",t[t.Gnomonic=2]="Gnomonic",t[t.Orthographic=3]="Orthographic",t[t.Stereographic=4]="Stereographic",t[t.AlbersUsa=5]="AlbersUsa",t[t.AlbersUsaPr=6]="AlbersUsaPr",t[t.Albers=7]="Albers",t[t.ConicConformal=8]="ConicConformal",t[t.ConicEqualArea=9]="ConicEqualArea",t[t.ConicEquidistant=10]="ConicEquidistant",t[t.Equirectangular=11]="Equirectangular",t[t.Mercator=12]="Mercator",t[t.TransverseMercator=13]="TransverseMercator"}(ro||(ro={}));var lo=[],ho={};for(var uo in ro)"string"==typeof uo&&(lo.push(uo),ho[uo]="AlbersUsaPr"===uo?so:Jn["geo"+uo]);function co(t){var e=ho[t];return e?e():(console.log("Unknown projection: "+t),Dn())}function po(t,e){void 0===e&&(e={});var i=e.insertAt;if(t&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}po(".map_Layered .background{fill:none}.map_Layered .raster image{fill:#b5d0d0}.map_Layered .vector{fill:none;stroke:navy;stroke-linejoin:round}.map_Layered .hash path{fill:none;stroke:red;stroke-linejoin:round}");var fo=2048/Math.PI,_o=function(t){function i(){var e=t.call(this)||this;return e._drawStartPos="origin",e.projection("Mercator"),e}return l(i,t),i.prototype.data=function(e){var i=t.prototype.data.apply(this,arguments);return arguments.length&&(this._autoScaleOnNextRender=!0),i},i.prototype.enter=function(e,i){t.prototype.enter.call(this,e,i),this._layersTarget=this._renderElement.append("g").attr("class","layersTarget")},i.prototype.update=function(i,n){t.prototype.update.call(this,i,n);var o=this._layersTarget.selectAll(".layerContainer").data(this.layers().filter(function(t){return t.visible()}),function(t){return t.id()}),r=this;o.enter().append("g").attr("id",function(t){return t.id()}).attr("class","layerContainer").each(function(t){t._svgElement=e.select(this),t._domElement=r._parentOverlay.append("div"),t.layerEnter(r,t._svgElement,t._domElement)}).merge(o).each(function(t){t.layerUpdate(r)}),o.exit().each(function(t){t.layerExit(r),t._domElement.remove()}).remove(),o.order(),this.onZoomed()},i.prototype.exit=function(e,i){t.prototype.exit.call(this,e,i)},i.prototype.onZoomed=function(){t.prototype.onZoomed.call(this);var e=this._layersTarget.selectAll(".layerContainer"),i=this;e.each(function(t){t.layerZoomed(i)})},i.prototype.preRender=function(t){return Promise.all(this.layers().filter(function(t){return t.visible()}).map(function(t){return t.layerPreRender()}))},i.prototype.render=function(t){var i=this;return this.preRender().then(function(){e.SVGZoomWidget.prototype.render.call(i,function(e){i._layersTarget&&(i._renderCount&&i._autoScaleOnNextRender||i._prevAutoScaleMode!==i.autoScaleMode())?(i._prevAutoScaleMode=i.autoScaleMode(),i._autoScaleOnNextRender=!1,i.autoScale(),t&&t(e)):t&&t(e)})}),this},i.prototype.project=function(t,e){return t>=90?t=89:t<=-90&&(t=-89),this._d3GeoProjection([e,t])},i.prototype.invert=function(t,e){return this._d3GeoProjection.invert([t,e])},i.prototype.getBounds=function(){var t=this._layersTarget.node().getBBox();return{x:t.x,y:t.y,width:t.width,height:t.height}},i.prototype.autoScale=function(){switch(this.autoScaleMode()){case"none":return;case"all":this.zoomToBBox(this.getBounds())}},i}(e.SVGZoomWidget);_o.prototype._class+=" map_Layered",_o.prototype.publish("projection",null,"set","Map projection type",lo),_o.prototype.publish("centerLat",0,"number","Center Latitude",null,{tags:["Basic"]}),_o.prototype.publish("centerLong",0,"number","Center Longitude",null,{tags:["Basic"]}),_o.prototype.publish("zoom",1,"number","Zoom Level",null,{tags:["Basic"]}),_o.prototype.publish("autoScaleMode","all","set","Auto Scale",["none","all"],{tags:["Basic"]}),_o.prototype.publish("layers",[],"widgetArray","Layers",null,{render:!1});var mo=_o.prototype.projection;_o.prototype.projection=function(t){var e=mo.apply(this,arguments);if(arguments.length){switch(this._d3GeoProjection=co(t).scale(fo).translate([0,0]),t){case"orthographic":this._d3GeoProjection.clipAngle(90).rotate([0,0])}this._d3GeoPath=un().projection(this._d3GeoProjection),this._autoScaleOnNextRender=!0}return e};var go=function(t){function e(){var e=t.call(this)||this;return i.ITooltip.call(e),e}return l(e,t),e.prototype.svgGlowID=function(){return""},e.prototype.layerEnter=function(t,e,i){this._parentOverlay=t._parentOverlay},e.prototype.enter=function(e,i){t.prototype.enter.call(this,e,i),this._svgElement=this._layersTarget.append("g"),this._domElement=this._parentOverlay.append("div"),this.layerEnter(this,this._svgElement,this._domElement)},e.prototype.layerUpdate=function(t,e){},e.prototype.update=function(e,i){t.prototype.update.call(this,e,i),this.layerUpdate(this)},e.prototype.onZoomed=function(){t.prototype.onZoomed.call(this),this.layerUpdate(this)},e.prototype.layerExit=function(t){},e.prototype.exit=function(e,i){this.layerExit(this),this._svgElement.remove(),this._domElement.remove(),t.prototype.exit.call(this,e,i)},e.prototype.layerPreRender=function(){return Promise.resolve()},e.prototype.render=function(t){var e=this,i=arguments;return this.layerPreRender().then(function(){_o.prototype.render.apply(e,i)}),this},e.prototype.layerZoomed=function(t){},e}(_o);go.prototype._class+=" map_Layer",go.prototype.implements(i.ITooltip.prototype);var yo=function(t){function e(){var e=t.call(this)||this;return e.pins=new b,e}return l(e,t),e.prototype.layerEnter=function(t,e,i){go.prototype.layerEnter.apply(this,arguments),this._parentOverlay.style("pointer-events","none"),this._pinsTransform=i.style("pointer-events","none").append("div").attr("class",this.classID()).style("width",t.width()+"px").style("height",t.height()+"px"),this.pins.target(this._pinsTransform.node())},e.prototype.layerUpdate=function(t){go.prototype.layerUpdate.apply(this,arguments),this._pinsTransform.style("opacity",this.opacity()).style("width",t.width()+"px").style("height",t.height()+"px"),this.pins.resize(t.size()),this.layerZoomed(t)},e.prototype.layerExit=function(t){delete this._prevProjection,this.pins.target(null),delete this.pins},e.prototype.layerZoomed=function(t){go.prototype.layerZoomed.apply(this,arguments);var e=this._db.fieldByLabel(this.latColumn()),i=this._db.fieldByLabel(this.longColumn()),n=this._db.fieldByLabel(this.weightColumn());this.pins.columns(this.columns()).data(this.visible()?this.data().map(function(o){var r=e?o[e.idx]:o[0],a=i?o[i.idx]:o[1],s=n?o[n.idx]:1,l=t.zoomTranslate(),h=t.project(r,a),u=t.zoomScale();return h[0]*=u,h[1]*=u,[l[0]+h[0],l[1]+h[1],s]}):[]).render()},e}(go);function vo(t){return t}function bo(t,e){return"string"==typeof e&&(e=t.objects[e]),"GeometryCollection"===e.type?{type:"FeatureCollection",features:e.geometries.map(function(e){return Lo(t,e)})}:Lo(t,e)}function Lo(t,e){var i=e.id,n=e.bbox,o=null==e.properties?{}:e.properties,r=wo(t,e);return null==i&&null==n?{type:"Feature",properties:o,geometry:r}:null==n?{type:"Feature",id:i,properties:o,geometry:r}:{type:"Feature",id:i,bbox:n,properties:o,geometry:r}}function wo(t,e){var i=function(t){if(null==t)return vo;var e,i,n=t.scale[0],o=t.scale[1],r=t.translate[0],a=t.translate[1];return function(t,s){s||(e=i=0);var l=2,h=t.length,u=new Array(h);for(u[0]=(e+=t[0])*n+r,u[1]=(i+=t[1])*o+a;l<h;)u[l]=t[l],++l;return u}}(t.transform),n=t.arcs;function o(t,e){e.length&&e.pop();for(var o=n[t<0?~t:t],r=0,a=o.length;r<a;++r)e.push(i(o[r],r));t<0&&function(t,e){for(var i,n=t.length,o=n-e;o<--n;)i=t[o],t[o++]=t[n],t[n]=i}(e,a)}function r(t){return i(t)}function a(t){for(var e=[],i=0,n=t.length;i<n;++i)o(t[i],e);return e.length<2&&e.push(e[0]),e}function s(t){for(var e=a(t);e.length<4;)e.push(e[0]);return e}function l(t){return t.map(s)}return function t(e){var i,n=e.type;switch(n){case"GeometryCollection":return{type:n,geometries:e.geometries.map(t)};case"Point":i=r(e.coordinates);break;case"MultiPoint":i=e.coordinates.map(r);break;case"LineString":i=a(e.arcs);break;case"MultiLineString":i=e.arcs.map(a);break;case"Polygon":i=l(e.arcs);break;case"MultiPolygon":i=e.arcs.map(l);break;default:return null}return{type:n,coordinates:i}}(e)}function xo(t,e){var i={},n={},o={},r=[],a=-1;function s(t,e){for(var n in t){var o=t[n];delete e[o.start],delete o.start,delete o.end,o.forEach(function(t){i[t<0?~t:t]=1}),r.push(o)}}return e.forEach(function(i,n){var o,r=t.arcs[i<0?~i:i];r.length<3&&!r[1][0]&&!r[1][1]&&(o=e[++a],e[a]=i,e[n]=o)}),e.forEach(function(e){var i,r,a=function(e){var i,n=t.arcs[e<0?~e:e],o=n[0];t.transform?(i=[0,0],n.forEach(function(t){i[0]+=t[0],i[1]+=t[1]})):i=n[n.length-1];return e<0?[i,o]:[o,i]}(e),s=a[0],l=a[1];if(i=o[s])if(delete o[i.end],i.push(e),i.end=l,r=n[l]){delete n[r.start];var h=r===i?i:i.concat(r);n[h.start=i.start]=o[h.end=r.end]=h}else n[i.start]=o[i.end]=i;else if(i=n[l])if(delete n[i.start],i.unshift(e),i.start=s,r=o[s]){delete o[r.end];var u=r===i?i:r.concat(i);n[u.start=r.start]=o[u.end=i.end]=u}else n[i.start]=o[i.end]=i;else n[(i=[e]).start=s]=o[i.end=l]=i}),s(o,n),s(n,o),e.forEach(function(t){i[t<0?~t:t]||r.push([t])}),r}function Co(t){return wo(t,function(t,e,i){var n,o,r;if(arguments.length>1)n=function(t,e,i){var n,o=[],r=[];function a(t){var e=t<0?~t:t;(r[e]||(r[e]=[])).push({i:t,g:n})}function s(t){t.forEach(a)}function l(t){t.forEach(s)}return function t(e){switch(n=e,e.type){case"GeometryCollection":e.geometries.forEach(t);break;case"LineString":s(e.arcs);break;case"MultiLineString":case"Polygon":l(e.arcs);break;case"MultiPolygon":!function(t){t.forEach(l)}(e.arcs)}}(e),r.forEach(null==i?function(t){o.push(t[0].i)}:function(t){i(t[0].g,t[t.length-1].g)&&o.push(t[0].i)}),o}(0,e,i);else for(o=0,n=new Array(r=t.arcs.length);o<r;++o)n[o]=o;return{type:"MultiLineString",arcs:xo(t,n)}}.apply(this,arguments))}yo.prototype._class+=" map_CanvasPinLayer",yo.prototype.publishProxy("clusterMode","pins","clusterMode"),yo.prototype.publishProxy("allCircles","pins","allCircles"),yo.prototype.publishProxy("showQuadtree","pins","showQuadtree"),yo.prototype.publishProxy("useAveragePos","pins","useAveragePos"),yo.prototype.publishProxy("shrinkFontToPin","pins","shrinkFontToPin"),yo.prototype.publishProxy("enableClustering","pins","enableClustering"),yo.prototype.publishProxy("useWeightedRadius","pins","useWeightedRadius"),yo.prototype.publishProxy("radiusWeightMult","pins","radiusWeightMult"),yo.prototype.publishProxy("searchRectMult","pins","searchRectMult"),yo.prototype.publishProxy("pinHeight","pins","pinHeight"),yo.prototype.publishProxy("pinWidth","pins","pinWidth"),yo.prototype.publishProxy("pinFontFamily","pins","pinFontFamily"),yo.prototype.publishProxy("pinFontSize","pins","pinFontSize"),yo.prototype.publishProxy("arrowHeight","pins","arrowHeight"),yo.prototype.publishProxy("arrowWidth","pins","arrowWidth"),yo.prototype.publish("latColumn",null,"set","latColumn",function(){return this.columns()},{optional:!0}),yo.prototype.publish("longColumn",null,"set","longColumn",function(){return this.columns()},{optional:!0}),yo.prototype.publish("weightColumn",null,"set","weightColumn",function(){return this.columns()},{optional:!0}),yo.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]});po(".map_Layered .checkerFill{fill:red;stroke:red;opacity:.5}.map_Layered .checkerNoFill{fill:none;stroke:none;opacity:.5}.map_Layered .mesh{fill:none;stroke:#6d6e71;stroke-width:.25}.map_Layered .data{stroke:none;stroke-width:.25}.map_Layered .data .shape.selected{stroke:red;stroke-width:1.25px}");var Mo=window.__hpcc_topoJsonFolder||"./node_modules/@hpcc-js/map/TopoJSON";function ko(t){if(!arguments.length)return Mo;var e=Mo;return Mo=t,e}var Po=function(t){function i(){var i=t.call(this)||this;return i._dataMap={},i._path=e.select(null),e.Utility.SimpleSelectionMixin.call(i),i}return l(i,t),i.prototype.data=function(t){var e=go.prototype.data.apply(this,arguments);if(arguments.length){this._dataMap={},this._dataMinWeight=null,this._dataMaxWeight=null;var i=this;this.data().forEach(function(t){i._dataMap[t[0]]=t,(!i._dataMinWeight||t[1]<i._dataMinWeight)&&(i._dataMinWeight=t[1]),(!i._dataMaxWeight||t[1]>i._dataMaxWeight)&&(i._dataMaxWeight=t[1])})}return e},i.prototype.getDataBounds=function(){var t=this._choroplethData.node().getBBox();return{x:t.x,y:t.y,width:t.width,height:t.height}},i.prototype.autoScale=function(){switch(this.autoScaleMode()){case"none":return;case"mesh":this.zoomToBBox(this.getBounds());break;case"data":this.zoomToBBox(this.getDataBounds())}},i.prototype.layerEnter=function(t,e,i){go.prototype.layerEnter.apply(this,arguments),this._choroplethTransform=e,this._choroplethData=this._choroplethTransform.append("g").attr("class","data"),this._choropleth=this._choroplethTransform.append("path").attr("class","mesh")},i.prototype.layerUpdate=function(t,e){if(go.prototype.layerUpdate.apply(this,arguments),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this._choroplethTransform.style("stroke",this.meshColor()).style("opacity",this.opacity()),!this.visible()||!this.meshVisible())return this._choropleth.attr("d",""),void delete this._prevProjection;(e||this._prevProjection!==t.projection()||this._prevInternalOnly!==this.internalOnly())&&(this._choropleth.attr("d",t._d3GeoPath(Co(this._choroTopology,this._choroTopologyObjects,this.internalOnly()?function(t,e){return t!==e}:function(t,e){return!0}))),this._prevProjection=t.projection(),this._prevInternalOnly=this.internalOnly()),this._choropleth.style("stroke-width",this.meshStrokeWidth()).style("stroke",this.meshColor())},i.prototype.layerExit=function(t){delete this._prevProjection,delete this._prevInternalOnly},i.prototype.layerZoomed=function(e){t.prototype.layerZoomed.apply(this,arguments),this._choroplethData.style("stroke-width",this.meshVisible()?"0px":.5/e.zoomScale()+"px")},i.prototype.click=function(t,e,i){console.log("Click: "+JSON.stringify(t)+", "+e+", "+i)},i.prototype.dblclick=function(t,e,i){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+i)},i}(go);Po.prototype._class+=" map_Choropleth",Po.prototype.mixin(e.Utility.SimpleSelectionMixin),Po.prototype._palette=e.Palette.rainbow("default"),Po.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Po.prototype._palette.switch(),{tags:["Basic","Shared"]}),Po.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),Po.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),Po.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),Po.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),Po.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width"),Po.prototype.publish("internalOnly",!1,"boolean","Internal mesh only"),Po.prototype.publish("autoScaleMode","mesh","set","Auto Scale",["none","mesh","data"],{tags:["Basic"],override:!0});var Io,Eo,Ao=(Io="application/json",Eo=function(t){return JSON.parse(t.responseText)},function(t,i){var n=function(t,i){var n,o,r,a,s=e.dispatch("beforesend","progress","load","error"),l=e.map(),h=new XMLHttpRequest,u=null,c=null,p=0;function d(t){var e,i=h.status;if(!i&&function(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}(h)||i>=200&&i<300||304===i){if(r)try{e=r.call(n,h)}catch(t){return void s.call("error",n,t)}else e=h;s.call("load",n,e)}else s.call("error",n,t)}if("undefined"==typeof XDomainRequest||"withCredentials"in h||!/^(http(s)?:)?\/\//.test(t)||(h=new XDomainRequest),"onload"in h?h.onload=h.onerror=h.ontimeout=d:h.onreadystatechange=function(t){h.readyState>3&&d(t)},h.onprogress=function(t){s.call("progress",n,t)},n={header:function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?l.get(t):(null==e?l.remove(t):l.set(t,e+""),n)},mimeType:function(t){return arguments.length?(o=null==t?null:t+"",n):o},responseType:function(t){return arguments.length?(a=t,n):a},timeout:function(t){return arguments.length?(p=+t,n):p},user:function(t){return arguments.length<1?u:(u=null==t?null:t+"",n)},password:function(t){return arguments.length<1?c:(c=null==t?null:t+"",n)},response:function(t){return r=t,n},get:function(t,e){return n.send("GET",t,e)},post:function(t,e){return n.send("POST",t,e)},send:function(e,i,r){return h.open(e,t,!0,u,c),null==o||l.has("accept")||l.set("accept",o+",*/*"),h.setRequestHeader&&l.each(function(t,e){h.setRequestHeader(e,t)}),null!=o&&h.overrideMimeType&&h.overrideMimeType(o),null!=a&&(h.responseType=a),p>0&&(h.timeout=p),null==r&&"function"==typeof i&&(r=i,i=null),null!=r&&1===r.length&&(r=function(t){return function(e,i){t(null==e?i:null)}}(r)),null!=r&&n.on("error",r).on("load",function(t){r(null,t)}),s.call("beforesend",n,h),h.send(null==i?null:i),n},abort:function(){return h.abort(),n},on:function(){var t=s.on.apply(s,arguments);return t===s?n:t}},null!=i){if("function"!=typeof i)throw new Error("invalid callback: "+i);return n.get(i)}return n}(t).mimeType(Io).response(Eo);if(null!=i){if("function"!=typeof i)throw new Error("invalid callback: "+i);return n.get(i)}return n}),To=null,So=null,zo=null,Do=function(t){function i(){return t.call(this)||this}return l(i,t),i.prototype.layerEnter=function(t,i,n){Po.prototype.layerEnter.apply(this,arguments),this._choroTopology=To.topology,this._choroTopologyObjectsCountries=To.topology.objects.countries,this._choroTopologyObjectsLand=To.topology.objects.land,this._choroTopologyObjects=this._choroTopologyObjectsCountries,this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);var o=this;this.tooltipHTML(function(t){return o.tooltipFormat({label:t[0],value:t[1]})})},i.prototype.layerUpdate=function(t){Po.prototype.layerUpdate.apply(this,arguments),this._choroplethData.style("stroke",this.meshVisible()?null:"black"),this.choroPaths=this._choroplethData.selectAll(".shape").data(this.visible()?this.data():[],function(t){return t[0]});var e=this;this.choroPaths.enter().append("path").attr("class","shape").attr("vector-effect","non-scaling-stroke").call(this._selection.enter.bind(this._selection)).on("click",function(t){e._dataMap[t[0]]&&e.click(e.rowToObj(e._dataMap[t[0]]),"weight",e._selection.selected(this))}).on("dblclick",function(t){e._dataMap[t[0]]&&e.dblclick(e.rowToObj(e._dataMap[t[0]]),"weight",e._selection.selected(this))}).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show).merge(this.choroPaths).attr("d",function(e){var i=t._d3GeoPath(zo[e[0]]);return i||console.log("Unknown Country: "+e),i}).style("fill",function(t){return e._palette(t[1],e._dataMinWeight,e._dataMaxWeight)}),this.choroPaths.exit().remove()},i.prototype.layerPreRender=function(){return this._topoJsonPromise||(this._topoJsonPromise=new Promise(function(t,e){To&&t(),Ao(ko()+"/countries.json",function(e){for(var i in So=bo((To=e).topology,To.topology.objects.countries).features,zo={},So)So[i].id&&To.countryNames[So[i].id]&&(zo[To.countryNames[So[i].id].name]=So[i]);t()})})),this._topoJsonPromise},i}(Po);Do.prototype._class+=" map_ChoroplethCountries";var Oo=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.layerEnter=function(t,e,i){Do.prototype.layerEnter.apply(this,arguments),this._choroTopologyObjects=this._choroTopologyObjectsLand},e}(Do);Oo.prototype._class+=" map_ChoroplethContinents";var No=null,Bo=null,Zo=null,jo=function(t){function i(){var e=t.call(this)||this;return e.projection("AlbersUsaPr"),e}return l(i,t),i.prototype.layerEnter=function(t,i,n){Po.prototype.layerEnter.apply(this,arguments),this._choroTopology=No.topology,this._choroTopologyObjects=No.topology.objects.counties,this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);var o=this;this.tooltipHTML(function(t){var e=t[0];return o.tooltipFormat({label:No.countyNames[e],value:o._dataMap[e]?o._dataMap[e][1]:"N/A"})})},i.prototype.layerUpdate=function(t){Po.prototype.layerUpdate.apply(this,arguments),this._choroplethData.style("stroke",this.meshVisible()?null:"black"),this.choroPaths=this._choroplethData.selectAll(".shape").data(this.visible()?this.data():[],function(t){return t[0]});var e=this;this.choroPaths.enter().append("path").attr("class","shape").attr("vector-effect","non-scaling-stroke").call(this._selection.enter.bind(this._selection)).on("click",function(t){e.click(e.rowToObj(t),"weight",e._selection.selected(this))}).on("dblclick",function(t){e.dblclick(e.rowToObj(t),"weight",e._selection.selected(this))}).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show).merge(this.choroPaths).attr("d",function(e){var i=t._d3GeoPath(Zo[e[0]]);return i||console.log("Unknown US County: "+e[0]),i}).style("fill",function(t){return e._palette(t[1],e._dataMinWeight,e._dataMaxWeight)}),this.choroPaths.exit().remove()},i.prototype.layerPreRender=function(){return this._topoJsonPromise||(this._topoJsonPromise=new Promise(function(t,e){No&&t(),Ao(ko()+"/us-counties.json",function(e){for(var i in Bo=bo((No=e).topology,No.topology.objects.counties).features,Zo={},Bo)Bo[i].id&&(Zo[Bo[i].id]=Bo[i]);t()})})),this._topoJsonPromise},i.__inputs=[{id:"fips",type:"string"},{id:"value",type:"number"}],i}(Po);jo.prototype._class+=" map_ChoroplethCounties",jo.prototype.publish("onClickFormatFIPS",!1,"boolean","format FIPS code as a String on Click");var Ro=null,Go=null,Ho=null,Uo=function(t){function i(){var e=t.call(this)||this;return e.projection("AlbersUsaPr"),e}return l(i,t),i.prototype.layerEnter=function(t,i,n){Po.prototype.layerEnter.apply(this,arguments),this._choroTopology=Ro.topology,this._choroTopologyObjects=Ro.topology.objects.states,this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);var o=this;this.tooltipHTML(function(t){var e=Ho[t[0]].id;return o.tooltipFormat({label:Ro.stateNames[e].name,value:t[1]})})},i.prototype.layerUpdate=function(t){Po.prototype.layerUpdate.apply(this,arguments),this._choroplethData.style("stroke",this.meshVisible()?null:"black"),this.choroPaths=this._choroplethData.selectAll(".shape").data(this.visible()?this.data():[],function(t){return t[0]});var e=this;this.choroPaths.enter().append("path").attr("class","shape").attr("vector-effect","non-scaling-stroke").call(this._selection.enter.bind(this._selection)).on("click",function(t){e.click(e.rowToObj(t),"weight",e._selection.selected(this))}).on("dblclick",function(t){e.dblclick(e.rowToObj(t),"weight",e._selection.selected(this))}).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show).merge(this.choroPaths).attr("d",function(e){var i=t._d3GeoPath(Ho[e[0]]);return i||console.log("Unknown US State: "+e[0]),i}).style("fill",function(t){return e._palette(t[1],e._dataMinWeight,e._dataMaxWeight)}),this.choroPaths.exit().remove()},i.prototype.layerPreRender=function(){return this._topoJsonPromise||(this._topoJsonPromise=new Promise(function(t,e){Ro&&t(),Ao(ko()+"/us-states.json",function(e){for(var i in Go=bo((Ro=e).topology,Ro.topology.objects.states).features,Ho={},Go)Go[i].id&&(Ho[Ro.stateNames[Go[i].id].code]=Go[i]);t()})})),this._topoJsonPromise},i.__inputs=[{id:"state",type:"string"},{id:"value",type:"number"}],i}(Po);Uo.prototype._class+=" map_ChoroplethStates";var Wo=function(t){function e(){return t.call(this)||this}return l(e,t),e}(_o);Wo.prototype._class+=" map_ChoroplethStatesHeat";po(".map_Layered .map_GeoHash .data{stroke:none}.map_Layered .map_GeoHash .data.selected{stroke:red}.map_Layered .map_GeoHash .data.over{stroke:orange}.map_Layered .map_GeoHash .data.selected.over{stroke:red}");var Fo=function(t){function i(){return t.call(this)||this}return l(i,t),i.prototype.data=function(t){var e=go.prototype.data.apply(this,arguments);return arguments.length&&(this._dataMinWeight=null,this._dataMaxWeight=null,this.data().forEach(function(t){(!this._dataMinWeight||t[1]<this._dataMinWeight)&&(this._dataMinWeight=t[1]),(!this._dataMaxWeight||t[1]>this._dataMaxWeight)&&(this._dataMaxWeight=t[1])},this)),e},i.prototype.layerEnter=function(t,i,n){go.prototype.layerEnter.apply(this,arguments),this.geohash=new ao,this._geoHashTransform=i.append("g").attr("class","map_GeoHash"),this._selection=new e.Utility.SimpleSelection(this,this._geoHashTransform),this.geoHashPaths=e.select(null)},i.prototype.layerUpdate=function(t){go.prototype.layerUpdate.apply(this,arguments),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this._geoHashTransform.style("opacity",this.opacity()),this.geoHashPaths=this._geoHashTransform.selectAll(".data").data(this.visible()?this.data():[],function(t){return t[0]});var e=this;this.geoHashPaths.enter().append("path").attr("class","data").call(this._selection.enter.bind(this._selection)).on("click",function(t){e.click(e.rowToObj(t),"weight",e._selection.selected(this))}).on("dblclick",function(t){e.dblclick(e.rowToObj(t),"weight",e._selection.selected(this))}).merge(this.geoHashPaths).attr("d",function(i){var n=e.geohash.bounds(i[0]),o={type:"LineString",coordinates:[[n.sw.lon,n.ne.lat],[n.ne.lon,n.ne.lat],[n.ne.lon,n.sw.lat],[n.sw.lon,n.sw.lat]]};return t._d3GeoPath(o)}).style("fill",function(t){return e._palette(t[1],e._dataMinWeight,e._dataMaxWeight)}),this.geoHashPaths.exit().remove()},i.prototype.click=function(t,e,i){console.log("Click: "+JSON.stringify(t)+", "+e+", "+i)},i.prototype.dblclick=function(t,e,i){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+i)},i}(go);function Vo(t,e,i){return t(i={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&i.path)}},i.exports),i.exports}Fo.prototype._class+=" map_GeoHash",Fo.prototype._palette=e.Palette.rainbow("default"),Fo.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Fo.prototype._palette.switch(),{tags:["Basic","Shared"]}),Fo.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),Fo.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),Fo.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),Fo.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),Fo.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width");var Yo=Vo(function(t,e){!function(e,i){if(null===(typeof window!=="undefined"?window:null))throw new Error("Google-maps package can be used only in browser");t.exports=function(){var t=null,e=null,i=!1,n=[],o=[],r=null,a={URL:"https://maps.googleapis.com/maps/api/js",KEY:null,LIBRARIES:[],CLIENT:null,CHANNEL:null,LANGUAGE:null,REGION:null};a.VERSION="3.18",a.WINDOW_CALLBACK_NAME="__google_maps_api_provider_initializator__",a._googleMockApiObject={},a.load=function(t){null===e?!0===i?t&&n.push(t):(i=!0,window[a.WINDOW_CALLBACK_NAME]=function(){s(t)},a.createLoader()):t&&t(e)},a.createLoader=function(){(t=document.createElement("script")).type="text/javascript",t.src=a.createUrl(),document.body.appendChild(t)},a.isLoaded=function(){return null!==e},a.createUrl=function(){var t=a.URL;return t+="?callback="+a.WINDOW_CALLBACK_NAME,a.KEY&&(t+="&key="+a.KEY),a.LIBRARIES.length>0&&(t+="&libraries="+a.LIBRARIES.join(",")),a.CLIENT&&(t+="&client="+a.CLIENT+"&v="+a.VERSION),a.CHANNEL&&(t+="&channel="+a.CHANNEL),a.LANGUAGE&&(t+="&language="+a.LANGUAGE),a.REGION&&(t+="®ion="+a.REGION),t},a.release=function(s){var l=function(){a.KEY=null,a.LIBRARIES=[],a.CLIENT=null,a.CHANNEL=null,a.LANGUAGE=null,a.REGION=null,a.VERSION="3.18",e=null,i=!1,n=[],o=[],void 0!==window.google&&delete window.google,void 0!==window[a.WINDOW_CALLBACK_NAME]&&delete window[a.WINDOW_CALLBACK_NAME],null!==r&&(a.createLoader=r,r=null),null!==t&&(t.parentElement.removeChild(t),t=null),s&&s()};i?a.load(function(){l()}):l()},a.onLoad=function(t){o.push(t)},a.makeMock=function(){r=a.createLoader,a.createLoader=function(){window.google=a._googleMockApiObject,window[a.WINDOW_CALLBACK_NAME]()}};var s=function(t){var r;for(i=!1,null===e&&(e=window.google),r=0;r<o.length;r++)o[r](e);for(t&&t(e),r=0;r<n.length;r++)n[r](e);n=[]};return a}()}()}),qo=Object.freeze(Object.assign(Object.create(null),Yo,{default:Yo,__moduleExports:Yo}));po(".map_GMap .marker{fill:#656565;stroke:none;stroke-width:1px}.map_GMap .map_Layered{pointer-events:auto;cursor:auto}.gm-style img{max-width:none}.gm-style label{width:auto;display:inline}");var Xo=Yo||qo;t.google=null;var Ko,Jo=15e3;function Qo(e){return Ko||(Ko=o.promiseTimeout(Jo,new Promise(function(i,n){if(t.google)i();else if(e)t.google=e,i();else{window.__hpcc_gmap_apikey||console.warn("__hpcc_gmap_apikey does not contain a valid API key, reverting to developers key (expect limited performance)");try{Xo.KEY=window.__hpcc_gmap_apikey||"AIzaSyDwGn2i1i_pMZvnqYJN1BksD_tjYaCOWKg",Xo.LIBRARIES=["geometry","drawing"],Xo.load(function(e){t.google=e,i()})}catch(t){console.warn("Failed to initialize Google Map API: "+t.message),i()}}})).catch(function(t){console.warn("Timed out initializing Google Map API after "+Jo+"ms.")})),Ko}var $o=function(){function e(t){this._userShapes=[],this.mapContext=t}return e.prototype.add=function(t){this._userShapes.indexOf(t)>=0||this._userShapes.push(t)},e.prototype.remove=function(t){var e=this._userShapes.indexOf(t);e>=0&&this._userShapes.splice(e,1),t.setMap(null)},e.prototype.save=function(){var t=this;return this._userShapes.map(function(e){return t._saveShape(e)})},e.prototype.load=function(t){this._deserializeShapes(t)},e.prototype._saveShape=function(t){var e={},i={circle:function(t){e.type="circle",e.pos={lat:t.center.lat(),lng:t.center.lng()},e.radius=t.radius},rectangle:function(t){e.type="rectangle",e.bounds={ne:t.bounds.getNorthEast(),sw:t.bounds.getSouthWest()}},polygon:function(t){e.type=t.__hpcc_type;var i=t.getPath();e.vertices=[];for(var n=0;n<i.length;n++)e.vertices.push(i.getAt(n))},polyline:function(t){i.polygon(t)}};return i[t.__hpcc_type](t),e.strokeWeight=t.strokeWeight,e.fillColor=t.fillColor,e.fillOpacity=t.fillOpacity,e.editable=t.editable,e.clickable=t.clickable||!0,e},e.prototype._deserializeShapes=function(e){for(var i=JSON.parse(e),n=0,o=.45,r="#1f77b4",a=!0,s=!0,l={circle:function(e,i){return new t.google.maps.Circle({strokeWeight:e.strokeWeight||n,fillColor:e.fillColor||r,fillOpacity:e.fillOpacity||o,editable:e.editable||a,clickable:e.clickable||s,map:i,center:e.pos,radius:e.radius})},rectangle:function(e,i){return new t.google.maps.Rectangle({strokeWeight:e.strokeWeight||n,fillColor:e.fillColor||r,fillOpacity:e.fillOpacity||o,editable:e.editable||a,clickable:e.clickable||s,map:i,bounds:{north:e.bounds.ne.lat,west:e.bounds.sw.lng,south:e.bounds.sw.lat,east:e.bounds.ne.lng}})},polygon:function(e,i){return new t.google.maps.Polygon({strokeWeight:e.strokeWeight||n,fillColor:e.fillColor||r,fillOpacity:e.fillOpacity||o,editable:e.editable||a,clickable:e.clickable||s,map:i,paths:e.vertices})},polyline:function(e,i){return new t.google.maps.Polyline({strokeWeight:e.strokeWeight||n,fillColor:e.fillColor||r,fillOpacity:e.fillOpacity||o,editable:e.editable||a,clickable:e.clickable||s,map:i,path:e.vertices})}},h=0;h<i.length;h++){var u=l[i[h].type](i[h],this.mapContext._googleMap);this.mapContext.onDrawingComplete({type:i[h].type,overlay:u})}},e}(),tr=function(i){function o(){var e=i.call(this)||this;e._tag="div";var o=e;function r(e,i,n){var r=o._overlay.getProjection(),a=r.fromLatLngToDivPixel(new t.google.maps.LatLng(i,n)),s=r.getWorldWidth(),l=parseFloat(e.widgetX()),h=parseFloat(e.widgetY()),u=parseFloat(e.widgetWidth());for(a.x-=l,a.y-=h;a.x<0;)a.x+=s;for(;a.x>u;)a.x-=s;return a}return e._userShapes=new $o(e),e._worldSurface=new n.AbsoluteSurface,e._worldSurface.project=function(t,e){return r(this,t,e)},e._viewportSurface=new n.AbsoluteSurface,e._viewportSurface.project=function(t,e){return r(this,t,e)},e}return l(o,i),o.prototype.data=function(t){return e.HTMLWidget.prototype.data.apply(this,arguments)},o.prototype.getMapType=function(){switch(this.type()){case"terrain":return t.google.maps.MapTypeId.TERRAIN;case"road":return t.google.maps.MapTypeId.ROADMAP;case"satellite":return t.google.maps.MapTypeId.SATELLITE;case"hybrid":return t.google.maps.MapTypeId.HYBRID;default:return t.google.maps.MapTypeId.ROADMAP}},o.prototype.getMapOptions=function(){return{panControl:this.panControl(),zoomControl:this.zoomControl(),fullscreenControl:this.fullscreenControl(),mapTypeControl:this.mapTypeControl(),scaleControl:this.scaleControl(),streetViewControl:this.streetViewControl(),overviewMapControl:this.overviewMapControl(),overviewMapControlOptions:{opened:!0},styles:this.googleMapStyles()}},o.prototype.size=function(i){var n=e.HTMLWidget.prototype.size.apply(this,arguments);return arguments.length&&this._googleMapNode&&(this._googleMapNode.style("width",i.width+"px").style("height",i.height+"px"),t.google.maps.event.trigger(this._googleMap,"resize")),n},o.prototype.enter=function(n,o){i.prototype.enter.call(this,n,o);var r=this;this._googleGeocoder=new t.google.maps.Geocoder,this._googleMapNode=o.append("div").style("width",this.width()+"px").style("height",this.height()+"px"),this._googleMap=new t.google.maps.Map(this._googleMapNode.node(),{zoom:this.zoom(),center:new t.google.maps.LatLng(this.centerLat(),this.centerLong()),mapTypeId:this.getMapType(),disableDefaultUI:!0}),this._overlay=function(e,i,n){function o(e,i,n){t.google.maps.OverlayView.call(this),this._div=null,this._worldSurface=i,this._viewportSurface=n,this._map=e,this.setMap(e);var o=this;t.google.maps.event.addListener(e,"bounds_changed",function(){o.draw()}),t.google.maps.event.addListener(e,"projection_changed",function(){o.draw()}),this._prevWorldMin={x:0,y:0},this._prevWorldMax={x:0,y:0},this._prevMin={x:0,y:0},this._prevMax={x:0,y:0}}return o.prototype=t.google.maps.OverlayView.prototype,o.prototype.onAdd=function(){this.div=document.createElement("div"),this._viewportSurface.target(null).target(this.div).units("pixels"),this.getPanes().overlayMouseTarget.appendChild(this.div)},o.prototype.draw=function(){var e=this.getProjection();if(e){for(var i=this._map.getBounds(),n=e.fromLatLngToDivPixel(i.getCenter()),o=e.fromLatLngToDivPixel(i.getSouthWest()),r=e.fromLatLngToDivPixel(i.getNorthEast()),a={x:o.x,y:r.y},s={x:r.x,y:o.y},l=e.getWorldWidth();s.x<a.x+100;)s.x+=l;for(;a.x>n.x;)a.x-=l,s.x-=l;a.x===this._prevMin.x&&a.y===this._prevMin.y&&s.x===this._prevMax.x&&s.y===this._prevMax.y||(this._viewportSurface.resize({width:0,height:0}).widgetX(a.x).widgetY(a.y).widgetWidth(s.x-a.x).widgetHeight(s.y-a.y),this._viewportSurface._renderCount?(this._viewportSurface.render(),this._prevMin=a,this._prevMax=s):this._viewportSurface.lazyRender());for(var h=e.fromLatLngToDivPixel(new t.google.maps.LatLng(85,-179.9)),u=e.fromLatLngToDivPixel(new t.google.maps.LatLng(-85,179.9));u.x<h.x+100;)u.x+=l;for(;h.x>n.x;)h.x-=l,u.x-=l;h.x===this._prevWorldMin.x&&h.y===this._prevWorldMin.y&&u.x===this._prevWorldMax.x&&u.y===this._prevWorldMax.y||(this._worldSurface.widgetX(h.x).widgetY(h.y).widgetWidth(u.x-h.x).widgetHeight(u.y-h.y).render(),this._prevWorldMin=u,this._prevWorldMax=u)}},o.prototype.onRemove=function(){this._viewportSurface.target(null),this._div.parentNode.removeChild(this._div),this._div=null},new o(e,i,n)}(this._googleMap,this._worldSurface,this._viewportSurface),this._googleMap.addListener("center_changed",function(){r.centerLat(r._googleMap.center.lat()),r._prevCenterLat=r.centerLat(),r.centerLong(r._googleMap.center.lng()),r._prevCenterLong=r.centerLong(),r._googleMapPanorama.setPosition({lat:r.centerLat(),lng:r.centerLong()}),r.zoom(r._googleMap.getZoom()),r._prevZoom=r.zoom(),r._overlay.draw()}),this._googleMap.addListener("zoom_changed",function(){r.zoom(r._googleMap.zoom),r._prevZoom=r.zoom()}),this._googleStreetViewService=new t.google.maps.StreetViewService,this._googleMapPanorama=this._googleMap.getStreetView(),this._googleMapPanorama.addListener("visible_changed",function(){r.streetView(r._googleMapPanorama.getVisible()),r._prevStreetView=r.streetView()}),this._circleMap=e.map([]),this._pinMap=e.map([]),this._prevCenterLat=this.centerLat(),this._prevCenterLong=this.centerLong(),this._prevZoom=this.zoom();var a={strokeWeight:0,fillOpacity:.45,fillColor:"#1f77b4",editable:!0,clickable:!0};this._drawingManager=new t.google.maps.drawing.DrawingManager({drawingMode:t.google.maps.drawing.OverlayType.MARKER,drawingControl:!0,drawingControlOptions:{position:t.google.maps.ControlPosition.TOP_CENTER,drawingModes:["polygon","rectangle","circle"]},rectangleOptions:a,circleOptions:a,polygonOptions:a}),this.drawingState()&&this._userShapes.load(this.drawingState())},o.prototype.update=function(e,i){var n=this;this._googleMapNode.style("width",this.width()+"px").style("height",this.height()+"px"),this._googleMap.setMapTypeId(this.getMapType()),this._googleMap.setOptions(this.getMapOptions()),this.centerAddress_exists()&&this._prevCenterAddress!==this.centerAddress()&&(this._prevCenterAddress=this.centerAddress(),this._googleGeocoder.geocode({address:this.centerAddress()},function(e,i){if(i===t.google.maps.GeocoderStatus.OK){var o=e[0].geometry.bounds||e[0].geometry.viewport;n._googleMap.fitBounds(o),n.streetView()&&n.useComputedHeading()&&n.streetViewAt({lat:e[0].geometry.location.lat(),lng:e[0].geometry.location.lng()},50)}else n.statusError({data:e,status:i})})),this._prevCenterLat===this.centerLat()&&this._prevCenterLong===this.centerLong()||(this._googleMap.setCenter(new t.google.maps.LatLng(this.centerLat(),this.centerLong())),this._prevCenterLat=this.centerLat(),this._prevCenterLong=this.centerLong()),this._prevZoom!==this.zoom()&&(this._googleMap.setZoom(this.zoom()),this._prevZoom=this.zoom()),this.updateCircles(),this.updatePins(),this._prevStreetView!==this.streetView()&&(this.streetView()?(this._googleMapPanorama.setPosition({lat:this.centerLat(),lng:this.centerLong()}),this._googleMapPanorama.setPov({heading:0,pitch:0}),this._googleMapPanorama.setVisible(!0)):this._googleMapPanorama.setVisible(!1),this._prevStreetView=this.streetView()),this.drawingTools()?(this._drawingManager.setMap(this._googleMap),t.google.maps.event.addListener(this._drawingManager,"overlaycomplete",function(){o.prototype.onDrawingComplete.apply(n,arguments)})):(this._drawingManager.setMap(null),t.google.maps.event.clearInstanceListeners(this._drawingManager))},o.prototype.render=function(t){var e=this,n=arguments;return Qo().then(function(){i.prototype.render.apply(e,n)}),this},o.prototype.streetViewAt=function(e,i){void 0===i&&(i=1e3);var n=this,o=this.outdoorStreetViewOnly()?t.google.maps.StreetViewSource.OUTDOOR:t.google.maps.StreetViewSource.DEFAULT;this._googleStreetViewService.getPanorama({location:e,radius:i,source:o},function(i,o){if("OK"===o){var r=new t.google.maps.Marker({position:e,map:n._googleMap}),a=t.google.maps.geometry.spherical.computeHeading(i.location.latLng,new t.google.maps.LatLng(e.lat,e.lng));n._googleMapPanorama.setPano(i.location.pano),n._googleMapPanorama.setPov({heading:a,pitch:0}),n.showStreetViewMarker()||r.setVisible(!1),n._googleMapPanorama.setVisible(!0);var s=t.google.maps.event.addListener(n._googleMap.getStreetView(),"visible_changed",function(){this.getVisible()||(r.setMap(null),t.google.maps.event.removeListener(s))})}else n.statusError({data:i,status:o})})},o.prototype.updateCircles=function(){function t(t){return t[0]+"_"+t[1]}var i=[],n=e.map(this._circleMap.keys(),function(t){return t});this.data().forEach(function(e){n.remove(t(e)),e[3]&&!this._circleMap.has(t(e))?i.push(e):e[3]&&this._circleMap.has(t(e))||!e[3]&&this._circleMap.has(t(e))&&n.set(t(e),!0)},this),i.forEach(function(e){var i=this.createCircle(e[0],e[1],e[3]);this._circleMap.set(t(e),i)},this);var o=this;n.each(function(t){o._circleMap.get(t).setMap(null),o._circleMap.remove(t)})},o.prototype.updatePins=function(){function t(t){return t[0]+"_"+t[1]}var i=[],n=[],o=e.map(this._pinMap.keys(),function(t){return t});this.data().forEach(function(e){o.remove(t(e)),e[2]&&!this._pinMap.has(t(e))?i.push(e):e[2]&&this._pinMap.has(t(e))?n.push(e):!e[2]&&this._pinMap.has(t(e))&&o.set(t(e),!0)},this),i.forEach(function(e){var i=this.createMarker(e[0],e[1],e[2]);this._pinMap.set(t(e),i)},this),n.forEach(function(e){this._pinMap.get(t(e)).setIcon(this.createIcon(e[2]))},this);var r=this;o.each(function(t){r._pinMap.get(t).setMap(null),r._pinMap.remove(t)})},o.prototype.createIcon=function(t){return{path:"M 0,0 C -2,-20 -10,-22 -10,-30 A 10,10 0 1,1 10,-30 C 10,-22 2,-20 0,0 z M -2,-30",fillColor:t.fillColor,fillOpacity:t.fillOpacity||.8,scale:.5,strokeColor:t.strokeColor||"black",strokeWeight:.25}},o.prototype.createMarker=function(e,i,n){return new t.google.maps.Marker({position:new t.google.maps.LatLng(e,i),animation:t.google.maps.Animation.DROP,title:n.title||"",icon:this.createIcon(n),map:this._googleMap})},o.prototype.createCircle=function(e,i,n){return n.radius=n.radius||1,new t.google.maps.Circle({center:new t.google.maps.LatLng(e,i),radius:16093*n.radius/10,fillColor:n.fillColor||"red",strokeColor:n.strokeColor||n.fillColor||"black",strokeWeight:.5,map:this._googleMap})},o.prototype.zoomTo=function(e,i){if(!this._renderCount)return this;i=i||this.singleZoomToMaxZoom();var n=0,o=new t.google.maps.LatLngBounds;switch(e.forEach(function(e){var i=new t.google.maps.LatLng(e[0],e[1]);o.extend(i),++n}),n){case 0:break;case 1:this._googleMap.setCenter(o.getCenter()),this._googleMap.setZoom(i);break;default:this._googleMap.fitBounds(o)}return this},o.prototype.zoomToFit=function(){return this.zoomTo(this.data())},o.prototype.drawingOptions=function(t){return arguments.length?(this._drawingManager.setOptions(t),this):this._drawingManager},o.prototype.userShapeSelection=function(t){return arguments.length?(this._userShapeSelection&&this._userShapeSelection.setEditable(!1),this._userShapeSelection=t,this._userShapeSelection&&this._userShapeSelection.setEditable(!0),this):this._userShapeSelection},o.prototype.deleteUserShape=function(t){this._userShapeSelection===t&&this.userShapeSelection(null),this._userShapes.remove(t)},o.prototype.onDrawingComplete=function(e){if(e.type!==t.google.maps.drawing.OverlayType.MARKER){this._drawingManager.setDrawingMode(null);var i=e.overlay;i.__hpcc_type=e.type,this._userShapes.add(i);var n=this,o=!1;window.addEventListener("keydown",function(t){"Control"!==t.keyIdentifier&&!0!==t.ctrlKey||(o=!0)}),window.addEventListener("keyup",function(t){!1===t.ctrlKey&&(o=!1)}),t.google.maps.event.addListener(i,"click",function(t){return n.userShapeSelection(i),t&&!0===o&&(n.deleteUserShape(i),n.drawingState(JSON.stringify(n._userShapes.save()))),!1}),this.userShapeSelection(i),this.drawingState(JSON.stringify(this._userShapes.save()))}},o.prototype.statusError=function(t){console.log("Data not found for this location.")},o}(e.HTMLWidget);tr.prototype._class+=" map_GMap",tr.prototype.publish("outdoorStreetViewOnly",!1,"boolean","If true, streetView will only display outdoor locations"),tr.prototype.publish("showStreetViewMarker",!1,"boolean","If true, streetView marker will be hidden"),tr.prototype.publish("useComputedHeading",!1,"boolean","If true, centerAddress streetView compute the ideal panorama heading"),tr.prototype.publish("type","road","set","Map Type",["terrain","road","satellite","hybrid"],{tags:["Basic"]}),tr.prototype.publish("centerLat",42.877742,"number","Center Latitude",null,{tags:["Basic"]}),tr.prototype.publish("centerLong",-97.380979,"number","Center Longitude",null,{tags:["Basic"]}),tr.prototype.publish("centerAddress",null,"string","Address to center map on",null,{tags:["Basic"],optional:!0}),tr.prototype.publish("zoom",4,"number","Zoom Level",null,{tags:["Basic"]}),tr.prototype.publish("singleZoomToMaxZoom",14,"number","Max zoomTo level with single item"),tr.prototype.publish("panControl",!0,"boolean","Pan Controls",null,{tags:["Basic"]}),tr.prototype.publish("zoomControl",!0,"boolean","Zoom Controls",null,{tags:["Basic"]}),tr.prototype.publish("scaleControl",!0,"boolean","Scale Controls",null,{tags:["Basic"]}),tr.prototype.publish("mapTypeControl",!1,"boolean","Map Type Controls",null,{tags:["Basic"]}),tr.prototype.publish("fullscreenControl",!1,"boolean","Fullscreen Controls",null,{tags:["Basic"]}),tr.prototype.publish("streetViewControl",!1,"boolean","StreetView Controls",null,{tags:["Basic"]}),tr.prototype.publish("overviewMapControl",!1,"boolean","OverviewMap Controls",null,{tags:["Basic"]}),tr.prototype.publish("streetView",!1,"boolean","Streetview",null,{tags:["Basic"]}),tr.prototype.publish("drawingTools",!1,"boolean","Drawing Tools",null,{tags:["Basic"]}),tr.prototype.publish("drawingState","","string","Map Drawings",null,{disable:function(t){return!1===t.drawingTools()}}),tr.prototype.publish("googleMapStyles",{},"object","Styling for map colors etc",null,{tags:["Basic"]});var er=function(t){function e(e,i){var n=t.call(this)||this;return n.gmap=e,n.surface=i,n.autoScaleMode("none"),n.zoomable(!1).zoomDuration(10),n}return l(e,t),e.prototype.getProjection=function(){return this.gmap._overlay.getProjection()},e.prototype.render=function(e){var i=this;return t.prototype.render.call(this,function(t){var n=i.getProjection();if(n){var o=new window.google.maps.LatLng(0,0),r=n.fromLatLngToDivPixel(o),a=i.surface.widgetX(),s=i.surface.widgetY(),l=[r.x-a,r.y-s],h=i.gmap._googleMap.getZoom();i.zoomTo(l,1/16*(1<<h),0)}e&&e(t)}),this},e}(_o),ir=function(e){function i(){var t=e.call(this)||this;return t.layered=new er(t,t._viewportSurface),t._viewportSurface.widget(t.layered),t}return l(i,e),i.prototype.invert=function(t,e){return this.layered.invert(t,e)},i.prototype.rproject=function(e,i){var n=this.layered.getProjection().fromDivPixelToLatLng(new t.google.maps.Point(e,i));return{lat:n.lat(),lng:n.lng()}},i.prototype.updateCircles=function(){},i.prototype.updatePins=function(){},i.prototype.layers=function(t){return arguments.length?(this.layered.layers(t),this):this.layered.layers()},i.prototype.render=function(t){var i=this;return e.prototype.render.call(this,function(e){i.layered.preRender().then(function(){i.layered.render(function(e){t&&t(e)})})})},i}(tr);ir.prototype._class+=" map_GMapLayered";var nr=function(t){function e(){var e=t.call(this)||this,i=e;return e._counties=(new jo).paletteID("Blues").meshVisible(!1).opacity(.8).columns(["fips","weight"]).on("click",function(t,e,n){i.click(t,e,n)}).on("dblclick",function(t,e,n){i.dblclick(t,e,n)}),e}return l(e,t),e.prototype.enter=function(e,i){t.prototype.enter.call(this,e,i),this.layers([this._counties])},e.prototype.update=function(e,i){this._counties.data(this.data()),t.prototype.update.call(this,e,i),this._palette=this._counties._palette,this._dataMinWeight=this._counties._dataMinWeight,this._dataMaxWeight=this._counties._dataMaxWeight},e.prototype.render=function(e){var i=this;return t.prototype.render.call(this,function(t){if(console.log("as:"+i.autoScale()),i._renderCount>1&&i.autoScale()){var n=i._counties.getDataBounds();if(n.x&&n.y&&(!i._prevBounds||i._prevBounds.x!==n.x||i._prevBounds.y!==n.y||i._prevBounds.width!==n.width||i._prevBounds.height!==n.height)){i._prevBounds=n;var o=i.invert(n.x,n.y),r=i.invert(n.x+n.width,n.y+n.height);o&&r&&i.zoomTo([[o[1],o[0]],[r[1],r[0]]])}}e&&e(t)})},e.prototype.exit=function(e,i){t.prototype.exit.call(this,e,i)},e.prototype.click=function(t,e,i){console.log("Click: "+JSON.stringify(t)+", "+e+","+i)},e.prototype.dblclick=function(t,e,i){console.log("Double click: "+JSON.stringify(t)+", "+e+","+i)},e}(ir);nr.prototype._class+=" map_GMapCounties",nr.prototype.publish("autoScale",!1,"boolean","Auto scale to data");var or=function(t){function i(){return t.call(this)||this}return l(i,t),i.prototype.enter=function(){t.prototype.enter.apply(this,arguments);var i=(new r.Graph).layout("None").zoomable(!1),n=i.render,o=this;i.render=function(t){var i=[],a=[],s=null;return o.data().forEach(function(t){var n=o._viewportSurface.project(t[0],t[1]),l=(new e.Shape).shape("circle").radius(3).data(t).pos(n);i.push(l),s&&a.push((new r.Edge).sourceVertex(s).targetVertex(l).sourceMarker("none").targetMarker("arrow")),s=l}),this.data({vertices:i,edges:a}),n.apply(this,arguments)},this._viewportSurface.widget(i)},i}(tr);or.prototype._class+=" map_GMapGraph";var rr=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.enter=function(){t.prototype.enter.apply(this,arguments);var e=new a.HeatMap,i=e.render,n=this;e.render=function(t){return this.data(n.data().map(function(t){var e=n._viewportSurface.project(t[0],t[1]);return[e.x,e.y,t[4]]})),i.apply(this,arguments),this},this._viewportSurface.widget(e)},e}(tr);rr.prototype._class+=" map_GMapHeat";po(".map_Layered .pin>path{cursor:pointer;stroke:#000}.map_Layered .pin.selected>path{stroke-width:1px;stroke:red}.map_Layered .pin.over>path{stroke:orange}.map_Layered .pin.selected.over>path{stroke-width:1px;stroke:red}");var ar=function(t){function i(){var i=t.call(this)||this;return e.Utility.SimpleSelectionMixin.call(i),i._geohash=new ao,i}return l(i,t),i.prototype.pinsData=function(){var t=this._db.fieldByLabel(this.geohashColumn()),e=this._db.fieldByLabel(this.tooltipColumn()),i=this._db.fieldByLabel(this.latColumn()),n=this._db.fieldByLabel(this.longColumn()),o=this;return this.data().filter(function(t){var e=i?t[i.idx]:t[0],r=n?t[n.idx]:t[1];return!o.omitNullLatLong()||0!==e||0!==r}).map(function(o,r){var a={idx:r,lat:i?o[i.idx]:o[0],long:n?o[n.idx]:o[1],ext:o[2]instanceof Object?o[2]:{},origRow:o};if(t)try{var s=this._geohash.bounds(o[t.idx]);a.lat=(s.ne.lat+s.sw.lat)/2,a.long=(s.ne.lon+s.sw.lon)/2}catch(t){}return e&&(a.ext.tooltip=o[e.idx]),a},this)},i.prototype.layerEnter=function(t,i,n){go.prototype.layerEnter.apply(this,arguments),this._pinsTransform=i,this._selection.widgetElement(this._pinsTransform),this.pinsPaths=e.select(null),this.tooltipHTML(function(t){return void 0===t.ext.tooltip?"":t.ext.tooltip})},i.prototype.layerUpdate=function(t){go.prototype.layerUpdate.apply(this,arguments),this._pinsTransform.style("opacity",this.opacity()),this.pinsPaths=this._pinsTransform.selectAll(".pin").data(this.visible()?this.pinsData():[],function(t){return t.idx});var i=this,n=this.pinsPaths.enter().append("g").attr("class","pin").call(this._selection.enter.bind(this._selection)).on("click",function(t){i.click(i.rowToObj(t.origRow),"geohash",i._selection.selected(this))}).on("dblclick",function(t){i.dblclick(i.rowToObj(t.origRow),"geohash",i._selection.selected(this))}).on("mouseover",function(t){e.Platform.isIE||this.parentNode.appendChild(this)}).on("mouseout.tooltip",function(t){t.ext&&t.ext.tooltip&&i.tooltip.hide.apply(this,arguments)}).on("mousemove.tooltip",function(t){t.ext&&t.ext.tooltip&&i.tooltip.show.apply(this,arguments)}).each(function(t){var i=e.select(this);i.append("path").attr("class","data"),i.append("text").attr("text-anchor","middle")}).merge(this.pinsPaths);n.selectAll("text").style("stroke",this.fontColor()).style("fill",this.fontColor()).style("font-size",this.fontSize()).style("font-family",this.fontFamily()).style("dominant-baseline",this.textBaseline()).attr("dx",0).attr("dy",this.pinTextDY()).text(function(t){return t.ext&&t.ext.text?t.ext.text:""});var o=this.svgPinPath();n.selectAll("path.data").attr("d",o).attr("stroke-width",this.strokeWidth()+"px").style("display",function(e){return t.project(e.lat,e.long)?null:"none"}).style("stroke",function(t){return t.ext&&t.ext.strokeColor?t.ext.strokeColor:i.strokeColor()}).style("fill",function(t){return t.ext&&t.ext.fillColor?t.ext.fillColor:i.fillColor()}),this.pinsPaths.exit().remove()},i.prototype.layerZoomed=function(t){go.prototype.layerZoomed.apply(this,arguments),this.pinsPaths.attr("transform",function(e){var i=t.project(e.lat,e.long);return i||(i=[0,0]),"translate("+i[0]+", "+i[1]+")scale("+1/t.zoomScale()+")"})},i.prototype.pinTextDY=function(){switch(this.pinType()){case"pin":case"rectangle-pin":return-this.arrowHeight();case"circle":case"rectangle":return 0}},i.prototype.svgPinPath=function(){switch(this.pinType()){case"pin":return this.circlePinPath();case"circle":return this.circlePath();case"rectangle":return this.rectanglePath();case"rectangle-pin":return this.rectanglePinPath()}},i.prototype.rectanglePinPath=function(){var t=this.pinWidth(),e=this.pinHeight(),i=this.cornerRadius(),n=this.arrowHeight(),o=this.arrowWidth(),r=(t-2*i-o)/2;return"M"+(0-t/2)+","+(0-e+i)+"a"+-i+","+-i+" 0 0 1 "+i+","+-i+"h"+(t+2*-i)+"a"+i+","+i+" 0 0 1 "+i+","+i+"v"+(e+2*-i)+"a"+i+","+i+" 0 0 1 "+-i+","+i+"h"+-r+"l"+-o/2+","+n+"l"+-o/2+","+-n+"h"+-r+"a"+-i+","+-i+" 0 0 1 "+-i+","+-i+"z"},i.prototype.rectanglePath=function(){var t=this.pinWidth(),e=this.pinHeight(),i=this.cornerRadius(),n=-e/2;return"M"+-t/2+","+(n+=i)+"a"+-i+","+-i+" 0 0 1 "+i+","+-i+"h"+(t+2*-i)+"a"+i+","+i+" 0 0 1 "+i+","+i+"v"+(e+2*-i)+"a"+i+","+i+" 0 0 1 "+-i+","+i+"h"+(2*i-t)+"a"+-i+","+-i+" 0 0 1 "+-i+","+-i+"z"},i.prototype.circlePinPath=function(){var t=this.arrowHeight(),e=this.arrowWidth(),i=e/2,n=-t;return"M"+(0-e/2)+","+(0-t)+"c"+-i+" "+n+", "+(e+i)+" "+n+", "+e+" 0l"+-e/2+","+t+"l"+-e/2+","+-t+"z"},i.prototype.circlePath=function(){var t=+this.pinRadius();return"M 0, 0 m "+-t+", 0 a "+t+","+t+" 0 1,0 "+2*t+",0 a "+t+","+t+" 0 1,0 "+2*-t+",0"},i.prototype.click=function(t,e,i){console.log("Click: "+JSON.stringify(t)+", "+e+", "+i)},i.prototype.dblclick=function(t,e,i){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+i)},i}(go);ar.prototype._class+=" map_Pins",ar.prototype.mixin(e.Utility.SimpleSelectionMixin),ar.prototype.publish("geohashColumn",null,"set","Geohash column",function(){return this.columns()},{optional:!0}),ar.prototype.publish("tooltipColumn",null,"set","Tooltip column",function(){return this.columns()},{optional:!0}),ar.prototype.publish("latColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),ar.prototype.publish("longColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),ar.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),ar.prototype.publish("fillColor","#00FFDD","html-color","Pin Color",null,{optional:!0}),ar.prototype.publish("omitNullLatLong",!1,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]}),ar.prototype.publish("strokeWidth",.5,"number","Pin Border Thickness (pixels)",null,{tags:["Basic"]}),ar.prototype.publish("strokeColor","","html-color","Pin Border Color",null,{optional:!0}),ar.prototype.publish("fontSize",18,"number","Font Size",null,{tags:["Basic","Shared"]}),ar.prototype.publish("fontFamily","Verdana","string","Font Name",null,{tags:["Basic","Shared","Shared"]}),ar.prototype.publish("fontColor","#000000","html-color","Font Color",null,{tags:["Basic","Shared"]}),ar.prototype.publish("pinType","pin","set","Pin Type",["pin","circle","rectangle","rectangle-pin"],{tags:["Basic"]}),ar.prototype.publish("arrowWidth",8,"number","Pin arrow width (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["pin","rectangle-pin"].indexOf(t.pinType())}}),ar.prototype.publish("arrowHeight",12,"number","Pin arrow height (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["pin","rectangle-pin"].indexOf(t.pinType())}}),ar.prototype.publish("pinWidth",20,"number","Width of pin (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["rectangle","rectangle-pin"].indexOf(t.pinType())}}),ar.prototype.publish("pinHeight",20,"number","Height of pin (pixels) (not including arrow)",null,{tags:["Basic"],disable:function(t){return-1===["rectangle","rectangle-pin"].indexOf(t.pinType())}}),ar.prototype.publish("cornerRadius",10,"number","Radius of rectangular pin corners (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["rectangle","rectangle-pin"].indexOf(t.pinType())}}),ar.prototype.publish("pinRadius",12,"number","Radius of circle (pixels)",null,{tags:["Basic"],disable:function(t){return"circle"!==t.pinType()}}),ar.prototype.publish("textBaseline","central","set","Pin text vertical alignment",["auto","use-script","no-change","reset-size","ideographic","alphabetic","hanging","mathematical","central","middle","text-after-edge","text-before-edge","inherit"],{tags:["Basic"]});var sr=function(t){function e(){var e=t.call(this)||this,i=e;return e._pins=(new ar).columns(["lat","long","ext"]).on("click",function(t,e,n){i.click(i.rowToObj(t.ext.origRow),"",n),i.clickStreetView(i.rowToObj(t.ext.origRow),"",n)}).on("dblclick",function(t,e,n){i.dblclick(i.rowToObj(t.ext.origRow),"",n)}),e}return l(e,t),e.prototype.pinsData=function(){if(0===this.data().length)return[];var t=this.columns();return this._view=this._db.rollupView([this.latitudeColumn(),this.longitudeColumn()]),this._view.entries().map(function(e){var i=e.values[0].value[0];return[e.key,e.values[0].key,{fillColor:i[t.indexOf(this.colorColumn())],tooltip:i[t.indexOf(this.tooltipColumn())],origRow:i}]},this)},e.prototype.enter=function(e,i){t.prototype.enter.call(this,e,i),this.layers([this._pins])},e.prototype.update=function(e,i){t.prototype.update.call(this,e,i),this._pins.data(this.pinsData()),this.autoScale()&&this._prevChecksum!==this._db.checksum()&&(this._prevChecksum=this._db.checksum(),this.zoomTo(this._pins.pinsData().map(function(t){return[t.lat,t.long]})))},e.prototype.exit=function(e,i){t.prototype.exit.call(this,e,i)},e.prototype.click=function(t,e,i){console.log("Click: "+JSON.stringify(t)+", "+e+","+i)},e.prototype.clickStreetView=function(t,e,i){this.streetViewOnClick()&&this.streetViewAt({lat:+t[this.latitudeColumn()],lng:+t[this.longitudeColumn()]})},e.prototype.dblclick=function(t,e,i){console.log("Double click: "+JSON.stringify(t)+", "+e+","+i)},e}(ir);sr.prototype._class+=" map_GMapPin",sr.prototype.publish("autoScale",!1,"boolean","Auto scale to data"),sr.prototype.publishProxy("pinColor","_pins","fillColor"),sr.prototype.publishProxy("pinType","_pins","pinType"),sr.prototype.publishProxy("pinWidth","_pins","pinWidth"),sr.prototype.publishProxy("pinHeight","_pins","pinHeight"),sr.prototype.publishProxy("cornerRadius","_pins","cornerRadius"),sr.prototype.publishProxy("pinRadius","_pins","pinRadius"),sr.prototype.publishProxy("arrowWidth","_pins","arrowWidth"),sr.prototype.publishProxy("arrowHeight","_pins","arrowHeight"),sr.prototype.publishProxy("textBaseline","_pins","textBaseline"),sr.prototype.publishProxy("strokeWidth","_pins","strokeWidth"),sr.prototype.publishProxy("omitNullLatLong","_pins","omitNullLatLong"),sr.prototype.publish("latitudeColumn",null,"set","Latitude",function(){return this.columns()},{optional:!0}),sr.prototype.publish("longitudeColumn",null,"set","Longitude",function(){return this.columns()},{optional:!0}),sr.prototype.publish("colorColumn",null,"set","Color",function(){return this.columns()},{optional:!0}),sr.prototype.publish("tooltipColumn",null,"set","Tooltip",function(){return this.columns()},{optional:!0}),sr.prototype.publish("streetViewOnClick",!1,"boolean","Switch to street view when pin clicked");po(".map_Layered .marker{fill:#656565;stroke:none}.map_Layered .dataEdge{stroke:#000;fill:none}");var lr=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.data=function(t){var e=go.prototype.data.apply(this,arguments);return arguments.length&&(this.dataEdges=[],t.forEach(function(t){this.dataEdges.push({type:"LineString",coordinates:[[t[1],t[0]],[t[3],t[2]]]})},this)),e},e.prototype.layerEnter=function(t,e,i){go.prototype.layerEnter.apply(this,arguments),e.append("defs").append("marker").attr("class","marker").attr("id",this._id+"_arrowHead").attr("viewBox","0 0 10 10").attr("refX",10).attr("refY",5).attr("markerWidth",16).attr("markerHeight",16).attr("markerUnits","strokeWidth").attr("orient","auto").append("polyline").attr("points","0,0 10,5 0,10 1,5"),this._edgesTransform=e.append("g")},e.prototype.layerUpdate=function(t){go.prototype.layerUpdate.apply(this,arguments),this._edgesTransform.style("opacity",this.opacity());var e=this._edgesTransform.selectAll(".dataEdge").data(this.visible()?this.dataEdges:[]);this._edgesPaths=e.enter().append("path").attr("class","dataEdge").attr("marker-end","url(#"+this._id+"_arrowHead)").merge(e).attr("d",t._d3GeoPath),e.exit().remove()},e.prototype.layerZoomed=function(t){go.prototype.layerZoomed.apply(this,arguments),this._edgesPaths.attr("stroke-width",.5/t.zoomScale()+"px")},e}(go);lr.prototype._class+=" map_Lines",lr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]});var hr=function(t){function e(){var e=t.call(this)||this,i=e;return e._lines=new lr,e._pins=(new ar).columns(["lat","long","ext"]).on("click",function(t,e,n){i.click(i.rowToObj(t.ext.origRow),"",n)}).on("dblclick",function(t,e,n){i.click(i.rowToObj(t.ext.origRow),"",n)}),e}return l(e,t),e.prototype.pinsData=function(){if(0===this.data().length)return[];var t=this.columns();this._fromView=this._db.rollupView([this.fromLatitudeColumn(),this.fromLongitudeColumn()]),this._toView=this._db.rollupView([this.toLatitudeColumn(),this.toLongitudeColumn()]);var e=this._fromView.entries().map(function(e){var i=e.values[0].value[0];return[e.key,e.values[0].key,{fillColor:i[t.indexOf(this.fromColorColumn())]||this.fromPinColor(),tooltip:i[t.indexOf(this.fromTooltipColumn())],origRow:i}]},this),i=this._toView.entries().map(function(e){var i=e.values[0].value[0];return[e.key,e.values[0].key,{fillColor:i[t.indexOf(this.toColorColumn())]||this.toPinColor(),tooltip:i[t.indexOf(this.toTooltipColumn())],origRow:i}]},this);return e.concat(i)},e.prototype.linesData=function(){return 0===this.data().length?[]:(this._linesView=this._db.rollupView([this.fromLatitudeColumn(),this.fromLongitudeColumn(),this.toLatitudeColumn(),this.toLongitudeColumn()]),this._linesView.data())},e.prototype.enter=function(e,i){t.prototype.enter.call(this,e,i),this.layers([this._lines,this._pins])},e.prototype.update=function(e,i){t.prototype.update.call(this,e,i),this._pins.data(this.pinsData()),this._lines.data(this.linesData()),this.autoScale()&&this._prevChecksum!==this._db.checksum()&&(this._prevChecksum=this._db.checksum(),this.zoomTo(this._pins.pinsData().map(function(t){return[t.lat,t.long]})))},e.prototype.exit=function(e,i){t.prototype.exit.call(this,e,i)},e.prototype.click=function(t,e,i){console.log("Click: "+JSON.stringify(t)+", "+e+","+i)},e.prototype.dblclick=function(t,e,i){console.log("Double click: "+JSON.stringify(t)+", "+e+","+i)},e}(ir);hr.prototype._class+=" map_GMapPinLine",hr.prototype.publish("autoScale",!1,"boolean","Auto scale to data"),hr.prototype.publish("fromPinColor","green","html-color","From Pin Color"),hr.prototype.publish("fromLatitudeColumn",null,"set","From Latitude",function(){return this.columns()},{optional:!0}),hr.prototype.publish("fromLongitudeColumn",null,"set","From Longitude",function(){return this.columns()},{optional:!0}),hr.prototype.publish("fromColorColumn",null,"set","From Color",function(){return this.columns()},{optional:!0}),hr.prototype.publish("fromTooltipColumn",null,"set","From Tooltip",function(){return this.columns()},{optional:!0}),hr.prototype.publish("toPinColor","red","html-color","To Pin Color"),hr.prototype.publish("toLatitudeColumn",null,"set","To Latitude",function(){return this.columns()},{optional:!0}),hr.prototype.publish("toLongitudeColumn",null,"set","To Longitude",function(){return this.columns()},{optional:!0}),hr.prototype.publish("toColorColumn",null,"set","To Color",function(){return this.columns()},{optional:!0}),hr.prototype.publish("toTooltipColumn",null,"set","To Tooltip",function(){return this.columns()},{optional:!0});po(".map_Layered .marker{fill:#656565;stroke:none;stroke-width:1px}.map_Layered .dataEdge{stroke:#000;fill:none}");var ur=function(t){function e(){var e=t.call(this)||this;return e.dataEdges=[],e}return l(e,t),e.prototype.importJSON=function(t){var e=ar.prototype.importJSON.apply(this,arguments);if(arguments.length){this.dataEdges=[];var i=null;t.forEach(function(t){i&&this.dataEdges.push({type:"LineString",coordinates:[[i.long,i.lat],[t.long,t.lat]]}),i=t.eol?null:t},this)}return e},e.prototype.data=function(t){var e=ar.prototype.data.apply(this,arguments);if(arguments.length){this.dataEdges=[];var i=null;t.forEach(function(t){i&&this.dataEdges.push({type:"LineString",coordinates:[[i[1],i[0]],[t[1],t[0]]]}),i=t},this)}return e},e.prototype.layerEnter=function(t,e,i){ar.prototype.layerEnter.apply(this,arguments),e.append("defs").append("marker").attr("class","marker").attr("id",this._id+"_arrowHead").attr("viewBox","0 0 10 10").attr("refX",10).attr("refY",5).attr("markerWidth",16).attr("markerHeight",16).attr("markerUnits","strokeWidth").attr("orient","auto").append("polyline").attr("points","0,0 10,5 0,10 1,5"),this._edgesTransform=e.append("g")},e.prototype.layerUpdate=function(t){ar.prototype.layerUpdate.apply(this,arguments),this._edgesTransform.style("opacity",this.opacity());var e=this._edgesTransform.selectAll(".dataEdge").data(this.visible()?this.dataEdges:[]);this._edgesPaths=e.enter().append("path").attr("class","dataEdge").attr("marker-end","url(#"+this._id+"_arrowHead)").merge(e).attr("d",t._d3GeoPath),e.exit().remove()},e.prototype.layerZoomed=function(t){ar.prototype.layerZoomed.apply(this,arguments),this._edgesPaths.attr("stroke-width",.5/t.zoomScale()+"px")},e}(ar);ur.prototype._class+=" map_Graph";po(".map_Layered .graticule{fill:none;stroke:#a9a9a9;stroke-linejoin:round;stroke-width:.25px}.map_Layered .graticuleOutline{fill:none;stroke:#000;stroke-linejoin:round;stroke-width:.25px}");var cr=function(t){function i(){var i=t.call(this)||this;return i._dataMap={},i._path=e.select(null),i}return l(i,t),i.prototype.layerEnter=function(t,e,i){go.prototype.layerEnter.apply(this,arguments),this._graticule=ui(),this._graticulePath=e.append("path").datum(this._graticule).attr("class","graticule").attr("vector-effect","non-scaling-stroke"),this._graticuleOutlinePath=e.append("path").datum(this._graticule.outline).attr("class","graticuleOutline").attr("vector-effect","non-scaling-stroke")},i.prototype.layerUpdate=function(t){if(!this.visible())return this._graticulePath.attr("d",""),this._graticuleOutlinePath.attr("d",""),void delete this._prevProjection;this._prevProjection!==t.projection()&&(this._graticulePath.attr("d",t._d3GeoPath),this._graticuleOutlinePath.attr("d",t._d3GeoPath),this._prevProjection=t.projection()),this._graticulePath.style("stroke",this.meshColor()),this._graticuleOutlinePath.style("stroke",this.meshColor())},i.prototype.layerExit=function(t){delete this._prevProjection},i}(go);cr.prototype._class+=" map_Graticule",cr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),cr.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),cr.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width");po(".map_Heat{//pointer-events:none}.map_Heat canvas{pointer-events:none}");var pr=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.layerEnter=function(t,e,i){go.prototype.layerEnter.apply(this,arguments),this._parentOverlay.style("pointer-events","none"),this._heatTransform=i.style("pointer-events","none").append("div").attr("class",this.classID()).style("width",t.width()+"px").style("height",t.height()+"px"),this.heat=(new a.HeatMap).target(this._heatTransform.node())},e.prototype.layerUpdate=function(t){go.prototype.layerUpdate.apply(this,arguments),this._heatTransform.style("opacity",this.opacity()).style("width",t.width()+"px").style("height",t.height()+"px"),this.heat.resize(t.size()),this.layerZoomed(t)},e.prototype.layerExit=function(t){delete this._prevProjection,this.heat.target(null),delete this.heat},e.prototype.layerZoomed=function(t){go.prototype.layerZoomed.apply(this,arguments);var e=this._db.fieldByLabel(this.latColumn()),i=this._db.fieldByLabel(this.longColumn());this.heat.columns(this.columns()).data(this.visible()?this.data().map(function(n){var o=e?n[e.idx]:n[0],r=i?n[i.idx]:n[1],a=t.zoomTranslate(),s=t.project(o,r),l=t.zoomScale();return s[0]*=l,s[1]*=l,[a[0]+s[0],a[1]+s[1],n[4]||.5]}):[]).render()},e}(go);function dr(){}function fr(t){return t.k}function _r(t){return[t.x,t.y]}function mr(t){return function(){return t}}pr.prototype._class+=" map_Heat",pr.prototype.publish("latColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),pr.prototype.publish("longColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),pr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),dr.prototype._palette=e.Palette.rainbow("default"),dr.prototype.click=function(t,e,i){console.log("Click: "+JSON.stringify(t)+", "+e+", "+i)};po(".map_OpenStreet .background{fill:#fff}.map_OpenStreet .graticule{fill:none;stroke:#777;stroke-width:.5px;stroke-opacity:.5}.map_Layered .vector{fill:none;stroke:navy;stroke-linejoin:round}");var gr=4096,yr=function(t){function i(){var e=t.call(this)||this;return e._zoomLayerID=0,e.autoScaleMode("none"),e}return l(i,t),i.prototype.layerEnter=function(t,e,n){go.prototype.layerEnter.apply(this,arguments),t.zoomExtent([.1,4*gr]),this._openStreet=e.append("g"),this._copyright=e.append("text").attr("x",-100).attr("y",-100).style("opacity",.5).text(i._copyrightText),this._copyrightBBox=this._copyright.node().getBBox()},i.prototype.layerUpdate=function(t){this._tile=function(){let t=0,e=0,i=960,n=500,o=!0,r=!0,a=256,s=fr,l=_r,h=0;function u(){const u=+s.apply(this,arguments),c=l.apply(this,arguments),p=Math.log2(u/a),d=Math.round(Math.max(p+h,0)),f=Math.pow(2,p-d)*a,_=+c[0]-u/2,m=+c[1]-u/2,g=Math.max(o?0:-1/0,Math.floor((t-_)/f)),y=Math.min(o?1<<d:1/0,Math.ceil((i-_)/f)),v=Math.max(r?0:-1/0,Math.floor((e-m)/f)),b=Math.min(r?1<<d:1/0,Math.ceil((n-m)/f)),L=[];for(let t=v;t<b;++t)for(let e=g;e<y;++e)L.push([e,t,d]);return L.translate=[_/f,m/f],L.scale=f,L}return u.size=function(o){return arguments.length?(t=e=0,i=+o[0],n=+o[1],u):[i-t,n-e]},u.extent=function(o){return arguments.length?(t=+o[0][0],e=+o[0][1],i=+o[1][0],n=+o[1][1],u):[[t,e],[i,n]]},u.scale=function(t){return arguments.length?(s="function"==typeof t?t:mr(+t),u):s},u.translate=function(t){return arguments.length?(l="function"==typeof t?t:mr([+t[0],+t[1]]),u):l},u.zoomDelta=function(t){return arguments.length?(h=+t,u):h},u.tileSize=function(t){return arguments.length?(a=+t,u):a},u.clamp=function(t){return arguments.length?(o=r=!!t,u):o&&r},u.clampX=function(t){return arguments.length?(o=!!t,u):o},u.clampY=function(t){return arguments.length?(r=!!t,u):r},u}().size([t.width(),t.height()]).wrap(!1),this.visible()?this._copyright.attr("x",t.width()-this._copyrightBBox.width-this._copyrightBBox.height/2).attr("y",t.height()-this._copyrightBBox.height/2).text(i._copyrightText):this._copyright.text(""),this.layerZoomed(t)},i.prototype.layerZoomed=function(t){var i=t.zoomScale(),n=t.zoomTranslate(),o=this._tile.scale(i*gr).translate(n)(),r=o.scale/i,a=(o.translate[0],o.scale,o.translate[1],o.scale,Math.round(1e3*r));this._prevZoomLevel!==a&&(this._prevZoomLevel=a,this._zoomLayerID++);var s=this._openStreet.selectAll(".scaleG").data([this._zoomLayerID],function(t){return t}),l=s.enter().append("g").attr("class","scaleG").attr("transform",function(t,e){return"translate("+-gr/2+","+-gr/2+") scale("+t/256+")"}(r)).each(function(t){console.log(t)}).merge(s);s.exit().style("opacity",1).transition().duration(1e3).style("opacity",0).on("end",function(t){e.select(this).selectAll(".image").attr("xlink:href",null)}).remove(),l.selectAll(".image").data(o,function(t){return t.x+","+t.y}).enter().append("image").attr("class","image").style("opacity",0).attr("x",function(t){return t.tx}).attr("y",function(t){return t.ty}).attr("width",256).attr("height",256).attr("xlink:href",function(t){return"http://"+"abc"[t.y%3]+".tile.openstreetmap.org/"+t.z+"/"+t.x+"/"+t.y+".png"}).each(function(t){console.log("http://"+"abc"[t.y%3]+".tile.openstreetmap.org/"+t.z+"/"+t.x+"/"+t.y+".png")}).transition().duration(500).style("opacity",1)},i._copyrightText="© OpenStreetMap contributors",i}(go);yr.prototype._class+=" map_OpenStreet",yr.prototype.publish("tileProvider","OpenStreetMap","set","Tile Provider",["OpenStreetMap","OpenStreetMap Hot","MapQuest","MapQuest Sat","Stamen Watercolor","OpenCycleMap"],{tags:["Basic","Shared"]});var vr=function(t){function e(){return t.call(this)||this}return l(e,t),e}(_o);function br(){Po.call(this),this.projection("Mercator")}vr.prototype._class+=" map_TestHeatMap",br.prototype=Object.create(Po.prototype),br.prototype.constructor=br,br.prototype._class+=" map_TopoJSONChoropleth",br.prototype.publish("region","GB","set","Region Data",["AT","BE","BG","BR","CHLI","CY","CZ","DE","DK","EE","ES","FI","FR","GB","GE","GR","HR","HU","IE","IS","IT","KS","LT","LU","LV","MD","MK","MT","ND","NL","NO","PL","PT","RO","RS","SE","SI","SK","UA"]),br.prototype.layerEnter=function(t,i,n){Po.prototype.layerEnter.apply(this,arguments),this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);var o=this;this.tooltipHTML(function(t){var e=o.columns(),i=e&&e.length?e[0]:"Location",n=t&&t.length?t[t.length-1]:[""];return o.tooltipFormat({label:n[0],series:i,value:t[1]})})},br.prototype.layerUpdate=function(t){Po.prototype.layerUpdate.apply(this,arguments);var e=[],i=this;this.data().forEach(function(t){if(isNaN(t[0]))for(var n in i._choroTopologyIndex)for(var o in i._choroTopologyIndex[n])o===t[0]&&i._choroTopologyIndex[n][o].forEach(function(i){e.push([i].concat(t.filter(function(t,e){return e>0})).concat([t]))});else e.push(t.concat([t]))}),this.choroPaths=this._choroplethData.selectAll(".data").data(this.visible()?e:[],function(t){return t[0]}),this.choroPaths.enter().append("path").attr("class","data").call(this._selection.enter.bind(this._selection)).on("click",function(t){i._dataMap[t[0]]&&i.click(i.rowToObj(i._dataMap[t[0]]),"weight",i._selection.selected(i))}).on("dblclick",function(t){i._dataMap[t[0]]&&i.dblclick(i.rowToObj(i._dataMap[t[0]]),"weight",i._selection.selected(i))}).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show),this.choroPaths.attr("d",function(e){var n=t._d3GeoPath(i._choroTopologyFeatures[e[0]]);return n||console.log("Unknown Country: "+e),n}).style("fill",function(t){return i._palette(t[1],i._dataMinWeight,i._dataMaxWeight)}),this.choroPaths.exit().remove()},br.prototype.layerPreRender=function(){if(this._prevRegion!==this.region()&&(this._prevRegion=this.region(),delete this._topoJsonPromise),!this._topoJsonPromise){var t=this;this._topoJsonPromise=new Promise(function(e,i){Ao(ko()+"/"+t.region()+".json",function(i){function n(i){t._choroTopologyIndex=i,e()}t._choroTopology=i,t._choroTopologyObjects=i.objects.PolbndA,t._choroTopologyFeatures=bo(t._choroTopology,t._choroTopologyObjects).features,Ao(ko()+"/"+t.region()+"_idx.json",n).on("error",function(t){n({})})})})}return this._topoJsonPromise};var Lr,wr=Vo(function(t,e){var i;window,i=function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="dist/",i(i.s=10)}([function(t,e,i){!function(t){var e=Object.freeze;function i(t){var e,i,n,o;for(i=1,n=arguments.length;i<n;i++)for(e in o=arguments[i])t[e]=o[e];return t}Object.freeze=function(t){return t};var n=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function o(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}var r=0;function a(t){return t._leaflet_id=t._leaflet_id||++r,t._leaflet_id}function s(t,e,i){var n,o,r,a;return a=function(){n=!1,o&&(r.apply(i,o),o=!1)},r=function(){n?o=arguments:(t.apply(i,arguments),setTimeout(a,e),n=!0)}}function l(t,e,i){var n=e[1],o=e[0],r=n-o;return t===n&&i?t:((t-o)%r+r)%r+o}function h(){return!1}function u(t,e){return e=void 0===e?6:e,+(Math.round(t+"e+"+e)+"e-"+e)}function c(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function p(t){return c(t).split(/\s+/)}function d(t,e){for(var i in t.hasOwnProperty("options")||(t.options=t.options?n(t.options):{}),e)t.options[i]=e[i];return t.options}function f(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")}var _=/\{ *([\w_-]+) *\}/g;function m(t,e){return t.replace(_,function(t,i){var n=e[i];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(e)),n})}var g=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function y(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var v="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var w=0;function x(t){var e=+new Date,i=Math.max(0,16-(e-w));return w=e+i,window.setTimeout(t,i)}var C=window.requestAnimationFrame||b("RequestAnimationFrame")||x,M=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function k(t,e,i){if(!i||C!==x)return C.call(window,o(t,e));t.call(e)}function P(t){t&&M.call(window,t)}var I=(Object.freeze||Object)({freeze:e,extend:i,create:n,bind:o,lastId:r,stamp:a,throttle:s,wrapNum:l,falseFn:h,formatNum:u,trim:c,splitWords:p,setOptions:d,getParamString:f,template:m,isArray:g,indexOf:y,emptyImageUrl:v,requestFn:C,cancelFn:M,requestAnimFrame:k,cancelAnimFrame:P});function E(){}E.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=e.__super__=this.prototype,r=n(o);for(var a in r.constructor=e,e.prototype=r,this)this.hasOwnProperty(a)&&"prototype"!==a&&"__super__"!==a&&(e[a]=this[a]);return t.statics&&(i(e,t.statics),delete t.statics),t.includes&&(function(t){if("undefined"!=typeof L&&L&&L.Mixin){t=g(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}(t.includes),i.apply(null,[r].concat(t.includes)),delete t.includes),r.options&&(t.options=i(n(r.options),t.options)),i(r,t),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=r._initHooks.length;t<e;t++)r._initHooks[t].call(this)}},e},E.include=function(t){return i(this.prototype,t),this},E.mergeOptions=function(t){return i(this.prototype.options,t),this},E.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var A={on:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e);else{t=p(t);for(var o=0,r=t.length;o<r;o++)this._on(t[o],e,i)}return this},off:function(t,e,i){if(t)if("object"==typeof t)for(var n in t)this._off(n,t[n],e);else{t=p(t);for(var o=0,r=t.length;o<r;o++)this._off(t[o],e,i)}else delete this._events;return this},_on:function(t,e,i){this._events=this._events||{};var n=this._events[t];n||(n=[],this._events[t]=n),i===this&&(i=void 0);for(var o={fn:e,ctx:i},r=n,a=0,s=r.length;a<s;a++)if(r[a].fn===e&&r[a].ctx===i)return;r.push(o)},_off:function(t,e,i){var n,o,r;if(this._events&&(n=this._events[t]))if(e){if(i===this&&(i=void 0),n)for(o=0,r=n.length;o<r;o++){var a=n[o];if(a.ctx===i&&a.fn===e)return a.fn=h,this._firingCount&&(this._events[t]=n=n.slice()),void n.splice(o,1)}}else{for(o=0,r=n.length;o<r;o++)n[o].fn=h;delete this._events[t]}},fire:function(t,e,n){if(!this.listens(t,n))return this;var o=i({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var r=this._events[t];if(r){this._firingCount=this._firingCount+1||1;for(var a=0,s=r.length;a<s;a++){var l=r[a];l.fn.call(l.ctx||this,o)}this._firingCount--}}return n&&this._propagateEvent(o),this},listens:function(t,e){var i=this._events&&this._events[t];if(i&&i.length)return!0;if(e)for(var n in this._eventParents)if(this._eventParents[n].listens(t,e))return!0;return!1},once:function(t,e,i){if("object"==typeof t){for(var n in t)this.once(n,t[n],e);return this}var r=o(function(){this.off(t,e,i).off(t,r,i)},this);return this.on(t,e,i).on(t,r,i)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[a(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[a(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,i({layer:t.target,propagatedFrom:t.target},t),!0)}};A.addEventListener=A.on,A.removeEventListener=A.clearAllEventListeners=A.off,A.addOneTimeEventListener=A.once,A.fireEvent=A.fire,A.hasEventListeners=A.listens;var T=E.extend(A);function S(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}var z=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function D(t,e,i){return t instanceof S?t:g(t)?new S(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new S(t.x,t.y):new S(t,e,i)}function O(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}function N(t,e){return!t||t instanceof O?t:new O(t,e)}function B(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}function Z(t,e){return t instanceof B?t:new B(t,e)}function j(t,e,i){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==i&&(this.alt=+i)}function R(t,e,i){return t instanceof j?t:g(t)&&"object"!=typeof t[0]?3===t.length?new j(t[0],t[1],t[2]):2===t.length?new j(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new j(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new j(t,e,i)}S.prototype={clone:function(){return new S(this.x,this.y)},add:function(t){return this.clone()._add(D(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(D(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new S(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new S(this.x/t.x,this.y/t.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=z(this.x),this.y=z(this.y),this},distanceTo:function(t){var e=(t=D(t)).x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return(t=D(t)).x===this.x&&t.y===this.y},contains:function(t){return t=D(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+u(this.x)+", "+u(this.y)+")"}},O.prototype={extend:function(t){return t=D(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new S((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new S(this.min.x,this.max.y)},getTopRight:function(){return new S(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return(t="number"==typeof t[0]||t instanceof S?D(t):N(t))instanceof O?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=N(t);var e=this.min,i=this.max,n=t.min,o=t.max,r=o.x>=e.x&&n.x<=i.x,a=o.y>=e.y&&n.y<=i.y;return r&&a},overlaps:function(t){t=N(t);var e=this.min,i=this.max,n=t.min,o=t.max,r=o.x>e.x&&n.x<i.x,a=o.y>e.y&&n.y<i.y;return r&&a},isValid:function(){return!(!this.min||!this.max)}},B.prototype={extend:function(t){var e,i,n=this._southWest,o=this._northEast;if(t instanceof j)e=t,i=t;else{if(!(t instanceof B))return t?this.extend(R(t)||Z(t)):this;if(e=t._southWest,i=t._northEast,!e||!i)return this}return n||o?(n.lat=Math.min(e.lat,n.lat),n.lng=Math.min(e.lng,n.lng),o.lat=Math.max(i.lat,o.lat),o.lng=Math.max(i.lng,o.lng)):(this._southWest=new j(e.lat,e.lng),this._northEast=new j(i.lat,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,o=Math.abs(e.lng-i.lng)*t;return new B(new j(e.lat-n,e.lng-o),new j(i.lat+n,i.lng+o))},getCenter:function(){return new j((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new j(this.getNorth(),this.getWest())},getSouthEast:function(){return new j(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof j||"lat"in t?R(t):Z(t);var e,i,n=this._southWest,o=this._northEast;return t instanceof B?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=o.lat&&e.lng>=n.lng&&i.lng<=o.lng},intersects:function(t){t=Z(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>=e.lat&&n.lat<=i.lat,a=o.lng>=e.lng&&n.lng<=i.lng;return r&&a},overlaps:function(t){t=Z(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>e.lat&&n.lat<i.lat,a=o.lng>e.lng&&n.lng<i.lng;return r&&a},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=Z(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},j.prototype={equals:function(t,e){if(!t)return!1;t=R(t);var i=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return i<=(void 0===e?1e-9:e)},toString:function(t){return"LatLng("+u(this.lat,t)+", "+u(this.lng,t)+")"},distanceTo:function(t){return U.distance(this,R(t))},wrap:function(){return U.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return Z([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},clone:function(){return new j(this.lat,this.lng,this.alt)}};var G,H={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,i=this.scale(t),n=this.transformation.transform(e.min,i),o=this.transformation.transform(e.max,i);return new O(n,o)},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?l(t.lng,this.wrapLng,!0):t.lng,i=this.wrapLat?l(t.lat,this.wrapLat,!0):t.lat,n=t.alt;return new j(i,e,n)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),n=e.lat-i.lat,o=e.lng-i.lng;if(0===n&&0===o)return t;var r=t.getSouthWest(),a=t.getNorthEast(),s=new j(r.lat-n,r.lng-o),l=new j(a.lat-n,a.lng-o);return new B(s,l)}},U=i({},H,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,o=e.lat*i,r=Math.sin((e.lat-t.lat)*i/2),a=Math.sin((e.lng-t.lng)*i/2),s=r*r+Math.cos(n)*Math.cos(o)*a*a,l=2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s));return this.R*l}}),W={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),o=Math.sin(n*e);return new S(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new j((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(G=6378137*Math.PI,new O([-G,-G],[G,G]))};function F(t,e,i,n){if(g(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=i,this._d=n}function V(t,e,i,n){return new F(t,e,i,n)}F.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new S((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var Y=i({},U,{code:"EPSG:3857",projection:W,transformation:function(){var t=.5/(Math.PI*W.R);return V(t,.5,-t,.5)}()}),q=i({},Y,{code:"EPSG:900913"});function X(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function K(t,e){var i,n,o,r,a,s,l="";for(i=0,o=t.length;i<o;i++){for(a=t[i],n=0,r=a.length;n<r;n++)s=a[n],l+=(n?"L":"M")+s.x+" "+s.y;l+=e?Pt?"z":"x":""}return l||"M0 0"}var J=document.documentElement.style,Q="ActiveXObject"in window,$=Q&&!document.addEventListener,tt="msLaunchUri"in navigator&&!("documentMode"in document),et=Et("webkit"),it=Et("android"),nt=Et("android 2")||Et("android 3"),ot=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),rt=it&&Et("Google")&&ot<537&&!("AudioNode"in window),at=!!window.opera,st=Et("chrome"),lt=Et("gecko")&&!et&&!at&&!Q,ht=!st&&Et("safari"),ut=Et("phantom"),ct="OTransition"in J,pt=0===navigator.platform.indexOf("Win"),dt=Q&&"transition"in J,ft="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!nt,_t="MozPerspective"in J,mt=!window.L_DISABLE_3D&&(dt||ft||_t)&&!ct&&!ut,gt="undefined"!=typeof orientation||Et("mobile"),yt=gt&&et,vt=gt&&ft,bt=!window.PointerEvent&&window.MSPointerEvent,Lt=!(!window.PointerEvent&&!bt),wt=!window.L_NO_TOUCH&&(Lt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),xt=gt&&at,Ct=gt&<,Mt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,kt=!!document.createElement("canvas").getContext,Pt=!(!document.createElementNS||!X("svg").createSVGRect),It=!Pt&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}();function Et(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var At=(Object.freeze||Object)({ie:Q,ielt9:$,edge:tt,webkit:et,android:it,android23:nt,androidStock:rt,opera:at,chrome:st,gecko:lt,safari:ht,phantom:ut,opera12:ct,win:pt,ie3d:dt,webkit3d:ft,gecko3d:_t,any3d:mt,mobile:gt,mobileWebkit:yt,mobileWebkit3d:vt,msPointer:bt,pointer:Lt,touch:wt,mobileOpera:xt,mobileGecko:Ct,retina:Mt,canvas:kt,svg:Pt,vml:It}),Tt=bt?"MSPointerDown":"pointerdown",St=bt?"MSPointerMove":"pointermove",zt=bt?"MSPointerUp":"pointerup",Dt=bt?"MSPointerCancel":"pointercancel",Ot=["INPUT","SELECT","OPTION"],Nt={},Bt=!1,Zt=0;function jt(t,e,i,n){return"touchstart"===e?function(t,e,i){var n=o(function(t){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(Ot.indexOf(t.target.tagName)<0))return;Ne(t)}Ut(t,e)});t["_leaflet_touchstart"+i]=n,t.addEventListener(Tt,n,!1),Bt||(document.documentElement.addEventListener(Tt,Rt,!0),document.documentElement.addEventListener(St,Gt,!0),document.documentElement.addEventListener(zt,Ht,!0),document.documentElement.addEventListener(Dt,Ht,!0),Bt=!0)}(t,i,n):"touchmove"===e?function(t,e,i){var n=function(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&Ut(t,e)};t["_leaflet_touchmove"+i]=n,t.addEventListener(St,n,!1)}(t,i,n):"touchend"===e&&function(t,e,i){var n=function(t){Ut(t,e)};t["_leaflet_touchend"+i]=n,t.addEventListener(zt,n,!1),t.addEventListener(Dt,n,!1)}(t,i,n),this}function Rt(t){Nt[t.pointerId]=t,Zt++}function Gt(t){Nt[t.pointerId]&&(Nt[t.pointerId]=t)}function Ht(t){delete Nt[t.pointerId],Zt--}function Ut(t,e){for(var i in t.touches=[],Nt)t.touches.push(Nt[i]);t.changedTouches=[t],e(t)}var Wt=bt?"MSPointerDown":Lt?"pointerdown":"touchstart",Ft=bt?"MSPointerUp":Lt?"pointerup":"touchend",Vt="_leaflet_";function Yt(t,e,i){var n,o,r=!1,a=250;function s(t){var e;if(Lt){if(!tt||"mouse"===t.pointerType)return;e=Zt}else e=t.touches.length;if(!(e>1)){var i=Date.now(),s=i-(n||i);o=t.touches?t.touches[0]:t,r=s>0&&s<=a,n=i}}function l(t){if(r&&!o.cancelBubble){if(Lt){if(!tt||"mouse"===t.pointerType)return;var i,a,s={};for(a in o)i=o[a],s[a]=i&&i.bind?i.bind(o):i;o=s}o.type="dblclick",o.button=0,e(o),n=null}}return t[Vt+Wt+i]=s,t[Vt+Ft+i]=l,t[Vt+"dblclick"+i]=e,t.addEventListener(Wt,s,!1),t.addEventListener(Ft,l,!1),t.addEventListener("dblclick",e,!1),this}function qt(t,e){var i=t[Vt+Wt+e],n=t[Vt+Ft+e],o=t[Vt+"dblclick"+e];return t.removeEventListener(Wt,i,!1),t.removeEventListener(Ft,n,!1),tt||t.removeEventListener("dblclick",o,!1),this}var Xt,Kt,Jt,Qt,$t,te=me(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ee=me(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ie="webkitTransition"===ee||"OTransition"===ee?ee+"End":"transitionend";function ne(t){return"string"==typeof t?document.getElementById(t):t}function oe(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i}function re(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function ae(t){var e=t.parentNode;e&&e.removeChild(t)}function se(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function le(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function he(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ue(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=fe(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function ce(t,e){if(void 0!==t.classList)for(var i=p(e),n=0,o=i.length;n<o;n++)t.classList.add(i[n]);else if(!ue(t,e)){var r=fe(t);de(t,(r?r+" ":"")+e)}}function pe(t,e){void 0!==t.classList?t.classList.remove(e):de(t,c((" "+fe(t)+" ").replace(" "+e+" "," ")))}function de(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function fe(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function _e(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&function(t,e){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(t){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}(t,e)}function me(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function ge(t,e,i){var n=e||new S(0,0);t.style[te]=(dt?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(i?" scale("+i+")":"")}function ye(t,e){t._leaflet_pos=e,mt?ge(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function ve(t){return t._leaflet_pos||new S(0,0)}if("onselectstart"in document)Xt=function(){Ie(window,"selectstart",Ne)},Kt=function(){Ae(window,"selectstart",Ne)};else{var be=me(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Xt=function(){if(be){var t=document.documentElement.style;Jt=t[be],t[be]="none"}},Kt=function(){be&&(document.documentElement.style[be]=Jt,Jt=void 0)}}function Le(){Ie(window,"dragstart",Ne)}function we(){Ae(window,"dragstart",Ne)}function xe(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Ce(),Qt=t,$t=t.style.outline,t.style.outline="none",Ie(window,"keydown",Ce))}function Ce(){Qt&&(Qt.style.outline=$t,Qt=void 0,$t=void 0,Ae(window,"keydown",Ce))}function Me(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function ke(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Pe=(Object.freeze||Object)({TRANSFORM:te,TRANSITION:ee,TRANSITION_END:ie,get:ne,getStyle:oe,create:re,remove:ae,empty:se,toFront:le,toBack:he,hasClass:ue,addClass:ce,removeClass:pe,setClass:de,getClass:fe,setOpacity:_e,testProp:me,setTransform:ge,setPosition:ye,getPosition:ve,disableTextSelection:Xt,enableTextSelection:Kt,disableImageDrag:Le,enableImageDrag:we,preventOutline:xe,restoreOutline:Ce,getSizedParentNode:Me,getScale:ke});function Ie(t,e,i,n){if("object"==typeof e)for(var o in e)Te(t,o,e[o],i);else{e=p(e);for(var r=0,a=e.length;r<a;r++)Te(t,e[r],i,n)}return this}var Ee="_leaflet_events";function Ae(t,e,i,n){if("object"==typeof e)for(var o in e)Se(t,o,e[o],i);else if(e){e=p(e);for(var r=0,a=e.length;r<a;r++)Se(t,e[r],i,n)}else{for(var s in t[Ee])Se(t,s,t[Ee][s]);delete t[Ee]}return this}function Te(t,e,i,n){var o=e+a(i)+(n?"_"+a(n):"");if(t[Ee]&&t[Ee][o])return this;var r=function(e){return i.call(n||t,e||window.event)},s=r;Lt&&0===e.indexOf("touch")?jt(t,e,r,o):!wt||"dblclick"!==e||!Yt||Lt&&st?"addEventListener"in t?"mousewheel"===e?t.addEventListener("onwheel"in t?"wheel":"mousewheel",r,!1):"mouseenter"===e||"mouseleave"===e?(r=function(e){e=e||window.event,Fe(t,e)&&s(e)},t.addEventListener("mouseenter"===e?"mouseover":"mouseout",r,!1)):("click"===e&&it&&(r=function(t){!function(t,e){var i=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,n=Ge&&i-Ge;n&&n>100&&n<500||t.target._simulatedClick&&!t._simulated?Be(t):(Ge=i,e(t))}(t,s)}),t.addEventListener(e,r,!1)):"attachEvent"in t&&t.attachEvent("on"+e,r):Yt(t,r,o),t[Ee]=t[Ee]||{},t[Ee][o]=r}function Se(t,e,i,n){var o=e+a(i)+(n?"_"+a(n):""),r=t[Ee]&&t[Ee][o];if(!r)return this;Lt&&0===e.indexOf("touch")?function(t,e,i){var n=t["_leaflet_"+e+i];"touchstart"===e?t.removeEventListener(Tt,n,!1):"touchmove"===e?t.removeEventListener(St,n,!1):"touchend"===e&&(t.removeEventListener(zt,n,!1),t.removeEventListener(Dt,n,!1))}(t,e,o):!wt||"dblclick"!==e||!qt||Lt&&st?"removeEventListener"in t?"mousewheel"===e?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",r,!1):t.removeEventListener("mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,r,!1):"detachEvent"in t&&t.detachEvent("on"+e,r):qt(t,o),t[Ee][o]=null}function ze(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,We(t),this}function De(t){return Te(t,"mousewheel",ze),this}function Oe(t){return Ie(t,"mousedown touchstart dblclick",ze),Te(t,"click",Ue),this}function Ne(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Be(t){return Ne(t),ze(t),this}function Ze(t,e){if(!e)return new S(t.clientX,t.clientY);var i=ke(e),n=i.boundingClientRect;return new S((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}var je=pt&&st?2*window.devicePixelRatio:lt?window.devicePixelRatio:1;function Re(t){return tt?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/je:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}var Ge,He={};function Ue(t){He[t.type]=!0}function We(t){var e=He[t.type];return He[t.type]=!1,e}function Fe(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(t){return!1}return i!==t}var Ve=(Object.freeze||Object)({on:Ie,off:Ae,stopPropagation:ze,disableScrollPropagation:De,disableClickPropagation:Oe,preventDefault:Ne,stop:Be,getMousePosition:Ze,getWheelDelta:Re,fakeStop:Ue,skipped:We,isExternalTarget:Fe,addListener:Ie,removeListener:Ae}),Ye=T.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=ve(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=k(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),ye(this._el,i),this.fire("step")},_complete:function(){P(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),qe=T.extend({options:{crs:Y,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=d(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=o(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(R(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ee&&mt&&!xt&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Ie(this._proxy,ie,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,n){if(e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(R(t),e,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n){void 0!==n.animate&&(n.zoom=i({animate:n.animate},n.zoom),n.pan=i({animate:n.animate,duration:n.duration},n.pan));var o=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan);if(o)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(mt?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(mt?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),o=this.getSize().divideBy(2),r=t instanceof S?t:this.latLngToContainerPoint(t),a=r.subtract(o).multiplyBy(1-1/n),s=this.containerPointToLatLng(o.add(a));return this.setView(s,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():Z(t);var i=D(e.paddingTopLeft||e.padding||[0,0]),n=D(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,i.add(n));if((o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};var r=n.subtract(i).divideBy(2),a=this.project(t.getSouthWest(),o),s=this.project(t.getNorthEast(),o),l=this.unproject(a.add(s).divideBy(2).add(r),o);return{center:l,zoom:o}},fitBounds:function(t,e){if(!(t=Z(t)).isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(t=D(t).round(),e=e||{},!t.x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Ye,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){ce(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,i){if(!1===(i=i||{}).animate||!mt)return this.setView(t,e,i);this._stop();var n=this.project(this.getCenter()),o=this.project(t),r=this.getSize(),a=this._zoom;t=R(t),e=void 0===e?a:e;var s=Math.max(r.x,r.y),l=s*this.getZoomScale(a,e),h=o.distanceTo(n)||1,u=1.42,c=u*u;function p(t){var e=t?-1:1,i=t?l:s,n=l*l-s*s+e*c*c*h*h,o=2*i*c*h,r=n/o,a=Math.sqrt(r*r+1)-r,u=a<1e-9?-18:Math.log(a);return u}function d(t){return(Math.exp(t)-Math.exp(-t))/2}function f(t){return(Math.exp(t)+Math.exp(-t))/2}var _=p(0);function m(t){return s*(f(_)*(d(e=_+u*t)/f(e))-d(_))/c;var e}var g=Date.now(),y=(p(1)-_)/u,v=i.duration?1e3*i.duration:1e3*y*.8;return this._moveStart(!0,i.noMoveStart),function i(){var r=(Date.now()-g)/v,l=function(t){return 1-Math.pow(1-t,1.5)}(r)*y;r<=1?(this._flyToFrame=k(i,this),this._move(this.unproject(n.add(o.subtract(n).multiplyBy(m(l)/h)),a),this.getScaleZoom(s/function(t){return s*(f(_)/f(_+u*t))}(l),a),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,e){var i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)},setMaxBounds:function(t){return(t=Z(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,Z(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=D((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=D(e.paddingBottomRight||e.padding||[0,0]),o=this.getCenter(),r=this.project(o),a=this.project(t),s=this.getPixelBounds(),l=s.getSize().divideBy(2),h=N([s.min.add(i),s.max.subtract(n)]);if(!h.contains(a)){this._enforcingBounds=!0;var u=r.subtract(a),c=D(a.x+u.x,a.y+u.y);(a.x<h.min.x||a.x>h.max.x)&&(c.x=r.x-u.x,u.x>0?c.x+=l.x-i.x:c.x-=l.x-n.x),(a.y<h.min.y||a.y>h.max.y)&&(c.y=r.y-u.y,u.y>0?c.y+=l.y-i.y:c.y-=l.y-n.y),this.panTo(this.unproject(c),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=i({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var n=this.getSize(),r=e.divideBy(2).round(),a=n.divideBy(2).round(),s=r.subtract(a);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:n})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o(this._handleGeolocationResponse,this),n=o(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,n,t):navigator.geolocation.getCurrentPosition(e,n,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(t){var e=t.coords.latitude,i=t.coords.longitude,n=new j(e,i),o=n.toBounds(2*t.coords.accuracy),r=this._locateOptions;if(r.setView){var a=this.getBoundsZoom(o);this.setView(n,r.maxZoom?Math.min(a,r.maxZoom):a)}var s={latlng:n,bounds:o,timestamp:t.timestamp};for(var l in t.coords)"number"==typeof t.coords[l]&&(s[l]=t.coords[l]);this.fire("locationfound",s)},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ae(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(P(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ae(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),n=re("div",i,e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new B(e,i)},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=Z(t),i=D(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),r=this.getMaxZoom(),a=t.getNorthWest(),s=t.getSouthEast(),l=this.getSize().subtract(i),h=N(this.project(s,n),this.project(a,n)).getSize(),u=mt?this.options.zoomSnap:1,c=l.x/h.x,p=l.y/h.y,d=e?Math.max(c,p):Math.min(c,p);return n=this.getScaleZoom(d,n),u&&(n=Math.round(n/(u/100))*(u/100),n=e?Math.ceil(n/u)*u:Math.floor(n/u)*u),Math.max(o,Math.min(r,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new S(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new O(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(R(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(D(t),e)},layerPointToLatLng:function(t){var e=D(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(R(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(R(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(Z(t))},distance:function(t,e){return this.options.crs.distance(R(t),R(e))},containerPointToLayerPoint:function(t){return D(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return D(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(D(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(R(t)))},mouseEventToContainerPoint:function(t){return Ze(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=ne(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Ie(e,"scroll",this._onScroll,this),this._containerId=a(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&mt,ce(t,"leaflet-container"+(wt?" leaflet-touch":"")+(Mt?" leaflet-retina":"")+($?" leaflet-oldie":"")+(ht?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=oe(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ye(this._mapPane,new S(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ce(t.markerPane,"leaflet-zoom-hide"),ce(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){ye(this._mapPane,new S(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var n=this._zoom!==e;this._moveStart(n,!1)._move(t,e)._moveEnd(n),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i){void 0===e&&(e=this._zoom);var n=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(n||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return P(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){ye(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[a(this._container)]=this;var e=t?Ae:Ie;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),mt&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){P(this._resizeRequest),this._resizeRequest=k(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],o="mouseout"===e||"mouseover"===e,r=t.target||t.srcElement,s=!1;r;){if((i=this._targets[a(r)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(i)){s=!0;break}if(i&&i.listens(e,!0)){if(o&&!Fe(r,t))break;if(n.push(i),o)break}if(r===this._container)break;r=r.parentNode}return n.length||s||o||!Fe(r,t)||(n=[this]),n},_handleDOMEvent:function(t){if(this._loaded&&!We(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e&&"keyup"!==e&&"keydown"!==e||xe(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,n){if("click"===t.type){var o=i({},t);o.type="preclick",this._fireDOMEvent(o,o.type,n)}if(!t._stopped&&(n=(n||[]).concat(this._findEventTargets(t,e))).length){var r=n[0];"contextmenu"===e&&r.listens(e,!0)&&Ne(t);var a={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var s=r.getLatLng&&(!r._radius||r._radius<=10);a.containerPoint=s?this.latLngToContainerPoint(r.getLatLng()):this.mouseEventToContainerPoint(t),a.layerPoint=this.containerPointToLayerPoint(a.containerPoint),a.latlng=s?r.getLatLng():this.layerPointToLatLng(a.layerPoint)}for(var l=0;l<n.length;l++)if(n[l].fire(e,a,!0),a.originalEvent._stopped||!1===n[l].options.bubblingMouseEvents&&-1!==y(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return ve(this._mapPane)||new S(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){var i=t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin();return i.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return N([this.project(t.getSouthWest(),e)._subtract(n),this.project(t.getNorthWest(),e)._subtract(n),this.project(t.getSouthEast(),e)._subtract(n),this.project(t.getNorthEast(),e)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),o=this.getSize().divideBy(2),r=new O(n.subtract(o),n.add(o)),a=this._getBoundsOffset(r,i,e);return a.round().equals([0,0])?t:this.unproject(n.add(a),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new O(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=N(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),o=n.min.subtract(t.min),r=n.max.subtract(t.max),a=this._rebound(o.x,-r.x),s=this._rebound(o.y,-r.y);return new S(a,s)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=mt?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){pe(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(i)||(this.panBy(i,e),0))},_createAnimProxy:function(){var t=this._proxy=re("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=te,i=this._proxy.style[e];ge(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),i===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",function(){var t=this.getCenter(),e=this.getZoom();ge(this._proxy,this.project(t,e),this.getZoomScale(e,1))},this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ae(this._proxy),delete this._proxy},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==i.animate&&!this.getSize().contains(o)||(k(function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)},this),0))},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,ce(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&pe(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),k(function(){this._moveEnd(!0)},this))}}),Xe=E.extend({options:{position:"topright"},initialize:function(t){d(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return ce(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ae(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),Ke=function(t){return new Xe(t)};qe.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=re("div",e+"control-container",this._container);function n(n,o){var r=e+n+" "+e+o;t[n+o]=re("div",r,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ae(this._controlCorners[t]);ae(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Je=Xe.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i<n?-1:n<i?1:0}},initialize:function(t,e,i){for(var n in d(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return Xe.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(a(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){ce(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(ce(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):pe(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return pe(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=re("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Oe(e),De(e);var n=this._section=re("section",t+"-list");i&&(this._map.on("click",this.collapse,this),it||Ie(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var o=this._layersLink=re("a",t+"-toggle",e);o.href="#",o.title="Layers",wt?(Ie(o,"click",Be),Ie(o,"click",this.expand,this)):Ie(o,"focus",this.expand,this),i||this.expand(),this._baseLayersList=re("div",t+"-base",n),this._separator=re("div",t+"-separator",n),this._overlaysList=re("div",t+"-overlays",n),e.appendChild(n)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&a(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,i){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:i}),this.options.sortLayers&&this._layers.sort(o(function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;se(this._baseLayersList),se(this._overlaysList),this._layerControlInputs=[];var t,e,i,n,o=0;for(i=0;i<this._layers.length;i++)n=this._layers[i],this._addItem(n),e=e||n.overlay,t=t||!n.overlay,o+=n.overlay?0:1;return this.options.hideSingleBase&&(t=t&&o>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(a(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+a(this),n),this._layerControlInputs.push(e),e.layerId=a(t.layer),Ie(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var r=document.createElement("div");i.appendChild(r),r.appendChild(e),r.appendChild(o);var s=t.overlay?this._overlaysList:this._baseLayersList;return s.appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){var t,e,i=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var r=i.length-1;r>=0;r--)t=i[r],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||o.push(e);for(r=0;r<o.length;r++)this._map.hasLayer(o[r])&&this._map.removeLayer(o[r]);for(r=0;r<n.length;r++)this._map.hasLayer(n[r])||this._map.addLayer(n[r]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,i=this._layerControlInputs,n=this._map.getZoom(),o=i.length-1;o>=0;o--)t=i[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&n<e.options.minZoom||void 0!==e.options.maxZoom&&n>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),Qe=Xe.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=re("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,o){var r=re("a",i,n);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),Oe(r),Ie(r,"click",Be),Ie(r,"click",o,this),Ie(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";pe(this._zoomInButton,e),pe(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&ce(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&ce(this._zoomInButton,e)}});qe.mergeOptions({zoomControl:!0}),qe.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Qe,this.addControl(this.zoomControl))});var $e=Xe.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e=re("div","leaflet-control-scale"),i=this.options;return this._addScales(i,"leaflet-control-scale-line",e),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=re("div",e,i)),t.imperial&&(this._iScale=re("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e,i,n,o=3.2808399*t;o>5280?(e=o/5280,i=this._getRoundNum(e),this._updateScale(this._iScale,i+" mi",i/e)):(n=this._getRoundNum(o),this._updateScale(this._iScale,n+" ft",n/o))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return e*(i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1)}}),ti=Xe.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){d(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=re("div","leaflet-control-attribution"),Oe(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}}});qe.mergeOptions({attributionControl:!0}),qe.addInitHook(function(){this.options.attributionControl&&(new ti).addTo(this)}),Xe.Layers=Je,Xe.Zoom=Qe,Xe.Scale=$e,Xe.Attribution=ti,Ke.layers=function(t,e,i){return new Je(t,e,i)},Ke.zoom=function(t){return new Qe(t)},Ke.scale=function(t){return new $e(t)},Ke.attribution=function(t){return new ti(t)};var ei=E.extend({initialize:function(t){this._map=t},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}});ei.addTo=function(t,e){return t.addHandler(e,this),this};var ii,ni={Events:A},oi=wt?"touchstart mousedown":"mousedown",ri={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},ai={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},si=T.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){d(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(Ie(this._dragStartTarget,oi,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(si._dragging===this&&this.finishDrag(),Ae(this._dragStartTarget,oi,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!ue(this._element,"leaflet-zoom-anim")&&!(si._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(si._dragging=this,this._preventOutline&&xe(this._element),Le(),Xt(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t,i=Me(this._element);this._startPoint=new S(e.clientX,e.clientY),this._parentScale=ke(i),Ie(document,ai[t.type],this._onMove,this),Ie(document,ri[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,i=new S(e.clientX,e.clientY)._subtract(this._startPoint);(i.x||i.y)&&(Math.abs(i.x)+Math.abs(i.y)<this.options.clickTolerance||(i.x/=this._parentScale.x,i.y/=this._parentScale.y,Ne(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=ve(this._element).subtract(i),ce(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ce(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(i),this._moving=!0,P(this._animRequest),this._lastEvent=t,this._animRequest=k(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),ye(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in pe(document.body,"leaflet-dragging"),this._lastTarget&&(pe(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),ai)Ae(document,ai[t],this._onMove,this),Ae(document,ri[t],this._onUp,this);we(),Kt(),this._moved&&this._moving&&(P(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,si._dragging=!1}});function li(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=function(t,e){var i=t.length,n=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(i);n[0]=n[i-1]=1,function t(e,i,n,o,r){var a,s,l,h=0;for(s=o+1;s<=r-1;s++)(l=di(e[s],e[o],e[r],!0))>h&&(a=s,h=l);h>n&&(i[a]=1,t(e,i,n,o,a),t(e,i,n,a,r))}(t,n,e,0,i-1);var o,r=[];for(o=0;o<i;o++)n[o]&&r.push(t[o]);return r}(t=function(t,e){for(var i=[t[0]],n=1,o=0,r=t.length;n<r;n++)a=t[n],s=t[o],l=void 0,h=void 0,l=s.x-a.x,h=s.y-a.y,l*l+h*h>e&&(i.push(t[n]),o=n);var a,s,l,h;return o<r-1&&i.push(t[r-1]),i}(t,i),i)}function hi(t,e,i){return Math.sqrt(di(t,e,i,!0))}function ui(t,e,i,n,o){var r,a,s,l=n?ii:pi(t,i),h=pi(e,i);for(ii=h;;){if(!(l|h))return[t,e];if(l&h)return!1;a=ci(t,e,r=l||h,i,o),s=pi(a,i),r===l?(t=a,l=s):(e=a,h=s)}}function ci(t,e,i,n,o){var r,a,s=e.x-t.x,l=e.y-t.y,h=n.min,u=n.max;return 8&i?(r=t.x+s*(u.y-t.y)/l,a=u.y):4&i?(r=t.x+s*(h.y-t.y)/l,a=h.y):2&i?(r=u.x,a=t.y+l*(u.x-t.x)/s):1&i&&(r=h.x,a=t.y+l*(h.x-t.x)/s),new S(r,a,o)}function pi(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i}function di(t,e,i,n){var o,r=e.x,a=e.y,s=i.x-r,l=i.y-a,h=s*s+l*l;return h>0&&((o=((t.x-r)*s+(t.y-a)*l)/h)>1?(r=i.x,a=i.y):o>0&&(r+=s*o,a+=l*o)),s=t.x-r,l=t.y-a,n?s*s+l*l:new S(r,a)}function fi(t){return!g(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function _i(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),fi(t)}var mi=(Object.freeze||Object)({simplify:li,pointToSegmentDistance:hi,closestPointOnSegment:function(t,e,i){return di(t,e,i)},clipSegment:ui,_getEdgeIntersection:ci,_getBitCode:pi,_sqClosestPointOnSegment:di,isFlat:fi,_flat:_i});function gi(t,e,i){var n,o,r,a,s,l,h,u,c,p=[1,4,2,8];for(o=0,h=t.length;o<h;o++)t[o]._code=pi(t[o],e);for(a=0;a<4;a++){for(u=p[a],n=[],o=0,h=t.length,r=h-1;o<h;r=o++)s=t[o],l=t[r],s._code&u?l._code&u||((c=ci(l,s,u,e,i))._code=pi(c,e),n.push(c)):(l._code&u&&((c=ci(l,s,u,e,i))._code=pi(c,e),n.push(c)),n.push(s));t=n}return t}var yi=(Object.freeze||Object)({clipPolygon:gi}),vi={project:function(t){return new S(t.lng,t.lat)},unproject:function(t){return new j(t.y,t.x)},bounds:new O([-180,-90],[180,90])},bi={R:6378137,R_MINOR:6356752.314245179,bounds:new O([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,o=this.R_MINOR/i,r=Math.sqrt(1-o*o),a=r*Math.sin(n),s=Math.tan(Math.PI/4-n/2)/Math.pow((1-a)/(1+a),r/2);return n=-i*Math.log(Math.max(s,1e-10)),new S(t.lng*e*i,n)},unproject:function(t){for(var e,i=180/Math.PI,n=this.R,o=this.R_MINOR/n,r=Math.sqrt(1-o*o),a=Math.exp(-t.y/n),s=Math.PI/2-2*Math.atan(a),l=0,h=.1;l<15&&Math.abs(h)>1e-7;l++)e=r*Math.sin(s),e=Math.pow((1-e)/(1+e),r/2),h=Math.PI/2-2*Math.atan(a*e)-s,s+=h;return new j(s*i,t.x*i/n)}},Li=(Object.freeze||Object)({LonLat:vi,Mercator:bi,SphericalMercator:W}),wi=i({},U,{code:"EPSG:3395",projection:bi,transformation:function(){var t=.5/(Math.PI*bi.R);return V(t,.5,-t,.5)}()}),xi=i({},U,{code:"EPSG:4326",projection:vi,transformation:V(1/180,1,-1/180,.5)}),Ci=i({},H,{projection:vi,transformation:V(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});H.Earth=U,H.EPSG3395=wi,H.EPSG3857=Y,H.EPSG900913=q,H.EPSG4326=xi,H.Simple=Ci;var Mi=T.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[a(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[a(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});qe.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=a(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=a(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&a(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){t=t?g(t)?t:[t]:[];for(var e=0,i=t.length;e<i;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[a(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=a(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,i=this._getZoomSpan();for(var n in this._zoomBoundLayers){var o=this._zoomBoundLayers[n].options;t=void 0===o.minZoom?t:Math.min(t,o.minZoom),e=void 0===o.maxZoom?e:Math.max(e,o.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,i!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var ki=Mi.extend({initialize:function(t,e){var i,n;if(d(this,e),this._layers={},t)for(i=0,n=t.length;i<n;i++)this.addLayer(t[i])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&(t in this._layers||this.getLayerId(t)in this._layers)},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)(i=this._layers[e])[t]&&i[t].apply(i,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return a(t)}}),Pi=ki.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),ki.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),ki.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new B;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),Ii=E.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){d(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(n,t),n},_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"];"number"==typeof n&&(n=[n,n]);var o=D(n),r=D("shadow"===e&&i.shadowAnchor||i.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),r&&(t.style.marginLeft=-r.x+"px",t.style.marginTop=-r.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Mt&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),Ei=Ii.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return Ei.imagePath||(Ei.imagePath=this._detectIconPath()),(this.options.imagePath||Ei.imagePath)+Ii.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=re("div","leaflet-default-icon-path",document.body),e=oe(t,"background-image")||oe(t,"backgroundImage");return document.body.removeChild(t),e=null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Ai=ei.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new si(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ce(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&pe(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,n=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,r=ve(e._icon),a=i.getPixelBounds(),s=i.getPixelOrigin(),l=N(a.min._subtract(s).add(o),a.max._subtract(s).subtract(o));if(!l.contains(r)){var h=D((Math.max(l.max.x,r.x)-l.max.x)/(a.max.x-l.max.x)-(Math.min(l.min.x,r.x)-l.min.x)/(a.min.x-l.min.x),(Math.max(l.max.y,r.y)-l.max.y)/(a.max.y-l.max.y)-(Math.min(l.min.y,r.y)-l.min.y)/(a.min.y-l.min.y)).multiplyBy(n);i.panBy(h,{animate:!1}),this._draggable._newPos._add(h),this._draggable._startPos._add(h),ye(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=k(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup().fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(P(this._panRequest),this._panRequest=k(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,n=ve(e._icon),o=e._map.layerPointToLatLng(n);i&&ye(i,n),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){P(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Ti=Mi.extend({options:{icon:new Ei,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){d(this,e),this._latlng=R(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=R(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),n=!1;i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),"IMG"===i.tagName&&(i.alt=t.alt||"")),ce(i,e),t.keyboard&&(i.tabIndex="0"),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var o=t.icon.createShadow(this._shadow),r=!1;o!==this._shadow&&(this._removeShadow(),r=!0),o&&(ce(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&r&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),ae(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ae(this._shadow),this._shadow=null},_setPos:function(t){ye(this._icon,t),this._shadow&&ye(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(ce(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Ai)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Ai(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&_e(this._icon,t),this._shadow&&_e(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),Si=Mi.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return d(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t.hasOwnProperty("weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),zi=Si.extend({options:{fill:!0,radius:10},initialize:function(t,e){d(this,e),this._latlng=R(t),this._radius=this.options.radius},setLatLng:function(t){return this._latlng=R(t),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return Si.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,i=this._clickTolerance(),n=[t+i,e+i];this._pxBounds=new O(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),Di=zi.extend({initialize:function(t,e,n){if("number"==typeof e&&(e=i({},n,{radius:e})),d(this,e),this._latlng=R(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new B(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Si.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,n=i.options.crs;if(n.distance===U.distance){var o=Math.PI/180,r=this._mRadius/U.R/o,a=i.project([e+r,t]),s=i.project([e-r,t]),l=a.add(s).divideBy(2),h=i.unproject(l).lat,u=Math.acos((Math.cos(r*o)-Math.sin(e*o)*Math.sin(h*o))/(Math.cos(e*o)*Math.cos(h*o)))/o;(isNaN(u)||0===u)&&(u=r/Math.cos(Math.PI/180*e)),this._point=l.subtract(i.getPixelOrigin()),this._radius=isNaN(u)?0:l.x-i.project([h,t-u]).x,this._radiusY=l.y-a.y}else{var c=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(c).x}this._updateBounds()}}),Oi=Si.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){d(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,i,n=1/0,o=null,r=di,a=0,s=this._parts.length;a<s;a++)for(var l=this._parts[a],h=1,u=l.length;h<u;h++){e=l[h-1],i=l[h];var c=r(t,e,i,!0);c<n&&(n=c,o=r(t,e,i))}return o&&(o.distance=Math.sqrt(n)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,o,r,a,s=this._rings[0],l=s.length;if(!l)return null;for(t=0,e=0;t<l-1;t++)e+=s[t].distanceTo(s[t+1])/2;if(0===e)return this._map.layerPointToLatLng(s[0]);for(t=0,n=0;t<l-1;t++)if(o=s[t],r=s[t+1],i=o.distanceTo(r),(n+=i)>e)return a=(n-e)/i,this._map.layerPointToLatLng([r.x-a*(r.x-o.x),r.y-a*(r.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=R(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new B,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return fi(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=fi(t),n=0,o=t.length;n<o;n++)i?(e[n]=R(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new O;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new S(t,t);this._pxBounds=new O([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)])},_projectLatlngs:function(t,e,i){var n,o,r=t[0]instanceof j,a=t.length;if(r){for(o=[],n=0;n<a;n++)o[n]=this._map.latLngToLayerPoint(t[n]),i.extend(o[n]);e.push(o)}else for(n=0;n<a;n++)this._projectLatlngs(t[n],e,i)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,i,n,o,r,a,s,l=this._parts;for(e=0,n=0,o=this._rings.length;e<o;e++)for(s=this._rings[e],i=0,r=s.length;i<r-1;i++)(a=ui(s[i],s[i+1],t,i,!0))&&(l[n]=l[n]||[],l[n].push(a[0]),a[1]===s[i+1]&&i!==r-2||(l[n].push(a[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;i<n;i++)t[i]=li(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var i,n,o,r,a,s,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,r=this._parts.length;i<r;i++)for(s=this._parts[i],n=0,a=s.length,o=a-1;n<a;o=n++)if((e||0!==n)&&hi(t,s[o],s[n])<=l)return!0;return!1}});Oi._flat=_i;var Ni=Oi.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,o,r,a,s,l,h=this._rings[0],u=h.length;if(!u)return null;for(r=a=s=0,t=0,e=u-1;t<u;e=t++)i=h[t],n=h[e],o=i.y*n.x-n.y*i.x,a+=(i.x+n.x)*o,s+=(i.y+n.y)*o,r+=3*o;return l=0===r?h[0]:[a/r,s/r],this._map.layerPointToLatLng(l)},_convertLatLngs:function(t){var e=Oi.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof j&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){Oi.prototype._setLatLngs.call(this,t),fi(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return fi(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new S(e,e);if(t=new O(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,o=0,r=this._rings.length;o<r;o++)(n=gi(this._rings[o],t,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,i,n,o,r,a,s,l,h=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,s=this._parts.length;o<s;o++)for(e=this._parts[o],r=0,l=e.length,a=l-1;r<l;a=r++)i=e[r],n=e[a],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(h=!h);return h||Oi.prototype._containsPoint.call(this,t,!0)}}),Bi=Pi.extend({initialize:function(t,e){d(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,o=g(t)?t:t.features;if(o){for(e=0,i=o.length;e<i;e++)((n=o[e]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var r=this.options;if(r.filter&&!r.filter(t))return this;var a=Zi(t,r);return a?(a.feature=Wi(t),a.defaultOptions=a.options,this.resetStyle(a),r.onEachFeature&&r.onEachFeature(t,a),this.addLayer(a)):this},resetStyle:function(t){return t.options=i({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this},setStyle:function(t){return this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function Zi(t,e){var i,n,o,r,a="Feature"===t.type?t.geometry:t,s=a?a.coordinates:null,l=[],h=e&&e.pointToLayer,u=e&&e.coordsToLatLng||ji;if(!s&&!a)return null;switch(a.type){case"Point":return i=u(s),h?h(t,i):new Ti(i);case"MultiPoint":for(o=0,r=s.length;o<r;o++)i=u(s[o]),l.push(h?h(t,i):new Ti(i));return new Pi(l);case"LineString":case"MultiLineString":return n=Ri(s,"LineString"===a.type?0:1,u),new Oi(n,e);case"Polygon":case"MultiPolygon":return n=Ri(s,"Polygon"===a.type?1:2,u),new Ni(n,e);case"GeometryCollection":for(o=0,r=a.geometries.length;o<r;o++){var c=Zi({geometry:a.geometries[o],type:"Feature",properties:t.properties},e);c&&l.push(c)}return new Pi(l);default:throw new Error("Invalid GeoJSON object.")}}function ji(t){return new j(t[1],t[0],t[2])}function Ri(t,e,i){for(var n,o=[],r=0,a=t.length;r<a;r++)n=e?Ri(t[r],e-1,i):(i||ji)(t[r]),o.push(n);return o}function Gi(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[u(t.lng,e),u(t.lat,e),u(t.alt,e)]:[u(t.lng,e),u(t.lat,e)]}function Hi(t,e,i,n){for(var o=[],r=0,a=t.length;r<a;r++)o.push(e?Hi(t[r],e-1,i,n):Gi(t[r],n));return!e&&i&&o.push(o[0]),o}function Ui(t,e){return t.feature?i({},t.feature,{geometry:e}):Wi(e)}function Wi(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var Fi={toGeoJSON:function(t){return Ui(this,{type:"Point",coordinates:Gi(this.getLatLng(),t)})}};function Vi(t,e){return new Bi(t,e)}Ti.include(Fi),Di.include(Fi),zi.include(Fi),Oi.include({toGeoJSON:function(t){var e=!fi(this._latlngs),i=Hi(this._latlngs,e?1:0,!1,t);return Ui(this,{type:(e?"Multi":"")+"LineString",coordinates:i})}}),Ni.include({toGeoJSON:function(t){var e=!fi(this._latlngs),i=e&&!fi(this._latlngs[0]),n=Hi(this._latlngs,i?2:e?1:0,!0,t);return e||(n=[n]),Ui(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),ki.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),Ui(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var i="GeometryCollection"===e,n=[];return this.eachLayer(function(e){if(e.toGeoJSON){var o=e.toGeoJSON(t);if(i)n.push(o.geometry);else{var r=Wi(o);"FeatureCollection"===r.type?n.push.apply(n,r.features):n.push(r)}}}),i?Ui(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var Yi=Vi,qi=Mi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=Z(e),d(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ce(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ae(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&le(this._image),this},bringToBack:function(){return this._map&&he(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=Z(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:re("img");ce(e,"leaflet-image-layer"),this._zoomAnimated&&ce(e,"leaflet-zoom-animated"),this.options.className&&ce(e,this.options.className),e.onselectstart=h,e.onmousemove=h,e.onload=o(this.fire,this,"load"),e.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;ge(this._image,i,e)},_reset:function(){var t=this._image,e=new O(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();ye(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){_e(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}}),Xi=qi.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:re("video");if(ce(e,"leaflet-image-layer"),this._zoomAnimated&&ce(e,"leaflet-zoom-animated"),e.onselectstart=h,e.onmousemove=h,e.onloadeddata=o(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],r=0;r<i.length;r++)n.push(i[r].src);this._url=i.length>0?n:[e.src]}else{g(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&e.style.hasOwnProperty("objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop;for(var a=0;a<this._url.length;a++){var s=re("source");s.src=this._url[a],e.appendChild(s)}}}}),Ki=qi.extend({_initImage:function(){var t=this._image=this._url;ce(t,"leaflet-image-layer"),this._zoomAnimated&&ce(t,"leaflet-zoom-animated"),t.onselectstart=h,t.onmousemove=h}}),Ji=Mi.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){d(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&_e(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&_e(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(_e(this._container,0),this._removeTimeout=setTimeout(o(ae,void 0,this._container),200)):ae(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=R(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&le(this._container),this},bringToBack:function(){return this._map&&he(this._container),this},_prepareOpen:function(t,e,i){if(e instanceof Mi||(i=e,e=t),e instanceof Pi)for(var n in t._layers){e=t._layers[n];break}if(!i)if(e.getCenter)i=e.getCenter();else{if(!e.getLatLng)throw new Error("Unable to get source layer LatLng.");i=e.getLatLng()}return this._source=e,this.update(),i},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=D(this.options.offset),i=this._getAnchor();this._zoomAnimated?ye(this._container,t.add(i)):e=e.add(t).add(i);var n=this._containerBottom=-e.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=n+"px",this._container.style.left=o+"px"}},_getAnchor:function(){return[0,0]}}),Qi=Ji.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){Ji.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Si||this._source.on("preclick",ze))},onRemove:function(t){Ji.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Si||this._source.off("preclick",ze))},getEvents:function(){var t=Ji.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=re("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=re("div",t+"-content-wrapper",e);if(this._contentNode=re("div",t+"-content",i),Oe(i),De(this._contentNode),Ie(i,"contextmenu",ze),this._tipContainer=re("div",t+"-tip-container",e),this._tip=re("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=re("a",t+"-close-button",e);n.href="#close",n.innerHTML="×",Ie(n,"click",this._onCloseButtonClick,this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,o=this.options.maxHeight;o&&n>o?(e.height=o+"px",ce(t,"leaflet-popup-scrolled")):pe(t,"leaflet-popup-scrolled"),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();ye(this._container,e.add(i))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(oe(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,o=new S(this._containerLeft,-i-this._containerBottom);o._add(ve(this._container));var r=t.layerPointToContainerPoint(o),a=D(this.options.autoPanPadding),s=D(this.options.autoPanPaddingTopLeft||a),l=D(this.options.autoPanPaddingBottomRight||a),h=t.getSize(),u=0,c=0;r.x+n+l.x>h.x&&(u=r.x+n-h.x+l.x),r.x-u-s.x<0&&(u=r.x-s.x),r.y+i+l.y>h.y&&(c=r.y+i-h.y+l.y),r.y-c-s.y<0&&(c=r.y-s.y),(u||c)&&t.fire("autopanstart").panBy([u,c])}},_onCloseButtonClick:function(t){this._close(),Be(t)},_getAnchor:function(){return D(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});qe.mergeOptions({closePopupOnClick:!0}),qe.include({openPopup:function(t,e,i){return t instanceof Qi||(t=new Qi(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Mi.include({bindPopup:function(t,e){return t instanceof Qi?(d(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new Qi(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&(Be(t),e instanceof Si?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var $i=Ji.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){Ji.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){Ji.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=Ji.prototype.getEvents.call(this);return wt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=re("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e=this._map,i=this._container,n=e.latLngToContainerPoint(e.getCenter()),o=e.layerPointToContainerPoint(t),r=this.options.direction,a=i.offsetWidth,s=i.offsetHeight,l=D(this.options.offset),h=this._getAnchor();"top"===r?t=t.add(D(-a/2+l.x,-s+l.y+h.y,!0)):"bottom"===r?t=t.subtract(D(a/2-l.x,-l.y,!0)):"center"===r?t=t.subtract(D(a/2+l.x,s/2-h.y+l.y,!0)):"right"===r||"auto"===r&&o.x<n.x?(r="right",t=t.add(D(l.x+h.x,h.y-s/2+l.y,!0))):(r="left",t=t.subtract(D(a+h.x-l.x,s/2-h.y-l.y,!0))),pe(i,"leaflet-tooltip-right"),pe(i,"leaflet-tooltip-left"),pe(i,"leaflet-tooltip-top"),pe(i,"leaflet-tooltip-bottom"),ce(i,"leaflet-tooltip-"+r),ye(i,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&_e(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return D(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});qe.include({openTooltip:function(t,e,i){return t instanceof $i||(t=new $i(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),Mi.include({bindTooltip:function(t,e){return t instanceof $i?(d(t,e),this._tooltip=t,t._source=this):(this._tooltip&&!e||(this._tooltip=new $i(e,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",i={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?i.add=this._openTooltip:(i.mouseover=this._openTooltip,i.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),wt&&(i.click=this._openTooltip)),this[e](i),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){return this._tooltip&&this._map&&(e=this._tooltip._prepareOpen(this,t,e),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(ce(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(pe(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var e=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(e,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,i,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),i=this._map.containerPointToLayerPoint(e),n=this._map.layerPointToLatLng(i)),this._tooltip.setLatLng(n)}});var tn=Ii.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),i=this.options;if(i.html instanceof Element?(se(e),e.appendChild(i.html)):e.innerHTML=!1!==i.html?i.html:"",i.bgPos){var n=D(i.bgPos);e.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});Ii.Default=Ei;var en=Mi.extend({options:{tileSize:256,opacity:1,updateWhenIdle:gt,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){d(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),ae(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(le(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(he(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=s(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof S?t:new S(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,i=this.getPane().children,n=-t(-1/0,1/0),o=0,r=i.length;o<r;o++)e=i[o].style.zIndex,i[o]!==this._container&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!$){_e(this._container,this.options.opacity);var t=+new Date,e=!1,i=!1;for(var n in this._tiles){var o=this._tiles[n];if(o.current&&o.loaded){var r=Math.min(1,(t-o.loaded)/200);_e(o.el,r),r<1?e=!0:(o.active?i=!0:this._onOpaqueTile(o),o.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),e&&(P(this._fadeFrame),this._fadeFrame=k(this._updateOpacity,this))}},_onOpaqueTile:h,_initContainer:function(){this._container||(this._container=re("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var i in this._levels)this._levels[i].el.children.length||i===t?(this._levels[i].el.style.zIndex=e-Math.abs(t-i),this._onUpdateLevel(i)):(ae(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var n=this._levels[t],o=this._map;return n||((n=this._levels[t]={}).el=re("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,o.getCenter(),o.getZoom()),n.el.offsetWidth,this._onCreateLevel(n)),this._level=n,n}},_onUpdateLevel:h,_onRemoveLevel:h,_onCreateLevel:h,_pruneTiles:function(){if(this._map){var t,e,i=this._map.getZoom();if(i>this.options.maxZoom||i<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var n=e.coords;this._retainParent(n.x,n.y,n.z,n.z-5)||this._retainChildren(n.x,n.y,n.z,n.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)ae(this._levels[t].el),this._onRemoveLevel(t),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,i,n){var o=Math.floor(t/2),r=Math.floor(e/2),a=i-1,s=new S(+o,+r);s.z=+a;var l=this._tileCoordsToKey(s),h=this._tiles[l];return h&&h.active?(h.retain=!0,!0):(h&&h.loaded&&(h.retain=!0),a>n&&this._retainParent(o,r,a,n))},_retainChildren:function(t,e,i,n){for(var o=2*t;o<2*t+2;o++)for(var r=2*e;r<2*e+2;r++){var a=new S(o,r);a.z=i+1;var s=this._tileCoordsToKey(a),l=this._tiles[s];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),i+1<n&&this._retainChildren(o,r,i+1,n))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,i,n){var o=this._clampZoom(Math.round(e));(void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom)&&(o=void 0);var r=this.options.updateWhenZooming&&o!==this._tileZoom;n&&!r||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},_setZoomTransform:function(t,e,i){var n=this._map.getZoomScale(i,t.zoom),o=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e,i)).round();mt?ge(t.el,o,n):ye(t.el,o)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],n).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],n).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],n).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],n).y/i.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),n=e.getZoomScale(i,this._tileZoom),o=e.project(t,this._tileZoom).floor(),r=e.getSize().divideBy(2*n);return new O(o.subtract(r),o.add(r))},_update:function(t){var e=this._map;if(e){var i=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var n=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(n),r=o.getCenter(),a=[],s=this.options.keepBuffer,l=new O(o.getBottomLeft().subtract([s,-s]),o.getTopRight().add([s,-s]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var h in this._tiles){var u=this._tiles[h].coords;u.z===this._tileZoom&&l.contains(new S(u.x,u.y))||(this._tiles[h].current=!1)}if(Math.abs(i-this._tileZoom)>1)this._setView(t,i);else{for(var c=o.min.y;c<=o.max.y;c++)for(var p=o.min.x;p<=o.max.x;p++){var d=new S(p,c);if(d.z=this._tileZoom,this._isValidTile(d)){var f=this._tiles[this._tileCoordsToKey(d)];f?f.current=!0:a.push(d)}}if(a.sort(function(t,e){return t.distanceTo(r)-e.distanceTo(r)}),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var _=document.createDocumentFragment();for(p=0;p<a.length;p++)this._addTile(a[p],_);this._level.el.appendChild(_)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return Z(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),o=n.add(i),r=e.unproject(n,t.z),a=e.unproject(o,t.z);return[r,a]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new B(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new S(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(ae(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ce(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=h,t.onmousemove=h,$&&this.options.opacity<1&&_e(t,this.options.opacity),it&&!nt&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),r=this.createTile(this._wrapCoords(t),o(this._tileReady,this,t));this._initTile(r),this.createTile.length<2&&k(o(this._tileReady,this,t,null,r)),ye(r,i),this._tiles[n]={el:r,coords:t,current:!0},e.appendChild(r),this.fire("tileloadstart",{tile:r,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(_e(i.el,0),P(this._fadeFrame),this._fadeFrame=k(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(ce(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),$||!this._map._fadeAnimated?k(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new S(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new O(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),nn=en.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=d(this,e)).detectRetina&&Mt&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),it||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return Ie(i,"load",o(this._tileOnLoad,this,e,i)),Ie(i,"error",o(this._tileOnError,this,e,i)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i.alt="",i.setAttribute("role","presentation"),i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:Mt?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=n),e["-y"]=n}return m(this._url,i(e,this.options))},_tileOnLoad:function(t,e){$?setTimeout(o(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,n=this.options.zoomOffset;return i&&(t=e-t),t+n},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=h,e.onerror=h,e.complete||(e.src=v,ae(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return rt||e.el.setAttribute("src",v),en.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==v))return en.prototype._tileReady.call(this,t,e,i)}});function on(t,e){return new nn(t,e)}var rn=nn.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var n=i({},this.defaultWmsParams);for(var o in e)o in this.options||(n[o]=e[o]);var r=(e=d(this,e)).detectRetina&&Mt?2:1,a=this.getTileSize();n.width=a.x*r,n.height=a.y*r,this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,nn.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=N(i.project(e[0]),i.project(e[1])),o=n.min,r=n.max,a=(this._wmsVersion>=1.3&&this._crs===xi?[o.y,o.x,r.y,r.x]:[o.x,o.y,r.x,r.y]).join(","),s=nn.prototype.getTileUrl.call(this,t);return s+f(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function(t,e){return i(this.wmsParams,t),e||this.redraw(),this}});nn.WMS=rn,on.wms=function(t,e){return new rn(t,e)};var an=Mi.extend({options:{padding:.1,tolerance:0},initialize:function(t){d(this,t),a(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&ce(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=ve(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,e),a=this._map.project(t,e),s=a.subtract(r),l=o.multiplyBy(-i).add(n).add(o).subtract(s);mt?ge(this._container,l,i):ye(this._container,l)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new O(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),sn=an.extend({getEvents:function(){var t=an.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){an.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Ie(t,"mousemove",s(this._onMouseMove,32,this),this),Ie(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ie(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){P(this._redrawRequest),delete this._ctx,ae(this._container),Ae(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){an.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=Mt?2:1;ye(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",Mt&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){an.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[a(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[a(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,i,n=t.options.dashArray.split(/[, ]+/),o=[];for(i=0;i<n.length;i++){if(e=Number(n[i]),isNaN(e))return;o.push(e)}t.options._dashArray=o}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||k(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new O,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var i=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,i.x,i.y),this._ctx.clip()}this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var i,n,o,r,a=t._parts,s=a.length,l=this._ctx;if(s){for(l.beginPath(),i=0;i<s;i++){for(n=0,o=a[i].length;n<o;n++)r=a[i][n],l[n?"lineTo":"moveTo"](r.x,r.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,i=this._ctx,n=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||n)/n;1!==o&&(i.save(),i.scale(1,o)),i.beginPath(),i.arc(e.x,e.y/o,n,0,2*Math.PI,!1),1!==o&&i.restore(),this._fillStroke(i,t)}},_fillStroke:function(t,e){var i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&0!==i.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())},_onClick:function(t){for(var e,i,n=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(n)&&!this._map._draggableMoved(e)&&(i=e);i&&(Ue(t),this._fireEvent([i],t))},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(pe(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(t,e){for(var i,n,o=this._drawFirst;o;o=o.next)(i=o.layer).options.interactive&&i._containsPoint(e)&&(n=i);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(ce(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_fireEvent:function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var i=e.next,n=e.prev;i&&(i.prev=n,n?n.next=i:i&&(this._drawFirst=i),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var i=e.next,n=e.prev;n&&(n.next=i,i?i.prev=n:n&&(this._drawLast=n),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function ln(t){return kt?new sn(t):null}var hn=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),un={_initContainer:function(){this._container=re("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(an.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=hn("shape");ce(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=hn("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ae(e),t.removeInteractiveTarget(e),delete this._layers[a(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e||(e=t._stroke=hn("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=g(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=hn("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){le(t._container)},_bringToBack:function(t){he(t._container)}},cn=It?hn:X,pn=an.extend({getEvents:function(){var t=an.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=cn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=cn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ae(this._container),Ae(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){an.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),ye(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=cn("path");t.options.className&&ce(e,t.options.className),t.options.interactive&&ce(e,"leaflet-interactive"),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ae(t._path),t.removeInteractiveTarget(t._path),delete this._layers[a(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,K(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n=Math.max(Math.round(t._radiusY),1)||i,o="a"+i+","+n+" 0 1,0 ",r=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+o+2*i+",0 "+o+2*-i+",0 ";this._setPath(t,r)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){le(t._path)},_bringToBack:function(t){he(t._path)}});function dn(t){return Pt||It?new pn(t):null}It&&pn.include(un),qe.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&ln(t)||dn(t)}});var fn=Ni.extend({initialize:function(t,e){Ni.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=Z(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});pn.create=cn,pn.pointsToPath=K,Bi.geometryToLayer=Zi,Bi.coordsToLatLng=ji,Bi.coordsToLatLngs=Ri,Bi.latLngToCoords=Gi,Bi.latLngsToCoords=Hi,Bi.getFeature=Ui,Bi.asFeature=Wi,qe.mergeOptions({boxZoom:!0});var _n=ei.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){Ie(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ae(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ae(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Xt(),Le(),this._startPoint=this._map.mouseEventToContainerPoint(t),Ie(document,{contextmenu:Be,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=re("div","leaflet-zoom-box",this._container),ce(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new O(this._point,this._startPoint),i=e.getSize();ye(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(ae(this._box),pe(this._container,"leaflet-crosshair")),Kt(),we(),Ae(document,{contextmenu:Be,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var e=new B(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});qe.addInitHook("addHandler","boxZoom",_n),qe.mergeOptions({doubleClickZoom:!0});var mn=ei.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,o=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});qe.addInitHook("addHandler","doubleClickZoom",mn),qe.mergeOptions({dragging:!0,inertia:!nt,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var gn=ei.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new si(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}ce(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){pe(this._map._container,"leaflet-grab"),pe(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=Z(this._map.options.maxBounds);this._offsetLimit=N(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,r=(n+e+i)%t-e-i,a=Math.abs(o+i)<Math.abs(r+i)?o:r;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=a},_onDragEnd:function(t){var e=this._map,i=e.options,n=!i.inertia||this._times.length<2;if(e.fire("dragend",t),n)e.fire("moveend");else{this._prunePositions(+new Date);var o=this._lastPos.subtract(this._positions[0]),r=(this._lastTime-this._times[0])/1e3,a=i.easeLinearity,s=o.multiplyBy(a/r),l=s.distanceTo([0,0]),h=Math.min(i.inertiaMaxSpeed,l),u=s.multiplyBy(h/l),c=h/(i.inertiaDeceleration*a),p=u.multiplyBy(-c/2).round();p.x||p.y?(p=e._limitOffset(p,e.options.maxBounds),k(function(){e.panBy(p,{duration:c,easeLinearity:a,noMoveStart:!0,animate:!0})})):e.fire("moveend")}}});qe.addInitHook("addHandler","dragging",gn),qe.mergeOptions({keyboard:!0,keyboardPanDelta:80});var yn=ei.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),Ie(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Ae(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,i=t.scrollTop||e.scrollTop,n=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(n,i)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,i,n=this._panKeys={},o=this.keyCodes;for(e=0,i=o.left.length;e<i;e++)n[o.left[e]]=[-1*t,0];for(e=0,i=o.right.length;e<i;e++)n[o.right[e]]=[t,0];for(e=0,i=o.down.length;e<i;e++)n[o.down[e]]=[0,t];for(e=0,i=o.up.length;e<i;e++)n[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,i,n=this._zoomKeys={},o=this.keyCodes;for(e=0,i=o.zoomIn.length;e<i;e++)n[o.zoomIn[e]]=t;for(e=0,i=o.zoomOut.length;e<i;e++)n[o.zoomOut[e]]=-t},_addHooks:function(){Ie(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Ae(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,i=t.keyCode,n=this._map;if(i in this._panKeys)n._panAnim&&n._panAnim._inProgress||(e=this._panKeys[i],t.shiftKey&&(e=D(e).multiplyBy(3)),n.panBy(e),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds));else if(i in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}Be(t)}}});qe.addInitHook("addHandler","keyboard",yn),qe.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var vn=ei.extend({addHooks:function(){Ie(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Ae(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Re(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var n=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o(this._performZoom,this),n),Be(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(4*this._map.options.wheelPxPerZoomLevel),o=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,r=i?Math.ceil(o/i)*i:o,a=t._limitZoom(e+(this._delta>0?r:-r))-e;this._delta=0,this._startTime=null,a&&("center"===t.options.scrollWheelZoom?t.setZoom(e+a):t.setZoomAround(this._lastMousePos,e+a))}});qe.addInitHook("addHandler","scrollWheelZoom",vn),qe.mergeOptions({tap:!0,tapTolerance:15});var bn=ei.extend({addHooks:function(){Ie(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ae(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(Ne(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],i=e.target;this._startPos=this._newPos=new S(e.clientX,e.clientY),i.tagName&&"a"===i.tagName.toLowerCase()&&ce(i,"leaflet-active"),this._holdTimeout=setTimeout(o(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))},this),1e3),this._simulateEvent("mousedown",e),Ie(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),Ae(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],i=e.target;i&&i.tagName&&"a"===i.tagName.toLowerCase()&&pe(i,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new S(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var i=document.createEvent("MouseEvents");i._simulated=!0,e.target._simulatedClick=!0,i.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(i)}});wt&&!Lt&&qe.addInitHook("addHandler","tap",bn),qe.mergeOptions({touchZoom:wt&&!nt,bounceAtZoomLimits:!0});var Ln=ei.extend({addHooks:function(){ce(this._map._container,"leaflet-touch-zoom"),Ie(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){pe(this._map._container,"leaflet-touch-zoom"),Ae(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),Ie(document,"touchmove",this._onTouchMove,this),Ie(document,"touchend",this._onTouchEnd,this),Ne(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),r=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(r,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&r<1||this._zoom>e.getMaxZoom()&&r>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===r)return}else{var a=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(1===r&&0===a.x&&0===a.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),P(this._animRequest);var s=o(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=k(s,this,!0),Ne(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,P(this._animRequest),Ae(document,"touchmove",this._onTouchMove),Ae(document,"touchend",this._onTouchEnd),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});qe.addInitHook("addHandler","touchZoom",Ln),qe.BoxZoom=_n,qe.DoubleClickZoom=mn,qe.Drag=gn,qe.Keyboard=yn,qe.ScrollWheelZoom=vn,qe.Tap=bn,qe.TouchZoom=Ln,Object.freeze=e,t.version="1.5.1+build.2e3e0ffb",t.Control=Xe,t.control=Ke,t.Browser=At,t.Evented=T,t.Mixin=ni,t.Util=I,t.Class=E,t.Handler=ei,t.extend=i,t.bind=o,t.stamp=a,t.setOptions=d,t.DomEvent=Ve,t.DomUtil=Pe,t.PosAnimation=Ye,t.Draggable=si,t.LineUtil=mi,t.PolyUtil=yi,t.Point=S,t.point=D,t.Bounds=O,t.bounds=N,t.Transformation=F,t.transformation=V,t.Projection=Li,t.LatLng=j,t.latLng=R,t.LatLngBounds=B,t.latLngBounds=Z,t.CRS=H,t.GeoJSON=Bi,t.geoJSON=Vi,t.geoJson=Yi,t.Layer=Mi,t.LayerGroup=ki,t.layerGroup=function(t,e){return new ki(t,e)},t.FeatureGroup=Pi,t.featureGroup=function(t){return new Pi(t)},t.ImageOverlay=qi,t.imageOverlay=function(t,e,i){return new qi(t,e,i)},t.VideoOverlay=Xi,t.videoOverlay=function(t,e,i){return new Xi(t,e,i)},t.SVGOverlay=Ki,t.svgOverlay=function(t,e,i){return new Ki(t,e,i)},t.DivOverlay=Ji,t.Popup=Qi,t.popup=function(t,e){return new Qi(t,e)},t.Tooltip=$i,t.tooltip=function(t,e){return new $i(t,e)},t.Icon=Ii,t.icon=function(t){return new Ii(t)},t.DivIcon=tn,t.divIcon=function(t){return new tn(t)},t.Marker=Ti,t.marker=function(t,e){return new Ti(t,e)},t.TileLayer=nn,t.tileLayer=on,t.GridLayer=en,t.gridLayer=function(t){return new en(t)},t.SVG=pn,t.svg=dn,t.Renderer=an,t.Canvas=sn,t.canvas=ln,t.Path=Si,t.CircleMarker=zi,t.circleMarker=function(t,e){return new zi(t,e)},t.Circle=Di,t.circle=function(t,e,i){return new Di(t,e,i)},t.Polyline=Oi,t.polyline=function(t,e){return new Oi(t,e)},t.Polygon=Ni,t.polygon=function(t,e){return new Ni(t,e)},t.Rectangle=fn,t.rectangle=function(t,e){return new fn(t,e)},t.Map=qe,t.map=function(t,e){return new qe(t,e)};var wn=window.L;t.noConflict=function(){return window.L=wn,this},window.L=t}(e)},function(t,e,i){var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},r=function(){var t={};return function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}t[e]=i}return t[e]}}(),a={};function s(t,e,i){for(var n=0;n<e.length;n++){var o={css:e[n][1],media:e[n][2],sourceMap:e[n][3]};a[t][n]?a[t][n](o):a[t].push(f(o,i))}}function l(t){var e=document.createElement("style"),n=t.attributes||{};if(void 0===n.nonce){var o=i.nc;o&&(n.nonce=o)}if(Object.keys(n).forEach(function(t){e.setAttribute(t,n[t])}),"function"==typeof t.insert)t.insert(e);else{var a=r(t.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(e)}return e}var h,u=(h=[],function(t,e){return h[t]=e,h.filter(Boolean).join("\n")});function c(t,e,i,n){var o=i?"":n.css;if(t.styleSheet)t.styleSheet.cssText=u(e,o);else{var r=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(r,a[e]):t.appendChild(r)}}var p=null,d=0;function f(t,e){var i,n,o;if(e.singleton){var r=d++;i=p||(p=l(e)),n=c.bind(null,i,r,!1),o=c.bind(null,i,r,!0)}else i=l(e),n=function(t,e,i){var n=i.css,o=i.media,r=i.sourceMap;if(o?t.setAttribute("media",o):t.removeAttribute("media"),r&&btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,i,e),o=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(i)};return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else o()}}t.exports=function(t,e,i){return(i=i||{}).singleton||"boolean"==typeof i.singleton||(i.singleton=o()),t=i.base?t+i.base:t,e=e||[],a[t]||(a[t]=[]),s(t,e,i),function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){a[t]||(a[t]=[]),s(t,e,i);for(var n=e.length;n<a[t].length;n++)a[t][n]();a[t].length=e.length,0===a[t].length&&delete a[t]}}}},function(t,e,i){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var i=function(t,e){var i=t[1]||"",n=t[3];if(!n)return i;if(e&&"function"==typeof btoa){var o=(a=n,s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(l," */")),r=n.sources.map(function(t){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(t," */")});return[i].concat(r).concat([o]).join("\n")}var a,s,l;return[i].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(i,"}"):i}).join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var n=0;n<t.length;n++){var o=[].concat(t[n]);i&&(o[2]?o[2]="".concat(i," and ").concat(o[2]):o[2]=i),e.push(o)}},e}},function(t,e,i){i.d(e,"a",function(){return o});var n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}},function(t,e,i){function n(t){if(!(this instanceof n))return new n(t);this._canvas=t="string"==typeof t?document.getElementById(t):t,this._ctx=t.getContext("2d"),this._width=t.width,this._height=t.height,this._max=1,this._data=[]}t.exports=n,n.prototype={defaultRadius:25,defaultGradient:{.4:"blue",.6:"cyan",.7:"lime",.8:"yellow",1:"red"},data:function(t){return this._data=t,this},max:function(t){return this._max=t,this},add:function(t){return this._data.push(t),this},clear:function(){return this._data=[],this},radius:function(t,e){e=void 0===e?15:e;var i=this._circle=this._createCanvas(),n=i.getContext("2d"),o=this._r=t+e;return i.width=i.height=2*o,n.shadowOffsetX=n.shadowOffsetY=2*o,n.shadowBlur=e,n.shadowColor="black",n.beginPath(),n.arc(-o,-o,t,0,2*Math.PI,!0),n.closePath(),n.fill(),this},resize:function(){this._width=this._canvas.width,this._height=this._canvas.height},gradient:function(t){var e=this._createCanvas(),i=e.getContext("2d"),n=i.createLinearGradient(0,0,0,256);for(var o in e.width=1,e.height=256,t)n.addColorStop(+o,t[o]);return i.fillStyle=n,i.fillRect(0,0,1,256),this._grad=i.getImageData(0,0,1,256).data,this},draw:function(t){this._circle||this.radius(this.defaultRadius),this._grad||this.gradient(this.defaultGradient);var e=this._ctx;e.clearRect(0,0,this._width,this._height);for(var i,n=0,o=this._data.length;n<o;n++)i=this._data[n],e.globalAlpha=Math.max(i[2]/this._max,void 0===t?.05:t),e.drawImage(this._circle,i[0]-this._r,i[1]-this._r);var r=e.getImageData(0,0,this._width,this._height);return this._colorize(r.data,this._grad),e.putImageData(r,0,0),this},_colorize:function(t,e){for(var i,n=0,o=t.length;n<o;n+=4)(i=4*t[n+3])&&(t[n]=e[i],t[n+1]=e[i+1],t[n+2]=e[i+2])},_createCanvas:function(){return"undefined"!=typeof document?document.createElement("canvas"):new this._canvas.constructor}}},function(t,e,i){t.exports=function(t,e){return e||(e={}),"string"!=typeof(t=t&&t.__esModule?t.default:t)?t:(/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t)}},function(t,e,i){!function(t){var e=L.GridLayer.extend({options:{minZoom:0,maxZoom:23,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",opacity:1,continuousWorld:!1,noWrap:!1,type:"roadmap",maxNativeZoom:21},initialize:function(t){L.GridLayer.prototype.initialize.call(this,t),this._ready=!!window.google&&!!window.google.maps&&!!window.google.maps.Map,this._GAPIPromise=this._ready?Promise.resolve(window.google):new Promise(function(t,e){var i=0,n=null;n=setInterval(function(){return i>=10?(clearInterval(n),e(new Error("window.google not found after 10 attempts"))):window.google&&window.google.maps&&window.google.maps.Map?(clearInterval(n),t(window.google)):void i++},500)}),this._tileCallbacks={},this._freshTiles={},this._imagesPerTile="hybrid"===this.options.type?2:1},onAdd:function(t){L.GridLayer.prototype.onAdd.call(this,t),this._initMutantContainer(),this._GAPIPromise.then(function(){if(this._ready=!0,this._map=t,this._initMutant(),t.on("viewreset",this._reset,this),t.on("move",this._update,this),t.on("zoomend",this._handleZoomAnim,this),t.on("resize",this._resize,this),google.maps.event.addListenerOnce(this._mutant,"idle",function(){this._checkZoomLevels(),this._mutantIsReady=!0}.bind(this)),t._controlCorners.bottomright.style.marginBottom="20px",t._controlCorners.bottomleft.style.marginBottom="20px",this._reset(),this._update(),this._subLayers)for(var e in this._subLayers)this._subLayers[e].setMap(this._mutant)}.bind(this))},onRemove:function(t){L.GridLayer.prototype.onRemove.call(this,t),t._container.removeChild(this._mutantContainer),this._mutantContainer=void 0,google.maps.event.clearListeners(t,"idle"),google.maps.event.clearListeners(this._mutant,"idle"),t.off("viewreset",this._reset,this),t.off("move",this._update,this),t.off("zoomend",this._handleZoomAnim,this),t.off("resize",this._resize,this),t._controlCorners&&(t._controlCorners.bottomright.style.marginBottom="0em",t._controlCorners.bottomleft.style.marginBottom="0em")},getAttribution:function(){return this.options.attribution},setOpacity:function(t){this.options.opacity=t,t<1&&L.DomUtil.setOpacity(this._mutantContainer,t)},setElementSize:function(t,e){t.style.width=e.x+"px",t.style.height=e.y+"px"},addGoogleLayer:function(t,e){return this._subLayers||(this._subLayers={}),this._GAPIPromise.then(function(){var i=google.maps[t],n=new i(e);return n.setMap(this._mutant),this._subLayers[t]=n,n}.bind(this))},removeGoogleLayer:function(t){var e=this._subLayers&&this._subLayers[t];e&&(e.setMap(null),delete this._subLayers[t])},_initMutantContainer:function(){this._mutantContainer||(this._mutantContainer=L.DomUtil.create("div","leaflet-google-mutant leaflet-top leaflet-left"),this._mutantContainer.id="_MutantContainer_"+L.Util.stamp(this._mutantContainer),this._mutantContainer.style.zIndex="800",this._mutantContainer.style.pointerEvents="none",this._map.getContainer().appendChild(this._mutantContainer)),this.setOpacity(this.options.opacity),this.setElementSize(this._mutantContainer,this._map.getSize()),this._attachObserver(this._mutantContainer)},_initMutant:function(){if(this._ready&&this._mutantContainer){this._mutantCenter=new google.maps.LatLng(0,0);var t=new google.maps.Map(this._mutantContainer,{center:this._mutantCenter,zoom:0,tilt:0,mapTypeId:this.options.type,disableDefaultUI:!0,keyboardShortcuts:!1,draggable:!1,disableDoubleClickZoom:!0,scrollwheel:!1,streetViewControl:!1,styles:this.options.styles||{},backgroundColor:"transparent"});this._mutant=t,google.maps.event.addListenerOnce(t,"idle",function(){for(var t=this._mutantContainer.querySelectorAll("a"),e=0;e<t.length;e++)t[e].style.pointerEvents="auto"}.bind(this)),this.fire("spawned",{mapObject:t})}},_attachObserver:function(t){var e=new MutationObserver(this._onMutations.bind(this));e.observe(t,{childList:!0,subtree:!0})},_onMutations:function(t){for(var e=0;e<t.length;++e)for(var i=t[e],n=0;n<i.addedNodes.length;++n){var o=i.addedNodes[n];o instanceof HTMLImageElement?this._onMutatedImage(o):o instanceof HTMLElement&&Array.prototype.forEach.call(o.querySelectorAll("img"),this._onMutatedImage.bind(this))}},_roadRegexp:/!1i(\d+)!2i(\d+)!3i(\d+)!/,_satRegexp:/x=(\d+)&y=(\d+)&z=(\d+)/,_staticRegExp:/StaticMapService\.GetMapImage/,_onMutatedImage:function(t){var e,i=t.src.match(this._roadRegexp),n=0;if(i?(e={z:i[1],x:i[2],y:i[3]},this._imagesPerTile>1&&(t.style.zIndex=1,n=1)):((i=t.src.match(this._satRegexp))&&(e={x:i[1],y:i[2],z:i[3]}),n=0),e){var o=this._tileCoordsToKey(e);t.style.position="absolute",t.style.visibility="hidden";var r=o+"/"+n;if(this._freshTiles[r]=t,r in this._tileCallbacks&&this._tileCallbacks[r])this._tileCallbacks[r].pop()(t),this._tileCallbacks[r].length||delete this._tileCallbacks[r];else if(this._tiles[o]){var a=this._tiles[o].el,s=0===n?a.firstChild:a.firstChild.nextSibling,l=this._clone(t);a.replaceChild(l,s)}}else t.src.match(this._staticRegExp)&&(t.style.visibility="hidden")},createTile:function(t,e){var i=this._tileCoordsToKey(t),n=L.DomUtil.create("div");n.dataset.pending=this._imagesPerTile,e=e.bind(this,null,n);for(var o=0;o<this._imagesPerTile;o++){var r=i+"/"+o;if(r in this._freshTiles){var a=this._freshTiles[r];n.appendChild(this._clone(a)),n.dataset.pending--}else this._tileCallbacks[r]=this._tileCallbacks[r]||[],this._tileCallbacks[r].push(function(t){return function(i){t.appendChild(this._clone(i)),t.dataset.pending--,parseInt(t.dataset.pending)||e()}.bind(this)}.bind(this)(n))}return parseInt(n.dataset.pending)||L.Util.requestAnimFrame(e),n},_clone:function(t){var e=t.cloneNode(!0);return e.style.visibility="visible",e},_checkZoomLevels:function(){var t=this._map.getZoom(),e=this._mutant.getZoom();t&&e&&(e!==t||e>this.options.maxNativeZoom)&&this._setMaxNativeZoom(e)},_setMaxNativeZoom:function(t){t!=this.options.maxNativeZoom&&(this.options.maxNativeZoom=t,this._resetView())},_reset:function(){this._initContainer()},_update:function(){if(this._mutant){var t=this._map.getCenter(),e=new google.maps.LatLng(t.lat,t.lng);this._mutant.setCenter(e);var i=this._map.getZoom(),n=i!==Math.round(i),o=this._mutant.getZoom();n||i==o||(this._mutant.setZoom(i),this._mutantIsReady&&this._checkZoomLevels())}L.GridLayer.prototype._update.call(this)},_resize:function(){var t=this._map.getSize();this._mutantContainer.style.width===t.x&&this._mutantContainer.style.height===t.y||(this.setElementSize(this._mutantContainer,t),this._mutant&&google.maps.event.trigger(this._mutant,"resize"))},_handleZoomAnim:function(){if(this._mutant){var t=this._map.getCenter(),e=new google.maps.LatLng(t.lat,t.lng);this._mutant.setCenter(e),this._mutant.setZoom(Math.round(this._map.getZoom()))}},_removeTile:function(t){if(this._mutant)return setTimeout(this._pruneTile.bind(this,t),1e3),L.GridLayer.prototype._removeTile.call(this,t)},_pruneTile:function(t){for(var e=this._mutant.getZoom(),i=t.split(":")[2],n=this._mutant.getBounds(),o=n.getSouthWest(),r=n.getNorthEast(),a=L.latLngBounds([[o.lat(),o.lng()],[r.lat(),r.lng()]]),s=0;s<this._imagesPerTile;s++){var l=t+"/"+s;if(l in this._freshTiles){var h=this._map&&this._keyToBounds(t),u=this._map&&h.overlaps(a)&&i==e;u||delete this._freshTiles[l]}}}});t.GoogleMutant=e}(e)},function(t,e,i){i.d(e,"a",function(){return a});var n=i(0),o=(i(27),{iconColor:"#1EB300",iconAnchor:{marker:[14,34],circle:[11,10],"circle-dot":[5,5],"rectangle-dot":[5,6],doughnut:[8,8]},popupAnchor:{marker:[0,-25],circle:[-3,-76],"circle-dot":[0,-2],"rectangle-dot":[0,-2],doughnut:[0,-2]},innerIconAnchor:{marker:[-2,5],circle:[0,2]},iconSize:{marker:[28,28],circle:[22,22],"circle-dot":[2,2],"rectangle-dot":[2,2],doughnut:[15,15]}}),r=n.Icon.extend({options:{icon:"leaf",iconSize:o.iconSize.circle,iconAnchor:o.iconAnchor.marker,iconShape:"marker",iconStyle:"",innerIconAnchor:[0,3],innerIconStyle:"",isAlphaNumericIcon:!1,text:1,borderColor:o.iconColor,borderWidth:2,borderStyle:"solid",backgroundColor:"white",textColor:o.iconColor,customClasses:"",spin:!1,prefix:"fa",html:""},initialize:function(t){this.applyDefaults(t),this.options=t&&t.html?t:n.Util.setOptions(this,t)},applyDefaults:function(t){t&&(!t.iconSize&&t.iconShape&&(t.iconSize=o.iconSize[t.iconShape]),!t.iconAnchor&&t.iconShape&&(t.iconAnchor=o.iconAnchor[t.iconShape]),!t.popupAnchor&&t.iconShape&&(t.popupAnchor=o.popupAnchor[t.iconShape]),t.innerIconAnchor||"circle"!==t.iconShape&&"marker"!==t.iconShape||("circle"===t.iconShape&&t.isAlphaNumericIcon?t.innerIconAnchor=[0,-1]:"marker"!==t.iconShape||t.isAlphaNumericIcon||(t.innerIconAnchor=o.innerIconAnchor[t.iconShape])))},createIcon:function(){var t=document.createElement("div"),e=this.options;if(t.innerHTML=e.html?e.html:this.createIconInnerHtml(),this._setIconStyles(t),"marker"===this.options.iconShape){var i=document.createElement("div");return i.className="beautify-marker"+(e.props.owner._currSelRow===e.props.row?" selected":""),i.appendChild(t),i}return t},createIconInnerHtml:function(){var t=this.options;if("circle-dot"===t.iconShape||"rectangle-dot"===t.iconShape||"doughnut"===t.iconShape)return"";var e=this.getInnerIconStyle(t);if(t.isAlphaNumericIcon)return'<div style="'+e+'">'+t.text+"</div>";var i="";return t.spin&&(i=" fa-spin"),'<i class="'+t.prefix+" "+t.icon+i+'" style="'+e+'"></i>'},getInnerIconStyle:function(t){var e=Object(n.point)(t.innerIconAnchor);return"color:"+t.textColor+";margin-top:"+e.y+"px; margin-left:"+e.x+"px;"+t.innerIconStyle},_setIconStyles:function(t){var e=this.options,i=Object(n.point)(e.iconSize),o=Object(n.point)(e.iconAnchor);if(t.className="beautify-marker ",e.iconShape&&(t.className+=e.iconShape),e.customClasses&&(t.className+=" "+e.customClasses),t.style.backgroundColor=e.backgroundColor,t.style.color=e.textColor,t.style.borderColor=e.borderColor,t.style.borderWidth=e.borderWidth+"px",t.style.borderStyle=e.borderStyle,i&&(t.style.width=i.x+"px",t.style.height=i.y+"px"),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),e.iconStyle){var r=t.getAttribute("style");r+=e.iconStyle,t.setAttribute("style",r)}}});function a(t){return new r(t)}},function(t,e,i){i.d(e,"b",function(){return l}),i.d(e,"a",function(){return h});var n=i(3),o=i(0),r=i(4),a=i.n(r),s=window.simpleheat||r&&a.a||r,l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(n.a)(e,t),e}(o.Layer),h=function(t){function e(e,i){void 0===i&&(i={});var n=t.call(this,i)||this;return n._latlngs=e,n}return Object(n.a)(e,t),e.prototype.initialize=function(t){this.setOptions(t)},e.prototype.setLatLngs=function(t){return this._latlngs=t,this.redraw()},e.prototype.addLatLng=function(t){return this._latlngs.push(t),this.redraw()},e.prototype.setOptions=function(t){return this.options=t,this._heat&&this._updateOptions(),this.redraw()},e.prototype.redraw=function(){return!this._heat||this._frame||this._map._animating||(this._frame=o.Util.requestAnimFrame(this._redraw,this)),this},e.prototype.onAdd=function(t){return this._map=t,this._canvas||this._initCanvas(),t._panes.overlayPane.appendChild(this._canvas),t.on("moveend",this._reset,this),t.options.zoomAnimation&&o.Browser.any3d&&t.on("zoomanim",this._animateZoom,this),this._reset(),this},e.prototype.onRemove=function(t){return t.getPanes().overlayPane.removeChild(this._canvas),t.off("moveend",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this),this},e.prototype.addTo=function(t){return t.addLayer(this),this},e.prototype._initCanvas=function(){var t=this._canvas=o.DomUtil.create("canvas","leaflet-heatmap-layer leaflet-layer"),e=o.DomUtil.testProp(["transformOrigin","WebkitTransformOrigin","msTransformOrigin"]);t.style[e]="50% 50%";var i=this._map.getSize();t.width=i.x,t.height=i.y;var n=this._map.options.zoomAnimation&&o.Browser.any3d;o.DomUtil.addClass(t,"leaflet-zoom-"+(n?"animated":"hide")),this._heat=s(t),this._updateOptions()},e.prototype._updateOptions=function(){this._heat.radius(this.options.radius||this._heat.defaultRadius,this.options.blur),this.options.gradient&&this._heat.gradient(this.options.gradient),this.options.max&&this._heat.max(this.options.max)},e.prototype._reset=function(){var t=this._map.containerPointToLayerPoint([0,0]);o.DomUtil.setPosition(this._canvas,t);var e=this._map.getSize();this._heat._width!==e.x&&(this._canvas.width=this._heat._width=e.x),this._heat._height!==e.y&&(this._canvas.height=this._heat._height=e.y),this._redraw()},e.prototype._redraw=function(){var t,e,i,n,r,a,s,l,h,u=[],c=this._heat._r,p=this._map.getSize(),d=new o.Bounds(o.point([-c,-c]),p.add([c,c])),f=void 0===this.options.max?1:this.options.max,_=void 0===this.options.maxZoom?this._map.getMaxZoom():this.options.maxZoom,m=1/Math.pow(2,Math.max(0,Math.min(_-this._map.getZoom(),12))),g=c/2,y=[],v=this._map._getMapPanePos(),b=v.x%g,L=v.y%g;for(t=0,e=this._latlngs.length;t<e;t++){if(i=this._map.latLngToContainerPoint(this._latlngs[t]),d.contains(i))r=Math.floor((i.x-b)/g)+2,a=Math.floor((i.y-L)/g)+2,h=(void 0!==this._latlngs[t].alt?this._latlngs[t].alt:void 0!==this._latlngs[t][2]?+this._latlngs[t][2]:1)*m,y[a]=y[a]||[],(n=y[a][r])?(n[0]=(n[0]*n[2]+i.x*h)/(n[2]+h),n[1]=(n[1]*n[2]+i.y*h)/(n[2]+h),n[2]+=h):y[a][r]=[i.x,i.y,h]}for(t=0,e=y.length;t<e;t++)if(y[t])for(s=0,l=y[t].length;s<l;s++)(n=y[t][s])&&u.push([Math.round(n[0]),Math.round(n[1]),Math.min(n[2],f)]);this._heat.data(u).draw(this.options.minOpacity),this._frame=null},e.prototype._animateZoom=function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._getCenterOffset(t.center)._multiplyBy(-e).subtract(this._map._getMapPanePos());o.DomUtil.setTransform?o.DomUtil.setTransform(this._canvas,i,e):this._canvas.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(i)+" scale("+e+")"},e}(l)},function(t,e,i){var n=i(3),o=function(t){return t};function r(t,e){t&&s.hasOwnProperty(t.type)&&s[t.type](t,e)}var a={Feature:function(t,e){r(t.geometry,e)},FeatureCollection:function(t,e){for(var i=t.features,n=-1,o=i.length;++n<o;)r(i[n].geometry,e)}},s={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var i=t.coordinates,n=-1,o=i.length;++n<o;)t=i[n],e.point(t[0],t[1],t[2])},LineString:function(t,e){l(t.coordinates,e,0)},MultiLineString:function(t,e){for(var i=t.coordinates,n=-1,o=i.length;++n<o;)l(i[n],e,0)},Polygon:function(t,e){h(t.coordinates,e)},MultiPolygon:function(t,e){for(var i=t.coordinates,n=-1,o=i.length;++n<o;)h(i[n],e)},GeometryCollection:function(t,e){for(var i=t.geometries,n=-1,o=i.length;++n<o;)r(i[n],e)}};function l(t,e,i){var n,o=-1,r=t.length-i;for(e.lineStart();++o<r;)n=t[o],e.point(n[0],n[1],n[2]);e.lineEnd()}function h(t,e){var i=-1,n=t.length;for(e.polygonStart();++i<n;)l(t[i],e,1);e.polygonEnd()}var u=function(t,e){t&&a.hasOwnProperty(t.type)?a[t.type](t,e):r(t,e)},c=function(){return new p};function p(){this.reset()}p.prototype={constructor:p,reset:function(){this.s=this.t=0},add:function(t){f(d,t,this.t),f(this,d.s,this.s),this.s?this.t+=d.t:this.s=d.t},valueOf:function(){return this.s}};var d=new p;function f(t,e,i){var n=t.s=e+i,o=n-e,r=n-o;t.t=e-r+(i-o)}var _=2*Math.PI,m=Math.abs,g=Math.sqrt;function y(){}var v,b,L,w,x=c(),C=c(),M={point:y,lineStart:y,lineEnd:y,polygonStart:function(){M.lineStart=k,M.lineEnd=E},polygonEnd:function(){M.lineStart=M.lineEnd=M.point=y,x.add(m(C)),C.reset()},result:function(){var t=x/2;return x.reset(),t}};function k(){M.point=P}function P(t,e){M.point=I,v=L=t,b=w=e}function I(t,e){C.add(w*t-L*e),L=t,w=e}function E(){I(v,b)}var A=M,T=1/0,S=T,z=-T,D=z;var O,N,B,Z,j={point:function(t,e){t<T&&(T=t);t>z&&(z=t);e<S&&(S=e);e>D&&(D=e)},lineStart:y,lineEnd:y,polygonStart:y,polygonEnd:y,result:function(){var t=[[T,S],[z,D]];return z=D=-(S=T=1/0),t}},R=0,G=0,H=0,U=0,W=0,F=0,V=0,Y=0,q=0,X={point:K,lineStart:J,lineEnd:tt,polygonStart:function(){X.lineStart=et,X.lineEnd=it},polygonEnd:function(){X.point=K,X.lineStart=J,X.lineEnd=tt},result:function(){var t=q?[V/q,Y/q]:F?[U/F,W/F]:H?[R/H,G/H]:[NaN,NaN];return R=G=H=U=W=F=V=Y=q=0,t}};function K(t,e){R+=t,G+=e,++H}function J(){X.point=Q}function Q(t,e){X.point=$,K(B=t,Z=e)}function $(t,e){var i=t-B,n=e-Z,o=g(i*i+n*n);U+=o*(B+t)/2,W+=o*(Z+e)/2,F+=o,K(B=t,Z=e)}function tt(){X.point=K}function et(){X.point=nt}function it(){ot(O,N)}function nt(t,e){X.point=ot,K(O=B=t,N=Z=e)}function ot(t,e){var i=t-B,n=e-Z,o=g(i*i+n*n);U+=o*(B+t)/2,W+=o*(Z+e)/2,F+=o,V+=(o=Z*t-B*e)*(B+t),Y+=o*(Z+e),q+=3*o,K(B=t,Z=e)}var rt=X;function at(t){this._context=t}at.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,_)}},result:y};var st,lt,ht,ut,ct,pt=c(),dt={point:y,lineStart:function(){dt.point=ft},lineEnd:function(){st&&_t(lt,ht),dt.point=y},polygonStart:function(){st=!0},polygonEnd:function(){st=null},result:function(){var t=+pt;return pt.reset(),t}};function ft(t,e){dt.point=_t,lt=ut=t,ht=ct=e}function _t(t,e){ut-=t,ct-=e,pt.add(g(ut*ut+ct*ct)),ut=t,ct=e}var mt=dt;function gt(){this._string=[]}function yt(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}gt.prototype={_radius:4.5,_circle:yt(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=yt(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};function vt(t){return function(e){var i=new bt;for(var n in t)i[n]=t[n];return i.stream=e,i}}function bt(){}function Lt(){}bt.prototype={constructor:bt,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var wt=function(t){return null==t?Lt:function(){return this.querySelector(t)}};function xt(){return[]}var Ct=function(t){return new Array(t.length)};function Mt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Mt.prototype={constructor:Mt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var kt="$";function Pt(t,e,i,n,o,r){for(var a,s=0,l=e.length,h=r.length;s<h;++s)(a=e[s])?(a.__data__=r[s],n[s]=a):i[s]=new Mt(t,r[s]);for(;s<l;++s)(a=e[s])&&(o[s]=a)}function It(t,e,i,n,o,r,a){var s,l,h,u={},c=e.length,p=r.length,d=new Array(c);for(s=0;s<c;++s)(l=e[s])&&(d[s]=h=kt+a.call(l,l.__data__,s,e),h in u?o[s]=l:u[h]=l);for(s=0;s<p;++s)(l=u[h=kt+a.call(t,r[s],s,r)])?(n[s]=l,l.__data__=r[s],u[h]=null):i[s]=new Mt(t,r[s]);for(s=0;s<c;++s)(l=e[s])&&u[d[s]]===l&&(o[s]=l)}function Et(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var At="http://www.w3.org/1999/xhtml",Tt={svg:"http://www.w3.org/2000/svg",xhtml:At,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},St=function(t){var e=t+="",i=e.indexOf(":");return i>=0&&"xmlns"!==(e=t.slice(0,i))&&(t=t.slice(i+1)),Tt.hasOwnProperty(e)?{space:Tt[e],local:t}:t};var zt=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function Dt(t){return t.trim().split(/^|\s+/)}function Ot(t){return t.classList||new Nt(t)}function Nt(t){this._node=t,this._names=Dt(t.getAttribute("class")||"")}function Bt(t,e){for(var i=Ot(t),n=-1,o=e.length;++n<o;)i.add(e[n])}function Zt(t,e){for(var i=Ot(t),n=-1,o=e.length;++n<o;)i.remove(e[n])}Nt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function jt(){this.textContent=""}function Rt(){this.innerHTML=""}function Gt(){this.nextSibling&&this.parentNode.appendChild(this)}function Ht(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}var Ut=function(t){var e=St(t);return(e.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var e=this.ownerDocument,i=this.namespaceURI;return i===At&&e.documentElement.namespaceURI===At?e.createElement(t):e.createElementNS(i,t)}})(e)};function Wt(){return null}function Ft(){var t=this.parentNode;t&&t.removeChild(this)}function Vt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Yt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}var qt={};"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(qt={mouseenter:"mouseover",mouseleave:"mouseout"}));function Xt(t,e,i){return t=Kt(t,e,i),function(e){var i=e.relatedTarget;i&&(i===this||8&i.compareDocumentPosition(this))||t.call(this,e)}}function Kt(t,e,i){return function(n){try{t.call(this,this.__data__,e,i)}finally{}}}function Jt(t){return function(){var e=this.__on;if(e){for(var i,n=0,o=-1,r=e.length;n<r;++n)i=e[n],t.type&&i.type!==t.type||i.name!==t.name?e[++o]=i:this.removeEventListener(i.type,i.listener,i.capture);++o?e.length=o:delete this.__on}}}function Qt(t,e,i){var n=qt.hasOwnProperty(t.type)?Xt:Kt;return function(o,r,a){var s,l=this.__on,h=n(e,r,a);if(l)for(var u=0,c=l.length;u<c;++u)if((s=l[u]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=h,s.capture=i),void(s.value=e);this.addEventListener(t.type,h,i),s={type:t.type,name:t.name,value:e,listener:h,capture:i},l?l.push(s):this.__on=[s]}}function $t(t,e,i){var n=zt(t),o=n.CustomEvent;"function"==typeof o?o=new o(e,i):(o=n.document.createEvent("Event"),i?(o.initEvent(e,i.bubbles,i.cancelable),o.detail=i.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}var te=[null];function ee(t,e){this._groups=t,this._parents=e}ee.prototype=function(){return new ee([[document.documentElement]],te)}.prototype={constructor:ee,select:function(t){"function"!=typeof t&&(t=wt(t));for(var e=this._groups,i=e.length,n=new Array(i),o=0;o<i;++o)for(var r,a,s=e[o],l=s.length,h=n[o]=new Array(l),u=0;u<l;++u)(r=s[u])&&(a=t.call(r,r.__data__,u,s))&&("__data__"in r&&(a.__data__=r.__data__),h[u]=a);return new ee(n,this._parents)},selectAll:function(t){var e;"function"!=typeof t&&(t=null==(e=t)?xt:function(){return this.querySelectorAll(e)});for(var i=this._groups,n=i.length,o=[],r=[],a=0;a<n;++a)for(var s,l=i[a],h=l.length,u=0;u<h;++u)(s=l[u])&&(o.push(t.call(s,s.__data__,u,l)),r.push(s));return new ee(o,r)},filter:function(t){var e;"function"!=typeof t&&(e=t,t=function(){return this.matches(e)});for(var i=this._groups,n=i.length,o=new Array(n),r=0;r<n;++r)for(var a,s=i[r],l=s.length,h=o[r]=[],u=0;u<l;++u)(a=s[u])&&t.call(a,a.__data__,u,s)&&h.push(a);return new ee(o,this._parents)},data:function(t,e){if(!t)return f=new Array(this.size()),u=-1,this.each(function(t){f[++u]=t}),f;var i,n=e?It:Pt,o=this._parents,r=this._groups;"function"!=typeof t&&(i=t,t=function(){return i});for(var a=r.length,s=new Array(a),l=new Array(a),h=new Array(a),u=0;u<a;++u){var c=o[u],p=r[u],d=p.length,f=t.call(c,c&&c.__data__,u,o),_=f.length,m=l[u]=new Array(_),g=s[u]=new Array(_);n(c,p,m,g,h[u]=new Array(d),f,e);for(var y,v,b=0,L=0;b<_;++b)if(y=m[b]){for(b>=L&&(L=b+1);!(v=g[L])&&++L<_;);y._next=v||null}}return(s=new ee(s,o))._enter=l,s._exit=h,s},enter:function(){return new ee(this._enter||this._groups.map(Ct),this._parents)},exit:function(){return new ee(this._exit||this._groups.map(Ct),this._parents)},join:function(t,e,i){var n=this.enter(),o=this,r=this.exit();return n="function"==typeof t?t(n):n.append(t+""),null!=e&&(o=e(o)),null==i?r.remove():i(r),n&&o?n.merge(o).order():o},merge:function(t){for(var e=this._groups,i=t._groups,n=e.length,o=i.length,r=Math.min(n,o),a=new Array(n),s=0;s<r;++s)for(var l,h=e[s],u=i[s],c=h.length,p=a[s]=new Array(c),d=0;d<c;++d)(l=h[d]||u[d])&&(p[d]=l);for(;s<n;++s)a[s]=e[s];return new ee(a,this._parents)},order:function(){for(var t=this._groups,e=-1,i=t.length;++e<i;)for(var n,o=t[e],r=o.length-1,a=o[r];--r>=0;)(n=o[r])&&(a&&4^n.compareDocumentPosition(a)&&a.parentNode.insertBefore(n,a),a=n);return this},sort:function(t){function e(e,i){return e&&i?t(e.__data__,i.__data__):!e-!i}t||(t=Et);for(var i=this._groups,n=i.length,o=new Array(n),r=0;r<n;++r){for(var a,s=i[r],l=s.length,h=o[r]=new Array(l),u=0;u<l;++u)(a=s[u])&&(h[u]=a);h.sort(e)}return new ee(o,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each(function(){t[++e]=this}),t},node:function(){for(var t=this._groups,e=0,i=t.length;e<i;++e)for(var n=t[e],o=0,r=n.length;o<r;++o){var a=n[o];if(a)return a}return null},size:function(){var t=0;return this.each(function(){++t}),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,i=0,n=e.length;i<n;++i)for(var o,r=e[i],a=0,s=r.length;a<s;++a)(o=r[a])&&t.call(o,o.__data__,a,r);return this},attr:function(t,e){var i=St(t);if(arguments.length<2){var n=this.node();return i.local?n.getAttributeNS(i.space,i.local):n.getAttribute(i)}return this.each((null==e?i.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}}:"function"==typeof e?i.local?function(t,e){return function(){var i=e.apply(this,arguments);null==i?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,i)}}:function(t,e){return function(){var i=e.apply(this,arguments);null==i?this.removeAttribute(t):this.setAttribute(t,i)}}:i.local?function(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}:function(t,e){return function(){this.setAttribute(t,e)}})(i,e))},style:function(t,e,i){return arguments.length>1?this.each((null==e?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof e?function(t,e,i){return function(){var n=e.apply(this,arguments);null==n?this.style.removeProperty(t):this.style.setProperty(t,n,i)}}:function(t,e,i){return function(){this.style.setProperty(t,e,i)}})(t,e,null==i?"":i)):function(t,e){return t.style.getPropertyValue(e)||zt(t).getComputedStyle(t,null).getPropertyValue(e)}(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?function(t){return function(){delete this[t]}}:"function"==typeof e?function(t,e){return function(){var i=e.apply(this,arguments);null==i?delete this[t]:this[t]=i}}:function(t,e){return function(){this[t]=e}})(t,e)):this.node()[t]},classed:function(t,e){var i=Dt(t+"");if(arguments.length<2){for(var n=Ot(this.node()),o=-1,r=i.length;++o<r;)if(!n.contains(i[o]))return!1;return!0}return this.each(("function"==typeof e?function(t,e){return function(){(e.apply(this,arguments)?Bt:Zt)(this,t)}}:e?function(t){return function(){Bt(this,t)}}:function(t){return function(){Zt(this,t)}})(i,e))},text:function(t){return arguments.length?this.each(null==t?jt:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}:function(t){return function(){this.textContent=t}})(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Rt:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}:function(t){return function(){this.innerHTML=t}})(t)):this.node().innerHTML},raise:function(){return this.each(Gt)},lower:function(){return this.each(Ht)},append:function(t){var e="function"==typeof t?t:Ut(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var i="function"==typeof t?t:Ut(t),n=null==e?Wt:"function"==typeof e?e:wt(e);return this.select(function(){return this.insertBefore(i.apply(this,arguments),n.apply(this,arguments)||null)})},remove:function(){return this.each(Ft)},clone:function(t){return this.select(t?Yt:Vt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,i){var n,o,r=function(t){return t.trim().split(/^|\s+/).map(function(t){var e="",i=t.indexOf(".");return i>=0&&(e=t.slice(i+1),t=t.slice(0,i)),{type:t,name:e}})}(t+""),a=r.length;if(!(arguments.length<2)){for(s=e?Qt:Jt,null==i&&(i=!1),n=0;n<a;++n)this.each(s(r[n],e,i));return this}var s=this.node().__on;if(s)for(var l,h=0,u=s.length;h<u;++h)for(n=0,l=s[h];n<a;++n)if((o=r[n]).type===l.type&&o.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?function(t,e){return function(){return $t(this,t,e.apply(this,arguments))}}:function(t,e){return function(){return $t(this,t,e)}})(t,e))}};var ie=i(0);i(29);i.d(e,"b",function(){return ne}),i.d(e,"a",function(){return oe});var ne=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(n.a)(e,t),e}(ie.Layer),oe=function(t){function e(e){void 0===e&&(e={});var i=t.call(this)||this;return i._options(e),i}return Object(n.a)(e,t),e.prototype.svg=function(){return this._rootGroup},e.prototype.drawCallback=function(t){return arguments.length?(this._drawCallback=t,this):this._drawCallback},e.prototype.getBounds=function(){if(!this.selection||!this.projection)return new ie.LatLngBounds([-90,-180],[90,180]);var t,e,i=this.selection.node().getBBox();try{t=this.projection.layerPointToLatLng(new ie.Point(i.x,i.y+i.height))}catch(e){t=[-90,-180]}try{e=this.projection.layerPointToLatLng(new ie.Point(i.x+i.width,i.y))}catch(t){e=[90,180]}return new ie.LatLngBounds(t,e)},e.prototype._undef=function(t){return void 0===t},e.prototype._options=function(t){return this._undef(t)?this.options:(t.zoomHide=!this._undef(t.zoomHide)&&t.zoomHide,t.zoomDraw=!!this._undef(t.zoomDraw)||t.zoomDraw,this.options=t)},e.prototype.draw=function(){this.map&&this._drawCallback&&(this.projection.metresPerPixel=40075016.686*Math.abs(Math.cos(this.map.getCenter().lat*Math.PI/180))/Math.pow(2,this.map.getZoom()+8)*this.projection.scale,this._drawCallback(this.selection,this.projection,this.map.getZoom()))},e.prototype._zoomChange=function(t){var e=this._undef(t.zoom)?this.map._zoom:t.zoom;this._zoomDiff=e-this._zoom,this._scale=Math.pow(2,this._zoomDiff),this.projection.scale=this._scale,this._shift=this.map.latLngToLayerPoint(this._wgsOrigin)._subtract(this._wgsInitialShift.multiplyBy(this._scale));var i=["translate(",this._shift.x,",",this._shift.y,") "],n=["scale(",this._scale,",",this._scale,") "];this._rootGroup.attr("transform",i.concat(n).join("")),this.options.zoomDraw&&this.draw()},e.prototype.onAdd=function(t){this.map=t;var e,i=this;return this._svg=ie.svg(),t.addLayer(this._svg),this._rootGroup=(e=this._svg._rootGroup,"string"==typeof e?new ee([[document.querySelector(e)]],[document.documentElement]):new ee([[e]],te)).classed("d3-overlay",!0),this._rootGroup.classed("leaflet-zoom-hide",this.options.zoomHide),this.selection=this._rootGroup,this._pixelOrigin=t.getPixelOrigin(),this._wgsOrigin=ie.latLng([0,0]),this._wgsInitialShift=this.map.latLngToLayerPoint(this._wgsOrigin),this._zoom=this.map.getZoom(),this._shift=ie.point(0,0),this._scale=1,this.projection={latLngToLayerPoint:function(t,e){return e=i._undef(e)?i._zoom:e,i.map.project(ie.latLng(t),e)._subtract(i._pixelOrigin)},layerPointToLatLng:function(t,e){e=i._undef(e)?i._zoom:e;var n=ie.point(t).add(i._pixelOrigin);return i.map.unproject(n,e)},unitsPerMeter:256*Math.pow(2,i._zoom)/40075017,metresPerPixel:40075016.686*Math.abs(Math.cos(t.getCenter().lat*Math.PI/180))/Math.pow(2,t.getZoom()+8),map:i.map,layer:i,scale:1},this.projection._projectPoint=function(t,e){var n=i.projection.latLngToLayerPoint(new ie.LatLng(e,t));this.stream.point(n.x,n.y)},this.projection.pathFromGeojson=function(t,e){var i,n,r=4.5;function a(t){return t&&("function"==typeof r&&n.pointRadius(+r.apply(this,arguments)),u(t,i(n))),n.result()}return a.area=function(t){return u(t,i(A)),A.result()},a.measure=function(t){return u(t,i(mt)),mt.result()},a.bounds=function(t){return u(t,i(j)),j.result()},a.centroid=function(t){return u(t,i(rt)),rt.result()},a.projection=function(e){return arguments.length?(i=null==e?(t=null,o):(t=e).stream,a):t},a.context=function(t){return arguments.length?(n=null==t?(e=null,new gt):new at(e=t),"function"!=typeof r&&n.pointRadius(r),a):e},a.pointRadius=function(t){return arguments.length?(r="function"==typeof t?t:(n.pointRadius(+t),+t),a):r},a.projection(t).context(e)}().projection({stream:vt({point:this.projection._projectPoint})}),this.projection.latLngToLayerFloatPoint=this.projection.latLngToLayerPoint,this.projection.getZoom=this.map.getZoom.bind(this.map),this.projection.getBounds=this.map.getBounds.bind(this.map),this.selection=this._rootGroup,this.draw(),this},e.prototype.getEvents=function(){return{zoomend:this._zoomChange,viewreset:this._zoomChange}},e.prototype.onRemove=function(t){return this._svg.remove(),this},e.prototype.addTo=function(t){return t.addLayer(this),this},e}(ne)},function(t,e,i){i.r(e),i.d(e,"MarkerClusterGroup",function(){return h}),i.d(e,"Draw",function(){return u});var n=i(0);for(var o in n)["GoogleMutant","MarkerClusterGroup","Draw","default"].indexOf(o)<0&&function(t){i.d(e,t,function(){return n[t]})}(o);i(11),i(16),i(17),i(22),i(23),i(25);var r=i(6);i.d(e,"GoogleMutant",function(){return r.GoogleMutant});var a=i(7);i.d(e,"BeautifyIcon",function(){return a.a});var s=i(9);i.d(e,"LeafletLayer",function(){return s.b}),i.d(e,"D3SvgOverlay",function(){return s.a});var l=i(8);i.d(e,"LeafletLayer2",function(){return l.b}),i.d(e,"HeatLayer",function(){return l.a});var h=n.MarkerClusterGroup,u=n.Draw},function(t,e,i){var n=i(1),o=i(12);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={insert:"head",singleton:!1},a=(n(t.i,o,r),o.locals?o.locals:{});t.exports=a},function(t,e,i){var n=i(2),o=i(5),r=i(13),a=i(14),s=i(15);e=n(!1);var l=o(r),h=o(a),u=o(s);e.push([t.i,"/* required styles */\r\n\r\n.leaflet-pane,\r\n.leaflet-tile,\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow,\r\n.leaflet-tile-container,\r\n.leaflet-pane > svg,\r\n.leaflet-pane > canvas,\r\n.leaflet-zoom-box,\r\n.leaflet-image-layer,\r\n.leaflet-layer {\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\t}\r\n.leaflet-container {\r\n\toverflow: hidden;\r\n\t}\r\n.leaflet-tile,\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow {\r\n\t-webkit-user-select: none;\r\n\t -moz-user-select: none;\r\n\t user-select: none;\r\n\t -webkit-user-drag: none;\r\n\t}\r\n/* Prevents IE11 from highlighting tiles in blue */\r\n.leaflet-tile::selection {\r\n\tbackground: transparent;\r\n}\r\n/* Safari renders non-retina tile on retina better with this, but Chrome is worse */\r\n.leaflet-safari .leaflet-tile {\r\n\timage-rendering: -webkit-optimize-contrast;\r\n\t}\r\n/* hack that prevents hw layers \"stretching\" when loading new tiles */\r\n.leaflet-safari .leaflet-tile-container {\r\n\twidth: 1600px;\r\n\theight: 1600px;\r\n\t-webkit-transform-origin: 0 0;\r\n\t}\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow {\r\n\tdisplay: block;\r\n\t}\r\n/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */\r\n/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */\r\n.leaflet-container .leaflet-overlay-pane svg,\r\n.leaflet-container .leaflet-marker-pane img,\r\n.leaflet-container .leaflet-shadow-pane img,\r\n.leaflet-container .leaflet-tile-pane img,\r\n.leaflet-container img.leaflet-image-layer,\r\n.leaflet-container .leaflet-tile {\r\n\tmax-width: none !important;\r\n\tmax-height: none !important;\r\n\t}\r\n\r\n.leaflet-container.leaflet-touch-zoom {\r\n\t-ms-touch-action: pan-x pan-y;\r\n\ttouch-action: pan-x pan-y;\r\n\t}\r\n.leaflet-container.leaflet-touch-drag {\r\n\t-ms-touch-action: pinch-zoom;\r\n\t/* Fallback for FF which doesn't support pinch-zoom */\r\n\ttouch-action: none;\r\n\ttouch-action: pinch-zoom;\r\n}\r\n.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {\r\n\t-ms-touch-action: none;\r\n\ttouch-action: none;\r\n}\r\n.leaflet-container {\r\n\t-webkit-tap-highlight-color: transparent;\r\n}\r\n.leaflet-container a {\r\n\t-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);\r\n}\r\n.leaflet-tile {\r\n\tfilter: inherit;\r\n\tvisibility: hidden;\r\n\t}\r\n.leaflet-tile-loaded {\r\n\tvisibility: inherit;\r\n\t}\r\n.leaflet-zoom-box {\r\n\twidth: 0;\r\n\theight: 0;\r\n\t-moz-box-sizing: border-box;\r\n\t box-sizing: border-box;\r\n\tz-index: 800;\r\n\t}\r\n/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */\r\n.leaflet-overlay-pane svg {\r\n\t-moz-user-select: none;\r\n\t}\r\n\r\n.leaflet-pane { z-index: 400; }\r\n\r\n.leaflet-tile-pane { z-index: 200; }\r\n.leaflet-overlay-pane { z-index: 400; }\r\n.leaflet-shadow-pane { z-index: 500; }\r\n.leaflet-marker-pane { z-index: 600; }\r\n.leaflet-tooltip-pane { z-index: 650; }\r\n.leaflet-popup-pane { z-index: 700; }\r\n\r\n.leaflet-map-pane canvas { z-index: 100; }\r\n.leaflet-map-pane svg { z-index: 200; }\r\n\r\n.leaflet-vml-shape {\r\n\twidth: 1px;\r\n\theight: 1px;\r\n\t}\r\n.lvml {\r\n\tbehavior: url(#default#VML);\r\n\tdisplay: inline-block;\r\n\tposition: absolute;\r\n\t}\r\n\r\n\r\n/* control positioning */\r\n\r\n.leaflet-control {\r\n\tposition: relative;\r\n\tz-index: 800;\r\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\r\n\tpointer-events: auto;\r\n\t}\r\n.leaflet-top,\r\n.leaflet-bottom {\r\n\tposition: absolute;\r\n\tz-index: 1000;\r\n\tpointer-events: none;\r\n\t}\r\n.leaflet-top {\r\n\ttop: 0;\r\n\t}\r\n.leaflet-right {\r\n\tright: 0;\r\n\t}\r\n.leaflet-bottom {\r\n\tbottom: 0;\r\n\t}\r\n.leaflet-left {\r\n\tleft: 0;\r\n\t}\r\n.leaflet-control {\r\n\tfloat: left;\r\n\tclear: both;\r\n\t}\r\n.leaflet-right .leaflet-control {\r\n\tfloat: right;\r\n\t}\r\n.leaflet-top .leaflet-control {\r\n\tmargin-top: 10px;\r\n\t}\r\n.leaflet-bottom .leaflet-control {\r\n\tmargin-bottom: 10px;\r\n\t}\r\n.leaflet-left .leaflet-control {\r\n\tmargin-left: 10px;\r\n\t}\r\n.leaflet-right .leaflet-control {\r\n\tmargin-right: 10px;\r\n\t}\r\n\r\n\r\n/* zoom and fade animations */\r\n\r\n.leaflet-fade-anim .leaflet-tile {\r\n\twill-change: opacity;\r\n\t}\r\n.leaflet-fade-anim .leaflet-popup {\r\n\topacity: 0;\r\n\t-webkit-transition: opacity 0.2s linear;\r\n\t -moz-transition: opacity 0.2s linear;\r\n\t transition: opacity 0.2s linear;\r\n\t}\r\n.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {\r\n\topacity: 1;\r\n\t}\r\n.leaflet-zoom-animated {\r\n\t-webkit-transform-origin: 0 0;\r\n\t -ms-transform-origin: 0 0;\r\n\t transform-origin: 0 0;\r\n\t}\r\n.leaflet-zoom-anim .leaflet-zoom-animated {\r\n\twill-change: transform;\r\n\t}\r\n.leaflet-zoom-anim .leaflet-zoom-animated {\r\n\t-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t transition: transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t}\r\n.leaflet-zoom-anim .leaflet-tile,\r\n.leaflet-pan-anim .leaflet-tile {\r\n\t-webkit-transition: none;\r\n\t -moz-transition: none;\r\n\t transition: none;\r\n\t}\r\n\r\n.leaflet-zoom-anim .leaflet-zoom-hide {\r\n\tvisibility: hidden;\r\n\t}\r\n\r\n\r\n/* cursors */\r\n\r\n.leaflet-interactive {\r\n\tcursor: pointer;\r\n\t}\r\n.leaflet-grab {\r\n\tcursor: -webkit-grab;\r\n\tcursor: -moz-grab;\r\n\tcursor: grab;\r\n\t}\r\n.leaflet-crosshair,\r\n.leaflet-crosshair .leaflet-interactive {\r\n\tcursor: crosshair;\r\n\t}\r\n.leaflet-popup-pane,\r\n.leaflet-control {\r\n\tcursor: auto;\r\n\t}\r\n.leaflet-dragging .leaflet-grab,\r\n.leaflet-dragging .leaflet-grab .leaflet-interactive,\r\n.leaflet-dragging .leaflet-marker-draggable {\r\n\tcursor: move;\r\n\tcursor: -webkit-grabbing;\r\n\tcursor: -moz-grabbing;\r\n\tcursor: grabbing;\r\n\t}\r\n\r\n/* marker & overlays interactivity */\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow,\r\n.leaflet-image-layer,\r\n.leaflet-pane > svg path,\r\n.leaflet-tile-container {\r\n\tpointer-events: none;\r\n\t}\r\n\r\n.leaflet-marker-icon.leaflet-interactive,\r\n.leaflet-image-layer.leaflet-interactive,\r\n.leaflet-pane > svg path.leaflet-interactive,\r\nsvg.leaflet-image-layer.leaflet-interactive path {\r\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\r\n\tpointer-events: auto;\r\n\t}\r\n\r\n/* visual tweaks */\r\n\r\n.leaflet-container {\r\n\tbackground: #ddd;\r\n\toutline: 0;\r\n\t}\r\n.leaflet-container a {\r\n\tcolor: #0078A8;\r\n\t}\r\n.leaflet-container a.leaflet-active {\r\n\toutline: 2px solid orange;\r\n\t}\r\n.leaflet-zoom-box {\r\n\tborder: 2px dotted #38f;\r\n\tbackground: rgba(255,255,255,0.5);\r\n\t}\r\n\r\n\r\n/* general typography */\r\n.leaflet-container {\r\n\tfont: 12px/1.5 \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n\t}\r\n\r\n\r\n/* general toolbar styles */\r\n\r\n.leaflet-bar {\r\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.65);\r\n\tborder-radius: 4px;\r\n\t}\r\n.leaflet-bar a,\r\n.leaflet-bar a:hover {\r\n\tbackground-color: #fff;\r\n\tborder-bottom: 1px solid #ccc;\r\n\twidth: 26px;\r\n\theight: 26px;\r\n\tline-height: 26px;\r\n\tdisplay: block;\r\n\ttext-align: center;\r\n\ttext-decoration: none;\r\n\tcolor: black;\r\n\t}\r\n.leaflet-bar a,\r\n.leaflet-control-layers-toggle {\r\n\tbackground-position: 50% 50%;\r\n\tbackground-repeat: no-repeat;\r\n\tdisplay: block;\r\n\t}\r\n.leaflet-bar a:hover {\r\n\tbackground-color: #f4f4f4;\r\n\t}\r\n.leaflet-bar a:first-child {\r\n\tborder-top-left-radius: 4px;\r\n\tborder-top-right-radius: 4px;\r\n\t}\r\n.leaflet-bar a:last-child {\r\n\tborder-bottom-left-radius: 4px;\r\n\tborder-bottom-right-radius: 4px;\r\n\tborder-bottom: none;\r\n\t}\r\n.leaflet-bar a.leaflet-disabled {\r\n\tcursor: default;\r\n\tbackground-color: #f4f4f4;\r\n\tcolor: #bbb;\r\n\t}\r\n\r\n.leaflet-touch .leaflet-bar a {\r\n\twidth: 30px;\r\n\theight: 30px;\r\n\tline-height: 30px;\r\n\t}\r\n.leaflet-touch .leaflet-bar a:first-child {\r\n\tborder-top-left-radius: 2px;\r\n\tborder-top-right-radius: 2px;\r\n\t}\r\n.leaflet-touch .leaflet-bar a:last-child {\r\n\tborder-bottom-left-radius: 2px;\r\n\tborder-bottom-right-radius: 2px;\r\n\t}\r\n\r\n/* zoom control */\r\n\r\n.leaflet-control-zoom-in,\r\n.leaflet-control-zoom-out {\r\n\tfont: bold 18px 'Lucida Console', Monaco, monospace;\r\n\ttext-indent: 1px;\r\n\t}\r\n\r\n.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {\r\n\tfont-size: 22px;\r\n\t}\r\n\r\n\r\n/* layers control */\r\n\r\n.leaflet-control-layers {\r\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.4);\r\n\tbackground: #fff;\r\n\tborder-radius: 5px;\r\n\t}\r\n.leaflet-control-layers-toggle {\r\n\tbackground-image: url("+l+");\r\n\twidth: 36px;\r\n\theight: 36px;\r\n\t}\r\n.leaflet-retina .leaflet-control-layers-toggle {\r\n\tbackground-image: url("+h+");\r\n\tbackground-size: 26px 26px;\r\n\t}\r\n.leaflet-touch .leaflet-control-layers-toggle {\r\n\twidth: 44px;\r\n\theight: 44px;\r\n\t}\r\n.leaflet-control-layers .leaflet-control-layers-list,\r\n.leaflet-control-layers-expanded .leaflet-control-layers-toggle {\r\n\tdisplay: none;\r\n\t}\r\n.leaflet-control-layers-expanded .leaflet-control-layers-list {\r\n\tdisplay: block;\r\n\tposition: relative;\r\n\t}\r\n.leaflet-control-layers-expanded {\r\n\tpadding: 6px 10px 6px 6px;\r\n\tcolor: #333;\r\n\tbackground: #fff;\r\n\t}\r\n.leaflet-control-layers-scrollbar {\r\n\toverflow-y: scroll;\r\n\toverflow-x: hidden;\r\n\tpadding-right: 5px;\r\n\t}\r\n.leaflet-control-layers-selector {\r\n\tmargin-top: 2px;\r\n\tposition: relative;\r\n\ttop: 1px;\r\n\t}\r\n.leaflet-control-layers label {\r\n\tdisplay: block;\r\n\t}\r\n.leaflet-control-layers-separator {\r\n\theight: 0;\r\n\tborder-top: 1px solid #ddd;\r\n\tmargin: 5px -10px 5px -6px;\r\n\t}\r\n\r\n/* Default icon URLs */\r\n.leaflet-default-icon-path {\r\n\tbackground-image: url("+u+');\r\n\t}\r\n\r\n\r\n/* attribution and scale controls */\r\n\r\n.leaflet-container .leaflet-control-attribution {\r\n\tbackground: #fff;\r\n\tbackground: rgba(255, 255, 255, 0.7);\r\n\tmargin: 0;\r\n\t}\r\n.leaflet-control-attribution,\r\n.leaflet-control-scale-line {\r\n\tpadding: 0 5px;\r\n\tcolor: #333;\r\n\t}\r\n.leaflet-control-attribution a {\r\n\ttext-decoration: none;\r\n\t}\r\n.leaflet-control-attribution a:hover {\r\n\ttext-decoration: underline;\r\n\t}\r\n.leaflet-container .leaflet-control-attribution,\r\n.leaflet-container .leaflet-control-scale {\r\n\tfont-size: 11px;\r\n\t}\r\n.leaflet-left .leaflet-control-scale {\r\n\tmargin-left: 5px;\r\n\t}\r\n.leaflet-bottom .leaflet-control-scale {\r\n\tmargin-bottom: 5px;\r\n\t}\r\n.leaflet-control-scale-line {\r\n\tborder: 2px solid #777;\r\n\tborder-top: none;\r\n\tline-height: 1.1;\r\n\tpadding: 2px 5px 1px;\r\n\tfont-size: 11px;\r\n\twhite-space: nowrap;\r\n\toverflow: hidden;\r\n\t-moz-box-sizing: border-box;\r\n\t box-sizing: border-box;\r\n\r\n\tbackground: #fff;\r\n\tbackground: rgba(255, 255, 255, 0.5);\r\n\t}\r\n.leaflet-control-scale-line:not(:first-child) {\r\n\tborder-top: 2px solid #777;\r\n\tborder-bottom: none;\r\n\tmargin-top: -2px;\r\n\t}\r\n.leaflet-control-scale-line:not(:first-child):not(:last-child) {\r\n\tborder-bottom: 2px solid #777;\r\n\t}\r\n\r\n.leaflet-touch .leaflet-control-attribution,\r\n.leaflet-touch .leaflet-control-layers,\r\n.leaflet-touch .leaflet-bar {\r\n\tbox-shadow: none;\r\n\t}\r\n.leaflet-touch .leaflet-control-layers,\r\n.leaflet-touch .leaflet-bar {\r\n\tborder: 2px solid rgba(0,0,0,0.2);\r\n\tbackground-clip: padding-box;\r\n\t}\r\n\r\n\r\n/* popup */\r\n\r\n.leaflet-popup {\r\n\tposition: absolute;\r\n\ttext-align: center;\r\n\tmargin-bottom: 20px;\r\n\t}\r\n.leaflet-popup-content-wrapper {\r\n\tpadding: 1px;\r\n\ttext-align: left;\r\n\tborder-radius: 12px;\r\n\t}\r\n.leaflet-popup-content {\r\n\tmargin: 13px 19px;\r\n\tline-height: 1.4;\r\n\t}\r\n.leaflet-popup-content p {\r\n\tmargin: 18px 0;\r\n\t}\r\n.leaflet-popup-tip-container {\r\n\twidth: 40px;\r\n\theight: 20px;\r\n\tposition: absolute;\r\n\tleft: 50%;\r\n\tmargin-left: -20px;\r\n\toverflow: hidden;\r\n\tpointer-events: none;\r\n\t}\r\n.leaflet-popup-tip {\r\n\twidth: 17px;\r\n\theight: 17px;\r\n\tpadding: 1px;\r\n\r\n\tmargin: -10px auto 0;\r\n\r\n\t-webkit-transform: rotate(45deg);\r\n\t -moz-transform: rotate(45deg);\r\n\t -ms-transform: rotate(45deg);\r\n\t transform: rotate(45deg);\r\n\t}\r\n.leaflet-popup-content-wrapper,\r\n.leaflet-popup-tip {\r\n\tbackground: white;\r\n\tcolor: #333;\r\n\tbox-shadow: 0 3px 14px rgba(0,0,0,0.4);\r\n\t}\r\n.leaflet-container a.leaflet-popup-close-button {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tpadding: 4px 4px 0 0;\r\n\tborder: none;\r\n\ttext-align: center;\r\n\twidth: 18px;\r\n\theight: 14px;\r\n\tfont: 16px/14px Tahoma, Verdana, sans-serif;\r\n\tcolor: #c3c3c3;\r\n\ttext-decoration: none;\r\n\tfont-weight: bold;\r\n\tbackground: transparent;\r\n\t}\r\n.leaflet-container a.leaflet-popup-close-button:hover {\r\n\tcolor: #999;\r\n\t}\r\n.leaflet-popup-scrolled {\r\n\toverflow: auto;\r\n\tborder-bottom: 1px solid #ddd;\r\n\tborder-top: 1px solid #ddd;\r\n\t}\r\n\r\n.leaflet-oldie .leaflet-popup-content-wrapper {\r\n\tzoom: 1;\r\n\t}\r\n.leaflet-oldie .leaflet-popup-tip {\r\n\twidth: 24px;\r\n\tmargin: 0 auto;\r\n\r\n\t-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";\r\n\tfilter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);\r\n\t}\r\n.leaflet-oldie .leaflet-popup-tip-container {\r\n\tmargin-top: -1px;\r\n\t}\r\n\r\n.leaflet-oldie .leaflet-control-zoom,\r\n.leaflet-oldie .leaflet-control-layers,\r\n.leaflet-oldie .leaflet-popup-content-wrapper,\r\n.leaflet-oldie .leaflet-popup-tip {\r\n\tborder: 1px solid #999;\r\n\t}\r\n\r\n\r\n/* div icon */\r\n\r\n.leaflet-div-icon {\r\n\tbackground: #fff;\r\n\tborder: 1px solid #666;\r\n\t}\r\n\r\n\r\n/* Tooltip */\r\n/* Base styles for the element that has a tooltip */\r\n.leaflet-tooltip {\r\n\tposition: absolute;\r\n\tpadding: 6px;\r\n\tbackground-color: #fff;\r\n\tborder: 1px solid #fff;\r\n\tborder-radius: 3px;\r\n\tcolor: #222;\r\n\twhite-space: nowrap;\r\n\t-webkit-user-select: none;\r\n\t-moz-user-select: none;\r\n\t-ms-user-select: none;\r\n\tuser-select: none;\r\n\tpointer-events: none;\r\n\tbox-shadow: 0 1px 3px rgba(0,0,0,0.4);\r\n\t}\r\n.leaflet-tooltip.leaflet-clickable {\r\n\tcursor: pointer;\r\n\tpointer-events: auto;\r\n\t}\r\n.leaflet-tooltip-top:before,\r\n.leaflet-tooltip-bottom:before,\r\n.leaflet-tooltip-left:before,\r\n.leaflet-tooltip-right:before {\r\n\tposition: absolute;\r\n\tpointer-events: none;\r\n\tborder: 6px solid transparent;\r\n\tbackground: transparent;\r\n\tcontent: "";\r\n\t}\r\n\r\n/* Directions */\r\n\r\n.leaflet-tooltip-bottom {\r\n\tmargin-top: 6px;\r\n}\r\n.leaflet-tooltip-top {\r\n\tmargin-top: -6px;\r\n}\r\n.leaflet-tooltip-bottom:before,\r\n.leaflet-tooltip-top:before {\r\n\tleft: 50%;\r\n\tmargin-left: -6px;\r\n\t}\r\n.leaflet-tooltip-top:before {\r\n\tbottom: 0;\r\n\tmargin-bottom: -12px;\r\n\tborder-top-color: #fff;\r\n\t}\r\n.leaflet-tooltip-bottom:before {\r\n\ttop: 0;\r\n\tmargin-top: -12px;\r\n\tmargin-left: -6px;\r\n\tborder-bottom-color: #fff;\r\n\t}\r\n.leaflet-tooltip-left {\r\n\tmargin-left: -6px;\r\n}\r\n.leaflet-tooltip-right {\r\n\tmargin-left: 6px;\r\n}\r\n.leaflet-tooltip-left:before,\r\n.leaflet-tooltip-right:before {\r\n\ttop: 50%;\r\n\tmargin-top: -6px;\r\n\t}\r\n.leaflet-tooltip-left:before {\r\n\tright: 0;\r\n\tmargin-right: -12px;\r\n\tborder-left-color: #fff;\r\n\t}\r\n.leaflet-tooltip-right:before {\r\n\tleft: 0;\r\n\tmargin-left: -12px;\r\n\tborder-right-color: #fff;\r\n\t}\r\n',""]),t.exports=e},function(t,e,i){i.r(e),e.default="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC"},function(t,e,i){i.r(e),e.default="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII="},function(t,e,i){i.r(e),e.default="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII="},function(t,e){!function(t,e,i){L.drawVersion="1.0.4",L.Draw={},L.drawLocal={draw:{toolbar:{actions:{title:"Cancel drawing",text:"Cancel"},finish:{title:"Finish drawing",text:"Finish"},undo:{title:"Delete last point drawn",text:"Delete last point"},buttons:{polyline:"Draw a polyline",polygon:"Draw a polygon",rectangle:"Draw a rectangle",circle:"Draw a circle",marker:"Draw a marker",circlemarker:"Draw a circlemarker"}},handlers:{circle:{tooltip:{start:"Click and drag to draw circle."},radius:"Radius"},circlemarker:{tooltip:{start:"Click map to place circle marker."}},marker:{tooltip:{start:"Click map to place marker."}},polygon:{tooltip:{start:"Click to start drawing shape.",cont:"Click to continue drawing shape.",end:"Click first point to close this shape."}},polyline:{error:"<strong>Error:</strong> shape edges cannot cross!",tooltip:{start:"Click to start drawing line.",cont:"Click to continue drawing line.",end:"Click last point to finish line."}},rectangle:{tooltip:{start:"Click and drag to draw rectangle."}},simpleshape:{tooltip:{end:"Release mouse to finish drawing."}}}},edit:{toolbar:{actions:{save:{title:"Save changes",text:"Save"},cancel:{title:"Cancel editing, discards all changes",text:"Cancel"},clearAll:{title:"Clear all layers",text:"Clear All"}},buttons:{edit:"Edit layers",editDisabled:"No layers to edit",remove:"Delete layers",removeDisabled:"No layers to delete"}},handlers:{edit:{tooltip:{text:"Drag handles or markers to edit features.",subtext:"Click cancel to undo changes."}},remove:{tooltip:{text:"Click on a feature to remove."}}}}},L.Draw.Event={},L.Draw.Event.CREATED="draw:created",L.Draw.Event.EDITED="draw:edited",L.Draw.Event.DELETED="draw:deleted",L.Draw.Event.DRAWSTART="draw:drawstart",L.Draw.Event.DRAWSTOP="draw:drawstop",L.Draw.Event.DRAWVERTEX="draw:drawvertex",L.Draw.Event.EDITSTART="draw:editstart",L.Draw.Event.EDITMOVE="draw:editmove",L.Draw.Event.EDITRESIZE="draw:editresize",L.Draw.Event.EDITVERTEX="draw:editvertex",L.Draw.Event.EDITSTOP="draw:editstop",L.Draw.Event.DELETESTART="draw:deletestart",L.Draw.Event.DELETESTOP="draw:deletestop",L.Draw.Event.TOOLBAROPENED="draw:toolbaropened",L.Draw.Event.TOOLBARCLOSED="draw:toolbarclosed",L.Draw.Event.MARKERCONTEXT="draw:markercontext",L.Draw=L.Draw||{},L.Draw.Feature=L.Handler.extend({initialize:function(t,e){this._map=t,this._container=t._container,this._overlayPane=t._panes.overlayPane,this._popupPane=t._panes.popupPane,e&&e.shapeOptions&&(e.shapeOptions=L.Util.extend({},this.options.shapeOptions,e.shapeOptions)),L.setOptions(this,e);var i=L.version.split(".");1===parseInt(i[0],10)&&parseInt(i[1],10)>=2?L.Draw.Feature.include(L.Evented.prototype):L.Draw.Feature.include(L.Mixin.Events)},enable:function(){this._enabled||(L.Handler.prototype.enable.call(this),this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DRAWSTART,{layerType:this.type}))},disable:function(){this._enabled&&(L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DRAWSTOP,{layerType:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(L.DomUtil.disableTextSelection(),t.getContainer().focus(),this._tooltip=new L.Draw.Tooltip(this._map),L.DomEvent.on(this._container,"keyup",this._cancelDrawing,this))},removeHooks:function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,"keyup",this._cancelDrawing,this))},setOptions:function(t){L.setOptions(this,t)},_fireCreatedEvent:function(t){this._map.fire(L.Draw.Event.CREATED,{layer:t,layerType:this.type})},_cancelDrawing:function(t){27===t.keyCode&&(this._map.fire("draw:canceled",{layerType:this.type}),this.disable())}}),L.Draw.Polyline=L.Draw.Feature.extend({statics:{TYPE:"polyline"},Poly:L.Polyline,options:{allowIntersection:!0,repeatMode:!1,drawError:{color:"#b00b00",timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3,factor:1,maxPoints:0},initialize:function(t,e){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this.options.drawError.message=L.drawLocal.draw.handlers.polyline.error,e&&e.drawError&&(e.drawError=L.Util.extend({},this.options.drawError,e.drawError)),this.type=L.Draw.Polyline.TYPE,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new L.Polyline([],this.options.shapeOptions),this._tooltip.updateContent(this._getTooltipText()),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mouseout",this._onMouseOut,this).on("mousemove",this._onMouseMove,this).on("mousedown",this._onMouseDown,this).on("mouseup",this._onMouseUp,this).addTo(this._map),this._map.on("mouseup",this._onMouseUp,this).on("mousemove",this._onMouseMove,this).on("zoomlevelschange",this._onZoomEnd,this).on("touchstart",this._onTouch,this).on("zoomend",this._onZoomEnd,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._clearHideErrorTimeout(),this._cleanUpShape(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,this._map.removeLayer(this._poly),delete this._poly,this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseout",this._onMouseOut,this).off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._clearGuides(),this._map.off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this).off("zoomlevelschange",this._onZoomEnd,this).off("zoomend",this._onZoomEnd,this).off("touchstart",this._onTouch,this).off("click",this._onTouch,this)},deleteLastVertex:function(){if(!(this._markers.length<=1)){var t=this._markers.pop(),e=this._poly,i=e.getLatLngs(),n=i.splice(-1,1)[0];this._poly.setLatLngs(i),this._markerGroup.removeLayer(t),e.getLatLngs().length<2&&this._map.removeLayer(e),this._vertexChanged(n,!1)}},addVertex:function(t){this._markers.length>=2&&!this.options.allowIntersection&&this._poly.newLatLngIntersects(t)?this._showErrorTooltip():(this._errorShown&&this._hideErrorTooltip(),this._markers.push(this._createMarker(t)),this._poly.addLatLng(t),2===this._poly.getLatLngs().length&&this._map.addLayer(this._poly),this._vertexChanged(t,!0))},completeShape:function(){this._markers.length<=1||!this._shapeIsValid()||(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_finishShape:function(){var t=this._poly._defaultShape?this._poly._defaultShape():this._poly.getLatLngs(),e=this._poly.newLatLngIntersects(t[t.length-1]);!this.options.allowIntersection&&e||!this._shapeIsValid()?this._showErrorTooltip():(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_shapeIsValid:function(){return!0},_onZoomEnd:function(){null!==this._markers&&this._updateGuide()},_onMouseMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent),i=this._map.layerPointToLatLng(e);this._currentLatLng=i,this._updateTooltip(i),this._updateGuide(e),this._mouseMarker.setLatLng(i),L.DomEvent.preventDefault(t.originalEvent)},_vertexChanged:function(t,e){this._map.fire(L.Draw.Event.DRAWVERTEX,{layers:this._markerGroup}),this._updateFinishHandler(),this._updateRunningMeasure(t,e),this._clearGuides(),this._updateTooltip()},_onMouseDown:function(t){if(!this._clickHandled&&!this._touchHandled&&!this._disableMarkers){this._onMouseMove(t),this._clickHandled=!0,this._disableNewMarkers();var e=t.originalEvent,i=e.clientX,n=e.clientY;this._startPoint.call(this,i,n)}},_startPoint:function(t,e){this._mouseDownOrigin=L.point(t,e)},_onMouseUp:function(t){var e=t.originalEvent,i=e.clientX,n=e.clientY;this._endPoint.call(this,i,n,t),this._clickHandled=null},_endPoint:function(e,i,n){if(this._mouseDownOrigin){var o=L.point(e,i).distanceTo(this._mouseDownOrigin),r=this._calculateFinishDistance(n.latlng);this.options.maxPoints>1&&this.options.maxPoints==this._markers.length+1?(this.addVertex(n.latlng),this._finishShape()):r<10&&L.Browser.touch?this._finishShape():Math.abs(o)<9*(t.devicePixelRatio||1)&&this.addVertex(n.latlng),this._enableNewMarkers()}this._mouseDownOrigin=null},_onTouch:function(t){var e,i,n=t.originalEvent;!n.touches||!n.touches[0]||this._clickHandled||this._touchHandled||this._disableMarkers||(e=n.touches[0].clientX,i=n.touches[0].clientY,this._disableNewMarkers(),this._touchHandled=!0,this._startPoint.call(this,e,i),this._endPoint.call(this,e,i,t),this._touchHandled=null),this._clickHandled=null},_onMouseOut:function(){this._tooltip&&this._tooltip._onMouseOut.call(this._tooltip)},_calculateFinishDistance:function(t){var e;if(this._markers.length>0){var i;if(this.type===L.Draw.Polyline.TYPE)i=this._markers[this._markers.length-1];else{if(this.type!==L.Draw.Polygon.TYPE)return 1/0;i=this._markers[0]}var n=this._map.latLngToContainerPoint(i.getLatLng()),o=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),r=this._map.latLngToContainerPoint(o.getLatLng());e=n.distanceTo(r)}else e=1/0;return e},_updateFinishHandler:function(){var t=this._markers.length;t>1&&this._markers[t-1].on("click",this._finishShape,this),t>2&&this._markers[t-2].off("click",this._finishShape,this)},_createMarker:function(t){var e=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(e),e},_updateGuide:function(t){var e=this._markers?this._markers.length:0;e>0&&(t=t||this._map.latLngToLayerPoint(this._currentLatLng),this._clearGuides(),this._drawGuide(this._map.latLngToLayerPoint(this._markers[e-1].getLatLng()),t))},_updateTooltip:function(t){var e=this._getTooltipText();t&&this._tooltip.updatePosition(t),this._errorShown||this._tooltip.updateContent(e)},_drawGuide:function(t,e){var i,n,o,r=Math.floor(Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))),a=this.options.guidelineDistance,s=this.options.maxGuideLineLength,l=r>s?r-s:a;for(this._guidesContainer||(this._guidesContainer=L.DomUtil.create("div","leaflet-draw-guides",this._overlayPane));l<r;l+=this.options.guidelineDistance)i=l/r,n={x:Math.floor(t.x*(1-i)+i*e.x),y:Math.floor(t.y*(1-i)+i*e.y)},(o=L.DomUtil.create("div","leaflet-draw-guide-dash",this._guidesContainer)).style.backgroundColor=this._errorShown?this.options.drawError.color:this.options.shapeOptions.color,L.DomUtil.setPosition(o,n)},_updateGuideColor:function(t){if(this._guidesContainer)for(var e=0,i=this._guidesContainer.childNodes.length;e<i;e++)this._guidesContainer.childNodes[e].style.backgroundColor=t},_clearGuides:function(){if(this._guidesContainer)for(;this._guidesContainer.firstChild;)this._guidesContainer.removeChild(this._guidesContainer.firstChild)},_getTooltipText:function(){var t,e,i=this.options.showLength;return 0===this._markers.length?t={text:L.drawLocal.draw.handlers.polyline.tooltip.start}:(e=i?this._getMeasurementString():"",t=1===this._markers.length?{text:L.drawLocal.draw.handlers.polyline.tooltip.cont,subtext:e}:{text:L.drawLocal.draw.handlers.polyline.tooltip.end,subtext:e}),t},_updateRunningMeasure:function(t,e){var i,n,o=this._markers.length;1===this._markers.length?this._measurementRunningTotal=0:(i=o-(e?2:1),n=L.GeometryUtil.isVersion07x()?t.distanceTo(this._markers[i].getLatLng())*(this.options.factor||1):this._map.distance(t,this._markers[i].getLatLng())*(this.options.factor||1),this._measurementRunningTotal+=n*(e?1:-1))},_getMeasurementString:function(){var t,e=this._currentLatLng,i=this._markers[this._markers.length-1].getLatLng();return t=L.GeometryUtil.isVersion07x()?i&&e&&e.distanceTo?this._measurementRunningTotal+e.distanceTo(i)*(this.options.factor||1):this._measurementRunningTotal||0:i&&e?this._measurementRunningTotal+this._map.distance(e,i)*(this.options.factor||1):this._measurementRunningTotal||0,L.GeometryUtil.readableDistance(t,this.options.metric,this.options.feet,this.options.nautic,this.options.precision)},_showErrorTooltip:function(){this._errorShown=!0,this._tooltip.showAsError().updateContent({text:this.options.drawError.message}),this._updateGuideColor(this.options.drawError.color),this._poly.setStyle({color:this.options.drawError.color}),this._clearHideErrorTimeout(),this._hideErrorTimeout=setTimeout(L.Util.bind(this._hideErrorTooltip,this),this.options.drawError.timeout)},_hideErrorTooltip:function(){this._errorShown=!1,this._clearHideErrorTimeout(),this._tooltip.removeError().updateContent(this._getTooltipText()),this._updateGuideColor(this.options.shapeOptions.color),this._poly.setStyle({color:this.options.shapeOptions.color})},_clearHideErrorTimeout:function(){this._hideErrorTimeout&&(clearTimeout(this._hideErrorTimeout),this._hideErrorTimeout=null)},_disableNewMarkers:function(){this._disableMarkers=!0},_enableNewMarkers:function(){setTimeout(function(){this._disableMarkers=!1}.bind(this),50)},_cleanUpShape:function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this)},_fireCreatedEvent:function(){var t=new this.Poly(this._poly.getLatLngs(),this.options.shapeOptions);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.Polygon=L.Draw.Polyline.extend({statics:{TYPE:"polygon"},Poly:L.Polygon,options:{showArea:!1,showLength:!1,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},metric:!0,feet:!0,nautic:!1,precision:{}},initialize:function(t,e){L.Draw.Polyline.prototype.initialize.call(this,t,e),this.type=L.Draw.Polygon.TYPE},_updateFinishHandler:function(){var t=this._markers.length;1===t&&this._markers[0].on("click",this._finishShape,this),t>2&&(this._markers[t-1].on("dblclick",this._finishShape,this),t>3&&this._markers[t-2].off("dblclick",this._finishShape,this))},_getTooltipText:function(){var t,e;return 0===this._markers.length?t=L.drawLocal.draw.handlers.polygon.tooltip.start:this._markers.length<3?(t=L.drawLocal.draw.handlers.polygon.tooltip.cont,e=this._getMeasurementString()):(t=L.drawLocal.draw.handlers.polygon.tooltip.end,e=this._getMeasurementString()),{text:t,subtext:e}},_getMeasurementString:function(){var t=this._area,e="";return t||this.options.showLength?(this.options.showLength&&(e=L.Draw.Polyline.prototype._getMeasurementString.call(this)),t&&(e+="<br>"+L.GeometryUtil.readableArea(t,this.options.metric,this.options.precision)),e):null},_shapeIsValid:function(){return this._markers.length>=3},_vertexChanged:function(t,e){var i;!this.options.allowIntersection&&this.options.showArea&&(i=this._poly.getLatLngs(),this._area=L.GeometryUtil.geodesicArea(i)),L.Draw.Polyline.prototype._vertexChanged.call(this,t,e)},_cleanUpShape:function(){var t=this._markers.length;t>0&&(this._markers[0].off("click",this._finishShape,this),t>2&&this._markers[t-1].off("dblclick",this._finishShape,this))}}),L.SimpleShape={},L.Draw.SimpleShape=L.Draw.Feature.extend({options:{repeatMode:!1},initialize:function(t,e){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._mapDraggable=this._map.dragging.enabled(),this._mapDraggable&&this._map.dragging.disable(),this._container.style.cursor="crosshair",this._tooltip.updateContent({text:this._initialLabelText}),this._map.on("mousedown",this._onMouseDown,this).on("mousemove",this._onMouseMove,this).on("touchstart",this._onMouseDown,this).on("touchmove",this._onMouseMove,this),e.addEventListener("touchstart",L.DomEvent.preventDefault,{passive:!1}))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._mapDraggable&&this._map.dragging.enable(),this._container.style.cursor="",this._map.off("mousedown",this._onMouseDown,this).off("mousemove",this._onMouseMove,this).off("touchstart",this._onMouseDown,this).off("touchmove",this._onMouseMove,this),L.DomEvent.off(e,"mouseup",this._onMouseUp,this),L.DomEvent.off(e,"touchend",this._onMouseUp,this),e.removeEventListener("touchstart",L.DomEvent.preventDefault),this._shape&&(this._map.removeLayer(this._shape),delete this._shape)),this._isDrawing=!1},_getTooltipText:function(){return{text:this._endLabelText}},_onMouseDown:function(t){this._isDrawing=!0,this._startLatLng=t.latlng,L.DomEvent.on(e,"mouseup",this._onMouseUp,this).on(e,"touchend",this._onMouseUp,this).preventDefault(t.originalEvent)},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._isDrawing&&(this._tooltip.updateContent(this._getTooltipText()),this._drawShape(e))},_onMouseUp:function(){this._shape&&this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()}}),L.Draw.Rectangle=L.Draw.SimpleShape.extend({statics:{TYPE:"rectangle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showArea:!0,metric:!0},initialize:function(t,e){this.type=L.Draw.Rectangle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.rectangle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},disable:function(){this._enabled&&(this._isCurrentlyTwoClickDrawing=!1,L.Draw.SimpleShape.prototype.disable.call(this))},_onMouseUp:function(t){this._shape||this._isCurrentlyTwoClickDrawing?this._isCurrentlyTwoClickDrawing&&!function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}(t.target,"leaflet-pane")||L.Draw.SimpleShape.prototype._onMouseUp.call(this):this._isCurrentlyTwoClickDrawing=!0},_drawShape:function(t){this._shape?this._shape.setBounds(new L.LatLngBounds(this._startLatLng,t)):(this._shape=new L.Rectangle(new L.LatLngBounds(this._startLatLng,t),this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_getTooltipText:function(){var t,e,i,n=L.Draw.SimpleShape.prototype._getTooltipText.call(this),o=this._shape,r=this.options.showArea;return o&&(t=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),e=L.GeometryUtil.geodesicArea(t),i=r?L.GeometryUtil.readableArea(e,this.options.metric):""),{text:n.text,subtext:i}}}),L.Draw.Marker=L.Draw.Feature.extend({statics:{TYPE:"marker"},options:{icon:new L.Icon.Default,repeatMode:!1,zIndexOffset:2e3},initialize:function(t,e){this.type=L.Draw.Marker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.marker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._tooltip.updateContent({text:this._initialLabelText}),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("click",this._onClick,this).addTo(this._map),this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onTouch,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._map.off("click",this._onClick,this).off("click",this._onTouch,this),this._marker&&(this._marker.off("click",this._onClick,this),this._map.removeLayer(this._marker),delete this._marker),this._mouseMarker.off("click",this._onClick,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mousemove",this._onMouseMove,this))},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._mouseMarker.setLatLng(e),this._marker?(e=this._mouseMarker.getLatLng(),this._marker.setLatLng(e)):(this._marker=this._createMarker(e),this._marker.on("click",this._onClick,this),this._map.on("click",this._onClick,this).addLayer(this._marker))},_createMarker:function(t){return new L.Marker(t,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset})},_onClick:function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_onTouch:function(t){this._onMouseMove(t),this._onClick()},_fireCreatedEvent:function(){var t=new L.Marker.Touch(this._marker.getLatLng(),{icon:this.options.icon});L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.CircleMarker=L.Draw.Marker.extend({statics:{TYPE:"circlemarker"},options:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0,zIndexOffset:2e3},initialize:function(t,e){this.type=L.Draw.CircleMarker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circlemarker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,t,e)},_fireCreatedEvent:function(){var t=new L.CircleMarker(this._marker.getLatLng(),this.options);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)},_createMarker:function(t){return new L.CircleMarker(t,this.options)}}),L.Draw.Circle=L.Draw.SimpleShape.extend({statics:{TYPE:"circle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showRadius:!0,metric:!0,feet:!0,nautic:!1},initialize:function(t,e){this.type=L.Draw.Circle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},_drawShape:function(t){if(L.GeometryUtil.isVersion07x())var e=this._startLatLng.distanceTo(t);else e=this._map.distance(this._startLatLng,t);this._shape?this._shape.setRadius(e):(this._shape=new L.Circle(this._startLatLng,e,this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_onMouseMove:function(t){var e,i=t.latlng,n=this.options.showRadius,o=this.options.metric;if(this._tooltip.updatePosition(i),this._isDrawing){this._drawShape(i),e=this._shape.getRadius().toFixed(1);var r="";n&&(r=L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(e,o,this.options.feet,this.options.nautic)),this._tooltip.updateContent({text:this._endLabelText,subtext:r})}}}),L.Edit=L.Edit||{},L.Edit.Marker=L.Handler.extend({initialize:function(t,e){this._marker=t,L.setOptions(this,e)},addHooks:function(){var t=this._marker;t.dragging.enable(),t.on("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},removeHooks:function(){var t=this._marker;t.dragging.disable(),t.off("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},_onDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_toggleMarkerHighlight:function(){var t=this._marker._icon;t&&(t.style.display="none",L.DomUtil.hasClass(t,"leaflet-edit-marker-selected")?(L.DomUtil.removeClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,-4)):(L.DomUtil.addClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,4)),t.style.display="")},_offsetMarker:function(t,e){var i=parseInt(t.style.marginTop,10)-e,n=parseInt(t.style.marginLeft,10)-e;t.style.marginTop=i+"px",t.style.marginLeft=n+"px"}}),L.Marker.addInitHook(function(){L.Edit.Marker&&(this.editing=new L.Edit.Marker(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.Poly=L.Handler.extend({initialize:function(t){this.latlngs=[t._latlngs],t._holes&&(this.latlngs=this.latlngs.concat(t._holes)),this._poly=t,this._poly.on("revert-edited",this._updateLatLngs,this)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._poly._latlngs)?this._poly._latlngs:this._poly._latlngs[0]:this._poly._latlngs},_eachVertexHandler:function(t){for(var e=0;e<this._verticesHandlers.length;e++)t(this._verticesHandlers[e])},addHooks:function(){this._initHandlers(),this._eachVertexHandler(function(t){t.addHooks()})},removeHooks:function(){this._eachVertexHandler(function(t){t.removeHooks()})},updateMarkers:function(){this._eachVertexHandler(function(t){t.updateMarkers()})},_initHandlers:function(){this._verticesHandlers=[];for(var t=0;t<this.latlngs.length;t++)this._verticesHandlers.push(new L.Edit.PolyVerticesEdit(this._poly,this.latlngs[t],this._poly.options.poly))},_updateLatLngs:function(t){this.latlngs=[t.layer._latlngs],t.layer._holes&&(this.latlngs=this.latlngs.concat(t.layer._holes))}}),L.Edit.PolyVerticesEdit=L.Handler.extend({options:{icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),drawError:{color:"#b00b00",timeout:1e3}},initialize:function(t,e,i){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this._poly=t,i&&i.drawError&&(i.drawError=L.Util.extend({},this.options.drawError,i.drawError)),this._latlngs=e,L.setOptions(this,i)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]:this._latlngs},addHooks:function(){var t=this._poly,e=t._path;t instanceof L.Polygon||(t.options.fill=!1,t.options.editing&&(t.options.editing.fill=!1)),e&&t.options.editing&&t.options.editing.className&&(t.options.original.className&&t.options.original.className.split(" ").forEach(function(t){L.DomUtil.removeClass(e,t)}),t.options.editing.className.split(" ").forEach(function(t){L.DomUtil.addClass(e,t)})),t.setStyle(t.options.editing),this._poly._map&&(this._map=this._poly._map,this._markerGroup||this._initMarkers(),this._poly._map.addLayer(this._markerGroup))},removeHooks:function(){var t=this._poly,e=t._path;e&&t.options.editing&&t.options.editing.className&&(t.options.editing.className.split(" ").forEach(function(t){L.DomUtil.removeClass(e,t)}),t.options.original.className&&t.options.original.className.split(" ").forEach(function(t){L.DomUtil.addClass(e,t)})),t.setStyle(t.options.original),t._map&&(t._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers)},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._markers=[];var t,e,i,n,o,r,a=this._defaultShape();for(t=0,i=a.length;t<i;t++)(n=this._createMarker(a[t],t)).on("click",this._onMarkerClick,this),n.on("contextmenu",this._onContextMenu,this),this._markers.push(n);for(t=0,e=i-1;t<i;e=t++)(0!==t||L.Polygon&&this._poly instanceof L.Polygon)&&(o=this._markers[e],r=this._markers[t],this._createMiddleMarker(o,r),this._updatePrevNext(o,r))},_createMarker:function(t,e){var i=new L.Marker.Touch(t,{draggable:!0,icon:this.options.icon});return i._origLatLng=t,i._index=e,i.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._fireEdit,this).on("touchmove",this._onTouchMove,this).on("touchend",this._fireEdit,this).on("MSPointerMove",this._onTouchMove,this).on("MSPointerUp",this._fireEdit,this),this._markerGroup.addLayer(i),i},_onMarkerDragStart:function(){this._poly.fire("editstart")},_spliceLatLngs:function(){var t=this._defaultShape(),e=[].splice.apply(t,arguments);return this._poly._convertLatLngs(t,!0),this._poly.redraw(),e},_removeMarker:function(t){var e=t._index;this._markerGroup.removeLayer(t),this._markers.splice(e,1),this._spliceLatLngs(e,1),this._updateIndexes(e,-1),t.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._fireEdit,this).off("touchmove",this._onMarkerDrag,this).off("touchend",this._fireEdit,this).off("click",this._onMarkerClick,this).off("MSPointerMove",this._onTouchMove,this).off("MSPointerUp",this._fireEdit,this)},_fireEdit:function(){this._poly.edited=!0,this._poly.fire("edit"),this._poly._map.fire(L.Draw.Event.EDITVERTEX,{layers:this._markerGroup,poly:this._poly})},_onMarkerDrag:function(t){var e=t.target,i=this._poly,n=L.LatLngUtil.cloneLatLng(e._origLatLng);if(L.extend(e._origLatLng,e._latlng),i.options.poly){var o=i._map._editTooltip;if(!i.options.poly.allowIntersection&&i.intersects()){L.extend(e._origLatLng,n),e.setLatLng(n);var r=i.options.color;i.setStyle({color:this.options.drawError.color}),o&&o.updateContent({text:L.drawLocal.draw.handlers.polyline.error}),setTimeout(function(){i.setStyle({color:r}),o&&o.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext})},1e3)}}e._middleLeft&&e._middleLeft.setLatLng(this._getMiddleLatLng(e._prev,e)),e._middleRight&&e._middleRight.setLatLng(this._getMiddleLatLng(e,e._next)),this._poly._bounds._southWest=L.latLng(1/0,1/0),this._poly._bounds._northEast=L.latLng(-1/0,-1/0);var a=this._poly.getLatLngs();this._poly._convertLatLngs(a,!0),this._poly.redraw(),this._poly.fire("editdrag")},_onMarkerClick:function(t){var e=L.Polygon&&this._poly instanceof L.Polygon?4:3,i=t.target;this._defaultShape().length<e||(this._removeMarker(i),this._updatePrevNext(i._prev,i._next),i._middleLeft&&this._markerGroup.removeLayer(i._middleLeft),i._middleRight&&this._markerGroup.removeLayer(i._middleRight),i._prev&&i._next?this._createMiddleMarker(i._prev,i._next):i._prev?i._next||(i._prev._middleRight=null):i._next._middleLeft=null,this._fireEdit())},_onContextMenu:function(t){var e=t.target;this._poly,this._poly._map.fire(L.Draw.Event.MARKERCONTEXT,{marker:e,layers:this._markerGroup,poly:this._poly}),L.DomEvent.stopPropagation},_onTouchMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent.touches[0]),i=this._map.layerPointToLatLng(e),n=t.target;L.extend(n._origLatLng,i),n._middleLeft&&n._middleLeft.setLatLng(this._getMiddleLatLng(n._prev,n)),n._middleRight&&n._middleRight.setLatLng(this._getMiddleLatLng(n,n._next)),this._poly.redraw(),this.updateMarkers()},_updateIndexes:function(t,e){this._markerGroup.eachLayer(function(i){i._index>t&&(i._index+=e)})},_createMiddleMarker:function(t,e){var i,n,o,r=this._getMiddleLatLng(t,e),a=this._createMarker(r);a.setOpacity(.6),t._middleRight=e._middleLeft=a,n=function(){a.off("touchmove",n,this);var o=e._index;a._index=o,a.off("click",i,this).on("click",this._onMarkerClick,this),r.lat=a.getLatLng().lat,r.lng=a.getLatLng().lng,this._spliceLatLngs(o,0,r),this._markers.splice(o,0,a),a.setOpacity(1),this._updateIndexes(o,1),e._index++,this._updatePrevNext(t,a),this._updatePrevNext(a,e),this._poly.fire("editstart")},o=function(){a.off("dragstart",n,this),a.off("dragend",o,this),a.off("touchmove",n,this),this._createMiddleMarker(t,a),this._createMiddleMarker(a,e)},i=function(){n.call(this),o.call(this),this._fireEdit()},a.on("click",i,this).on("dragstart",n,this).on("dragend",o,this).on("touchmove",n,this),this._markerGroup.addLayer(a)},_updatePrevNext:function(t,e){t&&(t._next=e),e&&(e._prev=t)},_getMiddleLatLng:function(t,e){var i=this._poly._map,n=i.project(t.getLatLng()),o=i.project(e.getLatLng());return i.unproject(n._add(o)._divideBy(2))}}),L.Polyline.addInitHook(function(){this.editing||(L.Edit.Poly&&(this.editing=new L.Edit.Poly(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()}))}),L.Edit=L.Edit||{},L.Edit.SimpleShape=L.Handler.extend({options:{moveIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move"}),resizeIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize"}),touchMoveIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move leaflet-touch-icon"}),touchResizeIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize leaflet-touch-icon"})},initialize:function(t,e){L.Browser.touch&&(this.options.moveIcon=this.options.touchMoveIcon,this.options.resizeIcon=this.options.touchResizeIcon),this._shape=t,L.Util.setOptions(this,e)},addHooks:function(){var t=this._shape;this._shape._map&&(this._map=this._shape._map,t.setStyle(t.options.editing),t._map&&(this._map=t._map,this._markerGroup||this._initMarkers(),this._map.addLayer(this._markerGroup)))},removeHooks:function(){var t=this._shape;if(t.setStyle(t.options.original),t._map){this._unbindMarker(this._moveMarker);for(var e=0,i=this._resizeMarkers.length;e<i;e++)this._unbindMarker(this._resizeMarkers[e]);this._resizeMarkers=null,this._map.removeLayer(this._markerGroup),delete this._markerGroup}this._map=null},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._createMoveMarker(),this._createResizeMarker()},_createMoveMarker:function(){},_createResizeMarker:function(){},_createMarker:function(t,e){var i=new L.Marker.Touch(t,{draggable:!0,icon:e,zIndexOffset:10});return this._bindMarker(i),this._markerGroup.addLayer(i),i},_bindMarker:function(t){t.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._onMarkerDragEnd,this).on("touchstart",this._onTouchStart,this).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onTouchEnd,this).on("MSPointerUp",this._onTouchEnd,this)},_unbindMarker:function(t){t.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._onMarkerDragEnd,this).off("touchstart",this._onTouchStart,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onTouchEnd,this).off("MSPointerUp",this._onTouchEnd,this)},_onMarkerDragStart:function(t){t.target.setOpacity(0),this._shape.fire("editstart")},_fireEdit:function(){this._shape.edited=!0,this._shape.fire("edit")},_onMarkerDrag:function(t){var e=t.target,i=e.getLatLng();e===this._moveMarker?this._move(i):this._resize(i),this._shape.redraw(),this._shape.fire("editdrag")},_onMarkerDragEnd:function(t){t.target.setOpacity(1),this._fireEdit()},_onTouchStart:function(t){if(L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,t),"function"==typeof this._getCorners){var e=this._getCorners(),i=t.target,n=i._cornerIndex;i.setOpacity(0),this._oppositeCorner=e[(n+2)%4],this._toggleCornerMarkers(0,n)}this._shape.fire("editstart")},_onTouchMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent.touches[0]),i=this._map.layerPointToLatLng(e);return t.target===this._moveMarker?this._move(i):this._resize(i),this._shape.redraw(),!1},_onTouchEnd:function(t){t.target.setOpacity(1),this.updateMarkers(),this._fireEdit()},_move:function(){},_resize:function(){}}),L.Edit=L.Edit||{},L.Edit.Rectangle=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var t=this._shape.getBounds().getCenter();this._moveMarker=this._createMarker(t,this.options.moveIcon)},_createResizeMarker:function(){var t=this._getCorners();this._resizeMarkers=[];for(var e=0,i=t.length;e<i;e++)this._resizeMarkers.push(this._createMarker(t[e],this.options.resizeIcon)),this._resizeMarkers[e]._cornerIndex=e},_onMarkerDragStart:function(t){L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,t);var e=this._getCorners(),i=t.target._cornerIndex;this._oppositeCorner=e[(i+2)%4],this._toggleCornerMarkers(0,i)},_onMarkerDragEnd:function(t){var e,i=t.target;i===this._moveMarker&&(e=this._shape.getBounds().getCenter(),i.setLatLng(e)),this._toggleCornerMarkers(1),this._repositionCornerMarkers(),L.Edit.SimpleShape.prototype._onMarkerDragEnd.call(this,t)},_move:function(t){for(var e,i=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),n=this._shape.getBounds().getCenter(),o=[],r=0,a=i.length;r<a;r++)e=[i[r].lat-n.lat,i[r].lng-n.lng],o.push([t.lat+e[0],t.lng+e[1]]);this._shape.setLatLngs(o),this._repositionCornerMarkers(),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})},_resize:function(t){var e;this._shape.setBounds(L.latLngBounds(t,this._oppositeCorner)),e=this._shape.getBounds(),this._moveMarker.setLatLng(e.getCenter()),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})},_getCorners:function(){var t=this._shape.getBounds();return[t.getNorthWest(),t.getNorthEast(),t.getSouthEast(),t.getSouthWest()]},_toggleCornerMarkers:function(t){for(var e=0,i=this._resizeMarkers.length;e<i;e++)this._resizeMarkers[e].setOpacity(t)},_repositionCornerMarkers:function(){for(var t=this._getCorners(),e=0,i=this._resizeMarkers.length;e<i;e++)this._resizeMarkers[e].setLatLng(t[e])}}),L.Rectangle.addInitHook(function(){L.Edit.Rectangle&&(this.editing=new L.Edit.Rectangle(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.CircleMarker=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var t=this._shape.getLatLng();this._moveMarker=this._createMarker(t,this.options.moveIcon)},_createResizeMarker:function(){this._resizeMarkers=[]},_move:function(t){if(this._resizeMarkers.length){var e=this._getResizeMarkerPoint(t);this._resizeMarkers[0].setLatLng(e)}this._shape.setLatLng(t),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})}}),L.CircleMarker.addInitHook(function(){L.Edit.CircleMarker&&(this.editing=new L.Edit.CircleMarker(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})}),L.Edit=L.Edit||{},L.Edit.Circle=L.Edit.CircleMarker.extend({_createResizeMarker:function(){var t=this._shape.getLatLng(),e=this._getResizeMarkerPoint(t);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(e,this.options.resizeIcon))},_getResizeMarkerPoint:function(t){var e=this._shape._radius*Math.cos(Math.PI/4),i=this._map.project(t);return this._map.unproject([i.x+e,i.y-e])},_resize:function(t){var e=this._moveMarker.getLatLng();L.GeometryUtil.isVersion07x()?radius=e.distanceTo(t):radius=this._map.distance(e,t),this._shape.setRadius(radius),this._map.editTooltip&&this._map._editTooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.subtext+"<br />"+L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(radius,!0,this.options.feet,this.options.nautic)}),this._shape.setRadius(radius),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})}}),L.Circle.addInitHook(function(){L.Edit.Circle&&(this.editing=new L.Edit.Circle(this),this.options.editable&&this.editing.enable())}),L.Map.mergeOptions({touchExtend:!0}),L.Map.TouchExtend=L.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane},addHooks:function(){L.DomEvent.on(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.on(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.on(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.on(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.on(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.on(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.on(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.on(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.on(this._container,"touchleave",this._onTouchLeave,this))},removeHooks:function(){L.DomEvent.off(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.off(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.off(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.off(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.off(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.off(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.off(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.off(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.off(this._container,"touchleave",this._onTouchLeave,this))},_touchEvent:function(t,e){var i={};if(void 0!==t.touches){if(!t.touches.length)return;i=t.touches[0]}else{if("touch"!==t.pointerType)return;if(i=t,!this._filterClick(t))return}var n=this._map.mouseEventToContainerPoint(i),o=this._map.mouseEventToLayerPoint(i),r=this._map.layerPointToLatLng(o);this._map.fire(e,{latlng:r,layerPoint:o,containerPoint:n,pageX:i.pageX,pageY:i.pageY,originalEvent:t})},_filterClick:function(t){var e=t.timeStamp||t.originalEvent.timeStamp,i=L.DomEvent._lastClick&&e-L.DomEvent._lastClick;return i&&i>100&&i<500||t.target._simulatedClick&&!t._simulated?(L.DomEvent.stop(t),!1):(L.DomEvent._lastClick=e,!0)},_onTouchStart:function(t){this._map._loaded&&this._touchEvent(t,"touchstart")},_onTouchEnd:function(t){this._map._loaded&&this._touchEvent(t,"touchend")},_onTouchCancel:function(t){if(this._map._loaded){var e="touchcancel";this._detectIE()&&(e="pointercancel"),this._touchEvent(t,e)}},_onTouchLeave:function(t){this._map._loaded&&this._touchEvent(t,"touchleave")},_onTouchMove:function(t){this._map._loaded&&this._touchEvent(t,"touchmove")},_detectIE:function(){var e=t.navigator.userAgent,i=e.indexOf("MSIE ");if(i>0)return parseInt(e.substring(i+5,e.indexOf(".",i)),10);if(e.indexOf("Trident/")>0){var n=e.indexOf("rv:");return parseInt(e.substring(n+3,e.indexOf(".",n)),10)}var o=e.indexOf("Edge/");return o>0&&parseInt(e.substring(o+5,e.indexOf(".",o)),10)}}),L.Map.addInitHook("addHandler","touchExtend",L.Map.TouchExtend),L.Marker.Touch=L.Marker.extend({_initInteraction:function(){return this.addInteractiveTarget?L.Marker.prototype._initInteraction.apply(this):this._initInteractionLegacy()},_initInteractionLegacy:function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu","touchstart","touchend","touchmove"];this._detectIE?e.concat(["MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"]):e.concat(["touchcancel"]),L.DomUtil.addClass(t,"leaflet-clickable"),L.DomEvent.on(t,"click",this._onMouseClick,this),L.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var i=0;i<e.length;i++)L.DomEvent.on(t,e[i],this._fireMouseEvent,this);L.Handler.MarkerDrag&&(this.dragging=new L.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_detectIE:function(){var e=t.navigator.userAgent,i=e.indexOf("MSIE ");if(i>0)return parseInt(e.substring(i+5,e.indexOf(".",i)),10);if(e.indexOf("Trident/")>0){var n=e.indexOf("rv:");return parseInt(e.substring(n+3,e.indexOf(".",n)),10)}var o=e.indexOf("Edge/");return o>0&&parseInt(e.substring(o+5,e.indexOf(".",o)),10)}}),L.LatLngUtil={cloneLatLngs:function(t){for(var e=[],i=0,n=t.length;i<n;i++)Array.isArray(t[i])?e.push(L.LatLngUtil.cloneLatLngs(t[i])):e.push(this.cloneLatLng(t[i]));return e},cloneLatLng:function(t){return L.latLng(t.lat,t.lng)}},function(){var t={km:2,ha:2,m:0,mi:2,ac:2,yd:0,ft:0,nm:2};L.GeometryUtil=L.extend(L.GeometryUtil||{},{geodesicArea:function(t){var e,i,n=t.length,o=0,r=Math.PI/180;if(n>2){for(var a=0;a<n;a++)e=t[a],o+=((i=t[(a+1)%n]).lng-e.lng)*r*(2+Math.sin(e.lat*r)+Math.sin(i.lat*r));o=6378137*o*6378137/2}return Math.abs(o)},formattedNumber:function(t,e){var i=parseFloat(t).toFixed(e),n=L.drawLocal.format&&L.drawLocal.format.numeric,o=n&&n.delimiters,r=o&&o.thousands,a=o&&o.decimal;if(r||a){var s=i.split(".");i=r?s[0].replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+r):s[0],a=a||".",s.length>1&&(i=i+a+s[1])}return i},readableArea:function(e,i,n){var o,r;n=L.Util.extend({},t,n);return i?(r=["ha","m"],type=typeof i,"string"===type?r=[i]:"boolean"!==type&&(r=i),o=e>=1e6&&-1!==r.indexOf("km")?L.GeometryUtil.formattedNumber(1e-6*e,n.km)+" km²":e>=1e4&&-1!==r.indexOf("ha")?L.GeometryUtil.formattedNumber(1e-4*e,n.ha)+" ha":L.GeometryUtil.formattedNumber(e,n.m)+" m²"):o=(e/=.836127)>=3097600?L.GeometryUtil.formattedNumber(e/3097600,n.mi)+" mi²":e>=4840?L.GeometryUtil.formattedNumber(e/4840,n.ac)+" acres":L.GeometryUtil.formattedNumber(e,n.yd)+" yd²",o},readableDistance:function(e,i,n,o,r){var a;r=L.Util.extend({},t,r);switch(i?"string"==typeof i?i:"metric":n?"feet":o?"nauticalMile":"yards"){case"metric":a=e>1e3?L.GeometryUtil.formattedNumber(e/1e3,r.km)+" km":L.GeometryUtil.formattedNumber(e,r.m)+" m";break;case"feet":e*=3.28083,a=L.GeometryUtil.formattedNumber(e,r.ft)+" ft";break;case"nauticalMile":e*=.53996,a=L.GeometryUtil.formattedNumber(e/1e3,r.nm)+" nm";break;case"yards":default:a=(e*=1.09361)>1760?L.GeometryUtil.formattedNumber(e/1760,r.mi)+" miles":L.GeometryUtil.formattedNumber(e,r.yd)+" yd"}return a},isVersion07x:function(){var t=L.version.split(".");return 0===parseInt(t[0],10)&&7===parseInt(t[1],10)}})}(),L.Util.extend(L.LineUtil,{segmentsIntersect:function(t,e,i,n){return this._checkCounterclockwise(t,i,n)!==this._checkCounterclockwise(e,i,n)&&this._checkCounterclockwise(t,e,i)!==this._checkCounterclockwise(t,e,n)},_checkCounterclockwise:function(t,e,i){return(i.y-t.y)*(e.x-t.x)>(e.y-t.y)*(i.x-t.x)}}),L.Polyline.include({intersects:function(){var t,e,i,n=this._getProjectedPoints(),o=n?n.length:0;if(this._tooFewPointsForIntersection())return!1;for(t=o-1;t>=3;t--)if(e=n[t-1],i=n[t],this._lineSegmentsIntersectsRange(e,i,t-2))return!0;return!1},newLatLngIntersects:function(t,e){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(t),e)},newPointIntersects:function(t,e){var i=this._getProjectedPoints(),n=i?i.length:0,o=i?i[n-1]:null,r=n-2;return!this._tooFewPointsForIntersection(1)&&this._lineSegmentsIntersectsRange(o,t,r,e?1:0)},_tooFewPointsForIntersection:function(t){var e=this._getProjectedPoints(),i=e?e.length:0;return!e||(i+=t||0)<=3},_lineSegmentsIntersectsRange:function(t,e,i,n){var o,r,a=this._getProjectedPoints();n=n||0;for(var s=i;s>n;s--)if(o=a[s-1],r=a[s],L.LineUtil.segmentsIntersect(t,e,o,r))return!0;return!1},_getProjectedPoints:function(){if(!this._defaultShape)return this._originalPoints;for(var t=[],e=this._defaultShape(),i=0;i<e.length;i++)t.push(this._map.latLngToLayerPoint(e[i]));return t}}),L.Polygon.include({intersects:function(){var t,e,i,n,o=this._getProjectedPoints();return!this._tooFewPointsForIntersection()&&(!!L.Polyline.prototype.intersects.call(this)||(t=o.length,e=o[0],i=o[t-1],n=t-2,this._lineSegmentsIntersectsRange(i,e,n,1)))}}),L.Control.Draw=L.Control.extend({options:{position:"topleft",draw:{},edit:!1},initialize:function(t){if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");var e;L.Control.prototype.initialize.call(this,t),this._toolbars={},L.DrawToolbar&&this.options.draw&&(e=new L.DrawToolbar(this.options.draw),this._toolbars[L.DrawToolbar.TYPE]=e,this._toolbars[L.DrawToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.EditToolbar&&this.options.edit&&(e=new L.EditToolbar(this.options.edit),this._toolbars[L.EditToolbar.TYPE]=e,this._toolbars[L.EditToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.toolbar=this},onAdd:function(t){var e,i=L.DomUtil.create("div","leaflet-draw"),n=!1;for(var o in this._toolbars)this._toolbars.hasOwnProperty(o)&&(e=this._toolbars[o].addToolbar(t))&&(n||(L.DomUtil.hasClass(e,"leaflet-draw-toolbar-top")||L.DomUtil.addClass(e.childNodes[0],"leaflet-draw-toolbar-top"),n=!0),i.appendChild(e));return i},onRemove:function(){for(var t in this._toolbars)this._toolbars.hasOwnProperty(t)&&this._toolbars[t].removeToolbar()},setDrawingOptions:function(t){for(var e in this._toolbars)this._toolbars[e]instanceof L.DrawToolbar&&this._toolbars[e].setOptions(t)},_toolbarEnabled:function(t){var e=t.target;for(var i in this._toolbars)this._toolbars[i]!==e&&this._toolbars[i].disable()}}),L.Map.mergeOptions({drawControlTooltips:!0,drawControl:!1}),L.Map.addInitHook(function(){this.options.drawControl&&(this.drawControl=new L.Control.Draw,this.addControl(this.drawControl))}),L.Toolbar=L.Class.extend({initialize:function(t){L.setOptions(this,t),this._modes={},this._actionButtons=[],this._activeMode=null;var e=L.version.split(".");1===parseInt(e[0],10)&&parseInt(e[1],10)>=2?L.Toolbar.include(L.Evented.prototype):L.Toolbar.include(L.Mixin.Events)},enabled:function(){return null!==this._activeMode},disable:function(){this.enabled()&&this._activeMode.handler.disable()},addToolbar:function(t){var e,i=L.DomUtil.create("div","leaflet-draw-section"),n=0,o=this._toolbarClass||"",r=this.getModeHandlers(t);for(this._toolbarContainer=L.DomUtil.create("div","leaflet-draw-toolbar leaflet-bar"),this._map=t,e=0;e<r.length;e++)r[e].enabled&&this._initModeHandler(r[e].handler,this._toolbarContainer,n++,o,r[e].title);if(n)return this._lastButtonIndex=--n,this._actionsContainer=L.DomUtil.create("ul","leaflet-draw-actions"),i.appendChild(this._toolbarContainer),i.appendChild(this._actionsContainer),i},removeToolbar:function(){for(var t in this._modes)this._modes.hasOwnProperty(t)&&(this._disposeButton(this._modes[t].button,this._modes[t].handler.enable,this._modes[t].handler),this._modes[t].handler.disable(),this._modes[t].handler.off("enabled",this._handlerActivated,this).off("disabled",this._handlerDeactivated,this));this._modes={};for(var e=0,i=this._actionButtons.length;e<i;e++)this._disposeButton(this._actionButtons[e].button,this._actionButtons[e].callback,this);this._actionButtons=[],this._actionsContainer=null},_initModeHandler:function(t,e,i,n,o){var r=t.type;this._modes[r]={},this._modes[r].handler=t,this._modes[r].button=this._createButton({type:r,title:o,className:n+"-"+r,container:e,callback:this._modes[r].handler.enable,context:this._modes[r].handler}),this._modes[r].buttonIndex=i,this._modes[r].handler.on("enabled",this._handlerActivated,this).on("disabled",this._handlerDeactivated,this)},_detectIOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!t.MSStream},_createButton:function(t){var e=L.DomUtil.create("a",t.className||"",t.container),i=L.DomUtil.create("span","sr-only",t.container);e.href="#",e.appendChild(i),t.title&&(e.title=t.title,i.innerHTML=t.title),t.text&&(e.innerHTML=t.text,i.innerHTML=t.text);var n=this._detectIOS()?"touchstart":"click";return L.DomEvent.on(e,"click",L.DomEvent.stopPropagation).on(e,"mousedown",L.DomEvent.stopPropagation).on(e,"dblclick",L.DomEvent.stopPropagation).on(e,"touchstart",L.DomEvent.stopPropagation).on(e,"click",L.DomEvent.preventDefault).on(e,n,t.callback,t.context),e},_disposeButton:function(t,e){var i=this._detectIOS()?"touchstart":"click";L.DomEvent.off(t,"click",L.DomEvent.stopPropagation).off(t,"mousedown",L.DomEvent.stopPropagation).off(t,"dblclick",L.DomEvent.stopPropagation).off(t,"touchstart",L.DomEvent.stopPropagation).off(t,"click",L.DomEvent.preventDefault).off(t,i,e)},_handlerActivated:function(t){this.disable(),this._activeMode=this._modes[t.handler],L.DomUtil.addClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._showActionsToolbar(),this.fire("enable")},_handlerDeactivated:function(){this._hideActionsToolbar(),L.DomUtil.removeClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._activeMode=null,this.fire("disable")},_createActions:function(t){var e,i,n,o,r=this._actionsContainer,a=this.getActions(t),s=a.length;for(i=0,n=this._actionButtons.length;i<n;i++)this._disposeButton(this._actionButtons[i].button,this._actionButtons[i].callback);for(this._actionButtons=[];r.firstChild;)r.removeChild(r.firstChild);for(var l=0;l<s;l++)"enabled"in a[l]&&!a[l].enabled||(e=L.DomUtil.create("li","",r),o=this._createButton({title:a[l].title,text:a[l].text,container:e,callback:a[l].callback,context:a[l].context}),this._actionButtons.push({button:o,callback:a[l].callback}))},_showActionsToolbar:function(){var t=this._activeMode.buttonIndex,e=this._lastButtonIndex,i=this._activeMode.button.offsetTop-1;this._createActions(this._activeMode.handler),this._actionsContainer.style.top=i+"px",0===t&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-top")),t===e&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-bottom")),this._actionsContainer.style.display="block",this._map.fire(L.Draw.Event.TOOLBAROPENED)},_hideActionsToolbar:function(){this._actionsContainer.style.display="none",L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-top"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-bottom"),this._map.fire(L.Draw.Event.TOOLBARCLOSED)}}),L.Draw=L.Draw||{},L.Draw.Tooltip=L.Class.extend({initialize:function(t){this._map=t,this._popupPane=t._panes.popupPane,this._visible=!1,this._container=t.options.drawControlTooltips?L.DomUtil.create("div","leaflet-draw-tooltip",this._popupPane):null,this._singleLineLabel=!1,this._map.on("mouseout",this._onMouseOut,this)},dispose:function(){this._map.off("mouseout",this._onMouseOut,this),this._container&&(this._popupPane.removeChild(this._container),this._container=null)},updateContent:function(t){return this._container?(t.subtext=t.subtext||"",0!==t.subtext.length||this._singleLineLabel?t.subtext.length>0&&this._singleLineLabel&&(L.DomUtil.removeClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!1):(L.DomUtil.addClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!0),this._container.innerHTML=(t.subtext.length>0?'<span class="leaflet-draw-tooltip-subtext">'+t.subtext+"</span><br />":"")+"<span>"+t.text+"</span>",t.text||t.subtext?(this._visible=!0,this._container.style.visibility="inherit"):(this._visible=!1,this._container.style.visibility="hidden"),this):this},updatePosition:function(t){var e=this._map.latLngToLayerPoint(t),i=this._container;return this._container&&(this._visible&&(i.style.visibility="inherit"),L.DomUtil.setPosition(i,e)),this},showAsError:function(){return this._container&&L.DomUtil.addClass(this._container,"leaflet-error-draw-tooltip"),this},removeError:function(){return this._container&&L.DomUtil.removeClass(this._container,"leaflet-error-draw-tooltip"),this},_onMouseOut:function(){this._container&&(this._container.style.visibility="hidden")}}),L.DrawToolbar=L.Toolbar.extend({statics:{TYPE:"draw"},options:{polyline:{},polygon:{},rectangle:{},circle:{},marker:{},circlemarker:{}},initialize:function(t){for(var e in this.options)this.options.hasOwnProperty(e)&&t[e]&&(t[e]=L.extend({},this.options[e],t[e]));this._toolbarClass="leaflet-draw-draw",L.Toolbar.prototype.initialize.call(this,t)},getModeHandlers:function(t){return[{enabled:this.options.polyline,handler:new L.Draw.Polyline(t,this.options.polyline),title:L.drawLocal.draw.toolbar.buttons.polyline},{enabled:this.options.polygon,handler:new L.Draw.Polygon(t,this.options.polygon),title:L.drawLocal.draw.toolbar.buttons.polygon},{enabled:this.options.rectangle,handler:new L.Draw.Rectangle(t,this.options.rectangle),title:L.drawLocal.draw.toolbar.buttons.rectangle},{enabled:this.options.circle,handler:new L.Draw.Circle(t,this.options.circle),title:L.drawLocal.draw.toolbar.buttons.circle},{enabled:this.options.marker,handler:new L.Draw.Marker(t,this.options.marker),title:L.drawLocal.draw.toolbar.buttons.marker},{enabled:this.options.circlemarker,handler:new L.Draw.CircleMarker(t,this.options.circlemarker),title:L.drawLocal.draw.toolbar.buttons.circlemarker}]},getActions:function(t){return[{enabled:t.completeShape,title:L.drawLocal.draw.toolbar.finish.title,text:L.drawLocal.draw.toolbar.finish.text,callback:t.completeShape,context:t},{enabled:t.deleteLastVertex,title:L.drawLocal.draw.toolbar.undo.title,text:L.drawLocal.draw.toolbar.undo.text,callback:t.deleteLastVertex,context:t},{title:L.drawLocal.draw.toolbar.actions.title,text:L.drawLocal.draw.toolbar.actions.text,callback:this.disable,context:this}]},setOptions:function(t){for(var e in L.setOptions(this,t),this._modes)this._modes.hasOwnProperty(e)&&t.hasOwnProperty(e)&&this._modes[e].handler.setOptions(t[e])}}),L.EditToolbar=L.Toolbar.extend({statics:{TYPE:"edit"},options:{edit:{selectedPathOptions:{dashArray:"10, 10",fill:!0,fillColor:"#fe57a1",fillOpacity:.1,maintainColor:!1}},remove:{},poly:null,featureGroup:null},initialize:function(t){t.edit&&(void 0===t.edit.selectedPathOptions&&(t.edit.selectedPathOptions=this.options.edit.selectedPathOptions),t.edit.selectedPathOptions=L.extend({},this.options.edit.selectedPathOptions,t.edit.selectedPathOptions)),t.remove&&(t.remove=L.extend({},this.options.remove,t.remove)),t.poly&&(t.poly=L.extend({},this.options.poly,t.poly)),this._toolbarClass="leaflet-draw-edit",L.Toolbar.prototype.initialize.call(this,t),this._selectedFeatureCount=0},getModeHandlers:function(t){var e=this.options.featureGroup;return[{enabled:this.options.edit,handler:new L.EditToolbar.Edit(t,{featureGroup:e,selectedPathOptions:this.options.edit.selectedPathOptions,poly:this.options.poly}),title:L.drawLocal.edit.toolbar.buttons.edit},{enabled:this.options.remove,handler:new L.EditToolbar.Delete(t,{featureGroup:e}),title:L.drawLocal.edit.toolbar.buttons.remove}]},getActions:function(t){var e=[{title:L.drawLocal.edit.toolbar.actions.save.title,text:L.drawLocal.edit.toolbar.actions.save.text,callback:this._save,context:this},{title:L.drawLocal.edit.toolbar.actions.cancel.title,text:L.drawLocal.edit.toolbar.actions.cancel.text,callback:this.disable,context:this}];return t.removeAllLayers&&e.push({title:L.drawLocal.edit.toolbar.actions.clearAll.title,text:L.drawLocal.edit.toolbar.actions.clearAll.text,callback:this._clearAllLayers,context:this}),e},addToolbar:function(t){var e=L.Toolbar.prototype.addToolbar.call(this,t);return this._checkDisabled(),this.options.featureGroup.on("layeradd layerremove",this._checkDisabled,this),e},removeToolbar:function(){this.options.featureGroup.off("layeradd layerremove",this._checkDisabled,this),L.Toolbar.prototype.removeToolbar.call(this)},disable:function(){this.enabled()&&(this._activeMode.handler.revertLayers(),L.Toolbar.prototype.disable.call(this))},_save:function(){this._activeMode.handler.save(),this._activeMode&&this._activeMode.handler.disable()},_clearAllLayers:function(){this._activeMode.handler.removeAllLayers(),this._activeMode&&this._activeMode.handler.disable()},_checkDisabled:function(){var t,e=0!==this.options.featureGroup.getLayers().length;this.options.edit&&(t=this._modes[L.EditToolbar.Edit.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.edit:L.drawLocal.edit.toolbar.buttons.editDisabled)),this.options.remove&&(t=this._modes[L.EditToolbar.Delete.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.remove:L.drawLocal.edit.toolbar.buttons.removeDisabled))}}),L.EditToolbar.Edit=L.Handler.extend({statics:{TYPE:"edit"},initialize:function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.setOptions(this,e),this._featureGroup=e.featureGroup,!(this._featureGroup instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this._uneditedLayerProps={},this.type=L.EditToolbar.Edit.TYPE;var i=L.version.split(".");1===parseInt(i[0],10)&&parseInt(i[1],10)>=2?L.EditToolbar.Edit.include(L.Evented.prototype):L.EditToolbar.Edit.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.EDITSTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._featureGroup.on("layeradd",this._enableLayerEdit,this).on("layerremove",this._disableLayerEdit,this))},disable:function(){this._enabled&&(this._featureGroup.off("layeradd",this._enableLayerEdit,this).off("layerremove",this._disableLayerEdit,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.EDITSTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(t.getContainer().focus(),this._featureGroup.eachLayer(this._enableLayerEdit,this),this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}),t._editTooltip=this._tooltip,this._updateTooltip(),this._map.on("mousemove",this._onMouseMove,this).on("touchmove",this._onMouseMove,this).on("MSPointerMove",this._onMouseMove,this).on(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},removeHooks:function(){this._map&&(this._featureGroup.eachLayer(this._disableLayerEdit,this),this._uneditedLayerProps={},this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this).off("touchmove",this._onMouseMove,this).off("MSPointerMove",this._onMouseMove,this).off(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},revertLayers:function(){this._featureGroup.eachLayer(function(t){this._revertLayer(t)},this)},save:function(){var t=new L.LayerGroup;this._featureGroup.eachLayer(function(e){e.edited&&(t.addLayer(e),e.edited=!1)}),this._map.fire(L.Draw.Event.EDITED,{layers:t})},_backupLayer:function(t){var e=L.Util.stamp(t);this._uneditedLayerProps[e]||(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?this._uneditedLayerProps[e]={latlngs:L.LatLngUtil.cloneLatLngs(t.getLatLngs())}:t instanceof L.Circle?this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng()),radius:t.getRadius()}:(t instanceof L.Marker||t instanceof L.CircleMarker)&&(this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng())}))},_getTooltipText:function(){return{text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}},_updateTooltip:function(){this._tooltip.updateContent(this._getTooltipText())},_revertLayer:function(t){var e=L.Util.stamp(t);t.edited=!1,this._uneditedLayerProps.hasOwnProperty(e)&&(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?t.setLatLngs(this._uneditedLayerProps[e].latlngs):t instanceof L.Circle?(t.setLatLng(this._uneditedLayerProps[e].latlng),t.setRadius(this._uneditedLayerProps[e].radius)):(t instanceof L.Marker||t instanceof L.CircleMarker)&&t.setLatLng(this._uneditedLayerProps[e].latlng),t.fire("revert-edited",{layer:t}))},_enableLayerEdit:function(t){var e,i,n=t.layer||t.target||t;this._backupLayer(n),this.options.poly&&(i=L.Util.extend({},this.options.poly),n.options.poly=i),this.options.selectedPathOptions&&((e=L.Util.extend({},this.options.selectedPathOptions)).maintainColor&&(e.color=n.options.color,e.fillColor=n.options.fillColor),n.options.original=L.extend({},n.options),n.options.editing=e),n instanceof L.Marker?(n.editing&&n.editing.enable(),n.dragging.enable(),n.on("dragend",this._onMarkerDragEnd).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onMarkerDragEnd,this).on("MSPointerUp",this._onMarkerDragEnd,this)):n.editing.enable()},_disableLayerEdit:function(t){var e=t.layer||t.target||t;e.edited=!1,e.editing&&e.editing.disable(),delete e.options.editing,delete e.options.original,this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e):(e.setStyle(e.options.previousOptions),delete e.options.previousOptions)),e instanceof L.Marker?(e.dragging.disable(),e.off("dragend",this._onMarkerDragEnd,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onMarkerDragEnd,this).off("MSPointerUp",this._onMarkerDragEnd,this)):e.editing.disable()},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_onMarkerDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_onTouchMove:function(t){var e=t.originalEvent.changedTouches[0],i=this._map.mouseEventToLayerPoint(e),n=this._map.layerPointToLatLng(i);t.target.setLatLng(n)},_hasAvailableLayers:function(){return 0!==this._featureGroup.getLayers().length}}),L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:"remove"},initialize:function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.Util.setOptions(this,e),this._deletableLayers=this.options.featureGroup,!(this._deletableLayers instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this.type=L.EditToolbar.Delete.TYPE;var i=L.version.split(".");1===parseInt(i[0],10)&&parseInt(i[1],10)>=2?L.EditToolbar.Delete.include(L.Evented.prototype):L.EditToolbar.Delete.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DELETESTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._deletableLayers.on("layeradd",this._enableLayerDelete,this).on("layerremove",this._disableLayerDelete,this))},disable:function(){this._enabled&&(this._deletableLayers.off("layeradd",this._enableLayerDelete,this).off("layerremove",this._disableLayerDelete,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DELETESTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(t.getContainer().focus(),this._deletableLayers.eachLayer(this._enableLayerDelete,this),this._deletedLayers=new L.LayerGroup,this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.remove.tooltip.text}),this._map.on("mousemove",this._onMouseMove,this))},removeHooks:function(){this._map&&(this._deletableLayers.eachLayer(this._disableLayerDelete,this),this._deletedLayers=null,this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this))},revertLayers:function(){this._deletedLayers.eachLayer(function(t){this._deletableLayers.addLayer(t),t.fire("revert-deleted",{layer:t})},this)},save:function(){this._map.fire(L.Draw.Event.DELETED,{layers:this._deletedLayers})},removeAllLayers:function(){this._deletableLayers.eachLayer(function(t){this._removeLayer({layer:t})},this),this.save()},_enableLayerDelete:function(t){(t.layer||t.target||t).on("click",this._removeLayer,this)},_disableLayerDelete:function(t){var e=t.layer||t.target||t;e.off("click",this._removeLayer,this),this._deletedLayers.removeLayer(e)},_removeLayer:function(t){var e=t.layer||t.target||t;this._deletableLayers.removeLayer(e),this._deletedLayers.addLayer(e),e.fire("deleted")},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_hasAvailableLayers:function(){return 0!==this._deletableLayers.getLayers().length}})}(window,document)},function(t,e,i){var n=i(1),o=i(18);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={insert:"head",singleton:!1},a=(n(t.i,o,r),o.locals?o.locals:{});t.exports=a},function(t,e,i){var n=i(2),o=i(5),r=i(19),a=i(20),s=i(21);e=n(!1);var l=o(r),h=o(a),u=o(s);e.push([t.i,".leaflet-draw-section{position:relative}.leaflet-draw-toolbar{margin-top:12px}.leaflet-draw-toolbar-top{margin-top:0}.leaflet-draw-toolbar-notop a:first-child{border-top-right-radius:0}.leaflet-draw-toolbar-nobottom a:last-child{border-bottom-right-radius:0}.leaflet-draw-toolbar a{background-image:url("+l+");background-image:linear-gradient(transparent,transparent),url("+h+");background-repeat:no-repeat;background-size:300px 30px;background-clip:padding-box}.leaflet-retina .leaflet-draw-toolbar a{background-image:url("+u+");background-image:linear-gradient(transparent,transparent),url("+h+')}\n.leaflet-draw a{display:block;text-align:center;text-decoration:none}.leaflet-draw a .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.leaflet-draw-actions{display:none;list-style:none;margin:0;padding:0;position:absolute;left:26px;top:0;white-space:nowrap}.leaflet-touch .leaflet-draw-actions{left:32px}.leaflet-right .leaflet-draw-actions{right:26px;left:auto}.leaflet-touch .leaflet-right .leaflet-draw-actions{right:32px;left:auto}.leaflet-draw-actions li{display:inline-block}\n.leaflet-draw-actions li:first-child a{border-left:0}.leaflet-draw-actions li:last-child a{-webkit-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.leaflet-right .leaflet-draw-actions li:last-child a{-webkit-border-radius:0;border-radius:0}.leaflet-right .leaflet-draw-actions li:first-child a{-webkit-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.leaflet-draw-actions a{background-color:#919187;border-left:1px solid #AAA;color:#FFF;font:11px/19px "Helvetica Neue",Arial,Helvetica,sans-serif;line-height:28px;text-decoration:none;padding-left:10px;padding-right:10px;height:28px}\n.leaflet-touch .leaflet-draw-actions a{font-size:12px;line-height:30px;height:30px}.leaflet-draw-actions-bottom{margin-top:0}.leaflet-draw-actions-top{margin-top:1px}.leaflet-draw-actions-top a,.leaflet-draw-actions-bottom a{height:27px;line-height:27px}.leaflet-draw-actions a:hover{background-color:#a0a098}.leaflet-draw-actions-top.leaflet-draw-actions-bottom a{height:26px;line-height:26px}.leaflet-draw-toolbar .leaflet-draw-draw-polyline{background-position:-2px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polyline{background-position:0 -1px}\n.leaflet-draw-toolbar .leaflet-draw-draw-polygon{background-position:-31px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polygon{background-position:-29px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-rectangle{background-position:-62px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-rectangle{background-position:-60px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-circle{background-position:-92px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circle{background-position:-90px -1px}\n.leaflet-draw-toolbar .leaflet-draw-draw-marker{background-position:-122px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-marker{background-position:-120px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-circlemarker{background-position:-273px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circlemarker{background-position:-271px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-edit{background-position:-152px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit{background-position:-150px -1px}\n.leaflet-draw-toolbar .leaflet-draw-edit-remove{background-position:-182px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove{background-position:-180px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled{background-position:-212px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled{background-position:-210px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled{background-position:-242px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled{background-position:-240px -2px}\n.leaflet-mouse-marker{background-color:#fff;cursor:crosshair}.leaflet-draw-tooltip{background:#363636;background:rgba(0,0,0,0.5);border:1px solid transparent;-webkit-border-radius:4px;border-radius:4px;color:#fff;font:12px/18px "Helvetica Neue",Arial,Helvetica,sans-serif;margin-left:20px;margin-top:-21px;padding:4px 8px;position:absolute;visibility:hidden;white-space:nowrap;z-index:6}.leaflet-draw-tooltip:before{border-right:6px solid black;border-right-color:rgba(0,0,0,0.5);border-top:6px solid transparent;border-bottom:6px solid transparent;content:"";position:absolute;top:7px;left:-7px}\n.leaflet-error-draw-tooltip{background-color:#f2dede;border:1px solid #e6b6bd;color:#b94a48}.leaflet-error-draw-tooltip:before{border-right-color:#e6b6bd}.leaflet-draw-tooltip-single{margin-top:-12px}.leaflet-draw-tooltip-subtext{color:#f8d5e4}.leaflet-draw-guide-dash{font-size:1%;opacity:.6;position:absolute;width:5px;height:5px}.leaflet-edit-marker-selected{background-color:rgba(254,87,161,0.1);border:4px dashed rgba(254,87,161,0.6);-webkit-border-radius:4px;border-radius:4px;box-sizing:content-box}\n.leaflet-edit-move{cursor:move}.leaflet-edit-resize{cursor:pointer}.leaflet-oldie .leaflet-draw-toolbar{border:1px solid #999}',""]),t.exports=e},function(t,e,i){i.r(e),e.default="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAAeCAYAAACWuCNnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAG7AAABuwBHnU4NQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAbvSURBVHic7dtdbBxXFQfw/9nZ3SRKwAP7UFFUQOoHqGnUoEAoNghX9tyxVcpD1X0J+WgiUQmpfUB5ACSgG1qJIKASqBIUIauqAbWseIlqb+bOWHVR6y0FKZBEqdIUQROIREGRx3FFvR/38ODZst3a3nE8Ywfv+T2t7hzdM3fle/bOnWtACCGEEEIIIYQQQgghhBBCCCGEEEIIIcRa0EbfgBDdFItFKwzDAa3175LuWylVAvBIR/MxrXUp6Vxx9dp4VyObVEdKKW591lonXgiVUg6AHzPzk9ls9meVSmUh6RzXkz179uQKhcIgM+8CACI6U6vVnp+enm6knXt4ePiuTCbzWQAwxlSDIHg57ZwroDAMnwKwz3XdBzzPG08hxzsTNprQG2lTjtd13WFmfghAP4A+AJcATFiW9YNKpfL3uP0kUliiX4SG1pqUUpx0wXJd9/PMXAGwPWq6yMyPz8/P/7xarf4nyVwt7QV4JWkU52i8YwBu6bh0wRhzJAiCF5POCQCDg4N2Pp//NYDRjkuTxph9QRCESeYrFov5ubm5R5n5AIAPtV1aYOb7BgYGTpZKJeO67lFmPsbM9/i+/8Ja8y6zylhOYquPXhsvAJRKpczMzMwTAIaJ6LFGo+HNzs5eKRQKNxPRAWb+CoAjWuvn4vS35skWFasxAAdbbUlOYqVUPwAPwI4lLr8J4KeWZT1eqVTmksoZ5d2QghUVKx/AlmVCFph5yPf9l5LMCwBKqUksFqszRHQcAJj5GwB2MfOE7/tfTDKf4zjHiejrAE4CuNhqZ+bf2rY9FYbhGBH92/O8o47j3Oj7/uUk86+3XhsvACilHmPmgW3btn3pxIkTVzuvj4yMfNoY85wxZiQIglPd+lvTZIuq5xiAQwCe6evr218ul5tr6bNd9GiiAbyvS+hFrfVHk8oLbEzBih4Dz+G9K6t3IaLXFhYWdib5eBh911UA8wBu1lq/CQBDQ0M3WJb1OoAdRPQZz/NeSSqnUuofAKpa6/vb26MfwacA7AdwFcCdWuu/JpU3yl1C91VHoquNXhvvyMjIx4wxr1iWtbNSqfxruTjHcR4AcMj3/bu79XnNe1hpFyvHcXYT0QS6FysASHR1tVEKhcIguhQrAGDm23K53BcATCWV27KsAWYGgPOtYgUAU1NT/1RKnQewxxjzOQCJFSwANwI4297QtmLfD+AtZr43m83OJ5iz3bGU+l1OT43XGFNk5mdXKlYAYNv2eBiG31dK3aS1vrRSbOZabqRYLFppFisAIKJxAB+MGf56krk30O64gZlMJnZsHMxsoo8fHxoauqHVHn3+BAAQUaxV57Xq2F54i5nvIaJXm81mYoX5etID491JRH/sFlQul5tEdMoYc3u32FUXrLYvObViBQDM/MQqwi8knX8jEJHpHrXIGJNo8WDm1spph2VZgeu6+5RSX7YsK8D/Xnb8Psmcnebm5h7G4uS9ysxutOH8VQC70sy7UTb7eImImTnWlgkzUyaT6fr3v6qC1fGL8EytVjuQRrECANu2fwHg1TixzPyXNO5hvTHz6VWE/znJ3L7vzxBRa9PzDmb+FYBfArgjajvd39+f9vGGKwACZh5te6mwmc8KburxMvO5TCbzqW5xxWLRArDbsqyu8z32HtZSxSrNM0Hlcrnpum6JmZ+NEb4pHglrtdrz+Xz+AoBbu4Ser9fra37d3YEBfBvAkq+XmfmbpVIp9grwWnie9zSAp9PMcT3Z7OPNZrO/aTQaf1BKfbd9X7RTGIaHmPlcnPNYsVZYSikOw7AB4CAzj/f19e1fjwOMnueVEeMxJJfLbYqCNT093TDGHAGw0qHYBQBH0vj+Pc+bYOb3HFRk5nHf9yeTzgfgMhF9uEvMTQD+71/vR3pqvJOTk28AeBJAeXR09P1LxbiuuxfA9wB8LU6fsVdYrUOhtm0fTusxcAlMRN+KziUt5SqAM3v37r00OZnGfFp/QRC86DjOUCaTGWPm2zoun8fiIbuZtPLX6/UH8/n8rQDuippertfrD6aRKyqOR5VS81ji8Z+IbmfmgwB+mEb+9dZr4wWA/v7+R6rV6k+azeYpx3EezeVyJ7dv335lfn7+lkajcZCZDzPzYd/3/xSnv9gFq3UuaR2LFQDA87xAKVUB8BEAZ6N9nrNEdEZr/TcArLVOPG8aJ9jj8n3/pcHBwZ1btmx5519zmPl0vV5/Ie2V7fT09Nujo6Nus9kcA4CtW7ce1lq/nUYu27a/Mzs7CyI6gMVX/u/CzJeZ+Ue2bcc9pb1aXc8lJZms18YLANE2wkOu694N4OFGo3E8DMMPAHiDiCaY+ZOb4YCsEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhEjYfwGO+b5dFNs4OgAAAABJRU5ErkJggg=="},function(t,e,i){i.r(e),e.default="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiCiAgIHhtbG5zOnNvZGlwb2RpPSJodHRwOi8vc29kaXBvZGkuc291cmNlZm9yZ2UubmV0L0RURC9zb2RpcG9kaS0wLmR0ZCIKICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiCiAgIHZpZXdCb3g9IjAgMCA2MDAgNjAiCiAgIGhlaWdodD0iNjAiCiAgIHdpZHRoPSI2MDAiCiAgIGlkPSJzdmc0MjI1IgogICB2ZXJzaW9uPSIxLjEiCiAgIGlua3NjYXBlOnZlcnNpb249IjAuOTEgcjEzNzI1IgogICBzb2RpcG9kaTpkb2NuYW1lPSJzcHJpdGVzaGVldC5zdmciCiAgIGlua3NjYXBlOmV4cG9ydC1maWxlbmFtZT0iL2hvbWUvZnB1Z2EvZGV2ZWxvcG1lbnQvdXBzdHJlYW0vaWNhcnRvLkxlYWZsZXQuZHJhdy9zcmMvaW1hZ2VzL3Nwcml0ZXNoZWV0LTJ4LnBuZyIKICAgaW5rc2NhcGU6ZXhwb3J0LXhkcGk9IjkwIgogICBpbmtzY2FwZTpleHBvcnQteWRwaT0iOTAiPgogIDxtZXRhZGF0YQogICAgIGlkPSJtZXRhZGF0YTQyNTgiPgogICAgPHJkZjpSREY+CiAgICAgIDxjYzpXb3JrCiAgICAgICAgIHJkZjphYm91dD0iIj4KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4KICAgICAgICA8ZGM6dHlwZQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL3B1cmwub3JnL2RjL2RjbWl0eXBlL1N0aWxsSW1hZ2UiIC8+CiAgICAgICAgPGRjOnRpdGxlIC8+CiAgICAgIDwvY2M6V29yaz4KICAgIDwvcmRmOlJERj4KICA8L21ldGFkYXRhPgogIDxkZWZzCiAgICAgaWQ9ImRlZnM0MjU2IiAvPgogIDxzb2RpcG9kaTpuYW1lZHZpZXcKICAgICBwYWdlY29sb3I9IiNmZmZmZmYiCiAgICAgYm9yZGVyY29sb3I9IiM2NjY2NjYiCiAgICAgYm9yZGVyb3BhY2l0eT0iMSIKICAgICBvYmplY3R0b2xlcmFuY2U9IjEwIgogICAgIGdyaWR0b2xlcmFuY2U9IjEwIgogICAgIGd1aWRldG9sZXJhbmNlPSIxMCIKICAgICBpbmtzY2FwZTpwYWdlb3BhY2l0eT0iMCIKICAgICBpbmtzY2FwZTpwYWdlc2hhZG93PSIyIgogICAgIGlua3NjYXBlOndpbmRvdy13aWR0aD0iMTkyMCIKICAgICBpbmtzY2FwZTp3aW5kb3ctaGVpZ2h0PSIxMDU2IgogICAgIGlkPSJuYW1lZHZpZXc0MjU0IgogICAgIHNob3dncmlkPSJmYWxzZSIKICAgICBpbmtzY2FwZTp6b29tPSIxLjMxMDE4NTIiCiAgICAgaW5rc2NhcGU6Y3g9IjIzNy41NjkyOCIKICAgICBpbmtzY2FwZTpjeT0iNy4yNDE5NjIxIgogICAgIGlua3NjYXBlOndpbmRvdy14PSIxOTIwIgogICAgIGlua3NjYXBlOndpbmRvdy15PSIyNCIKICAgICBpbmtzY2FwZTp3aW5kb3ctbWF4aW1pemVkPSIxIgogICAgIGlua3NjYXBlOmN1cnJlbnQtbGF5ZXI9InN2ZzQyMjUiIC8+CiAgPGcKICAgICBpZD0iZW5hYmxlZCIKICAgICBzdHlsZT0iZmlsbDojNDY0NjQ2O2ZpbGwtb3BhY2l0eToxIj4KICAgIDxnCiAgICAgICBpZD0icG9seWxpbmUiCiAgICAgICBzdHlsZT0iZmlsbDojNDY0NjQ2O2ZpbGwtb3BhY2l0eToxIj4KICAgICAgPHBhdGgKICAgICAgICAgZD0ibSAxOCwzNiAwLDYgNiwwIDAsLTYgLTYsMCB6IG0gNCw0IC0yLDAgMCwtMiAyLDAgMCwyIHoiCiAgICAgICAgIGlkPSJwYXRoNDIyOSIKICAgICAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIKICAgICAgICAgc3R5bGU9ImZpbGw6IzQ2NDY0NjtmaWxsLW9wYWNpdHk6MSIgLz4KICAgICAgPHBhdGgKICAgICAgICAgZD0ibSAzNiwxOCAwLDYgNiwwIDAsLTYgLTYsMCB6IG0gNCw0IC0yLDAgMCwtMiAyLDAgMCwyIHoiCiAgICAgICAgIGlkPSJwYXRoNDIzMSIKICAgICAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIKICAgICAgICAgc3R5bGU9ImZpbGw6IzQ2NDY0NjtmaWxsLW9wYWNpdHk6MSIgLz4KICAgICAgPHBhdGgKICAgICAgICAgZD0ibSAyMy4xNDIsMzkuMTQ1IC0yLjI4NSwtMi4yOSAxNiwtMTUuOTk4IDIuMjg1LDIuMjg1IHoiCiAgICAgICAgIGlkPSJwYXRoNDIzMyIKICAgICAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIKICAgICAgICAgc3R5bGU9ImZpbGw6IzQ2NDY0NjtmaWxsLW9wYWNpdHk6MSIgLz4KICAgIDwvZz4KICAgIDxwYXRoCiAgICAgICBpZD0icG9seWdvbiIKICAgICAgIGQ9Ik0gMTAwLDI0LjU2NSA5Ny45MDQsMzkuMzk1IDgzLjA3LDQyIDc2LDI4Ljc3MyA4Ni40NjMsMTggWiIKICAgICAgIGlua3NjYXBlOmNvbm5lY3Rvci1jdXJ2YXR1cmU9IjAiCiAgICAgICBzdHlsZT0iZmlsbDojNDY0NjQ2O2ZpbGwtb3BhY2l0eToxIiAvPgogICAgPHBhdGgKICAgICAgIGlkPSJyZWN0YW5nbGUiCiAgICAgICBkPSJtIDE0MCwyMCAyMCwwIDAsMjAgLTIwLDAgeiIKICAgICAgIGlua3NjYXBlOmNvbm5lY3Rvci1jdXJ2YXR1cmU9IjAiCiAgICAgICBzdHlsZT0iZmlsbDojNDY0NjQ2O2ZpbGwtb3BhY2l0eToxIiAvPgogICAgPHBhdGgKICAgICAgIGlkPSJjaXJjbGUiCiAgICAgICBkPSJtIDIyMSwzMCBjIDAsNi4wNzggLTQuOTI2LDExIC0xMSwxMSAtNi4wNzQsMCAtMTEsLTQuOTIyIC0xMSwtMTEgMCwtNi4wNzQgNC45MjYsLTExIDExLC0xMSA2LjA3NCwwIDExLDQuOTI2IDExLDExIHoiCiAgICAgICBpbmtzY2FwZTpjb25uZWN0b3ItY3VydmF0dXJlPSIwIgogICAgICAgc3R5bGU9ImZpbGw6IzQ2NDY0NjtmaWxsLW9wYWNpdHk6MSIgLz4KICAgIDxwYXRoCiAgICAgICBpZD0ibWFya2VyIgogICAgICAgZD0ibSAyNzAsMTkgYyAtNC45NzEsMCAtOSw0LjAyOSAtOSw5IDAsNC45NzEgNS4wMDEsMTIgOSwxNCA0LjAwMSwtMiA5LC05LjAyOSA5LC0xNCAwLC00Ljk3MSAtNC4wMjksLTkgLTksLTkgeiBtIDAsMTIuNSBjIC0yLjQ4NCwwIC00LjUsLTIuMDE0IC00LjUsLTQuNSAwLC0yLjQ4NCAyLjAxNiwtNC41IDQuNSwtNC41IDIuNDg1LDAgNC41LDIuMDE2IDQuNSw0LjUgMCwyLjQ4NiAtMi4wMTUsNC41IC00LjUsNC41IHoiCiAgICAgICBpbmtzY2FwZTpjb25uZWN0b3ItY3VydmF0dXJlPSIwIgogICAgICAgc3R5bGU9ImZpbGw6IzQ2NDY0NjtmaWxsLW9wYWNpdHk6MSIgLz4KICAgIDxnCiAgICAgICBpZD0iZWRpdCIKICAgICAgIHN0eWxlPSJmaWxsOiM0NjQ2NDY7ZmlsbC1vcGFjaXR5OjEiPgogICAgICA8cGF0aAogICAgICAgICBkPSJtIDMzNywzMC4xNTYgMCwwLjQwNyAwLDUuNjA0IGMgMCwxLjY1OCAtMS4zNDQsMyAtMywzIGwgLTEwLDAgYyAtMS42NTUsMCAtMywtMS4zNDIgLTMsLTMgbCAwLC0xMCBjIDAsLTEuNjU3IDEuMzQ1LC0zIDMsLTMgbCA2LjM0NSwwIDMuMTksLTMuMTcgLTkuNTM1LDAgYyAtMy4zMTMsMCAtNiwyLjY4NyAtNiw2IGwgMCwxMCBjIDAsMy4zMTMgMi42ODcsNiA2LDYgbCAxMCwwIGMgMy4zMTQsMCA2LC0yLjY4NyA2LC02IGwgMCwtOC44MDkgLTMsMi45NjgiCiAgICAgICAgIGlkPSJwYXRoNDI0MCIKICAgICAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIKICAgICAgICAgc3R5bGU9ImZpbGw6IzQ2NDY0NjtmaWxsLW9wYWNpdHk6MSIgLz4KICAgICAgPHBhdGgKICAgICAgICAgZD0ibSAzMzguNzIsMjQuNjM3IC04Ljg5Miw4Ljg5MiAtMi44MjgsMCAwLC0yLjgyOSA4Ljg5LC04Ljg5IHoiCiAgICAgICAgIGlkPSJwYXRoNDI0MiIKICAgICAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIKICAgICAgICAgc3R5bGU9ImZpbGw6IzQ2NDY0NjtmaWxsLW9wYWNpdHk6MSIgLz4KICAgICAgPHBhdGgKICAgICAgICAgZD0ibSAzMzguNjk3LDE3LjgyNiA0LDAgMCw0IC00LDAgeiIKICAgICAgICAgdHJhbnNmb3JtPSJtYXRyaXgoLTAuNzA2OTgzMzYsLTAuNzA3MjMwMTgsMC43MDcyMzAxOCwtMC43MDY5ODMzNiw1NjcuNTU5MTcsMjc0Ljc4MjczKSIKICAgICAgICAgaWQ9InBhdGg0MjQ0IgogICAgICAgICBpbmtzY2FwZTpjb25uZWN0b3ItY3VydmF0dXJlPSIwIgogICAgICAgICBzdHlsZT0iZmlsbDojNDY0NjQ2O2ZpbGwtb3BhY2l0eToxIiAvPgogICAgPC9nPgogICAgPGcKICAgICAgIGlkPSJyZW1vdmUiCiAgICAgICBzdHlsZT0iZmlsbDojNDY0NjQ2O2ZpbGwtb3BhY2l0eToxIj4KICAgICAgPHBhdGgKICAgICAgICAgZD0ibSAzODEsNDIgMTgsMCAwLC0xOCAtMTgsMCAwLDE4IHogbSAxNCwtMTYgMiwwIDAsMTQgLTIsMCAwLC0xNCB6IG0gLTQsMCAyLDAgMCwxNCAtMiwwIDAsLTE0IHogbSAtNCwwIDIsMCAwLDE0IC0yLDAgMCwtMTQgeiBtIC00LDAgMiwwIDAsMTQgLTIsMCAwLC0xNCB6IgogICAgICAgICBpZD0icGF0aDQyNDciCiAgICAgICAgIGlua3NjYXBlOmNvbm5lY3Rvci1jdXJ2YXR1cmU9IjAiCiAgICAgICAgIHN0eWxlPSJmaWxsOiM0NjQ2NDY7ZmlsbC1vcGFjaXR5OjEiIC8+CiAgICAgIDxwYXRoCiAgICAgICAgIGQ9Im0gMzk1LDIwIDAsLTQgLTEwLDAgMCw0IC02LDAgMCwyIDIyLDAgMCwtMiAtNiwwIHogbSAtMiwwIC02LDAgMCwtMiA2LDAgMCwyIHoiCiAgICAgICAgIGlkPSJwYXRoNDI0OSIKICAgICAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIKICAgICAgICAgc3R5bGU9ImZpbGw6IzQ2NDY0NjtmaWxsLW9wYWNpdHk6MSIgLz4KICAgIDwvZz4KICA8L2c+CiAgPGcKICAgICBpZD0iZGlzYWJsZWQiCiAgICAgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTIwLDApIgogICAgIHN0eWxlPSJmaWxsOiNiYmJiYmIiPgogICAgPHVzZQogICAgICAgeGxpbms6aHJlZj0iI2VkaXQiCiAgICAgICBpZD0iZWRpdC1kaXNhYmxlZCIKICAgICAgIHg9IjAiCiAgICAgICB5PSIwIgogICAgICAgd2lkdGg9IjEwMCUiCiAgICAgICBoZWlnaHQ9IjEwMCUiIC8+CiAgICA8dXNlCiAgICAgICB4bGluazpocmVmPSIjcmVtb3ZlIgogICAgICAgaWQ9InJlbW92ZS1kaXNhYmxlZCIKICAgICAgIHg9IjAiCiAgICAgICB5PSIwIgogICAgICAgd2lkdGg9IjEwMCUiCiAgICAgICBoZWlnaHQ9IjEwMCUiIC8+CiAgPC9nPgogIDxwYXRoCiAgICAgc3R5bGU9ImZpbGw6bm9uZTtzdHJva2U6IzQ2NDY0NjtzdHJva2Utd2lkdGg6MjtzdHJva2UtbWl0ZXJsaW1pdDo0O3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIgogICAgIGlkPSJjaXJjbGUtMyIKICAgICBkPSJtIDU4MS42NTcyNSwzMCBjIDAsNi4wNzggLTQuOTI2LDExIC0xMSwxMSAtNi4wNzQsMCAtMTEsLTQuOTIyIC0xMSwtMTEgMCwtNi4wNzQgNC45MjYsLTExIDExLC0xMSA2LjA3NCwwIDExLDQuOTI2IDExLDExIHoiCiAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIgLz4KPC9zdmc+Cg=="},function(t,e,i){i.r(e),e.default="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlgAAAA8CAYAAAC6nMS5AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAA16SURBVHic7d1/jBxneQfw7zNzvotdn+9sVQkxoRKoammBqqpbk6uT5mLfvHPn42yn1VFRVCEhoFH5IYpoSaUCKi1NcGkcfrbCVRFKEwG2aHLn83pmLvY2CTqT1AmCOBE0EOT4B0nBPw/snb2dp3/sLr6s77i923dud/a+H8ny7tzMo8f3eud99p133gGIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiFYGaXYCRETUPMYYrWe/MAzZX2QQ27d5OpqdABFROxgZGVlz5cqVrzuOc18QBJPNzofsYvvSYrVcgTVftZ2l6npgYODXHMc5oKoHHcfZHQTB2WbnRETpGRkZWVMoFA6IyO2qutX3/R1Z64TnO8fWOwLSzti+mSKDg4M3l0qlnSJyG4CbAFwP4ByAlwE8paoPX3fddcH4+PjP00yk5QqsrDPGvAZAHsBrReRNqvpeY8x/iMg9QRCcaXJ6ZIHv+xtUdReAHQBej/IHGABOAnhORMY6OjoempiYONe0JC3zPM84jjOqqrfi6r/3RQCPAdgXhmHUvOyaa3R01L1w4cJBALdVNq1W1THP87woir7ZzNyocWzf7PA8b4uI7E6S5A9Frqknb6j8eZOIvKNQKPzU9/1/dhznvlwuV0gjn5YbFapW09Vqu/Z9K9u2bdsNruvmUe50axUAfMV13X/I5XInlzcze2x/28lCu1b19fWt7u7u/hCAvwGwboHdL6jq7unp6T1TU1OXlyG9VAwODv5mkiR7Ady6wK6Plkqldz/yyCPfX468bBkaGuqamZm5E8DbReQNANYscMiLIrI1CILnZ280xrwHwL+hck4VkacBDLTS6HVaIxWt/Blm+zauldu3atOmTas2bNjwWRG5s7LplKp+VUQOuq77/bVr17589uzZ9SKy0XGcAVUdFZE/qOx7zHXdXWn0yy31i6sMw/4MyF6BZYy5XlWPiMhvL7BrrKpfcxznE7Uf4ixYqQWW53kbATw060NZr28nSbJzcnLyRBp5pcnzvNtE5CEAvXUecg7ArjAMH00xLWuGhoZuKpVKEwB+p85DXnRd9/ZcLvcDAOjv778un88XAChwtRMWkW+jxTpfYOV1wGxfO1q1fav6+vpWr1u3blxVtwH4uar+/fT09OcW+mJrjBkBcC+AXwdwBoAJw/AZm7m1zC+uUlyNA9g6189buZH7+/t/tbOz8wiANy7isKKqftV13U8eOnToe2nlZttKLLAqJ+qjAF69xBAnZ2Zmbj58+PApm3mlqTJydRTXFldHAUxVXvcBuLnm5+dU9c1RFP1v2jk2YmhoqKtUKj2B+jvfE0mS3D45OflD4OqcHADPh2H4F6h0wp7nva1YLOby+fz5dDKnerB9Vwzxff8BVX0bgFMAdoZheKzeg4eHh9cXi8WvAfAAvOC67ptzudz/WUvOVqBGVO7OmBCR/vn2adWOuL+/v7ezs3MSwKYlhkgAHBSRjwdB8JTF1FKx0gqsymXBxwH8XoOh/ieO41vz+fwVG3mlzRjzKF55WfA8gD8LwzA3ez/P87aLyIMAeqrbVDUfRdHty5Pp0hhjPgDgM9X3qnq/iNwPYM5RCdd1T1RPvLM63+q/ce/sTpiaj+27Mvi+f6eq/iuAi67r9uVyuWcXG6NSjB8B0KeqE1EUvcVWfk3v3OYZuXosjuPt+Xx+ull51WNgYKBHRKIlXDaaS6Kq+6Mo+lMLsVKz0gosz/M+KiKfsBTub8MwvMdSrNQYYzwAYc3m7bXFVZXv+8OqemD2NlUdiKLokbRybJQx5lsANlfefi4Mww/UedyvADgI4I9mbxeRDwdB8C92s0yHrc9wK3922b6Na+X2BYD+/v61nZ2dz6M8cX00DMP9S421ffv2V83MzDwHoNfmucuxEWSpslxcjYyMrHEcZ8xScQUAjoj8vqVYZIHv+xtE5MMWQ941PDy83mK8VIjIW2s2HZ2vuAKAIAgmADyxQIxWM3uu5J56DhgZGVkDYBw1nS+ApwB82VJeZAfbt82tWrXqPSgXV481UlwBwMGDB3+sqncDgIh81EZ+QBMLrKwXV5Uh5NoPYqMyN+m9nanqHVj4bsHF6InjeKfFeKmoLMUw+/2Ct6KLyOM1m2x/NmxbW30RhuGPFtp5jstGVU+JiNdqE57rEYahzB6lWOz7Fsf2be/2hYj8SeXlvTbiFYvFLwK4DOAWY8z1NmI2pcDKcnE1OjraWSgU9uPaD2LDRKSlJwavQCO2A4rIDtsxU7BxsQeoau2Jeak3BDTDL72kUm/n63neaFoJUkPYvm3G9/0NKN9gc7mrq6t2OsOSVGqPSQCuiAzaiLnsBVaWiysAuHDhwn4AQ2nEVtUfpBGXluwNKcRcaBmPVpDMfiMiW+o4pnafZM69MmYxnW9lsj9lCNs3m1T1tSjXL89aXo39WCX+62wEW9YCK+vFVcXLKcbmJcLW8qoUYmZhZOfFmvc3e563fb6djTFvwdUJxfPFyJx6O1/f999a6Xz5ZIwMYftm2o2Vv60+HUVETldeLnoUfy7LVmC1SXEFVf0YgFSeX5QkCQus9tfyIzsicnSObQ/6vj9cu71SXP1nPTGyplAo5FDT+arqk3Ecb5s9J0dV2flmENs3u0REgTmnJjRkVjwrd2Iuy3+adimuACCKotPGmC8A+GvLoZOZmZkXLMekBojIaVX9DcthTy+8S3MlSTIuIu+q2dyjqgeMMU8A+CYAUdUtAOa8izZJkvG081wG19xN5jjO4ByLTLrLlRBZxfbNrjMAICI3LrTjIlVHrqyMjKU+gtVOxVVVHMf/hHkWrGvAiawsQrlSqOqiF61rRkzbOjo6AsxfCG4G8FcAPvhLlih5qVgsWpl42kIyezcZ1YXtmy0/QvlqwG9V1i6zZRMAiIiV+dCpFljtWFwBQOUbzqcth+XlwdZjfRRGRMZsx7St8mT5zzcQ4r52+LKgqp9S1U8B+GTtZSPKPrZvdlXaagrAalU1NmJWCrVtAEqO4xyyETO1S4TtWlxVXbp06b7u7u6/BHCTjXiqygKrxYjIQ6p6L2Y9BqZB51etWtXyBRYAuK77hVKp9H5cnUxarzOu634xjZyWWxRFdzU7B0oP2zfbVPUbIrLFcZwPAfivRuOJyPtUdbWq5m09jzCVEax2L64AYGpq6rKq/qOteI7jsMBqMUEQnFXV3bbiqerdExMT52zFS1Mul7soIovugETkI7lc7mIaORERVRWLxS8BeElVb/F9v6EnR/i+f6Oq3gUAjuPYejSavQLLGKPVP4VC4Wd4ZXF1pKura7Bdiquq3t7efwfwnKVwLLBa0PT09B5U1kZp0BPFYvGzFuIsmyAI7kf5uWz1OhgEwTV3FLaoX5yLKosWLknNsZcayohsYvu2uUo98TEAUNW9vu8vad3CoaGhLlX9BoBeAONBEByxleNyLNPwWBzHOywvBtYS9u3bV1LVj1sKxwKrBU1NTV12XXcXgFMNhDmpqndkcF6SisifAzhRx76n4jh+Byzd3rwMjldfqOqSV+xPkmT2yvzH592RlhvbdwUIw3AvgAcArFPVcHBwcFHPBvZ9f0OpVDqA8qrwL8Rx/E6b+VkvsGqfZ9ROlwXnEkXRfgDfajCMXrx48Yc28iH7crncSVXdrKpPLvZYEXk6SZItURS1/PIMcwmC4KzjOCMAam9dn+0SgJ35fP4ny5SWDQ/Mer3HGLPoTtgYMyIiv3gOmqpmZfRuJWD7rgwax/G7UH7EzcYkSf7bGHNXX1/f6oUO9H1/Z+WcPoDysgw7bJ/DUl8Hq52LqwoVkb9T1WiRx8UoX158RlWfnJqaupxCbmRJFEWn+/r6buvu7v4ggI9g4Ynv50XknkKh8JkMjly9wqFDh77j+/6oqo4BqD1xXRaRPw6CwMZl1GXjuu6XSqXSOwH8LoD1AMaMMecA1PtF53WV4wCUC+menp699jOlpWD7rhz5fP5Kf3//UFdX132q+l4Ad3d3d7/fGPN1EZlQ1e/19PS8dPbs2fWu694kIgOqOqqqm4Dy4rKlUumOw4cPN3KVYk7WVkE1xsx5aSBLT+duhDEmQrkSnssZlIeXnxWRY6p6PI7j41nveFeq4eHh9XEc7xSRnQBej6t3kp5EuWh+OI7jh+dYsDDTfN/frKrjAKpPmv9pkiS7JicnH29mXku1devWV3d0dBxAuRNeMhF5ulgsjqRxgk7DfOfqxWr1czvbtzGt3r5zGRwc7FPV3ap6y0L7ishPAHx63bp1e/bt2xenkQ8LLEuMMZtE5JCqfhfAMwCeSZLkO2vWrDk+NjbGyZHUFjzP2yginwcAVX1fVi99Vo2OjnaeP3/+3SLydgBvBNBd56GXAHxXVR/s7e3dm9YJOg0rqQNm+y5dFtp3HmKM2QxgF8qr9b8GwA0AzgH4MYBjIjJ28eLFkFeOiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIhWgv8Hnffz4dmwY9cAAAAASUVORK5CYII="},function(t,e,i){!function(t){var e=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyShapePositions:null,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var e=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,e?this._withAnimation:this._noAnimation),this._markerCluster=e?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(t){if(t instanceof L.LayerGroup)return this.addLayers([t]);if(!t.getLatLng)return this._nonPointGroup.addLayer(t),this.fire("layeradd",{layer:t}),this;if(!this._map)return this._needsClustering.push(t),this.fire("layeradd",{layer:t}),this;if(this.hasLayer(t))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(t,this._maxZoom),this.fire("layeradd",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var e=t,i=this._zoom;if(t.__parent)for(;e.__parent._zoom>=i;)e=e.__parent;return this._currentShownBounds.contains(e.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(t,e):this._animationAddLayerNonAnimated(t,e)),this},removeLayer:function(t){return t instanceof L.LayerGroup?this.removeLayers([t]):t.getLatLng?this._map?t.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(t)),this._removeLayer(t,!0),this.fire("layerremove",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),t.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(t)&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,t)&&this.hasLayer(t)&&this._needsRemoving.push({layer:t,latlng:t._latlng}),this.fire("layerremove",{layer:t}),this):(this._nonPointGroup.removeLayer(t),this.fire("layerremove",{layer:t}),this)},addLayers:function(t,e){if(!L.Util.isArray(t))return this.addLayer(t);var i,n=this._featureGroup,o=this._nonPointGroup,r=this.options.chunkedLoading,a=this.options.chunkInterval,s=this.options.chunkProgress,l=t.length,h=0,u=!0;if(this._map){var c=(new Date).getTime(),p=L.bind(function(){var d=(new Date).getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();h<l;h++){if(r&&h%200==0){var f=(new Date).getTime()-d;if(f>a)break}if((i=t[h])instanceof L.LayerGroup)u&&(t=t.slice(),u=!1),this._extractNonGroupLayers(i,t),l=t.length;else if(i.getLatLng){if(!this.hasLayer(i)&&(this._addLayer(i,this._maxZoom),e||this.fire("layeradd",{layer:i}),i.__parent&&2===i.__parent.getChildCount())){var _=i.__parent.getAllChildMarkers(),m=_[0]===i?_[1]:_[0];n.removeLayer(m)}}else o.addLayer(i),e||this.fire("layeradd",{layer:i})}s&&s(h,l,(new Date).getTime()-c),h===l?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(p,this.options.chunkDelay)},this);p()}else for(var d=this._needsClustering;h<l;h++)(i=t[h])instanceof L.LayerGroup?(u&&(t=t.slice(),u=!1),this._extractNonGroupLayers(i,t),l=t.length):i.getLatLng?this.hasLayer(i)||d.push(i):o.addLayer(i);return this},removeLayers:function(t){var e,i,n=t.length,o=this._featureGroup,r=this._nonPointGroup,a=!0;if(!this._map){for(e=0;e<n;e++)(i=t[e])instanceof L.LayerGroup?(a&&(t=t.slice(),a=!1),this._extractNonGroupLayers(i,t),n=t.length):(this._arraySplice(this._needsClustering,i),r.removeLayer(i),this.hasLayer(i)&&this._needsRemoving.push({layer:i,latlng:i._latlng}),this.fire("layerremove",{layer:i}));return this}if(this._unspiderfy){this._unspiderfy();var s=t.slice(),l=n;for(e=0;e<l;e++)(i=s[e])instanceof L.LayerGroup?(this._extractNonGroupLayers(i,s),l=s.length):this._unspiderfyLayer(i)}for(e=0;e<n;e++)(i=t[e])instanceof L.LayerGroup?(a&&(t=t.slice(),a=!1),this._extractNonGroupLayers(i,t),n=t.length):i.__parent?(this._removeLayer(i,!0,!0),this.fire("layerremove",{layer:i}),o.hasLayer(i)&&(o.removeLayer(i),i.clusterShow&&i.clusterShow())):(r.removeLayer(i),this.fire("layerremove",{layer:i}));return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(t){t.off(this._childMarkerEventHandlers,this),delete t.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var t=new L.LatLngBounds;this._topClusterLevel&&t.extend(this._topClusterLevel._bounds);for(var e=this._needsClustering.length-1;e>=0;e--)t.extend(this._needsClustering[e].getLatLng());return t.extend(this._nonPointGroup.getBounds()),t},eachLayer:function(t,e){var i,n,o,r=this._needsClustering.slice(),a=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(r),n=r.length-1;n>=0;n--){for(i=!0,o=a.length-1;o>=0;o--)if(a[o].layer===r[n]){i=!1;break}i&&t.call(e,r[n])}this._nonPointGroup.eachLayer(t,e)},getLayers:function(){var t=[];return this.eachLayer(function(e){t.push(e)}),t},getLayer:function(t){var e=null;return t=parseInt(t,10),this.eachLayer(function(i){L.stamp(i)===t&&(e=i)}),e},hasLayer:function(t){if(!t)return!1;var e,i=this._needsClustering;for(e=i.length-1;e>=0;e--)if(i[e]===t)return!0;for(i=this._needsRemoving,e=i.length-1;e>=0;e--)if(i[e].layer===t)return!1;return!(!t.__parent||t.__parent._group!==this)||this._nonPointGroup.hasLayer(t)},zoomToShowLayer:function(t,e){var i=this._map;"function"!=typeof e&&(e=function(){});var n=function(){!i.hasLayer(t)&&!i.hasLayer(t.__parent)||this._inZoomAnimation||(this._map.off("moveend",n,this),this.off("animationend",n,this),i.hasLayer(t)?e():t.__parent._icon&&(this.once("spiderfied",e,this),t.__parent.spiderfy()))};t._icon&&this._map.getBounds().contains(t.getLatLng())?e():t.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",n,this),this._map.panTo(t.getLatLng())):(this._map.on("moveend",n,this),this.on("animationend",n,this),t.__parent.zoomToBounds())},onAdd:function(t){var e,i,n;if(this._map=t,!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(t),this._nonPointGroup.addTo(t),this._gridClusters||this._generateInitialClusters(),this._maxLat=t.options.crs.projection.MAX_LATITUDE,e=0,i=this._needsRemoving.length;e<i;e++)(n=this._needsRemoving[e]).newlatlng=n.layer._latlng,n.layer._latlng=n.latlng;for(e=0,i=this._needsRemoving.length;e<i;e++)n=this._needsRemoving[e],this._removeLayer(n.layer,!0),n.layer._latlng=n.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),i=this._needsClustering,this._needsClustering=[],this.addLayers(i,!0)},onRemove:function(t){t.off("zoomend",this._zoomEnd,this),t.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(t){for(var e=t;e&&!e._icon;)e=e.__parent;return e||null},_arraySplice:function(t,e){for(var i=t.length-1;i>=0;i--)if(t[i]===e)return t.splice(i,1),!0},_removeFromGridUnclustered:function(t,e){for(var i=this._map,n=this._gridUnclustered,o=Math.floor(this._map.getMinZoom());e>=o&&n[e].removeObject(t,i.project(t.getLatLng(),e));e--);},_childMarkerDragStart:function(t){t.target.__dragStart=t.target._latlng},_childMarkerMoved:function(t){if(!this._ignoreMove&&!t.target.__dragStart){var e=t.target._popup&&t.target._popup.isOpen();this._moveChild(t.target,t.oldLatLng,t.latlng),e&&t.target.openPopup()}},_moveChild:function(t,e,i){t._latlng=e,this.removeLayer(t),t._latlng=i,this.addLayer(t)},_childMarkerDragEnd:function(t){var e=t.target.__dragStart;delete t.target.__dragStart,e&&this._moveChild(t.target,e,t.target._latlng)},_removeLayer:function(t,e,i){var n=this._gridClusters,o=this._gridUnclustered,r=this._featureGroup,a=this._map,s=Math.floor(this._map.getMinZoom());e&&this._removeFromGridUnclustered(t,this._maxZoom);var l,h=t.__parent,u=h._markers;for(this._arraySplice(u,t);h&&(h._childCount--,h._boundsNeedUpdate=!0,!(h._zoom<s));)e&&h._childCount<=1?(l=h._markers[0]===t?h._markers[1]:h._markers[0],n[h._zoom].removeObject(h,a.project(h._cLatLng,h._zoom)),o[h._zoom].addObject(l,a.project(l.getLatLng(),h._zoom)),this._arraySplice(h.__parent._childClusters,h),h.__parent._markers.push(l),l.__parent=h.__parent,h._icon&&(r.removeLayer(h),i||r.addLayer(l))):h._iconNeedsUpdate=!0,h=h.__parent;delete t.__parent},_isOrIsParent:function(t,e){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},fire:function(t,e,i){if(e&&e.layer instanceof L.MarkerCluster){if(e.originalEvent&&this._isOrIsParent(e.layer._icon,e.originalEvent.relatedTarget))return;t="cluster"+t}L.FeatureGroup.prototype.fire.call(this,t,e,i)},listens:function(t,e){return L.FeatureGroup.prototype.listens.call(this,t,e)||L.FeatureGroup.prototype.listens.call(this,"cluster"+t,e)},_defaultIconCreateFunction:function(t){var e=t.getChildCount(),i=" marker-cluster-";return i+=e<10?"small":e<100?"medium":"large",new L.DivIcon({html:"<div><span>"+e+"</span></div>",className:"marker-cluster"+i,iconSize:new L.Point(40,40)})},_bindEvents:function(){var t=this._map,e=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick;(e||n)&&this.on("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),t.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(t){var e=t.layer,i=e;if("clusterkeypress"!==t.type||!t.originalEvent||13===t.originalEvent.keyCode){for(;1===i._childClusters.length;)i=i._childClusters[0];i._zoom===this._maxZoom&&i._childCount===e._childCount&&this.options.spiderfyOnMaxZoom?e.spiderfy():this.options.zoomToBoundsOnClick&&e.zoomToBounds(),t.originalEvent&&13===t.originalEvent.keyCode&&this._map._container.focus()}},_showCoverage:function(t){var e=this._map;this._inZoomAnimation||(this._shownPolygon&&e.removeLayer(this._shownPolygon),t.layer.getChildCount()>2&&t.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(t.layer.getConvexHull(),this.options.polygonOptions),e.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,n=this._map;(t||i)&&this.off("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),e&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),n.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var t=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),t),this._currentShownBounds=t}},_generateInitialClusters:function(){var t=Math.ceil(this._map.getMaxZoom()),e=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius,n=i;"function"!=typeof i&&(n=function(){return i}),null!==this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(var o=t;o>=e;o--)this._gridClusters[o]=new L.DistanceGrid(n(o)),this._gridUnclustered[o]=new L.DistanceGrid(n(o));this._topClusterLevel=new this._markerCluster(this,e-1)},_addLayer:function(t,e){var i,n,o=this._gridClusters,r=this._gridUnclustered,a=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(t),t.on(this._childMarkerEventHandlers,this);e>=a;e--){i=this._map.project(t.getLatLng(),e);var s=o[e].getNearObject(i);if(s)return s._addChild(t),void(t.__parent=s);if(s=r[e].getNearObject(i)){var l=s.__parent;l&&this._removeLayer(s,!1);var h=new this._markerCluster(this,e,s,t);o[e].addObject(h,this._map.project(h._cLatLng,e)),s.__parent=h,t.__parent=h;var u=h;for(n=e-1;n>l._zoom;n--)u=new this._markerCluster(this,n,u),o[n].addObject(u,this._map.project(s.getLatLng(),n));return l._addChild(u),void this._removeFromGridUnclustered(s,e)}r[e].addObject(t,i)}this._topClusterLevel._addChild(t),t.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()})},_enqueue:function(t){this._queue.push(t),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var t=0;t<this._queue.length;t++)this._queue[t].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var t=Math.round(this._map._zoom);this._processQueue(),this._zoom<t&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,t)):this._zoom>t?(this._animationStart(),this._animationZoomOut(this._zoom,t)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(t){var e=this._maxLat;return void 0!==e&&(t.getNorth()>=e&&(t._northEast.lat=1/0),t.getSouth()<=-e&&(t._southWest.lat=-1/0)),t},_animationAddLayerNonAnimated:function(t,e){if(e===t)this._featureGroup.addLayer(t);else if(2===e._childCount){e._addToMap();var i=e.getAllChildMarkers();this._featureGroup.removeLayer(i[0]),this._featureGroup.removeLayer(i[1])}else e._updateIcon()},_extractNonGroupLayers:function(t,e){var i,n=t.getLayers(),o=0;for(e=e||[];o<n.length;o++)(i=n[o])instanceof L.LayerGroup?this._extractNonGroupLayers(i,e):e.push(i);return e},_overrideMarkerIcon:function(t){var e=t.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[t]}});return e}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(t,e){this._animationAddLayerNonAnimated(t,e)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(t,e){var i,n=this._getExpandedVisibleBounds(),o=this._featureGroup,r=Math.floor(this._map.getMinZoom());this._ignoreMove=!0,this._topClusterLevel._recursively(n,t,r,function(r){var a,s=r._latlng,l=r._markers;for(n.contains(s)||(s=null),r._isSingleParent()&&t+1===e?(o.removeLayer(r),r._recursivelyAddChildrenToMap(null,e,n)):(r.clusterHide(),r._recursivelyAddChildrenToMap(s,e,n)),i=l.length-1;i>=0;i--)a=l[i],n.contains(a._latlng)||o.removeLayer(a)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(n,e),o.eachLayer(function(t){t instanceof L.MarkerCluster||!t._icon||t.clusterShow()}),this._topClusterLevel._recursively(n,t,e,function(t){t._recursivelyRestoreChildPositions(e)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(n,t,r,function(t){o.removeLayer(t),t.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(t,e){this._animationZoomOutSingle(this._topClusterLevel,t-1,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t,this._getExpandedVisibleBounds())},_animationAddLayer:function(t,e){var i=this,n=this._featureGroup;n.addLayer(t),e!==t&&(e._childCount>2?(e._updateIcon(),this._forceLayout(),this._animationStart(),t._setPos(this._map.latLngToLayerPoint(e.getLatLng())),t.clusterHide(),this._enqueue(function(){n.removeLayer(t),t.clusterShow(),i._animationEnd()})):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(e,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(t,e,i){var n=this._getExpandedVisibleBounds(),o=Math.floor(this._map.getMinZoom());t._recursivelyAnimateChildrenInAndAddSelfToMap(n,o,e+1,i);var r=this;this._forceLayout(),t._recursivelyBecomeVisible(n,i),this._enqueue(function(){if(1===t._childCount){var a=t._markers[0];this._ignoreMove=!0,a.setLatLng(a.getLatLng()),this._ignoreMove=!1,a.clusterShow&&a.clusterShow()}else t._recursively(n,i,o,function(t){t._recursivelyRemoveChildrenFromMap(n,o,e+1)});r._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(t){return new L.MarkerClusterGroup(t)};var i=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(t,e,i,n){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this,pane:t.options.clusterPane}),this._group=t,this._zoom=e,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),n&&this._addChild(n)},getAllChildMarkers:function(t,e){t=t||[];for(var i=this._childClusters.length-1;i>=0;i--)this._childClusters[i].getAllChildMarkers(t);for(var n=this._markers.length-1;n>=0;n--)e&&this._markers[n].__dragStart||t.push(this._markers[n]);return t},getChildCount:function(){return this._childCount},zoomToBounds:function(t){for(var e,i=this._childClusters.slice(),n=this._group._map,o=n.getBoundsZoom(this._bounds),r=this._zoom+1,a=n.getZoom();i.length>0&&o>r;){r++;var s=[];for(e=0;e<i.length;e++)s=s.concat(i[e]._childClusters);i=s}o>r?this._group._map.setView(this._latlng,r):o<=a?this._group._map.setView(this._latlng,a+1):this._group._map.fitBounds(this._bounds,t)},getBounds:function(){var t=new L.LatLngBounds;return t.extend(this._bounds),t},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(t,e){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(t),t instanceof L.MarkerCluster?(e||(this._childClusters.push(t),t.__parent=this),this._childCount+=t._childCount):(e||this._markers.push(t),this._childCount++),this.__parent&&this.__parent._addChild(t,!0)},_setClusterCenter:function(t){this._cLatLng||(this._cLatLng=t._cLatLng||t._latlng)},_resetBounds:function(){var t=this._bounds;t._southWest&&(t._southWest.lat=1/0,t._southWest.lng=1/0),t._northEast&&(t._northEast.lat=-1/0,t._northEast.lng=-1/0)},_recalculateBounds:function(){var t,e,i,n,o=this._markers,r=this._childClusters,a=0,s=0,l=this._childCount;if(0!==l){for(this._resetBounds(),t=0;t<o.length;t++)i=o[t]._latlng,this._bounds.extend(i),a+=i.lat,s+=i.lng;for(t=0;t<r.length;t++)(e=r[t])._boundsNeedUpdate&&e._recalculateBounds(),this._bounds.extend(e._bounds),i=e._wLatLng,n=e._childCount,a+=i.lat*n,s+=i.lng*n;this._latlng=this._wLatLng=new L.LatLng(a/l,s/l),this._boundsNeedUpdate=!1}},_addToMap:function(t){t&&(this._backupLatlng=this._latlng,this.setLatLng(t)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(t,e,i){this._recursively(t,this._group._map.getMinZoom(),i-1,function(t){var i,n,o=t._markers;for(i=o.length-1;i>=0;i--)(n=o[i])._icon&&(n._setPos(e),n.clusterHide())},function(t){var i,n,o=t._childClusters;for(i=o.length-1;i>=0;i--)(n=o[i])._icon&&(n._setPos(e),n.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,e,i,n){this._recursively(t,n,e,function(o){o._recursivelyAnimateChildrenIn(t,o._group._map.latLngToLayerPoint(o.getLatLng()).round(),i),o._isSingleParent()&&i-1===n?(o.clusterShow(),o._recursivelyRemoveChildrenFromMap(t,e,i)):o.clusterHide(),o._addToMap()})},_recursivelyBecomeVisible:function(t,e){this._recursively(t,this._group._map.getMinZoom(),e,null,function(t){t.clusterShow()})},_recursivelyAddChildrenToMap:function(t,e,i){this._recursively(i,this._group._map.getMinZoom()-1,e,function(n){if(e!==n._zoom)for(var o=n._markers.length-1;o>=0;o--){var r=n._markers[o];i.contains(r._latlng)&&(t&&(r._backupLatlng=r.getLatLng(),r.setLatLng(t),r.clusterHide&&r.clusterHide()),n._group._featureGroup.addLayer(r))}},function(e){e._addToMap(t)})},_recursivelyRestoreChildPositions:function(t){for(var e=this._markers.length-1;e>=0;e--){var i=this._markers[e];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(t-1===this._zoom)for(var n=this._childClusters.length-1;n>=0;n--)this._childClusters[n]._restorePosition();else for(var o=this._childClusters.length-1;o>=0;o--)this._childClusters[o]._recursivelyRestoreChildPositions(t)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(t,e,i,n){var o,r;this._recursively(t,e-1,i-1,function(t){for(r=t._markers.length-1;r>=0;r--)o=t._markers[r],n&&n.contains(o._latlng)||(t._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())},function(t){for(r=t._childClusters.length-1;r>=0;r--)o=t._childClusters[r],n&&n.contains(o._latlng)||(t._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())})},_recursively:function(t,e,i,n,o){var r,a,s=this._childClusters,l=this._zoom;if(e<=l&&(n&&n(this),o&&l===i&&o(this)),l<e||l<i)for(r=s.length-1;r>=0;r--)(a=s[r])._boundsNeedUpdate&&a._recalculateBounds(),t.intersects(a._bounds)&&a._recursively(t,e,i,n,o)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var t=this.options.opacity;return this.setOpacity(0),this.options.opacity=t,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(t,e){var i=this._getCoord(e.x),n=this._getCoord(e.y),o=this._grid,r=o[n]=o[n]||{},a=r[i]=r[i]||[],s=L.Util.stamp(t);this._objectPoint[s]=e,a.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var i,n,o=this._getCoord(e.x),r=this._getCoord(e.y),a=this._grid,s=a[r]=a[r]||{},l=s[o]=s[o]||[];for(delete this._objectPoint[L.Util.stamp(t)],i=0,n=l.length;i<n;i++)if(l[i]===t)return l.splice(i,1),1===n&&delete s[o],!0},eachObject:function(t,e){var i,n,o,r,a,s,l=this._grid;for(i in l)for(n in a=l[i])for(s=a[n],o=0,r=s.length;o<r;o++)t.call(e,s[o])&&(o--,r--)},getNearObject:function(t){var e,i,n,o,r,a,s,l,h=this._getCoord(t.x),u=this._getCoord(t.y),c=this._objectPoint,p=this._sqCellSize,d=null;for(e=u-1;e<=u+1;e++)if(o=this._grid[e])for(i=h-1;i<=h+1;i++)if(r=o[i])for(n=0,a=r.length;n<a;n++)s=r[n],((l=this._sqDist(c[L.Util.stamp(s)],t))<p||l<=p&&null===d)&&(p=l,d=s);return d},_getCoord:function(t){var e=Math.floor(t/this._cellSize);return isFinite(e)?e:t},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}},L.QuickHull={getDistant:function(t,e){var i=e[1].lat-e[0].lat,n=e[0].lng-e[1].lng;return n*(t.lat-e[0].lat)+i*(t.lng-e[0].lng)},findMostDistantPointFromBaseLine:function(t,e){var i,n,o,r=0,a=null,s=[];for(i=e.length-1;i>=0;i--)n=e[i],(o=this.getDistant(n,t))>0&&(s.push(n),o>r&&(r=o,a=n));return{maxPoint:a,newPoints:s}},buildConvexHull:function(t,e){var i=[],n=this.findMostDistantPointFromBaseLine(t,e);return n.maxPoint?i=(i=i.concat(this.buildConvexHull([t[0],n.maxPoint],n.newPoints))).concat(this.buildConvexHull([n.maxPoint,t[1]],n.newPoints)):[t[0]]},getConvexHull:function(t){var e,i=!1,n=!1,o=!1,r=!1,a=null,s=null,l=null,h=null,u=null,c=null;for(e=t.length-1;e>=0;e--){var p=t[e];(!1===i||p.lat>i)&&(a=p,i=p.lat),(!1===n||p.lat<n)&&(s=p,n=p.lat),(!1===o||p.lng>o)&&(l=p,o=p.lng),(!1===r||p.lng<r)&&(h=p,r=p.lng)}n!==i?(c=s,u=a):(c=h,u=l);var d=[].concat(this.buildConvexHull([c,u],t),this.buildConvexHull([u,c],t));return d}},L.MarkerCluster.include({getConvexHull:function(){var t,e,i=this.getAllChildMarkers(),n=[];for(e=i.length-1;e>=0;e--)t=i[e].getLatLng(),n.push(t);return L.QuickHull.getConvexHull(n)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var t,e=this.getAllChildMarkers(null,!0),i=this._group,n=i._map,o=n.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),this._group._spiderfied=this,this._group.options.spiderfyShapePositions?t=this._group.options.spiderfyShapePositions(e.length,o):e.length>=this._circleSpiralSwitchover?t=this._generatePointsSpiral(e.length,o):(o.y+=10,t=this._generatePointsCircle(e.length,o)),this._animationSpiderfy(e,t)}},unspiderfy:function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},_generatePointsCircle:function(t,e){var i,n,o=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t),r=o/this._2PI,a=this._2PI/t,s=[];for(r=Math.max(r,35),s.length=t,i=0;i<t;i++)n=this._circleStartAngle+i*a,s[i]=new L.Point(e.x+r*Math.cos(n),e.y+r*Math.sin(n))._round();return s},_generatePointsSpiral:function(t,e){var i,n=this._group.options.spiderfyDistanceMultiplier,o=n*this._spiralLengthStart,r=n*this._spiralFootSeparation,a=n*this._spiralLengthFactor*this._2PI,s=0,l=[];for(l.length=t,i=t;i>=0;i--)i<t&&(l[i]=new L.Point(e.x+o*Math.cos(s),e.y+o*Math.sin(s))._round()),o+=a/(s+=r/o+5e-4*i);return l},_noanimationUnspiderfy:function(){var t,e,i=this._group,n=i._map,o=i._featureGroup,r=this.getAllChildMarkers(null,!0);for(i._ignoreMove=!0,this.setOpacity(1),e=r.length-1;e>=0;e--)t=r[e],o.removeLayer(t),t._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng),t.setZIndexOffset&&t.setZIndexOffset(0),t._spiderLeg&&(n.removeLayer(t._spiderLeg),delete t._spiderLeg);i.fire("unspiderfied",{cluster:this,markers:r}),i._ignoreMove=!1,i._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(t,e){var i,n,o,r,a=this._group,s=a._map,l=a._featureGroup,h=this._group.options.spiderLegPolylineOptions;for(a._ignoreMove=!0,i=0;i<t.length;i++)r=s.layerPointToLatLng(e[i]),n=t[i],o=new L.Polyline([this._latlng,r],h),s.addLayer(o),n._spiderLeg=o,n._preSpiderfyLatlng=n._latlng,n.setLatLng(r),n.setZIndexOffset&&n.setZIndexOffset(1e6),l.addLayer(n);this.setOpacity(.3),a._ignoreMove=!1,a.fire("spiderfied",{cluster:this,markers:t})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(t,e){var i,n,o,r,a,s,l=this,h=this._group,u=h._map,c=h._featureGroup,p=this._latlng,d=u.latLngToLayerPoint(p),f=L.Path.SVG,_=L.extend({},this._group.options.spiderLegPolylineOptions),m=_.opacity;for(void 0===m&&(m=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),f?(_.opacity=0,_.className=(_.className||"")+" leaflet-cluster-spider-leg"):_.opacity=m,h._ignoreMove=!0,i=0;i<t.length;i++)n=t[i],s=u.layerPointToLatLng(e[i]),o=new L.Polyline([p,s],_),u.addLayer(o),n._spiderLeg=o,f&&(r=o._path,a=r.getTotalLength()+.1,r.style.strokeDasharray=a,r.style.strokeDashoffset=a),n.setZIndexOffset&&n.setZIndexOffset(1e6),n.clusterHide&&n.clusterHide(),c.addLayer(n),n._setPos&&n._setPos(d);for(h._forceLayout(),h._animationStart(),i=t.length-1;i>=0;i--)s=u.layerPointToLatLng(e[i]),(n=t[i])._preSpiderfyLatlng=n._latlng,n.setLatLng(s),n.clusterShow&&n.clusterShow(),f&&(o=n._spiderLeg,(r=o._path).style.strokeDashoffset=0,o.setStyle({opacity:m}));this.setOpacity(.3),h._ignoreMove=!1,setTimeout(function(){h._animationEnd(),h.fire("spiderfied",{cluster:l,markers:t})},200)},_animationUnspiderfy:function(t){var e,i,n,o,r,a,s=this,l=this._group,h=l._map,u=l._featureGroup,c=t?h._latLngToNewLayerPoint(this._latlng,t.zoom,t.center):h.latLngToLayerPoint(this._latlng),p=this.getAllChildMarkers(null,!0),d=L.Path.SVG;for(l._ignoreMove=!0,l._animationStart(),this.setOpacity(1),i=p.length-1;i>=0;i--)(e=p[i])._preSpiderfyLatlng&&(e.closePopup(),e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng,a=!0,e._setPos&&(e._setPos(c),a=!1),e.clusterHide&&(e.clusterHide(),a=!1),a&&u.removeLayer(e),d&&(n=e._spiderLeg,o=n._path,r=o.getTotalLength()+.1,o.style.strokeDashoffset=r,n.setStyle({opacity:0})));l._ignoreMove=!1,setTimeout(function(){var t=0;for(i=p.length-1;i>=0;i--)(e=p[i])._spiderLeg&&t++;for(i=p.length-1;i>=0;i--)(e=p[i])._spiderLeg&&(e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),t>1&&u.removeLayer(e),h.removeLayer(e._spiderLeg),delete e._spiderLeg);l._animationEnd(),l.fire("unspiderfied",{cluster:s,markers:p})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(t){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(t){t._spiderLeg&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),this._map.removeLayer(t._spiderLeg),delete t._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(t){return t?t instanceof L.MarkerClusterGroup?t=t._topClusterLevel.getAllChildMarkers():t instanceof L.LayerGroup?t=t._layers:t instanceof L.MarkerCluster?t=t.getAllChildMarkers():t instanceof L.Marker&&(t=[t]):t=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(t),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(t),this},_flagParentsIconsNeedUpdate:function(t){var e,i;for(e in t)for(i=t[e].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},_refreshSingleMarkerModeMarkers:function(t){var e,i;for(e in t)i=t[e],this.hasLayer(i)&&i.setIcon(this._overrideMarkerIcon(i))}}),L.Marker.include({refreshIconOptions:function(t,e){var i=this.options.icon;return L.setOptions(i,t),this.setIcon(i),e&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),t.MarkerClusterGroup=e,t.MarkerCluster=i,Object.defineProperty(t,"__esModule",{value:!0})}(e)},function(t,e,i){var n=i(1),o=i(24);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={insert:"head",singleton:!1},a=(n(t.i,o,r),o.locals?o.locals:{});t.exports=a},function(t,e,i){(e=i(2)(!1)).push([t.i,".leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow {\n\t-webkit-transition: -webkit-transform 0.3s ease-out, opacity 0.3s ease-in;\n\t-moz-transition: -moz-transform 0.3s ease-out, opacity 0.3s ease-in;\n\t-o-transition: -o-transform 0.3s ease-out, opacity 0.3s ease-in;\n\ttransition: transform 0.3s ease-out, opacity 0.3s ease-in;\n}\n\n.leaflet-cluster-spider-leg {\n\t/* stroke-dashoffset (duration and function) should match with leaflet-marker-icon transform in order to track it exactly */\n\t-webkit-transition: -webkit-stroke-dashoffset 0.3s ease-out, -webkit-stroke-opacity 0.3s ease-in;\n\t-moz-transition: -moz-stroke-dashoffset 0.3s ease-out, -moz-stroke-opacity 0.3s ease-in;\n\t-o-transition: -o-stroke-dashoffset 0.3s ease-out, -o-stroke-opacity 0.3s ease-in;\n\ttransition: stroke-dashoffset 0.3s ease-out, stroke-opacity 0.3s ease-in;\n}\n",""]),t.exports=e},function(t,e,i){var n=i(1),o=i(26);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={insert:"head",singleton:!1},a=(n(t.i,o,r),o.locals?o.locals:{});t.exports=a},function(t,e,i){(e=i(2)(!1)).push([t.i,'.marker-cluster-small {\n\tbackground-color: rgba(181, 226, 140, 0.6);\n\t}\n.marker-cluster-small div {\n\tbackground-color: rgba(110, 204, 57, 0.6);\n\t}\n\n.marker-cluster-medium {\n\tbackground-color: rgba(241, 211, 87, 0.6);\n\t}\n.marker-cluster-medium div {\n\tbackground-color: rgba(240, 194, 12, 0.6);\n\t}\n\n.marker-cluster-large {\n\tbackground-color: rgba(253, 156, 115, 0.6);\n\t}\n.marker-cluster-large div {\n\tbackground-color: rgba(241, 128, 23, 0.6);\n\t}\n\n\t/* IE 6-8 fallback colors */\n.leaflet-oldie .marker-cluster-small {\n\tbackground-color: rgb(181, 226, 140);\n\t}\n.leaflet-oldie .marker-cluster-small div {\n\tbackground-color: rgb(110, 204, 57);\n\t}\n\n.leaflet-oldie .marker-cluster-medium {\n\tbackground-color: rgb(241, 211, 87);\n\t}\n.leaflet-oldie .marker-cluster-medium div {\n\tbackground-color: rgb(240, 194, 12);\n\t}\n\n.leaflet-oldie .marker-cluster-large {\n\tbackground-color: rgb(253, 156, 115);\n\t}\n.leaflet-oldie .marker-cluster-large div {\n\tbackground-color: rgb(241, 128, 23);\n}\n\n.marker-cluster {\n\tbackground-clip: padding-box;\n\tborder-radius: 20px;\n\t}\n.marker-cluster div {\n\twidth: 30px;\n\theight: 30px;\n\tmargin-left: 5px;\n\tmargin-top: 5px;\n\n\ttext-align: center;\n\tborder-radius: 15px;\n\tfont: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;\n\t}\n.marker-cluster span {\n\tline-height: 30px;\n\t}',""]),t.exports=e},function(t,e,i){var n=i(1),o=i(28);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={insert:"head",singleton:!1},a=(n(t.i,o,r),o.locals?o.locals:{});t.exports=a},function(t,e,i){(e=i(2)(!1)).push([t.i,"/*\n Leaflet.BeautifyIcon, a plugin that adds colorful iconic markers for Leaflet by giving full control of style to end user, It has also ability to adjust font awesome\n and glyphicon icons\n (c) 2016-2017, Muhammad Arslan Sajid\n http://leafletjs.com\n*/\n.beautify-marker {\n text-align: center;\n font-weight: 700;\n font-family: monospace;\n position:absolute;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n.beautify-marker.selected > div {\n outline: none;\n border-color: red;\n box-shadow: 0 0 10px red;\n}\n\n.beautify-marker.circle {\n border-radius: 100%;\n}\n\n.beautify-marker.circle-dot, .beautify-marker.doughnut {\n border-radius: 100%;\n}\n\n.beautify-marker.marker {\n border-top-left-radius: 50%;\n border-top-right-radius: 50% 100%;\n border-bottom-left-radius: 100% 50%;\n border-bottom-right-radius: 0%;\n /* rotating 45deg clockwise to get the corner bottom center */\n transform: rotate(45deg); \n \n}\n\n.beautify-marker.marker > * {\n /* rotating 45deg counterclock to adjust marker content back to normal */\n transform: rotate(-45deg);\n}\n",""]),t.exports=e},function(t,e,i){var n=i(1),o=i(30);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[t.i,o,""]]);var r={insert:"head",singleton:!1},a=(n(t.i,o,r),o.locals?o.locals:{});t.exports=a},function(t,e,i){(e=i(2)(!1)).push([t.i,"g.d3-overlay * {\n pointer-events: visiblePainted;\n}\n",""]),t.exports=e}])},t.exports=i()}),xr=(Lr=wr)&&Lr.__esModule&&Object.prototype.hasOwnProperty.call(Lr,"default")?Lr.default:Lr,Cr=function(t){function e(e){var i=t.call(this)||this;return i._layer=new xr.FeatureGroup,i._crs=xr.CRS.EPSG3857,i._layer.__hpcc_layer=i,i}return l(e,t),e.prototype.crs=function(){return this._crs},e.prototype.attribution=function(){return""},e.prototype.clear=function(){this._layer.clearLayers()},e.prototype.add=function(t){this._layer.addLayer(t)},e.prototype.init=function(){return this._initPromise||(this._initPromise=Promise.resolve()),this._initPromise},e.prototype.hasBounds=function(){return!1},e.prototype.getBounds=function(){return this._layer.getBounds()},e.prototype.layerEnter=function(t){t.addLayer(this._layer)},e.prototype.layerUpdate=function(t){},e.prototype.layerExit=function(t){this._layer.clearLayers(),t.removeLayer(this._layer)},e.prototype.zoomEnd=function(t){},e.prototype.moveEnd=function(t){},e.prototype.viewReset=function(t){},e}(e.Widget),Mr=co("Albers").scale(.5),kr=co("AlbersUsaPr").scale(.5),Pr={project:function(t){var e=kr([t.lng,t.lat]);return e||(e=Mr([t.lng,t.lat])),new xr.Point(e[0],e[1])},unproject:function(t){if(isNaN(t.x)||isNaN(t.y))return new xr.LatLng(0,0);var e=Mr.invert([t.x,t.y]);return new xr.LatLng(e[1],e[0])}},Ir=xr.Util.extend({},xr.CRS,{projection:Pr,transformation:new xr.Transformation(1,0,1,0),infinite:!0}),Er=function(t){function e(){var e=t.call(this)||this;return e._crs=Ir,e}return l(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.getBounds=function(){return new xr.LatLngBounds([20,-123],[49,-64])},e}(Cr);Er.prototype._class+=" map_AlbersLayer";var Ar=function(t){function e(){return t.call(this)||this}return l(e,t),e}(Cr);Ar.prototype._class+=" map_BlankLayer";var Tr=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.init=function(){return this._initPromise||(this._initPromise=Qo()),this._initPromise},e.prototype.attribution=function(){return window.__hpcc_gmap_apikey?"":"DEVELOPER USE ONLY (@hpcc-js)"},e.prototype.getMaxZoom=function(){return 23},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e),this.add(new xr.GoogleMutant({type:"roadmap",styles:this.googleMapStyles()}))},e}(Cr);Tr.prototype._class+=" map_GMapLayer",Tr.prototype.publish("googleMapStyles",{},"object","Styling for map colors etc",null,{tags:["Basic"]});var Sr=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.attribution=function(){return window.__hpcc_mapbox_apikey?"":"DEVELOPER USE ONLY (@hpcc-js)"},e.prototype.getMaxZoom=function(){return 18},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e),window.__hpcc_mapbox_apikey||console.warn("__hpcc_mapbox_apikey does not contain a valid API key, reverting to developers key (expect limited performance)");var i=window.__hpcc_mapbox_apikey||"pk.eyJ1IjoibGVzY2htb28iLCJhIjoiY2psY2FqY3l3MDhqNDN3cDl1MzFmZnkwcCJ9.HRoFwmz1j80gyz18ruggqw";this.add(new xr.TileLayer("https://api.mapbox.com/styles/v1/mapbox/{id}/tiles/{z}/{x}/{y}?access_token="+i,{attribution:'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',maxZoom:18,id:"streets-v11",accessToken:i}))},e}(Cr);Sr.prototype._class+=" map_MapBoxLayer";var zr=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.attribution=function(){return""},e.prototype.getMaxZoom=function(){return 18},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e),this.add(new xr.TileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',maxZoom:18,id:"open.streets"}))},e}(Cr);zr.prototype._class+=" map_MapBoxLayer";po(".map_Leaflet .leaflet-container{background-color:rgba(255,0,0,0);background:rgba(255,0,0,0)}");var Dr=function(t){function i(){var i=t.call(this)||this;return i._iconBar=(new e.IconBar).buttons([(new e.Button).faChar("fa-plus").tooltip("Zoom in").on("click",function(){i.zoomPlus()}),(new e.Button).faChar("fa-minus").tooltip("Zoom out").on("click",function(){i.zoomMinus()}),new e.Spacer,(new e.Button).faChar("fa-arrows-alt").tooltip("Zoom to fit").on("click",function(){i.zoomToFit()})]),i._blankLayer=new Ar,i._albersLayer=new Er,i._mapBoxLayer=new Sr,i._openStreetLayer=new zr,i._gmapLayer=new Tr,i.baseLayer(),i}return l(i,t),i.prototype.zoom=function(){return this._leafletMap.getZoom()},i.prototype.zoomPlus=function(){this._leafletMap.zoomIn()},i.prototype.zoomMinus=function(){this._leafletMap.zoomOut()},i.prototype.zoomToDefault=function(){this._leafletMap.flyTo({lat:this.defaultLat(),lng:this.defaultLong()},this.defaultZoom(),{animate:!1})},i.prototype.zoomToFit=function(){var t;"AlbersPR"===this.mapType()?t=this._albersLayer.getBounds():this.layers().filter(function(t){return t.hasBounds()}).forEach(function(e){t?t.extend(e.getBounds()):t=e.getBounds()}),t&&t.isValid()?this._leafletMap.fitBounds(t,{maxZoom:14}):this.zoomToDefault()},i.prototype.syncLayers=function(t,e,i){var n=this,o=u([],t),r=[],a=[];this._leafletMap.eachLayer(function(t){var e=o.indexOf(t.__hpcc_layer);e>=0?(r.push(t.__hpcc_layer),o.splice(e,1)):t.__hpcc_layer&&a.push(t.__hpcc_layer)}),o.forEach(function(t){t.layerEnter(n._leafletMap),t.layerUpdate(n._leafletMap)}),r.forEach(function(t){t.layerUpdate(n._leafletMap)}),a.forEach(function(t){t.layerExit(n._leafletMap)})},i.prototype.isLayer=function(){return void 0!==this._owner&&this._owner!==this},i.prototype.baseLayer=function(){switch(this.mapType()){case"AlbersPR":this.map(this._albersLayer);break;case"MapBox":this.map(this._mapBoxLayer);break;case"OpenStreet":this.map(this._openStreetLayer);break;case"Google":this.map(this._gmapLayer);break;case"None":default:this.map(this._blankLayer)}return this.map()},i.prototype.enter=function(e,i){t.prototype.enter.call(this,e,i),i.style("position","relative"),this._leafletElement=i.append("div").style("position","absolute").style("width",this.width()+"px").style("height",this.height()+"px"),this._iconBar.target(e)},i.prototype.update=function(e,i){var n=this;t.prototype.update.call(this,e,i),this._leafletElement.style("width",this.width()+"px").style("height",this.height()+"px");var o=this.baseLayer();this._prevCRS!==o.crs()&&(this._prevCRS=o.crs(),this._leafletMap&&(this.syncLayers([],e,i),this._leafletMap.remove(),this._leafletElement.html("")),this._leafletMap=new xr.Map(this._leafletElement.node(),{trackResize:!1,zoomControl:!1,zoomSnap:"AlbersPR"===this.mapType()?.1:1,crs:o.crs(),maxZoom:o.getMaxZoom?o.getMaxZoom():18}),this._leafletMap.setView([this.defaultLat(),this.defaultLong()],this.defaultZoom()),this._leafletMap.attributionControl.setPrefix(o.attribution()),this._leafletMap.on("zoomend",function(t){return n.layers().forEach(function(e){return e.zoomEnd(t)})}),this._leafletMap.on("moveend",function(t){return n.layers().forEach(function(e){return e.moveEnd(t)})}),this._leafletMap.on("viewreset",function(t){return n.layers().forEach(function(e){return e.viewReset(t)})}),this._renderCount=0),this.syncLayers(u([o],this.layers()),e,i),this._leafletMap.invalidateSize(),this.autoZoomToFit()&&this._leafletMap.whenReady(function(){this.zoomToFit()},this),this._iconBar.visible(this.showToolbar()).render(function(t){var e=t.getBBox();t.element().style("z-index",5e3).style("left",n.width()-e.width-4+"px")})},i.prototype.exit=function(e,i){this._iconBar.target(null),t.prototype.exit.call(this,e,i)},i.prototype.render=function(e){var i=this,n=u([this.baseLayer().init()],this.layers().map(function(t){return t.init()}));return Promise.all(n).then(function(){t.prototype.render.call(i,e)}),this},i}(e.HTMLWidget);Dr.prototype._class+=" map_Leaflet",Dr.prototype.publish("showToolbar",!0,"boolean","Show toolbar",void 0,{hidden:function(t){return t.isLayer()}}),Dr.prototype.publish("mapType","Google","set","Base Layer Type",["None","AlbersPR","MapBox","OpenStreet","Google"],{hidden:function(t){return t.isLayer()}}),Dr.prototype.publish("map",null,"widget","Base Layer",void 0,{internal:!0}),Dr.prototype.publish("layers",[],"propertyArray","Layers",void 0,{hidden:function(t){return t.isLayer()}}),Dr.prototype.publish("defaultLat",42.877742,"number","Center Latitude",void 0,{hidden:function(t){return t.isLayer()}}),Dr.prototype.publish("defaultLong",-97.380979,"number","Center Longitude",void 0,{hidden:function(t){return t.isLayer()}}),Dr.prototype.publish("defaultZoom",4,"number","Zoom Level",void 0,{hidden:function(t){return t.isLayer()}}),Dr.prototype.publish("autoZoomToFit",!0,"boolean","Auto zoom to fit Data",void 0,{hidden:function(t){return t.isLayer()}});var Or=function(t){function i(i){void 0===i&&(i=!1);var n=t.call(this)||this;return n._layer=i?new xr.MarkerClusterGroup:new xr.FeatureGroup,n._layer.__hpcc_layer=n,e.Utility.SimpleSelectionMixin.call(n),n.layers([n]),n}return l(i,t),i.prototype.owner=function(t){this._owner=t},i.prototype.valid=function(){return!0},i.prototype.clear=function(){this._layer.clearLayers()},i.prototype.add=function(t){this._layer.addLayer(t)},i.prototype.maxZoom=function(){return this._owner._leafletMap.getMaxZoom()||24},i.prototype.zoom=function(){return this._owner._leafletMap.getZoom()},i.prototype.visibleBounds=function(){return this._owner._leafletMap.getBounds()},i.prototype.init=function(){return this._initPromise||(this._initPromise=Promise.resolve()),this._initPromise},i.prototype.hasBounds=function(){return!1},i.prototype.getBounds=function(){return this._layer.getBounds()},i.prototype.style=function(t,i){return void 0===i?e.select(this._layer.getPane()).style(t):(e.select(this._layer.getPane()).style(t,i),this)},i.prototype.propValue=function(t,e,i){return(t<0?i:e[t])||i},i.prototype.layerEnter=function(t){t.addLayer(this._layer);var i=e.select(t.getContainer()).select(".leaflet-pane.leaflet-marker-pane");this._selection.widgetElement(i)},i.prototype.layerUpdate=function(t){},i.prototype.layerExit=function(t){this._layer.clearLayers(),t.removeLayer(this._layer)},i.prototype.zoomEnd=function(t){},i.prototype.moveEnd=function(t){},i.prototype.viewReset=function(t){},i}(Dr);Or.prototype._class+=" map_FeatureLayer",Or.prototype.mixin(e.Utility.SimpleSelectionMixin),Or.prototype.publishReset(["layers"]);var Nr=function(t){function e(e){return void 0===e&&(e=!0),t.call(this,e)||this}return l(e,t),e}(Or);Nr.prototype._class+=" map_ClusterLayer";var Br=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._lfd3=(new xr.D3SvgOverlay).drawCallback(function(t,i){return e.layerUpdate(void 0,i)}),e}return l(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.getBounds=function(){return this._lfd3.getBounds()},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e),this.add(this._lfd3)},e.prototype.layerUpdate=function(e,i){t.prototype.layerUpdate.call(this,e)},e.prototype.clickHandler=function(t,e){},e}(Or),Zr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.layerUpdate=function(e){var i=this;t.prototype.layerUpdate.call(this,e);var n=this.columns(),o=n.indexOf(this.latitudeColumn()),r=n.indexOf(this.longitudeColumn()),a=n.indexOf(this.strokeColorColumn()),s=n.indexOf(this.fillColorColumn());this.clear(),this.data().filter(function(t){return!i.omitNullLatLong()||!!t[o]&&!!t[r]}).forEach(function(t){i.add(new xr.Circle([t[o],t[r]],{color:i.propValue(a,t,i.strokeColor()),fill:!0,fillColor:i.propValue(s,t,i.fillColor()),fillOpacity:i.fillOpacity(),radius:i.radius(),origRow:t}).on("click",function(e){return i.clickHandler(e,t)}))})},e.prototype.clickHandler=function(t,e){},e}(Nr);Zr.prototype._class+=" map_Circles",Zr.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),Zr.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),Zr.prototype.publish("radius",50,"number","Radius (meters)"),Zr.prototype.publish("strokeColor","#376cea","html-color","Stroke Color",null,{optional:!0}),Zr.prototype.publish("strokeColorColumn",null,"set","Stroke color column",function(){return this.columns()},{optional:!0}),Zr.prototype.publish("fillColor","#376cea","html-color","Fill Color",null,{optional:!0}),Zr.prototype.publish("fillColorColumn",null,"set","Fill color column",function(){return this.columns()},{optional:!0}),Zr.prototype.publish("fillOpacity",.5,"number","Opacity",null,{tags:["Advanced"]}),Zr.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});var jr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.layerUpdate=function(e,i){var n=this;t.prototype.layerUpdate.call(this,e,i);var o=this._lfd3._rootGroup;i=i||this._lfd3.projection;var r=this.columns(),a=r.indexOf(this.latitudeColumn()),s=r.indexOf(this.longitudeColumn()),l=r.indexOf(this.strokeColorColumn()),h=r.indexOf(this.fillColorColumn());function u(t){return{lat:+t[a],lng:+t[s]}}var c=o.selectAll("circle").data(this.data().filter(function(t){return!n.omitNullLatLong()||!!t[a]&&!!t[s]}));c.enter().append("circle").merge(c).attr("cx",function(t){return i.latLngToLayerPoint(u(t)).x}).attr("cy",function(t){return i.latLngToLayerPoint(u(t)).y}).attr("r",Math.max(3/i.scale,this.radius()/i.metresPerPixel)).style("fill-opacity",this.fillOpacity()).style("stroke",function(t){return n.propValue(l,t,n.strokeColor())}).attr("stroke-width",Math.max(1/i.scale,1/i.metresPerPixel)).style("fill",function(t){return n.propValue(h,t,n.fillColor())}),c.exit().remove()},e.prototype.clickHandler=function(t,e){},e}(Br);jr.prototype._class+=" map_D3Circles",jr.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),jr.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),jr.prototype.publish("radius",50,"number","Radius (meters)"),jr.prototype.publish("strokeColor","#376cea","html-color","Stroke Color",null,{optional:!0}),jr.prototype.publish("strokeColorColumn",null,"set","Stroke color column",function(){return this.columns()},{optional:!0}),jr.prototype.publish("fillColor","#376cea","html-color","Fill Color",null,{optional:!0}),jr.prototype.publish("fillColorColumn",null,"set","Fill color column",function(){return this.columns()},{optional:!0}),jr.prototype.publish("fillOpacity",.5,"number","Opacity",null,{tags:["Advanced"]}),jr.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});po(".cluster-circle{background-clip:padding-box;font:12px Helvetica Neue,Arial,Helvetica,sans-serif}.cluster-circle>div{width:40px;height:40px;text-align:center;border-radius:20px}.cluster-circle>div>div{display:inline-block;margin-top:5px;width:30px;height:30px;text-align:center;border-radius:15px;font:12px Helvetica Neue,Arial,Helvetica,sans-serif}.cluster-circle span{line-height:30px}");var Rr=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return l(i,t),i.prototype.createIcon=function(t,i,n){var o=e.hsl(i);return o.opacity=.5,new xr.DivIcon({className:"cluster-circle",iconSize:new xr.Point(40,40),html:"<div style='opacity:"+this.opacity()+";background-color:"+o.toString()+"'><div style='background-color:"+i+"'><span style='color:"+e.Palette.textColor(i)+"'>"+n(t)+"</span></div></div>"})},i.prototype.layerUpdate=function(i){var n=this;t.prototype.layerUpdate.call(this,i),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id()));var o=this.cellFunc(this.latitudeColumn(),0),r=this.cellFunc(this.longitudeColumn(),0),a=this.cellFunc(this.weightColumn(),0),s=this.data(),l=e.extent(s,a),h=this.weightFormat()?e.format(this.weightFormat()):function(t){return t};this.clear(),s.forEach(function(t){var e=new xr.Marker(function(t){return[+o(t),+r(t)]}(t),{icon:n.createIcon(a(t),n._palette(a(t),l[0],l[1]),h),origRow:t}).on("click",function(e){return n.clickHandler(e,t)});e.bindTooltip("Weight: "+a(t)),n.add(e)})},i.prototype.clickHandler=function(t,e){},i}(Or);Rr.prototype._class+=" map_ClusterCircles",Rr.prototype._palette=e.Palette.rainbow("default"),Rr.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Rr.prototype._palette.switch()),Rr.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette"),Rr.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),Rr.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),Rr.prototype.publish("weightColumn",null,"set","Weight column",function(){return this.columns()},{optional:!0}),Rr.prototype.publish("weightFormat",".2s","string","Number format for weight"),Rr.prototype.publish("opacity",.66,"number","Opacity",null,{tags:["Advanced"]});var Gr=function(t){function e(e,i){return t.call(this,e,h(h({},i),{onEachFeature:function(t,e){i.onEachFeature&&i.onEachFeature(t,e),function(t,e){var i=e.getLatLngs();i.forEach(function(t){t.forEach(function(t){if(Array.isArray(t)){var e=0,i=0,n=0,o=0;t.forEach(function(t){t.lat>-62&&(t.lng>165?++o:t.lng<-165&&++n,t.lng>0?++i:t.lng<0&&++e)}),n>0&&o>0&&t.forEach(function(t){t.lng>165&&e>i?t.lng-=360:t.lng<-165&&i>e&&(t.lng+=360)})}})}),e.setLatLngs(i)}(0,e)}}))||this}return l(e,t),e.prototype.addData=function(e){var i,n;if("Topology"===e.type){for(n in e.objects)e.objects.hasOwnProperty(n)&&(i=bo(e,e.objects[n]),t.prototype.addData.call(this,i));return this}return t.prototype.addData.call(this,e),this},e}(xr.GeoJSON),Hr=null,Ur=null,Wr=null,Fr=null;!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}l(e,t),e.prototype.initStates=function(){return this._initPromise||(this._initPromise=new Promise(function(t,e){Hr&&t(),Ao(ko()+"/us-states.json",function(e){for(var i in Wr=bo((Hr=e).topology,Hr.topology.objects.states).features,Fr={},Wr)Wr[i].id&&(Fr[Hr.stateNames[Wr[i].id].code]=Wr[i]);t()})})),this._initPromise},e.prototype.initCounties=function(){return this._initPromise||(this._initPromise=new Promise(function(t,e){Ur&&t(),Ao(ko()+"/us-counties.json",function(e){for(var i in Wr=bo((Ur=e).topology,Ur.topology.objects.counties).features,Fr={},Wr)Wr[i].id&&(Fr[Wr[i].id]=Wr[i]);t()})})),this._initPromise},e.prototype.init=function(){return this.initCounties()},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e);var i=new Gr(Wr,{style:function(t){return{color:"#000",opacity:1,weight:1,fillColor:"#35495d",fillOpacity:.2}}});this.add(i)}}(Or);po(".leaflet-interactive.selected{stroke:red;stroke-width:1.25px}");var Vr=function(t){function i(){var i=t.call(this)||this;return i._dataMap={},i._dataMinWeight=null,i._dataMaxWeight=null,e.Utility.SimpleSelectionMixin.call(i),i}return l(i,t),i.prototype.hasBounds=function(){return!0},i.prototype.getBounds=function(){var e=t.prototype.getBounds.call(this);return e.isValid()?new xr.LatLngBounds([e.getNorth(),e.getWest()],[e.getSouth(),e.getEast()]):new xr.LatLngBounds([90,-180],[-90,180])},i.prototype.updateDataMap=function(t){this._dataMap={},this._dataMinWeight=null,this._dataMaxWeight=null;var e=this;t.forEach(function(t){e._dataMap[t[0]]=t,(!e._dataMinWeight||t[1]<e._dataMinWeight)&&(e._dataMinWeight=t[1]),(!e._dataMaxWeight||t[1]>e._dataMaxWeight)&&(e._dataMaxWeight=t[1])})},i.prototype.data=function(e){var i=t.prototype.data.apply(this,arguments);return arguments.length&&this.updateDataMap(e),i},i.prototype.styleFeature=function(t){var e=this._dataMap[t.properties.hpccID],i=e?this._palette(e[1],this._dataMinWeight,this._dataMaxWeight):"transparent";return{color:this.meshVisible()?this.meshColor():void 0,opacity:1,weight:this.meshStrokeWidth(),fillColor:i,fillOpacity:this.opacity()}},i.prototype.svgGlowID=function(){return this.id()+"_svgGlow"},i.prototype.layerEnter=function(i){if(t.prototype.layerEnter.call(this,i),!this._svgElement){this._svgElement=e.select(i.getContainer()).select(".leaflet-pane.leaflet-overlay-pane > svg");var n=this._svgElement.append("defs");new e.SVGGlowFilter(n,this.svgGlowID()),this._selection.widgetElement(this._svgElement)}},i.prototype.layerUpdate=function(e){var i=this;this._prevFeatures!==this._features&&(this.clear(),this._topoJson=new Gr(this._features,{onEachFeature:function(t,e){e.on("click",function(t){return i.clickHandler(t,e,e.feature.properties.hpccID)})}}).bindTooltip(function(t){return i.tooltipHandler(t,t.feature.properties.hpccID)},{direction:"top",sticky:!0}),this.add(this._topoJson)),t.prototype.layerUpdate.call(this,e),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this._topoJson.setStyle(function(t){return i.styleFeature(t)})},i.prototype.clickHandler=function(t,e,i){var n=this._selection.click(t.originalEvent.target);return this.click(this.rowToObj(this._dataMap[i]),this.columns()[0],n),n},i.prototype.tooltipText=function(t,e){return e},i.prototype.tooltipHandler=function(t,e){var i=this._dataMap[e],n=i&&i[1]||"";return this.tooltipText(this.rowToObj(i),"<b>"+e+"</b>: "+n)},i.prototype.click=function(t,e,i){},i}(Or);Vr.prototype._class+=" map_World",Vr.prototype._palette=e.Palette.rainbow("default"),Vr.prototype.mixin(e.Utility.SimpleSelectionMixin),Vr.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Vr.prototype._palette.switch(),{tags:["Basic","Shared"]}),Vr.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),Vr.prototype.publish("opacity",.5,"number","Opacity",null,{tags:["Advanced"]}),Vr.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),Vr.prototype.publish("meshColor","black","html-color","Stroke Color"),Vr.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width"),Vr.prototype.publish("internalOnly",!1,"boolean","Internal mesh only");var Yr=null,qr=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.init=function(){var t=this;return this._initPromise||(this._initPromise=new Promise(function(t,e){Yr&&t(Yr),Ao(ko()+"/countries.json",function(e){t(Yr=e)})}).then(function(e){var i;for(var n in t._features=bo(e.topology,e.topology.objects.countries).features,t._features)if(t._features[n].id){var o=t._features[n].id,r=null===(i=e.countryNames[o])||void 0===i?void 0:i.name;t._features[n].properties.hpccID=r}})),this._initPromise},e.prototype.tooltipHandler=function(t,e){var i=this._dataMap[e],n=i&&i[1]||"";return this.tooltipText(this.rowToObj(i),"<b>"+e+"</b>: "+n)},e}(Vr);function Xr(t,e){var i=t.indexOf(e);i>=0&&t.splice(i,1)}var Kr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._polylines=[],e._polygons=[],e._rectangles=[],e._circles=[],e}return l(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.drawOptions=function(){var t={marker:!1,circlemarker:!1};return this.enableCircle()||(t.circle=!1),this.enablePolyline()||(t.polyline=!1),this.enableRectangle()||(t.rectangle=!1),this.enablePolygon()||(t.polygon=!1),t},e.prototype.save=function(){return{polylines:this._polylines.map(function(t){return t.getLatLngs()}),polygons:this._polygons.map(function(t){return t.getLatLngs()}),rectangles:this._rectangles.map(function(t){return t.getBounds()}),circles:this._circles.map(function(t){return{center:t.getLatLng(),radius:t.getRadius()}})}},e.prototype.restore=function(t){var e=this;this.clear(),this._polylines=(t.polylines||[]).map(function(t){return new xr.Polyline(t)}),this._polygons=(t.polygons||[]).map(function(t){return new xr.Polygon(t)}),this._rectangles=(t.rectangles||[]).map(function(t){return new xr.Rectangle(t)}),this._circles=(t.circles||[]).map(function(t){return new xr.Circle(t.center,{radius:t.radius})}),this._polylines.forEach(function(t){return e.add(t)}),this._polygons.forEach(function(t){return e.add(t)}),this._rectangles.forEach(function(t){return e.add(t)}),this._circles.forEach(function(t){return e.add(t)})},e.prototype.layerEnter=function(e){var i=this;t.prototype.layerEnter.call(this,e),e.on(xr.Draw.Event.CREATED,function(t){var e=t.layerType,n=t.layer;switch(e){case"polyline":i._polylines.push(n);break;case"polygon":i._polygons.push(n);break;case"rectangle":i._rectangles.push(n);break;case"circle":i._circles.push(n);break;default:alert(e)}i.add(n),i.changed("ADD",n)}),e.on(xr.Draw.Event.EDITED,function(t){t.layers.eachLayer(function(t){i.changed("UPDATE",t)})}),e.on(xr.Draw.Event.DELETED,function(t){t.layers.eachLayer(function(t){Xr(i._polylines,t),Xr(i._polygons,t),Xr(i._rectangles,t),Xr(i._circles,t),i.changed("DELETE",t)})})},e.prototype.layerUpdate=function(e){t.prototype.layerUpdate.call(this,e),this.style("opacity",this.opacity());var i=this.drawOptions(),n=o.hashSum(i);this._drawOptionsHash!==n&&(this._drawOptionsHash=n,this._drawControl&&e.removeControl(this._drawControl),this._drawControl=new xr.Control.Draw({position:"topleft",draw:i,edit:{featureGroup:this._layer}}),e.addControl(this._drawControl))},e.prototype.layerExit=function(e){t.prototype.layerExit.call(this,e)},e.prototype.changed=function(t,e){},e}(Or);Kr.prototype._class+=" map_DrawLayer",Kr.prototype.publish("opacity",1,"number","Layer Opacity"),Kr.prototype.publish("enablePolyline",!0,"boolean","Enable Polyline Creation"),Kr.prototype.publish("enablePolygon",!0,"boolean","Enable Polygon Creation"),Kr.prototype.publish("enableRectangle",!0,"boolean","Enable Rectangle Creation"),Kr.prototype.publish("enableCircle",!0,"boolean","Enable Circle Creation");var Jr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.layerUpdate=function(e){var i=this;t.prototype.layerUpdate.call(this,e),this.style("opacity",this.opacity());var n,o=this.columns(),r=this.latitudeColumn_exists()?o.indexOf(this.latitudeColumn()):0,a=this.longitudeColumn_exists()?o.indexOf(this.longitudeColumn()):1,s=o.indexOf(this.weightColumn());this.clear();var l=this.data().filter(function(t){return!i.omitNullLatLong()||!!t[r]&&!!t[a]}).map(function(t){return n?n.extend([t[r],t[a]]):n=new xr.LatLngBounds([t[r],t[a]]),[t[r],t[a],i.weightColumn_exists()?t[s]:.5]}),h=new xr.HeatLayer(l,{minOpacity:this.minOpacity(),max:this.max(),radius:this.radius(),blur:this.blur(),gradient:this.gradient()});h.getBounds=function(){return n},this.add(h)},e}(Or);Jr.prototype._class+=" map_Heat",Jr.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),Jr.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),Jr.prototype.publish("weightColumn",null,"set","Optional normalized intensity (0 -> 1) ",function(){return this.columns()},{optional:!0}),Jr.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from IconsData",null,{tags:["Basic"]}),Jr.prototype.publish("opacity",.5,"number","Layer Opacity"),Jr.prototype.publish("minOpacity",.5,"number","The minimum opacity the heat will start at",null,{tags:["Basic"]}),Jr.prototype.publish("max",1,"number","maximum point intensity, 1.0 by default",null,{tags:["Basic"]}),Jr.prototype.publish("radius",25,"number","radius of each point of the heatmap, 25 by default",null,{tags:["Basic"]}),Jr.prototype.publish("blur",15,"number","amount of blur, 15 by default",null,{tags:["Basic"]}),Jr.prototype.publish("gradient",null,"object","color gradient config",null,{tags:["Basic"],optional:!0});var Qr=function(t){function e(e){return void 0===e&&(e=!1),t.call(this,e)||this}return l(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.tooltipText=function(t,e){return""+e},e.prototype.popupText=function(t,e){return""+e},e.prototype.layerUpdate=function(e,i){var n=this;if(t.prototype.layerUpdate.call(this,e),i){var o=this.columns(),r=o.indexOf(this.latitudeColumn()),a=o.indexOf(this.longitudeColumn()),s=o.indexOf(this.tooltipColumn()),l=o.indexOf(this.popupColumn()),h=this._db.checksum(),u=this.hashSum([],{dbChecksum:h});this._hashSum!==u&&(this._hashSum=u,this.clear(),this.data().filter(function(t){return!n.omitNullLatLong()||!!t[r]&&!!t[a]}).forEach(function(t){var e=new xr.Marker([t[r],t[a]],i(t)).on("click",function(i){return n.clickHandler(i,e,t)}),o=n.tooltipText(n.rowToObj(t),n.propValue(s,t,""));o&&e.bindTooltip(o,{direction:n.tooltipDirection(),offset:xr.point(n.tooltipOffsetX(),n.tooltipOffsetY())});var h=n.popupText(n.rowToObj(t),n.propValue(l,t,""));h&&e.bindPopup(h,{offset:xr.point(n.popupOffsetX(),n.popupOffsetY())}),n.add(e)}))}},e.prototype.clickHandler=function(t,e,i){var n=this._selection.click(e._icon);this._currSelRow=n?i:void 0,this.click(this.rowToObj(i),"",n)},e.prototype.click=function(t,e,i){},e}(Nr);Qr.prototype._class+=" map_Markers",Qr.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),Qr.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),Qr.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from IconsData",null,{tags:["Basic"]}),Qr.prototype.publish("tooltipColumn",null,"set","Tooltip column",function(){return this.columns()},{optional:!0}),Qr.prototype.publish("tooltipDirection","auto","set","Tooltip direction",["auto","left","top","right","bottom","center"]),Qr.prototype.publish("tooltipOffsetX",0,"number","Tooltip offset X"),Qr.prototype.publish("tooltipOffsetY",0,"number","Tooltip offset Y"),Qr.prototype.publish("popupColumn",null,"set","Popup column",function(){return this.columns()},{optional:!0}),Qr.prototype.publish("popupOffsetX",0,"number","Tooltip offset X"),Qr.prototype.publish("popupOffsetY",0,"number","Tooltip offset Y");var $r=function(t){function e(e){return void 0===e&&(e=!1),t.call(this,e)||this}return l(e,t),e.prototype.layerUpdate=function(e){var i=this,n=this.columns().indexOf(this.iconUrlColumn());t.prototype.layerUpdate.call(this,e,function(t){return{icon:new xr.Icon({iconUrl:i.propValue(n,t,i.iconUrl()),iconSize:[i.iconWidth(),i.iconHeight()],iconAnchor:[i.iconAnchorX(),i.iconAnchorY()],props:{owner:i,row:t}}),draggable:!1}})},e}(Qr);$r.prototype._class+=" map_Icons",$r.prototype.publish("iconUrl","","string","Icon URL",null),$r.prototype.publish("iconUrlColumn",null,"set","Icon URL column",function(){return this.columns()},{optional:!0}),$r.prototype.publish("iconWidth",32,"number","Icon width"),$r.prototype.publish("iconHeight",32,"number","Icon height"),$r.prototype.publish("iconAnchorX",16,"number","Icon Anchor X"),$r.prototype.publish("iconAnchorY",32,"number","Icon Anchor Y");var ta=function(t){function e(){return t.call(this,!0)||this}return l(e,t),e}($r);function ea(t){return[t[1],t[0]]}ta.prototype._class+=" map_ClusterIcons";var ia=function(t,e){return e[0]<-90?t[0]++:e[0]>90&&t[1]++,t},na=function(t){return t>90?t-360:t},oa=function(t){return t<-90?t+360:t},ra=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return l(i,t),i.prototype.fixDateLine=function(t){var e,i=t.reduce(ia,[0,0]),n=i[0],o=i[1];return n&&o?t.map((e=n>o?na:oa,function(t){return[e(t[0]),t[1]]})):t},i.prototype.hasBounds=function(){return!0},i.prototype.updateHexagons=function(){var t=this;this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id()));var i=this.cellFunc(this.polygonColumn(),[]),n=this.cellFunc(this.weightColumn(),0),o=this.data(),r=e.extent(o,n);this.clear(),o.forEach(function(e){t.add(new xr.Polygon(t.fixDateLine(i(e)).map(ea),{color:t._palette(r[1],r[0],r[1]),fillColor:t._palette(n(e),r[0],r[1]),fillOpacity:t.opacity(),weight:1,origRow:e}).on("click",function(i){return t.clickHandler(i,e)}))})},i.prototype.layerUpdate=function(e){t.prototype.layerUpdate.call(this,e),this.updateHexagons()},i.prototype.zoomEnd=function(e){t.prototype.zoomEnd.call(this,e)},i.prototype.moveEnd=function(e){t.prototype.moveEnd.call(this,e),this.updateHexagons()},i.prototype.clickHandler=function(t,e){},i}(Or);ra.prototype._class+=" map_Polygons",ra.prototype._palette=e.Palette.rainbow("default"),ra.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",ra.prototype._palette.switch(),{tags:["Basic","Shared"]}),ra.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),ra.prototype.publish("polygonColumn",null,"set","Polygon column",function(){return this.columns()},{optional:!0}),ra.prototype.publish("weightColumn",null,"set","Weight column",function(){return this.columns()},{optional:!0}),ra.prototype.publish("opacity",.5,"number","Opacity",null,{tags:["Advanced"]});var aa=2048/Math.PI,sa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.lineData=function(){var t,e=this.columns(),i=e.indexOf(this.latitudeColumn()),n=e.indexOf(this.longitudeColumn()),o=[];return this.data().forEach(function(e){var r=[e[n],e[i]];t&&o.push({type:"LineString",coordinates:[r,t]}),t=r}),o},e.prototype.isNull=function(t){return!t[0]&&!t[1]},e.prototype.isNull2=function(t){return!!this.omitNullLatLong()&&(this.isNull(t[0])||this.isNull(t[1]))},e.prototype.layerUpdate=function(e,i){var n=this;t.prototype.layerUpdate.call(this,e,i);var o=this._lfd3._rootGroup;i=i||this._lfd3.projection,this._lfd3.svg().selectAll("defs").data([void 0]).enter().append("defs").append("marker").attr("class","marker").attr("id",this._id+"_arrowHead").attr("viewBox","0 0 10 10").attr("refX",10).attr("refY",5).attr("markerWidth",12).attr("markerHeight",12).attr("markerUnits","strokeWidth").attr("orient","auto").append("polyline").attr("points","0,0 10,5 0,10 1,5"),this._lfd3.svg().select("defs > marker").style("fill",this.strokeColor()).style("stroke",null);var r=i.latLngToLayerPoint({lat:0,lng:0}),a=co("Mercator").scale(aa).translate([r.x,r.y]),s=un().projection(a),l=o.selectAll(".dataEdge").data(this.lineData().filter(function(t){return!n.isNull2(t.coordinates)}));l.enter().append("path").attr("class","dataEdge").attr("marker-end","url(#"+this._id+"_arrowHead)").merge(l).attr("d",s).style("stroke",this.strokeColor()).style("fill","none").attr("stroke-width",1/i.scale),l.exit().remove()},e.prototype.clickHandler=function(t,e){},e}(Br);sa.prototype._class+=" map_Path",sa.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),sa.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),sa.prototype.publish("strokeColor"," #666666","html-color","Stroke Color",null,{optional:!0}),sa.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});var la=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.lineData=function(){var t=this.columns(),e=t.indexOf(this.latitudeColumn()),i=t.indexOf(this.longitudeColumn()),n=t.indexOf(this.latitude2Column()),o=t.indexOf(this.longitude2Column()),r=[];return this.data().forEach(function(t){var a=[t[i],t[e]],s=[t[o],t[n]];r.push({type:"LineString",coordinates:[a,s]})}),r},e}(sa);la.prototype._class+=" map_Lines",la.prototype.publish("latitude2Column",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),la.prototype.publish("longitude2Column",null,"set","Longitude column",function(){return this.columns()},{optional:!0});var ha=function(t){function e(e){return void 0===e&&(e=!1),t.call(this,e)||this}return l(e,t),e.prototype.layerUpdate=function(e){var i=this,n=this.columns(),o=n.indexOf(this.faCharColumn()),r=n.indexOf(this.faCharColorColumn()),a=n.indexOf(this.strokeColorColumn()),s=n.indexOf(this.fillColorColumn());t.prototype.layerUpdate.call(this,e,function(t){return{icon:xr.BeautifyIcon({iconShape:"marker",icon:i.propValue(o,t,i.faChar()),textColor:i.propValue(r,t,i.faCharColor()),borderColor:i.propValue(a,t,i.strokeColor()),backgroundColor:i.propValue(s,t,i.fillColor()),props:{owner:i,row:t}}),draggable:!1}})},e}(Qr);ha.prototype._class+=" map_Pins",ha.prototype.publish("faChar","fa-circle","string","Default font awesome character"),ha.prototype.publish("faCharColumn",null,"set","Font awesome column",function(){return this.columns()},{optional:!0}),ha.prototype.publish("faCharColor","#ffffff","html-color","Default font awesome Color"),ha.prototype.publish("faCharColorColumn",null,"set","Font awesome color column",function(){return this.columns()},{optional:!0}),ha.prototype.publish("strokeColor","transparent","html-color","Default stroke Color",null,{optional:!0}),ha.prototype.publish("strokeColorColumn",null,"set","Stroke color column",function(){return this.columns()},{optional:!0}),ha.prototype.publish("fillColor","#376cea","html-color","Default fill Color",null,{optional:!0}),ha.prototype.publish("fillColorColumn",null,"set","Fill color column",function(){return this.columns()},{optional:!0});var ua=function(t){function e(){return t.call(this,!0)||this}return l(e,t),e}(ha);ua.prototype._class+=" map_ClusterPins";var ca={GB:["administrative_area_level_3","administrative_area_level_2","administrative_area_level_1"],IE:["administrative_area_level_2","administrative_area_level_1"],ND:["administrative_area_level_2","administrative_area_level_1"]},pa={};function da(t){return pa[t]||(pa[t]={topology:void 0,nameIdx:{},codeIdx:{}}),pa[t]}var fa=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.fetchTopo=function(t){return da(t).topology?Promise.resolve(da(t).topology):new Promise(function(e,i){Ao(ko()+"/"+t+".json",function(i){da(t).topology=i,e(i)})})},e.prototype.fetchTopoIdx=function(t){for(var e in da(t).nameIdx)return Promise.resolve(da(t).nameIdx);return new Promise(function(e,i){Ao(ko()+"/"+t+"_idx.json",function(i){var n,o=da(t),r=o.nameIdx,a=o.codeIdx;null===(n=ca[t])||void 0===n||n.forEach(function(t){var e=function(e){var n=i[t][e];Array.isArray(n)&&(r[e]||(r[e]={code:void 0,codes:[]}),r[e].codes=r[e].codes.concat(n),1===n.length&&(r[e].code=r[e].codes[0]),n.forEach(function(t){a[t]||(a[t]={name:void 0,score:9999,names:[]}),n.length<=a[t].score&&(a[t].name=e,a[t].score=n.length),a[t].names.push(e)}))};for(var n in i[t])e(n)}),e(r)})})},e.prototype.updateDataMap=function(e){var i=[],n=da(this.region()).nameIdx;return e.forEach(function(t){var e,o=null===(e=n[t[0]])||void 0===e?void 0:e.codes;o?null==o||o.forEach(function(e){i.push([e,t[1],t])}):i.push([t[0],t[1],t])}),t.prototype.updateDataMap.call(this,i)},e.prototype.init=function(){var t=this,e=this.region();return this._initPromise&&this._prevRegion===e||(this._prevRegion=e,this._initPromise=Promise.all([this.fetchTopo(e),this.fetchTopoIdx(e)]).then(function(e){var i=e[0];e[1];for(var n in t._features=bo(i,i.objects.PolbndA).features,t._features){var o=t._features[n].id||n;t._features[n].properties.hpccID=o}t.updateDataMap(t.data())})),this._initPromise},e.prototype.tooltipHandler=function(t,e){var i,n=this._dataMap[e],o=da(this.region()).codeIdx,r=n&&n[1]||"",a=null===(i=o[e])||void 0===i?void 0:i.names.map(function(t){var i;return(null===(i=o[e])||void 0===i?void 0:i.name)===t?"<u>"+t+"</u>":t}).join(", ");return this.tooltipText(this.rowToObj(n),"<b>"+(n&&n[2][0]||a||e)+"</b>: "+r)},e}(Vr);fa.prototype._class+=" map_Region",fa.prototype.publish("region","GB","set","Region Data",["AT","BE","BG","BR","CHLI","CY","CZ","DE","DK","EE","ES","FI","FR","GB","GE","GR","HR","HU","IE","IS","IT","KS","LT","LU","LV","MD","MK","MT","ND","NL","NO","PL","PT","RO","RS","SE","SI","SK","UA"]);var _a=function(t){function i(e){return void 0===e&&(e=!1),t.call(this,e)||this}return l(i,t),i.prototype.layerUpdate=function(i){var n=this,o=this.columns(),r=o.indexOf(this.textColumn()),a=o.indexOf(this.textColorColumn()),s=o.indexOf(this.strokeColorColumn()),l=o.indexOf(this.fillColorColumn());t.prototype.layerUpdate.call(this,i,function(t){var i=n.propValue(r,t,n.text()),o=n.textSize(i,n.fontFamily(),n.fontSize());return n.textFormat_exists()&&(i=e.format(n.textFormat())(i)),{icon:xr.BeautifyIcon({iconShape:"rectangle",iconAnchor:[o.width/2+n.textOffsetX(),o.height/2+n.textOffsetY()],html:'<span style="\n '+(n.fontFamily_exists()?"font-family:"+n.fontFamily()+";":"")+"\n font-size:"+n.fontSize()+'px;\n pointer-events: none;\n white-space:nowrap;\n ">'+i+"</span>",textColor:n.propValue(a,t,n.textColor()),borderColor:n.propValue(s,t,n.strokeColor()),backgroundColor:n.propValue(l,t,n.fillColor()),props:{owner:n,row:t}}),draggable:!1}})},i}(Qr);_a.prototype._class+=" map_Text",_a.prototype.publish("textOffsetX",0,"number","Horizontal offset of text"),_a.prototype.publish("textOffsetY",0,"number","Vertical offset of text"),_a.prototype.publish("text","","string","Default text"),_a.prototype.publish("textColumn",null,"set","Font awesome column",function(){return this.columns()},{optional:!0}),_a.prototype.publish("textColor","#ffffff","html-color","Default font awesome Color"),_a.prototype.publish("textColorColumn",null,"set","Text color column",function(){return this.columns()},{optional:!0}),_a.prototype.publish("textFontFamily",null,"set","Text color column",function(){return this.columns()},{optional:!0}),_a.prototype.publish("strokeColor","transparent","html-color","Default stroke Color",null,{optional:!0}),_a.prototype.publish("strokeColorColumn",null,"set","Stroke color column",function(){return this.columns()},{optional:!0}),_a.prototype.publish("fillColor","#376cea","html-color","Default fill Color",null,{optional:!0}),_a.prototype.publish("fillColorColumn",null,"set","Fill color column",function(){return this.columns()},{optional:!0}),_a.prototype.publish("fontFamily",null,"string","Font family",null,{optional:!0}),_a.prototype.publish("fontSize",16,"number","Font family",null,{optional:!0}),_a.prototype.publish("textFormat",null,"string","Format rules for text",null,{optional:!0});var ma=function(t){function e(){return t.call(this)||this}return l(e,t),e.prototype.getBounds=function(){var e=t.prototype.getBounds.call(this);return new xr.LatLngBounds([e.getNorth(),e.getWest()],[17.755278,-64.565])},e}(Vr),ga=null,ya={},va=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.init=function(){var t=this;return this._initPromise||(this._initPromise=new Promise(function(t,e){ga&&t(ga),Ao(ko()+"/us-counties.json",function(e){t(ga=e)})}).then(function(e){for(var i in t._features=bo(e.topology,e.topology.objects.counties).features,t._features)if(t._features[i].id){var n=t._features[i].id,o=e.countyNames[n];t._features[i].properties.hpccID=n,ya[n]=o}})),this._initPromise},e.prototype.tooltipHandler=function(t,e){var i=this._dataMap[e],n=i&&i[1]||"";return this.tooltipText(this.rowToObj(i),"<b>"+ya[e]+"</b>: "+n)},e}(ma);va.prototype._class+=" map_USCounties";var ba=null,La={},wa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.init=function(){var t=this;return this._initPromise||(this._initPromise=new Promise(function(t,e){ba&&t(ba),Ao(ko()+"/us-states.json",function(e){t(ba=e)})}).then(function(e){for(var i in t._features=bo(e.topology,e.topology.objects.states).features,t._features)if(t._features[i].id){var n=e.stateNames[t._features[i].id],o=n.code,r=n.name;t._features[i].properties.hpccID=o,La[o]=r}})),this._initPromise},e.prototype.tooltipHandler=function(t,e){var i=this._dataMap[e],n=i&&i[1]||"";return this.tooltipText(this.rowToObj(i),"<b>"+La[e]+"</b>: "+n)},e}(ma);wa.prototype._class+=" map_USStates";var xa=Object.freeze({__proto__:null,Circles:Zr,D3Circles:jr,ClusterCircles:Rr,Countries:qr,DrawLayer:Kr,FeatureLayer:Or,ClusterLayer:Nr,D3SurfaceLayer:Br,HeatLayer:Jr,Icons:$r,ClusterIcons:ta,Leaflet:Dr,Markers:Qr,Polygons:ra,Path:sa,Lines:la,Pins:ha,ClusterPins:ua,Region:fa,Text:_a,TileLayer:Cr,USCounties:va,USStates:wa,World:Vr});t.BUILD_VERSION="2.101.2",t.CanvasPinLayer=yo,t.CanvasPins=b,t.Choropleth=Po,t.ChoroplethContinents=Oo,t.ChoroplethCounties=jo,t.ChoroplethCountries=Do,t.ChoroplethStates=Uo,t.ChoroplethStatesHeat=Wo,t.GMap=tr,t.GMapCounties=nr,t.GMapGraph=or,t.GMapHeat=rr,t.GMapLayered=ir,t.GMapPin=sr,t.GMapPinLine=hr,t.GeoHash=Fo,t.Graph=ur,t.Graticule=cr,t.Heat=pr,t.IChoropleth=dr,t.Layer=go,t.Layered=_o,t.Leaflet=xa,t.Lines=lr,t.OpenStreet=yr,t.PKG_NAME="@hpcc-js/map",t.PKG_VERSION="2.74.1",t.Pins=ar,t.TestHeatMap=vr,t.TopoJSONChoropleth=br,t.projections=ho,t.requireGoogleMap=Qo,t.requireGoogleMapTimeout=function(t){Jo=t},t.resolve=co,t.topoJsonFolder=ko,t.types=lo,Object.defineProperty(t,"__esModule",{value:!0})});
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@hpcc-js/common"),require("@hpcc-js/api"),require("@hpcc-js/layout"),require("@hpcc-js/util"),require("@hpcc-js/graph"),require("@hpcc-js/other")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common","@hpcc-js/api","@hpcc-js/layout","@hpcc-js/util","@hpcc-js/graph","@hpcc-js/other"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["@hpcc-js/map"]={},t["@hpcc-js/common"],t["@hpcc-js/api"],t["@hpcc-js/layout"],t["@hpcc-js/util"],t["@hpcc-js/graph"],t["@hpcc-js/other"])}(this,(function(t,e,n,i,o,r,a){"use strict";function s(t,e){return e.forEach((function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach((function(n){if("default"!==n&&!(n in t)){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}}))})),Object.freeze(t)}var l=function(t,e){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},l(t,e)};function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var u=function(){return u=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},u.apply(this,arguments)};function c(t,e,n){if(n||2===arguments.length)for(var i,o=0,r=e.length;o<r;o++)!i&&o in e||(i||(i=Array.prototype.slice.call(e,0,o)),i[o]=e[o]);return t.concat(i||Array.prototype.slice.call(e))}function p(t,e,n,i){if(isNaN(e)||isNaN(n))return t;var o,r,a,s,l,h,u,c,p,d=t._root,f={data:i},_=t._x0,m=t._y0,g=t._x1,y=t._y1;if(!d)return t._root=f,t;for(;d.length;)if((h=e>=(r=(_+g)/2))?_=r:g=r,(u=n>=(a=(m+y)/2))?m=a:y=a,o=d,!(d=d[c=u<<1|h]))return o[c]=f,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&n===l)return f.next=d,o?o[c]=f:t._root=f,t;do{o=o?o[c]=new Array(4):t._root=new Array(4),(h=e>=(r=(_+g)/2))?_=r:g=r,(u=n>=(a=(m+y)/2))?m=a:y=a}while((c=u<<1|h)==(p=(l>=a)<<1|s>=r));return o[p]=d,o[c]=f,t}function d(t,e,n,i,o){this.node=t,this.x0=e,this.y0=n,this.x1=i,this.y1=o}function f(t){return t[0]}function _(t){return t[1]}function m(t,e,n){var i=new g(null==e?f:e,null==n?_:n,NaN,NaN,NaN,NaN);return null==t?i:i.addAll(t)}function g(t,e,n,i,o,r){this._x=t,this._y=e,this._x0=n,this._y0=i,this._x1=o,this._y1=r,this._root=void 0}function y(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var v=m.prototype=g.prototype;v.copy=function(){var t,e,n=new g(this._x,this._y,this._x0,this._y0,this._x1,this._y1),i=this._root;if(!i)return n;if(!i.length)return n._root=y(i),n;for(t=[{source:i,target:n._root=new Array(4)}];i=t.pop();)for(var o=0;o<4;++o)(e=i.source[o])&&(e.length?t.push({source:e,target:i.target[o]=new Array(4)}):i.target[o]=y(e));return n},v.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return p(this.cover(e,n),e,n,t)},v.addAll=function(t){var e,n,i,o,r=t.length,a=new Array(r),s=new Array(r),l=1/0,h=1/0,u=-1/0,c=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(a[n]=i,s[n]=o,i<l&&(l=i),i>u&&(u=i),o<h&&(h=o),o>c&&(c=o));if(l>u||h>c)return this;for(this.cover(l,h).cover(u,c),n=0;n<r;++n)p(this,a[n],s[n],t[n]);return this},v.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,i=this._y0,o=this._x1,r=this._y1;if(isNaN(n))o=(n=Math.floor(t))+1,r=(i=Math.floor(e))+1;else{for(var a,s,l=o-n,h=this._root;n>t||t>=o||i>e||e>=r;)switch(s=(e<i)<<1|t<n,(a=new Array(4))[s]=h,h=a,l*=2,s){case 0:o=n+l,r=i+l;break;case 1:n=o-l,r=i+l;break;case 2:o=n+l,i=r-l;break;case 3:n=o-l,i=r-l}this._root&&this._root.length&&(this._root=h)}return this._x0=n,this._y0=i,this._x1=o,this._y1=r,this},v.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},v.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},v.find=function(t,e,n){var i,o,r,a,s,l,h,u=this._x0,c=this._y0,p=this._x1,f=this._y1,_=[],m=this._root;for(m&&_.push(new d(m,u,c,p,f)),null==n?n=1/0:(u=t-n,c=e-n,p=t+n,f=e+n,n*=n);l=_.pop();)if(!(!(m=l.node)||(o=l.x0)>p||(r=l.y0)>f||(a=l.x1)<u||(s=l.y1)<c))if(m.length){var g=(o+a)/2,y=(r+s)/2;_.push(new d(m[3],g,y,a,s),new d(m[2],o,y,g,s),new d(m[1],g,r,a,y),new d(m[0],o,r,g,y)),(h=(e>=y)<<1|t>=g)&&(l=_[_.length-1],_[_.length-1]=_[_.length-1-h],_[_.length-1-h]=l)}else{var v=t-+this._x.call(null,m.data),b=e-+this._y.call(null,m.data),L=v*v+b*b;if(L<n){var w=Math.sqrt(n=L);u=t-w,c=e-w,p=t+w,f=e+w,i=m.data}}return i},v.remove=function(t){if(isNaN(r=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,i,o,r,a,s,l,h,u,c,p,d=this._root,f=this._x0,_=this._y0,m=this._x1,g=this._y1;if(!d)return this;if(d.length)for(;;){if((h=r>=(s=(f+m)/2))?f=s:m=s,(u=a>=(l=(_+g)/2))?_=l:g=l,e=d,!(d=d[c=u<<1|h]))return this;if(!d.length)break;(e[c+1&3]||e[c+2&3]||e[c+3&3])&&(n=e,p=c)}for(;d.data!==t;)if(i=d,!(d=d.next))return this;return(o=d.next)&&delete d.next,i?(o?i.next=o:delete i.next,this):e?(o?e[c]=o:delete e[c],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[p]=d:this._root=d),this):(this._root=o,this)},v.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},v.root=function(){return this._root},v.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},v.visit=function(t){var e,n,i,o,r,a,s=[],l=this._root;for(l&&s.push(new d(l,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(l=e.node,i=e.x0,o=e.y0,r=e.x1,a=e.y1)&&l.length){var h=(i+r)/2,u=(o+a)/2;(n=l[3])&&s.push(new d(n,h,u,r,a)),(n=l[2])&&s.push(new d(n,i,u,h,a)),(n=l[1])&&s.push(new d(n,h,o,r,u)),(n=l[0])&&s.push(new d(n,i,o,h,u))}return this},v.visitAfter=function(t){var e,n=[],i=[];for(this._root&&n.push(new d(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var o=e.node;if(o.length){var r,a=e.x0,s=e.y0,l=e.x1,h=e.y1,u=(a+l)/2,c=(s+h)/2;(r=o[0])&&n.push(new d(r,a,s,u,c)),(r=o[1])&&n.push(new d(r,u,s,l,c)),(r=o[2])&&n.push(new d(r,a,c,u,h)),(r=o[3])&&n.push(new d(r,u,c,l,h))}i.push(e)}for(;e=i.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},v.x=function(t){return arguments.length?(this._x=t,this):this._x},v.y=function(t){return arguments.length?(this._y=t,this):this._y};var b=function(){function t(t,e,n,i){this._pin_h=0,this._pin_w=0,this._pin_h=n,this._pin_w=i,this._tree=m().extent(t).addAll(e)}return t.prototype.searchRect=function(t,e,n,i){var o=[];return this._tree.visit((function(r,a,s,l,h){var u,c,p=!1;do{if(!r.length)if(r.data&&!r.data.already_flagged)(u={left:t,right:n,top:e,bottom:i},((c=r.data)[0]<u.right||c[0]>u.left)&&(c[1]<u.bottom||c[1]>u.top))&&(r.data.already_flagged=!0,o.push(r.data));p=r=r.next}while(p);return a>=n||s>=i||l<t||h<e})),o},t.prototype.getTreeRects=function(){var t=[];return this._tree.visit((function(e,n,i,o,r){t.push([n,i,o-n,r-i])})),t},t}(),w=function(t){function e(){var e=t.call(this)||this;return e._overlap_count=0,e._sub_overlap_count=0,e}return h(e,t),e.prototype.enter=function(e,n){t.prototype.enter.apply(this,arguments),this.resize(this._size)},e.prototype.update=function(e,n){t.prototype.update.apply(this,arguments),this._ctx=this.element().node().getContext("2d");var i=this.topLeftX_exists()&&this.topLeftY_exists()&&this.bottomRightX_exists()&&this.bottomRightY_exists(),o=(i?this.skewedData():this.data()).map((function(t){return c([],t,!0)})).map((function(t){return t.is_cluster=!1,t.already_flagged=!1,t.weight=t[2],t.fillStyle="#FFFFFF",t.strokeStyle="#000000",t.overlap_arr=[],t}));this._ctx.clearRect(0,0,this.width(),this.height()),this._drawData=this.enableClustering()?this.applyClustering(o):o,this.draw(this._drawData)},e.prototype.applyClustering=function(t){var e=this,n=this;this._overlap_count=0;var i=this.pinHeight(),o=this.pinWidth(),r=o/2,a=i/2,s=new b([[0,0],[this.size().width,this.size().height]],t,i,o);switch(this._quadtree_rect_arr=s.getTreeRects(),this.clusterMode()){case"default":var l=t.map((function(t){if(!t.already_flagged){var n=e.searchRectMult(),i=t[0]-r*n,o=t[1]-a*n-8,l=t[0]+r*n,h=t[1]+a*n-8;t.overlap_arr=s.searchRect(i,o,l,h).filter((function(e){return e!==t})),0===t.overlap_arr.length&&(t.already_flagged=!1)}return t}));return l.forEach((function(t){t.already_flagged&&t.overlap_arr.length&&l.push(M(c([t],t.overlap_arr,!0)))})),l;case"grid":for(var h=c([],t,!0),u=this.gridCellSize(),p=this.gridCellSize(),d=Math.ceil(this.size().width/u),f=Math.ceil(this.size().height/p),_=0;_<f;_++)for(var m=0;m<d;m++){var g=u*m,y=p*_,v=u*(m+1),L=p*(_+1),w=s.searchRect(g,y,v,L);if(w.length>1){var x=g+u/2,k=y+p/2;h.push(M(w,x,k))}}return h}return t;function M(t,e,i){var o=t.reduce((function(t,e){return e.already_flagged=!0,t+e[2]}),0);return{0:void 0!==e?e:n.useAveragePos()?t.reduce((function(t,e){return t+e[0]*e[2]}),0)/o:t[0][0],1:void 0!==i?i:n.useAveragePos()?t.reduce((function(t,e){return t+e[1]*e[2]}),0)/o:t[0][1],weight:t.reduce((function(t,e){return t+e[2]}),0),is_cluster:!0,already_flagged:!1,fillStyle:"#FFFFFF",strokeStyle:"#000000",overlap_arr:[]}}},e.prototype.drawQuadtree=function(){var t=this;this._quadtree_rect_arr&&(this._ctx.strokeStyle="#000000",this._quadtree_rect_arr.forEach((function(e){t._ctx.strokeRect(e[0],e[1],e[2],e[3])})))},e.prototype.draw=function(t){var e=this,n=this,i=this._ctx;this.showQuadtree()&&this.drawQuadtree();var o=this.arrowHeight(),r=this.arrowWidth(),a=this.pinHeight(),s=this.pinWidth(),l=this.radiusWeightMult(),h=0;function u(t,e){var n=t.left+t.width/2-t.arrow_width/2,o=t.left+t.width/2,r=t.left+t.width/2+t.arrow_width/2,a=t.top+t.height,s=a+t.arrow_height,l=a;e?(i.fillStyle="#FFFFFF",i.strokeStyle="#FFFFFF",a-=2,s-=2,l-=2):(i.fillStyle="#FFFFFF",i.strokeStyle="#000000"),i.beginPath(),i.moveTo(n,a),i.lineTo(o,s),i.lineTo(r,l),i.lineTo(n,a),i.closePath(),i.stroke(),i.fill(),e||u(t,!0)}function c(t){i.font="".concat(n.pinFontSize(),"px '").concat(n.pinFontFamily(),"'");var e=t.left+t.width/2,o=t.top+t.height/2;i.textAlign="center",i.textBaseline="middle",i.fillStyle="#000000";for(var r=0,a=i.measureText(t.icon).width;a>t.width||!n.shrinkFontToPin();)r++,i.font="".concat(n.pinFontSize()-r,"px '").concat(n.pinFontFamily(),"'"),a=i.measureText(t.icon).width;i.fillText(t.icon,e,o)}this.useWeightedRadius()&&t.filter((function(t){return t.is_cluster})).forEach((function(t){h<t.weight&&(h=t.weight)})),t.filter((function(t){return!t.already_flagged})).sort((function(t,e){return t[1]>e[1]?1:-1})).forEach((function(t){if(t.is_cluster||e.allCircles()){var n=s/2;e.useWeightedRadius()&&(n+=s*(l*t.weight/h)),(p={icon:t.weight,left:Math.floor(t[0]-n)+.5,top:Math.floor(t[1]-n-o)+.5,radius:n,arrow_height:o,arrow_width:r}).width=2*p.radius,p.height=p.width,i.fillStyle="#FFFFFF",i.strokeStyle="#000000",i.beginPath(),i.arc(p.left+p.width/2,p.top+p.height/2,p.radius,0,2*Math.PI),i.closePath(),i.fill(),i.stroke(),c(p)}else!function(t){i.fillStyle=t.fillStyle,i.strokeStyle="#000000",i.fillRect(t.left,t.top,t.width,t.height),i.strokeRect(t.left,t.top,t.width,t.height),u(t),c(t)}({fillStyle:t.fillStyle,strokeStyle:t.strokeStyle,icon:t.weight,left:Math.floor(t[0]-s/2)+.5,top:Math.floor(t[1]-a-o)+.5,width:s,height:a,arrow_height:o,arrow_width:r});var p}))},e.prototype.skewedData=function(){var t=this,e=[],n=this.data(),i=this.size(),o=this.bottomRightX()-this.topLeftX(),r=this.bottomRightY()-this.topLeftY(),a=o/i.width,s=r/i.height;return n.forEach((function(n){var i=Math.abs(n[0]-t.topLeftX()),o=Math.abs(n[1]-t.topLeftY()),r=i/a,l=o/s;e.push([r,l,n[2]])})),e},e}(e.CanvasWidget);function x(){return new k}function k(){this.reset()}w.prototype._class+=" map_CanvasPins",w.prototype.publish("clusterMode","default","set","clusterMode",["defualt","grid"],{tags:["Basic"],optional:!0}),w.prototype.publish("gridCellSize",80,"number","gridCellSize",null,{tags:["Basic"],optional:!0}),w.prototype.publish("allCircles",!1,"boolean","allCircles",null,{tags:["Basic"],optional:!0}),w.prototype.publish("showQuadtree",!1,"boolean","showQuadtree",null,{tags:["Basic"],optional:!0}),w.prototype.publish("useAveragePos",!1,"boolean","useAveragePos",null,{tags:["Basic"],optional:!0}),w.prototype.publish("shrinkFontToPin",!0,"boolean","shrinkFontToPin",null,{tags:["Basic"],optional:!0}),w.prototype.publish("enableClustering",!0,"boolean","enableClustering",null,{tags:["Basic"],optional:!0}),w.prototype.publish("useWeightedRadius",!1,"boolean","useWeightedRadius",null,{tags:["Basic"],optional:!0}),w.prototype.publish("radiusWeightMult",.5,"number","radiusWeightMult",null,{tags:["Basic"],optional:!0}),w.prototype.publish("searchRectMult",3,"number","searchRectMult",null,{tags:["Basic"],optional:!0}),w.prototype.publish("bottomRightX",null,"number","Bottom right x-value",null,{tags:["Basic"],optional:!0}),w.prototype.publish("bottomRightY",null,"number","Bottom right y-value",null,{tags:["Basic"],optional:!0}),w.prototype.publish("topLeftX",null,"number","Top left x-value",null,{tags:["Basic"],optional:!0}),w.prototype.publish("topLeftY",null,"number","Top left y-value",null,{tags:["Basic"],optional:!0}),w.prototype.publish("pinHeight",20,"number","pinHeight",null,{tags:["Basic"],optional:!0}),w.prototype.publish("pinWidth",20,"number","pinWidth",null,{tags:["Basic"],optional:!0}),w.prototype.publish("pinFontFamily","Arial","string","pinFontFamily",null,{tags:["Basic"],optional:!0}),w.prototype.publish("pinFontSize",14,"number","pinFontSize",null,{tags:["Basic"],optional:!0}),w.prototype.publish("arrowHeight",8,"number","arrowHeight",null,{tags:["Basic"],optional:!0}),w.prototype.publish("arrowWidth",8,"number","arrowWidth",null,{tags:["Basic"],optional:!0}),k.prototype={constructor:k,reset:function(){this.s=this.t=0},add:function(t){C(M,t,this.t),C(this,M.s,this.s),this.s?this.t+=M.t:this.s=M.t},valueOf:function(){return this.s}};var M=new k;function C(t,e,n){var i=t.s=e+n,o=i-e,r=i-o;t.t=e-r+(n-o)}var P=1e-6,E=1e-12,T=Math.PI,S=T/2,z=T/4,O=2*T,D=180/T,A=T/180,I=Math.abs,B=Math.atan,N=Math.atan2,Z=Math.cos,R=Math.ceil,j=Math.exp,G=Math.log,U=Math.pow,H=Math.sin,F=Math.sign||function(t){return t>0?1:t<0?-1:0},W=Math.sqrt,V=Math.tan;function q(t){return t>1?0:t<-1?T:Math.acos(t)}function Y(t){return t>1?S:t<-1?-S:Math.asin(t)}function K(t){return(t=H(t/2))*t}function X(){}function J(t,e){t&&$.hasOwnProperty(t.type)&&$[t.type](t,e)}var Q={Feature:function(t,e){J(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,o=n.length;++i<o;)J(n[i].geometry,e)}},$={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)t=n[i],e.point(t[0],t[1],t[2])},LineString:function(t,e){tt(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)tt(n[i],e,0)},Polygon:function(t,e){et(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)et(n[i],e)},GeometryCollection:function(t,e){for(var n=t.geometries,i=-1,o=n.length;++i<o;)J(n[i],e)}};function tt(t,e,n){var i,o=-1,r=t.length-n;for(e.lineStart();++o<r;)i=t[o],e.point(i[0],i[1],i[2]);e.lineEnd()}function et(t,e){var n=-1,i=t.length;for(e.polygonStart();++n<i;)tt(t[n],e,1);e.polygonEnd()}function nt(t,e){t&&Q.hasOwnProperty(t.type)?Q[t.type](t,e):J(t,e)}var it,ot,rt,at,st,lt=x(),ht=x(),ut={point:X,lineStart:X,lineEnd:X,polygonStart:function(){lt.reset(),ut.lineStart=ct,ut.lineEnd=pt},polygonEnd:function(){var t=+lt;ht.add(t<0?O+t:t),this.lineStart=this.lineEnd=this.point=X},sphere:function(){ht.add(O)}};function ct(){ut.point=dt}function pt(){ft(it,ot)}function dt(t,e){ut.point=ft,it=t,ot=e,rt=t*=A,at=Z(e=(e*=A)/2+z),st=H(e)}function ft(t,e){var n=(t*=A)-rt,i=n>=0?1:-1,o=i*n,r=Z(e=(e*=A)/2+z),a=H(e),s=st*a,l=at*r+s*Z(o),h=s*i*H(o);lt.add(N(h,l)),rt=t,at=r,st=a}function _t(t){return[N(t[1],t[0]),Y(t[2])]}function mt(t){var e=t[0],n=t[1],i=Z(n);return[i*Z(e),i*H(e),H(n)]}function gt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function yt(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function vt(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function bt(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Lt(t){var e=W(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var wt,xt,kt,Mt,Ct,Pt,Et,Tt,St,zt,Ot,Dt,At,It,Bt,Nt,Zt,Rt,jt,Gt,Ut,Ht,Ft,Wt,Vt,qt,Yt=x(),Kt={point:Xt,lineStart:Qt,lineEnd:$t,polygonStart:function(){Kt.point=te,Kt.lineStart=ee,Kt.lineEnd=ne,Yt.reset(),ut.polygonStart()},polygonEnd:function(){ut.polygonEnd(),Kt.point=Xt,Kt.lineStart=Qt,Kt.lineEnd=$t,lt<0?(wt=-(kt=180),xt=-(Mt=90)):Yt>P?Mt=90:Yt<-P&&(xt=-90),zt[0]=wt,zt[1]=kt},sphere:function(){wt=-(kt=180),xt=-(Mt=90)}};function Xt(t,e){St.push(zt=[wt=t,kt=t]),e<xt&&(xt=e),e>Mt&&(Mt=e)}function Jt(t,e){var n=mt([t*A,e*A]);if(Tt){var i=yt(Tt,n),o=yt([i[1],-i[0],0],i);Lt(o),o=_t(o);var r,a=t-Ct,s=a>0?1:-1,l=o[0]*D*s,h=I(a)>180;h^(s*Ct<l&&l<s*t)?(r=o[1]*D)>Mt&&(Mt=r):h^(s*Ct<(l=(l+360)%360-180)&&l<s*t)?(r=-o[1]*D)<xt&&(xt=r):(e<xt&&(xt=e),e>Mt&&(Mt=e)),h?t<Ct?ie(wt,t)>ie(wt,kt)&&(kt=t):ie(t,kt)>ie(wt,kt)&&(wt=t):kt>=wt?(t<wt&&(wt=t),t>kt&&(kt=t)):t>Ct?ie(wt,t)>ie(wt,kt)&&(kt=t):ie(t,kt)>ie(wt,kt)&&(wt=t)}else St.push(zt=[wt=t,kt=t]);e<xt&&(xt=e),e>Mt&&(Mt=e),Tt=n,Ct=t}function Qt(){Kt.point=Jt}function $t(){zt[0]=wt,zt[1]=kt,Kt.point=Xt,Tt=null}function te(t,e){if(Tt){var n=t-Ct;Yt.add(I(n)>180?n+(n>0?360:-360):n)}else Pt=t,Et=e;ut.point(t,e),Jt(t,e)}function ee(){ut.lineStart()}function ne(){te(Pt,Et),ut.lineEnd(),I(Yt)>P&&(wt=-(kt=180)),zt[0]=wt,zt[1]=kt,Tt=null}function ie(t,e){return(e-=t)<0?e+360:e}function oe(t,e){return t[0]-e[0]}function re(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var ae={sphere:X,point:se,lineStart:he,lineEnd:pe,polygonStart:function(){ae.lineStart=de,ae.lineEnd=fe},polygonEnd:function(){ae.lineStart=he,ae.lineEnd=pe}};function se(t,e){t*=A;var n=Z(e*=A);le(n*Z(t),n*H(t),H(e))}function le(t,e,n){++Ot,At+=(t-At)/Ot,It+=(e-It)/Ot,Bt+=(n-Bt)/Ot}function he(){ae.point=ue}function ue(t,e){t*=A;var n=Z(e*=A);Wt=n*Z(t),Vt=n*H(t),qt=H(e),ae.point=ce,le(Wt,Vt,qt)}function ce(t,e){t*=A;var n=Z(e*=A),i=n*Z(t),o=n*H(t),r=H(e),a=N(W((a=Vt*r-qt*o)*a+(a=qt*i-Wt*r)*a+(a=Wt*o-Vt*i)*a),Wt*i+Vt*o+qt*r);Dt+=a,Nt+=a*(Wt+(Wt=i)),Zt+=a*(Vt+(Vt=o)),Rt+=a*(qt+(qt=r)),le(Wt,Vt,qt)}function pe(){ae.point=se}function de(){ae.point=_e}function fe(){me(Ht,Ft),ae.point=se}function _e(t,e){Ht=t,Ft=e,t*=A,e*=A,ae.point=me;var n=Z(e);Wt=n*Z(t),Vt=n*H(t),qt=H(e),le(Wt,Vt,qt)}function me(t,e){t*=A;var n=Z(e*=A),i=n*Z(t),o=n*H(t),r=H(e),a=Vt*r-qt*o,s=qt*i-Wt*r,l=Wt*o-Vt*i,h=W(a*a+s*s+l*l),u=Y(h),c=h&&-u/h;jt+=c*a,Gt+=c*s,Ut+=c*l,Dt+=u,Nt+=u*(Wt+(Wt=i)),Zt+=u*(Vt+(Vt=o)),Rt+=u*(qt+(qt=r)),le(Wt,Vt,qt)}function ge(t){return function(){return t}}function ye(t,e){function n(n,i){return n=t(n,i),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,i){return(n=e.invert(n,i))&&t.invert(n[0],n[1])}),n}function ve(t,e){return[I(t)>T?t+Math.round(-t/O)*O:t,e]}function be(t,e,n){return(t%=O)?e||n?ye(we(t),xe(e,n)):we(t):e||n?xe(e,n):ve}function Le(t){return function(e,n){return[(e+=t)>T?e-O:e<-T?e+O:e,n]}}function we(t){var e=Le(t);return e.invert=Le(-t),e}function xe(t,e){var n=Z(t),i=H(t),o=Z(e),r=H(e);function a(t,e){var a=Z(e),s=Z(t)*a,l=H(t)*a,h=H(e),u=h*n+s*i;return[N(l*o-u*r,s*n-h*i),Y(u*o+l*r)]}return a.invert=function(t,e){var a=Z(e),s=Z(t)*a,l=H(t)*a,h=H(e),u=h*o-l*r;return[N(l*o+h*r,s*n+u*i),Y(u*n-s*i)]},a}function ke(t){function e(e){return(e=t(e[0]*A,e[1]*A))[0]*=D,e[1]*=D,e}return t=be(t[0]*A,t[1]*A,t.length>2?t[2]*A:0),e.invert=function(e){return(e=t.invert(e[0]*A,e[1]*A))[0]*=D,e[1]*=D,e},e}function Me(t,e,n,i,o,r){if(n){var a=Z(e),s=H(e),l=i*n;null==o?(o=e+i*O,r=e-l/2):(o=Ce(a,o),r=Ce(a,r),(i>0?o<r:o>r)&&(o+=i*O));for(var h,u=o;i>0?u>r:u<r;u-=l)h=_t([a,-s*Z(u),-s*H(u)]),t.point(h[0],h[1])}}function Ce(t,e){(e=mt(e))[0]-=t,Lt(e);var n=q(-e[1]);return((-e[2]<0?-n:n)+O-P)%O}function Pe(){var t,e=[];return{point:function(e,n,i){t.push([e,n,i])},lineStart:function(){e.push(t=[])},lineEnd:X,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Ee(t,e){return I(t[0]-e[0])<P&&I(t[1]-e[1])<P}function Te(t,e,n,i){this.x=t,this.z=e,this.o=n,this.e=i,this.v=!1,this.n=this.p=null}function Se(t,e,n,i,o){var r,a,s=[],l=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,i=t[0],a=t[e];if(Ee(i,a)){if(!i[2]&&!a[2]){for(o.lineStart(),r=0;r<e;++r)o.point((i=t[r])[0],i[1]);return void o.lineEnd()}a[0]+=2e-6}s.push(n=new Te(i,t,null,!0)),l.push(n.o=new Te(i,null,n,!1)),s.push(n=new Te(a,t,null,!1)),l.push(n.o=new Te(a,null,n,!0))}})),s.length){for(l.sort(e),ze(s),ze(l),r=0,a=l.length;r<a;++r)l[r].e=n=!n;for(var h,u,c=s[0];;){for(var p=c,d=!0;p.v;)if((p=p.n)===c)return;h=p.z,o.lineStart();do{if(p.v=p.o.v=!0,p.e){if(d)for(r=0,a=h.length;r<a;++r)o.point((u=h[r])[0],u[1]);else i(p.x,p.n.x,1,o);p=p.n}else{if(d)for(h=p.p.z,r=h.length-1;r>=0;--r)o.point((u=h[r])[0],u[1]);else i(p.x,p.p.x,-1,o);p=p.p}h=(p=p.o).z,d=!d}while(!p.v);o.lineEnd()}}}function ze(t){if(e=t.length){for(var e,n,i=0,o=t[0];++i<e;)o.n=n=t[i],n.p=o,o=n;o.n=n=t[0],n.p=o}}ve.invert=ve;var Oe=x();function De(t){return I(t[0])<=T?t[0]:F(t[0])*((I(t[0])+T)%O-T)}function Ae(t,e){var n=De(e),i=e[1],o=H(i),r=[H(n),-Z(n),0],a=0,s=0;Oe.reset(),1===o?i=S+P:-1===o&&(i=-S-P);for(var l=0,h=t.length;l<h;++l)if(c=(u=t[l]).length)for(var u,c,p=u[c-1],d=De(p),f=p[1]/2+z,_=H(f),m=Z(f),g=0;g<c;++g,d=v,_=L,m=w,p=y){var y=u[g],v=De(y),b=y[1]/2+z,L=H(b),w=Z(b),x=v-d,k=x>=0?1:-1,M=k*x,C=M>T,E=_*L;if(Oe.add(N(E*k*H(M),m*w+E*Z(M))),a+=C?x+k*O:x,C^d>=n^v>=n){var D=yt(mt(p),mt(y));Lt(D);var A=yt(r,D);Lt(A);var I=(C^x>=0?-1:1)*Y(A[2]);(i>I||i===I&&(D[0]||D[1]))&&(s+=C^x>=0?1:-1)}}return(a<-P||a<P&&Oe<-P)^1&s}function Ie(t,n,i,o){return function(r){var a,s,l,h=n(r),u=Pe(),c=n(u),p=!1,d={point:f,lineStart:m,lineEnd:g,polygonStart:function(){d.point=y,d.lineStart=v,d.lineEnd=b,s=[],a=[]},polygonEnd:function(){d.point=f,d.lineStart=m,d.lineEnd=g,s=e.merge(s);var t=Ae(a,o);s.length?(p||(r.polygonStart(),p=!0),Se(s,Ne,t,i,r)):t&&(p||(r.polygonStart(),p=!0),r.lineStart(),i(null,null,1,r),r.lineEnd()),p&&(r.polygonEnd(),p=!1),s=a=null},sphere:function(){r.polygonStart(),r.lineStart(),i(null,null,1,r),r.lineEnd(),r.polygonEnd()}};function f(e,n){t(e,n)&&r.point(e,n)}function _(t,e){h.point(t,e)}function m(){d.point=_,h.lineStart()}function g(){d.point=f,h.lineEnd()}function y(t,e){l.push([t,e]),c.point(t,e)}function v(){c.lineStart(),l=[]}function b(){y(l[0][0],l[0][1]),c.lineEnd();var t,e,n,i,o=c.clean(),h=u.result(),d=h.length;if(l.pop(),a.push(l),l=null,d)if(1&o){if((e=(n=h[0]).length-1)>0){for(p||(r.polygonStart(),p=!0),r.lineStart(),t=0;t<e;++t)r.point((i=n[t])[0],i[1]);r.lineEnd()}}else d>1&&2&o&&h.push(h.pop().concat(h.shift())),s.push(h.filter(Be))}return d}}function Be(t){return t.length>1}function Ne(t,e){return((t=t.x)[0]<0?t[1]-S-P:S-t[1])-((e=e.x)[0]<0?e[1]-S-P:S-e[1])}var Ze=Ie((function(){return!0}),(function(t){var e,n=NaN,i=NaN,o=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(r,a){var s=r>0?T:-T,l=I(r-n);I(l-T)<P?(t.point(n,i=(i+a)/2>0?S:-S),t.point(o,i),t.lineEnd(),t.lineStart(),t.point(s,i),t.point(r,i),e=0):o!==s&&l>=T&&(I(n-o)<P&&(n-=o*P),I(r-s)<P&&(r-=s*P),i=function(t,e,n,i){var o,r,a=H(t-n);return I(a)>P?B((H(e)*(r=Z(i))*H(n)-H(i)*(o=Z(e))*H(t))/(o*r*a)):(e+i)/2}(n,i,r,a),t.point(o,i),t.lineEnd(),t.lineStart(),t.point(s,i),e=0),t.point(n=r,i=a),o=s},lineEnd:function(){t.lineEnd(),n=i=NaN},clean:function(){return 2-e}}}),(function(t,e,n,i){var o;if(null==t)o=n*S,i.point(-T,o),i.point(0,o),i.point(T,o),i.point(T,0),i.point(T,-o),i.point(0,-o),i.point(-T,-o),i.point(-T,0),i.point(-T,o);else if(I(t[0]-e[0])>P){var r=t[0]<e[0]?T:-T;o=n*r/2,i.point(-r,o),i.point(0,o),i.point(r,o)}else i.point(e[0],e[1])}),[-T,-S]);function Re(t){var e=Z(t),n=6*A,i=e>0,o=I(e)>P;function r(t,n){return Z(t)*Z(n)>e}function a(t,n,i){var o=[1,0,0],r=yt(mt(t),mt(n)),a=gt(r,r),s=r[0],l=a-s*s;if(!l)return!i&&t;var h=e*a/l,u=-e*s/l,c=yt(o,r),p=bt(o,h);vt(p,bt(r,u));var d=c,f=gt(p,d),_=gt(d,d),m=f*f-_*(gt(p,p)-1);if(!(m<0)){var g=W(m),y=bt(d,(-f-g)/_);if(vt(y,p),y=_t(y),!i)return y;var v,b=t[0],L=n[0],w=t[1],x=n[1];L<b&&(v=b,b=L,L=v);var k=L-b,M=I(k-T)<P;if(!M&&x<w&&(v=w,w=x,x=v),M||k<P?M?w+x>0^y[1]<(I(y[0]-b)<P?w:x):w<=y[1]&&y[1]<=x:k>T^(b<=y[0]&&y[0]<=L)){var C=bt(d,(-f+g)/_);return vt(C,p),[y,_t(C)]}}}function s(e,n){var o=i?t:T-t,r=0;return e<-o?r|=1:e>o&&(r|=2),n<-o?r|=4:n>o&&(r|=8),r}return Ie(r,(function(t){var e,n,l,h,u;return{lineStart:function(){h=l=!1,u=1},point:function(c,p){var d,f=[c,p],_=r(c,p),m=i?_?0:s(c,p):_?s(c+(c<0?T:-T),p):0;if(!e&&(h=l=_)&&t.lineStart(),_!==l&&(!(d=a(e,f))||Ee(e,d)||Ee(f,d))&&(f[2]=1),_!==l)u=0,_?(t.lineStart(),d=a(f,e),t.point(d[0],d[1])):(d=a(e,f),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(o&&e&&i^_){var g;m&n||!(g=a(f,e,!0))||(u=0,i?(t.lineStart(),t.point(g[0][0],g[0][1]),t.point(g[1][0],g[1][1]),t.lineEnd()):(t.point(g[1][0],g[1][1]),t.lineEnd(),t.lineStart(),t.point(g[0][0],g[0][1],3)))}!_||e&&Ee(e,f)||t.point(f[0],f[1]),e=f,l=_,n=m},lineEnd:function(){l&&t.lineEnd(),e=null},clean:function(){return u|(h&&l)<<1}}}),(function(e,i,o,r){Me(r,t,n,o,e,i)}),i?[0,-t]:[-T,t-T])}var je=1e9,Ge=-je;function Ue(t,n,i,o){function r(e,r){return t<=e&&e<=i&&n<=r&&r<=o}function a(e,r,a,l){var u=0,c=0;if(null==e||(u=s(e,a))!==(c=s(r,a))||h(e,r)<0^a>0)do{l.point(0===u||3===u?t:i,u>1?o:n)}while((u=(u+a+4)%4)!==c);else l.point(r[0],r[1])}function s(e,o){return I(e[0]-t)<P?o>0?0:3:I(e[0]-i)<P?o>0?2:1:I(e[1]-n)<P?o>0?1:0:o>0?3:2}function l(t,e){return h(t.x,e.x)}function h(t,e){var n=s(t,1),i=s(e,1);return n!==i?n-i:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(s){var h,u,c,p,d,f,_,m,g,y,v,b=s,L=Pe(),w={point:x,lineStart:function(){w.point=k,u&&u.push(c=[]);y=!0,g=!1,_=m=NaN},lineEnd:function(){h&&(k(p,d),f&&g&&L.rejoin(),h.push(L.result()));w.point=x,g&&b.lineEnd()},polygonStart:function(){b=L,h=[],u=[],v=!0},polygonEnd:function(){var n=function(){for(var e=0,n=0,i=u.length;n<i;++n)for(var r,a,s=u[n],l=1,h=s.length,c=s[0],p=c[0],d=c[1];l<h;++l)r=p,a=d,p=(c=s[l])[0],d=c[1],a<=o?d>o&&(p-r)*(o-a)>(d-a)*(t-r)&&++e:d<=o&&(p-r)*(o-a)<(d-a)*(t-r)&&--e;return e}(),i=v&&n,r=(h=e.merge(h)).length;(i||r)&&(s.polygonStart(),i&&(s.lineStart(),a(null,null,1,s),s.lineEnd()),r&&Se(h,l,n,a,s),s.polygonEnd());b=s,h=u=c=null}};function x(t,e){r(t,e)&&b.point(t,e)}function k(e,a){var s=r(e,a);if(u&&c.push([e,a]),y)p=e,d=a,f=s,y=!1,s&&(b.lineStart(),b.point(e,a));else if(s&&g)b.point(e,a);else{var l=[_=Math.max(Ge,Math.min(je,_)),m=Math.max(Ge,Math.min(je,m))],h=[e=Math.max(Ge,Math.min(je,e)),a=Math.max(Ge,Math.min(je,a))];!function(t,e,n,i,o,r){var a,s=t[0],l=t[1],h=0,u=1,c=e[0]-s,p=e[1]-l;if(a=n-s,c||!(a>0)){if(a/=c,c<0){if(a<h)return;a<u&&(u=a)}else if(c>0){if(a>u)return;a>h&&(h=a)}if(a=o-s,c||!(a<0)){if(a/=c,c<0){if(a>u)return;a>h&&(h=a)}else if(c>0){if(a<h)return;a<u&&(u=a)}if(a=i-l,p||!(a>0)){if(a/=p,p<0){if(a<h)return;a<u&&(u=a)}else if(p>0){if(a>u)return;a>h&&(h=a)}if(a=r-l,p||!(a<0)){if(a/=p,p<0){if(a>u)return;a>h&&(h=a)}else if(p>0){if(a<h)return;a<u&&(u=a)}return h>0&&(t[0]=s+h*c,t[1]=l+h*p),u<1&&(e[0]=s+u*c,e[1]=l+u*p),!0}}}}}(l,h,t,n,i,o)?s&&(b.lineStart(),b.point(e,a),v=!1):(g||(b.lineStart(),b.point(l[0],l[1])),b.point(h[0],h[1]),s||b.lineEnd(),v=!1)}_=e,m=a,g=s}return w}}var He,Fe,We,Ve=x(),qe={sphere:X,point:X,lineStart:function(){qe.point=Ke,qe.lineEnd=Ye},lineEnd:X,polygonStart:X,polygonEnd:X};function Ye(){qe.point=qe.lineEnd=X}function Ke(t,e){He=t*=A,Fe=H(e*=A),We=Z(e),qe.point=Xe}function Xe(t,e){t*=A;var n=H(e*=A),i=Z(e),o=I(t-He),r=Z(o),a=i*H(o),s=We*n-Fe*i*r,l=Fe*n+We*i*r;Ve.add(N(W(a*a+s*s),l)),He=t,Fe=n,We=i}function Je(t){return Ve.reset(),nt(t,qe),+Ve}var Qe=[null,null],$e={type:"LineString",coordinates:Qe};function tn(t,e){return Qe[0]=t,Qe[1]=e,Je($e)}var en={Feature:function(t,e){return on(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,o=n.length;++i<o;)if(on(n[i].geometry,e))return!0;return!1}},nn={Sphere:function(){return!0},Point:function(t,e){return rn(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)if(rn(n[i],e))return!0;return!1},LineString:function(t,e){return an(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)if(an(n[i],e))return!0;return!1},Polygon:function(t,e){return sn(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)if(sn(n[i],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,i=-1,o=n.length;++i<o;)if(on(n[i],e))return!0;return!1}};function on(t,e){return!(!t||!nn.hasOwnProperty(t.type))&&nn[t.type](t,e)}function rn(t,e){return 0===tn(t,e)}function an(t,e){for(var n,i,o,r=0,a=t.length;r<a;r++){if(0===(i=tn(t[r],e)))return!0;if(r>0&&(o=tn(t[r],t[r-1]))>0&&n<=o&&i<=o&&(n+i-o)*(1-Math.pow((n-i)/o,2))<E*o)return!0;n=i}return!1}function sn(t,e){return!!Ae(t.map(ln),hn(e))}function ln(t){return(t=t.map(hn)).pop(),t}function hn(t){return[t[0]*A,t[1]*A]}function un(t,n,i){var o=e.range(t,n-P,i).concat(n);return function(t){return o.map((function(e){return[t,e]}))}}function cn(t,n,i){var o=e.range(t,n-P,i).concat(n);return function(t){return o.map((function(e){return[e,t]}))}}function pn(){var t,n,i,o,r,a,s,l,h,u,c,p,d=10,f=d,_=90,m=360,g=2.5;function y(){return{type:"MultiLineString",coordinates:v()}}function v(){return e.range(R(o/_)*_,i,_).map(c).concat(e.range(R(l/m)*m,s,m).map(p)).concat(e.range(R(n/d)*d,t,d).filter((function(t){return I(t%_)>P})).map(h)).concat(e.range(R(a/f)*f,r,f).filter((function(t){return I(t%m)>P})).map(u))}return y.lines=function(){return v().map((function(t){return{type:"LineString",coordinates:t}}))},y.outline=function(){return{type:"Polygon",coordinates:[c(o).concat(p(s).slice(1),c(i).reverse().slice(1),p(l).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.extentMajor(t).extentMinor(t):y.extentMinor()},y.extentMajor=function(t){return arguments.length?(o=+t[0][0],i=+t[1][0],l=+t[0][1],s=+t[1][1],o>i&&(t=o,o=i,i=t),l>s&&(t=l,l=s,s=t),y.precision(g)):[[o,l],[i,s]]},y.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],a=+e[0][1],r=+e[1][1],n>t&&(e=n,n=t,t=e),a>r&&(e=a,a=r,r=e),y.precision(g)):[[n,a],[t,r]]},y.step=function(t){return arguments.length?y.stepMajor(t).stepMinor(t):y.stepMinor()},y.stepMajor=function(t){return arguments.length?(_=+t[0],m=+t[1],y):[_,m]},y.stepMinor=function(t){return arguments.length?(d=+t[0],f=+t[1],y):[d,f]},y.precision=function(e){return arguments.length?(g=+e,h=un(a,r,90),u=cn(n,t,g),c=un(l,s,90),p=cn(o,i,g),y):g},y.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function dn(t){return t}var fn,_n,mn,gn,yn=x(),vn=x(),bn={point:X,lineStart:X,lineEnd:X,polygonStart:function(){bn.lineStart=Ln,bn.lineEnd=kn},polygonEnd:function(){bn.lineStart=bn.lineEnd=bn.point=X,yn.add(I(vn)),vn.reset()},result:function(){var t=yn/2;return yn.reset(),t}};function Ln(){bn.point=wn}function wn(t,e){bn.point=xn,fn=mn=t,_n=gn=e}function xn(t,e){vn.add(gn*t-mn*e),mn=t,gn=e}function kn(){xn(fn,_n)}var Mn=bn,Cn=1/0,Pn=Cn,En=-Cn,Tn=En,Sn={point:function(t,e){t<Cn&&(Cn=t);t>En&&(En=t);e<Pn&&(Pn=e);e>Tn&&(Tn=e)},lineStart:X,lineEnd:X,polygonStart:X,polygonEnd:X,result:function(){var t=[[Cn,Pn],[En,Tn]];return En=Tn=-(Pn=Cn=1/0),t}};var zn,On,Dn,An,In=Sn,Bn=0,Nn=0,Zn=0,Rn=0,jn=0,Gn=0,Un=0,Hn=0,Fn=0,Wn={point:Vn,lineStart:qn,lineEnd:Xn,polygonStart:function(){Wn.lineStart=Jn,Wn.lineEnd=Qn},polygonEnd:function(){Wn.point=Vn,Wn.lineStart=qn,Wn.lineEnd=Xn},result:function(){var t=Fn?[Un/Fn,Hn/Fn]:Gn?[Rn/Gn,jn/Gn]:Zn?[Bn/Zn,Nn/Zn]:[NaN,NaN];return Bn=Nn=Zn=Rn=jn=Gn=Un=Hn=Fn=0,t}};function Vn(t,e){Bn+=t,Nn+=e,++Zn}function qn(){Wn.point=Yn}function Yn(t,e){Wn.point=Kn,Vn(Dn=t,An=e)}function Kn(t,e){var n=t-Dn,i=e-An,o=W(n*n+i*i);Rn+=o*(Dn+t)/2,jn+=o*(An+e)/2,Gn+=o,Vn(Dn=t,An=e)}function Xn(){Wn.point=Vn}function Jn(){Wn.point=$n}function Qn(){ti(zn,On)}function $n(t,e){Wn.point=ti,Vn(zn=Dn=t,On=An=e)}function ti(t,e){var n=t-Dn,i=e-An,o=W(n*n+i*i);Rn+=o*(Dn+t)/2,jn+=o*(An+e)/2,Gn+=o,Un+=(o=An*t-Dn*e)*(Dn+t),Hn+=o*(An+e),Fn+=3*o,Vn(Dn=t,An=e)}var ei=Wn;function ni(t){this._context=t}ni.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,O)}},result:X};var ii,oi,ri,ai,si,li=x(),hi={point:X,lineStart:function(){hi.point=ui},lineEnd:function(){ii&&ci(oi,ri),hi.point=X},polygonStart:function(){ii=!0},polygonEnd:function(){ii=null},result:function(){var t=+li;return li.reset(),t}};function ui(t,e){hi.point=ci,oi=ai=t,ri=si=e}function ci(t,e){ai-=t,si-=e,li.add(W(ai*ai+si*si)),ai=t,si=e}var pi=hi;function di(){this._string=[]}function fi(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function _i(t,e){var n,i,o=4.5;function r(t){return t&&("function"==typeof o&&i.pointRadius(+o.apply(this,arguments)),nt(t,n(i))),i.result()}return r.area=function(t){return nt(t,n(Mn)),Mn.result()},r.measure=function(t){return nt(t,n(pi)),pi.result()},r.bounds=function(t){return nt(t,n(In)),In.result()},r.centroid=function(t){return nt(t,n(ei)),ei.result()},r.projection=function(e){return arguments.length?(n=null==e?(t=null,dn):(t=e).stream,r):t},r.context=function(t){return arguments.length?(i=null==t?(e=null,new di):new ni(e=t),"function"!=typeof o&&i.pointRadius(o),r):e},r.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(i.pointRadius(+t),+t),r):o},r.projection(t).context(e)}function mi(t){return function(e){var n=new gi;for(var i in t)n[i]=t[i];return n.stream=e,n}}function gi(){}function yi(t,e,n){var i=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=i&&t.clipExtent(null),nt(n,t.stream(In)),e(In.result()),null!=i&&t.clipExtent(i),t}function vi(t,e,n){return yi(t,(function(n){var i=e[1][0]-e[0][0],o=e[1][1]-e[0][1],r=Math.min(i/(n[1][0]-n[0][0]),o/(n[1][1]-n[0][1])),a=+e[0][0]+(i-r*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(o-r*(n[1][1]+n[0][1]))/2;t.scale(150*r).translate([a,s])}),n)}function bi(t,e,n){return vi(t,[[0,0],e],n)}function Li(t,e,n){return yi(t,(function(n){var i=+e,o=i/(n[1][0]-n[0][0]),r=(i-o*(n[1][0]+n[0][0]))/2,a=-o*n[0][1];t.scale(150*o).translate([r,a])}),n)}function wi(t,e,n){return yi(t,(function(n){var i=+e,o=i/(n[1][1]-n[0][1]),r=-o*n[0][0],a=(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([r,a])}),n)}di.prototype={_radius:4.5,_circle:fi(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=fi(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},gi.prototype={constructor:gi,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var xi=Z(30*A);function ki(t,e){return+e?function(t,e){function n(i,o,r,a,s,l,h,u,c,p,d,f,_,m){var g=h-i,y=u-o,v=g*g+y*y;if(v>4*e&&_--){var b=a+p,L=s+d,w=l+f,x=W(b*b+L*L+w*w),k=Y(w/=x),M=I(I(w)-1)<P||I(r-c)<P?(r+c)/2:N(L,b),C=t(M,k),E=C[0],T=C[1],S=E-i,z=T-o,O=y*S-g*z;(O*O/v>e||I((g*S+y*z)/v-.5)>.3||a*p+s*d+l*f<xi)&&(n(i,o,r,a,s,l,E,T,M,b/=x,L/=x,w,_,m),m.point(E,T),n(E,T,M,b,L,w,h,u,c,p,d,f,_,m))}}return function(e){var i,o,r,a,s,l,h,u,c,p,d,f,_={point:m,lineStart:g,lineEnd:v,polygonStart:function(){e.polygonStart(),_.lineStart=b},polygonEnd:function(){e.polygonEnd(),_.lineStart=g}};function m(n,i){n=t(n,i),e.point(n[0],n[1])}function g(){u=NaN,_.point=y,e.lineStart()}function y(i,o){var r=mt([i,o]),a=t(i,o);n(u,c,h,p,d,f,u=a[0],c=a[1],h=i,p=r[0],d=r[1],f=r[2],16,e),e.point(u,c)}function v(){_.point=m,e.lineEnd()}function b(){g(),_.point=L,_.lineEnd=w}function L(t,e){y(i=t,e),o=u,r=c,a=p,s=d,l=f,_.point=y}function w(){n(u,c,h,p,d,f,o,r,i,a,s,l,16,e),_.lineEnd=v,v()}return _}}(t,e):function(t){return mi({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var Mi=mi({point:function(t,e){this.stream.point(t*A,e*A)}});function Ci(t,e,n,i,o){function r(r,a){return[e+t*(r*=i),n-t*(a*=o)]}return r.invert=function(r,a){return[(r-e)/t*i,(n-a)/t*o]},r}function Pi(t,e,n,i,o,r){var a=Z(r),s=H(r),l=a*t,h=s*t,u=a/t,c=s/t,p=(s*n-a*e)/t,d=(s*e+a*n)/t;function f(t,r){return[l*(t*=i)-h*(r*=o)+e,n-h*t-l*r]}return f.invert=function(t,e){return[i*(u*t-c*e+p),o*(d-c*t-u*e)]},f}function Ei(t){return Ti((function(){return t}))()}function Ti(t){var e,n,i,o,r,a,s,l,h,u,c=150,p=480,d=250,f=0,_=0,m=0,g=0,y=0,v=0,b=1,L=1,w=null,x=Ze,k=null,M=dn,C=.5;function P(t){return l(t[0]*A,t[1]*A)}function E(t){return(t=l.invert(t[0],t[1]))&&[t[0]*D,t[1]*D]}function T(){var t=Pi(c,0,0,b,L,v).apply(null,e(f,_)),i=(v?Pi:Ci)(c,p-t[0],d-t[1],b,L,v);return n=be(m,g,y),s=ye(e,i),l=ye(n,s),a=ki(s,C),S()}function S(){return h=u=null,P}return P.stream=function(t){return h&&u===t?h:h=Mi(function(t){return mi({point:function(e,n){var i=t(e,n);return this.stream.point(i[0],i[1])}})}(n)(x(a(M(u=t)))))},P.preclip=function(t){return arguments.length?(x=t,w=void 0,S()):x},P.postclip=function(t){return arguments.length?(M=t,k=i=o=r=null,S()):M},P.clipAngle=function(t){return arguments.length?(x=+t?Re(w=t*A):(w=null,Ze),S()):w*D},P.clipExtent=function(t){return arguments.length?(M=null==t?(k=i=o=r=null,dn):Ue(k=+t[0][0],i=+t[0][1],o=+t[1][0],r=+t[1][1]),S()):null==k?null:[[k,i],[o,r]]},P.scale=function(t){return arguments.length?(c=+t,T()):c},P.translate=function(t){return arguments.length?(p=+t[0],d=+t[1],T()):[p,d]},P.center=function(t){return arguments.length?(f=t[0]%360*A,_=t[1]%360*A,T()):[f*D,_*D]},P.rotate=function(t){return arguments.length?(m=t[0]%360*A,g=t[1]%360*A,y=t.length>2?t[2]%360*A:0,T()):[m*D,g*D,y*D]},P.angle=function(t){return arguments.length?(v=t%360*A,T()):v*D},P.reflectX=function(t){return arguments.length?(b=t?-1:1,T()):b<0},P.reflectY=function(t){return arguments.length?(L=t?-1:1,T()):L<0},P.precision=function(t){return arguments.length?(a=ki(s,C=t*t),S()):W(C)},P.fitExtent=function(t,e){return vi(P,t,e)},P.fitSize=function(t,e){return bi(P,t,e)},P.fitWidth=function(t,e){return Li(P,t,e)},P.fitHeight=function(t,e){return wi(P,t,e)},function(){return e=t.apply(this,arguments),P.invert=e.invert&&E,T()}}function Si(t){var e=0,n=T/3,i=Ti(t),o=i(e,n);return o.parallels=function(t){return arguments.length?i(e=t[0]*A,n=t[1]*A):[e*D,n*D]},o}function zi(t,e){var n=H(t),i=(n+H(e))/2;if(I(i)<P)return function(t){var e=Z(t);function n(t,n){return[t*e,H(n)/e]}return n.invert=function(t,n){return[t/e,Y(n*e)]},n}(t);var o=1+n*(2*i-n),r=W(o)/i;function a(t,e){var n=W(o-2*i*H(e))/i;return[n*H(t*=i),r-n*Z(t)]}return a.invert=function(t,e){var n=r-e,a=N(t,I(n))*F(n);return n*i<0&&(a-=T*F(t)*F(n)),[a/i,Y((o-(t*t+n*n)*i*i)/(2*i))]},a}function Oi(){return Si(zi).scale(155.424).center([0,33.6442])}function Di(){return Oi().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Ai(t){return function(e,n){var i=Z(e),o=Z(n),r=t(i*o);return[r*o*H(e),r*H(n)]}}function Ii(t){return function(e,n){var i=W(e*e+n*n),o=t(i),r=H(o),a=Z(o);return[N(e*r,i*a),Y(i&&n*r/i)]}}var Bi=Ai((function(t){return W(2/(1+t))}));Bi.invert=Ii((function(t){return 2*Y(t/2)}));var Ni=Ai((function(t){return(t=q(t))&&t/H(t)}));function Zi(t,e){return[t,G(V((S+e)/2))]}function Ri(){return ji(Zi).scale(961/O)}function ji(t){var e,n,i,o=Ei(t),r=o.center,a=o.scale,s=o.translate,l=o.clipExtent,h=null;function u(){var r=T*a(),s=o(ke(o.rotate()).invert([0,0]));return l(null==h?[[s[0]-r,s[1]-r],[s[0]+r,s[1]+r]]:t===Zi?[[Math.max(s[0]-r,h),e],[Math.min(s[0]+r,n),i]]:[[h,Math.max(s[1]-r,e)],[n,Math.min(s[1]+r,i)]])}return o.scale=function(t){return arguments.length?(a(t),u()):a()},o.translate=function(t){return arguments.length?(s(t),u()):s()},o.center=function(t){return arguments.length?(r(t),u()):r()},o.clipExtent=function(t){return arguments.length?(null==t?h=e=n=i=null:(h=+t[0][0],e=+t[0][1],n=+t[1][0],i=+t[1][1]),u()):null==h?null:[[h,e],[n,i]]},u()}function Gi(t){return V((S+t)/2)}function Ui(t,e){var n=Z(t),i=t===e?H(t):G(n/Z(e))/G(Gi(e)/Gi(t)),o=n*U(Gi(t),i)/i;if(!i)return Zi;function r(t,e){o>0?e<-S+P&&(e=-S+P):e>S-P&&(e=S-P);var n=o/U(Gi(e),i);return[n*H(i*t),o-n*Z(i*t)]}return r.invert=function(t,e){var n=o-e,r=F(i)*W(t*t+n*n),a=N(t,I(n))*F(n);return n*i<0&&(a-=T*F(t)*F(n)),[a/i,2*B(U(o/r,1/i))-S]},r}function Hi(t,e){return[t,e]}function Fi(t,e){var n=Z(t),i=t===e?H(t):(n-Z(e))/(e-t),o=n/i+t;if(I(i)<P)return Hi;function r(t,e){var n=o-e,r=i*t;return[n*H(r),o-n*Z(r)]}return r.invert=function(t,e){var n=o-e,r=N(t,I(n))*F(n);return n*i<0&&(r-=T*F(t)*F(n)),[r/i,o-F(i)*W(t*t+n*n)]},r}Ni.invert=Ii((function(t){return t})),Zi.invert=function(t,e){return[t,2*B(j(e))-S]},Hi.invert=Hi;var Wi=1.340264,Vi=-.081106,qi=893e-6,Yi=.003796,Ki=W(3)/2;function Xi(t,e){var n=Y(Ki*H(e)),i=n*n,o=i*i*i;return[t*Z(n)/(Ki*(Wi+3*Vi*i+o*(7*qi+9*Yi*i))),n*(Wi+Vi*i+o*(qi+Yi*i))]}function Ji(t,e){var n=Z(e),i=Z(t)*n;return[n*H(t)/i,H(e)/i]}function Qi(t,e){var n=e*e,i=n*n;return[t*(.8707-.131979*n+i*(i*(.003971*n-.001529*i)-.013791)),e*(1.007226+n*(.015085+i*(.028874*n-.044475-.005916*i)))]}function $i(t,e){return[Z(e)*H(t),H(e)]}function to(t,e){var n=Z(e),i=1+Z(t)*n;return[n*H(t)/i,H(e)/i]}function eo(t,e){return[G(V((S+e)/2)),-t]}Xi.invert=function(t,e){for(var n,i=e,o=i*i,r=o*o*o,a=0;a<12&&(r=(o=(i-=n=(i*(Wi+Vi*o+r*(qi+Yi*o))-e)/(Wi+3*Vi*o+r*(7*qi+9*Yi*o)))*i)*o*o,!(I(n)<E));++a);return[Ki*t*(Wi+3*Vi*o+r*(7*qi+9*Yi*o))/Z(i),Y(H(i)/Ki)]},Ji.invert=Ii(B),Qi.invert=function(t,e){var n,i=e,o=25;do{var r=i*i,a=r*r;i-=n=(i*(1.007226+r*(.015085+a*(.028874*r-.044475-.005916*a)))-e)/(1.007226+r*(.045255+a*(.259866*r-.311325-.005916*11*a)))}while(I(n)>P&&--o>0);return[t/(.8707+(r=i*i)*(r*(r*r*r*(.003971-.001529*r)-.013791)-.131979)),i]},$i.invert=Ii(Y),to.invert=Ii((function(t){return 2*B(t)})),eo.invert=function(t,e){return[-e,2*B(j(t))-S]};var no=Object.freeze({__proto__:null,geoArea:function(t){return ht.reset(),nt(t,ut),2*ht},geoBounds:function(t){var e,n,i,o,r,a,s;if(Mt=kt=-(wt=xt=1/0),St=[],nt(t,Kt),n=St.length){for(St.sort(oe),e=1,r=[i=St[0]];e<n;++e)re(i,(o=St[e])[0])||re(i,o[1])?(ie(i[0],o[1])>ie(i[0],i[1])&&(i[1]=o[1]),ie(o[0],i[1])>ie(i[0],i[1])&&(i[0]=o[0])):r.push(i=o);for(a=-1/0,e=0,i=r[n=r.length-1];e<=n;i=o,++e)o=r[e],(s=ie(i[1],o[0]))>a&&(a=s,wt=o[0],kt=i[1])}return St=zt=null,wt===1/0||xt===1/0?[[NaN,NaN],[NaN,NaN]]:[[wt,xt],[kt,Mt]]},geoCentroid:function(t){Ot=Dt=At=It=Bt=Nt=Zt=Rt=jt=Gt=Ut=0,nt(t,ae);var e=jt,n=Gt,i=Ut,o=e*e+n*n+i*i;return o<E&&(e=Nt,n=Zt,i=Rt,Dt<P&&(e=At,n=It,i=Bt),(o=e*e+n*n+i*i)<E)?[NaN,NaN]:[N(n,e)*D,Y(i/W(o))*D]},geoCircle:function(){var t,e,n=ge([0,0]),i=ge(90),o=ge(6),r={point:function(n,i){t.push(n=e(n,i)),n[0]*=D,n[1]*=D}};function a(){var a=n.apply(this,arguments),s=i.apply(this,arguments)*A,l=o.apply(this,arguments)*A;return t=[],e=be(-a[0]*A,-a[1]*A,0).invert,Me(r,s,l,1),a={type:"Polygon",coordinates:[t]},t=e=null,a}return a.center=function(t){return arguments.length?(n="function"==typeof t?t:ge([+t[0],+t[1]]),a):n},a.radius=function(t){return arguments.length?(i="function"==typeof t?t:ge(+t),a):i},a.precision=function(t){return arguments.length?(o="function"==typeof t?t:ge(+t),a):o},a},geoClipAntimeridian:Ze,geoClipCircle:Re,geoClipExtent:function(){var t,e,n,i=0,o=0,r=960,a=500;return n={stream:function(n){return t&&e===n?t:t=Ue(i,o,r,a)(e=n)},extent:function(s){return arguments.length?(i=+s[0][0],o=+s[0][1],r=+s[1][0],a=+s[1][1],t=e=null,n):[[i,o],[r,a]]}}},geoClipRectangle:Ue,geoContains:function(t,e){return(t&&en.hasOwnProperty(t.type)?en[t.type]:on)(t,e)},geoDistance:tn,geoGraticule:pn,geoGraticule10:function(){return pn()()},geoInterpolate:function(t,e){var n=t[0]*A,i=t[1]*A,o=e[0]*A,r=e[1]*A,a=Z(i),s=H(i),l=Z(r),h=H(r),u=a*Z(n),c=a*H(n),p=l*Z(o),d=l*H(o),f=2*Y(W(K(r-i)+a*l*K(o-n))),_=H(f),m=f?function(t){var e=H(t*=f)/_,n=H(f-t)/_,i=n*u+e*p,o=n*c+e*d,r=n*s+e*h;return[N(o,i)*D,N(r,W(i*i+o*o))*D]}:function(){return[n*D,i*D]};return m.distance=f,m},geoLength:Je,geoPath:_i,geoAlbers:Di,geoAlbersUsa:function(){var t,e,n,i,o,r,a=Di(),s=Oi().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=Oi().rotate([157,0]).center([-3,19.9]).parallels([8,18]),h={point:function(t,e){r=[t,e]}};function u(t){var e=t[0],a=t[1];return r=null,n.point(e,a),r||(i.point(e,a),r)||(o.point(e,a),r)}function c(){return t=e=null,u}return u.invert=function(t){var e=a.scale(),n=a.translate(),i=(t[0]-n[0])/e,o=(t[1]-n[1])/e;return(o>=.12&&o<.234&&i>=-.425&&i<-.214?s:o>=.166&&o<.234&&i>=-.214&&i<-.115?l:a).invert(t)},u.stream=function(n){return t&&e===n?t:(i=[a.stream(e=n),s.stream(n),l.stream(n)],o=i.length,t={point:function(t,e){for(var n=-1;++n<o;)i[n].point(t,e)},sphere:function(){for(var t=-1;++t<o;)i[t].sphere()},lineStart:function(){for(var t=-1;++t<o;)i[t].lineStart()},lineEnd:function(){for(var t=-1;++t<o;)i[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<o;)i[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<o;)i[t].polygonEnd()}});var i,o},u.precision=function(t){return arguments.length?(a.precision(t),s.precision(t),l.precision(t),c()):a.precision()},u.scale=function(t){return arguments.length?(a.scale(t),s.scale(.35*t),l.scale(t),u.translate(a.translate())):a.scale()},u.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),r=+t[0],u=+t[1];return n=a.translate(t).clipExtent([[r-.455*e,u-.238*e],[r+.455*e,u+.238*e]]).stream(h),i=s.translate([r-.307*e,u+.201*e]).clipExtent([[r-.425*e+P,u+.12*e+P],[r-.214*e-P,u+.234*e-P]]).stream(h),o=l.translate([r-.205*e,u+.212*e]).clipExtent([[r-.214*e+P,u+.166*e+P],[r-.115*e-P,u+.234*e-P]]).stream(h),c()},u.fitExtent=function(t,e){return vi(u,t,e)},u.fitSize=function(t,e){return bi(u,t,e)},u.fitWidth=function(t,e){return Li(u,t,e)},u.fitHeight=function(t,e){return wi(u,t,e)},u.scale(1070)},geoAzimuthalEqualArea:function(){return Ei(Bi).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:Bi,geoAzimuthalEquidistant:function(){return Ei(Ni).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:Ni,geoConicConformal:function(){return Si(Ui).scale(109.5).parallels([30,30])},geoConicConformalRaw:Ui,geoConicEqualArea:Oi,geoConicEqualAreaRaw:zi,geoConicEquidistant:function(){return Si(Fi).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:Fi,geoEqualEarth:function(){return Ei(Xi).scale(177.158)},geoEqualEarthRaw:Xi,geoEquirectangular:function(){return Ei(Hi).scale(152.63)},geoEquirectangularRaw:Hi,geoGnomonic:function(){return Ei(Ji).scale(144.049).clipAngle(60)},geoGnomonicRaw:Ji,geoIdentity:function(){var t,e,n,i,o,r,a,s=1,l=0,h=0,u=1,c=1,p=0,d=null,f=1,_=1,m=mi({point:function(t,e){var n=v([t,e]);this.stream.point(n[0],n[1])}}),g=dn;function y(){return f=s*u,_=s*c,r=a=null,v}function v(n){var i=n[0]*f,o=n[1]*_;if(p){var r=o*t-i*e;i=i*t+o*e,o=r}return[i+l,o+h]}return v.invert=function(n){var i=n[0]-l,o=n[1]-h;if(p){var r=o*t+i*e;i=i*t-o*e,o=r}return[i/f,o/_]},v.stream=function(t){return r&&a===t?r:r=m(g(a=t))},v.postclip=function(t){return arguments.length?(g=t,d=n=i=o=null,y()):g},v.clipExtent=function(t){return arguments.length?(g=null==t?(d=n=i=o=null,dn):Ue(d=+t[0][0],n=+t[0][1],i=+t[1][0],o=+t[1][1]),y()):null==d?null:[[d,n],[i,o]]},v.scale=function(t){return arguments.length?(s=+t,y()):s},v.translate=function(t){return arguments.length?(l=+t[0],h=+t[1],y()):[l,h]},v.angle=function(n){return arguments.length?(e=H(p=n%360*A),t=Z(p),y()):p*D},v.reflectX=function(t){return arguments.length?(u=t?-1:1,y()):u<0},v.reflectY=function(t){return arguments.length?(c=t?-1:1,y()):c<0},v.fitExtent=function(t,e){return vi(v,t,e)},v.fitSize=function(t,e){return bi(v,t,e)},v.fitWidth=function(t,e){return Li(v,t,e)},v.fitHeight=function(t,e){return wi(v,t,e)},v},geoProjection:Ei,geoProjectionMutator:Ti,geoMercator:Ri,geoMercatorRaw:Zi,geoNaturalEarth1:function(){return Ei(Qi).scale(175.295)},geoNaturalEarth1Raw:Qi,geoOrthographic:function(){return Ei($i).scale(249.5).clipAngle(90.000001)},geoOrthographicRaw:$i,geoStereographic:function(){return Ei(to).scale(250).clipAngle(142)},geoStereographicRaw:to,geoTransverseMercator:function(){var t=ji(eo),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:eo,geoRotation:ke,geoStream:nt,geoTransform:function(t){return{stream:mi(t)}}});function io(){}var oo=1/0,ro=oo,ao=-oo,so=ao;var lo={point:function(t,e){t<oo&&(oo=t),t>ao&&(ao=t),e<ro&&(ro=e),e>so&&(so=e)},lineStart:io,lineEnd:io,polygonStart:io,polygonEnd:io,result:function(){var t=[[oo,ro],[ao,so]];return ao=so=-(ro=oo=1/0),t}};function ho(t,e,n){var i=e[1][0]-e[0][0],o=e[1][1]-e[0][1],r=t.clipExtent&&t.clipExtent();t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),nt(n,t.stream(lo));var a=lo.result(),s=Math.min(i/(a[1][0]-a[0][0]),o/(a[1][1]-a[0][1])),l=+e[0][0]+(i-s*(a[1][0]+a[0][0]))/2,h=+e[0][1]+(o-s*(a[1][1]+a[0][1]))/2;return null!=r&&t.clipExtent(r),t.scale(150*s).translate([l,h])}var uo,co=function(){function t(){}return t.prototype.encode=function(e,n,i){if(void 0===i){for(var o=1;o<=12;o++){var r=this.encode(e,n,o),a=this.decode(r);if(a.lat===e&&a.lon===n)return r}i=12}if(e=Number(e),n=Number(n),i=Number(i),isNaN(e)||isNaN(n)||isNaN(i))throw new Error("Invalid geohash");for(var s=0,l=0,h=!0,u="",c=-90,p=90,d=-180,f=180;u.length<i;){if(h){var _=(d+f)/2;n>_?(s=2*s+1,d=_):(s*=2,f=_)}else{var m=(c+p)/2;e>m?(s=2*s+1,c=m):(s*=2,p=m)}h=!h,5==++l&&(u+=t.base32.charAt(s),l=0,s=0)}return u},t.prototype.decode=function(t){var e=this.bounds(t),n=e.sw.lat,i=e.sw.lon,o=e.ne.lat,r=e.ne.lon,a=(n+o)/2,s=(i+r)/2;return{lat:a=Number(a.toFixed(Math.floor(2-Math.log(o-n)/Math.LN10))),lon:s=Number(s.toFixed(Math.floor(2-Math.log(r-i)/Math.LN10)))}},t.prototype.bounds=function(e){if(0===e.length)throw new Error("Invalid geohash");e=e.toLowerCase();for(var n=!0,i=-90,o=90,r=-180,a=180,s=0;s<e.length;s++){var l=e.charAt(s),h=t.base32.indexOf(l);if(-1===h)throw new Error("Invalid geohash");for(var u=4;u>=0;u--){var c=h>>u&1;if(n){var p=(r+a)/2;1===c?r=p:a=p}else{var d=(i+o)/2;1===c?i=d:o=d}n=!n}}return{sw:{lat:i,lon:r},ne:{lat:o,lon:a}}},t.prototype.adjacent=function(e,n){if(e=e.toLowerCase(),n=n.toLowerCase(),0===e.length)throw new Error("Invalid geohash");if(-1==="nsew".indexOf(n))throw new Error("Invalid direction");var i=e.slice(-1),o=e.slice(0,-1),r=e.length%2;return-1!=={n:["prxz","bcfguvyz"],s:["028b","0145hjnp"],e:["bcfguvyz","prxz"],w:["0145hjnp","028b"]}[n][r].indexOf(i)&&""!==o&&(o=this.adjacent(o,n)),o+t.base32.charAt({n:["p0r21436x8zb9dcf5h7kjnmqesgutwvy","bc01fg45238967deuvhjyznpkmstqrwx"],s:["14365h7k9dcfesgujnmqp0r2twvyx8zb","238967debc01fg45kmstqrwxuvhjyznp"],e:["bc01fg45238967deuvhjyznpkmstqrwx","p0r21436x8zb9dcf5h7kjnmqesgutwvy"],w:["238967debc01fg45kmstqrwxuvhjyznp","14365h7k9dcfesgujnmqp0r2twvyx8zb"]}[n][r].indexOf(i))},t.prototype.neighbours=function(t){return{n:this.adjacent(t,"n"),ne:this.adjacent(this.adjacent(t,"n"),"e"),e:this.adjacent(t,"e"),se:this.adjacent(this.adjacent(t,"s"),"e"),s:this.adjacent(t,"s"),sw:this.adjacent(this.adjacent(t,"s"),"w"),w:this.adjacent(t,"w"),nw:this.adjacent(this.adjacent(t,"n"),"w")}},t.prototype.contained=function(t,e,n,i,o){(isNaN(e)||e>=90)&&(e=89),(isNaN(n)||n>180)&&(n=180),(isNaN(i)||i<=-90)&&(i=-89),(isNaN(t)||t<-180)&&(t=-180),o=o||1;for(var r=this.encode(e,t,o),a=this.encode(e,n,o),s=this.encode(i,n,o),l=r,h=0,u=-1,c=[r,s],p=this.adjacent(r,"e");p!==s;)c.push(p),++h,p===a||u===h?(u=h+1,h=0,l=p=this.adjacent(l,"s")):p=this.adjacent(p,"e");return c},t.prototype.calculateWidthDegrees=function(t){var e;return e=t%2==0?-1:-.5,180/Math.pow(2,2.5*t+e)},t.prototype.width=function(t){return 180/(2^(5*t+t%2)/2-1)},t.base32="0123456789bcdefghjkmnpqrstuvwxyz",t}();function po(){var t,e,n,i,o,r,a,s=1e-6,l=Di(),h=Oi().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=Oi().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c=Oi().rotate([66,0]).center([0,18]).parallels([8,18]),p={point:function(t,e){a=[t,e]}},d=function(t){var e=t[0],s=t[1];return a=null,n.point(e,s),a||(i.point(e,s),a)||(o.point(e,s),a)||r.point(e,s),a};function f(){return t=e=null,d}return d.invert=function(t){var e=l.scale(),n=l.translate(),i=(t[0]-n[0])/e,o=(t[1]-n[1])/e;return(o>=.12&&o<.234&&i>=-.425&&i<-.214?h:o>=.166&&o<.234&&i>=-.214&&i<-.115?u:o>=.204&&o<.234&&i>=.32&&i<.38?c:l).invert(t)},d.stream=function(n){return t&&e===n?t:(i=[l.stream(e=n),h.stream(n),u.stream(n),c.stream(n)],o=i.length,t={point:function(t,e){for(var n=-1;++n<o;)i[n].point(t,e)},sphere:function(){for(var t=-1;++t<o;)i[t].sphere()},lineStart:function(){for(var t=-1;++t<o;)i[t].lineStart()},lineEnd:function(){for(var t=-1;++t<o;)i[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<o;)i[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<o;)i[t].polygonEnd()}});var i,o},d.precision=function(t){return arguments.length?(l.precision(t),h.precision(t),u.precision(t),c.precision(t),f()):l.precision()},d.scale=function(t){return arguments.length?(l.scale(t),h.scale(.35*t),u.scale(t),c.scale(t),d.translate(l.translate())):l.scale()},d.translate=function(t){if(!arguments.length)return l.translate();var e=l.scale(),a=+t[0],d=+t[1];return n=l.translate(t).clipExtent([[a-.455*e,d-.238*e],[a+.455*e,d+.238*e]]).stream(p),i=h.translate([a-.307*e,d+.201*e]).clipExtent([[a-.425*e+s,d+.12*e+s],[a-.214*e-s,d+.234*e-s]]).stream(p),o=u.translate([a-.205*e,d+.212*e]).clipExtent([[a-.214*e+s,d+.166*e+s],[a-.115*e-s,d+.234*e-s]]).stream(p),r=c.translate([a+.35*e,d+.224*e]).clipExtent([[a+.32*e,d+.204*e],[a+.38*e,d+.234*e]]).stream(p),f()},d.fitExtent=function(t,e){return ho(d,t,e)},d.fitSize=function(t,e){return function(t,e,n){return ho(t,[[0,0],e],n)}(d,t,e)},d.scale(1070)}!function(t){t[t.AzimuthalEqualArea=0]="AzimuthalEqualArea",t[t.AzimuthalEquidistant=1]="AzimuthalEquidistant",t[t.Gnomonic=2]="Gnomonic",t[t.Orthographic=3]="Orthographic",t[t.Stereographic=4]="Stereographic",t[t.AlbersUsa=5]="AlbersUsa",t[t.AlbersUsaPr=6]="AlbersUsaPr",t[t.Albers=7]="Albers",t[t.ConicConformal=8]="ConicConformal",t[t.ConicEqualArea=9]="ConicEqualArea",t[t.ConicEquidistant=10]="ConicEquidistant",t[t.Equirectangular=11]="Equirectangular",t[t.Mercator=12]="Mercator",t[t.TransverseMercator=13]="TransverseMercator"}(uo||(uo={}));var fo=[],_o={};for(var mo in uo)"string"==typeof mo&&(fo.push(mo),_o[mo]="AlbersUsaPr"===mo?po:no["geo".concat(mo)]);function go(t){var e=_o[t];return e?e():(console.log("Unknown projection: "+t),Ri())}function yo(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}yo(".map_Layered .background{fill:none}.map_Layered .raster image{fill:#b5d0d0}.map_Layered .vector{fill:none;stroke:navy;stroke-linejoin:round}.map_Layered .hash path{fill:none;stroke:red;stroke-linejoin:round}");var vo=2048/Math.PI,bo=function(t){function n(){var e=t.call(this)||this;return e._drawStartPos="origin",e.projection("Mercator"),e}return h(n,t),n.prototype.data=function(e){var n=t.prototype.data.apply(this,arguments);return arguments.length&&(this._autoScaleOnNextRender=!0),n},n.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),this._layersTarget=this._renderElement.append("g").attr("class","layersTarget")},n.prototype.update=function(n,i){t.prototype.update.call(this,n,i);var o=this._layersTarget.selectAll(".layerContainer").data(this.layers().filter((function(t){return t.visible()})),(function(t){return t.id()})),r=this;o.enter().append("g").attr("id",(function(t){return t.id()})).attr("class","layerContainer").each((function(t){t._svgElement=e.select(this),t._domElement=r._parentOverlay.append("div"),t.layerEnter(r,t._svgElement,t._domElement)})).merge(o).each((function(t){t.layerUpdate(r)})),o.exit().each((function(t){t.layerExit(r),t._domElement.remove()})).remove(),o.order(),this.onZoomed()},n.prototype.exit=function(e,n){t.prototype.exit.call(this,e,n)},n.prototype.onZoomed=function(){t.prototype.onZoomed.call(this);var e=this._layersTarget.selectAll(".layerContainer"),n=this;e.each((function(t){t.layerZoomed(n)}))},n.prototype.preRender=function(t){return Promise.all(this.layers().filter((function(t){return t.visible()})).map((function(t){return t.layerPreRender()})))},n.prototype.render=function(t){var n=this;return this.preRender().then((function(){e.SVGZoomWidget.prototype.render.call(n,(function(e){n._layersTarget&&(n._renderCount&&n._autoScaleOnNextRender||n._prevAutoScaleMode!==n.autoScaleMode())?(n._prevAutoScaleMode=n.autoScaleMode(),n._autoScaleOnNextRender=!1,n.autoScale(),t&&t(e)):t&&t(e)}))})),this},n.prototype.project=function(t,e){return t>=90?t=89:t<=-90&&(t=-89),this._d3GeoProjection([e,t])},n.prototype.invert=function(t,e){return this._d3GeoProjection.invert([t,e])},n.prototype.getBounds=function(){var t=this._layersTarget.node().getBBox();return{x:t.x,y:t.y,width:t.width,height:t.height}},n.prototype.autoScale=function(){switch(this.autoScaleMode()){case"none":return;case"all":this.zoomToBBox(this.getBounds())}},n}(e.SVGZoomWidget);bo.prototype._class+=" map_Layered",bo.prototype.publish("projection",null,"set","Map projection type",fo),bo.prototype.publish("centerLat",0,"number","Center Latitude",null,{tags:["Basic"]}),bo.prototype.publish("centerLong",0,"number","Center Longitude",null,{tags:["Basic"]}),bo.prototype.publish("zoom",1,"number","Zoom Level",null,{tags:["Basic"]}),bo.prototype.publish("autoScaleMode","all","set","Auto Scale",["none","all"],{tags:["Basic"]}),bo.prototype.publish("layers",[],"widgetArray","Layers",null,{render:!1});var Lo=bo.prototype.projection;bo.prototype.projection=function(t){var e=Lo.apply(this,arguments);if(arguments.length){if(this._d3GeoProjection=go(t).scale(vo).translate([0,0]),"orthographic"===t)this._d3GeoProjection.clipAngle(90).rotate([0,0]);this._d3GeoPath=_i().projection(this._d3GeoProjection),this._autoScaleOnNextRender=!0}return e};var wo=function(t){function e(){var e=t.call(this)||this;return n.ITooltip.call(e),e}return h(e,t),e.prototype.svgGlowID=function(){return""},e.prototype.layerEnter=function(t,e,n){this._parentOverlay=t._parentOverlay},e.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),this._svgElement=this._layersTarget.append("g"),this._domElement=this._parentOverlay.append("div"),this.layerEnter(this,this._svgElement,this._domElement)},e.prototype.layerUpdate=function(t,e){},e.prototype.update=function(e,n){t.prototype.update.call(this,e,n),this.layerUpdate(this)},e.prototype.onZoomed=function(){t.prototype.onZoomed.call(this),this.layerUpdate(this)},e.prototype.layerExit=function(t){},e.prototype.exit=function(e,n){this.layerExit(this),this._svgElement.remove(),this._domElement.remove(),t.prototype.exit.call(this,e,n)},e.prototype.layerPreRender=function(){return Promise.resolve()},e.prototype.render=function(t){var e=this,n=arguments;return this.layerPreRender().then((function(){bo.prototype.render.apply(e,n)})),this},e.prototype.layerZoomed=function(t){},e}(bo);wo.prototype._class+=" map_Layer",wo.prototype.implements(n.ITooltip.prototype);var xo=function(t){function e(){var e=t.call(this)||this;return e.pins=new w,e}return h(e,t),e.prototype.layerEnter=function(t,e,n){wo.prototype.layerEnter.apply(this,arguments),this._parentOverlay.style("pointer-events","none"),this._pinsTransform=n.style("pointer-events","none").append("div").attr("class",this.classID()).style("width",t.width()+"px").style("height",t.height()+"px"),this.pins.target(this._pinsTransform.node())},e.prototype.layerUpdate=function(t){wo.prototype.layerUpdate.apply(this,arguments),this._pinsTransform.style("opacity",this.opacity()).style("width",t.width()+"px").style("height",t.height()+"px"),this.pins.resize(t.size()),this.layerZoomed(t)},e.prototype.layerExit=function(t){delete this._prevProjection,this.pins.target(null),delete this.pins},e.prototype.layerZoomed=function(t){wo.prototype.layerZoomed.apply(this,arguments);var e=this._db.fieldByLabel(this.latColumn()),n=this._db.fieldByLabel(this.longColumn()),i=this._db.fieldByLabel(this.weightColumn());this.pins.columns(this.columns()).data(this.visible()?this.data().map((function(o){var r=e?o[e.idx]:o[0],a=n?o[n.idx]:o[1],s=i?o[i.idx]:1,l=t.zoomTranslate(),h=t.project(r,a),u=t.zoomScale();return h[0]*=u,h[1]*=u,[l[0]+h[0],l[1]+h[1],s]})):[]).render()},e}(wo);function ko(t){return t}function Mo(t,e){return"string"==typeof e&&(e=t.objects[e]),"GeometryCollection"===e.type?{type:"FeatureCollection",features:e.geometries.map((function(e){return Co(t,e)}))}:Co(t,e)}function Co(t,e){var n=e.id,i=e.bbox,o=null==e.properties?{}:e.properties,r=Po(t,e);return null==n&&null==i?{type:"Feature",properties:o,geometry:r}:null==i?{type:"Feature",id:n,properties:o,geometry:r}:{type:"Feature",id:n,bbox:i,properties:o,geometry:r}}function Po(t,e){var n=function(t){if(null==t)return ko;var e,n,i=t.scale[0],o=t.scale[1],r=t.translate[0],a=t.translate[1];return function(t,s){s||(e=n=0);var l=2,h=t.length,u=new Array(h);for(u[0]=(e+=t[0])*i+r,u[1]=(n+=t[1])*o+a;l<h;)u[l]=t[l],++l;return u}}(t.transform),i=t.arcs;function o(t,e){e.length&&e.pop();for(var o=i[t<0?~t:t],r=0,a=o.length;r<a;++r)e.push(n(o[r],r));t<0&&function(t,e){for(var n,i=t.length,o=i-e;o<--i;)n=t[o],t[o++]=t[i],t[i]=n}(e,a)}function r(t){return n(t)}function a(t){for(var e=[],n=0,i=t.length;n<i;++n)o(t[n],e);return e.length<2&&e.push(e[0]),e}function s(t){for(var e=a(t);e.length<4;)e.push(e[0]);return e}function l(t){return t.map(s)}return function t(e){var n,i=e.type;switch(i){case"GeometryCollection":return{type:i,geometries:e.geometries.map(t)};case"Point":n=r(e.coordinates);break;case"MultiPoint":n=e.coordinates.map(r);break;case"LineString":n=a(e.arcs);break;case"MultiLineString":n=e.arcs.map(a);break;case"Polygon":n=l(e.arcs);break;case"MultiPolygon":n=e.arcs.map(l);break;default:return null}return{type:i,coordinates:n}}(e)}function Eo(t,e){var n={},i={},o={},r=[],a=-1;function s(t,e){for(var i in t){var o=t[i];delete e[o.start],delete o.start,delete o.end,o.forEach((function(t){n[t<0?~t:t]=1})),r.push(o)}}return e.forEach((function(n,i){var o,r=t.arcs[n<0?~n:n];r.length<3&&!r[1][0]&&!r[1][1]&&(o=e[++a],e[a]=n,e[i]=o)})),e.forEach((function(e){var n,r,a=function(e){var n,i=t.arcs[e<0?~e:e],o=i[0];t.transform?(n=[0,0],i.forEach((function(t){n[0]+=t[0],n[1]+=t[1]}))):n=i[i.length-1];return e<0?[n,o]:[o,n]}(e),s=a[0],l=a[1];if(n=o[s])if(delete o[n.end],n.push(e),n.end=l,r=i[l]){delete i[r.start];var h=r===n?n:n.concat(r);i[h.start=n.start]=o[h.end=r.end]=h}else i[n.start]=o[n.end]=n;else if(n=i[l])if(delete i[n.start],n.unshift(e),n.start=s,r=o[s]){delete o[r.end];var u=r===n?n:r.concat(n);i[u.start=r.start]=o[u.end=n.end]=u}else i[n.start]=o[n.end]=n;else i[(n=[e]).start=s]=o[n.end=l]=n})),s(o,i),s(i,o),e.forEach((function(t){n[t<0?~t:t]||r.push([t])})),r}function To(t){return Po(t,So.apply(this,arguments))}function So(t,e,n){var i,o,r;if(arguments.length>1)i=zo(t,e,n);else for(o=0,i=new Array(r=t.arcs.length);o<r;++o)i[o]=o;return{type:"MultiLineString",arcs:Eo(t,i)}}function zo(t,e,n){var i,o=[],r=[];function a(t){var e=t<0?~t:t;(r[e]||(r[e]=[])).push({i:t,g:i})}function s(t){t.forEach(a)}function l(t){t.forEach(s)}return function t(e){switch(i=e,e.type){case"GeometryCollection":e.geometries.forEach(t);break;case"LineString":s(e.arcs);break;case"MultiLineString":case"Polygon":l(e.arcs);break;case"MultiPolygon":!function(t){t.forEach(l)}(e.arcs)}}(e),r.forEach(null==n?function(t){o.push(t[0].i)}:function(t){n(t[0].g,t[t.length-1].g)&&o.push(t[0].i)}),o}xo.prototype._class+=" map_CanvasPinLayer",xo.prototype.publishProxy("clusterMode","pins","clusterMode"),xo.prototype.publishProxy("allCircles","pins","allCircles"),xo.prototype.publishProxy("showQuadtree","pins","showQuadtree"),xo.prototype.publishProxy("useAveragePos","pins","useAveragePos"),xo.prototype.publishProxy("shrinkFontToPin","pins","shrinkFontToPin"),xo.prototype.publishProxy("enableClustering","pins","enableClustering"),xo.prototype.publishProxy("useWeightedRadius","pins","useWeightedRadius"),xo.prototype.publishProxy("radiusWeightMult","pins","radiusWeightMult"),xo.prototype.publishProxy("searchRectMult","pins","searchRectMult"),xo.prototype.publishProxy("pinHeight","pins","pinHeight"),xo.prototype.publishProxy("pinWidth","pins","pinWidth"),xo.prototype.publishProxy("pinFontFamily","pins","pinFontFamily"),xo.prototype.publishProxy("pinFontSize","pins","pinFontSize"),xo.prototype.publishProxy("arrowHeight","pins","arrowHeight"),xo.prototype.publishProxy("arrowWidth","pins","arrowWidth"),xo.prototype.publish("latColumn",null,"set","latColumn",(function(){return this.columns()}),{optional:!0}),xo.prototype.publish("longColumn",null,"set","longColumn",(function(){return this.columns()}),{optional:!0}),xo.prototype.publish("weightColumn",null,"set","weightColumn",(function(){return this.columns()}),{optional:!0}),xo.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]});yo(".map_Layered .checkerFill{fill:red;stroke:red;opacity:.5}.map_Layered .checkerNoFill{fill:none;stroke:none;opacity:.5}.map_Layered .mesh{fill:none;stroke:#6d6e71;stroke-width:.25}.map_Layered .data{stroke:none;stroke-width:.25}.map_Layered .data .shape.selected{stroke:red;stroke-width:1.25px}");var Oo=window.__hpcc_topoJsonFolder||"./node_modules/@hpcc-js/map/TopoJSON";function Do(t){if(!arguments.length)return Oo;var e=Oo;return Oo=t,e}var Ao=function(t){function n(){var n=t.call(this)||this;return n._dataMap={},n._path=e.select(null),e.Utility.SimpleSelectionMixin.call(n),n}return h(n,t),n.prototype.data=function(t){var e=wo.prototype.data.apply(this,arguments);if(arguments.length){this._dataMap={},this._dataMinWeight=null,this._dataMaxWeight=null;var n=this;this.data().forEach((function(t){n._dataMap[t[0]]=t,(!n._dataMinWeight||t[1]<n._dataMinWeight)&&(n._dataMinWeight=t[1]),(!n._dataMaxWeight||t[1]>n._dataMaxWeight)&&(n._dataMaxWeight=t[1])}))}return e},n.prototype.getDataBounds=function(){var t=this._choroplethData.node().getBBox();return{x:t.x,y:t.y,width:t.width,height:t.height}},n.prototype.autoScale=function(){switch(this.autoScaleMode()){case"none":return;case"mesh":this.zoomToBBox(this.getBounds());break;case"data":this.zoomToBBox(this.getDataBounds())}},n.prototype.layerEnter=function(t,e,n){wo.prototype.layerEnter.apply(this,arguments),this._choroplethTransform=e,this._choroplethData=this._choroplethTransform.append("g").attr("class","data"),this._choropleth=this._choroplethTransform.append("path").attr("class","mesh")},n.prototype.layerUpdate=function(t,e){if(wo.prototype.layerUpdate.apply(this,arguments),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this._choroplethTransform.style("stroke",this.meshColor()).style("opacity",this.opacity()),!this.visible()||!this.meshVisible())return this._choropleth.attr("d",""),void delete this._prevProjection;(e||this._prevProjection!==t.projection()||this._prevInternalOnly!==this.internalOnly())&&(this._choropleth.attr("d",t._d3GeoPath(To(this._choroTopology,this._choroTopologyObjects,this.internalOnly()?function(t,e){return t!==e}:function(t,e){return!0}))),this._prevProjection=t.projection(),this._prevInternalOnly=this.internalOnly()),this._choropleth.style("stroke-width",this.meshStrokeWidth()).style("stroke",this.meshColor())},n.prototype.layerExit=function(t){delete this._prevProjection,delete this._prevInternalOnly},n.prototype.layerZoomed=function(e){t.prototype.layerZoomed.apply(this,arguments),this._choroplethData.style("stroke-width",this.meshVisible()?"0px":"".concat(.5/e.zoomScale(),"px"))},n.prototype.click=function(t,e,n){console.log("Click: "+JSON.stringify(t)+", "+e+", "+n)},n.prototype.dblclick=function(t,e,n){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+n)},n}(wo);Ao.prototype._class+=" map_Choropleth",Ao.prototype.mixin(e.Utility.SimpleSelectionMixin),Ao.prototype._palette=e.Palette.rainbow("default"),Ao.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Ao.prototype._palette.switch(),{tags:["Basic","Shared"]}),Ao.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),Ao.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),Ao.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),Ao.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),Ao.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width"),Ao.prototype.publish("internalOnly",!1,"boolean","Internal mesh only"),Ao.prototype.publish("autoScaleMode","mesh","set","Auto Scale",["none","mesh","data"],{tags:["Basic"],override:!0});var Io,Bo,No=(Io="application/json",Bo=function(t){return JSON.parse(t.responseText)},function(t,n){var i=function(t,n){var i,o,r,a,s=e.dispatch("beforesend","progress","load","error"),l=e.map(),h=new XMLHttpRequest,u=null,c=null,p=0;function d(t){var e,n=h.status;if(!n&&function(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}(h)||n>=200&&n<300||304===n){if(r)try{e=r.call(i,h)}catch(t){return void s.call("error",i,t)}else e=h;s.call("load",i,e)}else s.call("error",i,t)}if("undefined"!=typeof XDomainRequest&&!("withCredentials"in h)&&/^(http(s)?:)?\/\//.test(t)&&(h=new XDomainRequest),"onload"in h?h.onload=h.onerror=h.ontimeout=d:h.onreadystatechange=function(t){h.readyState>3&&d(t)},h.onprogress=function(t){s.call("progress",i,t)},i={header:function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?l.get(t):(null==e?l.remove(t):l.set(t,e+""),i)},mimeType:function(t){return arguments.length?(o=null==t?null:t+"",i):o},responseType:function(t){return arguments.length?(a=t,i):a},timeout:function(t){return arguments.length?(p=+t,i):p},user:function(t){return arguments.length<1?u:(u=null==t?null:t+"",i)},password:function(t){return arguments.length<1?c:(c=null==t?null:t+"",i)},response:function(t){return r=t,i},get:function(t,e){return i.send("GET",t,e)},post:function(t,e){return i.send("POST",t,e)},send:function(e,n,r){return h.open(e,t,!0,u,c),null==o||l.has("accept")||l.set("accept",o+",*/*"),h.setRequestHeader&&l.each((function(t,e){h.setRequestHeader(e,t)})),null!=o&&h.overrideMimeType&&h.overrideMimeType(o),null!=a&&(h.responseType=a),p>0&&(h.timeout=p),null==r&&"function"==typeof n&&(r=n,n=null),null!=r&&1===r.length&&(r=function(t){return function(e,n){t(null==e?n:null)}}(r)),null!=r&&i.on("error",r).on("load",(function(t){r(null,t)})),s.call("beforesend",i,h),h.send(null==n?null:n),i},abort:function(){return h.abort(),i},on:function(){var t=s.on.apply(s,arguments);return t===s?i:t}},null!=n){if("function"!=typeof n)throw new Error("invalid callback: "+n);return i.get(n)}return i}(t).mimeType(Io).response(Bo);if(null!=n){if("function"!=typeof n)throw new Error("invalid callback: "+n);return i.get(n)}return i}),Zo=null,Ro=null,jo=null,Go=function(t){function n(){return t.call(this)||this}return h(n,t),n.prototype.layerEnter=function(t,n,i){Ao.prototype.layerEnter.apply(this,arguments),this._choroTopology=Zo.topology,this._choroTopologyObjectsCountries=Zo.topology.objects.countries,this._choroTopologyObjectsLand=Zo.topology.objects.land,this._choroTopologyObjects=this._choroTopologyObjectsCountries,this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);var o=this;this.tooltipHTML((function(t){return o.tooltipFormat({label:t[0],value:t[1]})}))},n.prototype.layerUpdate=function(t){Ao.prototype.layerUpdate.apply(this,arguments),this._choroplethData.style("stroke",this.meshVisible()?null:"black"),this.choroPaths=this._choroplethData.selectAll(".shape").data(this.visible()?this.data():[],(function(t){return t[0]}));var e=this;this.choroPaths.enter().append("path").attr("class","shape").attr("vector-effect","non-scaling-stroke").call(this._selection.enter.bind(this._selection)).on("click",(function(t){e._dataMap[t[0]]&&e.click(e.rowToObj(e._dataMap[t[0]]),"weight",e._selection.selected(this))})).on("dblclick",(function(t){e._dataMap[t[0]]&&e.dblclick(e.rowToObj(e._dataMap[t[0]]),"weight",e._selection.selected(this))})).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show).merge(this.choroPaths).attr("d",(function(e){var n=t._d3GeoPath(jo[e[0]]);return n||console.log("Unknown Country: "+e),n})).style("fill",(function(t){return e._palette(t[1],e._dataMinWeight,e._dataMaxWeight)})),this.choroPaths.exit().remove()},n.prototype.layerPreRender=function(){return this._topoJsonPromise||(this._topoJsonPromise=new Promise((function(t,e){Zo&&t(),No("".concat(Do(),"/countries.json"),(function(e){for(var n in Ro=Mo((Zo=e).topology,Zo.topology.objects.countries).features,jo={},Ro)Ro[n].id&&Zo.countryNames[Ro[n].id]&&(jo[Zo.countryNames[Ro[n].id].name]=Ro[n]);t()}))}))),this._topoJsonPromise},n}(Ao);Go.prototype._class+=" map_ChoroplethCountries";var Uo=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.layerEnter=function(t,e,n){Go.prototype.layerEnter.apply(this,arguments),this._choroTopologyObjects=this._choroTopologyObjectsLand},e}(Go);Uo.prototype._class+=" map_ChoroplethContinents";var Ho=null,Fo=null,Wo=null,Vo=function(t){function n(){var e=t.call(this)||this;return e.projection("AlbersUsaPr"),e}return h(n,t),n.prototype.layerEnter=function(t,n,i){Ao.prototype.layerEnter.apply(this,arguments),this._choroTopology=Ho.topology,this._choroTopologyObjects=Ho.topology.objects.counties,this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);var o=this;this.tooltipHTML((function(t){var e=t[0];return o.tooltipFormat({label:Ho.countyNames[e],value:o._dataMap[e]?o._dataMap[e][1]:"N/A"})}))},n.prototype.layerUpdate=function(t){Ao.prototype.layerUpdate.apply(this,arguments),this._choroplethData.style("stroke",this.meshVisible()?null:"black"),this.choroPaths=this._choroplethData.selectAll(".shape").data(this.visible()?this.data():[],(function(t){return t[0]}));var e=this;this.choroPaths.enter().append("path").attr("class","shape").attr("vector-effect","non-scaling-stroke").call(this._selection.enter.bind(this._selection)).on("click",(function(t){e.click(e.rowToObj(t),"weight",e._selection.selected(this))})).on("dblclick",(function(t){e.dblclick(e.rowToObj(t),"weight",e._selection.selected(this))})).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show).merge(this.choroPaths).attr("d",(function(e){var n=t._d3GeoPath(Wo[e[0]]);return n||console.log("Unknown US County: "+e[0]),n})).style("fill",(function(t){return e._palette(t[1],e._dataMinWeight,e._dataMaxWeight)})),this.choroPaths.exit().remove()},n.prototype.layerPreRender=function(){return this._topoJsonPromise||(this._topoJsonPromise=new Promise((function(t,e){Ho&&t(),No("".concat(Do(),"/us-counties.json"),(function(e){for(var n in Fo=Mo((Ho=e).topology,Ho.topology.objects.counties).features,Wo={},Fo)Fo[n].id&&(Wo[Fo[n].id]=Fo[n]);t()}))}))),this._topoJsonPromise},n.__inputs=[{id:"fips",type:"string"},{id:"value",type:"number"}],n}(Ao);Vo.prototype._class+=" map_ChoroplethCounties",Vo.prototype.publish("onClickFormatFIPS",!1,"boolean","format FIPS code as a String on Click");var qo=null,Yo=null,Ko=null,Xo=function(t){function n(){var e=t.call(this)||this;return e.projection("AlbersUsaPr"),e}return h(n,t),n.prototype.layerEnter=function(t,n,i){Ao.prototype.layerEnter.apply(this,arguments),this._choroTopology=qo.topology,this._choroTopologyObjects=qo.topology.objects.states,this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);var o=this;this.tooltipHTML((function(t){var e=Ko[t[0]].id;return o.tooltipFormat({label:qo.stateNames[e].name,value:t[1]})}))},n.prototype.layerUpdate=function(t){Ao.prototype.layerUpdate.apply(this,arguments),this._choroplethData.style("stroke",this.meshVisible()?null:"black"),this.choroPaths=this._choroplethData.selectAll(".shape").data(this.visible()?this.data():[],(function(t){return t[0]}));var e=this;this.choroPaths.enter().append("path").attr("class","shape").attr("vector-effect","non-scaling-stroke").call(this._selection.enter.bind(this._selection)).on("click",(function(t){e.click(e.rowToObj(t),"weight",e._selection.selected(this))})).on("dblclick",(function(t){e.dblclick(e.rowToObj(t),"weight",e._selection.selected(this))})).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show).merge(this.choroPaths).attr("d",(function(e){var n=t._d3GeoPath(Ko[e[0]]);return n||console.log("Unknown US State: "+e[0]),n})).style("fill",(function(t){return e._palette(t[1],e._dataMinWeight,e._dataMaxWeight)})),this.choroPaths.exit().remove()},n.prototype.layerPreRender=function(){return this._topoJsonPromise||(this._topoJsonPromise=new Promise((function(t,e){qo&&t(),No("".concat(Do(),"/us-states.json"),(function(e){for(var n in Yo=Mo((qo=e).topology,qo.topology.objects.states).features,Ko={},Yo)Yo[n].id&&(Ko[qo.stateNames[Yo[n].id].code]=Yo[n]);t()}))}))),this._topoJsonPromise},n.__inputs=[{id:"state",type:"string"},{id:"value",type:"number"}],n}(Ao);Xo.prototype._class+=" map_ChoroplethStates";var Jo=function(t){function e(){return t.call(this)||this}return h(e,t),e}(bo);Jo.prototype._class+=" map_ChoroplethStatesHeat";yo(".map_Layered .map_GeoHash .data{stroke:none}.map_Layered .map_GeoHash .data.selected{stroke:red}.map_Layered .map_GeoHash .data.over{stroke:orange}.map_Layered .map_GeoHash .data.selected.over{stroke:red}");var Qo=function(t){function n(){return t.call(this)||this}return h(n,t),n.prototype.data=function(t){var e=wo.prototype.data.apply(this,arguments);return arguments.length&&(this._dataMinWeight=null,this._dataMaxWeight=null,this.data().forEach((function(t){(!this._dataMinWeight||t[1]<this._dataMinWeight)&&(this._dataMinWeight=t[1]),(!this._dataMaxWeight||t[1]>this._dataMaxWeight)&&(this._dataMaxWeight=t[1])}),this)),e},n.prototype.layerEnter=function(t,n,i){wo.prototype.layerEnter.apply(this,arguments),this.geohash=new co,this._geoHashTransform=n.append("g").attr("class","map_GeoHash"),this._selection=new e.Utility.SimpleSelection(this,this._geoHashTransform),this.geoHashPaths=e.select(null)},n.prototype.layerUpdate=function(t){wo.prototype.layerUpdate.apply(this,arguments),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this._geoHashTransform.style("opacity",this.opacity()),this.geoHashPaths=this._geoHashTransform.selectAll(".data").data(this.visible()?this.data():[],(function(t){return t[0]}));var e=this;this.geoHashPaths.enter().append("path").attr("class","data").call(this._selection.enter.bind(this._selection)).on("click",(function(t){e.click(e.rowToObj(t),"weight",e._selection.selected(this))})).on("dblclick",(function(t){e.dblclick(e.rowToObj(t),"weight",e._selection.selected(this))})).merge(this.geoHashPaths).attr("d",(function(n){var i=e.geohash.bounds(n[0]),o={type:"LineString",coordinates:[[i.sw.lon,i.ne.lat],[i.ne.lon,i.ne.lat],[i.ne.lon,i.sw.lat],[i.sw.lon,i.sw.lat]]};return t._d3GeoPath(o)})).style("fill",(function(t){return e._palette(t[1],e._dataMinWeight,e._dataMaxWeight)})),this.geoHashPaths.exit().remove()},n.prototype.click=function(t,e,n){console.log("Click: "+JSON.stringify(t)+", "+e+", "+n)},n.prototype.dblclick=function(t,e,n){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+n)},n}(wo);Qo.prototype._class+=" map_GeoHash",Qo.prototype._palette=e.Palette.rainbow("default"),Qo.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Qo.prototype._palette.switch(),{tags:["Basic","Shared"]}),Qo.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),Qo.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),Qo.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),Qo.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),Qo.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width");var $o={exports:{}};!function(t,e){!function(e,n){if(null===(typeof window!=="undefined"?window:null))throw new Error("Google-maps package can be used only in browser");t.exports=function(){var t="3.31",e=null,n=null,i=!1,o=[],r=[],a=null,s={URL:"https://maps.googleapis.com/maps/api/js",KEY:null,LIBRARIES:[],CLIENT:null,CHANNEL:null,LANGUAGE:null,REGION:null};s.VERSION=t,s.WINDOW_CALLBACK_NAME="__google_maps_api_provider_initializator__",s._googleMockApiObject={},s.load=function(t){null===n?!0===i?t&&o.push(t):(i=!0,window[s.WINDOW_CALLBACK_NAME]=function(){l(t)},s.createLoader()):t&&t(n)},s.createLoader=function(){(e=document.createElement("script")).type="text/javascript",e.src=s.createUrl(),document.body.appendChild(e)},s.isLoaded=function(){return null!==n},s.createUrl=function(){var t=s.URL;return t+="?callback="+s.WINDOW_CALLBACK_NAME,s.KEY&&(t+="&key="+s.KEY),s.LIBRARIES.length>0&&(t+="&libraries="+s.LIBRARIES.join(",")),s.CLIENT&&(t+="&client="+s.CLIENT),s.CHANNEL&&(t+="&channel="+s.CHANNEL),s.LANGUAGE&&(t+="&language="+s.LANGUAGE),s.REGION&&(t+="®ion="+s.REGION),s.VERSION&&(t+="&v="+s.VERSION),t},s.release=function(l){var h=function(){s.KEY=null,s.LIBRARIES=[],s.CLIENT=null,s.CHANNEL=null,s.LANGUAGE=null,s.REGION=null,s.VERSION=t,n=null,i=!1,o=[],r=[],void 0!==window.google&&delete window.google,void 0!==window[s.WINDOW_CALLBACK_NAME]&&delete window[s.WINDOW_CALLBACK_NAME],null!==a&&(s.createLoader=a,a=null),null!==e&&(e.parentElement.removeChild(e),e=null),l&&l()};i?s.load((function(){h()})):h()},s.onLoad=function(t){r.push(t)},s.makeMock=function(){a=s.createLoader,s.createLoader=function(){window.google=s._googleMockApiObject,window[s.WINDOW_CALLBACK_NAME]()}};var l=function(t){var e;for(i=!1,null===n&&(n=window.google),e=0;e<r.length;e++)r[e](n);for(t&&t(n),e=0;e<o.length;e++)o[e](n);o=[]};return s}()}()}($o);var tr=$o.exports,er=s({__proto__:null,default:tr},[$o.exports]);yo(".map_GMap .marker{fill:#656565;stroke:none;stroke-width:1px}.map_GMap .map_Layered{cursor:auto;pointer-events:auto}.gm-style img{max-width:none}.gm-style label{display:inline;width:auto}");var nr=tr||er;t.google=null;var ir,or=15e3;function rr(e){return ir||(ir=o.promiseTimeout(or,new Promise((function(n,i){if(t.google)n();else if(e)t.google=e,n();else{window.__hpcc_gmap_apikey||console.warn("__hpcc_gmap_apikey does not contain a valid API key, reverting to developers key (expect limited performance)");try{nr.KEY=window.__hpcc_gmap_apikey||"AIzaSyDwGn2i1i_pMZvnqYJN1BksD_tjYaCOWKg",nr.LIBRARIES=["geometry","drawing"],nr.load((function(e){t.google=e,n()}))}catch(t){console.warn("Failed to initialize Google Map API: ".concat(t.message)),n()}}}))).catch((function(t){console.warn("Timed out initializing Google Map API after ".concat(or,"ms."))}))),ir}var ar=function(){function e(t){this._userShapes=[],this.mapContext=t}return e.prototype.add=function(t){this._userShapes.indexOf(t)>=0||this._userShapes.push(t)},e.prototype.remove=function(t){var e=this._userShapes.indexOf(t);e>=0&&this._userShapes.splice(e,1),t.setMap(null)},e.prototype.save=function(){var t=this;return this._userShapes.map((function(e){return t._saveShape(e)}))},e.prototype.load=function(t){this._deserializeShapes(t)},e.prototype._saveShape=function(t){var e={},n={circle:function(t){e.type="circle",e.pos={lat:t.center.lat(),lng:t.center.lng()},e.radius=t.radius},rectangle:function(t){e.type="rectangle",e.bounds={ne:t.bounds.getNorthEast(),sw:t.bounds.getSouthWest()}},polygon:function(t){e.type=t.__hpcc_type;var n=t.getPath();e.vertices=[];for(var i=0;i<n.length;i++)e.vertices.push(n.getAt(i))},polyline:function(t){n.polygon(t)}};return n[t.__hpcc_type](t),e.strokeWeight=t.strokeWeight,e.fillColor=t.fillColor,e.fillOpacity=t.fillOpacity,e.editable=t.editable,e.clickable=t.clickable||!0,e},e.prototype._deserializeShapes=function(e){for(var n=JSON.parse(e),i=0,o=.45,r="#1f77b4",a=!0,s=!0,l={circle:function(e,n){return new t.google.maps.Circle({strokeWeight:e.strokeWeight||i,fillColor:e.fillColor||r,fillOpacity:e.fillOpacity||o,editable:e.editable||a,clickable:e.clickable||s,map:n,center:e.pos,radius:e.radius})},rectangle:function(e,n){return new t.google.maps.Rectangle({strokeWeight:e.strokeWeight||i,fillColor:e.fillColor||r,fillOpacity:e.fillOpacity||o,editable:e.editable||a,clickable:e.clickable||s,map:n,bounds:{north:e.bounds.ne.lat,west:e.bounds.sw.lng,south:e.bounds.sw.lat,east:e.bounds.ne.lng}})},polygon:function(e,n){return new t.google.maps.Polygon({strokeWeight:e.strokeWeight||i,fillColor:e.fillColor||r,fillOpacity:e.fillOpacity||o,editable:e.editable||a,clickable:e.clickable||s,map:n,paths:e.vertices})},polyline:function(e,n){return new t.google.maps.Polyline({strokeWeight:e.strokeWeight||i,fillColor:e.fillColor||r,fillOpacity:e.fillOpacity||o,editable:e.editable||a,clickable:e.clickable||s,map:n,path:e.vertices})}},h=0;h<n.length;h++){var u=l[n[h].type](n[h],this.mapContext._googleMap);this.mapContext.onDrawingComplete({type:n[h].type,overlay:u})}},e}(),sr=function(n){function o(){var e=n.call(this)||this;e._tag="div";var o=e;function r(e,n,i){var r=o._overlay.getProjection(),a=r.fromLatLngToDivPixel(new t.google.maps.LatLng(n,i)),s=r.getWorldWidth(),l=parseFloat(e.widgetX()),h=parseFloat(e.widgetY()),u=parseFloat(e.widgetWidth());for(a.x-=l,a.y-=h;a.x<0;)a.x+=s;for(;a.x>u;)a.x-=s;return a}return e._userShapes=new ar(e),e._worldSurface=new i.AbsoluteSurface,e._worldSurface.project=function(t,e){return r(this,t,e)},e._viewportSurface=new i.AbsoluteSurface,e._viewportSurface.project=function(t,e){return r(this,t,e)},e}return h(o,n),o.prototype.data=function(t){var n=e.HTMLWidget.prototype.data.apply(this,arguments);return n},o.prototype.getMapType=function(){switch(this.type()){case"terrain":return t.google.maps.MapTypeId.TERRAIN;case"road":default:return t.google.maps.MapTypeId.ROADMAP;case"satellite":return t.google.maps.MapTypeId.SATELLITE;case"hybrid":return t.google.maps.MapTypeId.HYBRID}},o.prototype.getMapOptions=function(){return{panControl:this.panControl(),zoomControl:this.zoomControl(),fullscreenControl:this.fullscreenControl(),mapTypeControl:this.mapTypeControl(),scaleControl:this.scaleControl(),streetViewControl:this.streetViewControl(),overviewMapControl:this.overviewMapControl(),overviewMapControlOptions:{opened:!0},styles:this.googleMapStyles()}},o.prototype.size=function(n){var i=e.HTMLWidget.prototype.size.apply(this,arguments);return arguments.length&&this._googleMapNode&&(this._googleMapNode.style("width",n.width+"px").style("height",n.height+"px"),t.google.maps.event.trigger(this._googleMap,"resize")),i},o.prototype.enter=function(i,o){n.prototype.enter.call(this,i,o);var r=this;this._googleGeocoder=new t.google.maps.Geocoder,this._googleMapNode=o.append("div").style("width",this.width()+"px").style("height",this.height()+"px"),this._googleMap=new t.google.maps.Map(this._googleMapNode.node(),{zoom:this.zoom(),center:new t.google.maps.LatLng(this.centerLat(),this.centerLong()),mapTypeId:this.getMapType(),disableDefaultUI:!0}),this._overlay=function(e,n,i){function o(e,n,i){t.google.maps.OverlayView.call(this),this._div=null,this._worldSurface=n,this._viewportSurface=i,this._map=e,this.setMap(e);var o=this;t.google.maps.event.addListener(e,"bounds_changed",(function(){o.draw()})),t.google.maps.event.addListener(e,"projection_changed",(function(){o.draw()})),this._prevWorldMin={x:0,y:0},this._prevWorldMax={x:0,y:0},this._prevMin={x:0,y:0},this._prevMax={x:0,y:0}}return o.prototype=t.google.maps.OverlayView.prototype,o.prototype.onAdd=function(){this.div=document.createElement("div"),this._viewportSurface.target(null).target(this.div).units("pixels"),this.getPanes().overlayMouseTarget.appendChild(this.div)},o.prototype.draw=function(){var e=this.getProjection();if(e){for(var n=this._map.getBounds(),i=e.fromLatLngToDivPixel(n.getCenter()),o=e.fromLatLngToDivPixel(n.getSouthWest()),r=e.fromLatLngToDivPixel(n.getNorthEast()),a={x:o.x,y:r.y},s={x:r.x,y:o.y},l=e.getWorldWidth();s.x<a.x+100;)s.x+=l;for(;a.x>i.x;)a.x-=l,s.x-=l;a.x===this._prevMin.x&&a.y===this._prevMin.y&&s.x===this._prevMax.x&&s.y===this._prevMax.y||(this._viewportSurface.resize({width:0,height:0}).widgetX(a.x).widgetY(a.y).widgetWidth(s.x-a.x).widgetHeight(s.y-a.y),this._viewportSurface._renderCount?(this._viewportSurface.render(),this._prevMin=a,this._prevMax=s):this._viewportSurface.lazyRender());for(var h=e.fromLatLngToDivPixel(new t.google.maps.LatLng(85,-179.9)),u=e.fromLatLngToDivPixel(new t.google.maps.LatLng(-85,179.9));u.x<h.x+100;)u.x+=l;for(;h.x>i.x;)h.x-=l,u.x-=l;h.x===this._prevWorldMin.x&&h.y===this._prevWorldMin.y&&u.x===this._prevWorldMax.x&&u.y===this._prevWorldMax.y||(this._worldSurface.widgetX(h.x).widgetY(h.y).widgetWidth(u.x-h.x).widgetHeight(u.y-h.y).render(),this._prevWorldMin=u,this._prevWorldMax=u)}},o.prototype.onRemove=function(){this._viewportSurface.target(null),this._div.parentNode.removeChild(this._div),this._div=null},new o(e,n,i)}(this._googleMap,this._worldSurface,this._viewportSurface),this._googleMap.addListener("center_changed",(function(){r.centerLat(r._googleMap.center.lat()),r._prevCenterLat=r.centerLat(),r.centerLong(r._googleMap.center.lng()),r._prevCenterLong=r.centerLong(),r._googleMapPanorama.setPosition({lat:r.centerLat(),lng:r.centerLong()}),r.zoom(r._googleMap.getZoom()),r._prevZoom=r.zoom(),r._overlay.draw()})),this._googleMap.addListener("zoom_changed",(function(){r.zoom(r._googleMap.zoom),r._prevZoom=r.zoom()})),this._googleStreetViewService=new t.google.maps.StreetViewService,this._googleMapPanorama=this._googleMap.getStreetView(),this._googleMapPanorama.addListener("visible_changed",(function(){r.streetView(r._googleMapPanorama.getVisible()),r._prevStreetView=r.streetView()})),this._circleMap=e.map([]),this._pinMap=e.map([]),this._prevCenterLat=this.centerLat(),this._prevCenterLong=this.centerLong(),this._prevZoom=this.zoom();var a={strokeWeight:0,fillOpacity:.45,fillColor:"#1f77b4",editable:!0,clickable:!0};this._drawingManager=new t.google.maps.drawing.DrawingManager({drawingMode:t.google.maps.drawing.OverlayType.MARKER,drawingControl:!0,drawingControlOptions:{position:t.google.maps.ControlPosition.TOP_CENTER,drawingModes:["polygon","rectangle","circle"]},rectangleOptions:a,circleOptions:a,polygonOptions:a}),this.drawingState()&&this._userShapes.load(this.drawingState())},o.prototype.update=function(e,n){var i=this;this._googleMapNode.style("width",this.width()+"px").style("height",this.height()+"px"),this._googleMap.setMapTypeId(this.getMapType()),this._googleMap.setOptions(this.getMapOptions()),this.centerAddress_exists()&&this._prevCenterAddress!==this.centerAddress()&&(this._prevCenterAddress=this.centerAddress(),this._googleGeocoder.geocode({address:this.centerAddress()},(function(e,n){if(n===t.google.maps.GeocoderStatus.OK){var o=e[0].geometry.bounds||e[0].geometry.viewport;i._googleMap.fitBounds(o),i.streetView()&&i.useComputedHeading()&&i.streetViewAt({lat:e[0].geometry.location.lat(),lng:e[0].geometry.location.lng()},50)}else i.statusError({data:e,status:n})}))),this._prevCenterLat===this.centerLat()&&this._prevCenterLong===this.centerLong()||(this._googleMap.setCenter(new t.google.maps.LatLng(this.centerLat(),this.centerLong())),this._prevCenterLat=this.centerLat(),this._prevCenterLong=this.centerLong()),this._prevZoom!==this.zoom()&&(this._googleMap.setZoom(this.zoom()),this._prevZoom=this.zoom()),this.updateCircles(),this.updatePins(),this._prevStreetView!==this.streetView()&&(this.streetView()?(this._googleMapPanorama.setPosition({lat:this.centerLat(),lng:this.centerLong()}),this._googleMapPanorama.setPov({heading:0,pitch:0}),this._googleMapPanorama.setVisible(!0)):this._googleMapPanorama.setVisible(!1),this._prevStreetView=this.streetView()),this.drawingTools()?(this._drawingManager.setMap(this._googleMap),t.google.maps.event.addListener(this._drawingManager,"overlaycomplete",(function(){o.prototype.onDrawingComplete.apply(i,arguments)}))):(this._drawingManager.setMap(null),t.google.maps.event.clearInstanceListeners(this._drawingManager))},o.prototype.render=function(t){var e=this,i=arguments;return rr().then((function(){n.prototype.render.apply(e,i)})),this},o.prototype.streetViewAt=function(e,n){void 0===n&&(n=1e3);var i=this,o=this.outdoorStreetViewOnly()?t.google.maps.StreetViewSource.OUTDOOR:t.google.maps.StreetViewSource.DEFAULT;this._googleStreetViewService.getPanorama({location:e,radius:n,source:o},(function(n,o){if("OK"===o){var r=new t.google.maps.Marker({position:e,map:i._googleMap}),a=t.google.maps.geometry.spherical.computeHeading(n.location.latLng,new t.google.maps.LatLng(e.lat,e.lng));i._googleMapPanorama.setPano(n.location.pano),i._googleMapPanorama.setPov({heading:a,pitch:0}),i.showStreetViewMarker()||r.setVisible(!1),i._googleMapPanorama.setVisible(!0);var s=t.google.maps.event.addListener(i._googleMap.getStreetView(),"visible_changed",(function(){this.getVisible()||(r.setMap(null),t.google.maps.event.removeListener(s))}))}else i.statusError({data:n,status:o})}))},o.prototype.updateCircles=function(){function t(t){return t[0]+"_"+t[1]}var n=[],i=e.map(this._circleMap.keys(),(function(t){return t}));this.data().forEach((function(e){i.remove(t(e)),e[3]&&!this._circleMap.has(t(e))?n.push(e):e[3]&&this._circleMap.has(t(e))||!e[3]&&this._circleMap.has(t(e))&&i.set(t(e),!0)}),this),n.forEach((function(e){var n=this.createCircle(e[0],e[1],e[3]);this._circleMap.set(t(e),n)}),this);var o=this;i.each((function(t){o._circleMap.get(t).setMap(null),o._circleMap.remove(t)}))},o.prototype.updatePins=function(){function t(t){return t[0]+"_"+t[1]}var n=[],i=[],o=e.map(this._pinMap.keys(),(function(t){return t}));this.data().forEach((function(e){o.remove(t(e)),e[2]&&!this._pinMap.has(t(e))?n.push(e):e[2]&&this._pinMap.has(t(e))?i.push(e):!e[2]&&this._pinMap.has(t(e))&&o.set(t(e),!0)}),this),n.forEach((function(e){var n=this.createMarker(e[0],e[1],e[2]);this._pinMap.set(t(e),n)}),this),i.forEach((function(e){this._pinMap.get(t(e)).setIcon(this.createIcon(e[2]))}),this);var r=this;o.each((function(t){r._pinMap.get(t).setMap(null),r._pinMap.remove(t)}))},o.prototype.createIcon=function(t){return{path:"M 0,0 C -2,-20 -10,-22 -10,-30 A 10,10 0 1,1 10,-30 C 10,-22 2,-20 0,0 z M -2,-30",fillColor:t.fillColor,fillOpacity:t.fillOpacity||.8,scale:.5,strokeColor:t.strokeColor||"black",strokeWeight:.25}},o.prototype.createMarker=function(e,n,i){return new t.google.maps.Marker({position:new t.google.maps.LatLng(e,n),animation:t.google.maps.Animation.DROP,title:i.title||"",icon:this.createIcon(i),map:this._googleMap})},o.prototype.createCircle=function(e,n,i){return i.radius=i.radius||1,new t.google.maps.Circle({center:new t.google.maps.LatLng(e,n),radius:16093*i.radius/10,fillColor:i.fillColor||"red",strokeColor:i.strokeColor||i.fillColor||"black",strokeWeight:.5,map:this._googleMap})},o.prototype.zoomTo=function(e,n){if(!this._renderCount)return this;n=n||this.singleZoomToMaxZoom();var i=0,o=new t.google.maps.LatLngBounds;switch(e.forEach((function(e){var n=new t.google.maps.LatLng(e[0],e[1]);o.extend(n),++i})),i){case 0:break;case 1:this._googleMap.setCenter(o.getCenter()),this._googleMap.setZoom(n);break;default:this._googleMap.fitBounds(o)}return this},o.prototype.zoomToFit=function(){return this.zoomTo(this.data())},o.prototype.drawingOptions=function(t){return arguments.length?(this._drawingManager.setOptions(t),this):this._drawingManager},o.prototype.userShapeSelection=function(t){return arguments.length?(this._userShapeSelection&&this._userShapeSelection.setEditable(!1),this._userShapeSelection=t,this._userShapeSelection&&this._userShapeSelection.setEditable(!0),this):this._userShapeSelection},o.prototype.deleteUserShape=function(t){this._userShapeSelection===t&&this.userShapeSelection(null),this._userShapes.remove(t)},o.prototype.onDrawingComplete=function(e){if(e.type!==t.google.maps.drawing.OverlayType.MARKER){this._drawingManager.setDrawingMode(null);var n=e.overlay;n.__hpcc_type=e.type,this._userShapes.add(n);var i=this,o=!1;window.addEventListener("keydown",(function(t){"Control"!==t.keyIdentifier&&!0!==t.ctrlKey||(o=!0)})),window.addEventListener("keyup",(function(t){!1===t.ctrlKey&&(o=!1)})),t.google.maps.event.addListener(n,"click",(function(t){return i.userShapeSelection(n),t&&!0===o&&(i.deleteUserShape(n),i.drawingState(JSON.stringify(i._userShapes.save()))),!1})),this.userShapeSelection(n),this.drawingState(JSON.stringify(this._userShapes.save()))}},o.prototype.statusError=function(t){console.log("Data not found for this location.")},o}(e.HTMLWidget);sr.prototype._class+=" map_GMap",sr.prototype.publish("outdoorStreetViewOnly",!1,"boolean","If true, streetView will only display outdoor locations"),sr.prototype.publish("showStreetViewMarker",!1,"boolean","If true, streetView marker will be hidden"),sr.prototype.publish("useComputedHeading",!1,"boolean","If true, centerAddress streetView compute the ideal panorama heading"),sr.prototype.publish("type","road","set","Map Type",["terrain","road","satellite","hybrid"],{tags:["Basic"]}),sr.prototype.publish("centerLat",42.877742,"number","Center Latitude",null,{tags:["Basic"]}),sr.prototype.publish("centerLong",-97.380979,"number","Center Longitude",null,{tags:["Basic"]}),sr.prototype.publish("centerAddress",null,"string","Address to center map on",null,{tags:["Basic"],optional:!0}),sr.prototype.publish("zoom",4,"number","Zoom Level",null,{tags:["Basic"]}),sr.prototype.publish("singleZoomToMaxZoom",14,"number","Max zoomTo level with single item"),sr.prototype.publish("panControl",!0,"boolean","Pan Controls",null,{tags:["Basic"]}),sr.prototype.publish("zoomControl",!0,"boolean","Zoom Controls",null,{tags:["Basic"]}),sr.prototype.publish("scaleControl",!0,"boolean","Scale Controls",null,{tags:["Basic"]}),sr.prototype.publish("mapTypeControl",!1,"boolean","Map Type Controls",null,{tags:["Basic"]}),sr.prototype.publish("fullscreenControl",!1,"boolean","Fullscreen Controls",null,{tags:["Basic"]}),sr.prototype.publish("streetViewControl",!1,"boolean","StreetView Controls",null,{tags:["Basic"]}),sr.prototype.publish("overviewMapControl",!1,"boolean","OverviewMap Controls",null,{tags:["Basic"]}),sr.prototype.publish("streetView",!1,"boolean","Streetview",null,{tags:["Basic"]}),sr.prototype.publish("drawingTools",!1,"boolean","Drawing Tools",null,{tags:["Basic"]}),sr.prototype.publish("drawingState","","string","Map Drawings",null,{disable:function(t){return!1===t.drawingTools()}}),sr.prototype.publish("googleMapStyles",{},"object","Styling for map colors etc",null,{tags:["Basic"]});var lr=function(t){function e(e,n){var i=t.call(this)||this;return i.gmap=e,i.surface=n,i.autoScaleMode("none"),i.zoomable(!1).zoomDuration(10),i}return h(e,t),e.prototype.getProjection=function(){return this.gmap._overlay.getProjection()},e.prototype.render=function(e){var n=this;return t.prototype.render.call(this,(function(t){var i=n.getProjection();if(i){var o=new window.google.maps.LatLng(0,0),r=i.fromLatLngToDivPixel(o),a=n.surface.widgetX(),s=n.surface.widgetY(),l=[r.x-a,r.y-s],h=n.gmap._googleMap.getZoom();n.zoomTo(l,.0625*(1<<h),0)}e&&e(t)})),this},e}(bo),hr=function(e){function n(){var t=e.call(this)||this;return t.layered=new lr(t,t._viewportSurface),t._viewportSurface.widget(t.layered),t}return h(n,e),n.prototype.invert=function(t,e){return this.layered.invert(t,e)},n.prototype.rproject=function(e,n){var i=this.layered.getProjection().fromDivPixelToLatLng(new t.google.maps.Point(e,n));return{lat:i.lat(),lng:i.lng()}},n.prototype.updateCircles=function(){},n.prototype.updatePins=function(){},n.prototype.layers=function(t){return arguments.length?(this.layered.layers(t),this):this.layered.layers()},n.prototype.render=function(t){var n=this;return e.prototype.render.call(this,(function(e){n.layered.preRender().then((function(){n.layered.render((function(e){t&&t(e)}))}))}))},n}(sr);hr.prototype._class+=" map_GMapLayered";var ur=function(t){function e(){var e=t.call(this)||this,n=e;return e._counties=(new Vo).paletteID("Blues").meshVisible(!1).opacity(.8).columns(["fips","weight"]).on("click",(function(t,e,i){n.click(t,e,i)})).on("dblclick",(function(t,e,i){n.dblclick(t,e,i)})),e}return h(e,t),e.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),this.layers([this._counties])},e.prototype.update=function(e,n){this._counties.data(this.data()),t.prototype.update.call(this,e,n),this._palette=this._counties._palette,this._dataMinWeight=this._counties._dataMinWeight,this._dataMaxWeight=this._counties._dataMaxWeight},e.prototype.render=function(e){var n=this;return t.prototype.render.call(this,(function(t){if(console.log("as:"+n.autoScale()),n._renderCount>1&&n.autoScale()){var i=n._counties.getDataBounds();if(i.x&&i.y&&(!n._prevBounds||n._prevBounds.x!==i.x||n._prevBounds.y!==i.y||n._prevBounds.width!==i.width||n._prevBounds.height!==i.height)){n._prevBounds=i;var o=n.invert(i.x,i.y),r=n.invert(i.x+i.width,i.y+i.height);o&&r&&n.zoomTo([[o[1],o[0]],[r[1],r[0]]])}}e&&e(t)}))},e.prototype.exit=function(e,n){t.prototype.exit.call(this,e,n)},e.prototype.click=function(t,e,n){console.log("Click: "+JSON.stringify(t)+", "+e+","+n)},e.prototype.dblclick=function(t,e,n){console.log("Double click: "+JSON.stringify(t)+", "+e+","+n)},e}(hr);ur.prototype._class+=" map_GMapCounties",ur.prototype.publish("autoScale",!1,"boolean","Auto scale to data");var cr=function(t){function n(){return t.call(this)||this}return h(n,t),n.prototype.enter=function(){t.prototype.enter.apply(this,arguments);var n=(new r.Graph).layout("None").zoomable(!1),i=n.render,o=this;n.render=function(t){var n=[],a=[],s=null;o.data().forEach((function(t){var i=o._viewportSurface.project(t[0],t[1]),l=(new e.Shape).shape("circle").radius(3).data(t).pos(i);n.push(l),s&&a.push((new r.Edge).sourceVertex(s).targetVertex(l).sourceMarker("none").targetMarker("arrow")),s=l})),this.data({vertices:n,edges:a});var l=i.apply(this,arguments);return l},this._viewportSurface.widget(n)},n}(sr);cr.prototype._class+=" map_GMapGraph";var pr=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.enter=function(){t.prototype.enter.apply(this,arguments);var e=new a.HeatMap,n=e.render,i=this;e.render=function(t){return this.data(i.data().map((function(t){var e=i._viewportSurface.project(t[0],t[1]);return[e.x,e.y,t[4]]}))),n.apply(this,arguments),this},this._viewportSurface.widget(e)},e}(sr);pr.prototype._class+=" map_GMapHeat";yo(".map_Layered .pin>path{stroke:#000;cursor:pointer}.map_Layered .pin.selected>path{stroke-width:1px;stroke:red}.map_Layered .pin.over>path{stroke:orange}.map_Layered .pin.selected.over>path{stroke-width:1px;stroke:red}");var dr=function(t){function n(){var n=t.call(this)||this;return e.Utility.SimpleSelectionMixin.call(n),n._geohash=new co,n}return h(n,t),n.prototype.pinsData=function(){var t=this._db.fieldByLabel(this.geohashColumn()),e=this._db.fieldByLabel(this.tooltipColumn()),n=this._db.fieldByLabel(this.latColumn()),i=this._db.fieldByLabel(this.longColumn()),o=this;return this.data().filter((function(t){var e=n?t[n.idx]:t[0],r=i?t[i.idx]:t[1];return!o.omitNullLatLong()||0!==e||0!==r})).map((function(o,r){var a={idx:r,lat:n?o[n.idx]:o[0],long:i?o[i.idx]:o[1],ext:o[2]instanceof Object?o[2]:{},origRow:o};if(t)try{var s=this._geohash.bounds(o[t.idx]);a.lat=(s.ne.lat+s.sw.lat)/2,a.long=(s.ne.lon+s.sw.lon)/2}catch(t){}return e&&(a.ext.tooltip=o[e.idx]),a}),this)},n.prototype.layerEnter=function(t,n,i){wo.prototype.layerEnter.apply(this,arguments),this._pinsTransform=n,this._selection.widgetElement(this._pinsTransform),this.pinsPaths=e.select(null),this.tooltipHTML((function(t){return void 0===t.ext.tooltip?"":t.ext.tooltip}))},n.prototype.layerUpdate=function(t){wo.prototype.layerUpdate.apply(this,arguments),this._pinsTransform.style("opacity",this.opacity()),this.pinsPaths=this._pinsTransform.selectAll(".pin").data(this.visible()?this.pinsData():[],(function(t){return t.idx}));var n=this,i=this.pinsPaths.enter().append("g").attr("class","pin").call(this._selection.enter.bind(this._selection)).on("click",(function(t){n.click(n.rowToObj(t.origRow),"geohash",n._selection.selected(this))})).on("dblclick",(function(t){n.dblclick(n.rowToObj(t.origRow),"geohash",n._selection.selected(this))})).on("mouseover",(function(t){e.Platform.isIE||this.parentNode.appendChild(this)})).on("mouseout.tooltip",(function(t){t.ext&&t.ext.tooltip&&n.tooltip.hide.apply(this,arguments)})).on("mousemove.tooltip",(function(t){t.ext&&t.ext.tooltip&&n.tooltip.show.apply(this,arguments)})).each((function(t){var n=e.select(this);n.append("path").attr("class","data"),n.append("text").attr("text-anchor","middle")})).merge(this.pinsPaths);i.selectAll("text").style("stroke",this.fontColor()).style("fill",this.fontColor()).style("font-size",this.fontSize()).style("font-family",this.fontFamily()).style("dominant-baseline",this.textBaseline()).attr("dx",0).attr("dy",this.pinTextDY()).text((function(t){return t.ext&&t.ext.text?t.ext.text:""}));var o=this.svgPinPath();i.selectAll("path.data").attr("d",o).attr("stroke-width",this.strokeWidth()+"px").style("display",(function(e){return t.project(e.lat,e.long)?null:"none"})).style("stroke",(function(t){return t.ext&&t.ext.strokeColor?t.ext.strokeColor:n.strokeColor()})).style("fill",(function(t){return t.ext&&t.ext.fillColor?t.ext.fillColor:n.fillColor()})),this.pinsPaths.exit().remove()},n.prototype.layerZoomed=function(t){wo.prototype.layerZoomed.apply(this,arguments),this.pinsPaths.attr("transform",(function(e){var n=t.project(e.lat,e.long);return n||(n=[0,0]),"translate("+n[0]+", "+n[1]+")scale("+1/t.zoomScale()+")"}))},n.prototype.pinTextDY=function(){switch(this.pinType()){case"pin":case"rectangle-pin":return-this.arrowHeight();case"circle":case"rectangle":return 0}},n.prototype.svgPinPath=function(){switch(this.pinType()){case"pin":return this.circlePinPath();case"circle":return this.circlePath();case"rectangle":return this.rectanglePath();case"rectangle-pin":return this.rectanglePinPath()}},n.prototype.rectanglePinPath=function(){var t=this.pinWidth(),e=this.pinHeight(),n=this.cornerRadius(),i=this.arrowHeight(),o=this.arrowWidth(),r=(t-2*n-o)/2;return"M"+(0-t/2)+","+(0-e+n)+"a"+-n+","+-n+" 0 0 1 "+n+","+-n+"h"+(t+2*-n)+"a"+n+","+n+" 0 0 1 "+n+","+n+"v"+(e+2*-n)+"a"+n+","+n+" 0 0 1 "+-n+","+n+"h"+-r+"l"+-o/2+","+i+"l"+-o/2+","+-i+"h"+-r+"a"+-n+","+-n+" 0 0 1 "+-n+","+-n+"z"},n.prototype.rectanglePath=function(){var t=this.pinWidth(),e=this.pinHeight(),n=this.cornerRadius(),i=-e/2;return"M"+-t/2+","+(i+=n)+"a"+-n+","+-n+" 0 0 1 "+n+","+-n+"h"+(t+2*-n)+"a"+n+","+n+" 0 0 1 "+n+","+n+"v"+(e+2*-n)+"a"+n+","+n+" 0 0 1 "+-n+","+n+"h"+(2*n-t)+"a"+-n+","+-n+" 0 0 1 "+-n+","+-n+"z"},n.prototype.circlePinPath=function(){var t=this.arrowHeight(),e=this.arrowWidth(),n=e/2,i=-t;return"M"+(0-e/2)+","+(0-t)+"c"+-n+" "+i+", "+(e+n)+" "+i+", "+e+" 0l"+-e/2+","+t+"l"+-e/2+","+-t+"z"},n.prototype.circlePath=function(){var t=+this.pinRadius();return"M 0, 0 m ".concat(-t,", 0 a ").concat(t,",").concat(t," 0 1,0 ").concat(2*t,",0 a ").concat(t,",").concat(t," 0 1,0 ").concat(2*-t,",0")},n.prototype.click=function(t,e,n){console.log("Click: "+JSON.stringify(t)+", "+e+", "+n)},n.prototype.dblclick=function(t,e,n){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+n)},n}(wo);dr.prototype._class+=" map_Pins",dr.prototype.mixin(e.Utility.SimpleSelectionMixin),dr.prototype.publish("geohashColumn",null,"set","Geohash column",(function(){return this.columns()}),{optional:!0}),dr.prototype.publish("tooltipColumn",null,"set","Tooltip column",(function(){return this.columns()}),{optional:!0}),dr.prototype.publish("latColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),dr.prototype.publish("longColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),dr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),dr.prototype.publish("fillColor","#00FFDD","html-color","Pin Color",null,{optional:!0}),dr.prototype.publish("omitNullLatLong",!1,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]}),dr.prototype.publish("strokeWidth",.5,"number","Pin Border Thickness (pixels)",null,{tags:["Basic"]}),dr.prototype.publish("strokeColor","","html-color","Pin Border Color",null,{optional:!0}),dr.prototype.publish("fontSize",18,"number","Font Size",null,{tags:["Basic","Shared"]}),dr.prototype.publish("fontFamily","Verdana","string","Font Name",null,{tags:["Basic","Shared","Shared"]}),dr.prototype.publish("fontColor","#000000","html-color","Font Color",null,{tags:["Basic","Shared"]}),dr.prototype.publish("pinType","pin","set","Pin Type",["pin","circle","rectangle","rectangle-pin"],{tags:["Basic"]}),dr.prototype.publish("arrowWidth",8,"number","Pin arrow width (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["pin","rectangle-pin"].indexOf(t.pinType())}}),dr.prototype.publish("arrowHeight",12,"number","Pin arrow height (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["pin","rectangle-pin"].indexOf(t.pinType())}}),dr.prototype.publish("pinWidth",20,"number","Width of pin (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["rectangle","rectangle-pin"].indexOf(t.pinType())}}),dr.prototype.publish("pinHeight",20,"number","Height of pin (pixels) (not including arrow)",null,{tags:["Basic"],disable:function(t){return-1===["rectangle","rectangle-pin"].indexOf(t.pinType())}}),dr.prototype.publish("cornerRadius",10,"number","Radius of rectangular pin corners (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["rectangle","rectangle-pin"].indexOf(t.pinType())}}),dr.prototype.publish("pinRadius",12,"number","Radius of circle (pixels)",null,{tags:["Basic"],disable:function(t){return"circle"!==t.pinType()}}),dr.prototype.publish("textBaseline","central","set","Pin text vertical alignment",["auto","use-script","no-change","reset-size","ideographic","alphabetic","hanging","mathematical","central","middle","text-after-edge","text-before-edge","inherit"],{tags:["Basic"]});var fr=function(t){function e(){var e=t.call(this)||this,n=e;return e._pins=(new dr).columns(["lat","long","ext"]).on("click",(function(t,e,i){n.click(n.rowToObj(t.ext.origRow),"",i),n.clickStreetView(n.rowToObj(t.ext.origRow),"",i)})).on("dblclick",(function(t,e,i){n.dblclick(n.rowToObj(t.ext.origRow),"",i)})),e}return h(e,t),e.prototype.pinsData=function(){if(0===this.data().length)return[];var t=this.columns();return this._view=this._db.rollupView([this.latitudeColumn(),this.longitudeColumn()]),this._view.entries().map((function(e){var n=e.values[0].value[0];return[e.key,e.values[0].key,{fillColor:n[t.indexOf(this.colorColumn())],tooltip:n[t.indexOf(this.tooltipColumn())],origRow:n}]}),this)},e.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),this.layers([this._pins])},e.prototype.update=function(e,n){t.prototype.update.call(this,e,n),this._pins.data(this.pinsData()),this.autoScale()&&this._prevChecksum!==this._db.checksum()&&(this._prevChecksum=this._db.checksum(),this.zoomTo(this._pins.pinsData().map((function(t){return[t.lat,t.long]}))))},e.prototype.exit=function(e,n){t.prototype.exit.call(this,e,n)},e.prototype.click=function(t,e,n){console.log("Click: "+JSON.stringify(t)+", "+e+","+n)},e.prototype.clickStreetView=function(t,e,n){this.streetViewOnClick()&&this.streetViewAt({lat:+t[this.latitudeColumn()],lng:+t[this.longitudeColumn()]})},e.prototype.dblclick=function(t,e,n){console.log("Double click: "+JSON.stringify(t)+", "+e+","+n)},e}(hr);fr.prototype._class+=" map_GMapPin",fr.prototype.publish("autoScale",!1,"boolean","Auto scale to data"),fr.prototype.publishProxy("pinColor","_pins","fillColor"),fr.prototype.publishProxy("pinType","_pins","pinType"),fr.prototype.publishProxy("pinWidth","_pins","pinWidth"),fr.prototype.publishProxy("pinHeight","_pins","pinHeight"),fr.prototype.publishProxy("cornerRadius","_pins","cornerRadius"),fr.prototype.publishProxy("pinRadius","_pins","pinRadius"),fr.prototype.publishProxy("arrowWidth","_pins","arrowWidth"),fr.prototype.publishProxy("arrowHeight","_pins","arrowHeight"),fr.prototype.publishProxy("textBaseline","_pins","textBaseline"),fr.prototype.publishProxy("strokeWidth","_pins","strokeWidth"),fr.prototype.publishProxy("omitNullLatLong","_pins","omitNullLatLong"),fr.prototype.publish("latitudeColumn",null,"set","Latitude",(function(){return this.columns()}),{optional:!0}),fr.prototype.publish("longitudeColumn",null,"set","Longitude",(function(){return this.columns()}),{optional:!0}),fr.prototype.publish("colorColumn",null,"set","Color",(function(){return this.columns()}),{optional:!0}),fr.prototype.publish("tooltipColumn",null,"set","Tooltip",(function(){return this.columns()}),{optional:!0}),fr.prototype.publish("streetViewOnClick",!1,"boolean","Switch to street view when pin clicked");yo(".map_Layered .marker{fill:#656565;stroke:none}.map_Layered .dataEdge{stroke:#000;fill:none}");var _r=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.data=function(t){var e=wo.prototype.data.apply(this,arguments);return arguments.length&&(this.dataEdges=[],t.forEach((function(t){this.dataEdges.push({type:"LineString",coordinates:[[t[1],t[0]],[t[3],t[2]]]})}),this)),e},e.prototype.layerEnter=function(t,e,n){wo.prototype.layerEnter.apply(this,arguments),e.append("defs").append("marker").attr("class","marker").attr("id",this._id+"_arrowHead").attr("viewBox","0 0 10 10").attr("refX",10).attr("refY",5).attr("markerWidth",16).attr("markerHeight",16).attr("markerUnits","strokeWidth").attr("orient","auto").append("polyline").attr("points","0,0 10,5 0,10 1,5"),this._edgesTransform=e.append("g")},e.prototype.layerUpdate=function(t){wo.prototype.layerUpdate.apply(this,arguments),this._edgesTransform.style("opacity",this.opacity());var e=this._edgesTransform.selectAll(".dataEdge").data(this.visible()?this.dataEdges:[]);this._edgesPaths=e.enter().append("path").attr("class","dataEdge").attr("marker-end","url(#"+this._id+"_arrowHead)").merge(e).attr("d",t._d3GeoPath),e.exit().remove()},e.prototype.layerZoomed=function(t){wo.prototype.layerZoomed.apply(this,arguments),this._edgesPaths.attr("stroke-width","".concat(.5/t.zoomScale(),"px"))},e}(wo);_r.prototype._class+=" map_Lines",_r.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]});var mr=function(t){function e(){var e=t.call(this)||this,n=e;return e._lines=new _r,e._pins=(new dr).columns(["lat","long","ext"]).on("click",(function(t,e,i){n.click(n.rowToObj(t.ext.origRow),"",i)})).on("dblclick",(function(t,e,i){n.click(n.rowToObj(t.ext.origRow),"",i)})),e}return h(e,t),e.prototype.pinsData=function(){if(0===this.data().length)return[];var t=this.columns();this._fromView=this._db.rollupView([this.fromLatitudeColumn(),this.fromLongitudeColumn()]),this._toView=this._db.rollupView([this.toLatitudeColumn(),this.toLongitudeColumn()]);var e=this._fromView.entries().map((function(e){var n=e.values[0].value[0];return[e.key,e.values[0].key,{fillColor:n[t.indexOf(this.fromColorColumn())]||this.fromPinColor(),tooltip:n[t.indexOf(this.fromTooltipColumn())],origRow:n}]}),this),n=this._toView.entries().map((function(e){var n=e.values[0].value[0];return[e.key,e.values[0].key,{fillColor:n[t.indexOf(this.toColorColumn())]||this.toPinColor(),tooltip:n[t.indexOf(this.toTooltipColumn())],origRow:n}]}),this);return e.concat(n)},e.prototype.linesData=function(){return 0===this.data().length?[]:(this._linesView=this._db.rollupView([this.fromLatitudeColumn(),this.fromLongitudeColumn(),this.toLatitudeColumn(),this.toLongitudeColumn()]),this._linesView.data())},e.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),this.layers([this._lines,this._pins])},e.prototype.update=function(e,n){t.prototype.update.call(this,e,n),this._pins.data(this.pinsData()),this._lines.data(this.linesData()),this.autoScale()&&this._prevChecksum!==this._db.checksum()&&(this._prevChecksum=this._db.checksum(),this.zoomTo(this._pins.pinsData().map((function(t){return[t.lat,t.long]}))))},e.prototype.exit=function(e,n){t.prototype.exit.call(this,e,n)},e.prototype.click=function(t,e,n){console.log("Click: "+JSON.stringify(t)+", "+e+","+n)},e.prototype.dblclick=function(t,e,n){console.log("Double click: "+JSON.stringify(t)+", "+e+","+n)},e}(hr);mr.prototype._class+=" map_GMapPinLine",mr.prototype.publish("autoScale",!1,"boolean","Auto scale to data"),mr.prototype.publish("fromPinColor","green","html-color","From Pin Color"),mr.prototype.publish("fromLatitudeColumn",null,"set","From Latitude",(function(){return this.columns()}),{optional:!0}),mr.prototype.publish("fromLongitudeColumn",null,"set","From Longitude",(function(){return this.columns()}),{optional:!0}),mr.prototype.publish("fromColorColumn",null,"set","From Color",(function(){return this.columns()}),{optional:!0}),mr.prototype.publish("fromTooltipColumn",null,"set","From Tooltip",(function(){return this.columns()}),{optional:!0}),mr.prototype.publish("toPinColor","red","html-color","To Pin Color"),mr.prototype.publish("toLatitudeColumn",null,"set","To Latitude",(function(){return this.columns()}),{optional:!0}),mr.prototype.publish("toLongitudeColumn",null,"set","To Longitude",(function(){return this.columns()}),{optional:!0}),mr.prototype.publish("toColorColumn",null,"set","To Color",(function(){return this.columns()}),{optional:!0}),mr.prototype.publish("toTooltipColumn",null,"set","To Tooltip",(function(){return this.columns()}),{optional:!0});yo(".map_Layered .marker{fill:#656565;stroke:none;stroke-width:1px}.map_Layered .dataEdge{stroke:#000;fill:none}");var gr=function(t){function e(){var e=t.call(this)||this;return e.dataEdges=[],e}return h(e,t),e.prototype.importJSON=function(t){var e=dr.prototype.importJSON.apply(this,arguments);if(arguments.length){this.dataEdges=[];var n=null;t.forEach((function(t){n&&this.dataEdges.push({type:"LineString",coordinates:[[n.long,n.lat],[t.long,t.lat]]}),n=t.eol?null:t}),this)}return e},e.prototype.data=function(t){var e=dr.prototype.data.apply(this,arguments);if(arguments.length){this.dataEdges=[];var n=null;t.forEach((function(t){n&&this.dataEdges.push({type:"LineString",coordinates:[[n[1],n[0]],[t[1],t[0]]]}),n=t}),this)}return e},e.prototype.layerEnter=function(t,e,n){dr.prototype.layerEnter.apply(this,arguments),e.append("defs").append("marker").attr("class","marker").attr("id",this._id+"_arrowHead").attr("viewBox","0 0 10 10").attr("refX",10).attr("refY",5).attr("markerWidth",16).attr("markerHeight",16).attr("markerUnits","strokeWidth").attr("orient","auto").append("polyline").attr("points","0,0 10,5 0,10 1,5"),this._edgesTransform=e.append("g")},e.prototype.layerUpdate=function(t){dr.prototype.layerUpdate.apply(this,arguments),this._edgesTransform.style("opacity",this.opacity());var e=this._edgesTransform.selectAll(".dataEdge").data(this.visible()?this.dataEdges:[]);this._edgesPaths=e.enter().append("path").attr("class","dataEdge").attr("marker-end","url(#"+this._id+"_arrowHead)").merge(e).attr("d",t._d3GeoPath),e.exit().remove()},e.prototype.layerZoomed=function(t){dr.prototype.layerZoomed.apply(this,arguments),this._edgesPaths.attr("stroke-width","".concat(.5/t.zoomScale(),"px"))},e}(dr);gr.prototype._class+=" map_Graph";yo(".map_Layered .graticule{fill:none;stroke:#a9a9a9;stroke-linejoin:round;stroke-width:.25px}.map_Layered .graticuleOutline{fill:none;stroke:#000;stroke-linejoin:round;stroke-width:.25px}");var yr=function(t){function n(){var n=t.call(this)||this;return n._dataMap={},n._path=e.select(null),n}return h(n,t),n.prototype.layerEnter=function(t,e,n){wo.prototype.layerEnter.apply(this,arguments),this._graticule=pn(),this._graticulePath=e.append("path").datum(this._graticule).attr("class","graticule").attr("vector-effect","non-scaling-stroke"),this._graticuleOutlinePath=e.append("path").datum(this._graticule.outline).attr("class","graticuleOutline").attr("vector-effect","non-scaling-stroke")},n.prototype.layerUpdate=function(t){if(!this.visible())return this._graticulePath.attr("d",""),this._graticuleOutlinePath.attr("d",""),void delete this._prevProjection;this._prevProjection!==t.projection()&&(this._graticulePath.attr("d",t._d3GeoPath),this._graticuleOutlinePath.attr("d",t._d3GeoPath),this._prevProjection=t.projection()),this._graticulePath.style("stroke",this.meshColor()),this._graticuleOutlinePath.style("stroke",this.meshColor())},n.prototype.layerExit=function(t){delete this._prevProjection},n}(wo);yr.prototype._class+=" map_Graticule",yr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),yr.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),yr.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width");yo(".map_Heat{//pointer-events:none}.map_Heat canvas{pointer-events:none}");var vr=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.layerEnter=function(t,e,n){wo.prototype.layerEnter.apply(this,arguments),this._parentOverlay.style("pointer-events","none"),this._heatTransform=n.style("pointer-events","none").append("div").attr("class",this.classID()).style("width",t.width()+"px").style("height",t.height()+"px"),this.heat=(new a.HeatMap).target(this._heatTransform.node())},e.prototype.layerUpdate=function(t){wo.prototype.layerUpdate.apply(this,arguments),this._heatTransform.style("opacity",this.opacity()).style("width",t.width()+"px").style("height",t.height()+"px"),this.heat.resize(t.size()),this.layerZoomed(t)},e.prototype.layerExit=function(t){delete this._prevProjection,this.heat.target(null),delete this.heat},e.prototype.layerZoomed=function(t){wo.prototype.layerZoomed.apply(this,arguments);var e=this._db.fieldByLabel(this.latColumn()),n=this._db.fieldByLabel(this.longColumn());this.heat.columns(this.columns()).data(this.visible()?this.data().map((function(i){var o=e?i[e.idx]:i[0],r=n?i[n.idx]:i[1],a=t.zoomTranslate(),s=t.project(o,r),l=t.zoomScale();return s[0]*=l,s[1]*=l,[a[0]+s[0],a[1]+s[1],i[4]||.5]})):[]).render()},e}(wo);function br(){}function Lr(t){return t.k}function wr(t){return[t.x,t.y]}function xr(t){return function(){return t}}vr.prototype._class+=" map_Heat",vr.prototype.publish("latColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),vr.prototype.publish("longColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),vr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),br.prototype._palette=e.Palette.rainbow("default"),br.prototype.click=function(t,e,n){console.log("Click: "+JSON.stringify(t)+", "+e+", "+n)};yo(".map_OpenStreet .background{fill:#fff}.map_OpenStreet .graticule{fill:none;stroke:#777;stroke-width:.5px;stroke-opacity:.5}.map_Layered .vector{fill:none;stroke:navy;stroke-linejoin:round}");var kr=4096,Mr=function(t){function n(){var e=t.call(this)||this;return e._zoomLayerID=0,e.autoScaleMode("none"),e}return h(n,t),n.prototype.layerEnter=function(t,e,i){wo.prototype.layerEnter.apply(this,arguments),t.zoomExtent([.1,16384]),this._openStreet=e.append("g"),this._copyright=e.append("text").attr("x",-100).attr("y",-100).style("opacity",.5).text(n._copyrightText),this._copyrightBBox=this._copyright.node().getBBox()},n.prototype.layerUpdate=function(t){this._tile=function(){let t=0,e=0,n=960,i=500,o=!0,r=!0,a=256,s=Lr,l=wr,h=0;function u(){const u=+s.apply(this,arguments),c=l.apply(this,arguments),p=Math.log2(u/a),d=Math.round(Math.max(p+h,0)),f=Math.pow(2,p-d)*a,_=+c[0]-u/2,m=+c[1]-u/2,g=Math.max(o?0:-1/0,Math.floor((t-_)/f)),y=Math.min(o?1<<d:1/0,Math.ceil((n-_)/f)),v=Math.max(r?0:-1/0,Math.floor((e-m)/f)),b=Math.min(r?1<<d:1/0,Math.ceil((i-m)/f)),L=[];for(let t=v;t<b;++t)for(let e=g;e<y;++e)L.push([e,t,d]);return L.translate=[_/f,m/f],L.scale=f,L}return u.size=function(o){return arguments.length?(t=e=0,n=+o[0],i=+o[1],u):[n-t,i-e]},u.extent=function(o){return arguments.length?(t=+o[0][0],e=+o[0][1],n=+o[1][0],i=+o[1][1],u):[[t,e],[n,i]]},u.scale=function(t){return arguments.length?(s="function"==typeof t?t:xr(+t),u):s},u.translate=function(t){return arguments.length?(l="function"==typeof t?t:xr([+t[0],+t[1]]),u):l},u.zoomDelta=function(t){return arguments.length?(h=+t,u):h},u.tileSize=function(t){return arguments.length?(a=+t,u):a},u.clamp=function(t){return arguments.length?(o=r=!!t,u):o&&r},u.clampX=function(t){return arguments.length?(o=!!t,u):o},u.clampY=function(t){return arguments.length?(r=!!t,u):r},u}().size([t.width(),t.height()]).wrap(!1),this.visible()?this._copyright.attr("x",t.width()-this._copyrightBBox.width-this._copyrightBBox.height/2).attr("y",t.height()-this._copyrightBBox.height/2).text(n._copyrightText):this._copyright.text(""),this.layerZoomed(t)},n.prototype.layerZoomed=function(t){var n=t.zoomScale(),i=t.zoomTranslate(),o=this._tile.scale(n*kr).translate(i)(),r=o.scale/n;o.translate[0],o.scale,o.translate[1],o.scale;var a=Math.round(1e3*r);this._prevZoomLevel!==a&&(this._prevZoomLevel=a,this._zoomLayerID++);var s=this._openStreet.selectAll(".scaleG").data([this._zoomLayerID],(function(t){return t})),l=s.enter().append("g").attr("class","scaleG").attr("transform",function(t,e){return"translate(-2048,-2048) scale("+t/256+")"}(r)).each((function(t){console.log(t)})).merge(s);s.exit().style("opacity",1).transition().duration(1e3).style("opacity",0).on("end",(function(t){e.select(this).selectAll(".image").attr("xlink:href",null)})).remove(),l.selectAll(".image").data(o,(function(t){return t.x+","+t.y})).enter().append("image").attr("class","image").style("opacity",0).attr("x",(function(t){return t.tx})).attr("y",(function(t){return t.ty})).attr("width",256).attr("height",256).attr("xlink:href",(function(t){return"http://"+"abc"[t.y%3]+".tile.openstreetmap.org/"+t.z+"/"+t.x+"/"+t.y+".png"})).each((function(t){console.log("http://"+"abc"[t.y%3]+".tile.openstreetmap.org/"+t.z+"/"+t.x+"/"+t.y+".png")})).transition().duration(500).style("opacity",1)},n._copyrightText="© OpenStreetMap contributors",n}(wo);Mr.prototype._class+=" map_OpenStreet",Mr.prototype.publish("tileProvider","OpenStreetMap","set","Tile Provider",["OpenStreetMap","OpenStreetMap Hot","MapQuest","MapQuest Sat","Stamen Watercolor","OpenCycleMap"],{tags:["Basic","Shared"]});var Cr=function(t){function e(){return t.call(this)||this}return h(e,t),e}(bo);function Pr(){Ao.call(this),this.projection("Mercator")}Cr.prototype._class+=" map_TestHeatMap",Pr.prototype=Object.create(Ao.prototype),Pr.prototype.constructor=Pr,Pr.prototype._class+=" map_TopoJSONChoropleth",Pr.prototype.publish("region","GB","set","Region Data",["AT","BE","BG","BR","CHLI","CY","CZ","DE","DK","EE","ES","FI","FR","GB","GE","GR","HR","HU","IE","IS","IT","KS","LT","LU","LV","MD","MK","MT","ND","NL","NO","PL","PT","RO","RS","SE","SI","SK","UA"]),Pr.prototype.layerEnter=function(t,n,i){Ao.prototype.layerEnter.apply(this,arguments),this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);var o=this;this.tooltipHTML((function(t){var e=o.columns(),n=e&&e.length?e[0]:"Location",i=t&&t.length?t[t.length-1]:[""];return o.tooltipFormat({label:i[0],series:n,value:t[1]})}))},Pr.prototype.layerUpdate=function(t){Ao.prototype.layerUpdate.apply(this,arguments);var e=[],n=this;this.data().forEach((function(t){if(isNaN(t[0]))for(var i in n._choroTopologyIndex)for(var o in n._choroTopologyIndex[i])o===t[0]&&n._choroTopologyIndex[i][o].forEach((function(n){e.push([n].concat(t.filter((function(t,e){return e>0}))).concat([t]))}));else e.push(t.concat([t]))})),this.choroPaths=this._choroplethData.selectAll(".data").data(this.visible()?e:[],(function(t){return t[0]})),this.choroPaths.enter().append("path").attr("class","data").call(this._selection.enter.bind(this._selection)).on("click",(function(t){n._dataMap[t[0]]&&n.click(n.rowToObj(n._dataMap[t[0]]),"weight",n._selection.selected(n))})).on("dblclick",(function(t){n._dataMap[t[0]]&&n.dblclick(n.rowToObj(n._dataMap[t[0]]),"weight",n._selection.selected(n))})).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show),this.choroPaths.attr("d",(function(e){var i=t._d3GeoPath(n._choroTopologyFeatures[e[0]]);return i||console.log("Unknown Country: "+e),i})).style("fill",(function(t){return n._palette(t[1],n._dataMinWeight,n._dataMaxWeight)})),this.choroPaths.exit().remove()},Pr.prototype.layerPreRender=function(){if(this._prevRegion!==this.region()&&(this._prevRegion=this.region(),delete this._topoJsonPromise),!this._topoJsonPromise){var t=this;this._topoJsonPromise=new Promise((function(e,n){No("".concat(Do(),"/").concat(t.region(),".json"),(function(n){function i(n){t._choroTopologyIndex=n,e()}t._choroTopology=n,t._choroTopologyObjects=n.objects.PolbndA,t._choroTopologyFeatures=Mo(t._choroTopology,t._choroTopologyObjects).features,No("".concat(Do(),"/").concat(t.region(),"_idx.json"),i).on("error",(function(t){i({})}))}))}))}return this._topoJsonPromise};var Er={exports:{}};!function(t,e){var n;self,n=function(){return(()=>{var t={363:(t,e,n)=>{n.d(e,{Z:()=>m});var i=n(601),o=n.n(i),r=n(609),a=n.n(r),s=n(991),l=n.n(s),h=new URL(n(614),n.b),u=new URL(n(39),n.b),c=new URL(n(856),n.b),p=a()(o()),d=l()(h),f=l()(u),_=l()(c);p.push([t.id,".leaflet-draw-section{position:relative}.leaflet-draw-toolbar{margin-top:12px}.leaflet-draw-toolbar-top{margin-top:0}.leaflet-draw-toolbar-notop a:first-child{border-top-right-radius:0}.leaflet-draw-toolbar-nobottom a:last-child{border-bottom-right-radius:0}.leaflet-draw-toolbar a{background-image:url("+d+");background-image:linear-gradient(transparent,transparent),url("+f+");background-repeat:no-repeat;background-size:300px 30px;background-clip:padding-box}.leaflet-retina .leaflet-draw-toolbar a{background-image:url("+_+");background-image:linear-gradient(transparent,transparent),url("+f+')}\n.leaflet-draw a{display:block;text-align:center;text-decoration:none}.leaflet-draw a .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.leaflet-draw-actions{display:none;list-style:none;margin:0;padding:0;position:absolute;left:26px;top:0;white-space:nowrap}.leaflet-touch .leaflet-draw-actions{left:32px}.leaflet-right .leaflet-draw-actions{right:26px;left:auto}.leaflet-touch .leaflet-right .leaflet-draw-actions{right:32px;left:auto}.leaflet-draw-actions li{display:inline-block}\n.leaflet-draw-actions li:first-child a{border-left:0}.leaflet-draw-actions li:last-child a{-webkit-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.leaflet-right .leaflet-draw-actions li:last-child a{-webkit-border-radius:0;border-radius:0}.leaflet-right .leaflet-draw-actions li:first-child a{-webkit-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.leaflet-draw-actions a{background-color:#919187;border-left:1px solid #AAA;color:#FFF;font:11px/19px "Helvetica Neue",Arial,Helvetica,sans-serif;line-height:28px;text-decoration:none;padding-left:10px;padding-right:10px;height:28px}\n.leaflet-touch .leaflet-draw-actions a{font-size:12px;line-height:30px;height:30px}.leaflet-draw-actions-bottom{margin-top:0}.leaflet-draw-actions-top{margin-top:1px}.leaflet-draw-actions-top a,.leaflet-draw-actions-bottom a{height:27px;line-height:27px}.leaflet-draw-actions a:hover{background-color:#a0a098}.leaflet-draw-actions-top.leaflet-draw-actions-bottom a{height:26px;line-height:26px}.leaflet-draw-toolbar .leaflet-draw-draw-polyline{background-position:-2px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polyline{background-position:0 -1px}\n.leaflet-draw-toolbar .leaflet-draw-draw-polygon{background-position:-31px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polygon{background-position:-29px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-rectangle{background-position:-62px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-rectangle{background-position:-60px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-circle{background-position:-92px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circle{background-position:-90px -1px}\n.leaflet-draw-toolbar .leaflet-draw-draw-marker{background-position:-122px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-marker{background-position:-120px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-circlemarker{background-position:-273px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circlemarker{background-position:-271px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-edit{background-position:-152px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit{background-position:-150px -1px}\n.leaflet-draw-toolbar .leaflet-draw-edit-remove{background-position:-182px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove{background-position:-180px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled{background-position:-212px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled{background-position:-210px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled{background-position:-242px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled{background-position:-240px -2px}\n.leaflet-mouse-marker{background-color:#fff;cursor:crosshair}.leaflet-draw-tooltip{background:#363636;background:rgba(0,0,0,0.5);border:1px solid transparent;-webkit-border-radius:4px;border-radius:4px;color:#fff;font:12px/18px "Helvetica Neue",Arial,Helvetica,sans-serif;margin-left:20px;margin-top:-21px;padding:4px 8px;position:absolute;visibility:hidden;white-space:nowrap;z-index:6}.leaflet-draw-tooltip:before{border-right:6px solid black;border-right-color:rgba(0,0,0,0.5);border-top:6px solid transparent;border-bottom:6px solid transparent;content:"";position:absolute;top:7px;left:-7px}\n.leaflet-error-draw-tooltip{background-color:#f2dede;border:1px solid #e6b6bd;color:#b94a48}.leaflet-error-draw-tooltip:before{border-right-color:#e6b6bd}.leaflet-draw-tooltip-single{margin-top:-12px}.leaflet-draw-tooltip-subtext{color:#f8d5e4}.leaflet-draw-guide-dash{font-size:1%;opacity:.6;position:absolute;width:5px;height:5px}.leaflet-edit-marker-selected{background-color:rgba(254,87,161,0.1);border:4px dashed rgba(254,87,161,0.6);-webkit-border-radius:4px;border-radius:4px;box-sizing:content-box}\n.leaflet-edit-move{cursor:move}.leaflet-edit-resize{cursor:pointer}.leaflet-oldie .leaflet-draw-toolbar{border:1px solid #999}',""]);const m=p},134:(t,e,n)=>{n.d(e,{Z:()=>s});var i=n(601),o=n.n(i),r=n(609),a=n.n(r)()(o());a.push([t.id,'.marker-cluster-small {\n\tbackground-color: rgba(181, 226, 140, 0.6);\n\t}\n.marker-cluster-small div {\n\tbackground-color: rgba(110, 204, 57, 0.6);\n\t}\n\n.marker-cluster-medium {\n\tbackground-color: rgba(241, 211, 87, 0.6);\n\t}\n.marker-cluster-medium div {\n\tbackground-color: rgba(240, 194, 12, 0.6);\n\t}\n\n.marker-cluster-large {\n\tbackground-color: rgba(253, 156, 115, 0.6);\n\t}\n.marker-cluster-large div {\n\tbackground-color: rgba(241, 128, 23, 0.6);\n\t}\n\n\t/* IE 6-8 fallback colors */\n.leaflet-oldie .marker-cluster-small {\n\tbackground-color: rgb(181, 226, 140);\n\t}\n.leaflet-oldie .marker-cluster-small div {\n\tbackground-color: rgb(110, 204, 57);\n\t}\n\n.leaflet-oldie .marker-cluster-medium {\n\tbackground-color: rgb(241, 211, 87);\n\t}\n.leaflet-oldie .marker-cluster-medium div {\n\tbackground-color: rgb(240, 194, 12);\n\t}\n\n.leaflet-oldie .marker-cluster-large {\n\tbackground-color: rgb(253, 156, 115);\n\t}\n.leaflet-oldie .marker-cluster-large div {\n\tbackground-color: rgb(241, 128, 23);\n}\n\n.marker-cluster {\n\tbackground-clip: padding-box;\n\tborder-radius: 20px;\n\t}\n.marker-cluster div {\n\twidth: 30px;\n\theight: 30px;\n\tmargin-left: 5px;\n\tmargin-top: 5px;\n\n\ttext-align: center;\n\tborder-radius: 15px;\n\tfont: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;\n\t}\n.marker-cluster span {\n\tline-height: 30px;\n\t}',""]);const s=a},182:(t,e,n)=>{n.d(e,{Z:()=>s});var i=n(601),o=n.n(i),r=n(609),a=n.n(r)()(o());a.push([t.id,".leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow {\n\t-webkit-transition: -webkit-transform 0.3s ease-out, opacity 0.3s ease-in;\n\t-moz-transition: -moz-transform 0.3s ease-out, opacity 0.3s ease-in;\n\t-o-transition: -o-transform 0.3s ease-out, opacity 0.3s ease-in;\n\ttransition: transform 0.3s ease-out, opacity 0.3s ease-in;\n}\n\n.leaflet-cluster-spider-leg {\n\t/* stroke-dashoffset (duration and function) should match with leaflet-marker-icon transform in order to track it exactly */\n\t-webkit-transition: -webkit-stroke-dashoffset 0.3s ease-out, -webkit-stroke-opacity 0.3s ease-in;\n\t-moz-transition: -moz-stroke-dashoffset 0.3s ease-out, -moz-stroke-opacity 0.3s ease-in;\n\t-o-transition: -o-stroke-dashoffset 0.3s ease-out, -o-stroke-opacity 0.3s ease-in;\n\ttransition: stroke-dashoffset 0.3s ease-out, stroke-opacity 0.3s ease-in;\n}\n",""]);const s=a},138:(t,e,n)=>{n.d(e,{Z:()=>m});var i=n(601),o=n.n(i),r=n(609),a=n.n(r),s=n(991),l=n.n(s),h=new URL(n(212),n.b),u=new URL(n(555),n.b),c=new URL(n(758),n.b),p=a()(o()),d=l()(h),f=l()(u),_=l()(c);p.push([t.id,"/* required styles */\r\n\r\n.leaflet-pane,\r\n.leaflet-tile,\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow,\r\n.leaflet-tile-container,\r\n.leaflet-pane > svg,\r\n.leaflet-pane > canvas,\r\n.leaflet-zoom-box,\r\n.leaflet-image-layer,\r\n.leaflet-layer {\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\t}\r\n.leaflet-container {\r\n\toverflow: hidden;\r\n\t}\r\n.leaflet-tile,\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow {\r\n\t-webkit-user-select: none;\r\n\t -moz-user-select: none;\r\n\t user-select: none;\r\n\t -webkit-user-drag: none;\r\n\t}\r\n/* Prevents IE11 from highlighting tiles in blue */\r\n.leaflet-tile::selection {\r\n\tbackground: transparent;\r\n}\r\n/* Safari renders non-retina tile on retina better with this, but Chrome is worse */\r\n.leaflet-safari .leaflet-tile {\r\n\timage-rendering: -webkit-optimize-contrast;\r\n\t}\r\n/* hack that prevents hw layers \"stretching\" when loading new tiles */\r\n.leaflet-safari .leaflet-tile-container {\r\n\twidth: 1600px;\r\n\theight: 1600px;\r\n\t-webkit-transform-origin: 0 0;\r\n\t}\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow {\r\n\tdisplay: block;\r\n\t}\r\n/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */\r\n/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */\r\n.leaflet-container .leaflet-overlay-pane svg,\r\n.leaflet-container .leaflet-marker-pane img,\r\n.leaflet-container .leaflet-shadow-pane img,\r\n.leaflet-container .leaflet-tile-pane img,\r\n.leaflet-container img.leaflet-image-layer,\r\n.leaflet-container .leaflet-tile {\r\n\tmax-width: none !important;\r\n\tmax-height: none !important;\r\n\t}\r\n\r\n.leaflet-container.leaflet-touch-zoom {\r\n\t-ms-touch-action: pan-x pan-y;\r\n\ttouch-action: pan-x pan-y;\r\n\t}\r\n.leaflet-container.leaflet-touch-drag {\r\n\t-ms-touch-action: pinch-zoom;\r\n\t/* Fallback for FF which doesn't support pinch-zoom */\r\n\ttouch-action: none;\r\n\ttouch-action: pinch-zoom;\r\n}\r\n.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {\r\n\t-ms-touch-action: none;\r\n\ttouch-action: none;\r\n}\r\n.leaflet-container {\r\n\t-webkit-tap-highlight-color: transparent;\r\n}\r\n.leaflet-container a {\r\n\t-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);\r\n}\r\n.leaflet-tile {\r\n\tfilter: inherit;\r\n\tvisibility: hidden;\r\n\t}\r\n.leaflet-tile-loaded {\r\n\tvisibility: inherit;\r\n\t}\r\n.leaflet-zoom-box {\r\n\twidth: 0;\r\n\theight: 0;\r\n\t-moz-box-sizing: border-box;\r\n\t box-sizing: border-box;\r\n\tz-index: 800;\r\n\t}\r\n/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */\r\n.leaflet-overlay-pane svg {\r\n\t-moz-user-select: none;\r\n\t}\r\n\r\n.leaflet-pane { z-index: 400; }\r\n\r\n.leaflet-tile-pane { z-index: 200; }\r\n.leaflet-overlay-pane { z-index: 400; }\r\n.leaflet-shadow-pane { z-index: 500; }\r\n.leaflet-marker-pane { z-index: 600; }\r\n.leaflet-tooltip-pane { z-index: 650; }\r\n.leaflet-popup-pane { z-index: 700; }\r\n\r\n.leaflet-map-pane canvas { z-index: 100; }\r\n.leaflet-map-pane svg { z-index: 200; }\r\n\r\n.leaflet-vml-shape {\r\n\twidth: 1px;\r\n\theight: 1px;\r\n\t}\r\n.lvml {\r\n\tbehavior: url(#default#VML);\r\n\tdisplay: inline-block;\r\n\tposition: absolute;\r\n\t}\r\n\r\n\r\n/* control positioning */\r\n\r\n.leaflet-control {\r\n\tposition: relative;\r\n\tz-index: 800;\r\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\r\n\tpointer-events: auto;\r\n\t}\r\n.leaflet-top,\r\n.leaflet-bottom {\r\n\tposition: absolute;\r\n\tz-index: 1000;\r\n\tpointer-events: none;\r\n\t}\r\n.leaflet-top {\r\n\ttop: 0;\r\n\t}\r\n.leaflet-right {\r\n\tright: 0;\r\n\t}\r\n.leaflet-bottom {\r\n\tbottom: 0;\r\n\t}\r\n.leaflet-left {\r\n\tleft: 0;\r\n\t}\r\n.leaflet-control {\r\n\tfloat: left;\r\n\tclear: both;\r\n\t}\r\n.leaflet-right .leaflet-control {\r\n\tfloat: right;\r\n\t}\r\n.leaflet-top .leaflet-control {\r\n\tmargin-top: 10px;\r\n\t}\r\n.leaflet-bottom .leaflet-control {\r\n\tmargin-bottom: 10px;\r\n\t}\r\n.leaflet-left .leaflet-control {\r\n\tmargin-left: 10px;\r\n\t}\r\n.leaflet-right .leaflet-control {\r\n\tmargin-right: 10px;\r\n\t}\r\n\r\n\r\n/* zoom and fade animations */\r\n\r\n.leaflet-fade-anim .leaflet-tile {\r\n\twill-change: opacity;\r\n\t}\r\n.leaflet-fade-anim .leaflet-popup {\r\n\topacity: 0;\r\n\t-webkit-transition: opacity 0.2s linear;\r\n\t -moz-transition: opacity 0.2s linear;\r\n\t transition: opacity 0.2s linear;\r\n\t}\r\n.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {\r\n\topacity: 1;\r\n\t}\r\n.leaflet-zoom-animated {\r\n\t-webkit-transform-origin: 0 0;\r\n\t -ms-transform-origin: 0 0;\r\n\t transform-origin: 0 0;\r\n\t}\r\n.leaflet-zoom-anim .leaflet-zoom-animated {\r\n\twill-change: transform;\r\n\t}\r\n.leaflet-zoom-anim .leaflet-zoom-animated {\r\n\t-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t transition: transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t}\r\n.leaflet-zoom-anim .leaflet-tile,\r\n.leaflet-pan-anim .leaflet-tile {\r\n\t-webkit-transition: none;\r\n\t -moz-transition: none;\r\n\t transition: none;\r\n\t}\r\n\r\n.leaflet-zoom-anim .leaflet-zoom-hide {\r\n\tvisibility: hidden;\r\n\t}\r\n\r\n\r\n/* cursors */\r\n\r\n.leaflet-interactive {\r\n\tcursor: pointer;\r\n\t}\r\n.leaflet-grab {\r\n\tcursor: -webkit-grab;\r\n\tcursor: -moz-grab;\r\n\tcursor: grab;\r\n\t}\r\n.leaflet-crosshair,\r\n.leaflet-crosshair .leaflet-interactive {\r\n\tcursor: crosshair;\r\n\t}\r\n.leaflet-popup-pane,\r\n.leaflet-control {\r\n\tcursor: auto;\r\n\t}\r\n.leaflet-dragging .leaflet-grab,\r\n.leaflet-dragging .leaflet-grab .leaflet-interactive,\r\n.leaflet-dragging .leaflet-marker-draggable {\r\n\tcursor: move;\r\n\tcursor: -webkit-grabbing;\r\n\tcursor: -moz-grabbing;\r\n\tcursor: grabbing;\r\n\t}\r\n\r\n/* marker & overlays interactivity */\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow,\r\n.leaflet-image-layer,\r\n.leaflet-pane > svg path,\r\n.leaflet-tile-container {\r\n\tpointer-events: none;\r\n\t}\r\n\r\n.leaflet-marker-icon.leaflet-interactive,\r\n.leaflet-image-layer.leaflet-interactive,\r\n.leaflet-pane > svg path.leaflet-interactive,\r\nsvg.leaflet-image-layer.leaflet-interactive path {\r\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\r\n\tpointer-events: auto;\r\n\t}\r\n\r\n/* visual tweaks */\r\n\r\n.leaflet-container {\r\n\tbackground: #ddd;\r\n\toutline: 0;\r\n\t}\r\n.leaflet-container a {\r\n\tcolor: #0078A8;\r\n\t}\r\n.leaflet-container a.leaflet-active {\r\n\toutline: 2px solid orange;\r\n\t}\r\n.leaflet-zoom-box {\r\n\tborder: 2px dotted #38f;\r\n\tbackground: rgba(255,255,255,0.5);\r\n\t}\r\n\r\n\r\n/* general typography */\r\n.leaflet-container {\r\n\tfont: 12px/1.5 \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n\t}\r\n\r\n\r\n/* general toolbar styles */\r\n\r\n.leaflet-bar {\r\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.65);\r\n\tborder-radius: 4px;\r\n\t}\r\n.leaflet-bar a,\r\n.leaflet-bar a:hover {\r\n\tbackground-color: #fff;\r\n\tborder-bottom: 1px solid #ccc;\r\n\twidth: 26px;\r\n\theight: 26px;\r\n\tline-height: 26px;\r\n\tdisplay: block;\r\n\ttext-align: center;\r\n\ttext-decoration: none;\r\n\tcolor: black;\r\n\t}\r\n.leaflet-bar a,\r\n.leaflet-control-layers-toggle {\r\n\tbackground-position: 50% 50%;\r\n\tbackground-repeat: no-repeat;\r\n\tdisplay: block;\r\n\t}\r\n.leaflet-bar a:hover {\r\n\tbackground-color: #f4f4f4;\r\n\t}\r\n.leaflet-bar a:first-child {\r\n\tborder-top-left-radius: 4px;\r\n\tborder-top-right-radius: 4px;\r\n\t}\r\n.leaflet-bar a:last-child {\r\n\tborder-bottom-left-radius: 4px;\r\n\tborder-bottom-right-radius: 4px;\r\n\tborder-bottom: none;\r\n\t}\r\n.leaflet-bar a.leaflet-disabled {\r\n\tcursor: default;\r\n\tbackground-color: #f4f4f4;\r\n\tcolor: #bbb;\r\n\t}\r\n\r\n.leaflet-touch .leaflet-bar a {\r\n\twidth: 30px;\r\n\theight: 30px;\r\n\tline-height: 30px;\r\n\t}\r\n.leaflet-touch .leaflet-bar a:first-child {\r\n\tborder-top-left-radius: 2px;\r\n\tborder-top-right-radius: 2px;\r\n\t}\r\n.leaflet-touch .leaflet-bar a:last-child {\r\n\tborder-bottom-left-radius: 2px;\r\n\tborder-bottom-right-radius: 2px;\r\n\t}\r\n\r\n/* zoom control */\r\n\r\n.leaflet-control-zoom-in,\r\n.leaflet-control-zoom-out {\r\n\tfont: bold 18px 'Lucida Console', Monaco, monospace;\r\n\ttext-indent: 1px;\r\n\t}\r\n\r\n.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {\r\n\tfont-size: 22px;\r\n\t}\r\n\r\n\r\n/* layers control */\r\n\r\n.leaflet-control-layers {\r\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.4);\r\n\tbackground: #fff;\r\n\tborder-radius: 5px;\r\n\t}\r\n.leaflet-control-layers-toggle {\r\n\tbackground-image: url("+d+");\r\n\twidth: 36px;\r\n\theight: 36px;\r\n\t}\r\n.leaflet-retina .leaflet-control-layers-toggle {\r\n\tbackground-image: url("+f+");\r\n\tbackground-size: 26px 26px;\r\n\t}\r\n.leaflet-touch .leaflet-control-layers-toggle {\r\n\twidth: 44px;\r\n\theight: 44px;\r\n\t}\r\n.leaflet-control-layers .leaflet-control-layers-list,\r\n.leaflet-control-layers-expanded .leaflet-control-layers-toggle {\r\n\tdisplay: none;\r\n\t}\r\n.leaflet-control-layers-expanded .leaflet-control-layers-list {\r\n\tdisplay: block;\r\n\tposition: relative;\r\n\t}\r\n.leaflet-control-layers-expanded {\r\n\tpadding: 6px 10px 6px 6px;\r\n\tcolor: #333;\r\n\tbackground: #fff;\r\n\t}\r\n.leaflet-control-layers-scrollbar {\r\n\toverflow-y: scroll;\r\n\toverflow-x: hidden;\r\n\tpadding-right: 5px;\r\n\t}\r\n.leaflet-control-layers-selector {\r\n\tmargin-top: 2px;\r\n\tposition: relative;\r\n\ttop: 1px;\r\n\t}\r\n.leaflet-control-layers label {\r\n\tdisplay: block;\r\n\t}\r\n.leaflet-control-layers-separator {\r\n\theight: 0;\r\n\tborder-top: 1px solid #ddd;\r\n\tmargin: 5px -10px 5px -6px;\r\n\t}\r\n\r\n/* Default icon URLs */\r\n.leaflet-default-icon-path {\r\n\tbackground-image: url("+_+');\r\n\t}\r\n\r\n\r\n/* attribution and scale controls */\r\n\r\n.leaflet-container .leaflet-control-attribution {\r\n\tbackground: #fff;\r\n\tbackground: rgba(255, 255, 255, 0.7);\r\n\tmargin: 0;\r\n\t}\r\n.leaflet-control-attribution,\r\n.leaflet-control-scale-line {\r\n\tpadding: 0 5px;\r\n\tcolor: #333;\r\n\t}\r\n.leaflet-control-attribution a {\r\n\ttext-decoration: none;\r\n\t}\r\n.leaflet-control-attribution a:hover {\r\n\ttext-decoration: underline;\r\n\t}\r\n.leaflet-container .leaflet-control-attribution,\r\n.leaflet-container .leaflet-control-scale {\r\n\tfont-size: 11px;\r\n\t}\r\n.leaflet-left .leaflet-control-scale {\r\n\tmargin-left: 5px;\r\n\t}\r\n.leaflet-bottom .leaflet-control-scale {\r\n\tmargin-bottom: 5px;\r\n\t}\r\n.leaflet-control-scale-line {\r\n\tborder: 2px solid #777;\r\n\tborder-top: none;\r\n\tline-height: 1.1;\r\n\tpadding: 2px 5px 1px;\r\n\tfont-size: 11px;\r\n\twhite-space: nowrap;\r\n\toverflow: hidden;\r\n\t-moz-box-sizing: border-box;\r\n\t box-sizing: border-box;\r\n\r\n\tbackground: #fff;\r\n\tbackground: rgba(255, 255, 255, 0.5);\r\n\t}\r\n.leaflet-control-scale-line:not(:first-child) {\r\n\tborder-top: 2px solid #777;\r\n\tborder-bottom: none;\r\n\tmargin-top: -2px;\r\n\t}\r\n.leaflet-control-scale-line:not(:first-child):not(:last-child) {\r\n\tborder-bottom: 2px solid #777;\r\n\t}\r\n\r\n.leaflet-touch .leaflet-control-attribution,\r\n.leaflet-touch .leaflet-control-layers,\r\n.leaflet-touch .leaflet-bar {\r\n\tbox-shadow: none;\r\n\t}\r\n.leaflet-touch .leaflet-control-layers,\r\n.leaflet-touch .leaflet-bar {\r\n\tborder: 2px solid rgba(0,0,0,0.2);\r\n\tbackground-clip: padding-box;\r\n\t}\r\n\r\n\r\n/* popup */\r\n\r\n.leaflet-popup {\r\n\tposition: absolute;\r\n\ttext-align: center;\r\n\tmargin-bottom: 20px;\r\n\t}\r\n.leaflet-popup-content-wrapper {\r\n\tpadding: 1px;\r\n\ttext-align: left;\r\n\tborder-radius: 12px;\r\n\t}\r\n.leaflet-popup-content {\r\n\tmargin: 13px 19px;\r\n\tline-height: 1.4;\r\n\t}\r\n.leaflet-popup-content p {\r\n\tmargin: 18px 0;\r\n\t}\r\n.leaflet-popup-tip-container {\r\n\twidth: 40px;\r\n\theight: 20px;\r\n\tposition: absolute;\r\n\tleft: 50%;\r\n\tmargin-left: -20px;\r\n\toverflow: hidden;\r\n\tpointer-events: none;\r\n\t}\r\n.leaflet-popup-tip {\r\n\twidth: 17px;\r\n\theight: 17px;\r\n\tpadding: 1px;\r\n\r\n\tmargin: -10px auto 0;\r\n\r\n\t-webkit-transform: rotate(45deg);\r\n\t -moz-transform: rotate(45deg);\r\n\t -ms-transform: rotate(45deg);\r\n\t transform: rotate(45deg);\r\n\t}\r\n.leaflet-popup-content-wrapper,\r\n.leaflet-popup-tip {\r\n\tbackground: white;\r\n\tcolor: #333;\r\n\tbox-shadow: 0 3px 14px rgba(0,0,0,0.4);\r\n\t}\r\n.leaflet-container a.leaflet-popup-close-button {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tpadding: 4px 4px 0 0;\r\n\tborder: none;\r\n\ttext-align: center;\r\n\twidth: 18px;\r\n\theight: 14px;\r\n\tfont: 16px/14px Tahoma, Verdana, sans-serif;\r\n\tcolor: #c3c3c3;\r\n\ttext-decoration: none;\r\n\tfont-weight: bold;\r\n\tbackground: transparent;\r\n\t}\r\n.leaflet-container a.leaflet-popup-close-button:hover {\r\n\tcolor: #999;\r\n\t}\r\n.leaflet-popup-scrolled {\r\n\toverflow: auto;\r\n\tborder-bottom: 1px solid #ddd;\r\n\tborder-top: 1px solid #ddd;\r\n\t}\r\n\r\n.leaflet-oldie .leaflet-popup-content-wrapper {\r\n\t-ms-zoom: 1;\r\n\t}\r\n.leaflet-oldie .leaflet-popup-tip {\r\n\twidth: 24px;\r\n\tmargin: 0 auto;\r\n\r\n\t-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";\r\n\tfilter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);\r\n\t}\r\n.leaflet-oldie .leaflet-popup-tip-container {\r\n\tmargin-top: -1px;\r\n\t}\r\n\r\n.leaflet-oldie .leaflet-control-zoom,\r\n.leaflet-oldie .leaflet-control-layers,\r\n.leaflet-oldie .leaflet-popup-content-wrapper,\r\n.leaflet-oldie .leaflet-popup-tip {\r\n\tborder: 1px solid #999;\r\n\t}\r\n\r\n\r\n/* div icon */\r\n\r\n.leaflet-div-icon {\r\n\tbackground: #fff;\r\n\tborder: 1px solid #666;\r\n\t}\r\n\r\n\r\n/* Tooltip */\r\n/* Base styles for the element that has a tooltip */\r\n.leaflet-tooltip {\r\n\tposition: absolute;\r\n\tpadding: 6px;\r\n\tbackground-color: #fff;\r\n\tborder: 1px solid #fff;\r\n\tborder-radius: 3px;\r\n\tcolor: #222;\r\n\twhite-space: nowrap;\r\n\t-webkit-user-select: none;\r\n\t-moz-user-select: none;\r\n\t-ms-user-select: none;\r\n\tuser-select: none;\r\n\tpointer-events: none;\r\n\tbox-shadow: 0 1px 3px rgba(0,0,0,0.4);\r\n\t}\r\n.leaflet-tooltip.leaflet-clickable {\r\n\tcursor: pointer;\r\n\tpointer-events: auto;\r\n\t}\r\n.leaflet-tooltip-top:before,\r\n.leaflet-tooltip-bottom:before,\r\n.leaflet-tooltip-left:before,\r\n.leaflet-tooltip-right:before {\r\n\tposition: absolute;\r\n\tpointer-events: none;\r\n\tborder: 6px solid transparent;\r\n\tbackground: transparent;\r\n\tcontent: "";\r\n\t}\r\n\r\n/* Directions */\r\n\r\n.leaflet-tooltip-bottom {\r\n\tmargin-top: 6px;\r\n}\r\n.leaflet-tooltip-top {\r\n\tmargin-top: -6px;\r\n}\r\n.leaflet-tooltip-bottom:before,\r\n.leaflet-tooltip-top:before {\r\n\tleft: 50%;\r\n\tmargin-left: -6px;\r\n\t}\r\n.leaflet-tooltip-top:before {\r\n\tbottom: 0;\r\n\tmargin-bottom: -12px;\r\n\tborder-top-color: #fff;\r\n\t}\r\n.leaflet-tooltip-bottom:before {\r\n\ttop: 0;\r\n\tmargin-top: -12px;\r\n\tmargin-left: -6px;\r\n\tborder-bottom-color: #fff;\r\n\t}\r\n.leaflet-tooltip-left {\r\n\tmargin-left: -6px;\r\n}\r\n.leaflet-tooltip-right {\r\n\tmargin-left: 6px;\r\n}\r\n.leaflet-tooltip-left:before,\r\n.leaflet-tooltip-right:before {\r\n\ttop: 50%;\r\n\tmargin-top: -6px;\r\n\t}\r\n.leaflet-tooltip-left:before {\r\n\tright: 0;\r\n\tmargin-right: -12px;\r\n\tborder-left-color: #fff;\r\n\t}\r\n.leaflet-tooltip-right:before {\r\n\tleft: 0;\r\n\tmargin-left: -12px;\r\n\tborder-right-color: #fff;\r\n\t}\r\n',""]);const m=p},282:(t,e,n)=>{n.d(e,{Z:()=>s});var i=n(601),o=n.n(i),r=n(609),a=n.n(r)()(o());a.push([t.id,"/*\n Leaflet.BeautifyIcon, a plugin that adds colorful iconic markers for Leaflet by giving full control of style to end user, It has also ability to adjust font awesome\n and glyphicon icons\n (c) 2016-2017, Muhammad Arslan Sajid\n http://leafletjs.com\n*/\n.beautify-marker {\n text-align: center;\n font-weight: 700;\n font-family: monospace;\n position:absolute;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n.beautify-marker.selected > div {\n outline: none;\n border-color: red;\n box-shadow: 0 0 10px red;\n}\n\n.beautify-marker.circle {\n border-radius: 100%;\n}\n\n.beautify-marker.circle-dot, .beautify-marker.doughnut {\n border-radius: 100%;\n}\n\n.beautify-marker.marker {\n border-top-left-radius: 50%;\n border-top-right-radius: 50% 100%;\n border-bottom-left-radius: 100% 50%;\n border-bottom-right-radius: 0%;\n /* rotating 45deg clockwise to get the corner bottom center */\n transform: rotate(45deg); \n \n}\n\n.beautify-marker.marker > * {\n /* rotating 45deg counterclock to adjust marker content back to normal */\n transform: rotate(-45deg);\n}\n",""]);const s=a},958:(t,e,n)=>{n.d(e,{Z:()=>s});var i=n(601),o=n.n(i),r=n(609),a=n.n(r)()(o());a.push([t.id,"g.d3-overlay * {\n pointer-events: visiblePainted;\n}\n",""]);const s=a},609:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",i=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),i&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),i&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,i,o,r){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(i)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var h=0;h<t.length;h++){var u=[].concat(t[h]);i&&a[u[0]]||(void 0!==r&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=r),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),e.push(u))}},e}},991:t=>{t.exports=function(t,e){return e||(e={}),t?(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t):t}},601:t=>{t.exports=function(t){return t[1]}},325:()=>{var t,e;t=window,e=document,L.drawVersion="1.0.4",L.Draw={},L.drawLocal={draw:{toolbar:{actions:{title:"Cancel drawing",text:"Cancel"},finish:{title:"Finish drawing",text:"Finish"},undo:{title:"Delete last point drawn",text:"Delete last point"},buttons:{polyline:"Draw a polyline",polygon:"Draw a polygon",rectangle:"Draw a rectangle",circle:"Draw a circle",marker:"Draw a marker",circlemarker:"Draw a circlemarker"}},handlers:{circle:{tooltip:{start:"Click and drag to draw circle."},radius:"Radius"},circlemarker:{tooltip:{start:"Click map to place circle marker."}},marker:{tooltip:{start:"Click map to place marker."}},polygon:{tooltip:{start:"Click to start drawing shape.",cont:"Click to continue drawing shape.",end:"Click first point to close this shape."}},polyline:{error:"<strong>Error:</strong> shape edges cannot cross!",tooltip:{start:"Click to start drawing line.",cont:"Click to continue drawing line.",end:"Click last point to finish line."}},rectangle:{tooltip:{start:"Click and drag to draw rectangle."}},simpleshape:{tooltip:{end:"Release mouse to finish drawing."}}}},edit:{toolbar:{actions:{save:{title:"Save changes",text:"Save"},cancel:{title:"Cancel editing, discards all changes",text:"Cancel"},clearAll:{title:"Clear all layers",text:"Clear All"}},buttons:{edit:"Edit layers",editDisabled:"No layers to edit",remove:"Delete layers",removeDisabled:"No layers to delete"}},handlers:{edit:{tooltip:{text:"Drag handles or markers to edit features.",subtext:"Click cancel to undo changes."}},remove:{tooltip:{text:"Click on a feature to remove."}}}}},L.Draw.Event={},L.Draw.Event.CREATED="draw:created",L.Draw.Event.EDITED="draw:edited",L.Draw.Event.DELETED="draw:deleted",L.Draw.Event.DRAWSTART="draw:drawstart",L.Draw.Event.DRAWSTOP="draw:drawstop",L.Draw.Event.DRAWVERTEX="draw:drawvertex",L.Draw.Event.EDITSTART="draw:editstart",L.Draw.Event.EDITMOVE="draw:editmove",L.Draw.Event.EDITRESIZE="draw:editresize",L.Draw.Event.EDITVERTEX="draw:editvertex",L.Draw.Event.EDITSTOP="draw:editstop",L.Draw.Event.DELETESTART="draw:deletestart",L.Draw.Event.DELETESTOP="draw:deletestop",L.Draw.Event.TOOLBAROPENED="draw:toolbaropened",L.Draw.Event.TOOLBARCLOSED="draw:toolbarclosed",L.Draw.Event.MARKERCONTEXT="draw:markercontext",L.Draw=L.Draw||{},L.Draw.Feature=L.Handler.extend({initialize:function(t,e){this._map=t,this._container=t._container,this._overlayPane=t._panes.overlayPane,this._popupPane=t._panes.popupPane,e&&e.shapeOptions&&(e.shapeOptions=L.Util.extend({},this.options.shapeOptions,e.shapeOptions)),L.setOptions(this,e);var n=L.version.split(".");1===parseInt(n[0],10)&&parseInt(n[1],10)>=2?L.Draw.Feature.include(L.Evented.prototype):L.Draw.Feature.include(L.Mixin.Events)},enable:function(){this._enabled||(L.Handler.prototype.enable.call(this),this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DRAWSTART,{layerType:this.type}))},disable:function(){this._enabled&&(L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DRAWSTOP,{layerType:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(L.DomUtil.disableTextSelection(),t.getContainer().focus(),this._tooltip=new L.Draw.Tooltip(this._map),L.DomEvent.on(this._container,"keyup",this._cancelDrawing,this))},removeHooks:function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,"keyup",this._cancelDrawing,this))},setOptions:function(t){L.setOptions(this,t)},_fireCreatedEvent:function(t){this._map.fire(L.Draw.Event.CREATED,{layer:t,layerType:this.type})},_cancelDrawing:function(t){27===t.keyCode&&(this._map.fire("draw:canceled",{layerType:this.type}),this.disable())}}),L.Draw.Polyline=L.Draw.Feature.extend({statics:{TYPE:"polyline"},Poly:L.Polyline,options:{allowIntersection:!0,repeatMode:!1,drawError:{color:"#b00b00",timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3,factor:1,maxPoints:0},initialize:function(t,e){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this.options.drawError.message=L.drawLocal.draw.handlers.polyline.error,e&&e.drawError&&(e.drawError=L.Util.extend({},this.options.drawError,e.drawError)),this.type=L.Draw.Polyline.TYPE,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new L.Polyline([],this.options.shapeOptions),this._tooltip.updateContent(this._getTooltipText()),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mouseout",this._onMouseOut,this).on("mousemove",this._onMouseMove,this).on("mousedown",this._onMouseDown,this).on("mouseup",this._onMouseUp,this).addTo(this._map),this._map.on("mouseup",this._onMouseUp,this).on("mousemove",this._onMouseMove,this).on("zoomlevelschange",this._onZoomEnd,this).on("touchstart",this._onTouch,this).on("zoomend",this._onZoomEnd,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._clearHideErrorTimeout(),this._cleanUpShape(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,this._map.removeLayer(this._poly),delete this._poly,this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseout",this._onMouseOut,this).off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._clearGuides(),this._map.off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this).off("zoomlevelschange",this._onZoomEnd,this).off("zoomend",this._onZoomEnd,this).off("touchstart",this._onTouch,this).off("click",this._onTouch,this)},deleteLastVertex:function(){if(!(this._markers.length<=1)){var t=this._markers.pop(),e=this._poly,n=e.getLatLngs(),i=n.splice(-1,1)[0];this._poly.setLatLngs(n),this._markerGroup.removeLayer(t),e.getLatLngs().length<2&&this._map.removeLayer(e),this._vertexChanged(i,!1)}},addVertex:function(t){this._markers.length>=2&&!this.options.allowIntersection&&this._poly.newLatLngIntersects(t)?this._showErrorTooltip():(this._errorShown&&this._hideErrorTooltip(),this._markers.push(this._createMarker(t)),this._poly.addLatLng(t),2===this._poly.getLatLngs().length&&this._map.addLayer(this._poly),this._vertexChanged(t,!0))},completeShape:function(){this._markers.length<=1||!this._shapeIsValid()||(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_finishShape:function(){var t=this._poly._defaultShape?this._poly._defaultShape():this._poly.getLatLngs(),e=this._poly.newLatLngIntersects(t[t.length-1]);!this.options.allowIntersection&&e||!this._shapeIsValid()?this._showErrorTooltip():(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_shapeIsValid:function(){return!0},_onZoomEnd:function(){null!==this._markers&&this._updateGuide()},_onMouseMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent),n=this._map.layerPointToLatLng(e);this._currentLatLng=n,this._updateTooltip(n),this._updateGuide(e),this._mouseMarker.setLatLng(n),L.DomEvent.preventDefault(t.originalEvent)},_vertexChanged:function(t,e){this._map.fire(L.Draw.Event.DRAWVERTEX,{layers:this._markerGroup}),this._updateFinishHandler(),this._updateRunningMeasure(t,e),this._clearGuides(),this._updateTooltip()},_onMouseDown:function(t){if(!this._clickHandled&&!this._touchHandled&&!this._disableMarkers){this._onMouseMove(t),this._clickHandled=!0,this._disableNewMarkers();var e=t.originalEvent,n=e.clientX,i=e.clientY;this._startPoint.call(this,n,i)}},_startPoint:function(t,e){this._mouseDownOrigin=L.point(t,e)},_onMouseUp:function(t){var e=t.originalEvent,n=e.clientX,i=e.clientY;this._endPoint.call(this,n,i,t),this._clickHandled=null},_endPoint:function(e,n,i){if(this._mouseDownOrigin){var o=L.point(e,n).distanceTo(this._mouseDownOrigin),r=this._calculateFinishDistance(i.latlng);this.options.maxPoints>1&&this.options.maxPoints==this._markers.length+1?(this.addVertex(i.latlng),this._finishShape()):r<10&&L.Browser.touch?this._finishShape():Math.abs(o)<9*(t.devicePixelRatio||1)&&this.addVertex(i.latlng),this._enableNewMarkers()}this._mouseDownOrigin=null},_onTouch:function(t){var e,n,i=t.originalEvent;!i.touches||!i.touches[0]||this._clickHandled||this._touchHandled||this._disableMarkers||(e=i.touches[0].clientX,n=i.touches[0].clientY,this._disableNewMarkers(),this._touchHandled=!0,this._startPoint.call(this,e,n),this._endPoint.call(this,e,n,t),this._touchHandled=null),this._clickHandled=null},_onMouseOut:function(){this._tooltip&&this._tooltip._onMouseOut.call(this._tooltip)},_calculateFinishDistance:function(t){var e;if(this._markers.length>0){var n;if(this.type===L.Draw.Polyline.TYPE)n=this._markers[this._markers.length-1];else{if(this.type!==L.Draw.Polygon.TYPE)return 1/0;n=this._markers[0]}var i=this._map.latLngToContainerPoint(n.getLatLng()),o=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),r=this._map.latLngToContainerPoint(o.getLatLng());e=i.distanceTo(r)}else e=1/0;return e},_updateFinishHandler:function(){var t=this._markers.length;t>1&&this._markers[t-1].on("click",this._finishShape,this),t>2&&this._markers[t-2].off("click",this._finishShape,this)},_createMarker:function(t){var e=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(e),e},_updateGuide:function(t){var e=this._markers?this._markers.length:0;e>0&&(t=t||this._map.latLngToLayerPoint(this._currentLatLng),this._clearGuides(),this._drawGuide(this._map.latLngToLayerPoint(this._markers[e-1].getLatLng()),t))},_updateTooltip:function(t){var e=this._getTooltipText();t&&this._tooltip.updatePosition(t),this._errorShown||this._tooltip.updateContent(e)},_drawGuide:function(t,e){var n,i,o,r=Math.floor(Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))),a=this.options.guidelineDistance,s=this.options.maxGuideLineLength,l=r>s?r-s:a;for(this._guidesContainer||(this._guidesContainer=L.DomUtil.create("div","leaflet-draw-guides",this._overlayPane));l<r;l+=this.options.guidelineDistance)n=l/r,i={x:Math.floor(t.x*(1-n)+n*e.x),y:Math.floor(t.y*(1-n)+n*e.y)},(o=L.DomUtil.create("div","leaflet-draw-guide-dash",this._guidesContainer)).style.backgroundColor=this._errorShown?this.options.drawError.color:this.options.shapeOptions.color,L.DomUtil.setPosition(o,i)},_updateGuideColor:function(t){if(this._guidesContainer)for(var e=0,n=this._guidesContainer.childNodes.length;e<n;e++)this._guidesContainer.childNodes[e].style.backgroundColor=t},_clearGuides:function(){if(this._guidesContainer)for(;this._guidesContainer.firstChild;)this._guidesContainer.removeChild(this._guidesContainer.firstChild)},_getTooltipText:function(){var t,e,n=this.options.showLength;return 0===this._markers.length?t={text:L.drawLocal.draw.handlers.polyline.tooltip.start}:(e=n?this._getMeasurementString():"",t=1===this._markers.length?{text:L.drawLocal.draw.handlers.polyline.tooltip.cont,subtext:e}:{text:L.drawLocal.draw.handlers.polyline.tooltip.end,subtext:e}),t},_updateRunningMeasure:function(t,e){var n,i,o=this._markers.length;1===this._markers.length?this._measurementRunningTotal=0:(n=o-(e?2:1),i=L.GeometryUtil.isVersion07x()?t.distanceTo(this._markers[n].getLatLng())*(this.options.factor||1):this._map.distance(t,this._markers[n].getLatLng())*(this.options.factor||1),this._measurementRunningTotal+=i*(e?1:-1))},_getMeasurementString:function(){var t,e=this._currentLatLng,n=this._markers[this._markers.length-1].getLatLng();return t=L.GeometryUtil.isVersion07x()?n&&e&&e.distanceTo?this._measurementRunningTotal+e.distanceTo(n)*(this.options.factor||1):this._measurementRunningTotal||0:n&&e?this._measurementRunningTotal+this._map.distance(e,n)*(this.options.factor||1):this._measurementRunningTotal||0,L.GeometryUtil.readableDistance(t,this.options.metric,this.options.feet,this.options.nautic,this.options.precision)},_showErrorTooltip:function(){this._errorShown=!0,this._tooltip.showAsError().updateContent({text:this.options.drawError.message}),this._updateGuideColor(this.options.drawError.color),this._poly.setStyle({color:this.options.drawError.color}),this._clearHideErrorTimeout(),this._hideErrorTimeout=setTimeout(L.Util.bind(this._hideErrorTooltip,this),this.options.drawError.timeout)},_hideErrorTooltip:function(){this._errorShown=!1,this._clearHideErrorTimeout(),this._tooltip.removeError().updateContent(this._getTooltipText()),this._updateGuideColor(this.options.shapeOptions.color),this._poly.setStyle({color:this.options.shapeOptions.color})},_clearHideErrorTimeout:function(){this._hideErrorTimeout&&(clearTimeout(this._hideErrorTimeout),this._hideErrorTimeout=null)},_disableNewMarkers:function(){this._disableMarkers=!0},_enableNewMarkers:function(){setTimeout(function(){this._disableMarkers=!1}.bind(this),50)},_cleanUpShape:function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this)},_fireCreatedEvent:function(){var t=new this.Poly(this._poly.getLatLngs(),this.options.shapeOptions);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.Polygon=L.Draw.Polyline.extend({statics:{TYPE:"polygon"},Poly:L.Polygon,options:{showArea:!1,showLength:!1,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},metric:!0,feet:!0,nautic:!1,precision:{}},initialize:function(t,e){L.Draw.Polyline.prototype.initialize.call(this,t,e),this.type=L.Draw.Polygon.TYPE},_updateFinishHandler:function(){var t=this._markers.length;1===t&&this._markers[0].on("click",this._finishShape,this),t>2&&(this._markers[t-1].on("dblclick",this._finishShape,this),t>3&&this._markers[t-2].off("dblclick",this._finishShape,this))},_getTooltipText:function(){var t,e;return 0===this._markers.length?t=L.drawLocal.draw.handlers.polygon.tooltip.start:this._markers.length<3?(t=L.drawLocal.draw.handlers.polygon.tooltip.cont,e=this._getMeasurementString()):(t=L.drawLocal.draw.handlers.polygon.tooltip.end,e=this._getMeasurementString()),{text:t,subtext:e}},_getMeasurementString:function(){var t=this._area,e="";return t||this.options.showLength?(this.options.showLength&&(e=L.Draw.Polyline.prototype._getMeasurementString.call(this)),t&&(e+="<br>"+L.GeometryUtil.readableArea(t,this.options.metric,this.options.precision)),e):null},_shapeIsValid:function(){return this._markers.length>=3},_vertexChanged:function(t,e){var n;!this.options.allowIntersection&&this.options.showArea&&(n=this._poly.getLatLngs(),this._area=L.GeometryUtil.geodesicArea(n)),L.Draw.Polyline.prototype._vertexChanged.call(this,t,e)},_cleanUpShape:function(){var t=this._markers.length;t>0&&(this._markers[0].off("click",this._finishShape,this),t>2&&this._markers[t-1].off("dblclick",this._finishShape,this))}}),L.SimpleShape={},L.Draw.SimpleShape=L.Draw.Feature.extend({options:{repeatMode:!1},initialize:function(t,e){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._mapDraggable=this._map.dragging.enabled(),this._mapDraggable&&this._map.dragging.disable(),this._container.style.cursor="crosshair",this._tooltip.updateContent({text:this._initialLabelText}),this._map.on("mousedown",this._onMouseDown,this).on("mousemove",this._onMouseMove,this).on("touchstart",this._onMouseDown,this).on("touchmove",this._onMouseMove,this),e.addEventListener("touchstart",L.DomEvent.preventDefault,{passive:!1}))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._mapDraggable&&this._map.dragging.enable(),this._container.style.cursor="",this._map.off("mousedown",this._onMouseDown,this).off("mousemove",this._onMouseMove,this).off("touchstart",this._onMouseDown,this).off("touchmove",this._onMouseMove,this),L.DomEvent.off(e,"mouseup",this._onMouseUp,this),L.DomEvent.off(e,"touchend",this._onMouseUp,this),e.removeEventListener("touchstart",L.DomEvent.preventDefault),this._shape&&(this._map.removeLayer(this._shape),delete this._shape)),this._isDrawing=!1},_getTooltipText:function(){return{text:this._endLabelText}},_onMouseDown:function(t){this._isDrawing=!0,this._startLatLng=t.latlng,L.DomEvent.on(e,"mouseup",this._onMouseUp,this).on(e,"touchend",this._onMouseUp,this).preventDefault(t.originalEvent)},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._isDrawing&&(this._tooltip.updateContent(this._getTooltipText()),this._drawShape(e))},_onMouseUp:function(){this._shape&&this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()}}),L.Draw.Rectangle=L.Draw.SimpleShape.extend({statics:{TYPE:"rectangle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showArea:!0,metric:!0},initialize:function(t,e){this.type=L.Draw.Rectangle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.rectangle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},disable:function(){this._enabled&&(this._isCurrentlyTwoClickDrawing=!1,L.Draw.SimpleShape.prototype.disable.call(this))},_onMouseUp:function(t){this._shape||this._isCurrentlyTwoClickDrawing?this._isCurrentlyTwoClickDrawing&&!function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}(t.target,"leaflet-pane")||L.Draw.SimpleShape.prototype._onMouseUp.call(this):this._isCurrentlyTwoClickDrawing=!0},_drawShape:function(t){this._shape?this._shape.setBounds(new L.LatLngBounds(this._startLatLng,t)):(this._shape=new L.Rectangle(new L.LatLngBounds(this._startLatLng,t),this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_getTooltipText:function(){var t,e,n,i=L.Draw.SimpleShape.prototype._getTooltipText.call(this),o=this._shape,r=this.options.showArea;return o&&(t=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),e=L.GeometryUtil.geodesicArea(t),n=r?L.GeometryUtil.readableArea(e,this.options.metric):""),{text:i.text,subtext:n}}}),L.Draw.Marker=L.Draw.Feature.extend({statics:{TYPE:"marker"},options:{icon:new L.Icon.Default,repeatMode:!1,zIndexOffset:2e3},initialize:function(t,e){this.type=L.Draw.Marker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.marker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._tooltip.updateContent({text:this._initialLabelText}),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("click",this._onClick,this).addTo(this._map),this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onTouch,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._map.off("click",this._onClick,this).off("click",this._onTouch,this),this._marker&&(this._marker.off("click",this._onClick,this),this._map.removeLayer(this._marker),delete this._marker),this._mouseMarker.off("click",this._onClick,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mousemove",this._onMouseMove,this))},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._mouseMarker.setLatLng(e),this._marker?(e=this._mouseMarker.getLatLng(),this._marker.setLatLng(e)):(this._marker=this._createMarker(e),this._marker.on("click",this._onClick,this),this._map.on("click",this._onClick,this).addLayer(this._marker))},_createMarker:function(t){return new L.Marker(t,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset})},_onClick:function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_onTouch:function(t){this._onMouseMove(t),this._onClick()},_fireCreatedEvent:function(){var t=new L.Marker.Touch(this._marker.getLatLng(),{icon:this.options.icon});L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.CircleMarker=L.Draw.Marker.extend({statics:{TYPE:"circlemarker"},options:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0,zIndexOffset:2e3},initialize:function(t,e){this.type=L.Draw.CircleMarker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circlemarker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,t,e)},_fireCreatedEvent:function(){var t=new L.CircleMarker(this._marker.getLatLng(),this.options);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)},_createMarker:function(t){return new L.CircleMarker(t,this.options)}}),L.Draw.Circle=L.Draw.SimpleShape.extend({statics:{TYPE:"circle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showRadius:!0,metric:!0,feet:!0,nautic:!1},initialize:function(t,e){this.type=L.Draw.Circle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},_drawShape:function(t){if(L.GeometryUtil.isVersion07x())var e=this._startLatLng.distanceTo(t);else e=this._map.distance(this._startLatLng,t);this._shape?this._shape.setRadius(e):(this._shape=new L.Circle(this._startLatLng,e,this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_onMouseMove:function(t){var e,n=t.latlng,i=this.options.showRadius,o=this.options.metric;if(this._tooltip.updatePosition(n),this._isDrawing){this._drawShape(n),e=this._shape.getRadius().toFixed(1);var r="";i&&(r=L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(e,o,this.options.feet,this.options.nautic)),this._tooltip.updateContent({text:this._endLabelText,subtext:r})}}}),L.Edit=L.Edit||{},L.Edit.Marker=L.Handler.extend({initialize:function(t,e){this._marker=t,L.setOptions(this,e)},addHooks:function(){var t=this._marker;t.dragging.enable(),t.on("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},removeHooks:function(){var t=this._marker;t.dragging.disable(),t.off("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},_onDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_toggleMarkerHighlight:function(){var t=this._marker._icon;t&&(t.style.display="none",L.DomUtil.hasClass(t,"leaflet-edit-marker-selected")?(L.DomUtil.removeClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,-4)):(L.DomUtil.addClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,4)),t.style.display="")},_offsetMarker:function(t,e){var n=parseInt(t.style.marginTop,10)-e,i=parseInt(t.style.marginLeft,10)-e;t.style.marginTop=n+"px",t.style.marginLeft=i+"px"}}),L.Marker.addInitHook((function(){L.Edit.Marker&&(this.editing=new L.Edit.Marker(this),this.options.editable&&this.editing.enable())})),L.Edit=L.Edit||{},L.Edit.Poly=L.Handler.extend({initialize:function(t){this.latlngs=[t._latlngs],t._holes&&(this.latlngs=this.latlngs.concat(t._holes)),this._poly=t,this._poly.on("revert-edited",this._updateLatLngs,this)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._poly._latlngs)?this._poly._latlngs:this._poly._latlngs[0]:this._poly._latlngs},_eachVertexHandler:function(t){for(var e=0;e<this._verticesHandlers.length;e++)t(this._verticesHandlers[e])},addHooks:function(){this._initHandlers(),this._eachVertexHandler((function(t){t.addHooks()}))},removeHooks:function(){this._eachVertexHandler((function(t){t.removeHooks()}))},updateMarkers:function(){this._eachVertexHandler((function(t){t.updateMarkers()}))},_initHandlers:function(){this._verticesHandlers=[];for(var t=0;t<this.latlngs.length;t++)this._verticesHandlers.push(new L.Edit.PolyVerticesEdit(this._poly,this.latlngs[t],this._poly.options.poly))},_updateLatLngs:function(t){this.latlngs=[t.layer._latlngs],t.layer._holes&&(this.latlngs=this.latlngs.concat(t.layer._holes))}}),L.Edit.PolyVerticesEdit=L.Handler.extend({options:{icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),drawError:{color:"#b00b00",timeout:1e3}},initialize:function(t,e,n){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this._poly=t,n&&n.drawError&&(n.drawError=L.Util.extend({},this.options.drawError,n.drawError)),this._latlngs=e,L.setOptions(this,n)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]:this._latlngs},addHooks:function(){var t=this._poly,e=t._path;t instanceof L.Polygon||(t.options.fill=!1,t.options.editing&&(t.options.editing.fill=!1)),e&&t.options.editing&&t.options.editing.className&&(t.options.original.className&&t.options.original.className.split(" ").forEach((function(t){L.DomUtil.removeClass(e,t)})),t.options.editing.className.split(" ").forEach((function(t){L.DomUtil.addClass(e,t)}))),t.setStyle(t.options.editing),this._poly._map&&(this._map=this._poly._map,this._markerGroup||this._initMarkers(),this._poly._map.addLayer(this._markerGroup))},removeHooks:function(){var t=this._poly,e=t._path;e&&t.options.editing&&t.options.editing.className&&(t.options.editing.className.split(" ").forEach((function(t){L.DomUtil.removeClass(e,t)})),t.options.original.className&&t.options.original.className.split(" ").forEach((function(t){L.DomUtil.addClass(e,t)}))),t.setStyle(t.options.original),t._map&&(t._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers)},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._markers=[];var t,e,n,i,o,r,a=this._defaultShape();for(t=0,n=a.length;t<n;t++)(i=this._createMarker(a[t],t)).on("click",this._onMarkerClick,this),i.on("contextmenu",this._onContextMenu,this),this._markers.push(i);for(t=0,e=n-1;t<n;e=t++)(0!==t||L.Polygon&&this._poly instanceof L.Polygon)&&(o=this._markers[e],r=this._markers[t],this._createMiddleMarker(o,r),this._updatePrevNext(o,r))},_createMarker:function(t,e){var n=new L.Marker.Touch(t,{draggable:!0,icon:this.options.icon});return n._origLatLng=t,n._index=e,n.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._fireEdit,this).on("touchmove",this._onTouchMove,this).on("touchend",this._fireEdit,this).on("MSPointerMove",this._onTouchMove,this).on("MSPointerUp",this._fireEdit,this),this._markerGroup.addLayer(n),n},_onMarkerDragStart:function(){this._poly.fire("editstart")},_spliceLatLngs:function(){var t=this._defaultShape(),e=[].splice.apply(t,arguments);return this._poly._convertLatLngs(t,!0),this._poly.redraw(),e},_removeMarker:function(t){var e=t._index;this._markerGroup.removeLayer(t),this._markers.splice(e,1),this._spliceLatLngs(e,1),this._updateIndexes(e,-1),t.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._fireEdit,this).off("touchmove",this._onMarkerDrag,this).off("touchend",this._fireEdit,this).off("click",this._onMarkerClick,this).off("MSPointerMove",this._onTouchMove,this).off("MSPointerUp",this._fireEdit,this)},_fireEdit:function(){this._poly.edited=!0,this._poly.fire("edit"),this._poly._map.fire(L.Draw.Event.EDITVERTEX,{layers:this._markerGroup,poly:this._poly})},_onMarkerDrag:function(t){var e=t.target,n=this._poly,i=L.LatLngUtil.cloneLatLng(e._origLatLng);if(L.extend(e._origLatLng,e._latlng),n.options.poly){var o=n._map._editTooltip;if(!n.options.poly.allowIntersection&&n.intersects()){L.extend(e._origLatLng,i),e.setLatLng(i);var r=n.options.color;n.setStyle({color:this.options.drawError.color}),o&&o.updateContent({text:L.drawLocal.draw.handlers.polyline.error}),setTimeout((function(){n.setStyle({color:r}),o&&o.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext})}),1e3)}}e._middleLeft&&e._middleLeft.setLatLng(this._getMiddleLatLng(e._prev,e)),e._middleRight&&e._middleRight.setLatLng(this._getMiddleLatLng(e,e._next)),this._poly._bounds._southWest=L.latLng(1/0,1/0),this._poly._bounds._northEast=L.latLng(-1/0,-1/0);var a=this._poly.getLatLngs();this._poly._convertLatLngs(a,!0),this._poly.redraw(),this._poly.fire("editdrag")},_onMarkerClick:function(t){var e=L.Polygon&&this._poly instanceof L.Polygon?4:3,n=t.target;this._defaultShape().length<e||(this._removeMarker(n),this._updatePrevNext(n._prev,n._next),n._middleLeft&&this._markerGroup.removeLayer(n._middleLeft),n._middleRight&&this._markerGroup.removeLayer(n._middleRight),n._prev&&n._next?this._createMiddleMarker(n._prev,n._next):n._prev?n._next||(n._prev._middleRight=null):n._next._middleLeft=null,this._fireEdit())},_onContextMenu:function(t){var e=t.target;this._poly,this._poly._map.fire(L.Draw.Event.MARKERCONTEXT,{marker:e,layers:this._markerGroup,poly:this._poly}),L.DomEvent.stopPropagation},_onTouchMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent.touches[0]),n=this._map.layerPointToLatLng(e),i=t.target;L.extend(i._origLatLng,n),i._middleLeft&&i._middleLeft.setLatLng(this._getMiddleLatLng(i._prev,i)),i._middleRight&&i._middleRight.setLatLng(this._getMiddleLatLng(i,i._next)),this._poly.redraw(),this.updateMarkers()},_updateIndexes:function(t,e){this._markerGroup.eachLayer((function(n){n._index>t&&(n._index+=e)}))},_createMiddleMarker:function(t,e){var n,i,o,r=this._getMiddleLatLng(t,e),a=this._createMarker(r);a.setOpacity(.6),t._middleRight=e._middleLeft=a,i=function(){a.off("touchmove",i,this);var o=e._index;a._index=o,a.off("click",n,this).on("click",this._onMarkerClick,this),r.lat=a.getLatLng().lat,r.lng=a.getLatLng().lng,this._spliceLatLngs(o,0,r),this._markers.splice(o,0,a),a.setOpacity(1),this._updateIndexes(o,1),e._index++,this._updatePrevNext(t,a),this._updatePrevNext(a,e),this._poly.fire("editstart")},o=function(){a.off("dragstart",i,this),a.off("dragend",o,this),a.off("touchmove",i,this),this._createMiddleMarker(t,a),this._createMiddleMarker(a,e)},n=function(){i.call(this),o.call(this),this._fireEdit()},a.on("click",n,this).on("dragstart",i,this).on("dragend",o,this).on("touchmove",i,this),this._markerGroup.addLayer(a)},_updatePrevNext:function(t,e){t&&(t._next=e),e&&(e._prev=t)},_getMiddleLatLng:function(t,e){var n=this._poly._map,i=n.project(t.getLatLng()),o=n.project(e.getLatLng());return n.unproject(i._add(o)._divideBy(2))}}),L.Polyline.addInitHook((function(){this.editing||(L.Edit.Poly&&(this.editing=new L.Edit.Poly(this),this.options.editable&&this.editing.enable()),this.on("add",(function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()})),this.on("remove",(function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})))})),L.Edit=L.Edit||{},L.Edit.SimpleShape=L.Handler.extend({options:{moveIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move"}),resizeIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize"}),touchMoveIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move leaflet-touch-icon"}),touchResizeIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize leaflet-touch-icon"})},initialize:function(t,e){L.Browser.touch&&(this.options.moveIcon=this.options.touchMoveIcon,this.options.resizeIcon=this.options.touchResizeIcon),this._shape=t,L.Util.setOptions(this,e)},addHooks:function(){var t=this._shape;this._shape._map&&(this._map=this._shape._map,t.setStyle(t.options.editing),t._map&&(this._map=t._map,this._markerGroup||this._initMarkers(),this._map.addLayer(this._markerGroup)))},removeHooks:function(){var t=this._shape;if(t.setStyle(t.options.original),t._map){this._unbindMarker(this._moveMarker);for(var e=0,n=this._resizeMarkers.length;e<n;e++)this._unbindMarker(this._resizeMarkers[e]);this._resizeMarkers=null,this._map.removeLayer(this._markerGroup),delete this._markerGroup}this._map=null},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._createMoveMarker(),this._createResizeMarker()},_createMoveMarker:function(){},_createResizeMarker:function(){},_createMarker:function(t,e){var n=new L.Marker.Touch(t,{draggable:!0,icon:e,zIndexOffset:10});return this._bindMarker(n),this._markerGroup.addLayer(n),n},_bindMarker:function(t){t.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._onMarkerDragEnd,this).on("touchstart",this._onTouchStart,this).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onTouchEnd,this).on("MSPointerUp",this._onTouchEnd,this)},_unbindMarker:function(t){t.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._onMarkerDragEnd,this).off("touchstart",this._onTouchStart,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onTouchEnd,this).off("MSPointerUp",this._onTouchEnd,this)},_onMarkerDragStart:function(t){t.target.setOpacity(0),this._shape.fire("editstart")},_fireEdit:function(){this._shape.edited=!0,this._shape.fire("edit")},_onMarkerDrag:function(t){var e=t.target,n=e.getLatLng();e===this._moveMarker?this._move(n):this._resize(n),this._shape.redraw(),this._shape.fire("editdrag")},_onMarkerDragEnd:function(t){t.target.setOpacity(1),this._fireEdit()},_onTouchStart:function(t){if(L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,t),"function"==typeof this._getCorners){var e=this._getCorners(),n=t.target,i=n._cornerIndex;n.setOpacity(0),this._oppositeCorner=e[(i+2)%4],this._toggleCornerMarkers(0,i)}this._shape.fire("editstart")},_onTouchMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent.touches[0]),n=this._map.layerPointToLatLng(e);return t.target===this._moveMarker?this._move(n):this._resize(n),this._shape.redraw(),!1},_onTouchEnd:function(t){t.target.setOpacity(1),this.updateMarkers(),this._fireEdit()},_move:function(){},_resize:function(){}}),L.Edit=L.Edit||{},L.Edit.Rectangle=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var t=this._shape.getBounds().getCenter();this._moveMarker=this._createMarker(t,this.options.moveIcon)},_createResizeMarker:function(){var t=this._getCorners();this._resizeMarkers=[];for(var e=0,n=t.length;e<n;e++)this._resizeMarkers.push(this._createMarker(t[e],this.options.resizeIcon)),this._resizeMarkers[e]._cornerIndex=e},_onMarkerDragStart:function(t){L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,t);var e=this._getCorners(),n=t.target._cornerIndex;this._oppositeCorner=e[(n+2)%4],this._toggleCornerMarkers(0,n)},_onMarkerDragEnd:function(t){var e,n=t.target;n===this._moveMarker&&(e=this._shape.getBounds().getCenter(),n.setLatLng(e)),this._toggleCornerMarkers(1),this._repositionCornerMarkers(),L.Edit.SimpleShape.prototype._onMarkerDragEnd.call(this,t)},_move:function(t){for(var e,n=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),i=this._shape.getBounds().getCenter(),o=[],r=0,a=n.length;r<a;r++)e=[n[r].lat-i.lat,n[r].lng-i.lng],o.push([t.lat+e[0],t.lng+e[1]]);this._shape.setLatLngs(o),this._repositionCornerMarkers(),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})},_resize:function(t){var e;this._shape.setBounds(L.latLngBounds(t,this._oppositeCorner)),e=this._shape.getBounds(),this._moveMarker.setLatLng(e.getCenter()),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})},_getCorners:function(){var t=this._shape.getBounds();return[t.getNorthWest(),t.getNorthEast(),t.getSouthEast(),t.getSouthWest()]},_toggleCornerMarkers:function(t){for(var e=0,n=this._resizeMarkers.length;e<n;e++)this._resizeMarkers[e].setOpacity(t)},_repositionCornerMarkers:function(){for(var t=this._getCorners(),e=0,n=this._resizeMarkers.length;e<n;e++)this._resizeMarkers[e].setLatLng(t[e])}}),L.Rectangle.addInitHook((function(){L.Edit.Rectangle&&(this.editing=new L.Edit.Rectangle(this),this.options.editable&&this.editing.enable())})),L.Edit=L.Edit||{},L.Edit.CircleMarker=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var t=this._shape.getLatLng();this._moveMarker=this._createMarker(t,this.options.moveIcon)},_createResizeMarker:function(){this._resizeMarkers=[]},_move:function(t){if(this._resizeMarkers.length){var e=this._getResizeMarkerPoint(t);this._resizeMarkers[0].setLatLng(e)}this._shape.setLatLng(t),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})}}),L.CircleMarker.addInitHook((function(){L.Edit.CircleMarker&&(this.editing=new L.Edit.CircleMarker(this),this.options.editable&&this.editing.enable()),this.on("add",(function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()})),this.on("remove",(function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()}))})),L.Edit=L.Edit||{},L.Edit.Circle=L.Edit.CircleMarker.extend({_createResizeMarker:function(){var t=this._shape.getLatLng(),e=this._getResizeMarkerPoint(t);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(e,this.options.resizeIcon))},_getResizeMarkerPoint:function(t){var e=this._shape._radius*Math.cos(Math.PI/4),n=this._map.project(t);return this._map.unproject([n.x+e,n.y-e])},_resize:function(t){var e=this._moveMarker.getLatLng();L.GeometryUtil.isVersion07x()?radius=e.distanceTo(t):radius=this._map.distance(e,t),this._shape.setRadius(radius),this._map.editTooltip&&this._map._editTooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.subtext+"<br />"+L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(radius,!0,this.options.feet,this.options.nautic)}),this._shape.setRadius(radius),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})}}),L.Circle.addInitHook((function(){L.Edit.Circle&&(this.editing=new L.Edit.Circle(this),this.options.editable&&this.editing.enable())})),L.Map.mergeOptions({touchExtend:!0}),L.Map.TouchExtend=L.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane},addHooks:function(){L.DomEvent.on(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.on(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.on(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.on(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.on(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.on(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.on(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.on(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.on(this._container,"touchleave",this._onTouchLeave,this))},removeHooks:function(){L.DomEvent.off(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.off(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.off(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.off(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.off(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.off(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.off(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.off(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.off(this._container,"touchleave",this._onTouchLeave,this))},_touchEvent:function(t,e){var n={};if(void 0!==t.touches){if(!t.touches.length)return;n=t.touches[0]}else{if("touch"!==t.pointerType)return;if(n=t,!this._filterClick(t))return}var i=this._map.mouseEventToContainerPoint(n),o=this._map.mouseEventToLayerPoint(n),r=this._map.layerPointToLatLng(o);this._map.fire(e,{latlng:r,layerPoint:o,containerPoint:i,pageX:n.pageX,pageY:n.pageY,originalEvent:t})},_filterClick:function(t){var e=t.timeStamp||t.originalEvent.timeStamp,n=L.DomEvent._lastClick&&e-L.DomEvent._lastClick;return n&&n>100&&n<500||t.target._simulatedClick&&!t._simulated?(L.DomEvent.stop(t),!1):(L.DomEvent._lastClick=e,!0)},_onTouchStart:function(t){this._map._loaded&&this._touchEvent(t,"touchstart")},_onTouchEnd:function(t){this._map._loaded&&this._touchEvent(t,"touchend")},_onTouchCancel:function(t){if(this._map._loaded){var e="touchcancel";this._detectIE()&&(e="pointercancel"),this._touchEvent(t,e)}},_onTouchLeave:function(t){this._map._loaded&&this._touchEvent(t,"touchleave")},_onTouchMove:function(t){this._map._loaded&&this._touchEvent(t,"touchmove")},_detectIE:function(){var e=t.navigator.userAgent,n=e.indexOf("MSIE ");if(n>0)return parseInt(e.substring(n+5,e.indexOf(".",n)),10);if(e.indexOf("Trident/")>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}var o=e.indexOf("Edge/");return o>0&&parseInt(e.substring(o+5,e.indexOf(".",o)),10)}}),L.Map.addInitHook("addHandler","touchExtend",L.Map.TouchExtend),L.Marker.Touch=L.Marker.extend({_initInteraction:function(){return this.addInteractiveTarget?L.Marker.prototype._initInteraction.apply(this):this._initInteractionLegacy()},_initInteractionLegacy:function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu","touchstart","touchend","touchmove"];this._detectIE?e.concat(["MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"]):e.concat(["touchcancel"]),L.DomUtil.addClass(t,"leaflet-clickable"),L.DomEvent.on(t,"click",this._onMouseClick,this),L.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var n=0;n<e.length;n++)L.DomEvent.on(t,e[n],this._fireMouseEvent,this);L.Handler.MarkerDrag&&(this.dragging=new L.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_detectIE:function(){var e=t.navigator.userAgent,n=e.indexOf("MSIE ");if(n>0)return parseInt(e.substring(n+5,e.indexOf(".",n)),10);if(e.indexOf("Trident/")>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}var o=e.indexOf("Edge/");return o>0&&parseInt(e.substring(o+5,e.indexOf(".",o)),10)}}),L.LatLngUtil={cloneLatLngs:function(t){for(var e=[],n=0,i=t.length;n<i;n++)Array.isArray(t[n])?e.push(L.LatLngUtil.cloneLatLngs(t[n])):e.push(this.cloneLatLng(t[n]));return e},cloneLatLng:function(t){return L.latLng(t.lat,t.lng)}},function(){var t={km:2,ha:2,m:0,mi:2,ac:2,yd:0,ft:0,nm:2};L.GeometryUtil=L.extend(L.GeometryUtil||{},{geodesicArea:function(t){var e,n,i=t.length,o=0,r=Math.PI/180;if(i>2){for(var a=0;a<i;a++)e=t[a],o+=((n=t[(a+1)%i]).lng-e.lng)*r*(2+Math.sin(e.lat*r)+Math.sin(n.lat*r));o=6378137*o*6378137/2}return Math.abs(o)},formattedNumber:function(t,e){var n=parseFloat(t).toFixed(e),i=L.drawLocal.format&&L.drawLocal.format.numeric,o=i&&i.delimiters,r=o&&o.thousands,a=o&&o.decimal;if(r||a){var s=n.split(".");n=r?s[0].replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+r):s[0],a=a||".",s.length>1&&(n=n+a+s[1])}return n},readableArea:function(e,n,i){var o,r;return i=L.Util.extend({},t,i),n?(r=["ha","m"],type=typeof n,"string"===type?r=[n]:"boolean"!==type&&(r=n),o=e>=1e6&&-1!==r.indexOf("km")?L.GeometryUtil.formattedNumber(1e-6*e,i.km)+" km²":e>=1e4&&-1!==r.indexOf("ha")?L.GeometryUtil.formattedNumber(1e-4*e,i.ha)+" ha":L.GeometryUtil.formattedNumber(e,i.m)+" m²"):o=(e/=.836127)>=3097600?L.GeometryUtil.formattedNumber(e/3097600,i.mi)+" mi²":e>=4840?L.GeometryUtil.formattedNumber(e/4840,i.ac)+" acres":L.GeometryUtil.formattedNumber(e,i.yd)+" yd²",o},readableDistance:function(e,n,i,o,r){var a;switch(r=L.Util.extend({},t,r),n?"string"==typeof n?n:"metric":i?"feet":o?"nauticalMile":"yards"){case"metric":a=e>1e3?L.GeometryUtil.formattedNumber(e/1e3,r.km)+" km":L.GeometryUtil.formattedNumber(e,r.m)+" m";break;case"feet":e*=3.28083,a=L.GeometryUtil.formattedNumber(e,r.ft)+" ft";break;case"nauticalMile":e*=.53996,a=L.GeometryUtil.formattedNumber(e/1e3,r.nm)+" nm";break;default:a=(e*=1.09361)>1760?L.GeometryUtil.formattedNumber(e/1760,r.mi)+" miles":L.GeometryUtil.formattedNumber(e,r.yd)+" yd"}return a},isVersion07x:function(){var t=L.version.split(".");return 0===parseInt(t[0],10)&&7===parseInt(t[1],10)}})}(),L.Util.extend(L.LineUtil,{segmentsIntersect:function(t,e,n,i){return this._checkCounterclockwise(t,n,i)!==this._checkCounterclockwise(e,n,i)&&this._checkCounterclockwise(t,e,n)!==this._checkCounterclockwise(t,e,i)},_checkCounterclockwise:function(t,e,n){return(n.y-t.y)*(e.x-t.x)>(e.y-t.y)*(n.x-t.x)}}),L.Polyline.include({intersects:function(){var t,e,n,i=this._getProjectedPoints(),o=i?i.length:0;if(this._tooFewPointsForIntersection())return!1;for(t=o-1;t>=3;t--)if(e=i[t-1],n=i[t],this._lineSegmentsIntersectsRange(e,n,t-2))return!0;return!1},newLatLngIntersects:function(t,e){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(t),e)},newPointIntersects:function(t,e){var n=this._getProjectedPoints(),i=n?n.length:0,o=n?n[i-1]:null,r=i-2;return!this._tooFewPointsForIntersection(1)&&this._lineSegmentsIntersectsRange(o,t,r,e?1:0)},_tooFewPointsForIntersection:function(t){var e=this._getProjectedPoints(),n=e?e.length:0;return!e||(n+=t||0)<=3},_lineSegmentsIntersectsRange:function(t,e,n,i){var o,r,a=this._getProjectedPoints();i=i||0;for(var s=n;s>i;s--)if(o=a[s-1],r=a[s],L.LineUtil.segmentsIntersect(t,e,o,r))return!0;return!1},_getProjectedPoints:function(){if(!this._defaultShape)return this._originalPoints;for(var t=[],e=this._defaultShape(),n=0;n<e.length;n++)t.push(this._map.latLngToLayerPoint(e[n]));return t}}),L.Polygon.include({intersects:function(){var t,e,n,i,o=this._getProjectedPoints();return!this._tooFewPointsForIntersection()&&(!!L.Polyline.prototype.intersects.call(this)||(t=o.length,e=o[0],n=o[t-1],i=t-2,this._lineSegmentsIntersectsRange(n,e,i,1)))}}),L.Control.Draw=L.Control.extend({options:{position:"topleft",draw:{},edit:!1},initialize:function(t){if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");var e;L.Control.prototype.initialize.call(this,t),this._toolbars={},L.DrawToolbar&&this.options.draw&&(e=new L.DrawToolbar(this.options.draw),this._toolbars[L.DrawToolbar.TYPE]=e,this._toolbars[L.DrawToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.EditToolbar&&this.options.edit&&(e=new L.EditToolbar(this.options.edit),this._toolbars[L.EditToolbar.TYPE]=e,this._toolbars[L.EditToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.toolbar=this},onAdd:function(t){var e,n=L.DomUtil.create("div","leaflet-draw"),i=!1;for(var o in this._toolbars)this._toolbars.hasOwnProperty(o)&&(e=this._toolbars[o].addToolbar(t))&&(i||(L.DomUtil.hasClass(e,"leaflet-draw-toolbar-top")||L.DomUtil.addClass(e.childNodes[0],"leaflet-draw-toolbar-top"),i=!0),n.appendChild(e));return n},onRemove:function(){for(var t in this._toolbars)this._toolbars.hasOwnProperty(t)&&this._toolbars[t].removeToolbar()},setDrawingOptions:function(t){for(var e in this._toolbars)this._toolbars[e]instanceof L.DrawToolbar&&this._toolbars[e].setOptions(t)},_toolbarEnabled:function(t){var e=t.target;for(var n in this._toolbars)this._toolbars[n]!==e&&this._toolbars[n].disable()}}),L.Map.mergeOptions({drawControlTooltips:!0,drawControl:!1}),L.Map.addInitHook((function(){this.options.drawControl&&(this.drawControl=new L.Control.Draw,this.addControl(this.drawControl))})),L.Toolbar=L.Class.extend({initialize:function(t){L.setOptions(this,t),this._modes={},this._actionButtons=[],this._activeMode=null;var e=L.version.split(".");1===parseInt(e[0],10)&&parseInt(e[1],10)>=2?L.Toolbar.include(L.Evented.prototype):L.Toolbar.include(L.Mixin.Events)},enabled:function(){return null!==this._activeMode},disable:function(){this.enabled()&&this._activeMode.handler.disable()},addToolbar:function(t){var e,n=L.DomUtil.create("div","leaflet-draw-section"),i=0,o=this._toolbarClass||"",r=this.getModeHandlers(t);for(this._toolbarContainer=L.DomUtil.create("div","leaflet-draw-toolbar leaflet-bar"),this._map=t,e=0;e<r.length;e++)r[e].enabled&&this._initModeHandler(r[e].handler,this._toolbarContainer,i++,o,r[e].title);if(i)return this._lastButtonIndex=--i,this._actionsContainer=L.DomUtil.create("ul","leaflet-draw-actions"),n.appendChild(this._toolbarContainer),n.appendChild(this._actionsContainer),n},removeToolbar:function(){for(var t in this._modes)this._modes.hasOwnProperty(t)&&(this._disposeButton(this._modes[t].button,this._modes[t].handler.enable,this._modes[t].handler),this._modes[t].handler.disable(),this._modes[t].handler.off("enabled",this._handlerActivated,this).off("disabled",this._handlerDeactivated,this));this._modes={};for(var e=0,n=this._actionButtons.length;e<n;e++)this._disposeButton(this._actionButtons[e].button,this._actionButtons[e].callback,this);this._actionButtons=[],this._actionsContainer=null},_initModeHandler:function(t,e,n,i,o){var r=t.type;this._modes[r]={},this._modes[r].handler=t,this._modes[r].button=this._createButton({type:r,title:o,className:i+"-"+r,container:e,callback:this._modes[r].handler.enable,context:this._modes[r].handler}),this._modes[r].buttonIndex=n,this._modes[r].handler.on("enabled",this._handlerActivated,this).on("disabled",this._handlerDeactivated,this)},_detectIOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!t.MSStream},_createButton:function(t){var e=L.DomUtil.create("a",t.className||"",t.container),n=L.DomUtil.create("span","sr-only",t.container);e.href="#",e.appendChild(n),t.title&&(e.title=t.title,n.innerHTML=t.title),t.text&&(e.innerHTML=t.text,n.innerHTML=t.text);var i=this._detectIOS()?"touchstart":"click";return L.DomEvent.on(e,"click",L.DomEvent.stopPropagation).on(e,"mousedown",L.DomEvent.stopPropagation).on(e,"dblclick",L.DomEvent.stopPropagation).on(e,"touchstart",L.DomEvent.stopPropagation).on(e,"click",L.DomEvent.preventDefault).on(e,i,t.callback,t.context),e},_disposeButton:function(t,e){var n=this._detectIOS()?"touchstart":"click";L.DomEvent.off(t,"click",L.DomEvent.stopPropagation).off(t,"mousedown",L.DomEvent.stopPropagation).off(t,"dblclick",L.DomEvent.stopPropagation).off(t,"touchstart",L.DomEvent.stopPropagation).off(t,"click",L.DomEvent.preventDefault).off(t,n,e)},_handlerActivated:function(t){this.disable(),this._activeMode=this._modes[t.handler],L.DomUtil.addClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._showActionsToolbar(),this.fire("enable")},_handlerDeactivated:function(){this._hideActionsToolbar(),L.DomUtil.removeClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._activeMode=null,this.fire("disable")},_createActions:function(t){var e,n,i,o,r=this._actionsContainer,a=this.getActions(t),s=a.length;for(n=0,i=this._actionButtons.length;n<i;n++)this._disposeButton(this._actionButtons[n].button,this._actionButtons[n].callback);for(this._actionButtons=[];r.firstChild;)r.removeChild(r.firstChild);for(var l=0;l<s;l++)"enabled"in a[l]&&!a[l].enabled||(e=L.DomUtil.create("li","",r),o=this._createButton({title:a[l].title,text:a[l].text,container:e,callback:a[l].callback,context:a[l].context}),this._actionButtons.push({button:o,callback:a[l].callback}))},_showActionsToolbar:function(){var t=this._activeMode.buttonIndex,e=this._lastButtonIndex,n=this._activeMode.button.offsetTop-1;this._createActions(this._activeMode.handler),this._actionsContainer.style.top=n+"px",0===t&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-top")),t===e&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-bottom")),this._actionsContainer.style.display="block",this._map.fire(L.Draw.Event.TOOLBAROPENED)},_hideActionsToolbar:function(){this._actionsContainer.style.display="none",L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-top"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-bottom"),this._map.fire(L.Draw.Event.TOOLBARCLOSED)}}),L.Draw=L.Draw||{},L.Draw.Tooltip=L.Class.extend({initialize:function(t){this._map=t,this._popupPane=t._panes.popupPane,this._visible=!1,this._container=t.options.drawControlTooltips?L.DomUtil.create("div","leaflet-draw-tooltip",this._popupPane):null,this._singleLineLabel=!1,this._map.on("mouseout",this._onMouseOut,this)},dispose:function(){this._map.off("mouseout",this._onMouseOut,this),this._container&&(this._popupPane.removeChild(this._container),this._container=null)},updateContent:function(t){return this._container?(t.subtext=t.subtext||"",0!==t.subtext.length||this._singleLineLabel?t.subtext.length>0&&this._singleLineLabel&&(L.DomUtil.removeClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!1):(L.DomUtil.addClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!0),this._container.innerHTML=(t.subtext.length>0?'<span class="leaflet-draw-tooltip-subtext">'+t.subtext+"</span><br />":"")+"<span>"+t.text+"</span>",t.text||t.subtext?(this._visible=!0,this._container.style.visibility="inherit"):(this._visible=!1,this._container.style.visibility="hidden"),this):this},updatePosition:function(t){var e=this._map.latLngToLayerPoint(t),n=this._container;return this._container&&(this._visible&&(n.style.visibility="inherit"),L.DomUtil.setPosition(n,e)),this},showAsError:function(){return this._container&&L.DomUtil.addClass(this._container,"leaflet-error-draw-tooltip"),this},removeError:function(){return this._container&&L.DomUtil.removeClass(this._container,"leaflet-error-draw-tooltip"),this},_onMouseOut:function(){this._container&&(this._container.style.visibility="hidden")}}),L.DrawToolbar=L.Toolbar.extend({statics:{TYPE:"draw"},options:{polyline:{},polygon:{},rectangle:{},circle:{},marker:{},circlemarker:{}},initialize:function(t){for(var e in this.options)this.options.hasOwnProperty(e)&&t[e]&&(t[e]=L.extend({},this.options[e],t[e]));this._toolbarClass="leaflet-draw-draw",L.Toolbar.prototype.initialize.call(this,t)},getModeHandlers:function(t){return[{enabled:this.options.polyline,handler:new L.Draw.Polyline(t,this.options.polyline),title:L.drawLocal.draw.toolbar.buttons.polyline},{enabled:this.options.polygon,handler:new L.Draw.Polygon(t,this.options.polygon),title:L.drawLocal.draw.toolbar.buttons.polygon},{enabled:this.options.rectangle,handler:new L.Draw.Rectangle(t,this.options.rectangle),title:L.drawLocal.draw.toolbar.buttons.rectangle},{enabled:this.options.circle,handler:new L.Draw.Circle(t,this.options.circle),title:L.drawLocal.draw.toolbar.buttons.circle},{enabled:this.options.marker,handler:new L.Draw.Marker(t,this.options.marker),title:L.drawLocal.draw.toolbar.buttons.marker},{enabled:this.options.circlemarker,handler:new L.Draw.CircleMarker(t,this.options.circlemarker),title:L.drawLocal.draw.toolbar.buttons.circlemarker}]},getActions:function(t){return[{enabled:t.completeShape,title:L.drawLocal.draw.toolbar.finish.title,text:L.drawLocal.draw.toolbar.finish.text,callback:t.completeShape,context:t},{enabled:t.deleteLastVertex,title:L.drawLocal.draw.toolbar.undo.title,text:L.drawLocal.draw.toolbar.undo.text,callback:t.deleteLastVertex,context:t},{title:L.drawLocal.draw.toolbar.actions.title,text:L.drawLocal.draw.toolbar.actions.text,callback:this.disable,context:this}]},setOptions:function(t){for(var e in L.setOptions(this,t),this._modes)this._modes.hasOwnProperty(e)&&t.hasOwnProperty(e)&&this._modes[e].handler.setOptions(t[e])}}),L.EditToolbar=L.Toolbar.extend({statics:{TYPE:"edit"},options:{edit:{selectedPathOptions:{dashArray:"10, 10",fill:!0,fillColor:"#fe57a1",fillOpacity:.1,maintainColor:!1}},remove:{},poly:null,featureGroup:null},initialize:function(t){t.edit&&(void 0===t.edit.selectedPathOptions&&(t.edit.selectedPathOptions=this.options.edit.selectedPathOptions),t.edit.selectedPathOptions=L.extend({},this.options.edit.selectedPathOptions,t.edit.selectedPathOptions)),t.remove&&(t.remove=L.extend({},this.options.remove,t.remove)),t.poly&&(t.poly=L.extend({},this.options.poly,t.poly)),this._toolbarClass="leaflet-draw-edit",L.Toolbar.prototype.initialize.call(this,t),this._selectedFeatureCount=0},getModeHandlers:function(t){var e=this.options.featureGroup;return[{enabled:this.options.edit,handler:new L.EditToolbar.Edit(t,{featureGroup:e,selectedPathOptions:this.options.edit.selectedPathOptions,poly:this.options.poly}),title:L.drawLocal.edit.toolbar.buttons.edit},{enabled:this.options.remove,handler:new L.EditToolbar.Delete(t,{featureGroup:e}),title:L.drawLocal.edit.toolbar.buttons.remove}]},getActions:function(t){var e=[{title:L.drawLocal.edit.toolbar.actions.save.title,text:L.drawLocal.edit.toolbar.actions.save.text,callback:this._save,context:this},{title:L.drawLocal.edit.toolbar.actions.cancel.title,text:L.drawLocal.edit.toolbar.actions.cancel.text,callback:this.disable,context:this}];return t.removeAllLayers&&e.push({title:L.drawLocal.edit.toolbar.actions.clearAll.title,text:L.drawLocal.edit.toolbar.actions.clearAll.text,callback:this._clearAllLayers,context:this}),e},addToolbar:function(t){var e=L.Toolbar.prototype.addToolbar.call(this,t);return this._checkDisabled(),this.options.featureGroup.on("layeradd layerremove",this._checkDisabled,this),e},removeToolbar:function(){this.options.featureGroup.off("layeradd layerremove",this._checkDisabled,this),L.Toolbar.prototype.removeToolbar.call(this)},disable:function(){this.enabled()&&(this._activeMode.handler.revertLayers(),L.Toolbar.prototype.disable.call(this))},_save:function(){this._activeMode.handler.save(),this._activeMode&&this._activeMode.handler.disable()},_clearAllLayers:function(){this._activeMode.handler.removeAllLayers(),this._activeMode&&this._activeMode.handler.disable()},_checkDisabled:function(){var t,e=0!==this.options.featureGroup.getLayers().length;this.options.edit&&(t=this._modes[L.EditToolbar.Edit.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.edit:L.drawLocal.edit.toolbar.buttons.editDisabled)),this.options.remove&&(t=this._modes[L.EditToolbar.Delete.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.remove:L.drawLocal.edit.toolbar.buttons.removeDisabled))}}),L.EditToolbar.Edit=L.Handler.extend({statics:{TYPE:"edit"},initialize:function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.setOptions(this,e),this._featureGroup=e.featureGroup,!(this._featureGroup instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this._uneditedLayerProps={},this.type=L.EditToolbar.Edit.TYPE;var n=L.version.split(".");1===parseInt(n[0],10)&&parseInt(n[1],10)>=2?L.EditToolbar.Edit.include(L.Evented.prototype):L.EditToolbar.Edit.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.EDITSTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._featureGroup.on("layeradd",this._enableLayerEdit,this).on("layerremove",this._disableLayerEdit,this))},disable:function(){this._enabled&&(this._featureGroup.off("layeradd",this._enableLayerEdit,this).off("layerremove",this._disableLayerEdit,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.EDITSTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(t.getContainer().focus(),this._featureGroup.eachLayer(this._enableLayerEdit,this),this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}),t._editTooltip=this._tooltip,this._updateTooltip(),this._map.on("mousemove",this._onMouseMove,this).on("touchmove",this._onMouseMove,this).on("MSPointerMove",this._onMouseMove,this).on(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},removeHooks:function(){this._map&&(this._featureGroup.eachLayer(this._disableLayerEdit,this),this._uneditedLayerProps={},this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this).off("touchmove",this._onMouseMove,this).off("MSPointerMove",this._onMouseMove,this).off(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},revertLayers:function(){this._featureGroup.eachLayer((function(t){this._revertLayer(t)}),this)},save:function(){var t=new L.LayerGroup;this._featureGroup.eachLayer((function(e){e.edited&&(t.addLayer(e),e.edited=!1)})),this._map.fire(L.Draw.Event.EDITED,{layers:t})},_backupLayer:function(t){var e=L.Util.stamp(t);this._uneditedLayerProps[e]||(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?this._uneditedLayerProps[e]={latlngs:L.LatLngUtil.cloneLatLngs(t.getLatLngs())}:t instanceof L.Circle?this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng()),radius:t.getRadius()}:(t instanceof L.Marker||t instanceof L.CircleMarker)&&(this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng())}))},_getTooltipText:function(){return{text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}},_updateTooltip:function(){this._tooltip.updateContent(this._getTooltipText())},_revertLayer:function(t){var e=L.Util.stamp(t);t.edited=!1,this._uneditedLayerProps.hasOwnProperty(e)&&(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?t.setLatLngs(this._uneditedLayerProps[e].latlngs):t instanceof L.Circle?(t.setLatLng(this._uneditedLayerProps[e].latlng),t.setRadius(this._uneditedLayerProps[e].radius)):(t instanceof L.Marker||t instanceof L.CircleMarker)&&t.setLatLng(this._uneditedLayerProps[e].latlng),t.fire("revert-edited",{layer:t}))},_enableLayerEdit:function(t){var e,n,i=t.layer||t.target||t;this._backupLayer(i),this.options.poly&&(n=L.Util.extend({},this.options.poly),i.options.poly=n),this.options.selectedPathOptions&&((e=L.Util.extend({},this.options.selectedPathOptions)).maintainColor&&(e.color=i.options.color,e.fillColor=i.options.fillColor),i.options.original=L.extend({},i.options),i.options.editing=e),i instanceof L.Marker?(i.editing&&i.editing.enable(),i.dragging.enable(),i.on("dragend",this._onMarkerDragEnd).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onMarkerDragEnd,this).on("MSPointerUp",this._onMarkerDragEnd,this)):i.editing.enable()},_disableLayerEdit:function(t){var e=t.layer||t.target||t;e.edited=!1,e.editing&&e.editing.disable(),delete e.options.editing,delete e.options.original,this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e):(e.setStyle(e.options.previousOptions),delete e.options.previousOptions)),e instanceof L.Marker?(e.dragging.disable(),e.off("dragend",this._onMarkerDragEnd,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onMarkerDragEnd,this).off("MSPointerUp",this._onMarkerDragEnd,this)):e.editing.disable()},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_onMarkerDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_onTouchMove:function(t){var e=t.originalEvent.changedTouches[0],n=this._map.mouseEventToLayerPoint(e),i=this._map.layerPointToLatLng(n);t.target.setLatLng(i)},_hasAvailableLayers:function(){return 0!==this._featureGroup.getLayers().length}}),L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:"remove"},initialize:function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.Util.setOptions(this,e),this._deletableLayers=this.options.featureGroup,!(this._deletableLayers instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this.type=L.EditToolbar.Delete.TYPE;var n=L.version.split(".");1===parseInt(n[0],10)&&parseInt(n[1],10)>=2?L.EditToolbar.Delete.include(L.Evented.prototype):L.EditToolbar.Delete.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DELETESTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._deletableLayers.on("layeradd",this._enableLayerDelete,this).on("layerremove",this._disableLayerDelete,this))},disable:function(){this._enabled&&(this._deletableLayers.off("layeradd",this._enableLayerDelete,this).off("layerremove",this._disableLayerDelete,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DELETESTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(t.getContainer().focus(),this._deletableLayers.eachLayer(this._enableLayerDelete,this),this._deletedLayers=new L.LayerGroup,this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.remove.tooltip.text}),this._map.on("mousemove",this._onMouseMove,this))},removeHooks:function(){this._map&&(this._deletableLayers.eachLayer(this._disableLayerDelete,this),this._deletedLayers=null,this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this))},revertLayers:function(){this._deletedLayers.eachLayer((function(t){this._deletableLayers.addLayer(t),t.fire("revert-deleted",{layer:t})}),this)},save:function(){this._map.fire(L.Draw.Event.DELETED,{layers:this._deletedLayers})},removeAllLayers:function(){this._deletableLayers.eachLayer((function(t){this._removeLayer({layer:t})}),this),this.save()},_enableLayerDelete:function(t){(t.layer||t.target||t).on("click",this._removeLayer,this)},_disableLayerDelete:function(t){var e=t.layer||t.target||t;e.off("click",this._removeLayer,this),this._deletedLayers.removeLayer(e)},_removeLayer:function(t){var e=t.layer||t.target||t;this._deletableLayers.removeLayer(e),this._deletedLayers.addLayer(e),e.fire("deleted")},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_hasAvailableLayers:function(){return 0!==this._deletableLayers.getLayers().length}})},290:function(t,e){!function(t){var e=L.GridLayer.extend({options:{minZoom:0,maxZoom:23,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",opacity:1,continuousWorld:!1,noWrap:!1,type:"roadmap",maxNativeZoom:21},initialize:function(t){L.GridLayer.prototype.initialize.call(this,t),this._ready=!!window.google&&!!window.google.maps&&!!window.google.maps.Map,this._GAPIPromise=this._ready?Promise.resolve(window.google):new Promise((function(t,e){var n=0,i=null;i=setInterval((function(){return n>=10?(clearInterval(i),e(new Error("window.google not found after 10 attempts"))):window.google&&window.google.maps&&window.google.maps.Map?(clearInterval(i),t(window.google)):void n++}),500)})),this._tileCallbacks={},this._freshTiles={},this._imagesPerTile="hybrid"===this.options.type?2:1},onAdd:function(t){L.GridLayer.prototype.onAdd.call(this,t),this._initMutantContainer(),this._GAPIPromise.then(function(){if(this._ready=!0,this._map=t,this._initMutant(),t.on("viewreset",this._reset,this),t.on("move",this._update,this),t.on("zoomend",this._handleZoomAnim,this),t.on("resize",this._resize,this),google.maps.event.addListenerOnce(this._mutant,"idle",function(){this._checkZoomLevels(),this._mutantIsReady=!0}.bind(this)),t._controlCorners.bottomright.style.marginBottom="20px",t._controlCorners.bottomleft.style.marginBottom="20px",this._reset(),this._update(),this._subLayers)for(var e in this._subLayers)this._subLayers[e].setMap(this._mutant)}.bind(this))},onRemove:function(t){L.GridLayer.prototype.onRemove.call(this,t),t._container.removeChild(this._mutantContainer),this._mutantContainer=void 0,google.maps.event.clearListeners(t,"idle"),google.maps.event.clearListeners(this._mutant,"idle"),t.off("viewreset",this._reset,this),t.off("move",this._update,this),t.off("zoomend",this._handleZoomAnim,this),t.off("resize",this._resize,this),t._controlCorners&&(t._controlCorners.bottomright.style.marginBottom="0em",t._controlCorners.bottomleft.style.marginBottom="0em")},getAttribution:function(){return this.options.attribution},setOpacity:function(t){this.options.opacity=t,t<1&&L.DomUtil.setOpacity(this._mutantContainer,t)},setElementSize:function(t,e){t.style.width=e.x+"px",t.style.height=e.y+"px"},addGoogleLayer:function(t,e){return this._subLayers||(this._subLayers={}),this._GAPIPromise.then(function(){var n=new(0,google.maps[t])(e);return n.setMap(this._mutant),this._subLayers[t]=n,n}.bind(this))},removeGoogleLayer:function(t){var e=this._subLayers&&this._subLayers[t];e&&(e.setMap(null),delete this._subLayers[t])},_initMutantContainer:function(){this._mutantContainer||(this._mutantContainer=L.DomUtil.create("div","leaflet-google-mutant leaflet-top leaflet-left"),this._mutantContainer.id="_MutantContainer_"+L.Util.stamp(this._mutantContainer),this._mutantContainer.style.zIndex="800",this._mutantContainer.style.pointerEvents="none",this._map.getContainer().appendChild(this._mutantContainer)),this.setOpacity(this.options.opacity),this.setElementSize(this._mutantContainer,this._map.getSize()),this._attachObserver(this._mutantContainer)},_initMutant:function(){if(this._ready&&this._mutantContainer){this._mutantCenter=new google.maps.LatLng(0,0);var t=new google.maps.Map(this._mutantContainer,{center:this._mutantCenter,zoom:0,tilt:0,mapTypeId:this.options.type,disableDefaultUI:!0,keyboardShortcuts:!1,draggable:!1,disableDoubleClickZoom:!0,scrollwheel:!1,streetViewControl:!1,styles:this.options.styles||{},backgroundColor:"transparent"});this._mutant=t,google.maps.event.addListenerOnce(t,"idle",function(){for(var t=this._mutantContainer.querySelectorAll("a"),e=0;e<t.length;e++)t[e].style.pointerEvents="auto"}.bind(this)),this.fire("spawned",{mapObject:t})}},_attachObserver:function(t){new MutationObserver(this._onMutations.bind(this)).observe(t,{childList:!0,subtree:!0})},_onMutations:function(t){for(var e=0;e<t.length;++e)for(var n=t[e],i=0;i<n.addedNodes.length;++i){var o=n.addedNodes[i];o instanceof HTMLImageElement?this._onMutatedImage(o):o instanceof HTMLElement&&Array.prototype.forEach.call(o.querySelectorAll("img"),this._onMutatedImage.bind(this))}},_roadRegexp:/!1i(\d+)!2i(\d+)!3i(\d+)!/,_satRegexp:/x=(\d+)&y=(\d+)&z=(\d+)/,_staticRegExp:/StaticMapService\.GetMapImage/,_onMutatedImage:function(t){var e,n=t.src.match(this._roadRegexp),i=0;if(n?(e={z:n[1],x:n[2],y:n[3]},this._imagesPerTile>1&&(t.style.zIndex=1,i=1)):((n=t.src.match(this._satRegexp))&&(e={x:n[1],y:n[2],z:n[3]}),i=0),e){var o=this._tileCoordsToKey(e);t.style.position="absolute",t.style.visibility="hidden";var r=o+"/"+i;if(this._freshTiles[r]=t,r in this._tileCallbacks&&this._tileCallbacks[r])this._tileCallbacks[r].pop()(t),this._tileCallbacks[r].length||delete this._tileCallbacks[r];else if(this._tiles[o]){var a=this._tiles[o].el,s=0===i?a.firstChild:a.firstChild.nextSibling,l=this._clone(t);a.replaceChild(l,s)}}else t.src.match(this._staticRegExp)&&(t.style.visibility="hidden")},createTile:function(t,e){var n=this._tileCoordsToKey(t),i=L.DomUtil.create("div");i.dataset.pending=this._imagesPerTile,e=e.bind(this,null,i);for(var o=0;o<this._imagesPerTile;o++){var r=n+"/"+o;if(r in this._freshTiles){var a=this._freshTiles[r];i.appendChild(this._clone(a)),i.dataset.pending--}else this._tileCallbacks[r]=this._tileCallbacks[r]||[],this._tileCallbacks[r].push(function(t){return function(n){t.appendChild(this._clone(n)),t.dataset.pending--,parseInt(t.dataset.pending)||e()}.bind(this)}.bind(this)(i))}return parseInt(i.dataset.pending)||L.Util.requestAnimFrame(e),i},_clone:function(t){var e=t.cloneNode(!0);return e.style.visibility="visible",e},_checkZoomLevels:function(){var t=this._map.getZoom(),e=this._mutant.getZoom();t&&e&&(e!==t||e>this.options.maxNativeZoom)&&this._setMaxNativeZoom(e)},_setMaxNativeZoom:function(t){t!=this.options.maxNativeZoom&&(this.options.maxNativeZoom=t,this._resetView())},_reset:function(){this._initContainer()},_update:function(){if(this._mutant){var t=this._map.getCenter(),e=new google.maps.LatLng(t.lat,t.lng);this._mutant.setCenter(e);var n=this._map.getZoom(),i=n!==Math.round(n),o=this._mutant.getZoom();i||n==o||(this._mutant.setZoom(n),this._mutantIsReady&&this._checkZoomLevels())}L.GridLayer.prototype._update.call(this)},_resize:function(){var t=this._map.getSize();this._mutantContainer.style.width===t.x&&this._mutantContainer.style.height===t.y||(this.setElementSize(this._mutantContainer,t),this._mutant&&google.maps.event.trigger(this._mutant,"resize"))},_handleZoomAnim:function(){if(this._mutant){var t=this._map.getCenter(),e=new google.maps.LatLng(t.lat,t.lng);this._mutant.setCenter(e),this._mutant.setZoom(Math.round(this._map.getZoom()))}},_removeTile:function(t){if(this._mutant)return setTimeout(this._pruneTile.bind(this,t),1e3),L.GridLayer.prototype._removeTile.call(this,t)},_pruneTile:function(t){for(var e=this._mutant.getZoom(),n=t.split(":")[2],i=this._mutant.getBounds(),o=i.getSouthWest(),r=i.getNorthEast(),a=L.latLngBounds([[o.lat(),o.lng()],[r.lat(),r.lng()]]),s=0;s<this._imagesPerTile;s++){var l=t+"/"+s;if(l in this._freshTiles){var h=this._map&&this._keyToBounds(t);this._map&&h.overlaps(a)&&n==e||delete this._freshTiles[l]}}}});t.GoogleMutant=e}(e)},298:function(t,e){!function(t){var e=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnEveryZoom:!1,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyShapePositions:null,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var e=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,e?this._withAnimation:this._noAnimation),this._markerCluster=e?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(t){if(t instanceof L.LayerGroup)return this.addLayers([t]);if(!t.getLatLng)return this._nonPointGroup.addLayer(t),this.fire("layeradd",{layer:t}),this;if(!this._map)return this._needsClustering.push(t),this.fire("layeradd",{layer:t}),this;if(this.hasLayer(t))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(t,this._maxZoom),this.fire("layeradd",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var e=t,n=this._zoom;if(t.__parent)for(;e.__parent._zoom>=n;)e=e.__parent;return this._currentShownBounds.contains(e.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(t,e):this._animationAddLayerNonAnimated(t,e)),this},removeLayer:function(t){return t instanceof L.LayerGroup?this.removeLayers([t]):t.getLatLng?this._map?t.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(t)),this._removeLayer(t,!0),this.fire("layerremove",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),t.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(t)&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,t)&&this.hasLayer(t)&&this._needsRemoving.push({layer:t,latlng:t._latlng}),this.fire("layerremove",{layer:t}),this):(this._nonPointGroup.removeLayer(t),this.fire("layerremove",{layer:t}),this)},addLayers:function(t,e){if(!L.Util.isArray(t))return this.addLayer(t);var n,i=this._featureGroup,o=this._nonPointGroup,r=this.options.chunkedLoading,a=this.options.chunkInterval,s=this.options.chunkProgress,l=t.length,h=0,u=!0;if(this._map){var c=(new Date).getTime(),p=L.bind((function(){var d=(new Date).getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();h<l&&!(r&&h%200==0&&(new Date).getTime()-d>a);h++)if((n=t[h])instanceof L.LayerGroup)u&&(t=t.slice(),u=!1),this._extractNonGroupLayers(n,t),l=t.length;else if(n.getLatLng){if(!this.hasLayer(n)&&(this._addLayer(n,this._maxZoom),e||this.fire("layeradd",{layer:n}),n.__parent&&2===n.__parent.getChildCount())){var f=n.__parent.getAllChildMarkers(),_=f[0]===n?f[1]:f[0];i.removeLayer(_)}}else o.addLayer(n),e||this.fire("layeradd",{layer:n});s&&s(h,l,(new Date).getTime()-c),h===l?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(p,this.options.chunkDelay)}),this);p()}else for(var d=this._needsClustering;h<l;h++)(n=t[h])instanceof L.LayerGroup?(u&&(t=t.slice(),u=!1),this._extractNonGroupLayers(n,t),l=t.length):n.getLatLng?this.hasLayer(n)||d.push(n):o.addLayer(n);return this},removeLayers:function(t){var e,n,i=t.length,o=this._featureGroup,r=this._nonPointGroup,a=!0;if(!this._map){for(e=0;e<i;e++)(n=t[e])instanceof L.LayerGroup?(a&&(t=t.slice(),a=!1),this._extractNonGroupLayers(n,t),i=t.length):(this._arraySplice(this._needsClustering,n),r.removeLayer(n),this.hasLayer(n)&&this._needsRemoving.push({layer:n,latlng:n._latlng}),this.fire("layerremove",{layer:n}));return this}if(this._unspiderfy){this._unspiderfy();var s=t.slice(),l=i;for(e=0;e<l;e++)(n=s[e])instanceof L.LayerGroup?(this._extractNonGroupLayers(n,s),l=s.length):this._unspiderfyLayer(n)}for(e=0;e<i;e++)(n=t[e])instanceof L.LayerGroup?(a&&(t=t.slice(),a=!1),this._extractNonGroupLayers(n,t),i=t.length):n.__parent?(this._removeLayer(n,!0,!0),this.fire("layerremove",{layer:n}),o.hasLayer(n)&&(o.removeLayer(n),n.clusterShow&&n.clusterShow())):(r.removeLayer(n),this.fire("layerremove",{layer:n}));return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer((function(t){t.off(this._childMarkerEventHandlers,this),delete t.__parent}),this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var t=new L.LatLngBounds;this._topClusterLevel&&t.extend(this._topClusterLevel._bounds);for(var e=this._needsClustering.length-1;e>=0;e--)t.extend(this._needsClustering[e].getLatLng());return t.extend(this._nonPointGroup.getBounds()),t},eachLayer:function(t,e){var n,i,o,r=this._needsClustering.slice(),a=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(r),i=r.length-1;i>=0;i--){for(n=!0,o=a.length-1;o>=0;o--)if(a[o].layer===r[i]){n=!1;break}n&&t.call(e,r[i])}this._nonPointGroup.eachLayer(t,e)},getLayers:function(){var t=[];return this.eachLayer((function(e){t.push(e)})),t},getLayer:function(t){var e=null;return t=parseInt(t,10),this.eachLayer((function(n){L.stamp(n)===t&&(e=n)})),e},hasLayer:function(t){if(!t)return!1;var e,n=this._needsClustering;for(e=n.length-1;e>=0;e--)if(n[e]===t)return!0;for(e=(n=this._needsRemoving).length-1;e>=0;e--)if(n[e].layer===t)return!1;return!(!t.__parent||t.__parent._group!==this)||this._nonPointGroup.hasLayer(t)},zoomToShowLayer:function(t,e){var n=this._map;"function"!=typeof e&&(e=function(){});var i=function(){!n.hasLayer(t)&&!n.hasLayer(t.__parent)||this._inZoomAnimation||(this._map.off("moveend",i,this),this.off("animationend",i,this),n.hasLayer(t)?e():t.__parent._icon&&(this.once("spiderfied",e,this),t.__parent.spiderfy()))};t._icon&&this._map.getBounds().contains(t.getLatLng())?e():t.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",i,this),this._map.panTo(t.getLatLng())):(this._map.on("moveend",i,this),this.on("animationend",i,this),t.__parent.zoomToBounds())},onAdd:function(t){var e,n,i;if(this._map=t,!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(t),this._nonPointGroup.addTo(t),this._gridClusters||this._generateInitialClusters(),this._maxLat=t.options.crs.projection.MAX_LATITUDE,e=0,n=this._needsRemoving.length;e<n;e++)(i=this._needsRemoving[e]).newlatlng=i.layer._latlng,i.layer._latlng=i.latlng;for(e=0,n=this._needsRemoving.length;e<n;e++)i=this._needsRemoving[e],this._removeLayer(i.layer,!0),i.layer._latlng=i.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),n=this._needsClustering,this._needsClustering=[],this.addLayers(n,!0)},onRemove:function(t){t.off("zoomend",this._zoomEnd,this),t.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(t){for(var e=t;e&&!e._icon;)e=e.__parent;return e||null},_arraySplice:function(t,e){for(var n=t.length-1;n>=0;n--)if(t[n]===e)return t.splice(n,1),!0},_removeFromGridUnclustered:function(t,e){for(var n=this._map,i=this._gridUnclustered,o=Math.floor(this._map.getMinZoom());e>=o&&i[e].removeObject(t,n.project(t.getLatLng(),e));e--);},_childMarkerDragStart:function(t){t.target.__dragStart=t.target._latlng},_childMarkerMoved:function(t){if(!this._ignoreMove&&!t.target.__dragStart){var e=t.target._popup&&t.target._popup.isOpen();this._moveChild(t.target,t.oldLatLng,t.latlng),e&&t.target.openPopup()}},_moveChild:function(t,e,n){t._latlng=e,this.removeLayer(t),t._latlng=n,this.addLayer(t)},_childMarkerDragEnd:function(t){var e=t.target.__dragStart;delete t.target.__dragStart,e&&this._moveChild(t.target,e,t.target._latlng)},_removeLayer:function(t,e,n){var i=this._gridClusters,o=this._gridUnclustered,r=this._featureGroup,a=this._map,s=Math.floor(this._map.getMinZoom());e&&this._removeFromGridUnclustered(t,this._maxZoom);var l,h=t.__parent,u=h._markers;for(this._arraySplice(u,t);h&&(h._childCount--,h._boundsNeedUpdate=!0,!(h._zoom<s));)e&&h._childCount<=1?(l=h._markers[0]===t?h._markers[1]:h._markers[0],i[h._zoom].removeObject(h,a.project(h._cLatLng,h._zoom)),o[h._zoom].addObject(l,a.project(l.getLatLng(),h._zoom)),this._arraySplice(h.__parent._childClusters,h),h.__parent._markers.push(l),l.__parent=h.__parent,h._icon&&(r.removeLayer(h),n||r.addLayer(l))):h._iconNeedsUpdate=!0,h=h.__parent;delete t.__parent},_isOrIsParent:function(t,e){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},fire:function(t,e,n){if(e&&e.layer instanceof L.MarkerCluster){if(e.originalEvent&&this._isOrIsParent(e.layer._icon,e.originalEvent.relatedTarget))return;t="cluster"+t}L.FeatureGroup.prototype.fire.call(this,t,e,n)},listens:function(t,e){return L.FeatureGroup.prototype.listens.call(this,t,e)||L.FeatureGroup.prototype.listens.call(this,"cluster"+t,e)},_defaultIconCreateFunction:function(t){var e=t.getChildCount(),n=" marker-cluster-";return n+=e<10?"small":e<100?"medium":"large",new L.DivIcon({html:"<div><span>"+e+"</span></div>",className:"marker-cluster"+n,iconSize:new L.Point(40,40)})},_bindEvents:function(){var t=this._map,e=this.options.spiderfyOnMaxZoom,n=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,o=this.options.spiderfyOnEveryZoom;(e||i||o)&&this.on("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),n&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),t.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(t){var e=t.layer,n=e;if("clusterkeypress"!==t.type||!t.originalEvent||13===t.originalEvent.keyCode){for(;1===n._childClusters.length;)n=n._childClusters[0];n._zoom===this._maxZoom&&n._childCount===e._childCount&&this.options.spiderfyOnMaxZoom?e.spiderfy():this.options.zoomToBoundsOnClick&&e.zoomToBounds(),this.options.spiderfyOnEveryZoom&&e.spiderfy(),t.originalEvent&&13===t.originalEvent.keyCode&&this._map._container.focus()}},_showCoverage:function(t){var e=this._map;this._inZoomAnimation||(this._shownPolygon&&e.removeLayer(this._shownPolygon),t.layer.getChildCount()>2&&t.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(t.layer.getConvexHull(),this.options.polygonOptions),e.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick,i=this.options.spiderfyOnEveryZoom,o=this._map;(t||n||i)&&this.off("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),e&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),o.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var t=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),t),this._currentShownBounds=t}},_generateInitialClusters:function(){var t=Math.ceil(this._map.getMaxZoom()),e=Math.floor(this._map.getMinZoom()),n=this.options.maxClusterRadius,i=n;"function"!=typeof n&&(i=function(){return n}),null!==this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(var o=t;o>=e;o--)this._gridClusters[o]=new L.DistanceGrid(i(o)),this._gridUnclustered[o]=new L.DistanceGrid(i(o));this._topClusterLevel=new this._markerCluster(this,e-1)},_addLayer:function(t,e){var n,i,o=this._gridClusters,r=this._gridUnclustered,a=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(t),t.on(this._childMarkerEventHandlers,this);e>=a;e--){n=this._map.project(t.getLatLng(),e);var s=o[e].getNearObject(n);if(s)return s._addChild(t),void(t.__parent=s);if(s=r[e].getNearObject(n)){var l=s.__parent;l&&this._removeLayer(s,!1);var h=new this._markerCluster(this,e,s,t);o[e].addObject(h,this._map.project(h._cLatLng,e)),s.__parent=h,t.__parent=h;var u=h;for(i=e-1;i>l._zoom;i--)u=new this._markerCluster(this,i,u),o[i].addObject(u,this._map.project(s.getLatLng(),i));return l._addChild(u),void this._removeFromGridUnclustered(s,e)}r[e].addObject(t,n)}this._topClusterLevel._addChild(t),t.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer((function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()}))},_enqueue:function(t){this._queue.push(t),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var t=0;t<this._queue.length;t++)this._queue[t].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var t=Math.round(this._map._zoom);this._processQueue(),this._zoom<t&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,t)):this._zoom>t?(this._animationStart(),this._animationZoomOut(this._zoom,t)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(t){var e=this._maxLat;return void 0!==e&&(t.getNorth()>=e&&(t._northEast.lat=1/0),t.getSouth()<=-e&&(t._southWest.lat=-1/0)),t},_animationAddLayerNonAnimated:function(t,e){if(e===t)this._featureGroup.addLayer(t);else if(2===e._childCount){e._addToMap();var n=e.getAllChildMarkers();this._featureGroup.removeLayer(n[0]),this._featureGroup.removeLayer(n[1])}else e._updateIcon()},_extractNonGroupLayers:function(t,e){var n,i=t.getLayers(),o=0;for(e=e||[];o<i.length;o++)(n=i[o])instanceof L.LayerGroup?this._extractNonGroupLayers(n,e):e.push(n);return e},_overrideMarkerIcon:function(t){return t.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[t]}})}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(t,e){this._animationAddLayerNonAnimated(t,e)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(t,e){var n,i=this._getExpandedVisibleBounds(),o=this._featureGroup,r=Math.floor(this._map.getMinZoom());this._ignoreMove=!0,this._topClusterLevel._recursively(i,t,r,(function(r){var a,s=r._latlng,l=r._markers;for(i.contains(s)||(s=null),r._isSingleParent()&&t+1===e?(o.removeLayer(r),r._recursivelyAddChildrenToMap(null,e,i)):(r.clusterHide(),r._recursivelyAddChildrenToMap(s,e,i)),n=l.length-1;n>=0;n--)a=l[n],i.contains(a._latlng)||o.removeLayer(a)})),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(i,e),o.eachLayer((function(t){t instanceof L.MarkerCluster||!t._icon||t.clusterShow()})),this._topClusterLevel._recursively(i,t,e,(function(t){t._recursivelyRestoreChildPositions(e)})),this._ignoreMove=!1,this._enqueue((function(){this._topClusterLevel._recursively(i,t,r,(function(t){o.removeLayer(t),t.clusterShow()})),this._animationEnd()}))},_animationZoomOut:function(t,e){this._animationZoomOutSingle(this._topClusterLevel,t-1,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t,this._getExpandedVisibleBounds())},_animationAddLayer:function(t,e){var n=this,i=this._featureGroup;i.addLayer(t),e!==t&&(e._childCount>2?(e._updateIcon(),this._forceLayout(),this._animationStart(),t._setPos(this._map.latLngToLayerPoint(e.getLatLng())),t.clusterHide(),this._enqueue((function(){i.removeLayer(t),t.clusterShow(),n._animationEnd()}))):(this._forceLayout(),n._animationStart(),n._animationZoomOutSingle(e,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(t,e,n){var i=this._getExpandedVisibleBounds(),o=Math.floor(this._map.getMinZoom());t._recursivelyAnimateChildrenInAndAddSelfToMap(i,o,e+1,n);var r=this;this._forceLayout(),t._recursivelyBecomeVisible(i,n),this._enqueue((function(){if(1===t._childCount){var a=t._markers[0];this._ignoreMove=!0,a.setLatLng(a.getLatLng()),this._ignoreMove=!1,a.clusterShow&&a.clusterShow()}else t._recursively(i,n,o,(function(t){t._recursivelyRemoveChildrenFromMap(i,o,e+1)}));r._animationEnd()}))},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(t){return new L.MarkerClusterGroup(t)};var n=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(t,e,n,i){L.Marker.prototype.initialize.call(this,n?n._cLatLng||n.getLatLng():new L.LatLng(0,0),{icon:this,pane:t.options.clusterPane}),this._group=t,this._zoom=e,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,n&&this._addChild(n),i&&this._addChild(i)},getAllChildMarkers:function(t,e){t=t||[];for(var n=this._childClusters.length-1;n>=0;n--)this._childClusters[n].getAllChildMarkers(t,e);for(var i=this._markers.length-1;i>=0;i--)e&&this._markers[i].__dragStart||t.push(this._markers[i]);return t},getChildCount:function(){return this._childCount},zoomToBounds:function(t){for(var e,n=this._childClusters.slice(),i=this._group._map,o=i.getBoundsZoom(this._bounds),r=this._zoom+1,a=i.getZoom();n.length>0&&o>r;){r++;var s=[];for(e=0;e<n.length;e++)s=s.concat(n[e]._childClusters);n=s}o>r?this._group._map.setView(this._latlng,r):o<=a?this._group._map.setView(this._latlng,a+1):this._group._map.fitBounds(this._bounds,t)},getBounds:function(){var t=new L.LatLngBounds;return t.extend(this._bounds),t},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(t,e){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(t),t instanceof L.MarkerCluster?(e||(this._childClusters.push(t),t.__parent=this),this._childCount+=t._childCount):(e||this._markers.push(t),this._childCount++),this.__parent&&this.__parent._addChild(t,!0)},_setClusterCenter:function(t){this._cLatLng||(this._cLatLng=t._cLatLng||t._latlng)},_resetBounds:function(){var t=this._bounds;t._southWest&&(t._southWest.lat=1/0,t._southWest.lng=1/0),t._northEast&&(t._northEast.lat=-1/0,t._northEast.lng=-1/0)},_recalculateBounds:function(){var t,e,n,i,o=this._markers,r=this._childClusters,a=0,s=0,l=this._childCount;if(0!==l){for(this._resetBounds(),t=0;t<o.length;t++)n=o[t]._latlng,this._bounds.extend(n),a+=n.lat,s+=n.lng;for(t=0;t<r.length;t++)(e=r[t])._boundsNeedUpdate&&e._recalculateBounds(),this._bounds.extend(e._bounds),n=e._wLatLng,i=e._childCount,a+=n.lat*i,s+=n.lng*i;this._latlng=this._wLatLng=new L.LatLng(a/l,s/l),this._boundsNeedUpdate=!1}},_addToMap:function(t){t&&(this._backupLatlng=this._latlng,this.setLatLng(t)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(t,e,n){this._recursively(t,this._group._map.getMinZoom(),n-1,(function(t){var n,i,o=t._markers;for(n=o.length-1;n>=0;n--)(i=o[n])._icon&&(i._setPos(e),i.clusterHide())}),(function(t){var n,i,o=t._childClusters;for(n=o.length-1;n>=0;n--)(i=o[n])._icon&&(i._setPos(e),i.clusterHide())}))},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,e,n,i){this._recursively(t,i,e,(function(o){o._recursivelyAnimateChildrenIn(t,o._group._map.latLngToLayerPoint(o.getLatLng()).round(),n),o._isSingleParent()&&n-1===i?(o.clusterShow(),o._recursivelyRemoveChildrenFromMap(t,e,n)):o.clusterHide(),o._addToMap()}))},_recursivelyBecomeVisible:function(t,e){this._recursively(t,this._group._map.getMinZoom(),e,null,(function(t){t.clusterShow()}))},_recursivelyAddChildrenToMap:function(t,e,n){this._recursively(n,this._group._map.getMinZoom()-1,e,(function(i){if(e!==i._zoom)for(var o=i._markers.length-1;o>=0;o--){var r=i._markers[o];n.contains(r._latlng)&&(t&&(r._backupLatlng=r.getLatLng(),r.setLatLng(t),r.clusterHide&&r.clusterHide()),i._group._featureGroup.addLayer(r))}}),(function(e){e._addToMap(t)}))},_recursivelyRestoreChildPositions:function(t){for(var e=this._markers.length-1;e>=0;e--){var n=this._markers[e];n._backupLatlng&&(n.setLatLng(n._backupLatlng),delete n._backupLatlng)}if(t-1===this._zoom)for(var i=this._childClusters.length-1;i>=0;i--)this._childClusters[i]._restorePosition();else for(var o=this._childClusters.length-1;o>=0;o--)this._childClusters[o]._recursivelyRestoreChildPositions(t)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(t,e,n,i){var o,r;this._recursively(t,e-1,n-1,(function(t){for(r=t._markers.length-1;r>=0;r--)o=t._markers[r],i&&i.contains(o._latlng)||(t._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())}),(function(t){for(r=t._childClusters.length-1;r>=0;r--)o=t._childClusters[r],i&&i.contains(o._latlng)||(t._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())}))},_recursively:function(t,e,n,i,o){var r,a,s=this._childClusters,l=this._zoom;if(e<=l&&(i&&i(this),o&&l===n&&o(this)),l<e||l<n)for(r=s.length-1;r>=0;r--)(a=s[r])._boundsNeedUpdate&&a._recalculateBounds(),t.intersects(a._bounds)&&a._recursively(t,e,n,i,o)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var t=this.options.opacity;return this.setOpacity(0),this.options.opacity=t,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(t,e){var n=this._getCoord(e.x),i=this._getCoord(e.y),o=this._grid,r=o[i]=o[i]||{},a=r[n]=r[n]||[],s=L.Util.stamp(t);this._objectPoint[s]=e,a.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var n,i,o=this._getCoord(e.x),r=this._getCoord(e.y),a=this._grid,s=a[r]=a[r]||{},l=s[o]=s[o]||[];for(delete this._objectPoint[L.Util.stamp(t)],n=0,i=l.length;n<i;n++)if(l[n]===t)return l.splice(n,1),1===i&&delete s[o],!0},eachObject:function(t,e){var n,i,o,r,a,s,l=this._grid;for(n in l)for(i in a=l[n])for(o=0,r=(s=a[i]).length;o<r;o++)t.call(e,s[o])&&(o--,r--)},getNearObject:function(t){var e,n,i,o,r,a,s,l,h=this._getCoord(t.x),u=this._getCoord(t.y),c=this._objectPoint,p=this._sqCellSize,d=null;for(e=u-1;e<=u+1;e++)if(o=this._grid[e])for(n=h-1;n<=h+1;n++)if(r=o[n])for(i=0,a=r.length;i<a;i++)s=r[i],((l=this._sqDist(c[L.Util.stamp(s)],t))<p||l<=p&&null===d)&&(p=l,d=s);return d},_getCoord:function(t){var e=Math.floor(t/this._cellSize);return isFinite(e)?e:t},_sqDist:function(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}},L.QuickHull={getDistant:function(t,e){var n=e[1].lat-e[0].lat;return(e[0].lng-e[1].lng)*(t.lat-e[0].lat)+n*(t.lng-e[0].lng)},findMostDistantPointFromBaseLine:function(t,e){var n,i,o,r=0,a=null,s=[];for(n=e.length-1;n>=0;n--)i=e[n],(o=this.getDistant(i,t))>0&&(s.push(i),o>r&&(r=o,a=i));return{maxPoint:a,newPoints:s}},buildConvexHull:function(t,e){var n=[],i=this.findMostDistantPointFromBaseLine(t,e);return i.maxPoint?n=(n=n.concat(this.buildConvexHull([t[0],i.maxPoint],i.newPoints))).concat(this.buildConvexHull([i.maxPoint,t[1]],i.newPoints)):[t[0]]},getConvexHull:function(t){var e,n=!1,i=!1,o=!1,r=!1,a=null,s=null,l=null,h=null,u=null,c=null;for(e=t.length-1;e>=0;e--){var p=t[e];(!1===n||p.lat>n)&&(a=p,n=p.lat),(!1===i||p.lat<i)&&(s=p,i=p.lat),(!1===o||p.lng>o)&&(l=p,o=p.lng),(!1===r||p.lng<r)&&(h=p,r=p.lng)}return i!==n?(c=s,u=a):(c=h,u=l),[].concat(this.buildConvexHull([c,u],t),this.buildConvexHull([u,c],t))}},L.MarkerCluster.include({getConvexHull:function(){var t,e,n=this.getAllChildMarkers(),i=[];for(e=n.length-1;e>=0;e--)t=n[e].getLatLng(),i.push(t);return L.QuickHull.getConvexHull(i)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var t,e=this.getAllChildMarkers(null,!0),n=this._group._map.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),this._group._spiderfied=this,this._group.options.spiderfyShapePositions?t=this._group.options.spiderfyShapePositions(e.length,n):e.length>=this._circleSpiralSwitchover?t=this._generatePointsSpiral(e.length,n):(n.y+=10,t=this._generatePointsCircle(e.length,n)),this._animationSpiderfy(e,t)}},unspiderfy:function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},_generatePointsCircle:function(t,e){var n,i,o=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t)/this._2PI,r=this._2PI/t,a=[];for(o=Math.max(o,35),a.length=t,n=0;n<t;n++)i=this._circleStartAngle+n*r,a[n]=new L.Point(e.x+o*Math.cos(i),e.y+o*Math.sin(i))._round();return a},_generatePointsSpiral:function(t,e){var n,i=this._group.options.spiderfyDistanceMultiplier,o=i*this._spiralLengthStart,r=i*this._spiralFootSeparation,a=i*this._spiralLengthFactor*this._2PI,s=0,l=[];for(l.length=t,n=t;n>=0;n--)n<t&&(l[n]=new L.Point(e.x+o*Math.cos(s),e.y+o*Math.sin(s))._round()),o+=a/(s+=r/o+5e-4*n);return l},_noanimationUnspiderfy:function(){var t,e,n=this._group,i=n._map,o=n._featureGroup,r=this.getAllChildMarkers(null,!0);for(n._ignoreMove=!0,this.setOpacity(1),e=r.length-1;e>=0;e--)t=r[e],o.removeLayer(t),t._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng),t.setZIndexOffset&&t.setZIndexOffset(0),t._spiderLeg&&(i.removeLayer(t._spiderLeg),delete t._spiderLeg);n.fire("unspiderfied",{cluster:this,markers:r}),n._ignoreMove=!1,n._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(t,e){var n,i,o,r,a=this._group,s=a._map,l=a._featureGroup,h=this._group.options.spiderLegPolylineOptions;for(a._ignoreMove=!0,n=0;n<t.length;n++)r=s.layerPointToLatLng(e[n]),i=t[n],o=new L.Polyline([this._latlng,r],h),s.addLayer(o),i._spiderLeg=o,i._preSpiderfyLatlng=i._latlng,i.setLatLng(r),i.setZIndexOffset&&i.setZIndexOffset(1e6),l.addLayer(i);this.setOpacity(.3),a._ignoreMove=!1,a.fire("spiderfied",{cluster:this,markers:t})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(t,e){var n,i,o,r,a,s,l=this,h=this._group,u=h._map,c=h._featureGroup,p=this._latlng,d=u.latLngToLayerPoint(p),f=L.Path.SVG,_=L.extend({},this._group.options.spiderLegPolylineOptions),m=_.opacity;for(void 0===m&&(m=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),f?(_.opacity=0,_.className=(_.className||"")+" leaflet-cluster-spider-leg"):_.opacity=m,h._ignoreMove=!0,n=0;n<t.length;n++)i=t[n],s=u.layerPointToLatLng(e[n]),o=new L.Polyline([p,s],_),u.addLayer(o),i._spiderLeg=o,f&&(a=(r=o._path).getTotalLength()+.1,r.style.strokeDasharray=a,r.style.strokeDashoffset=a),i.setZIndexOffset&&i.setZIndexOffset(1e6),i.clusterHide&&i.clusterHide(),c.addLayer(i),i._setPos&&i._setPos(d);for(h._forceLayout(),h._animationStart(),n=t.length-1;n>=0;n--)s=u.layerPointToLatLng(e[n]),(i=t[n])._preSpiderfyLatlng=i._latlng,i.setLatLng(s),i.clusterShow&&i.clusterShow(),f&&((r=(o=i._spiderLeg)._path).style.strokeDashoffset=0,o.setStyle({opacity:m}));this.setOpacity(.3),h._ignoreMove=!1,setTimeout((function(){h._animationEnd(),h.fire("spiderfied",{cluster:l,markers:t})}),200)},_animationUnspiderfy:function(t){var e,n,i,o,r,a,s=this,l=this._group,h=l._map,u=l._featureGroup,c=t?h._latLngToNewLayerPoint(this._latlng,t.zoom,t.center):h.latLngToLayerPoint(this._latlng),p=this.getAllChildMarkers(null,!0),d=L.Path.SVG;for(l._ignoreMove=!0,l._animationStart(),this.setOpacity(1),n=p.length-1;n>=0;n--)(e=p[n])._preSpiderfyLatlng&&(e.closePopup(),e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng,a=!0,e._setPos&&(e._setPos(c),a=!1),e.clusterHide&&(e.clusterHide(),a=!1),a&&u.removeLayer(e),d&&(r=(o=(i=e._spiderLeg)._path).getTotalLength()+.1,o.style.strokeDashoffset=r,i.setStyle({opacity:0})));l._ignoreMove=!1,setTimeout((function(){var t=0;for(n=p.length-1;n>=0;n--)(e=p[n])._spiderLeg&&t++;for(n=p.length-1;n>=0;n--)(e=p[n])._spiderLeg&&(e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),t>1&&u.removeLayer(e),h.removeLayer(e._spiderLeg),delete e._spiderLeg);l._animationEnd(),l.fire("unspiderfied",{cluster:s,markers:p})}),200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(t){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(t){t._spiderLeg&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),this._map.removeLayer(t._spiderLeg),delete t._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(t){return t?t instanceof L.MarkerClusterGroup?t=t._topClusterLevel.getAllChildMarkers():t instanceof L.LayerGroup?t=t._layers:t instanceof L.MarkerCluster?t=t.getAllChildMarkers():t instanceof L.Marker&&(t=[t]):t=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(t),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(t),this},_flagParentsIconsNeedUpdate:function(t){var e,n;for(e in t)for(n=t[e].__parent;n;)n._iconNeedsUpdate=!0,n=n.__parent},_refreshSingleMarkerModeMarkers:function(t){var e,n;for(e in t)n=t[e],this.hasLayer(n)&&n.setIcon(this._overrideMarkerIcon(n))}}),L.Marker.include({refreshIconOptions:function(t,e){var n=this.options.icon;return L.setOptions(n,t),this.setIcon(n),e&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),t.MarkerClusterGroup=e,t.MarkerCluster=n,Object.defineProperty(t,"__esModule",{value:!0})}(e)},62:function(t,e){
|
|
2
|
+
/* @preserve
|
|
3
|
+
* Leaflet 1.7.1, a JS library for interactive maps. http://leafletjs.com
|
|
4
|
+
* (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|
|
5
|
+
*/
|
|
6
|
+
!function(t){var e="1.7.1";function n(t){var e,n,i,o;for(n=1,i=arguments.length;n<i;n++)for(e in o=arguments[n])t[e]=o[e];return t}var i=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function o(t,e){var n=Array.prototype.slice;if(t.bind)return t.bind.apply(t,n.call(arguments,1));var i=n.call(arguments,2);return function(){return t.apply(e,i.length?i.concat(n.call(arguments)):arguments)}}var r=0;function a(t){return t._leaflet_id=t._leaflet_id||++r,t._leaflet_id}function s(t,e,n){var i,o,r,a;return a=function(){i=!1,o&&(r.apply(n,o),o=!1)},r=function(){i?o=arguments:(t.apply(n,arguments),setTimeout(a,e),i=!0)},r}function l(t,e,n){var i=e[1],o=e[0],r=i-o;return t===i&&n?t:((t-o)%r+r)%r+o}function h(){return!1}function u(t,e){var n=Math.pow(10,void 0===e?6:e);return Math.round(t*n)/n}function c(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function p(t){return c(t).split(/\s+/)}function d(t,e){for(var n in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?i(t.options):{}),e)t.options[n]=e[n];return t.options}function f(t,e,n){var i=[];for(var o in t)i.push(encodeURIComponent(n?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+i.join("&")}var _=/\{ *([\w_-]+) *\}/g;function m(t,e){return t.replace(_,(function(t,n){var i=e[n];if(void 0===i)throw new Error("No value provided for variable "+t);return"function"==typeof i&&(i=i(e)),i}))}var g=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function y(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}var v="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var w=0;function x(t){var e=+new Date,n=Math.max(0,16-(e-w));return w=e+n,window.setTimeout(t,n)}var k=window.requestAnimationFrame||b("RequestAnimationFrame")||x,M=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function C(t,e,n){if(!n||k!==x)return k.call(window,o(t,e));t.call(e)}function P(t){t&&M.call(window,t)}var E={extend:n,create:i,bind:o,lastId:r,stamp:a,throttle:s,wrapNum:l,falseFn:h,formatNum:u,trim:c,splitWords:p,setOptions:d,getParamString:f,template:m,isArray:g,indexOf:y,emptyImageUrl:v,requestFn:k,cancelFn:M,requestAnimFrame:C,cancelAnimFrame:P};function T(){}function S(t){if("undefined"!=typeof L&&L&&L.Mixin){t=g(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}T.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=e.__super__=this.prototype,r=i(o);for(var a in r.constructor=e,e.prototype=r,this)Object.prototype.hasOwnProperty.call(this,a)&&"prototype"!==a&&"__super__"!==a&&(e[a]=this[a]);return t.statics&&(n(e,t.statics),delete t.statics),t.includes&&(S(t.includes),n.apply(null,[r].concat(t.includes)),delete t.includes),r.options&&(t.options=n(i(r.options),t.options)),n(r,t),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=r._initHooks.length;t<e;t++)r._initHooks[t].call(this)}},e},T.include=function(t){return n(this.prototype,t),this},T.mergeOptions=function(t){return n(this.prototype.options,t),this},T.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var z={on:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e);else for(var o=0,r=(t=p(t)).length;o<r;o++)this._on(t[o],e,n);return this},off:function(t,e,n){if(t)if("object"==typeof t)for(var i in t)this._off(i,t[i],e);else for(var o=0,r=(t=p(t)).length;o<r;o++)this._off(t[o],e,n);else delete this._events;return this},_on:function(t,e,n){this._events=this._events||{};var i=this._events[t];i||(i=[],this._events[t]=i),n===this&&(n=void 0);for(var o={fn:e,ctx:n},r=i,a=0,s=r.length;a<s;a++)if(r[a].fn===e&&r[a].ctx===n)return;r.push(o)},_off:function(t,e,n){var i,o,r;if(this._events&&(i=this._events[t]))if(e){if(n===this&&(n=void 0),i)for(o=0,r=i.length;o<r;o++){var a=i[o];if(a.ctx===n&&a.fn===e)return a.fn=h,this._firingCount&&(this._events[t]=i=i.slice()),void i.splice(o,1)}}else{for(o=0,r=i.length;o<r;o++)i[o].fn=h;delete this._events[t]}},fire:function(t,e,i){if(!this.listens(t,i))return this;var o=n({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var r=this._events[t];if(r){this._firingCount=this._firingCount+1||1;for(var a=0,s=r.length;a<s;a++){var l=r[a];l.fn.call(l.ctx||this,o)}this._firingCount--}}return i&&this._propagateEvent(o),this},listens:function(t,e){var n=this._events&&this._events[t];if(n&&n.length)return!0;if(e)for(var i in this._eventParents)if(this._eventParents[i].listens(t,e))return!0;return!1},once:function(t,e,n){if("object"==typeof t){for(var i in t)this.once(i,t[i],e);return this}var r=o((function(){this.off(t,e,n).off(t,r,n)}),this);return this.on(t,e,n).on(t,r,n)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[a(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[a(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,n({layer:t.target,propagatedFrom:t.target},t),!0)}};z.addEventListener=z.on,z.removeEventListener=z.clearAllEventListeners=z.off,z.addOneTimeEventListener=z.once,z.fireEvent=z.fire,z.hasEventListeners=z.listens;var O=T.extend(z);function D(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}var A=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function I(t,e,n){return t instanceof D?t:g(t)?new D(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new D(t.x,t.y):new D(t,e,n)}function B(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function N(t,e){return!t||t instanceof B?t:new B(t,e)}function Z(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function R(t,e){return t instanceof Z?t:new Z(t,e)}function j(t,e,n){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==n&&(this.alt=+n)}function G(t,e,n){return t instanceof j?t:g(t)&&"object"!=typeof t[0]?3===t.length?new j(t[0],t[1],t[2]):2===t.length?new j(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new j(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new j(t,e,n)}D.prototype={clone:function(){return new D(this.x,this.y)},add:function(t){return this.clone()._add(I(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(I(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new D(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new D(this.x/t.x,this.y/t.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=A(this.x),this.y=A(this.y),this},distanceTo:function(t){var e=(t=I(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=I(t)).x===this.x&&t.y===this.y},contains:function(t){return t=I(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+u(this.x)+", "+u(this.y)+")"}},B.prototype={extend:function(t){return t=I(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new D((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new D(this.min.x,this.max.y)},getTopRight:function(){return new D(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,n;return(t="number"==typeof t[0]||t instanceof D?I(t):N(t))instanceof B?(e=t.min,n=t.max):e=n=t,e.x>=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=N(t);var e=this.min,n=this.max,i=t.min,o=t.max,r=o.x>=e.x&&i.x<=n.x,a=o.y>=e.y&&i.y<=n.y;return r&&a},overlaps:function(t){t=N(t);var e=this.min,n=this.max,i=t.min,o=t.max,r=o.x>e.x&&i.x<n.x,a=o.y>e.y&&i.y<n.y;return r&&a},isValid:function(){return!(!this.min||!this.max)}},Z.prototype={extend:function(t){var e,n,i=this._southWest,o=this._northEast;if(t instanceof j)e=t,n=t;else{if(!(t instanceof Z))return t?this.extend(G(t)||R(t)):this;if(e=t._southWest,n=t._northEast,!e||!n)return this}return i||o?(i.lat=Math.min(e.lat,i.lat),i.lng=Math.min(e.lng,i.lng),o.lat=Math.max(n.lat,o.lat),o.lng=Math.max(n.lng,o.lng)):(this._southWest=new j(e.lat,e.lng),this._northEast=new j(n.lat,n.lng)),this},pad:function(t){var e=this._southWest,n=this._northEast,i=Math.abs(e.lat-n.lat)*t,o=Math.abs(e.lng-n.lng)*t;return new Z(new j(e.lat-i,e.lng-o),new j(n.lat+i,n.lng+o))},getCenter:function(){return new j((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new j(this.getNorth(),this.getWest())},getSouthEast:function(){return new j(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof j||"lat"in t?G(t):R(t);var e,n,i=this._southWest,o=this._northEast;return t instanceof Z?(e=t.getSouthWest(),n=t.getNorthEast()):e=n=t,e.lat>=i.lat&&n.lat<=o.lat&&e.lng>=i.lng&&n.lng<=o.lng},intersects:function(t){t=R(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>=e.lat&&i.lat<=n.lat,a=o.lng>=e.lng&&i.lng<=n.lng;return r&&a},overlaps:function(t){t=R(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>e.lat&&i.lat<n.lat,a=o.lng>e.lng&&i.lng<n.lng;return r&&a},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=R(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},j.prototype={equals:function(t,e){return!!t&&(t=G(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+u(this.lat,t)+", "+u(this.lng,t)+")"},distanceTo:function(t){return F.distance(this,G(t))},wrap:function(){return F.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return R([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new j(this.lat,this.lng,this.alt)}};var U,H={latLngToPoint:function(t,e){var n=this.projection.project(t),i=this.scale(e);return this.transformation._transform(n,i)},pointToLatLng:function(t,e){var n=this.scale(e),i=this.transformation.untransform(t,n);return this.projection.unproject(i)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,n=this.scale(t);return new B(this.transformation.transform(e.min,n),this.transformation.transform(e.max,n))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?l(t.lng,this.wrapLng,!0):t.lng;return new j(this.wrapLat?l(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),n=this.wrapLatLng(e),i=e.lat-n.lat,o=e.lng-n.lng;if(0===i&&0===o)return t;var r=t.getSouthWest(),a=t.getNorthEast();return new Z(new j(r.lat-i,r.lng-o),new j(a.lat-i,a.lng-o))}},F=n({},H,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var n=Math.PI/180,i=t.lat*n,o=e.lat*n,r=Math.sin((e.lat-t.lat)*n/2),a=Math.sin((e.lng-t.lng)*n/2),s=r*r+Math.cos(i)*Math.cos(o)*a*a,l=2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s));return this.R*l}}),W=6378137,V={R:W,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,n=this.MAX_LATITUDE,i=Math.max(Math.min(n,t.lat),-n),o=Math.sin(i*e);return new D(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new j((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(U=W*Math.PI,new B([-U,-U],[U,U]))};function q(t,e,n,i){if(g(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=n,this._d=i}function Y(t,e,n,i){return new q(t,e,n,i)}q.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new D((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var K=n({},F,{code:"EPSG:3857",projection:V,transformation:function(){var t=.5/(Math.PI*V.R);return Y(t,.5,-t,.5)}()}),X=n({},K,{code:"EPSG:900913"});function J(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Q(t,e){var n,i,o,r,a,s,l="";for(n=0,o=t.length;n<o;n++){for(i=0,r=(a=t[n]).length;i<r;i++)l+=(i?"L":"M")+(s=a[i]).x+" "+s.y;l+=e?St?"z":"x":""}return l||"M0 0"}var $=document.documentElement.style,tt="ActiveXObject"in window,et=tt&&!document.addEventListener,nt="msLaunchUri"in navigator&&!("documentMode"in document),it=Ot("webkit"),ot=Ot("android"),rt=Ot("android 2")||Ot("android 3"),at=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),st=ot&&Ot("Google")&&at<537&&!("AudioNode"in window),lt=!!window.opera,ht=!nt&&Ot("chrome"),ut=Ot("gecko")&&!it&&!lt&&!tt,ct=!ht&&Ot("safari"),pt=Ot("phantom"),dt="OTransition"in $,ft=0===navigator.platform.indexOf("Win"),_t=tt&&"transition"in $,mt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!rt,gt="MozPerspective"in $,yt=!window.L_DISABLE_3D&&(_t||mt||gt)&&!dt&&!pt,vt="undefined"!=typeof orientation||Ot("mobile"),bt=vt&&it,Lt=vt&&mt,wt=!window.PointerEvent&&window.MSPointerEvent,xt=!(!window.PointerEvent&&!wt),kt=!window.L_NO_TOUCH&&(xt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),Mt=vt&<,Ct=vt&&ut,Pt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Et=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",h,e),window.removeEventListener("testPassiveEventSupport",h,e)}catch(t){}return t}(),Tt=!!document.createElement("canvas").getContext,St=!(!document.createElementNS||!J("svg").createSVGRect),zt=!St&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}();function Ot(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Dt={ie:tt,ielt9:et,edge:nt,webkit:it,android:ot,android23:rt,androidStock:st,opera:lt,chrome:ht,gecko:ut,safari:ct,phantom:pt,opera12:dt,win:ft,ie3d:_t,webkit3d:mt,gecko3d:gt,any3d:yt,mobile:vt,mobileWebkit:bt,mobileWebkit3d:Lt,msPointer:wt,pointer:xt,touch:kt,mobileOpera:Mt,mobileGecko:Ct,retina:Pt,passiveEvents:Et,canvas:Tt,svg:St,vml:zt},At=wt?"MSPointerDown":"pointerdown",It=wt?"MSPointerMove":"pointermove",Bt=wt?"MSPointerUp":"pointerup",Nt=wt?"MSPointerCancel":"pointercancel",Zt={},Rt=!1;function jt(t,e,n,i){return"touchstart"===e?Ut(t,n,i):"touchmove"===e?qt(t,n,i):"touchend"===e&&Yt(t,n,i),this}function Gt(t,e,n){var i=t["_leaflet_"+e+n];return"touchstart"===e?t.removeEventListener(At,i,!1):"touchmove"===e?t.removeEventListener(It,i,!1):"touchend"===e&&(t.removeEventListener(Bt,i,!1),t.removeEventListener(Nt,i,!1)),this}function Ut(t,e,n){var i=o((function(t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&Fe(t),Vt(t,e)}));t["_leaflet_touchstart"+n]=i,t.addEventListener(At,i,!1),Rt||(document.addEventListener(At,Ht,!0),document.addEventListener(It,Ft,!0),document.addEventListener(Bt,Wt,!0),document.addEventListener(Nt,Wt,!0),Rt=!0)}function Ht(t){Zt[t.pointerId]=t}function Ft(t){Zt[t.pointerId]&&(Zt[t.pointerId]=t)}function Wt(t){delete Zt[t.pointerId]}function Vt(t,e){for(var n in t.touches=[],Zt)t.touches.push(Zt[n]);t.changedTouches=[t],e(t)}function qt(t,e,n){var i=function(t){t.pointerType===(t.MSPOINTER_TYPE_MOUSE||"mouse")&&0===t.buttons||Vt(t,e)};t["_leaflet_touchmove"+n]=i,t.addEventListener(It,i,!1)}function Yt(t,e,n){var i=function(t){Vt(t,e)};t["_leaflet_touchend"+n]=i,t.addEventListener(Bt,i,!1),t.addEventListener(Nt,i,!1)}var Kt=wt?"MSPointerDown":xt?"pointerdown":"touchstart",Xt=wt?"MSPointerUp":xt?"pointerup":"touchend",Jt="_leaflet_";function Qt(t,e,n){var i,o,r=!1,a=250;function s(t){if(xt){if(!t.isPrimary)return;if("mouse"===t.pointerType)return}else if(t.touches.length>1)return;var e=Date.now(),n=e-(i||e);o=t.touches?t.touches[0]:t,r=n>0&&n<=a,i=e}function l(t){if(r&&!o.cancelBubble){if(xt){if("mouse"===t.pointerType)return;var n,a,s={};for(a in o)n=o[a],s[a]=n&&n.bind?n.bind(o):n;o=s}o.type="dblclick",o.button=0,e(o),i=null}}return t[Jt+Kt+n]=s,t[Jt+Xt+n]=l,t[Jt+"dblclick"+n]=e,t.addEventListener(Kt,s,!!Et&&{passive:!1}),t.addEventListener(Xt,l,!!Et&&{passive:!1}),t.addEventListener("dblclick",e,!1),this}function $t(t,e){var n=t[Jt+Kt+e],i=t[Jt+Xt+e],o=t[Jt+"dblclick"+e];return t.removeEventListener(Kt,n,!!Et&&{passive:!1}),t.removeEventListener(Xt,i,!!Et&&{passive:!1}),t.removeEventListener("dblclick",o,!1),this}var te,ee,ne,ie,oe,re=we(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ae=we(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),se="webkitTransition"===ae||"OTransition"===ae?ae+"End":"transitionend";function le(t){return"string"==typeof t?document.getElementById(t):t}function he(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(t,null);n=i?i[e]:null}return"auto"===n?null:n}function ue(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function ce(t){var e=t.parentNode;e&&e.removeChild(t)}function pe(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function de(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function fe(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function _e(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=ve(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function me(t,e){if(void 0!==t.classList)for(var n=p(e),i=0,o=n.length;i<o;i++)t.classList.add(n[i]);else if(!_e(t,e)){var r=ve(t);ye(t,(r?r+" ":"")+e)}}function ge(t,e){void 0!==t.classList?t.classList.remove(e):ye(t,c((" "+ve(t)+" ").replace(" "+e+" "," ")))}function ye(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function ve(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function be(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&Le(t,e)}function Le(t,e){var n=!1,i="DXImageTransform.Microsoft.Alpha";try{n=t.filters.item(i)}catch(t){if(1===e)return}e=Math.round(100*e),n?(n.Enabled=100!==e,n.Opacity=e):t.style.filter+=" progid:"+i+"(opacity="+e+")"}function we(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function xe(t,e,n){var i=e||new D(0,0);t.style[re]=(_t?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(n?" scale("+n+")":"")}function ke(t,e){t._leaflet_pos=e,yt?xe(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Me(t){return t._leaflet_pos||new D(0,0)}if("onselectstart"in document)te=function(){Ae(window,"selectstart",Fe)},ee=function(){Be(window,"selectstart",Fe)};else{var Ce=we(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);te=function(){if(Ce){var t=document.documentElement.style;ne=t[Ce],t[Ce]="none"}},ee=function(){Ce&&(document.documentElement.style[Ce]=ne,ne=void 0)}}function Pe(){Ae(window,"dragstart",Fe)}function Ee(){Be(window,"dragstart",Fe)}function Te(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Se(),ie=t,oe=t.style.outline,t.style.outline="none",Ae(window,"keydown",Se))}function Se(){ie&&(ie.style.outline=oe,ie=void 0,oe=void 0,Be(window,"keydown",Se))}function ze(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Oe(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var De={TRANSFORM:re,TRANSITION:ae,TRANSITION_END:se,get:le,getStyle:he,create:ue,remove:ce,empty:pe,toFront:de,toBack:fe,hasClass:_e,addClass:me,removeClass:ge,setClass:ye,getClass:ve,setOpacity:be,testProp:we,setTransform:xe,setPosition:ke,getPosition:Me,disableTextSelection:te,enableTextSelection:ee,disableImageDrag:Pe,enableImageDrag:Ee,preventOutline:Te,restoreOutline:Se,getSizedParentNode:ze,getScale:Oe};function Ae(t,e,n,i){if("object"==typeof e)for(var o in e)Re(t,o,e[o],n);else for(var r=0,a=(e=p(e)).length;r<a;r++)Re(t,e[r],n,i);return this}var Ie="_leaflet_events";function Be(t,e,n,i){if("object"==typeof e)for(var o in e)je(t,o,e[o],n);else if(e)for(var r=0,a=(e=p(e)).length;r<a;r++)je(t,e[r],n,i);else{for(var s in t[Ie])je(t,s,t[Ie][s]);delete t[Ie]}return this}function Ne(){if(xt)return!(nt||ct)}var Ze={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Re(t,e,n,i){var o=e+a(n)+(i?"_"+a(i):"");if(t[Ie]&&t[Ie][o])return this;var r=function(e){return n.call(i||t,e||window.event)},s=r;xt&&0===e.indexOf("touch")?jt(t,e,r,o):kt&&"dblclick"===e&&!Ne()?Qt(t,r,o):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(Ze[e]||e,r,!!Et&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(r=function(e){e=e||window.event,Qe(t,e)&&s(e)},t.addEventListener(Ze[e],r,!1)):t.addEventListener(e,s,!1):"attachEvent"in t&&t.attachEvent("on"+e,r),t[Ie]=t[Ie]||{},t[Ie][o]=r}function je(t,e,n,i){var o=e+a(n)+(i?"_"+a(i):""),r=t[Ie]&&t[Ie][o];if(!r)return this;xt&&0===e.indexOf("touch")?Gt(t,e,o):kt&&"dblclick"===e&&!Ne()?$t(t,o):"removeEventListener"in t?t.removeEventListener(Ze[e]||e,r,!1):"detachEvent"in t&&t.detachEvent("on"+e,r),t[Ie][o]=null}function Ge(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,Je(t),this}function Ue(t){return Re(t,"wheel",Ge),this}function He(t){return Ae(t,"mousedown touchstart dblclick",Ge),Re(t,"click",Xe),this}function Fe(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function We(t){return Fe(t),Ge(t),this}function Ve(t,e){if(!e)return new D(t.clientX,t.clientY);var n=Oe(e),i=n.boundingClientRect;return new D((t.clientX-i.left)/n.x-e.clientLeft,(t.clientY-i.top)/n.y-e.clientTop)}var qe=ft&&ht?2*window.devicePixelRatio:ut?window.devicePixelRatio:1;function Ye(t){return nt?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/qe:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}var Ke={};function Xe(t){Ke[t.type]=!0}function Je(t){var e=Ke[t.type];return Ke[t.type]=!1,e}function Qe(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(t){return!1}return n!==t}var $e={on:Ae,off:Be,stopPropagation:Ge,disableScrollPropagation:Ue,disableClickPropagation:He,preventDefault:Fe,stop:We,getMousePosition:Ve,getWheelDelta:Ye,fakeStop:Xe,skipped:Je,isExternalTarget:Qe,addListener:Ae,removeListener:Be},tn=O.extend({run:function(t,e,n,i){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=Me(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=C(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;e<n?this._runFrame(this._easeOut(e/n),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),ke(this._el,n),this.fire("step")},_complete:function(){P(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),en=O.extend({options:{crs:K,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=d(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=o(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(G(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ae&&yt&&!Mt&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Ae(this._proxy,se,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,i){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(G(t),e,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&!0!==i&&(void 0!==i.animate&&(i.zoom=n({animate:i.animate},i.zoom),i.pan=n({animate:i.animate,duration:i.duration},i.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e),this)},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(yt?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(yt?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,n){var i=this.getZoomScale(e),o=this.getSize().divideBy(2),r=(t instanceof D?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/i),a=this.containerPointToLatLng(o.add(r));return this.setView(a,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():R(t);var n=I(e.paddingTopLeft||e.padding||[0,0]),i=I(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,n.add(i));if((o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};var r=i.subtract(n).divideBy(2),a=this.project(t.getSouthWest(),o),s=this.project(t.getNorthEast(),o);return{center:this.unproject(a.add(s).divideBy(2).add(r),o),zoom:o}},fitBounds:function(t,e){if(!(t=R(t)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(t,e);return this.setView(n.center,n.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(e=e||{},!(t=I(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new tn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){me(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,n,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,n){if(!1===(n=n||{}).animate||!yt)return this.setView(t,e,n);this._stop();var i=this.project(this.getCenter()),o=this.project(t),r=this.getSize(),a=this._zoom;t=G(t),e=void 0===e?a:e;var s=Math.max(r.x,r.y),l=s*this.getZoomScale(a,e),h=o.distanceTo(i)||1,u=1.42,c=u*u;function p(t){var e=(l*l-s*s+(t?-1:1)*c*c*h*h)/(2*(t?l:s)*c*h),n=Math.sqrt(e*e+1)-e;return n<1e-9?-18:Math.log(n)}function d(t){return(Math.exp(t)-Math.exp(-t))/2}function f(t){return(Math.exp(t)+Math.exp(-t))/2}function _(t){return d(t)/f(t)}var m=p(0);function g(t){return s*(f(m)/f(m+u*t))}function y(t){return s*(f(m)*_(m+u*t)-d(m))/c}function v(t){return 1-Math.pow(1-t,1.5)}var b=Date.now(),L=(p(1)-m)/u,w=n.duration?1e3*n.duration:1e3*L*.8;function x(){var n=(Date.now()-b)/w,r=v(n)*L;n<=1?(this._flyToFrame=C(x,this),this._move(this.unproject(i.add(o.subtract(i).multiplyBy(y(r)/h)),a),this.getScaleZoom(s/g(r),a),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,n.noMoveStart),x.call(this),this},flyToBounds:function(t,e){var n=this._getBoundsCenterZoom(t,e);return this.flyTo(n.center,n.zoom,e)},setMaxBounds:function(t){return(t=R(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),i=this._limitCenter(n,this._zoom,R(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=I((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=I(e.paddingBottomRight||e.padding||[0,0]),o=this.getCenter(),r=this.project(o),a=this.project(t),s=this.getPixelBounds(),l=s.getSize().divideBy(2),h=N([s.min.add(n),s.max.subtract(i)]);if(!h.contains(a)){this._enforcingBounds=!0;var u=r.subtract(a),c=I(a.x+u.x,a.y+u.y);(a.x<h.min.x||a.x>h.max.x)&&(c.x=r.x-u.x,u.x>0?c.x+=l.x-n.x:c.x-=l.x-i.x),(a.y<h.min.y||a.y>h.max.y)&&(c.y=r.y-u.y,u.y>0?c.y+=l.y-n.y:c.y-=l.y-i.y),this.panTo(this.unproject(c),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=n({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),r=e.divideBy(2).round(),a=i.divideBy(2).round(),s=r.subtract(a);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=n({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o(this._handleGeolocationResponse,this),i=o(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})},_handleGeolocationResponse:function(t){var e=new j(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),i=this._locateOptions;if(i.setView){var o=this.getBoundsZoom(n);this.setView(e,i.maxZoom?Math.min(o,i.maxZoom):o)}var r={latlng:e,bounds:n,timestamp:t.timestamp};for(var a in t.coords)"number"==typeof t.coords[a]&&(r[a]=t.coords[a]);this.fire("locationfound",r)},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.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(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ce(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(P(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ce(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=ue("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new Z(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=R(t),n=I(n||[0,0]);var i=this.getZoom()||0,o=this.getMinZoom(),r=this.getMaxZoom(),a=t.getNorthWest(),s=t.getSouthEast(),l=this.getSize().subtract(n),h=N(this.project(s,i),this.project(a,i)).getSize(),u=yt?this.options.zoomSnap:1,c=l.x/h.x,p=l.y/h.y,d=e?Math.max(c,p):Math.min(c,p);return i=this.getScaleZoom(d,i),u&&(i=Math.round(i/(u/100))*(u/100),i=e?Math.ceil(i/u)*u:Math.floor(i/u)*u),Math.max(o,Math.min(r,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new D(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new B(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=void 0===e?this._zoom:e;var i=n.zoom(t*n.scale(e));return isNaN(i)?1/0:i},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(G(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(I(t),e)},layerPointToLatLng:function(t){var e=I(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(G(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(G(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(R(t))},distance:function(t,e){return this.options.crs.distance(G(t),G(e))},containerPointToLayerPoint:function(t){return I(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return I(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(I(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(G(t)))},mouseEventToContainerPoint:function(t){return Ve(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=le(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Ae(e,"scroll",this._onScroll,this),this._containerId=a(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&yt,me(t,"leaflet-container"+(kt?" leaflet-touch":"")+(Pt?" leaflet-retina":"")+(et?" leaflet-oldie":"")+(ct?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=he(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ke(this._mapPane,new D(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(me(t.markerPane,"leaflet-zoom-hide"),me(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){ke(this._mapPane,new D(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var i=this._zoom!==e;this._moveStart(i,!1)._move(t,e)._moveEnd(i),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n){void 0===e&&(e=this._zoom);var i=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(i||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return P(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){ke(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[a(this._container)]=this;var e=t?Be:Ae;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),yt&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){P(this._resizeRequest),this._resizeRequest=C((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,i=[],o="mouseout"===e||"mouseover"===e,r=t.target||t.srcElement,s=!1;r;){if((n=this._targets[a(r)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(n)){s=!0;break}if(n&&n.listens(e,!0)){if(o&&!Qe(r,t))break;if(i.push(n),o)break}if(r===this._container)break;r=r.parentNode}return i.length||s||o||!Qe(r,t)||(i=[this]),i},_handleDOMEvent:function(t){if(this._loaded&&!Je(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e&&"keyup"!==e&&"keydown"!==e||Te(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if("click"===t.type){var o=n({},t);o.type="preclick",this._fireDOMEvent(o,o.type,i)}if(!t._stopped&&(i=(i||[]).concat(this._findEventTargets(t,e))).length){var r=i[0];"contextmenu"===e&&r.listens(e,!0)&&Fe(t);var a={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var s=r.getLatLng&&(!r._radius||r._radius<=10);a.containerPoint=s?this.latLngToContainerPoint(r.getLatLng()):this.mouseEventToContainerPoint(t),a.layerPoint=this.containerPointToLayerPoint(a.containerPoint),a.latlng=s?r.getLatLng():this.layerPointToLatLng(a.layerPoint)}for(var l=0;l<i.length;l++)if(i[l].fire(e,a,!0),a.originalEvent._stopped||!1===i[l].options.bubblingMouseEvents&&-1!==y(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return Me(this._mapPane)||new D(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var n=this.getSize()._divideBy(2);return this.project(t,e)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return this.project(t,e)._subtract(i)},_latLngBoundsToNewLayerBounds:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return N([this.project(t.getSouthWest(),e)._subtract(i),this.project(t.getNorthWest(),e)._subtract(i),this.project(t.getSouthEast(),e)._subtract(i),this.project(t.getNorthEast(),e)._subtract(i)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,n){if(!n)return t;var i=this.project(t,e),o=this.getSize().divideBy(2),r=new B(i.subtract(o),i.add(o)),a=this._getBoundsOffset(r,n,e);return a.round().equals([0,0])?t:this.unproject(i.add(a),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),i=new B(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(i,e))},_getBoundsOffset:function(t,e,n){var i=N(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),o=i.min.subtract(t.min),r=i.max.subtract(t.max);return new D(this._rebound(o.x,-r.x),this._rebound(o.y,-r.y))},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom(),i=yt?this.options.zoomSnap:1;return i&&(t=Math.round(t/i)*i),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ge(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n)||(this.panBy(n,e),0))},_createAnimProxy:function(){var t=this._proxy=ue("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=re,n=this._proxy.style[e];xe(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ce(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();xe(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(o)||(C((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,me(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ge(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),C((function(){this._moveEnd(!0)}),this))}});function nn(t,e){return new en(t,e)}var on=T.extend({options:{position:"topright"},initialize:function(t){d(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),i=t._controlCorners[n];return me(e,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(e,i.firstChild):i.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ce(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),rn=function(t){return new on(t)};en.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=ue("div",e+"control-container",this._container);function i(i,o){var r=e+i+" "+e+o;t[i+o]=ue("div",r,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ce(this._controlCorners[t]);ce(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var an=on.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,i){return n<i?-1:i<n?1:0}},initialize:function(t,e,n){for(var i in d(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[i],i);for(i in e)this._addLayer(e[i],i,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return on.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(a(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){me(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(me(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):ge(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return ge(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=ue("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),He(e),Ue(e);var i=this._section=ue("section",t+"-list");n&&(this._map.on("click",this.collapse,this),ot||Ae(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var o=this._layersLink=ue("a",t+"-toggle",e);o.href="#",o.title="Layers",kt?(Ae(o,"click",We),Ae(o,"click",this.expand,this)):Ae(o,"focus",this.expand,this),n||this.expand(),this._baseLayersList=ue("div",t+"-base",i),this._separator=ue("div",t+"-separator",i),this._overlaysList=ue("div",t+"-overlays",i),e.appendChild(i)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&a(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:n}),this.options.sortLayers&&this._layers.sort(o((function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)}),this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;pe(this._baseLayersList),pe(this._overlaysList),this._layerControlInputs=[];var t,e,n,i,o=0;for(n=0;n<this._layers.length;n++)i=this._layers[n],this._addItem(i),e=e||i.overlay,t=t||!i.overlay,o+=i.overlay?0:1;return this.options.hideSingleBase&&(t=t&&o>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(a(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",i=document.createElement("div");return i.innerHTML=n,i.firstChild},_addItem:function(t){var e,n=document.createElement("label"),i=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=i):e=this._createRadioElement("leaflet-base-layers_"+a(this),i),this._layerControlInputs.push(e),e.layerId=a(t.layer),Ae(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var r=document.createElement("div");return n.appendChild(r),r.appendChild(e),r.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,n=this._layerControlInputs,i=[],o=[];this._handlingClick=!0;for(var r=n.length-1;r>=0;r--)t=n[r],e=this._getLayer(t.layerId).layer,t.checked?i.push(e):t.checked||o.push(e);for(r=0;r<o.length;r++)this._map.hasLayer(o[r])&&this._map.removeLayer(o[r]);for(r=0;r<i.length;r++)this._map.hasLayer(i[r])||this._map.addLayer(i[r]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,n=this._layerControlInputs,i=this._map.getZoom(),o=n.length-1;o>=0;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&i<e.options.minZoom||void 0!==e.options.maxZoom&&i>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),sn=function(t,e,n){return new an(t,e,n)},ln=on.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=ue("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,i,o){var r=ue("a",n,i);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),He(r),Ae(r,"click",We),Ae(r,"click",o,this),Ae(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";ge(this._zoomInButton,e),ge(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&me(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&me(this._zoomInButton,e)}});en.mergeOptions({zoomControl:!0}),en.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new ln,this.addControl(this.zoomControl))}));var hn=function(t){return new ln(t)},un=on.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=ue("div",e),i=this.options;return this._addScales(i,e+"-line",n),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=ue("div",e,n)),t.imperial&&(this._iScale=ue("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},_updateImperial:function(t){var e,n,i,o=3.2808399*t;o>5280?(e=o/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mi",n/e)):(i=this._getRoundNum(o),this._updateScale(this._iScale,i+" ft",i/o))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),cn=function(t){return new un(t)},pn=on.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){d(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=ue("div","leaflet-control-attribution"),He(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(" | ")}}});en.mergeOptions({attributionControl:!0}),en.addInitHook((function(){this.options.attributionControl&&(new pn).addTo(this)}));var dn=function(t){return new pn(t)};on.Layers=an,on.Zoom=ln,on.Scale=un,on.Attribution=pn,rn.layers=sn,rn.zoom=hn,rn.scale=cn,rn.attribution=dn;var fn=T.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});fn.addTo=function(t,e){return t.addHandler(e,this),this};var _n,mn={Events:z},gn=kt?"touchstart mousedown":"mousedown",yn={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},vn={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},bn=O.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){d(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(Ae(this._dragStartTarget,gn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(bn._dragging===this&&this.finishDrag(),Be(this._dragStartTarget,gn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!_e(this._element,"leaflet-zoom-anim")&&!(bn._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(bn._dragging=this,this._preventOutline&&Te(this._element),Pe(),te(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t,n=ze(this._element);this._startPoint=new D(e.clientX,e.clientY),this._parentScale=Oe(n),Ae(document,vn[t.type],this._onMove,this),Ae(document,yn[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new D(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,Fe(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=Me(this._element).subtract(n),me(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),me(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,P(this._animRequest),this._lastEvent=t,this._animRequest=C(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),ke(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in ge(document.body,"leaflet-dragging"),this._lastTarget&&(ge(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),vn)Be(document,vn[t],this._onMove,this),Be(document,yn[t],this._onUp,this);Ee(),ee(),this._moved&&this._moving&&(P(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,bn._dragging=!1}});function Ln(t,e){if(!e||!t.length)return t.slice();var n=e*e;return t=kn(t=Cn(t,n),n)}function wn(t,e,n){return Math.sqrt(zn(t,e,n,!0))}function xn(t,e,n){return zn(t,e,n)}function kn(t,e){var n=t.length,i=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,Mn(t,i,e,0,n-1);var o,r=[];for(o=0;o<n;o++)i[o]&&r.push(t[o]);return r}function Mn(t,e,n,i,o){var r,a,s,l=0;for(a=i+1;a<=o-1;a++)(s=zn(t[a],t[i],t[o],!0))>l&&(r=a,l=s);l>n&&(e[r]=1,Mn(t,e,n,i,r),Mn(t,e,n,r,o))}function Cn(t,e){for(var n=[t[0]],i=1,o=0,r=t.length;i<r;i++)Sn(t[i],t[o])>e&&(n.push(t[i]),o=i);return o<r-1&&n.push(t[r-1]),n}function Pn(t,e,n,i,o){var r,a,s,l=i?_n:Tn(t,n),h=Tn(e,n);for(_n=h;;){if(!(l|h))return[t,e];if(l&h)return!1;s=Tn(a=En(t,e,r=l||h,n,o),n),r===l?(t=a,l=s):(e=a,h=s)}}function En(t,e,n,i,o){var r,a,s=e.x-t.x,l=e.y-t.y,h=i.min,u=i.max;return 8&n?(r=t.x+s*(u.y-t.y)/l,a=u.y):4&n?(r=t.x+s*(h.y-t.y)/l,a=h.y):2&n?(r=u.x,a=t.y+l*(u.x-t.x)/s):1&n&&(r=h.x,a=t.y+l*(h.x-t.x)/s),new D(r,a,o)}function Tn(t,e){var n=0;return t.x<e.min.x?n|=1:t.x>e.max.x&&(n|=2),t.y<e.min.y?n|=4:t.y>e.max.y&&(n|=8),n}function Sn(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function zn(t,e,n,i){var o,r=e.x,a=e.y,s=n.x-r,l=n.y-a,h=s*s+l*l;return h>0&&((o=((t.x-r)*s+(t.y-a)*l)/h)>1?(r=n.x,a=n.y):o>0&&(r+=s*o,a+=l*o)),s=t.x-r,l=t.y-a,i?s*s+l*l:new D(r,a)}function On(t){return!g(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Dn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),On(t)}var An={simplify:Ln,pointToSegmentDistance:wn,closestPointOnSegment:xn,clipSegment:Pn,_getEdgeIntersection:En,_getBitCode:Tn,_sqClosestPointOnSegment:zn,isFlat:On,_flat:Dn};function In(t,e,n){var i,o,r,a,s,l,h,u,c,p=[1,4,2,8];for(o=0,h=t.length;o<h;o++)t[o]._code=Tn(t[o],e);for(a=0;a<4;a++){for(u=p[a],i=[],o=0,r=(h=t.length)-1;o<h;r=o++)s=t[o],l=t[r],s._code&u?l._code&u||((c=En(l,s,u,e,n))._code=Tn(c,e),i.push(c)):(l._code&u&&((c=En(l,s,u,e,n))._code=Tn(c,e),i.push(c)),i.push(s));t=i}return t}var Bn={clipPolygon:In},Nn={project:function(t){return new D(t.lng,t.lat)},unproject:function(t){return new j(t.y,t.x)},bounds:new B([-180,-90],[180,90])},Zn={R:6378137,R_MINOR:6356752.314245179,bounds:new B([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,n=this.R,i=t.lat*e,o=this.R_MINOR/n,r=Math.sqrt(1-o*o),a=r*Math.sin(i),s=Math.tan(Math.PI/4-i/2)/Math.pow((1-a)/(1+a),r/2);return i=-n*Math.log(Math.max(s,1e-10)),new D(t.lng*e*n,i)},unproject:function(t){for(var e,n=180/Math.PI,i=this.R,o=this.R_MINOR/i,r=Math.sqrt(1-o*o),a=Math.exp(-t.y/i),s=Math.PI/2-2*Math.atan(a),l=0,h=.1;l<15&&Math.abs(h)>1e-7;l++)e=r*Math.sin(s),e=Math.pow((1-e)/(1+e),r/2),s+=h=Math.PI/2-2*Math.atan(a*e)-s;return new j(s*n,t.x*n/i)}},Rn={LonLat:Nn,Mercator:Zn,SphericalMercator:V},jn=n({},F,{code:"EPSG:3395",projection:Zn,transformation:function(){var t=.5/(Math.PI*Zn.R);return Y(t,.5,-t,.5)}()}),Gn=n({},F,{code:"EPSG:4326",projection:Nn,transformation:Y(1/180,1,-1/180,.5)}),Un=n({},H,{projection:Nn,transformation:Y(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var n=e.lng-t.lng,i=e.lat-t.lat;return Math.sqrt(n*n+i*i)},infinite:!0});H.Earth=F,H.EPSG3395=jn,H.EPSG3857=K,H.EPSG900913=X,H.EPSG4326=Gn,H.Simple=Un;var Hn=O.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[a(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[a(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var n=this.getEvents();e.on(n,this),this.once("remove",(function(){e.off(n,this)}),this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});en.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=a(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=a(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&a(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?g(t)?t:[t]:[]).length;e<n;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[a(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=a(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,n=this._getZoomSpan();for(var i in this._zoomBoundLayers){var o=this._zoomBoundLayers[i].options;t=void 0===o.minZoom?t:Math.min(t,o.minZoom),e=void 0===o.maxZoom?e:Math.max(e,o.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Fn=Hn.extend({initialize:function(t,e){var n,i;if(d(this,e),this._layers={},t)for(n=0,i=t.length;n<i;n++)this.addLayer(t[n])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,n,i=Array.prototype.slice.call(arguments,1);for(e in this._layers)(n=this._layers[e])[t]&&n[t].apply(n,i);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return a(t)}}),Wn=function(t,e){return new Fn(t,e)},Vn=Fn.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Fn.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),Fn.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new Z;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),qn=function(t,e){return new Vn(t,e)},Yn=T.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){d(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var n=this._getIconUrl(t);if(!n){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var i=this._createImg(n,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(i,t),i},_setIconStyles:function(t,e){var n=this.options,i=n[e+"Size"];"number"==typeof i&&(i=[i,i]);var o=I(i),r=I("shadow"===e&&n.shadowAnchor||n.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(n.className||""),r&&(t.style.marginLeft=-r.x+"px",t.style.marginTop=-r.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Pt&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function Kn(t){return new Yn(t)}var Xn=Yn.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return Xn.imagePath||(Xn.imagePath=this._detectIconPath()),(this.options.imagePath||Xn.imagePath)+Yn.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=ue("div","leaflet-default-icon-path",document.body),e=he(t,"background-image")||he(t,"backgroundImage");return document.body.removeChild(t),e=null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Jn=fn.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new bn(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),me(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&ge(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,n=e._map,i=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,r=Me(e._icon),a=n.getPixelBounds(),s=n.getPixelOrigin(),l=N(a.min._subtract(s).add(o),a.max._subtract(s).subtract(o));if(!l.contains(r)){var h=I((Math.max(l.max.x,r.x)-l.max.x)/(a.max.x-l.max.x)-(Math.min(l.min.x,r.x)-l.min.x)/(a.min.x-l.min.x),(Math.max(l.max.y,r.y)-l.max.y)/(a.max.y-l.max.y)-(Math.min(l.min.y,r.y)-l.min.y)/(a.min.y-l.min.y)).multiplyBy(i);n.panBy(h,{animate:!1}),this._draggable._newPos._add(h),this._draggable._startPos._add(h),ke(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=C(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(P(this._panRequest),this._panRequest=C(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,n=e._shadow,i=Me(e._icon),o=e._map.layerPointToLatLng(i);n&&ke(n,i),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){P(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Qn=Hn.extend({options:{icon:new Xn,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){d(this,e),this._latlng=G(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=G(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=t.icon.createIcon(this._icon),i=!1;n!==this._icon&&(this._icon&&this._removeIcon(),i=!0,t.title&&(n.title=t.title),"IMG"===n.tagName&&(n.alt=t.alt||"")),me(n,e),t.keyboard&&(n.tabIndex="0"),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var o=t.icon.createShadow(this._shadow),r=!1;o!==this._shadow&&(this._removeShadow(),r=!0),o&&(me(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),i&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&r&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),ce(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ce(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&ke(this._icon,t),this._shadow&&ke(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(me(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Jn)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Jn(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&be(this._icon,t),this._shadow&&be(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function $n(t,e){return new Qn(t,e)}var ti=Hn.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return d(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),ei=ti.extend({options:{fill:!0,radius:10},initialize:function(t,e){d(this,e),this._latlng=G(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=G(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return ti.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,n=this._clickTolerance(),i=[t+n,e+n];this._pxBounds=new B(this._point.subtract(i),this._point.add(i))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function ni(t,e){return new ei(t,e)}var ii=ei.extend({initialize:function(t,e,i){if("number"==typeof e&&(e=n({},i,{radius:e})),d(this,e),this._latlng=G(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new Z(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:ti.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,n=this._map,i=n.options.crs;if(i.distance===F.distance){var o=Math.PI/180,r=this._mRadius/F.R/o,a=n.project([e+r,t]),s=n.project([e-r,t]),l=a.add(s).divideBy(2),h=n.unproject(l).lat,u=Math.acos((Math.cos(r*o)-Math.sin(e*o)*Math.sin(h*o))/(Math.cos(e*o)*Math.cos(h*o)))/o;(isNaN(u)||0===u)&&(u=r/Math.cos(Math.PI/180*e)),this._point=l.subtract(n.getPixelOrigin()),this._radius=isNaN(u)?0:l.x-n.project([h,t-u]).x,this._radiusY=l.y-a.y}else{var c=i.unproject(i.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(c).x}this._updateBounds()}});function oi(t,e,n){return new ii(t,e,n)}var ri=ti.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){d(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,n,i=1/0,o=null,r=zn,a=0,s=this._parts.length;a<s;a++)for(var l=this._parts[a],h=1,u=l.length;h<u;h++){var c=r(t,e=l[h-1],n=l[h],!0);c<i&&(i=c,o=r(t,e,n))}return o&&(o.distance=Math.sqrt(i)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,i,o,r,a,s=this._rings[0],l=s.length;if(!l)return null;for(t=0,e=0;t<l-1;t++)e+=s[t].distanceTo(s[t+1])/2;if(0===e)return this._map.layerPointToLatLng(s[0]);for(t=0,i=0;t<l-1;t++)if(o=s[t],r=s[t+1],(i+=n=o.distanceTo(r))>e)return a=(i-e)/n,this._map.layerPointToLatLng([r.x-a*(r.x-o.x),r.y-a*(r.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=G(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new Z,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return On(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=On(t),i=0,o=t.length;i<o;i++)n?(e[i]=G(t[i]),this._bounds.extend(e[i])):e[i]=this._convertLatLngs(t[i]);return e},_project:function(){var t=new B;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new D(t,t);this._pxBounds=new B([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)])},_projectLatlngs:function(t,e,n){var i,o,r=t[0]instanceof j,a=t.length;if(r){for(o=[],i=0;i<a;i++)o[i]=this._map.latLngToLayerPoint(t[i]),n.extend(o[i]);e.push(o)}else for(i=0;i<a;i++)this._projectLatlngs(t[i],e,n)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,n,i,o,r,a,s,l=this._parts;for(e=0,i=0,o=this._rings.length;e<o;e++)for(n=0,r=(s=this._rings[e]).length;n<r-1;n++)(a=Pn(s[n],s[n+1],t,n,!0))&&(l[i]=l[i]||[],l[i].push(a[0]),a[1]===s[n+1]&&n!==r-2||(l[i].push(a[1]),i++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,n=0,i=t.length;n<i;n++)t[n]=Ln(t[n],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var n,i,o,r,a,s,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,r=this._parts.length;n<r;n++)for(i=0,o=(a=(s=this._parts[n]).length)-1;i<a;o=i++)if((e||0!==i)&&wn(t,s[o],s[i])<=l)return!0;return!1}});function ai(t,e){return new ri(t,e)}ri._flat=Dn;var si=ri.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,i,o,r,a,s,l,h=this._rings[0],u=h.length;if(!u)return null;for(r=a=s=0,t=0,e=u-1;t<u;e=t++)n=h[t],i=h[e],o=n.y*i.x-i.y*n.x,a+=(n.x+i.x)*o,s+=(n.y+i.y)*o,r+=3*o;return l=0===r?h[0]:[a/r,s/r],this._map.layerPointToLatLng(l)},_convertLatLngs:function(t){var e=ri.prototype._convertLatLngs.call(this,t),n=e.length;return n>=2&&e[0]instanceof j&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){ri.prototype._setLatLngs.call(this,t),On(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return On(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new D(e,e);if(t=new B(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,o=0,r=this._rings.length;o<r;o++)(i=In(this._rings[o],t,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,n,i,o,r,a,s,l,h=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,s=this._parts.length;o<s;o++)for(r=0,a=(l=(e=this._parts[o]).length)-1;r<l;a=r++)n=e[r],i=e[a],n.y>t.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(h=!h);return h||ri.prototype._containsPoint.call(this,t,!0)}});function li(t,e){return new si(t,e)}var hi=Vn.extend({initialize:function(t,e){d(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,o=g(t)?t:t.features;if(o){for(e=0,n=o.length;e<n;e++)((i=o[e]).geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var r=this.options;if(r.filter&&!r.filter(t))return this;var a=ui(t,r);return a?(a.feature=gi(t),a.defaultOptions=a.options,this.resetStyle(a),r.onEachFeature&&r.onEachFeature(t,a),this.addLayer(a)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=n({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer((function(e){this._setLayerStyle(e,t)}),this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function ui(t,e){var n,i,o,r,a="Feature"===t.type?t.geometry:t,s=a?a.coordinates:null,l=[],h=e&&e.pointToLayer,u=e&&e.coordsToLatLng||pi;if(!s&&!a)return null;switch(a.type){case"Point":return ci(h,t,n=u(s),e);case"MultiPoint":for(o=0,r=s.length;o<r;o++)n=u(s[o]),l.push(ci(h,t,n,e));return new Vn(l);case"LineString":case"MultiLineString":return i=di(s,"LineString"===a.type?0:1,u),new ri(i,e);case"Polygon":case"MultiPolygon":return i=di(s,"Polygon"===a.type?1:2,u),new si(i,e);case"GeometryCollection":for(o=0,r=a.geometries.length;o<r;o++){var c=ui({geometry:a.geometries[o],type:"Feature",properties:t.properties},e);c&&l.push(c)}return new Vn(l);default:throw new Error("Invalid GeoJSON object.")}}function ci(t,e,n,i){return t?t(e,n):new Qn(n,i&&i.markersInheritOptions&&i)}function pi(t){return new j(t[1],t[0],t[2])}function di(t,e,n){for(var i,o=[],r=0,a=t.length;r<a;r++)i=e?di(t[r],e-1,n):(n||pi)(t[r]),o.push(i);return o}function fi(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[u(t.lng,e),u(t.lat,e),u(t.alt,e)]:[u(t.lng,e),u(t.lat,e)]}function _i(t,e,n,i){for(var o=[],r=0,a=t.length;r<a;r++)o.push(e?_i(t[r],e-1,n,i):fi(t[r],i));return!e&&n&&o.push(o[0]),o}function mi(t,e){return t.feature?n({},t.feature,{geometry:e}):gi(e)}function gi(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var yi={toGeoJSON:function(t){return mi(this,{type:"Point",coordinates:fi(this.getLatLng(),t)})}};function vi(t,e){return new hi(t,e)}Qn.include(yi),ii.include(yi),ei.include(yi),ri.include({toGeoJSON:function(t){var e=!On(this._latlngs);return mi(this,{type:(e?"Multi":"")+"LineString",coordinates:_i(this._latlngs,e?1:0,!1,t)})}}),si.include({toGeoJSON:function(t){var e=!On(this._latlngs),n=e&&!On(this._latlngs[0]),i=_i(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),mi(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),Fn.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(n){e.push(n.toGeoJSON(t).geometry.coordinates)})),mi(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var n="GeometryCollection"===e,i=[];return this.eachLayer((function(e){if(e.toGeoJSON){var o=e.toGeoJSON(t);if(n)i.push(o.geometry);else{var r=gi(o);"FeatureCollection"===r.type?i.push.apply(i,r.features):i.push(r)}}})),n?mi(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var bi=vi,Li=Hn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=R(e),d(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(me(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ce(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&de(this._image),this},bringToBack:function(){return this._map&&fe(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=R(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:ue("img");me(e,"leaflet-image-layer"),this._zoomAnimated&&me(e,"leaflet-zoom-animated"),this.options.className&&me(e,this.options.className),e.onselectstart=h,e.onmousemove=h,e.onload=o(this.fire,this,"load"),e.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;xe(this._image,n,e)},_reset:function(){var t=this._image,e=new B(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();ke(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){be(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}}),wi=function(t,e,n){return new Li(t,e,n)},xi=Li.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:ue("video");if(me(e,"leaflet-image-layer"),this._zoomAnimated&&me(e,"leaflet-zoom-animated"),this.options.className&&me(e,this.options.className),e.onselectstart=h,e.onmousemove=h,e.onloadeddata=o(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),i=[],r=0;r<n.length;r++)i.push(n[r].src);this._url=n.length>0?i:[e.src]}else{g(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted;for(var a=0;a<this._url.length;a++){var s=ue("source");s.src=this._url[a],e.appendChild(s)}}}});function ki(t,e,n){return new xi(t,e,n)}var Mi=Li.extend({_initImage:function(){var t=this._image=this._url;me(t,"leaflet-image-layer"),this._zoomAnimated&&me(t,"leaflet-zoom-animated"),this.options.className&&me(t,this.options.className),t.onselectstart=h,t.onmousemove=h}});function Ci(t,e,n){return new Mi(t,e,n)}var Pi=Hn.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){d(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&be(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&be(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(be(this._container,0),this._removeTimeout=setTimeout(o(ce,void 0,this._container),200)):ce(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=G(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&de(this._container),this},bringToBack:function(){return this._map&&fe(this._container),this},_prepareOpen:function(t,e,n){if(e instanceof Hn||(n=e,e=t),e instanceof Vn)for(var i in t._layers){e=t._layers[i];break}if(!n)if(e.getCenter)n=e.getCenter();else{if(!e.getLatLng)throw new Error("Unable to get source layer LatLng.");n=e.getLatLng()}return this._source=e,this.update(),n},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=I(this.options.offset),n=this._getAnchor();this._zoomAnimated?ke(this._container,t.add(n)):e=e.add(t).add(n);var i=this._containerBottom=-e.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=i+"px",this._container.style.left=o+"px"}},_getAnchor:function(){return[0,0]}}),Ei=Pi.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){Pi.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof ti||this._source.on("preclick",Ge))},onRemove:function(t){Pi.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof ti||this._source.off("preclick",Ge))},getEvents:function(){var t=Pi.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=ue("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=ue("div",t+"-content-wrapper",e);if(this._contentNode=ue("div",t+"-content",n),He(e),Ue(this._contentNode),Ae(e,"contextmenu",Ge),this._tipContainer=ue("div",t+"-tip-container",e),this._tip=ue("div",t+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=ue("a",t+"-close-button",e);i.href="#close",i.innerHTML="×",Ae(i,"click",this._onCloseButtonClick,this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var n=t.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),e.width=n+1+"px",e.whiteSpace="",e.height="";var i=t.offsetHeight,o=this.options.maxHeight,r="leaflet-popup-scrolled";o&&i>o?(e.height=o+"px",me(t,r)):ge(t,r),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();ke(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(he(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,o=new D(this._containerLeft,-n-this._containerBottom);o._add(Me(this._container));var r=t.layerPointToContainerPoint(o),a=I(this.options.autoPanPadding),s=I(this.options.autoPanPaddingTopLeft||a),l=I(this.options.autoPanPaddingBottomRight||a),h=t.getSize(),u=0,c=0;r.x+i+l.x>h.x&&(u=r.x+i-h.x+l.x),r.x-u-s.x<0&&(u=r.x-s.x),r.y+n+l.y>h.y&&(c=r.y+n-h.y+l.y),r.y-c-s.y<0&&(c=r.y-s.y),(u||c)&&t.fire("autopanstart").panBy([u,c])}},_onCloseButtonClick:function(t){this._close(),We(t)},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Ti=function(t,e){return new Ei(t,e)};en.mergeOptions({closePopupOnClick:!0}),en.include({openPopup:function(t,e,n){return t instanceof Ei||(t=new Ei(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Hn.include({bindPopup:function(t,e){return t instanceof Ei?(d(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new Ei(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&(We(t),e instanceof ti?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Si=Pi.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){Pi.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){Pi.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=Pi.prototype.getEvents.call(this);return kt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ue("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n,i=this._map,o=this._container,r=i.latLngToContainerPoint(i.getCenter()),a=i.layerPointToContainerPoint(t),s=this.options.direction,l=o.offsetWidth,h=o.offsetHeight,u=I(this.options.offset),c=this._getAnchor();"top"===s?(e=l/2,n=h):"bottom"===s?(e=l/2,n=0):"center"===s?(e=l/2,n=h/2):"right"===s?(e=0,n=h/2):"left"===s?(e=l,n=h/2):a.x<r.x?(s="right",e=0,n=h/2):(s="left",e=l+2*(u.x+c.x),n=h/2),t=t.subtract(I(e,n,!0)).add(u).add(c),ge(o,"leaflet-tooltip-right"),ge(o,"leaflet-tooltip-left"),ge(o,"leaflet-tooltip-top"),ge(o,"leaflet-tooltip-bottom"),me(o,"leaflet-tooltip-"+s),ke(o,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&be(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return I(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),zi=function(t,e){return new Si(t,e)};en.include({openTooltip:function(t,e,n){return t instanceof Si||(t=new Si(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),Hn.include({bindTooltip:function(t,e){return t instanceof Si?(d(t,e),this._tooltip=t,t._source=this):(this._tooltip&&!e||(this._tooltip=new Si(e,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),kt&&(n.click=this._openTooltip)),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){return this._tooltip&&this._map&&(e=this._tooltip._prepareOpen(this,t,e),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(me(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(ge(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var e=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(e,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,n,i=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(e),i=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(i)}});var Oi=Yn.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),n=this.options;if(n.html instanceof Element?(pe(e),e.appendChild(n.html)):e.innerHTML=!1!==n.html?n.html:"",n.bgPos){var i=I(n.bgPos);e.style.backgroundPosition=-i.x+"px "+-i.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function Di(t){return new Oi(t)}Yn.Default=Xn;var Ai=Hn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:vt,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){d(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),ce(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(de(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(fe(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=s(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof D?t:new D(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,n=this.getPane().children,i=-t(-1/0,1/0),o=0,r=n.length;o<r;o++)e=n[o].style.zIndex,n[o]!==this._container&&e&&(i=t(i,+e));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!et){be(this._container,this.options.opacity);var t=+new Date,e=!1,n=!1;for(var i in this._tiles){var o=this._tiles[i];if(o.current&&o.loaded){var r=Math.min(1,(t-o.loaded)/200);be(o.el,r),r<1?e=!0:(o.active?n=!0:this._onOpaqueTile(o),o.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),e&&(P(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this))}},_onOpaqueTile:h,_initContainer:function(){this._container||(this._container=ue("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===t?(this._levels[n].el.style.zIndex=e-Math.abs(t-n),this._onUpdateLevel(n)):(ce(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var i=this._levels[t],o=this._map;return i||((i=this._levels[t]={}).el=ue("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=e,i.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),i.zoom=t,this._setZoomTransform(i,o.getCenter(),o.getZoom()),h(i.el.offsetWidth),this._onCreateLevel(i)),this._level=i,i}},_onUpdateLevel:h,_onRemoveLevel:h,_onCreateLevel:h,_pruneTiles:function(){if(this._map){var t,e,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var i=e.coords;this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)ce(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,n,i){var o=Math.floor(t/2),r=Math.floor(e/2),a=n-1,s=new D(+o,+r);s.z=+a;var l=this._tileCoordsToKey(s),h=this._tiles[l];return h&&h.active?(h.retain=!0,!0):(h&&h.loaded&&(h.retain=!0),a>i&&this._retainParent(o,r,a,i))},_retainChildren:function(t,e,n,i){for(var o=2*t;o<2*t+2;o++)for(var r=2*e;r<2*e+2;r++){var a=new D(o,r);a.z=n+1;var s=this._tileCoordsToKey(a),l=this._tiles[s];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1<i&&this._retainChildren(o,r,n+1,i))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,n,i){var o=Math.round(e);o=void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom?void 0:this._clampZoom(o);var r=this.options.updateWhenZooming&&o!==this._tileZoom;i&&!r||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var n in this._levels)this._setZoomTransform(this._levels[n],t,e)},_setZoomTransform:function(t,e,n){var i=this._map.getZoomScale(n,t.zoom),o=t.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(e,n)).round();yt?xe(t.el,o,i):ke(t.el,o)},_resetGrid:function(){var t=this._map,e=t.options.crs,n=this._tileSize=this.getTileSize(),i=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],i).x/n.x),Math.ceil(t.project([0,e.wrapLng[1]],i).x/n.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],i).y/n.x),Math.ceil(t.project([e.wrapLat[1],0],i).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,n=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),i=e.getZoomScale(n,this._tileZoom),o=e.project(t,this._tileZoom).floor(),r=e.getSize().divideBy(2*i);return new B(o.subtract(r),o.add(r))},_update:function(t){var e=this._map;if(e){var n=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var i=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(i),r=o.getCenter(),a=[],s=this.options.keepBuffer,l=new B(o.getBottomLeft().subtract([s,-s]),o.getTopRight().add([s,-s]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var h in this._tiles){var u=this._tiles[h].coords;u.z===this._tileZoom&&l.contains(new D(u.x,u.y))||(this._tiles[h].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(t,n);else{for(var c=o.min.y;c<=o.max.y;c++)for(var p=o.min.x;p<=o.max.x;p++){var d=new D(p,c);if(d.z=this._tileZoom,this._isValidTile(d)){var f=this._tiles[this._tileCoordsToKey(d)];f?f.current=!0:a.push(d)}}if(a.sort((function(t,e){return t.distanceTo(r)-e.distanceTo(r)})),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var _=document.createDocumentFragment();for(p=0;p<a.length;p++)this._addTile(a[p],_);this._level.el.appendChild(_)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var n=this._globalTileRange;if(!e.wrapLng&&(t.x<n.min.x||t.x>n.max.x)||!e.wrapLat&&(t.y<n.min.y||t.y>n.max.y))return!1}if(!this.options.bounds)return!0;var i=this._tileCoordsToBounds(t);return R(this.options.bounds).overlaps(i)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n),o=i.add(n);return[e.unproject(i,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new Z(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new D(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(ce(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){me(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=h,t.onmousemove=h,et&&this.options.opacity<1&&be(t,this.options.opacity),ot&&!rt&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),r=this.createTile(this._wrapCoords(t),o(this._tileReady,this,t));this._initTile(r),this.createTile.length<2&&C(o(this._tileReady,this,t,null,r)),ke(r,n),this._tiles[i]={el:r,coords:t,current:!0},e.appendChild(r),this.fire("tileloadstart",{tile:r,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var i=this._tileCoordsToKey(t);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(be(n.el,0),P(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(me(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),et||!this._map._fadeAnimated?C(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new D(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new B(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function Ii(t){return new Ai(t)}var Bi=Ai.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=d(this,e)).detectRetina&&Pt&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),ot||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return Ae(n,"load",o(this._tileOnLoad,this,e,n)),Ae(n,"error",o(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:Pt?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return m(this._url,n(e,this.options))},_tileOnLoad:function(t,e){et?setTimeout(o(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var i=this.options.errorTileUrl;i&&e.getAttribute("src")!==i&&(e.src=i),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=h,e.onerror=h,e.complete||(e.src=v,ce(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return st||e.el.setAttribute("src",v),Ai.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==v))return Ai.prototype._tileReady.call(this,t,e,n)}});function Ni(t,e){return new Bi(t,e)}var Zi=Bi.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=n({},this.defaultWmsParams);for(var o in e)o in this.options||(i[o]=e[o]);var r=(e=d(this,e)).detectRetina&&Pt?2:1,a=this.getTileSize();i.width=a.x*r,i.height=a.y*r,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,Bi.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,i=N(n.project(e[0]),n.project(e[1])),o=i.min,r=i.max,a=(this._wmsVersion>=1.3&&this._crs===Gn?[o.y,o.x,r.y,r.x]:[o.x,o.y,r.x,r.y]).join(","),s=Bi.prototype.getTileUrl.call(this,t);return s+f(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function(t,e){return n(this.wmsParams,t),e||this.redraw(),this}});function Ri(t,e){return new Zi(t,e)}Bi.WMS=Zi,Ni.wms=Ri;var ji=Hn.extend({options:{padding:.1,tolerance:0},initialize:function(t){d(this,t),a(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&me(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var n=this._map.getZoomScale(e,this._zoom),i=Me(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,e),a=this._map.project(t,e).subtract(r),s=o.multiplyBy(-n).add(i).add(o).subtract(a);yt?xe(this._container,s,n):ke(this._container,s)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new B(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Gi=ji.extend({getEvents:function(){var t=ji.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ji.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Ae(t,"mousemove",this._onMouseMove,this),Ae(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ae(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){P(this._redrawRequest),delete this._ctx,ce(this._container),Be(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){ji.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=Pt?2:1;ke(e,t.min),e.width=i*n.x,e.height=i*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",Pt&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){ji.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[a(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,n=e.next,i=e.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete t._order,delete this._layers[a(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,n,i=t.options.dashArray.split(/[, ]+/),o=[];for(n=0;n<i.length;n++){if(e=Number(i[n]),isNaN(e))return;o.push(e)}t.options._dashArray=o}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||C(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new B,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var n=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var i=this._drawFirst;i;i=i.next)t=i.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var n,i,o,r,a=t._parts,s=a.length,l=this._ctx;if(s){for(l.beginPath(),n=0;n<s;n++){for(i=0,o=a[n].length;i<o;i++)r=a[n][i],l[i?"lineTo":"moveTo"](r.x,r.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,n=this._ctx,i=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||i)/i;1!==o&&(n.save(),n.scale(1,o)),n.beginPath(),n.arc(e.x,e.y/o,i,0,2*Math.PI,!1),1!==o&&n.restore(),this._fillStroke(n,t)}},_fillStroke:function(t,e){var n=e.options;n.fill&&(t.globalAlpha=n.fillOpacity,t.fillStyle=n.fillColor||n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=n.opacity,t.lineWidth=n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())},_onClick:function(t){for(var e,n,i=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(i)&&("click"!==t.type&&"preclick"===t.type||!this._map._draggableMoved(e))&&(n=e);n&&(Xe(t),this._fireEvent([n],t))},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(ge(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var n,i,r=this._drawFirst;r;r=r.next)(n=r.layer).options.interactive&&n._containsPoint(e)&&(i=n);i!==this._hoveredLayer&&(this._handleMouseOut(t),i&&(me(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(o((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,e,n){this._map._fireDOMEvent(e,n||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;n&&(n.prev=i,i?i.next=n:n&&(this._drawFirst=n),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;i&&(i.next=n,n?n.prev=i:i&&(this._drawLast=i),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function Ui(t){return Tt?new Gi(t):null}var Hi=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),Fi={_initContainer:function(){this._container=ue("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ji.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Hi("shape");me(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Hi("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ce(e),t.removeInteractiveTarget(e),delete this._layers[a(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,o=t._container;o.stroked=!!i.stroke,o.filled=!!i.fill,i.stroke?(e||(e=t._stroke=Hi("stroke")),o.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=g(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(o.removeChild(e),t._stroke=null),i.fill?(n||(n=t._fill=Hi("fill")),o.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(o.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){de(t._container)},_bringToBack:function(t){fe(t._container)}},Wi=zt?Hi:J,Vi=ji.extend({getEvents:function(){var t=ji.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=Wi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Wi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ce(this._container),Be(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){ji.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),ke(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=Wi("path");t.options.className&&me(e,t.options.className),t.options.interactive&&me(e,"leaflet-interactive"),this._updateStyle(t),this._layers[a(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ce(t._path),t.removeInteractiveTarget(t._path),delete this._layers[a(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,Q(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){de(t._path)},_bringToBack:function(t){fe(t._path)}});function qi(t){return St||zt?new Vi(t):null}zt&&Vi.include(Fi),en.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&Ui(t)||qi(t)}});var Yi=si.extend({initialize:function(t,e){si.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=R(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Ki(t,e){return new Yi(t,e)}Vi.create=Wi,Vi.pointsToPath=Q,hi.geometryToLayer=ui,hi.coordsToLatLng=pi,hi.coordsToLatLngs=di,hi.latLngToCoords=fi,hi.latLngsToCoords=_i,hi.getFeature=mi,hi.asFeature=gi,en.mergeOptions({boxZoom:!0});var Xi=fn.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){Ae(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Be(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ce(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),te(),Pe(),this._startPoint=this._map.mouseEventToContainerPoint(t),Ae(document,{contextmenu:We,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ue("div","leaflet-zoom-box",this._container),me(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new B(this._point,this._startPoint),n=e.getSize();ke(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(ce(this._box),ge(this._container,"leaflet-crosshair")),ee(),Ee(),Be(document,{contextmenu:We,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var e=new Z(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});en.addInitHook("addHandler","boxZoom",Xi),en.mergeOptions({doubleClickZoom:!0});var Ji=fn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),i=e.options.zoomDelta,o=t.originalEvent.shiftKey?n-i:n+i;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});en.addInitHook("addHandler","doubleClickZoom",Ji),en.mergeOptions({dragging:!0,inertia:!rt,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Qi=fn.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new bn(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}me(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ge(this._map._container,"leaflet-grab"),ge(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=R(this._map.options.maxBounds);this._offsetLimit=N(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,i=this._draggable._newPos.x,o=(i-e+n)%t+e-n,r=(i+e+n)%t-e-n,a=Math.abs(o+n)<Math.abs(r+n)?o:r;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=a},_onDragEnd:function(t){var e=this._map,n=e.options,i=!n.inertia||this._times.length<2;if(e.fire("dragend",t),i)e.fire("moveend");else{this._prunePositions(+new Date);var o=this._lastPos.subtract(this._positions[0]),r=(this._lastTime-this._times[0])/1e3,a=n.easeLinearity,s=o.multiplyBy(a/r),l=s.distanceTo([0,0]),h=Math.min(n.inertiaMaxSpeed,l),u=s.multiplyBy(h/l),c=h/(n.inertiaDeceleration*a),p=u.multiplyBy(-c/2).round();p.x||p.y?(p=e._limitOffset(p,e.options.maxBounds),C((function(){e.panBy(p,{duration:c,easeLinearity:a,noMoveStart:!0,animate:!0})}))):e.fire("moveend")}}});en.addInitHook("addHandler","dragging",Qi),en.mergeOptions({keyboard:!0,keyboardPanDelta:80});var $i=fn.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),Ae(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Be(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,n=t.scrollTop||e.scrollTop,i=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(i,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,n,i=this._panKeys={},o=this.keyCodes;for(e=0,n=o.left.length;e<n;e++)i[o.left[e]]=[-1*t,0];for(e=0,n=o.right.length;e<n;e++)i[o.right[e]]=[t,0];for(e=0,n=o.down.length;e<n;e++)i[o.down[e]]=[0,t];for(e=0,n=o.up.length;e<n;e++)i[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,n,i=this._zoomKeys={},o=this.keyCodes;for(e=0,n=o.zoomIn.length;e<n;e++)i[o.zoomIn[e]]=t;for(e=0,n=o.zoomOut.length;e<n;e++)i[o.zoomOut[e]]=-t},_addHooks:function(){Ae(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Be(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,n=t.keyCode,i=this._map;if(n in this._panKeys)i._panAnim&&i._panAnim._inProgress||(e=this._panKeys[n],t.shiftKey&&(e=I(e).multiplyBy(3)),i.panBy(e),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds));else if(n in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!i._popup||!i._popup.options.closeOnEscapeKey)return;i.closePopup()}We(t)}}});en.addInitHook("addHandler","keyboard",$i),en.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var to=fn.extend({addHooks:function(){Ae(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Be(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Ye(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o(this._performZoom,this),i),We(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),n=this._map.options.zoomSnap||0;t._stop();var i=this._delta/(4*this._map.options.wheelPxPerZoomLevel),o=4*Math.log(2/(1+Math.exp(-Math.abs(i))))/Math.LN2,r=n?Math.ceil(o/n)*n:o,a=t._limitZoom(e+(this._delta>0?r:-r))-e;this._delta=0,this._startTime=null,a&&("center"===t.options.scrollWheelZoom?t.setZoom(e+a):t.setZoomAround(this._lastMousePos,e+a))}});en.addInitHook("addHandler","scrollWheelZoom",to),en.mergeOptions({tap:!0,tapTolerance:15});var eo=fn.extend({addHooks:function(){Ae(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Be(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(Fe(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],n=e.target;this._startPos=this._newPos=new D(e.clientX,e.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&me(n,"leaflet-active"),this._holdTimeout=setTimeout(o((function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))}),this),1e3),this._simulateEvent("mousedown",e),Ae(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),Be(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],n=e.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&ge(n,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new D(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var n=document.createEvent("MouseEvents");n._simulated=!0,e.target._simulatedClick=!0,n.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(n)}});!kt||xt&&!ct||en.addInitHook("addHandler","tap",eo),en.mergeOptions({touchZoom:kt&&!rt,bounceAtZoomLimits:!0});var no=fn.extend({addHooks:function(){me(this._map._container,"leaflet-touch-zoom"),Ae(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ge(this._map._container,"leaflet-touch-zoom"),Be(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(i)._divideBy(2))),this._startDist=n.distanceTo(i),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),Ae(document,"touchmove",this._onTouchMove,this),Ae(document,"touchend",this._onTouchEnd,this),Fe(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]),r=n.distanceTo(i)/this._startDist;if(this._zoom=e.getScaleZoom(r,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&r<1||this._zoom>e.getMaxZoom()&&r>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===r)return}else{var a=n._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===r&&0===a.x&&0===a.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),P(this._animRequest);var s=o(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=C(s,this,!0),Fe(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,P(this._animRequest),Be(document,"touchmove",this._onTouchMove,this),Be(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))):this._zooming=!1}});en.addInitHook("addHandler","touchZoom",no),en.BoxZoom=Xi,en.DoubleClickZoom=Ji,en.Drag=Qi,en.Keyboard=$i,en.ScrollWheelZoom=to,en.Tap=eo,en.TouchZoom=no,t.version=e,t.Control=on,t.control=rn,t.Browser=Dt,t.Evented=O,t.Mixin=mn,t.Util=E,t.Class=T,t.Handler=fn,t.extend=n,t.bind=o,t.stamp=a,t.setOptions=d,t.DomEvent=$e,t.DomUtil=De,t.PosAnimation=tn,t.Draggable=bn,t.LineUtil=An,t.PolyUtil=Bn,t.Point=D,t.point=I,t.Bounds=B,t.bounds=N,t.Transformation=q,t.transformation=Y,t.Projection=Rn,t.LatLng=j,t.latLng=G,t.LatLngBounds=Z,t.latLngBounds=R,t.CRS=H,t.GeoJSON=hi,t.geoJSON=vi,t.geoJson=bi,t.Layer=Hn,t.LayerGroup=Fn,t.layerGroup=Wn,t.FeatureGroup=Vn,t.featureGroup=qn,t.ImageOverlay=Li,t.imageOverlay=wi,t.VideoOverlay=xi,t.videoOverlay=ki,t.SVGOverlay=Mi,t.svgOverlay=Ci,t.DivOverlay=Pi,t.Popup=Ei,t.popup=Ti,t.Tooltip=Si,t.tooltip=zi,t.Icon=Yn,t.icon=Kn,t.DivIcon=Oi,t.divIcon=Di,t.Marker=Qn,t.marker=$n,t.TileLayer=Bi,t.tileLayer=Ni,t.GridLayer=Ai,t.gridLayer=Ii,t.SVG=Vi,t.svg=qi,t.Renderer=ji,t.Canvas=Gi,t.canvas=Ui,t.Path=ti,t.CircleMarker=ei,t.circleMarker=ni,t.Circle=ii,t.circle=oi,t.Polyline=ri,t.polyline=ai,t.Polygon=si,t.polygon=li,t.Rectangle=Yi,t.rectangle=Ki,t.Map=en,t.map=nn;var io=window.L;t.noConflict=function(){return window.L=io,this},window.L=t}(e)},10:t=>{function e(t){if(!(this instanceof e))return new e(t);this._canvas=t="string"==typeof t?document.getElementById(t):t,this._ctx=t.getContext("2d"),this._width=t.width,this._height=t.height,this._max=1,this._data=[]}t.exports=e,e.prototype={defaultRadius:25,defaultGradient:{.4:"blue",.6:"cyan",.7:"lime",.8:"yellow",1:"red"},data:function(t){return this._data=t,this},max:function(t){return this._max=t,this},add:function(t){return this._data.push(t),this},clear:function(){return this._data=[],this},radius:function(t,e){e=void 0===e?15:e;var n=this._circle=this._createCanvas(),i=n.getContext("2d"),o=this._r=t+e;return n.width=n.height=2*o,i.shadowOffsetX=i.shadowOffsetY=2*o,i.shadowBlur=e,i.shadowColor="black",i.beginPath(),i.arc(-o,-o,t,0,2*Math.PI,!0),i.closePath(),i.fill(),this},resize:function(){this._width=this._canvas.width,this._height=this._canvas.height},gradient:function(t){var e=this._createCanvas(),n=e.getContext("2d"),i=n.createLinearGradient(0,0,0,256);for(var o in e.width=1,e.height=256,t)i.addColorStop(+o,t[o]);return n.fillStyle=i,n.fillRect(0,0,1,256),this._grad=n.getImageData(0,0,1,256).data,this},draw:function(t){this._circle||this.radius(this.defaultRadius),this._grad||this.gradient(this.defaultGradient);var e=this._ctx;e.clearRect(0,0,this._width,this._height);for(var n,i=0,o=this._data.length;i<o;i++)n=this._data[i],e.globalAlpha=Math.max(n[2]/this._max,void 0===t?.05:t),e.drawImage(this._circle,n[0]-this._r,n[1]-this._r);var r=e.getImageData(0,0,this._width,this._height);return this._colorize(r.data,this._grad),e.putImageData(r,0,0),this},_colorize:function(t,e){for(var n,i=0,o=t.length;i<o;i+=4)(n=4*t[i+3])&&(t[i]=e[n],t[i+1]=e[n+1],t[i+2]=e[n+2])},_createCanvas:function(){return"undefined"!=typeof document?document.createElement("canvas"):new this._canvas.constructor}}},684:(t,e,n)=>{var i=n(402),o=n.n(i),r=n(36),a=n.n(r),s=n(793),l=n.n(s),h=n(892),u=n.n(h),c=n(173),p=n.n(c),d=n(464),f=n.n(d),_=n(363),m={};m.styleTagTransform=f(),m.setAttributes=u(),m.insert=l().bind(null,"head"),m.domAPI=a(),m.insertStyleElement=p(),o()(_.Z,m),_.Z&&_.Z.locals&&_.Z.locals},152:(t,e,n)=>{var i=n(402),o=n.n(i),r=n(36),a=n.n(r),s=n(793),l=n.n(s),h=n(892),u=n.n(h),c=n(173),p=n.n(c),d=n(464),f=n.n(d),_=n(134),m={};m.styleTagTransform=f(),m.setAttributes=u(),m.insert=l().bind(null,"head"),m.domAPI=a(),m.insertStyleElement=p(),o()(_.Z,m),_.Z&&_.Z.locals&&_.Z.locals},738:(t,e,n)=>{var i=n(402),o=n.n(i),r=n(36),a=n.n(r),s=n(793),l=n.n(s),h=n(892),u=n.n(h),c=n(173),p=n.n(c),d=n(464),f=n.n(d),_=n(182),m={};m.styleTagTransform=f(),m.setAttributes=u(),m.insert=l().bind(null,"head"),m.domAPI=a(),m.insertStyleElement=p(),o()(_.Z,m),_.Z&&_.Z.locals&&_.Z.locals},72:(t,e,n)=>{var i=n(402),o=n.n(i),r=n(36),a=n.n(r),s=n(793),l=n.n(s),h=n(892),u=n.n(h),c=n(173),p=n.n(c),d=n(464),f=n.n(d),_=n(138),m={};m.styleTagTransform=f(),m.setAttributes=u(),m.insert=l().bind(null,"head"),m.domAPI=a(),m.insertStyleElement=p(),o()(_.Z,m),_.Z&&_.Z.locals&&_.Z.locals},402:t=>{var e=[];function n(t){for(var n=-1,i=0;i<e.length;i++)if(e[i].identifier===t){n=i;break}return n}function i(t,i){for(var r={},a=[],s=0;s<t.length;s++){var l=t[s],h=i.base?l[0]+i.base:l[0],u=r[h]||0,c="".concat(h," ").concat(u);r[h]=u+1;var p=n(c),d={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==p)e[p].references++,e[p].updater(d);else{var f=o(d,i);i.byIndex=s,e.splice(s,0,{identifier:c,updater:f,references:1})}a.push(c)}return a}function o(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,o){var r=i(t=t||[],o=o||{});return function(t){t=t||[];for(var a=0;a<r.length;a++){var s=n(r[a]);e[s].references--}for(var l=i(t,o),h=0;h<r.length;h++){var u=n(r[h]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}r=l}}},793:t=>{var e={};t.exports=function(t,n){var i=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}},173:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},892:(t,e,n)=>{t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},36:t=>{t.exports=function(t){var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var i="";n.supports&&(i+="@supports (".concat(n.supports,") {")),n.media&&(i+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(i+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),i+=n.css,o&&(i+="}"),n.media&&(i+="}"),n.supports&&(i+="}");var r=n.sourceMap;r&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleTagTransform(i,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},464:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},163:(t,e,n)=>{n.d(e,{ZT:()=>o});
|
|
7
|
+
/*! *****************************************************************************
|
|
8
|
+
Copyright (c) Microsoft Corporation.
|
|
9
|
+
|
|
10
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
11
|
+
purpose with or without fee is hereby granted.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
14
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
15
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
16
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
17
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
18
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
19
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
20
|
+
***************************************************************************** */
|
|
21
|
+
var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)};function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}},57:(t,e,n)=>{n.d(e,{M:()=>b});var i=n(62),o=n(402),r=n.n(o),a=n(36),s=n.n(a),l=n(793),h=n.n(l),u=n(892),c=n.n(u),p=n(173),d=n.n(p),f=n(464),_=n.n(f),m=n(282),g={};g.styleTagTransform=_(),g.setAttributes=c(),g.insert=h().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=d(),r()(m.Z,g),m.Z&&m.Z.locals&&m.Z.locals;var y={iconColor:"#1EB300",iconAnchor:{marker:[14,34],circle:[11,10],"circle-dot":[5,5],"rectangle-dot":[5,6],doughnut:[8,8]},popupAnchor:{marker:[0,-25],circle:[-3,-76],"circle-dot":[0,-2],"rectangle-dot":[0,-2],doughnut:[0,-2]},innerIconAnchor:{marker:[-2,5],circle:[0,2]},iconSize:{marker:[28,28],circle:[22,22],"circle-dot":[2,2],"rectangle-dot":[2,2],doughnut:[15,15]}},v=i.Icon.extend({options:{icon:"leaf",iconSize:y.iconSize.circle,iconAnchor:y.iconAnchor.marker,iconShape:"marker",iconStyle:"",innerIconAnchor:[0,3],innerIconStyle:"",isAlphaNumericIcon:!1,text:1,borderColor:y.iconColor,borderWidth:2,borderStyle:"solid",backgroundColor:"white",textColor:y.iconColor,customClasses:"",spin:!1,prefix:"fa",html:""},initialize:function(t){this.applyDefaults(t),this.options=t&&t.html?t:i.Util.setOptions(this,t)},applyDefaults:function(t){t&&(!t.iconSize&&t.iconShape&&(t.iconSize=y.iconSize[t.iconShape]),!t.iconAnchor&&t.iconShape&&(t.iconAnchor=y.iconAnchor[t.iconShape]),!t.popupAnchor&&t.iconShape&&(t.popupAnchor=y.popupAnchor[t.iconShape]),t.innerIconAnchor||"circle"!==t.iconShape&&"marker"!==t.iconShape||("circle"===t.iconShape&&t.isAlphaNumericIcon?t.innerIconAnchor=[0,-1]:"marker"!==t.iconShape||t.isAlphaNumericIcon||(t.innerIconAnchor=y.innerIconAnchor[t.iconShape])))},createIcon:function(){var t=document.createElement("div"),e=this.options;if(t.innerHTML=e.html?e.html:this.createIconInnerHtml(),this._setIconStyles(t),"marker"===this.options.iconShape){var n=document.createElement("div");return n.className="beautify-marker"+(e.props.owner._currSelRow===e.props.row?" selected":""),n.appendChild(t),n}return t},createIconInnerHtml:function(){var t=this.options;if("circle-dot"===t.iconShape||"rectangle-dot"===t.iconShape||"doughnut"===t.iconShape)return"";var e=this.getInnerIconStyle(t);if(t.isAlphaNumericIcon)return'<div style="'+e+'">'+t.text+"</div>";var n="";return t.spin&&(n=" fa-spin"),'<i class="'+t.prefix+" "+t.icon+n+'" style="'+e+'"></i>'},getInnerIconStyle:function(t){var e=(0,i.point)(t.innerIconAnchor);return"color:"+t.textColor+";margin-top:"+e.y+"px; margin-left:"+e.x+"px;"+t.innerIconStyle},_setIconStyles:function(t){var e=this.options,n=(0,i.point)(e.iconSize),o=(0,i.point)(e.iconAnchor);if(t.className="beautify-marker ",e.iconShape&&(t.className+=e.iconShape),e.customClasses&&(t.className+=" "+e.customClasses),t.style.backgroundColor=e.backgroundColor,t.style.color=e.textColor,t.style.borderColor=e.borderColor,t.style.borderWidth=e.borderWidth+"px",t.style.borderStyle=e.borderStyle,n&&(t.style.width=n.x+"px",t.style.height=n.y+"px"),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),e.iconStyle){var r=t.getAttribute("style");r+=e.iconStyle,t.setAttribute("style",r)}}});function b(t){return new v(t)}},132:(t,e,n)=>{n.d(e,{F:()=>He,c:()=>Ue});var i=n(163);function o(t){return t}function r(t,e){t&&s.hasOwnProperty(t.type)&&s[t.type](t,e)}var a={Feature:function(t,e){r(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,o=n.length;++i<o;)r(n[i].geometry,e)}},s={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)t=n[i],e.point(t[0],t[1],t[2])},LineString:function(t,e){l(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)l(n[i],e,0)},Polygon:function(t,e){h(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)h(n[i],e)},GeometryCollection:function(t,e){for(var n=t.geometries,i=-1,o=n.length;++i<o;)r(n[i],e)}};function l(t,e,n){var i,o=-1,r=t.length-n;for(e.lineStart();++o<r;)i=t[o],e.point(i[0],i[1],i[2]);e.lineEnd()}function h(t,e){var n=-1,i=t.length;for(e.polygonStart();++n<i;)l(t[n],e,1);e.polygonEnd()}function u(t,e){t&&a.hasOwnProperty(t.type)?a[t.type](t,e):r(t,e)}function c(){return new p}function p(){this.reset()}p.prototype={constructor:p,reset:function(){this.s=this.t=0},add:function(t){f(d,t,this.t),f(this,d.s,this.s),this.s?this.t+=d.t:this.s=d.t},valueOf:function(){return this.s}};var d=new p;function f(t,e,n){var i=t.s=e+n,o=i-e,r=i-o;t.t=e-r+(n-o)}var _=2*Math.PI,m=Math.abs,g=Math.sqrt;function y(){}var v,b,L,w,x=c(),k=c(),M={point:y,lineStart:y,lineEnd:y,polygonStart:function(){M.lineStart=C,M.lineEnd=T},polygonEnd:function(){M.lineStart=M.lineEnd=M.point=y,x.add(m(k)),k.reset()},result:function(){var t=x/2;return x.reset(),t}};function C(){M.point=P}function P(t,e){M.point=E,v=L=t,b=w=e}function E(t,e){k.add(w*t-L*e),L=t,w=e}function T(){E(v,b)}const S=M;var z=1/0,O=z,D=-z,A=D,I={point:function(t,e){t<z&&(z=t),t>D&&(D=t),e<O&&(O=e),e>A&&(A=e)},lineStart:y,lineEnd:y,polygonStart:y,polygonEnd:y,result:function(){var t=[[z,O],[D,A]];return D=A=-(O=z=1/0),t}};const B=I;var N,Z,R,j,G=0,U=0,H=0,F=0,W=0,V=0,q=0,Y=0,K=0,X={point:J,lineStart:Q,lineEnd:et,polygonStart:function(){X.lineStart=nt,X.lineEnd=it},polygonEnd:function(){X.point=J,X.lineStart=Q,X.lineEnd=et},result:function(){var t=K?[q/K,Y/K]:V?[F/V,W/V]:H?[G/H,U/H]:[NaN,NaN];return G=U=H=F=W=V=q=Y=K=0,t}};function J(t,e){G+=t,U+=e,++H}function Q(){X.point=$}function $(t,e){X.point=tt,J(R=t,j=e)}function tt(t,e){var n=t-R,i=e-j,o=g(n*n+i*i);F+=o*(R+t)/2,W+=o*(j+e)/2,V+=o,J(R=t,j=e)}function et(){X.point=J}function nt(){X.point=ot}function it(){rt(N,Z)}function ot(t,e){X.point=rt,J(N=R=t,Z=j=e)}function rt(t,e){var n=t-R,i=e-j,o=g(n*n+i*i);F+=o*(R+t)/2,W+=o*(j+e)/2,V+=o,q+=(o=j*t-R*e)*(R+t),Y+=o*(j+e),K+=3*o,J(R=t,j=e)}const at=X;function st(t){this._context=t}st.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,_)}},result:y};var lt,ht,ut,ct,pt,dt=c(),ft={point:y,lineStart:function(){ft.point=_t},lineEnd:function(){lt&&mt(ht,ut),ft.point=y},polygonStart:function(){lt=!0},polygonEnd:function(){lt=null},result:function(){var t=+dt;return dt.reset(),t}};function _t(t,e){ft.point=mt,ht=ct=t,ut=pt=e}function mt(t,e){ct-=t,pt-=e,dt.add(g(ct*ct+pt*pt)),ct=t,pt=e}const gt=ft;function yt(){this._string=[]}function vt(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function bt(t){return function(e){var n=new Lt;for(var i in t)n[i]=t[i];return n.stream=e,n}}function Lt(){}function wt(){}function xt(t){return null==t?wt:function(){return this.querySelector(t)}}function kt(){return[]}function Mt(t){return new Array(t.length)}function Ct(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function Pt(t,e,n,i,o,r){for(var a,s=0,l=e.length,h=r.length;s<h;++s)(a=e[s])?(a.__data__=r[s],i[s]=a):n[s]=new Ct(t,r[s]);for(;s<l;++s)(a=e[s])&&(o[s]=a)}function Et(t,e,n,i,o,r,a){var s,l,h,u={},c=e.length,p=r.length,d=new Array(c);for(s=0;s<c;++s)(l=e[s])&&(d[s]=h="$"+a.call(l,l.__data__,s,e),h in u?o[s]=l:u[h]=l);for(s=0;s<p;++s)(l=u[h="$"+a.call(t,r[s],s,r)])?(i[s]=l,l.__data__=r[s],u[h]=null):n[s]=new Ct(t,r[s]);for(s=0;s<c;++s)(l=e[s])&&u[d[s]]===l&&(o[s]=l)}function Tt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}yt.prototype={_radius:4.5,_circle:vt(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=vt(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},Lt.prototype={constructor:Lt,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},Ct.prototype={constructor:Ct,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var St="http://www.w3.org/1999/xhtml";const zt={svg:"http://www.w3.org/2000/svg",xhtml:St,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ot(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),zt.hasOwnProperty(e)?{space:zt[e],local:t}:t}function Dt(t){return function(){this.removeAttribute(t)}}function At(t){return function(){this.removeAttributeNS(t.space,t.local)}}function It(t,e){return function(){this.setAttribute(t,e)}}function Bt(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Nt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Zt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Rt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function jt(t){return function(){this.style.removeProperty(t)}}function Gt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Ut(t,e,n){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function Ht(t,e){return t.style.getPropertyValue(e)||Rt(t).getComputedStyle(t,null).getPropertyValue(e)}function Ft(t){return function(){delete this[t]}}function Wt(t,e){return function(){this[t]=e}}function Vt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function qt(t){return t.trim().split(/^|\s+/)}function Yt(t){return t.classList||new Kt(t)}function Kt(t){this._node=t,this._names=qt(t.getAttribute("class")||"")}function Xt(t,e){for(var n=Yt(t),i=-1,o=e.length;++i<o;)n.add(e[i])}function Jt(t,e){for(var n=Yt(t),i=-1,o=e.length;++i<o;)n.remove(e[i])}function Qt(t){return function(){Xt(this,t)}}function $t(t){return function(){Jt(this,t)}}function te(t,e){return function(){(e.apply(this,arguments)?Xt:Jt)(this,t)}}function ee(){this.textContent=""}function ne(t){return function(){this.textContent=t}}function ie(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function oe(){this.innerHTML=""}function re(t){return function(){this.innerHTML=t}}function ae(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function se(){this.nextSibling&&this.parentNode.appendChild(this)}function le(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function he(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===St&&e.documentElement.namespaceURI===St?e.createElement(t):e.createElementNS(n,t)}}function ue(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ce(t){var e=Ot(t);return(e.local?ue:he)(e)}function pe(){return null}function de(){var t=this.parentNode;t&&t.removeChild(this)}function fe(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function _e(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}Kt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var me={};function ge(t,e,n){return t=ye(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function ye(t,e,n){return function(i){try{t.call(this,this.__data__,e,n)}finally{}}}function ve(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function be(t){return function(){var e=this.__on;if(e){for(var n,i=0,o=-1,r=e.length;i<r;++i)n=e[i],t.type&&n.type!==t.type||n.name!==t.name?e[++o]=n:this.removeEventListener(n.type,n.listener,n.capture);++o?e.length=o:delete this.__on}}}function Le(t,e,n){var i=me.hasOwnProperty(t.type)?ge:ye;return function(o,r,a){var s,l=this.__on,h=i(e,r,a);if(l)for(var u=0,c=l.length;u<c;++u)if((s=l[u]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=h,s.capture=n),void(s.value=e);this.addEventListener(t.type,h,n),s={type:t.type,name:t.name,value:e,listener:h,capture:n},l?l.push(s):this.__on=[s]}}function we(t,e,n){var i=Rt(t),o=i.CustomEvent;"function"==typeof o?o=new o(e,n):(o=i.document.createEvent("Event"),n?(o.initEvent(e,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function xe(t,e){return function(){return we(this,t,e)}}function ke(t,e){return function(){return we(this,t,e.apply(this,arguments))}}"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(me={mouseenter:"mouseover",mouseleave:"mouseout"}));var Me=[null];function Ce(t,e){this._groups=t,this._parents=e}Ce.prototype={constructor:Ce,select:function(t){"function"!=typeof t&&(t=xt(t));for(var e=this._groups,n=e.length,i=new Array(n),o=0;o<n;++o)for(var r,a,s=e[o],l=s.length,h=i[o]=new Array(l),u=0;u<l;++u)(r=s[u])&&(a=t.call(r,r.__data__,u,s))&&("__data__"in r&&(a.__data__=r.__data__),h[u]=a);return new Ce(i,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=function(t){return null==t?kt:function(){return this.querySelectorAll(t)}}(t));for(var e=this._groups,n=e.length,i=[],o=[],r=0;r<n;++r)for(var a,s=e[r],l=s.length,h=0;h<l;++h)(a=s[h])&&(i.push(t.call(a,a.__data__,h,s)),o.push(a));return new Ce(i,o)},filter:function(t){"function"!=typeof t&&(t=function(t){return function(){return this.matches(t)}}(t));for(var e=this._groups,n=e.length,i=new Array(n),o=0;o<n;++o)for(var r,a=e[o],s=a.length,l=i[o]=[],h=0;h<s;++h)(r=a[h])&&t.call(r,r.__data__,h,a)&&l.push(r);return new Ce(i,this._parents)},data:function(t,e){if(!t)return f=new Array(this.size()),u=-1,this.each((function(t){f[++u]=t})),f;var n,i=e?Et:Pt,o=this._parents,r=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var a=r.length,s=new Array(a),l=new Array(a),h=new Array(a),u=0;u<a;++u){var c=o[u],p=r[u],d=p.length,f=t.call(c,c&&c.__data__,u,o),_=f.length,m=l[u]=new Array(_),g=s[u]=new Array(_);i(c,p,m,g,h[u]=new Array(d),f,e);for(var y,v,b=0,L=0;b<_;++b)if(y=m[b]){for(b>=L&&(L=b+1);!(v=g[L])&&++L<_;);y._next=v||null}}return(s=new Ce(s,o))._enter=l,s._exit=h,s},enter:function(){return new Ce(this._enter||this._groups.map(Mt),this._parents)},exit:function(){return new Ce(this._exit||this._groups.map(Mt),this._parents)},join:function(t,e,n){var i=this.enter(),o=this,r=this.exit();return i="function"==typeof t?t(i):i.append(t+""),null!=e&&(o=e(o)),null==n?r.remove():n(r),i&&o?i.merge(o).order():o},merge:function(t){for(var e=this._groups,n=t._groups,i=e.length,o=n.length,r=Math.min(i,o),a=new Array(i),s=0;s<r;++s)for(var l,h=e[s],u=n[s],c=h.length,p=a[s]=new Array(c),d=0;d<c;++d)(l=h[d]||u[d])&&(p[d]=l);for(;s<i;++s)a[s]=e[s];return new Ce(a,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i,o=t[e],r=o.length-1,a=o[r];--r>=0;)(i=o[r])&&(a&&4^i.compareDocumentPosition(a)&&a.parentNode.insertBefore(i,a),a=i);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Tt);for(var n=this._groups,i=n.length,o=new Array(i),r=0;r<i;++r){for(var a,s=n[r],l=s.length,h=o[r]=new Array(l),u=0;u<l;++u)(a=s[u])&&(h[u]=a);h.sort(e)}return new Ce(o,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],o=0,r=i.length;o<r;++o){var a=i[o];if(a)return a}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var o,r=e[n],a=0,s=r.length;a<s;++a)(o=r[a])&&t.call(o,o.__data__,a,r);return this},attr:function(t,e){var n=Ot(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==e?n.local?At:Dt:"function"==typeof e?n.local?Zt:Nt:n.local?Bt:It)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?jt:"function"==typeof e?Ut:Gt)(t,e,null==n?"":n)):Ht(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Ft:"function"==typeof e?Vt:Wt)(t,e)):this.node()[t]},classed:function(t,e){var n=qt(t+"");if(arguments.length<2){for(var i=Yt(this.node()),o=-1,r=n.length;++o<r;)if(!i.contains(n[o]))return!1;return!0}return this.each(("function"==typeof e?te:e?Qt:$t)(n,e))},text:function(t){return arguments.length?this.each(null==t?ee:("function"==typeof t?ie:ne)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?oe:("function"==typeof t?ae:re)(t)):this.node().innerHTML},raise:function(){return this.each(se)},lower:function(){return this.each(le)},append:function(t){var e="function"==typeof t?t:ce(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ce(t),i=null==e?pe:"function"==typeof e?e:xt(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(de)},clone:function(t){return this.select(t?_e:fe)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var i,o,r=ve(t+""),a=r.length;if(!(arguments.length<2)){for(s=e?Le:be,null==n&&(n=!1),i=0;i<a;++i)this.each(s(r[i],e,n));return this}var s=this.node().__on;if(s)for(var l,h=0,u=s.length;h<u;++h)for(i=0,l=s[h];i<a;++i)if((o=r[i]).type===l.type&&o.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?ke:xe)(t,e))}};var Pe=n(62),Ee=n(402),Te=n.n(Ee),Se=n(36),ze=n.n(Se),Oe=n(793),De=n.n(Oe),Ae=n(892),Ie=n.n(Ae),Be=n(173),Ne=n.n(Be),Ze=n(464),Re=n.n(Ze),je=n(958),Ge={};Ge.styleTagTransform=Re(),Ge.setAttributes=Ie(),Ge.insert=De().bind(null,"head"),Ge.domAPI=ze(),Ge.insertStyleElement=Ne(),Te()(je.Z,Ge),je.Z&&je.Z.locals&&je.Z.locals;var Ue=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e}(Pe.Layer),He=function(t){function e(e){void 0===e&&(e={});var n=t.call(this)||this;return n._options(e),n}return(0,i.ZT)(e,t),e.prototype.svg=function(){return this._rootGroup},e.prototype.drawCallback=function(t){return arguments.length?(this._drawCallback=t,this):this._drawCallback},e.prototype.getBounds=function(){if(!this.selection||!this.projection)return new Pe.LatLngBounds([-90,-180],[90,180]);var t,e,n=this.selection.node().getBBox();try{t=this.projection.layerPointToLatLng(new Pe.Point(n.x,n.y+n.height))}catch(e){t=[-90,-180]}try{e=this.projection.layerPointToLatLng(new Pe.Point(n.x+n.width,n.y))}catch(t){e=[90,180]}return new Pe.LatLngBounds(t,e)},e.prototype._undef=function(t){return void 0===t},e.prototype._options=function(t){return this._undef(t)?this.options:(t.zoomHide=!this._undef(t.zoomHide)&&t.zoomHide,t.zoomDraw=!!this._undef(t.zoomDraw)||t.zoomDraw,this.options=t)},e.prototype.draw=function(){this.map&&this._drawCallback&&(this.projection.metresPerPixel=40075016.686*Math.abs(Math.cos(this.map.getCenter().lat*Math.PI/180))/Math.pow(2,this.map.getZoom()+8)*this.projection.scale,this._drawCallback(this.selection,this.projection,this.map.getZoom()))},e.prototype._zoomChange=function(t){var e=this._undef(t.zoom)?this.map._zoom:t.zoom;this._zoomDiff=e-this._zoom,this._scale=Math.pow(2,this._zoomDiff),this.projection.scale=this._scale,this._shift=this.map.latLngToLayerPoint(this._wgsOrigin)._subtract(this._wgsInitialShift.multiplyBy(this._scale));var n=["translate(",this._shift.x,",",this._shift.y,") "],i=["scale(",this._scale,",",this._scale,") "];this._rootGroup.attr("transform",n.concat(i).join("")),this.options.zoomDraw&&this.draw()},e.prototype.onAdd=function(t){this.map=t;var e=this;return this._svg=Pe.svg(),t.addLayer(this._svg),this._rootGroup=function(t){return"string"==typeof t?new Ce([[document.querySelector(t)]],[document.documentElement]):new Ce([[t]],Me)}(this._svg._rootGroup).classed("d3-overlay",!0),this._rootGroup.classed("leaflet-zoom-hide",this.options.zoomHide),this.selection=this._rootGroup,this._pixelOrigin=t.getPixelOrigin(),this._wgsOrigin=Pe.latLng([0,0]),this._wgsInitialShift=this.map.latLngToLayerPoint(this._wgsOrigin),this._zoom=this.map.getZoom(),this._shift=Pe.point(0,0),this._scale=1,this.projection={latLngToLayerPoint:function(t,n){return n=e._undef(n)?e._zoom:n,e.map.project(Pe.latLng(t),n)._subtract(e._pixelOrigin)},layerPointToLatLng:function(t,n){n=e._undef(n)?e._zoom:n;var i=Pe.point(t).add(e._pixelOrigin);return e.map.unproject(i,n)},unitsPerMeter:256*Math.pow(2,e._zoom)/40075017,metresPerPixel:40075016.686*Math.abs(Math.cos(t.getCenter().lat*Math.PI/180))/Math.pow(2,t.getZoom()+8),map:e.map,layer:e,scale:1},this.projection._projectPoint=function(t,n){var i=e.projection.latLngToLayerPoint(new Pe.LatLng(n,t));this.stream.point(i.x,i.y)},this.projection.pathFromGeojson=function(t,e){var n,i,r=4.5;function a(t){return t&&("function"==typeof r&&i.pointRadius(+r.apply(this,arguments)),u(t,n(i))),i.result()}return a.area=function(t){return u(t,n(S)),S.result()},a.measure=function(t){return u(t,n(gt)),gt.result()},a.bounds=function(t){return u(t,n(B)),B.result()},a.centroid=function(t){return u(t,n(at)),at.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,o):(t=e).stream,a):t},a.context=function(t){return arguments.length?(i=null==t?(e=null,new yt):new st(e=t),"function"!=typeof r&&i.pointRadius(r),a):e},a.pointRadius=function(t){return arguments.length?(r="function"==typeof t?t:(i.pointRadius(+t),+t),a):r},a.projection(t).context(e)}().projection({stream:bt({point:this.projection._projectPoint})}),this.projection.latLngToLayerFloatPoint=this.projection.latLngToLayerPoint,this.projection.getZoom=this.map.getZoom.bind(this.map),this.projection.getBounds=this.map.getBounds.bind(this.map),this.selection=this._rootGroup,this.draw(),this},e.prototype.getEvents=function(){return{zoomend:this._zoomChange,viewreset:this._zoomChange}},e.prototype.onRemove=function(t){return this._svg.remove(),this},e.prototype.addTo=function(t){return t.addLayer(this),this},e}(Ue)},22:(t,e,n)=>{n.d(e,{O:()=>l,c:()=>h});var i=n(163),o=n(62),r=n(10),a=n.n(r),s=window.simpleheat||r&&a()||r,l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e}(o.Layer),h=function(t){function e(e,n){void 0===n&&(n={});var i=t.call(this,n)||this;return i._latlngs=e,i}return(0,i.ZT)(e,t),e.prototype.initialize=function(t){this.setOptions(t)},e.prototype.setLatLngs=function(t){return this._latlngs=t,this.redraw()},e.prototype.addLatLng=function(t){return this._latlngs.push(t),this.redraw()},e.prototype.setOptions=function(t){return this.options=t,this._heat&&this._updateOptions(),this.redraw()},e.prototype.redraw=function(){return!this._heat||this._frame||this._map._animating||(this._frame=o.Util.requestAnimFrame(this._redraw,this)),this},e.prototype.onAdd=function(t){return this._map=t,this._canvas||this._initCanvas(),t._panes.overlayPane.appendChild(this._canvas),t.on("moveend",this._reset,this),t.options.zoomAnimation&&o.Browser.any3d&&t.on("zoomanim",this._animateZoom,this),this._reset(),this},e.prototype.onRemove=function(t){return t.getPanes().overlayPane.removeChild(this._canvas),t.off("moveend",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this),this},e.prototype.addTo=function(t){return t.addLayer(this),this},e.prototype._initCanvas=function(){var t=this._canvas=o.DomUtil.create("canvas","leaflet-heatmap-layer leaflet-layer"),e=o.DomUtil.testProp(["transformOrigin","WebkitTransformOrigin","msTransformOrigin"]);t.style[e]="50% 50%";var n=this._map.getSize();t.width=n.x,t.height=n.y;var i=this._map.options.zoomAnimation&&o.Browser.any3d;o.DomUtil.addClass(t,"leaflet-zoom-"+(i?"animated":"hide")),this._heat=s(t),this._updateOptions()},e.prototype._updateOptions=function(){this._heat.radius(this.options.radius||this._heat.defaultRadius,this.options.blur),this.options.gradient&&this._heat.gradient(this.options.gradient),this.options.max&&this._heat.max(this.options.max)},e.prototype._reset=function(){var t=this._map.containerPointToLayerPoint([0,0]);o.DomUtil.setPosition(this._canvas,t);var e=this._map.getSize();this._heat._width!==e.x&&(this._canvas.width=this._heat._width=e.x),this._heat._height!==e.y&&(this._canvas.height=this._heat._height=e.y),this._redraw()},e.prototype._redraw=function(){var t,e,n,i,r,a,s,l,h,u=[],c=this._heat._r,p=this._map.getSize(),d=new o.Bounds(o.point([-c,-c]),p.add([c,c])),f=void 0===this.options.max?1:this.options.max,_=void 0===this.options.maxZoom?this._map.getMaxZoom():this.options.maxZoom,m=1/Math.pow(2,Math.max(0,Math.min(_-this._map.getZoom(),12))),g=c/2,y=[],v=this._map._getMapPanePos(),b=v.x%g,L=v.y%g;for(t=0,e=this._latlngs.length;t<e;t++)n=this._map.latLngToContainerPoint(this._latlngs[t]),d.contains(n)&&(r=Math.floor((n.x-b)/g)+2,a=Math.floor((n.y-L)/g)+2,h=(void 0!==this._latlngs[t].alt?this._latlngs[t].alt:void 0!==this._latlngs[t][2]?+this._latlngs[t][2]:1)*m,y[a]=y[a]||[],(i=y[a][r])?(i[0]=(i[0]*i[2]+n.x*h)/(i[2]+h),i[1]=(i[1]*i[2]+n.y*h)/(i[2]+h),i[2]+=h):y[a][r]=[n.x,n.y,h]);for(t=0,e=y.length;t<e;t++)if(y[t])for(s=0,l=y[t].length;s<l;s++)(i=y[t][s])&&u.push([Math.round(i[0]),Math.round(i[1]),Math.min(i[2],f)]);this._heat.data(u).draw(this.options.minOpacity),this._frame=null},e.prototype._animateZoom=function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._getCenterOffset(t.center)._multiplyBy(-e).subtract(this._map._getMapPanePos());o.DomUtil.setTransform?o.DomUtil.setTransform(this._canvas,n,e):this._canvas.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(n)+" scale("+e+")"},e}(l)},856:(t,e,n)=>{t.exports=n.p+"c6e9c007f41bd4d26c20.png"},614:(t,e,n)=>{t.exports=n.p+"44b38a404dec4643c46b.png"},39:(t,e,n)=>{t.exports=n.p+"194137260531ee29a5f2.svg"},555:(t,e,n)=>{t.exports=n.p+"4a4ee777ddc0d4cedee4.png"},212:(t,e,n)=>{t.exports=n.p+"011a678e3efe41981754.png"},758:(t,e,n)=>{t.exports=n.p+"1e8408af1a34bdf61457.png"}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={id:i,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.exports}n.m=t,n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.p="dist/",n.b=document.baseURI||self.location.href;var i={};return(()=>{n.r(i),n.d(i,{BeautifyIcon:()=>r.M,D3SvgOverlay:()=>a.F,Draw:()=>h,GoogleMutant:()=>o.GoogleMutant,HeatLayer:()=>s.c,LeafletLayer:()=>a.c,LeafletLayer2:()=>s.O,MarkerClusterGroup:()=>l});var t=n(62),e={};for(const n in t)["default","GoogleMutant","MarkerClusterGroup","Draw"].indexOf(n)<0&&(e[n]=()=>t[n]);n.d(i,e),n(72),n(325),n(684),n(298),n(738),n(152);var o=n(290),r=n(57),a=n(132),s=n(22),l=t.MarkerClusterGroup,h=t.Draw})(),i})()},t.exports=n()}(Er);var Tr=function(t){function e(e){var n=t.call(this)||this;return n._layer=new Er.exports.FeatureGroup,n._crs=Er.exports.CRS.EPSG3857,n._layer.__hpcc_layer=n,n}return h(e,t),e.prototype.crs=function(){return this._crs},e.prototype.attribution=function(){return""},e.prototype.clear=function(){this._layer.clearLayers()},e.prototype.add=function(t){this._layer.addLayer(t)},e.prototype.init=function(){return this._initPromise||(this._initPromise=Promise.resolve()),this._initPromise},e.prototype.hasBounds=function(){return!1},e.prototype.getBounds=function(){return this._layer.getBounds()},e.prototype.layerEnter=function(t){t.addLayer(this._layer)},e.prototype.layerUpdate=function(t){},e.prototype.layerExit=function(t){this._layer.clearLayers(),t.removeLayer(this._layer)},e.prototype.zoomEnd=function(t){},e.prototype.moveEnd=function(t){},e.prototype.viewReset=function(t){},e}(e.Widget),Sr=go("Albers").scale(.5),zr=go("AlbersUsaPr").scale(.5),Or={project:function(t){var e=zr([t.lng,t.lat]);return e||(e=Sr([t.lng,t.lat])),new Er.exports.Point(e[0],e[1])},unproject:function(t){if(isNaN(t.x)||isNaN(t.y))return new Er.exports.LatLng(0,0);var e=Sr.invert([t.x,t.y]);return new Er.exports.LatLng(e[1],e[0])}},Dr=Er.exports.Util.extend({},Er.exports.CRS,{projection:Or,transformation:new Er.exports.Transformation(1,0,1,0),infinite:!0}),Ar=function(t){function e(){var e=t.call(this)||this;return e._crs=Dr,e}return h(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.getBounds=function(){return new Er.exports.LatLngBounds([20,-123],[49,-64])},e}(Tr);Ar.prototype._class+=" map_AlbersLayer";var Ir=function(t){function e(){return t.call(this)||this}return h(e,t),e}(Tr);Ir.prototype._class+=" map_BlankLayer";var Br=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.init=function(){return this._initPromise||(this._initPromise=rr()),this._initPromise},e.prototype.attribution=function(){return window.__hpcc_gmap_apikey?"":"DEVELOPER USE ONLY (@hpcc-js)"},e.prototype.getMaxZoom=function(){return 23},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e),this.add(new Er.exports.GoogleMutant({type:"roadmap",styles:this.googleMapStyles()}))},e}(Tr);Br.prototype._class+=" map_GMapLayer",Br.prototype.publish("googleMapStyles",{},"object","Styling for map colors etc",null,{tags:["Basic"]});var Nr=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.attribution=function(){return window.__hpcc_mapbox_apikey?"":"DEVELOPER USE ONLY (@hpcc-js)"},e.prototype.getMaxZoom=function(){return 18},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e),window.__hpcc_mapbox_apikey||console.warn("__hpcc_mapbox_apikey does not contain a valid API key, reverting to developers key (expect limited performance)");var n=window.__hpcc_mapbox_apikey||"pk.eyJ1IjoibGVzY2htb28iLCJhIjoiY2psY2FqY3l3MDhqNDN3cDl1MzFmZnkwcCJ9.HRoFwmz1j80gyz18ruggqw";this.add(new Er.exports.TileLayer("https://api.mapbox.com/styles/v1/mapbox/{id}/tiles/{z}/{x}/{y}?access_token=".concat(n),{attribution:'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',maxZoom:18,id:"streets-v11",accessToken:n}))},e}(Tr);Nr.prototype._class+=" map_MapBoxLayer";var Zr=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.attribution=function(){return""},e.prototype.getMaxZoom=function(){return 18},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e),this.add(new Er.exports.TileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',maxZoom:18,id:"open.streets"}))},e}(Tr);Zr.prototype._class+=" map_MapBoxLayer";yo(".map_Leaflet .leaflet-container{background-color:rgba(255,0,0,0);background:rgba(255,0,0,0)}");var Rr=function(t){function n(){var n=t.call(this)||this;return n._iconBar=(new e.IconBar).buttons([(new e.Button).faChar("fa-plus").tooltip("Zoom in").on("click",(function(){n.zoomPlus()})),(new e.Button).faChar("fa-minus").tooltip("Zoom out").on("click",(function(){n.zoomMinus()})),new e.Spacer,(new e.Button).faChar("fa-arrows-alt").tooltip("Zoom to fit").on("click",(function(){n.zoomToFit()}))]),n._blankLayer=new Ir,n._albersLayer=new Ar,n._mapBoxLayer=new Nr,n._openStreetLayer=new Zr,n._gmapLayer=new Br,n.baseLayer(),n}return h(n,t),n.prototype.zoom=function(){return this._leafletMap.getZoom()},n.prototype.zoomPlus=function(){this._leafletMap.zoomIn()},n.prototype.zoomMinus=function(){this._leafletMap.zoomOut()},n.prototype.zoomToDefault=function(){this._leafletMap.flyTo({lat:this.defaultLat(),lng:this.defaultLong()},this.defaultZoom(),{animate:!1})},n.prototype.zoomToFit=function(){var t;"AlbersPR"===this.mapType()?t=this._albersLayer.getBounds():this.layers().filter((function(t){return t.hasBounds()})).forEach((function(e){t?t.extend(e.getBounds()):t=e.getBounds()})),t&&t.isValid()?this._leafletMap.fitBounds(t,{maxZoom:14}):this.zoomToDefault()},n.prototype.syncLayers=function(t,e,n){var i=this,o=c([],t,!0),r=[],a=[];this._leafletMap.eachLayer((function(t){var e=o.indexOf(t.__hpcc_layer);e>=0?(r.push(t.__hpcc_layer),o.splice(e,1)):t.__hpcc_layer&&a.push(t.__hpcc_layer)})),o.forEach((function(t){t.layerEnter(i._leafletMap),t.layerUpdate(i._leafletMap)})),r.forEach((function(t){t.layerUpdate(i._leafletMap)})),a.forEach((function(t){t.layerExit(i._leafletMap)}))},n.prototype.isLayer=function(){return void 0!==this._owner&&this._owner!==this},n.prototype.baseLayer=function(){switch(this.mapType()){case"AlbersPR":this.map(this._albersLayer);break;case"MapBox":this.map(this._mapBoxLayer);break;case"OpenStreet":this.map(this._openStreetLayer);break;case"Google":this.map(this._gmapLayer);break;default:this.map(this._blankLayer)}return this.map()},n.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),n.style("position","relative"),this._leafletElement=n.append("div").style("position","absolute").style("width","".concat(this.width(),"px")).style("height","".concat(this.height(),"px")),this._iconBar.target(e)},n.prototype.update=function(e,n){var i=this;t.prototype.update.call(this,e,n),this._leafletElement.style("width","".concat(this.width(),"px")).style("height","".concat(this.height(),"px"));var o=this.baseLayer();this._prevCRS!==o.crs()&&(this._prevCRS=o.crs(),this._leafletMap&&(this.syncLayers([],e,n),this._leafletMap.remove(),this._leafletElement.html("")),this._leafletMap=new Er.exports.Map(this._leafletElement.node(),{trackResize:!1,zoomControl:!1,zoomSnap:"AlbersPR"===this.mapType()?.1:1,crs:o.crs(),maxZoom:o.getMaxZoom?o.getMaxZoom():18}),this._leafletMap.setView([this.defaultLat(),this.defaultLong()],this.defaultZoom()),this._leafletMap.attributionControl.setPrefix(o.attribution()),this._leafletMap.on("zoomend",(function(t){return i.layers().forEach((function(e){return e.zoomEnd(t)}))})),this._leafletMap.on("moveend",(function(t){return i.layers().forEach((function(e){return e.moveEnd(t)}))})),this._leafletMap.on("viewreset",(function(t){return i.layers().forEach((function(e){return e.viewReset(t)}))})),this._renderCount=0),this.syncLayers(c([o],this.layers(),!0),e,n),this._leafletMap.invalidateSize(),this.autoZoomToFit()&&this._leafletMap.whenReady((function(){this.zoomToFit()}),this),this._iconBar.visible(this.showToolbar()).render((function(t){var e=t.getBBox();t.element().style("z-index",5e3).style("left","".concat(i.width()-e.width-4,"px"))}))},n.prototype.exit=function(e,n){this._iconBar.target(null),t.prototype.exit.call(this,e,n)},n.prototype.render=function(e){var n=this,i=c([this.baseLayer().init()],this.layers().map((function(t){return t.init()})),!0);return Promise.all(i).then((function(){t.prototype.render.call(n,e)})),this},n}(e.HTMLWidget);Rr.prototype._class+=" map_Leaflet",Rr.prototype.publish("showToolbar",!0,"boolean","Show toolbar",void 0,{hidden:function(t){return t.isLayer()}}),Rr.prototype.publish("mapType","Google","set","Base Layer Type",["None","AlbersPR","MapBox","OpenStreet","Google"],{hidden:function(t){return t.isLayer()}}),Rr.prototype.publish("map",null,"widget","Base Layer",void 0,{internal:!0}),Rr.prototype.publish("layers",[],"propertyArray","Layers",void 0,{hidden:function(t){return t.isLayer()}}),Rr.prototype.publish("defaultLat",42.877742,"number","Center Latitude",void 0,{hidden:function(t){return t.isLayer()}}),Rr.prototype.publish("defaultLong",-97.380979,"number","Center Longitude",void 0,{hidden:function(t){return t.isLayer()}}),Rr.prototype.publish("defaultZoom",4,"number","Zoom Level",void 0,{hidden:function(t){return t.isLayer()}}),Rr.prototype.publish("autoZoomToFit",!0,"boolean","Auto zoom to fit Data",void 0,{hidden:function(t){return t.isLayer()}});var jr=function(t){function n(n){void 0===n&&(n=!1);var i=t.call(this)||this;return i._layer=n?new Er.exports.MarkerClusterGroup:new Er.exports.FeatureGroup,i._layer.__hpcc_layer=i,e.Utility.SimpleSelectionMixin.call(i),i.layers([i]),i}return h(n,t),n.prototype.owner=function(t){this._owner=t},n.prototype.valid=function(){return!0},n.prototype.clear=function(){this._layer.clearLayers()},n.prototype.add=function(t){this._layer.addLayer(t)},n.prototype.maxZoom=function(){return this._owner._leafletMap.getMaxZoom()||24},n.prototype.zoom=function(){return this._owner._leafletMap.getZoom()},n.prototype.visibleBounds=function(){return this._owner._leafletMap.getBounds()},n.prototype.init=function(){return this._initPromise||(this._initPromise=Promise.resolve()),this._initPromise},n.prototype.hasBounds=function(){return!1},n.prototype.getBounds=function(){return this._layer.getBounds()},n.prototype.style=function(t,n){return void 0===n?e.select(this._layer.getPane()).style(t):(e.select(this._layer.getPane()).style(t,n),this)},n.prototype.propValue=function(t,e,n){return(t<0?n:e[t])||n},n.prototype.layerEnter=function(t){t.addLayer(this._layer);var n=e.select(t.getContainer()).select(".leaflet-pane.leaflet-marker-pane");this._selection.widgetElement(n)},n.prototype.layerUpdate=function(t){},n.prototype.layerExit=function(t){this._layer.clearLayers(),t.removeLayer(this._layer)},n.prototype.zoomEnd=function(t){},n.prototype.moveEnd=function(t){},n.prototype.viewReset=function(t){},n}(Rr);jr.prototype._class+=" map_FeatureLayer",jr.prototype.mixin(e.Utility.SimpleSelectionMixin),jr.prototype.publishReset(["layers"]);var Gr=function(t){function e(e){return void 0===e&&(e=!0),t.call(this,e)||this}return h(e,t),e}(jr);Gr.prototype._class+=" map_ClusterLayer";var Ur=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._lfd3=(new Er.exports.D3SvgOverlay).drawCallback((function(t,n){return e.layerUpdate(void 0,n)})),e}return h(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.getBounds=function(){return this._lfd3.getBounds()},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e),this.add(this._lfd3)},e.prototype.layerUpdate=function(e,n){t.prototype.layerUpdate.call(this,e)},e.prototype.clickHandler=function(t,e){},e}(jr),Hr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.layerUpdate=function(e){var n=this;t.prototype.layerUpdate.call(this,e);var i=this.columns(),o=i.indexOf(this.latitudeColumn()),r=i.indexOf(this.longitudeColumn()),a=i.indexOf(this.strokeColorColumn()),s=i.indexOf(this.fillColorColumn());this.clear(),this.data().filter((function(t){return!n.omitNullLatLong()||!!t[o]&&!!t[r]})).forEach((function(t){n.add(new Er.exports.Circle([t[o],t[r]],{color:n.propValue(a,t,n.strokeColor()),fill:!0,fillColor:n.propValue(s,t,n.fillColor()),fillOpacity:n.fillOpacity(),radius:n.radius(),origRow:t}).on("click",(function(e){return n.clickHandler(e,t)})))}))},e.prototype.clickHandler=function(t,e){},e}(Gr);Hr.prototype._class+=" map_Circles",Hr.prototype.publish("latitudeColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),Hr.prototype.publish("longitudeColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),Hr.prototype.publish("radius",50,"number","Radius (meters)"),Hr.prototype.publish("strokeColor","#376cea","html-color","Stroke Color",null,{optional:!0}),Hr.prototype.publish("strokeColorColumn",null,"set","Stroke color column",(function(){return this.columns()}),{optional:!0}),Hr.prototype.publish("fillColor","#376cea","html-color","Fill Color",null,{optional:!0}),Hr.prototype.publish("fillColorColumn",null,"set","Fill color column",(function(){return this.columns()}),{optional:!0}),Hr.prototype.publish("fillOpacity",.5,"number","Opacity",null,{tags:["Advanced"]}),Hr.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});var Fr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.layerUpdate=function(e,n){var i=this;t.prototype.layerUpdate.call(this,e,n);var o=this._lfd3._rootGroup;n=n||this._lfd3.projection;var r=this.columns(),a=r.indexOf(this.latitudeColumn()),s=r.indexOf(this.longitudeColumn()),l=r.indexOf(this.strokeColorColumn()),h=r.indexOf(this.fillColorColumn());function u(t){return{lat:+t[a],lng:+t[s]}}var c=o.selectAll("circle").data(this.data().filter((function(t){return!i.omitNullLatLong()||!!t[a]&&!!t[s]})));c.enter().append("circle").merge(c).attr("cx",(function(t){return n.latLngToLayerPoint(u(t)).x})).attr("cy",(function(t){return n.latLngToLayerPoint(u(t)).y})).attr("r",Math.max(3/n.scale,this.radius()/n.metresPerPixel)).style("fill-opacity",this.fillOpacity()).style("stroke",(function(t){return i.propValue(l,t,i.strokeColor())})).attr("stroke-width",Math.max(1/n.scale,1/n.metresPerPixel)).style("fill",(function(t){return i.propValue(h,t,i.fillColor())})),c.exit().remove()},e.prototype.clickHandler=function(t,e){},e}(Ur);Fr.prototype._class+=" map_D3Circles",Fr.prototype.publish("latitudeColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),Fr.prototype.publish("longitudeColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),Fr.prototype.publish("radius",50,"number","Radius (meters)"),Fr.prototype.publish("strokeColor","#376cea","html-color","Stroke Color",null,{optional:!0}),Fr.prototype.publish("strokeColorColumn",null,"set","Stroke color column",(function(){return this.columns()}),{optional:!0}),Fr.prototype.publish("fillColor","#376cea","html-color","Fill Color",null,{optional:!0}),Fr.prototype.publish("fillColorColumn",null,"set","Fill color column",(function(){return this.columns()}),{optional:!0}),Fr.prototype.publish("fillOpacity",.5,"number","Opacity",null,{tags:["Advanced"]}),Fr.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});yo(".cluster-circle{background-clip:padding-box;font:12px Helvetica Neue,Arial,Helvetica,sans-serif}.cluster-circle>div{border-radius:20px;height:40px;text-align:center;width:40px}.cluster-circle>div>div{border-radius:15px;display:inline-block;font:12px Helvetica Neue,Arial,Helvetica,sans-serif;height:30px;margin-top:5px;text-align:center;width:30px}.cluster-circle span{line-height:30px}");var Wr=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return h(n,t),n.prototype.createIcon=function(t,n,i){var o=e.hsl(n);return o.opacity=.5,new Er.exports.DivIcon({className:"cluster-circle",iconSize:new Er.exports.Point(40,40),html:"<div style='opacity:".concat(this.opacity(),";background-color:").concat(o.toString(),"'><div style='background-color:").concat(n,"'><span style='color:").concat(e.Palette.textColor(n),"'>").concat(i(t),"</span></div></div>")})},n.prototype.layerUpdate=function(n){var i=this;t.prototype.layerUpdate.call(this,n),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id()));var o=this.cellFunc(this.latitudeColumn(),0),r=this.cellFunc(this.longitudeColumn(),0),a=this.cellFunc(this.weightColumn(),0),s=this.data(),l=e.extent(s,a),h=this.weightFormat()?e.format(this.weightFormat()):function(t){return t};this.clear(),s.forEach((function(t){var e=new Er.exports.Marker(function(t){return[+o(t),+r(t)]}(t),{icon:i.createIcon(a(t),i._palette(a(t),l[0],l[1]),h),origRow:t}).on("click",(function(e){return i.clickHandler(e,t)}));e.bindTooltip("Weight: "+a(t)),i.add(e)}))},n.prototype.clickHandler=function(t,e){},n}(jr);Wr.prototype._class+=" map_ClusterCircles",Wr.prototype._palette=e.Palette.rainbow("default"),Wr.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Wr.prototype._palette.switch()),Wr.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette"),Wr.prototype.publish("latitudeColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),Wr.prototype.publish("longitudeColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),Wr.prototype.publish("weightColumn",null,"set","Weight column",(function(){return this.columns()}),{optional:!0}),Wr.prototype.publish("weightFormat",".2s","string","Number format for weight"),Wr.prototype.publish("opacity",.66,"number","Opacity",null,{tags:["Advanced"]});var Vr=function(t){function e(e,n){return t.call(this,e,u(u({},n),{onEachFeature:function(t,e){n.onEachFeature&&n.onEachFeature(t,e),function(t,e){var n=e.getLatLngs();n.forEach((function(t){t.forEach((function(t){if(Array.isArray(t)){var e=165,n=0,i=0,o=0,r=0;t.forEach((function(t){t.lat>-62&&(t.lng>e?++r:t.lng<-165&&++o,t.lng>0?++i:t.lng<0&&++n)})),o>0&&r>0&&t.forEach((function(t){t.lng>e&&n>i?t.lng-=360:t.lng<-165&&i>n&&(t.lng+=360)}))}}))})),e.setLatLngs(n)}(0,e)}}))||this}return h(e,t),e.prototype.addData=function(e){var n,i;if("Topology"===e.type){for(i in e.objects)e.objects.hasOwnProperty(i)&&(n=Mo(e,e.objects[i]),t.prototype.addData.call(this,n));return this}return t.prototype.addData.call(this,e),this},e}(Er.exports.GeoJSON),qr=null,Yr=null,Kr=null,Xr=null;!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}h(e,t),e.prototype.initStates=function(){return this._initPromise||(this._initPromise=new Promise((function(t,e){qr&&t(),No("".concat(Do(),"/us-states.json"),(function(e){for(var n in Kr=Mo((qr=e).topology,qr.topology.objects.states).features,Xr={},Kr)Kr[n].id&&(Xr[qr.stateNames[Kr[n].id].code]=Kr[n]);t()}))}))),this._initPromise},e.prototype.initCounties=function(){return this._initPromise||(this._initPromise=new Promise((function(t,e){Yr&&t(),No("".concat(Do(),"/us-counties.json"),(function(e){for(var n in Kr=Mo((Yr=e).topology,Yr.topology.objects.counties).features,Xr={},Kr)Kr[n].id&&(Xr[Kr[n].id]=Kr[n]);t()}))}))),this._initPromise},e.prototype.init=function(){return this.initCounties()},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e);var n=new Vr(Kr,{style:function(t){return{color:"#000",opacity:1,weight:1,fillColor:"#35495d",fillOpacity:.2}}});this.add(n)}}(jr);yo(".leaflet-interactive.selected{stroke:red;stroke-width:1.25px}");var Jr=function(t){function n(){var n=t.call(this)||this;return n._dataMap={},n._dataMinWeight=null,n._dataMaxWeight=null,e.Utility.SimpleSelectionMixin.call(n),n}return h(n,t),n.prototype.hasBounds=function(){return!0},n.prototype.getBounds=function(){var e=t.prototype.getBounds.call(this);return e.isValid()?new Er.exports.LatLngBounds([e.getNorth(),e.getWest()],[e.getSouth(),e.getEast()]):new Er.exports.LatLngBounds([90,-180],[-90,180])},n.prototype.updateDataMap=function(t){this._dataMap={},this._dataMinWeight=null,this._dataMaxWeight=null;var e=this;t.forEach((function(t){e._dataMap[t[0]]=t,(!e._dataMinWeight||t[1]<e._dataMinWeight)&&(e._dataMinWeight=t[1]),(!e._dataMaxWeight||t[1]>e._dataMaxWeight)&&(e._dataMaxWeight=t[1])}))},n.prototype.data=function(e){var n=t.prototype.data.apply(this,arguments);return arguments.length&&this.updateDataMap(e),n},n.prototype.styleFeature=function(t){var e=this._dataMap[t.properties.hpccID],n=e?this._palette(e[1],this._dataMinWeight,this._dataMaxWeight):"transparent";return{color:this.meshVisible()?this.meshColor():void 0,opacity:1,weight:this.meshStrokeWidth(),fillColor:n,fillOpacity:this.opacity()}},n.prototype.svgGlowID=function(){return this.id()+"_svgGlow"},n.prototype.layerEnter=function(n){if(t.prototype.layerEnter.call(this,n),!this._svgElement){this._svgElement=e.select(n.getContainer()).select(".leaflet-pane.leaflet-overlay-pane > svg");var i=this._svgElement.append("defs");new e.SVGGlowFilter(i,this.svgGlowID()),this._selection.widgetElement(this._svgElement)}},n.prototype.layerUpdate=function(e){var n=this;this._prevFeatures!==this._features&&(this.clear(),this._topoJson=new Vr(this._features,{onEachFeature:function(t,e){e.on("click",(function(t){return n.clickHandler(t,e,e.feature.properties.hpccID)}))}}).bindTooltip((function(t){return n.tooltipHandler(t,t.feature.properties.hpccID)}),{direction:"top",sticky:!0}),this.add(this._topoJson)),t.prototype.layerUpdate.call(this,e),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this._topoJson.setStyle((function(t){return n.styleFeature(t)}))},n.prototype.clickHandler=function(t,e,n){var i=this._selection.click(t.originalEvent.target);return this.click(this.rowToObj(this._dataMap[n]),this.columns()[0],i),i},n.prototype.tooltipText=function(t,e){return e},n.prototype.tooltipHandler=function(t,e){var n=this._dataMap[e],i=n&&n[1]||"";return this.tooltipText(this.rowToObj(n),"<b>".concat(e,"</b>: ").concat(i))},n.prototype.click=function(t,e,n){},n}(jr);Jr.prototype._class+=" map_World",Jr.prototype._palette=e.Palette.rainbow("default"),Jr.prototype.mixin(e.Utility.SimpleSelectionMixin),Jr.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Jr.prototype._palette.switch(),{tags:["Basic","Shared"]}),Jr.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),Jr.prototype.publish("opacity",.5,"number","Opacity",null,{tags:["Advanced"]}),Jr.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),Jr.prototype.publish("meshColor","black","html-color","Stroke Color"),Jr.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width"),Jr.prototype.publish("internalOnly",!1,"boolean","Internal mesh only");var Qr=null,$r=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.init=function(){var t=this;return this._initPromise||(this._initPromise=new Promise((function(t,e){Qr&&t(Qr),No("".concat(Do(),"/countries.json"),(function(e){t(Qr=e)}))})).then((function(e){var n;for(var i in t._features=Mo(e.topology,e.topology.objects.countries).features,t._features)if(t._features[i].id){var o=t._features[i].id,r=null===(n=e.countryNames[o])||void 0===n?void 0:n.name;t._features[i].properties.hpccID=r}}))),this._initPromise},e.prototype.tooltipHandler=function(t,e){var n=this._dataMap[e],i=n&&n[1]||"";return this.tooltipText(this.rowToObj(n),"<b>".concat(e,"</b>: ").concat(i))},e}(Jr);function ta(t,e){var n=t.indexOf(e);n>=0&&t.splice(n,1)}var ea=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._polylines=[],e._polygons=[],e._rectangles=[],e._circles=[],e}return h(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.drawOptions=function(){var t={marker:!1,circlemarker:!1};return this.enableCircle()||(t.circle=!1),this.enablePolyline()||(t.polyline=!1),this.enableRectangle()||(t.rectangle=!1),this.enablePolygon()||(t.polygon=!1),t},e.prototype.save=function(){return{polylines:this._polylines.map((function(t){return t.getLatLngs()})),polygons:this._polygons.map((function(t){return t.getLatLngs()})),rectangles:this._rectangles.map((function(t){return t.getBounds()})),circles:this._circles.map((function(t){return{center:t.getLatLng(),radius:t.getRadius()}}))}},e.prototype.restore=function(t){var e=this;this.clear(),this._polylines=(t.polylines||[]).map((function(t){return new Er.exports.Polyline(t)})),this._polygons=(t.polygons||[]).map((function(t){return new Er.exports.Polygon(t)})),this._rectangles=(t.rectangles||[]).map((function(t){return new Er.exports.Rectangle(t)})),this._circles=(t.circles||[]).map((function(t){return new Er.exports.Circle(t.center,{radius:t.radius})})),this._polylines.forEach((function(t){return e.add(t)})),this._polygons.forEach((function(t){return e.add(t)})),this._rectangles.forEach((function(t){return e.add(t)})),this._circles.forEach((function(t){return e.add(t)}))},e.prototype.layerEnter=function(e){var n=this;t.prototype.layerEnter.call(this,e),e.on(Er.exports.Draw.Event.CREATED,(function(t){var e=t.layerType,i=t.layer;switch(e){case"polyline":n._polylines.push(i);break;case"polygon":n._polygons.push(i);break;case"rectangle":n._rectangles.push(i);break;case"circle":n._circles.push(i);break;default:alert(e)}n.add(i),n.changed("ADD",i)})),e.on(Er.exports.Draw.Event.EDITED,(function(t){t.layers.eachLayer((function(t){n.changed("UPDATE",t)}))})),e.on(Er.exports.Draw.Event.DELETED,(function(t){t.layers.eachLayer((function(t){ta(n._polylines,t),ta(n._polygons,t),ta(n._rectangles,t),ta(n._circles,t),n.changed("DELETE",t)}))}))},e.prototype.layerUpdate=function(e){t.prototype.layerUpdate.call(this,e),this.style("opacity",this.opacity());var n=this.drawOptions(),i=o.hashSum(n);this._drawOptionsHash!==i&&(this._drawOptionsHash=i,this._drawControl&&e.removeControl(this._drawControl),this._drawControl=new Er.exports.Control.Draw({position:"topleft",draw:n,edit:{featureGroup:this._layer}}),e.addControl(this._drawControl))},e.prototype.layerExit=function(e){t.prototype.layerExit.call(this,e)},e.prototype.changed=function(t,e){},e}(jr);ea.prototype._class+=" map_DrawLayer",ea.prototype.publish("opacity",1,"number","Layer Opacity"),ea.prototype.publish("enablePolyline",!0,"boolean","Enable Polyline Creation"),ea.prototype.publish("enablePolygon",!0,"boolean","Enable Polygon Creation"),ea.prototype.publish("enableRectangle",!0,"boolean","Enable Rectangle Creation"),ea.prototype.publish("enableCircle",!0,"boolean","Enable Circle Creation");var na=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.layerUpdate=function(e){var n=this;t.prototype.layerUpdate.call(this,e),this.style("opacity",this.opacity());var i,o=this.columns(),r=this.latitudeColumn_exists()?o.indexOf(this.latitudeColumn()):0,a=this.longitudeColumn_exists()?o.indexOf(this.longitudeColumn()):1,s=o.indexOf(this.weightColumn());this.clear();var l=this.data().filter((function(t){return!n.omitNullLatLong()||!!t[r]&&!!t[a]})).map((function(t){return i?i.extend([t[r],t[a]]):i=new Er.exports.LatLngBounds([t[r],t[a]]),[t[r],t[a],n.weightColumn_exists()?t[s]:.5]})),h=new Er.exports.HeatLayer(l,{minOpacity:this.minOpacity(),max:this.max(),radius:this.radius(),blur:this.blur(),gradient:this.gradient()});h.getBounds=function(){return i},this.add(h)},e}(jr);na.prototype._class+=" map_Heat",na.prototype.publish("latitudeColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),na.prototype.publish("longitudeColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),na.prototype.publish("weightColumn",null,"set","Optional normalized intensity (0 -> 1) ",(function(){return this.columns()}),{optional:!0}),na.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from IconsData",null,{tags:["Basic"]}),na.prototype.publish("opacity",.5,"number","Layer Opacity"),na.prototype.publish("minOpacity",.5,"number","The minimum opacity the heat will start at",null,{tags:["Basic"]}),na.prototype.publish("max",1,"number","maximum point intensity, 1.0 by default",null,{tags:["Basic"]}),na.prototype.publish("radius",25,"number","radius of each point of the heatmap, 25 by default",null,{tags:["Basic"]}),na.prototype.publish("blur",15,"number","amount of blur, 15 by default",null,{tags:["Basic"]}),na.prototype.publish("gradient",null,"object","color gradient config",null,{tags:["Basic"],optional:!0});var ia=function(t){function e(e){return void 0===e&&(e=!1),t.call(this,e)||this}return h(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.tooltipText=function(t,e){return""+e},e.prototype.popupText=function(t,e){return""+e},e.prototype.layerUpdate=function(e,n){var i=this;if(t.prototype.layerUpdate.call(this,e),n){var o=this.columns(),r=o.indexOf(this.latitudeColumn()),a=o.indexOf(this.longitudeColumn()),s=o.indexOf(this.tooltipColumn()),l=o.indexOf(this.popupColumn()),h=this._db.checksum(),u=this.hashSum([],{dbChecksum:h});this._hashSum!==u&&(this._hashSum=u,this.clear(),this.data().filter((function(t){return!i.omitNullLatLong()||!!t[r]&&!!t[a]})).forEach((function(t){var e=new Er.exports.Marker([t[r],t[a]],n(t)).on("click",(function(n){return i.clickHandler(n,e,t)})),o=i.tooltipText(i.rowToObj(t),i.propValue(s,t,""));o&&e.bindTooltip(o,{direction:i.tooltipDirection(),offset:Er.exports.point(i.tooltipOffsetX(),i.tooltipOffsetY())});var h=i.popupText(i.rowToObj(t),i.propValue(l,t,""));h&&e.bindPopup(h,{offset:Er.exports.point(i.popupOffsetX(),i.popupOffsetY())}),i.add(e)})))}},e.prototype.clickHandler=function(t,e,n){var i=this._selection.click(e._icon);this._currSelRow=i?n:void 0,this.click(this.rowToObj(n),"",i)},e.prototype.click=function(t,e,n){},e}(Gr);ia.prototype._class+=" map_Markers",ia.prototype.publish("latitudeColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),ia.prototype.publish("longitudeColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),ia.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from IconsData",null,{tags:["Basic"]}),ia.prototype.publish("tooltipColumn",null,"set","Tooltip column",(function(){return this.columns()}),{optional:!0}),ia.prototype.publish("tooltipDirection","auto","set","Tooltip direction",["auto","left","top","right","bottom","center"]),ia.prototype.publish("tooltipOffsetX",0,"number","Tooltip offset X"),ia.prototype.publish("tooltipOffsetY",0,"number","Tooltip offset Y"),ia.prototype.publish("popupColumn",null,"set","Popup column",(function(){return this.columns()}),{optional:!0}),ia.prototype.publish("popupOffsetX",0,"number","Tooltip offset X"),ia.prototype.publish("popupOffsetY",0,"number","Tooltip offset Y");var oa=function(t){function e(e){return void 0===e&&(e=!1),t.call(this,e)||this}return h(e,t),e.prototype.layerUpdate=function(e){var n=this,i=this.columns().indexOf(this.iconUrlColumn());t.prototype.layerUpdate.call(this,e,(function(t){return{icon:new Er.exports.Icon({iconUrl:n.propValue(i,t,n.iconUrl()),iconSize:[n.iconWidth(),n.iconHeight()],iconAnchor:[n.iconAnchorX(),n.iconAnchorY()],props:{owner:n,row:t}}),draggable:!1}}))},e}(ia);oa.prototype._class+=" map_Icons",oa.prototype.publish("iconUrl","","string","Icon URL",null),oa.prototype.publish("iconUrlColumn",null,"set","Icon URL column",(function(){return this.columns()}),{optional:!0}),oa.prototype.publish("iconWidth",32,"number","Icon width"),oa.prototype.publish("iconHeight",32,"number","Icon height"),oa.prototype.publish("iconAnchorX",16,"number","Icon Anchor X"),oa.prototype.publish("iconAnchorY",32,"number","Icon Anchor Y");var ra=function(t){function e(){return t.call(this,!0)||this}return h(e,t),e}(oa);function aa(t){return[t[1],t[0]]}ra.prototype._class+=" map_ClusterIcons";var sa=function(t,e){return e[0]<-90?t[0]++:e[0]>90&&t[1]++,t},la=function(t){return t>90?t-360:t},ha=function(t){return t<-90?t+360:t},ua=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return h(n,t),n.prototype.fixDateLine=function(t){var e,n=t.reduce(sa,[0,0]),i=n[0],o=n[1];return i&&o?t.map((e=i>o?la:ha,function(t){return[e(t[0]),t[1]]})):t},n.prototype.hasBounds=function(){return!0},n.prototype.updateHexagons=function(){var t=this;this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id()));var n=this.cellFunc(this.polygonColumn(),[]),i=this.cellFunc(this.weightColumn(),0),o=this.data(),r=e.extent(o,i);this.clear(),o.forEach((function(e){t.add(new Er.exports.Polygon(t.fixDateLine(n(e)).map(aa),{color:t._palette(r[1],r[0],r[1]),fillColor:t._palette(i(e),r[0],r[1]),fillOpacity:t.opacity(),weight:1,origRow:e}).on("click",(function(n){return t.clickHandler(n,e)})))}))},n.prototype.layerUpdate=function(e){t.prototype.layerUpdate.call(this,e),this.updateHexagons()},n.prototype.zoomEnd=function(e){t.prototype.zoomEnd.call(this,e)},n.prototype.moveEnd=function(e){t.prototype.moveEnd.call(this,e),this.updateHexagons()},n.prototype.clickHandler=function(t,e){},n}(jr);ua.prototype._class+=" map_Polygons",ua.prototype._palette=e.Palette.rainbow("default"),ua.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",ua.prototype._palette.switch(),{tags:["Basic","Shared"]}),ua.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),ua.prototype.publish("polygonColumn",null,"set","Polygon column",(function(){return this.columns()}),{optional:!0}),ua.prototype.publish("weightColumn",null,"set","Weight column",(function(){return this.columns()}),{optional:!0}),ua.prototype.publish("opacity",.5,"number","Opacity",null,{tags:["Advanced"]});var ca=2048/Math.PI,pa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.lineData=function(){var t,e=this.columns(),n=e.indexOf(this.latitudeColumn()),i=e.indexOf(this.longitudeColumn()),o=[];return this.data().forEach((function(e){var r=[e[i],e[n]];t&&o.push({type:"LineString",coordinates:[r,t]}),t=r})),o},e.prototype.isNull=function(t){return!t[0]&&!t[1]},e.prototype.isNull2=function(t){return!!this.omitNullLatLong()&&(this.isNull(t[0])||this.isNull(t[1]))},e.prototype.layerUpdate=function(e,n){var i=this;t.prototype.layerUpdate.call(this,e,n);var o=this._lfd3._rootGroup;n=n||this._lfd3.projection,this._lfd3.svg().selectAll("defs").data([void 0]).enter().append("defs").append("marker").attr("class","marker").attr("id",this._id+"_arrowHead").attr("viewBox","0 0 10 10").attr("refX",10).attr("refY",5).attr("markerWidth",12).attr("markerHeight",12).attr("markerUnits","strokeWidth").attr("orient","auto").append("polyline").attr("points","0,0 10,5 0,10 1,5"),this._lfd3.svg().select("defs > marker").style("fill",this.strokeColor()).style("stroke",null);var r=n.latLngToLayerPoint({lat:0,lng:0}),a=go("Mercator").scale(ca).translate([r.x,r.y]),s=_i().projection(a),l=o.selectAll(".dataEdge").data(this.lineData().filter((function(t){return!i.isNull2(t.coordinates)})));l.enter().append("path").attr("class","dataEdge").attr("marker-end","url(#"+this._id+"_arrowHead)").merge(l).attr("d",s).style("stroke",this.strokeColor()).style("fill","none").attr("stroke-width",1/n.scale),l.exit().remove()},e.prototype.clickHandler=function(t,e){},e}(Ur);pa.prototype._class+=" map_Path",pa.prototype.publish("latitudeColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),pa.prototype.publish("longitudeColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),pa.prototype.publish("strokeColor"," #666666","html-color","Stroke Color",null,{optional:!0}),pa.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});var da=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.lineData=function(){var t=this.columns(),e=t.indexOf(this.latitudeColumn()),n=t.indexOf(this.longitudeColumn()),i=t.indexOf(this.latitude2Column()),o=t.indexOf(this.longitude2Column()),r=[];return this.data().forEach((function(t){var a=[t[n],t[e]],s=[t[o],t[i]];r.push({type:"LineString",coordinates:[a,s]})})),r},e}(pa);da.prototype._class+=" map_Lines",da.prototype.publish("latitude2Column",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),da.prototype.publish("longitude2Column",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0});var fa=function(t){function e(e){return void 0===e&&(e=!1),t.call(this,e)||this}return h(e,t),e.prototype.layerUpdate=function(e){var n=this,i=this.columns(),o=i.indexOf(this.faCharColumn()),r=i.indexOf(this.faCharColorColumn()),a=i.indexOf(this.strokeColorColumn()),s=i.indexOf(this.fillColorColumn());t.prototype.layerUpdate.call(this,e,(function(t){return{icon:Er.exports.BeautifyIcon({iconShape:"marker",icon:n.propValue(o,t,n.faChar()),textColor:n.propValue(r,t,n.faCharColor()),borderColor:n.propValue(a,t,n.strokeColor()),backgroundColor:n.propValue(s,t,n.fillColor()),props:{owner:n,row:t}}),draggable:!1}}))},e}(ia);fa.prototype._class+=" map_Pins",fa.prototype.publish("faChar","fa-circle","string","Default font awesome character"),fa.prototype.publish("faCharColumn",null,"set","Font awesome column",(function(){return this.columns()}),{optional:!0}),fa.prototype.publish("faCharColor","#ffffff","html-color","Default font awesome Color"),fa.prototype.publish("faCharColorColumn",null,"set","Font awesome color column",(function(){return this.columns()}),{optional:!0}),fa.prototype.publish("strokeColor","transparent","html-color","Default stroke Color",null,{optional:!0}),fa.prototype.publish("strokeColorColumn",null,"set","Stroke color column",(function(){return this.columns()}),{optional:!0}),fa.prototype.publish("fillColor","#376cea","html-color","Default fill Color",null,{optional:!0}),fa.prototype.publish("fillColorColumn",null,"set","Fill color column",(function(){return this.columns()}),{optional:!0});var _a=function(t){function e(){return t.call(this,!0)||this}return h(e,t),e}(fa);_a.prototype._class+=" map_ClusterPins";var ma={GB:["administrative_area_level_3","administrative_area_level_2","administrative_area_level_1"],IE:["administrative_area_level_2","administrative_area_level_1"],ND:["administrative_area_level_2","administrative_area_level_1"]},ga={};function ya(t){return ga[t]||(ga[t]={topology:void 0,nameIdx:{},codeIdx:{}}),ga[t]}var va=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.fetchTopo=function(t){return ya(t).topology?Promise.resolve(ya(t).topology):new Promise((function(e,n){No("".concat(Do(),"/").concat(t,".json"),(function(n){ya(t).topology=n,e(n)}))}))},e.prototype.fetchTopoIdx=function(t){for(var e in ya(t).nameIdx)return Promise.resolve(ya(t).nameIdx);return new Promise((function(e,n){No("".concat(Do(),"/").concat(t,"_idx.json"),(function(n){var i,o=ya(t),r=o.nameIdx,a=o.codeIdx;null===(i=ma[t])||void 0===i||i.forEach((function(t){var e=function(e){var i=n[t][e];Array.isArray(i)&&(r[e]||(r[e]={code:void 0,codes:[]}),r[e].codes=r[e].codes.concat(i),1===i.length&&(r[e].code=r[e].codes[0]),i.forEach((function(t){a[t]||(a[t]={name:void 0,score:9999,names:[]}),i.length<=a[t].score&&(a[t].name=e,a[t].score=i.length),a[t].names.push(e)})))};for(var i in n[t])e(i)})),e(r)}))}))},e.prototype.updateDataMap=function(e){var n=[],i=ya(this.region()).nameIdx;return e.forEach((function(t){var e,o=null===(e=i[t[0]])||void 0===e?void 0:e.codes;o?null==o||o.forEach((function(e){n.push([e,t[1],t])})):n.push([t[0],t[1],t])})),t.prototype.updateDataMap.call(this,n)},e.prototype.init=function(){var t=this,e=this.region();return this._initPromise&&this._prevRegion===e||(this._prevRegion=e,this._initPromise=Promise.all([this.fetchTopo(e),this.fetchTopoIdx(e)]).then((function(e){var n=e[0];for(var i in e[1],t._features=Mo(n,n.objects.PolbndA).features,t._features){var o=t._features[i].id||i;t._features[i].properties.hpccID=o}t.updateDataMap(t.data())}))),this._initPromise},e.prototype.tooltipHandler=function(t,e){var n,i=this._dataMap[e],o=ya(this.region()).codeIdx,r=i&&i[1]||"",a=null===(n=o[e])||void 0===n?void 0:n.names.map((function(t){var n;return(null===(n=o[e])||void 0===n?void 0:n.name)===t?"<u>".concat(t,"</u>"):t})).join(", ");return this.tooltipText(this.rowToObj(i),"<b>".concat(i&&i[2][0]||a||e,"</b>: ").concat(r))},e}(Jr);va.prototype._class+=" map_Region",va.prototype.publish("region","GB","set","Region Data",["AT","BE","BG","BR","CHLI","CY","CZ","DE","DK","EE","ES","FI","FR","GB","GE","GR","HR","HU","IE","IS","IT","KS","LT","LU","LV","MD","MK","MT","ND","NL","NO","PL","PT","RO","RS","SE","SI","SK","UA"]);var ba=function(t){function n(e){return void 0===e&&(e=!1),t.call(this,e)||this}return h(n,t),n.prototype.layerUpdate=function(n){var i=this,o=this.columns(),r=o.indexOf(this.textColumn()),a=o.indexOf(this.textColorColumn()),s=o.indexOf(this.strokeColorColumn()),l=o.indexOf(this.fillColorColumn());t.prototype.layerUpdate.call(this,n,(function(t){var n=i.propValue(r,t,i.text()),o=i.textSize(n,i.fontFamily(),i.fontSize());return i.textFormat_exists()&&(n=e.format(i.textFormat())(n)),{icon:Er.exports.BeautifyIcon({iconShape:"rectangle",iconAnchor:[o.width/2+i.textOffsetX(),o.height/2+i.textOffsetY()],html:'<span style="\n '.concat(i.fontFamily_exists()?"font-family:".concat(i.fontFamily(),";"):"","\n font-size:").concat(i.fontSize(),'px;\n pointer-events: none;\n white-space:nowrap;\n ">').concat(n,"</span>"),textColor:i.propValue(a,t,i.textColor()),borderColor:i.propValue(s,t,i.strokeColor()),backgroundColor:i.propValue(l,t,i.fillColor()),props:{owner:i,row:t}}),draggable:!1}}))},n}(ia);ba.prototype._class+=" map_Text",ba.prototype.publish("textOffsetX",0,"number","Horizontal offset of text"),ba.prototype.publish("textOffsetY",0,"number","Vertical offset of text"),ba.prototype.publish("text","","string","Default text"),ba.prototype.publish("textColumn",null,"set","Font awesome column",(function(){return this.columns()}),{optional:!0}),ba.prototype.publish("textColor","#ffffff","html-color","Default font awesome Color"),ba.prototype.publish("textColorColumn",null,"set","Text color column",(function(){return this.columns()}),{optional:!0}),ba.prototype.publish("textFontFamily",null,"set","Text color column",(function(){return this.columns()}),{optional:!0}),ba.prototype.publish("strokeColor","transparent","html-color","Default stroke Color",null,{optional:!0}),ba.prototype.publish("strokeColorColumn",null,"set","Stroke color column",(function(){return this.columns()}),{optional:!0}),ba.prototype.publish("fillColor","#376cea","html-color","Default fill Color",null,{optional:!0}),ba.prototype.publish("fillColorColumn",null,"set","Fill color column",(function(){return this.columns()}),{optional:!0}),ba.prototype.publish("fontFamily",null,"string","Font family",null,{optional:!0}),ba.prototype.publish("fontSize",16,"number","Font family",null,{optional:!0}),ba.prototype.publish("textFormat",null,"string","Format rules for text",null,{optional:!0});var La=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.getBounds=function(){var e=t.prototype.getBounds.call(this);return new Er.exports.LatLngBounds([e.getNorth(),e.getWest()],[17.755278,-64.565])},e}(Jr),wa=null,xa={},ka=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.init=function(){var t=this;return this._initPromise||(this._initPromise=new Promise((function(t,e){wa&&t(wa),No("".concat(Do(),"/us-counties.json"),(function(e){t(wa=e)}))})).then((function(e){for(var n in t._features=Mo(e.topology,e.topology.objects.counties).features,t._features)if(t._features[n].id){var i=t._features[n].id,o=e.countyNames[i];t._features[n].properties.hpccID=i,xa[i]=o}}))),this._initPromise},e.prototype.tooltipHandler=function(t,e){var n=this._dataMap[e],i=n&&n[1]||"";return this.tooltipText(this.rowToObj(n),"<b>".concat(xa[e],"</b>: ").concat(i))},e}(La);ka.prototype._class+=" map_USCounties";var Ma=null,Ca={},Pa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.init=function(){var t=this;return this._initPromise||(this._initPromise=new Promise((function(t,e){Ma&&t(Ma),No("".concat(Do(),"/us-states.json"),(function(e){t(Ma=e)}))})).then((function(e){for(var n in t._features=Mo(e.topology,e.topology.objects.states).features,t._features)if(t._features[n].id){var i=e.stateNames[t._features[n].id],o=i.code,r=i.name;t._features[n].properties.hpccID=o,Ca[o]=r}}))),this._initPromise},e.prototype.tooltipHandler=function(t,e){var n=this._dataMap[e],i=n&&n[1]||"";return this.tooltipText(this.rowToObj(n),"<b>".concat(Ca[e],"</b>: ").concat(i))},e}(La);Pa.prototype._class+=" map_USStates";var Ea=Object.freeze({__proto__:null,Circles:Hr,D3Circles:Fr,ClusterCircles:Wr,Countries:$r,DrawLayer:ea,FeatureLayer:jr,ClusterLayer:Gr,D3SurfaceLayer:Ur,HeatLayer:na,Icons:oa,ClusterIcons:ra,Leaflet:Rr,Markers:ia,Polygons:ua,Path:pa,Lines:da,Pins:fa,ClusterPins:_a,Region:va,Text:ba,TileLayer:Tr,USCounties:ka,USStates:Pa,World:Jr});t.BUILD_VERSION="2.102.9",t.CanvasPinLayer=xo,t.CanvasPins=w,t.Choropleth=Ao,t.ChoroplethContinents=Uo,t.ChoroplethCounties=Vo,t.ChoroplethCountries=Go,t.ChoroplethStates=Xo,t.ChoroplethStatesHeat=Jo,t.GMap=sr,t.GMapCounties=ur,t.GMapGraph=cr,t.GMapHeat=pr,t.GMapLayered=hr,t.GMapPin=fr,t.GMapPinLine=mr,t.GeoHash=Qo,t.Graph=gr,t.Graticule=yr,t.Heat=vr,t.IChoropleth=br,t.Layer=wo,t.Layered=bo,t.Leaflet=Ea,t.Lines=_r,t.OpenStreet=Mr,t.PKG_NAME="@hpcc-js/map",t.PKG_VERSION="2.75.4",t.Pins=dr,t.TestHeatMap=Cr,t.TopoJSONChoropleth=Pr,t.projections=_o,t.requireGoogleMap=rr,t.requireGoogleMapTimeout=function(t){or=t},t.resolve=go,t.topoJsonFolder=Do,t.types=fo,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
2
22
|
//# sourceMappingURL=index.min.js.map
|