@hpcc-js/map 2.79.1 → 2.79.2
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/dist/index.es6.js +26 -26
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +26 -26
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +2 -2
- package/dist/index.min.js.map +1 -1
- package/package.json +8 -8
- 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,7 +1,7 @@
|
|
|
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}"function"==typeof SuppressedError&&SuppressedError;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()?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(i):i,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}).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,R=Math.cos,Z=Math.ceil,j=Math.exp,H=Math.log,U=Math.pow,G=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 X(t){return(t=G(t/2))*t}function K(){}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:K,lineStart:K,lineEnd:K,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=K},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=R(e=(e*=A)/2+z),st=G(e)}function ft(t,e){var n=(t*=A)-rt,i=n>=0?1:-1,o=i*n,r=R(e=(e*=A)/2+z),a=G(e),s=st*a,l=at*r+s*R(o),h=s*i*G(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=R(n);return[i*R(e),i*G(e),G(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,Rt,Zt,jt,Ht,Ut,Gt,Ft,Wt,Vt,qt,Yt=x(),Xt={point:Kt,lineStart:Qt,lineEnd:$t,polygonStart:function(){Xt.point=te,Xt.lineStart=ee,Xt.lineEnd=ne,Yt.reset(),ut.polygonStart()},polygonEnd:function(){ut.polygonEnd(),Xt.point=Kt,Xt.lineStart=Qt,Xt.lineEnd=$t,lt<0?(wt=-(kt=180),xt=-(Mt=90)):Yt>P?Mt=90:Yt<-1e-6&&(xt=-90),zt[0]=wt,zt[1]=kt},sphere:function(){wt=-(kt=180),xt=-(Mt=90)}};function Kt(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(){Xt.point=Jt}function $t(){zt[0]=wt,zt[1]=kt,Xt.point=Kt,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:K,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=R(e*=A);le(n*R(t),n*G(t),G(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=R(e*=A);Wt=n*R(t),Vt=n*G(t),qt=G(e),ae.point=ce,le(Wt,Vt,qt)}function ce(t,e){t*=A;var n=R(e*=A),i=n*R(t),o=n*G(t),r=G(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)),Rt+=a*(Vt+(Vt=o)),Zt+=a*(qt+(qt=r)),le(Wt,Vt,qt)}function pe(){ae.point=se}function de(){ae.point=_e}function fe(){me(Gt,Ft),ae.point=se}function _e(t,e){Gt=t,Ft=e,t*=A,e*=A,ae.point=me;var n=R(e);Wt=n*R(t),Vt=n*G(t),qt=G(e),le(Wt,Vt,qt)}function me(t,e){t*=A;var n=R(e*=A),i=n*R(t),o=n*G(t),r=G(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,Ht+=c*s,Ut+=c*l,Dt+=u,Nt+=u*(Wt+(Wt=i)),Rt+=u*(Vt+(Vt=o)),Zt+=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=R(t),i=G(t),o=R(e),r=G(e);function a(t,e){var a=R(e),s=R(t)*a,l=G(t)*a,h=G(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=R(e),s=R(t)*a,l=G(t)*a,h=G(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=R(e),s=G(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*R(u),-s*G(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:K,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=G(i),r=[G(n),-R(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,_=G(f),m=R(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=G(b),w=R(b),x=v-d,k=x>=0?1:-1,M=k*x,C=M>T,E=_*L;if(Oe.add(N(E*k*G(M),m*w+E*R(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<-1e-6||a<P&&Oe<-1e-6)^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 Re=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=G(t-n);return I(a)>P?B((G(e)*(r=R(i))*G(n)-G(i)*(o=R(e))*G(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 Ze(t){var e=R(t),n=6*A,i=e>0,o=I(e)>P;function r(t,n){return R(t)*R(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,He=-1e9;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(He,Math.min(je,_)),m=Math.max(He,Math.min(je,m))],h=[e=Math.max(He,Math.min(je,e)),a=Math.max(He,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 Ge,Fe,We,Ve=x(),qe={sphere:K,point:K,lineStart:function(){qe.point=Xe,qe.lineEnd=Ye},lineEnd:K,polygonStart:K,polygonEnd:K};function Ye(){qe.point=qe.lineEnd=K}function Xe(t,e){Ge=t*=A,Fe=G(e*=A),We=R(e),qe.point=Ke}function Ke(t,e){t*=A;var n=G(e*=A),i=R(e),o=I(t-Ge),r=R(o),a=i*G(o),s=We*n-Fe*i*r,l=Fe*n+We*i*r;Ve.add(N(W(a*a+s*s),l)),Ge=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(Z(o/_)*_,i,_).map(c).concat(e.range(Z(l/m)*m,s,m).map(p)).concat(e.range(Z(n/d)*d,t,d).filter((function(t){return I(t%_)>P})).map(h)).concat(e.range(Z(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:K,lineStart:K,lineEnd:K,polygonStart:function(){bn.lineStart=Ln,bn.lineEnd=kn},polygonEnd:function(){bn.lineStart=bn.lineEnd=bn.point=K,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=1/0,Cn=Mn,Pn=-Mn,En=Pn,Tn={point:function(t,e){t<Mn&&(Mn=t);t>Pn&&(Pn=t);e<Cn&&(Cn=e);e>En&&(En=e)},lineStart:K,lineEnd:K,polygonStart:K,polygonEnd:K,result:function(){var t=[[Mn,Cn],[Pn,En]];return Pn=En=-(Cn=Mn=1/0),t}};var Sn,zn,On,Dn,An=0,In=0,Bn=0,Nn=0,Rn=0,Zn=0,jn=0,Hn=0,Un=0,Gn={point:Fn,lineStart:Wn,lineEnd:Yn,polygonStart:function(){Gn.lineStart=Xn,Gn.lineEnd=Kn},polygonEnd:function(){Gn.point=Fn,Gn.lineStart=Wn,Gn.lineEnd=Yn},result:function(){var t=Un?[jn/Un,Hn/Un]:Zn?[Nn/Zn,Rn/Zn]:Bn?[An/Bn,In/Bn]:[NaN,NaN];return An=In=Bn=Nn=Rn=Zn=jn=Hn=Un=0,t}};function Fn(t,e){An+=t,In+=e,++Bn}function Wn(){Gn.point=Vn}function Vn(t,e){Gn.point=qn,Fn(On=t,Dn=e)}function qn(t,e){var n=t-On,i=e-Dn,o=W(n*n+i*i);Nn+=o*(On+t)/2,Rn+=o*(Dn+e)/2,Zn+=o,Fn(On=t,Dn=e)}function Yn(){Gn.point=Fn}function Xn(){Gn.point=Jn}function Kn(){Qn(Sn,zn)}function Jn(t,e){Gn.point=Qn,Fn(Sn=On=t,zn=Dn=e)}function Qn(t,e){var n=t-On,i=e-Dn,o=W(n*n+i*i);Nn+=o*(On+t)/2,Rn+=o*(Dn+e)/2,Zn+=o,jn+=(o=Dn*t-On*e)*(On+t),Hn+=o*(Dn+e),Un+=3*o,Fn(On=t,Dn=e)}function $n(t){this._context=t}$n.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:K};var ti,ei,ni,ii,oi,ri=x(),ai={point:K,lineStart:function(){ai.point=si},lineEnd:function(){ti&&li(ei,ni),ai.point=K},polygonStart:function(){ti=!0},polygonEnd:function(){ti=null},result:function(){var t=+ri;return ri.reset(),t}};function si(t,e){ai.point=li,ei=ii=t,ni=oi=e}function li(t,e){ii-=t,oi-=e,ri.add(W(ii*ii+oi*oi)),ii=t,oi=e}function hi(){this._string=[]}function ui(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function ci(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(bn)),bn.result()},r.measure=function(t){return nt(t,n(ai)),ai.result()},r.bounds=function(t){return nt(t,n(Tn)),Tn.result()},r.centroid=function(t){return nt(t,n(Gn)),Gn.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 hi):new $n(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 pi(t){return function(e){var n=new di;for(var i in t)n[i]=t[i];return n.stream=e,n}}function di(){}function fi(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(Tn)),e(Tn.result()),null!=i&&t.clipExtent(i),t}function _i(t,e,n){return fi(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 mi(t,e,n){return _i(t,[[0,0],e],n)}function gi(t,e,n){return fi(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 yi(t,e,n){return fi(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)}hi.prototype={_radius:4.5,_circle:ui(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=ui(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}},di.prototype={constructor:di,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 vi=R(30*A);function bi(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<vi)&&(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 pi({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var Li=pi({point:function(t,e){this.stream.point(t*A,e*A)}});function wi(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 xi(t,e,n,i,o,r){var a=R(r),s=G(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 ki(t){return Mi((function(){return t}))()}function Mi(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=Re,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=xi(c,0,0,b,L,v).apply(null,e(f,_)),i=(v?xi:wi)(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=bi(s,C),S()}function S(){return h=u=null,P}return P.stream=function(t){return h&&u===t?h:h=Li(function(t){return pi({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?Ze(w=t*A):(w=null,Re),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=bi(s,C=t*t),S()):W(C)},P.fitExtent=function(t,e){return _i(P,t,e)},P.fitSize=function(t,e){return mi(P,t,e)},P.fitWidth=function(t,e){return gi(P,t,e)},P.fitHeight=function(t,e){return yi(P,t,e)},function(){return e=t.apply(this,arguments),P.invert=e.invert&&E,T()}}function Ci(t){var e=0,n=T/3,i=Mi(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 Pi(t,e){var n=G(t),i=(n+G(e))/2;if(I(i)<P)return function(t){var e=R(t);function n(t,n){return[t*e,G(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*G(e))/i;return[n*G(t*=i),r-n*R(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 Ei(){return Ci(Pi).scale(155.424).center([0,33.6442])}function Ti(){return Ei().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Si(t){return function(e,n){var i=R(e),o=R(n),r=t(i*o);return[r*o*G(e),r*G(n)]}}function zi(t){return function(e,n){var i=W(e*e+n*n),o=t(i),r=G(o),a=R(o);return[N(e*r,i*a),Y(i&&n*r/i)]}}var Oi=Si((function(t){return W(2/(1+t))}));Oi.invert=zi((function(t){return 2*Y(t/2)}));var Di=Si((function(t){return(t=q(t))&&t/G(t)}));function Ai(t,e){return[t,H(V((S+e)/2))]}function Ii(){return Bi(Ai).scale(961/O)}function Bi(t){var e,n,i,o=ki(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===Ai?[[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 Ni(t){return V((S+t)/2)}function Ri(t,e){var n=R(t),i=t===e?G(t):H(n/R(e))/H(Ni(e)/Ni(t)),o=n*U(Ni(t),i)/i;if(!i)return Ai;function r(t,e){o>0?e<-S+P&&(e=-S+P):e>S-P&&(e=S-P);var n=o/U(Ni(e),i);return[n*G(i*t),o-n*R(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 Zi(t,e){return[t,e]}function ji(t,e){var n=R(t),i=t===e?G(t):(n-R(e))/(e-t),o=n/i+t;if(I(i)<P)return Zi;function r(t,e){var n=o-e,r=i*t;return[n*G(r),o-n*R(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}Di.invert=zi((function(t){return t})),Ai.invert=function(t,e){return[t,2*B(j(e))-S]},Zi.invert=Zi;var Hi=1.340264,Ui=-.081106,Gi=893e-6,Fi=.003796,Wi=W(3)/2;function Vi(t,e){var n=Y(Wi*G(e)),i=n*n,o=i*i*i;return[t*R(n)/(Wi*(Hi+3*Ui*i+o*(7*Gi+9*Fi*i))),n*(Hi+Ui*i+o*(Gi+Fi*i))]}function qi(t,e){var n=R(e),i=R(t)*n;return[n*G(t)/i,G(e)/i]}function Yi(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 Xi(t,e){return[R(e)*G(t),G(e)]}function Ki(t,e){var n=R(e),i=1+R(t)*n;return[n*G(t)/i,G(e)/i]}function Ji(t,e){return[H(V((S+e)/2)),-t]}Vi.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*(Hi+Ui*o+r*(Gi+Fi*o))-e)/(Hi+3*Ui*o+r*(7*Gi+9*Fi*o)))*i)*o*o,!(I(n)<E));++a);return[Wi*t*(Hi+3*Ui*o+r*(7*Gi+9*Fi*o))/R(i),Y(G(i)/Wi)]},qi.invert=zi(B),Yi.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]},Xi.invert=zi(Y),Ki.invert=zi((function(t){return 2*B(t)})),Ji.invert=function(t,e){return[-e,2*B(j(t))-S]};var Qi=Object.freeze({__proto__:null,geoAlbers:Ti,geoAlbersUsa:function(){var t,e,n,i,o,r,a=Ti(),s=Ei().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=Ei().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 _i(u,t,e)},u.fitSize=function(t,e){return mi(u,t,e)},u.fitWidth=function(t,e){return gi(u,t,e)},u.fitHeight=function(t,e){return yi(u,t,e)},u.scale(1070)},geoArea:function(t){return ht.reset(),nt(t,ut),2*ht},geoAzimuthalEqualArea:function(){return ki(Oi).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:Oi,geoAzimuthalEquidistant:function(){return ki(Di).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:Di,geoBounds:function(t){var e,n,i,o,r,a,s;if(Mt=kt=-(wt=xt=1/0),St=[],nt(t,Xt),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=Rt=Zt=jt=Ht=Ut=0,nt(t,ae);var e=jt,n=Ht,i=Ut,o=e*e+n*n+i*i;return o<E&&(e=Nt,n=Rt,i=Zt,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:Re,geoClipCircle:Ze,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,geoConicConformal:function(){return Ci(Ri).scale(109.5).parallels([30,30])},geoConicConformalRaw:Ri,geoConicEqualArea:Ei,geoConicEqualAreaRaw:Pi,geoConicEquidistant:function(){return Ci(ji).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:ji,geoContains:function(t,e){return(t&&en.hasOwnProperty(t.type)?en[t.type]:on)(t,e)},geoDistance:tn,geoEqualEarth:function(){return ki(Vi).scale(177.158)},geoEqualEarthRaw:Vi,geoEquirectangular:function(){return ki(Zi).scale(152.63)},geoEquirectangularRaw:Zi,geoGnomonic:function(){return ki(qi).scale(144.049).clipAngle(60)},geoGnomonicRaw:qi,geoGraticule:pn,geoGraticule10:function(){return pn()()},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=pi({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=G(p=n%360*A),t=R(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 _i(v,t,e)},v.fitSize=function(t,e){return mi(v,t,e)},v.fitWidth=function(t,e){return gi(v,t,e)},v.fitHeight=function(t,e){return yi(v,t,e)},v},geoInterpolate:function(t,e){var n=t[0]*A,i=t[1]*A,o=e[0]*A,r=e[1]*A,a=R(i),s=G(i),l=R(r),h=G(r),u=a*R(n),c=a*G(n),p=l*R(o),d=l*G(o),f=2*Y(W(X(r-i)+a*l*X(o-n))),_=G(f),m=f?function(t){var e=G(t*=f)/_,n=G(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,geoMercator:Ii,geoMercatorRaw:Ai,geoNaturalEarth1:function(){return ki(Yi).scale(175.295)},geoNaturalEarth1Raw:Yi,geoOrthographic:function(){return ki(Xi).scale(249.5).clipAngle(90.000001)},geoOrthographicRaw:Xi,geoPath:ci,geoProjection:ki,geoProjectionMutator:Mi,geoRotation:ke,geoStereographic:function(){return ki(Ki).scale(250).clipAngle(142)},geoStereographicRaw:Ki,geoStream:nt,geoTransform:function(t){return{stream:pi(t)}},geoTransverseMercator:function(){var t=Bi(Ji),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:Ji});function $i(){}var to=1/0,eo=to,no=-to,io=no;var oo={point:function(t,e){t<to&&(to=t),t>no&&(no=t),e<eo&&(eo=e),e>io&&(io=e)},lineStart:$i,lineEnd:$i,polygonStart:$i,polygonEnd:$i,result:function(){var t=[[to,eo],[no,io]];return no=io=-(eo=to=1/0),t}};function ro(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(oo));var a=oo.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 ao,so=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 lo(){var t,e,n,i,o,r,a,s=1e-6,l=Ti(),h=Ei().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=Ei().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c=Ei().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 ro(d,t,e)},d.fitSize=function(t,e){return function(t,e,n){return ro(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"}(ao||(ao={}));var ho=[],uo={};for(var co in ao)"string"==typeof co&&(ho.push(co),uo[co]="AlbersUsaPr"===co?lo:Qi["geo".concat(co)]);function po(t){var e=uo[t];return e?e():(console.warn("Unknown projection: "+t),Ii())}function fo(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))}}fo(".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 _o=2048/Math.PI,mo=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);mo.prototype._class+=" map_Layered",mo.prototype.publish("projection",null,"set","Map projection type",ho),mo.prototype.publish("centerLat",0,"number","Center Latitude",null,{tags:["Basic"]}),mo.prototype.publish("centerLong",0,"number","Center Longitude",null,{tags:["Basic"]}),mo.prototype.publish("zoom",1,"number","Zoom Level",null,{tags:["Basic"]}),mo.prototype.publish("autoScaleMode","all","set","Auto Scale",["none","all"],{tags:["Basic"]}),mo.prototype.publish("layers",[],"widgetArray","Layers",null,{render:!1});var go=mo.prototype.projection;mo.prototype.projection=function(t){var e=go.apply(this,arguments);if(arguments.length){if(this._d3GeoProjection=po(t).scale(_o).translate([0,0]),"orthographic"===t)this._d3GeoProjection.clipAngle(90).rotate([0,0]);this._d3GeoPath=ci().projection(this._d3GeoProjection),this._autoScaleOnNextRender=!0}return e};var yo=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(){mo.prototype.render.apply(e,n)})),this},e.prototype.layerZoomed=function(t){},e}(mo);yo.prototype._class+=" map_Layer",yo.prototype.implements(n.ITooltip.prototype);var vo=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){yo.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){yo.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){yo.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}(yo);function bo(t){return t}function Lo(t,e){return"string"==typeof e&&(e=t.objects[e]),"GeometryCollection"===e.type?{type:"FeatureCollection",features:e.geometries.map((function(e){return wo(t,e)}))}:wo(t,e)}function wo(t,e){var n=e.id,i=e.bbox,o=null==e.properties?{}:e.properties,r=xo(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 xo(t,e){var n=function(t){if(null==t)return bo;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 ko(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 Mo(t){return xo(t,Co.apply(this,arguments))}function Co(t,e,n){var i,o,r;if(arguments.length>1)i=function(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)}function h(t){t.forEach(l)}function u(t){switch(i=t,t.type){case"GeometryCollection":t.geometries.forEach(u);break;case"LineString":s(t.arcs);break;case"MultiLineString":case"Polygon":l(t.arcs);break;case"MultiPolygon":h(t.arcs)}}return u(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}(0,e,n);else for(o=0,i=new Array(r=t.arcs.length);o<r;++o)i[o]=o;return{type:"MultiLineString",arcs:ko(t,i)}}vo.prototype._class+=" map_CanvasPinLayer",vo.prototype.publishProxy("clusterMode","pins","clusterMode"),vo.prototype.publishProxy("allCircles","pins","allCircles"),vo.prototype.publishProxy("showQuadtree","pins","showQuadtree"),vo.prototype.publishProxy("useAveragePos","pins","useAveragePos"),vo.prototype.publishProxy("shrinkFontToPin","pins","shrinkFontToPin"),vo.prototype.publishProxy("enableClustering","pins","enableClustering"),vo.prototype.publishProxy("useWeightedRadius","pins","useWeightedRadius"),vo.prototype.publishProxy("radiusWeightMult","pins","radiusWeightMult"),vo.prototype.publishProxy("searchRectMult","pins","searchRectMult"),vo.prototype.publishProxy("pinHeight","pins","pinHeight"),vo.prototype.publishProxy("pinWidth","pins","pinWidth"),vo.prototype.publishProxy("pinFontFamily","pins","pinFontFamily"),vo.prototype.publishProxy("pinFontSize","pins","pinFontSize"),vo.prototype.publishProxy("arrowHeight","pins","arrowHeight"),vo.prototype.publishProxy("arrowWidth","pins","arrowWidth"),vo.prototype.publish("latColumn",null,"set","latColumn",(function(){return this.columns()}),{optional:!0}),vo.prototype.publish("longColumn",null,"set","longColumn",(function(){return this.columns()}),{optional:!0}),vo.prototype.publish("weightColumn",null,"set","weightColumn",(function(){return this.columns()}),{optional:!0}),vo.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]});fo(".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 Po=window.__hpcc_topoJsonFolder||"./node_modules/@hpcc-js/map/TopoJSON";function Eo(t){if(!arguments.length)return Po;var e=Po;return Po=t,e}var To=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=yo.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){yo.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(yo.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(Mo(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){},n.prototype.dblclick=function(t,e,n){},n}(yo);To.prototype._class+=" map_Choropleth",To.prototype.mixin(e.Utility.SimpleSelectionMixin),To.prototype._palette=e.Palette.rainbow("default"),To.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",To.prototype._palette.switch(),{tags:["Basic","Shared"]}),To.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),To.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),To.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),To.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),To.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width"),To.prototype.publish("internalOnly",!1,"boolean","Internal mesh only"),To.prototype.publish("autoScaleMode","mesh","set","Auto Scale",["none","mesh","data"],{tags:["Basic"],override:!0});var So,zo,Oo=(So="application/json",zo=function(t){return JSON.parse(t.responseText)},function(t,n){var i=function(t){var n,i,o,r,a=e.dispatch("beforesend","progress","load","error"),s=e.map(),l=new XMLHttpRequest,h=null,u=null,c=0;function p(t){var e,i=l.status;if(!i&&function(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}(l)||i>=200&&i<300||304===i){if(o)try{e=o.call(n,l)}catch(t){return void a.call("error",n,t)}else e=l;a.call("load",n,e)}else a.call("error",n,t)}return"undefined"!=typeof XDomainRequest&&!("withCredentials"in l)&&/^(http(s)?:)?\/\//.test(t)&&(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=l.ontimeout=p:l.onreadystatechange=function(t){l.readyState>3&&p(t)},l.onprogress=function(t){a.call("progress",n,t)},n={header:function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?s.get(t):(null==e?s.remove(t):s.set(t,e+""),n)},mimeType:function(t){return arguments.length?(i=null==t?null:t+"",n):i},responseType:function(t){return arguments.length?(r=t,n):r},timeout:function(t){return arguments.length?(c=+t,n):c},user:function(t){return arguments.length<1?h:(h=null==t?null:t+"",n)},password:function(t){return arguments.length<1?u:(u=null==t?null:t+"",n)},response:function(t){return o=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,o,p){return l.open(e,t,!0,h,u),null==i||s.has("accept")||s.set("accept",i+",*/*"),l.setRequestHeader&&s.each((function(t,e){l.setRequestHeader(e,t)})),null!=i&&l.overrideMimeType&&l.overrideMimeType(i),null!=r&&(l.responseType=r),c>0&&(l.timeout=c),null==p&&"function"==typeof o&&(p=o,o=null),null!=p&&1===p.length&&(p=function(t){return function(e,n){t(null==e?n:null)}}(p)),null!=p&&n.on("error",p).on("load",(function(t){p(null,t)})),a.call("beforesend",n,l),l.send(null==o?null:o),n},abort:function(){return l.abort(),n},on:function(){var t=a.on.apply(a,arguments);return t===a?n:t}},n}(t).mimeType(So).response(zo);if(null!=n){if("function"!=typeof n)throw new Error("invalid callback: "+n);return i.get(n)}return i}),Do=null,Ao=null,Io=null,Bo=function(t){function n(){return t.call(this)||this}return h(n,t),n.prototype.layerEnter=function(t,n,i){To.prototype.layerEnter.apply(this,arguments),this._choroTopology=Do.topology,this._choroTopologyObjectsCountries=Do.topology.objects.countries,this._choroTopologyObjectsLand=Do.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){To.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(Io[e[0]]);return n||console.warn("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){Do&&t(),Oo("".concat(Eo(),"/countries.json"),(function(e){for(var n in Ao=Lo((Do=e).topology,Do.topology.objects.countries).features,Io={},Ao)Ao[n].id&&Do.countryNames[Ao[n].id]&&(Io[Do.countryNames[Ao[n].id].name]=Ao[n]);t()}))}))),this._topoJsonPromise},n}(To);Bo.prototype._class+=" map_ChoroplethCountries";var No=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.layerEnter=function(t,e,n){Bo.prototype.layerEnter.apply(this,arguments),this._choroTopologyObjects=this._choroTopologyObjectsLand},e}(Bo);No.prototype._class+=" map_ChoroplethContinents";var Ro=null,Zo=null,jo=null,Ho=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){To.prototype.layerEnter.apply(this,arguments),this._choroTopology=Ro.topology,this._choroTopologyObjects=Ro.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:Ro.countyNames[e],value:o._dataMap[e]?o._dataMap[e][1]:"N/A"})}))},n.prototype.layerUpdate=function(t){To.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(jo[e[0]]);return n||console.warn("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){Ro&&t(),Oo("".concat(Eo(),"/us-counties.json"),(function(e){for(var n in Zo=Lo((Ro=e).topology,Ro.topology.objects.counties).features,jo={},Zo)Zo[n].id&&(jo[Zo[n].id]=Zo[n]);t()}))}))),this._topoJsonPromise},n.__inputs=[{id:"fips",type:"string"},{id:"value",type:"number"}],n}(To);Ho.prototype._class+=" map_ChoroplethCounties",Ho.prototype.publish("onClickFormatFIPS",!1,"boolean","format FIPS code as a String on Click");var Uo=null,Go=null,Fo=null,Wo=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){To.prototype.layerEnter.apply(this,arguments),this._choroTopology=Uo.topology,this._choroTopologyObjects=Uo.topology.objects.states,this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);var o=this;this.tooltipHTML((function(t){var e=Fo[t[0]].id;return o.tooltipFormat({label:Uo.stateNames[e].name,value:t[1]})}))},n.prototype.layerUpdate=function(t){To.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(Fo[e[0]]);return n||console.warn("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){Uo&&t(),Oo("".concat(Eo(),"/us-states.json"),(function(e){for(var n in Go=Lo((Uo=e).topology,Uo.topology.objects.states).features,Fo={},Go)Go[n].id&&(Fo[Uo.stateNames[Go[n].id].code]=Go[n]);t()}))}))),this._topoJsonPromise},n.__inputs=[{id:"state",type:"string"},{id:"value",type:"number"}],n}(To);Wo.prototype._class+=" map_ChoroplethStates";var Vo=function(t){function e(){return t.call(this)||this}return h(e,t),e}(mo);Vo.prototype._class+=" map_ChoroplethStatesHeat";fo(".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=yo.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){yo.prototype.layerEnter.apply(this,arguments),this.geohash=new so,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){yo.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){},n.prototype.dblclick=function(t,e,n){},n}(yo);function Yo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}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 Xo,Ko={exports:{}};var Jo=(Xo||(Xo=1,function(t){!function(){if(null===("undefined"!=typeof window?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}()}()}(Ko)),Ko.exports),Qo=Yo(Jo),$o=s({__proto__:null,default:Qo},[Jo]);fo(".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 tr=Qo||$o;t.google=null;var er,nr=15e3;function ir(e){return er||(er=o.promiseTimeout(nr,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{tr.KEY=window.__hpcc_gmap_apikey||"AIzaSyDwGn2i1i_pMZvnqYJN1BksD_tjYaCOWKg",tr.LIBRARIES=["geometry","drawing"],tr.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(nr,"ms."))}))),er}var or=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}(),rr=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 or(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){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":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 ir().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.warn("Data not found for this location.")},o}(e.HTMLWidget);rr.prototype._class+=" map_GMap",rr.prototype.publish("outdoorStreetViewOnly",!1,"boolean","If true, streetView will only display outdoor locations"),rr.prototype.publish("showStreetViewMarker",!1,"boolean","If true, streetView marker will be hidden"),rr.prototype.publish("useComputedHeading",!1,"boolean","If true, centerAddress streetView compute the ideal panorama heading"),rr.prototype.publish("type","road","set","Map Type",["terrain","road","satellite","hybrid"],{tags:["Basic"]}),rr.prototype.publish("centerLat",42.877742,"number","Center Latitude",null,{tags:["Basic"]}),rr.prototype.publish("centerLong",-97.380979,"number","Center Longitude",null,{tags:["Basic"]}),rr.prototype.publish("centerAddress",null,"string","Address to center map on",null,{tags:["Basic"],optional:!0}),rr.prototype.publish("zoom",4,"number","Zoom Level",null,{tags:["Basic"]}),rr.prototype.publish("singleZoomToMaxZoom",14,"number","Max zoomTo level with single item"),rr.prototype.publish("panControl",!0,"boolean","Pan Controls",null,{tags:["Basic"]}),rr.prototype.publish("zoomControl",!0,"boolean","Zoom Controls",null,{tags:["Basic"]}),rr.prototype.publish("scaleControl",!0,"boolean","Scale Controls",null,{tags:["Basic"]}),rr.prototype.publish("mapTypeControl",!1,"boolean","Map Type Controls",null,{tags:["Basic"]}),rr.prototype.publish("fullscreenControl",!1,"boolean","Fullscreen Controls",null,{tags:["Basic"]}),rr.prototype.publish("streetViewControl",!1,"boolean","StreetView Controls",null,{tags:["Basic"]}),rr.prototype.publish("overviewMapControl",!1,"boolean","OverviewMap Controls",null,{tags:["Basic"]}),rr.prototype.publish("streetView",!1,"boolean","Streetview",null,{tags:["Basic"]}),rr.prototype.publish("drawingTools",!1,"boolean","Drawing Tools",null,{tags:["Basic"]}),rr.prototype.publish("drawingState","","string","Map Drawings",null,{disable:function(t){return!1===t.drawingTools()}}),rr.prototype.publish("googleMapStyles",{},"object","Styling for map colors etc",null,{tags:["Basic"]});var ar=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}(mo),sr=function(e){function n(){var t=e.call(this)||this;return t.layered=new ar(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}(rr);sr.prototype._class+=" map_GMapLayered";var lr=function(t){function e(){var e=t.call(this)||this,n=e;return e._counties=(new Ho).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(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){},e.prototype.dblclick=function(t,e,n){},e}(sr);lr.prototype._class+=" map_GMapCounties",lr.prototype.publish("autoScale",!1,"boolean","Auto scale to data");var hr=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;return 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}),i.apply(this,arguments)},this._viewportSurface.widget(n)},n}(rr);hr.prototype._class+=" map_GMapGraph";var ur=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}(rr);ur.prototype._class+=" map_GMapHeat";fo(".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 cr=function(t){function n(){var n=t.call(this)||this;return e.Utility.SimpleSelectionMixin.call(n),n._geohash=new so,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){yo.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){yo.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){yo.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){},n.prototype.dblclick=function(t,e,n){},n}(yo);cr.prototype._class+=" map_Pins",cr.prototype.mixin(e.Utility.SimpleSelectionMixin),cr.prototype.publish("geohashColumn",null,"set","Geohash column",(function(){return this.columns()}),{optional:!0}),cr.prototype.publish("tooltipColumn",null,"set","Tooltip column",(function(){return this.columns()}),{optional:!0}),cr.prototype.publish("latColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),cr.prototype.publish("longColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),cr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),cr.prototype.publish("fillColor","#00FFDD","html-color","Pin Color",null,{optional:!0}),cr.prototype.publish("omitNullLatLong",!1,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]}),cr.prototype.publish("strokeWidth",.5,"number","Pin Border Thickness (pixels)",null,{tags:["Basic"]}),cr.prototype.publish("strokeColor","","html-color","Pin Border Color",null,{optional:!0}),cr.prototype.publish("fontSize",18,"number","Font Size",null,{tags:["Basic","Shared"]}),cr.prototype.publish("fontFamily","Verdana","string","Font Name",null,{tags:["Basic","Shared","Shared"]}),cr.prototype.publish("fontColor","#000000","html-color","Font Color",null,{tags:["Basic","Shared"]}),cr.prototype.publish("pinType","pin","set","Pin Type",["pin","circle","rectangle","rectangle-pin"],{tags:["Basic"]}),cr.prototype.publish("arrowWidth",8,"number","Pin arrow width (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["pin","rectangle-pin"].indexOf(t.pinType())}}),cr.prototype.publish("arrowHeight",12,"number","Pin arrow height (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["pin","rectangle-pin"].indexOf(t.pinType())}}),cr.prototype.publish("pinWidth",20,"number","Width of pin (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["rectangle","rectangle-pin"].indexOf(t.pinType())}}),cr.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())}}),cr.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())}}),cr.prototype.publish("pinRadius",12,"number","Radius of circle (pixels)",null,{tags:["Basic"],disable:function(t){return"circle"!==t.pinType()}}),cr.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 pr=function(t){function e(){var e=t.call(this)||this,n=e;return e._pins=(new cr).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){},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){},e}(sr);pr.prototype._class+=" map_GMapPin",pr.prototype.publish("autoScale",!1,"boolean","Auto scale to data"),pr.prototype.publishProxy("pinColor","_pins","fillColor"),pr.prototype.publishProxy("pinType","_pins","pinType"),pr.prototype.publishProxy("pinWidth","_pins","pinWidth"),pr.prototype.publishProxy("pinHeight","_pins","pinHeight"),pr.prototype.publishProxy("cornerRadius","_pins","cornerRadius"),pr.prototype.publishProxy("pinRadius","_pins","pinRadius"),pr.prototype.publishProxy("arrowWidth","_pins","arrowWidth"),pr.prototype.publishProxy("arrowHeight","_pins","arrowHeight"),pr.prototype.publishProxy("textBaseline","_pins","textBaseline"),pr.prototype.publishProxy("strokeWidth","_pins","strokeWidth"),pr.prototype.publishProxy("omitNullLatLong","_pins","omitNullLatLong"),pr.prototype.publish("latitudeColumn",null,"set","Latitude",(function(){return this.columns()}),{optional:!0}),pr.prototype.publish("longitudeColumn",null,"set","Longitude",(function(){return this.columns()}),{optional:!0}),pr.prototype.publish("colorColumn",null,"set","Color",(function(){return this.columns()}),{optional:!0}),pr.prototype.publish("tooltipColumn",null,"set","Tooltip",(function(){return this.columns()}),{optional:!0}),pr.prototype.publish("streetViewOnClick",!1,"boolean","Switch to street view when pin clicked");fo(".map_Layered .marker{fill:#656565;stroke:none}.map_Layered .dataEdge{stroke:#000;fill:none}");var dr=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.data=function(t){var e=yo.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){yo.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){yo.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){yo.prototype.layerZoomed.apply(this,arguments),this._edgesPaths.attr("stroke-width","".concat(.5/t.zoomScale(),"px"))},e}(yo);dr.prototype._class+=" map_Lines",dr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]});var fr=function(t){function e(){var e=t.call(this)||this,n=e;return e._lines=new dr,e._pins=(new cr).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){},e.prototype.dblclick=function(t,e,n){},e}(sr);fr.prototype._class+=" map_GMapPinLine",fr.prototype.publish("autoScale",!1,"boolean","Auto scale to data"),fr.prototype.publish("fromPinColor","green","html-color","From Pin Color"),fr.prototype.publish("fromLatitudeColumn",null,"set","From Latitude",(function(){return this.columns()}),{optional:!0}),fr.prototype.publish("fromLongitudeColumn",null,"set","From Longitude",(function(){return this.columns()}),{optional:!0}),fr.prototype.publish("fromColorColumn",null,"set","From Color",(function(){return this.columns()}),{optional:!0}),fr.prototype.publish("fromTooltipColumn",null,"set","From Tooltip",(function(){return this.columns()}),{optional:!0}),fr.prototype.publish("toPinColor","red","html-color","To Pin Color"),fr.prototype.publish("toLatitudeColumn",null,"set","To Latitude",(function(){return this.columns()}),{optional:!0}),fr.prototype.publish("toLongitudeColumn",null,"set","To Longitude",(function(){return this.columns()}),{optional:!0}),fr.prototype.publish("toColorColumn",null,"set","To Color",(function(){return this.columns()}),{optional:!0}),fr.prototype.publish("toTooltipColumn",null,"set","To Tooltip",(function(){return this.columns()}),{optional:!0});fo(".map_Layered .marker{fill:#656565;stroke:none;stroke-width:1px}.map_Layered .dataEdge{stroke:#000;fill:none}");var _r=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=cr.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=cr.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){cr.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){cr.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){cr.prototype.layerZoomed.apply(this,arguments),this._edgesPaths.attr("stroke-width","".concat(.5/t.zoomScale(),"px"))},e}(cr);_r.prototype._class+=" map_Graph";fo(".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 mr=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){yo.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}(yo);mr.prototype._class+=" map_Graticule",mr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),mr.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),mr.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width");fo(".map_Heat canvas{pointer-events:none}");var gr=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.layerEnter=function(t,e,n){yo.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){yo.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){yo.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}(yo);function yr(){}function vr(t){return t.k}function br(t){return[t.x,t.y]}function Lr(t){return function(){return t}}gr.prototype._class+=" map_Heat",gr.prototype.publish("latColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),gr.prototype.publish("longColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),gr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),yr.prototype._palette=e.Palette.rainbow("default"),yr.prototype.click=function(t,e,n){};fo(".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 wr=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){yo.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=vr,l=br,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:Lr(+t),u):s},u.translate=function(t){return arguments.length?(l="function"==typeof t?t:Lr([+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(4096*n).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){var e=t/256;return"translate(-2048,-2048) scale("+e+")"}(r)).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"})).transition().duration(500).style("opacity",1)},n._copyrightText="© OpenStreetMap contributors",n}(yo);wr.prototype._class+=" map_OpenStreet",wr.prototype.publish("tileProvider","OpenStreetMap","set","Tile Provider",["OpenStreetMap","OpenStreetMap Hot","MapQuest","MapQuest Sat","Stamen Watercolor","OpenCycleMap"],{tags:["Basic","Shared"]});var xr=function(t){function e(){return t.call(this)||this}return h(e,t),e}(mo);function kr(){To.call(this),this.projection("Mercator")}xr.prototype._class+=" map_TestHeatMap",kr.prototype=Object.create(To.prototype),kr.prototype.constructor=kr,kr.prototype._class+=" map_TopoJSONChoropleth",kr.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"]),kr.prototype.layerEnter=function(t,n,i){To.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]})}))},kr.prototype.layerUpdate=function(t){To.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.warn("Unknown Country: "+e),i})).style("fill",(function(t){return n._palette(t[1],n._dataMinWeight,n._dataMaxWeight)})),this.choroPaths.exit().remove()},kr.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){Oo("".concat(Eo(),"/").concat(t.region(),".json"),(function(n){function i(n){t._choroTopologyIndex=n,e()}t._choroTopology=n,t._choroTopologyObjects=n.objects.PolbndA,t._choroTopologyFeatures=Lo(t._choroTopology,t._choroTopologyObjects).features,Oo("".concat(Eo(),"/").concat(t.region(),"_idx.json"),i).on("error",(function(t){i({})}))}))}))}return this._topoJsonPromise};var Mr,Cr={exports:{}};var Pr=(Mr||(Mr=1,function(t){var e;self,e=()=>(()=>{var t={14:(t,e,n)=>{t.exports=n.p+"011a678e3efe41981754.png"},51:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},62: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}},66:(t,e,n)=>{t.exports=n.p+"1e8408af1a34bdf61457.png"},89:(t,e,n)=>{n.d(e,{A:()=>s});var i=n(758),o=n.n(i),r=n(935),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},128: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)}},141:(t,e,n)=>{n.d(e,{A:()=>m});var i=n(758),o=n.n(i),r=n(935),a=n.n(r),s=n(62),l=n.n(s),h=new URL(n(14),n.b),u=new URL(n(327),n.b),c=new URL(n(66),n.b),p=a()(o()),d=l()(h),f=l()(u),_=l()(c);p.push([t.id,`/* required styles */\n\n.leaflet-pane,\n.leaflet-tile,\n.leaflet-marker-icon,\n.leaflet-marker-shadow,\n.leaflet-tile-container,\n.leaflet-pane > svg,\n.leaflet-pane > canvas,\n.leaflet-zoom-box,\n.leaflet-image-layer,\n.leaflet-layer {\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\t}\n.leaflet-container {\n\toverflow: hidden;\n\t}\n.leaflet-tile,\n.leaflet-marker-icon,\n.leaflet-marker-shadow {\n\t-webkit-user-select: none;\n\t -moz-user-select: none;\n\t user-select: none;\n\t -webkit-user-drag: none;\n\t}\n/* Prevents IE11 from highlighting tiles in blue */\n.leaflet-tile::selection {\n\tbackground: transparent;\n}\n/* Safari renders non-retina tile on retina better with this, but Chrome is worse */\n.leaflet-safari .leaflet-tile {\n\timage-rendering: -webkit-optimize-contrast;\n\t}\n/* hack that prevents hw layers "stretching" when loading new tiles */\n.leaflet-safari .leaflet-tile-container {\n\twidth: 1600px;\n\theight: 1600px;\n\t-webkit-transform-origin: 0 0;\n\t}\n.leaflet-marker-icon,\n.leaflet-marker-shadow {\n\tdisplay: block;\n\t}\n/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */\n/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */\n.leaflet-container .leaflet-overlay-pane svg {\n\tmax-width: none !important;\n\tmax-height: none !important;\n\t}\n.leaflet-container .leaflet-marker-pane img,\n.leaflet-container .leaflet-shadow-pane img,\n.leaflet-container .leaflet-tile-pane img,\n.leaflet-container img.leaflet-image-layer,\n.leaflet-container .leaflet-tile {\n\tmax-width: none !important;\n\tmax-height: none !important;\n\twidth: auto;\n\tpadding: 0;\n\t}\n\n.leaflet-container img.leaflet-tile {\n\t/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */\n\tmix-blend-mode: plus-lighter;\n}\n\n.leaflet-container.leaflet-touch-zoom {\n\t-ms-touch-action: pan-x pan-y;\n\ttouch-action: pan-x pan-y;\n\t}\n.leaflet-container.leaflet-touch-drag {\n\t-ms-touch-action: pinch-zoom;\n\t/* Fallback for FF which doesn't support pinch-zoom */\n\ttouch-action: none;\n\ttouch-action: pinch-zoom;\n}\n.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {\n\t-ms-touch-action: none;\n\ttouch-action: none;\n}\n.leaflet-container {\n\t-webkit-tap-highlight-color: transparent;\n}\n.leaflet-container a {\n\t-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);\n}\n.leaflet-tile {\n\tfilter: inherit;\n\tvisibility: hidden;\n\t}\n.leaflet-tile-loaded {\n\tvisibility: inherit;\n\t}\n.leaflet-zoom-box {\n\twidth: 0;\n\theight: 0;\n\t-moz-box-sizing: border-box;\n\t box-sizing: border-box;\n\tz-index: 800;\n\t}\n/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */\n.leaflet-overlay-pane svg {\n\t-moz-user-select: none;\n\t}\n\n.leaflet-pane { z-index: 400; }\n\n.leaflet-tile-pane { z-index: 200; }\n.leaflet-overlay-pane { z-index: 400; }\n.leaflet-shadow-pane { z-index: 500; }\n.leaflet-marker-pane { z-index: 600; }\n.leaflet-tooltip-pane { z-index: 650; }\n.leaflet-popup-pane { z-index: 700; }\n\n.leaflet-map-pane canvas { z-index: 100; }\n.leaflet-map-pane svg { z-index: 200; }\n\n.leaflet-vml-shape {\n\twidth: 1px;\n\theight: 1px;\n\t}\n.lvml {\n\tbehavior: url(#default#VML);\n\tdisplay: inline-block;\n\tposition: absolute;\n\t}\n\n\n/* control positioning */\n\n.leaflet-control {\n\tposition: relative;\n\tz-index: 800;\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\n\tpointer-events: auto;\n\t}\n.leaflet-top,\n.leaflet-bottom {\n\tposition: absolute;\n\tz-index: 1000;\n\tpointer-events: none;\n\t}\n.leaflet-top {\n\ttop: 0;\n\t}\n.leaflet-right {\n\tright: 0;\n\t}\n.leaflet-bottom {\n\tbottom: 0;\n\t}\n.leaflet-left {\n\tleft: 0;\n\t}\n.leaflet-control {\n\tfloat: left;\n\tclear: both;\n\t}\n.leaflet-right .leaflet-control {\n\tfloat: right;\n\t}\n.leaflet-top .leaflet-control {\n\tmargin-top: 10px;\n\t}\n.leaflet-bottom .leaflet-control {\n\tmargin-bottom: 10px;\n\t}\n.leaflet-left .leaflet-control {\n\tmargin-left: 10px;\n\t}\n.leaflet-right .leaflet-control {\n\tmargin-right: 10px;\n\t}\n\n\n/* zoom and fade animations */\n\n.leaflet-fade-anim .leaflet-popup {\n\topacity: 0;\n\t-webkit-transition: opacity 0.2s linear;\n\t -moz-transition: opacity 0.2s linear;\n\t transition: opacity 0.2s linear;\n\t}\n.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {\n\topacity: 1;\n\t}\n.leaflet-zoom-animated {\n\t-webkit-transform-origin: 0 0;\n\t -ms-transform-origin: 0 0;\n\t transform-origin: 0 0;\n\t}\nsvg.leaflet-zoom-animated {\n\twill-change: transform;\n}\n\n.leaflet-zoom-anim .leaflet-zoom-animated {\n\t-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);\n\t -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);\n\t transition: transform 0.25s cubic-bezier(0,0,0.25,1);\n\t}\n.leaflet-zoom-anim .leaflet-tile,\n.leaflet-pan-anim .leaflet-tile {\n\t-webkit-transition: none;\n\t -moz-transition: none;\n\t transition: none;\n\t}\n\n.leaflet-zoom-anim .leaflet-zoom-hide {\n\tvisibility: hidden;\n\t}\n\n\n/* cursors */\n\n.leaflet-interactive {\n\tcursor: pointer;\n\t}\n.leaflet-grab {\n\tcursor: -webkit-grab;\n\tcursor: -moz-grab;\n\tcursor: grab;\n\t}\n.leaflet-crosshair,\n.leaflet-crosshair .leaflet-interactive {\n\tcursor: crosshair;\n\t}\n.leaflet-popup-pane,\n.leaflet-control {\n\tcursor: auto;\n\t}\n.leaflet-dragging .leaflet-grab,\n.leaflet-dragging .leaflet-grab .leaflet-interactive,\n.leaflet-dragging .leaflet-marker-draggable {\n\tcursor: move;\n\tcursor: -webkit-grabbing;\n\tcursor: -moz-grabbing;\n\tcursor: grabbing;\n\t}\n\n/* marker & overlays interactivity */\n.leaflet-marker-icon,\n.leaflet-marker-shadow,\n.leaflet-image-layer,\n.leaflet-pane > svg path,\n.leaflet-tile-container {\n\tpointer-events: none;\n\t}\n\n.leaflet-marker-icon.leaflet-interactive,\n.leaflet-image-layer.leaflet-interactive,\n.leaflet-pane > svg path.leaflet-interactive,\nsvg.leaflet-image-layer.leaflet-interactive path {\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\n\tpointer-events: auto;\n\t}\n\n/* visual tweaks */\n\n.leaflet-container {\n\tbackground: #ddd;\n\toutline-offset: 1px;\n\t}\n.leaflet-container a {\n\tcolor: #0078A8;\n\t}\n.leaflet-zoom-box {\n\tborder: 2px dotted #38f;\n\tbackground: rgba(255,255,255,0.5);\n\t}\n\n\n/* general typography */\n.leaflet-container {\n\tfont-family: "Helvetica Neue", Arial, Helvetica, sans-serif;\n\tfont-size: 12px;\n\tfont-size: 0.75rem;\n\tline-height: 1.5;\n\t}\n\n\n/* general toolbar styles */\n\n.leaflet-bar {\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.65);\n\tborder-radius: 4px;\n\t}\n.leaflet-bar a {\n\tbackground-color: #fff;\n\tborder-bottom: 1px solid #ccc;\n\twidth: 26px;\n\theight: 26px;\n\tline-height: 26px;\n\tdisplay: block;\n\ttext-align: center;\n\ttext-decoration: none;\n\tcolor: black;\n\t}\n.leaflet-bar a,\n.leaflet-control-layers-toggle {\n\tbackground-position: 50% 50%;\n\tbackground-repeat: no-repeat;\n\tdisplay: block;\n\t}\n.leaflet-bar a:hover,\n.leaflet-bar a:focus {\n\tbackground-color: #f4f4f4;\n\t}\n.leaflet-bar a:first-child {\n\tborder-top-left-radius: 4px;\n\tborder-top-right-radius: 4px;\n\t}\n.leaflet-bar a:last-child {\n\tborder-bottom-left-radius: 4px;\n\tborder-bottom-right-radius: 4px;\n\tborder-bottom: none;\n\t}\n.leaflet-bar a.leaflet-disabled {\n\tcursor: default;\n\tbackground-color: #f4f4f4;\n\tcolor: #bbb;\n\t}\n\n.leaflet-touch .leaflet-bar a {\n\twidth: 30px;\n\theight: 30px;\n\tline-height: 30px;\n\t}\n.leaflet-touch .leaflet-bar a:first-child {\n\tborder-top-left-radius: 2px;\n\tborder-top-right-radius: 2px;\n\t}\n.leaflet-touch .leaflet-bar a:last-child {\n\tborder-bottom-left-radius: 2px;\n\tborder-bottom-right-radius: 2px;\n\t}\n\n/* zoom control */\n\n.leaflet-control-zoom-in,\n.leaflet-control-zoom-out {\n\tfont: bold 18px 'Lucida Console', Monaco, monospace;\n\ttext-indent: 1px;\n\t}\n\n.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {\n\tfont-size: 22px;\n\t}\n\n\n/* layers control */\n\n.leaflet-control-layers {\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.4);\n\tbackground: #fff;\n\tborder-radius: 5px;\n\t}\n.leaflet-control-layers-toggle {\n\tbackground-image: url(${d});\n\twidth: 36px;\n\theight: 36px;\n\t}\n.leaflet-retina .leaflet-control-layers-toggle {\n\tbackground-image: url(${f});\n\tbackground-size: 26px 26px;\n\t}\n.leaflet-touch .leaflet-control-layers-toggle {\n\twidth: 44px;\n\theight: 44px;\n\t}\n.leaflet-control-layers .leaflet-control-layers-list,\n.leaflet-control-layers-expanded .leaflet-control-layers-toggle {\n\tdisplay: none;\n\t}\n.leaflet-control-layers-expanded .leaflet-control-layers-list {\n\tdisplay: block;\n\tposition: relative;\n\t}\n.leaflet-control-layers-expanded {\n\tpadding: 6px 10px 6px 6px;\n\tcolor: #333;\n\tbackground: #fff;\n\t}\n.leaflet-control-layers-scrollbar {\n\toverflow-y: scroll;\n\toverflow-x: hidden;\n\tpadding-right: 5px;\n\t}\n.leaflet-control-layers-selector {\n\tmargin-top: 2px;\n\tposition: relative;\n\ttop: 1px;\n\t}\n.leaflet-control-layers label {\n\tdisplay: block;\n\tfont-size: 13px;\n\tfont-size: 1.08333em;\n\t}\n.leaflet-control-layers-separator {\n\theight: 0;\n\tborder-top: 1px solid #ddd;\n\tmargin: 5px -10px 5px -6px;\n\t}\n\n/* Default icon URLs */\n.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */\n\tbackground-image: url(${_});\n\t}\n\n\n/* attribution and scale controls */\n\n.leaflet-container .leaflet-control-attribution {\n\tbackground: #fff;\n\tbackground: rgba(255, 255, 255, 0.8);\n\tmargin: 0;\n\t}\n.leaflet-control-attribution,\n.leaflet-control-scale-line {\n\tpadding: 0 5px;\n\tcolor: #333;\n\tline-height: 1.4;\n\t}\n.leaflet-control-attribution a {\n\ttext-decoration: none;\n\t}\n.leaflet-control-attribution a:hover,\n.leaflet-control-attribution a:focus {\n\ttext-decoration: underline;\n\t}\n.leaflet-attribution-flag {\n\tdisplay: inline !important;\n\tvertical-align: baseline !important;\n\twidth: 1em;\n\theight: 0.6669em;\n\t}\n.leaflet-left .leaflet-control-scale {\n\tmargin-left: 5px;\n\t}\n.leaflet-bottom .leaflet-control-scale {\n\tmargin-bottom: 5px;\n\t}\n.leaflet-control-scale-line {\n\tborder: 2px solid #777;\n\tborder-top: none;\n\tline-height: 1.1;\n\tpadding: 2px 5px 1px;\n\twhite-space: nowrap;\n\t-moz-box-sizing: border-box;\n\t box-sizing: border-box;\n\tbackground: rgba(255, 255, 255, 0.8);\n\ttext-shadow: 1px 1px #fff;\n\t}\n.leaflet-control-scale-line:not(:first-child) {\n\tborder-top: 2px solid #777;\n\tborder-bottom: none;\n\tmargin-top: -2px;\n\t}\n.leaflet-control-scale-line:not(:first-child):not(:last-child) {\n\tborder-bottom: 2px solid #777;\n\t}\n\n.leaflet-touch .leaflet-control-attribution,\n.leaflet-touch .leaflet-control-layers,\n.leaflet-touch .leaflet-bar {\n\tbox-shadow: none;\n\t}\n.leaflet-touch .leaflet-control-layers,\n.leaflet-touch .leaflet-bar {\n\tborder: 2px solid rgba(0,0,0,0.2);\n\tbackground-clip: padding-box;\n\t}\n\n\n/* popup */\n\n.leaflet-popup {\n\tposition: absolute;\n\ttext-align: center;\n\tmargin-bottom: 20px;\n\t}\n.leaflet-popup-content-wrapper {\n\tpadding: 1px;\n\ttext-align: left;\n\tborder-radius: 12px;\n\t}\n.leaflet-popup-content {\n\tmargin: 13px 24px 13px 20px;\n\tline-height: 1.3;\n\tfont-size: 13px;\n\tfont-size: 1.08333em;\n\tmin-height: 1px;\n\t}\n.leaflet-popup-content p {\n\tmargin: 17px 0;\n\tmargin: 1.3em 0;\n\t}\n.leaflet-popup-tip-container {\n\twidth: 40px;\n\theight: 20px;\n\tposition: absolute;\n\tleft: 50%;\n\tmargin-top: -1px;\n\tmargin-left: -20px;\n\toverflow: hidden;\n\tpointer-events: none;\n\t}\n.leaflet-popup-tip {\n\twidth: 17px;\n\theight: 17px;\n\tpadding: 1px;\n\n\tmargin: -10px auto 0;\n\tpointer-events: auto;\n\n\t-webkit-transform: rotate(45deg);\n\t -moz-transform: rotate(45deg);\n\t -ms-transform: rotate(45deg);\n\t transform: rotate(45deg);\n\t}\n.leaflet-popup-content-wrapper,\n.leaflet-popup-tip {\n\tbackground: white;\n\tcolor: #333;\n\tbox-shadow: 0 3px 14px rgba(0,0,0,0.4);\n\t}\n.leaflet-container a.leaflet-popup-close-button {\n\tposition: absolute;\n\ttop: 0;\n\tright: 0;\n\tborder: none;\n\ttext-align: center;\n\twidth: 24px;\n\theight: 24px;\n\tfont: 16px/24px Tahoma, Verdana, sans-serif;\n\tcolor: #757575;\n\ttext-decoration: none;\n\tbackground: transparent;\n\t}\n.leaflet-container a.leaflet-popup-close-button:hover,\n.leaflet-container a.leaflet-popup-close-button:focus {\n\tcolor: #585858;\n\t}\n.leaflet-popup-scrolled {\n\toverflow: auto;\n\t}\n\n.leaflet-oldie .leaflet-popup-content-wrapper {\n\t-ms-zoom: 1;\n\t}\n.leaflet-oldie .leaflet-popup-tip {\n\twidth: 24px;\n\tmargin: 0 auto;\n\n\t-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";\n\tfilter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);\n\t}\n\n.leaflet-oldie .leaflet-control-zoom,\n.leaflet-oldie .leaflet-control-layers,\n.leaflet-oldie .leaflet-popup-content-wrapper,\n.leaflet-oldie .leaflet-popup-tip {\n\tborder: 1px solid #999;\n\t}\n\n\n/* div icon */\n\n.leaflet-div-icon {\n\tbackground: #fff;\n\tborder: 1px solid #666;\n\t}\n\n\n/* Tooltip */\n/* Base styles for the element that has a tooltip */\n.leaflet-tooltip {\n\tposition: absolute;\n\tpadding: 6px;\n\tbackground-color: #fff;\n\tborder: 1px solid #fff;\n\tborder-radius: 3px;\n\tcolor: #222;\n\twhite-space: nowrap;\n\t-webkit-user-select: none;\n\t-moz-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none;\n\tpointer-events: none;\n\tbox-shadow: 0 1px 3px rgba(0,0,0,0.4);\n\t}\n.leaflet-tooltip.leaflet-interactive {\n\tcursor: pointer;\n\tpointer-events: auto;\n\t}\n.leaflet-tooltip-top:before,\n.leaflet-tooltip-bottom:before,\n.leaflet-tooltip-left:before,\n.leaflet-tooltip-right:before {\n\tposition: absolute;\n\tpointer-events: none;\n\tborder: 6px solid transparent;\n\tbackground: transparent;\n\tcontent: "";\n\t}\n\n/* Directions */\n\n.leaflet-tooltip-bottom {\n\tmargin-top: 6px;\n}\n.leaflet-tooltip-top {\n\tmargin-top: -6px;\n}\n.leaflet-tooltip-bottom:before,\n.leaflet-tooltip-top:before {\n\tleft: 50%;\n\tmargin-left: -6px;\n\t}\n.leaflet-tooltip-top:before {\n\tbottom: 0;\n\tmargin-bottom: -12px;\n\tborder-top-color: #fff;\n\t}\n.leaflet-tooltip-bottom:before {\n\ttop: 0;\n\tmargin-top: -12px;\n\tmargin-left: -6px;\n\tborder-bottom-color: #fff;\n\t}\n.leaflet-tooltip-left {\n\tmargin-left: -6px;\n}\n.leaflet-tooltip-right {\n\tmargin-left: 6px;\n}\n.leaflet-tooltip-left:before,\n.leaflet-tooltip-right:before {\n\ttop: 50%;\n\tmargin-top: -6px;\n\t}\n.leaflet-tooltip-left:before {\n\tright: 0;\n\tmargin-right: -12px;\n\tborder-left-color: #fff;\n\t}\n.leaflet-tooltip-right:before {\n\tleft: 0;\n\tmargin-left: -12px;\n\tborder-right-color: #fff;\n\t}\n\n/* Printing */\n\n@media print {\n\t/* Prevent printers from removing background-images of controls. */\n\t.leaflet-control {\n\t\t-webkit-print-color-adjust: exact;\n\t\tprint-color-adjust: exact;\n\t\t}\n\t}\n`,""]);const m=p},222:(t,e,n)=>{t.exports=n.p+"194137260531ee29a5f2.svg"},238:(t,e,n)=>{var i=n(591),o=n.n(i),r=n(740),a=n.n(r),s=n(128),l=n.n(s),h=n(855),u=n.n(h),c=n(51),p=n.n(c),d=n(656),f=n.n(d),_=n(396),m={};m.styleTagTransform=f(),m.setAttributes=u(),m.insert=l().bind(null,"head"),m.domAPI=a(),m.insertStyleElement=p(),o()(_.A,m),_.A&&_.A.locals&&_.A.locals},265:(t,e,n)=>{t.exports=n.p+"44b38a404dec4643c46b.png"},327:(t,e,n)=>{t.exports=n.p+"4a4ee777ddc0d4cedee4.png"},334:()=>{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}})},396:(t,e,n)=>{n.d(e,{A:()=>s});var i=n(758),o=n.n(i),r=n(935),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},522:(t,e,n)=>{t.exports=n.p+"c6e9c007f41bd4d26c20.png"},591: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}}},608:(t,e,n)=>{n.d(e,{C6:()=>o});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)}"function"==typeof SuppressedError&&SuppressedError},636:(t,e,n)=>{n.d(e,{A:()=>m});var i=n(758),o=n.n(i),r=n(935),a=n.n(r),s=n(62),l=n.n(s),h=new URL(n(265),n.b),u=new URL(n(222),n.b),c=new URL(n(522),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},651:(t,e,n)=>{var i=n(591),o=n.n(i),r=n(740),a=n.n(r),s=n(128),l=n.n(s),h=n(855),u=n.n(h),c=n(51),p=n.n(c),d=n(656),f=n.n(d),_=n(89),m={};m.styleTagTransform=f(),m.setAttributes=u(),m.insert=l().bind(null,"head"),m.domAPI=a(),m.insertStyleElement=p(),o()(_.A,m),_.A&&_.A.locals&&_.A.locals},656: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))}}},690:(t,e,n)=>{var i=n(591),o=n.n(i),r=n(740),a=n.n(r),s=n(128),l=n.n(s),h=n(855),u=n.n(h),c=n(51),p=n.n(c),d=n(656),f=n.n(d),_=n(636),m={};m.styleTagTransform=f(),m.setAttributes=u(),m.insert=l().bind(null,"head"),m.domAPI=a(),m.insertStyleElement=p(),o()(_.A,m),_.A&&_.A.locals&&_.A.locals},740:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};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)}}}},743:(t,e,n)=>{n.d(e,{X:()=>b});var i=n(902),o=n(591),r=n.n(o),a=n(740),s=n.n(a),l=n(128),h=n.n(l),u=n(855),c=n.n(u),p=n(51),d=n.n(p),f=n(656),_=n.n(f),m=n(831),g={};g.styleTagTransform=_(),g.setAttributes=c(),g.insert=h().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=d(),r()(m.A,g),m.A&&m.A.locals&&m.A.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)}},758:t=>{t.exports=function(t){return t[1]}},812:(t,e,n)=>{n.d(e,{w:()=>He,h:()=>je});var i=n(608);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,R,Z,j,H=0,U=0,G=0,F=0,W=0,V=0,q=0,Y=0,X=0,K={point:J,lineStart:Q,lineEnd:et,polygonStart:function(){K.lineStart=nt,K.lineEnd=it},polygonEnd:function(){K.point=J,K.lineStart=Q,K.lineEnd=et},result:function(){var t=X?[q/X,Y/X]:V?[F/V,W/V]:G?[H/G,U/G]:[NaN,NaN];return H=U=G=F=W=V=q=Y=X=0,t}};function J(t,e){H+=t,U+=e,++G}function Q(){K.point=$}function $(t,e){K.point=tt,J(Z=t,j=e)}function tt(t,e){var n=t-Z,i=e-j,o=g(n*n+i*i);F+=o*(Z+t)/2,W+=o*(j+e)/2,V+=o,J(Z=t,j=e)}function et(){K.point=J}function nt(){K.point=ot}function it(){rt(N,R)}function ot(t,e){K.point=rt,J(N=Z=t,R=j=e)}function rt(t,e){var n=t-Z,i=e-j,o=g(n*n+i*i);F+=o*(Z+t)/2,W+=o*(j+e)/2,V+=o,q+=(o=j*t-Z*e)*(Z+t),Y+=o*(j+e),X+=3*o,J(Z=t,j=e)}const at=K;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 Rt(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 Zt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function jt(t){return function(){this.style.removeProperty(t)}}function Ht(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 Gt(t){return function(){delete this[t]}}function Ft(t,e){return function(){this[t]=e}}function Wt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Vt(t){return t.trim().split(/^|\s+/)}function qt(t){return t.classList||new Yt(t)}function Yt(t){this._node=t,this._names=Vt(t.getAttribute("class")||"")}function Xt(t,e){for(var n=qt(t),i=-1,o=e.length;++i<o;)n.add(e[i])}function Kt(t,e){for(var n=qt(t),i=-1,o=e.length;++i<o;)n.remove(e[i])}function Jt(t){return function(){Xt(this,t)}}function Qt(t){return function(){Kt(this,t)}}function $t(t,e){return function(){(e.apply(this,arguments)?Xt:Kt)(this,t)}}function te(){this.textContent=""}function ee(t){return function(){this.textContent=t}}function ne(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function ie(){this.innerHTML=""}function oe(t){return function(){this.innerHTML=t}}function re(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function ae(){this.nextSibling&&this.parentNode.appendChild(this)}function se(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function le(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 he(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ue(t){var e=Ot(t);return(e.local?he:le)(e)}function ce(){return null}function pe(){var t=this.parentNode;t&&t.removeChild(this)}function de(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function fe(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}Yt.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 _e={};function me(t,e,n){return t=ge(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function ge(t,e,n){return function(i){try{t.call(this,this.__data__,e,n)}finally{}}}function ye(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 ve(t,e,n){var i=_e.hasOwnProperty(t.type)?me:ge;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 be(t,e,n){var i=Zt(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 Le(t,e){return function(){return be(this,t,e)}}function we(t,e){return function(){return be(this,t,e.apply(this,arguments))}}"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(_e={mouseenter:"mouseover",mouseleave:"mouseout"}));var xe=[null];function ke(t,e){this._groups=t,this._parents=e}ke.prototype={constructor:ke,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 ke(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 ke(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 ke(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 ke(s,o))._enter=l,s._exit=h,s},enter:function(){return new ke(this._enter||this._groups.map(Mt),this._parents)},exit:function(){return new ke(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 ke(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 ke(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?Rt: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:Ht)(t,e,null==n?"":n)):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?Gt:"function"==typeof e?Wt:Ft)(t,e)):this.node()[t]},classed:function(t,e){var n=Vt(t+"");if(arguments.length<2){for(var i=qt(this.node()),o=-1,r=n.length;++o<r;)if(!i.contains(n[o]))return!1;return!0}return this.each(("function"==typeof e?$t:e?Jt:Qt)(n,e))},text:function(t){return arguments.length?this.each(null==t?te:("function"==typeof t?ne:ee)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?ie:("function"==typeof t?re:oe)(t)):this.node().innerHTML},raise:function(){return this.each(ae)},lower:function(){return this.each(se)},append:function(t){var e="function"==typeof t?t:ue(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ue(t),i=null==e?ce:"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(pe)},clone:function(t){return this.select(t?fe:de)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var i,o,r=function(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}}))}(t+""),a=r.length;if(!(arguments.length<2)){for(s=e?ve:ye,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?we:Le)(t,e))}};var Me=n(902),Ce=n(591),Pe=n.n(Ce),Ee=n(740),Te=n.n(Ee),Se=n(128),ze=n.n(Se),Oe=n(855),De=n.n(Oe),Ae=n(51),Ie=n.n(Ae),Be=n(656),Ne=n.n(Be),Re=n(866),Ze={};Ze.styleTagTransform=Ne(),Ze.setAttributes=De(),Ze.insert=ze().bind(null,"head"),Ze.domAPI=Te(),Ze.insertStyleElement=Ie(),Pe()(Re.A,Ze),Re.A&&Re.A.locals&&Re.A.locals;var je=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.C6)(e,t),e}(Me.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.C6)(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 Me.LatLngBounds([-90,-180],[90,180]);var t,e,n=this.selection.node().getBBox();try{t=this.projection.layerPointToLatLng(new Me.Point(n.x,n.y+n.height))}catch(e){t=[-90,-180]}try{e=this.projection.layerPointToLatLng(new Me.Point(n.x+n.width,n.y))}catch(t){e=[90,180]}return new Me.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=Me.svg(),t.addLayer(this._svg),this._rootGroup=function(t){return"string"==typeof t?new ke([[document.querySelector(t)]],[document.documentElement]):new ke([[t]],xe)}(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=Me.latLng([0,0]),this._wgsInitialShift=this.map.latLngToLayerPoint(this._wgsOrigin),this._zoom=this.map.getZoom(),this._shift=Me.point(0,0),this._scale=1,this.projection={latLngToLayerPoint:function(t,n){return n=e._undef(n)?e._zoom:n,e.map.project(Me.latLng(t),n)._subtract(e._pixelOrigin)},layerPointToLatLng:function(t,n){n=e._undef(n)?e._zoom:n;var i=Me.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 Me.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}(je)},831:(t,e,n)=>{n.d(e,{A:()=>s});var i=n(758),o=n.n(i),r=n(935),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},855:(t,e,n)=>{t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},866:(t,e,n)=>{n.d(e,{A:()=>s});var i=n(758),o=n.n(i),r=n(935),a=n.n(r)()(o());a.push([t.id,"g.d3-overlay * {\n pointer-events: visiblePainted;\n}\n",""]);const s=a},900: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}}},902:function(t,e){
|
|
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}"function"==typeof SuppressedError&&SuppressedError;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(a,s,l,h,u){var c=!1;do{if(!a.length)if(a.data&&!a.data.already_flagged)r({left:t,right:n,top:e,bottom:i},a.data)&&(a.data.already_flagged=!0,o.push(a.data));c=a=a.next}while(c);return s>=n||l>=i||h<t||u<e}),o;function r(t,e){return(e[0]<t.right||e[0]>t.left)&&(e[1]<t.bottom||e[1]>t.top)}},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()?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(i):i,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}).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,R=Math.cos,Z=Math.ceil,j=Math.exp,H=Math.log,U=Math.pow,G=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 X(t){return(t=G(t/2))*t}function K(){}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:K,lineStart:K,lineEnd:K,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=K},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=R(e=(e*=A)/2+z),st=G(e)}function ft(t,e){var n=(t*=A)-rt,i=n>=0?1:-1,o=i*n,r=R(e=(e*=A)/2+z),a=G(e),s=st*a,l=at*r+s*R(o),h=s*i*G(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=R(n);return[i*R(e),i*G(e),G(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,Rt,Zt,jt,Ht,Ut,Gt,Ft,Wt,Vt,qt,Yt=x(),Xt={point:Kt,lineStart:Qt,lineEnd:$t,polygonStart:function(){Xt.point=te,Xt.lineStart=ee,Xt.lineEnd=ne,Yt.reset(),ut.polygonStart()},polygonEnd:function(){ut.polygonEnd(),Xt.point=Kt,Xt.lineStart=Qt,Xt.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 Kt(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(){Xt.point=Jt}function $t(){zt[0]=wt,zt[1]=kt,Xt.point=Kt,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:K,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=R(e*=A);le(n*R(t),n*G(t),G(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=R(e*=A);Wt=n*R(t),Vt=n*G(t),qt=G(e),ae.point=ce,le(Wt,Vt,qt)}function ce(t,e){t*=A;var n=R(e*=A),i=n*R(t),o=n*G(t),r=G(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)),Rt+=a*(Vt+(Vt=o)),Zt+=a*(qt+(qt=r)),le(Wt,Vt,qt)}function pe(){ae.point=se}function de(){ae.point=_e}function fe(){me(Gt,Ft),ae.point=se}function _e(t,e){Gt=t,Ft=e,t*=A,e*=A,ae.point=me;var n=R(e);Wt=n*R(t),Vt=n*G(t),qt=G(e),le(Wt,Vt,qt)}function me(t,e){t*=A;var n=R(e*=A),i=n*R(t),o=n*G(t),r=G(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,Ht+=c*s,Ut+=c*l,Dt+=u,Nt+=u*(Wt+(Wt=i)),Rt+=u*(Vt+(Vt=o)),Zt+=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=R(t),i=G(t),o=R(e),r=G(e);function a(t,e){var a=R(e),s=R(t)*a,l=G(t)*a,h=G(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=R(e),s=R(t)*a,l=G(t)*a,h=G(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=R(e),s=G(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*R(u),-s*G(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:K,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=G(i),r=[G(n),-R(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,_=G(f),m=R(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=G(b),w=R(b),x=v-d,k=x>=0?1:-1,M=k*x,C=M>T,E=_*L;if(Oe.add(N(E*k*G(M),m*w+E*R(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 Re=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=G(t-n);return I(a)>P?B((G(e)*(r=R(i))*G(n)-G(i)*(o=R(e))*G(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 Ze(t){var e=R(t),n=6*A,i=e>0,o=I(e)>P;function r(t,n){return R(t)*R(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,He=-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(He,Math.min(je,_)),m=Math.max(He,Math.min(je,m))],h=[e=Math.max(He,Math.min(je,e)),a=Math.max(He,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 Ge,Fe,We,Ve=x(),qe={sphere:K,point:K,lineStart:function(){qe.point=Xe,qe.lineEnd=Ye},lineEnd:K,polygonStart:K,polygonEnd:K};function Ye(){qe.point=qe.lineEnd=K}function Xe(t,e){Ge=t*=A,Fe=G(e*=A),We=R(e),qe.point=Ke}function Ke(t,e){t*=A;var n=G(e*=A),i=R(e),o=I(t-Ge),r=R(o),a=i*G(o),s=We*n-Fe*i*r,l=Fe*n+We*i*r;Ve.add(N(W(a*a+s*s),l)),Ge=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(Z(o/_)*_,i,_).map(c).concat(e.range(Z(l/m)*m,s,m).map(p)).concat(e.range(Z(n/d)*d,t,d).filter(function(t){return I(t%_)>P}).map(h)).concat(e.range(Z(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:K,lineStart:K,lineEnd:K,polygonStart:function(){bn.lineStart=Ln,bn.lineEnd=kn},polygonEnd:function(){bn.lineStart=bn.lineEnd=bn.point=K,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=1/0,Cn=Mn,Pn=-Mn,En=Pn,Tn={point:function(t,e){t<Mn&&(Mn=t);t>Pn&&(Pn=t);e<Cn&&(Cn=e);e>En&&(En=e)},lineStart:K,lineEnd:K,polygonStart:K,polygonEnd:K,result:function(){var t=[[Mn,Cn],[Pn,En]];return Pn=En=-(Cn=Mn=1/0),t}};var Sn,zn,On,Dn,An=0,In=0,Bn=0,Nn=0,Rn=0,Zn=0,jn=0,Hn=0,Un=0,Gn={point:Fn,lineStart:Wn,lineEnd:Yn,polygonStart:function(){Gn.lineStart=Xn,Gn.lineEnd=Kn},polygonEnd:function(){Gn.point=Fn,Gn.lineStart=Wn,Gn.lineEnd=Yn},result:function(){var t=Un?[jn/Un,Hn/Un]:Zn?[Nn/Zn,Rn/Zn]:Bn?[An/Bn,In/Bn]:[NaN,NaN];return An=In=Bn=Nn=Rn=Zn=jn=Hn=Un=0,t}};function Fn(t,e){An+=t,In+=e,++Bn}function Wn(){Gn.point=Vn}function Vn(t,e){Gn.point=qn,Fn(On=t,Dn=e)}function qn(t,e){var n=t-On,i=e-Dn,o=W(n*n+i*i);Nn+=o*(On+t)/2,Rn+=o*(Dn+e)/2,Zn+=o,Fn(On=t,Dn=e)}function Yn(){Gn.point=Fn}function Xn(){Gn.point=Jn}function Kn(){Qn(Sn,zn)}function Jn(t,e){Gn.point=Qn,Fn(Sn=On=t,zn=Dn=e)}function Qn(t,e){var n=t-On,i=e-Dn,o=W(n*n+i*i);Nn+=o*(On+t)/2,Rn+=o*(Dn+e)/2,Zn+=o,jn+=(o=Dn*t-On*e)*(On+t),Hn+=o*(Dn+e),Un+=3*o,Fn(On=t,Dn=e)}function $n(t){this._context=t}$n.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:K};var ti,ei,ni,ii,oi,ri=x(),ai={point:K,lineStart:function(){ai.point=si},lineEnd:function(){ti&&li(ei,ni),ai.point=K},polygonStart:function(){ti=!0},polygonEnd:function(){ti=null},result:function(){var t=+ri;return ri.reset(),t}};function si(t,e){ai.point=li,ei=ii=t,ni=oi=e}function li(t,e){ii-=t,oi-=e,ri.add(W(ii*ii+oi*oi)),ii=t,oi=e}function hi(){this._string=[]}function ui(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function ci(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(bn)),bn.result()},r.measure=function(t){return nt(t,n(ai)),ai.result()},r.bounds=function(t){return nt(t,n(Tn)),Tn.result()},r.centroid=function(t){return nt(t,n(Gn)),Gn.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 hi):new $n(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 pi(t){return function(e){var n=new di;for(var i in t)n[i]=t[i];return n.stream=e,n}}function di(){}function fi(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(Tn)),e(Tn.result()),null!=i&&t.clipExtent(i),t}function _i(t,e,n){return fi(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 mi(t,e,n){return _i(t,[[0,0],e],n)}function gi(t,e,n){return fi(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 yi(t,e,n){return fi(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)}hi.prototype={_radius:4.5,_circle:ui(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=ui(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}},di.prototype={constructor:di,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 vi=R(30*A);function bi(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<vi)&&(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 pi({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var Li=pi({point:function(t,e){this.stream.point(t*A,e*A)}});function wi(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 xi(t,e,n,i,o,r){var a=R(r),s=G(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 ki(t){return Mi(function(){return t})()}function Mi(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=Re,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=xi(c,0,0,b,L,v).apply(null,e(f,_)),i=(v?xi:wi)(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=bi(s,C),S()}function S(){return h=u=null,P}return P.stream=function(t){return h&&u===t?h:h=Li(function(t){return pi({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?Ze(w=t*A):(w=null,Re),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=bi(s,C=t*t),S()):W(C)},P.fitExtent=function(t,e){return _i(P,t,e)},P.fitSize=function(t,e){return mi(P,t,e)},P.fitWidth=function(t,e){return gi(P,t,e)},P.fitHeight=function(t,e){return yi(P,t,e)},function(){return e=t.apply(this,arguments),P.invert=e.invert&&E,T()}}function Ci(t){var e=0,n=T/3,i=Mi(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 Pi(t,e){var n=G(t),i=(n+G(e))/2;if(I(i)<P)return function(t){var e=R(t);function n(t,n){return[t*e,G(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*G(e))/i;return[n*G(t*=i),r-n*R(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 Ei(){return Ci(Pi).scale(155.424).center([0,33.6442])}function Ti(){return Ei().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Si(t){return function(e,n){var i=R(e),o=R(n),r=t(i*o);return[r*o*G(e),r*G(n)]}}function zi(t){return function(e,n){var i=W(e*e+n*n),o=t(i),r=G(o),a=R(o);return[N(e*r,i*a),Y(i&&n*r/i)]}}var Oi=Si(function(t){return W(2/(1+t))});Oi.invert=zi(function(t){return 2*Y(t/2)});var Di=Si(function(t){return(t=q(t))&&t/G(t)});function Ai(t,e){return[t,H(V((S+e)/2))]}function Ii(){return Bi(Ai).scale(961/O)}function Bi(t){var e,n,i,o=ki(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===Ai?[[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 Ni(t){return V((S+t)/2)}function Ri(t,e){var n=R(t),i=t===e?G(t):H(n/R(e))/H(Ni(e)/Ni(t)),o=n*U(Ni(t),i)/i;if(!i)return Ai;function r(t,e){o>0?e<-S+P&&(e=-S+P):e>S-P&&(e=S-P);var n=o/U(Ni(e),i);return[n*G(i*t),o-n*R(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 Zi(t,e){return[t,e]}function ji(t,e){var n=R(t),i=t===e?G(t):(n-R(e))/(e-t),o=n/i+t;if(I(i)<P)return Zi;function r(t,e){var n=o-e,r=i*t;return[n*G(r),o-n*R(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}Di.invert=zi(function(t){return t}),Ai.invert=function(t,e){return[t,2*B(j(e))-S]},Zi.invert=Zi;var Hi=1.340264,Ui=-.081106,Gi=893e-6,Fi=.003796,Wi=W(3)/2;function Vi(t,e){var n=Y(Wi*G(e)),i=n*n,o=i*i*i;return[t*R(n)/(Wi*(Hi+3*Ui*i+o*(7*Gi+9*Fi*i))),n*(Hi+Ui*i+o*(Gi+Fi*i))]}function qi(t,e){var n=R(e),i=R(t)*n;return[n*G(t)/i,G(e)/i]}function Yi(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 Xi(t,e){return[R(e)*G(t),G(e)]}function Ki(t,e){var n=R(e),i=1+R(t)*n;return[n*G(t)/i,G(e)/i]}function Ji(t,e){return[H(V((S+e)/2)),-t]}Vi.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*(Hi+Ui*o+r*(Gi+Fi*o))-e)/(Hi+3*Ui*o+r*(7*Gi+9*Fi*o)))*i)*o*o,!(I(n)<E));++a);return[Wi*t*(Hi+3*Ui*o+r*(7*Gi+9*Fi*o))/R(i),Y(G(i)/Wi)]},qi.invert=zi(B),Yi.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]},Xi.invert=zi(Y),Ki.invert=zi(function(t){return 2*B(t)}),Ji.invert=function(t,e){return[-e,2*B(j(t))-S]};var Qi=Object.freeze({__proto__:null,geoAlbers:Ti,geoAlbersUsa:function(){var t,e,n,i,o,r,a=Ti(),s=Ei().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=Ei().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 _i(u,t,e)},u.fitSize=function(t,e){return mi(u,t,e)},u.fitWidth=function(t,e){return gi(u,t,e)},u.fitHeight=function(t,e){return yi(u,t,e)},u.scale(1070)},geoArea:function(t){return ht.reset(),nt(t,ut),2*ht},geoAzimuthalEqualArea:function(){return ki(Oi).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:Oi,geoAzimuthalEquidistant:function(){return ki(Di).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:Di,geoBounds:function(t){var e,n,i,o,r,a,s;if(Mt=kt=-(wt=xt=1/0),St=[],nt(t,Xt),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=Rt=Zt=jt=Ht=Ut=0,nt(t,ae);var e=jt,n=Ht,i=Ut,o=e*e+n*n+i*i;return o<E&&(e=Nt,n=Rt,i=Zt,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:Re,geoClipCircle:Ze,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,geoConicConformal:function(){return Ci(Ri).scale(109.5).parallels([30,30])},geoConicConformalRaw:Ri,geoConicEqualArea:Ei,geoConicEqualAreaRaw:Pi,geoConicEquidistant:function(){return Ci(ji).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:ji,geoContains:function(t,e){return(t&&en.hasOwnProperty(t.type)?en[t.type]:on)(t,e)},geoDistance:tn,geoEqualEarth:function(){return ki(Vi).scale(177.158)},geoEqualEarthRaw:Vi,geoEquirectangular:function(){return ki(Zi).scale(152.63)},geoEquirectangularRaw:Zi,geoGnomonic:function(){return ki(qi).scale(144.049).clipAngle(60)},geoGnomonicRaw:qi,geoGraticule:pn,geoGraticule10:function(){return pn()()},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=pi({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=G(p=n%360*A),t=R(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 _i(v,t,e)},v.fitSize=function(t,e){return mi(v,t,e)},v.fitWidth=function(t,e){return gi(v,t,e)},v.fitHeight=function(t,e){return yi(v,t,e)},v},geoInterpolate:function(t,e){var n=t[0]*A,i=t[1]*A,o=e[0]*A,r=e[1]*A,a=R(i),s=G(i),l=R(r),h=G(r),u=a*R(n),c=a*G(n),p=l*R(o),d=l*G(o),f=2*Y(W(X(r-i)+a*l*X(o-n))),_=G(f),m=f?function(t){var e=G(t*=f)/_,n=G(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,geoMercator:Ii,geoMercatorRaw:Ai,geoNaturalEarth1:function(){return ki(Yi).scale(175.295)},geoNaturalEarth1Raw:Yi,geoOrthographic:function(){return ki(Xi).scale(249.5).clipAngle(90.000001)},geoOrthographicRaw:Xi,geoPath:ci,geoProjection:ki,geoProjectionMutator:Mi,geoRotation:ke,geoStereographic:function(){return ki(Ki).scale(250).clipAngle(142)},geoStereographicRaw:Ki,geoStream:nt,geoTransform:function(t){return{stream:pi(t)}},geoTransverseMercator:function(){var t=Bi(Ji),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:Ji});function $i(){}var to=1/0,eo=to,no=-to,io=no;var oo={point:function(t,e){t<to&&(to=t),t>no&&(no=t),e<eo&&(eo=e),e>io&&(io=e)},lineStart:$i,lineEnd:$i,polygonStart:$i,polygonEnd:$i,result:function(){var t=[[to,eo],[no,io]];return no=io=-(eo=to=1/0),t}};function ro(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(oo));var a=oo.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 ao,so=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 lo(){var t,e,n,i,o,r,a,s=1e-6,l=Ti(),h=Ei().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=Ei().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c=Ei().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 ro(d,t,e)},d.fitSize=function(t,e){return function(t,e,n){return ro(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"}(ao||(ao={}));var ho=[],uo={};for(var co in ao)"string"==typeof co&&(ho.push(co),uo[co]="AlbersUsaPr"===co?lo:Qi["geo".concat(co)]);function po(t){var e=uo[t];return e?e():(console.warn("Unknown projection: "+t),Ii())}function fo(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))}}fo(".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 _o=2048/Math.PI,mo=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);mo.prototype._class+=" map_Layered",mo.prototype.publish("projection",null,"set","Map projection type",ho),mo.prototype.publish("centerLat",0,"number","Center Latitude",null,{tags:["Basic"]}),mo.prototype.publish("centerLong",0,"number","Center Longitude",null,{tags:["Basic"]}),mo.prototype.publish("zoom",1,"number","Zoom Level",null,{tags:["Basic"]}),mo.prototype.publish("autoScaleMode","all","set","Auto Scale",["none","all"],{tags:["Basic"]}),mo.prototype.publish("layers",[],"widgetArray","Layers",null,{render:!1});var go=mo.prototype.projection;mo.prototype.projection=function(t){var e=go.apply(this,arguments);if(arguments.length){if(this._d3GeoProjection=po(t).scale(_o).translate([0,0]),"orthographic"===t)this._d3GeoProjection.clipAngle(90).rotate([0,0]);this._d3GeoPath=ci().projection(this._d3GeoProjection),this._autoScaleOnNextRender=!0}return e};var yo=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(){mo.prototype.render.apply(e,n)}),this},e.prototype.layerZoomed=function(t){},e}(mo);yo.prototype._class+=" map_Layer",yo.prototype.implements(n.ITooltip.prototype);var vo=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){yo.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){yo.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){yo.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}(yo);function bo(t){return t}function Lo(t,e){return"string"==typeof e&&(e=t.objects[e]),"GeometryCollection"===e.type?{type:"FeatureCollection",features:e.geometries.map(function(e){return wo(t,e)})}:wo(t,e)}function wo(t,e){var n=e.id,i=e.bbox,o=null==e.properties?{}:e.properties,r=xo(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 xo(t,e){var n=function(t){if(null==t)return bo;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 ko(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 Mo(t){return xo(t,Co.apply(this,arguments))}function Co(t,e,n){var i,o,r;if(arguments.length>1)i=function(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)}function h(t){t.forEach(l)}function u(t){switch(i=t,t.type){case"GeometryCollection":t.geometries.forEach(u);break;case"LineString":s(t.arcs);break;case"MultiLineString":case"Polygon":l(t.arcs);break;case"MultiPolygon":h(t.arcs)}}return u(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}(0,e,n);else for(o=0,i=new Array(r=t.arcs.length);o<r;++o)i[o]=o;return{type:"MultiLineString",arcs:ko(t,i)}}vo.prototype._class+=" map_CanvasPinLayer",vo.prototype.publishProxy("clusterMode","pins","clusterMode"),vo.prototype.publishProxy("allCircles","pins","allCircles"),vo.prototype.publishProxy("showQuadtree","pins","showQuadtree"),vo.prototype.publishProxy("useAveragePos","pins","useAveragePos"),vo.prototype.publishProxy("shrinkFontToPin","pins","shrinkFontToPin"),vo.prototype.publishProxy("enableClustering","pins","enableClustering"),vo.prototype.publishProxy("useWeightedRadius","pins","useWeightedRadius"),vo.prototype.publishProxy("radiusWeightMult","pins","radiusWeightMult"),vo.prototype.publishProxy("searchRectMult","pins","searchRectMult"),vo.prototype.publishProxy("pinHeight","pins","pinHeight"),vo.prototype.publishProxy("pinWidth","pins","pinWidth"),vo.prototype.publishProxy("pinFontFamily","pins","pinFontFamily"),vo.prototype.publishProxy("pinFontSize","pins","pinFontSize"),vo.prototype.publishProxy("arrowHeight","pins","arrowHeight"),vo.prototype.publishProxy("arrowWidth","pins","arrowWidth"),vo.prototype.publish("latColumn",null,"set","latColumn",function(){return this.columns()},{optional:!0}),vo.prototype.publish("longColumn",null,"set","longColumn",function(){return this.columns()},{optional:!0}),vo.prototype.publish("weightColumn",null,"set","weightColumn",function(){return this.columns()},{optional:!0}),vo.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]});fo(".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 Po=window.__hpcc_topoJsonFolder||"./node_modules/@hpcc-js/map/TopoJSON";function Eo(t){if(!arguments.length)return Po;var e=Po;return Po=t,e}var To=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=yo.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){yo.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(yo.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(Mo(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){},n.prototype.dblclick=function(t,e,n){},n}(yo);To.prototype._class+=" map_Choropleth",To.prototype.mixin(e.Utility.SimpleSelectionMixin),To.prototype._palette=e.Palette.rainbow("default"),To.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",To.prototype._palette.switch(),{tags:["Basic","Shared"]}),To.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),To.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),To.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),To.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),To.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width"),To.prototype.publish("internalOnly",!1,"boolean","Internal mesh only"),To.prototype.publish("autoScaleMode","mesh","set","Auto Scale",["none","mesh","data"],{tags:["Basic"],override:!0});var So,zo,Oo=(So="application/json",zo=function(t){return JSON.parse(t.responseText)},function(t,n){var i=function(t){var n,i,o,r,a=e.dispatch("beforesend","progress","load","error"),s=e.map(),l=new XMLHttpRequest,h=null,u=null,c=0;function p(t){var e,i=l.status;if(!i&&function(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}(l)||i>=200&&i<300||304===i){if(o)try{e=o.call(n,l)}catch(t){return void a.call("error",n,t)}else e=l;a.call("load",n,e)}else a.call("error",n,t)}return"undefined"!=typeof XDomainRequest&&!("withCredentials"in l)&&/^(http(s)?:)?\/\//.test(t)&&(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=l.ontimeout=p:l.onreadystatechange=function(t){l.readyState>3&&p(t)},l.onprogress=function(t){a.call("progress",n,t)},n={header:function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?s.get(t):(null==e?s.remove(t):s.set(t,e+""),n)},mimeType:function(t){return arguments.length?(i=null==t?null:t+"",n):i},responseType:function(t){return arguments.length?(r=t,n):r},timeout:function(t){return arguments.length?(c=+t,n):c},user:function(t){return arguments.length<1?h:(h=null==t?null:t+"",n)},password:function(t){return arguments.length<1?u:(u=null==t?null:t+"",n)},response:function(t){return o=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,o,p){return l.open(e,t,!0,h,u),null==i||s.has("accept")||s.set("accept",i+",*/*"),l.setRequestHeader&&s.each(function(t,e){l.setRequestHeader(e,t)}),null!=i&&l.overrideMimeType&&l.overrideMimeType(i),null!=r&&(l.responseType=r),c>0&&(l.timeout=c),null==p&&"function"==typeof o&&(p=o,o=null),null!=p&&1===p.length&&(p=function(t){return function(e,n){t(null==e?n:null)}}(p)),null!=p&&n.on("error",p).on("load",function(t){p(null,t)}),a.call("beforesend",n,l),l.send(null==o?null:o),n},abort:function(){return l.abort(),n},on:function(){var t=a.on.apply(a,arguments);return t===a?n:t}},n}(t).mimeType(So).response(zo);if(null!=n){if("function"!=typeof n)throw new Error("invalid callback: "+n);return i.get(n)}return i}),Do=null,Ao=null,Io=null,Bo=function(t){function n(){return t.call(this)||this}return h(n,t),n.prototype.layerEnter=function(t,n,i){To.prototype.layerEnter.apply(this,arguments),this._choroTopology=Do.topology,this._choroTopologyObjectsCountries=Do.topology.objects.countries,this._choroTopologyObjectsLand=Do.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){To.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(Io[e[0]]);return n||console.warn("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){Do&&t(),Oo("".concat(Eo(),"/countries.json"),function(e){for(var n in Ao=Lo((Do=e).topology,Do.topology.objects.countries).features,Io={},Ao)Ao[n].id&&Do.countryNames[Ao[n].id]&&(Io[Do.countryNames[Ao[n].id].name]=Ao[n]);t()})})),this._topoJsonPromise},n}(To);Bo.prototype._class+=" map_ChoroplethCountries";var No=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.layerEnter=function(t,e,n){Bo.prototype.layerEnter.apply(this,arguments),this._choroTopologyObjects=this._choroTopologyObjectsLand},e}(Bo);No.prototype._class+=" map_ChoroplethContinents";var Ro=null,Zo=null,jo=null,Ho=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){To.prototype.layerEnter.apply(this,arguments),this._choroTopology=Ro.topology,this._choroTopologyObjects=Ro.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:Ro.countyNames[e],value:o._dataMap[e]?o._dataMap[e][1]:"N/A"})})},n.prototype.layerUpdate=function(t){To.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(jo[e[0]]);return n||console.warn("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){Ro&&t(),Oo("".concat(Eo(),"/us-counties.json"),function(e){for(var n in Zo=Lo((Ro=e).topology,Ro.topology.objects.counties).features,jo={},Zo)Zo[n].id&&(jo[Zo[n].id]=Zo[n]);t()})})),this._topoJsonPromise},n.__inputs=[{id:"fips",type:"string"},{id:"value",type:"number"}],n}(To);Ho.prototype._class+=" map_ChoroplethCounties",Ho.prototype.publish("onClickFormatFIPS",!1,"boolean","format FIPS code as a String on Click");var Uo=null,Go=null,Fo=null,Wo=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){To.prototype.layerEnter.apply(this,arguments),this._choroTopology=Uo.topology,this._choroTopologyObjects=Uo.topology.objects.states,this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);var o=this;this.tooltipHTML(function(t){var e=Fo[t[0]].id;return o.tooltipFormat({label:Uo.stateNames[e].name,value:t[1]})})},n.prototype.layerUpdate=function(t){To.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(Fo[e[0]]);return n||console.warn("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){Uo&&t(),Oo("".concat(Eo(),"/us-states.json"),function(e){for(var n in Go=Lo((Uo=e).topology,Uo.topology.objects.states).features,Fo={},Go)Go[n].id&&(Fo[Uo.stateNames[Go[n].id].code]=Go[n]);t()})})),this._topoJsonPromise},n.__inputs=[{id:"state",type:"string"},{id:"value",type:"number"}],n}(To);Wo.prototype._class+=" map_ChoroplethStates";var Vo=function(t){function e(){return t.call(this)||this}return h(e,t),e}(mo);Vo.prototype._class+=" map_ChoroplethStatesHeat";fo(".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=yo.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){yo.prototype.layerEnter.apply(this,arguments),this.geohash=new so,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){yo.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){},n.prototype.dblclick=function(t,e,n){},n}(yo);function Yo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}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 Xo,Ko={exports:{}};var Jo=(Xo||(Xo=1,function(t){!function(){if(null===("undefined"!=typeof window?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}()}()}(Ko)),Ko.exports),Qo=Yo(Jo),$o=s({__proto__:null,default:Qo},[Jo]);fo(".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 tr=Qo||$o;t.google=null;var er,nr=15e3;function ir(e){return er||(er=o.promiseTimeout(nr,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{tr.KEY=window.__hpcc_gmap_apikey||"AIzaSyDwGn2i1i_pMZvnqYJN1BksD_tjYaCOWKg",tr.LIBRARIES=["geometry","drawing"],tr.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(nr,"ms."))})),er}var or=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}(),rr=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 or(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){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":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 ir().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.warn("Data not found for this location.")},o}(e.HTMLWidget);rr.prototype._class+=" map_GMap",rr.prototype.publish("outdoorStreetViewOnly",!1,"boolean","If true, streetView will only display outdoor locations"),rr.prototype.publish("showStreetViewMarker",!1,"boolean","If true, streetView marker will be hidden"),rr.prototype.publish("useComputedHeading",!1,"boolean","If true, centerAddress streetView compute the ideal panorama heading"),rr.prototype.publish("type","road","set","Map Type",["terrain","road","satellite","hybrid"],{tags:["Basic"]}),rr.prototype.publish("centerLat",42.877742,"number","Center Latitude",null,{tags:["Basic"]}),rr.prototype.publish("centerLong",-97.380979,"number","Center Longitude",null,{tags:["Basic"]}),rr.prototype.publish("centerAddress",null,"string","Address to center map on",null,{tags:["Basic"],optional:!0}),rr.prototype.publish("zoom",4,"number","Zoom Level",null,{tags:["Basic"]}),rr.prototype.publish("singleZoomToMaxZoom",14,"number","Max zoomTo level with single item"),rr.prototype.publish("panControl",!0,"boolean","Pan Controls",null,{tags:["Basic"]}),rr.prototype.publish("zoomControl",!0,"boolean","Zoom Controls",null,{tags:["Basic"]}),rr.prototype.publish("scaleControl",!0,"boolean","Scale Controls",null,{tags:["Basic"]}),rr.prototype.publish("mapTypeControl",!1,"boolean","Map Type Controls",null,{tags:["Basic"]}),rr.prototype.publish("fullscreenControl",!1,"boolean","Fullscreen Controls",null,{tags:["Basic"]}),rr.prototype.publish("streetViewControl",!1,"boolean","StreetView Controls",null,{tags:["Basic"]}),rr.prototype.publish("overviewMapControl",!1,"boolean","OverviewMap Controls",null,{tags:["Basic"]}),rr.prototype.publish("streetView",!1,"boolean","Streetview",null,{tags:["Basic"]}),rr.prototype.publish("drawingTools",!1,"boolean","Drawing Tools",null,{tags:["Basic"]}),rr.prototype.publish("drawingState","","string","Map Drawings",null,{disable:function(t){return!1===t.drawingTools()}}),rr.prototype.publish("googleMapStyles",{},"object","Styling for map colors etc",null,{tags:["Basic"]});var ar=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}(mo),sr=function(e){function n(){var t=e.call(this)||this;return t.layered=new ar(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}(rr);sr.prototype._class+=" map_GMapLayered";var lr=function(t){function e(){var e=t.call(this)||this,n=e;return e._counties=(new Ho).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(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){},e.prototype.dblclick=function(t,e,n){},e}(sr);lr.prototype._class+=" map_GMapCounties",lr.prototype.publish("autoScale",!1,"boolean","Auto scale to data");var hr=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;return 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}),i.apply(this,arguments)},this._viewportSurface.widget(n)},n}(rr);hr.prototype._class+=" map_GMapGraph";var ur=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}(rr);ur.prototype._class+=" map_GMapHeat";fo(".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 cr=function(t){function n(){var n=t.call(this)||this;return e.Utility.SimpleSelectionMixin.call(n),n._geohash=new so,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){yo.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){yo.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){yo.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){},n.prototype.dblclick=function(t,e,n){},n}(yo);cr.prototype._class+=" map_Pins",cr.prototype.mixin(e.Utility.SimpleSelectionMixin),cr.prototype.publish("geohashColumn",null,"set","Geohash column",function(){return this.columns()},{optional:!0}),cr.prototype.publish("tooltipColumn",null,"set","Tooltip column",function(){return this.columns()},{optional:!0}),cr.prototype.publish("latColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),cr.prototype.publish("longColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),cr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),cr.prototype.publish("fillColor","#00FFDD","html-color","Pin Color",null,{optional:!0}),cr.prototype.publish("omitNullLatLong",!1,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]}),cr.prototype.publish("strokeWidth",.5,"number","Pin Border Thickness (pixels)",null,{tags:["Basic"]}),cr.prototype.publish("strokeColor","","html-color","Pin Border Color",null,{optional:!0}),cr.prototype.publish("fontSize",18,"number","Font Size",null,{tags:["Basic","Shared"]}),cr.prototype.publish("fontFamily","Verdana","string","Font Name",null,{tags:["Basic","Shared","Shared"]}),cr.prototype.publish("fontColor","#000000","html-color","Font Color",null,{tags:["Basic","Shared"]}),cr.prototype.publish("pinType","pin","set","Pin Type",["pin","circle","rectangle","rectangle-pin"],{tags:["Basic"]}),cr.prototype.publish("arrowWidth",8,"number","Pin arrow width (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["pin","rectangle-pin"].indexOf(t.pinType())}}),cr.prototype.publish("arrowHeight",12,"number","Pin arrow height (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["pin","rectangle-pin"].indexOf(t.pinType())}}),cr.prototype.publish("pinWidth",20,"number","Width of pin (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["rectangle","rectangle-pin"].indexOf(t.pinType())}}),cr.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())}}),cr.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())}}),cr.prototype.publish("pinRadius",12,"number","Radius of circle (pixels)",null,{tags:["Basic"],disable:function(t){return"circle"!==t.pinType()}}),cr.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 pr=function(t){function e(){var e=t.call(this)||this,n=e;return e._pins=(new cr).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){},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){},e}(sr);pr.prototype._class+=" map_GMapPin",pr.prototype.publish("autoScale",!1,"boolean","Auto scale to data"),pr.prototype.publishProxy("pinColor","_pins","fillColor"),pr.prototype.publishProxy("pinType","_pins","pinType"),pr.prototype.publishProxy("pinWidth","_pins","pinWidth"),pr.prototype.publishProxy("pinHeight","_pins","pinHeight"),pr.prototype.publishProxy("cornerRadius","_pins","cornerRadius"),pr.prototype.publishProxy("pinRadius","_pins","pinRadius"),pr.prototype.publishProxy("arrowWidth","_pins","arrowWidth"),pr.prototype.publishProxy("arrowHeight","_pins","arrowHeight"),pr.prototype.publishProxy("textBaseline","_pins","textBaseline"),pr.prototype.publishProxy("strokeWidth","_pins","strokeWidth"),pr.prototype.publishProxy("omitNullLatLong","_pins","omitNullLatLong"),pr.prototype.publish("latitudeColumn",null,"set","Latitude",function(){return this.columns()},{optional:!0}),pr.prototype.publish("longitudeColumn",null,"set","Longitude",function(){return this.columns()},{optional:!0}),pr.prototype.publish("colorColumn",null,"set","Color",function(){return this.columns()},{optional:!0}),pr.prototype.publish("tooltipColumn",null,"set","Tooltip",function(){return this.columns()},{optional:!0}),pr.prototype.publish("streetViewOnClick",!1,"boolean","Switch to street view when pin clicked");fo(".map_Layered .marker{fill:#656565;stroke:none}.map_Layered .dataEdge{stroke:#000;fill:none}");var dr=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.data=function(t){var e=yo.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){yo.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){yo.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){yo.prototype.layerZoomed.apply(this,arguments),this._edgesPaths.attr("stroke-width","".concat(.5/t.zoomScale(),"px"))},e}(yo);dr.prototype._class+=" map_Lines",dr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]});var fr=function(t){function e(){var e=t.call(this)||this,n=e;return e._lines=new dr,e._pins=(new cr).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){},e.prototype.dblclick=function(t,e,n){},e}(sr);fr.prototype._class+=" map_GMapPinLine",fr.prototype.publish("autoScale",!1,"boolean","Auto scale to data"),fr.prototype.publish("fromPinColor","green","html-color","From Pin Color"),fr.prototype.publish("fromLatitudeColumn",null,"set","From Latitude",function(){return this.columns()},{optional:!0}),fr.prototype.publish("fromLongitudeColumn",null,"set","From Longitude",function(){return this.columns()},{optional:!0}),fr.prototype.publish("fromColorColumn",null,"set","From Color",function(){return this.columns()},{optional:!0}),fr.prototype.publish("fromTooltipColumn",null,"set","From Tooltip",function(){return this.columns()},{optional:!0}),fr.prototype.publish("toPinColor","red","html-color","To Pin Color"),fr.prototype.publish("toLatitudeColumn",null,"set","To Latitude",function(){return this.columns()},{optional:!0}),fr.prototype.publish("toLongitudeColumn",null,"set","To Longitude",function(){return this.columns()},{optional:!0}),fr.prototype.publish("toColorColumn",null,"set","To Color",function(){return this.columns()},{optional:!0}),fr.prototype.publish("toTooltipColumn",null,"set","To Tooltip",function(){return this.columns()},{optional:!0});fo(".map_Layered .marker{fill:#656565;stroke:none;stroke-width:1px}.map_Layered .dataEdge{stroke:#000;fill:none}");var _r=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=cr.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=cr.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){cr.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){cr.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){cr.prototype.layerZoomed.apply(this,arguments),this._edgesPaths.attr("stroke-width","".concat(.5/t.zoomScale(),"px"))},e}(cr);_r.prototype._class+=" map_Graph";fo(".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 mr=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){yo.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}(yo);mr.prototype._class+=" map_Graticule",mr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),mr.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),mr.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width");fo(".map_Heat canvas{pointer-events:none}");var gr=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.layerEnter=function(t,e,n){yo.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){yo.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){yo.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}(yo);function yr(){}function vr(t){return t.k}function br(t){return[t.x,t.y]}function Lr(t){return function(){return t}}gr.prototype._class+=" map_Heat",gr.prototype.publish("latColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),gr.prototype.publish("longColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),gr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),yr.prototype._palette=e.Palette.rainbow("default"),yr.prototype.click=function(t,e,n){};fo(".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 wr=4096,xr=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){yo.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=vr,l=br,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:Lr(+t),u):s},u.translate=function(t){return arguments.length?(l="function"==typeof t?t:Lr([+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*wr).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){var e=t/256;return"translate(-2048,-2048) scale("+e+")"}(r)).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"}).transition().duration(500).style("opacity",1)},n._copyrightText="© OpenStreetMap contributors",n}(yo);xr.prototype._class+=" map_OpenStreet",xr.prototype.publish("tileProvider","OpenStreetMap","set","Tile Provider",["OpenStreetMap","OpenStreetMap Hot","MapQuest","MapQuest Sat","Stamen Watercolor","OpenCycleMap"],{tags:["Basic","Shared"]});var kr=function(t){function e(){return t.call(this)||this}return h(e,t),e}(mo);function Mr(){To.call(this),this.projection("Mercator")}kr.prototype._class+=" map_TestHeatMap",Mr.prototype=Object.create(To.prototype),Mr.prototype.constructor=Mr,Mr.prototype._class+=" map_TopoJSONChoropleth",Mr.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"]),Mr.prototype.layerEnter=function(t,n,i){To.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]})})},Mr.prototype.layerUpdate=function(t){To.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.warn("Unknown Country: "+e),i}).style("fill",function(t){return n._palette(t[1],n._dataMinWeight,n._dataMaxWeight)}),this.choroPaths.exit().remove()},Mr.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){Oo("".concat(Eo(),"/").concat(t.region(),".json"),function(n){function i(n){t._choroTopologyIndex=n,e()}t._choroTopology=n,t._choroTopologyObjects=n.objects.PolbndA,t._choroTopologyFeatures=Lo(t._choroTopology,t._choroTopologyObjects).features,Oo("".concat(Eo(),"/").concat(t.region(),"_idx.json"),i).on("error",function(t){i({})})})})}return this._topoJsonPromise};var Cr,Pr={exports:{}};var Er=(Cr||(Cr=1,function(t){var e;self,e=()=>(()=>{var t={14:(t,e,n)=>{t.exports=n.p+"011a678e3efe41981754.png"},51:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},62: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}},66:(t,e,n)=>{t.exports=n.p+"1e8408af1a34bdf61457.png"},89:(t,e,n)=>{n.d(e,{A:()=>s});var i=n(758),o=n.n(i),r=n(935),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},128: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)}},141:(t,e,n)=>{n.d(e,{A:()=>m});var i=n(758),o=n.n(i),r=n(935),a=n.n(r),s=n(62),l=n.n(s),h=new URL(n(14),n.b),u=new URL(n(327),n.b),c=new URL(n(66),n.b),p=a()(o()),d=l()(h),f=l()(u),_=l()(c);p.push([t.id,`/* required styles */\n\n.leaflet-pane,\n.leaflet-tile,\n.leaflet-marker-icon,\n.leaflet-marker-shadow,\n.leaflet-tile-container,\n.leaflet-pane > svg,\n.leaflet-pane > canvas,\n.leaflet-zoom-box,\n.leaflet-image-layer,\n.leaflet-layer {\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\t}\n.leaflet-container {\n\toverflow: hidden;\n\t}\n.leaflet-tile,\n.leaflet-marker-icon,\n.leaflet-marker-shadow {\n\t-webkit-user-select: none;\n\t -moz-user-select: none;\n\t user-select: none;\n\t -webkit-user-drag: none;\n\t}\n/* Prevents IE11 from highlighting tiles in blue */\n.leaflet-tile::selection {\n\tbackground: transparent;\n}\n/* Safari renders non-retina tile on retina better with this, but Chrome is worse */\n.leaflet-safari .leaflet-tile {\n\timage-rendering: -webkit-optimize-contrast;\n\t}\n/* hack that prevents hw layers "stretching" when loading new tiles */\n.leaflet-safari .leaflet-tile-container {\n\twidth: 1600px;\n\theight: 1600px;\n\t-webkit-transform-origin: 0 0;\n\t}\n.leaflet-marker-icon,\n.leaflet-marker-shadow {\n\tdisplay: block;\n\t}\n/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */\n/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */\n.leaflet-container .leaflet-overlay-pane svg {\n\tmax-width: none !important;\n\tmax-height: none !important;\n\t}\n.leaflet-container .leaflet-marker-pane img,\n.leaflet-container .leaflet-shadow-pane img,\n.leaflet-container .leaflet-tile-pane img,\n.leaflet-container img.leaflet-image-layer,\n.leaflet-container .leaflet-tile {\n\tmax-width: none !important;\n\tmax-height: none !important;\n\twidth: auto;\n\tpadding: 0;\n\t}\n\n.leaflet-container img.leaflet-tile {\n\t/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */\n\tmix-blend-mode: plus-lighter;\n}\n\n.leaflet-container.leaflet-touch-zoom {\n\t-ms-touch-action: pan-x pan-y;\n\ttouch-action: pan-x pan-y;\n\t}\n.leaflet-container.leaflet-touch-drag {\n\t-ms-touch-action: pinch-zoom;\n\t/* Fallback for FF which doesn't support pinch-zoom */\n\ttouch-action: none;\n\ttouch-action: pinch-zoom;\n}\n.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {\n\t-ms-touch-action: none;\n\ttouch-action: none;\n}\n.leaflet-container {\n\t-webkit-tap-highlight-color: transparent;\n}\n.leaflet-container a {\n\t-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);\n}\n.leaflet-tile {\n\tfilter: inherit;\n\tvisibility: hidden;\n\t}\n.leaflet-tile-loaded {\n\tvisibility: inherit;\n\t}\n.leaflet-zoom-box {\n\twidth: 0;\n\theight: 0;\n\t-moz-box-sizing: border-box;\n\t box-sizing: border-box;\n\tz-index: 800;\n\t}\n/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */\n.leaflet-overlay-pane svg {\n\t-moz-user-select: none;\n\t}\n\n.leaflet-pane { z-index: 400; }\n\n.leaflet-tile-pane { z-index: 200; }\n.leaflet-overlay-pane { z-index: 400; }\n.leaflet-shadow-pane { z-index: 500; }\n.leaflet-marker-pane { z-index: 600; }\n.leaflet-tooltip-pane { z-index: 650; }\n.leaflet-popup-pane { z-index: 700; }\n\n.leaflet-map-pane canvas { z-index: 100; }\n.leaflet-map-pane svg { z-index: 200; }\n\n.leaflet-vml-shape {\n\twidth: 1px;\n\theight: 1px;\n\t}\n.lvml {\n\tbehavior: url(#default#VML);\n\tdisplay: inline-block;\n\tposition: absolute;\n\t}\n\n\n/* control positioning */\n\n.leaflet-control {\n\tposition: relative;\n\tz-index: 800;\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\n\tpointer-events: auto;\n\t}\n.leaflet-top,\n.leaflet-bottom {\n\tposition: absolute;\n\tz-index: 1000;\n\tpointer-events: none;\n\t}\n.leaflet-top {\n\ttop: 0;\n\t}\n.leaflet-right {\n\tright: 0;\n\t}\n.leaflet-bottom {\n\tbottom: 0;\n\t}\n.leaflet-left {\n\tleft: 0;\n\t}\n.leaflet-control {\n\tfloat: left;\n\tclear: both;\n\t}\n.leaflet-right .leaflet-control {\n\tfloat: right;\n\t}\n.leaflet-top .leaflet-control {\n\tmargin-top: 10px;\n\t}\n.leaflet-bottom .leaflet-control {\n\tmargin-bottom: 10px;\n\t}\n.leaflet-left .leaflet-control {\n\tmargin-left: 10px;\n\t}\n.leaflet-right .leaflet-control {\n\tmargin-right: 10px;\n\t}\n\n\n/* zoom and fade animations */\n\n.leaflet-fade-anim .leaflet-popup {\n\topacity: 0;\n\t-webkit-transition: opacity 0.2s linear;\n\t -moz-transition: opacity 0.2s linear;\n\t transition: opacity 0.2s linear;\n\t}\n.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {\n\topacity: 1;\n\t}\n.leaflet-zoom-animated {\n\t-webkit-transform-origin: 0 0;\n\t -ms-transform-origin: 0 0;\n\t transform-origin: 0 0;\n\t}\nsvg.leaflet-zoom-animated {\n\twill-change: transform;\n}\n\n.leaflet-zoom-anim .leaflet-zoom-animated {\n\t-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);\n\t -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);\n\t transition: transform 0.25s cubic-bezier(0,0,0.25,1);\n\t}\n.leaflet-zoom-anim .leaflet-tile,\n.leaflet-pan-anim .leaflet-tile {\n\t-webkit-transition: none;\n\t -moz-transition: none;\n\t transition: none;\n\t}\n\n.leaflet-zoom-anim .leaflet-zoom-hide {\n\tvisibility: hidden;\n\t}\n\n\n/* cursors */\n\n.leaflet-interactive {\n\tcursor: pointer;\n\t}\n.leaflet-grab {\n\tcursor: -webkit-grab;\n\tcursor: -moz-grab;\n\tcursor: grab;\n\t}\n.leaflet-crosshair,\n.leaflet-crosshair .leaflet-interactive {\n\tcursor: crosshair;\n\t}\n.leaflet-popup-pane,\n.leaflet-control {\n\tcursor: auto;\n\t}\n.leaflet-dragging .leaflet-grab,\n.leaflet-dragging .leaflet-grab .leaflet-interactive,\n.leaflet-dragging .leaflet-marker-draggable {\n\tcursor: move;\n\tcursor: -webkit-grabbing;\n\tcursor: -moz-grabbing;\n\tcursor: grabbing;\n\t}\n\n/* marker & overlays interactivity */\n.leaflet-marker-icon,\n.leaflet-marker-shadow,\n.leaflet-image-layer,\n.leaflet-pane > svg path,\n.leaflet-tile-container {\n\tpointer-events: none;\n\t}\n\n.leaflet-marker-icon.leaflet-interactive,\n.leaflet-image-layer.leaflet-interactive,\n.leaflet-pane > svg path.leaflet-interactive,\nsvg.leaflet-image-layer.leaflet-interactive path {\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\n\tpointer-events: auto;\n\t}\n\n/* visual tweaks */\n\n.leaflet-container {\n\tbackground: #ddd;\n\toutline-offset: 1px;\n\t}\n.leaflet-container a {\n\tcolor: #0078A8;\n\t}\n.leaflet-zoom-box {\n\tborder: 2px dotted #38f;\n\tbackground: rgba(255,255,255,0.5);\n\t}\n\n\n/* general typography */\n.leaflet-container {\n\tfont-family: "Helvetica Neue", Arial, Helvetica, sans-serif;\n\tfont-size: 12px;\n\tfont-size: 0.75rem;\n\tline-height: 1.5;\n\t}\n\n\n/* general toolbar styles */\n\n.leaflet-bar {\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.65);\n\tborder-radius: 4px;\n\t}\n.leaflet-bar a {\n\tbackground-color: #fff;\n\tborder-bottom: 1px solid #ccc;\n\twidth: 26px;\n\theight: 26px;\n\tline-height: 26px;\n\tdisplay: block;\n\ttext-align: center;\n\ttext-decoration: none;\n\tcolor: black;\n\t}\n.leaflet-bar a,\n.leaflet-control-layers-toggle {\n\tbackground-position: 50% 50%;\n\tbackground-repeat: no-repeat;\n\tdisplay: block;\n\t}\n.leaflet-bar a:hover,\n.leaflet-bar a:focus {\n\tbackground-color: #f4f4f4;\n\t}\n.leaflet-bar a:first-child {\n\tborder-top-left-radius: 4px;\n\tborder-top-right-radius: 4px;\n\t}\n.leaflet-bar a:last-child {\n\tborder-bottom-left-radius: 4px;\n\tborder-bottom-right-radius: 4px;\n\tborder-bottom: none;\n\t}\n.leaflet-bar a.leaflet-disabled {\n\tcursor: default;\n\tbackground-color: #f4f4f4;\n\tcolor: #bbb;\n\t}\n\n.leaflet-touch .leaflet-bar a {\n\twidth: 30px;\n\theight: 30px;\n\tline-height: 30px;\n\t}\n.leaflet-touch .leaflet-bar a:first-child {\n\tborder-top-left-radius: 2px;\n\tborder-top-right-radius: 2px;\n\t}\n.leaflet-touch .leaflet-bar a:last-child {\n\tborder-bottom-left-radius: 2px;\n\tborder-bottom-right-radius: 2px;\n\t}\n\n/* zoom control */\n\n.leaflet-control-zoom-in,\n.leaflet-control-zoom-out {\n\tfont: bold 18px 'Lucida Console', Monaco, monospace;\n\ttext-indent: 1px;\n\t}\n\n.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {\n\tfont-size: 22px;\n\t}\n\n\n/* layers control */\n\n.leaflet-control-layers {\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.4);\n\tbackground: #fff;\n\tborder-radius: 5px;\n\t}\n.leaflet-control-layers-toggle {\n\tbackground-image: url(${d});\n\twidth: 36px;\n\theight: 36px;\n\t}\n.leaflet-retina .leaflet-control-layers-toggle {\n\tbackground-image: url(${f});\n\tbackground-size: 26px 26px;\n\t}\n.leaflet-touch .leaflet-control-layers-toggle {\n\twidth: 44px;\n\theight: 44px;\n\t}\n.leaflet-control-layers .leaflet-control-layers-list,\n.leaflet-control-layers-expanded .leaflet-control-layers-toggle {\n\tdisplay: none;\n\t}\n.leaflet-control-layers-expanded .leaflet-control-layers-list {\n\tdisplay: block;\n\tposition: relative;\n\t}\n.leaflet-control-layers-expanded {\n\tpadding: 6px 10px 6px 6px;\n\tcolor: #333;\n\tbackground: #fff;\n\t}\n.leaflet-control-layers-scrollbar {\n\toverflow-y: scroll;\n\toverflow-x: hidden;\n\tpadding-right: 5px;\n\t}\n.leaflet-control-layers-selector {\n\tmargin-top: 2px;\n\tposition: relative;\n\ttop: 1px;\n\t}\n.leaflet-control-layers label {\n\tdisplay: block;\n\tfont-size: 13px;\n\tfont-size: 1.08333em;\n\t}\n.leaflet-control-layers-separator {\n\theight: 0;\n\tborder-top: 1px solid #ddd;\n\tmargin: 5px -10px 5px -6px;\n\t}\n\n/* Default icon URLs */\n.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */\n\tbackground-image: url(${_});\n\t}\n\n\n/* attribution and scale controls */\n\n.leaflet-container .leaflet-control-attribution {\n\tbackground: #fff;\n\tbackground: rgba(255, 255, 255, 0.8);\n\tmargin: 0;\n\t}\n.leaflet-control-attribution,\n.leaflet-control-scale-line {\n\tpadding: 0 5px;\n\tcolor: #333;\n\tline-height: 1.4;\n\t}\n.leaflet-control-attribution a {\n\ttext-decoration: none;\n\t}\n.leaflet-control-attribution a:hover,\n.leaflet-control-attribution a:focus {\n\ttext-decoration: underline;\n\t}\n.leaflet-attribution-flag {\n\tdisplay: inline !important;\n\tvertical-align: baseline !important;\n\twidth: 1em;\n\theight: 0.6669em;\n\t}\n.leaflet-left .leaflet-control-scale {\n\tmargin-left: 5px;\n\t}\n.leaflet-bottom .leaflet-control-scale {\n\tmargin-bottom: 5px;\n\t}\n.leaflet-control-scale-line {\n\tborder: 2px solid #777;\n\tborder-top: none;\n\tline-height: 1.1;\n\tpadding: 2px 5px 1px;\n\twhite-space: nowrap;\n\t-moz-box-sizing: border-box;\n\t box-sizing: border-box;\n\tbackground: rgba(255, 255, 255, 0.8);\n\ttext-shadow: 1px 1px #fff;\n\t}\n.leaflet-control-scale-line:not(:first-child) {\n\tborder-top: 2px solid #777;\n\tborder-bottom: none;\n\tmargin-top: -2px;\n\t}\n.leaflet-control-scale-line:not(:first-child):not(:last-child) {\n\tborder-bottom: 2px solid #777;\n\t}\n\n.leaflet-touch .leaflet-control-attribution,\n.leaflet-touch .leaflet-control-layers,\n.leaflet-touch .leaflet-bar {\n\tbox-shadow: none;\n\t}\n.leaflet-touch .leaflet-control-layers,\n.leaflet-touch .leaflet-bar {\n\tborder: 2px solid rgba(0,0,0,0.2);\n\tbackground-clip: padding-box;\n\t}\n\n\n/* popup */\n\n.leaflet-popup {\n\tposition: absolute;\n\ttext-align: center;\n\tmargin-bottom: 20px;\n\t}\n.leaflet-popup-content-wrapper {\n\tpadding: 1px;\n\ttext-align: left;\n\tborder-radius: 12px;\n\t}\n.leaflet-popup-content {\n\tmargin: 13px 24px 13px 20px;\n\tline-height: 1.3;\n\tfont-size: 13px;\n\tfont-size: 1.08333em;\n\tmin-height: 1px;\n\t}\n.leaflet-popup-content p {\n\tmargin: 17px 0;\n\tmargin: 1.3em 0;\n\t}\n.leaflet-popup-tip-container {\n\twidth: 40px;\n\theight: 20px;\n\tposition: absolute;\n\tleft: 50%;\n\tmargin-top: -1px;\n\tmargin-left: -20px;\n\toverflow: hidden;\n\tpointer-events: none;\n\t}\n.leaflet-popup-tip {\n\twidth: 17px;\n\theight: 17px;\n\tpadding: 1px;\n\n\tmargin: -10px auto 0;\n\tpointer-events: auto;\n\n\t-webkit-transform: rotate(45deg);\n\t -moz-transform: rotate(45deg);\n\t -ms-transform: rotate(45deg);\n\t transform: rotate(45deg);\n\t}\n.leaflet-popup-content-wrapper,\n.leaflet-popup-tip {\n\tbackground: white;\n\tcolor: #333;\n\tbox-shadow: 0 3px 14px rgba(0,0,0,0.4);\n\t}\n.leaflet-container a.leaflet-popup-close-button {\n\tposition: absolute;\n\ttop: 0;\n\tright: 0;\n\tborder: none;\n\ttext-align: center;\n\twidth: 24px;\n\theight: 24px;\n\tfont: 16px/24px Tahoma, Verdana, sans-serif;\n\tcolor: #757575;\n\ttext-decoration: none;\n\tbackground: transparent;\n\t}\n.leaflet-container a.leaflet-popup-close-button:hover,\n.leaflet-container a.leaflet-popup-close-button:focus {\n\tcolor: #585858;\n\t}\n.leaflet-popup-scrolled {\n\toverflow: auto;\n\t}\n\n.leaflet-oldie .leaflet-popup-content-wrapper {\n\t-ms-zoom: 1;\n\t}\n.leaflet-oldie .leaflet-popup-tip {\n\twidth: 24px;\n\tmargin: 0 auto;\n\n\t-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";\n\tfilter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);\n\t}\n\n.leaflet-oldie .leaflet-control-zoom,\n.leaflet-oldie .leaflet-control-layers,\n.leaflet-oldie .leaflet-popup-content-wrapper,\n.leaflet-oldie .leaflet-popup-tip {\n\tborder: 1px solid #999;\n\t}\n\n\n/* div icon */\n\n.leaflet-div-icon {\n\tbackground: #fff;\n\tborder: 1px solid #666;\n\t}\n\n\n/* Tooltip */\n/* Base styles for the element that has a tooltip */\n.leaflet-tooltip {\n\tposition: absolute;\n\tpadding: 6px;\n\tbackground-color: #fff;\n\tborder: 1px solid #fff;\n\tborder-radius: 3px;\n\tcolor: #222;\n\twhite-space: nowrap;\n\t-webkit-user-select: none;\n\t-moz-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none;\n\tpointer-events: none;\n\tbox-shadow: 0 1px 3px rgba(0,0,0,0.4);\n\t}\n.leaflet-tooltip.leaflet-interactive {\n\tcursor: pointer;\n\tpointer-events: auto;\n\t}\n.leaflet-tooltip-top:before,\n.leaflet-tooltip-bottom:before,\n.leaflet-tooltip-left:before,\n.leaflet-tooltip-right:before {\n\tposition: absolute;\n\tpointer-events: none;\n\tborder: 6px solid transparent;\n\tbackground: transparent;\n\tcontent: "";\n\t}\n\n/* Directions */\n\n.leaflet-tooltip-bottom {\n\tmargin-top: 6px;\n}\n.leaflet-tooltip-top {\n\tmargin-top: -6px;\n}\n.leaflet-tooltip-bottom:before,\n.leaflet-tooltip-top:before {\n\tleft: 50%;\n\tmargin-left: -6px;\n\t}\n.leaflet-tooltip-top:before {\n\tbottom: 0;\n\tmargin-bottom: -12px;\n\tborder-top-color: #fff;\n\t}\n.leaflet-tooltip-bottom:before {\n\ttop: 0;\n\tmargin-top: -12px;\n\tmargin-left: -6px;\n\tborder-bottom-color: #fff;\n\t}\n.leaflet-tooltip-left {\n\tmargin-left: -6px;\n}\n.leaflet-tooltip-right {\n\tmargin-left: 6px;\n}\n.leaflet-tooltip-left:before,\n.leaflet-tooltip-right:before {\n\ttop: 50%;\n\tmargin-top: -6px;\n\t}\n.leaflet-tooltip-left:before {\n\tright: 0;\n\tmargin-right: -12px;\n\tborder-left-color: #fff;\n\t}\n.leaflet-tooltip-right:before {\n\tleft: 0;\n\tmargin-left: -12px;\n\tborder-right-color: #fff;\n\t}\n\n/* Printing */\n\n@media print {\n\t/* Prevent printers from removing background-images of controls. */\n\t.leaflet-control {\n\t\t-webkit-print-color-adjust: exact;\n\t\tprint-color-adjust: exact;\n\t\t}\n\t}\n`,""]);const m=p},222:(t,e,n)=>{t.exports=n.p+"194137260531ee29a5f2.svg"},238:(t,e,n)=>{var i=n(591),o=n.n(i),r=n(740),a=n.n(r),s=n(128),l=n.n(s),h=n(855),u=n.n(h),c=n(51),p=n.n(c),d=n(656),f=n.n(d),_=n(396),m={};m.styleTagTransform=f(),m.setAttributes=u(),m.insert=l().bind(null,"head"),m.domAPI=a(),m.insertStyleElement=p(),o()(_.A,m),_.A&&_.A.locals&&_.A.locals},265:(t,e,n)=>{t.exports=n.p+"44b38a404dec4643c46b.png"},327:(t,e,n)=>{t.exports=n.p+"4a4ee777ddc0d4cedee4.png"},334:()=>{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}})},396:(t,e,n)=>{n.d(e,{A:()=>s});var i=n(758),o=n.n(i),r=n(935),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},522:(t,e,n)=>{t.exports=n.p+"c6e9c007f41bd4d26c20.png"},591: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}}},608:(t,e,n)=>{n.d(e,{C6:()=>o});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)}"function"==typeof SuppressedError&&SuppressedError},636:(t,e,n)=>{n.d(e,{A:()=>m});var i=n(758),o=n.n(i),r=n(935),a=n.n(r),s=n(62),l=n.n(s),h=new URL(n(265),n.b),u=new URL(n(222),n.b),c=new URL(n(522),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},651:(t,e,n)=>{var i=n(591),o=n.n(i),r=n(740),a=n.n(r),s=n(128),l=n.n(s),h=n(855),u=n.n(h),c=n(51),p=n.n(c),d=n(656),f=n.n(d),_=n(89),m={};m.styleTagTransform=f(),m.setAttributes=u(),m.insert=l().bind(null,"head"),m.domAPI=a(),m.insertStyleElement=p(),o()(_.A,m),_.A&&_.A.locals&&_.A.locals},656: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))}}},690:(t,e,n)=>{var i=n(591),o=n.n(i),r=n(740),a=n.n(r),s=n(128),l=n.n(s),h=n(855),u=n.n(h),c=n(51),p=n.n(c),d=n(656),f=n.n(d),_=n(636),m={};m.styleTagTransform=f(),m.setAttributes=u(),m.insert=l().bind(null,"head"),m.domAPI=a(),m.insertStyleElement=p(),o()(_.A,m),_.A&&_.A.locals&&_.A.locals},740:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};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)}}}},743:(t,e,n)=>{n.d(e,{X:()=>b});var i=n(902),o=n(591),r=n.n(o),a=n(740),s=n.n(a),l=n(128),h=n.n(l),u=n(855),c=n.n(u),p=n(51),d=n.n(p),f=n(656),_=n.n(f),m=n(831),g={};g.styleTagTransform=_(),g.setAttributes=c(),g.insert=h().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=d(),r()(m.A,g),m.A&&m.A.locals&&m.A.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)}},758:t=>{t.exports=function(t){return t[1]}},812:(t,e,n)=>{n.d(e,{w:()=>He,h:()=>je});var i=n(608);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,R,Z,j,H=0,U=0,G=0,F=0,W=0,V=0,q=0,Y=0,X=0,K={point:J,lineStart:Q,lineEnd:et,polygonStart:function(){K.lineStart=nt,K.lineEnd=it},polygonEnd:function(){K.point=J,K.lineStart=Q,K.lineEnd=et},result:function(){var t=X?[q/X,Y/X]:V?[F/V,W/V]:G?[H/G,U/G]:[NaN,NaN];return H=U=G=F=W=V=q=Y=X=0,t}};function J(t,e){H+=t,U+=e,++G}function Q(){K.point=$}function $(t,e){K.point=tt,J(Z=t,j=e)}function tt(t,e){var n=t-Z,i=e-j,o=g(n*n+i*i);F+=o*(Z+t)/2,W+=o*(j+e)/2,V+=o,J(Z=t,j=e)}function et(){K.point=J}function nt(){K.point=ot}function it(){rt(N,R)}function ot(t,e){K.point=rt,J(N=Z=t,R=j=e)}function rt(t,e){var n=t-Z,i=e-j,o=g(n*n+i*i);F+=o*(Z+t)/2,W+=o*(j+e)/2,V+=o,q+=(o=j*t-Z*e)*(Z+t),Y+=o*(j+e),X+=3*o,J(Z=t,j=e)}const at=K;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 Rt(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 Zt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function jt(t){return function(){this.style.removeProperty(t)}}function Ht(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 Gt(t){return function(){delete this[t]}}function Ft(t,e){return function(){this[t]=e}}function Wt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Vt(t){return t.trim().split(/^|\s+/)}function qt(t){return t.classList||new Yt(t)}function Yt(t){this._node=t,this._names=Vt(t.getAttribute("class")||"")}function Xt(t,e){for(var n=qt(t),i=-1,o=e.length;++i<o;)n.add(e[i])}function Kt(t,e){for(var n=qt(t),i=-1,o=e.length;++i<o;)n.remove(e[i])}function Jt(t){return function(){Xt(this,t)}}function Qt(t){return function(){Kt(this,t)}}function $t(t,e){return function(){(e.apply(this,arguments)?Xt:Kt)(this,t)}}function te(){this.textContent=""}function ee(t){return function(){this.textContent=t}}function ne(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function ie(){this.innerHTML=""}function oe(t){return function(){this.innerHTML=t}}function re(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function ae(){this.nextSibling&&this.parentNode.appendChild(this)}function se(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function le(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 he(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ue(t){var e=Ot(t);return(e.local?he:le)(e)}function ce(){return null}function pe(){var t=this.parentNode;t&&t.removeChild(this)}function de(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function fe(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}Yt.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 _e={};function me(t,e,n){return t=ge(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function ge(t,e,n){return function(i){try{t.call(this,this.__data__,e,n)}finally{}}}function ye(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 ve(t,e,n){var i=_e.hasOwnProperty(t.type)?me:ge;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 be(t,e,n){var i=Zt(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 Le(t,e){return function(){return be(this,t,e)}}function we(t,e){return function(){return be(this,t,e.apply(this,arguments))}}"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(_e={mouseenter:"mouseover",mouseleave:"mouseout"}));var xe=[null];function ke(t,e){this._groups=t,this._parents=e}ke.prototype={constructor:ke,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 ke(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 ke(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 ke(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 ke(s,o))._enter=l,s._exit=h,s},enter:function(){return new ke(this._enter||this._groups.map(Mt),this._parents)},exit:function(){return new ke(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 ke(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 ke(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?Rt: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:Ht)(t,e,null==n?"":n)):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?Gt:"function"==typeof e?Wt:Ft)(t,e)):this.node()[t]},classed:function(t,e){var n=Vt(t+"");if(arguments.length<2){for(var i=qt(this.node()),o=-1,r=n.length;++o<r;)if(!i.contains(n[o]))return!1;return!0}return this.each(("function"==typeof e?$t:e?Jt:Qt)(n,e))},text:function(t){return arguments.length?this.each(null==t?te:("function"==typeof t?ne:ee)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?ie:("function"==typeof t?re:oe)(t)):this.node().innerHTML},raise:function(){return this.each(ae)},lower:function(){return this.each(se)},append:function(t){var e="function"==typeof t?t:ue(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var n="function"==typeof t?t:ue(t),i=null==e?ce:"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(pe)},clone:function(t){return this.select(t?fe:de)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var i,o,r=function(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}})}(t+""),a=r.length;if(!(arguments.length<2)){for(s=e?ve:ye,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?we:Le)(t,e))}};var Me=n(902),Ce=n(591),Pe=n.n(Ce),Ee=n(740),Te=n.n(Ee),Se=n(128),ze=n.n(Se),Oe=n(855),De=n.n(Oe),Ae=n(51),Ie=n.n(Ae),Be=n(656),Ne=n.n(Be),Re=n(866),Ze={};Ze.styleTagTransform=Ne(),Ze.setAttributes=De(),Ze.insert=ze().bind(null,"head"),Ze.domAPI=Te(),Ze.insertStyleElement=Ie(),Pe()(Re.A,Ze),Re.A&&Re.A.locals&&Re.A.locals;var je=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.C6)(e,t),e}(Me.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.C6)(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 Me.LatLngBounds([-90,-180],[90,180]);var t,e,n=this.selection.node().getBBox();try{t=this.projection.layerPointToLatLng(new Me.Point(n.x,n.y+n.height))}catch(e){t=[-90,-180]}try{e=this.projection.layerPointToLatLng(new Me.Point(n.x+n.width,n.y))}catch(t){e=[90,180]}return new Me.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=Me.svg(),t.addLayer(this._svg),this._rootGroup=function(t){return"string"==typeof t?new ke([[document.querySelector(t)]],[document.documentElement]):new ke([[t]],xe)}(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=Me.latLng([0,0]),this._wgsInitialShift=this.map.latLngToLayerPoint(this._wgsOrigin),this._zoom=this.map.getZoom(),this._shift=Me.point(0,0),this._scale=1,this.projection={latLngToLayerPoint:function(t,n){return n=e._undef(n)?e._zoom:n,e.map.project(Me.latLng(t),n)._subtract(e._pixelOrigin)},layerPointToLatLng:function(t,n){n=e._undef(n)?e._zoom:n;var i=Me.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 Me.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}(je)},831:(t,e,n)=>{n.d(e,{A:()=>s});var i=n(758),o=n.n(i),r=n(935),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},855:(t,e,n)=>{t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},866:(t,e,n)=>{n.d(e,{A:()=>s});var i=n(758),o=n.n(i),r=n(935),a=n.n(r)()(o());a.push([t.id,"g.d3-overlay * {\n pointer-events: visiblePainted;\n}\n",""]);const s=a},900: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}}},902:function(t,e){
|
|
2
2
|
/* @preserve
|
|
3
3
|
* Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
|
|
4
4
|
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|
|
5
5
|
*/
|
|
6
|
-
!function(t){var e="1.9.4";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"_leaflet_id"in t||(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){if(!1===e)return t;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={__proto__:null,extend:n,create:i,bind:o,get lastId(){return 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(){d(this),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),t.includes&&(S(t.includes),n.apply(null,[r].concat(t.includes))),n(r,t),delete r.statics,delete r.includes,r.options&&(r.options=o.options?i(o.options):{},n(r.options,t.options)),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){var e=this.prototype.options;return n(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),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(arguments.length)if("object"==typeof t)for(var i in t)this._off(i,t[i],e);else{t=p(t);for(var o=1===arguments.length,r=0,a=t.length;r<a;r++)o?this._off(t[r]):this._off(t[r],e,n)}else delete this._events;return this},_on:function(t,e,n,i){if("function"==typeof e){if(!1===this._listens(t,e,n)){n===this&&(n=void 0);var o={fn:e,ctx:n};i&&(o.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(o)}}else console.warn("wrong listener type: "+typeof e)},_off:function(t,e,n){var i,o,r;if(this._events&&(i=this._events[t]))if(1!==arguments.length)if("function"==typeof e){var a=this._listens(t,e,n);if(!1!==a){var s=i[a];this._firingCount&&(s.fn=h,this._events[t]=i=i.slice()),i.splice(a,1)}}else console.warn("wrong listener type: "+typeof e);else{if(this._firingCount)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],h=l.fn;l.once&&this.off(t,h,l.ctx),h.call(l.ctx||this,o)}this._firingCount--}}return i&&this._propagateEvent(o),this},listens:function(t,e,n,i){"string"!=typeof t&&console.warn('"string" type argument expected');var o=e;"function"!=typeof e&&(i=!!e,o=void 0,n=void 0);var r=this._events&&this._events[t];if(r&&r.length&&!1!==this._listens(t,o,n))return!0;if(i)for(var a in this._eventParents)if(this._eventParents[a].listens(t,e,n,i))return!0;return!1},_listens:function(t,e,n){if(!this._events)return!1;var i=this._events[t]||[];if(!e)return!!i.length;n===this&&(n=void 0);for(var o=0,r=i.length;o<r;o++)if(i[o].fn===e&&i[o].ctx===n)return o;return!1},once:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e,!0);else for(var o=0,r=(t=p(t)).length;o<r;o++)this._on(t[o],e,n,!0);return this},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 R(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function Z(t,e){return t instanceof R?t:new R(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 H(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){var e,n;if(!t)return this;if(t instanceof D||"number"==typeof t[0]||"x"in t)e=n=I(t);else if(e=(t=N(t)).min,n=t.max,!e||!n)return this;return this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(n.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(n.y,this.max.y)):(this.min=e.clone(),this.max=n.clone()),this},getCenter:function(t){return I((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return I(this.min.x,this.max.y)},getTopRight:function(){return I(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)},pad:function(t){var e=this.min,n=this.max,i=Math.abs(e.x-n.x)*t,o=Math.abs(e.y-n.y)*t;return N(I(e.x-i,e.y-o),I(n.x+i,n.y+o))},equals:function(t){return!!t&&(t=N(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))}},R.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 R))return t?this.extend(H(t)||Z(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 R(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?H(t):Z(t);var e,n,i=this._southWest,o=this._northEast;return t instanceof R?(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=Z(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=Z(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=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){return!!t&&(t=H(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,H(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 Z([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,G={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 R(new j(r.lat-i,r.lng-o),new j(a.lat-i,a.lng-o))}},F=n({},G,{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 X=n({},F,{code:"EPSG:3857",projection:V,transformation:function(){var t=.5/(Math.PI*V.R);return Y(t,.5,-t,.5)}()}),K=n({},X,{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?Rt.svg?"z":"x":""}return l||"M0 0"}var $,tt=document.documentElement.style,et="ActiveXObject"in window,nt=et&&!document.addEventListener,it="msLaunchUri"in navigator&&!("documentMode"in document),ot=Nt("webkit"),rt=Nt("android"),at=Nt("android 2")||Nt("android 3"),st=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),lt=rt&&Nt("Google")&&st<537&&!("AudioNode"in window),ht=!!window.opera,ut=!it&&Nt("chrome"),ct=Nt("gecko")&&!ot&&!ht&&!et,pt=!ut&&Nt("safari"),dt=Nt("phantom"),ft="OTransition"in tt,_t=0===navigator.platform.indexOf("Win"),mt=et&&"transition"in tt,gt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!at,yt="MozPerspective"in tt,vt=!window.L_DISABLE_3D&&(mt||gt||yt)&&!ft&&!dt,bt="undefined"!=typeof orientation||Nt("mobile"),Lt=bt&&ot,wt=bt&>,xt=!window.PointerEvent&&window.MSPointerEvent,kt=!(!window.PointerEvent&&!xt),Mt="ontouchstart"in window||!!window.TouchEvent,Ct=!window.L_NO_TOUCH&&(Mt||kt),Pt=bt&&ht,Et=bt&&ct,Tt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,St=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}(),zt=!!document.createElement("canvas").getContext,Ot=!(!document.createElementNS||!J("svg").createSVGRect),Dt=!!Ot&&(($=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===($.firstChild&&$.firstChild.namespaceURI)),At=!Ot&&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}}(),It=0===navigator.platform.indexOf("Mac"),Bt=0===navigator.platform.indexOf("Linux");function Nt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Rt={ie:et,ielt9:nt,edge:it,webkit:ot,android:rt,android23:at,androidStock:lt,opera:ht,chrome:ut,gecko:ct,safari:pt,phantom:dt,opera12:ft,win:_t,ie3d:mt,webkit3d:gt,gecko3d:yt,any3d:vt,mobile:bt,mobileWebkit:Lt,mobileWebkit3d:wt,msPointer:xt,pointer:kt,touch:Ct,touchNative:Mt,mobileOpera:Pt,mobileGecko:Et,retina:Tt,passiveEvents:St,canvas:zt,svg:Ot,vml:At,inlineSvg:Dt,mac:It,linux:Bt},Zt=Rt.msPointer?"MSPointerDown":"pointerdown",jt=Rt.msPointer?"MSPointerMove":"pointermove",Ht=Rt.msPointer?"MSPointerUp":"pointerup",Ut=Rt.msPointer?"MSPointerCancel":"pointercancel",Gt={touchstart:Zt,touchmove:jt,touchend:Ht,touchcancel:Ut},Ft={touchstart:te,touchmove:$t,touchend:$t,touchcancel:$t},Wt={},Vt=!1;function qt(t,e,n){return"touchstart"===e&&Qt(),Ft[e]?(n=Ft[e].bind(this,n),t.addEventListener(Gt[e],n,!1),n):(console.warn("wrong event specified:",e),h)}function Yt(t,e,n){Gt[e]?t.removeEventListener(Gt[e],n,!1):console.warn("wrong event specified:",e)}function Xt(t){Wt[t.pointerId]=t}function Kt(t){Wt[t.pointerId]&&(Wt[t.pointerId]=t)}function Jt(t){delete Wt[t.pointerId]}function Qt(){Vt||(document.addEventListener(Zt,Xt,!0),document.addEventListener(jt,Kt,!0),document.addEventListener(Ht,Jt,!0),document.addEventListener(Ut,Jt,!0),Vt=!0)}function $t(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in e.touches=[],Wt)e.touches.push(Wt[n]);e.changedTouches=[e],t(e)}}function te(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&Xe(e),$t(t,e)}function ee(t){var e,n,i={};for(n in t)e=t[n],i[n]=e&&e.bind?e.bind(t):e;return t=i,i.type="dblclick",i.detail=2,i.isTrusted=!1,i._simulated=!0,i}var ne=200;function ie(t,e){t.addEventListener("dblclick",e);var n,i=0;function o(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var o=Je(t);if(!o.some((function(t){return t instanceof HTMLLabelElement&&t.attributes.for}))||o.some((function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement}))){var r=Date.now();r-i<=ne?2==++n&&e(ee(t)):n=1,i=r}}}else n=t.detail}return t.addEventListener("click",o),{dblclick:e,simDblclick:o}}function oe(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var re,ae,se,le,he,ue=Pe(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ce=Pe(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),pe="webkitTransition"===ce||"OTransition"===ce?ce+"End":"transitionend";function de(t){return"string"==typeof t?document.getElementById(t):t}function fe(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 _e(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function me(t){var e=t.parentNode;e&&e.removeChild(t)}function ge(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ye(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ve(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function be(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=ke(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function Le(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(!be(t,e)){var r=ke(t);xe(t,(r?r+" ":"")+e)}}function we(t,e){void 0!==t.classList?t.classList.remove(e):xe(t,c((" "+ke(t)+" ").replace(" "+e+" "," ")))}function xe(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function ke(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function Me(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&Ce(t,e)}function Ce(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 Pe(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function Ee(t,e,n){var i=e||new D(0,0);t.style[ue]=(Rt.ie3d?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(n?" scale("+n+")":"")}function Te(t,e){t._leaflet_pos=e,Rt.any3d?Ee(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Se(t){return t._leaflet_pos||new D(0,0)}if("onselectstart"in document)re=function(){Ze(window,"selectstart",Xe)},ae=function(){He(window,"selectstart",Xe)};else{var ze=Pe(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);re=function(){if(ze){var t=document.documentElement.style;se=t[ze],t[ze]="none"}},ae=function(){ze&&(document.documentElement.style[ze]=se,se=void 0)}}function Oe(){Ze(window,"dragstart",Xe)}function De(){He(window,"dragstart",Xe)}function Ae(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Ie(),le=t,he=t.style.outlineStyle,t.style.outlineStyle="none",Ze(window,"keydown",Ie))}function Ie(){le&&(le.style.outlineStyle=he,le=void 0,he=void 0,He(window,"keydown",Ie))}function Be(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Ne(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Re={__proto__:null,TRANSFORM:ue,TRANSITION:ce,TRANSITION_END:pe,get:de,getStyle:fe,create:_e,remove:me,empty:ge,toFront:ye,toBack:ve,hasClass:be,addClass:Le,removeClass:we,setClass:xe,getClass:ke,setOpacity:Me,testProp:Pe,setTransform:Ee,setPosition:Te,getPosition:Se,get disableTextSelection(){return re},get enableTextSelection(){return ae},disableImageDrag:Oe,enableImageDrag:De,preventOutline:Ae,restoreOutline:Ie,getSizedParentNode:Be,getScale:Ne};function Ze(t,e,n,i){if(e&&"object"==typeof e)for(var o in e)Fe(t,o,e[o],n);else for(var r=0,a=(e=p(e)).length;r<a;r++)Fe(t,e[r],n,i);return this}var je="_leaflet_events";function He(t,e,n,i){if(1===arguments.length)Ue(t),delete t[je];else if(e&&"object"==typeof e)for(var o in e)We(t,o,e[o],n);else if(e=p(e),2===arguments.length)Ue(t,(function(t){return-1!==y(e,t)}));else for(var r=0,a=e.length;r<a;r++)We(t,e[r],n,i);return this}function Ue(t,e){for(var n in t[je]){var i=n.split(/\d/)[0];e&&!e(i)||We(t,i,null,null,n)}}var Ge={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Fe(t,e,n,i){var o=e+a(n)+(i?"_"+a(i):"");if(t[je]&&t[je][o])return this;var r=function(e){return n.call(i||t,e||window.event)},s=r;!Rt.touchNative&&Rt.pointer&&0===e.indexOf("touch")?r=qt(t,e,r):Rt.touch&&"dblclick"===e?r=ie(t,r):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(Ge[e]||e,r,!!Rt.passiveEvents&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(r=function(e){e=e||window.event,en(t,e)&&s(e)},t.addEventListener(Ge[e],r,!1)):t.addEventListener(e,s,!1):t.attachEvent("on"+e,r),t[je]=t[je]||{},t[je][o]=r}function We(t,e,n,i,o){o=o||e+a(n)+(i?"_"+a(i):"");var r=t[je]&&t[je][o];if(!r)return this;!Rt.touchNative&&Rt.pointer&&0===e.indexOf("touch")?Yt(t,e,r):Rt.touch&&"dblclick"===e?oe(t,r):"removeEventListener"in t?t.removeEventListener(Ge[e]||e,r,!1):t.detachEvent("on"+e,r),t[je][o]=null}function Ve(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function qe(t){return Fe(t,"wheel",Ve),this}function Ye(t){return Ze(t,"mousedown touchstart dblclick contextmenu",Ve),t._leaflet_disable_click=!0,this}function Xe(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Ke(t){return Xe(t),Ve(t),this}function Je(t){if(t.composedPath)return t.composedPath();for(var e=[],n=t.target;n;)e.push(n),n=n.parentNode;return e}function Qe(t,e){if(!e)return new D(t.clientX,t.clientY);var n=Ne(e),i=n.boundingClientRect;return new D((t.clientX-i.left)/n.x-e.clientLeft,(t.clientY-i.top)/n.y-e.clientTop)}var $e=Rt.linux&&Rt.chrome?window.devicePixelRatio:Rt.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function tn(t){return Rt.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/$e:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function en(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 nn={__proto__:null,on:Ze,off:He,stopPropagation:Ve,disableScrollPropagation:qe,disableClickPropagation:Ye,preventDefault:Xe,stop:Ke,getPropagationPath:Je,getMousePosition:Qe,getWheelDelta:tn,isExternalTarget:en,addListener:Ze,removeListener:He},on=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=Se(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(),Te(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)}}),rn=O.extend({options:{crs:X,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(H(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ce&&Rt.any3d&&!Rt.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Ze(this._proxy,pe,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(H(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,i.pan&&i.pan.noMoveStart),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||(Rt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(Rt.any3d?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():Z(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=Z(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 on,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){Le(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||!Rt.any3d)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=H(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=Z(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},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,Z(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.project(this.getCenter()),r=this.project(t),a=this.getPixelBounds(),s=N([a.min.add(n),a.max.subtract(i)]),l=s.getSize();if(!s.contains(r)){this._enforcingBounds=!0;var h=r.subtract(s.getCenter()),u=s.extend(r).getSize().subtract(l);o.x+=h.x<0?-u.x:u.x,o.y+=h.y<0?-u.y:u.y,this.panTo(this.unproject(o),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){if(this._container._leaflet_id){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){if(this._container._leaflet_id){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.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),me(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)me(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=_e("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.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new R(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=Z(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=Rt.any3d?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(H(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(H(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(H(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(Z(t))},distance:function(t,e){return this.options.crs.distance(H(t),H(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(H(t)))},mouseEventToContainerPoint:function(t){return Qe(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=de(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Ze(e,"scroll",this._onScroll,this),this._containerId=a(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Rt.any3d,Le(t,"leaflet-container"+(Rt.touch?" leaflet-touch":"")+(Rt.retina?" leaflet-retina":"")+(Rt.ielt9?" leaflet-oldie":"")+(Rt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=fe(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Te(this._mapPane,new D(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Le(t.markerPane,"leaflet-zoom-hide"),Le(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,n){Te(this._mapPane,new D(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var o=this._zoom!==e;this._moveStart(o,n)._move(t,e)._moveEnd(o),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,n,i){void 0===e&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),i?n&&n.pinch&&this.fire("zoom",n):((o||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)),this},_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){Te(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?He:Ze;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),Rt.any3d&&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)&&this._draggableMoved(n)){s=!0;break}if(n&&n.listens(e,!0)){if(o&&!en(r,t))break;if(i.push(n),o)break}if(r===this._container)break;r=r.parentNode}return i.length||s||o||!this.listens(e,!0)||(i=[this]),i},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))){var n=t.type;"mousedown"===n&&Ae(e),this._fireDOMEvent(t,n)}},_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)}var r=this._findEventTargets(t,e);if(i){for(var a=[],s=0;s<i.length;s++)i[s].listens(e,!0)&&a.push(i[s]);r=a.concat(r)}if(r.length){"contextmenu"===e&&Xe(t);var l=r[0],h={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var u=l.getLatLng&&(!l._radius||l._radius<=10);h.containerPoint=u?this.latLngToContainerPoint(l.getLatLng()):this.mouseEventToContainerPoint(t),h.layerPoint=this.containerPointToLayerPoint(h.containerPoint),h.latlng=u?l.getLatLng():this.layerPointToLatLng(h.layerPoint)}for(s=0;s<r.length;s++)if(r[s].fire(e,h,!0),h.originalEvent._stopped||!1===r[s].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 Se(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 Math.abs(a.x)<=1&&Math.abs(a.y)<=1?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=Rt.any3d?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(){we(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=_e("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=ue,n=this._proxy.style[e];Ee(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(){me(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Ee(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,n.noMoveStart||!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,Le(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&we(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function an(t,e){return new rn(t,e)}var sn=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 Le(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?(me(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()}}),ln=function(t){return new sn(t)};rn.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=_e("div",e+"control-container",this._container);function i(i,o){var r=e+i+" "+e+o;t[i+o]=_e("div",r,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)me(this._controlCorners[t]);me(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var hn=sn.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,this._preventClick=!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 sn.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(){Le(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?(Le(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):we(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return we(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=_e("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Ye(e),qe(e);var i=this._section=_e("section",t+"-list");n&&(this._map.on("click",this.collapse,this),Ze(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var o=this._layersLink=_e("a",t+"-toggle",e);o.href="#",o.title="Layers",o.setAttribute("role","button"),Ze(o,{keydown:function(t){13===t.keyCode&&this._expandSafely()},click:function(t){Xe(t),this._expandSafely()}},this),n||this.expand(),this._baseLayersList=_e("div",t+"-base",i),this._separator=_e("div",t+"-separator",i),this._overlaysList=_e("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;ge(this._baseLayersList),ge(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),Ze(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var r=document.createElement("span");return n.appendChild(r),r.appendChild(e),r.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){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},_expandSafely:function(){var t=this._section;this._preventClick=!0,Ze(t,"click",Xe),this.expand();var e=this;setTimeout((function(){He(t,"click",Xe),e._preventClick=!1}))}}),un=function(t,e,n){return new hn(t,e,n)},cn=sn.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=_e("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=_e("a",n,i);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),Ye(r),Ze(r,"click",Ke),Ze(r,"click",o,this),Ze(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";we(this._zoomInButton,e),we(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(Le(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(Le(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});rn.mergeOptions({zoomControl:!0}),rn.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new cn,this.addControl(this.zoomControl))}));var pn=function(t){return new cn(t)},dn=sn.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=_e("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=_e("div",e,n)),t.imperial&&(this._iScale=_e("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)}}),fn=function(t){return new dn(t)},_n='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',mn=sn.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Rt.inlineSvg?_n+" ":"")+"Leaflet</a>"},initialize:function(t){d(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=_e("div","leaflet-control-attribution"),Ye(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",(function(){this.removeAttribution(t.layer.getAttribution())}),this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(' <span aria-hidden="true">|</span> ')}}});rn.mergeOptions({attributionControl:!0}),rn.addInitHook((function(){this.options.attributionControl&&(new mn).addTo(this)}));var gn=function(t){return new mn(t)};sn.Layers=hn,sn.Zoom=cn,sn.Scale=dn,sn.Attribution=mn,ln.layers=un,ln.zoom=pn,ln.scale=fn,ln.attribution=gn;var yn=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}});yn.addTo=function(t,e){return t.addHandler(e,this),this};var vn={Events:z},bn=Rt.touch?"touchstart mousedown":"mousedown",Ln=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||(Ze(this._dragStartTarget,bn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Ln._dragging===this&&this.finishDrag(!0),He(this._dragStartTarget,bn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!be(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)Ln._dragging===this&&this.finishDrag();else if(!(Ln._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(Ln._dragging=this,this._preventOutline&&Ae(this._element),Oe(),re(),this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Be(this._element);this._startPoint=new D(e.clientX,e.clientY),this._startPos=Se(this._element),this._parentScale=Ne(n);var i="mousedown"===t.type;Ze(document,i?"mousemove":"touchmove",this._onMove,this),Ze(document,i?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,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,Xe(t),this._moved||(this.fire("dragstart"),this._moved=!0,Le(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),Le(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,this._lastEvent=t,this._updatePosition()))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Te(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){we(document.body,"leaflet-dragging"),this._lastTarget&&(we(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),He(document,"mousemove touchmove",this._onMove,this),He(document,"mouseup touchend touchcancel",this._onUp,this),De(),ae();var e=this._moved&&this._moving;this._moving=!1,Ln._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function wn(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=In(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=An(l,s,u,e,n))._code=In(c,e),i.push(c)):(l._code&u&&((c=An(l,s,u,e,n))._code=In(c,e),i.push(c)),i.push(s));t=i}return t}function xn(t,e){var n,i,o,r,a,s,l,h,u;if(!t||0===t.length)throw new Error("latlngs not passed");Rn(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var c=H([0,0]),p=Z(t);p.getNorthWest().distanceTo(p.getSouthWest())*p.getNorthEast().distanceTo(p.getNorthWest())<1700&&(c=kn(t));var d=t.length,f=[];for(n=0;n<d;n++){var _=H(t[n]);f.push(e.project(H([_.lat-c.lat,_.lng-c.lng])))}for(s=l=h=0,n=0,i=d-1;n<d;i=n++)o=f[n],r=f[i],a=o.y*r.x-r.y*o.x,l+=(o.x+r.x)*a,h+=(o.y+r.y)*a,s+=3*a;u=0===s?f[0]:[l/s,h/s];var m=e.unproject(I(u));return H([m.lat+c.lat,m.lng+c.lng])}function kn(t){for(var e=0,n=0,i=0,o=0;o<t.length;o++){var r=H(t[o]);e+=r.lat,n+=r.lng,i++}return H([e/i,n/i])}var Mn,Cn={__proto__:null,clipPolygon:wn,polygonCenter:xn,centroid:kn};function Pn(t,e){if(!e||!t.length)return t.slice();var n=e*e;return t=Sn(t=On(t,n),n)}function En(t,e,n){return Math.sqrt(Nn(t,e,n,!0))}function Tn(t,e,n){return Nn(t,e,n)}function Sn(t,e){var n=t.length,i=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,zn(t,i,e,0,n-1);var o,r=[];for(o=0;o<n;o++)i[o]&&r.push(t[o]);return r}function zn(t,e,n,i,o){var r,a,s,l=0;for(a=i+1;a<=o-1;a++)(s=Nn(t[a],t[i],t[o],!0))>l&&(r=a,l=s);l>n&&(e[r]=1,zn(t,e,n,i,r),zn(t,e,n,r,o))}function On(t,e){for(var n=[t[0]],i=1,o=0,r=t.length;i<r;i++)Bn(t[i],t[o])>e&&(n.push(t[i]),o=i);return o<r-1&&n.push(t[r-1]),n}function Dn(t,e,n,i,o){var r,a,s,l=i?Mn:In(t,n),h=In(e,n);for(Mn=h;;){if(!(l|h))return[t,e];if(l&h)return!1;s=In(a=An(t,e,r=l||h,n,o),n),r===l?(t=a,l=s):(e=a,h=s)}}function An(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 In(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 Bn(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function Nn(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 Rn(t){return!g(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Zn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Rn(t)}function jn(t,e){var n,i,o,r,a,s,l,h;if(!t||0===t.length)throw new Error("latlngs not passed");Rn(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var u=H([0,0]),c=Z(t);c.getNorthWest().distanceTo(c.getSouthWest())*c.getNorthEast().distanceTo(c.getNorthWest())<1700&&(u=kn(t));var p=t.length,d=[];for(n=0;n<p;n++){var f=H(t[n]);d.push(e.project(H([f.lat-u.lat,f.lng-u.lng])))}for(n=0,i=0;n<p-1;n++)i+=d[n].distanceTo(d[n+1])/2;if(0===i)h=d[0];else for(n=0,r=0;n<p-1;n++)if(a=d[n],s=d[n+1],(r+=o=a.distanceTo(s))>i){l=(r-i)/o,h=[s.x-l*(s.x-a.x),s.y-l*(s.y-a.y)];break}var _=e.unproject(I(h));return H([_.lat+u.lat,_.lng+u.lng])}var Hn={__proto__:null,simplify:Pn,pointToSegmentDistance:En,closestPointOnSegment:Tn,clipSegment:Dn,_getEdgeIntersection:An,_getBitCode:In,_sqClosestPointOnSegment:Nn,isFlat:Rn,_flat:Zn,polylineCenter:jn},Un={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])},Gn={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)}},Fn={__proto__:null,LonLat:Un,Mercator:Gn,SphericalMercator:V},Wn=n({},F,{code:"EPSG:3395",projection:Gn,transformation:function(){var t=.5/(Math.PI*Gn.R);return Y(t,.5,-t,.5)}()}),Vn=n({},F,{code:"EPSG:4326",projection:Un,transformation:Y(1/180,1,-1/180,.5)}),qn=n({},G,{projection:Un,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});G.Earth=F,G.EPSG3395=Wn,G.EPSG3857=X,G.EPSG900913=K,G.EPSG4326=Vn,G.Simple=qn;var Yn=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.fire("add"),e.fire("layeradd",{layer:this})}}});rn.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),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 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 Xn=Yn.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("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)}}),Kn=function(t,e){return new Xn(t,e)},Jn=Xn.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Xn.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),Xn.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 R;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 Jn(t,e)},$n=T.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},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),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),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 Rt.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function ti(t){return new $n(t)}var ei=$n.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"string"!=typeof ei.imagePath&&(ei.imagePath=this._detectIconPath()),(this.options.imagePath||ei.imagePath)+$n.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(t,e,n){var i=e.exec(t);return i&&i[n]};return(t=e(t,/^url\((['"])?(.+)\1\)$/,2))&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=_e("div","leaflet-default-icon-path",document.body),e=fe(t,"background-image")||fe(t,"backgroundImage");if(document.body.removeChild(t),e=this._stripUrl(e))return e;var n=document.querySelector('link[href$="leaflet.css"]');return n?n.href.substring(0,n.href.length-11-1):""}}),ni=yn.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new Ln(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),Le(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&&we(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=Se(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),Te(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=Se(e._icon),o=e._map.layerPointToLatLng(i);n&&Te(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)}}),ii=Yn.extend({options:{icon:new ei,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){d(this,e),this._latlng=H(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=H(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||"")),Le(n,e),t.keyboard&&(n.tabIndex="0",n.setAttribute("role","button")),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Ze(n,"focus",this._panOnFocus,this);var o=t.icon.createShadow(this._shadow),r=!1;o!==this._shadow&&(this._removeShadow(),r=!0),o&&(Le(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}),this.options.autoPanOnFocus&&He(this._icon,"focus",this._panOnFocus,this),me(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&me(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&Te(this._icon,t),this._shadow&&Te(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&&(Le(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),ni)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new ni(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&&Me(this._icon,t),this._shadow&&Me(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var e=this.options.icon.options,n=e.iconSize?I(e.iconSize):I(0,0),i=e.iconAnchor?I(e.iconAnchor):I(0,0);t.panInside(this._latlng,{paddingTopLeft:i,paddingBottomRight:n.subtract(i)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function oi(t,e){return new ii(t,e)}var ri=Yn.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||0)}}),ai=ri.extend({options:{fill:!0,radius:10},initialize:function(t,e){d(this,e),this._latlng=H(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=H(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 ri.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 si(t,e){return new ai(t,e)}var li=ai.extend({initialize:function(t,e,i){if("number"==typeof e&&(e=n({},i,{radius:e})),d(this,e),this._latlng=H(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 R(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:ri.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 hi(t,e,n){return new li(t,e,n)}var ui=ri.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=Nn,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()");return jn(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=H(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new R,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Rn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=Rn(t),i=0,o=t.length;i<o;i++)n?(e[i]=H(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._rawPxBounds&&(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=Dn(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]=Pn(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)&&En(t,s[o],s[i])<=l)return!0;return!1}});function ci(t,e){return new ui(t,e)}ui._flat=Zn;var pi=ui.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()");return xn(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=ui.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){ui.prototype._setLatLngs.call(this,t),Rn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Rn(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=wn(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||ui.prototype._containsPoint.call(this,t,!0)}});function di(t,e){return new pi(t,e)}var fi=Jn.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=_i(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 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 _i(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||gi;if(!s&&!a)return null;switch(a.type){case"Point":return mi(h,t,n=u(s),e);case"MultiPoint":for(o=0,r=s.length;o<r;o++)n=u(s[o]),l.push(mi(h,t,n,e));return new Jn(l);case"LineString":case"MultiLineString":return i=yi(s,"LineString"===a.type?0:1,u),new ui(i,e);case"Polygon":case"MultiPolygon":return i=yi(s,"Polygon"===a.type?1:2,u),new pi(i,e);case"GeometryCollection":for(o=0,r=a.geometries.length;o<r;o++){var c=_i({geometry:a.geometries[o],type:"Feature",properties:t.properties},e);c&&l.push(c)}return new Jn(l);case"FeatureCollection":for(o=0,r=a.features.length;o<r;o++){var p=_i(a.features[o],e);p&&l.push(p)}return new Jn(l);default:throw new Error("Invalid GeoJSON object.")}}function mi(t,e,n,i){return t?t(e,n):new ii(n,i&&i.markersInheritOptions&&i)}function gi(t){return new j(t[1],t[0],t[2])}function yi(t,e,n){for(var i,o=[],r=0,a=t.length;r<a;r++)i=e?yi(t[r],e-1,n):(n||gi)(t[r]),o.push(i);return o}function vi(t,e){return void 0!==(t=H(t)).alt?[u(t.lng,e),u(t.lat,e),u(t.alt,e)]:[u(t.lng,e),u(t.lat,e)]}function bi(t,e,n,i){for(var o=[],r=0,a=t.length;r<a;r++)o.push(e?bi(t[r],Rn(t[r])?0:e-1,n,i):vi(t[r],i));return!e&&n&&o.length>0&&o.push(o[0].slice()),o}function Li(t,e){return t.feature?n({},t.feature,{geometry:e}):wi(e)}function wi(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var xi={toGeoJSON:function(t){return Li(this,{type:"Point",coordinates:vi(this.getLatLng(),t)})}};function ki(t,e){return new fi(t,e)}ii.include(xi),li.include(xi),ai.include(xi),ui.include({toGeoJSON:function(t){var e=!Rn(this._latlngs);return Li(this,{type:(e?"Multi":"")+"LineString",coordinates:bi(this._latlngs,e?1:0,!1,t)})}}),pi.include({toGeoJSON:function(t){var e=!Rn(this._latlngs),n=e&&!Rn(this._latlngs[0]),i=bi(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),Li(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),Xn.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(n){e.push(n.toGeoJSON(t).geometry.coordinates)})),Li(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=wi(o);"FeatureCollection"===r.type?i.push.apply(i,r.features):i.push(r)}}})),n?Li(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var Mi=ki,Ci=Yn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=Z(e),d(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Le(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){me(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&&ye(this._image),this},bringToBack:function(){return this._map&&ve(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:_e("img");Le(e,"leaflet-image-layer"),this._zoomAnimated&&Le(e,"leaflet-zoom-animated"),this.options.className&&Le(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;Ee(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();Te(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){Me(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),Pi=function(t,e,n){return new Ci(t,e,n)},Ei=Ci.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:_e("video");if(Le(e,"leaflet-image-layer"),this._zoomAnimated&&Le(e,"leaflet-zoom-animated"),this.options.className&&Le(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,e.playsInline=!!this.options.playsInline;for(var a=0;a<this._url.length;a++){var s=_e("source");s.src=this._url[a],e.appendChild(s)}}}});function Ti(t,e,n){return new Ei(t,e,n)}var Si=Ci.extend({_initImage:function(){var t=this._image=this._url;Le(t,"leaflet-image-layer"),this._zoomAnimated&&Le(t,"leaflet-zoom-animated"),this.options.className&&Le(t,this.options.className),t.onselectstart=h,t.onmousemove=h}});function zi(t,e,n){return new Si(t,e,n)}var Oi=Yn.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof j||g(t))?(this._latlng=H(t),d(this,e)):(d(this,t),this._source=e),this.options.content&&(this._content=this.options.content)},openOn:function(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&Me(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&Me(this._container,1),this.bringToFront(),this.options.interactive&&(Le(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(Me(this._container,0),this._removeTimeout=setTimeout(o(me,void 0,this._container),200)):me(this._container),this.options.interactive&&(we(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=H(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&&ye(this._container),this},bringToBack:function(){return this._map&&ve(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof Jn){e=null;var n=this._source._layers;for(var i in n)if(n[i]._map){e=n[i];break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else{if(!e.getBounds)throw new Error("Unable to get source layer LatLng.");t=e.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_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?Te(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]}});rn.include({_initOverlay:function(t,e,n,i){var o=e;return o instanceof t||(o=new t(i).setContent(e)),n&&o.setLatLng(n),o}}),Yn.include({_initOverlay:function(t,e,n,i){var o=n;return o instanceof t?(d(o,i),o._source=this):(o=e&&!i?e:new t(i,this)).setContent(n),o}});var Di=Oi.extend({options:{pane:"popupPane",offset:[0,7],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=arguments.length?t:this._source._map).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,Oi.prototype.openOn.call(this,t)},onAdd:function(t){Oi.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof ri||this._source.on("preclick",Ve))},onRemove:function(t){Oi.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof ri||this._source.off("preclick",Ve))},getEvents:function(){var t=Oi.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},_initLayout:function(){var t="leaflet-popup",e=this._container=_e("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=_e("div",t+"-content-wrapper",e);if(this._contentNode=_e("div",t+"-content",n),Ye(e),qe(this._contentNode),Ze(e,"contextmenu",Ve),this._tipContainer=_e("div",t+"-tip-container",e),this._tip=_e("div",t+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=_e("a",t+"-close-button",e);i.setAttribute("role","button"),i.setAttribute("aria-label","Close popup"),i.href="#close",i.innerHTML='<span aria-hidden="true">×</span>',Ze(i,"click",(function(t){Xe(t),this.close()}),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",Le(t,r)):we(t,r),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();Te(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var t=this._map,e=parseInt(fe(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,o=new D(this._containerLeft,-n-this._containerBottom);o._add(Se(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)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([u,c]))}},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Ai=function(t,e){return new Di(t,e)};rn.mergeOptions({closePopupOnClick:!0}),rn.include({openPopup:function(t,e,n){return this._initOverlay(Di,t,e,n).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),Yn.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Di,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof Jn||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){Ke(t);var e=t.layer||t.target;this._popup._source!==e||e instanceof ri?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Ii=Oi.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Oi.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Oi.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Oi.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=_e("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+a(this))},_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),we(o,"leaflet-tooltip-right"),we(o,"leaflet-tooltip-left"),we(o,"leaflet-tooltip-top"),we(o,"leaflet-tooltip-bottom"),Le(o,"leaflet-tooltip-"+s),Te(o,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&Me(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])}}),Bi=function(t,e){return new Ii(t,e)};rn.include({openTooltip:function(t,e,n){return this._initOverlay(Ii,t,e,n).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),Yn.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Ii,this._tooltip,t,e),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,n.click=this._openTooltip,this._map?this._addFocusListeners():n.add=this._addFocusListeners),this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof Jn||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&(Ze(e,"focus",(function(){this._tooltip._source=t,this.openTooltip()}),this),Ze(e,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&e.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){if(this._tooltip&&this._map)if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var e=this;this._map.once("moveend",(function(){e._openOnceFlag=!1,e._openTooltip(t)}))}else this._tooltip._source=t.layer||t.target,this.openTooltip(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 Ni=$n.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?(ge(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 Ri(t){return new Ni(t)}$n.Default=ei;var Zi=Yn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Rt.mobile,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()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),me(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(ye(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ve(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(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return 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&&!Rt.ielt9){Me(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);Me(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=_e("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)):(me(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=_e("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)me(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();Rt.any3d?Ee(t.el,o,i):Te(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 Z(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 R(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&&(me(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){Le(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,Rt.ielt9&&this.options.opacity<1&&Me(t,this.options.opacity)},_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)),Te(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?(Me(n.el,0),P(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(Le(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Rt.ielt9||!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 ji(t){return new Zi(t)}var Hi=Zi.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=d(this,e)).detectRetina&&Rt.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return Ze(n,"load",o(this._tileOnLoad,this,e,n)),Ze(n,"error",o(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(n.referrerPolicy=this.options.referrerPolicy),n.alt="",n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:Rt.retina?"@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){Rt.ielt9?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)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=h,e.onerror=h,!e.complete)){e.src=v;var n=this._tiles[t].coords;me(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:n})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",v),Zi.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==v))return Zi.prototype._tileReady.call(this,t,e,n)}});function Ui(t,e){return new Hi(t,e)}var Gi=Hi.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&&Rt.retina?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,Hi.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===Vn?[o.y,o.x,r.y,r.x]:[o.x,o.y,r.x,r.y]).join(","),s=Hi.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 Fi(t,e){return new Gi(t,e)}Hi.WMS=Gi,Ui.wms=Fi;var Wi=Yn.extend({options:{padding:.1},initialize:function(t){d(this,t),a(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Le(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=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),r=i.multiplyBy(-n).add(o).subtract(this._map._getNewPixelOrigin(t,e));Rt.any3d?Ee(this._container,r,n):Te(this._container,r)},_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()}}),Vi=Wi.extend({options:{tolerance:0},getEvents:function(){var t=Wi.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Wi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Ze(t,"mousemove",this._onMouseMove,this),Ze(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ze(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){P(this._redrawRequest),delete this._ctx,me(this._container),He(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){Wi.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=Rt.retina?2:1;Te(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",Rt.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Wi.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);this._fireEvent(!!n&&[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&&(we(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&&(Le(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._fireEvent(!!this._hoveredLayer&&[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 qi(t){return Rt.canvas?new Vi(t):null}var Yi=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">')}}(),Xi={_initContainer:function(){this._container=_e("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Wi.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Yi("shape");Le(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Yi("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;me(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=Yi("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=Yi("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){ye(t._container)},_bringToBack:function(t){ve(t._container)}},Ki=Rt.vml?Yi:J,Ji=Wi.extend({_initContainer:function(){this._container=Ki("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ki("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){me(this._container),He(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){Wi.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)),Te(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=Ki("path");t.options.className&&Le(e,t.options.className),t.options.interactive&&Le(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){me(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){ye(t._path)},_bringToBack:function(t){ve(t._path)}});function Qi(t){return Rt.svg||Rt.vml?new Ji(t):null}Rt.vml&&Ji.include(Xi),rn.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&&qi(t)||Qi(t)}});var $i=pi.extend({initialize:function(t,e){pi.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=Z(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function to(t,e){return new $i(t,e)}Ji.create=Ki,Ji.pointsToPath=Q,fi.geometryToLayer=_i,fi.coordsToLatLng=gi,fi.coordsToLatLngs=yi,fi.latLngToCoords=vi,fi.latLngsToCoords=bi,fi.getFeature=Li,fi.asFeature=wi,rn.mergeOptions({boxZoom:!0});var eo=yn.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(){Ze(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){He(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){me(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(),re(),Oe(),this._startPoint=this._map.mouseEventToContainerPoint(t),Ze(document,{contextmenu:Ke,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=_e("div","leaflet-zoom-box",this._container),Le(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();Te(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(me(this._box),we(this._container,"leaflet-crosshair")),ae(),De(),He(document,{contextmenu:Ke,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 R(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});rn.addInitHook("addHandler","boxZoom",eo),rn.mergeOptions({doubleClickZoom:!0});var no=yn.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)}});rn.addInitHook("addHandler","doubleClickZoom",no),rn.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var io=yn.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new Ln(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))}Le(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){we(this._map._container,"leaflet-grab"),we(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,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||t.noInertia||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")}}});rn.addInitHook("addHandler","dragging",io),rn.mergeOptions({keyboard:!0,keyboardPanDelta:80});var oo=yn.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"),Ze(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(),He(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(){Ze(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){He(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){if(!i._panAnim||!i._panAnim._inProgress)if(e=this._panKeys[n],t.shiftKey&&(e=I(e).multiplyBy(3)),i.options.maxBounds&&(e=i._limitOffset(I(e),i.options.maxBounds)),i.options.worldCopyJump){var o=i.wrapLatLng(i.unproject(i.project(i.getCenter()).add(e)));i.panTo(o)}else i.panBy(e)}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()}Ke(t)}}});rn.addInitHook("addHandler","keyboard",oo),rn.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var ro=yn.extend({addHooks:function(){Ze(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){He(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=tn(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),Ke(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))}});rn.addInitHook("addHandler","scrollWheelZoom",ro);var ao=600;rn.mergeOptions({tapHold:Rt.touchNative&&Rt.safari&&Rt.mobile,tapTolerance:15});var so=yn.extend({addHooks:function(){Ze(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){He(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var e=t.touches[0];this._startPos=this._newPos=new D(e.clientX,e.clientY),this._holdTimeout=setTimeout(o((function(){this._cancel(),this._isTapValid()&&(Ze(document,"touchend",Xe),Ze(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))}),this),ao),Ze(document,"touchend touchcancel contextmenu",this._cancel,this),Ze(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){He(document,"touchend",Xe),He(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),He(document,"touchend touchcancel contextmenu",this._cancel,this),He(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new D(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var n=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});n._simulated=!0,e.target.dispatchEvent(n)}});rn.addInitHook("addHandler","tapHold",so),rn.mergeOptions({touchZoom:Rt.touch,bounceAtZoomLimits:!0});var lo=yn.extend({addHooks:function(){Le(this._map._container,"leaflet-touch-zoom"),Ze(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){we(this._map._container,"leaflet-touch-zoom"),He(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(),Ze(document,"touchmove",this._onTouchMove,this),Ze(document,"touchend touchcancel",this._onTouchEnd,this),Xe(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},void 0);this._animRequest=C(s,this,!0),Xe(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,P(this._animRequest),He(document,"touchmove",this._onTouchMove,this),He(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});rn.addInitHook("addHandler","touchZoom",lo),rn.BoxZoom=eo,rn.DoubleClickZoom=no,rn.Drag=io,rn.Keyboard=oo,rn.ScrollWheelZoom=ro,rn.TapHold=so,rn.TouchZoom=lo,t.Bounds=B,t.Browser=Rt,t.CRS=G,t.Canvas=Vi,t.Circle=li,t.CircleMarker=ai,t.Class=T,t.Control=sn,t.DivIcon=Ni,t.DivOverlay=Oi,t.DomEvent=nn,t.DomUtil=Re,t.Draggable=Ln,t.Evented=O,t.FeatureGroup=Jn,t.GeoJSON=fi,t.GridLayer=Zi,t.Handler=yn,t.Icon=$n,t.ImageOverlay=Ci,t.LatLng=j,t.LatLngBounds=R,t.Layer=Yn,t.LayerGroup=Xn,t.LineUtil=Hn,t.Map=rn,t.Marker=ii,t.Mixin=vn,t.Path=ri,t.Point=D,t.PolyUtil=Cn,t.Polygon=pi,t.Polyline=ui,t.Popup=Di,t.PosAnimation=on,t.Projection=Fn,t.Rectangle=$i,t.Renderer=Wi,t.SVG=Ji,t.SVGOverlay=Si,t.TileLayer=Hi,t.Tooltip=Ii,t.Transformation=q,t.Util=E,t.VideoOverlay=Ei,t.bind=o,t.bounds=N,t.canvas=qi,t.circle=hi,t.circleMarker=si,t.control=ln,t.divIcon=Ri,t.extend=n,t.featureGroup=Qn,t.geoJSON=ki,t.geoJson=Mi,t.gridLayer=ji,t.icon=ti,t.imageOverlay=Pi,t.latLng=H,t.latLngBounds=Z,t.layerGroup=Kn,t.map=an,t.marker=oi,t.point=I,t.polygon=di,t.polyline=ci,t.popup=Ai,t.rectangle=to,t.setOptions=d,t.stamp=a,t.svg=Qi,t.svgOverlay=zi,t.tileLayer=Ui,t.tooltip=Bi,t.transformation=Y,t.version=e,t.videoOverlay=Ti;var ho=window.L;t.noConflict=function(){return window.L=ho,this},window.L=t}(e)},929:(t,e,n)=>{n.d(e,{P:()=>u});var i=Symbol("newer"),o=Symbol("older"),r=function(t,e){this.key=t,this.value=e,this[i]=void 0,this[o]=void 0},a=function(){function t(t,e){"number"!=typeof t&&(e=t,t=0),this.size=0,this.limit=t,this.oldest=this.newest=void 0,this._keymap=new Map,e&&(this.assign(e),t<1&&(this.limit=this.size))}return t.prototype._markEntryAsUsed=function(t){t!==this.newest&&(t[i]&&(t===this.oldest&&(this.oldest=t[i]),t[i][o]=t[o]),t[o]&&(t[o][i]=t[i]),t[i]=void 0,t[o]=this.newest,this.newest&&(this.newest[i]=t),this.newest=t)},t.prototype.assign=function(t){var e,n=this.limit||Number.MAX_VALUE;this._keymap.clear();for(var a=t[Symbol.iterator](),s=a.next();!s.done;s=a.next()){var l=new r(s.value[0],s.value[1]);if(this._keymap.set(l.key,l),e?(e[i]=l,l[o]=e):this.oldest=l,e=l,0==n--)throw new Error("overflow")}this.newest=e,this.size=this._keymap.size},t.prototype.get=function(t){var e=this._keymap.get(t);if(e)return this._markEntryAsUsed(e),e.value},t.prototype.set=function(t,e){var n=this._keymap.get(t);return n?(n.value=e,this._markEntryAsUsed(n),this):(this._keymap.set(t,n=new r(t,e)),this.newest?(this.newest[i]=n,n[o]=this.newest):this.oldest=n,this.newest=n,++this.size,this.size>this.limit&&this.shift(),this)},t.prototype.shift=function(){var t=this.oldest;if(t)return this.oldest[i]?(this.oldest=this.oldest[i],this.oldest[o]=void 0):(this.oldest=void 0,this.newest=void 0),t[i]=t[o]=void 0,this._keymap.delete(t.key),--this.size,[t.key,t.value]},t.prototype.find=function(t){var e=this._keymap.get(t);return e?e.value:void 0},t.prototype.has=function(t){return this._keymap.has(t)},t.prototype.delete=function(t){var e=this._keymap.get(t);if(e)return this._keymap.delete(e.key),e[i]&&e[o]?(e[o][i]=e[i],e[i][o]=e[o]):e[i]?(e[i][o]=void 0,this.oldest=e[i]):e[o]?(e[o][i]=void 0,this.newest=e[o]):this.oldest=this.newest=void 0,this.size--,e.value},t.prototype.clear=function(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()},t.prototype.keys=function(){return new l(this.oldest)},t.prototype.values=function(){return new h(this.oldest)},t.prototype.entries=function(){return this},t.prototype[Symbol.iterator]=function(){return new s(this.oldest)},t.prototype.forEach=function(t,e){"object"!=typeof e&&(e=this);for(var n=this.oldest;n;)t.call(e,n.value,n.key,this),n=n[i]},t.prototype.toJSON=function(){for(var t=new Array(this.size),e=0,n=this.oldest;n;)t[e++]={key:n.key,value:n.value},n=n[i];return t},t.prototype.toString=function(){for(var t="",e=this.oldest;e;)t+=String(e.key)+":"+e.value,(e=e[i])&&(t+=" < ");return t},t}();function s(t){this.entry=t}function l(t){this.entry=t}function h(t){this.entry=t}s.prototype[Symbol.iterator]=function(){return this},s.prototype.next=function(){var t=this.entry;return t?(this.entry=t[i],{done:!1,value:[t.key,t.value]}):{done:!0,value:void 0}},l.prototype[Symbol.iterator]=function(){return this},l.prototype.next=function(){var t=this.entry;return t?(this.entry=t[i],{done:!1,value:t.key}):{done:!0,value:void 0}},h.prototype[Symbol.iterator]=function(){return this},h.prototype.next=function(){var t=this.entry;return t?(this.entry=t[i],{done:!1,value:t.value}):{done:!0,value:void 0}},L.GridLayer.GoogleMutant=L.GridLayer.extend({options:{maxZoom:21,type:"roadmap",maxNativeZoom:21},initialize:function(t){L.GridLayer.prototype.initialize.call(this,t),this._tileCallbacks={},this._lru=new a(100),this._imagesPerTile="hybrid"===this.options.type?2:1,this._boundOnMutatedImage=this._onMutatedImage.bind(this)},onAdd:function(t){var e,n,i,o,r=this;L.GridLayer.prototype.onAdd.call(this,t),this._initMutantContainer(),this._logoContainer&&t._controlCorners.bottomleft.appendChild(this._logoContainer),this._attributionContainer&&t._controlCorners.bottomright.appendChild(this._attributionContainer),e=function(){r._map&&(r._initMutant(),google.maps.event.addListenerOnce(r._mutant,"idle",(function(){r._map&&(r._checkZoomLevels(),r._mutantIsReady=!0)})))},i=0,o=null,o=setInterval((function(){if(i>=20)throw clearInterval(o),new Error("window.google not found after 10 seconds");window.google&&window.google.maps&&window.google.maps.Map&&(clearInterval(o),e.call(n)),++i}),500)},onRemove:function(t){L.GridLayer.prototype.onRemove.call(this,t),this._observer.disconnect(),t._container.removeChild(this._mutantContainer),this._logoContainer&&L.DomUtil.remove(this._logoContainer),this._attributionContainer&&L.DomUtil.remove(this._attributionContainer),this._mutant&&google.maps.event.clearListeners(this._mutant,"idle")},addGoogleLayer:function(t,e){var n=this;return this._subLayers||(this._subLayers={}),this.whenReady((function(){var i=new(0,google.maps[t])(e);i.setMap(n._mutant),n._subLayers[t]=i})),this},removeGoogleLayer:function(t){var e=this;return this.whenReady((function(){var n=e._subLayers&&e._subLayers[t];n&&(n.setMap(null),delete e._subLayers[t])})),this},_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.pointerEvents="none",this._mutantContainer.style.visibility="hidden",L.DomEvent.off(this._mutantContainer)),this._map.getContainer().appendChild(this._mutantContainer),this.setOpacity(this.options.opacity);var t=this._mutantContainer.style;this._map.options.zoomSnap<1?(t.width="180%",t.height="180%"):(t.width="100%",t.height="100%"),t.zIndex=-1,this._attachObserver(this._mutantContainer)},_initMutant:function(){if(!this._mutant){var t={center:{lat:0,lng:0},zoom:0,tilt:0,mapTypeId:this.options.type,disableDefaultUI:!0,keyboardShortcuts:!1,draggable:!1,disableDoubleClickZoom:!0,scrollwheel:!1,styles:this.options.styles||[],backgroundColor:"transparent"};null!=this.options.mapId&&(t.mapId=this.options.mapId);var e=new google.maps.Map(this._mutantContainer,t);this._mutant=e,this._update(),this.fire("spawned",{mapObject:e}),this._waitControls(),this.once("controls_ready",this._setupAttribution)}},_attachObserver:function(t){this._observer||(this._observer=new MutationObserver(this._onMutations.bind(this))),this._observer.observe(t,{childList:!0,subtree:!0}),Array.prototype.forEach.call(t.querySelectorAll("img"),this._boundOnMutatedImage)},_waitControls:function(){var t=this,e=setInterval((function(){var n,i=t._mutant.__gm.layoutManager;i&&(clearInterval(e),Object.keys(i).forEach((function(t){var e=i[t];e.get&&e.get(1)instanceof Node&&(n=e)})),t.fire("controls_ready",{positions:n}))}),50)},_setupAttribution:function(t){if(this._map){var e=google.maps.ControlPosition,n=this._attributionContainer=t.positions.get(e.BOTTOM_RIGHT);L.DomUtil.addClass(n,"leaflet-control leaflet-control-attribution"),L.DomEvent.disableClickPropagation(n),n.style.height="14px",this._map._controlCorners.bottomright.appendChild(n),this._logoContainer=t.positions.get(e.BOTTOM_LEFT),this._logoContainer.style.pointerEvents="auto",this._map._controlCorners.bottomleft.appendChild(this._logoContainer)}},_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._boundOnMutatedImage)}},_roadRegexp:/!1i(\d+)!2i(\d+)!3i(\d+|VinaFnapurmBegrtn)!/,_satRegexp:/x=(\d+)&y=(\d+)&z=(\d+|VinaFnapurmBegrtn)/,_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";var r=o+"/"+i;this._lru.set(r,t),r in this._tileCallbacks&&this._tileCallbacks[r]&&(this._tileCallbacks[r].forEach((function(e){return e(t)})),delete this._tileCallbacks[r])}},createTile:function(t,e){var n=this._tileCoordsToKey(t),i=L.DomUtil.create("div");i.style.textAlign="left",i.dataset.pending=this._imagesPerTile,e=e.bind(this,null,i);for(var o=0;o<this._imagesPerTile;++o){var r=n+"/"+o,a=this._lru.get(r);a?(i.appendChild(this._clone(a)),--i.dataset.pending):(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())},_update:function(t){if(this._mutant){t=t||this._map.getCenter();var e=new google.maps.LatLng(t.lat,t.lng),n=Math.round(this._map.getZoom()),i=this._mutant.getZoom();this._mutant.setCenter(e),n!==i&&(this._mutant.setZoom(n),this._mutantIsReady&&this._checkZoomLevels())}L.GridLayer.prototype._update.call(this,t)},whenReady:function(t,e){return this._mutant?t.call(e||this,{target:this}):this.on("spawned",t,e),this}}),L.gridLayer.googleMutant=function(t){return new L.GridLayer.GoogleMutant(t)};var u=L.GridLayer.GoogleMutant},935: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}},974: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)},978:(t,e,n)=>{n.d(e,{Z:()=>l,_:()=>h});var i=n(608),o=n(902),r=n(900),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.C6)(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.C6)(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)},983:(t,e,n)=>{var i=n(591),o=n.n(i),r=n(740),a=n.n(r),s=n(128),l=n.n(s),h=n(855),u=n.n(h),c=n(51),p=n.n(c),d=n(656),f=n.n(d),_=n(141),m={};m.styleTagTransform=f(),m.setAttributes=u(),m.insert=l().bind(null,"head"),m.domAPI=a(),m.insertStyleElement=p(),o()(_.A,m),_.A&&_.A.locals&&_.A.locals}},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,n.nc=void 0;var i={};return(()=>{n.r(i),n.d(i,{BeautifyIcon:()=>r.X,D3SvgOverlay:()=>a.w,Draw:()=>h,GoogleMutant:()=>o.P,HeatLayer:()=>s._,LeafletLayer:()=>a.h,LeafletLayer2:()=>s.Z,MarkerClusterGroup:()=>l});var t=n(902),e={};for(const n in t)["default","MarkerClusterGroup","Draw"].indexOf(n)<0&&(e[n]=()=>t[n]);n.d(i,e),n(983),n(334),n(690),n(974),n(238),n(651);var o=n(929),r=n(743),a=n(812),s=n(978),l=t.MarkerClusterGroup,h=t.Draw})(),i})(),t.exports=e()}(Cr)),Cr.exports),Er=function(t){function e(e){var n=t.call(this)||this;return n._layer=new Pr.FeatureGroup,n._crs=Pr.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),Tr=po("Albers").scale(.5),Sr=po("AlbersUsaPr").scale(.5),zr={project:function(t){var e=Sr([t.lng,t.lat]);return e||(e=Tr([t.lng,t.lat])),new Pr.Point(e[0],e[1])},unproject:function(t){if(isNaN(t.x)||isNaN(t.y))return new Pr.LatLng(0,0);var e=Tr.invert([t.x,t.y]);return new Pr.LatLng(e[1],e[0])}},Or=Pr.Util.extend({},Pr.CRS,{projection:zr,transformation:new Pr.Transformation(1,0,1,0),infinite:!0}),Dr=function(t){function e(){var e=t.call(this)||this;return e._crs=Or,e}return h(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.getBounds=function(){return new Pr.LatLngBounds([20,-123],[49,-64])},e}(Er);Dr.prototype._class+=" map_AlbersLayer";var Ar=function(t){function e(){return t.call(this)||this}return h(e,t),e}(Er);Ar.prototype._class+=" map_BlankLayer";var Ir=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.init=function(){return this._initPromise||(this._initPromise=ir()),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 Pr.GoogleMutant({type:"roadmap",styles:this.googleMapStyles()}))},e}(Er);Ir.prototype._class+=" map_GMapLayer",Ir.prototype.publish("googleMapStyles",{},"object","Styling for map colors etc",null,{tags:["Basic"]});var Br=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 Pr.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}(Er);Br.prototype._class+=" map_MapBoxLayer";var Nr=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 Pr.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}(Er);Nr.prototype._class+=" map_MapBoxLayer";fo(".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 Ar,n._albersLayer=new Dr,n._mapBoxLayer=new Br,n._openStreetLayer=new Nr,n._gmapLayer=new Ir,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 Pr.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 Zr=function(t){function n(n){void 0===n&&(n=!1);var i=t.call(this)||this;return i._layer=n?new Pr.MarkerClusterGroup:new Pr.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);Zr.prototype._class+=" map_FeatureLayer",Zr.prototype.mixin(e.Utility.SimpleSelectionMixin),Zr.prototype.publishReset(["layers"]);var jr=function(t){function e(e){return void 0===e&&(e=!0),t.call(this,e)||this}return h(e,t),e}(Zr);jr.prototype._class+=" map_ClusterLayer";var Hr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._lfd3=(new Pr.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}(Zr),Ur=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 Pr.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}(jr);Ur.prototype._class+=" map_Circles",Ur.prototype.publish("latitudeColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),Ur.prototype.publish("longitudeColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),Ur.prototype.publish("radius",50,"number","Radius (meters)"),Ur.prototype.publish("strokeColor","#376cea","html-color","Stroke Color",null,{optional:!0}),Ur.prototype.publish("strokeColorColumn",null,"set","Stroke color column",(function(){return this.columns()}),{optional:!0}),Ur.prototype.publish("fillColor","#376cea","html-color","Fill Color",null,{optional:!0}),Ur.prototype.publish("fillColorColumn",null,"set","Fill color column",(function(){return this.columns()}),{optional:!0}),Ur.prototype.publish("fillOpacity",.5,"number","Opacity",null,{tags:["Advanced"]}),Ur.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});var Gr=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}(Hr);Gr.prototype._class+=" map_D3Circles",Gr.prototype.publish("latitudeColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),Gr.prototype.publish("longitudeColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),Gr.prototype.publish("radius",50,"number","Radius (meters)"),Gr.prototype.publish("strokeColor","#376cea","html-color","Stroke Color",null,{optional:!0}),Gr.prototype.publish("strokeColorColumn",null,"set","Stroke color column",(function(){return this.columns()}),{optional:!0}),Gr.prototype.publish("fillColor","#376cea","html-color","Fill Color",null,{optional:!0}),Gr.prototype.publish("fillColorColumn",null,"set","Fill color column",(function(){return this.columns()}),{optional:!0}),Gr.prototype.publish("fillOpacity",.5,"number","Opacity",null,{tags:["Advanced"]}),Gr.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});fo(".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 Fr=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 Pr.DivIcon({className:"cluster-circle",iconSize:new Pr.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 Pr.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}(Zr);Fr.prototype._class+=" map_ClusterCircles",Fr.prototype._palette=e.Palette.rainbow("default"),Fr.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Fr.prototype._palette.switch()),Fr.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette"),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("weightColumn",null,"set","Weight column",(function(){return this.columns()}),{optional:!0}),Fr.prototype.publish("weightFormat",",","string","Number format for weight"),Fr.prototype.publish("opacity",.66,"number","Opacity",null,{tags:["Advanced"]});var Wr=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=Lo(e,e.objects[i]),t.prototype.addData.call(this,n));return this}return t.prototype.addData.call(this,e),this},e}(Pr.GeoJSON),Vr=null,qr=null,Yr=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){Vr&&t(),Oo("".concat(Eo(),"/us-states.json"),(function(e){for(var n in Yr=Lo((Vr=e).topology,Vr.topology.objects.states).features,Xr={},Yr)Yr[n].id&&(Xr[Vr.stateNames[Yr[n].id].code]=Yr[n]);t()}))}))),this._initPromise},e.prototype.initCounties=function(){return this._initPromise||(this._initPromise=new Promise((function(t,e){qr&&t(),Oo("".concat(Eo(),"/us-counties.json"),(function(e){for(var n in Yr=Lo((qr=e).topology,qr.topology.objects.counties).features,Xr={},Yr)Yr[n].id&&(Xr[Yr[n].id]=Yr[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 Wr(Yr,{style:function(t){return{color:"#000",opacity:1,weight:1,fillColor:"#35495d",fillOpacity:.2}}});this.add(n)}}(Zr);fo(".leaflet-interactive.selected{stroke:red;stroke-width:1.25px}");var Kr=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 Pr.LatLngBounds([e.getNorth(),e.getWest()],[e.getSouth(),e.getEast()]):new Pr.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 Wr(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}(Zr);Kr.prototype._class+=" map_World",Kr.prototype._palette=e.Palette.rainbow("default"),Kr.prototype.mixin(e.Utility.SimpleSelectionMixin),Kr.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Kr.prototype._palette.switch(),{tags:["Basic","Shared"]}),Kr.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),Kr.prototype.publish("opacity",.5,"number","Opacity",null,{tags:["Advanced"]}),Kr.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),Kr.prototype.publish("meshColor","black","html-color","Stroke Color"),Kr.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width"),Kr.prototype.publish("internalOnly",!1,"boolean","Internal mesh only");var Jr=null,Qr=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){Jr&&t(Jr),Oo("".concat(Eo(),"/countries.json"),(function(e){t(Jr=e)}))})).then((function(e){var n;for(var i in t._features=Lo(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}(Kr);function $r(t,e){var n=t.indexOf(e);n>=0&&t.splice(n,1)}var ta=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 Pr.Polyline(t)})),this._polygons=(t.polygons||[]).map((function(t){return new Pr.Polygon(t)})),this._rectangles=(t.rectangles||[]).map((function(t){return new Pr.Rectangle(t)})),this._circles=(t.circles||[]).map((function(t){return new Pr.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(Pr.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(Pr.Draw.Event.EDITED,(function(t){t.layers.eachLayer((function(t){n.changed("UPDATE",t)}))})),e.on(Pr.Draw.Event.DELETED,(function(t){t.layers.eachLayer((function(t){$r(n._polylines,t),$r(n._polygons,t),$r(n._rectangles,t),$r(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 Pr.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}(Zr);ta.prototype._class+=" map_DrawLayer",ta.prototype.publish("opacity",1,"number","Layer Opacity"),ta.prototype.publish("enablePolyline",!0,"boolean","Enable Polyline Creation"),ta.prototype.publish("enablePolygon",!0,"boolean","Enable Polygon Creation"),ta.prototype.publish("enableRectangle",!0,"boolean","Enable Rectangle Creation"),ta.prototype.publish("enableCircle",!0,"boolean","Enable Circle Creation");var ea=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 Pr.LatLngBounds([t[r],t[a]]),[t[r],t[a],n.weightColumn_exists()?t[s]:.5]})),h=new Pr.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}(Zr);ea.prototype._class+=" map_Heat",ea.prototype.publish("latitudeColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),ea.prototype.publish("longitudeColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),ea.prototype.publish("weightColumn",null,"set","Optional normalized intensity (0 -> 1) ",(function(){return this.columns()}),{optional:!0}),ea.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from IconsData",null,{tags:["Basic"]}),ea.prototype.publish("opacity",.5,"number","Layer Opacity"),ea.prototype.publish("minOpacity",.5,"number","The minimum opacity the heat will start at",null,{tags:["Basic"]}),ea.prototype.publish("max",1,"number","maximum point intensity, 1.0 by default",null,{tags:["Basic"]}),ea.prototype.publish("radius",25,"number","radius of each point of the heatmap, 25 by default",null,{tags:["Basic"]}),ea.prototype.publish("blur",15,"number","amount of blur, 15 by default",null,{tags:["Basic"]}),ea.prototype.publish("gradient",null,"object","color gradient config",null,{tags:["Basic"],optional:!0});var na=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 Pr.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:Pr.point(i.tooltipOffsetX(),i.tooltipOffsetY())});var h=i.popupText(i.rowToObj(t),i.propValue(l,t,""));h&&e.bindPopup(h,{offset:Pr.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}(jr);na.prototype._class+=" map_Markers",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("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from IconsData",null,{tags:["Basic"]}),na.prototype.publish("tooltipColumn",null,"set","Tooltip column",(function(){return this.columns()}),{optional:!0}),na.prototype.publish("tooltipDirection","auto","set","Tooltip direction",["auto","left","top","right","bottom","center"]),na.prototype.publish("tooltipOffsetX",0,"number","Tooltip offset X"),na.prototype.publish("tooltipOffsetY",0,"number","Tooltip offset Y"),na.prototype.publish("popupColumn",null,"set","Popup column",(function(){return this.columns()}),{optional:!0}),na.prototype.publish("popupOffsetX",0,"number","Tooltip offset X"),na.prototype.publish("popupOffsetY",0,"number","Tooltip offset Y");var ia=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 Pr.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}(na);ia.prototype._class+=" map_Icons",ia.prototype.publish("iconUrl","","string","Icon URL",null),ia.prototype.publish("iconUrlColumn",null,"set","Icon URL column",(function(){return this.columns()}),{optional:!0}),ia.prototype.publish("iconWidth",32,"number","Icon width"),ia.prototype.publish("iconHeight",32,"number","Icon height"),ia.prototype.publish("iconAnchorX",16,"number","Icon Anchor X"),ia.prototype.publish("iconAnchorY",32,"number","Icon Anchor Y");var oa=function(t){function e(){return t.call(this,!0)||this}return h(e,t),e}(ia);function ra(t){return[t[1],t[0]]}oa.prototype._class+=" map_ClusterIcons";var aa=function(t,e){return e[0]<-90?t[0]++:e[0]>90&&t[1]++,t},sa=function(t){return t>90?t-360:t},la=function(t){return t<-90?t+360:t},ha=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(aa,[0,0]),i=n[0],o=n[1];return i&&o?t.map((e=i>o?sa:la,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 Pr.Polygon(t.fixDateLine(n(e)).map(ra),{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}(Zr);ha.prototype._class+=" map_Polygons",ha.prototype._palette=e.Palette.rainbow("default"),ha.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",ha.prototype._palette.switch(),{tags:["Basic","Shared"]}),ha.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),ha.prototype.publish("polygonColumn",null,"set","Polygon column",(function(){return this.columns()}),{optional:!0}),ha.prototype.publish("weightColumn",null,"set","Weight column",(function(){return this.columns()}),{optional:!0}),ha.prototype.publish("opacity",.5,"number","Opacity",null,{tags:["Advanced"]});var ua=2048/Math.PI,ca=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=po("Mercator").scale(ua).translate([r.x,r.y]),s=ci().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}(Hr);ca.prototype._class+=" map_Path",ca.prototype.publish("latitudeColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),ca.prototype.publish("longitudeColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),ca.prototype.publish("strokeColor"," #666666","html-color","Stroke Color",null,{optional:!0}),ca.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});var pa=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}(ca);pa.prototype._class+=" map_Lines",pa.prototype.publish("latitude2Column",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),pa.prototype.publish("longitude2Column",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0});var da=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:Pr.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}(na);da.prototype._class+=" map_Pins",da.prototype.publish("faChar","fa-circle","string","Default font awesome character"),da.prototype.publish("faCharColumn",null,"set","Font awesome column",(function(){return this.columns()}),{optional:!0}),da.prototype.publish("faCharColor","#ffffff","html-color","Default font awesome Color"),da.prototype.publish("faCharColorColumn",null,"set","Font awesome color column",(function(){return this.columns()}),{optional:!0}),da.prototype.publish("strokeColor","transparent","html-color","Default stroke Color",null,{optional:!0}),da.prototype.publish("strokeColorColumn",null,"set","Stroke color column",(function(){return this.columns()}),{optional:!0}),da.prototype.publish("fillColor","#376cea","html-color","Default fill Color",null,{optional:!0}),da.prototype.publish("fillColorColumn",null,"set","Fill color column",(function(){return this.columns()}),{optional:!0});var fa=function(t){function e(){return t.call(this,!0)||this}return h(e,t),e}(da);fa.prototype._class+=" map_ClusterPins";var _a={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"]},ma={};function ga(t){return ma[t]||(ma[t]={topology:void 0,nameIdx:{},codeIdx:{}}),ma[t]}var ya=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.fetchTopo=function(t){return ga(t).topology?Promise.resolve(ga(t).topology):new Promise((function(e,n){Oo("".concat(Eo(),"/").concat(t,".json"),(function(n){ga(t).topology=n,e(n)}))}))},e.prototype.fetchTopoIdx=function(t){for(var e in ga(t).nameIdx)return Promise.resolve(ga(t).nameIdx);return new Promise((function(e,n){Oo("".concat(Eo(),"/").concat(t,"_idx.json"),(function(n){var i,o=ga(t),r=o.nameIdx,a=o.codeIdx;null===(i=_a[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=ga(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=Lo(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=ga(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}(Kr);ya.prototype._class+=" map_Region",ya.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 va=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:Pr.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}(na);va.prototype._class+=" map_Text",va.prototype.publish("textOffsetX",0,"number","Horizontal offset of text"),va.prototype.publish("textOffsetY",0,"number","Vertical offset of text"),va.prototype.publish("text","","string","Default text"),va.prototype.publish("textColumn",null,"set","Font awesome column",(function(){return this.columns()}),{optional:!0}),va.prototype.publish("textColor","#ffffff","html-color","Default font awesome Color"),va.prototype.publish("textColorColumn",null,"set","Text color column",(function(){return this.columns()}),{optional:!0}),va.prototype.publish("textFontFamily",null,"set","Text color column",(function(){return this.columns()}),{optional:!0}),va.prototype.publish("strokeColor","transparent","html-color","Default stroke Color",null,{optional:!0}),va.prototype.publish("strokeColorColumn",null,"set","Stroke color column",(function(){return this.columns()}),{optional:!0}),va.prototype.publish("fillColor","#376cea","html-color","Default fill Color",null,{optional:!0}),va.prototype.publish("fillColorColumn",null,"set","Fill color column",(function(){return this.columns()}),{optional:!0}),va.prototype.publish("fontFamily",null,"string","Font family",null,{optional:!0}),va.prototype.publish("fontSize",16,"number","Font family",null,{optional:!0}),va.prototype.publish("textFormat",null,"string","Format rules for text",null,{optional:!0});var ba=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 Pr.LatLngBounds([e.getNorth(),e.getWest()],[17.755278,-64.565])},e}(Kr),La=null,wa={},xa=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){La&&t(La),Oo("".concat(Eo(),"/us-counties.json"),(function(e){t(La=e)}))})).then((function(e){for(var n in t._features=Lo(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,wa[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(wa[e],"</b>: ").concat(i))},e}(ba);xa.prototype._class+=" map_USCounties";var ka=null,Ma={},Ca=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){ka&&t(ka),Oo("".concat(Eo(),"/us-states.json"),(function(e){t(ka=e)}))})).then((function(e){for(var n in t._features=Lo(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,Ma[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(Ma[e],"</b>: ").concat(i))},e}(ba);Ca.prototype._class+=" map_USStates";var Pa=Object.freeze({__proto__:null,Circles:Ur,ClusterCircles:Fr,ClusterIcons:oa,ClusterLayer:jr,ClusterPins:fa,Countries:Qr,D3Circles:Gr,D3SurfaceLayer:Hr,DrawLayer:ta,FeatureLayer:Zr,HeatLayer:ea,Icons:ia,Leaflet:Rr,Lines:pa,Markers:na,Path:ca,Pins:da,Polygons:ha,Region:ya,Text:va,TileLayer:Er,USCounties:xa,USStates:Ca,World:Kr});t.BUILD_VERSION="2.108.2",t.CanvasPinLayer=vo,t.CanvasPins=w,t.Choropleth=To,t.ChoroplethContinents=No,t.ChoroplethCounties=Ho,t.ChoroplethCountries=Bo,t.ChoroplethStates=Wo,t.ChoroplethStatesHeat=Vo,t.GMap=rr,t.GMapCounties=lr,t.GMapGraph=hr,t.GMapHeat=ur,t.GMapLayered=sr,t.GMapPin=pr,t.GMapPinLine=fr,t.GeoHash=qo,t.Graph=_r,t.Graticule=mr,t.Heat=gr,t.IChoropleth=yr,t.Layer=yo,t.Layered=mo,t.Leaflet=Pa,t.Lines=dr,t.OpenStreet=wr,t.PKG_NAME="@hpcc-js/map",t.PKG_VERSION="2.79.1",t.Pins=cr,t.TestHeatMap=xr,t.TopoJSONChoropleth=kr,t.projections=uo,t.requireGoogleMap=ir,t.requireGoogleMapTimeout=function(t){nr=t},t.resolve=po,t.topoJsonFolder=Eo,t.types=ho}));
|
|
6
|
+
!function(t){var e="1.9.4";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"_leaflet_id"in t||(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){if(!1===e)return t;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={__proto__:null,extend:n,create:i,bind:o,get lastId(){return 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(){d(this),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),t.includes&&(S(t.includes),n.apply(null,[r].concat(t.includes))),n(r,t),delete r.statics,delete r.includes,r.options&&(r.options=o.options?i(o.options):{},n(r.options,t.options)),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){var e=this.prototype.options;return n(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),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(arguments.length)if("object"==typeof t)for(var i in t)this._off(i,t[i],e);else{t=p(t);for(var o=1===arguments.length,r=0,a=t.length;r<a;r++)o?this._off(t[r]):this._off(t[r],e,n)}else delete this._events;return this},_on:function(t,e,n,i){if("function"==typeof e){if(!1===this._listens(t,e,n)){n===this&&(n=void 0);var o={fn:e,ctx:n};i&&(o.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(o)}}else console.warn("wrong listener type: "+typeof e)},_off:function(t,e,n){var i,o,r;if(this._events&&(i=this._events[t]))if(1!==arguments.length)if("function"==typeof e){var a=this._listens(t,e,n);if(!1!==a){var s=i[a];this._firingCount&&(s.fn=h,this._events[t]=i=i.slice()),i.splice(a,1)}}else console.warn("wrong listener type: "+typeof e);else{if(this._firingCount)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],h=l.fn;l.once&&this.off(t,h,l.ctx),h.call(l.ctx||this,o)}this._firingCount--}}return i&&this._propagateEvent(o),this},listens:function(t,e,n,i){"string"!=typeof t&&console.warn('"string" type argument expected');var o=e;"function"!=typeof e&&(i=!!e,o=void 0,n=void 0);var r=this._events&&this._events[t];if(r&&r.length&&!1!==this._listens(t,o,n))return!0;if(i)for(var a in this._eventParents)if(this._eventParents[a].listens(t,e,n,i))return!0;return!1},_listens:function(t,e,n){if(!this._events)return!1;var i=this._events[t]||[];if(!e)return!!i.length;n===this&&(n=void 0);for(var o=0,r=i.length;o<r;o++)if(i[o].fn===e&&i[o].ctx===n)return o;return!1},once:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e,!0);else for(var o=0,r=(t=p(t)).length;o<r;o++)this._on(t[o],e,n,!0);return this},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 R(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function Z(t,e){return t instanceof R?t:new R(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 H(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){var e,n;if(!t)return this;if(t instanceof D||"number"==typeof t[0]||"x"in t)e=n=I(t);else if(e=(t=N(t)).min,n=t.max,!e||!n)return this;return this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(n.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(n.y,this.max.y)):(this.min=e.clone(),this.max=n.clone()),this},getCenter:function(t){return I((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return I(this.min.x,this.max.y)},getTopRight:function(){return I(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)},pad:function(t){var e=this.min,n=this.max,i=Math.abs(e.x-n.x)*t,o=Math.abs(e.y-n.y)*t;return N(I(e.x-i,e.y-o),I(n.x+i,n.y+o))},equals:function(t){return!!t&&(t=N(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))}},R.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 R))return t?this.extend(H(t)||Z(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 R(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?H(t):Z(t);var e,n,i=this._southWest,o=this._northEast;return t instanceof R?(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=Z(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=Z(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=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){return!!t&&(t=H(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,H(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 Z([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,G={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 R(new j(r.lat-i,r.lng-o),new j(a.lat-i,a.lng-o))}},F=n({},G,{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 X=n({},F,{code:"EPSG:3857",projection:V,transformation:function(){var t=.5/(Math.PI*V.R);return Y(t,.5,-t,.5)}()}),K=n({},X,{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?Rt.svg?"z":"x":""}return l||"M0 0"}var $,tt=document.documentElement.style,et="ActiveXObject"in window,nt=et&&!document.addEventListener,it="msLaunchUri"in navigator&&!("documentMode"in document),ot=Nt("webkit"),rt=Nt("android"),at=Nt("android 2")||Nt("android 3"),st=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),lt=rt&&Nt("Google")&&st<537&&!("AudioNode"in window),ht=!!window.opera,ut=!it&&Nt("chrome"),ct=Nt("gecko")&&!ot&&!ht&&!et,pt=!ut&&Nt("safari"),dt=Nt("phantom"),ft="OTransition"in tt,_t=0===navigator.platform.indexOf("Win"),mt=et&&"transition"in tt,gt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!at,yt="MozPerspective"in tt,vt=!window.L_DISABLE_3D&&(mt||gt||yt)&&!ft&&!dt,bt="undefined"!=typeof orientation||Nt("mobile"),Lt=bt&&ot,wt=bt&>,xt=!window.PointerEvent&&window.MSPointerEvent,kt=!(!window.PointerEvent&&!xt),Mt="ontouchstart"in window||!!window.TouchEvent,Ct=!window.L_NO_TOUCH&&(Mt||kt),Pt=bt&&ht,Et=bt&&ct,Tt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,St=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}(),zt=!!document.createElement("canvas").getContext,Ot=!(!document.createElementNS||!J("svg").createSVGRect),Dt=!!Ot&&(($=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===($.firstChild&&$.firstChild.namespaceURI)),At=!Ot&&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}}(),It=0===navigator.platform.indexOf("Mac"),Bt=0===navigator.platform.indexOf("Linux");function Nt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Rt={ie:et,ielt9:nt,edge:it,webkit:ot,android:rt,android23:at,androidStock:lt,opera:ht,chrome:ut,gecko:ct,safari:pt,phantom:dt,opera12:ft,win:_t,ie3d:mt,webkit3d:gt,gecko3d:yt,any3d:vt,mobile:bt,mobileWebkit:Lt,mobileWebkit3d:wt,msPointer:xt,pointer:kt,touch:Ct,touchNative:Mt,mobileOpera:Pt,mobileGecko:Et,retina:Tt,passiveEvents:St,canvas:zt,svg:Ot,vml:At,inlineSvg:Dt,mac:It,linux:Bt},Zt=Rt.msPointer?"MSPointerDown":"pointerdown",jt=Rt.msPointer?"MSPointerMove":"pointermove",Ht=Rt.msPointer?"MSPointerUp":"pointerup",Ut=Rt.msPointer?"MSPointerCancel":"pointercancel",Gt={touchstart:Zt,touchmove:jt,touchend:Ht,touchcancel:Ut},Ft={touchstart:te,touchmove:$t,touchend:$t,touchcancel:$t},Wt={},Vt=!1;function qt(t,e,n){return"touchstart"===e&&Qt(),Ft[e]?(n=Ft[e].bind(this,n),t.addEventListener(Gt[e],n,!1),n):(console.warn("wrong event specified:",e),h)}function Yt(t,e,n){Gt[e]?t.removeEventListener(Gt[e],n,!1):console.warn("wrong event specified:",e)}function Xt(t){Wt[t.pointerId]=t}function Kt(t){Wt[t.pointerId]&&(Wt[t.pointerId]=t)}function Jt(t){delete Wt[t.pointerId]}function Qt(){Vt||(document.addEventListener(Zt,Xt,!0),document.addEventListener(jt,Kt,!0),document.addEventListener(Ht,Jt,!0),document.addEventListener(Ut,Jt,!0),Vt=!0)}function $t(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in e.touches=[],Wt)e.touches.push(Wt[n]);e.changedTouches=[e],t(e)}}function te(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&Xe(e),$t(t,e)}function ee(t){var e,n,i={};for(n in t)e=t[n],i[n]=e&&e.bind?e.bind(t):e;return t=i,i.type="dblclick",i.detail=2,i.isTrusted=!1,i._simulated=!0,i}var ne=200;function ie(t,e){t.addEventListener("dblclick",e);var n,i=0;function o(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var o=Je(t);if(!o.some(function(t){return t instanceof HTMLLabelElement&&t.attributes.for})||o.some(function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement})){var r=Date.now();r-i<=ne?2===++n&&e(ee(t)):n=1,i=r}}}else n=t.detail}return t.addEventListener("click",o),{dblclick:e,simDblclick:o}}function oe(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var re,ae,se,le,he,ue=Pe(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ce=Pe(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),pe="webkitTransition"===ce||"OTransition"===ce?ce+"End":"transitionend";function de(t){return"string"==typeof t?document.getElementById(t):t}function fe(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 _e(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function me(t){var e=t.parentNode;e&&e.removeChild(t)}function ge(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ye(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ve(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function be(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=ke(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function Le(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(!be(t,e)){var r=ke(t);xe(t,(r?r+" ":"")+e)}}function we(t,e){void 0!==t.classList?t.classList.remove(e):xe(t,c((" "+ke(t)+" ").replace(" "+e+" "," ")))}function xe(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function ke(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function Me(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&Ce(t,e)}function Ce(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 Pe(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function Ee(t,e,n){var i=e||new D(0,0);t.style[ue]=(Rt.ie3d?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(n?" scale("+n+")":"")}function Te(t,e){t._leaflet_pos=e,Rt.any3d?Ee(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Se(t){return t._leaflet_pos||new D(0,0)}if("onselectstart"in document)re=function(){Ze(window,"selectstart",Xe)},ae=function(){He(window,"selectstart",Xe)};else{var ze=Pe(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);re=function(){if(ze){var t=document.documentElement.style;se=t[ze],t[ze]="none"}},ae=function(){ze&&(document.documentElement.style[ze]=se,se=void 0)}}function Oe(){Ze(window,"dragstart",Xe)}function De(){He(window,"dragstart",Xe)}function Ae(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Ie(),le=t,he=t.style.outlineStyle,t.style.outlineStyle="none",Ze(window,"keydown",Ie))}function Ie(){le&&(le.style.outlineStyle=he,le=void 0,he=void 0,He(window,"keydown",Ie))}function Be(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Ne(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Re={__proto__:null,TRANSFORM:ue,TRANSITION:ce,TRANSITION_END:pe,get:de,getStyle:fe,create:_e,remove:me,empty:ge,toFront:ye,toBack:ve,hasClass:be,addClass:Le,removeClass:we,setClass:xe,getClass:ke,setOpacity:Me,testProp:Pe,setTransform:Ee,setPosition:Te,getPosition:Se,get disableTextSelection(){return re},get enableTextSelection(){return ae},disableImageDrag:Oe,enableImageDrag:De,preventOutline:Ae,restoreOutline:Ie,getSizedParentNode:Be,getScale:Ne};function Ze(t,e,n,i){if(e&&"object"==typeof e)for(var o in e)Fe(t,o,e[o],n);else for(var r=0,a=(e=p(e)).length;r<a;r++)Fe(t,e[r],n,i);return this}var je="_leaflet_events";function He(t,e,n,i){if(1===arguments.length)Ue(t),delete t[je];else if(e&&"object"==typeof e)for(var o in e)We(t,o,e[o],n);else if(e=p(e),2===arguments.length)Ue(t,function(t){return-1!==y(e,t)});else for(var r=0,a=e.length;r<a;r++)We(t,e[r],n,i);return this}function Ue(t,e){for(var n in t[je]){var i=n.split(/\d/)[0];e&&!e(i)||We(t,i,null,null,n)}}var Ge={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Fe(t,e,n,i){var o=e+a(n)+(i?"_"+a(i):"");if(t[je]&&t[je][o])return this;var r=function(e){return n.call(i||t,e||window.event)},s=r;!Rt.touchNative&&Rt.pointer&&0===e.indexOf("touch")?r=qt(t,e,r):Rt.touch&&"dblclick"===e?r=ie(t,r):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(Ge[e]||e,r,!!Rt.passiveEvents&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(r=function(e){e=e||window.event,en(t,e)&&s(e)},t.addEventListener(Ge[e],r,!1)):t.addEventListener(e,s,!1):t.attachEvent("on"+e,r),t[je]=t[je]||{},t[je][o]=r}function We(t,e,n,i,o){o=o||e+a(n)+(i?"_"+a(i):"");var r=t[je]&&t[je][o];if(!r)return this;!Rt.touchNative&&Rt.pointer&&0===e.indexOf("touch")?Yt(t,e,r):Rt.touch&&"dblclick"===e?oe(t,r):"removeEventListener"in t?t.removeEventListener(Ge[e]||e,r,!1):t.detachEvent("on"+e,r),t[je][o]=null}function Ve(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function qe(t){return Fe(t,"wheel",Ve),this}function Ye(t){return Ze(t,"mousedown touchstart dblclick contextmenu",Ve),t._leaflet_disable_click=!0,this}function Xe(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Ke(t){return Xe(t),Ve(t),this}function Je(t){if(t.composedPath)return t.composedPath();for(var e=[],n=t.target;n;)e.push(n),n=n.parentNode;return e}function Qe(t,e){if(!e)return new D(t.clientX,t.clientY);var n=Ne(e),i=n.boundingClientRect;return new D((t.clientX-i.left)/n.x-e.clientLeft,(t.clientY-i.top)/n.y-e.clientTop)}var $e=Rt.linux&&Rt.chrome?window.devicePixelRatio:Rt.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function tn(t){return Rt.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/$e:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function en(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 nn={__proto__:null,on:Ze,off:He,stopPropagation:Ve,disableScrollPropagation:qe,disableClickPropagation:Ye,preventDefault:Xe,stop:Ke,getPropagationPath:Je,getMousePosition:Qe,getWheelDelta:tn,isExternalTarget:en,addListener:Ze,removeListener:He},on=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=Se(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(),Te(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)}}),rn=O.extend({options:{crs:X,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(H(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ce&&Rt.any3d&&!Rt.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Ze(this._proxy,pe,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(H(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,i.pan&&i.pan.noMoveStart),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||(Rt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(Rt.any3d?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():Z(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=Z(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 on,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){Le(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||!Rt.any3d)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=H(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=Z(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},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,Z(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.project(this.getCenter()),r=this.project(t),a=this.getPixelBounds(),s=N([a.min.add(n),a.max.subtract(i)]),l=s.getSize();if(!s.contains(r)){this._enforcingBounds=!0;var h=r.subtract(s.getCenter()),u=s.extend(r).getSize().subtract(l);o.x+=h.x<0?-u.x:u.x,o.y+=h.y<0?-u.y:u.y,this.panTo(this.unproject(o),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){if(this._container._leaflet_id){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){if(this._container._leaflet_id){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.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),me(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)me(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=_e("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.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new R(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=Z(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=Rt.any3d?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(H(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(H(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(H(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(Z(t))},distance:function(t,e){return this.options.crs.distance(H(t),H(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(H(t)))},mouseEventToContainerPoint:function(t){return Qe(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=de(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Ze(e,"scroll",this._onScroll,this),this._containerId=a(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Rt.any3d,Le(t,"leaflet-container"+(Rt.touch?" leaflet-touch":"")+(Rt.retina?" leaflet-retina":"")+(Rt.ielt9?" leaflet-oldie":"")+(Rt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=fe(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Te(this._mapPane,new D(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Le(t.markerPane,"leaflet-zoom-hide"),Le(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,n){Te(this._mapPane,new D(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var o=this._zoom!==e;this._moveStart(o,n)._move(t,e)._moveEnd(o),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,n,i){void 0===e&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),i?n&&n.pinch&&this.fire("zoom",n):((o||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)),this},_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){Te(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?He:Ze;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),Rt.any3d&&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)&&this._draggableMoved(n)){s=!0;break}if(n&&n.listens(e,!0)){if(o&&!en(r,t))break;if(i.push(n),o)break}if(r===this._container)break;r=r.parentNode}return i.length||s||o||!this.listens(e,!0)||(i=[this]),i},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))){var n=t.type;"mousedown"===n&&Ae(e),this._fireDOMEvent(t,n)}},_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)}var r=this._findEventTargets(t,e);if(i){for(var a=[],s=0;s<i.length;s++)i[s].listens(e,!0)&&a.push(i[s]);r=a.concat(r)}if(r.length){"contextmenu"===e&&Xe(t);var l=r[0],h={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var u=l.getLatLng&&(!l._radius||l._radius<=10);h.containerPoint=u?this.latLngToContainerPoint(l.getLatLng()):this.mouseEventToContainerPoint(t),h.layerPoint=this.containerPointToLayerPoint(h.containerPoint),h.latlng=u?l.getLatLng():this.layerPointToLatLng(h.layerPoint)}for(s=0;s<r.length;s++)if(r[s].fire(e,h,!0),h.originalEvent._stopped||!1===r[s].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 Se(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 Math.abs(a.x)<=1&&Math.abs(a.y)<=1?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=Rt.any3d?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(){we(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=_e("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=ue,n=this._proxy.style[e];Ee(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(){me(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Ee(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,n.noMoveStart||!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,Le(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&we(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function an(t,e){return new rn(t,e)}var sn=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 Le(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?(me(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()}}),ln=function(t){return new sn(t)};rn.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=_e("div",e+"control-container",this._container);function i(i,o){var r=e+i+" "+e+o;t[i+o]=_e("div",r,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)me(this._controlCorners[t]);me(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var hn=sn.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,this._preventClick=!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 sn.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(){Le(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?(Le(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):we(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return we(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=_e("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Ye(e),qe(e);var i=this._section=_e("section",t+"-list");n&&(this._map.on("click",this.collapse,this),Ze(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var o=this._layersLink=_e("a",t+"-toggle",e);o.href="#",o.title="Layers",o.setAttribute("role","button"),Ze(o,{keydown:function(t){13===t.keyCode&&this._expandSafely()},click:function(t){Xe(t),this._expandSafely()}},this),n||this.expand(),this._baseLayersList=_e("div",t+"-base",i),this._separator=_e("div",t+"-separator",i),this._overlaysList=_e("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;ge(this._baseLayersList),ge(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),Ze(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var r=document.createElement("span");return n.appendChild(r),r.appendChild(e),r.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){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},_expandSafely:function(){var t=this._section;this._preventClick=!0,Ze(t,"click",Xe),this.expand();var e=this;setTimeout(function(){He(t,"click",Xe),e._preventClick=!1})}}),un=function(t,e,n){return new hn(t,e,n)},cn=sn.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=_e("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=_e("a",n,i);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),Ye(r),Ze(r,"click",Ke),Ze(r,"click",o,this),Ze(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";we(this._zoomInButton,e),we(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(Le(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(Le(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});rn.mergeOptions({zoomControl:!0}),rn.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new cn,this.addControl(this.zoomControl))});var pn=function(t){return new cn(t)},dn=sn.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=_e("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=_e("div",e,n)),t.imperial&&(this._iScale=_e("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)}}),fn=function(t){return new dn(t)},_n='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',mn=sn.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Rt.inlineSvg?_n+" ":"")+"Leaflet</a>"},initialize:function(t){d(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=_e("div","leaflet-control-attribution"),Ye(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(' <span aria-hidden="true">|</span> ')}}});rn.mergeOptions({attributionControl:!0}),rn.addInitHook(function(){this.options.attributionControl&&(new mn).addTo(this)});var gn=function(t){return new mn(t)};sn.Layers=hn,sn.Zoom=cn,sn.Scale=dn,sn.Attribution=mn,ln.layers=un,ln.zoom=pn,ln.scale=fn,ln.attribution=gn;var yn=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}});yn.addTo=function(t,e){return t.addHandler(e,this),this};var vn={Events:z},bn=Rt.touch?"touchstart mousedown":"mousedown",Ln=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||(Ze(this._dragStartTarget,bn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Ln._dragging===this&&this.finishDrag(!0),He(this._dragStartTarget,bn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!be(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)Ln._dragging===this&&this.finishDrag();else if(!(Ln._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(Ln._dragging=this,this._preventOutline&&Ae(this._element),Oe(),re(),this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Be(this._element);this._startPoint=new D(e.clientX,e.clientY),this._startPos=Se(this._element),this._parentScale=Ne(n);var i="mousedown"===t.type;Ze(document,i?"mousemove":"touchmove",this._onMove,this),Ze(document,i?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,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,Xe(t),this._moved||(this.fire("dragstart"),this._moved=!0,Le(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),Le(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,this._lastEvent=t,this._updatePosition()))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Te(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){we(document.body,"leaflet-dragging"),this._lastTarget&&(we(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),He(document,"mousemove touchmove",this._onMove,this),He(document,"mouseup touchend touchcancel",this._onUp,this),De(),ae();var e=this._moved&&this._moving;this._moving=!1,Ln._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function wn(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=In(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=An(l,s,u,e,n))._code=In(c,e),i.push(c)):(l._code&u&&((c=An(l,s,u,e,n))._code=In(c,e),i.push(c)),i.push(s));t=i}return t}function xn(t,e){var n,i,o,r,a,s,l,h,u;if(!t||0===t.length)throw new Error("latlngs not passed");Rn(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var c=H([0,0]),p=Z(t);p.getNorthWest().distanceTo(p.getSouthWest())*p.getNorthEast().distanceTo(p.getNorthWest())<1700&&(c=kn(t));var d=t.length,f=[];for(n=0;n<d;n++){var _=H(t[n]);f.push(e.project(H([_.lat-c.lat,_.lng-c.lng])))}for(s=l=h=0,n=0,i=d-1;n<d;i=n++)o=f[n],r=f[i],a=o.y*r.x-r.y*o.x,l+=(o.x+r.x)*a,h+=(o.y+r.y)*a,s+=3*a;u=0===s?f[0]:[l/s,h/s];var m=e.unproject(I(u));return H([m.lat+c.lat,m.lng+c.lng])}function kn(t){for(var e=0,n=0,i=0,o=0;o<t.length;o++){var r=H(t[o]);e+=r.lat,n+=r.lng,i++}return H([e/i,n/i])}var Mn,Cn={__proto__:null,clipPolygon:wn,polygonCenter:xn,centroid:kn};function Pn(t,e){if(!e||!t.length)return t.slice();var n=e*e;return t=Sn(t=On(t,n),n)}function En(t,e,n){return Math.sqrt(Nn(t,e,n,!0))}function Tn(t,e,n){return Nn(t,e,n)}function Sn(t,e){var n=t.length,i=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,zn(t,i,e,0,n-1);var o,r=[];for(o=0;o<n;o++)i[o]&&r.push(t[o]);return r}function zn(t,e,n,i,o){var r,a,s,l=0;for(a=i+1;a<=o-1;a++)(s=Nn(t[a],t[i],t[o],!0))>l&&(r=a,l=s);l>n&&(e[r]=1,zn(t,e,n,i,r),zn(t,e,n,r,o))}function On(t,e){for(var n=[t[0]],i=1,o=0,r=t.length;i<r;i++)Bn(t[i],t[o])>e&&(n.push(t[i]),o=i);return o<r-1&&n.push(t[r-1]),n}function Dn(t,e,n,i,o){var r,a,s,l=i?Mn:In(t,n),h=In(e,n);for(Mn=h;;){if(!(l|h))return[t,e];if(l&h)return!1;s=In(a=An(t,e,r=l||h,n,o),n),r===l?(t=a,l=s):(e=a,h=s)}}function An(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 In(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 Bn(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function Nn(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 Rn(t){return!g(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Zn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Rn(t)}function jn(t,e){var n,i,o,r,a,s,l,h;if(!t||0===t.length)throw new Error("latlngs not passed");Rn(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var u=H([0,0]),c=Z(t);c.getNorthWest().distanceTo(c.getSouthWest())*c.getNorthEast().distanceTo(c.getNorthWest())<1700&&(u=kn(t));var p=t.length,d=[];for(n=0;n<p;n++){var f=H(t[n]);d.push(e.project(H([f.lat-u.lat,f.lng-u.lng])))}for(n=0,i=0;n<p-1;n++)i+=d[n].distanceTo(d[n+1])/2;if(0===i)h=d[0];else for(n=0,r=0;n<p-1;n++)if(a=d[n],s=d[n+1],(r+=o=a.distanceTo(s))>i){l=(r-i)/o,h=[s.x-l*(s.x-a.x),s.y-l*(s.y-a.y)];break}var _=e.unproject(I(h));return H([_.lat+u.lat,_.lng+u.lng])}var Hn={__proto__:null,simplify:Pn,pointToSegmentDistance:En,closestPointOnSegment:Tn,clipSegment:Dn,_getEdgeIntersection:An,_getBitCode:In,_sqClosestPointOnSegment:Nn,isFlat:Rn,_flat:Zn,polylineCenter:jn},Un={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])},Gn={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)}},Fn={__proto__:null,LonLat:Un,Mercator:Gn,SphericalMercator:V},Wn=n({},F,{code:"EPSG:3395",projection:Gn,transformation:function(){var t=.5/(Math.PI*Gn.R);return Y(t,.5,-t,.5)}()}),Vn=n({},F,{code:"EPSG:4326",projection:Un,transformation:Y(1/180,1,-1/180,.5)}),qn=n({},G,{projection:Un,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});G.Earth=F,G.EPSG3395=Wn,G.EPSG3857=X,G.EPSG900913=K,G.EPSG4326=Vn,G.Simple=qn;var Yn=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.fire("add"),e.fire("layeradd",{layer:this})}}});rn.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),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 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 Xn=Yn.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("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)}}),Kn=function(t,e){return new Xn(t,e)},Jn=Xn.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Xn.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),Xn.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 R;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 Jn(t,e)},$n=T.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},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),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),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 Rt.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function ti(t){return new $n(t)}var ei=$n.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"string"!=typeof ei.imagePath&&(ei.imagePath=this._detectIconPath()),(this.options.imagePath||ei.imagePath)+$n.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(t,e,n){var i=e.exec(t);return i&&i[n]};return(t=e(t,/^url\((['"])?(.+)\1\)$/,2))&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=_e("div","leaflet-default-icon-path",document.body),e=fe(t,"background-image")||fe(t,"backgroundImage");if(document.body.removeChild(t),e=this._stripUrl(e))return e;var n=document.querySelector('link[href$="leaflet.css"]');return n?n.href.substring(0,n.href.length-11-1):""}}),ni=yn.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new Ln(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),Le(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&&we(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=Se(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),Te(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=Se(e._icon),o=e._map.layerPointToLatLng(i);n&&Te(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)}}),ii=Yn.extend({options:{icon:new ei,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){d(this,e),this._latlng=H(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=H(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||"")),Le(n,e),t.keyboard&&(n.tabIndex="0",n.setAttribute("role","button")),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Ze(n,"focus",this._panOnFocus,this);var o=t.icon.createShadow(this._shadow),r=!1;o!==this._shadow&&(this._removeShadow(),r=!0),o&&(Le(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}),this.options.autoPanOnFocus&&He(this._icon,"focus",this._panOnFocus,this),me(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&me(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&Te(this._icon,t),this._shadow&&Te(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&&(Le(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),ni)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new ni(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&&Me(this._icon,t),this._shadow&&Me(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var e=this.options.icon.options,n=e.iconSize?I(e.iconSize):I(0,0),i=e.iconAnchor?I(e.iconAnchor):I(0,0);t.panInside(this._latlng,{paddingTopLeft:i,paddingBottomRight:n.subtract(i)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function oi(t,e){return new ii(t,e)}var ri=Yn.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||0)}}),ai=ri.extend({options:{fill:!0,radius:10},initialize:function(t,e){d(this,e),this._latlng=H(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=H(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 ri.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 si(t,e){return new ai(t,e)}var li=ai.extend({initialize:function(t,e,i){if("number"==typeof e&&(e=n({},i,{radius:e})),d(this,e),this._latlng=H(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 R(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:ri.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 hi(t,e,n){return new li(t,e,n)}var ui=ri.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=Nn,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()");return jn(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=H(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new R,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Rn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=Rn(t),i=0,o=t.length;i<o;i++)n?(e[i]=H(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._rawPxBounds&&(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=Dn(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]=Pn(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)&&En(t,s[o],s[i])<=l)return!0;return!1}});function ci(t,e){return new ui(t,e)}ui._flat=Zn;var pi=ui.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()");return xn(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=ui.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){ui.prototype._setLatLngs.call(this,t),Rn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Rn(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=wn(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||ui.prototype._containsPoint.call(this,t,!0)}});function di(t,e){return new pi(t,e)}var fi=Jn.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=_i(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 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 _i(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||gi;if(!s&&!a)return null;switch(a.type){case"Point":return mi(h,t,n=u(s),e);case"MultiPoint":for(o=0,r=s.length;o<r;o++)n=u(s[o]),l.push(mi(h,t,n,e));return new Jn(l);case"LineString":case"MultiLineString":return i=yi(s,"LineString"===a.type?0:1,u),new ui(i,e);case"Polygon":case"MultiPolygon":return i=yi(s,"Polygon"===a.type?1:2,u),new pi(i,e);case"GeometryCollection":for(o=0,r=a.geometries.length;o<r;o++){var c=_i({geometry:a.geometries[o],type:"Feature",properties:t.properties},e);c&&l.push(c)}return new Jn(l);case"FeatureCollection":for(o=0,r=a.features.length;o<r;o++){var p=_i(a.features[o],e);p&&l.push(p)}return new Jn(l);default:throw new Error("Invalid GeoJSON object.")}}function mi(t,e,n,i){return t?t(e,n):new ii(n,i&&i.markersInheritOptions&&i)}function gi(t){return new j(t[1],t[0],t[2])}function yi(t,e,n){for(var i,o=[],r=0,a=t.length;r<a;r++)i=e?yi(t[r],e-1,n):(n||gi)(t[r]),o.push(i);return o}function vi(t,e){return void 0!==(t=H(t)).alt?[u(t.lng,e),u(t.lat,e),u(t.alt,e)]:[u(t.lng,e),u(t.lat,e)]}function bi(t,e,n,i){for(var o=[],r=0,a=t.length;r<a;r++)o.push(e?bi(t[r],Rn(t[r])?0:e-1,n,i):vi(t[r],i));return!e&&n&&o.length>0&&o.push(o[0].slice()),o}function Li(t,e){return t.feature?n({},t.feature,{geometry:e}):wi(e)}function wi(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var xi={toGeoJSON:function(t){return Li(this,{type:"Point",coordinates:vi(this.getLatLng(),t)})}};function ki(t,e){return new fi(t,e)}ii.include(xi),li.include(xi),ai.include(xi),ui.include({toGeoJSON:function(t){var e=!Rn(this._latlngs);return Li(this,{type:(e?"Multi":"")+"LineString",coordinates:bi(this._latlngs,e?1:0,!1,t)})}}),pi.include({toGeoJSON:function(t){var e=!Rn(this._latlngs),n=e&&!Rn(this._latlngs[0]),i=bi(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),Li(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),Xn.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(n){e.push(n.toGeoJSON(t).geometry.coordinates)}),Li(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=wi(o);"FeatureCollection"===r.type?i.push.apply(i,r.features):i.push(r)}}}),n?Li(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var Mi=ki,Ci=Yn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=Z(e),d(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Le(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){me(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&&ye(this._image),this},bringToBack:function(){return this._map&&ve(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:_e("img");Le(e,"leaflet-image-layer"),this._zoomAnimated&&Le(e,"leaflet-zoom-animated"),this.options.className&&Le(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;Ee(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();Te(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){Me(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),Pi=function(t,e,n){return new Ci(t,e,n)},Ei=Ci.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:_e("video");if(Le(e,"leaflet-image-layer"),this._zoomAnimated&&Le(e,"leaflet-zoom-animated"),this.options.className&&Le(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,e.playsInline=!!this.options.playsInline;for(var a=0;a<this._url.length;a++){var s=_e("source");s.src=this._url[a],e.appendChild(s)}}}});function Ti(t,e,n){return new Ei(t,e,n)}var Si=Ci.extend({_initImage:function(){var t=this._image=this._url;Le(t,"leaflet-image-layer"),this._zoomAnimated&&Le(t,"leaflet-zoom-animated"),this.options.className&&Le(t,this.options.className),t.onselectstart=h,t.onmousemove=h}});function zi(t,e,n){return new Si(t,e,n)}var Oi=Yn.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof j||g(t))?(this._latlng=H(t),d(this,e)):(d(this,t),this._source=e),this.options.content&&(this._content=this.options.content)},openOn:function(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&Me(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&Me(this._container,1),this.bringToFront(),this.options.interactive&&(Le(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(Me(this._container,0),this._removeTimeout=setTimeout(o(me,void 0,this._container),200)):me(this._container),this.options.interactive&&(we(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=H(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&&ye(this._container),this},bringToBack:function(){return this._map&&ve(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof Jn){e=null;var n=this._source._layers;for(var i in n)if(n[i]._map){e=n[i];break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else{if(!e.getBounds)throw new Error("Unable to get source layer LatLng.");t=e.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_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?Te(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]}});rn.include({_initOverlay:function(t,e,n,i){var o=e;return o instanceof t||(o=new t(i).setContent(e)),n&&o.setLatLng(n),o}}),Yn.include({_initOverlay:function(t,e,n,i){var o=n;return o instanceof t?(d(o,i),o._source=this):(o=e&&!i?e:new t(i,this)).setContent(n),o}});var Di=Oi.extend({options:{pane:"popupPane",offset:[0,7],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=arguments.length?t:this._source._map).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,Oi.prototype.openOn.call(this,t)},onAdd:function(t){Oi.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof ri||this._source.on("preclick",Ve))},onRemove:function(t){Oi.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof ri||this._source.off("preclick",Ve))},getEvents:function(){var t=Oi.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},_initLayout:function(){var t="leaflet-popup",e=this._container=_e("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=_e("div",t+"-content-wrapper",e);if(this._contentNode=_e("div",t+"-content",n),Ye(e),qe(this._contentNode),Ze(e,"contextmenu",Ve),this._tipContainer=_e("div",t+"-tip-container",e),this._tip=_e("div",t+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=_e("a",t+"-close-button",e);i.setAttribute("role","button"),i.setAttribute("aria-label","Close popup"),i.href="#close",i.innerHTML='<span aria-hidden="true">×</span>',Ze(i,"click",function(t){Xe(t),this.close()},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",Le(t,r)):we(t,r),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();Te(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var t=this._map,e=parseInt(fe(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,o=new D(this._containerLeft,-n-this._containerBottom);o._add(Se(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)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([u,c]))}},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Ai=function(t,e){return new Di(t,e)};rn.mergeOptions({closePopupOnClick:!0}),rn.include({openPopup:function(t,e,n){return this._initOverlay(Di,t,e,n).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),Yn.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Di,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof Jn||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){Ke(t);var e=t.layer||t.target;this._popup._source!==e||e instanceof ri?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Ii=Oi.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Oi.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Oi.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Oi.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=_e("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+a(this))},_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),we(o,"leaflet-tooltip-right"),we(o,"leaflet-tooltip-left"),we(o,"leaflet-tooltip-top"),we(o,"leaflet-tooltip-bottom"),Le(o,"leaflet-tooltip-"+s),Te(o,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&Me(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])}}),Bi=function(t,e){return new Ii(t,e)};rn.include({openTooltip:function(t,e,n){return this._initOverlay(Ii,t,e,n).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),Yn.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Ii,this._tooltip,t,e),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,n.click=this._openTooltip,this._map?this._addFocusListeners():n.add=this._addFocusListeners),this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof Jn||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&(Ze(e,"focus",function(){this._tooltip._source=t,this.openTooltip()},this),Ze(e,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&e.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){if(this._tooltip&&this._map)if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var e=this;this._map.once("moveend",function(){e._openOnceFlag=!1,e._openTooltip(t)})}else this._tooltip._source=t.layer||t.target,this.openTooltip(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 Ni=$n.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?(ge(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 Ri(t){return new Ni(t)}$n.Default=ei;var Zi=Yn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Rt.mobile,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()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),me(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(ye(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ve(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(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return 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&&!Rt.ielt9){Me(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);Me(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=_e("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)):(me(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=_e("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)me(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();Rt.any3d?Ee(t.el,o,i):Te(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 Z(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 R(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&&(me(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){Le(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,Rt.ielt9&&this.options.opacity<1&&Me(t,this.options.opacity)},_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)),Te(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?(Me(n.el,0),P(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(Le(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Rt.ielt9||!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 ji(t){return new Zi(t)}var Hi=Zi.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=d(this,e)).detectRetina&&Rt.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return Ze(n,"load",o(this._tileOnLoad,this,e,n)),Ze(n,"error",o(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(n.referrerPolicy=this.options.referrerPolicy),n.alt="",n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:Rt.retina?"@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){Rt.ielt9?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)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=h,e.onerror=h,!e.complete)){e.src=v;var n=this._tiles[t].coords;me(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:n})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",v),Zi.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==v))return Zi.prototype._tileReady.call(this,t,e,n)}});function Ui(t,e){return new Hi(t,e)}var Gi=Hi.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&&Rt.retina?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,Hi.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===Vn?[o.y,o.x,r.y,r.x]:[o.x,o.y,r.x,r.y]).join(","),s=Hi.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 Fi(t,e){return new Gi(t,e)}Hi.WMS=Gi,Ui.wms=Fi;var Wi=Yn.extend({options:{padding:.1},initialize:function(t){d(this,t),a(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Le(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=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),r=i.multiplyBy(-n).add(o).subtract(this._map._getNewPixelOrigin(t,e));Rt.any3d?Ee(this._container,r,n):Te(this._container,r)},_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()}}),Vi=Wi.extend({options:{tolerance:0},getEvents:function(){var t=Wi.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Wi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Ze(t,"mousemove",this._onMouseMove,this),Ze(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ze(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){P(this._redrawRequest),delete this._ctx,me(this._container),He(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){Wi.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=Rt.retina?2:1;Te(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",Rt.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Wi.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);this._fireEvent(!!n&&[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&&(we(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&&(Le(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._fireEvent(!!this._hoveredLayer&&[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 qi(t){return Rt.canvas?new Vi(t):null}var Yi=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">')}}(),Xi={_initContainer:function(){this._container=_e("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Wi.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Yi("shape");Le(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Yi("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;me(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=Yi("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=Yi("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){ye(t._container)},_bringToBack:function(t){ve(t._container)}},Ki=Rt.vml?Yi:J,Ji=Wi.extend({_initContainer:function(){this._container=Ki("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ki("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){me(this._container),He(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){Wi.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)),Te(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=Ki("path");t.options.className&&Le(e,t.options.className),t.options.interactive&&Le(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){me(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){ye(t._path)},_bringToBack:function(t){ve(t._path)}});function Qi(t){return Rt.svg||Rt.vml?new Ji(t):null}Rt.vml&&Ji.include(Xi),rn.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&&qi(t)||Qi(t)}});var $i=pi.extend({initialize:function(t,e){pi.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=Z(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function to(t,e){return new $i(t,e)}Ji.create=Ki,Ji.pointsToPath=Q,fi.geometryToLayer=_i,fi.coordsToLatLng=gi,fi.coordsToLatLngs=yi,fi.latLngToCoords=vi,fi.latLngsToCoords=bi,fi.getFeature=Li,fi.asFeature=wi,rn.mergeOptions({boxZoom:!0});var eo=yn.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(){Ze(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){He(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){me(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(),re(),Oe(),this._startPoint=this._map.mouseEventToContainerPoint(t),Ze(document,{contextmenu:Ke,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=_e("div","leaflet-zoom-box",this._container),Le(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();Te(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(me(this._box),we(this._container,"leaflet-crosshair")),ae(),De(),He(document,{contextmenu:Ke,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 R(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});rn.addInitHook("addHandler","boxZoom",eo),rn.mergeOptions({doubleClickZoom:!0});var no=yn.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)}});rn.addInitHook("addHandler","doubleClickZoom",no),rn.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var io=yn.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new Ln(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))}Le(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){we(this._map._container,"leaflet-grab"),we(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,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||t.noInertia||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")}}});rn.addInitHook("addHandler","dragging",io),rn.mergeOptions({keyboard:!0,keyboardPanDelta:80});var oo=yn.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"),Ze(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(),He(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(){Ze(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){He(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){if(!i._panAnim||!i._panAnim._inProgress)if(e=this._panKeys[n],t.shiftKey&&(e=I(e).multiplyBy(3)),i.options.maxBounds&&(e=i._limitOffset(I(e),i.options.maxBounds)),i.options.worldCopyJump){var o=i.wrapLatLng(i.unproject(i.project(i.getCenter()).add(e)));i.panTo(o)}else i.panBy(e)}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()}Ke(t)}}});rn.addInitHook("addHandler","keyboard",oo),rn.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var ro=yn.extend({addHooks:function(){Ze(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){He(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=tn(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),Ke(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))}});rn.addInitHook("addHandler","scrollWheelZoom",ro);var ao=600;rn.mergeOptions({tapHold:Rt.touchNative&&Rt.safari&&Rt.mobile,tapTolerance:15});var so=yn.extend({addHooks:function(){Ze(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){He(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var e=t.touches[0];this._startPos=this._newPos=new D(e.clientX,e.clientY),this._holdTimeout=setTimeout(o(function(){this._cancel(),this._isTapValid()&&(Ze(document,"touchend",Xe),Ze(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),ao),Ze(document,"touchend touchcancel contextmenu",this._cancel,this),Ze(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){He(document,"touchend",Xe),He(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),He(document,"touchend touchcancel contextmenu",this._cancel,this),He(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new D(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var n=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});n._simulated=!0,e.target.dispatchEvent(n)}});rn.addInitHook("addHandler","tapHold",so),rn.mergeOptions({touchZoom:Rt.touch,bounceAtZoomLimits:!0});var lo=yn.extend({addHooks:function(){Le(this._map._container,"leaflet-touch-zoom"),Ze(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){we(this._map._container,"leaflet-touch-zoom"),He(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(),Ze(document,"touchmove",this._onTouchMove,this),Ze(document,"touchend touchcancel",this._onTouchEnd,this),Xe(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},void 0);this._animRequest=C(s,this,!0),Xe(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,P(this._animRequest),He(document,"touchmove",this._onTouchMove,this),He(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});rn.addInitHook("addHandler","touchZoom",lo),rn.BoxZoom=eo,rn.DoubleClickZoom=no,rn.Drag=io,rn.Keyboard=oo,rn.ScrollWheelZoom=ro,rn.TapHold=so,rn.TouchZoom=lo,t.Bounds=B,t.Browser=Rt,t.CRS=G,t.Canvas=Vi,t.Circle=li,t.CircleMarker=ai,t.Class=T,t.Control=sn,t.DivIcon=Ni,t.DivOverlay=Oi,t.DomEvent=nn,t.DomUtil=Re,t.Draggable=Ln,t.Evented=O,t.FeatureGroup=Jn,t.GeoJSON=fi,t.GridLayer=Zi,t.Handler=yn,t.Icon=$n,t.ImageOverlay=Ci,t.LatLng=j,t.LatLngBounds=R,t.Layer=Yn,t.LayerGroup=Xn,t.LineUtil=Hn,t.Map=rn,t.Marker=ii,t.Mixin=vn,t.Path=ri,t.Point=D,t.PolyUtil=Cn,t.Polygon=pi,t.Polyline=ui,t.Popup=Di,t.PosAnimation=on,t.Projection=Fn,t.Rectangle=$i,t.Renderer=Wi,t.SVG=Ji,t.SVGOverlay=Si,t.TileLayer=Hi,t.Tooltip=Ii,t.Transformation=q,t.Util=E,t.VideoOverlay=Ei,t.bind=o,t.bounds=N,t.canvas=qi,t.circle=hi,t.circleMarker=si,t.control=ln,t.divIcon=Ri,t.extend=n,t.featureGroup=Qn,t.geoJSON=ki,t.geoJson=Mi,t.gridLayer=ji,t.icon=ti,t.imageOverlay=Pi,t.latLng=H,t.latLngBounds=Z,t.layerGroup=Kn,t.map=an,t.marker=oi,t.point=I,t.polygon=di,t.polyline=ci,t.popup=Ai,t.rectangle=to,t.setOptions=d,t.stamp=a,t.svg=Qi,t.svgOverlay=zi,t.tileLayer=Ui,t.tooltip=Bi,t.transformation=Y,t.version=e,t.videoOverlay=Ti;var ho=window.L;t.noConflict=function(){return window.L=ho,this},window.L=t}(e)},929:(t,e,n)=>{n.d(e,{P:()=>u});var i=Symbol("newer"),o=Symbol("older"),r=function(t,e){this.key=t,this.value=e,this[i]=void 0,this[o]=void 0},a=function(){function t(t,e){"number"!=typeof t&&(e=t,t=0),this.size=0,this.limit=t,this.oldest=this.newest=void 0,this._keymap=new Map,e&&(this.assign(e),t<1&&(this.limit=this.size))}return t.prototype._markEntryAsUsed=function(t){t!==this.newest&&(t[i]&&(t===this.oldest&&(this.oldest=t[i]),t[i][o]=t[o]),t[o]&&(t[o][i]=t[i]),t[i]=void 0,t[o]=this.newest,this.newest&&(this.newest[i]=t),this.newest=t)},t.prototype.assign=function(t){var e,n=this.limit||Number.MAX_VALUE;this._keymap.clear();for(var a=t[Symbol.iterator](),s=a.next();!s.done;s=a.next()){var l=new r(s.value[0],s.value[1]);if(this._keymap.set(l.key,l),e?(e[i]=l,l[o]=e):this.oldest=l,e=l,0==n--)throw new Error("overflow")}this.newest=e,this.size=this._keymap.size},t.prototype.get=function(t){var e=this._keymap.get(t);if(e)return this._markEntryAsUsed(e),e.value},t.prototype.set=function(t,e){var n=this._keymap.get(t);return n?(n.value=e,this._markEntryAsUsed(n),this):(this._keymap.set(t,n=new r(t,e)),this.newest?(this.newest[i]=n,n[o]=this.newest):this.oldest=n,this.newest=n,++this.size,this.size>this.limit&&this.shift(),this)},t.prototype.shift=function(){var t=this.oldest;if(t)return this.oldest[i]?(this.oldest=this.oldest[i],this.oldest[o]=void 0):(this.oldest=void 0,this.newest=void 0),t[i]=t[o]=void 0,this._keymap.delete(t.key),--this.size,[t.key,t.value]},t.prototype.find=function(t){var e=this._keymap.get(t);return e?e.value:void 0},t.prototype.has=function(t){return this._keymap.has(t)},t.prototype.delete=function(t){var e=this._keymap.get(t);if(e)return this._keymap.delete(e.key),e[i]&&e[o]?(e[o][i]=e[i],e[i][o]=e[o]):e[i]?(e[i][o]=void 0,this.oldest=e[i]):e[o]?(e[o][i]=void 0,this.newest=e[o]):this.oldest=this.newest=void 0,this.size--,e.value},t.prototype.clear=function(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()},t.prototype.keys=function(){return new l(this.oldest)},t.prototype.values=function(){return new h(this.oldest)},t.prototype.entries=function(){return this},t.prototype[Symbol.iterator]=function(){return new s(this.oldest)},t.prototype.forEach=function(t,e){"object"!=typeof e&&(e=this);for(var n=this.oldest;n;)t.call(e,n.value,n.key,this),n=n[i]},t.prototype.toJSON=function(){for(var t=new Array(this.size),e=0,n=this.oldest;n;)t[e++]={key:n.key,value:n.value},n=n[i];return t},t.prototype.toString=function(){for(var t="",e=this.oldest;e;)t+=String(e.key)+":"+e.value,(e=e[i])&&(t+=" < ");return t},t}();function s(t){this.entry=t}function l(t){this.entry=t}function h(t){this.entry=t}s.prototype[Symbol.iterator]=function(){return this},s.prototype.next=function(){var t=this.entry;return t?(this.entry=t[i],{done:!1,value:[t.key,t.value]}):{done:!0,value:void 0}},l.prototype[Symbol.iterator]=function(){return this},l.prototype.next=function(){var t=this.entry;return t?(this.entry=t[i],{done:!1,value:t.key}):{done:!0,value:void 0}},h.prototype[Symbol.iterator]=function(){return this},h.prototype.next=function(){var t=this.entry;return t?(this.entry=t[i],{done:!1,value:t.value}):{done:!0,value:void 0}},L.GridLayer.GoogleMutant=L.GridLayer.extend({options:{maxZoom:21,type:"roadmap",maxNativeZoom:21},initialize:function(t){L.GridLayer.prototype.initialize.call(this,t),this._tileCallbacks={},this._lru=new a(100),this._imagesPerTile="hybrid"===this.options.type?2:1,this._boundOnMutatedImage=this._onMutatedImage.bind(this)},onAdd:function(t){var e,n,i,o,r=this;L.GridLayer.prototype.onAdd.call(this,t),this._initMutantContainer(),this._logoContainer&&t._controlCorners.bottomleft.appendChild(this._logoContainer),this._attributionContainer&&t._controlCorners.bottomright.appendChild(this._attributionContainer),e=function(){r._map&&(r._initMutant(),google.maps.event.addListenerOnce(r._mutant,"idle",function(){r._map&&(r._checkZoomLevels(),r._mutantIsReady=!0)}))},i=0,o=null,o=setInterval(function(){if(i>=20)throw clearInterval(o),new Error("window.google not found after 10 seconds");window.google&&window.google.maps&&window.google.maps.Map&&(clearInterval(o),e.call(n)),++i},500)},onRemove:function(t){L.GridLayer.prototype.onRemove.call(this,t),this._observer.disconnect(),t._container.removeChild(this._mutantContainer),this._logoContainer&&L.DomUtil.remove(this._logoContainer),this._attributionContainer&&L.DomUtil.remove(this._attributionContainer),this._mutant&&google.maps.event.clearListeners(this._mutant,"idle")},addGoogleLayer:function(t,e){var n=this;return this._subLayers||(this._subLayers={}),this.whenReady(function(){var i=new(0,google.maps[t])(e);i.setMap(n._mutant),n._subLayers[t]=i}),this},removeGoogleLayer:function(t){var e=this;return this.whenReady(function(){var n=e._subLayers&&e._subLayers[t];n&&(n.setMap(null),delete e._subLayers[t])}),this},_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.pointerEvents="none",this._mutantContainer.style.visibility="hidden",L.DomEvent.off(this._mutantContainer)),this._map.getContainer().appendChild(this._mutantContainer),this.setOpacity(this.options.opacity);var t=this._mutantContainer.style;this._map.options.zoomSnap<1?(t.width="180%",t.height="180%"):(t.width="100%",t.height="100%"),t.zIndex=-1,this._attachObserver(this._mutantContainer)},_initMutant:function(){if(!this._mutant){var t={center:{lat:0,lng:0},zoom:0,tilt:0,mapTypeId:this.options.type,disableDefaultUI:!0,keyboardShortcuts:!1,draggable:!1,disableDoubleClickZoom:!0,scrollwheel:!1,styles:this.options.styles||[],backgroundColor:"transparent"};null!=this.options.mapId&&(t.mapId=this.options.mapId);var e=new google.maps.Map(this._mutantContainer,t);this._mutant=e,this._update(),this.fire("spawned",{mapObject:e}),this._waitControls(),this.once("controls_ready",this._setupAttribution)}},_attachObserver:function(t){this._observer||(this._observer=new MutationObserver(this._onMutations.bind(this))),this._observer.observe(t,{childList:!0,subtree:!0}),Array.prototype.forEach.call(t.querySelectorAll("img"),this._boundOnMutatedImage)},_waitControls:function(){var t=this,e=setInterval(function(){var n,i=t._mutant.__gm.layoutManager;i&&(clearInterval(e),Object.keys(i).forEach(function(t){var e=i[t];e.get&&e.get(1)instanceof Node&&(n=e)}),t.fire("controls_ready",{positions:n}))},50)},_setupAttribution:function(t){if(this._map){var e=google.maps.ControlPosition,n=this._attributionContainer=t.positions.get(e.BOTTOM_RIGHT);L.DomUtil.addClass(n,"leaflet-control leaflet-control-attribution"),L.DomEvent.disableClickPropagation(n),n.style.height="14px",this._map._controlCorners.bottomright.appendChild(n),this._logoContainer=t.positions.get(e.BOTTOM_LEFT),this._logoContainer.style.pointerEvents="auto",this._map._controlCorners.bottomleft.appendChild(this._logoContainer)}},_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._boundOnMutatedImage)}},_roadRegexp:/!1i(\d+)!2i(\d+)!3i(\d+|VinaFnapurmBegrtn)!/,_satRegexp:/x=(\d+)&y=(\d+)&z=(\d+|VinaFnapurmBegrtn)/,_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";var r=o+"/"+i;this._lru.set(r,t),r in this._tileCallbacks&&this._tileCallbacks[r]&&(this._tileCallbacks[r].forEach(function(e){return e(t)}),delete this._tileCallbacks[r])}},createTile:function(t,e){var n=this._tileCoordsToKey(t),i=L.DomUtil.create("div");i.style.textAlign="left",i.dataset.pending=this._imagesPerTile,e=e.bind(this,null,i);for(var o=0;o<this._imagesPerTile;++o){var r=n+"/"+o,a=this._lru.get(r);a?(i.appendChild(this._clone(a)),--i.dataset.pending):(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())},_update:function(t){if(this._mutant){t=t||this._map.getCenter();var e=new google.maps.LatLng(t.lat,t.lng),n=Math.round(this._map.getZoom()),i=this._mutant.getZoom();this._mutant.setCenter(e),n!==i&&(this._mutant.setZoom(n),this._mutantIsReady&&this._checkZoomLevels())}L.GridLayer.prototype._update.call(this,t)},whenReady:function(t,e){return this._mutant?t.call(e||this,{target:this}):this.on("spawned",t,e),this}}),L.gridLayer.googleMutant=function(t){return new L.GridLayer.GoogleMutant(t)};var u=L.GridLayer.GoogleMutant},935: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}},974: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)},978:(t,e,n)=>{n.d(e,{Z:()=>l,_:()=>h});var i=n(608),o=n(902),r=n(900),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.C6)(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.C6)(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)},983:(t,e,n)=>{var i=n(591),o=n.n(i),r=n(740),a=n.n(r),s=n(128),l=n.n(s),h=n(855),u=n.n(h),c=n(51),p=n.n(c),d=n(656),f=n.n(d),_=n(141),m={};m.styleTagTransform=f(),m.setAttributes=u(),m.insert=l().bind(null,"head"),m.domAPI=a(),m.insertStyleElement=p(),o()(_.A,m),_.A&&_.A.locals&&_.A.locals}},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="undefined"!=typeof document&&document.baseURI||self.location.href,n.nc=void 0;var i={};return(()=>{n.r(i),n.d(i,{BeautifyIcon:()=>r.X,D3SvgOverlay:()=>a.w,Draw:()=>h,GoogleMutant:()=>o.P,HeatLayer:()=>s._,LeafletLayer:()=>a.h,LeafletLayer2:()=>s.Z,MarkerClusterGroup:()=>l});var t=n(902),e={};for(const n in t)["default","MarkerClusterGroup","Draw"].indexOf(n)<0&&(e[n]=()=>t[n]);n.d(i,e),n(983),n(334),n(690),n(974),n(238),n(651);var o=n(929),r=n(743),a=n(812),s=n(978),l=t.MarkerClusterGroup,h=t.Draw})(),i})(),t.exports=e()}(Pr)),Pr.exports),Tr=function(t){function e(e){var n=t.call(this)||this;return n._layer=new Er.FeatureGroup,n._crs=Er.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=po("Albers").scale(.5),zr=po("AlbersUsaPr").scale(.5),Or={project:function(t){var e=zr([t.lng,t.lat]);return e||(e=Sr([t.lng,t.lat])),new Er.Point(e[0],e[1])},unproject:function(t){if(isNaN(t.x)||isNaN(t.y))return new Er.LatLng(0,0);var e=Sr.invert([t.x,t.y]);return new Er.LatLng(e[1],e[0])}},Dr=Er.Util.extend({},Er.CRS,{projection:Or,transformation:new Er.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.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=ir()),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.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.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 Rr=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.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);Rr.prototype._class+=" map_MapBoxLayer";fo(".map_Leaflet .leaflet-container{background-color:rgba(255,0,0,0);background:rgba(255,0,0,0)}");var Zr=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 Rr,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.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);Zr.prototype._class+=" map_Leaflet",Zr.prototype.publish("showToolbar",!0,"boolean","Show toolbar",void 0,{hidden:function(t){return t.isLayer()}}),Zr.prototype.publish("mapType","Google","set","Base Layer Type",["None","AlbersPR","MapBox","OpenStreet","Google"],{hidden:function(t){return t.isLayer()}}),Zr.prototype.publish("map",null,"widget","Base Layer",void 0,{internal:!0}),Zr.prototype.publish("layers",[],"propertyArray","Layers",void 0,{hidden:function(t){return t.isLayer()}}),Zr.prototype.publish("defaultLat",42.877742,"number","Center Latitude",void 0,{hidden:function(t){return t.isLayer()}}),Zr.prototype.publish("defaultLong",-97.380979,"number","Center Longitude",void 0,{hidden:function(t){return t.isLayer()}}),Zr.prototype.publish("defaultZoom",4,"number","Zoom Level",void 0,{hidden:function(t){return t.isLayer()}}),Zr.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.MarkerClusterGroup:new Er.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}(Zr);jr.prototype._class+=" map_FeatureLayer",jr.prototype.mixin(e.Utility.SimpleSelectionMixin),jr.prototype.publishReset(["layers"]);var Hr=function(t){function e(e){return void 0===e&&(e=!0),t.call(this,e)||this}return h(e,t),e}(jr);Hr.prototype._class+=" map_ClusterLayer";var Ur=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._lfd3=(new Er.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),Gr=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.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}(Hr);Gr.prototype._class+=" map_Circles",Gr.prototype.publish("latitudeColumn",null,"set","Latitude column",function(){return this.columns()},{optional:!0}),Gr.prototype.publish("longitudeColumn",null,"set","Longitude column",function(){return this.columns()},{optional:!0}),Gr.prototype.publish("radius",50,"number","Radius (meters)"),Gr.prototype.publish("strokeColor","#376cea","html-color","Stroke Color",null,{optional:!0}),Gr.prototype.publish("strokeColorColumn",null,"set","Stroke color column",function(){return this.columns()},{optional:!0}),Gr.prototype.publish("fillColor","#376cea","html-color","Fill Color",null,{optional:!0}),Gr.prototype.publish("fillColorColumn",null,"set","Fill color column",function(){return this.columns()},{optional:!0}),Gr.prototype.publish("fillOpacity",.5,"number","Opacity",null,{tags:["Advanced"]}),Gr.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"]});fo(".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.DivIcon({className:"cluster-circle",iconSize:new Er.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.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",",","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=Lo(e,e.objects[i]),t.prototype.addData.call(this,n));return this}return t.prototype.addData.call(this,e),this},e}(Er.GeoJSON),qr=null,Yr=null,Xr=null,Kr=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(),Oo("".concat(Eo(),"/us-states.json"),function(e){for(var n in Xr=Lo((qr=e).topology,qr.topology.objects.states).features,Kr={},Xr)Xr[n].id&&(Kr[qr.stateNames[Xr[n].id].code]=Xr[n]);t()})})),this._initPromise},e.prototype.initCounties=function(){return this._initPromise||(this._initPromise=new Promise(function(t,e){Yr&&t(),Oo("".concat(Eo(),"/us-counties.json"),function(e){for(var n in Xr=Lo((Yr=e).topology,Yr.topology.objects.counties).features,Kr={},Xr)Xr[n].id&&(Kr[Xr[n].id]=Xr[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(Xr,{style:function(t){return{color:"#000",opacity:1,weight:1,fillColor:"#35495d",fillOpacity:.2}}});this.add(n)}}(jr);fo(".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.LatLngBounds([e.getNorth(),e.getWest()],[e.getSouth(),e.getEast()]):new Er.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),Oo("".concat(Eo(),"/countries.json"),function(e){t(Qr=e)})}).then(function(e){var n;for(var i in t._features=Lo(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.Polyline(t)}),this._polygons=(t.polygons||[]).map(function(t){return new Er.Polygon(t)}),this._rectangles=(t.rectangles||[]).map(function(t){return new Er.Rectangle(t)}),this._circles=(t.circles||[]).map(function(t){return new Er.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.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.Draw.Event.EDITED,function(t){t.layers.eachLayer(function(t){n.changed("UPDATE",t)})}),e.on(Er.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.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.LatLngBounds([t[r],t[a]]),[t[r],t[a],n.weightColumn_exists()?t[s]:.5]}),h=new Er.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.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.point(i.tooltipOffsetX(),i.tooltipOffsetY())});var h=i.popupText(i.rowToObj(t),i.propValue(l,t,""));h&&e.bindPopup(h,{offset:Er.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}(Hr);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.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.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=po("Mercator").scale(ca).translate([r.x,r.y]),s=ci().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.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){Oo("".concat(Eo(),"/").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){Oo("".concat(Eo(),"/").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=Lo(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.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.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),Oo("".concat(Eo(),"/us-counties.json"),function(e){t(wa=e)})}).then(function(e){for(var n in t._features=Lo(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),Oo("".concat(Eo(),"/us-states.json"),function(e){t(Ma=e)})}).then(function(e){for(var n in t._features=Lo(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:Gr,ClusterCircles:Wr,ClusterIcons:ra,ClusterLayer:Hr,ClusterPins:_a,Countries:$r,D3Circles:Fr,D3SurfaceLayer:Ur,DrawLayer:ea,FeatureLayer:jr,HeatLayer:na,Icons:oa,Leaflet:Zr,Lines:da,Markers:ia,Path:pa,Pins:fa,Polygons:ua,Region:va,Text:ba,TileLayer:Tr,USCounties:ka,USStates:Pa,World:Jr});t.BUILD_VERSION="2.108.6",t.CanvasPinLayer=vo,t.CanvasPins=w,t.Choropleth=To,t.ChoroplethContinents=No,t.ChoroplethCounties=Ho,t.ChoroplethCountries=Bo,t.ChoroplethStates=Wo,t.ChoroplethStatesHeat=Vo,t.GMap=rr,t.GMapCounties=lr,t.GMapGraph=hr,t.GMapHeat=ur,t.GMapLayered=sr,t.GMapPin=pr,t.GMapPinLine=fr,t.GeoHash=qo,t.Graph=_r,t.Graticule=mr,t.Heat=gr,t.IChoropleth=yr,t.Layer=yo,t.Layered=mo,t.Leaflet=Ea,t.Lines=dr,t.OpenStreet=xr,t.PKG_NAME="@hpcc-js/map",t.PKG_VERSION="2.79.2",t.Pins=cr,t.TestHeatMap=kr,t.TopoJSONChoropleth=Mr,t.projections=uo,t.requireGoogleMap=ir,t.requireGoogleMapTimeout=function(t){nr=t},t.resolve=po,t.topoJsonFolder=Eo,t.types=ho});
|
|
7
7
|
//# sourceMappingURL=index.min.js.map
|