@hpcc-js/map 2.75.7 → 2.75.10

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.min.js CHANGED
@@ -1,4 +1,4 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@hpcc-js/common"),require("@hpcc-js/api"),require("@hpcc-js/layout"),require("@hpcc-js/util"),require("@hpcc-js/graph"),require("@hpcc-js/other")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common","@hpcc-js/api","@hpcc-js/layout","@hpcc-js/util","@hpcc-js/graph","@hpcc-js/other"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["@hpcc-js/map"]={},t["@hpcc-js/common"],t["@hpcc-js/api"],t["@hpcc-js/layout"],t["@hpcc-js/util"],t["@hpcc-js/graph"],t["@hpcc-js/other"])}(this,(function(t,e,n,i,o,r,a){"use strict";function s(t,e){return e.forEach((function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach((function(n){if("default"!==n&&!(n in t)){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}}))})),Object.freeze(t)}var l=function(t,e){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},l(t,e)};function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var u=function(){return u=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},u.apply(this,arguments)};function c(t,e,n){if(n||2===arguments.length)for(var i,o=0,r=e.length;o<r;o++)!i&&o in e||(i||(i=Array.prototype.slice.call(e,0,o)),i[o]=e[o]);return t.concat(i||Array.prototype.slice.call(e))}function p(t,e,n,i){if(isNaN(e)||isNaN(n))return t;var o,r,a,s,l,h,u,c,p,d=t._root,f={data:i},_=t._x0,m=t._y0,g=t._x1,y=t._y1;if(!d)return t._root=f,t;for(;d.length;)if((h=e>=(r=(_+g)/2))?_=r:g=r,(u=n>=(a=(m+y)/2))?m=a:y=a,o=d,!(d=d[c=u<<1|h]))return o[c]=f,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&n===l)return f.next=d,o?o[c]=f:t._root=f,t;do{o=o?o[c]=new Array(4):t._root=new Array(4),(h=e>=(r=(_+g)/2))?_=r:g=r,(u=n>=(a=(m+y)/2))?m=a:y=a}while((c=u<<1|h)==(p=(l>=a)<<1|s>=r));return o[p]=d,o[c]=f,t}function d(t,e,n,i,o){this.node=t,this.x0=e,this.y0=n,this.x1=i,this.y1=o}function f(t){return t[0]}function _(t){return t[1]}function m(t,e,n){var i=new g(null==e?f:e,null==n?_:n,NaN,NaN,NaN,NaN);return null==t?i:i.addAll(t)}function g(t,e,n,i,o,r){this._x=t,this._y=e,this._x0=n,this._y0=i,this._x1=o,this._y1=r,this._root=void 0}function y(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var v=m.prototype=g.prototype;v.copy=function(){var t,e,n=new g(this._x,this._y,this._x0,this._y0,this._x1,this._y1),i=this._root;if(!i)return n;if(!i.length)return n._root=y(i),n;for(t=[{source:i,target:n._root=new Array(4)}];i=t.pop();)for(var o=0;o<4;++o)(e=i.source[o])&&(e.length?t.push({source:e,target:i.target[o]=new Array(4)}):i.target[o]=y(e));return n},v.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return p(this.cover(e,n),e,n,t)},v.addAll=function(t){var e,n,i,o,r=t.length,a=new Array(r),s=new Array(r),l=1/0,h=1/0,u=-1/0,c=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(a[n]=i,s[n]=o,i<l&&(l=i),i>u&&(u=i),o<h&&(h=o),o>c&&(c=o));if(l>u||h>c)return this;for(this.cover(l,h).cover(u,c),n=0;n<r;++n)p(this,a[n],s[n],t[n]);return this},v.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,i=this._y0,o=this._x1,r=this._y1;if(isNaN(n))o=(n=Math.floor(t))+1,r=(i=Math.floor(e))+1;else{for(var a,s,l=o-n,h=this._root;n>t||t>=o||i>e||e>=r;)switch(s=(e<i)<<1|t<n,(a=new Array(4))[s]=h,h=a,l*=2,s){case 0:o=n+l,r=i+l;break;case 1:n=o-l,r=i+l;break;case 2:o=n+l,i=r-l;break;case 3:n=o-l,i=r-l}this._root&&this._root.length&&(this._root=h)}return this._x0=n,this._y0=i,this._x1=o,this._y1=r,this},v.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},v.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},v.find=function(t,e,n){var i,o,r,a,s,l,h,u=this._x0,c=this._y0,p=this._x1,f=this._y1,_=[],m=this._root;for(m&&_.push(new d(m,u,c,p,f)),null==n?n=1/0:(u=t-n,c=e-n,p=t+n,f=e+n,n*=n);l=_.pop();)if(!(!(m=l.node)||(o=l.x0)>p||(r=l.y0)>f||(a=l.x1)<u||(s=l.y1)<c))if(m.length){var g=(o+a)/2,y=(r+s)/2;_.push(new d(m[3],g,y,a,s),new d(m[2],o,y,g,s),new d(m[1],g,r,a,y),new d(m[0],o,r,g,y)),(h=(e>=y)<<1|t>=g)&&(l=_[_.length-1],_[_.length-1]=_[_.length-1-h],_[_.length-1-h]=l)}else{var v=t-+this._x.call(null,m.data),b=e-+this._y.call(null,m.data),L=v*v+b*b;if(L<n){var w=Math.sqrt(n=L);u=t-w,c=e-w,p=t+w,f=e+w,i=m.data}}return i},v.remove=function(t){if(isNaN(r=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,i,o,r,a,s,l,h,u,c,p,d=this._root,f=this._x0,_=this._y0,m=this._x1,g=this._y1;if(!d)return this;if(d.length)for(;;){if((h=r>=(s=(f+m)/2))?f=s:m=s,(u=a>=(l=(_+g)/2))?_=l:g=l,e=d,!(d=d[c=u<<1|h]))return this;if(!d.length)break;(e[c+1&3]||e[c+2&3]||e[c+3&3])&&(n=e,p=c)}for(;d.data!==t;)if(i=d,!(d=d.next))return this;return(o=d.next)&&delete d.next,i?(o?i.next=o:delete i.next,this):e?(o?e[c]=o:delete e[c],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[p]=d:this._root=d),this):(this._root=o,this)},v.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},v.root=function(){return this._root},v.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},v.visit=function(t){var e,n,i,o,r,a,s=[],l=this._root;for(l&&s.push(new d(l,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(l=e.node,i=e.x0,o=e.y0,r=e.x1,a=e.y1)&&l.length){var h=(i+r)/2,u=(o+a)/2;(n=l[3])&&s.push(new d(n,h,u,r,a)),(n=l[2])&&s.push(new d(n,i,u,h,a)),(n=l[1])&&s.push(new d(n,h,o,r,u)),(n=l[0])&&s.push(new d(n,i,o,h,u))}return this},v.visitAfter=function(t){var e,n=[],i=[];for(this._root&&n.push(new d(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var o=e.node;if(o.length){var r,a=e.x0,s=e.y0,l=e.x1,h=e.y1,u=(a+l)/2,c=(s+h)/2;(r=o[0])&&n.push(new d(r,a,s,u,c)),(r=o[1])&&n.push(new d(r,u,s,l,c)),(r=o[2])&&n.push(new d(r,a,c,u,h)),(r=o[3])&&n.push(new d(r,u,c,l,h))}i.push(e)}for(;e=i.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},v.x=function(t){return arguments.length?(this._x=t,this):this._x},v.y=function(t){return arguments.length?(this._y=t,this):this._y};var b=function(){function t(t,e,n,i){this._pin_h=0,this._pin_w=0,this._pin_h=n,this._pin_w=i,this._tree=m().extent(t).addAll(e)}return t.prototype.searchRect=function(t,e,n,i){var o=[];return this._tree.visit((function(r,a,s,l,h){var u,c,p=!1;do{if(!r.length)if(r.data&&!r.data.already_flagged)(u={left:t,right:n,top:e,bottom:i},((c=r.data)[0]<u.right||c[0]>u.left)&&(c[1]<u.bottom||c[1]>u.top))&&(r.data.already_flagged=!0,o.push(r.data));p=r=r.next}while(p);return a>=n||s>=i||l<t||h<e})),o},t.prototype.getTreeRects=function(){var t=[];return this._tree.visit((function(e,n,i,o,r){t.push([n,i,o-n,r-i])})),t},t}(),w=function(t){function e(){var e=t.call(this)||this;return e._overlap_count=0,e._sub_overlap_count=0,e}return h(e,t),e.prototype.enter=function(e,n){t.prototype.enter.apply(this,arguments),this.resize(this._size)},e.prototype.update=function(e,n){t.prototype.update.apply(this,arguments),this._ctx=this.element().node().getContext("2d");var i=this.topLeftX_exists()&&this.topLeftY_exists()&&this.bottomRightX_exists()&&this.bottomRightY_exists(),o=(i?this.skewedData():this.data()).map((function(t){return c([],t,!0)})).map((function(t){return t.is_cluster=!1,t.already_flagged=!1,t.weight=t[2],t.fillStyle="#FFFFFF",t.strokeStyle="#000000",t.overlap_arr=[],t}));this._ctx.clearRect(0,0,this.width(),this.height()),this._drawData=this.enableClustering()?this.applyClustering(o):o,this.draw(this._drawData)},e.prototype.applyClustering=function(t){var e=this,n=this;this._overlap_count=0;var i=this.pinHeight(),o=this.pinWidth(),r=o/2,a=i/2,s=new b([[0,0],[this.size().width,this.size().height]],t,i,o);switch(this._quadtree_rect_arr=s.getTreeRects(),this.clusterMode()){case"default":var l=t.map((function(t){if(!t.already_flagged){var n=e.searchRectMult(),i=t[0]-r*n,o=t[1]-a*n-8,l=t[0]+r*n,h=t[1]+a*n-8;t.overlap_arr=s.searchRect(i,o,l,h).filter((function(e){return e!==t})),0===t.overlap_arr.length&&(t.already_flagged=!1)}return t}));return l.forEach((function(t){t.already_flagged&&t.overlap_arr.length&&l.push(M(c([t],t.overlap_arr,!0)))})),l;case"grid":for(var h=c([],t,!0),u=this.gridCellSize(),p=this.gridCellSize(),d=Math.ceil(this.size().width/u),f=Math.ceil(this.size().height/p),_=0;_<f;_++)for(var m=0;m<d;m++){var g=u*m,y=p*_,v=u*(m+1),L=p*(_+1),w=s.searchRect(g,y,v,L);if(w.length>1){var x=g+u/2,k=y+p/2;h.push(M(w,x,k))}}return h}return t;function M(t,e,i){var o=t.reduce((function(t,e){return e.already_flagged=!0,t+e[2]}),0);return{0:void 0!==e?e:n.useAveragePos()?t.reduce((function(t,e){return t+e[0]*e[2]}),0)/o:t[0][0],1:void 0!==i?i:n.useAveragePos()?t.reduce((function(t,e){return t+e[1]*e[2]}),0)/o:t[0][1],weight:t.reduce((function(t,e){return t+e[2]}),0),is_cluster:!0,already_flagged:!1,fillStyle:"#FFFFFF",strokeStyle:"#000000",overlap_arr:[]}}},e.prototype.drawQuadtree=function(){var t=this;this._quadtree_rect_arr&&(this._ctx.strokeStyle="#000000",this._quadtree_rect_arr.forEach((function(e){t._ctx.strokeRect(e[0],e[1],e[2],e[3])})))},e.prototype.draw=function(t){var e=this,n=this,i=this._ctx;this.showQuadtree()&&this.drawQuadtree();var o=this.arrowHeight(),r=this.arrowWidth(),a=this.pinHeight(),s=this.pinWidth(),l=this.radiusWeightMult(),h=0;function u(t,e){var n=t.left+t.width/2-t.arrow_width/2,o=t.left+t.width/2,r=t.left+t.width/2+t.arrow_width/2,a=t.top+t.height,s=a+t.arrow_height,l=a;e?(i.fillStyle="#FFFFFF",i.strokeStyle="#FFFFFF",a-=2,s-=2,l-=2):(i.fillStyle="#FFFFFF",i.strokeStyle="#000000"),i.beginPath(),i.moveTo(n,a),i.lineTo(o,s),i.lineTo(r,l),i.lineTo(n,a),i.closePath(),i.stroke(),i.fill(),e||u(t,!0)}function c(t){i.font="".concat(n.pinFontSize(),"px '").concat(n.pinFontFamily(),"'");var e=t.left+t.width/2,o=t.top+t.height/2;i.textAlign="center",i.textBaseline="middle",i.fillStyle="#000000";for(var r=0,a=i.measureText(t.icon).width;a>t.width||!n.shrinkFontToPin();)r++,i.font="".concat(n.pinFontSize()-r,"px '").concat(n.pinFontFamily(),"'"),a=i.measureText(t.icon).width;i.fillText(t.icon,e,o)}this.useWeightedRadius()&&t.filter((function(t){return t.is_cluster})).forEach((function(t){h<t.weight&&(h=t.weight)})),t.filter((function(t){return!t.already_flagged})).sort((function(t,e){return t[1]>e[1]?1:-1})).forEach((function(t){if(t.is_cluster||e.allCircles()){var n=s/2;e.useWeightedRadius()&&(n+=s*(l*t.weight/h)),(p={icon:t.weight,left:Math.floor(t[0]-n)+.5,top:Math.floor(t[1]-n-o)+.5,radius:n,arrow_height:o,arrow_width:r}).width=2*p.radius,p.height=p.width,i.fillStyle="#FFFFFF",i.strokeStyle="#000000",i.beginPath(),i.arc(p.left+p.width/2,p.top+p.height/2,p.radius,0,2*Math.PI),i.closePath(),i.fill(),i.stroke(),c(p)}else!function(t){i.fillStyle=t.fillStyle,i.strokeStyle="#000000",i.fillRect(t.left,t.top,t.width,t.height),i.strokeRect(t.left,t.top,t.width,t.height),u(t),c(t)}({fillStyle:t.fillStyle,strokeStyle:t.strokeStyle,icon:t.weight,left:Math.floor(t[0]-s/2)+.5,top:Math.floor(t[1]-a-o)+.5,width:s,height:a,arrow_height:o,arrow_width:r});var p}))},e.prototype.skewedData=function(){var t=this,e=[],n=this.data(),i=this.size(),o=this.bottomRightX()-this.topLeftX(),r=this.bottomRightY()-this.topLeftY(),a=o/i.width,s=r/i.height;return n.forEach((function(n){var i=Math.abs(n[0]-t.topLeftX()),o=Math.abs(n[1]-t.topLeftY()),r=i/a,l=o/s;e.push([r,l,n[2]])})),e},e}(e.CanvasWidget);function x(){return new k}function k(){this.reset()}w.prototype._class+=" map_CanvasPins",w.prototype.publish("clusterMode","default","set","clusterMode",["defualt","grid"],{tags:["Basic"],optional:!0}),w.prototype.publish("gridCellSize",80,"number","gridCellSize",null,{tags:["Basic"],optional:!0}),w.prototype.publish("allCircles",!1,"boolean","allCircles",null,{tags:["Basic"],optional:!0}),w.prototype.publish("showQuadtree",!1,"boolean","showQuadtree",null,{tags:["Basic"],optional:!0}),w.prototype.publish("useAveragePos",!1,"boolean","useAveragePos",null,{tags:["Basic"],optional:!0}),w.prototype.publish("shrinkFontToPin",!0,"boolean","shrinkFontToPin",null,{tags:["Basic"],optional:!0}),w.prototype.publish("enableClustering",!0,"boolean","enableClustering",null,{tags:["Basic"],optional:!0}),w.prototype.publish("useWeightedRadius",!1,"boolean","useWeightedRadius",null,{tags:["Basic"],optional:!0}),w.prototype.publish("radiusWeightMult",.5,"number","radiusWeightMult",null,{tags:["Basic"],optional:!0}),w.prototype.publish("searchRectMult",3,"number","searchRectMult",null,{tags:["Basic"],optional:!0}),w.prototype.publish("bottomRightX",null,"number","Bottom right x-value",null,{tags:["Basic"],optional:!0}),w.prototype.publish("bottomRightY",null,"number","Bottom right y-value",null,{tags:["Basic"],optional:!0}),w.prototype.publish("topLeftX",null,"number","Top left x-value",null,{tags:["Basic"],optional:!0}),w.prototype.publish("topLeftY",null,"number","Top left y-value",null,{tags:["Basic"],optional:!0}),w.prototype.publish("pinHeight",20,"number","pinHeight",null,{tags:["Basic"],optional:!0}),w.prototype.publish("pinWidth",20,"number","pinWidth",null,{tags:["Basic"],optional:!0}),w.prototype.publish("pinFontFamily","Arial","string","pinFontFamily",null,{tags:["Basic"],optional:!0}),w.prototype.publish("pinFontSize",14,"number","pinFontSize",null,{tags:["Basic"],optional:!0}),w.prototype.publish("arrowHeight",8,"number","arrowHeight",null,{tags:["Basic"],optional:!0}),w.prototype.publish("arrowWidth",8,"number","arrowWidth",null,{tags:["Basic"],optional:!0}),k.prototype={constructor:k,reset:function(){this.s=this.t=0},add:function(t){C(M,t,this.t),C(this,M.s,this.s),this.s?this.t+=M.t:this.s=M.t},valueOf:function(){return this.s}};var M=new k;function C(t,e,n){var i=t.s=e+n,o=i-e,r=i-o;t.t=e-r+(n-o)}var P=1e-6,E=1e-12,T=Math.PI,S=T/2,z=T/4,O=2*T,D=180/T,A=T/180,I=Math.abs,B=Math.atan,N=Math.atan2,Z=Math.cos,R=Math.ceil,j=Math.exp,G=Math.log,U=Math.pow,H=Math.sin,F=Math.sign||function(t){return t>0?1:t<0?-1:0},W=Math.sqrt,V=Math.tan;function q(t){return t>1?0:t<-1?T:Math.acos(t)}function Y(t){return t>1?S:t<-1?-S:Math.asin(t)}function K(t){return(t=H(t/2))*t}function X(){}function J(t,e){t&&$.hasOwnProperty(t.type)&&$[t.type](t,e)}var Q={Feature:function(t,e){J(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,o=n.length;++i<o;)J(n[i].geometry,e)}},$={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)t=n[i],e.point(t[0],t[1],t[2])},LineString:function(t,e){tt(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)tt(n[i],e,0)},Polygon:function(t,e){et(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)et(n[i],e)},GeometryCollection:function(t,e){for(var n=t.geometries,i=-1,o=n.length;++i<o;)J(n[i],e)}};function tt(t,e,n){var i,o=-1,r=t.length-n;for(e.lineStart();++o<r;)i=t[o],e.point(i[0],i[1],i[2]);e.lineEnd()}function et(t,e){var n=-1,i=t.length;for(e.polygonStart();++n<i;)tt(t[n],e,1);e.polygonEnd()}function nt(t,e){t&&Q.hasOwnProperty(t.type)?Q[t.type](t,e):J(t,e)}var it,ot,rt,at,st,lt=x(),ht=x(),ut={point:X,lineStart:X,lineEnd:X,polygonStart:function(){lt.reset(),ut.lineStart=ct,ut.lineEnd=pt},polygonEnd:function(){var t=+lt;ht.add(t<0?O+t:t),this.lineStart=this.lineEnd=this.point=X},sphere:function(){ht.add(O)}};function ct(){ut.point=dt}function pt(){ft(it,ot)}function dt(t,e){ut.point=ft,it=t,ot=e,rt=t*=A,at=Z(e=(e*=A)/2+z),st=H(e)}function ft(t,e){var n=(t*=A)-rt,i=n>=0?1:-1,o=i*n,r=Z(e=(e*=A)/2+z),a=H(e),s=st*a,l=at*r+s*Z(o),h=s*i*H(o);lt.add(N(h,l)),rt=t,at=r,st=a}function _t(t){return[N(t[1],t[0]),Y(t[2])]}function mt(t){var e=t[0],n=t[1],i=Z(n);return[i*Z(e),i*H(e),H(n)]}function gt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function yt(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function vt(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function bt(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Lt(t){var e=W(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var wt,xt,kt,Mt,Ct,Pt,Et,Tt,St,zt,Ot,Dt,At,It,Bt,Nt,Zt,Rt,jt,Gt,Ut,Ht,Ft,Wt,Vt,qt,Yt=x(),Kt={point:Xt,lineStart:Qt,lineEnd:$t,polygonStart:function(){Kt.point=te,Kt.lineStart=ee,Kt.lineEnd=ne,Yt.reset(),ut.polygonStart()},polygonEnd:function(){ut.polygonEnd(),Kt.point=Xt,Kt.lineStart=Qt,Kt.lineEnd=$t,lt<0?(wt=-(kt=180),xt=-(Mt=90)):Yt>P?Mt=90:Yt<-P&&(xt=-90),zt[0]=wt,zt[1]=kt},sphere:function(){wt=-(kt=180),xt=-(Mt=90)}};function Xt(t,e){St.push(zt=[wt=t,kt=t]),e<xt&&(xt=e),e>Mt&&(Mt=e)}function Jt(t,e){var n=mt([t*A,e*A]);if(Tt){var i=yt(Tt,n),o=yt([i[1],-i[0],0],i);Lt(o),o=_t(o);var r,a=t-Ct,s=a>0?1:-1,l=o[0]*D*s,h=I(a)>180;h^(s*Ct<l&&l<s*t)?(r=o[1]*D)>Mt&&(Mt=r):h^(s*Ct<(l=(l+360)%360-180)&&l<s*t)?(r=-o[1]*D)<xt&&(xt=r):(e<xt&&(xt=e),e>Mt&&(Mt=e)),h?t<Ct?ie(wt,t)>ie(wt,kt)&&(kt=t):ie(t,kt)>ie(wt,kt)&&(wt=t):kt>=wt?(t<wt&&(wt=t),t>kt&&(kt=t)):t>Ct?ie(wt,t)>ie(wt,kt)&&(kt=t):ie(t,kt)>ie(wt,kt)&&(wt=t)}else St.push(zt=[wt=t,kt=t]);e<xt&&(xt=e),e>Mt&&(Mt=e),Tt=n,Ct=t}function Qt(){Kt.point=Jt}function $t(){zt[0]=wt,zt[1]=kt,Kt.point=Xt,Tt=null}function te(t,e){if(Tt){var n=t-Ct;Yt.add(I(n)>180?n+(n>0?360:-360):n)}else Pt=t,Et=e;ut.point(t,e),Jt(t,e)}function ee(){ut.lineStart()}function ne(){te(Pt,Et),ut.lineEnd(),I(Yt)>P&&(wt=-(kt=180)),zt[0]=wt,zt[1]=kt,Tt=null}function ie(t,e){return(e-=t)<0?e+360:e}function oe(t,e){return t[0]-e[0]}function re(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var ae={sphere:X,point:se,lineStart:he,lineEnd:pe,polygonStart:function(){ae.lineStart=de,ae.lineEnd=fe},polygonEnd:function(){ae.lineStart=he,ae.lineEnd=pe}};function se(t,e){t*=A;var n=Z(e*=A);le(n*Z(t),n*H(t),H(e))}function le(t,e,n){++Ot,At+=(t-At)/Ot,It+=(e-It)/Ot,Bt+=(n-Bt)/Ot}function he(){ae.point=ue}function ue(t,e){t*=A;var n=Z(e*=A);Wt=n*Z(t),Vt=n*H(t),qt=H(e),ae.point=ce,le(Wt,Vt,qt)}function ce(t,e){t*=A;var n=Z(e*=A),i=n*Z(t),o=n*H(t),r=H(e),a=N(W((a=Vt*r-qt*o)*a+(a=qt*i-Wt*r)*a+(a=Wt*o-Vt*i)*a),Wt*i+Vt*o+qt*r);Dt+=a,Nt+=a*(Wt+(Wt=i)),Zt+=a*(Vt+(Vt=o)),Rt+=a*(qt+(qt=r)),le(Wt,Vt,qt)}function pe(){ae.point=se}function de(){ae.point=_e}function fe(){me(Ht,Ft),ae.point=se}function _e(t,e){Ht=t,Ft=e,t*=A,e*=A,ae.point=me;var n=Z(e);Wt=n*Z(t),Vt=n*H(t),qt=H(e),le(Wt,Vt,qt)}function me(t,e){t*=A;var n=Z(e*=A),i=n*Z(t),o=n*H(t),r=H(e),a=Vt*r-qt*o,s=qt*i-Wt*r,l=Wt*o-Vt*i,h=W(a*a+s*s+l*l),u=Y(h),c=h&&-u/h;jt+=c*a,Gt+=c*s,Ut+=c*l,Dt+=u,Nt+=u*(Wt+(Wt=i)),Zt+=u*(Vt+(Vt=o)),Rt+=u*(qt+(qt=r)),le(Wt,Vt,qt)}function ge(t){return function(){return t}}function ye(t,e){function n(n,i){return n=t(n,i),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,i){return(n=e.invert(n,i))&&t.invert(n[0],n[1])}),n}function ve(t,e){return[I(t)>T?t+Math.round(-t/O)*O:t,e]}function be(t,e,n){return(t%=O)?e||n?ye(we(t),xe(e,n)):we(t):e||n?xe(e,n):ve}function Le(t){return function(e,n){return[(e+=t)>T?e-O:e<-T?e+O:e,n]}}function we(t){var e=Le(t);return e.invert=Le(-t),e}function xe(t,e){var n=Z(t),i=H(t),o=Z(e),r=H(e);function a(t,e){var a=Z(e),s=Z(t)*a,l=H(t)*a,h=H(e),u=h*n+s*i;return[N(l*o-u*r,s*n-h*i),Y(u*o+l*r)]}return a.invert=function(t,e){var a=Z(e),s=Z(t)*a,l=H(t)*a,h=H(e),u=h*o-l*r;return[N(l*o+h*r,s*n+u*i),Y(u*n-s*i)]},a}function ke(t){function e(e){return(e=t(e[0]*A,e[1]*A))[0]*=D,e[1]*=D,e}return t=be(t[0]*A,t[1]*A,t.length>2?t[2]*A:0),e.invert=function(e){return(e=t.invert(e[0]*A,e[1]*A))[0]*=D,e[1]*=D,e},e}function Me(t,e,n,i,o,r){if(n){var a=Z(e),s=H(e),l=i*n;null==o?(o=e+i*O,r=e-l/2):(o=Ce(a,o),r=Ce(a,r),(i>0?o<r:o>r)&&(o+=i*O));for(var h,u=o;i>0?u>r:u<r;u-=l)h=_t([a,-s*Z(u),-s*H(u)]),t.point(h[0],h[1])}}function Ce(t,e){(e=mt(e))[0]-=t,Lt(e);var n=q(-e[1]);return((-e[2]<0?-n:n)+O-P)%O}function Pe(){var t,e=[];return{point:function(e,n,i){t.push([e,n,i])},lineStart:function(){e.push(t=[])},lineEnd:X,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Ee(t,e){return I(t[0]-e[0])<P&&I(t[1]-e[1])<P}function Te(t,e,n,i){this.x=t,this.z=e,this.o=n,this.e=i,this.v=!1,this.n=this.p=null}function Se(t,e,n,i,o){var r,a,s=[],l=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,i=t[0],a=t[e];if(Ee(i,a)){if(!i[2]&&!a[2]){for(o.lineStart(),r=0;r<e;++r)o.point((i=t[r])[0],i[1]);return void o.lineEnd()}a[0]+=2e-6}s.push(n=new Te(i,t,null,!0)),l.push(n.o=new Te(i,null,n,!1)),s.push(n=new Te(a,t,null,!1)),l.push(n.o=new Te(a,null,n,!0))}})),s.length){for(l.sort(e),ze(s),ze(l),r=0,a=l.length;r<a;++r)l[r].e=n=!n;for(var h,u,c=s[0];;){for(var p=c,d=!0;p.v;)if((p=p.n)===c)return;h=p.z,o.lineStart();do{if(p.v=p.o.v=!0,p.e){if(d)for(r=0,a=h.length;r<a;++r)o.point((u=h[r])[0],u[1]);else i(p.x,p.n.x,1,o);p=p.n}else{if(d)for(h=p.p.z,r=h.length-1;r>=0;--r)o.point((u=h[r])[0],u[1]);else i(p.x,p.p.x,-1,o);p=p.p}h=(p=p.o).z,d=!d}while(!p.v);o.lineEnd()}}}function ze(t){if(e=t.length){for(var e,n,i=0,o=t[0];++i<e;)o.n=n=t[i],n.p=o,o=n;o.n=n=t[0],n.p=o}}ve.invert=ve;var Oe=x();function De(t){return I(t[0])<=T?t[0]:F(t[0])*((I(t[0])+T)%O-T)}function Ae(t,e){var n=De(e),i=e[1],o=H(i),r=[H(n),-Z(n),0],a=0,s=0;Oe.reset(),1===o?i=S+P:-1===o&&(i=-S-P);for(var l=0,h=t.length;l<h;++l)if(c=(u=t[l]).length)for(var u,c,p=u[c-1],d=De(p),f=p[1]/2+z,_=H(f),m=Z(f),g=0;g<c;++g,d=v,_=L,m=w,p=y){var y=u[g],v=De(y),b=y[1]/2+z,L=H(b),w=Z(b),x=v-d,k=x>=0?1:-1,M=k*x,C=M>T,E=_*L;if(Oe.add(N(E*k*H(M),m*w+E*Z(M))),a+=C?x+k*O:x,C^d>=n^v>=n){var D=yt(mt(p),mt(y));Lt(D);var A=yt(r,D);Lt(A);var I=(C^x>=0?-1:1)*Y(A[2]);(i>I||i===I&&(D[0]||D[1]))&&(s+=C^x>=0?1:-1)}}return(a<-P||a<P&&Oe<-P)^1&s}function Ie(t,n,i,o){return function(r){var a,s,l,h=n(r),u=Pe(),c=n(u),p=!1,d={point:f,lineStart:m,lineEnd:g,polygonStart:function(){d.point=y,d.lineStart=v,d.lineEnd=b,s=[],a=[]},polygonEnd:function(){d.point=f,d.lineStart=m,d.lineEnd=g,s=e.merge(s);var t=Ae(a,o);s.length?(p||(r.polygonStart(),p=!0),Se(s,Ne,t,i,r)):t&&(p||(r.polygonStart(),p=!0),r.lineStart(),i(null,null,1,r),r.lineEnd()),p&&(r.polygonEnd(),p=!1),s=a=null},sphere:function(){r.polygonStart(),r.lineStart(),i(null,null,1,r),r.lineEnd(),r.polygonEnd()}};function f(e,n){t(e,n)&&r.point(e,n)}function _(t,e){h.point(t,e)}function m(){d.point=_,h.lineStart()}function g(){d.point=f,h.lineEnd()}function y(t,e){l.push([t,e]),c.point(t,e)}function v(){c.lineStart(),l=[]}function b(){y(l[0][0],l[0][1]),c.lineEnd();var t,e,n,i,o=c.clean(),h=u.result(),d=h.length;if(l.pop(),a.push(l),l=null,d)if(1&o){if((e=(n=h[0]).length-1)>0){for(p||(r.polygonStart(),p=!0),r.lineStart(),t=0;t<e;++t)r.point((i=n[t])[0],i[1]);r.lineEnd()}}else d>1&&2&o&&h.push(h.pop().concat(h.shift())),s.push(h.filter(Be))}return d}}function Be(t){return t.length>1}function Ne(t,e){return((t=t.x)[0]<0?t[1]-S-P:S-t[1])-((e=e.x)[0]<0?e[1]-S-P:S-e[1])}var Ze=Ie((function(){return!0}),(function(t){var e,n=NaN,i=NaN,o=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(r,a){var s=r>0?T:-T,l=I(r-n);I(l-T)<P?(t.point(n,i=(i+a)/2>0?S:-S),t.point(o,i),t.lineEnd(),t.lineStart(),t.point(s,i),t.point(r,i),e=0):o!==s&&l>=T&&(I(n-o)<P&&(n-=o*P),I(r-s)<P&&(r-=s*P),i=function(t,e,n,i){var o,r,a=H(t-n);return I(a)>P?B((H(e)*(r=Z(i))*H(n)-H(i)*(o=Z(e))*H(t))/(o*r*a)):(e+i)/2}(n,i,r,a),t.point(o,i),t.lineEnd(),t.lineStart(),t.point(s,i),e=0),t.point(n=r,i=a),o=s},lineEnd:function(){t.lineEnd(),n=i=NaN},clean:function(){return 2-e}}}),(function(t,e,n,i){var o;if(null==t)o=n*S,i.point(-T,o),i.point(0,o),i.point(T,o),i.point(T,0),i.point(T,-o),i.point(0,-o),i.point(-T,-o),i.point(-T,0),i.point(-T,o);else if(I(t[0]-e[0])>P){var r=t[0]<e[0]?T:-T;o=n*r/2,i.point(-r,o),i.point(0,o),i.point(r,o)}else i.point(e[0],e[1])}),[-T,-S]);function Re(t){var e=Z(t),n=6*A,i=e>0,o=I(e)>P;function r(t,n){return Z(t)*Z(n)>e}function a(t,n,i){var o=[1,0,0],r=yt(mt(t),mt(n)),a=gt(r,r),s=r[0],l=a-s*s;if(!l)return!i&&t;var h=e*a/l,u=-e*s/l,c=yt(o,r),p=bt(o,h);vt(p,bt(r,u));var d=c,f=gt(p,d),_=gt(d,d),m=f*f-_*(gt(p,p)-1);if(!(m<0)){var g=W(m),y=bt(d,(-f-g)/_);if(vt(y,p),y=_t(y),!i)return y;var v,b=t[0],L=n[0],w=t[1],x=n[1];L<b&&(v=b,b=L,L=v);var k=L-b,M=I(k-T)<P;if(!M&&x<w&&(v=w,w=x,x=v),M||k<P?M?w+x>0^y[1]<(I(y[0]-b)<P?w:x):w<=y[1]&&y[1]<=x:k>T^(b<=y[0]&&y[0]<=L)){var C=bt(d,(-f+g)/_);return vt(C,p),[y,_t(C)]}}}function s(e,n){var o=i?t:T-t,r=0;return e<-o?r|=1:e>o&&(r|=2),n<-o?r|=4:n>o&&(r|=8),r}return Ie(r,(function(t){var e,n,l,h,u;return{lineStart:function(){h=l=!1,u=1},point:function(c,p){var d,f=[c,p],_=r(c,p),m=i?_?0:s(c,p):_?s(c+(c<0?T:-T),p):0;if(!e&&(h=l=_)&&t.lineStart(),_!==l&&(!(d=a(e,f))||Ee(e,d)||Ee(f,d))&&(f[2]=1),_!==l)u=0,_?(t.lineStart(),d=a(f,e),t.point(d[0],d[1])):(d=a(e,f),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(o&&e&&i^_){var g;m&n||!(g=a(f,e,!0))||(u=0,i?(t.lineStart(),t.point(g[0][0],g[0][1]),t.point(g[1][0],g[1][1]),t.lineEnd()):(t.point(g[1][0],g[1][1]),t.lineEnd(),t.lineStart(),t.point(g[0][0],g[0][1],3)))}!_||e&&Ee(e,f)||t.point(f[0],f[1]),e=f,l=_,n=m},lineEnd:function(){l&&t.lineEnd(),e=null},clean:function(){return u|(h&&l)<<1}}}),(function(e,i,o,r){Me(r,t,n,o,e,i)}),i?[0,-t]:[-T,t-T])}var je=1e9,Ge=-je;function Ue(t,n,i,o){function r(e,r){return t<=e&&e<=i&&n<=r&&r<=o}function a(e,r,a,l){var u=0,c=0;if(null==e||(u=s(e,a))!==(c=s(r,a))||h(e,r)<0^a>0)do{l.point(0===u||3===u?t:i,u>1?o:n)}while((u=(u+a+4)%4)!==c);else l.point(r[0],r[1])}function s(e,o){return I(e[0]-t)<P?o>0?0:3:I(e[0]-i)<P?o>0?2:1:I(e[1]-n)<P?o>0?1:0:o>0?3:2}function l(t,e){return h(t.x,e.x)}function h(t,e){var n=s(t,1),i=s(e,1);return n!==i?n-i:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(s){var h,u,c,p,d,f,_,m,g,y,v,b=s,L=Pe(),w={point:x,lineStart:function(){w.point=k,u&&u.push(c=[]);y=!0,g=!1,_=m=NaN},lineEnd:function(){h&&(k(p,d),f&&g&&L.rejoin(),h.push(L.result()));w.point=x,g&&b.lineEnd()},polygonStart:function(){b=L,h=[],u=[],v=!0},polygonEnd:function(){var n=function(){for(var e=0,n=0,i=u.length;n<i;++n)for(var r,a,s=u[n],l=1,h=s.length,c=s[0],p=c[0],d=c[1];l<h;++l)r=p,a=d,p=(c=s[l])[0],d=c[1],a<=o?d>o&&(p-r)*(o-a)>(d-a)*(t-r)&&++e:d<=o&&(p-r)*(o-a)<(d-a)*(t-r)&&--e;return e}(),i=v&&n,r=(h=e.merge(h)).length;(i||r)&&(s.polygonStart(),i&&(s.lineStart(),a(null,null,1,s),s.lineEnd()),r&&Se(h,l,n,a,s),s.polygonEnd());b=s,h=u=c=null}};function x(t,e){r(t,e)&&b.point(t,e)}function k(e,a){var s=r(e,a);if(u&&c.push([e,a]),y)p=e,d=a,f=s,y=!1,s&&(b.lineStart(),b.point(e,a));else if(s&&g)b.point(e,a);else{var l=[_=Math.max(Ge,Math.min(je,_)),m=Math.max(Ge,Math.min(je,m))],h=[e=Math.max(Ge,Math.min(je,e)),a=Math.max(Ge,Math.min(je,a))];!function(t,e,n,i,o,r){var a,s=t[0],l=t[1],h=0,u=1,c=e[0]-s,p=e[1]-l;if(a=n-s,c||!(a>0)){if(a/=c,c<0){if(a<h)return;a<u&&(u=a)}else if(c>0){if(a>u)return;a>h&&(h=a)}if(a=o-s,c||!(a<0)){if(a/=c,c<0){if(a>u)return;a>h&&(h=a)}else if(c>0){if(a<h)return;a<u&&(u=a)}if(a=i-l,p||!(a>0)){if(a/=p,p<0){if(a<h)return;a<u&&(u=a)}else if(p>0){if(a>u)return;a>h&&(h=a)}if(a=r-l,p||!(a<0)){if(a/=p,p<0){if(a>u)return;a>h&&(h=a)}else if(p>0){if(a<h)return;a<u&&(u=a)}return h>0&&(t[0]=s+h*c,t[1]=l+h*p),u<1&&(e[0]=s+u*c,e[1]=l+u*p),!0}}}}}(l,h,t,n,i,o)?s&&(b.lineStart(),b.point(e,a),v=!1):(g||(b.lineStart(),b.point(l[0],l[1])),b.point(h[0],h[1]),s||b.lineEnd(),v=!1)}_=e,m=a,g=s}return w}}var He,Fe,We,Ve=x(),qe={sphere:X,point:X,lineStart:function(){qe.point=Ke,qe.lineEnd=Ye},lineEnd:X,polygonStart:X,polygonEnd:X};function Ye(){qe.point=qe.lineEnd=X}function Ke(t,e){He=t*=A,Fe=H(e*=A),We=Z(e),qe.point=Xe}function Xe(t,e){t*=A;var n=H(e*=A),i=Z(e),o=I(t-He),r=Z(o),a=i*H(o),s=We*n-Fe*i*r,l=Fe*n+We*i*r;Ve.add(N(W(a*a+s*s),l)),He=t,Fe=n,We=i}function Je(t){return Ve.reset(),nt(t,qe),+Ve}var Qe=[null,null],$e={type:"LineString",coordinates:Qe};function tn(t,e){return Qe[0]=t,Qe[1]=e,Je($e)}var en={Feature:function(t,e){return on(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,o=n.length;++i<o;)if(on(n[i].geometry,e))return!0;return!1}},nn={Sphere:function(){return!0},Point:function(t,e){return rn(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)if(rn(n[i],e))return!0;return!1},LineString:function(t,e){return an(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)if(an(n[i],e))return!0;return!1},Polygon:function(t,e){return sn(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)if(sn(n[i],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,i=-1,o=n.length;++i<o;)if(on(n[i],e))return!0;return!1}};function on(t,e){return!(!t||!nn.hasOwnProperty(t.type))&&nn[t.type](t,e)}function rn(t,e){return 0===tn(t,e)}function an(t,e){for(var n,i,o,r=0,a=t.length;r<a;r++){if(0===(i=tn(t[r],e)))return!0;if(r>0&&(o=tn(t[r],t[r-1]))>0&&n<=o&&i<=o&&(n+i-o)*(1-Math.pow((n-i)/o,2))<E*o)return!0;n=i}return!1}function sn(t,e){return!!Ae(t.map(ln),hn(e))}function ln(t){return(t=t.map(hn)).pop(),t}function hn(t){return[t[0]*A,t[1]*A]}function un(t,n,i){var o=e.range(t,n-P,i).concat(n);return function(t){return o.map((function(e){return[t,e]}))}}function cn(t,n,i){var o=e.range(t,n-P,i).concat(n);return function(t){return o.map((function(e){return[e,t]}))}}function pn(){var t,n,i,o,r,a,s,l,h,u,c,p,d=10,f=d,_=90,m=360,g=2.5;function y(){return{type:"MultiLineString",coordinates:v()}}function v(){return e.range(R(o/_)*_,i,_).map(c).concat(e.range(R(l/m)*m,s,m).map(p)).concat(e.range(R(n/d)*d,t,d).filter((function(t){return I(t%_)>P})).map(h)).concat(e.range(R(a/f)*f,r,f).filter((function(t){return I(t%m)>P})).map(u))}return y.lines=function(){return v().map((function(t){return{type:"LineString",coordinates:t}}))},y.outline=function(){return{type:"Polygon",coordinates:[c(o).concat(p(s).slice(1),c(i).reverse().slice(1),p(l).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.extentMajor(t).extentMinor(t):y.extentMinor()},y.extentMajor=function(t){return arguments.length?(o=+t[0][0],i=+t[1][0],l=+t[0][1],s=+t[1][1],o>i&&(t=o,o=i,i=t),l>s&&(t=l,l=s,s=t),y.precision(g)):[[o,l],[i,s]]},y.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],a=+e[0][1],r=+e[1][1],n>t&&(e=n,n=t,t=e),a>r&&(e=a,a=r,r=e),y.precision(g)):[[n,a],[t,r]]},y.step=function(t){return arguments.length?y.stepMajor(t).stepMinor(t):y.stepMinor()},y.stepMajor=function(t){return arguments.length?(_=+t[0],m=+t[1],y):[_,m]},y.stepMinor=function(t){return arguments.length?(d=+t[0],f=+t[1],y):[d,f]},y.precision=function(e){return arguments.length?(g=+e,h=un(a,r,90),u=cn(n,t,g),c=un(l,s,90),p=cn(o,i,g),y):g},y.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function dn(t){return t}var fn,_n,mn,gn,yn=x(),vn=x(),bn={point:X,lineStart:X,lineEnd:X,polygonStart:function(){bn.lineStart=Ln,bn.lineEnd=kn},polygonEnd:function(){bn.lineStart=bn.lineEnd=bn.point=X,yn.add(I(vn)),vn.reset()},result:function(){var t=yn/2;return yn.reset(),t}};function Ln(){bn.point=wn}function wn(t,e){bn.point=xn,fn=mn=t,_n=gn=e}function xn(t,e){vn.add(gn*t-mn*e),mn=t,gn=e}function kn(){xn(fn,_n)}var Mn=bn,Cn=1/0,Pn=Cn,En=-Cn,Tn=En,Sn={point:function(t,e){t<Cn&&(Cn=t);t>En&&(En=t);e<Pn&&(Pn=e);e>Tn&&(Tn=e)},lineStart:X,lineEnd:X,polygonStart:X,polygonEnd:X,result:function(){var t=[[Cn,Pn],[En,Tn]];return En=Tn=-(Pn=Cn=1/0),t}};var zn,On,Dn,An,In=Sn,Bn=0,Nn=0,Zn=0,Rn=0,jn=0,Gn=0,Un=0,Hn=0,Fn=0,Wn={point:Vn,lineStart:qn,lineEnd:Xn,polygonStart:function(){Wn.lineStart=Jn,Wn.lineEnd=Qn},polygonEnd:function(){Wn.point=Vn,Wn.lineStart=qn,Wn.lineEnd=Xn},result:function(){var t=Fn?[Un/Fn,Hn/Fn]:Gn?[Rn/Gn,jn/Gn]:Zn?[Bn/Zn,Nn/Zn]:[NaN,NaN];return Bn=Nn=Zn=Rn=jn=Gn=Un=Hn=Fn=0,t}};function Vn(t,e){Bn+=t,Nn+=e,++Zn}function qn(){Wn.point=Yn}function Yn(t,e){Wn.point=Kn,Vn(Dn=t,An=e)}function Kn(t,e){var n=t-Dn,i=e-An,o=W(n*n+i*i);Rn+=o*(Dn+t)/2,jn+=o*(An+e)/2,Gn+=o,Vn(Dn=t,An=e)}function Xn(){Wn.point=Vn}function Jn(){Wn.point=$n}function Qn(){ti(zn,On)}function $n(t,e){Wn.point=ti,Vn(zn=Dn=t,On=An=e)}function ti(t,e){var n=t-Dn,i=e-An,o=W(n*n+i*i);Rn+=o*(Dn+t)/2,jn+=o*(An+e)/2,Gn+=o,Un+=(o=An*t-Dn*e)*(Dn+t),Hn+=o*(An+e),Fn+=3*o,Vn(Dn=t,An=e)}var ei=Wn;function ni(t){this._context=t}ni.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,O)}},result:X};var ii,oi,ri,ai,si,li=x(),hi={point:X,lineStart:function(){hi.point=ui},lineEnd:function(){ii&&ci(oi,ri),hi.point=X},polygonStart:function(){ii=!0},polygonEnd:function(){ii=null},result:function(){var t=+li;return li.reset(),t}};function ui(t,e){hi.point=ci,oi=ai=t,ri=si=e}function ci(t,e){ai-=t,si-=e,li.add(W(ai*ai+si*si)),ai=t,si=e}var pi=hi;function di(){this._string=[]}function fi(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function _i(t,e){var n,i,o=4.5;function r(t){return t&&("function"==typeof o&&i.pointRadius(+o.apply(this,arguments)),nt(t,n(i))),i.result()}return r.area=function(t){return nt(t,n(Mn)),Mn.result()},r.measure=function(t){return nt(t,n(pi)),pi.result()},r.bounds=function(t){return nt(t,n(In)),In.result()},r.centroid=function(t){return nt(t,n(ei)),ei.result()},r.projection=function(e){return arguments.length?(n=null==e?(t=null,dn):(t=e).stream,r):t},r.context=function(t){return arguments.length?(i=null==t?(e=null,new di):new ni(e=t),"function"!=typeof o&&i.pointRadius(o),r):e},r.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(i.pointRadius(+t),+t),r):o},r.projection(t).context(e)}function mi(t){return function(e){var n=new gi;for(var i in t)n[i]=t[i];return n.stream=e,n}}function gi(){}function yi(t,e,n){var i=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=i&&t.clipExtent(null),nt(n,t.stream(In)),e(In.result()),null!=i&&t.clipExtent(i),t}function vi(t,e,n){return yi(t,(function(n){var i=e[1][0]-e[0][0],o=e[1][1]-e[0][1],r=Math.min(i/(n[1][0]-n[0][0]),o/(n[1][1]-n[0][1])),a=+e[0][0]+(i-r*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(o-r*(n[1][1]+n[0][1]))/2;t.scale(150*r).translate([a,s])}),n)}function bi(t,e,n){return vi(t,[[0,0],e],n)}function Li(t,e,n){return yi(t,(function(n){var i=+e,o=i/(n[1][0]-n[0][0]),r=(i-o*(n[1][0]+n[0][0]))/2,a=-o*n[0][1];t.scale(150*o).translate([r,a])}),n)}function wi(t,e,n){return yi(t,(function(n){var i=+e,o=i/(n[1][1]-n[0][1]),r=-o*n[0][0],a=(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([r,a])}),n)}di.prototype={_radius:4.5,_circle:fi(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=fi(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},gi.prototype={constructor:gi,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var xi=Z(30*A);function ki(t,e){return+e?function(t,e){function n(i,o,r,a,s,l,h,u,c,p,d,f,_,m){var g=h-i,y=u-o,v=g*g+y*y;if(v>4*e&&_--){var b=a+p,L=s+d,w=l+f,x=W(b*b+L*L+w*w),k=Y(w/=x),M=I(I(w)-1)<P||I(r-c)<P?(r+c)/2:N(L,b),C=t(M,k),E=C[0],T=C[1],S=E-i,z=T-o,O=y*S-g*z;(O*O/v>e||I((g*S+y*z)/v-.5)>.3||a*p+s*d+l*f<xi)&&(n(i,o,r,a,s,l,E,T,M,b/=x,L/=x,w,_,m),m.point(E,T),n(E,T,M,b,L,w,h,u,c,p,d,f,_,m))}}return function(e){var i,o,r,a,s,l,h,u,c,p,d,f,_={point:m,lineStart:g,lineEnd:v,polygonStart:function(){e.polygonStart(),_.lineStart=b},polygonEnd:function(){e.polygonEnd(),_.lineStart=g}};function m(n,i){n=t(n,i),e.point(n[0],n[1])}function g(){u=NaN,_.point=y,e.lineStart()}function y(i,o){var r=mt([i,o]),a=t(i,o);n(u,c,h,p,d,f,u=a[0],c=a[1],h=i,p=r[0],d=r[1],f=r[2],16,e),e.point(u,c)}function v(){_.point=m,e.lineEnd()}function b(){g(),_.point=L,_.lineEnd=w}function L(t,e){y(i=t,e),o=u,r=c,a=p,s=d,l=f,_.point=y}function w(){n(u,c,h,p,d,f,o,r,i,a,s,l,16,e),_.lineEnd=v,v()}return _}}(t,e):function(t){return mi({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var Mi=mi({point:function(t,e){this.stream.point(t*A,e*A)}});function Ci(t,e,n,i,o){function r(r,a){return[e+t*(r*=i),n-t*(a*=o)]}return r.invert=function(r,a){return[(r-e)/t*i,(n-a)/t*o]},r}function Pi(t,e,n,i,o,r){var a=Z(r),s=H(r),l=a*t,h=s*t,u=a/t,c=s/t,p=(s*n-a*e)/t,d=(s*e+a*n)/t;function f(t,r){return[l*(t*=i)-h*(r*=o)+e,n-h*t-l*r]}return f.invert=function(t,e){return[i*(u*t-c*e+p),o*(d-c*t-u*e)]},f}function Ei(t){return Ti((function(){return t}))()}function Ti(t){var e,n,i,o,r,a,s,l,h,u,c=150,p=480,d=250,f=0,_=0,m=0,g=0,y=0,v=0,b=1,L=1,w=null,x=Ze,k=null,M=dn,C=.5;function P(t){return l(t[0]*A,t[1]*A)}function E(t){return(t=l.invert(t[0],t[1]))&&[t[0]*D,t[1]*D]}function T(){var t=Pi(c,0,0,b,L,v).apply(null,e(f,_)),i=(v?Pi:Ci)(c,p-t[0],d-t[1],b,L,v);return n=be(m,g,y),s=ye(e,i),l=ye(n,s),a=ki(s,C),S()}function S(){return h=u=null,P}return P.stream=function(t){return h&&u===t?h:h=Mi(function(t){return mi({point:function(e,n){var i=t(e,n);return this.stream.point(i[0],i[1])}})}(n)(x(a(M(u=t)))))},P.preclip=function(t){return arguments.length?(x=t,w=void 0,S()):x},P.postclip=function(t){return arguments.length?(M=t,k=i=o=r=null,S()):M},P.clipAngle=function(t){return arguments.length?(x=+t?Re(w=t*A):(w=null,Ze),S()):w*D},P.clipExtent=function(t){return arguments.length?(M=null==t?(k=i=o=r=null,dn):Ue(k=+t[0][0],i=+t[0][1],o=+t[1][0],r=+t[1][1]),S()):null==k?null:[[k,i],[o,r]]},P.scale=function(t){return arguments.length?(c=+t,T()):c},P.translate=function(t){return arguments.length?(p=+t[0],d=+t[1],T()):[p,d]},P.center=function(t){return arguments.length?(f=t[0]%360*A,_=t[1]%360*A,T()):[f*D,_*D]},P.rotate=function(t){return arguments.length?(m=t[0]%360*A,g=t[1]%360*A,y=t.length>2?t[2]%360*A:0,T()):[m*D,g*D,y*D]},P.angle=function(t){return arguments.length?(v=t%360*A,T()):v*D},P.reflectX=function(t){return arguments.length?(b=t?-1:1,T()):b<0},P.reflectY=function(t){return arguments.length?(L=t?-1:1,T()):L<0},P.precision=function(t){return arguments.length?(a=ki(s,C=t*t),S()):W(C)},P.fitExtent=function(t,e){return vi(P,t,e)},P.fitSize=function(t,e){return bi(P,t,e)},P.fitWidth=function(t,e){return Li(P,t,e)},P.fitHeight=function(t,e){return wi(P,t,e)},function(){return e=t.apply(this,arguments),P.invert=e.invert&&E,T()}}function Si(t){var e=0,n=T/3,i=Ti(t),o=i(e,n);return o.parallels=function(t){return arguments.length?i(e=t[0]*A,n=t[1]*A):[e*D,n*D]},o}function zi(t,e){var n=H(t),i=(n+H(e))/2;if(I(i)<P)return function(t){var e=Z(t);function n(t,n){return[t*e,H(n)/e]}return n.invert=function(t,n){return[t/e,Y(n*e)]},n}(t);var o=1+n*(2*i-n),r=W(o)/i;function a(t,e){var n=W(o-2*i*H(e))/i;return[n*H(t*=i),r-n*Z(t)]}return a.invert=function(t,e){var n=r-e,a=N(t,I(n))*F(n);return n*i<0&&(a-=T*F(t)*F(n)),[a/i,Y((o-(t*t+n*n)*i*i)/(2*i))]},a}function Oi(){return Si(zi).scale(155.424).center([0,33.6442])}function Di(){return Oi().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Ai(t){return function(e,n){var i=Z(e),o=Z(n),r=t(i*o);return[r*o*H(e),r*H(n)]}}function Ii(t){return function(e,n){var i=W(e*e+n*n),o=t(i),r=H(o),a=Z(o);return[N(e*r,i*a),Y(i&&n*r/i)]}}var Bi=Ai((function(t){return W(2/(1+t))}));Bi.invert=Ii((function(t){return 2*Y(t/2)}));var Ni=Ai((function(t){return(t=q(t))&&t/H(t)}));function Zi(t,e){return[t,G(V((S+e)/2))]}function Ri(){return ji(Zi).scale(961/O)}function ji(t){var e,n,i,o=Ei(t),r=o.center,a=o.scale,s=o.translate,l=o.clipExtent,h=null;function u(){var r=T*a(),s=o(ke(o.rotate()).invert([0,0]));return l(null==h?[[s[0]-r,s[1]-r],[s[0]+r,s[1]+r]]:t===Zi?[[Math.max(s[0]-r,h),e],[Math.min(s[0]+r,n),i]]:[[h,Math.max(s[1]-r,e)],[n,Math.min(s[1]+r,i)]])}return o.scale=function(t){return arguments.length?(a(t),u()):a()},o.translate=function(t){return arguments.length?(s(t),u()):s()},o.center=function(t){return arguments.length?(r(t),u()):r()},o.clipExtent=function(t){return arguments.length?(null==t?h=e=n=i=null:(h=+t[0][0],e=+t[0][1],n=+t[1][0],i=+t[1][1]),u()):null==h?null:[[h,e],[n,i]]},u()}function Gi(t){return V((S+t)/2)}function Ui(t,e){var n=Z(t),i=t===e?H(t):G(n/Z(e))/G(Gi(e)/Gi(t)),o=n*U(Gi(t),i)/i;if(!i)return Zi;function r(t,e){o>0?e<-S+P&&(e=-S+P):e>S-P&&(e=S-P);var n=o/U(Gi(e),i);return[n*H(i*t),o-n*Z(i*t)]}return r.invert=function(t,e){var n=o-e,r=F(i)*W(t*t+n*n),a=N(t,I(n))*F(n);return n*i<0&&(a-=T*F(t)*F(n)),[a/i,2*B(U(o/r,1/i))-S]},r}function Hi(t,e){return[t,e]}function Fi(t,e){var n=Z(t),i=t===e?H(t):(n-Z(e))/(e-t),o=n/i+t;if(I(i)<P)return Hi;function r(t,e){var n=o-e,r=i*t;return[n*H(r),o-n*Z(r)]}return r.invert=function(t,e){var n=o-e,r=N(t,I(n))*F(n);return n*i<0&&(r-=T*F(t)*F(n)),[r/i,o-F(i)*W(t*t+n*n)]},r}Ni.invert=Ii((function(t){return t})),Zi.invert=function(t,e){return[t,2*B(j(e))-S]},Hi.invert=Hi;var Wi=1.340264,Vi=-.081106,qi=893e-6,Yi=.003796,Ki=W(3)/2;function Xi(t,e){var n=Y(Ki*H(e)),i=n*n,o=i*i*i;return[t*Z(n)/(Ki*(Wi+3*Vi*i+o*(7*qi+9*Yi*i))),n*(Wi+Vi*i+o*(qi+Yi*i))]}function Ji(t,e){var n=Z(e),i=Z(t)*n;return[n*H(t)/i,H(e)/i]}function Qi(t,e){var n=e*e,i=n*n;return[t*(.8707-.131979*n+i*(i*(.003971*n-.001529*i)-.013791)),e*(1.007226+n*(.015085+i*(.028874*n-.044475-.005916*i)))]}function $i(t,e){return[Z(e)*H(t),H(e)]}function to(t,e){var n=Z(e),i=1+Z(t)*n;return[n*H(t)/i,H(e)/i]}function eo(t,e){return[G(V((S+e)/2)),-t]}Xi.invert=function(t,e){for(var n,i=e,o=i*i,r=o*o*o,a=0;a<12&&(r=(o=(i-=n=(i*(Wi+Vi*o+r*(qi+Yi*o))-e)/(Wi+3*Vi*o+r*(7*qi+9*Yi*o)))*i)*o*o,!(I(n)<E));++a);return[Ki*t*(Wi+3*Vi*o+r*(7*qi+9*Yi*o))/Z(i),Y(H(i)/Ki)]},Ji.invert=Ii(B),Qi.invert=function(t,e){var n,i=e,o=25;do{var r=i*i,a=r*r;i-=n=(i*(1.007226+r*(.015085+a*(.028874*r-.044475-.005916*a)))-e)/(1.007226+r*(.045255+a*(.259866*r-.311325-.005916*11*a)))}while(I(n)>P&&--o>0);return[t/(.8707+(r=i*i)*(r*(r*r*r*(.003971-.001529*r)-.013791)-.131979)),i]},$i.invert=Ii(Y),to.invert=Ii((function(t){return 2*B(t)})),eo.invert=function(t,e){return[-e,2*B(j(t))-S]};var no=Object.freeze({__proto__:null,geoArea:function(t){return ht.reset(),nt(t,ut),2*ht},geoBounds:function(t){var e,n,i,o,r,a,s;if(Mt=kt=-(wt=xt=1/0),St=[],nt(t,Kt),n=St.length){for(St.sort(oe),e=1,r=[i=St[0]];e<n;++e)re(i,(o=St[e])[0])||re(i,o[1])?(ie(i[0],o[1])>ie(i[0],i[1])&&(i[1]=o[1]),ie(o[0],i[1])>ie(i[0],i[1])&&(i[0]=o[0])):r.push(i=o);for(a=-1/0,e=0,i=r[n=r.length-1];e<=n;i=o,++e)o=r[e],(s=ie(i[1],o[0]))>a&&(a=s,wt=o[0],kt=i[1])}return St=zt=null,wt===1/0||xt===1/0?[[NaN,NaN],[NaN,NaN]]:[[wt,xt],[kt,Mt]]},geoCentroid:function(t){Ot=Dt=At=It=Bt=Nt=Zt=Rt=jt=Gt=Ut=0,nt(t,ae);var e=jt,n=Gt,i=Ut,o=e*e+n*n+i*i;return o<E&&(e=Nt,n=Zt,i=Rt,Dt<P&&(e=At,n=It,i=Bt),(o=e*e+n*n+i*i)<E)?[NaN,NaN]:[N(n,e)*D,Y(i/W(o))*D]},geoCircle:function(){var t,e,n=ge([0,0]),i=ge(90),o=ge(6),r={point:function(n,i){t.push(n=e(n,i)),n[0]*=D,n[1]*=D}};function a(){var a=n.apply(this,arguments),s=i.apply(this,arguments)*A,l=o.apply(this,arguments)*A;return t=[],e=be(-a[0]*A,-a[1]*A,0).invert,Me(r,s,l,1),a={type:"Polygon",coordinates:[t]},t=e=null,a}return a.center=function(t){return arguments.length?(n="function"==typeof t?t:ge([+t[0],+t[1]]),a):n},a.radius=function(t){return arguments.length?(i="function"==typeof t?t:ge(+t),a):i},a.precision=function(t){return arguments.length?(o="function"==typeof t?t:ge(+t),a):o},a},geoClipAntimeridian:Ze,geoClipCircle:Re,geoClipExtent:function(){var t,e,n,i=0,o=0,r=960,a=500;return n={stream:function(n){return t&&e===n?t:t=Ue(i,o,r,a)(e=n)},extent:function(s){return arguments.length?(i=+s[0][0],o=+s[0][1],r=+s[1][0],a=+s[1][1],t=e=null,n):[[i,o],[r,a]]}}},geoClipRectangle:Ue,geoContains:function(t,e){return(t&&en.hasOwnProperty(t.type)?en[t.type]:on)(t,e)},geoDistance:tn,geoGraticule:pn,geoGraticule10:function(){return pn()()},geoInterpolate:function(t,e){var n=t[0]*A,i=t[1]*A,o=e[0]*A,r=e[1]*A,a=Z(i),s=H(i),l=Z(r),h=H(r),u=a*Z(n),c=a*H(n),p=l*Z(o),d=l*H(o),f=2*Y(W(K(r-i)+a*l*K(o-n))),_=H(f),m=f?function(t){var e=H(t*=f)/_,n=H(f-t)/_,i=n*u+e*p,o=n*c+e*d,r=n*s+e*h;return[N(o,i)*D,N(r,W(i*i+o*o))*D]}:function(){return[n*D,i*D]};return m.distance=f,m},geoLength:Je,geoPath:_i,geoAlbers:Di,geoAlbersUsa:function(){var t,e,n,i,o,r,a=Di(),s=Oi().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=Oi().rotate([157,0]).center([-3,19.9]).parallels([8,18]),h={point:function(t,e){r=[t,e]}};function u(t){var e=t[0],a=t[1];return r=null,n.point(e,a),r||(i.point(e,a),r)||(o.point(e,a),r)}function c(){return t=e=null,u}return u.invert=function(t){var e=a.scale(),n=a.translate(),i=(t[0]-n[0])/e,o=(t[1]-n[1])/e;return(o>=.12&&o<.234&&i>=-.425&&i<-.214?s:o>=.166&&o<.234&&i>=-.214&&i<-.115?l:a).invert(t)},u.stream=function(n){return t&&e===n?t:(i=[a.stream(e=n),s.stream(n),l.stream(n)],o=i.length,t={point:function(t,e){for(var n=-1;++n<o;)i[n].point(t,e)},sphere:function(){for(var t=-1;++t<o;)i[t].sphere()},lineStart:function(){for(var t=-1;++t<o;)i[t].lineStart()},lineEnd:function(){for(var t=-1;++t<o;)i[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<o;)i[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<o;)i[t].polygonEnd()}});var i,o},u.precision=function(t){return arguments.length?(a.precision(t),s.precision(t),l.precision(t),c()):a.precision()},u.scale=function(t){return arguments.length?(a.scale(t),s.scale(.35*t),l.scale(t),u.translate(a.translate())):a.scale()},u.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),r=+t[0],u=+t[1];return n=a.translate(t).clipExtent([[r-.455*e,u-.238*e],[r+.455*e,u+.238*e]]).stream(h),i=s.translate([r-.307*e,u+.201*e]).clipExtent([[r-.425*e+P,u+.12*e+P],[r-.214*e-P,u+.234*e-P]]).stream(h),o=l.translate([r-.205*e,u+.212*e]).clipExtent([[r-.214*e+P,u+.166*e+P],[r-.115*e-P,u+.234*e-P]]).stream(h),c()},u.fitExtent=function(t,e){return vi(u,t,e)},u.fitSize=function(t,e){return bi(u,t,e)},u.fitWidth=function(t,e){return Li(u,t,e)},u.fitHeight=function(t,e){return wi(u,t,e)},u.scale(1070)},geoAzimuthalEqualArea:function(){return Ei(Bi).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:Bi,geoAzimuthalEquidistant:function(){return Ei(Ni).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:Ni,geoConicConformal:function(){return Si(Ui).scale(109.5).parallels([30,30])},geoConicConformalRaw:Ui,geoConicEqualArea:Oi,geoConicEqualAreaRaw:zi,geoConicEquidistant:function(){return Si(Fi).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:Fi,geoEqualEarth:function(){return Ei(Xi).scale(177.158)},geoEqualEarthRaw:Xi,geoEquirectangular:function(){return Ei(Hi).scale(152.63)},geoEquirectangularRaw:Hi,geoGnomonic:function(){return Ei(Ji).scale(144.049).clipAngle(60)},geoGnomonicRaw:Ji,geoIdentity:function(){var t,e,n,i,o,r,a,s=1,l=0,h=0,u=1,c=1,p=0,d=null,f=1,_=1,m=mi({point:function(t,e){var n=v([t,e]);this.stream.point(n[0],n[1])}}),g=dn;function y(){return f=s*u,_=s*c,r=a=null,v}function v(n){var i=n[0]*f,o=n[1]*_;if(p){var r=o*t-i*e;i=i*t+o*e,o=r}return[i+l,o+h]}return v.invert=function(n){var i=n[0]-l,o=n[1]-h;if(p){var r=o*t+i*e;i=i*t-o*e,o=r}return[i/f,o/_]},v.stream=function(t){return r&&a===t?r:r=m(g(a=t))},v.postclip=function(t){return arguments.length?(g=t,d=n=i=o=null,y()):g},v.clipExtent=function(t){return arguments.length?(g=null==t?(d=n=i=o=null,dn):Ue(d=+t[0][0],n=+t[0][1],i=+t[1][0],o=+t[1][1]),y()):null==d?null:[[d,n],[i,o]]},v.scale=function(t){return arguments.length?(s=+t,y()):s},v.translate=function(t){return arguments.length?(l=+t[0],h=+t[1],y()):[l,h]},v.angle=function(n){return arguments.length?(e=H(p=n%360*A),t=Z(p),y()):p*D},v.reflectX=function(t){return arguments.length?(u=t?-1:1,y()):u<0},v.reflectY=function(t){return arguments.length?(c=t?-1:1,y()):c<0},v.fitExtent=function(t,e){return vi(v,t,e)},v.fitSize=function(t,e){return bi(v,t,e)},v.fitWidth=function(t,e){return Li(v,t,e)},v.fitHeight=function(t,e){return wi(v,t,e)},v},geoProjection:Ei,geoProjectionMutator:Ti,geoMercator:Ri,geoMercatorRaw:Zi,geoNaturalEarth1:function(){return Ei(Qi).scale(175.295)},geoNaturalEarth1Raw:Qi,geoOrthographic:function(){return Ei($i).scale(249.5).clipAngle(90.000001)},geoOrthographicRaw:$i,geoStereographic:function(){return Ei(to).scale(250).clipAngle(142)},geoStereographicRaw:to,geoTransverseMercator:function(){var t=ji(eo),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:eo,geoRotation:ke,geoStream:nt,geoTransform:function(t){return{stream:mi(t)}}});function io(){}var oo=1/0,ro=oo,ao=-oo,so=ao;var lo={point:function(t,e){t<oo&&(oo=t),t>ao&&(ao=t),e<ro&&(ro=e),e>so&&(so=e)},lineStart:io,lineEnd:io,polygonStart:io,polygonEnd:io,result:function(){var t=[[oo,ro],[ao,so]];return ao=so=-(ro=oo=1/0),t}};function ho(t,e,n){var i=e[1][0]-e[0][0],o=e[1][1]-e[0][1],r=t.clipExtent&&t.clipExtent();t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),nt(n,t.stream(lo));var a=lo.result(),s=Math.min(i/(a[1][0]-a[0][0]),o/(a[1][1]-a[0][1])),l=+e[0][0]+(i-s*(a[1][0]+a[0][0]))/2,h=+e[0][1]+(o-s*(a[1][1]+a[0][1]))/2;return null!=r&&t.clipExtent(r),t.scale(150*s).translate([l,h])}var uo,co=function(){function t(){}return t.prototype.encode=function(e,n,i){if(void 0===i){for(var o=1;o<=12;o++){var r=this.encode(e,n,o),a=this.decode(r);if(a.lat===e&&a.lon===n)return r}i=12}if(e=Number(e),n=Number(n),i=Number(i),isNaN(e)||isNaN(n)||isNaN(i))throw new Error("Invalid geohash");for(var s=0,l=0,h=!0,u="",c=-90,p=90,d=-180,f=180;u.length<i;){if(h){var _=(d+f)/2;n>_?(s=2*s+1,d=_):(s*=2,f=_)}else{var m=(c+p)/2;e>m?(s=2*s+1,c=m):(s*=2,p=m)}h=!h,5==++l&&(u+=t.base32.charAt(s),l=0,s=0)}return u},t.prototype.decode=function(t){var e=this.bounds(t),n=e.sw.lat,i=e.sw.lon,o=e.ne.lat,r=e.ne.lon,a=(n+o)/2,s=(i+r)/2;return{lat:a=Number(a.toFixed(Math.floor(2-Math.log(o-n)/Math.LN10))),lon:s=Number(s.toFixed(Math.floor(2-Math.log(r-i)/Math.LN10)))}},t.prototype.bounds=function(e){if(0===e.length)throw new Error("Invalid geohash");e=e.toLowerCase();for(var n=!0,i=-90,o=90,r=-180,a=180,s=0;s<e.length;s++){var l=e.charAt(s),h=t.base32.indexOf(l);if(-1===h)throw new Error("Invalid geohash");for(var u=4;u>=0;u--){var c=h>>u&1;if(n){var p=(r+a)/2;1===c?r=p:a=p}else{var d=(i+o)/2;1===c?i=d:o=d}n=!n}}return{sw:{lat:i,lon:r},ne:{lat:o,lon:a}}},t.prototype.adjacent=function(e,n){if(e=e.toLowerCase(),n=n.toLowerCase(),0===e.length)throw new Error("Invalid geohash");if(-1==="nsew".indexOf(n))throw new Error("Invalid direction");var i=e.slice(-1),o=e.slice(0,-1),r=e.length%2;return-1!=={n:["prxz","bcfguvyz"],s:["028b","0145hjnp"],e:["bcfguvyz","prxz"],w:["0145hjnp","028b"]}[n][r].indexOf(i)&&""!==o&&(o=this.adjacent(o,n)),o+t.base32.charAt({n:["p0r21436x8zb9dcf5h7kjnmqesgutwvy","bc01fg45238967deuvhjyznpkmstqrwx"],s:["14365h7k9dcfesgujnmqp0r2twvyx8zb","238967debc01fg45kmstqrwxuvhjyznp"],e:["bc01fg45238967deuvhjyznpkmstqrwx","p0r21436x8zb9dcf5h7kjnmqesgutwvy"],w:["238967debc01fg45kmstqrwxuvhjyznp","14365h7k9dcfesgujnmqp0r2twvyx8zb"]}[n][r].indexOf(i))},t.prototype.neighbours=function(t){return{n:this.adjacent(t,"n"),ne:this.adjacent(this.adjacent(t,"n"),"e"),e:this.adjacent(t,"e"),se:this.adjacent(this.adjacent(t,"s"),"e"),s:this.adjacent(t,"s"),sw:this.adjacent(this.adjacent(t,"s"),"w"),w:this.adjacent(t,"w"),nw:this.adjacent(this.adjacent(t,"n"),"w")}},t.prototype.contained=function(t,e,n,i,o){(isNaN(e)||e>=90)&&(e=89),(isNaN(n)||n>180)&&(n=180),(isNaN(i)||i<=-90)&&(i=-89),(isNaN(t)||t<-180)&&(t=-180),o=o||1;for(var r=this.encode(e,t,o),a=this.encode(e,n,o),s=this.encode(i,n,o),l=r,h=0,u=-1,c=[r,s],p=this.adjacent(r,"e");p!==s;)c.push(p),++h,p===a||u===h?(u=h+1,h=0,l=p=this.adjacent(l,"s")):p=this.adjacent(p,"e");return c},t.prototype.calculateWidthDegrees=function(t){var e;return e=t%2==0?-1:-.5,180/Math.pow(2,2.5*t+e)},t.prototype.width=function(t){return 180/(2^(5*t+t%2)/2-1)},t.base32="0123456789bcdefghjkmnpqrstuvwxyz",t}();function po(){var t,e,n,i,o,r,a,s=1e-6,l=Di(),h=Oi().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=Oi().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c=Oi().rotate([66,0]).center([0,18]).parallels([8,18]),p={point:function(t,e){a=[t,e]}},d=function(t){var e=t[0],s=t[1];return a=null,n.point(e,s),a||(i.point(e,s),a)||(o.point(e,s),a)||r.point(e,s),a};function f(){return t=e=null,d}return d.invert=function(t){var e=l.scale(),n=l.translate(),i=(t[0]-n[0])/e,o=(t[1]-n[1])/e;return(o>=.12&&o<.234&&i>=-.425&&i<-.214?h:o>=.166&&o<.234&&i>=-.214&&i<-.115?u:o>=.204&&o<.234&&i>=.32&&i<.38?c:l).invert(t)},d.stream=function(n){return t&&e===n?t:(i=[l.stream(e=n),h.stream(n),u.stream(n),c.stream(n)],o=i.length,t={point:function(t,e){for(var n=-1;++n<o;)i[n].point(t,e)},sphere:function(){for(var t=-1;++t<o;)i[t].sphere()},lineStart:function(){for(var t=-1;++t<o;)i[t].lineStart()},lineEnd:function(){for(var t=-1;++t<o;)i[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<o;)i[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<o;)i[t].polygonEnd()}});var i,o},d.precision=function(t){return arguments.length?(l.precision(t),h.precision(t),u.precision(t),c.precision(t),f()):l.precision()},d.scale=function(t){return arguments.length?(l.scale(t),h.scale(.35*t),u.scale(t),c.scale(t),d.translate(l.translate())):l.scale()},d.translate=function(t){if(!arguments.length)return l.translate();var e=l.scale(),a=+t[0],d=+t[1];return n=l.translate(t).clipExtent([[a-.455*e,d-.238*e],[a+.455*e,d+.238*e]]).stream(p),i=h.translate([a-.307*e,d+.201*e]).clipExtent([[a-.425*e+s,d+.12*e+s],[a-.214*e-s,d+.234*e-s]]).stream(p),o=u.translate([a-.205*e,d+.212*e]).clipExtent([[a-.214*e+s,d+.166*e+s],[a-.115*e-s,d+.234*e-s]]).stream(p),r=c.translate([a+.35*e,d+.224*e]).clipExtent([[a+.32*e,d+.204*e],[a+.38*e,d+.234*e]]).stream(p),f()},d.fitExtent=function(t,e){return ho(d,t,e)},d.fitSize=function(t,e){return function(t,e,n){return ho(t,[[0,0],e],n)}(d,t,e)},d.scale(1070)}!function(t){t[t.AzimuthalEqualArea=0]="AzimuthalEqualArea",t[t.AzimuthalEquidistant=1]="AzimuthalEquidistant",t[t.Gnomonic=2]="Gnomonic",t[t.Orthographic=3]="Orthographic",t[t.Stereographic=4]="Stereographic",t[t.AlbersUsa=5]="AlbersUsa",t[t.AlbersUsaPr=6]="AlbersUsaPr",t[t.Albers=7]="Albers",t[t.ConicConformal=8]="ConicConformal",t[t.ConicEqualArea=9]="ConicEqualArea",t[t.ConicEquidistant=10]="ConicEquidistant",t[t.Equirectangular=11]="Equirectangular",t[t.Mercator=12]="Mercator",t[t.TransverseMercator=13]="TransverseMercator"}(uo||(uo={}));var fo=[],_o={};for(var mo in uo)"string"==typeof mo&&(fo.push(mo),_o[mo]="AlbersUsaPr"===mo?po:no["geo".concat(mo)]);function go(t){var e=_o[t];return e?e():(console.warn("Unknown projection: "+t),Ri())}function yo(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}yo(".map_Layered .background{fill:none}.map_Layered .raster image{fill:#b5d0d0}.map_Layered .vector{fill:none;stroke:navy;stroke-linejoin:round}.map_Layered .hash path{fill:none;stroke:red;stroke-linejoin:round}");var vo=2048/Math.PI,bo=function(t){function n(){var e=t.call(this)||this;return e._drawStartPos="origin",e.projection("Mercator"),e}return h(n,t),n.prototype.data=function(e){var n=t.prototype.data.apply(this,arguments);return arguments.length&&(this._autoScaleOnNextRender=!0),n},n.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),this._layersTarget=this._renderElement.append("g").attr("class","layersTarget")},n.prototype.update=function(n,i){t.prototype.update.call(this,n,i);var o=this._layersTarget.selectAll(".layerContainer").data(this.layers().filter((function(t){return t.visible()})),(function(t){return t.id()})),r=this;o.enter().append("g").attr("id",(function(t){return t.id()})).attr("class","layerContainer").each((function(t){t._svgElement=e.select(this),t._domElement=r._parentOverlay.append("div"),t.layerEnter(r,t._svgElement,t._domElement)})).merge(o).each((function(t){t.layerUpdate(r)})),o.exit().each((function(t){t.layerExit(r),t._domElement.remove()})).remove(),o.order(),this.onZoomed()},n.prototype.exit=function(e,n){t.prototype.exit.call(this,e,n)},n.prototype.onZoomed=function(){t.prototype.onZoomed.call(this);var e=this._layersTarget.selectAll(".layerContainer"),n=this;e.each((function(t){t.layerZoomed(n)}))},n.prototype.preRender=function(t){return Promise.all(this.layers().filter((function(t){return t.visible()})).map((function(t){return t.layerPreRender()})))},n.prototype.render=function(t){var n=this;return this.preRender().then((function(){e.SVGZoomWidget.prototype.render.call(n,(function(e){n._layersTarget&&(n._renderCount&&n._autoScaleOnNextRender||n._prevAutoScaleMode!==n.autoScaleMode())?(n._prevAutoScaleMode=n.autoScaleMode(),n._autoScaleOnNextRender=!1,n.autoScale(),t&&t(e)):t&&t(e)}))})),this},n.prototype.project=function(t,e){return t>=90?t=89:t<=-90&&(t=-89),this._d3GeoProjection([e,t])},n.prototype.invert=function(t,e){return this._d3GeoProjection.invert([t,e])},n.prototype.getBounds=function(){var t=this._layersTarget.node().getBBox();return{x:t.x,y:t.y,width:t.width,height:t.height}},n.prototype.autoScale=function(){switch(this.autoScaleMode()){case"none":return;case"all":this.zoomToBBox(this.getBounds())}},n}(e.SVGZoomWidget);bo.prototype._class+=" map_Layered",bo.prototype.publish("projection",null,"set","Map projection type",fo),bo.prototype.publish("centerLat",0,"number","Center Latitude",null,{tags:["Basic"]}),bo.prototype.publish("centerLong",0,"number","Center Longitude",null,{tags:["Basic"]}),bo.prototype.publish("zoom",1,"number","Zoom Level",null,{tags:["Basic"]}),bo.prototype.publish("autoScaleMode","all","set","Auto Scale",["none","all"],{tags:["Basic"]}),bo.prototype.publish("layers",[],"widgetArray","Layers",null,{render:!1});var Lo=bo.prototype.projection;bo.prototype.projection=function(t){var e=Lo.apply(this,arguments);if(arguments.length){if(this._d3GeoProjection=go(t).scale(vo).translate([0,0]),"orthographic"===t)this._d3GeoProjection.clipAngle(90).rotate([0,0]);this._d3GeoPath=_i().projection(this._d3GeoProjection),this._autoScaleOnNextRender=!0}return e};var wo=function(t){function e(){var e=t.call(this)||this;return n.ITooltip.call(e),e}return h(e,t),e.prototype.svgGlowID=function(){return""},e.prototype.layerEnter=function(t,e,n){this._parentOverlay=t._parentOverlay},e.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),this._svgElement=this._layersTarget.append("g"),this._domElement=this._parentOverlay.append("div"),this.layerEnter(this,this._svgElement,this._domElement)},e.prototype.layerUpdate=function(t,e){},e.prototype.update=function(e,n){t.prototype.update.call(this,e,n),this.layerUpdate(this)},e.prototype.onZoomed=function(){t.prototype.onZoomed.call(this),this.layerUpdate(this)},e.prototype.layerExit=function(t){},e.prototype.exit=function(e,n){this.layerExit(this),this._svgElement.remove(),this._domElement.remove(),t.prototype.exit.call(this,e,n)},e.prototype.layerPreRender=function(){return Promise.resolve()},e.prototype.render=function(t){var e=this,n=arguments;return this.layerPreRender().then((function(){bo.prototype.render.apply(e,n)})),this},e.prototype.layerZoomed=function(t){},e}(bo);wo.prototype._class+=" map_Layer",wo.prototype.implements(n.ITooltip.prototype);var xo=function(t){function e(){var e=t.call(this)||this;return e.pins=new w,e}return h(e,t),e.prototype.layerEnter=function(t,e,n){wo.prototype.layerEnter.apply(this,arguments),this._parentOverlay.style("pointer-events","none"),this._pinsTransform=n.style("pointer-events","none").append("div").attr("class",this.classID()).style("width",t.width()+"px").style("height",t.height()+"px"),this.pins.target(this._pinsTransform.node())},e.prototype.layerUpdate=function(t){wo.prototype.layerUpdate.apply(this,arguments),this._pinsTransform.style("opacity",this.opacity()).style("width",t.width()+"px").style("height",t.height()+"px"),this.pins.resize(t.size()),this.layerZoomed(t)},e.prototype.layerExit=function(t){delete this._prevProjection,this.pins.target(null),delete this.pins},e.prototype.layerZoomed=function(t){wo.prototype.layerZoomed.apply(this,arguments);var e=this._db.fieldByLabel(this.latColumn()),n=this._db.fieldByLabel(this.longColumn()),i=this._db.fieldByLabel(this.weightColumn());this.pins.columns(this.columns()).data(this.visible()?this.data().map((function(o){var r=e?o[e.idx]:o[0],a=n?o[n.idx]:o[1],s=i?o[i.idx]:1,l=t.zoomTranslate(),h=t.project(r,a),u=t.zoomScale();return h[0]*=u,h[1]*=u,[l[0]+h[0],l[1]+h[1],s]})):[]).render()},e}(wo);function ko(t){return t}function Mo(t,e){return"string"==typeof e&&(e=t.objects[e]),"GeometryCollection"===e.type?{type:"FeatureCollection",features:e.geometries.map((function(e){return Co(t,e)}))}:Co(t,e)}function Co(t,e){var n=e.id,i=e.bbox,o=null==e.properties?{}:e.properties,r=Po(t,e);return null==n&&null==i?{type:"Feature",properties:o,geometry:r}:null==i?{type:"Feature",id:n,properties:o,geometry:r}:{type:"Feature",id:n,bbox:i,properties:o,geometry:r}}function Po(t,e){var n=function(t){if(null==t)return ko;var e,n,i=t.scale[0],o=t.scale[1],r=t.translate[0],a=t.translate[1];return function(t,s){s||(e=n=0);var l=2,h=t.length,u=new Array(h);for(u[0]=(e+=t[0])*i+r,u[1]=(n+=t[1])*o+a;l<h;)u[l]=t[l],++l;return u}}(t.transform),i=t.arcs;function o(t,e){e.length&&e.pop();for(var o=i[t<0?~t:t],r=0,a=o.length;r<a;++r)e.push(n(o[r],r));t<0&&function(t,e){for(var n,i=t.length,o=i-e;o<--i;)n=t[o],t[o++]=t[i],t[i]=n}(e,a)}function r(t){return n(t)}function a(t){for(var e=[],n=0,i=t.length;n<i;++n)o(t[n],e);return e.length<2&&e.push(e[0]),e}function s(t){for(var e=a(t);e.length<4;)e.push(e[0]);return e}function l(t){return t.map(s)}return function t(e){var n,i=e.type;switch(i){case"GeometryCollection":return{type:i,geometries:e.geometries.map(t)};case"Point":n=r(e.coordinates);break;case"MultiPoint":n=e.coordinates.map(r);break;case"LineString":n=a(e.arcs);break;case"MultiLineString":n=e.arcs.map(a);break;case"Polygon":n=l(e.arcs);break;case"MultiPolygon":n=e.arcs.map(l);break;default:return null}return{type:i,coordinates:n}}(e)}function Eo(t,e){var n={},i={},o={},r=[],a=-1;function s(t,e){for(var i in t){var o=t[i];delete e[o.start],delete o.start,delete o.end,o.forEach((function(t){n[t<0?~t:t]=1})),r.push(o)}}return e.forEach((function(n,i){var o,r=t.arcs[n<0?~n:n];r.length<3&&!r[1][0]&&!r[1][1]&&(o=e[++a],e[a]=n,e[i]=o)})),e.forEach((function(e){var n,r,a=function(e){var n,i=t.arcs[e<0?~e:e],o=i[0];t.transform?(n=[0,0],i.forEach((function(t){n[0]+=t[0],n[1]+=t[1]}))):n=i[i.length-1];return e<0?[n,o]:[o,n]}(e),s=a[0],l=a[1];if(n=o[s])if(delete o[n.end],n.push(e),n.end=l,r=i[l]){delete i[r.start];var h=r===n?n:n.concat(r);i[h.start=n.start]=o[h.end=r.end]=h}else i[n.start]=o[n.end]=n;else if(n=i[l])if(delete i[n.start],n.unshift(e),n.start=s,r=o[s]){delete o[r.end];var u=r===n?n:r.concat(n);i[u.start=r.start]=o[u.end=n.end]=u}else i[n.start]=o[n.end]=n;else i[(n=[e]).start=s]=o[n.end=l]=n})),s(o,i),s(i,o),e.forEach((function(t){n[t<0?~t:t]||r.push([t])})),r}function To(t){return Po(t,So.apply(this,arguments))}function So(t,e,n){var i,o,r;if(arguments.length>1)i=zo(t,e,n);else for(o=0,i=new Array(r=t.arcs.length);o<r;++o)i[o]=o;return{type:"MultiLineString",arcs:Eo(t,i)}}function zo(t,e,n){var i,o=[],r=[];function a(t){var e=t<0?~t:t;(r[e]||(r[e]=[])).push({i:t,g:i})}function s(t){t.forEach(a)}function l(t){t.forEach(s)}return function t(e){switch(i=e,e.type){case"GeometryCollection":e.geometries.forEach(t);break;case"LineString":s(e.arcs);break;case"MultiLineString":case"Polygon":l(e.arcs);break;case"MultiPolygon":!function(t){t.forEach(l)}(e.arcs)}}(e),r.forEach(null==n?function(t){o.push(t[0].i)}:function(t){n(t[0].g,t[t.length-1].g)&&o.push(t[0].i)}),o}xo.prototype._class+=" map_CanvasPinLayer",xo.prototype.publishProxy("clusterMode","pins","clusterMode"),xo.prototype.publishProxy("allCircles","pins","allCircles"),xo.prototype.publishProxy("showQuadtree","pins","showQuadtree"),xo.prototype.publishProxy("useAveragePos","pins","useAveragePos"),xo.prototype.publishProxy("shrinkFontToPin","pins","shrinkFontToPin"),xo.prototype.publishProxy("enableClustering","pins","enableClustering"),xo.prototype.publishProxy("useWeightedRadius","pins","useWeightedRadius"),xo.prototype.publishProxy("radiusWeightMult","pins","radiusWeightMult"),xo.prototype.publishProxy("searchRectMult","pins","searchRectMult"),xo.prototype.publishProxy("pinHeight","pins","pinHeight"),xo.prototype.publishProxy("pinWidth","pins","pinWidth"),xo.prototype.publishProxy("pinFontFamily","pins","pinFontFamily"),xo.prototype.publishProxy("pinFontSize","pins","pinFontSize"),xo.prototype.publishProxy("arrowHeight","pins","arrowHeight"),xo.prototype.publishProxy("arrowWidth","pins","arrowWidth"),xo.prototype.publish("latColumn",null,"set","latColumn",(function(){return this.columns()}),{optional:!0}),xo.prototype.publish("longColumn",null,"set","longColumn",(function(){return this.columns()}),{optional:!0}),xo.prototype.publish("weightColumn",null,"set","weightColumn",(function(){return this.columns()}),{optional:!0}),xo.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]});yo(".map_Layered .checkerFill{fill:red;stroke:red;opacity:.5}.map_Layered .checkerNoFill{fill:none;stroke:none;opacity:.5}.map_Layered .mesh{fill:none;stroke:#6d6e71;stroke-width:.25}.map_Layered .data{stroke:none;stroke-width:.25}.map_Layered .data .shape.selected{stroke:red;stroke-width:1.25px}");var Oo=window.__hpcc_topoJsonFolder||"./node_modules/@hpcc-js/map/TopoJSON";function Do(t){if(!arguments.length)return Oo;var e=Oo;return Oo=t,e}var Ao=function(t){function n(){var n=t.call(this)||this;return n._dataMap={},n._path=e.select(null),e.Utility.SimpleSelectionMixin.call(n),n}return h(n,t),n.prototype.data=function(t){var e=wo.prototype.data.apply(this,arguments);if(arguments.length){this._dataMap={},this._dataMinWeight=null,this._dataMaxWeight=null;var n=this;this.data().forEach((function(t){n._dataMap[t[0]]=t,(!n._dataMinWeight||t[1]<n._dataMinWeight)&&(n._dataMinWeight=t[1]),(!n._dataMaxWeight||t[1]>n._dataMaxWeight)&&(n._dataMaxWeight=t[1])}))}return e},n.prototype.getDataBounds=function(){var t=this._choroplethData.node().getBBox();return{x:t.x,y:t.y,width:t.width,height:t.height}},n.prototype.autoScale=function(){switch(this.autoScaleMode()){case"none":return;case"mesh":this.zoomToBBox(this.getBounds());break;case"data":this.zoomToBBox(this.getDataBounds())}},n.prototype.layerEnter=function(t,e,n){wo.prototype.layerEnter.apply(this,arguments),this._choroplethTransform=e,this._choroplethData=this._choroplethTransform.append("g").attr("class","data"),this._choropleth=this._choroplethTransform.append("path").attr("class","mesh")},n.prototype.layerUpdate=function(t,e){if(wo.prototype.layerUpdate.apply(this,arguments),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this._choroplethTransform.style("stroke",this.meshColor()).style("opacity",this.opacity()),!this.visible()||!this.meshVisible())return this._choropleth.attr("d",""),void delete this._prevProjection;(e||this._prevProjection!==t.projection()||this._prevInternalOnly!==this.internalOnly())&&(this._choropleth.attr("d",t._d3GeoPath(To(this._choroTopology,this._choroTopologyObjects,this.internalOnly()?function(t,e){return t!==e}:function(t,e){return!0}))),this._prevProjection=t.projection(),this._prevInternalOnly=this.internalOnly()),this._choropleth.style("stroke-width",this.meshStrokeWidth()).style("stroke",this.meshColor())},n.prototype.layerExit=function(t){delete this._prevProjection,delete this._prevInternalOnly},n.prototype.layerZoomed=function(e){t.prototype.layerZoomed.apply(this,arguments),this._choroplethData.style("stroke-width",this.meshVisible()?"0px":"".concat(.5/e.zoomScale(),"px"))},n.prototype.click=function(t,e,n){},n.prototype.dblclick=function(t,e,n){},n}(wo);Ao.prototype._class+=" map_Choropleth",Ao.prototype.mixin(e.Utility.SimpleSelectionMixin),Ao.prototype._palette=e.Palette.rainbow("default"),Ao.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Ao.prototype._palette.switch(),{tags:["Basic","Shared"]}),Ao.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),Ao.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),Ao.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),Ao.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),Ao.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width"),Ao.prototype.publish("internalOnly",!1,"boolean","Internal mesh only"),Ao.prototype.publish("autoScaleMode","mesh","set","Auto Scale",["none","mesh","data"],{tags:["Basic"],override:!0});var Io,Bo,No=(Io="application/json",Bo=function(t){return JSON.parse(t.responseText)},function(t,n){var i=function(t,n){var i,o,r,a,s=e.dispatch("beforesend","progress","load","error"),l=e.map(),h=new XMLHttpRequest,u=null,c=null,p=0;function d(t){var e,n=h.status;if(!n&&function(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}(h)||n>=200&&n<300||304===n){if(r)try{e=r.call(i,h)}catch(t){return void s.call("error",i,t)}else e=h;s.call("load",i,e)}else s.call("error",i,t)}if("undefined"!=typeof XDomainRequest&&!("withCredentials"in h)&&/^(http(s)?:)?\/\//.test(t)&&(h=new XDomainRequest),"onload"in h?h.onload=h.onerror=h.ontimeout=d:h.onreadystatechange=function(t){h.readyState>3&&d(t)},h.onprogress=function(t){s.call("progress",i,t)},i={header:function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?l.get(t):(null==e?l.remove(t):l.set(t,e+""),i)},mimeType:function(t){return arguments.length?(o=null==t?null:t+"",i):o},responseType:function(t){return arguments.length?(a=t,i):a},timeout:function(t){return arguments.length?(p=+t,i):p},user:function(t){return arguments.length<1?u:(u=null==t?null:t+"",i)},password:function(t){return arguments.length<1?c:(c=null==t?null:t+"",i)},response:function(t){return r=t,i},get:function(t,e){return i.send("GET",t,e)},post:function(t,e){return i.send("POST",t,e)},send:function(e,n,r){return h.open(e,t,!0,u,c),null==o||l.has("accept")||l.set("accept",o+",*/*"),h.setRequestHeader&&l.each((function(t,e){h.setRequestHeader(e,t)})),null!=o&&h.overrideMimeType&&h.overrideMimeType(o),null!=a&&(h.responseType=a),p>0&&(h.timeout=p),null==r&&"function"==typeof n&&(r=n,n=null),null!=r&&1===r.length&&(r=function(t){return function(e,n){t(null==e?n:null)}}(r)),null!=r&&i.on("error",r).on("load",(function(t){r(null,t)})),s.call("beforesend",i,h),h.send(null==n?null:n),i},abort:function(){return h.abort(),i},on:function(){var t=s.on.apply(s,arguments);return t===s?i:t}},null!=n){if("function"!=typeof n)throw new Error("invalid callback: "+n);return i.get(n)}return i}(t).mimeType(Io).response(Bo);if(null!=n){if("function"!=typeof n)throw new Error("invalid callback: "+n);return i.get(n)}return i}),Zo=null,Ro=null,jo=null,Go=function(t){function n(){return t.call(this)||this}return h(n,t),n.prototype.layerEnter=function(t,n,i){Ao.prototype.layerEnter.apply(this,arguments),this._choroTopology=Zo.topology,this._choroTopologyObjectsCountries=Zo.topology.objects.countries,this._choroTopologyObjectsLand=Zo.topology.objects.land,this._choroTopologyObjects=this._choroTopologyObjectsCountries,this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);var o=this;this.tooltipHTML((function(t){return o.tooltipFormat({label:t[0],value:t[1]})}))},n.prototype.layerUpdate=function(t){Ao.prototype.layerUpdate.apply(this,arguments),this._choroplethData.style("stroke",this.meshVisible()?null:"black"),this.choroPaths=this._choroplethData.selectAll(".shape").data(this.visible()?this.data():[],(function(t){return t[0]}));var e=this;this.choroPaths.enter().append("path").attr("class","shape").attr("vector-effect","non-scaling-stroke").call(this._selection.enter.bind(this._selection)).on("click",(function(t){e._dataMap[t[0]]&&e.click(e.rowToObj(e._dataMap[t[0]]),"weight",e._selection.selected(this))})).on("dblclick",(function(t){e._dataMap[t[0]]&&e.dblclick(e.rowToObj(e._dataMap[t[0]]),"weight",e._selection.selected(this))})).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show).merge(this.choroPaths).attr("d",(function(e){var n=t._d3GeoPath(jo[e[0]]);return n||console.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){Zo&&t(),No("".concat(Do(),"/countries.json"),(function(e){for(var n in Ro=Mo((Zo=e).topology,Zo.topology.objects.countries).features,jo={},Ro)Ro[n].id&&Zo.countryNames[Ro[n].id]&&(jo[Zo.countryNames[Ro[n].id].name]=Ro[n]);t()}))}))),this._topoJsonPromise},n}(Ao);Go.prototype._class+=" map_ChoroplethCountries";var Uo=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.layerEnter=function(t,e,n){Go.prototype.layerEnter.apply(this,arguments),this._choroTopologyObjects=this._choroTopologyObjectsLand},e}(Go);Uo.prototype._class+=" map_ChoroplethContinents";var Ho=null,Fo=null,Wo=null,Vo=function(t){function n(){var e=t.call(this)||this;return e.projection("AlbersUsaPr"),e}return h(n,t),n.prototype.layerEnter=function(t,n,i){Ao.prototype.layerEnter.apply(this,arguments),this._choroTopology=Ho.topology,this._choroTopologyObjects=Ho.topology.objects.counties,this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);var o=this;this.tooltipHTML((function(t){var e=t[0];return o.tooltipFormat({label:Ho.countyNames[e],value:o._dataMap[e]?o._dataMap[e][1]:"N/A"})}))},n.prototype.layerUpdate=function(t){Ao.prototype.layerUpdate.apply(this,arguments),this._choroplethData.style("stroke",this.meshVisible()?null:"black"),this.choroPaths=this._choroplethData.selectAll(".shape").data(this.visible()?this.data():[],(function(t){return t[0]}));var e=this;this.choroPaths.enter().append("path").attr("class","shape").attr("vector-effect","non-scaling-stroke").call(this._selection.enter.bind(this._selection)).on("click",(function(t){e.click(e.rowToObj(t),"weight",e._selection.selected(this))})).on("dblclick",(function(t){e.dblclick(e.rowToObj(t),"weight",e._selection.selected(this))})).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show).merge(this.choroPaths).attr("d",(function(e){var n=t._d3GeoPath(Wo[e[0]]);return n||console.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){Ho&&t(),No("".concat(Do(),"/us-counties.json"),(function(e){for(var n in Fo=Mo((Ho=e).topology,Ho.topology.objects.counties).features,Wo={},Fo)Fo[n].id&&(Wo[Fo[n].id]=Fo[n]);t()}))}))),this._topoJsonPromise},n.__inputs=[{id:"fips",type:"string"},{id:"value",type:"number"}],n}(Ao);Vo.prototype._class+=" map_ChoroplethCounties",Vo.prototype.publish("onClickFormatFIPS",!1,"boolean","format FIPS code as a String on Click");var qo=null,Yo=null,Ko=null,Xo=function(t){function n(){var e=t.call(this)||this;return e.projection("AlbersUsaPr"),e}return h(n,t),n.prototype.layerEnter=function(t,n,i){Ao.prototype.layerEnter.apply(this,arguments),this._choroTopology=qo.topology,this._choroTopologyObjects=qo.topology.objects.states,this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);var o=this;this.tooltipHTML((function(t){var e=Ko[t[0]].id;return o.tooltipFormat({label:qo.stateNames[e].name,value:t[1]})}))},n.prototype.layerUpdate=function(t){Ao.prototype.layerUpdate.apply(this,arguments),this._choroplethData.style("stroke",this.meshVisible()?null:"black"),this.choroPaths=this._choroplethData.selectAll(".shape").data(this.visible()?this.data():[],(function(t){return t[0]}));var e=this;this.choroPaths.enter().append("path").attr("class","shape").attr("vector-effect","non-scaling-stroke").call(this._selection.enter.bind(this._selection)).on("click",(function(t){e.click(e.rowToObj(t),"weight",e._selection.selected(this))})).on("dblclick",(function(t){e.dblclick(e.rowToObj(t),"weight",e._selection.selected(this))})).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show).merge(this.choroPaths).attr("d",(function(e){var n=t._d3GeoPath(Ko[e[0]]);return n||console.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){qo&&t(),No("".concat(Do(),"/us-states.json"),(function(e){for(var n in Yo=Mo((qo=e).topology,qo.topology.objects.states).features,Ko={},Yo)Yo[n].id&&(Ko[qo.stateNames[Yo[n].id].code]=Yo[n]);t()}))}))),this._topoJsonPromise},n.__inputs=[{id:"state",type:"string"},{id:"value",type:"number"}],n}(Ao);Xo.prototype._class+=" map_ChoroplethStates";var Jo=function(t){function e(){return t.call(this)||this}return h(e,t),e}(bo);Jo.prototype._class+=" map_ChoroplethStatesHeat";yo(".map_Layered .map_GeoHash .data{stroke:none}.map_Layered .map_GeoHash .data.selected{stroke:red}.map_Layered .map_GeoHash .data.over{stroke:orange}.map_Layered .map_GeoHash .data.selected.over{stroke:red}");var Qo=function(t){function n(){return t.call(this)||this}return h(n,t),n.prototype.data=function(t){var e=wo.prototype.data.apply(this,arguments);return arguments.length&&(this._dataMinWeight=null,this._dataMaxWeight=null,this.data().forEach((function(t){(!this._dataMinWeight||t[1]<this._dataMinWeight)&&(this._dataMinWeight=t[1]),(!this._dataMaxWeight||t[1]>this._dataMaxWeight)&&(this._dataMaxWeight=t[1])}),this)),e},n.prototype.layerEnter=function(t,n,i){wo.prototype.layerEnter.apply(this,arguments),this.geohash=new co,this._geoHashTransform=n.append("g").attr("class","map_GeoHash"),this._selection=new e.Utility.SimpleSelection(this,this._geoHashTransform),this.geoHashPaths=e.select(null)},n.prototype.layerUpdate=function(t){wo.prototype.layerUpdate.apply(this,arguments),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this._geoHashTransform.style("opacity",this.opacity()),this.geoHashPaths=this._geoHashTransform.selectAll(".data").data(this.visible()?this.data():[],(function(t){return t[0]}));var e=this;this.geoHashPaths.enter().append("path").attr("class","data").call(this._selection.enter.bind(this._selection)).on("click",(function(t){e.click(e.rowToObj(t),"weight",e._selection.selected(this))})).on("dblclick",(function(t){e.dblclick(e.rowToObj(t),"weight",e._selection.selected(this))})).merge(this.geoHashPaths).attr("d",(function(n){var i=e.geohash.bounds(n[0]),o={type:"LineString",coordinates:[[i.sw.lon,i.ne.lat],[i.ne.lon,i.ne.lat],[i.ne.lon,i.sw.lat],[i.sw.lon,i.sw.lat]]};return t._d3GeoPath(o)})).style("fill",(function(t){return e._palette(t[1],e._dataMinWeight,e._dataMaxWeight)})),this.geoHashPaths.exit().remove()},n.prototype.click=function(t,e,n){},n.prototype.dblclick=function(t,e,n){},n}(wo);Qo.prototype._class+=" map_GeoHash",Qo.prototype._palette=e.Palette.rainbow("default"),Qo.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Qo.prototype._palette.switch(),{tags:["Basic","Shared"]}),Qo.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),Qo.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),Qo.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),Qo.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),Qo.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width");var $o={exports:{}};!function(t,e){!function(e,n){if(null===(typeof window!=="undefined"?window:null))throw new Error("Google-maps package can be used only in browser");t.exports=function(){var t="3.31",e=null,n=null,i=!1,o=[],r=[],a=null,s={URL:"https://maps.googleapis.com/maps/api/js",KEY:null,LIBRARIES:[],CLIENT:null,CHANNEL:null,LANGUAGE:null,REGION:null};s.VERSION=t,s.WINDOW_CALLBACK_NAME="__google_maps_api_provider_initializator__",s._googleMockApiObject={},s.load=function(t){null===n?!0===i?t&&o.push(t):(i=!0,window[s.WINDOW_CALLBACK_NAME]=function(){l(t)},s.createLoader()):t&&t(n)},s.createLoader=function(){(e=document.createElement("script")).type="text/javascript",e.src=s.createUrl(),document.body.appendChild(e)},s.isLoaded=function(){return null!==n},s.createUrl=function(){var t=s.URL;return t+="?callback="+s.WINDOW_CALLBACK_NAME,s.KEY&&(t+="&key="+s.KEY),s.LIBRARIES.length>0&&(t+="&libraries="+s.LIBRARIES.join(",")),s.CLIENT&&(t+="&client="+s.CLIENT),s.CHANNEL&&(t+="&channel="+s.CHANNEL),s.LANGUAGE&&(t+="&language="+s.LANGUAGE),s.REGION&&(t+="&region="+s.REGION),s.VERSION&&(t+="&v="+s.VERSION),t},s.release=function(l){var h=function(){s.KEY=null,s.LIBRARIES=[],s.CLIENT=null,s.CHANNEL=null,s.LANGUAGE=null,s.REGION=null,s.VERSION=t,n=null,i=!1,o=[],r=[],void 0!==window.google&&delete window.google,void 0!==window[s.WINDOW_CALLBACK_NAME]&&delete window[s.WINDOW_CALLBACK_NAME],null!==a&&(s.createLoader=a,a=null),null!==e&&(e.parentElement.removeChild(e),e=null),l&&l()};i?s.load((function(){h()})):h()},s.onLoad=function(t){r.push(t)},s.makeMock=function(){a=s.createLoader,s.createLoader=function(){window.google=s._googleMockApiObject,window[s.WINDOW_CALLBACK_NAME]()}};var l=function(t){var e;for(i=!1,null===n&&(n=window.google),e=0;e<r.length;e++)r[e](n);for(t&&t(n),e=0;e<o.length;e++)o[e](n);o=[]};return s}()}()}($o);var tr=$o.exports,er=s({__proto__:null,default:tr},[$o.exports]);yo(".map_GMap .marker{fill:#656565;stroke:none;stroke-width:1px}.map_GMap .map_Layered{cursor:auto;pointer-events:auto}.gm-style img{max-width:none}.gm-style label{display:inline;width:auto}");var nr=tr||er;t.google=null;var ir,or=15e3;function rr(e){return ir||(ir=o.promiseTimeout(or,new Promise((function(n,i){if(t.google)n();else if(e)t.google=e,n();else{window.__hpcc_gmap_apikey||console.warn("__hpcc_gmap_apikey does not contain a valid API key, reverting to developers key (expect limited performance)");try{nr.KEY=window.__hpcc_gmap_apikey||"AIzaSyDwGn2i1i_pMZvnqYJN1BksD_tjYaCOWKg",nr.LIBRARIES=["geometry","drawing"],nr.load((function(e){t.google=e,n()}))}catch(t){console.warn("Failed to initialize Google Map API: ".concat(t.message)),n()}}}))).catch((function(t){console.warn("Timed out initializing Google Map API after ".concat(or,"ms."))}))),ir}var ar=function(){function e(t){this._userShapes=[],this.mapContext=t}return e.prototype.add=function(t){this._userShapes.indexOf(t)>=0||this._userShapes.push(t)},e.prototype.remove=function(t){var e=this._userShapes.indexOf(t);e>=0&&this._userShapes.splice(e,1),t.setMap(null)},e.prototype.save=function(){var t=this;return this._userShapes.map((function(e){return t._saveShape(e)}))},e.prototype.load=function(t){this._deserializeShapes(t)},e.prototype._saveShape=function(t){var e={},n={circle:function(t){e.type="circle",e.pos={lat:t.center.lat(),lng:t.center.lng()},e.radius=t.radius},rectangle:function(t){e.type="rectangle",e.bounds={ne:t.bounds.getNorthEast(),sw:t.bounds.getSouthWest()}},polygon:function(t){e.type=t.__hpcc_type;var n=t.getPath();e.vertices=[];for(var i=0;i<n.length;i++)e.vertices.push(n.getAt(i))},polyline:function(t){n.polygon(t)}};return n[t.__hpcc_type](t),e.strokeWeight=t.strokeWeight,e.fillColor=t.fillColor,e.fillOpacity=t.fillOpacity,e.editable=t.editable,e.clickable=t.clickable||!0,e},e.prototype._deserializeShapes=function(e){for(var n=JSON.parse(e),i=0,o=.45,r="#1f77b4",a=!0,s=!0,l={circle:function(e,n){return new t.google.maps.Circle({strokeWeight:e.strokeWeight||i,fillColor:e.fillColor||r,fillOpacity:e.fillOpacity||o,editable:e.editable||a,clickable:e.clickable||s,map:n,center:e.pos,radius:e.radius})},rectangle:function(e,n){return new t.google.maps.Rectangle({strokeWeight:e.strokeWeight||i,fillColor:e.fillColor||r,fillOpacity:e.fillOpacity||o,editable:e.editable||a,clickable:e.clickable||s,map:n,bounds:{north:e.bounds.ne.lat,west:e.bounds.sw.lng,south:e.bounds.sw.lat,east:e.bounds.ne.lng}})},polygon:function(e,n){return new t.google.maps.Polygon({strokeWeight:e.strokeWeight||i,fillColor:e.fillColor||r,fillOpacity:e.fillOpacity||o,editable:e.editable||a,clickable:e.clickable||s,map:n,paths:e.vertices})},polyline:function(e,n){return new t.google.maps.Polyline({strokeWeight:e.strokeWeight||i,fillColor:e.fillColor||r,fillOpacity:e.fillOpacity||o,editable:e.editable||a,clickable:e.clickable||s,map:n,path:e.vertices})}},h=0;h<n.length;h++){var u=l[n[h].type](n[h],this.mapContext._googleMap);this.mapContext.onDrawingComplete({type:n[h].type,overlay:u})}},e}(),sr=function(n){function o(){var e=n.call(this)||this;e._tag="div";var o=e;function r(e,n,i){var r=o._overlay.getProjection(),a=r.fromLatLngToDivPixel(new t.google.maps.LatLng(n,i)),s=r.getWorldWidth(),l=parseFloat(e.widgetX()),h=parseFloat(e.widgetY()),u=parseFloat(e.widgetWidth());for(a.x-=l,a.y-=h;a.x<0;)a.x+=s;for(;a.x>u;)a.x-=s;return a}return e._userShapes=new ar(e),e._worldSurface=new i.AbsoluteSurface,e._worldSurface.project=function(t,e){return r(this,t,e)},e._viewportSurface=new i.AbsoluteSurface,e._viewportSurface.project=function(t,e){return r(this,t,e)},e}return h(o,n),o.prototype.data=function(t){var n=e.HTMLWidget.prototype.data.apply(this,arguments);return n},o.prototype.getMapType=function(){switch(this.type()){case"terrain":return t.google.maps.MapTypeId.TERRAIN;case"road":default:return t.google.maps.MapTypeId.ROADMAP;case"satellite":return t.google.maps.MapTypeId.SATELLITE;case"hybrid":return t.google.maps.MapTypeId.HYBRID}},o.prototype.getMapOptions=function(){return{panControl:this.panControl(),zoomControl:this.zoomControl(),fullscreenControl:this.fullscreenControl(),mapTypeControl:this.mapTypeControl(),scaleControl:this.scaleControl(),streetViewControl:this.streetViewControl(),overviewMapControl:this.overviewMapControl(),overviewMapControlOptions:{opened:!0},styles:this.googleMapStyles()}},o.prototype.size=function(n){var i=e.HTMLWidget.prototype.size.apply(this,arguments);return arguments.length&&this._googleMapNode&&(this._googleMapNode.style("width",n.width+"px").style("height",n.height+"px"),t.google.maps.event.trigger(this._googleMap,"resize")),i},o.prototype.enter=function(i,o){n.prototype.enter.call(this,i,o);var r=this;this._googleGeocoder=new t.google.maps.Geocoder,this._googleMapNode=o.append("div").style("width",this.width()+"px").style("height",this.height()+"px"),this._googleMap=new t.google.maps.Map(this._googleMapNode.node(),{zoom:this.zoom(),center:new t.google.maps.LatLng(this.centerLat(),this.centerLong()),mapTypeId:this.getMapType(),disableDefaultUI:!0}),this._overlay=function(e,n,i){function o(e,n,i){t.google.maps.OverlayView.call(this),this._div=null,this._worldSurface=n,this._viewportSurface=i,this._map=e,this.setMap(e);var o=this;t.google.maps.event.addListener(e,"bounds_changed",(function(){o.draw()})),t.google.maps.event.addListener(e,"projection_changed",(function(){o.draw()})),this._prevWorldMin={x:0,y:0},this._prevWorldMax={x:0,y:0},this._prevMin={x:0,y:0},this._prevMax={x:0,y:0}}return o.prototype=t.google.maps.OverlayView.prototype,o.prototype.onAdd=function(){this.div=document.createElement("div"),this._viewportSurface.target(null).target(this.div).units("pixels"),this.getPanes().overlayMouseTarget.appendChild(this.div)},o.prototype.draw=function(){var e=this.getProjection();if(e){for(var n=this._map.getBounds(),i=e.fromLatLngToDivPixel(n.getCenter()),o=e.fromLatLngToDivPixel(n.getSouthWest()),r=e.fromLatLngToDivPixel(n.getNorthEast()),a={x:o.x,y:r.y},s={x:r.x,y:o.y},l=e.getWorldWidth();s.x<a.x+100;)s.x+=l;for(;a.x>i.x;)a.x-=l,s.x-=l;a.x===this._prevMin.x&&a.y===this._prevMin.y&&s.x===this._prevMax.x&&s.y===this._prevMax.y||(this._viewportSurface.resize({width:0,height:0}).widgetX(a.x).widgetY(a.y).widgetWidth(s.x-a.x).widgetHeight(s.y-a.y),this._viewportSurface._renderCount?(this._viewportSurface.render(),this._prevMin=a,this._prevMax=s):this._viewportSurface.lazyRender());for(var h=e.fromLatLngToDivPixel(new t.google.maps.LatLng(85,-179.9)),u=e.fromLatLngToDivPixel(new t.google.maps.LatLng(-85,179.9));u.x<h.x+100;)u.x+=l;for(;h.x>i.x;)h.x-=l,u.x-=l;h.x===this._prevWorldMin.x&&h.y===this._prevWorldMin.y&&u.x===this._prevWorldMax.x&&u.y===this._prevWorldMax.y||(this._worldSurface.widgetX(h.x).widgetY(h.y).widgetWidth(u.x-h.x).widgetHeight(u.y-h.y).render(),this._prevWorldMin=u,this._prevWorldMax=u)}},o.prototype.onRemove=function(){this._viewportSurface.target(null),this._div.parentNode.removeChild(this._div),this._div=null},new o(e,n,i)}(this._googleMap,this._worldSurface,this._viewportSurface),this._googleMap.addListener("center_changed",(function(){r.centerLat(r._googleMap.center.lat()),r._prevCenterLat=r.centerLat(),r.centerLong(r._googleMap.center.lng()),r._prevCenterLong=r.centerLong(),r._googleMapPanorama.setPosition({lat:r.centerLat(),lng:r.centerLong()}),r.zoom(r._googleMap.getZoom()),r._prevZoom=r.zoom(),r._overlay.draw()})),this._googleMap.addListener("zoom_changed",(function(){r.zoom(r._googleMap.zoom),r._prevZoom=r.zoom()})),this._googleStreetViewService=new t.google.maps.StreetViewService,this._googleMapPanorama=this._googleMap.getStreetView(),this._googleMapPanorama.addListener("visible_changed",(function(){r.streetView(r._googleMapPanorama.getVisible()),r._prevStreetView=r.streetView()})),this._circleMap=e.map([]),this._pinMap=e.map([]),this._prevCenterLat=this.centerLat(),this._prevCenterLong=this.centerLong(),this._prevZoom=this.zoom();var a={strokeWeight:0,fillOpacity:.45,fillColor:"#1f77b4",editable:!0,clickable:!0};this._drawingManager=new t.google.maps.drawing.DrawingManager({drawingMode:t.google.maps.drawing.OverlayType.MARKER,drawingControl:!0,drawingControlOptions:{position:t.google.maps.ControlPosition.TOP_CENTER,drawingModes:["polygon","rectangle","circle"]},rectangleOptions:a,circleOptions:a,polygonOptions:a}),this.drawingState()&&this._userShapes.load(this.drawingState())},o.prototype.update=function(e,n){var i=this;this._googleMapNode.style("width",this.width()+"px").style("height",this.height()+"px"),this._googleMap.setMapTypeId(this.getMapType()),this._googleMap.setOptions(this.getMapOptions()),this.centerAddress_exists()&&this._prevCenterAddress!==this.centerAddress()&&(this._prevCenterAddress=this.centerAddress(),this._googleGeocoder.geocode({address:this.centerAddress()},(function(e,n){if(n===t.google.maps.GeocoderStatus.OK){var o=e[0].geometry.bounds||e[0].geometry.viewport;i._googleMap.fitBounds(o),i.streetView()&&i.useComputedHeading()&&i.streetViewAt({lat:e[0].geometry.location.lat(),lng:e[0].geometry.location.lng()},50)}else i.statusError({data:e,status:n})}))),this._prevCenterLat===this.centerLat()&&this._prevCenterLong===this.centerLong()||(this._googleMap.setCenter(new t.google.maps.LatLng(this.centerLat(),this.centerLong())),this._prevCenterLat=this.centerLat(),this._prevCenterLong=this.centerLong()),this._prevZoom!==this.zoom()&&(this._googleMap.setZoom(this.zoom()),this._prevZoom=this.zoom()),this.updateCircles(),this.updatePins(),this._prevStreetView!==this.streetView()&&(this.streetView()?(this._googleMapPanorama.setPosition({lat:this.centerLat(),lng:this.centerLong()}),this._googleMapPanorama.setPov({heading:0,pitch:0}),this._googleMapPanorama.setVisible(!0)):this._googleMapPanorama.setVisible(!1),this._prevStreetView=this.streetView()),this.drawingTools()?(this._drawingManager.setMap(this._googleMap),t.google.maps.event.addListener(this._drawingManager,"overlaycomplete",(function(){o.prototype.onDrawingComplete.apply(i,arguments)}))):(this._drawingManager.setMap(null),t.google.maps.event.clearInstanceListeners(this._drawingManager))},o.prototype.render=function(t){var e=this,i=arguments;return rr().then((function(){n.prototype.render.apply(e,i)})),this},o.prototype.streetViewAt=function(e,n){void 0===n&&(n=1e3);var i=this,o=this.outdoorStreetViewOnly()?t.google.maps.StreetViewSource.OUTDOOR:t.google.maps.StreetViewSource.DEFAULT;this._googleStreetViewService.getPanorama({location:e,radius:n,source:o},(function(n,o){if("OK"===o){var r=new t.google.maps.Marker({position:e,map:i._googleMap}),a=t.google.maps.geometry.spherical.computeHeading(n.location.latLng,new t.google.maps.LatLng(e.lat,e.lng));i._googleMapPanorama.setPano(n.location.pano),i._googleMapPanorama.setPov({heading:a,pitch:0}),i.showStreetViewMarker()||r.setVisible(!1),i._googleMapPanorama.setVisible(!0);var s=t.google.maps.event.addListener(i._googleMap.getStreetView(),"visible_changed",(function(){this.getVisible()||(r.setMap(null),t.google.maps.event.removeListener(s))}))}else i.statusError({data:n,status:o})}))},o.prototype.updateCircles=function(){function t(t){return t[0]+"_"+t[1]}var n=[],i=e.map(this._circleMap.keys(),(function(t){return t}));this.data().forEach((function(e){i.remove(t(e)),e[3]&&!this._circleMap.has(t(e))?n.push(e):e[3]&&this._circleMap.has(t(e))||!e[3]&&this._circleMap.has(t(e))&&i.set(t(e),!0)}),this),n.forEach((function(e){var n=this.createCircle(e[0],e[1],e[3]);this._circleMap.set(t(e),n)}),this);var o=this;i.each((function(t){o._circleMap.get(t).setMap(null),o._circleMap.remove(t)}))},o.prototype.updatePins=function(){function t(t){return t[0]+"_"+t[1]}var n=[],i=[],o=e.map(this._pinMap.keys(),(function(t){return t}));this.data().forEach((function(e){o.remove(t(e)),e[2]&&!this._pinMap.has(t(e))?n.push(e):e[2]&&this._pinMap.has(t(e))?i.push(e):!e[2]&&this._pinMap.has(t(e))&&o.set(t(e),!0)}),this),n.forEach((function(e){var n=this.createMarker(e[0],e[1],e[2]);this._pinMap.set(t(e),n)}),this),i.forEach((function(e){this._pinMap.get(t(e)).setIcon(this.createIcon(e[2]))}),this);var r=this;o.each((function(t){r._pinMap.get(t).setMap(null),r._pinMap.remove(t)}))},o.prototype.createIcon=function(t){return{path:"M 0,0 C -2,-20 -10,-22 -10,-30 A 10,10 0 1,1 10,-30 C 10,-22 2,-20 0,0 z M -2,-30",fillColor:t.fillColor,fillOpacity:t.fillOpacity||.8,scale:.5,strokeColor:t.strokeColor||"black",strokeWeight:.25}},o.prototype.createMarker=function(e,n,i){return new t.google.maps.Marker({position:new t.google.maps.LatLng(e,n),animation:t.google.maps.Animation.DROP,title:i.title||"",icon:this.createIcon(i),map:this._googleMap})},o.prototype.createCircle=function(e,n,i){return i.radius=i.radius||1,new t.google.maps.Circle({center:new t.google.maps.LatLng(e,n),radius:16093*i.radius/10,fillColor:i.fillColor||"red",strokeColor:i.strokeColor||i.fillColor||"black",strokeWeight:.5,map:this._googleMap})},o.prototype.zoomTo=function(e,n){if(!this._renderCount)return this;n=n||this.singleZoomToMaxZoom();var i=0,o=new t.google.maps.LatLngBounds;switch(e.forEach((function(e){var n=new t.google.maps.LatLng(e[0],e[1]);o.extend(n),++i})),i){case 0:break;case 1:this._googleMap.setCenter(o.getCenter()),this._googleMap.setZoom(n);break;default:this._googleMap.fitBounds(o)}return this},o.prototype.zoomToFit=function(){return this.zoomTo(this.data())},o.prototype.drawingOptions=function(t){return arguments.length?(this._drawingManager.setOptions(t),this):this._drawingManager},o.prototype.userShapeSelection=function(t){return arguments.length?(this._userShapeSelection&&this._userShapeSelection.setEditable(!1),this._userShapeSelection=t,this._userShapeSelection&&this._userShapeSelection.setEditable(!0),this):this._userShapeSelection},o.prototype.deleteUserShape=function(t){this._userShapeSelection===t&&this.userShapeSelection(null),this._userShapes.remove(t)},o.prototype.onDrawingComplete=function(e){if(e.type!==t.google.maps.drawing.OverlayType.MARKER){this._drawingManager.setDrawingMode(null);var n=e.overlay;n.__hpcc_type=e.type,this._userShapes.add(n);var i=this,o=!1;window.addEventListener("keydown",(function(t){"Control"!==t.keyIdentifier&&!0!==t.ctrlKey||(o=!0)})),window.addEventListener("keyup",(function(t){!1===t.ctrlKey&&(o=!1)})),t.google.maps.event.addListener(n,"click",(function(t){return i.userShapeSelection(n),t&&!0===o&&(i.deleteUserShape(n),i.drawingState(JSON.stringify(i._userShapes.save()))),!1})),this.userShapeSelection(n),this.drawingState(JSON.stringify(this._userShapes.save()))}},o.prototype.statusError=function(t){console.warn("Data not found for this location.")},o}(e.HTMLWidget);sr.prototype._class+=" map_GMap",sr.prototype.publish("outdoorStreetViewOnly",!1,"boolean","If true, streetView will only display outdoor locations"),sr.prototype.publish("showStreetViewMarker",!1,"boolean","If true, streetView marker will be hidden"),sr.prototype.publish("useComputedHeading",!1,"boolean","If true, centerAddress streetView compute the ideal panorama heading"),sr.prototype.publish("type","road","set","Map Type",["terrain","road","satellite","hybrid"],{tags:["Basic"]}),sr.prototype.publish("centerLat",42.877742,"number","Center Latitude",null,{tags:["Basic"]}),sr.prototype.publish("centerLong",-97.380979,"number","Center Longitude",null,{tags:["Basic"]}),sr.prototype.publish("centerAddress",null,"string","Address to center map on",null,{tags:["Basic"],optional:!0}),sr.prototype.publish("zoom",4,"number","Zoom Level",null,{tags:["Basic"]}),sr.prototype.publish("singleZoomToMaxZoom",14,"number","Max zoomTo level with single item"),sr.prototype.publish("panControl",!0,"boolean","Pan Controls",null,{tags:["Basic"]}),sr.prototype.publish("zoomControl",!0,"boolean","Zoom Controls",null,{tags:["Basic"]}),sr.prototype.publish("scaleControl",!0,"boolean","Scale Controls",null,{tags:["Basic"]}),sr.prototype.publish("mapTypeControl",!1,"boolean","Map Type Controls",null,{tags:["Basic"]}),sr.prototype.publish("fullscreenControl",!1,"boolean","Fullscreen Controls",null,{tags:["Basic"]}),sr.prototype.publish("streetViewControl",!1,"boolean","StreetView Controls",null,{tags:["Basic"]}),sr.prototype.publish("overviewMapControl",!1,"boolean","OverviewMap Controls",null,{tags:["Basic"]}),sr.prototype.publish("streetView",!1,"boolean","Streetview",null,{tags:["Basic"]}),sr.prototype.publish("drawingTools",!1,"boolean","Drawing Tools",null,{tags:["Basic"]}),sr.prototype.publish("drawingState","","string","Map Drawings",null,{disable:function(t){return!1===t.drawingTools()}}),sr.prototype.publish("googleMapStyles",{},"object","Styling for map colors etc",null,{tags:["Basic"]});var lr=function(t){function e(e,n){var i=t.call(this)||this;return i.gmap=e,i.surface=n,i.autoScaleMode("none"),i.zoomable(!1).zoomDuration(10),i}return h(e,t),e.prototype.getProjection=function(){return this.gmap._overlay.getProjection()},e.prototype.render=function(e){var n=this;return t.prototype.render.call(this,(function(t){var i=n.getProjection();if(i){var o=new window.google.maps.LatLng(0,0),r=i.fromLatLngToDivPixel(o),a=n.surface.widgetX(),s=n.surface.widgetY(),l=[r.x-a,r.y-s],h=n.gmap._googleMap.getZoom();n.zoomTo(l,.0625*(1<<h),0)}e&&e(t)})),this},e}(bo),hr=function(e){function n(){var t=e.call(this)||this;return t.layered=new lr(t,t._viewportSurface),t._viewportSurface.widget(t.layered),t}return h(n,e),n.prototype.invert=function(t,e){return this.layered.invert(t,e)},n.prototype.rproject=function(e,n){var i=this.layered.getProjection().fromDivPixelToLatLng(new t.google.maps.Point(e,n));return{lat:i.lat(),lng:i.lng()}},n.prototype.updateCircles=function(){},n.prototype.updatePins=function(){},n.prototype.layers=function(t){return arguments.length?(this.layered.layers(t),this):this.layered.layers()},n.prototype.render=function(t){var n=this;return e.prototype.render.call(this,(function(e){n.layered.preRender().then((function(){n.layered.render((function(e){t&&t(e)}))}))}))},n}(sr);hr.prototype._class+=" map_GMapLayered";var ur=function(t){function e(){var e=t.call(this)||this,n=e;return e._counties=(new Vo).paletteID("Blues").meshVisible(!1).opacity(.8).columns(["fips","weight"]).on("click",(function(t,e,i){n.click(t,e,i)})).on("dblclick",(function(t,e,i){n.dblclick(t,e,i)})),e}return h(e,t),e.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),this.layers([this._counties])},e.prototype.update=function(e,n){this._counties.data(this.data()),t.prototype.update.call(this,e,n),this._palette=this._counties._palette,this._dataMinWeight=this._counties._dataMinWeight,this._dataMaxWeight=this._counties._dataMaxWeight},e.prototype.render=function(e){var n=this;return t.prototype.render.call(this,(function(t){if(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}(hr);ur.prototype._class+=" map_GMapCounties",ur.prototype.publish("autoScale",!1,"boolean","Auto scale to data");var cr=function(t){function n(){return t.call(this)||this}return h(n,t),n.prototype.enter=function(){t.prototype.enter.apply(this,arguments);var n=(new r.Graph).layout("None").zoomable(!1),i=n.render,o=this;n.render=function(t){var n=[],a=[],s=null;o.data().forEach((function(t){var i=o._viewportSurface.project(t[0],t[1]),l=(new e.Shape).shape("circle").radius(3).data(t).pos(i);n.push(l),s&&a.push((new r.Edge).sourceVertex(s).targetVertex(l).sourceMarker("none").targetMarker("arrow")),s=l})),this.data({vertices:n,edges:a});var l=i.apply(this,arguments);return l},this._viewportSurface.widget(n)},n}(sr);cr.prototype._class+=" map_GMapGraph";var pr=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.enter=function(){t.prototype.enter.apply(this,arguments);var e=new a.HeatMap,n=e.render,i=this;e.render=function(t){return this.data(i.data().map((function(t){var e=i._viewportSurface.project(t[0],t[1]);return[e.x,e.y,t[4]]}))),n.apply(this,arguments),this},this._viewportSurface.widget(e)},e}(sr);pr.prototype._class+=" map_GMapHeat";yo(".map_Layered .pin>path{stroke:#000;cursor:pointer}.map_Layered .pin.selected>path{stroke-width:1px;stroke:red}.map_Layered .pin.over>path{stroke:orange}.map_Layered .pin.selected.over>path{stroke-width:1px;stroke:red}");var dr=function(t){function n(){var n=t.call(this)||this;return e.Utility.SimpleSelectionMixin.call(n),n._geohash=new co,n}return h(n,t),n.prototype.pinsData=function(){var t=this._db.fieldByLabel(this.geohashColumn()),e=this._db.fieldByLabel(this.tooltipColumn()),n=this._db.fieldByLabel(this.latColumn()),i=this._db.fieldByLabel(this.longColumn()),o=this;return this.data().filter((function(t){var e=n?t[n.idx]:t[0],r=i?t[i.idx]:t[1];return!o.omitNullLatLong()||0!==e||0!==r})).map((function(o,r){var a={idx:r,lat:n?o[n.idx]:o[0],long:i?o[i.idx]:o[1],ext:o[2]instanceof Object?o[2]:{},origRow:o};if(t)try{var s=this._geohash.bounds(o[t.idx]);a.lat=(s.ne.lat+s.sw.lat)/2,a.long=(s.ne.lon+s.sw.lon)/2}catch(t){}return e&&(a.ext.tooltip=o[e.idx]),a}),this)},n.prototype.layerEnter=function(t,n,i){wo.prototype.layerEnter.apply(this,arguments),this._pinsTransform=n,this._selection.widgetElement(this._pinsTransform),this.pinsPaths=e.select(null),this.tooltipHTML((function(t){return void 0===t.ext.tooltip?"":t.ext.tooltip}))},n.prototype.layerUpdate=function(t){wo.prototype.layerUpdate.apply(this,arguments),this._pinsTransform.style("opacity",this.opacity()),this.pinsPaths=this._pinsTransform.selectAll(".pin").data(this.visible()?this.pinsData():[],(function(t){return t.idx}));var n=this,i=this.pinsPaths.enter().append("g").attr("class","pin").call(this._selection.enter.bind(this._selection)).on("click",(function(t){n.click(n.rowToObj(t.origRow),"geohash",n._selection.selected(this))})).on("dblclick",(function(t){n.dblclick(n.rowToObj(t.origRow),"geohash",n._selection.selected(this))})).on("mouseover",(function(t){e.Platform.isIE||this.parentNode.appendChild(this)})).on("mouseout.tooltip",(function(t){t.ext&&t.ext.tooltip&&n.tooltip.hide.apply(this,arguments)})).on("mousemove.tooltip",(function(t){t.ext&&t.ext.tooltip&&n.tooltip.show.apply(this,arguments)})).each((function(t){var n=e.select(this);n.append("path").attr("class","data"),n.append("text").attr("text-anchor","middle")})).merge(this.pinsPaths);i.selectAll("text").style("stroke",this.fontColor()).style("fill",this.fontColor()).style("font-size",this.fontSize()).style("font-family",this.fontFamily()).style("dominant-baseline",this.textBaseline()).attr("dx",0).attr("dy",this.pinTextDY()).text((function(t){return t.ext&&t.ext.text?t.ext.text:""}));var o=this.svgPinPath();i.selectAll("path.data").attr("d",o).attr("stroke-width",this.strokeWidth()+"px").style("display",(function(e){return t.project(e.lat,e.long)?null:"none"})).style("stroke",(function(t){return t.ext&&t.ext.strokeColor?t.ext.strokeColor:n.strokeColor()})).style("fill",(function(t){return t.ext&&t.ext.fillColor?t.ext.fillColor:n.fillColor()})),this.pinsPaths.exit().remove()},n.prototype.layerZoomed=function(t){wo.prototype.layerZoomed.apply(this,arguments),this.pinsPaths.attr("transform",(function(e){var n=t.project(e.lat,e.long);return n||(n=[0,0]),"translate("+n[0]+", "+n[1]+")scale("+1/t.zoomScale()+")"}))},n.prototype.pinTextDY=function(){switch(this.pinType()){case"pin":case"rectangle-pin":return-this.arrowHeight();case"circle":case"rectangle":return 0}},n.prototype.svgPinPath=function(){switch(this.pinType()){case"pin":return this.circlePinPath();case"circle":return this.circlePath();case"rectangle":return this.rectanglePath();case"rectangle-pin":return this.rectanglePinPath()}},n.prototype.rectanglePinPath=function(){var t=this.pinWidth(),e=this.pinHeight(),n=this.cornerRadius(),i=this.arrowHeight(),o=this.arrowWidth(),r=(t-2*n-o)/2;return"M"+(0-t/2)+","+(0-e+n)+"a"+-n+","+-n+" 0 0 1 "+n+","+-n+"h"+(t+2*-n)+"a"+n+","+n+" 0 0 1 "+n+","+n+"v"+(e+2*-n)+"a"+n+","+n+" 0 0 1 "+-n+","+n+"h"+-r+"l"+-o/2+","+i+"l"+-o/2+","+-i+"h"+-r+"a"+-n+","+-n+" 0 0 1 "+-n+","+-n+"z"},n.prototype.rectanglePath=function(){var t=this.pinWidth(),e=this.pinHeight(),n=this.cornerRadius(),i=-e/2;return"M"+-t/2+","+(i+=n)+"a"+-n+","+-n+" 0 0 1 "+n+","+-n+"h"+(t+2*-n)+"a"+n+","+n+" 0 0 1 "+n+","+n+"v"+(e+2*-n)+"a"+n+","+n+" 0 0 1 "+-n+","+n+"h"+(2*n-t)+"a"+-n+","+-n+" 0 0 1 "+-n+","+-n+"z"},n.prototype.circlePinPath=function(){var t=this.arrowHeight(),e=this.arrowWidth(),n=e/2,i=-t;return"M"+(0-e/2)+","+(0-t)+"c"+-n+" "+i+", "+(e+n)+" "+i+", "+e+" 0l"+-e/2+","+t+"l"+-e/2+","+-t+"z"},n.prototype.circlePath=function(){var t=+this.pinRadius();return"M 0, 0 m ".concat(-t,", 0 a ").concat(t,",").concat(t," 0 1,0 ").concat(2*t,",0 a ").concat(t,",").concat(t," 0 1,0 ").concat(2*-t,",0")},n.prototype.click=function(t,e,n){},n.prototype.dblclick=function(t,e,n){},n}(wo);dr.prototype._class+=" map_Pins",dr.prototype.mixin(e.Utility.SimpleSelectionMixin),dr.prototype.publish("geohashColumn",null,"set","Geohash column",(function(){return this.columns()}),{optional:!0}),dr.prototype.publish("tooltipColumn",null,"set","Tooltip column",(function(){return this.columns()}),{optional:!0}),dr.prototype.publish("latColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),dr.prototype.publish("longColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),dr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),dr.prototype.publish("fillColor","#00FFDD","html-color","Pin Color",null,{optional:!0}),dr.prototype.publish("omitNullLatLong",!1,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]}),dr.prototype.publish("strokeWidth",.5,"number","Pin Border Thickness (pixels)",null,{tags:["Basic"]}),dr.prototype.publish("strokeColor","","html-color","Pin Border Color",null,{optional:!0}),dr.prototype.publish("fontSize",18,"number","Font Size",null,{tags:["Basic","Shared"]}),dr.prototype.publish("fontFamily","Verdana","string","Font Name",null,{tags:["Basic","Shared","Shared"]}),dr.prototype.publish("fontColor","#000000","html-color","Font Color",null,{tags:["Basic","Shared"]}),dr.prototype.publish("pinType","pin","set","Pin Type",["pin","circle","rectangle","rectangle-pin"],{tags:["Basic"]}),dr.prototype.publish("arrowWidth",8,"number","Pin arrow width (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["pin","rectangle-pin"].indexOf(t.pinType())}}),dr.prototype.publish("arrowHeight",12,"number","Pin arrow height (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["pin","rectangle-pin"].indexOf(t.pinType())}}),dr.prototype.publish("pinWidth",20,"number","Width of pin (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["rectangle","rectangle-pin"].indexOf(t.pinType())}}),dr.prototype.publish("pinHeight",20,"number","Height of pin (pixels) (not including arrow)",null,{tags:["Basic"],disable:function(t){return-1===["rectangle","rectangle-pin"].indexOf(t.pinType())}}),dr.prototype.publish("cornerRadius",10,"number","Radius of rectangular pin corners (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["rectangle","rectangle-pin"].indexOf(t.pinType())}}),dr.prototype.publish("pinRadius",12,"number","Radius of circle (pixels)",null,{tags:["Basic"],disable:function(t){return"circle"!==t.pinType()}}),dr.prototype.publish("textBaseline","central","set","Pin text vertical alignment",["auto","use-script","no-change","reset-size","ideographic","alphabetic","hanging","mathematical","central","middle","text-after-edge","text-before-edge","inherit"],{tags:["Basic"]});var fr=function(t){function e(){var e=t.call(this)||this,n=e;return e._pins=(new dr).columns(["lat","long","ext"]).on("click",(function(t,e,i){n.click(n.rowToObj(t.ext.origRow),"",i),n.clickStreetView(n.rowToObj(t.ext.origRow),"",i)})).on("dblclick",(function(t,e,i){n.dblclick(n.rowToObj(t.ext.origRow),"",i)})),e}return h(e,t),e.prototype.pinsData=function(){if(0===this.data().length)return[];var t=this.columns();return this._view=this._db.rollupView([this.latitudeColumn(),this.longitudeColumn()]),this._view.entries().map((function(e){var n=e.values[0].value[0];return[e.key,e.values[0].key,{fillColor:n[t.indexOf(this.colorColumn())],tooltip:n[t.indexOf(this.tooltipColumn())],origRow:n}]}),this)},e.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),this.layers([this._pins])},e.prototype.update=function(e,n){t.prototype.update.call(this,e,n),this._pins.data(this.pinsData()),this.autoScale()&&this._prevChecksum!==this._db.checksum()&&(this._prevChecksum=this._db.checksum(),this.zoomTo(this._pins.pinsData().map((function(t){return[t.lat,t.long]}))))},e.prototype.exit=function(e,n){t.prototype.exit.call(this,e,n)},e.prototype.click=function(t,e,n){},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}(hr);fr.prototype._class+=" map_GMapPin",fr.prototype.publish("autoScale",!1,"boolean","Auto scale to data"),fr.prototype.publishProxy("pinColor","_pins","fillColor"),fr.prototype.publishProxy("pinType","_pins","pinType"),fr.prototype.publishProxy("pinWidth","_pins","pinWidth"),fr.prototype.publishProxy("pinHeight","_pins","pinHeight"),fr.prototype.publishProxy("cornerRadius","_pins","cornerRadius"),fr.prototype.publishProxy("pinRadius","_pins","pinRadius"),fr.prototype.publishProxy("arrowWidth","_pins","arrowWidth"),fr.prototype.publishProxy("arrowHeight","_pins","arrowHeight"),fr.prototype.publishProxy("textBaseline","_pins","textBaseline"),fr.prototype.publishProxy("strokeWidth","_pins","strokeWidth"),fr.prototype.publishProxy("omitNullLatLong","_pins","omitNullLatLong"),fr.prototype.publish("latitudeColumn",null,"set","Latitude",(function(){return this.columns()}),{optional:!0}),fr.prototype.publish("longitudeColumn",null,"set","Longitude",(function(){return this.columns()}),{optional:!0}),fr.prototype.publish("colorColumn",null,"set","Color",(function(){return this.columns()}),{optional:!0}),fr.prototype.publish("tooltipColumn",null,"set","Tooltip",(function(){return this.columns()}),{optional:!0}),fr.prototype.publish("streetViewOnClick",!1,"boolean","Switch to street view when pin clicked");yo(".map_Layered .marker{fill:#656565;stroke:none}.map_Layered .dataEdge{stroke:#000;fill:none}");var _r=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.data=function(t){var e=wo.prototype.data.apply(this,arguments);return arguments.length&&(this.dataEdges=[],t.forEach((function(t){this.dataEdges.push({type:"LineString",coordinates:[[t[1],t[0]],[t[3],t[2]]]})}),this)),e},e.prototype.layerEnter=function(t,e,n){wo.prototype.layerEnter.apply(this,arguments),e.append("defs").append("marker").attr("class","marker").attr("id",this._id+"_arrowHead").attr("viewBox","0 0 10 10").attr("refX",10).attr("refY",5).attr("markerWidth",16).attr("markerHeight",16).attr("markerUnits","strokeWidth").attr("orient","auto").append("polyline").attr("points","0,0 10,5 0,10 1,5"),this._edgesTransform=e.append("g")},e.prototype.layerUpdate=function(t){wo.prototype.layerUpdate.apply(this,arguments),this._edgesTransform.style("opacity",this.opacity());var e=this._edgesTransform.selectAll(".dataEdge").data(this.visible()?this.dataEdges:[]);this._edgesPaths=e.enter().append("path").attr("class","dataEdge").attr("marker-end","url(#"+this._id+"_arrowHead)").merge(e).attr("d",t._d3GeoPath),e.exit().remove()},e.prototype.layerZoomed=function(t){wo.prototype.layerZoomed.apply(this,arguments),this._edgesPaths.attr("stroke-width","".concat(.5/t.zoomScale(),"px"))},e}(wo);_r.prototype._class+=" map_Lines",_r.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]});var mr=function(t){function e(){var e=t.call(this)||this,n=e;return e._lines=new _r,e._pins=(new dr).columns(["lat","long","ext"]).on("click",(function(t,e,i){n.click(n.rowToObj(t.ext.origRow),"",i)})).on("dblclick",(function(t,e,i){n.click(n.rowToObj(t.ext.origRow),"",i)})),e}return h(e,t),e.prototype.pinsData=function(){if(0===this.data().length)return[];var t=this.columns();this._fromView=this._db.rollupView([this.fromLatitudeColumn(),this.fromLongitudeColumn()]),this._toView=this._db.rollupView([this.toLatitudeColumn(),this.toLongitudeColumn()]);var e=this._fromView.entries().map((function(e){var n=e.values[0].value[0];return[e.key,e.values[0].key,{fillColor:n[t.indexOf(this.fromColorColumn())]||this.fromPinColor(),tooltip:n[t.indexOf(this.fromTooltipColumn())],origRow:n}]}),this),n=this._toView.entries().map((function(e){var n=e.values[0].value[0];return[e.key,e.values[0].key,{fillColor:n[t.indexOf(this.toColorColumn())]||this.toPinColor(),tooltip:n[t.indexOf(this.toTooltipColumn())],origRow:n}]}),this);return e.concat(n)},e.prototype.linesData=function(){return 0===this.data().length?[]:(this._linesView=this._db.rollupView([this.fromLatitudeColumn(),this.fromLongitudeColumn(),this.toLatitudeColumn(),this.toLongitudeColumn()]),this._linesView.data())},e.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),this.layers([this._lines,this._pins])},e.prototype.update=function(e,n){t.prototype.update.call(this,e,n),this._pins.data(this.pinsData()),this._lines.data(this.linesData()),this.autoScale()&&this._prevChecksum!==this._db.checksum()&&(this._prevChecksum=this._db.checksum(),this.zoomTo(this._pins.pinsData().map((function(t){return[t.lat,t.long]}))))},e.prototype.exit=function(e,n){t.prototype.exit.call(this,e,n)},e.prototype.click=function(t,e,n){},e.prototype.dblclick=function(t,e,n){},e}(hr);mr.prototype._class+=" map_GMapPinLine",mr.prototype.publish("autoScale",!1,"boolean","Auto scale to data"),mr.prototype.publish("fromPinColor","green","html-color","From Pin Color"),mr.prototype.publish("fromLatitudeColumn",null,"set","From Latitude",(function(){return this.columns()}),{optional:!0}),mr.prototype.publish("fromLongitudeColumn",null,"set","From Longitude",(function(){return this.columns()}),{optional:!0}),mr.prototype.publish("fromColorColumn",null,"set","From Color",(function(){return this.columns()}),{optional:!0}),mr.prototype.publish("fromTooltipColumn",null,"set","From Tooltip",(function(){return this.columns()}),{optional:!0}),mr.prototype.publish("toPinColor","red","html-color","To Pin Color"),mr.prototype.publish("toLatitudeColumn",null,"set","To Latitude",(function(){return this.columns()}),{optional:!0}),mr.prototype.publish("toLongitudeColumn",null,"set","To Longitude",(function(){return this.columns()}),{optional:!0}),mr.prototype.publish("toColorColumn",null,"set","To Color",(function(){return this.columns()}),{optional:!0}),mr.prototype.publish("toTooltipColumn",null,"set","To Tooltip",(function(){return this.columns()}),{optional:!0});yo(".map_Layered .marker{fill:#656565;stroke:none;stroke-width:1px}.map_Layered .dataEdge{stroke:#000;fill:none}");var gr=function(t){function e(){var e=t.call(this)||this;return e.dataEdges=[],e}return h(e,t),e.prototype.importJSON=function(t){var e=dr.prototype.importJSON.apply(this,arguments);if(arguments.length){this.dataEdges=[];var n=null;t.forEach((function(t){n&&this.dataEdges.push({type:"LineString",coordinates:[[n.long,n.lat],[t.long,t.lat]]}),n=t.eol?null:t}),this)}return e},e.prototype.data=function(t){var e=dr.prototype.data.apply(this,arguments);if(arguments.length){this.dataEdges=[];var n=null;t.forEach((function(t){n&&this.dataEdges.push({type:"LineString",coordinates:[[n[1],n[0]],[t[1],t[0]]]}),n=t}),this)}return e},e.prototype.layerEnter=function(t,e,n){dr.prototype.layerEnter.apply(this,arguments),e.append("defs").append("marker").attr("class","marker").attr("id",this._id+"_arrowHead").attr("viewBox","0 0 10 10").attr("refX",10).attr("refY",5).attr("markerWidth",16).attr("markerHeight",16).attr("markerUnits","strokeWidth").attr("orient","auto").append("polyline").attr("points","0,0 10,5 0,10 1,5"),this._edgesTransform=e.append("g")},e.prototype.layerUpdate=function(t){dr.prototype.layerUpdate.apply(this,arguments),this._edgesTransform.style("opacity",this.opacity());var e=this._edgesTransform.selectAll(".dataEdge").data(this.visible()?this.dataEdges:[]);this._edgesPaths=e.enter().append("path").attr("class","dataEdge").attr("marker-end","url(#"+this._id+"_arrowHead)").merge(e).attr("d",t._d3GeoPath),e.exit().remove()},e.prototype.layerZoomed=function(t){dr.prototype.layerZoomed.apply(this,arguments),this._edgesPaths.attr("stroke-width","".concat(.5/t.zoomScale(),"px"))},e}(dr);gr.prototype._class+=" map_Graph";yo(".map_Layered .graticule{fill:none;stroke:#a9a9a9;stroke-linejoin:round;stroke-width:.25px}.map_Layered .graticuleOutline{fill:none;stroke:#000;stroke-linejoin:round;stroke-width:.25px}");var yr=function(t){function n(){var n=t.call(this)||this;return n._dataMap={},n._path=e.select(null),n}return h(n,t),n.prototype.layerEnter=function(t,e,n){wo.prototype.layerEnter.apply(this,arguments),this._graticule=pn(),this._graticulePath=e.append("path").datum(this._graticule).attr("class","graticule").attr("vector-effect","non-scaling-stroke"),this._graticuleOutlinePath=e.append("path").datum(this._graticule.outline).attr("class","graticuleOutline").attr("vector-effect","non-scaling-stroke")},n.prototype.layerUpdate=function(t){if(!this.visible())return this._graticulePath.attr("d",""),this._graticuleOutlinePath.attr("d",""),void delete this._prevProjection;this._prevProjection!==t.projection()&&(this._graticulePath.attr("d",t._d3GeoPath),this._graticuleOutlinePath.attr("d",t._d3GeoPath),this._prevProjection=t.projection()),this._graticulePath.style("stroke",this.meshColor()),this._graticuleOutlinePath.style("stroke",this.meshColor())},n.prototype.layerExit=function(t){delete this._prevProjection},n}(wo);yr.prototype._class+=" map_Graticule",yr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),yr.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),yr.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width");yo(".map_Heat canvas{pointer-events:none}");var vr=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.layerEnter=function(t,e,n){wo.prototype.layerEnter.apply(this,arguments),this._parentOverlay.style("pointer-events","none"),this._heatTransform=n.style("pointer-events","none").append("div").attr("class",this.classID()).style("width",t.width()+"px").style("height",t.height()+"px"),this.heat=(new a.HeatMap).target(this._heatTransform.node())},e.prototype.layerUpdate=function(t){wo.prototype.layerUpdate.apply(this,arguments),this._heatTransform.style("opacity",this.opacity()).style("width",t.width()+"px").style("height",t.height()+"px"),this.heat.resize(t.size()),this.layerZoomed(t)},e.prototype.layerExit=function(t){delete this._prevProjection,this.heat.target(null),delete this.heat},e.prototype.layerZoomed=function(t){wo.prototype.layerZoomed.apply(this,arguments);var e=this._db.fieldByLabel(this.latColumn()),n=this._db.fieldByLabel(this.longColumn());this.heat.columns(this.columns()).data(this.visible()?this.data().map((function(i){var o=e?i[e.idx]:i[0],r=n?i[n.idx]:i[1],a=t.zoomTranslate(),s=t.project(o,r),l=t.zoomScale();return s[0]*=l,s[1]*=l,[a[0]+s[0],a[1]+s[1],i[4]||.5]})):[]).render()},e}(wo);function br(){}function Lr(t){return t.k}function wr(t){return[t.x,t.y]}function xr(t){return function(){return t}}vr.prototype._class+=" map_Heat",vr.prototype.publish("latColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),vr.prototype.publish("longColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),vr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),br.prototype._palette=e.Palette.rainbow("default"),br.prototype.click=function(t,e,n){};yo(".map_OpenStreet .background{fill:#fff}.map_OpenStreet .graticule{fill:none;stroke:#777;stroke-width:.5px;stroke-opacity:.5}.map_Layered .vector{fill:none;stroke:navy;stroke-linejoin:round}");var kr=4096,Mr=function(t){function n(){var e=t.call(this)||this;return e._zoomLayerID=0,e.autoScaleMode("none"),e}return h(n,t),n.prototype.layerEnter=function(t,e,i){wo.prototype.layerEnter.apply(this,arguments),t.zoomExtent([.1,16384]),this._openStreet=e.append("g"),this._copyright=e.append("text").attr("x",-100).attr("y",-100).style("opacity",.5).text(n._copyrightText),this._copyrightBBox=this._copyright.node().getBBox()},n.prototype.layerUpdate=function(t){this._tile=function(){let t=0,e=0,n=960,i=500,o=!0,r=!0,a=256,s=Lr,l=wr,h=0;function u(){const u=+s.apply(this,arguments),c=l.apply(this,arguments),p=Math.log2(u/a),d=Math.round(Math.max(p+h,0)),f=Math.pow(2,p-d)*a,_=+c[0]-u/2,m=+c[1]-u/2,g=Math.max(o?0:-1/0,Math.floor((t-_)/f)),y=Math.min(o?1<<d:1/0,Math.ceil((n-_)/f)),v=Math.max(r?0:-1/0,Math.floor((e-m)/f)),b=Math.min(r?1<<d:1/0,Math.ceil((i-m)/f)),L=[];for(let t=v;t<b;++t)for(let e=g;e<y;++e)L.push([e,t,d]);return L.translate=[_/f,m/f],L.scale=f,L}return u.size=function(o){return arguments.length?(t=e=0,n=+o[0],i=+o[1],u):[n-t,i-e]},u.extent=function(o){return arguments.length?(t=+o[0][0],e=+o[0][1],n=+o[1][0],i=+o[1][1],u):[[t,e],[n,i]]},u.scale=function(t){return arguments.length?(s="function"==typeof t?t:xr(+t),u):s},u.translate=function(t){return arguments.length?(l="function"==typeof t?t:xr([+t[0],+t[1]]),u):l},u.zoomDelta=function(t){return arguments.length?(h=+t,u):h},u.tileSize=function(t){return arguments.length?(a=+t,u):a},u.clamp=function(t){return arguments.length?(o=r=!!t,u):o&&r},u.clampX=function(t){return arguments.length?(o=!!t,u):o},u.clampY=function(t){return arguments.length?(r=!!t,u):r},u}().size([t.width(),t.height()]).wrap(!1),this.visible()?this._copyright.attr("x",t.width()-this._copyrightBBox.width-this._copyrightBBox.height/2).attr("y",t.height()-this._copyrightBBox.height/2).text(n._copyrightText):this._copyright.text(""),this.layerZoomed(t)},n.prototype.layerZoomed=function(t){var n=t.zoomScale(),i=t.zoomTranslate(),o=this._tile.scale(n*kr).translate(i)(),r=o.scale/n;o.translate[0],o.scale,o.translate[1],o.scale;var a=Math.round(1e3*r);this._prevZoomLevel!==a&&(this._prevZoomLevel=a,this._zoomLayerID++);var s=this._openStreet.selectAll(".scaleG").data([this._zoomLayerID],(function(t){return t})),l=s.enter().append("g").attr("class","scaleG").attr("transform",function(t,e){return"translate(-2048,-2048) scale("+t/256+")"}(r)).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}(wo);Mr.prototype._class+=" map_OpenStreet",Mr.prototype.publish("tileProvider","OpenStreetMap","set","Tile Provider",["OpenStreetMap","OpenStreetMap Hot","MapQuest","MapQuest Sat","Stamen Watercolor","OpenCycleMap"],{tags:["Basic","Shared"]});var Cr=function(t){function e(){return t.call(this)||this}return h(e,t),e}(bo);function Pr(){Ao.call(this),this.projection("Mercator")}Cr.prototype._class+=" map_TestHeatMap",Pr.prototype=Object.create(Ao.prototype),Pr.prototype.constructor=Pr,Pr.prototype._class+=" map_TopoJSONChoropleth",Pr.prototype.publish("region","GB","set","Region Data",["AT","BE","BG","BR","CHLI","CY","CZ","DE","DK","EE","ES","FI","FR","GB","GE","GR","HR","HU","IE","IS","IT","KS","LT","LU","LV","MD","MK","MT","ND","NL","NO","PL","PT","RO","RS","SE","SI","SK","UA"]),Pr.prototype.layerEnter=function(t,n,i){Ao.prototype.layerEnter.apply(this,arguments),this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);var o=this;this.tooltipHTML((function(t){var e=o.columns(),n=e&&e.length?e[0]:"Location",i=t&&t.length?t[t.length-1]:[""];return o.tooltipFormat({label:i[0],series:n,value:t[1]})}))},Pr.prototype.layerUpdate=function(t){Ao.prototype.layerUpdate.apply(this,arguments);var e=[],n=this;this.data().forEach((function(t){if(isNaN(t[0]))for(var i in n._choroTopologyIndex)for(var o in n._choroTopologyIndex[i])o===t[0]&&n._choroTopologyIndex[i][o].forEach((function(n){e.push([n].concat(t.filter((function(t,e){return e>0}))).concat([t]))}));else e.push(t.concat([t]))})),this.choroPaths=this._choroplethData.selectAll(".data").data(this.visible()?e:[],(function(t){return t[0]})),this.choroPaths.enter().append("path").attr("class","data").call(this._selection.enter.bind(this._selection)).on("click",(function(t){n._dataMap[t[0]]&&n.click(n.rowToObj(n._dataMap[t[0]]),"weight",n._selection.selected(n))})).on("dblclick",(function(t){n._dataMap[t[0]]&&n.dblclick(n.rowToObj(n._dataMap[t[0]]),"weight",n._selection.selected(n))})).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show),this.choroPaths.attr("d",(function(e){var i=t._d3GeoPath(n._choroTopologyFeatures[e[0]]);return i||console.warn("Unknown Country: "+e),i})).style("fill",(function(t){return n._palette(t[1],n._dataMinWeight,n._dataMaxWeight)})),this.choroPaths.exit().remove()},Pr.prototype.layerPreRender=function(){if(this._prevRegion!==this.region()&&(this._prevRegion=this.region(),delete this._topoJsonPromise),!this._topoJsonPromise){var t=this;this._topoJsonPromise=new Promise((function(e,n){No("".concat(Do(),"/").concat(t.region(),".json"),(function(n){function i(n){t._choroTopologyIndex=n,e()}t._choroTopology=n,t._choroTopologyObjects=n.objects.PolbndA,t._choroTopologyFeatures=Mo(t._choroTopology,t._choroTopologyObjects).features,No("".concat(Do(),"/").concat(t.region(),"_idx.json"),i).on("error",(function(t){i({})}))}))}))}return this._topoJsonPromise};var Er={exports:{}};!function(t,e){var n;self,n=()=>(()=>{var t={363:(t,e,n)=>{n.d(e,{Z:()=>m});var i=n(601),o=n.n(i),r=n(609),a=n.n(r),s=n(991),l=n.n(s),h=new URL(n(614),n.b),u=new URL(n(39),n.b),c=new URL(n(856),n.b),p=a()(o()),d=l()(h),f=l()(u),_=l()(c);p.push([t.id,".leaflet-draw-section{position:relative}.leaflet-draw-toolbar{margin-top:12px}.leaflet-draw-toolbar-top{margin-top:0}.leaflet-draw-toolbar-notop a:first-child{border-top-right-radius:0}.leaflet-draw-toolbar-nobottom a:last-child{border-bottom-right-radius:0}.leaflet-draw-toolbar a{background-image:url("+d+");background-image:linear-gradient(transparent,transparent),url("+f+");background-repeat:no-repeat;background-size:300px 30px;background-clip:padding-box}.leaflet-retina .leaflet-draw-toolbar a{background-image:url("+_+");background-image:linear-gradient(transparent,transparent),url("+f+')}\n.leaflet-draw a{display:block;text-align:center;text-decoration:none}.leaflet-draw a .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.leaflet-draw-actions{display:none;list-style:none;margin:0;padding:0;position:absolute;left:26px;top:0;white-space:nowrap}.leaflet-touch .leaflet-draw-actions{left:32px}.leaflet-right .leaflet-draw-actions{right:26px;left:auto}.leaflet-touch .leaflet-right .leaflet-draw-actions{right:32px;left:auto}.leaflet-draw-actions li{display:inline-block}\n.leaflet-draw-actions li:first-child a{border-left:0}.leaflet-draw-actions li:last-child a{-webkit-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.leaflet-right .leaflet-draw-actions li:last-child a{-webkit-border-radius:0;border-radius:0}.leaflet-right .leaflet-draw-actions li:first-child a{-webkit-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.leaflet-draw-actions a{background-color:#919187;border-left:1px solid #AAA;color:#FFF;font:11px/19px "Helvetica Neue",Arial,Helvetica,sans-serif;line-height:28px;text-decoration:none;padding-left:10px;padding-right:10px;height:28px}\n.leaflet-touch .leaflet-draw-actions a{font-size:12px;line-height:30px;height:30px}.leaflet-draw-actions-bottom{margin-top:0}.leaflet-draw-actions-top{margin-top:1px}.leaflet-draw-actions-top a,.leaflet-draw-actions-bottom a{height:27px;line-height:27px}.leaflet-draw-actions a:hover{background-color:#a0a098}.leaflet-draw-actions-top.leaflet-draw-actions-bottom a{height:26px;line-height:26px}.leaflet-draw-toolbar .leaflet-draw-draw-polyline{background-position:-2px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polyline{background-position:0 -1px}\n.leaflet-draw-toolbar .leaflet-draw-draw-polygon{background-position:-31px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polygon{background-position:-29px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-rectangle{background-position:-62px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-rectangle{background-position:-60px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-circle{background-position:-92px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circle{background-position:-90px -1px}\n.leaflet-draw-toolbar .leaflet-draw-draw-marker{background-position:-122px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-marker{background-position:-120px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-circlemarker{background-position:-273px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circlemarker{background-position:-271px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-edit{background-position:-152px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit{background-position:-150px -1px}\n.leaflet-draw-toolbar .leaflet-draw-edit-remove{background-position:-182px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove{background-position:-180px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled{background-position:-212px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled{background-position:-210px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled{background-position:-242px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled{background-position:-240px -2px}\n.leaflet-mouse-marker{background-color:#fff;cursor:crosshair}.leaflet-draw-tooltip{background:#363636;background:rgba(0,0,0,0.5);border:1px solid transparent;-webkit-border-radius:4px;border-radius:4px;color:#fff;font:12px/18px "Helvetica Neue",Arial,Helvetica,sans-serif;margin-left:20px;margin-top:-21px;padding:4px 8px;position:absolute;visibility:hidden;white-space:nowrap;z-index:6}.leaflet-draw-tooltip:before{border-right:6px solid black;border-right-color:rgba(0,0,0,0.5);border-top:6px solid transparent;border-bottom:6px solid transparent;content:"";position:absolute;top:7px;left:-7px}\n.leaflet-error-draw-tooltip{background-color:#f2dede;border:1px solid #e6b6bd;color:#b94a48}.leaflet-error-draw-tooltip:before{border-right-color:#e6b6bd}.leaflet-draw-tooltip-single{margin-top:-12px}.leaflet-draw-tooltip-subtext{color:#f8d5e4}.leaflet-draw-guide-dash{font-size:1%;opacity:.6;position:absolute;width:5px;height:5px}.leaflet-edit-marker-selected{background-color:rgba(254,87,161,0.1);border:4px dashed rgba(254,87,161,0.6);-webkit-border-radius:4px;border-radius:4px;box-sizing:content-box}\n.leaflet-edit-move{cursor:move}.leaflet-edit-resize{cursor:pointer}.leaflet-oldie .leaflet-draw-toolbar{border:1px solid #999}',""]);const m=p},134:(t,e,n)=>{n.d(e,{Z:()=>s});var i=n(601),o=n.n(i),r=n(609),a=n.n(r)()(o());a.push([t.id,'.marker-cluster-small {\n\tbackground-color: rgba(181, 226, 140, 0.6);\n\t}\n.marker-cluster-small div {\n\tbackground-color: rgba(110, 204, 57, 0.6);\n\t}\n\n.marker-cluster-medium {\n\tbackground-color: rgba(241, 211, 87, 0.6);\n\t}\n.marker-cluster-medium div {\n\tbackground-color: rgba(240, 194, 12, 0.6);\n\t}\n\n.marker-cluster-large {\n\tbackground-color: rgba(253, 156, 115, 0.6);\n\t}\n.marker-cluster-large div {\n\tbackground-color: rgba(241, 128, 23, 0.6);\n\t}\n\n\t/* IE 6-8 fallback colors */\n.leaflet-oldie .marker-cluster-small {\n\tbackground-color: rgb(181, 226, 140);\n\t}\n.leaflet-oldie .marker-cluster-small div {\n\tbackground-color: rgb(110, 204, 57);\n\t}\n\n.leaflet-oldie .marker-cluster-medium {\n\tbackground-color: rgb(241, 211, 87);\n\t}\n.leaflet-oldie .marker-cluster-medium div {\n\tbackground-color: rgb(240, 194, 12);\n\t}\n\n.leaflet-oldie .marker-cluster-large {\n\tbackground-color: rgb(253, 156, 115);\n\t}\n.leaflet-oldie .marker-cluster-large div {\n\tbackground-color: rgb(241, 128, 23);\n}\n\n.marker-cluster {\n\tbackground-clip: padding-box;\n\tborder-radius: 20px;\n\t}\n.marker-cluster div {\n\twidth: 30px;\n\theight: 30px;\n\tmargin-left: 5px;\n\tmargin-top: 5px;\n\n\ttext-align: center;\n\tborder-radius: 15px;\n\tfont: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;\n\t}\n.marker-cluster span {\n\tline-height: 30px;\n\t}',""]);const s=a},182:(t,e,n)=>{n.d(e,{Z:()=>s});var i=n(601),o=n.n(i),r=n(609),a=n.n(r)()(o());a.push([t.id,".leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow {\n\t-webkit-transition: -webkit-transform 0.3s ease-out, opacity 0.3s ease-in;\n\t-moz-transition: -moz-transform 0.3s ease-out, opacity 0.3s ease-in;\n\t-o-transition: -o-transform 0.3s ease-out, opacity 0.3s ease-in;\n\ttransition: transform 0.3s ease-out, opacity 0.3s ease-in;\n}\n\n.leaflet-cluster-spider-leg {\n\t/* stroke-dashoffset (duration and function) should match with leaflet-marker-icon transform in order to track it exactly */\n\t-webkit-transition: -webkit-stroke-dashoffset 0.3s ease-out, -webkit-stroke-opacity 0.3s ease-in;\n\t-moz-transition: -moz-stroke-dashoffset 0.3s ease-out, -moz-stroke-opacity 0.3s ease-in;\n\t-o-transition: -o-stroke-dashoffset 0.3s ease-out, -o-stroke-opacity 0.3s ease-in;\n\ttransition: stroke-dashoffset 0.3s ease-out, stroke-opacity 0.3s ease-in;\n}\n",""]);const s=a},138:(t,e,n)=>{n.d(e,{Z:()=>m});var i=n(601),o=n.n(i),r=n(609),a=n.n(r),s=n(991),l=n.n(s),h=new URL(n(212),n.b),u=new URL(n(555),n.b),c=new URL(n(758),n.b),p=a()(o()),d=l()(h),f=l()(u),_=l()(c);p.push([t.id,"/* required styles */\r\n\r\n.leaflet-pane,\r\n.leaflet-tile,\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow,\r\n.leaflet-tile-container,\r\n.leaflet-pane > svg,\r\n.leaflet-pane > canvas,\r\n.leaflet-zoom-box,\r\n.leaflet-image-layer,\r\n.leaflet-layer {\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\t}\r\n.leaflet-container {\r\n\toverflow: hidden;\r\n\t}\r\n.leaflet-tile,\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow {\r\n\t-webkit-user-select: none;\r\n\t -moz-user-select: none;\r\n\t user-select: none;\r\n\t -webkit-user-drag: none;\r\n\t}\r\n/* Prevents IE11 from highlighting tiles in blue */\r\n.leaflet-tile::selection {\r\n\tbackground: transparent;\r\n}\r\n/* Safari renders non-retina tile on retina better with this, but Chrome is worse */\r\n.leaflet-safari .leaflet-tile {\r\n\timage-rendering: -webkit-optimize-contrast;\r\n\t}\r\n/* hack that prevents hw layers \"stretching\" when loading new tiles */\r\n.leaflet-safari .leaflet-tile-container {\r\n\twidth: 1600px;\r\n\theight: 1600px;\r\n\t-webkit-transform-origin: 0 0;\r\n\t}\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow {\r\n\tdisplay: block;\r\n\t}\r\n/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */\r\n/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */\r\n.leaflet-container .leaflet-overlay-pane svg,\r\n.leaflet-container .leaflet-marker-pane img,\r\n.leaflet-container .leaflet-shadow-pane img,\r\n.leaflet-container .leaflet-tile-pane img,\r\n.leaflet-container img.leaflet-image-layer,\r\n.leaflet-container .leaflet-tile {\r\n\tmax-width: none !important;\r\n\tmax-height: none !important;\r\n\t}\r\n\r\n.leaflet-container.leaflet-touch-zoom {\r\n\t-ms-touch-action: pan-x pan-y;\r\n\ttouch-action: pan-x pan-y;\r\n\t}\r\n.leaflet-container.leaflet-touch-drag {\r\n\t-ms-touch-action: pinch-zoom;\r\n\t/* Fallback for FF which doesn't support pinch-zoom */\r\n\ttouch-action: none;\r\n\ttouch-action: pinch-zoom;\r\n}\r\n.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {\r\n\t-ms-touch-action: none;\r\n\ttouch-action: none;\r\n}\r\n.leaflet-container {\r\n\t-webkit-tap-highlight-color: transparent;\r\n}\r\n.leaflet-container a {\r\n\t-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);\r\n}\r\n.leaflet-tile {\r\n\tfilter: inherit;\r\n\tvisibility: hidden;\r\n\t}\r\n.leaflet-tile-loaded {\r\n\tvisibility: inherit;\r\n\t}\r\n.leaflet-zoom-box {\r\n\twidth: 0;\r\n\theight: 0;\r\n\t-moz-box-sizing: border-box;\r\n\t box-sizing: border-box;\r\n\tz-index: 800;\r\n\t}\r\n/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */\r\n.leaflet-overlay-pane svg {\r\n\t-moz-user-select: none;\r\n\t}\r\n\r\n.leaflet-pane { z-index: 400; }\r\n\r\n.leaflet-tile-pane { z-index: 200; }\r\n.leaflet-overlay-pane { z-index: 400; }\r\n.leaflet-shadow-pane { z-index: 500; }\r\n.leaflet-marker-pane { z-index: 600; }\r\n.leaflet-tooltip-pane { z-index: 650; }\r\n.leaflet-popup-pane { z-index: 700; }\r\n\r\n.leaflet-map-pane canvas { z-index: 100; }\r\n.leaflet-map-pane svg { z-index: 200; }\r\n\r\n.leaflet-vml-shape {\r\n\twidth: 1px;\r\n\theight: 1px;\r\n\t}\r\n.lvml {\r\n\tbehavior: url(#default#VML);\r\n\tdisplay: inline-block;\r\n\tposition: absolute;\r\n\t}\r\n\r\n\r\n/* control positioning */\r\n\r\n.leaflet-control {\r\n\tposition: relative;\r\n\tz-index: 800;\r\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\r\n\tpointer-events: auto;\r\n\t}\r\n.leaflet-top,\r\n.leaflet-bottom {\r\n\tposition: absolute;\r\n\tz-index: 1000;\r\n\tpointer-events: none;\r\n\t}\r\n.leaflet-top {\r\n\ttop: 0;\r\n\t}\r\n.leaflet-right {\r\n\tright: 0;\r\n\t}\r\n.leaflet-bottom {\r\n\tbottom: 0;\r\n\t}\r\n.leaflet-left {\r\n\tleft: 0;\r\n\t}\r\n.leaflet-control {\r\n\tfloat: left;\r\n\tclear: both;\r\n\t}\r\n.leaflet-right .leaflet-control {\r\n\tfloat: right;\r\n\t}\r\n.leaflet-top .leaflet-control {\r\n\tmargin-top: 10px;\r\n\t}\r\n.leaflet-bottom .leaflet-control {\r\n\tmargin-bottom: 10px;\r\n\t}\r\n.leaflet-left .leaflet-control {\r\n\tmargin-left: 10px;\r\n\t}\r\n.leaflet-right .leaflet-control {\r\n\tmargin-right: 10px;\r\n\t}\r\n\r\n\r\n/* zoom and fade animations */\r\n\r\n.leaflet-fade-anim .leaflet-tile {\r\n\twill-change: opacity;\r\n\t}\r\n.leaflet-fade-anim .leaflet-popup {\r\n\topacity: 0;\r\n\t-webkit-transition: opacity 0.2s linear;\r\n\t -moz-transition: opacity 0.2s linear;\r\n\t transition: opacity 0.2s linear;\r\n\t}\r\n.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {\r\n\topacity: 1;\r\n\t}\r\n.leaflet-zoom-animated {\r\n\t-webkit-transform-origin: 0 0;\r\n\t -ms-transform-origin: 0 0;\r\n\t transform-origin: 0 0;\r\n\t}\r\n.leaflet-zoom-anim .leaflet-zoom-animated {\r\n\twill-change: transform;\r\n\t}\r\n.leaflet-zoom-anim .leaflet-zoom-animated {\r\n\t-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t transition: transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t}\r\n.leaflet-zoom-anim .leaflet-tile,\r\n.leaflet-pan-anim .leaflet-tile {\r\n\t-webkit-transition: none;\r\n\t -moz-transition: none;\r\n\t transition: none;\r\n\t}\r\n\r\n.leaflet-zoom-anim .leaflet-zoom-hide {\r\n\tvisibility: hidden;\r\n\t}\r\n\r\n\r\n/* cursors */\r\n\r\n.leaflet-interactive {\r\n\tcursor: pointer;\r\n\t}\r\n.leaflet-grab {\r\n\tcursor: -webkit-grab;\r\n\tcursor: -moz-grab;\r\n\tcursor: grab;\r\n\t}\r\n.leaflet-crosshair,\r\n.leaflet-crosshair .leaflet-interactive {\r\n\tcursor: crosshair;\r\n\t}\r\n.leaflet-popup-pane,\r\n.leaflet-control {\r\n\tcursor: auto;\r\n\t}\r\n.leaflet-dragging .leaflet-grab,\r\n.leaflet-dragging .leaflet-grab .leaflet-interactive,\r\n.leaflet-dragging .leaflet-marker-draggable {\r\n\tcursor: move;\r\n\tcursor: -webkit-grabbing;\r\n\tcursor: -moz-grabbing;\r\n\tcursor: grabbing;\r\n\t}\r\n\r\n/* marker & overlays interactivity */\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow,\r\n.leaflet-image-layer,\r\n.leaflet-pane > svg path,\r\n.leaflet-tile-container {\r\n\tpointer-events: none;\r\n\t}\r\n\r\n.leaflet-marker-icon.leaflet-interactive,\r\n.leaflet-image-layer.leaflet-interactive,\r\n.leaflet-pane > svg path.leaflet-interactive,\r\nsvg.leaflet-image-layer.leaflet-interactive path {\r\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\r\n\tpointer-events: auto;\r\n\t}\r\n\r\n/* visual tweaks */\r\n\r\n.leaflet-container {\r\n\tbackground: #ddd;\r\n\toutline: 0;\r\n\t}\r\n.leaflet-container a {\r\n\tcolor: #0078A8;\r\n\t}\r\n.leaflet-container a.leaflet-active {\r\n\toutline: 2px solid orange;\r\n\t}\r\n.leaflet-zoom-box {\r\n\tborder: 2px dotted #38f;\r\n\tbackground: rgba(255,255,255,0.5);\r\n\t}\r\n\r\n\r\n/* general typography */\r\n.leaflet-container {\r\n\tfont: 12px/1.5 \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n\t}\r\n\r\n\r\n/* general toolbar styles */\r\n\r\n.leaflet-bar {\r\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.65);\r\n\tborder-radius: 4px;\r\n\t}\r\n.leaflet-bar a,\r\n.leaflet-bar a:hover {\r\n\tbackground-color: #fff;\r\n\tborder-bottom: 1px solid #ccc;\r\n\twidth: 26px;\r\n\theight: 26px;\r\n\tline-height: 26px;\r\n\tdisplay: block;\r\n\ttext-align: center;\r\n\ttext-decoration: none;\r\n\tcolor: black;\r\n\t}\r\n.leaflet-bar a,\r\n.leaflet-control-layers-toggle {\r\n\tbackground-position: 50% 50%;\r\n\tbackground-repeat: no-repeat;\r\n\tdisplay: block;\r\n\t}\r\n.leaflet-bar a:hover {\r\n\tbackground-color: #f4f4f4;\r\n\t}\r\n.leaflet-bar a:first-child {\r\n\tborder-top-left-radius: 4px;\r\n\tborder-top-right-radius: 4px;\r\n\t}\r\n.leaflet-bar a:last-child {\r\n\tborder-bottom-left-radius: 4px;\r\n\tborder-bottom-right-radius: 4px;\r\n\tborder-bottom: none;\r\n\t}\r\n.leaflet-bar a.leaflet-disabled {\r\n\tcursor: default;\r\n\tbackground-color: #f4f4f4;\r\n\tcolor: #bbb;\r\n\t}\r\n\r\n.leaflet-touch .leaflet-bar a {\r\n\twidth: 30px;\r\n\theight: 30px;\r\n\tline-height: 30px;\r\n\t}\r\n.leaflet-touch .leaflet-bar a:first-child {\r\n\tborder-top-left-radius: 2px;\r\n\tborder-top-right-radius: 2px;\r\n\t}\r\n.leaflet-touch .leaflet-bar a:last-child {\r\n\tborder-bottom-left-radius: 2px;\r\n\tborder-bottom-right-radius: 2px;\r\n\t}\r\n\r\n/* zoom control */\r\n\r\n.leaflet-control-zoom-in,\r\n.leaflet-control-zoom-out {\r\n\tfont: bold 18px 'Lucida Console', Monaco, monospace;\r\n\ttext-indent: 1px;\r\n\t}\r\n\r\n.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {\r\n\tfont-size: 22px;\r\n\t}\r\n\r\n\r\n/* layers control */\r\n\r\n.leaflet-control-layers {\r\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.4);\r\n\tbackground: #fff;\r\n\tborder-radius: 5px;\r\n\t}\r\n.leaflet-control-layers-toggle {\r\n\tbackground-image: url("+d+");\r\n\twidth: 36px;\r\n\theight: 36px;\r\n\t}\r\n.leaflet-retina .leaflet-control-layers-toggle {\r\n\tbackground-image: url("+f+");\r\n\tbackground-size: 26px 26px;\r\n\t}\r\n.leaflet-touch .leaflet-control-layers-toggle {\r\n\twidth: 44px;\r\n\theight: 44px;\r\n\t}\r\n.leaflet-control-layers .leaflet-control-layers-list,\r\n.leaflet-control-layers-expanded .leaflet-control-layers-toggle {\r\n\tdisplay: none;\r\n\t}\r\n.leaflet-control-layers-expanded .leaflet-control-layers-list {\r\n\tdisplay: block;\r\n\tposition: relative;\r\n\t}\r\n.leaflet-control-layers-expanded {\r\n\tpadding: 6px 10px 6px 6px;\r\n\tcolor: #333;\r\n\tbackground: #fff;\r\n\t}\r\n.leaflet-control-layers-scrollbar {\r\n\toverflow-y: scroll;\r\n\toverflow-x: hidden;\r\n\tpadding-right: 5px;\r\n\t}\r\n.leaflet-control-layers-selector {\r\n\tmargin-top: 2px;\r\n\tposition: relative;\r\n\ttop: 1px;\r\n\t}\r\n.leaflet-control-layers label {\r\n\tdisplay: block;\r\n\t}\r\n.leaflet-control-layers-separator {\r\n\theight: 0;\r\n\tborder-top: 1px solid #ddd;\r\n\tmargin: 5px -10px 5px -6px;\r\n\t}\r\n\r\n/* Default icon URLs */\r\n.leaflet-default-icon-path {\r\n\tbackground-image: url("+_+');\r\n\t}\r\n\r\n\r\n/* attribution and scale controls */\r\n\r\n.leaflet-container .leaflet-control-attribution {\r\n\tbackground: #fff;\r\n\tbackground: rgba(255, 255, 255, 0.7);\r\n\tmargin: 0;\r\n\t}\r\n.leaflet-control-attribution,\r\n.leaflet-control-scale-line {\r\n\tpadding: 0 5px;\r\n\tcolor: #333;\r\n\t}\r\n.leaflet-control-attribution a {\r\n\ttext-decoration: none;\r\n\t}\r\n.leaflet-control-attribution a:hover {\r\n\ttext-decoration: underline;\r\n\t}\r\n.leaflet-container .leaflet-control-attribution,\r\n.leaflet-container .leaflet-control-scale {\r\n\tfont-size: 11px;\r\n\t}\r\n.leaflet-left .leaflet-control-scale {\r\n\tmargin-left: 5px;\r\n\t}\r\n.leaflet-bottom .leaflet-control-scale {\r\n\tmargin-bottom: 5px;\r\n\t}\r\n.leaflet-control-scale-line {\r\n\tborder: 2px solid #777;\r\n\tborder-top: none;\r\n\tline-height: 1.1;\r\n\tpadding: 2px 5px 1px;\r\n\tfont-size: 11px;\r\n\twhite-space: nowrap;\r\n\toverflow: hidden;\r\n\t-moz-box-sizing: border-box;\r\n\t box-sizing: border-box;\r\n\r\n\tbackground: #fff;\r\n\tbackground: rgba(255, 255, 255, 0.5);\r\n\t}\r\n.leaflet-control-scale-line:not(:first-child) {\r\n\tborder-top: 2px solid #777;\r\n\tborder-bottom: none;\r\n\tmargin-top: -2px;\r\n\t}\r\n.leaflet-control-scale-line:not(:first-child):not(:last-child) {\r\n\tborder-bottom: 2px solid #777;\r\n\t}\r\n\r\n.leaflet-touch .leaflet-control-attribution,\r\n.leaflet-touch .leaflet-control-layers,\r\n.leaflet-touch .leaflet-bar {\r\n\tbox-shadow: none;\r\n\t}\r\n.leaflet-touch .leaflet-control-layers,\r\n.leaflet-touch .leaflet-bar {\r\n\tborder: 2px solid rgba(0,0,0,0.2);\r\n\tbackground-clip: padding-box;\r\n\t}\r\n\r\n\r\n/* popup */\r\n\r\n.leaflet-popup {\r\n\tposition: absolute;\r\n\ttext-align: center;\r\n\tmargin-bottom: 20px;\r\n\t}\r\n.leaflet-popup-content-wrapper {\r\n\tpadding: 1px;\r\n\ttext-align: left;\r\n\tborder-radius: 12px;\r\n\t}\r\n.leaflet-popup-content {\r\n\tmargin: 13px 19px;\r\n\tline-height: 1.4;\r\n\t}\r\n.leaflet-popup-content p {\r\n\tmargin: 18px 0;\r\n\t}\r\n.leaflet-popup-tip-container {\r\n\twidth: 40px;\r\n\theight: 20px;\r\n\tposition: absolute;\r\n\tleft: 50%;\r\n\tmargin-left: -20px;\r\n\toverflow: hidden;\r\n\tpointer-events: none;\r\n\t}\r\n.leaflet-popup-tip {\r\n\twidth: 17px;\r\n\theight: 17px;\r\n\tpadding: 1px;\r\n\r\n\tmargin: -10px auto 0;\r\n\r\n\t-webkit-transform: rotate(45deg);\r\n\t -moz-transform: rotate(45deg);\r\n\t -ms-transform: rotate(45deg);\r\n\t transform: rotate(45deg);\r\n\t}\r\n.leaflet-popup-content-wrapper,\r\n.leaflet-popup-tip {\r\n\tbackground: white;\r\n\tcolor: #333;\r\n\tbox-shadow: 0 3px 14px rgba(0,0,0,0.4);\r\n\t}\r\n.leaflet-container a.leaflet-popup-close-button {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tpadding: 4px 4px 0 0;\r\n\tborder: none;\r\n\ttext-align: center;\r\n\twidth: 18px;\r\n\theight: 14px;\r\n\tfont: 16px/14px Tahoma, Verdana, sans-serif;\r\n\tcolor: #c3c3c3;\r\n\ttext-decoration: none;\r\n\tfont-weight: bold;\r\n\tbackground: transparent;\r\n\t}\r\n.leaflet-container a.leaflet-popup-close-button:hover {\r\n\tcolor: #999;\r\n\t}\r\n.leaflet-popup-scrolled {\r\n\toverflow: auto;\r\n\tborder-bottom: 1px solid #ddd;\r\n\tborder-top: 1px solid #ddd;\r\n\t}\r\n\r\n.leaflet-oldie .leaflet-popup-content-wrapper {\r\n\t-ms-zoom: 1;\r\n\t}\r\n.leaflet-oldie .leaflet-popup-tip {\r\n\twidth: 24px;\r\n\tmargin: 0 auto;\r\n\r\n\t-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";\r\n\tfilter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);\r\n\t}\r\n.leaflet-oldie .leaflet-popup-tip-container {\r\n\tmargin-top: -1px;\r\n\t}\r\n\r\n.leaflet-oldie .leaflet-control-zoom,\r\n.leaflet-oldie .leaflet-control-layers,\r\n.leaflet-oldie .leaflet-popup-content-wrapper,\r\n.leaflet-oldie .leaflet-popup-tip {\r\n\tborder: 1px solid #999;\r\n\t}\r\n\r\n\r\n/* div icon */\r\n\r\n.leaflet-div-icon {\r\n\tbackground: #fff;\r\n\tborder: 1px solid #666;\r\n\t}\r\n\r\n\r\n/* Tooltip */\r\n/* Base styles for the element that has a tooltip */\r\n.leaflet-tooltip {\r\n\tposition: absolute;\r\n\tpadding: 6px;\r\n\tbackground-color: #fff;\r\n\tborder: 1px solid #fff;\r\n\tborder-radius: 3px;\r\n\tcolor: #222;\r\n\twhite-space: nowrap;\r\n\t-webkit-user-select: none;\r\n\t-moz-user-select: none;\r\n\t-ms-user-select: none;\r\n\tuser-select: none;\r\n\tpointer-events: none;\r\n\tbox-shadow: 0 1px 3px rgba(0,0,0,0.4);\r\n\t}\r\n.leaflet-tooltip.leaflet-clickable {\r\n\tcursor: pointer;\r\n\tpointer-events: auto;\r\n\t}\r\n.leaflet-tooltip-top:before,\r\n.leaflet-tooltip-bottom:before,\r\n.leaflet-tooltip-left:before,\r\n.leaflet-tooltip-right:before {\r\n\tposition: absolute;\r\n\tpointer-events: none;\r\n\tborder: 6px solid transparent;\r\n\tbackground: transparent;\r\n\tcontent: "";\r\n\t}\r\n\r\n/* Directions */\r\n\r\n.leaflet-tooltip-bottom {\r\n\tmargin-top: 6px;\r\n}\r\n.leaflet-tooltip-top {\r\n\tmargin-top: -6px;\r\n}\r\n.leaflet-tooltip-bottom:before,\r\n.leaflet-tooltip-top:before {\r\n\tleft: 50%;\r\n\tmargin-left: -6px;\r\n\t}\r\n.leaflet-tooltip-top:before {\r\n\tbottom: 0;\r\n\tmargin-bottom: -12px;\r\n\tborder-top-color: #fff;\r\n\t}\r\n.leaflet-tooltip-bottom:before {\r\n\ttop: 0;\r\n\tmargin-top: -12px;\r\n\tmargin-left: -6px;\r\n\tborder-bottom-color: #fff;\r\n\t}\r\n.leaflet-tooltip-left {\r\n\tmargin-left: -6px;\r\n}\r\n.leaflet-tooltip-right {\r\n\tmargin-left: 6px;\r\n}\r\n.leaflet-tooltip-left:before,\r\n.leaflet-tooltip-right:before {\r\n\ttop: 50%;\r\n\tmargin-top: -6px;\r\n\t}\r\n.leaflet-tooltip-left:before {\r\n\tright: 0;\r\n\tmargin-right: -12px;\r\n\tborder-left-color: #fff;\r\n\t}\r\n.leaflet-tooltip-right:before {\r\n\tleft: 0;\r\n\tmargin-left: -12px;\r\n\tborder-right-color: #fff;\r\n\t}\r\n',""]);const m=p},282:(t,e,n)=>{n.d(e,{Z:()=>s});var i=n(601),o=n.n(i),r=n(609),a=n.n(r)()(o());a.push([t.id,"/*\n Leaflet.BeautifyIcon, a plugin that adds colorful iconic markers for Leaflet by giving full control of style to end user, It has also ability to adjust font awesome\n and glyphicon icons\n (c) 2016-2017, Muhammad Arslan Sajid\n http://leafletjs.com\n*/\n.beautify-marker {\n text-align: center;\n font-weight: 700;\n font-family: monospace;\n position:absolute;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n.beautify-marker.selected > div {\n outline: none;\n border-color: red;\n box-shadow: 0 0 10px red;\n}\n\n.beautify-marker.circle {\n border-radius: 100%;\n}\n\n.beautify-marker.circle-dot, .beautify-marker.doughnut {\n border-radius: 100%;\n}\n\n.beautify-marker.marker {\n border-top-left-radius: 50%;\n border-top-right-radius: 50% 100%;\n border-bottom-left-radius: 100% 50%;\n border-bottom-right-radius: 0%;\n /* rotating 45deg clockwise to get the corner bottom center */\n transform: rotate(45deg); \n \n}\n\n.beautify-marker.marker > * {\n /* rotating 45deg counterclock to adjust marker content back to normal */\n transform: rotate(-45deg);\n}\n",""]);const s=a},958:(t,e,n)=>{n.d(e,{Z:()=>s});var i=n(601),o=n.n(i),r=n(609),a=n.n(r)()(o());a.push([t.id,"g.d3-overlay * {\n pointer-events: visiblePainted;\n}\n",""]);const s=a},609:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",i=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),i&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),i&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,i,o,r){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(i)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var h=0;h<t.length;h++){var u=[].concat(t[h]);i&&a[u[0]]||(void 0!==r&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=r),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),e.push(u))}},e}},991:t=>{t.exports=function(t,e){return e||(e={}),t?(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t):t}},601:t=>{t.exports=function(t){return t[1]}},325:()=>{var t,e;t=window,e=document,L.drawVersion="1.0.4",L.Draw={},L.drawLocal={draw:{toolbar:{actions:{title:"Cancel drawing",text:"Cancel"},finish:{title:"Finish drawing",text:"Finish"},undo:{title:"Delete last point drawn",text:"Delete last point"},buttons:{polyline:"Draw a polyline",polygon:"Draw a polygon",rectangle:"Draw a rectangle",circle:"Draw a circle",marker:"Draw a marker",circlemarker:"Draw a circlemarker"}},handlers:{circle:{tooltip:{start:"Click and drag to draw circle."},radius:"Radius"},circlemarker:{tooltip:{start:"Click map to place circle marker."}},marker:{tooltip:{start:"Click map to place marker."}},polygon:{tooltip:{start:"Click to start drawing shape.",cont:"Click to continue drawing shape.",end:"Click first point to close this shape."}},polyline:{error:"<strong>Error:</strong> shape edges cannot cross!",tooltip:{start:"Click to start drawing line.",cont:"Click to continue drawing line.",end:"Click last point to finish line."}},rectangle:{tooltip:{start:"Click and drag to draw rectangle."}},simpleshape:{tooltip:{end:"Release mouse to finish drawing."}}}},edit:{toolbar:{actions:{save:{title:"Save changes",text:"Save"},cancel:{title:"Cancel editing, discards all changes",text:"Cancel"},clearAll:{title:"Clear all layers",text:"Clear All"}},buttons:{edit:"Edit layers",editDisabled:"No layers to edit",remove:"Delete layers",removeDisabled:"No layers to delete"}},handlers:{edit:{tooltip:{text:"Drag handles or markers to edit features.",subtext:"Click cancel to undo changes."}},remove:{tooltip:{text:"Click on a feature to remove."}}}}},L.Draw.Event={},L.Draw.Event.CREATED="draw:created",L.Draw.Event.EDITED="draw:edited",L.Draw.Event.DELETED="draw:deleted",L.Draw.Event.DRAWSTART="draw:drawstart",L.Draw.Event.DRAWSTOP="draw:drawstop",L.Draw.Event.DRAWVERTEX="draw:drawvertex",L.Draw.Event.EDITSTART="draw:editstart",L.Draw.Event.EDITMOVE="draw:editmove",L.Draw.Event.EDITRESIZE="draw:editresize",L.Draw.Event.EDITVERTEX="draw:editvertex",L.Draw.Event.EDITSTOP="draw:editstop",L.Draw.Event.DELETESTART="draw:deletestart",L.Draw.Event.DELETESTOP="draw:deletestop",L.Draw.Event.TOOLBAROPENED="draw:toolbaropened",L.Draw.Event.TOOLBARCLOSED="draw:toolbarclosed",L.Draw.Event.MARKERCONTEXT="draw:markercontext",L.Draw=L.Draw||{},L.Draw.Feature=L.Handler.extend({initialize:function(t,e){this._map=t,this._container=t._container,this._overlayPane=t._panes.overlayPane,this._popupPane=t._panes.popupPane,e&&e.shapeOptions&&(e.shapeOptions=L.Util.extend({},this.options.shapeOptions,e.shapeOptions)),L.setOptions(this,e);var n=L.version.split(".");1===parseInt(n[0],10)&&parseInt(n[1],10)>=2?L.Draw.Feature.include(L.Evented.prototype):L.Draw.Feature.include(L.Mixin.Events)},enable:function(){this._enabled||(L.Handler.prototype.enable.call(this),this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DRAWSTART,{layerType:this.type}))},disable:function(){this._enabled&&(L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DRAWSTOP,{layerType:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(L.DomUtil.disableTextSelection(),t.getContainer().focus(),this._tooltip=new L.Draw.Tooltip(this._map),L.DomEvent.on(this._container,"keyup",this._cancelDrawing,this))},removeHooks:function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,"keyup",this._cancelDrawing,this))},setOptions:function(t){L.setOptions(this,t)},_fireCreatedEvent:function(t){this._map.fire(L.Draw.Event.CREATED,{layer:t,layerType:this.type})},_cancelDrawing:function(t){27===t.keyCode&&(this._map.fire("draw:canceled",{layerType:this.type}),this.disable())}}),L.Draw.Polyline=L.Draw.Feature.extend({statics:{TYPE:"polyline"},Poly:L.Polyline,options:{allowIntersection:!0,repeatMode:!1,drawError:{color:"#b00b00",timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3,factor:1,maxPoints:0},initialize:function(t,e){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this.options.drawError.message=L.drawLocal.draw.handlers.polyline.error,e&&e.drawError&&(e.drawError=L.Util.extend({},this.options.drawError,e.drawError)),this.type=L.Draw.Polyline.TYPE,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new L.Polyline([],this.options.shapeOptions),this._tooltip.updateContent(this._getTooltipText()),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mouseout",this._onMouseOut,this).on("mousemove",this._onMouseMove,this).on("mousedown",this._onMouseDown,this).on("mouseup",this._onMouseUp,this).addTo(this._map),this._map.on("mouseup",this._onMouseUp,this).on("mousemove",this._onMouseMove,this).on("zoomlevelschange",this._onZoomEnd,this).on("touchstart",this._onTouch,this).on("zoomend",this._onZoomEnd,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._clearHideErrorTimeout(),this._cleanUpShape(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,this._map.removeLayer(this._poly),delete this._poly,this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseout",this._onMouseOut,this).off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._clearGuides(),this._map.off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this).off("zoomlevelschange",this._onZoomEnd,this).off("zoomend",this._onZoomEnd,this).off("touchstart",this._onTouch,this).off("click",this._onTouch,this)},deleteLastVertex:function(){if(!(this._markers.length<=1)){var t=this._markers.pop(),e=this._poly,n=e.getLatLngs(),i=n.splice(-1,1)[0];this._poly.setLatLngs(n),this._markerGroup.removeLayer(t),e.getLatLngs().length<2&&this._map.removeLayer(e),this._vertexChanged(i,!1)}},addVertex:function(t){this._markers.length>=2&&!this.options.allowIntersection&&this._poly.newLatLngIntersects(t)?this._showErrorTooltip():(this._errorShown&&this._hideErrorTooltip(),this._markers.push(this._createMarker(t)),this._poly.addLatLng(t),2===this._poly.getLatLngs().length&&this._map.addLayer(this._poly),this._vertexChanged(t,!0))},completeShape:function(){this._markers.length<=1||!this._shapeIsValid()||(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_finishShape:function(){var t=this._poly._defaultShape?this._poly._defaultShape():this._poly.getLatLngs(),e=this._poly.newLatLngIntersects(t[t.length-1]);!this.options.allowIntersection&&e||!this._shapeIsValid()?this._showErrorTooltip():(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_shapeIsValid:function(){return!0},_onZoomEnd:function(){null!==this._markers&&this._updateGuide()},_onMouseMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent),n=this._map.layerPointToLatLng(e);this._currentLatLng=n,this._updateTooltip(n),this._updateGuide(e),this._mouseMarker.setLatLng(n),L.DomEvent.preventDefault(t.originalEvent)},_vertexChanged:function(t,e){this._map.fire(L.Draw.Event.DRAWVERTEX,{layers:this._markerGroup}),this._updateFinishHandler(),this._updateRunningMeasure(t,e),this._clearGuides(),this._updateTooltip()},_onMouseDown:function(t){if(!this._clickHandled&&!this._touchHandled&&!this._disableMarkers){this._onMouseMove(t),this._clickHandled=!0,this._disableNewMarkers();var e=t.originalEvent,n=e.clientX,i=e.clientY;this._startPoint.call(this,n,i)}},_startPoint:function(t,e){this._mouseDownOrigin=L.point(t,e)},_onMouseUp:function(t){var e=t.originalEvent,n=e.clientX,i=e.clientY;this._endPoint.call(this,n,i,t),this._clickHandled=null},_endPoint:function(e,n,i){if(this._mouseDownOrigin){var o=L.point(e,n).distanceTo(this._mouseDownOrigin),r=this._calculateFinishDistance(i.latlng);this.options.maxPoints>1&&this.options.maxPoints==this._markers.length+1?(this.addVertex(i.latlng),this._finishShape()):r<10&&L.Browser.touch?this._finishShape():Math.abs(o)<9*(t.devicePixelRatio||1)&&this.addVertex(i.latlng),this._enableNewMarkers()}this._mouseDownOrigin=null},_onTouch:function(t){var e,n,i=t.originalEvent;!i.touches||!i.touches[0]||this._clickHandled||this._touchHandled||this._disableMarkers||(e=i.touches[0].clientX,n=i.touches[0].clientY,this._disableNewMarkers(),this._touchHandled=!0,this._startPoint.call(this,e,n),this._endPoint.call(this,e,n,t),this._touchHandled=null),this._clickHandled=null},_onMouseOut:function(){this._tooltip&&this._tooltip._onMouseOut.call(this._tooltip)},_calculateFinishDistance:function(t){var e;if(this._markers.length>0){var n;if(this.type===L.Draw.Polyline.TYPE)n=this._markers[this._markers.length-1];else{if(this.type!==L.Draw.Polygon.TYPE)return 1/0;n=this._markers[0]}var i=this._map.latLngToContainerPoint(n.getLatLng()),o=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),r=this._map.latLngToContainerPoint(o.getLatLng());e=i.distanceTo(r)}else e=1/0;return e},_updateFinishHandler:function(){var t=this._markers.length;t>1&&this._markers[t-1].on("click",this._finishShape,this),t>2&&this._markers[t-2].off("click",this._finishShape,this)},_createMarker:function(t){var e=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(e),e},_updateGuide:function(t){var e=this._markers?this._markers.length:0;e>0&&(t=t||this._map.latLngToLayerPoint(this._currentLatLng),this._clearGuides(),this._drawGuide(this._map.latLngToLayerPoint(this._markers[e-1].getLatLng()),t))},_updateTooltip:function(t){var e=this._getTooltipText();t&&this._tooltip.updatePosition(t),this._errorShown||this._tooltip.updateContent(e)},_drawGuide:function(t,e){var n,i,o,r=Math.floor(Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))),a=this.options.guidelineDistance,s=this.options.maxGuideLineLength,l=r>s?r-s:a;for(this._guidesContainer||(this._guidesContainer=L.DomUtil.create("div","leaflet-draw-guides",this._overlayPane));l<r;l+=this.options.guidelineDistance)n=l/r,i={x:Math.floor(t.x*(1-n)+n*e.x),y:Math.floor(t.y*(1-n)+n*e.y)},(o=L.DomUtil.create("div","leaflet-draw-guide-dash",this._guidesContainer)).style.backgroundColor=this._errorShown?this.options.drawError.color:this.options.shapeOptions.color,L.DomUtil.setPosition(o,i)},_updateGuideColor:function(t){if(this._guidesContainer)for(var e=0,n=this._guidesContainer.childNodes.length;e<n;e++)this._guidesContainer.childNodes[e].style.backgroundColor=t},_clearGuides:function(){if(this._guidesContainer)for(;this._guidesContainer.firstChild;)this._guidesContainer.removeChild(this._guidesContainer.firstChild)},_getTooltipText:function(){var t,e,n=this.options.showLength;return 0===this._markers.length?t={text:L.drawLocal.draw.handlers.polyline.tooltip.start}:(e=n?this._getMeasurementString():"",t=1===this._markers.length?{text:L.drawLocal.draw.handlers.polyline.tooltip.cont,subtext:e}:{text:L.drawLocal.draw.handlers.polyline.tooltip.end,subtext:e}),t},_updateRunningMeasure:function(t,e){var n,i,o=this._markers.length;1===this._markers.length?this._measurementRunningTotal=0:(n=o-(e?2:1),i=L.GeometryUtil.isVersion07x()?t.distanceTo(this._markers[n].getLatLng())*(this.options.factor||1):this._map.distance(t,this._markers[n].getLatLng())*(this.options.factor||1),this._measurementRunningTotal+=i*(e?1:-1))},_getMeasurementString:function(){var t,e=this._currentLatLng,n=this._markers[this._markers.length-1].getLatLng();return t=L.GeometryUtil.isVersion07x()?n&&e&&e.distanceTo?this._measurementRunningTotal+e.distanceTo(n)*(this.options.factor||1):this._measurementRunningTotal||0:n&&e?this._measurementRunningTotal+this._map.distance(e,n)*(this.options.factor||1):this._measurementRunningTotal||0,L.GeometryUtil.readableDistance(t,this.options.metric,this.options.feet,this.options.nautic,this.options.precision)},_showErrorTooltip:function(){this._errorShown=!0,this._tooltip.showAsError().updateContent({text:this.options.drawError.message}),this._updateGuideColor(this.options.drawError.color),this._poly.setStyle({color:this.options.drawError.color}),this._clearHideErrorTimeout(),this._hideErrorTimeout=setTimeout(L.Util.bind(this._hideErrorTooltip,this),this.options.drawError.timeout)},_hideErrorTooltip:function(){this._errorShown=!1,this._clearHideErrorTimeout(),this._tooltip.removeError().updateContent(this._getTooltipText()),this._updateGuideColor(this.options.shapeOptions.color),this._poly.setStyle({color:this.options.shapeOptions.color})},_clearHideErrorTimeout:function(){this._hideErrorTimeout&&(clearTimeout(this._hideErrorTimeout),this._hideErrorTimeout=null)},_disableNewMarkers:function(){this._disableMarkers=!0},_enableNewMarkers:function(){setTimeout(function(){this._disableMarkers=!1}.bind(this),50)},_cleanUpShape:function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this)},_fireCreatedEvent:function(){var t=new this.Poly(this._poly.getLatLngs(),this.options.shapeOptions);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.Polygon=L.Draw.Polyline.extend({statics:{TYPE:"polygon"},Poly:L.Polygon,options:{showArea:!1,showLength:!1,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},metric:!0,feet:!0,nautic:!1,precision:{}},initialize:function(t,e){L.Draw.Polyline.prototype.initialize.call(this,t,e),this.type=L.Draw.Polygon.TYPE},_updateFinishHandler:function(){var t=this._markers.length;1===t&&this._markers[0].on("click",this._finishShape,this),t>2&&(this._markers[t-1].on("dblclick",this._finishShape,this),t>3&&this._markers[t-2].off("dblclick",this._finishShape,this))},_getTooltipText:function(){var t,e;return 0===this._markers.length?t=L.drawLocal.draw.handlers.polygon.tooltip.start:this._markers.length<3?(t=L.drawLocal.draw.handlers.polygon.tooltip.cont,e=this._getMeasurementString()):(t=L.drawLocal.draw.handlers.polygon.tooltip.end,e=this._getMeasurementString()),{text:t,subtext:e}},_getMeasurementString:function(){var t=this._area,e="";return t||this.options.showLength?(this.options.showLength&&(e=L.Draw.Polyline.prototype._getMeasurementString.call(this)),t&&(e+="<br>"+L.GeometryUtil.readableArea(t,this.options.metric,this.options.precision)),e):null},_shapeIsValid:function(){return this._markers.length>=3},_vertexChanged:function(t,e){var n;!this.options.allowIntersection&&this.options.showArea&&(n=this._poly.getLatLngs(),this._area=L.GeometryUtil.geodesicArea(n)),L.Draw.Polyline.prototype._vertexChanged.call(this,t,e)},_cleanUpShape:function(){var t=this._markers.length;t>0&&(this._markers[0].off("click",this._finishShape,this),t>2&&this._markers[t-1].off("dblclick",this._finishShape,this))}}),L.SimpleShape={},L.Draw.SimpleShape=L.Draw.Feature.extend({options:{repeatMode:!1},initialize:function(t,e){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._mapDraggable=this._map.dragging.enabled(),this._mapDraggable&&this._map.dragging.disable(),this._container.style.cursor="crosshair",this._tooltip.updateContent({text:this._initialLabelText}),this._map.on("mousedown",this._onMouseDown,this).on("mousemove",this._onMouseMove,this).on("touchstart",this._onMouseDown,this).on("touchmove",this._onMouseMove,this),e.addEventListener("touchstart",L.DomEvent.preventDefault,{passive:!1}))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._mapDraggable&&this._map.dragging.enable(),this._container.style.cursor="",this._map.off("mousedown",this._onMouseDown,this).off("mousemove",this._onMouseMove,this).off("touchstart",this._onMouseDown,this).off("touchmove",this._onMouseMove,this),L.DomEvent.off(e,"mouseup",this._onMouseUp,this),L.DomEvent.off(e,"touchend",this._onMouseUp,this),e.removeEventListener("touchstart",L.DomEvent.preventDefault),this._shape&&(this._map.removeLayer(this._shape),delete this._shape)),this._isDrawing=!1},_getTooltipText:function(){return{text:this._endLabelText}},_onMouseDown:function(t){this._isDrawing=!0,this._startLatLng=t.latlng,L.DomEvent.on(e,"mouseup",this._onMouseUp,this).on(e,"touchend",this._onMouseUp,this).preventDefault(t.originalEvent)},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._isDrawing&&(this._tooltip.updateContent(this._getTooltipText()),this._drawShape(e))},_onMouseUp:function(){this._shape&&this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()}}),L.Draw.Rectangle=L.Draw.SimpleShape.extend({statics:{TYPE:"rectangle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showArea:!0,metric:!0},initialize:function(t,e){this.type=L.Draw.Rectangle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.rectangle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},disable:function(){this._enabled&&(this._isCurrentlyTwoClickDrawing=!1,L.Draw.SimpleShape.prototype.disable.call(this))},_onMouseUp:function(t){this._shape||this._isCurrentlyTwoClickDrawing?this._isCurrentlyTwoClickDrawing&&!function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}(t.target,"leaflet-pane")||L.Draw.SimpleShape.prototype._onMouseUp.call(this):this._isCurrentlyTwoClickDrawing=!0},_drawShape:function(t){this._shape?this._shape.setBounds(new L.LatLngBounds(this._startLatLng,t)):(this._shape=new L.Rectangle(new L.LatLngBounds(this._startLatLng,t),this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_getTooltipText:function(){var t,e,n,i=L.Draw.SimpleShape.prototype._getTooltipText.call(this),o=this._shape,r=this.options.showArea;return o&&(t=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),e=L.GeometryUtil.geodesicArea(t),n=r?L.GeometryUtil.readableArea(e,this.options.metric):""),{text:i.text,subtext:n}}}),L.Draw.Marker=L.Draw.Feature.extend({statics:{TYPE:"marker"},options:{icon:new L.Icon.Default,repeatMode:!1,zIndexOffset:2e3},initialize:function(t,e){this.type=L.Draw.Marker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.marker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._tooltip.updateContent({text:this._initialLabelText}),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("click",this._onClick,this).addTo(this._map),this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onTouch,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._map.off("click",this._onClick,this).off("click",this._onTouch,this),this._marker&&(this._marker.off("click",this._onClick,this),this._map.removeLayer(this._marker),delete this._marker),this._mouseMarker.off("click",this._onClick,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mousemove",this._onMouseMove,this))},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._mouseMarker.setLatLng(e),this._marker?(e=this._mouseMarker.getLatLng(),this._marker.setLatLng(e)):(this._marker=this._createMarker(e),this._marker.on("click",this._onClick,this),this._map.on("click",this._onClick,this).addLayer(this._marker))},_createMarker:function(t){return new L.Marker(t,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset})},_onClick:function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_onTouch:function(t){this._onMouseMove(t),this._onClick()},_fireCreatedEvent:function(){var t=new L.Marker.Touch(this._marker.getLatLng(),{icon:this.options.icon});L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.CircleMarker=L.Draw.Marker.extend({statics:{TYPE:"circlemarker"},options:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0,zIndexOffset:2e3},initialize:function(t,e){this.type=L.Draw.CircleMarker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circlemarker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,t,e)},_fireCreatedEvent:function(){var t=new L.CircleMarker(this._marker.getLatLng(),this.options);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)},_createMarker:function(t){return new L.CircleMarker(t,this.options)}}),L.Draw.Circle=L.Draw.SimpleShape.extend({statics:{TYPE:"circle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showRadius:!0,metric:!0,feet:!0,nautic:!1},initialize:function(t,e){this.type=L.Draw.Circle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},_drawShape:function(t){if(L.GeometryUtil.isVersion07x())var e=this._startLatLng.distanceTo(t);else e=this._map.distance(this._startLatLng,t);this._shape?this._shape.setRadius(e):(this._shape=new L.Circle(this._startLatLng,e,this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_onMouseMove:function(t){var e,n=t.latlng,i=this.options.showRadius,o=this.options.metric;if(this._tooltip.updatePosition(n),this._isDrawing){this._drawShape(n),e=this._shape.getRadius().toFixed(1);var r="";i&&(r=L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(e,o,this.options.feet,this.options.nautic)),this._tooltip.updateContent({text:this._endLabelText,subtext:r})}}}),L.Edit=L.Edit||{},L.Edit.Marker=L.Handler.extend({initialize:function(t,e){this._marker=t,L.setOptions(this,e)},addHooks:function(){var t=this._marker;t.dragging.enable(),t.on("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},removeHooks:function(){var t=this._marker;t.dragging.disable(),t.off("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},_onDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_toggleMarkerHighlight:function(){var t=this._marker._icon;t&&(t.style.display="none",L.DomUtil.hasClass(t,"leaflet-edit-marker-selected")?(L.DomUtil.removeClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,-4)):(L.DomUtil.addClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,4)),t.style.display="")},_offsetMarker:function(t,e){var n=parseInt(t.style.marginTop,10)-e,i=parseInt(t.style.marginLeft,10)-e;t.style.marginTop=n+"px",t.style.marginLeft=i+"px"}}),L.Marker.addInitHook((function(){L.Edit.Marker&&(this.editing=new L.Edit.Marker(this),this.options.editable&&this.editing.enable())})),L.Edit=L.Edit||{},L.Edit.Poly=L.Handler.extend({initialize:function(t){this.latlngs=[t._latlngs],t._holes&&(this.latlngs=this.latlngs.concat(t._holes)),this._poly=t,this._poly.on("revert-edited",this._updateLatLngs,this)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._poly._latlngs)?this._poly._latlngs:this._poly._latlngs[0]:this._poly._latlngs},_eachVertexHandler:function(t){for(var e=0;e<this._verticesHandlers.length;e++)t(this._verticesHandlers[e])},addHooks:function(){this._initHandlers(),this._eachVertexHandler((function(t){t.addHooks()}))},removeHooks:function(){this._eachVertexHandler((function(t){t.removeHooks()}))},updateMarkers:function(){this._eachVertexHandler((function(t){t.updateMarkers()}))},_initHandlers:function(){this._verticesHandlers=[];for(var t=0;t<this.latlngs.length;t++)this._verticesHandlers.push(new L.Edit.PolyVerticesEdit(this._poly,this.latlngs[t],this._poly.options.poly))},_updateLatLngs:function(t){this.latlngs=[t.layer._latlngs],t.layer._holes&&(this.latlngs=this.latlngs.concat(t.layer._holes))}}),L.Edit.PolyVerticesEdit=L.Handler.extend({options:{icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),drawError:{color:"#b00b00",timeout:1e3}},initialize:function(t,e,n){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this._poly=t,n&&n.drawError&&(n.drawError=L.Util.extend({},this.options.drawError,n.drawError)),this._latlngs=e,L.setOptions(this,n)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]:this._latlngs},addHooks:function(){var t=this._poly,e=t._path;t instanceof L.Polygon||(t.options.fill=!1,t.options.editing&&(t.options.editing.fill=!1)),e&&t.options.editing&&t.options.editing.className&&(t.options.original.className&&t.options.original.className.split(" ").forEach((function(t){L.DomUtil.removeClass(e,t)})),t.options.editing.className.split(" ").forEach((function(t){L.DomUtil.addClass(e,t)}))),t.setStyle(t.options.editing),this._poly._map&&(this._map=this._poly._map,this._markerGroup||this._initMarkers(),this._poly._map.addLayer(this._markerGroup))},removeHooks:function(){var t=this._poly,e=t._path;e&&t.options.editing&&t.options.editing.className&&(t.options.editing.className.split(" ").forEach((function(t){L.DomUtil.removeClass(e,t)})),t.options.original.className&&t.options.original.className.split(" ").forEach((function(t){L.DomUtil.addClass(e,t)}))),t.setStyle(t.options.original),t._map&&(t._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers)},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._markers=[];var t,e,n,i,o,r,a=this._defaultShape();for(t=0,n=a.length;t<n;t++)(i=this._createMarker(a[t],t)).on("click",this._onMarkerClick,this),i.on("contextmenu",this._onContextMenu,this),this._markers.push(i);for(t=0,e=n-1;t<n;e=t++)(0!==t||L.Polygon&&this._poly instanceof L.Polygon)&&(o=this._markers[e],r=this._markers[t],this._createMiddleMarker(o,r),this._updatePrevNext(o,r))},_createMarker:function(t,e){var n=new L.Marker.Touch(t,{draggable:!0,icon:this.options.icon});return n._origLatLng=t,n._index=e,n.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._fireEdit,this).on("touchmove",this._onTouchMove,this).on("touchend",this._fireEdit,this).on("MSPointerMove",this._onTouchMove,this).on("MSPointerUp",this._fireEdit,this),this._markerGroup.addLayer(n),n},_onMarkerDragStart:function(){this._poly.fire("editstart")},_spliceLatLngs:function(){var t=this._defaultShape(),e=[].splice.apply(t,arguments);return this._poly._convertLatLngs(t,!0),this._poly.redraw(),e},_removeMarker:function(t){var e=t._index;this._markerGroup.removeLayer(t),this._markers.splice(e,1),this._spliceLatLngs(e,1),this._updateIndexes(e,-1),t.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._fireEdit,this).off("touchmove",this._onMarkerDrag,this).off("touchend",this._fireEdit,this).off("click",this._onMarkerClick,this).off("MSPointerMove",this._onTouchMove,this).off("MSPointerUp",this._fireEdit,this)},_fireEdit:function(){this._poly.edited=!0,this._poly.fire("edit"),this._poly._map.fire(L.Draw.Event.EDITVERTEX,{layers:this._markerGroup,poly:this._poly})},_onMarkerDrag:function(t){var e=t.target,n=this._poly,i=L.LatLngUtil.cloneLatLng(e._origLatLng);if(L.extend(e._origLatLng,e._latlng),n.options.poly){var o=n._map._editTooltip;if(!n.options.poly.allowIntersection&&n.intersects()){L.extend(e._origLatLng,i),e.setLatLng(i);var r=n.options.color;n.setStyle({color:this.options.drawError.color}),o&&o.updateContent({text:L.drawLocal.draw.handlers.polyline.error}),setTimeout((function(){n.setStyle({color:r}),o&&o.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext})}),1e3)}}e._middleLeft&&e._middleLeft.setLatLng(this._getMiddleLatLng(e._prev,e)),e._middleRight&&e._middleRight.setLatLng(this._getMiddleLatLng(e,e._next)),this._poly._bounds._southWest=L.latLng(1/0,1/0),this._poly._bounds._northEast=L.latLng(-1/0,-1/0);var a=this._poly.getLatLngs();this._poly._convertLatLngs(a,!0),this._poly.redraw(),this._poly.fire("editdrag")},_onMarkerClick:function(t){var e=L.Polygon&&this._poly instanceof L.Polygon?4:3,n=t.target;this._defaultShape().length<e||(this._removeMarker(n),this._updatePrevNext(n._prev,n._next),n._middleLeft&&this._markerGroup.removeLayer(n._middleLeft),n._middleRight&&this._markerGroup.removeLayer(n._middleRight),n._prev&&n._next?this._createMiddleMarker(n._prev,n._next):n._prev?n._next||(n._prev._middleRight=null):n._next._middleLeft=null,this._fireEdit())},_onContextMenu:function(t){var e=t.target;this._poly,this._poly._map.fire(L.Draw.Event.MARKERCONTEXT,{marker:e,layers:this._markerGroup,poly:this._poly}),L.DomEvent.stopPropagation},_onTouchMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent.touches[0]),n=this._map.layerPointToLatLng(e),i=t.target;L.extend(i._origLatLng,n),i._middleLeft&&i._middleLeft.setLatLng(this._getMiddleLatLng(i._prev,i)),i._middleRight&&i._middleRight.setLatLng(this._getMiddleLatLng(i,i._next)),this._poly.redraw(),this.updateMarkers()},_updateIndexes:function(t,e){this._markerGroup.eachLayer((function(n){n._index>t&&(n._index+=e)}))},_createMiddleMarker:function(t,e){var n,i,o,r=this._getMiddleLatLng(t,e),a=this._createMarker(r);a.setOpacity(.6),t._middleRight=e._middleLeft=a,i=function(){a.off("touchmove",i,this);var o=e._index;a._index=o,a.off("click",n,this).on("click",this._onMarkerClick,this),r.lat=a.getLatLng().lat,r.lng=a.getLatLng().lng,this._spliceLatLngs(o,0,r),this._markers.splice(o,0,a),a.setOpacity(1),this._updateIndexes(o,1),e._index++,this._updatePrevNext(t,a),this._updatePrevNext(a,e),this._poly.fire("editstart")},o=function(){a.off("dragstart",i,this),a.off("dragend",o,this),a.off("touchmove",i,this),this._createMiddleMarker(t,a),this._createMiddleMarker(a,e)},n=function(){i.call(this),o.call(this),this._fireEdit()},a.on("click",n,this).on("dragstart",i,this).on("dragend",o,this).on("touchmove",i,this),this._markerGroup.addLayer(a)},_updatePrevNext:function(t,e){t&&(t._next=e),e&&(e._prev=t)},_getMiddleLatLng:function(t,e){var n=this._poly._map,i=n.project(t.getLatLng()),o=n.project(e.getLatLng());return n.unproject(i._add(o)._divideBy(2))}}),L.Polyline.addInitHook((function(){this.editing||(L.Edit.Poly&&(this.editing=new L.Edit.Poly(this),this.options.editable&&this.editing.enable()),this.on("add",(function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()})),this.on("remove",(function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})))})),L.Edit=L.Edit||{},L.Edit.SimpleShape=L.Handler.extend({options:{moveIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move"}),resizeIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize"}),touchMoveIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move leaflet-touch-icon"}),touchResizeIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize leaflet-touch-icon"})},initialize:function(t,e){L.Browser.touch&&(this.options.moveIcon=this.options.touchMoveIcon,this.options.resizeIcon=this.options.touchResizeIcon),this._shape=t,L.Util.setOptions(this,e)},addHooks:function(){var t=this._shape;this._shape._map&&(this._map=this._shape._map,t.setStyle(t.options.editing),t._map&&(this._map=t._map,this._markerGroup||this._initMarkers(),this._map.addLayer(this._markerGroup)))},removeHooks:function(){var t=this._shape;if(t.setStyle(t.options.original),t._map){this._unbindMarker(this._moveMarker);for(var e=0,n=this._resizeMarkers.length;e<n;e++)this._unbindMarker(this._resizeMarkers[e]);this._resizeMarkers=null,this._map.removeLayer(this._markerGroup),delete this._markerGroup}this._map=null},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._createMoveMarker(),this._createResizeMarker()},_createMoveMarker:function(){},_createResizeMarker:function(){},_createMarker:function(t,e){var n=new L.Marker.Touch(t,{draggable:!0,icon:e,zIndexOffset:10});return this._bindMarker(n),this._markerGroup.addLayer(n),n},_bindMarker:function(t){t.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._onMarkerDragEnd,this).on("touchstart",this._onTouchStart,this).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onTouchEnd,this).on("MSPointerUp",this._onTouchEnd,this)},_unbindMarker:function(t){t.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._onMarkerDragEnd,this).off("touchstart",this._onTouchStart,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onTouchEnd,this).off("MSPointerUp",this._onTouchEnd,this)},_onMarkerDragStart:function(t){t.target.setOpacity(0),this._shape.fire("editstart")},_fireEdit:function(){this._shape.edited=!0,this._shape.fire("edit")},_onMarkerDrag:function(t){var e=t.target,n=e.getLatLng();e===this._moveMarker?this._move(n):this._resize(n),this._shape.redraw(),this._shape.fire("editdrag")},_onMarkerDragEnd:function(t){t.target.setOpacity(1),this._fireEdit()},_onTouchStart:function(t){if(L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,t),"function"==typeof this._getCorners){var e=this._getCorners(),n=t.target,i=n._cornerIndex;n.setOpacity(0),this._oppositeCorner=e[(i+2)%4],this._toggleCornerMarkers(0,i)}this._shape.fire("editstart")},_onTouchMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent.touches[0]),n=this._map.layerPointToLatLng(e);return t.target===this._moveMarker?this._move(n):this._resize(n),this._shape.redraw(),!1},_onTouchEnd:function(t){t.target.setOpacity(1),this.updateMarkers(),this._fireEdit()},_move:function(){},_resize:function(){}}),L.Edit=L.Edit||{},L.Edit.Rectangle=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var t=this._shape.getBounds().getCenter();this._moveMarker=this._createMarker(t,this.options.moveIcon)},_createResizeMarker:function(){var t=this._getCorners();this._resizeMarkers=[];for(var e=0,n=t.length;e<n;e++)this._resizeMarkers.push(this._createMarker(t[e],this.options.resizeIcon)),this._resizeMarkers[e]._cornerIndex=e},_onMarkerDragStart:function(t){L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,t);var e=this._getCorners(),n=t.target._cornerIndex;this._oppositeCorner=e[(n+2)%4],this._toggleCornerMarkers(0,n)},_onMarkerDragEnd:function(t){var e,n=t.target;n===this._moveMarker&&(e=this._shape.getBounds().getCenter(),n.setLatLng(e)),this._toggleCornerMarkers(1),this._repositionCornerMarkers(),L.Edit.SimpleShape.prototype._onMarkerDragEnd.call(this,t)},_move:function(t){for(var e,n=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),i=this._shape.getBounds().getCenter(),o=[],r=0,a=n.length;r<a;r++)e=[n[r].lat-i.lat,n[r].lng-i.lng],o.push([t.lat+e[0],t.lng+e[1]]);this._shape.setLatLngs(o),this._repositionCornerMarkers(),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})},_resize:function(t){var e;this._shape.setBounds(L.latLngBounds(t,this._oppositeCorner)),e=this._shape.getBounds(),this._moveMarker.setLatLng(e.getCenter()),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})},_getCorners:function(){var t=this._shape.getBounds();return[t.getNorthWest(),t.getNorthEast(),t.getSouthEast(),t.getSouthWest()]},_toggleCornerMarkers:function(t){for(var e=0,n=this._resizeMarkers.length;e<n;e++)this._resizeMarkers[e].setOpacity(t)},_repositionCornerMarkers:function(){for(var t=this._getCorners(),e=0,n=this._resizeMarkers.length;e<n;e++)this._resizeMarkers[e].setLatLng(t[e])}}),L.Rectangle.addInitHook((function(){L.Edit.Rectangle&&(this.editing=new L.Edit.Rectangle(this),this.options.editable&&this.editing.enable())})),L.Edit=L.Edit||{},L.Edit.CircleMarker=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var t=this._shape.getLatLng();this._moveMarker=this._createMarker(t,this.options.moveIcon)},_createResizeMarker:function(){this._resizeMarkers=[]},_move:function(t){if(this._resizeMarkers.length){var e=this._getResizeMarkerPoint(t);this._resizeMarkers[0].setLatLng(e)}this._shape.setLatLng(t),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})}}),L.CircleMarker.addInitHook((function(){L.Edit.CircleMarker&&(this.editing=new L.Edit.CircleMarker(this),this.options.editable&&this.editing.enable()),this.on("add",(function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()})),this.on("remove",(function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()}))})),L.Edit=L.Edit||{},L.Edit.Circle=L.Edit.CircleMarker.extend({_createResizeMarker:function(){var t=this._shape.getLatLng(),e=this._getResizeMarkerPoint(t);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(e,this.options.resizeIcon))},_getResizeMarkerPoint:function(t){var e=this._shape._radius*Math.cos(Math.PI/4),n=this._map.project(t);return this._map.unproject([n.x+e,n.y-e])},_resize:function(t){var e=this._moveMarker.getLatLng();L.GeometryUtil.isVersion07x()?radius=e.distanceTo(t):radius=this._map.distance(e,t),this._shape.setRadius(radius),this._map.editTooltip&&this._map._editTooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.subtext+"<br />"+L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(radius,!0,this.options.feet,this.options.nautic)}),this._shape.setRadius(radius),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})}}),L.Circle.addInitHook((function(){L.Edit.Circle&&(this.editing=new L.Edit.Circle(this),this.options.editable&&this.editing.enable())})),L.Map.mergeOptions({touchExtend:!0}),L.Map.TouchExtend=L.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane},addHooks:function(){L.DomEvent.on(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.on(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.on(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.on(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.on(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.on(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.on(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.on(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.on(this._container,"touchleave",this._onTouchLeave,this))},removeHooks:function(){L.DomEvent.off(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.off(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.off(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.off(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.off(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.off(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.off(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.off(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.off(this._container,"touchleave",this._onTouchLeave,this))},_touchEvent:function(t,e){var n={};if(void 0!==t.touches){if(!t.touches.length)return;n=t.touches[0]}else{if("touch"!==t.pointerType)return;if(n=t,!this._filterClick(t))return}var i=this._map.mouseEventToContainerPoint(n),o=this._map.mouseEventToLayerPoint(n),r=this._map.layerPointToLatLng(o);this._map.fire(e,{latlng:r,layerPoint:o,containerPoint:i,pageX:n.pageX,pageY:n.pageY,originalEvent:t})},_filterClick:function(t){var e=t.timeStamp||t.originalEvent.timeStamp,n=L.DomEvent._lastClick&&e-L.DomEvent._lastClick;return n&&n>100&&n<500||t.target._simulatedClick&&!t._simulated?(L.DomEvent.stop(t),!1):(L.DomEvent._lastClick=e,!0)},_onTouchStart:function(t){this._map._loaded&&this._touchEvent(t,"touchstart")},_onTouchEnd:function(t){this._map._loaded&&this._touchEvent(t,"touchend")},_onTouchCancel:function(t){if(this._map._loaded){var e="touchcancel";this._detectIE()&&(e="pointercancel"),this._touchEvent(t,e)}},_onTouchLeave:function(t){this._map._loaded&&this._touchEvent(t,"touchleave")},_onTouchMove:function(t){this._map._loaded&&this._touchEvent(t,"touchmove")},_detectIE:function(){var e=t.navigator.userAgent,n=e.indexOf("MSIE ");if(n>0)return parseInt(e.substring(n+5,e.indexOf(".",n)),10);if(e.indexOf("Trident/")>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}var o=e.indexOf("Edge/");return o>0&&parseInt(e.substring(o+5,e.indexOf(".",o)),10)}}),L.Map.addInitHook("addHandler","touchExtend",L.Map.TouchExtend),L.Marker.Touch=L.Marker.extend({_initInteraction:function(){return this.addInteractiveTarget?L.Marker.prototype._initInteraction.apply(this):this._initInteractionLegacy()},_initInteractionLegacy:function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu","touchstart","touchend","touchmove"];this._detectIE?e.concat(["MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"]):e.concat(["touchcancel"]),L.DomUtil.addClass(t,"leaflet-clickable"),L.DomEvent.on(t,"click",this._onMouseClick,this),L.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var n=0;n<e.length;n++)L.DomEvent.on(t,e[n],this._fireMouseEvent,this);L.Handler.MarkerDrag&&(this.dragging=new L.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_detectIE:function(){var e=t.navigator.userAgent,n=e.indexOf("MSIE ");if(n>0)return parseInt(e.substring(n+5,e.indexOf(".",n)),10);if(e.indexOf("Trident/")>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}var o=e.indexOf("Edge/");return o>0&&parseInt(e.substring(o+5,e.indexOf(".",o)),10)}}),L.LatLngUtil={cloneLatLngs:function(t){for(var e=[],n=0,i=t.length;n<i;n++)Array.isArray(t[n])?e.push(L.LatLngUtil.cloneLatLngs(t[n])):e.push(this.cloneLatLng(t[n]));return e},cloneLatLng:function(t){return L.latLng(t.lat,t.lng)}},function(){var t={km:2,ha:2,m:0,mi:2,ac:2,yd:0,ft:0,nm:2};L.GeometryUtil=L.extend(L.GeometryUtil||{},{geodesicArea:function(t){var e,n,i=t.length,o=0,r=Math.PI/180;if(i>2){for(var a=0;a<i;a++)e=t[a],o+=((n=t[(a+1)%i]).lng-e.lng)*r*(2+Math.sin(e.lat*r)+Math.sin(n.lat*r));o=6378137*o*6378137/2}return Math.abs(o)},formattedNumber:function(t,e){var n=parseFloat(t).toFixed(e),i=L.drawLocal.format&&L.drawLocal.format.numeric,o=i&&i.delimiters,r=o&&o.thousands,a=o&&o.decimal;if(r||a){var s=n.split(".");n=r?s[0].replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+r):s[0],a=a||".",s.length>1&&(n=n+a+s[1])}return n},readableArea:function(e,n,i){var o,r;return i=L.Util.extend({},t,i),n?(r=["ha","m"],type=typeof n,"string"===type?r=[n]:"boolean"!==type&&(r=n),o=e>=1e6&&-1!==r.indexOf("km")?L.GeometryUtil.formattedNumber(1e-6*e,i.km)+" km²":e>=1e4&&-1!==r.indexOf("ha")?L.GeometryUtil.formattedNumber(1e-4*e,i.ha)+" ha":L.GeometryUtil.formattedNumber(e,i.m)+" m²"):o=(e/=.836127)>=3097600?L.GeometryUtil.formattedNumber(e/3097600,i.mi)+" mi²":e>=4840?L.GeometryUtil.formattedNumber(e/4840,i.ac)+" acres":L.GeometryUtil.formattedNumber(e,i.yd)+" yd²",o},readableDistance:function(e,n,i,o,r){var a;switch(r=L.Util.extend({},t,r),n?"string"==typeof n?n:"metric":i?"feet":o?"nauticalMile":"yards"){case"metric":a=e>1e3?L.GeometryUtil.formattedNumber(e/1e3,r.km)+" km":L.GeometryUtil.formattedNumber(e,r.m)+" m";break;case"feet":e*=3.28083,a=L.GeometryUtil.formattedNumber(e,r.ft)+" ft";break;case"nauticalMile":e*=.53996,a=L.GeometryUtil.formattedNumber(e/1e3,r.nm)+" nm";break;default:a=(e*=1.09361)>1760?L.GeometryUtil.formattedNumber(e/1760,r.mi)+" miles":L.GeometryUtil.formattedNumber(e,r.yd)+" yd"}return a},isVersion07x:function(){var t=L.version.split(".");return 0===parseInt(t[0],10)&&7===parseInt(t[1],10)}})}(),L.Util.extend(L.LineUtil,{segmentsIntersect:function(t,e,n,i){return this._checkCounterclockwise(t,n,i)!==this._checkCounterclockwise(e,n,i)&&this._checkCounterclockwise(t,e,n)!==this._checkCounterclockwise(t,e,i)},_checkCounterclockwise:function(t,e,n){return(n.y-t.y)*(e.x-t.x)>(e.y-t.y)*(n.x-t.x)}}),L.Polyline.include({intersects:function(){var t,e,n,i=this._getProjectedPoints(),o=i?i.length:0;if(this._tooFewPointsForIntersection())return!1;for(t=o-1;t>=3;t--)if(e=i[t-1],n=i[t],this._lineSegmentsIntersectsRange(e,n,t-2))return!0;return!1},newLatLngIntersects:function(t,e){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(t),e)},newPointIntersects:function(t,e){var n=this._getProjectedPoints(),i=n?n.length:0,o=n?n[i-1]:null,r=i-2;return!this._tooFewPointsForIntersection(1)&&this._lineSegmentsIntersectsRange(o,t,r,e?1:0)},_tooFewPointsForIntersection:function(t){var e=this._getProjectedPoints(),n=e?e.length:0;return!e||(n+=t||0)<=3},_lineSegmentsIntersectsRange:function(t,e,n,i){var o,r,a=this._getProjectedPoints();i=i||0;for(var s=n;s>i;s--)if(o=a[s-1],r=a[s],L.LineUtil.segmentsIntersect(t,e,o,r))return!0;return!1},_getProjectedPoints:function(){if(!this._defaultShape)return this._originalPoints;for(var t=[],e=this._defaultShape(),n=0;n<e.length;n++)t.push(this._map.latLngToLayerPoint(e[n]));return t}}),L.Polygon.include({intersects:function(){var t,e,n,i,o=this._getProjectedPoints();return!this._tooFewPointsForIntersection()&&(!!L.Polyline.prototype.intersects.call(this)||(t=o.length,e=o[0],n=o[t-1],i=t-2,this._lineSegmentsIntersectsRange(n,e,i,1)))}}),L.Control.Draw=L.Control.extend({options:{position:"topleft",draw:{},edit:!1},initialize:function(t){if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");var e;L.Control.prototype.initialize.call(this,t),this._toolbars={},L.DrawToolbar&&this.options.draw&&(e=new L.DrawToolbar(this.options.draw),this._toolbars[L.DrawToolbar.TYPE]=e,this._toolbars[L.DrawToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.EditToolbar&&this.options.edit&&(e=new L.EditToolbar(this.options.edit),this._toolbars[L.EditToolbar.TYPE]=e,this._toolbars[L.EditToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.toolbar=this},onAdd:function(t){var e,n=L.DomUtil.create("div","leaflet-draw"),i=!1;for(var o in this._toolbars)this._toolbars.hasOwnProperty(o)&&(e=this._toolbars[o].addToolbar(t))&&(i||(L.DomUtil.hasClass(e,"leaflet-draw-toolbar-top")||L.DomUtil.addClass(e.childNodes[0],"leaflet-draw-toolbar-top"),i=!0),n.appendChild(e));return n},onRemove:function(){for(var t in this._toolbars)this._toolbars.hasOwnProperty(t)&&this._toolbars[t].removeToolbar()},setDrawingOptions:function(t){for(var e in this._toolbars)this._toolbars[e]instanceof L.DrawToolbar&&this._toolbars[e].setOptions(t)},_toolbarEnabled:function(t){var e=t.target;for(var n in this._toolbars)this._toolbars[n]!==e&&this._toolbars[n].disable()}}),L.Map.mergeOptions({drawControlTooltips:!0,drawControl:!1}),L.Map.addInitHook((function(){this.options.drawControl&&(this.drawControl=new L.Control.Draw,this.addControl(this.drawControl))})),L.Toolbar=L.Class.extend({initialize:function(t){L.setOptions(this,t),this._modes={},this._actionButtons=[],this._activeMode=null;var e=L.version.split(".");1===parseInt(e[0],10)&&parseInt(e[1],10)>=2?L.Toolbar.include(L.Evented.prototype):L.Toolbar.include(L.Mixin.Events)},enabled:function(){return null!==this._activeMode},disable:function(){this.enabled()&&this._activeMode.handler.disable()},addToolbar:function(t){var e,n=L.DomUtil.create("div","leaflet-draw-section"),i=0,o=this._toolbarClass||"",r=this.getModeHandlers(t);for(this._toolbarContainer=L.DomUtil.create("div","leaflet-draw-toolbar leaflet-bar"),this._map=t,e=0;e<r.length;e++)r[e].enabled&&this._initModeHandler(r[e].handler,this._toolbarContainer,i++,o,r[e].title);if(i)return this._lastButtonIndex=--i,this._actionsContainer=L.DomUtil.create("ul","leaflet-draw-actions"),n.appendChild(this._toolbarContainer),n.appendChild(this._actionsContainer),n},removeToolbar:function(){for(var t in this._modes)this._modes.hasOwnProperty(t)&&(this._disposeButton(this._modes[t].button,this._modes[t].handler.enable,this._modes[t].handler),this._modes[t].handler.disable(),this._modes[t].handler.off("enabled",this._handlerActivated,this).off("disabled",this._handlerDeactivated,this));this._modes={};for(var e=0,n=this._actionButtons.length;e<n;e++)this._disposeButton(this._actionButtons[e].button,this._actionButtons[e].callback,this);this._actionButtons=[],this._actionsContainer=null},_initModeHandler:function(t,e,n,i,o){var r=t.type;this._modes[r]={},this._modes[r].handler=t,this._modes[r].button=this._createButton({type:r,title:o,className:i+"-"+r,container:e,callback:this._modes[r].handler.enable,context:this._modes[r].handler}),this._modes[r].buttonIndex=n,this._modes[r].handler.on("enabled",this._handlerActivated,this).on("disabled",this._handlerDeactivated,this)},_detectIOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!t.MSStream},_createButton:function(t){var e=L.DomUtil.create("a",t.className||"",t.container),n=L.DomUtil.create("span","sr-only",t.container);e.href="#",e.appendChild(n),t.title&&(e.title=t.title,n.innerHTML=t.title),t.text&&(e.innerHTML=t.text,n.innerHTML=t.text);var i=this._detectIOS()?"touchstart":"click";return L.DomEvent.on(e,"click",L.DomEvent.stopPropagation).on(e,"mousedown",L.DomEvent.stopPropagation).on(e,"dblclick",L.DomEvent.stopPropagation).on(e,"touchstart",L.DomEvent.stopPropagation).on(e,"click",L.DomEvent.preventDefault).on(e,i,t.callback,t.context),e},_disposeButton:function(t,e){var n=this._detectIOS()?"touchstart":"click";L.DomEvent.off(t,"click",L.DomEvent.stopPropagation).off(t,"mousedown",L.DomEvent.stopPropagation).off(t,"dblclick",L.DomEvent.stopPropagation).off(t,"touchstart",L.DomEvent.stopPropagation).off(t,"click",L.DomEvent.preventDefault).off(t,n,e)},_handlerActivated:function(t){this.disable(),this._activeMode=this._modes[t.handler],L.DomUtil.addClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._showActionsToolbar(),this.fire("enable")},_handlerDeactivated:function(){this._hideActionsToolbar(),L.DomUtil.removeClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._activeMode=null,this.fire("disable")},_createActions:function(t){var e,n,i,o,r=this._actionsContainer,a=this.getActions(t),s=a.length;for(n=0,i=this._actionButtons.length;n<i;n++)this._disposeButton(this._actionButtons[n].button,this._actionButtons[n].callback);for(this._actionButtons=[];r.firstChild;)r.removeChild(r.firstChild);for(var l=0;l<s;l++)"enabled"in a[l]&&!a[l].enabled||(e=L.DomUtil.create("li","",r),o=this._createButton({title:a[l].title,text:a[l].text,container:e,callback:a[l].callback,context:a[l].context}),this._actionButtons.push({button:o,callback:a[l].callback}))},_showActionsToolbar:function(){var t=this._activeMode.buttonIndex,e=this._lastButtonIndex,n=this._activeMode.button.offsetTop-1;this._createActions(this._activeMode.handler),this._actionsContainer.style.top=n+"px",0===t&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-top")),t===e&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-bottom")),this._actionsContainer.style.display="block",this._map.fire(L.Draw.Event.TOOLBAROPENED)},_hideActionsToolbar:function(){this._actionsContainer.style.display="none",L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-top"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-bottom"),this._map.fire(L.Draw.Event.TOOLBARCLOSED)}}),L.Draw=L.Draw||{},L.Draw.Tooltip=L.Class.extend({initialize:function(t){this._map=t,this._popupPane=t._panes.popupPane,this._visible=!1,this._container=t.options.drawControlTooltips?L.DomUtil.create("div","leaflet-draw-tooltip",this._popupPane):null,this._singleLineLabel=!1,this._map.on("mouseout",this._onMouseOut,this)},dispose:function(){this._map.off("mouseout",this._onMouseOut,this),this._container&&(this._popupPane.removeChild(this._container),this._container=null)},updateContent:function(t){return this._container?(t.subtext=t.subtext||"",0!==t.subtext.length||this._singleLineLabel?t.subtext.length>0&&this._singleLineLabel&&(L.DomUtil.removeClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!1):(L.DomUtil.addClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!0),this._container.innerHTML=(t.subtext.length>0?'<span class="leaflet-draw-tooltip-subtext">'+t.subtext+"</span><br />":"")+"<span>"+t.text+"</span>",t.text||t.subtext?(this._visible=!0,this._container.style.visibility="inherit"):(this._visible=!1,this._container.style.visibility="hidden"),this):this},updatePosition:function(t){var e=this._map.latLngToLayerPoint(t),n=this._container;return this._container&&(this._visible&&(n.style.visibility="inherit"),L.DomUtil.setPosition(n,e)),this},showAsError:function(){return this._container&&L.DomUtil.addClass(this._container,"leaflet-error-draw-tooltip"),this},removeError:function(){return this._container&&L.DomUtil.removeClass(this._container,"leaflet-error-draw-tooltip"),this},_onMouseOut:function(){this._container&&(this._container.style.visibility="hidden")}}),L.DrawToolbar=L.Toolbar.extend({statics:{TYPE:"draw"},options:{polyline:{},polygon:{},rectangle:{},circle:{},marker:{},circlemarker:{}},initialize:function(t){for(var e in this.options)this.options.hasOwnProperty(e)&&t[e]&&(t[e]=L.extend({},this.options[e],t[e]));this._toolbarClass="leaflet-draw-draw",L.Toolbar.prototype.initialize.call(this,t)},getModeHandlers:function(t){return[{enabled:this.options.polyline,handler:new L.Draw.Polyline(t,this.options.polyline),title:L.drawLocal.draw.toolbar.buttons.polyline},{enabled:this.options.polygon,handler:new L.Draw.Polygon(t,this.options.polygon),title:L.drawLocal.draw.toolbar.buttons.polygon},{enabled:this.options.rectangle,handler:new L.Draw.Rectangle(t,this.options.rectangle),title:L.drawLocal.draw.toolbar.buttons.rectangle},{enabled:this.options.circle,handler:new L.Draw.Circle(t,this.options.circle),title:L.drawLocal.draw.toolbar.buttons.circle},{enabled:this.options.marker,handler:new L.Draw.Marker(t,this.options.marker),title:L.drawLocal.draw.toolbar.buttons.marker},{enabled:this.options.circlemarker,handler:new L.Draw.CircleMarker(t,this.options.circlemarker),title:L.drawLocal.draw.toolbar.buttons.circlemarker}]},getActions:function(t){return[{enabled:t.completeShape,title:L.drawLocal.draw.toolbar.finish.title,text:L.drawLocal.draw.toolbar.finish.text,callback:t.completeShape,context:t},{enabled:t.deleteLastVertex,title:L.drawLocal.draw.toolbar.undo.title,text:L.drawLocal.draw.toolbar.undo.text,callback:t.deleteLastVertex,context:t},{title:L.drawLocal.draw.toolbar.actions.title,text:L.drawLocal.draw.toolbar.actions.text,callback:this.disable,context:this}]},setOptions:function(t){for(var e in L.setOptions(this,t),this._modes)this._modes.hasOwnProperty(e)&&t.hasOwnProperty(e)&&this._modes[e].handler.setOptions(t[e])}}),L.EditToolbar=L.Toolbar.extend({statics:{TYPE:"edit"},options:{edit:{selectedPathOptions:{dashArray:"10, 10",fill:!0,fillColor:"#fe57a1",fillOpacity:.1,maintainColor:!1}},remove:{},poly:null,featureGroup:null},initialize:function(t){t.edit&&(void 0===t.edit.selectedPathOptions&&(t.edit.selectedPathOptions=this.options.edit.selectedPathOptions),t.edit.selectedPathOptions=L.extend({},this.options.edit.selectedPathOptions,t.edit.selectedPathOptions)),t.remove&&(t.remove=L.extend({},this.options.remove,t.remove)),t.poly&&(t.poly=L.extend({},this.options.poly,t.poly)),this._toolbarClass="leaflet-draw-edit",L.Toolbar.prototype.initialize.call(this,t),this._selectedFeatureCount=0},getModeHandlers:function(t){var e=this.options.featureGroup;return[{enabled:this.options.edit,handler:new L.EditToolbar.Edit(t,{featureGroup:e,selectedPathOptions:this.options.edit.selectedPathOptions,poly:this.options.poly}),title:L.drawLocal.edit.toolbar.buttons.edit},{enabled:this.options.remove,handler:new L.EditToolbar.Delete(t,{featureGroup:e}),title:L.drawLocal.edit.toolbar.buttons.remove}]},getActions:function(t){var e=[{title:L.drawLocal.edit.toolbar.actions.save.title,text:L.drawLocal.edit.toolbar.actions.save.text,callback:this._save,context:this},{title:L.drawLocal.edit.toolbar.actions.cancel.title,text:L.drawLocal.edit.toolbar.actions.cancel.text,callback:this.disable,context:this}];return t.removeAllLayers&&e.push({title:L.drawLocal.edit.toolbar.actions.clearAll.title,text:L.drawLocal.edit.toolbar.actions.clearAll.text,callback:this._clearAllLayers,context:this}),e},addToolbar:function(t){var e=L.Toolbar.prototype.addToolbar.call(this,t);return this._checkDisabled(),this.options.featureGroup.on("layeradd layerremove",this._checkDisabled,this),e},removeToolbar:function(){this.options.featureGroup.off("layeradd layerremove",this._checkDisabled,this),L.Toolbar.prototype.removeToolbar.call(this)},disable:function(){this.enabled()&&(this._activeMode.handler.revertLayers(),L.Toolbar.prototype.disable.call(this))},_save:function(){this._activeMode.handler.save(),this._activeMode&&this._activeMode.handler.disable()},_clearAllLayers:function(){this._activeMode.handler.removeAllLayers(),this._activeMode&&this._activeMode.handler.disable()},_checkDisabled:function(){var t,e=0!==this.options.featureGroup.getLayers().length;this.options.edit&&(t=this._modes[L.EditToolbar.Edit.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.edit:L.drawLocal.edit.toolbar.buttons.editDisabled)),this.options.remove&&(t=this._modes[L.EditToolbar.Delete.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.remove:L.drawLocal.edit.toolbar.buttons.removeDisabled))}}),L.EditToolbar.Edit=L.Handler.extend({statics:{TYPE:"edit"},initialize:function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.setOptions(this,e),this._featureGroup=e.featureGroup,!(this._featureGroup instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this._uneditedLayerProps={},this.type=L.EditToolbar.Edit.TYPE;var n=L.version.split(".");1===parseInt(n[0],10)&&parseInt(n[1],10)>=2?L.EditToolbar.Edit.include(L.Evented.prototype):L.EditToolbar.Edit.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.EDITSTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._featureGroup.on("layeradd",this._enableLayerEdit,this).on("layerremove",this._disableLayerEdit,this))},disable:function(){this._enabled&&(this._featureGroup.off("layeradd",this._enableLayerEdit,this).off("layerremove",this._disableLayerEdit,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.EDITSTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(t.getContainer().focus(),this._featureGroup.eachLayer(this._enableLayerEdit,this),this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}),t._editTooltip=this._tooltip,this._updateTooltip(),this._map.on("mousemove",this._onMouseMove,this).on("touchmove",this._onMouseMove,this).on("MSPointerMove",this._onMouseMove,this).on(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},removeHooks:function(){this._map&&(this._featureGroup.eachLayer(this._disableLayerEdit,this),this._uneditedLayerProps={},this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this).off("touchmove",this._onMouseMove,this).off("MSPointerMove",this._onMouseMove,this).off(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},revertLayers:function(){this._featureGroup.eachLayer((function(t){this._revertLayer(t)}),this)},save:function(){var t=new L.LayerGroup;this._featureGroup.eachLayer((function(e){e.edited&&(t.addLayer(e),e.edited=!1)})),this._map.fire(L.Draw.Event.EDITED,{layers:t})},_backupLayer:function(t){var e=L.Util.stamp(t);this._uneditedLayerProps[e]||(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?this._uneditedLayerProps[e]={latlngs:L.LatLngUtil.cloneLatLngs(t.getLatLngs())}:t instanceof L.Circle?this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng()),radius:t.getRadius()}:(t instanceof L.Marker||t instanceof L.CircleMarker)&&(this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng())}))},_getTooltipText:function(){return{text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}},_updateTooltip:function(){this._tooltip.updateContent(this._getTooltipText())},_revertLayer:function(t){var e=L.Util.stamp(t);t.edited=!1,this._uneditedLayerProps.hasOwnProperty(e)&&(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?t.setLatLngs(this._uneditedLayerProps[e].latlngs):t instanceof L.Circle?(t.setLatLng(this._uneditedLayerProps[e].latlng),t.setRadius(this._uneditedLayerProps[e].radius)):(t instanceof L.Marker||t instanceof L.CircleMarker)&&t.setLatLng(this._uneditedLayerProps[e].latlng),t.fire("revert-edited",{layer:t}))},_enableLayerEdit:function(t){var e,n,i=t.layer||t.target||t;this._backupLayer(i),this.options.poly&&(n=L.Util.extend({},this.options.poly),i.options.poly=n),this.options.selectedPathOptions&&((e=L.Util.extend({},this.options.selectedPathOptions)).maintainColor&&(e.color=i.options.color,e.fillColor=i.options.fillColor),i.options.original=L.extend({},i.options),i.options.editing=e),i instanceof L.Marker?(i.editing&&i.editing.enable(),i.dragging.enable(),i.on("dragend",this._onMarkerDragEnd).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onMarkerDragEnd,this).on("MSPointerUp",this._onMarkerDragEnd,this)):i.editing.enable()},_disableLayerEdit:function(t){var e=t.layer||t.target||t;e.edited=!1,e.editing&&e.editing.disable(),delete e.options.editing,delete e.options.original,this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e):(e.setStyle(e.options.previousOptions),delete e.options.previousOptions)),e instanceof L.Marker?(e.dragging.disable(),e.off("dragend",this._onMarkerDragEnd,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onMarkerDragEnd,this).off("MSPointerUp",this._onMarkerDragEnd,this)):e.editing.disable()},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_onMarkerDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_onTouchMove:function(t){var e=t.originalEvent.changedTouches[0],n=this._map.mouseEventToLayerPoint(e),i=this._map.layerPointToLatLng(n);t.target.setLatLng(i)},_hasAvailableLayers:function(){return 0!==this._featureGroup.getLayers().length}}),L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:"remove"},initialize:function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.Util.setOptions(this,e),this._deletableLayers=this.options.featureGroup,!(this._deletableLayers instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this.type=L.EditToolbar.Delete.TYPE;var n=L.version.split(".");1===parseInt(n[0],10)&&parseInt(n[1],10)>=2?L.EditToolbar.Delete.include(L.Evented.prototype):L.EditToolbar.Delete.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DELETESTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._deletableLayers.on("layeradd",this._enableLayerDelete,this).on("layerremove",this._disableLayerDelete,this))},disable:function(){this._enabled&&(this._deletableLayers.off("layeradd",this._enableLayerDelete,this).off("layerremove",this._disableLayerDelete,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DELETESTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(t.getContainer().focus(),this._deletableLayers.eachLayer(this._enableLayerDelete,this),this._deletedLayers=new L.LayerGroup,this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.remove.tooltip.text}),this._map.on("mousemove",this._onMouseMove,this))},removeHooks:function(){this._map&&(this._deletableLayers.eachLayer(this._disableLayerDelete,this),this._deletedLayers=null,this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this))},revertLayers:function(){this._deletedLayers.eachLayer((function(t){this._deletableLayers.addLayer(t),t.fire("revert-deleted",{layer:t})}),this)},save:function(){this._map.fire(L.Draw.Event.DELETED,{layers:this._deletedLayers})},removeAllLayers:function(){this._deletableLayers.eachLayer((function(t){this._removeLayer({layer:t})}),this),this.save()},_enableLayerDelete:function(t){(t.layer||t.target||t).on("click",this._removeLayer,this)},_disableLayerDelete:function(t){var e=t.layer||t.target||t;e.off("click",this._removeLayer,this),this._deletedLayers.removeLayer(e)},_removeLayer:function(t){var e=t.layer||t.target||t;this._deletableLayers.removeLayer(e),this._deletedLayers.addLayer(e),e.fire("deleted")},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_hasAvailableLayers:function(){return 0!==this._deletableLayers.getLayers().length}})},290:function(t,e){!function(t){var e=L.GridLayer.extend({options:{minZoom:0,maxZoom:23,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",opacity:1,continuousWorld:!1,noWrap:!1,type:"roadmap",maxNativeZoom:21},initialize:function(t){L.GridLayer.prototype.initialize.call(this,t),this._ready=!!window.google&&!!window.google.maps&&!!window.google.maps.Map,this._GAPIPromise=this._ready?Promise.resolve(window.google):new Promise((function(t,e){var n=0,i=null;i=setInterval((function(){return n>=10?(clearInterval(i),e(new Error("window.google not found after 10 attempts"))):window.google&&window.google.maps&&window.google.maps.Map?(clearInterval(i),t(window.google)):void n++}),500)})),this._tileCallbacks={},this._freshTiles={},this._imagesPerTile="hybrid"===this.options.type?2:1},onAdd:function(t){L.GridLayer.prototype.onAdd.call(this,t),this._initMutantContainer(),this._GAPIPromise.then(function(){if(this._ready=!0,this._map=t,this._initMutant(),t.on("viewreset",this._reset,this),t.on("move",this._update,this),t.on("zoomend",this._handleZoomAnim,this),t.on("resize",this._resize,this),google.maps.event.addListenerOnce(this._mutant,"idle",function(){this._checkZoomLevels(),this._mutantIsReady=!0}.bind(this)),t._controlCorners.bottomright.style.marginBottom="20px",t._controlCorners.bottomleft.style.marginBottom="20px",this._reset(),this._update(),this._subLayers)for(var e in this._subLayers)this._subLayers[e].setMap(this._mutant)}.bind(this))},onRemove:function(t){L.GridLayer.prototype.onRemove.call(this,t),t._container.removeChild(this._mutantContainer),this._mutantContainer=void 0,google.maps.event.clearListeners(t,"idle"),google.maps.event.clearListeners(this._mutant,"idle"),t.off("viewreset",this._reset,this),t.off("move",this._update,this),t.off("zoomend",this._handleZoomAnim,this),t.off("resize",this._resize,this),t._controlCorners&&(t._controlCorners.bottomright.style.marginBottom="0em",t._controlCorners.bottomleft.style.marginBottom="0em")},getAttribution:function(){return this.options.attribution},setOpacity:function(t){this.options.opacity=t,t<1&&L.DomUtil.setOpacity(this._mutantContainer,t)},setElementSize:function(t,e){t.style.width=e.x+"px",t.style.height=e.y+"px"},addGoogleLayer:function(t,e){return this._subLayers||(this._subLayers={}),this._GAPIPromise.then(function(){var n=new(0,google.maps[t])(e);return n.setMap(this._mutant),this._subLayers[t]=n,n}.bind(this))},removeGoogleLayer:function(t){var e=this._subLayers&&this._subLayers[t];e&&(e.setMap(null),delete this._subLayers[t])},_initMutantContainer:function(){this._mutantContainer||(this._mutantContainer=L.DomUtil.create("div","leaflet-google-mutant leaflet-top leaflet-left"),this._mutantContainer.id="_MutantContainer_"+L.Util.stamp(this._mutantContainer),this._mutantContainer.style.zIndex="800",this._mutantContainer.style.pointerEvents="none",this._map.getContainer().appendChild(this._mutantContainer)),this.setOpacity(this.options.opacity),this.setElementSize(this._mutantContainer,this._map.getSize()),this._attachObserver(this._mutantContainer)},_initMutant:function(){if(this._ready&&this._mutantContainer){this._mutantCenter=new google.maps.LatLng(0,0);var t=new google.maps.Map(this._mutantContainer,{center:this._mutantCenter,zoom:0,tilt:0,mapTypeId:this.options.type,disableDefaultUI:!0,keyboardShortcuts:!1,draggable:!1,disableDoubleClickZoom:!0,scrollwheel:!1,streetViewControl:!1,styles:this.options.styles||{},backgroundColor:"transparent"});this._mutant=t,google.maps.event.addListenerOnce(t,"idle",function(){for(var t=this._mutantContainer.querySelectorAll("a"),e=0;e<t.length;e++)t[e].style.pointerEvents="auto"}.bind(this)),this.fire("spawned",{mapObject:t})}},_attachObserver:function(t){new MutationObserver(this._onMutations.bind(this)).observe(t,{childList:!0,subtree:!0})},_onMutations:function(t){for(var e=0;e<t.length;++e)for(var n=t[e],i=0;i<n.addedNodes.length;++i){var o=n.addedNodes[i];o instanceof HTMLImageElement?this._onMutatedImage(o):o instanceof HTMLElement&&Array.prototype.forEach.call(o.querySelectorAll("img"),this._onMutatedImage.bind(this))}},_roadRegexp:/!1i(\d+)!2i(\d+)!3i(\d+)!/,_satRegexp:/x=(\d+)&y=(\d+)&z=(\d+)/,_staticRegExp:/StaticMapService\.GetMapImage/,_onMutatedImage:function(t){var e,n=t.src.match(this._roadRegexp),i=0;if(n?(e={z:n[1],x:n[2],y:n[3]},this._imagesPerTile>1&&(t.style.zIndex=1,i=1)):((n=t.src.match(this._satRegexp))&&(e={x:n[1],y:n[2],z:n[3]}),i=0),e){var o=this._tileCoordsToKey(e);t.style.position="absolute",t.style.visibility="hidden";var r=o+"/"+i;if(this._freshTiles[r]=t,r in this._tileCallbacks&&this._tileCallbacks[r])this._tileCallbacks[r].pop()(t),this._tileCallbacks[r].length||delete this._tileCallbacks[r];else if(this._tiles[o]){var a=this._tiles[o].el,s=0===i?a.firstChild:a.firstChild.nextSibling,l=this._clone(t);a.replaceChild(l,s)}}else t.src.match(this._staticRegExp)&&(t.style.visibility="hidden")},createTile:function(t,e){var n=this._tileCoordsToKey(t),i=L.DomUtil.create("div");i.dataset.pending=this._imagesPerTile,e=e.bind(this,null,i);for(var o=0;o<this._imagesPerTile;o++){var r=n+"/"+o;if(r in this._freshTiles){var a=this._freshTiles[r];i.appendChild(this._clone(a)),i.dataset.pending--}else this._tileCallbacks[r]=this._tileCallbacks[r]||[],this._tileCallbacks[r].push(function(t){return function(n){t.appendChild(this._clone(n)),t.dataset.pending--,parseInt(t.dataset.pending)||e()}.bind(this)}.bind(this)(i))}return parseInt(i.dataset.pending)||L.Util.requestAnimFrame(e),i},_clone:function(t){var e=t.cloneNode(!0);return e.style.visibility="visible",e},_checkZoomLevels:function(){var t=this._map.getZoom(),e=this._mutant.getZoom();t&&e&&(e!==t||e>this.options.maxNativeZoom)&&this._setMaxNativeZoom(e)},_setMaxNativeZoom:function(t){t!=this.options.maxNativeZoom&&(this.options.maxNativeZoom=t,this._resetView())},_reset:function(){this._initContainer()},_update:function(){if(this._mutant){var t=this._map.getCenter(),e=new google.maps.LatLng(t.lat,t.lng);this._mutant.setCenter(e);var n=this._map.getZoom(),i=n!==Math.round(n),o=this._mutant.getZoom();i||n==o||(this._mutant.setZoom(n),this._mutantIsReady&&this._checkZoomLevels())}L.GridLayer.prototype._update.call(this)},_resize:function(){var t=this._map.getSize();this._mutantContainer.style.width===t.x&&this._mutantContainer.style.height===t.y||(this.setElementSize(this._mutantContainer,t),this._mutant&&google.maps.event.trigger(this._mutant,"resize"))},_handleZoomAnim:function(){if(this._mutant){var t=this._map.getCenter(),e=new google.maps.LatLng(t.lat,t.lng);this._mutant.setCenter(e),this._mutant.setZoom(Math.round(this._map.getZoom()))}},_removeTile:function(t){if(this._mutant)return setTimeout(this._pruneTile.bind(this,t),1e3),L.GridLayer.prototype._removeTile.call(this,t)},_pruneTile:function(t){for(var e=this._mutant.getZoom(),n=t.split(":")[2],i=this._mutant.getBounds(),o=i.getSouthWest(),r=i.getNorthEast(),a=L.latLngBounds([[o.lat(),o.lng()],[r.lat(),r.lng()]]),s=0;s<this._imagesPerTile;s++){var l=t+"/"+s;if(l in this._freshTiles){var h=this._map&&this._keyToBounds(t);this._map&&h.overlaps(a)&&n==e||delete this._freshTiles[l]}}}});t.GoogleMutant=e}(e)},298:function(t,e){!function(t){var e=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnEveryZoom:!1,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyShapePositions:null,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var e=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,e?this._withAnimation:this._noAnimation),this._markerCluster=e?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(t){if(t instanceof L.LayerGroup)return this.addLayers([t]);if(!t.getLatLng)return this._nonPointGroup.addLayer(t),this.fire("layeradd",{layer:t}),this;if(!this._map)return this._needsClustering.push(t),this.fire("layeradd",{layer:t}),this;if(this.hasLayer(t))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(t,this._maxZoom),this.fire("layeradd",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var e=t,n=this._zoom;if(t.__parent)for(;e.__parent._zoom>=n;)e=e.__parent;return this._currentShownBounds.contains(e.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(t,e):this._animationAddLayerNonAnimated(t,e)),this},removeLayer:function(t){return t instanceof L.LayerGroup?this.removeLayers([t]):t.getLatLng?this._map?t.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(t)),this._removeLayer(t,!0),this.fire("layerremove",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),t.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(t)&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,t)&&this.hasLayer(t)&&this._needsRemoving.push({layer:t,latlng:t._latlng}),this.fire("layerremove",{layer:t}),this):(this._nonPointGroup.removeLayer(t),this.fire("layerremove",{layer:t}),this)},addLayers:function(t,e){if(!L.Util.isArray(t))return this.addLayer(t);var n,i=this._featureGroup,o=this._nonPointGroup,r=this.options.chunkedLoading,a=this.options.chunkInterval,s=this.options.chunkProgress,l=t.length,h=0,u=!0;if(this._map){var c=(new Date).getTime(),p=L.bind((function(){var d=(new Date).getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();h<l&&!(r&&h%200==0&&(new Date).getTime()-d>a);h++)if((n=t[h])instanceof L.LayerGroup)u&&(t=t.slice(),u=!1),this._extractNonGroupLayers(n,t),l=t.length;else if(n.getLatLng){if(!this.hasLayer(n)&&(this._addLayer(n,this._maxZoom),e||this.fire("layeradd",{layer:n}),n.__parent&&2===n.__parent.getChildCount())){var f=n.__parent.getAllChildMarkers(),_=f[0]===n?f[1]:f[0];i.removeLayer(_)}}else o.addLayer(n),e||this.fire("layeradd",{layer:n});s&&s(h,l,(new Date).getTime()-c),h===l?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(p,this.options.chunkDelay)}),this);p()}else for(var d=this._needsClustering;h<l;h++)(n=t[h])instanceof L.LayerGroup?(u&&(t=t.slice(),u=!1),this._extractNonGroupLayers(n,t),l=t.length):n.getLatLng?this.hasLayer(n)||d.push(n):o.addLayer(n);return this},removeLayers:function(t){var e,n,i=t.length,o=this._featureGroup,r=this._nonPointGroup,a=!0;if(!this._map){for(e=0;e<i;e++)(n=t[e])instanceof L.LayerGroup?(a&&(t=t.slice(),a=!1),this._extractNonGroupLayers(n,t),i=t.length):(this._arraySplice(this._needsClustering,n),r.removeLayer(n),this.hasLayer(n)&&this._needsRemoving.push({layer:n,latlng:n._latlng}),this.fire("layerremove",{layer:n}));return this}if(this._unspiderfy){this._unspiderfy();var s=t.slice(),l=i;for(e=0;e<l;e++)(n=s[e])instanceof L.LayerGroup?(this._extractNonGroupLayers(n,s),l=s.length):this._unspiderfyLayer(n)}for(e=0;e<i;e++)(n=t[e])instanceof L.LayerGroup?(a&&(t=t.slice(),a=!1),this._extractNonGroupLayers(n,t),i=t.length):n.__parent?(this._removeLayer(n,!0,!0),this.fire("layerremove",{layer:n}),o.hasLayer(n)&&(o.removeLayer(n),n.clusterShow&&n.clusterShow())):(r.removeLayer(n),this.fire("layerremove",{layer:n}));return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer((function(t){t.off(this._childMarkerEventHandlers,this),delete t.__parent}),this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var t=new L.LatLngBounds;this._topClusterLevel&&t.extend(this._topClusterLevel._bounds);for(var e=this._needsClustering.length-1;e>=0;e--)t.extend(this._needsClustering[e].getLatLng());return t.extend(this._nonPointGroup.getBounds()),t},eachLayer:function(t,e){var n,i,o,r=this._needsClustering.slice(),a=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(r),i=r.length-1;i>=0;i--){for(n=!0,o=a.length-1;o>=0;o--)if(a[o].layer===r[i]){n=!1;break}n&&t.call(e,r[i])}this._nonPointGroup.eachLayer(t,e)},getLayers:function(){var t=[];return this.eachLayer((function(e){t.push(e)})),t},getLayer:function(t){var e=null;return t=parseInt(t,10),this.eachLayer((function(n){L.stamp(n)===t&&(e=n)})),e},hasLayer:function(t){if(!t)return!1;var e,n=this._needsClustering;for(e=n.length-1;e>=0;e--)if(n[e]===t)return!0;for(e=(n=this._needsRemoving).length-1;e>=0;e--)if(n[e].layer===t)return!1;return!(!t.__parent||t.__parent._group!==this)||this._nonPointGroup.hasLayer(t)},zoomToShowLayer:function(t,e){var n=this._map;"function"!=typeof e&&(e=function(){});var i=function(){!n.hasLayer(t)&&!n.hasLayer(t.__parent)||this._inZoomAnimation||(this._map.off("moveend",i,this),this.off("animationend",i,this),n.hasLayer(t)?e():t.__parent._icon&&(this.once("spiderfied",e,this),t.__parent.spiderfy()))};t._icon&&this._map.getBounds().contains(t.getLatLng())?e():t.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",i,this),this._map.panTo(t.getLatLng())):(this._map.on("moveend",i,this),this.on("animationend",i,this),t.__parent.zoomToBounds())},onAdd:function(t){var e,n,i;if(this._map=t,!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(t),this._nonPointGroup.addTo(t),this._gridClusters||this._generateInitialClusters(),this._maxLat=t.options.crs.projection.MAX_LATITUDE,e=0,n=this._needsRemoving.length;e<n;e++)(i=this._needsRemoving[e]).newlatlng=i.layer._latlng,i.layer._latlng=i.latlng;for(e=0,n=this._needsRemoving.length;e<n;e++)i=this._needsRemoving[e],this._removeLayer(i.layer,!0),i.layer._latlng=i.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),n=this._needsClustering,this._needsClustering=[],this.addLayers(n,!0)},onRemove:function(t){t.off("zoomend",this._zoomEnd,this),t.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(t){for(var e=t;e&&!e._icon;)e=e.__parent;return e||null},_arraySplice:function(t,e){for(var n=t.length-1;n>=0;n--)if(t[n]===e)return t.splice(n,1),!0},_removeFromGridUnclustered:function(t,e){for(var n=this._map,i=this._gridUnclustered,o=Math.floor(this._map.getMinZoom());e>=o&&i[e].removeObject(t,n.project(t.getLatLng(),e));e--);},_childMarkerDragStart:function(t){t.target.__dragStart=t.target._latlng},_childMarkerMoved:function(t){if(!this._ignoreMove&&!t.target.__dragStart){var e=t.target._popup&&t.target._popup.isOpen();this._moveChild(t.target,t.oldLatLng,t.latlng),e&&t.target.openPopup()}},_moveChild:function(t,e,n){t._latlng=e,this.removeLayer(t),t._latlng=n,this.addLayer(t)},_childMarkerDragEnd:function(t){var e=t.target.__dragStart;delete t.target.__dragStart,e&&this._moveChild(t.target,e,t.target._latlng)},_removeLayer:function(t,e,n){var i=this._gridClusters,o=this._gridUnclustered,r=this._featureGroup,a=this._map,s=Math.floor(this._map.getMinZoom());e&&this._removeFromGridUnclustered(t,this._maxZoom);var l,h=t.__parent,u=h._markers;for(this._arraySplice(u,t);h&&(h._childCount--,h._boundsNeedUpdate=!0,!(h._zoom<s));)e&&h._childCount<=1?(l=h._markers[0]===t?h._markers[1]:h._markers[0],i[h._zoom].removeObject(h,a.project(h._cLatLng,h._zoom)),o[h._zoom].addObject(l,a.project(l.getLatLng(),h._zoom)),this._arraySplice(h.__parent._childClusters,h),h.__parent._markers.push(l),l.__parent=h.__parent,h._icon&&(r.removeLayer(h),n||r.addLayer(l))):h._iconNeedsUpdate=!0,h=h.__parent;delete t.__parent},_isOrIsParent:function(t,e){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},fire:function(t,e,n){if(e&&e.layer instanceof L.MarkerCluster){if(e.originalEvent&&this._isOrIsParent(e.layer._icon,e.originalEvent.relatedTarget))return;t="cluster"+t}L.FeatureGroup.prototype.fire.call(this,t,e,n)},listens:function(t,e){return L.FeatureGroup.prototype.listens.call(this,t,e)||L.FeatureGroup.prototype.listens.call(this,"cluster"+t,e)},_defaultIconCreateFunction:function(t){var e=t.getChildCount(),n=" marker-cluster-";return n+=e<10?"small":e<100?"medium":"large",new L.DivIcon({html:"<div><span>"+e+"</span></div>",className:"marker-cluster"+n,iconSize:new L.Point(40,40)})},_bindEvents:function(){var t=this._map,e=this.options.spiderfyOnMaxZoom,n=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,o=this.options.spiderfyOnEveryZoom;(e||i||o)&&this.on("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),n&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),t.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(t){var e=t.layer,n=e;if("clusterkeypress"!==t.type||!t.originalEvent||13===t.originalEvent.keyCode){for(;1===n._childClusters.length;)n=n._childClusters[0];n._zoom===this._maxZoom&&n._childCount===e._childCount&&this.options.spiderfyOnMaxZoom?e.spiderfy():this.options.zoomToBoundsOnClick&&e.zoomToBounds(),this.options.spiderfyOnEveryZoom&&e.spiderfy(),t.originalEvent&&13===t.originalEvent.keyCode&&this._map._container.focus()}},_showCoverage:function(t){var e=this._map;this._inZoomAnimation||(this._shownPolygon&&e.removeLayer(this._shownPolygon),t.layer.getChildCount()>2&&t.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(t.layer.getConvexHull(),this.options.polygonOptions),e.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick,i=this.options.spiderfyOnEveryZoom,o=this._map;(t||n||i)&&this.off("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),e&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),o.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var t=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),t),this._currentShownBounds=t}},_generateInitialClusters:function(){var t=Math.ceil(this._map.getMaxZoom()),e=Math.floor(this._map.getMinZoom()),n=this.options.maxClusterRadius,i=n;"function"!=typeof n&&(i=function(){return n}),null!==this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(var o=t;o>=e;o--)this._gridClusters[o]=new L.DistanceGrid(i(o)),this._gridUnclustered[o]=new L.DistanceGrid(i(o));this._topClusterLevel=new this._markerCluster(this,e-1)},_addLayer:function(t,e){var n,i,o=this._gridClusters,r=this._gridUnclustered,a=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(t),t.on(this._childMarkerEventHandlers,this);e>=a;e--){n=this._map.project(t.getLatLng(),e);var s=o[e].getNearObject(n);if(s)return s._addChild(t),void(t.__parent=s);if(s=r[e].getNearObject(n)){var l=s.__parent;l&&this._removeLayer(s,!1);var h=new this._markerCluster(this,e,s,t);o[e].addObject(h,this._map.project(h._cLatLng,e)),s.__parent=h,t.__parent=h;var u=h;for(i=e-1;i>l._zoom;i--)u=new this._markerCluster(this,i,u),o[i].addObject(u,this._map.project(s.getLatLng(),i));return l._addChild(u),void this._removeFromGridUnclustered(s,e)}r[e].addObject(t,n)}this._topClusterLevel._addChild(t),t.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer((function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()}))},_enqueue:function(t){this._queue.push(t),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var t=0;t<this._queue.length;t++)this._queue[t].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var t=Math.round(this._map._zoom);this._processQueue(),this._zoom<t&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,t)):this._zoom>t?(this._animationStart(),this._animationZoomOut(this._zoom,t)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(t){var e=this._maxLat;return void 0!==e&&(t.getNorth()>=e&&(t._northEast.lat=1/0),t.getSouth()<=-e&&(t._southWest.lat=-1/0)),t},_animationAddLayerNonAnimated:function(t,e){if(e===t)this._featureGroup.addLayer(t);else if(2===e._childCount){e._addToMap();var n=e.getAllChildMarkers();this._featureGroup.removeLayer(n[0]),this._featureGroup.removeLayer(n[1])}else e._updateIcon()},_extractNonGroupLayers:function(t,e){var n,i=t.getLayers(),o=0;for(e=e||[];o<i.length;o++)(n=i[o])instanceof L.LayerGroup?this._extractNonGroupLayers(n,e):e.push(n);return e},_overrideMarkerIcon:function(t){return t.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[t]}})}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(t,e){this._animationAddLayerNonAnimated(t,e)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(t,e){var n,i=this._getExpandedVisibleBounds(),o=this._featureGroup,r=Math.floor(this._map.getMinZoom());this._ignoreMove=!0,this._topClusterLevel._recursively(i,t,r,(function(r){var a,s=r._latlng,l=r._markers;for(i.contains(s)||(s=null),r._isSingleParent()&&t+1===e?(o.removeLayer(r),r._recursivelyAddChildrenToMap(null,e,i)):(r.clusterHide(),r._recursivelyAddChildrenToMap(s,e,i)),n=l.length-1;n>=0;n--)a=l[n],i.contains(a._latlng)||o.removeLayer(a)})),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(i,e),o.eachLayer((function(t){t instanceof L.MarkerCluster||!t._icon||t.clusterShow()})),this._topClusterLevel._recursively(i,t,e,(function(t){t._recursivelyRestoreChildPositions(e)})),this._ignoreMove=!1,this._enqueue((function(){this._topClusterLevel._recursively(i,t,r,(function(t){o.removeLayer(t),t.clusterShow()})),this._animationEnd()}))},_animationZoomOut:function(t,e){this._animationZoomOutSingle(this._topClusterLevel,t-1,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t,this._getExpandedVisibleBounds())},_animationAddLayer:function(t,e){var n=this,i=this._featureGroup;i.addLayer(t),e!==t&&(e._childCount>2?(e._updateIcon(),this._forceLayout(),this._animationStart(),t._setPos(this._map.latLngToLayerPoint(e.getLatLng())),t.clusterHide(),this._enqueue((function(){i.removeLayer(t),t.clusterShow(),n._animationEnd()}))):(this._forceLayout(),n._animationStart(),n._animationZoomOutSingle(e,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(t,e,n){var i=this._getExpandedVisibleBounds(),o=Math.floor(this._map.getMinZoom());t._recursivelyAnimateChildrenInAndAddSelfToMap(i,o,e+1,n);var r=this;this._forceLayout(),t._recursivelyBecomeVisible(i,n),this._enqueue((function(){if(1===t._childCount){var a=t._markers[0];this._ignoreMove=!0,a.setLatLng(a.getLatLng()),this._ignoreMove=!1,a.clusterShow&&a.clusterShow()}else t._recursively(i,n,o,(function(t){t._recursivelyRemoveChildrenFromMap(i,o,e+1)}));r._animationEnd()}))},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(t){return new L.MarkerClusterGroup(t)};var n=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(t,e,n,i){L.Marker.prototype.initialize.call(this,n?n._cLatLng||n.getLatLng():new L.LatLng(0,0),{icon:this,pane:t.options.clusterPane}),this._group=t,this._zoom=e,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,n&&this._addChild(n),i&&this._addChild(i)},getAllChildMarkers:function(t,e){t=t||[];for(var n=this._childClusters.length-1;n>=0;n--)this._childClusters[n].getAllChildMarkers(t,e);for(var i=this._markers.length-1;i>=0;i--)e&&this._markers[i].__dragStart||t.push(this._markers[i]);return t},getChildCount:function(){return this._childCount},zoomToBounds:function(t){for(var e,n=this._childClusters.slice(),i=this._group._map,o=i.getBoundsZoom(this._bounds),r=this._zoom+1,a=i.getZoom();n.length>0&&o>r;){r++;var s=[];for(e=0;e<n.length;e++)s=s.concat(n[e]._childClusters);n=s}o>r?this._group._map.setView(this._latlng,r):o<=a?this._group._map.setView(this._latlng,a+1):this._group._map.fitBounds(this._bounds,t)},getBounds:function(){var t=new L.LatLngBounds;return t.extend(this._bounds),t},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(t,e){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(t),t instanceof L.MarkerCluster?(e||(this._childClusters.push(t),t.__parent=this),this._childCount+=t._childCount):(e||this._markers.push(t),this._childCount++),this.__parent&&this.__parent._addChild(t,!0)},_setClusterCenter:function(t){this._cLatLng||(this._cLatLng=t._cLatLng||t._latlng)},_resetBounds:function(){var t=this._bounds;t._southWest&&(t._southWest.lat=1/0,t._southWest.lng=1/0),t._northEast&&(t._northEast.lat=-1/0,t._northEast.lng=-1/0)},_recalculateBounds:function(){var t,e,n,i,o=this._markers,r=this._childClusters,a=0,s=0,l=this._childCount;if(0!==l){for(this._resetBounds(),t=0;t<o.length;t++)n=o[t]._latlng,this._bounds.extend(n),a+=n.lat,s+=n.lng;for(t=0;t<r.length;t++)(e=r[t])._boundsNeedUpdate&&e._recalculateBounds(),this._bounds.extend(e._bounds),n=e._wLatLng,i=e._childCount,a+=n.lat*i,s+=n.lng*i;this._latlng=this._wLatLng=new L.LatLng(a/l,s/l),this._boundsNeedUpdate=!1}},_addToMap:function(t){t&&(this._backupLatlng=this._latlng,this.setLatLng(t)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(t,e,n){this._recursively(t,this._group._map.getMinZoom(),n-1,(function(t){var n,i,o=t._markers;for(n=o.length-1;n>=0;n--)(i=o[n])._icon&&(i._setPos(e),i.clusterHide())}),(function(t){var n,i,o=t._childClusters;for(n=o.length-1;n>=0;n--)(i=o[n])._icon&&(i._setPos(e),i.clusterHide())}))},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,e,n,i){this._recursively(t,i,e,(function(o){o._recursivelyAnimateChildrenIn(t,o._group._map.latLngToLayerPoint(o.getLatLng()).round(),n),o._isSingleParent()&&n-1===i?(o.clusterShow(),o._recursivelyRemoveChildrenFromMap(t,e,n)):o.clusterHide(),o._addToMap()}))},_recursivelyBecomeVisible:function(t,e){this._recursively(t,this._group._map.getMinZoom(),e,null,(function(t){t.clusterShow()}))},_recursivelyAddChildrenToMap:function(t,e,n){this._recursively(n,this._group._map.getMinZoom()-1,e,(function(i){if(e!==i._zoom)for(var o=i._markers.length-1;o>=0;o--){var r=i._markers[o];n.contains(r._latlng)&&(t&&(r._backupLatlng=r.getLatLng(),r.setLatLng(t),r.clusterHide&&r.clusterHide()),i._group._featureGroup.addLayer(r))}}),(function(e){e._addToMap(t)}))},_recursivelyRestoreChildPositions:function(t){for(var e=this._markers.length-1;e>=0;e--){var n=this._markers[e];n._backupLatlng&&(n.setLatLng(n._backupLatlng),delete n._backupLatlng)}if(t-1===this._zoom)for(var i=this._childClusters.length-1;i>=0;i--)this._childClusters[i]._restorePosition();else for(var o=this._childClusters.length-1;o>=0;o--)this._childClusters[o]._recursivelyRestoreChildPositions(t)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(t,e,n,i){var o,r;this._recursively(t,e-1,n-1,(function(t){for(r=t._markers.length-1;r>=0;r--)o=t._markers[r],i&&i.contains(o._latlng)||(t._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())}),(function(t){for(r=t._childClusters.length-1;r>=0;r--)o=t._childClusters[r],i&&i.contains(o._latlng)||(t._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())}))},_recursively:function(t,e,n,i,o){var r,a,s=this._childClusters,l=this._zoom;if(e<=l&&(i&&i(this),o&&l===n&&o(this)),l<e||l<n)for(r=s.length-1;r>=0;r--)(a=s[r])._boundsNeedUpdate&&a._recalculateBounds(),t.intersects(a._bounds)&&a._recursively(t,e,n,i,o)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var t=this.options.opacity;return this.setOpacity(0),this.options.opacity=t,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(t,e){var n=this._getCoord(e.x),i=this._getCoord(e.y),o=this._grid,r=o[i]=o[i]||{},a=r[n]=r[n]||[],s=L.Util.stamp(t);this._objectPoint[s]=e,a.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var n,i,o=this._getCoord(e.x),r=this._getCoord(e.y),a=this._grid,s=a[r]=a[r]||{},l=s[o]=s[o]||[];for(delete this._objectPoint[L.Util.stamp(t)],n=0,i=l.length;n<i;n++)if(l[n]===t)return l.splice(n,1),1===i&&delete s[o],!0},eachObject:function(t,e){var n,i,o,r,a,s,l=this._grid;for(n in l)for(i in a=l[n])for(o=0,r=(s=a[i]).length;o<r;o++)t.call(e,s[o])&&(o--,r--)},getNearObject:function(t){var e,n,i,o,r,a,s,l,h=this._getCoord(t.x),u=this._getCoord(t.y),c=this._objectPoint,p=this._sqCellSize,d=null;for(e=u-1;e<=u+1;e++)if(o=this._grid[e])for(n=h-1;n<=h+1;n++)if(r=o[n])for(i=0,a=r.length;i<a;i++)s=r[i],((l=this._sqDist(c[L.Util.stamp(s)],t))<p||l<=p&&null===d)&&(p=l,d=s);return d},_getCoord:function(t){var e=Math.floor(t/this._cellSize);return isFinite(e)?e:t},_sqDist:function(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}},L.QuickHull={getDistant:function(t,e){var n=e[1].lat-e[0].lat;return(e[0].lng-e[1].lng)*(t.lat-e[0].lat)+n*(t.lng-e[0].lng)},findMostDistantPointFromBaseLine:function(t,e){var n,i,o,r=0,a=null,s=[];for(n=e.length-1;n>=0;n--)i=e[n],(o=this.getDistant(i,t))>0&&(s.push(i),o>r&&(r=o,a=i));return{maxPoint:a,newPoints:s}},buildConvexHull:function(t,e){var n=[],i=this.findMostDistantPointFromBaseLine(t,e);return i.maxPoint?n=(n=n.concat(this.buildConvexHull([t[0],i.maxPoint],i.newPoints))).concat(this.buildConvexHull([i.maxPoint,t[1]],i.newPoints)):[t[0]]},getConvexHull:function(t){var e,n=!1,i=!1,o=!1,r=!1,a=null,s=null,l=null,h=null,u=null,c=null;for(e=t.length-1;e>=0;e--){var p=t[e];(!1===n||p.lat>n)&&(a=p,n=p.lat),(!1===i||p.lat<i)&&(s=p,i=p.lat),(!1===o||p.lng>o)&&(l=p,o=p.lng),(!1===r||p.lng<r)&&(h=p,r=p.lng)}return i!==n?(c=s,u=a):(c=h,u=l),[].concat(this.buildConvexHull([c,u],t),this.buildConvexHull([u,c],t))}},L.MarkerCluster.include({getConvexHull:function(){var t,e,n=this.getAllChildMarkers(),i=[];for(e=n.length-1;e>=0;e--)t=n[e].getLatLng(),i.push(t);return L.QuickHull.getConvexHull(i)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var t,e=this.getAllChildMarkers(null,!0),n=this._group._map.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),this._group._spiderfied=this,this._group.options.spiderfyShapePositions?t=this._group.options.spiderfyShapePositions(e.length,n):e.length>=this._circleSpiralSwitchover?t=this._generatePointsSpiral(e.length,n):(n.y+=10,t=this._generatePointsCircle(e.length,n)),this._animationSpiderfy(e,t)}},unspiderfy:function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},_generatePointsCircle:function(t,e){var n,i,o=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t)/this._2PI,r=this._2PI/t,a=[];for(o=Math.max(o,35),a.length=t,n=0;n<t;n++)i=this._circleStartAngle+n*r,a[n]=new L.Point(e.x+o*Math.cos(i),e.y+o*Math.sin(i))._round();return a},_generatePointsSpiral:function(t,e){var n,i=this._group.options.spiderfyDistanceMultiplier,o=i*this._spiralLengthStart,r=i*this._spiralFootSeparation,a=i*this._spiralLengthFactor*this._2PI,s=0,l=[];for(l.length=t,n=t;n>=0;n--)n<t&&(l[n]=new L.Point(e.x+o*Math.cos(s),e.y+o*Math.sin(s))._round()),o+=a/(s+=r/o+5e-4*n);return l},_noanimationUnspiderfy:function(){var t,e,n=this._group,i=n._map,o=n._featureGroup,r=this.getAllChildMarkers(null,!0);for(n._ignoreMove=!0,this.setOpacity(1),e=r.length-1;e>=0;e--)t=r[e],o.removeLayer(t),t._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng),t.setZIndexOffset&&t.setZIndexOffset(0),t._spiderLeg&&(i.removeLayer(t._spiderLeg),delete t._spiderLeg);n.fire("unspiderfied",{cluster:this,markers:r}),n._ignoreMove=!1,n._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(t,e){var n,i,o,r,a=this._group,s=a._map,l=a._featureGroup,h=this._group.options.spiderLegPolylineOptions;for(a._ignoreMove=!0,n=0;n<t.length;n++)r=s.layerPointToLatLng(e[n]),i=t[n],o=new L.Polyline([this._latlng,r],h),s.addLayer(o),i._spiderLeg=o,i._preSpiderfyLatlng=i._latlng,i.setLatLng(r),i.setZIndexOffset&&i.setZIndexOffset(1e6),l.addLayer(i);this.setOpacity(.3),a._ignoreMove=!1,a.fire("spiderfied",{cluster:this,markers:t})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(t,e){var n,i,o,r,a,s,l=this,h=this._group,u=h._map,c=h._featureGroup,p=this._latlng,d=u.latLngToLayerPoint(p),f=L.Path.SVG,_=L.extend({},this._group.options.spiderLegPolylineOptions),m=_.opacity;for(void 0===m&&(m=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),f?(_.opacity=0,_.className=(_.className||"")+" leaflet-cluster-spider-leg"):_.opacity=m,h._ignoreMove=!0,n=0;n<t.length;n++)i=t[n],s=u.layerPointToLatLng(e[n]),o=new L.Polyline([p,s],_),u.addLayer(o),i._spiderLeg=o,f&&(a=(r=o._path).getTotalLength()+.1,r.style.strokeDasharray=a,r.style.strokeDashoffset=a),i.setZIndexOffset&&i.setZIndexOffset(1e6),i.clusterHide&&i.clusterHide(),c.addLayer(i),i._setPos&&i._setPos(d);for(h._forceLayout(),h._animationStart(),n=t.length-1;n>=0;n--)s=u.layerPointToLatLng(e[n]),(i=t[n])._preSpiderfyLatlng=i._latlng,i.setLatLng(s),i.clusterShow&&i.clusterShow(),f&&((r=(o=i._spiderLeg)._path).style.strokeDashoffset=0,o.setStyle({opacity:m}));this.setOpacity(.3),h._ignoreMove=!1,setTimeout((function(){h._animationEnd(),h.fire("spiderfied",{cluster:l,markers:t})}),200)},_animationUnspiderfy:function(t){var e,n,i,o,r,a,s=this,l=this._group,h=l._map,u=l._featureGroup,c=t?h._latLngToNewLayerPoint(this._latlng,t.zoom,t.center):h.latLngToLayerPoint(this._latlng),p=this.getAllChildMarkers(null,!0),d=L.Path.SVG;for(l._ignoreMove=!0,l._animationStart(),this.setOpacity(1),n=p.length-1;n>=0;n--)(e=p[n])._preSpiderfyLatlng&&(e.closePopup(),e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng,a=!0,e._setPos&&(e._setPos(c),a=!1),e.clusterHide&&(e.clusterHide(),a=!1),a&&u.removeLayer(e),d&&(r=(o=(i=e._spiderLeg)._path).getTotalLength()+.1,o.style.strokeDashoffset=r,i.setStyle({opacity:0})));l._ignoreMove=!1,setTimeout((function(){var t=0;for(n=p.length-1;n>=0;n--)(e=p[n])._spiderLeg&&t++;for(n=p.length-1;n>=0;n--)(e=p[n])._spiderLeg&&(e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),t>1&&u.removeLayer(e),h.removeLayer(e._spiderLeg),delete e._spiderLeg);l._animationEnd(),l.fire("unspiderfied",{cluster:s,markers:p})}),200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(t){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(t){t._spiderLeg&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),this._map.removeLayer(t._spiderLeg),delete t._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(t){return t?t instanceof L.MarkerClusterGroup?t=t._topClusterLevel.getAllChildMarkers():t instanceof L.LayerGroup?t=t._layers:t instanceof L.MarkerCluster?t=t.getAllChildMarkers():t instanceof L.Marker&&(t=[t]):t=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(t),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(t),this},_flagParentsIconsNeedUpdate:function(t){var e,n;for(e in t)for(n=t[e].__parent;n;)n._iconNeedsUpdate=!0,n=n.__parent},_refreshSingleMarkerModeMarkers:function(t){var e,n;for(e in t)n=t[e],this.hasLayer(n)&&n.setIcon(this._overrideMarkerIcon(n))}}),L.Marker.include({refreshIconOptions:function(t,e){var n=this.options.icon;return L.setOptions(n,t),this.setIcon(n),e&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),t.MarkerClusterGroup=e,t.MarkerCluster=n,Object.defineProperty(t,"__esModule",{value:!0})}(e)},62:function(t,e){
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@hpcc-js/common"),require("@hpcc-js/api"),require("@hpcc-js/layout"),require("@hpcc-js/util"),require("@hpcc-js/graph"),require("@hpcc-js/other")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common","@hpcc-js/api","@hpcc-js/layout","@hpcc-js/util","@hpcc-js/graph","@hpcc-js/other"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["@hpcc-js/map"]={},t["@hpcc-js/common"],t["@hpcc-js/api"],t["@hpcc-js/layout"],t["@hpcc-js/util"],t["@hpcc-js/graph"],t["@hpcc-js/other"])}(this,(function(t,e,n,i,o,r,a){"use strict";function s(t,e){return e.forEach((function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach((function(n){if("default"!==n&&!(n in t)){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}}))})),Object.freeze(t)}var l=function(t,e){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},l(t,e)};function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var u=function(){return u=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},u.apply(this,arguments)};function c(t,e,n){if(n||2===arguments.length)for(var i,o=0,r=e.length;o<r;o++)!i&&o in e||(i||(i=Array.prototype.slice.call(e,0,o)),i[o]=e[o]);return t.concat(i||Array.prototype.slice.call(e))}function p(t,e,n,i){if(isNaN(e)||isNaN(n))return t;var o,r,a,s,l,h,u,c,p,d=t._root,f={data:i},_=t._x0,m=t._y0,g=t._x1,y=t._y1;if(!d)return t._root=f,t;for(;d.length;)if((h=e>=(r=(_+g)/2))?_=r:g=r,(u=n>=(a=(m+y)/2))?m=a:y=a,o=d,!(d=d[c=u<<1|h]))return o[c]=f,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&n===l)return f.next=d,o?o[c]=f:t._root=f,t;do{o=o?o[c]=new Array(4):t._root=new Array(4),(h=e>=(r=(_+g)/2))?_=r:g=r,(u=n>=(a=(m+y)/2))?m=a:y=a}while((c=u<<1|h)==(p=(l>=a)<<1|s>=r));return o[p]=d,o[c]=f,t}function d(t,e,n,i,o){this.node=t,this.x0=e,this.y0=n,this.x1=i,this.y1=o}function f(t){return t[0]}function _(t){return t[1]}function m(t,e,n){var i=new g(null==e?f:e,null==n?_:n,NaN,NaN,NaN,NaN);return null==t?i:i.addAll(t)}function g(t,e,n,i,o,r){this._x=t,this._y=e,this._x0=n,this._y0=i,this._x1=o,this._y1=r,this._root=void 0}function y(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var v=m.prototype=g.prototype;v.copy=function(){var t,e,n=new g(this._x,this._y,this._x0,this._y0,this._x1,this._y1),i=this._root;if(!i)return n;if(!i.length)return n._root=y(i),n;for(t=[{source:i,target:n._root=new Array(4)}];i=t.pop();)for(var o=0;o<4;++o)(e=i.source[o])&&(e.length?t.push({source:e,target:i.target[o]=new Array(4)}):i.target[o]=y(e));return n},v.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return p(this.cover(e,n),e,n,t)},v.addAll=function(t){var e,n,i,o,r=t.length,a=new Array(r),s=new Array(r),l=1/0,h=1/0,u=-1/0,c=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(a[n]=i,s[n]=o,i<l&&(l=i),i>u&&(u=i),o<h&&(h=o),o>c&&(c=o));if(l>u||h>c)return this;for(this.cover(l,h).cover(u,c),n=0;n<r;++n)p(this,a[n],s[n],t[n]);return this},v.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,i=this._y0,o=this._x1,r=this._y1;if(isNaN(n))o=(n=Math.floor(t))+1,r=(i=Math.floor(e))+1;else{for(var a,s,l=o-n,h=this._root;n>t||t>=o||i>e||e>=r;)switch(s=(e<i)<<1|t<n,(a=new Array(4))[s]=h,h=a,l*=2,s){case 0:o=n+l,r=i+l;break;case 1:n=o-l,r=i+l;break;case 2:o=n+l,i=r-l;break;case 3:n=o-l,i=r-l}this._root&&this._root.length&&(this._root=h)}return this._x0=n,this._y0=i,this._x1=o,this._y1=r,this},v.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},v.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},v.find=function(t,e,n){var i,o,r,a,s,l,h,u=this._x0,c=this._y0,p=this._x1,f=this._y1,_=[],m=this._root;for(m&&_.push(new d(m,u,c,p,f)),null==n?n=1/0:(u=t-n,c=e-n,p=t+n,f=e+n,n*=n);l=_.pop();)if(!(!(m=l.node)||(o=l.x0)>p||(r=l.y0)>f||(a=l.x1)<u||(s=l.y1)<c))if(m.length){var g=(o+a)/2,y=(r+s)/2;_.push(new d(m[3],g,y,a,s),new d(m[2],o,y,g,s),new d(m[1],g,r,a,y),new d(m[0],o,r,g,y)),(h=(e>=y)<<1|t>=g)&&(l=_[_.length-1],_[_.length-1]=_[_.length-1-h],_[_.length-1-h]=l)}else{var v=t-+this._x.call(null,m.data),b=e-+this._y.call(null,m.data),L=v*v+b*b;if(L<n){var w=Math.sqrt(n=L);u=t-w,c=e-w,p=t+w,f=e+w,i=m.data}}return i},v.remove=function(t){if(isNaN(r=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,i,o,r,a,s,l,h,u,c,p,d=this._root,f=this._x0,_=this._y0,m=this._x1,g=this._y1;if(!d)return this;if(d.length)for(;;){if((h=r>=(s=(f+m)/2))?f=s:m=s,(u=a>=(l=(_+g)/2))?_=l:g=l,e=d,!(d=d[c=u<<1|h]))return this;if(!d.length)break;(e[c+1&3]||e[c+2&3]||e[c+3&3])&&(n=e,p=c)}for(;d.data!==t;)if(i=d,!(d=d.next))return this;return(o=d.next)&&delete d.next,i?(o?i.next=o:delete i.next,this):e?(o?e[c]=o:delete e[c],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[p]=d:this._root=d),this):(this._root=o,this)},v.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},v.root=function(){return this._root},v.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},v.visit=function(t){var e,n,i,o,r,a,s=[],l=this._root;for(l&&s.push(new d(l,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(l=e.node,i=e.x0,o=e.y0,r=e.x1,a=e.y1)&&l.length){var h=(i+r)/2,u=(o+a)/2;(n=l[3])&&s.push(new d(n,h,u,r,a)),(n=l[2])&&s.push(new d(n,i,u,h,a)),(n=l[1])&&s.push(new d(n,h,o,r,u)),(n=l[0])&&s.push(new d(n,i,o,h,u))}return this},v.visitAfter=function(t){var e,n=[],i=[];for(this._root&&n.push(new d(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var o=e.node;if(o.length){var r,a=e.x0,s=e.y0,l=e.x1,h=e.y1,u=(a+l)/2,c=(s+h)/2;(r=o[0])&&n.push(new d(r,a,s,u,c)),(r=o[1])&&n.push(new d(r,u,s,l,c)),(r=o[2])&&n.push(new d(r,a,c,u,h)),(r=o[3])&&n.push(new d(r,u,c,l,h))}i.push(e)}for(;e=i.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},v.x=function(t){return arguments.length?(this._x=t,this):this._x},v.y=function(t){return arguments.length?(this._y=t,this):this._y};var b=function(){function t(t,e,n,i){this._pin_h=0,this._pin_w=0,this._pin_h=n,this._pin_w=i,this._tree=m().extent(t).addAll(e)}return t.prototype.searchRect=function(t,e,n,i){var o=[];return this._tree.visit((function(r,a,s,l,h){var u,c,p=!1;do{if(!r.length)if(r.data&&!r.data.already_flagged)(u={left:t,right:n,top:e,bottom:i},((c=r.data)[0]<u.right||c[0]>u.left)&&(c[1]<u.bottom||c[1]>u.top))&&(r.data.already_flagged=!0,o.push(r.data));p=r=r.next}while(p);return a>=n||s>=i||l<t||h<e})),o},t.prototype.getTreeRects=function(){var t=[];return this._tree.visit((function(e,n,i,o,r){t.push([n,i,o-n,r-i])})),t},t}(),w=function(t){function e(){var e=t.call(this)||this;return e._overlap_count=0,e._sub_overlap_count=0,e}return h(e,t),e.prototype.enter=function(e,n){t.prototype.enter.apply(this,arguments),this.resize(this._size)},e.prototype.update=function(e,n){t.prototype.update.apply(this,arguments),this._ctx=this.element().node().getContext("2d");var i=this.topLeftX_exists()&&this.topLeftY_exists()&&this.bottomRightX_exists()&&this.bottomRightY_exists(),o=(i?this.skewedData():this.data()).map((function(t){return c([],t,!0)})).map((function(t){return t.is_cluster=!1,t.already_flagged=!1,t.weight=t[2],t.fillStyle="#FFFFFF",t.strokeStyle="#000000",t.overlap_arr=[],t}));this._ctx.clearRect(0,0,this.width(),this.height()),this._drawData=this.enableClustering()?this.applyClustering(o):o,this.draw(this._drawData)},e.prototype.applyClustering=function(t){var e=this,n=this;this._overlap_count=0;var i=this.pinHeight(),o=this.pinWidth(),r=o/2,a=i/2,s=new b([[0,0],[this.size().width,this.size().height]],t,i,o);switch(this._quadtree_rect_arr=s.getTreeRects(),this.clusterMode()){case"default":var l=t.map((function(t){if(!t.already_flagged){var n=e.searchRectMult(),i=t[0]-r*n,o=t[1]-a*n-8,l=t[0]+r*n,h=t[1]+a*n-8;t.overlap_arr=s.searchRect(i,o,l,h).filter((function(e){return e!==t})),0===t.overlap_arr.length&&(t.already_flagged=!1)}return t}));return l.forEach((function(t){t.already_flagged&&t.overlap_arr.length&&l.push(M(c([t],t.overlap_arr,!0)))})),l;case"grid":for(var h=c([],t,!0),u=this.gridCellSize(),p=this.gridCellSize(),d=Math.ceil(this.size().width/u),f=Math.ceil(this.size().height/p),_=0;_<f;_++)for(var m=0;m<d;m++){var g=u*m,y=p*_,v=u*(m+1),L=p*(_+1),w=s.searchRect(g,y,v,L);if(w.length>1){var x=g+u/2,k=y+p/2;h.push(M(w,x,k))}}return h}return t;function M(t,e,i){var o=t.reduce((function(t,e){return e.already_flagged=!0,t+e[2]}),0);return{0:void 0!==e?e:n.useAveragePos()?t.reduce((function(t,e){return t+e[0]*e[2]}),0)/o:t[0][0],1:void 0!==i?i:n.useAveragePos()?t.reduce((function(t,e){return t+e[1]*e[2]}),0)/o:t[0][1],weight:t.reduce((function(t,e){return t+e[2]}),0),is_cluster:!0,already_flagged:!1,fillStyle:"#FFFFFF",strokeStyle:"#000000",overlap_arr:[]}}},e.prototype.drawQuadtree=function(){var t=this;this._quadtree_rect_arr&&(this._ctx.strokeStyle="#000000",this._quadtree_rect_arr.forEach((function(e){t._ctx.strokeRect(e[0],e[1],e[2],e[3])})))},e.prototype.draw=function(t){var e=this,n=this,i=this._ctx;this.showQuadtree()&&this.drawQuadtree();var o=this.arrowHeight(),r=this.arrowWidth(),a=this.pinHeight(),s=this.pinWidth(),l=this.radiusWeightMult(),h=0;function u(t,e){var n=t.left+t.width/2-t.arrow_width/2,o=t.left+t.width/2,r=t.left+t.width/2+t.arrow_width/2,a=t.top+t.height,s=a+t.arrow_height,l=a;e?(i.fillStyle="#FFFFFF",i.strokeStyle="#FFFFFF",a-=2,s-=2,l-=2):(i.fillStyle="#FFFFFF",i.strokeStyle="#000000"),i.beginPath(),i.moveTo(n,a),i.lineTo(o,s),i.lineTo(r,l),i.lineTo(n,a),i.closePath(),i.stroke(),i.fill(),e||u(t,!0)}function c(t){i.font="".concat(n.pinFontSize(),"px '").concat(n.pinFontFamily(),"'");var e=t.left+t.width/2,o=t.top+t.height/2;i.textAlign="center",i.textBaseline="middle",i.fillStyle="#000000";for(var r=0,a=i.measureText(t.icon).width;a>t.width||!n.shrinkFontToPin();)r++,i.font="".concat(n.pinFontSize()-r,"px '").concat(n.pinFontFamily(),"'"),a=i.measureText(t.icon).width;i.fillText(t.icon,e,o)}this.useWeightedRadius()&&t.filter((function(t){return t.is_cluster})).forEach((function(t){h<t.weight&&(h=t.weight)})),t.filter((function(t){return!t.already_flagged})).sort((function(t,e){return t[1]>e[1]?1:-1})).forEach((function(t){if(t.is_cluster||e.allCircles()){var n=s/2;e.useWeightedRadius()&&(n+=s*(l*t.weight/h)),(p={icon:t.weight,left:Math.floor(t[0]-n)+.5,top:Math.floor(t[1]-n-o)+.5,radius:n,arrow_height:o,arrow_width:r}).width=2*p.radius,p.height=p.width,i.fillStyle="#FFFFFF",i.strokeStyle="#000000",i.beginPath(),i.arc(p.left+p.width/2,p.top+p.height/2,p.radius,0,2*Math.PI),i.closePath(),i.fill(),i.stroke(),c(p)}else!function(t){i.fillStyle=t.fillStyle,i.strokeStyle="#000000",i.fillRect(t.left,t.top,t.width,t.height),i.strokeRect(t.left,t.top,t.width,t.height),u(t),c(t)}({fillStyle:t.fillStyle,strokeStyle:t.strokeStyle,icon:t.weight,left:Math.floor(t[0]-s/2)+.5,top:Math.floor(t[1]-a-o)+.5,width:s,height:a,arrow_height:o,arrow_width:r});var p}))},e.prototype.skewedData=function(){var t=this,e=[],n=this.data(),i=this.size(),o=this.bottomRightX()-this.topLeftX(),r=this.bottomRightY()-this.topLeftY(),a=o/i.width,s=r/i.height;return n.forEach((function(n){var i=Math.abs(n[0]-t.topLeftX()),o=Math.abs(n[1]-t.topLeftY()),r=i/a,l=o/s;e.push([r,l,n[2]])})),e},e}(e.CanvasWidget);function x(){return new k}function k(){this.reset()}w.prototype._class+=" map_CanvasPins",w.prototype.publish("clusterMode","default","set","clusterMode",["defualt","grid"],{tags:["Basic"],optional:!0}),w.prototype.publish("gridCellSize",80,"number","gridCellSize",null,{tags:["Basic"],optional:!0}),w.prototype.publish("allCircles",!1,"boolean","allCircles",null,{tags:["Basic"],optional:!0}),w.prototype.publish("showQuadtree",!1,"boolean","showQuadtree",null,{tags:["Basic"],optional:!0}),w.prototype.publish("useAveragePos",!1,"boolean","useAveragePos",null,{tags:["Basic"],optional:!0}),w.prototype.publish("shrinkFontToPin",!0,"boolean","shrinkFontToPin",null,{tags:["Basic"],optional:!0}),w.prototype.publish("enableClustering",!0,"boolean","enableClustering",null,{tags:["Basic"],optional:!0}),w.prototype.publish("useWeightedRadius",!1,"boolean","useWeightedRadius",null,{tags:["Basic"],optional:!0}),w.prototype.publish("radiusWeightMult",.5,"number","radiusWeightMult",null,{tags:["Basic"],optional:!0}),w.prototype.publish("searchRectMult",3,"number","searchRectMult",null,{tags:["Basic"],optional:!0}),w.prototype.publish("bottomRightX",null,"number","Bottom right x-value",null,{tags:["Basic"],optional:!0}),w.prototype.publish("bottomRightY",null,"number","Bottom right y-value",null,{tags:["Basic"],optional:!0}),w.prototype.publish("topLeftX",null,"number","Top left x-value",null,{tags:["Basic"],optional:!0}),w.prototype.publish("topLeftY",null,"number","Top left y-value",null,{tags:["Basic"],optional:!0}),w.prototype.publish("pinHeight",20,"number","pinHeight",null,{tags:["Basic"],optional:!0}),w.prototype.publish("pinWidth",20,"number","pinWidth",null,{tags:["Basic"],optional:!0}),w.prototype.publish("pinFontFamily","Arial","string","pinFontFamily",null,{tags:["Basic"],optional:!0}),w.prototype.publish("pinFontSize",14,"number","pinFontSize",null,{tags:["Basic"],optional:!0}),w.prototype.publish("arrowHeight",8,"number","arrowHeight",null,{tags:["Basic"],optional:!0}),w.prototype.publish("arrowWidth",8,"number","arrowWidth",null,{tags:["Basic"],optional:!0}),k.prototype={constructor:k,reset:function(){this.s=this.t=0},add:function(t){C(M,t,this.t),C(this,M.s,this.s),this.s?this.t+=M.t:this.s=M.t},valueOf:function(){return this.s}};var M=new k;function C(t,e,n){var i=t.s=e+n,o=i-e,r=i-o;t.t=e-r+(n-o)}var P=1e-6,E=1e-12,T=Math.PI,S=T/2,z=T/4,O=2*T,D=180/T,A=T/180,I=Math.abs,B=Math.atan,N=Math.atan2,Z=Math.cos,R=Math.ceil,j=Math.exp,G=Math.log,U=Math.pow,H=Math.sin,F=Math.sign||function(t){return t>0?1:t<0?-1:0},W=Math.sqrt,V=Math.tan;function q(t){return t>1?0:t<-1?T:Math.acos(t)}function Y(t){return t>1?S:t<-1?-S:Math.asin(t)}function K(t){return(t=H(t/2))*t}function X(){}function J(t,e){t&&$.hasOwnProperty(t.type)&&$[t.type](t,e)}var Q={Feature:function(t,e){J(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,o=n.length;++i<o;)J(n[i].geometry,e)}},$={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)t=n[i],e.point(t[0],t[1],t[2])},LineString:function(t,e){tt(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)tt(n[i],e,0)},Polygon:function(t,e){et(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)et(n[i],e)},GeometryCollection:function(t,e){for(var n=t.geometries,i=-1,o=n.length;++i<o;)J(n[i],e)}};function tt(t,e,n){var i,o=-1,r=t.length-n;for(e.lineStart();++o<r;)i=t[o],e.point(i[0],i[1],i[2]);e.lineEnd()}function et(t,e){var n=-1,i=t.length;for(e.polygonStart();++n<i;)tt(t[n],e,1);e.polygonEnd()}function nt(t,e){t&&Q.hasOwnProperty(t.type)?Q[t.type](t,e):J(t,e)}var it,ot,rt,at,st,lt=x(),ht=x(),ut={point:X,lineStart:X,lineEnd:X,polygonStart:function(){lt.reset(),ut.lineStart=ct,ut.lineEnd=pt},polygonEnd:function(){var t=+lt;ht.add(t<0?O+t:t),this.lineStart=this.lineEnd=this.point=X},sphere:function(){ht.add(O)}};function ct(){ut.point=dt}function pt(){ft(it,ot)}function dt(t,e){ut.point=ft,it=t,ot=e,rt=t*=A,at=Z(e=(e*=A)/2+z),st=H(e)}function ft(t,e){var n=(t*=A)-rt,i=n>=0?1:-1,o=i*n,r=Z(e=(e*=A)/2+z),a=H(e),s=st*a,l=at*r+s*Z(o),h=s*i*H(o);lt.add(N(h,l)),rt=t,at=r,st=a}function _t(t){return[N(t[1],t[0]),Y(t[2])]}function mt(t){var e=t[0],n=t[1],i=Z(n);return[i*Z(e),i*H(e),H(n)]}function gt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function yt(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function vt(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function bt(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Lt(t){var e=W(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var wt,xt,kt,Mt,Ct,Pt,Et,Tt,St,zt,Ot,Dt,At,It,Bt,Nt,Zt,Rt,jt,Gt,Ut,Ht,Ft,Wt,Vt,qt,Yt=x(),Kt={point:Xt,lineStart:Qt,lineEnd:$t,polygonStart:function(){Kt.point=te,Kt.lineStart=ee,Kt.lineEnd=ne,Yt.reset(),ut.polygonStart()},polygonEnd:function(){ut.polygonEnd(),Kt.point=Xt,Kt.lineStart=Qt,Kt.lineEnd=$t,lt<0?(wt=-(kt=180),xt=-(Mt=90)):Yt>P?Mt=90:Yt<-P&&(xt=-90),zt[0]=wt,zt[1]=kt},sphere:function(){wt=-(kt=180),xt=-(Mt=90)}};function Xt(t,e){St.push(zt=[wt=t,kt=t]),e<xt&&(xt=e),e>Mt&&(Mt=e)}function Jt(t,e){var n=mt([t*A,e*A]);if(Tt){var i=yt(Tt,n),o=yt([i[1],-i[0],0],i);Lt(o),o=_t(o);var r,a=t-Ct,s=a>0?1:-1,l=o[0]*D*s,h=I(a)>180;h^(s*Ct<l&&l<s*t)?(r=o[1]*D)>Mt&&(Mt=r):h^(s*Ct<(l=(l+360)%360-180)&&l<s*t)?(r=-o[1]*D)<xt&&(xt=r):(e<xt&&(xt=e),e>Mt&&(Mt=e)),h?t<Ct?ie(wt,t)>ie(wt,kt)&&(kt=t):ie(t,kt)>ie(wt,kt)&&(wt=t):kt>=wt?(t<wt&&(wt=t),t>kt&&(kt=t)):t>Ct?ie(wt,t)>ie(wt,kt)&&(kt=t):ie(t,kt)>ie(wt,kt)&&(wt=t)}else St.push(zt=[wt=t,kt=t]);e<xt&&(xt=e),e>Mt&&(Mt=e),Tt=n,Ct=t}function Qt(){Kt.point=Jt}function $t(){zt[0]=wt,zt[1]=kt,Kt.point=Xt,Tt=null}function te(t,e){if(Tt){var n=t-Ct;Yt.add(I(n)>180?n+(n>0?360:-360):n)}else Pt=t,Et=e;ut.point(t,e),Jt(t,e)}function ee(){ut.lineStart()}function ne(){te(Pt,Et),ut.lineEnd(),I(Yt)>P&&(wt=-(kt=180)),zt[0]=wt,zt[1]=kt,Tt=null}function ie(t,e){return(e-=t)<0?e+360:e}function oe(t,e){return t[0]-e[0]}function re(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var ae={sphere:X,point:se,lineStart:he,lineEnd:pe,polygonStart:function(){ae.lineStart=de,ae.lineEnd=fe},polygonEnd:function(){ae.lineStart=he,ae.lineEnd=pe}};function se(t,e){t*=A;var n=Z(e*=A);le(n*Z(t),n*H(t),H(e))}function le(t,e,n){++Ot,At+=(t-At)/Ot,It+=(e-It)/Ot,Bt+=(n-Bt)/Ot}function he(){ae.point=ue}function ue(t,e){t*=A;var n=Z(e*=A);Wt=n*Z(t),Vt=n*H(t),qt=H(e),ae.point=ce,le(Wt,Vt,qt)}function ce(t,e){t*=A;var n=Z(e*=A),i=n*Z(t),o=n*H(t),r=H(e),a=N(W((a=Vt*r-qt*o)*a+(a=qt*i-Wt*r)*a+(a=Wt*o-Vt*i)*a),Wt*i+Vt*o+qt*r);Dt+=a,Nt+=a*(Wt+(Wt=i)),Zt+=a*(Vt+(Vt=o)),Rt+=a*(qt+(qt=r)),le(Wt,Vt,qt)}function pe(){ae.point=se}function de(){ae.point=_e}function fe(){me(Ht,Ft),ae.point=se}function _e(t,e){Ht=t,Ft=e,t*=A,e*=A,ae.point=me;var n=Z(e);Wt=n*Z(t),Vt=n*H(t),qt=H(e),le(Wt,Vt,qt)}function me(t,e){t*=A;var n=Z(e*=A),i=n*Z(t),o=n*H(t),r=H(e),a=Vt*r-qt*o,s=qt*i-Wt*r,l=Wt*o-Vt*i,h=W(a*a+s*s+l*l),u=Y(h),c=h&&-u/h;jt+=c*a,Gt+=c*s,Ut+=c*l,Dt+=u,Nt+=u*(Wt+(Wt=i)),Zt+=u*(Vt+(Vt=o)),Rt+=u*(qt+(qt=r)),le(Wt,Vt,qt)}function ge(t){return function(){return t}}function ye(t,e){function n(n,i){return n=t(n,i),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,i){return(n=e.invert(n,i))&&t.invert(n[0],n[1])}),n}function ve(t,e){return[I(t)>T?t+Math.round(-t/O)*O:t,e]}function be(t,e,n){return(t%=O)?e||n?ye(we(t),xe(e,n)):we(t):e||n?xe(e,n):ve}function Le(t){return function(e,n){return[(e+=t)>T?e-O:e<-T?e+O:e,n]}}function we(t){var e=Le(t);return e.invert=Le(-t),e}function xe(t,e){var n=Z(t),i=H(t),o=Z(e),r=H(e);function a(t,e){var a=Z(e),s=Z(t)*a,l=H(t)*a,h=H(e),u=h*n+s*i;return[N(l*o-u*r,s*n-h*i),Y(u*o+l*r)]}return a.invert=function(t,e){var a=Z(e),s=Z(t)*a,l=H(t)*a,h=H(e),u=h*o-l*r;return[N(l*o+h*r,s*n+u*i),Y(u*n-s*i)]},a}function ke(t){function e(e){return(e=t(e[0]*A,e[1]*A))[0]*=D,e[1]*=D,e}return t=be(t[0]*A,t[1]*A,t.length>2?t[2]*A:0),e.invert=function(e){return(e=t.invert(e[0]*A,e[1]*A))[0]*=D,e[1]*=D,e},e}function Me(t,e,n,i,o,r){if(n){var a=Z(e),s=H(e),l=i*n;null==o?(o=e+i*O,r=e-l/2):(o=Ce(a,o),r=Ce(a,r),(i>0?o<r:o>r)&&(o+=i*O));for(var h,u=o;i>0?u>r:u<r;u-=l)h=_t([a,-s*Z(u),-s*H(u)]),t.point(h[0],h[1])}}function Ce(t,e){(e=mt(e))[0]-=t,Lt(e);var n=q(-e[1]);return((-e[2]<0?-n:n)+O-P)%O}function Pe(){var t,e=[];return{point:function(e,n,i){t.push([e,n,i])},lineStart:function(){e.push(t=[])},lineEnd:X,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Ee(t,e){return I(t[0]-e[0])<P&&I(t[1]-e[1])<P}function Te(t,e,n,i){this.x=t,this.z=e,this.o=n,this.e=i,this.v=!1,this.n=this.p=null}function Se(t,e,n,i,o){var r,a,s=[],l=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,i=t[0],a=t[e];if(Ee(i,a)){if(!i[2]&&!a[2]){for(o.lineStart(),r=0;r<e;++r)o.point((i=t[r])[0],i[1]);return void o.lineEnd()}a[0]+=2e-6}s.push(n=new Te(i,t,null,!0)),l.push(n.o=new Te(i,null,n,!1)),s.push(n=new Te(a,t,null,!1)),l.push(n.o=new Te(a,null,n,!0))}})),s.length){for(l.sort(e),ze(s),ze(l),r=0,a=l.length;r<a;++r)l[r].e=n=!n;for(var h,u,c=s[0];;){for(var p=c,d=!0;p.v;)if((p=p.n)===c)return;h=p.z,o.lineStart();do{if(p.v=p.o.v=!0,p.e){if(d)for(r=0,a=h.length;r<a;++r)o.point((u=h[r])[0],u[1]);else i(p.x,p.n.x,1,o);p=p.n}else{if(d)for(h=p.p.z,r=h.length-1;r>=0;--r)o.point((u=h[r])[0],u[1]);else i(p.x,p.p.x,-1,o);p=p.p}h=(p=p.o).z,d=!d}while(!p.v);o.lineEnd()}}}function ze(t){if(e=t.length){for(var e,n,i=0,o=t[0];++i<e;)o.n=n=t[i],n.p=o,o=n;o.n=n=t[0],n.p=o}}ve.invert=ve;var Oe=x();function De(t){return I(t[0])<=T?t[0]:F(t[0])*((I(t[0])+T)%O-T)}function Ae(t,e){var n=De(e),i=e[1],o=H(i),r=[H(n),-Z(n),0],a=0,s=0;Oe.reset(),1===o?i=S+P:-1===o&&(i=-S-P);for(var l=0,h=t.length;l<h;++l)if(c=(u=t[l]).length)for(var u,c,p=u[c-1],d=De(p),f=p[1]/2+z,_=H(f),m=Z(f),g=0;g<c;++g,d=v,_=L,m=w,p=y){var y=u[g],v=De(y),b=y[1]/2+z,L=H(b),w=Z(b),x=v-d,k=x>=0?1:-1,M=k*x,C=M>T,E=_*L;if(Oe.add(N(E*k*H(M),m*w+E*Z(M))),a+=C?x+k*O:x,C^d>=n^v>=n){var D=yt(mt(p),mt(y));Lt(D);var A=yt(r,D);Lt(A);var I=(C^x>=0?-1:1)*Y(A[2]);(i>I||i===I&&(D[0]||D[1]))&&(s+=C^x>=0?1:-1)}}return(a<-P||a<P&&Oe<-P)^1&s}function Ie(t,n,i,o){return function(r){var a,s,l,h=n(r),u=Pe(),c=n(u),p=!1,d={point:f,lineStart:m,lineEnd:g,polygonStart:function(){d.point=y,d.lineStart=v,d.lineEnd=b,s=[],a=[]},polygonEnd:function(){d.point=f,d.lineStart=m,d.lineEnd=g,s=e.merge(s);var t=Ae(a,o);s.length?(p||(r.polygonStart(),p=!0),Se(s,Ne,t,i,r)):t&&(p||(r.polygonStart(),p=!0),r.lineStart(),i(null,null,1,r),r.lineEnd()),p&&(r.polygonEnd(),p=!1),s=a=null},sphere:function(){r.polygonStart(),r.lineStart(),i(null,null,1,r),r.lineEnd(),r.polygonEnd()}};function f(e,n){t(e,n)&&r.point(e,n)}function _(t,e){h.point(t,e)}function m(){d.point=_,h.lineStart()}function g(){d.point=f,h.lineEnd()}function y(t,e){l.push([t,e]),c.point(t,e)}function v(){c.lineStart(),l=[]}function b(){y(l[0][0],l[0][1]),c.lineEnd();var t,e,n,i,o=c.clean(),h=u.result(),d=h.length;if(l.pop(),a.push(l),l=null,d)if(1&o){if((e=(n=h[0]).length-1)>0){for(p||(r.polygonStart(),p=!0),r.lineStart(),t=0;t<e;++t)r.point((i=n[t])[0],i[1]);r.lineEnd()}}else d>1&&2&o&&h.push(h.pop().concat(h.shift())),s.push(h.filter(Be))}return d}}function Be(t){return t.length>1}function Ne(t,e){return((t=t.x)[0]<0?t[1]-S-P:S-t[1])-((e=e.x)[0]<0?e[1]-S-P:S-e[1])}var Ze=Ie((function(){return!0}),(function(t){var e,n=NaN,i=NaN,o=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(r,a){var s=r>0?T:-T,l=I(r-n);I(l-T)<P?(t.point(n,i=(i+a)/2>0?S:-S),t.point(o,i),t.lineEnd(),t.lineStart(),t.point(s,i),t.point(r,i),e=0):o!==s&&l>=T&&(I(n-o)<P&&(n-=o*P),I(r-s)<P&&(r-=s*P),i=function(t,e,n,i){var o,r,a=H(t-n);return I(a)>P?B((H(e)*(r=Z(i))*H(n)-H(i)*(o=Z(e))*H(t))/(o*r*a)):(e+i)/2}(n,i,r,a),t.point(o,i),t.lineEnd(),t.lineStart(),t.point(s,i),e=0),t.point(n=r,i=a),o=s},lineEnd:function(){t.lineEnd(),n=i=NaN},clean:function(){return 2-e}}}),(function(t,e,n,i){var o;if(null==t)o=n*S,i.point(-T,o),i.point(0,o),i.point(T,o),i.point(T,0),i.point(T,-o),i.point(0,-o),i.point(-T,-o),i.point(-T,0),i.point(-T,o);else if(I(t[0]-e[0])>P){var r=t[0]<e[0]?T:-T;o=n*r/2,i.point(-r,o),i.point(0,o),i.point(r,o)}else i.point(e[0],e[1])}),[-T,-S]);function Re(t){var e=Z(t),n=6*A,i=e>0,o=I(e)>P;function r(t,n){return Z(t)*Z(n)>e}function a(t,n,i){var o=[1,0,0],r=yt(mt(t),mt(n)),a=gt(r,r),s=r[0],l=a-s*s;if(!l)return!i&&t;var h=e*a/l,u=-e*s/l,c=yt(o,r),p=bt(o,h);vt(p,bt(r,u));var d=c,f=gt(p,d),_=gt(d,d),m=f*f-_*(gt(p,p)-1);if(!(m<0)){var g=W(m),y=bt(d,(-f-g)/_);if(vt(y,p),y=_t(y),!i)return y;var v,b=t[0],L=n[0],w=t[1],x=n[1];L<b&&(v=b,b=L,L=v);var k=L-b,M=I(k-T)<P;if(!M&&x<w&&(v=w,w=x,x=v),M||k<P?M?w+x>0^y[1]<(I(y[0]-b)<P?w:x):w<=y[1]&&y[1]<=x:k>T^(b<=y[0]&&y[0]<=L)){var C=bt(d,(-f+g)/_);return vt(C,p),[y,_t(C)]}}}function s(e,n){var o=i?t:T-t,r=0;return e<-o?r|=1:e>o&&(r|=2),n<-o?r|=4:n>o&&(r|=8),r}return Ie(r,(function(t){var e,n,l,h,u;return{lineStart:function(){h=l=!1,u=1},point:function(c,p){var d,f=[c,p],_=r(c,p),m=i?_?0:s(c,p):_?s(c+(c<0?T:-T),p):0;if(!e&&(h=l=_)&&t.lineStart(),_!==l&&(!(d=a(e,f))||Ee(e,d)||Ee(f,d))&&(f[2]=1),_!==l)u=0,_?(t.lineStart(),d=a(f,e),t.point(d[0],d[1])):(d=a(e,f),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(o&&e&&i^_){var g;m&n||!(g=a(f,e,!0))||(u=0,i?(t.lineStart(),t.point(g[0][0],g[0][1]),t.point(g[1][0],g[1][1]),t.lineEnd()):(t.point(g[1][0],g[1][1]),t.lineEnd(),t.lineStart(),t.point(g[0][0],g[0][1],3)))}!_||e&&Ee(e,f)||t.point(f[0],f[1]),e=f,l=_,n=m},lineEnd:function(){l&&t.lineEnd(),e=null},clean:function(){return u|(h&&l)<<1}}}),(function(e,i,o,r){Me(r,t,n,o,e,i)}),i?[0,-t]:[-T,t-T])}var je=1e9,Ge=-je;function Ue(t,n,i,o){function r(e,r){return t<=e&&e<=i&&n<=r&&r<=o}function a(e,r,a,l){var u=0,c=0;if(null==e||(u=s(e,a))!==(c=s(r,a))||h(e,r)<0^a>0)do{l.point(0===u||3===u?t:i,u>1?o:n)}while((u=(u+a+4)%4)!==c);else l.point(r[0],r[1])}function s(e,o){return I(e[0]-t)<P?o>0?0:3:I(e[0]-i)<P?o>0?2:1:I(e[1]-n)<P?o>0?1:0:o>0?3:2}function l(t,e){return h(t.x,e.x)}function h(t,e){var n=s(t,1),i=s(e,1);return n!==i?n-i:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(s){var h,u,c,p,d,f,_,m,g,y,v,b=s,L=Pe(),w={point:x,lineStart:function(){w.point=k,u&&u.push(c=[]);y=!0,g=!1,_=m=NaN},lineEnd:function(){h&&(k(p,d),f&&g&&L.rejoin(),h.push(L.result()));w.point=x,g&&b.lineEnd()},polygonStart:function(){b=L,h=[],u=[],v=!0},polygonEnd:function(){var n=function(){for(var e=0,n=0,i=u.length;n<i;++n)for(var r,a,s=u[n],l=1,h=s.length,c=s[0],p=c[0],d=c[1];l<h;++l)r=p,a=d,p=(c=s[l])[0],d=c[1],a<=o?d>o&&(p-r)*(o-a)>(d-a)*(t-r)&&++e:d<=o&&(p-r)*(o-a)<(d-a)*(t-r)&&--e;return e}(),i=v&&n,r=(h=e.merge(h)).length;(i||r)&&(s.polygonStart(),i&&(s.lineStart(),a(null,null,1,s),s.lineEnd()),r&&Se(h,l,n,a,s),s.polygonEnd());b=s,h=u=c=null}};function x(t,e){r(t,e)&&b.point(t,e)}function k(e,a){var s=r(e,a);if(u&&c.push([e,a]),y)p=e,d=a,f=s,y=!1,s&&(b.lineStart(),b.point(e,a));else if(s&&g)b.point(e,a);else{var l=[_=Math.max(Ge,Math.min(je,_)),m=Math.max(Ge,Math.min(je,m))],h=[e=Math.max(Ge,Math.min(je,e)),a=Math.max(Ge,Math.min(je,a))];!function(t,e,n,i,o,r){var a,s=t[0],l=t[1],h=0,u=1,c=e[0]-s,p=e[1]-l;if(a=n-s,c||!(a>0)){if(a/=c,c<0){if(a<h)return;a<u&&(u=a)}else if(c>0){if(a>u)return;a>h&&(h=a)}if(a=o-s,c||!(a<0)){if(a/=c,c<0){if(a>u)return;a>h&&(h=a)}else if(c>0){if(a<h)return;a<u&&(u=a)}if(a=i-l,p||!(a>0)){if(a/=p,p<0){if(a<h)return;a<u&&(u=a)}else if(p>0){if(a>u)return;a>h&&(h=a)}if(a=r-l,p||!(a<0)){if(a/=p,p<0){if(a>u)return;a>h&&(h=a)}else if(p>0){if(a<h)return;a<u&&(u=a)}return h>0&&(t[0]=s+h*c,t[1]=l+h*p),u<1&&(e[0]=s+u*c,e[1]=l+u*p),!0}}}}}(l,h,t,n,i,o)?s&&(b.lineStart(),b.point(e,a),v=!1):(g||(b.lineStart(),b.point(l[0],l[1])),b.point(h[0],h[1]),s||b.lineEnd(),v=!1)}_=e,m=a,g=s}return w}}var He,Fe,We,Ve=x(),qe={sphere:X,point:X,lineStart:function(){qe.point=Ke,qe.lineEnd=Ye},lineEnd:X,polygonStart:X,polygonEnd:X};function Ye(){qe.point=qe.lineEnd=X}function Ke(t,e){He=t*=A,Fe=H(e*=A),We=Z(e),qe.point=Xe}function Xe(t,e){t*=A;var n=H(e*=A),i=Z(e),o=I(t-He),r=Z(o),a=i*H(o),s=We*n-Fe*i*r,l=Fe*n+We*i*r;Ve.add(N(W(a*a+s*s),l)),He=t,Fe=n,We=i}function Je(t){return Ve.reset(),nt(t,qe),+Ve}var Qe=[null,null],$e={type:"LineString",coordinates:Qe};function tn(t,e){return Qe[0]=t,Qe[1]=e,Je($e)}var en={Feature:function(t,e){return on(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,o=n.length;++i<o;)if(on(n[i].geometry,e))return!0;return!1}},nn={Sphere:function(){return!0},Point:function(t,e){return rn(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)if(rn(n[i],e))return!0;return!1},LineString:function(t,e){return an(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)if(an(n[i],e))return!0;return!1},Polygon:function(t,e){return sn(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)if(sn(n[i],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,i=-1,o=n.length;++i<o;)if(on(n[i],e))return!0;return!1}};function on(t,e){return!(!t||!nn.hasOwnProperty(t.type))&&nn[t.type](t,e)}function rn(t,e){return 0===tn(t,e)}function an(t,e){for(var n,i,o,r=0,a=t.length;r<a;r++){if(0===(i=tn(t[r],e)))return!0;if(r>0&&(o=tn(t[r],t[r-1]))>0&&n<=o&&i<=o&&(n+i-o)*(1-Math.pow((n-i)/o,2))<E*o)return!0;n=i}return!1}function sn(t,e){return!!Ae(t.map(ln),hn(e))}function ln(t){return(t=t.map(hn)).pop(),t}function hn(t){return[t[0]*A,t[1]*A]}function un(t,n,i){var o=e.range(t,n-P,i).concat(n);return function(t){return o.map((function(e){return[t,e]}))}}function cn(t,n,i){var o=e.range(t,n-P,i).concat(n);return function(t){return o.map((function(e){return[e,t]}))}}function pn(){var t,n,i,o,r,a,s,l,h,u,c,p,d=10,f=d,_=90,m=360,g=2.5;function y(){return{type:"MultiLineString",coordinates:v()}}function v(){return e.range(R(o/_)*_,i,_).map(c).concat(e.range(R(l/m)*m,s,m).map(p)).concat(e.range(R(n/d)*d,t,d).filter((function(t){return I(t%_)>P})).map(h)).concat(e.range(R(a/f)*f,r,f).filter((function(t){return I(t%m)>P})).map(u))}return y.lines=function(){return v().map((function(t){return{type:"LineString",coordinates:t}}))},y.outline=function(){return{type:"Polygon",coordinates:[c(o).concat(p(s).slice(1),c(i).reverse().slice(1),p(l).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.extentMajor(t).extentMinor(t):y.extentMinor()},y.extentMajor=function(t){return arguments.length?(o=+t[0][0],i=+t[1][0],l=+t[0][1],s=+t[1][1],o>i&&(t=o,o=i,i=t),l>s&&(t=l,l=s,s=t),y.precision(g)):[[o,l],[i,s]]},y.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],a=+e[0][1],r=+e[1][1],n>t&&(e=n,n=t,t=e),a>r&&(e=a,a=r,r=e),y.precision(g)):[[n,a],[t,r]]},y.step=function(t){return arguments.length?y.stepMajor(t).stepMinor(t):y.stepMinor()},y.stepMajor=function(t){return arguments.length?(_=+t[0],m=+t[1],y):[_,m]},y.stepMinor=function(t){return arguments.length?(d=+t[0],f=+t[1],y):[d,f]},y.precision=function(e){return arguments.length?(g=+e,h=un(a,r,90),u=cn(n,t,g),c=un(l,s,90),p=cn(o,i,g),y):g},y.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function dn(t){return t}var fn,_n,mn,gn,yn=x(),vn=x(),bn={point:X,lineStart:X,lineEnd:X,polygonStart:function(){bn.lineStart=Ln,bn.lineEnd=kn},polygonEnd:function(){bn.lineStart=bn.lineEnd=bn.point=X,yn.add(I(vn)),vn.reset()},result:function(){var t=yn/2;return yn.reset(),t}};function Ln(){bn.point=wn}function wn(t,e){bn.point=xn,fn=mn=t,_n=gn=e}function xn(t,e){vn.add(gn*t-mn*e),mn=t,gn=e}function kn(){xn(fn,_n)}var Mn=bn,Cn=1/0,Pn=Cn,En=-Cn,Tn=En,Sn={point:function(t,e){t<Cn&&(Cn=t);t>En&&(En=t);e<Pn&&(Pn=e);e>Tn&&(Tn=e)},lineStart:X,lineEnd:X,polygonStart:X,polygonEnd:X,result:function(){var t=[[Cn,Pn],[En,Tn]];return En=Tn=-(Pn=Cn=1/0),t}};var zn,On,Dn,An,In=Sn,Bn=0,Nn=0,Zn=0,Rn=0,jn=0,Gn=0,Un=0,Hn=0,Fn=0,Wn={point:Vn,lineStart:qn,lineEnd:Xn,polygonStart:function(){Wn.lineStart=Jn,Wn.lineEnd=Qn},polygonEnd:function(){Wn.point=Vn,Wn.lineStart=qn,Wn.lineEnd=Xn},result:function(){var t=Fn?[Un/Fn,Hn/Fn]:Gn?[Rn/Gn,jn/Gn]:Zn?[Bn/Zn,Nn/Zn]:[NaN,NaN];return Bn=Nn=Zn=Rn=jn=Gn=Un=Hn=Fn=0,t}};function Vn(t,e){Bn+=t,Nn+=e,++Zn}function qn(){Wn.point=Yn}function Yn(t,e){Wn.point=Kn,Vn(Dn=t,An=e)}function Kn(t,e){var n=t-Dn,i=e-An,o=W(n*n+i*i);Rn+=o*(Dn+t)/2,jn+=o*(An+e)/2,Gn+=o,Vn(Dn=t,An=e)}function Xn(){Wn.point=Vn}function Jn(){Wn.point=$n}function Qn(){ti(zn,On)}function $n(t,e){Wn.point=ti,Vn(zn=Dn=t,On=An=e)}function ti(t,e){var n=t-Dn,i=e-An,o=W(n*n+i*i);Rn+=o*(Dn+t)/2,jn+=o*(An+e)/2,Gn+=o,Un+=(o=An*t-Dn*e)*(Dn+t),Hn+=o*(An+e),Fn+=3*o,Vn(Dn=t,An=e)}var ei=Wn;function ni(t){this._context=t}ni.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,O)}},result:X};var ii,oi,ri,ai,si,li=x(),hi={point:X,lineStart:function(){hi.point=ui},lineEnd:function(){ii&&ci(oi,ri),hi.point=X},polygonStart:function(){ii=!0},polygonEnd:function(){ii=null},result:function(){var t=+li;return li.reset(),t}};function ui(t,e){hi.point=ci,oi=ai=t,ri=si=e}function ci(t,e){ai-=t,si-=e,li.add(W(ai*ai+si*si)),ai=t,si=e}var pi=hi;function di(){this._string=[]}function fi(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function _i(t,e){var n,i,o=4.5;function r(t){return t&&("function"==typeof o&&i.pointRadius(+o.apply(this,arguments)),nt(t,n(i))),i.result()}return r.area=function(t){return nt(t,n(Mn)),Mn.result()},r.measure=function(t){return nt(t,n(pi)),pi.result()},r.bounds=function(t){return nt(t,n(In)),In.result()},r.centroid=function(t){return nt(t,n(ei)),ei.result()},r.projection=function(e){return arguments.length?(n=null==e?(t=null,dn):(t=e).stream,r):t},r.context=function(t){return arguments.length?(i=null==t?(e=null,new di):new ni(e=t),"function"!=typeof o&&i.pointRadius(o),r):e},r.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(i.pointRadius(+t),+t),r):o},r.projection(t).context(e)}function mi(t){return function(e){var n=new gi;for(var i in t)n[i]=t[i];return n.stream=e,n}}function gi(){}function yi(t,e,n){var i=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=i&&t.clipExtent(null),nt(n,t.stream(In)),e(In.result()),null!=i&&t.clipExtent(i),t}function vi(t,e,n){return yi(t,(function(n){var i=e[1][0]-e[0][0],o=e[1][1]-e[0][1],r=Math.min(i/(n[1][0]-n[0][0]),o/(n[1][1]-n[0][1])),a=+e[0][0]+(i-r*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(o-r*(n[1][1]+n[0][1]))/2;t.scale(150*r).translate([a,s])}),n)}function bi(t,e,n){return vi(t,[[0,0],e],n)}function Li(t,e,n){return yi(t,(function(n){var i=+e,o=i/(n[1][0]-n[0][0]),r=(i-o*(n[1][0]+n[0][0]))/2,a=-o*n[0][1];t.scale(150*o).translate([r,a])}),n)}function wi(t,e,n){return yi(t,(function(n){var i=+e,o=i/(n[1][1]-n[0][1]),r=-o*n[0][0],a=(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([r,a])}),n)}di.prototype={_radius:4.5,_circle:fi(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=fi(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},gi.prototype={constructor:gi,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var xi=Z(30*A);function ki(t,e){return+e?function(t,e){function n(i,o,r,a,s,l,h,u,c,p,d,f,_,m){var g=h-i,y=u-o,v=g*g+y*y;if(v>4*e&&_--){var b=a+p,L=s+d,w=l+f,x=W(b*b+L*L+w*w),k=Y(w/=x),M=I(I(w)-1)<P||I(r-c)<P?(r+c)/2:N(L,b),C=t(M,k),E=C[0],T=C[1],S=E-i,z=T-o,O=y*S-g*z;(O*O/v>e||I((g*S+y*z)/v-.5)>.3||a*p+s*d+l*f<xi)&&(n(i,o,r,a,s,l,E,T,M,b/=x,L/=x,w,_,m),m.point(E,T),n(E,T,M,b,L,w,h,u,c,p,d,f,_,m))}}return function(e){var i,o,r,a,s,l,h,u,c,p,d,f,_={point:m,lineStart:g,lineEnd:v,polygonStart:function(){e.polygonStart(),_.lineStart=b},polygonEnd:function(){e.polygonEnd(),_.lineStart=g}};function m(n,i){n=t(n,i),e.point(n[0],n[1])}function g(){u=NaN,_.point=y,e.lineStart()}function y(i,o){var r=mt([i,o]),a=t(i,o);n(u,c,h,p,d,f,u=a[0],c=a[1],h=i,p=r[0],d=r[1],f=r[2],16,e),e.point(u,c)}function v(){_.point=m,e.lineEnd()}function b(){g(),_.point=L,_.lineEnd=w}function L(t,e){y(i=t,e),o=u,r=c,a=p,s=d,l=f,_.point=y}function w(){n(u,c,h,p,d,f,o,r,i,a,s,l,16,e),_.lineEnd=v,v()}return _}}(t,e):function(t){return mi({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var Mi=mi({point:function(t,e){this.stream.point(t*A,e*A)}});function Ci(t,e,n,i,o){function r(r,a){return[e+t*(r*=i),n-t*(a*=o)]}return r.invert=function(r,a){return[(r-e)/t*i,(n-a)/t*o]},r}function Pi(t,e,n,i,o,r){var a=Z(r),s=H(r),l=a*t,h=s*t,u=a/t,c=s/t,p=(s*n-a*e)/t,d=(s*e+a*n)/t;function f(t,r){return[l*(t*=i)-h*(r*=o)+e,n-h*t-l*r]}return f.invert=function(t,e){return[i*(u*t-c*e+p),o*(d-c*t-u*e)]},f}function Ei(t){return Ti((function(){return t}))()}function Ti(t){var e,n,i,o,r,a,s,l,h,u,c=150,p=480,d=250,f=0,_=0,m=0,g=0,y=0,v=0,b=1,L=1,w=null,x=Ze,k=null,M=dn,C=.5;function P(t){return l(t[0]*A,t[1]*A)}function E(t){return(t=l.invert(t[0],t[1]))&&[t[0]*D,t[1]*D]}function T(){var t=Pi(c,0,0,b,L,v).apply(null,e(f,_)),i=(v?Pi:Ci)(c,p-t[0],d-t[1],b,L,v);return n=be(m,g,y),s=ye(e,i),l=ye(n,s),a=ki(s,C),S()}function S(){return h=u=null,P}return P.stream=function(t){return h&&u===t?h:h=Mi(function(t){return mi({point:function(e,n){var i=t(e,n);return this.stream.point(i[0],i[1])}})}(n)(x(a(M(u=t)))))},P.preclip=function(t){return arguments.length?(x=t,w=void 0,S()):x},P.postclip=function(t){return arguments.length?(M=t,k=i=o=r=null,S()):M},P.clipAngle=function(t){return arguments.length?(x=+t?Re(w=t*A):(w=null,Ze),S()):w*D},P.clipExtent=function(t){return arguments.length?(M=null==t?(k=i=o=r=null,dn):Ue(k=+t[0][0],i=+t[0][1],o=+t[1][0],r=+t[1][1]),S()):null==k?null:[[k,i],[o,r]]},P.scale=function(t){return arguments.length?(c=+t,T()):c},P.translate=function(t){return arguments.length?(p=+t[0],d=+t[1],T()):[p,d]},P.center=function(t){return arguments.length?(f=t[0]%360*A,_=t[1]%360*A,T()):[f*D,_*D]},P.rotate=function(t){return arguments.length?(m=t[0]%360*A,g=t[1]%360*A,y=t.length>2?t[2]%360*A:0,T()):[m*D,g*D,y*D]},P.angle=function(t){return arguments.length?(v=t%360*A,T()):v*D},P.reflectX=function(t){return arguments.length?(b=t?-1:1,T()):b<0},P.reflectY=function(t){return arguments.length?(L=t?-1:1,T()):L<0},P.precision=function(t){return arguments.length?(a=ki(s,C=t*t),S()):W(C)},P.fitExtent=function(t,e){return vi(P,t,e)},P.fitSize=function(t,e){return bi(P,t,e)},P.fitWidth=function(t,e){return Li(P,t,e)},P.fitHeight=function(t,e){return wi(P,t,e)},function(){return e=t.apply(this,arguments),P.invert=e.invert&&E,T()}}function Si(t){var e=0,n=T/3,i=Ti(t),o=i(e,n);return o.parallels=function(t){return arguments.length?i(e=t[0]*A,n=t[1]*A):[e*D,n*D]},o}function zi(t,e){var n=H(t),i=(n+H(e))/2;if(I(i)<P)return function(t){var e=Z(t);function n(t,n){return[t*e,H(n)/e]}return n.invert=function(t,n){return[t/e,Y(n*e)]},n}(t);var o=1+n*(2*i-n),r=W(o)/i;function a(t,e){var n=W(o-2*i*H(e))/i;return[n*H(t*=i),r-n*Z(t)]}return a.invert=function(t,e){var n=r-e,a=N(t,I(n))*F(n);return n*i<0&&(a-=T*F(t)*F(n)),[a/i,Y((o-(t*t+n*n)*i*i)/(2*i))]},a}function Oi(){return Si(zi).scale(155.424).center([0,33.6442])}function Di(){return Oi().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Ai(t){return function(e,n){var i=Z(e),o=Z(n),r=t(i*o);return[r*o*H(e),r*H(n)]}}function Ii(t){return function(e,n){var i=W(e*e+n*n),o=t(i),r=H(o),a=Z(o);return[N(e*r,i*a),Y(i&&n*r/i)]}}var Bi=Ai((function(t){return W(2/(1+t))}));Bi.invert=Ii((function(t){return 2*Y(t/2)}));var Ni=Ai((function(t){return(t=q(t))&&t/H(t)}));function Zi(t,e){return[t,G(V((S+e)/2))]}function Ri(){return ji(Zi).scale(961/O)}function ji(t){var e,n,i,o=Ei(t),r=o.center,a=o.scale,s=o.translate,l=o.clipExtent,h=null;function u(){var r=T*a(),s=o(ke(o.rotate()).invert([0,0]));return l(null==h?[[s[0]-r,s[1]-r],[s[0]+r,s[1]+r]]:t===Zi?[[Math.max(s[0]-r,h),e],[Math.min(s[0]+r,n),i]]:[[h,Math.max(s[1]-r,e)],[n,Math.min(s[1]+r,i)]])}return o.scale=function(t){return arguments.length?(a(t),u()):a()},o.translate=function(t){return arguments.length?(s(t),u()):s()},o.center=function(t){return arguments.length?(r(t),u()):r()},o.clipExtent=function(t){return arguments.length?(null==t?h=e=n=i=null:(h=+t[0][0],e=+t[0][1],n=+t[1][0],i=+t[1][1]),u()):null==h?null:[[h,e],[n,i]]},u()}function Gi(t){return V((S+t)/2)}function Ui(t,e){var n=Z(t),i=t===e?H(t):G(n/Z(e))/G(Gi(e)/Gi(t)),o=n*U(Gi(t),i)/i;if(!i)return Zi;function r(t,e){o>0?e<-S+P&&(e=-S+P):e>S-P&&(e=S-P);var n=o/U(Gi(e),i);return[n*H(i*t),o-n*Z(i*t)]}return r.invert=function(t,e){var n=o-e,r=F(i)*W(t*t+n*n),a=N(t,I(n))*F(n);return n*i<0&&(a-=T*F(t)*F(n)),[a/i,2*B(U(o/r,1/i))-S]},r}function Hi(t,e){return[t,e]}function Fi(t,e){var n=Z(t),i=t===e?H(t):(n-Z(e))/(e-t),o=n/i+t;if(I(i)<P)return Hi;function r(t,e){var n=o-e,r=i*t;return[n*H(r),o-n*Z(r)]}return r.invert=function(t,e){var n=o-e,r=N(t,I(n))*F(n);return n*i<0&&(r-=T*F(t)*F(n)),[r/i,o-F(i)*W(t*t+n*n)]},r}Ni.invert=Ii((function(t){return t})),Zi.invert=function(t,e){return[t,2*B(j(e))-S]},Hi.invert=Hi;var Wi=1.340264,Vi=-.081106,qi=893e-6,Yi=.003796,Ki=W(3)/2;function Xi(t,e){var n=Y(Ki*H(e)),i=n*n,o=i*i*i;return[t*Z(n)/(Ki*(Wi+3*Vi*i+o*(7*qi+9*Yi*i))),n*(Wi+Vi*i+o*(qi+Yi*i))]}function Ji(t,e){var n=Z(e),i=Z(t)*n;return[n*H(t)/i,H(e)/i]}function Qi(t,e){var n=e*e,i=n*n;return[t*(.8707-.131979*n+i*(i*(.003971*n-.001529*i)-.013791)),e*(1.007226+n*(.015085+i*(.028874*n-.044475-.005916*i)))]}function $i(t,e){return[Z(e)*H(t),H(e)]}function to(t,e){var n=Z(e),i=1+Z(t)*n;return[n*H(t)/i,H(e)/i]}function eo(t,e){return[G(V((S+e)/2)),-t]}Xi.invert=function(t,e){for(var n,i=e,o=i*i,r=o*o*o,a=0;a<12&&(r=(o=(i-=n=(i*(Wi+Vi*o+r*(qi+Yi*o))-e)/(Wi+3*Vi*o+r*(7*qi+9*Yi*o)))*i)*o*o,!(I(n)<E));++a);return[Ki*t*(Wi+3*Vi*o+r*(7*qi+9*Yi*o))/Z(i),Y(H(i)/Ki)]},Ji.invert=Ii(B),Qi.invert=function(t,e){var n,i=e,o=25;do{var r=i*i,a=r*r;i-=n=(i*(1.007226+r*(.015085+a*(.028874*r-.044475-.005916*a)))-e)/(1.007226+r*(.045255+a*(.259866*r-.311325-.005916*11*a)))}while(I(n)>P&&--o>0);return[t/(.8707+(r=i*i)*(r*(r*r*r*(.003971-.001529*r)-.013791)-.131979)),i]},$i.invert=Ii(Y),to.invert=Ii((function(t){return 2*B(t)})),eo.invert=function(t,e){return[-e,2*B(j(t))-S]};var no=Object.freeze({__proto__:null,geoArea:function(t){return ht.reset(),nt(t,ut),2*ht},geoBounds:function(t){var e,n,i,o,r,a,s;if(Mt=kt=-(wt=xt=1/0),St=[],nt(t,Kt),n=St.length){for(St.sort(oe),e=1,r=[i=St[0]];e<n;++e)re(i,(o=St[e])[0])||re(i,o[1])?(ie(i[0],o[1])>ie(i[0],i[1])&&(i[1]=o[1]),ie(o[0],i[1])>ie(i[0],i[1])&&(i[0]=o[0])):r.push(i=o);for(a=-1/0,e=0,i=r[n=r.length-1];e<=n;i=o,++e)o=r[e],(s=ie(i[1],o[0]))>a&&(a=s,wt=o[0],kt=i[1])}return St=zt=null,wt===1/0||xt===1/0?[[NaN,NaN],[NaN,NaN]]:[[wt,xt],[kt,Mt]]},geoCentroid:function(t){Ot=Dt=At=It=Bt=Nt=Zt=Rt=jt=Gt=Ut=0,nt(t,ae);var e=jt,n=Gt,i=Ut,o=e*e+n*n+i*i;return o<E&&(e=Nt,n=Zt,i=Rt,Dt<P&&(e=At,n=It,i=Bt),(o=e*e+n*n+i*i)<E)?[NaN,NaN]:[N(n,e)*D,Y(i/W(o))*D]},geoCircle:function(){var t,e,n=ge([0,0]),i=ge(90),o=ge(6),r={point:function(n,i){t.push(n=e(n,i)),n[0]*=D,n[1]*=D}};function a(){var a=n.apply(this,arguments),s=i.apply(this,arguments)*A,l=o.apply(this,arguments)*A;return t=[],e=be(-a[0]*A,-a[1]*A,0).invert,Me(r,s,l,1),a={type:"Polygon",coordinates:[t]},t=e=null,a}return a.center=function(t){return arguments.length?(n="function"==typeof t?t:ge([+t[0],+t[1]]),a):n},a.radius=function(t){return arguments.length?(i="function"==typeof t?t:ge(+t),a):i},a.precision=function(t){return arguments.length?(o="function"==typeof t?t:ge(+t),a):o},a},geoClipAntimeridian:Ze,geoClipCircle:Re,geoClipExtent:function(){var t,e,n,i=0,o=0,r=960,a=500;return n={stream:function(n){return t&&e===n?t:t=Ue(i,o,r,a)(e=n)},extent:function(s){return arguments.length?(i=+s[0][0],o=+s[0][1],r=+s[1][0],a=+s[1][1],t=e=null,n):[[i,o],[r,a]]}}},geoClipRectangle:Ue,geoContains:function(t,e){return(t&&en.hasOwnProperty(t.type)?en[t.type]:on)(t,e)},geoDistance:tn,geoGraticule:pn,geoGraticule10:function(){return pn()()},geoInterpolate:function(t,e){var n=t[0]*A,i=t[1]*A,o=e[0]*A,r=e[1]*A,a=Z(i),s=H(i),l=Z(r),h=H(r),u=a*Z(n),c=a*H(n),p=l*Z(o),d=l*H(o),f=2*Y(W(K(r-i)+a*l*K(o-n))),_=H(f),m=f?function(t){var e=H(t*=f)/_,n=H(f-t)/_,i=n*u+e*p,o=n*c+e*d,r=n*s+e*h;return[N(o,i)*D,N(r,W(i*i+o*o))*D]}:function(){return[n*D,i*D]};return m.distance=f,m},geoLength:Je,geoPath:_i,geoAlbers:Di,geoAlbersUsa:function(){var t,e,n,i,o,r,a=Di(),s=Oi().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=Oi().rotate([157,0]).center([-3,19.9]).parallels([8,18]),h={point:function(t,e){r=[t,e]}};function u(t){var e=t[0],a=t[1];return r=null,n.point(e,a),r||(i.point(e,a),r)||(o.point(e,a),r)}function c(){return t=e=null,u}return u.invert=function(t){var e=a.scale(),n=a.translate(),i=(t[0]-n[0])/e,o=(t[1]-n[1])/e;return(o>=.12&&o<.234&&i>=-.425&&i<-.214?s:o>=.166&&o<.234&&i>=-.214&&i<-.115?l:a).invert(t)},u.stream=function(n){return t&&e===n?t:(i=[a.stream(e=n),s.stream(n),l.stream(n)],o=i.length,t={point:function(t,e){for(var n=-1;++n<o;)i[n].point(t,e)},sphere:function(){for(var t=-1;++t<o;)i[t].sphere()},lineStart:function(){for(var t=-1;++t<o;)i[t].lineStart()},lineEnd:function(){for(var t=-1;++t<o;)i[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<o;)i[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<o;)i[t].polygonEnd()}});var i,o},u.precision=function(t){return arguments.length?(a.precision(t),s.precision(t),l.precision(t),c()):a.precision()},u.scale=function(t){return arguments.length?(a.scale(t),s.scale(.35*t),l.scale(t),u.translate(a.translate())):a.scale()},u.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),r=+t[0],u=+t[1];return n=a.translate(t).clipExtent([[r-.455*e,u-.238*e],[r+.455*e,u+.238*e]]).stream(h),i=s.translate([r-.307*e,u+.201*e]).clipExtent([[r-.425*e+P,u+.12*e+P],[r-.214*e-P,u+.234*e-P]]).stream(h),o=l.translate([r-.205*e,u+.212*e]).clipExtent([[r-.214*e+P,u+.166*e+P],[r-.115*e-P,u+.234*e-P]]).stream(h),c()},u.fitExtent=function(t,e){return vi(u,t,e)},u.fitSize=function(t,e){return bi(u,t,e)},u.fitWidth=function(t,e){return Li(u,t,e)},u.fitHeight=function(t,e){return wi(u,t,e)},u.scale(1070)},geoAzimuthalEqualArea:function(){return Ei(Bi).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:Bi,geoAzimuthalEquidistant:function(){return Ei(Ni).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:Ni,geoConicConformal:function(){return Si(Ui).scale(109.5).parallels([30,30])},geoConicConformalRaw:Ui,geoConicEqualArea:Oi,geoConicEqualAreaRaw:zi,geoConicEquidistant:function(){return Si(Fi).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:Fi,geoEqualEarth:function(){return Ei(Xi).scale(177.158)},geoEqualEarthRaw:Xi,geoEquirectangular:function(){return Ei(Hi).scale(152.63)},geoEquirectangularRaw:Hi,geoGnomonic:function(){return Ei(Ji).scale(144.049).clipAngle(60)},geoGnomonicRaw:Ji,geoIdentity:function(){var t,e,n,i,o,r,a,s=1,l=0,h=0,u=1,c=1,p=0,d=null,f=1,_=1,m=mi({point:function(t,e){var n=v([t,e]);this.stream.point(n[0],n[1])}}),g=dn;function y(){return f=s*u,_=s*c,r=a=null,v}function v(n){var i=n[0]*f,o=n[1]*_;if(p){var r=o*t-i*e;i=i*t+o*e,o=r}return[i+l,o+h]}return v.invert=function(n){var i=n[0]-l,o=n[1]-h;if(p){var r=o*t+i*e;i=i*t-o*e,o=r}return[i/f,o/_]},v.stream=function(t){return r&&a===t?r:r=m(g(a=t))},v.postclip=function(t){return arguments.length?(g=t,d=n=i=o=null,y()):g},v.clipExtent=function(t){return arguments.length?(g=null==t?(d=n=i=o=null,dn):Ue(d=+t[0][0],n=+t[0][1],i=+t[1][0],o=+t[1][1]),y()):null==d?null:[[d,n],[i,o]]},v.scale=function(t){return arguments.length?(s=+t,y()):s},v.translate=function(t){return arguments.length?(l=+t[0],h=+t[1],y()):[l,h]},v.angle=function(n){return arguments.length?(e=H(p=n%360*A),t=Z(p),y()):p*D},v.reflectX=function(t){return arguments.length?(u=t?-1:1,y()):u<0},v.reflectY=function(t){return arguments.length?(c=t?-1:1,y()):c<0},v.fitExtent=function(t,e){return vi(v,t,e)},v.fitSize=function(t,e){return bi(v,t,e)},v.fitWidth=function(t,e){return Li(v,t,e)},v.fitHeight=function(t,e){return wi(v,t,e)},v},geoProjection:Ei,geoProjectionMutator:Ti,geoMercator:Ri,geoMercatorRaw:Zi,geoNaturalEarth1:function(){return Ei(Qi).scale(175.295)},geoNaturalEarth1Raw:Qi,geoOrthographic:function(){return Ei($i).scale(249.5).clipAngle(90.000001)},geoOrthographicRaw:$i,geoStereographic:function(){return Ei(to).scale(250).clipAngle(142)},geoStereographicRaw:to,geoTransverseMercator:function(){var t=ji(eo),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:eo,geoRotation:ke,geoStream:nt,geoTransform:function(t){return{stream:mi(t)}}});function io(){}var oo=1/0,ro=oo,ao=-oo,so=ao;var lo={point:function(t,e){t<oo&&(oo=t),t>ao&&(ao=t),e<ro&&(ro=e),e>so&&(so=e)},lineStart:io,lineEnd:io,polygonStart:io,polygonEnd:io,result:function(){var t=[[oo,ro],[ao,so]];return ao=so=-(ro=oo=1/0),t}};function ho(t,e,n){var i=e[1][0]-e[0][0],o=e[1][1]-e[0][1],r=t.clipExtent&&t.clipExtent();t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),nt(n,t.stream(lo));var a=lo.result(),s=Math.min(i/(a[1][0]-a[0][0]),o/(a[1][1]-a[0][1])),l=+e[0][0]+(i-s*(a[1][0]+a[0][0]))/2,h=+e[0][1]+(o-s*(a[1][1]+a[0][1]))/2;return null!=r&&t.clipExtent(r),t.scale(150*s).translate([l,h])}var uo,co=function(){function t(){}return t.prototype.encode=function(e,n,i){if(void 0===i){for(var o=1;o<=12;o++){var r=this.encode(e,n,o),a=this.decode(r);if(a.lat===e&&a.lon===n)return r}i=12}if(e=Number(e),n=Number(n),i=Number(i),isNaN(e)||isNaN(n)||isNaN(i))throw new Error("Invalid geohash");for(var s=0,l=0,h=!0,u="",c=-90,p=90,d=-180,f=180;u.length<i;){if(h){var _=(d+f)/2;n>_?(s=2*s+1,d=_):(s*=2,f=_)}else{var m=(c+p)/2;e>m?(s=2*s+1,c=m):(s*=2,p=m)}h=!h,5==++l&&(u+=t.base32.charAt(s),l=0,s=0)}return u},t.prototype.decode=function(t){var e=this.bounds(t),n=e.sw.lat,i=e.sw.lon,o=e.ne.lat,r=e.ne.lon,a=(n+o)/2,s=(i+r)/2;return{lat:a=Number(a.toFixed(Math.floor(2-Math.log(o-n)/Math.LN10))),lon:s=Number(s.toFixed(Math.floor(2-Math.log(r-i)/Math.LN10)))}},t.prototype.bounds=function(e){if(0===e.length)throw new Error("Invalid geohash");e=e.toLowerCase();for(var n=!0,i=-90,o=90,r=-180,a=180,s=0;s<e.length;s++){var l=e.charAt(s),h=t.base32.indexOf(l);if(-1===h)throw new Error("Invalid geohash");for(var u=4;u>=0;u--){var c=h>>u&1;if(n){var p=(r+a)/2;1===c?r=p:a=p}else{var d=(i+o)/2;1===c?i=d:o=d}n=!n}}return{sw:{lat:i,lon:r},ne:{lat:o,lon:a}}},t.prototype.adjacent=function(e,n){if(e=e.toLowerCase(),n=n.toLowerCase(),0===e.length)throw new Error("Invalid geohash");if(-1==="nsew".indexOf(n))throw new Error("Invalid direction");var i=e.slice(-1),o=e.slice(0,-1),r=e.length%2;return-1!=={n:["prxz","bcfguvyz"],s:["028b","0145hjnp"],e:["bcfguvyz","prxz"],w:["0145hjnp","028b"]}[n][r].indexOf(i)&&""!==o&&(o=this.adjacent(o,n)),o+t.base32.charAt({n:["p0r21436x8zb9dcf5h7kjnmqesgutwvy","bc01fg45238967deuvhjyznpkmstqrwx"],s:["14365h7k9dcfesgujnmqp0r2twvyx8zb","238967debc01fg45kmstqrwxuvhjyznp"],e:["bc01fg45238967deuvhjyznpkmstqrwx","p0r21436x8zb9dcf5h7kjnmqesgutwvy"],w:["238967debc01fg45kmstqrwxuvhjyznp","14365h7k9dcfesgujnmqp0r2twvyx8zb"]}[n][r].indexOf(i))},t.prototype.neighbours=function(t){return{n:this.adjacent(t,"n"),ne:this.adjacent(this.adjacent(t,"n"),"e"),e:this.adjacent(t,"e"),se:this.adjacent(this.adjacent(t,"s"),"e"),s:this.adjacent(t,"s"),sw:this.adjacent(this.adjacent(t,"s"),"w"),w:this.adjacent(t,"w"),nw:this.adjacent(this.adjacent(t,"n"),"w")}},t.prototype.contained=function(t,e,n,i,o){(isNaN(e)||e>=90)&&(e=89),(isNaN(n)||n>180)&&(n=180),(isNaN(i)||i<=-90)&&(i=-89),(isNaN(t)||t<-180)&&(t=-180),o=o||1;for(var r=this.encode(e,t,o),a=this.encode(e,n,o),s=this.encode(i,n,o),l=r,h=0,u=-1,c=[r,s],p=this.adjacent(r,"e");p!==s;)c.push(p),++h,p===a||u===h?(u=h+1,h=0,l=p=this.adjacent(l,"s")):p=this.adjacent(p,"e");return c},t.prototype.calculateWidthDegrees=function(t){var e;return e=t%2==0?-1:-.5,180/Math.pow(2,2.5*t+e)},t.prototype.width=function(t){return 180/(2^(5*t+t%2)/2-1)},t.base32="0123456789bcdefghjkmnpqrstuvwxyz",t}();function po(){var t,e,n,i,o,r,a,s=1e-6,l=Di(),h=Oi().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=Oi().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c=Oi().rotate([66,0]).center([0,18]).parallels([8,18]),p={point:function(t,e){a=[t,e]}},d=function(t){var e=t[0],s=t[1];return a=null,n.point(e,s),a||(i.point(e,s),a)||(o.point(e,s),a)||r.point(e,s),a};function f(){return t=e=null,d}return d.invert=function(t){var e=l.scale(),n=l.translate(),i=(t[0]-n[0])/e,o=(t[1]-n[1])/e;return(o>=.12&&o<.234&&i>=-.425&&i<-.214?h:o>=.166&&o<.234&&i>=-.214&&i<-.115?u:o>=.204&&o<.234&&i>=.32&&i<.38?c:l).invert(t)},d.stream=function(n){return t&&e===n?t:(i=[l.stream(e=n),h.stream(n),u.stream(n),c.stream(n)],o=i.length,t={point:function(t,e){for(var n=-1;++n<o;)i[n].point(t,e)},sphere:function(){for(var t=-1;++t<o;)i[t].sphere()},lineStart:function(){for(var t=-1;++t<o;)i[t].lineStart()},lineEnd:function(){for(var t=-1;++t<o;)i[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<o;)i[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<o;)i[t].polygonEnd()}});var i,o},d.precision=function(t){return arguments.length?(l.precision(t),h.precision(t),u.precision(t),c.precision(t),f()):l.precision()},d.scale=function(t){return arguments.length?(l.scale(t),h.scale(.35*t),u.scale(t),c.scale(t),d.translate(l.translate())):l.scale()},d.translate=function(t){if(!arguments.length)return l.translate();var e=l.scale(),a=+t[0],d=+t[1];return n=l.translate(t).clipExtent([[a-.455*e,d-.238*e],[a+.455*e,d+.238*e]]).stream(p),i=h.translate([a-.307*e,d+.201*e]).clipExtent([[a-.425*e+s,d+.12*e+s],[a-.214*e-s,d+.234*e-s]]).stream(p),o=u.translate([a-.205*e,d+.212*e]).clipExtent([[a-.214*e+s,d+.166*e+s],[a-.115*e-s,d+.234*e-s]]).stream(p),r=c.translate([a+.35*e,d+.224*e]).clipExtent([[a+.32*e,d+.204*e],[a+.38*e,d+.234*e]]).stream(p),f()},d.fitExtent=function(t,e){return ho(d,t,e)},d.fitSize=function(t,e){return function(t,e,n){return ho(t,[[0,0],e],n)}(d,t,e)},d.scale(1070)}!function(t){t[t.AzimuthalEqualArea=0]="AzimuthalEqualArea",t[t.AzimuthalEquidistant=1]="AzimuthalEquidistant",t[t.Gnomonic=2]="Gnomonic",t[t.Orthographic=3]="Orthographic",t[t.Stereographic=4]="Stereographic",t[t.AlbersUsa=5]="AlbersUsa",t[t.AlbersUsaPr=6]="AlbersUsaPr",t[t.Albers=7]="Albers",t[t.ConicConformal=8]="ConicConformal",t[t.ConicEqualArea=9]="ConicEqualArea",t[t.ConicEquidistant=10]="ConicEquidistant",t[t.Equirectangular=11]="Equirectangular",t[t.Mercator=12]="Mercator",t[t.TransverseMercator=13]="TransverseMercator"}(uo||(uo={}));var fo=[],_o={};for(var mo in uo)"string"==typeof mo&&(fo.push(mo),_o[mo]="AlbersUsaPr"===mo?po:no["geo".concat(mo)]);function go(t){var e=_o[t];return e?e():(console.warn("Unknown projection: "+t),Ri())}function yo(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}yo(".map_Layered .background{fill:none}.map_Layered .raster image{fill:#b5d0d0}.map_Layered .vector{fill:none;stroke:navy;stroke-linejoin:round}.map_Layered .hash path{fill:none;stroke:red;stroke-linejoin:round}");var vo=2048/Math.PI,bo=function(t){function n(){var e=t.call(this)||this;return e._drawStartPos="origin",e.projection("Mercator"),e}return h(n,t),n.prototype.data=function(e){var n=t.prototype.data.apply(this,arguments);return arguments.length&&(this._autoScaleOnNextRender=!0),n},n.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),this._layersTarget=this._renderElement.append("g").attr("class","layersTarget")},n.prototype.update=function(n,i){t.prototype.update.call(this,n,i);var o=this._layersTarget.selectAll(".layerContainer").data(this.layers().filter((function(t){return t.visible()})),(function(t){return t.id()})),r=this;o.enter().append("g").attr("id",(function(t){return t.id()})).attr("class","layerContainer").each((function(t){t._svgElement=e.select(this),t._domElement=r._parentOverlay.append("div"),t.layerEnter(r,t._svgElement,t._domElement)})).merge(o).each((function(t){t.layerUpdate(r)})),o.exit().each((function(t){t.layerExit(r),t._domElement.remove()})).remove(),o.order(),this.onZoomed()},n.prototype.exit=function(e,n){t.prototype.exit.call(this,e,n)},n.prototype.onZoomed=function(){t.prototype.onZoomed.call(this);var e=this._layersTarget.selectAll(".layerContainer"),n=this;e.each((function(t){t.layerZoomed(n)}))},n.prototype.preRender=function(t){return Promise.all(this.layers().filter((function(t){return t.visible()})).map((function(t){return t.layerPreRender()})))},n.prototype.render=function(t){var n=this;return this.preRender().then((function(){e.SVGZoomWidget.prototype.render.call(n,(function(e){n._layersTarget&&(n._renderCount&&n._autoScaleOnNextRender||n._prevAutoScaleMode!==n.autoScaleMode())?(n._prevAutoScaleMode=n.autoScaleMode(),n._autoScaleOnNextRender=!1,n.autoScale(),t&&t(e)):t&&t(e)}))})),this},n.prototype.project=function(t,e){return t>=90?t=89:t<=-90&&(t=-89),this._d3GeoProjection([e,t])},n.prototype.invert=function(t,e){return this._d3GeoProjection.invert([t,e])},n.prototype.getBounds=function(){var t=this._layersTarget.node().getBBox();return{x:t.x,y:t.y,width:t.width,height:t.height}},n.prototype.autoScale=function(){switch(this.autoScaleMode()){case"none":return;case"all":this.zoomToBBox(this.getBounds())}},n}(e.SVGZoomWidget);bo.prototype._class+=" map_Layered",bo.prototype.publish("projection",null,"set","Map projection type",fo),bo.prototype.publish("centerLat",0,"number","Center Latitude",null,{tags:["Basic"]}),bo.prototype.publish("centerLong",0,"number","Center Longitude",null,{tags:["Basic"]}),bo.prototype.publish("zoom",1,"number","Zoom Level",null,{tags:["Basic"]}),bo.prototype.publish("autoScaleMode","all","set","Auto Scale",["none","all"],{tags:["Basic"]}),bo.prototype.publish("layers",[],"widgetArray","Layers",null,{render:!1});var Lo=bo.prototype.projection;bo.prototype.projection=function(t){var e=Lo.apply(this,arguments);if(arguments.length){if(this._d3GeoProjection=go(t).scale(vo).translate([0,0]),"orthographic"===t)this._d3GeoProjection.clipAngle(90).rotate([0,0]);this._d3GeoPath=_i().projection(this._d3GeoProjection),this._autoScaleOnNextRender=!0}return e};var wo=function(t){function e(){var e=t.call(this)||this;return n.ITooltip.call(e),e}return h(e,t),e.prototype.svgGlowID=function(){return""},e.prototype.layerEnter=function(t,e,n){this._parentOverlay=t._parentOverlay},e.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),this._svgElement=this._layersTarget.append("g"),this._domElement=this._parentOverlay.append("div"),this.layerEnter(this,this._svgElement,this._domElement)},e.prototype.layerUpdate=function(t,e){},e.prototype.update=function(e,n){t.prototype.update.call(this,e,n),this.layerUpdate(this)},e.prototype.onZoomed=function(){t.prototype.onZoomed.call(this),this.layerUpdate(this)},e.prototype.layerExit=function(t){},e.prototype.exit=function(e,n){this.layerExit(this),this._svgElement.remove(),this._domElement.remove(),t.prototype.exit.call(this,e,n)},e.prototype.layerPreRender=function(){return Promise.resolve()},e.prototype.render=function(t){var e=this,n=arguments;return this.layerPreRender().then((function(){bo.prototype.render.apply(e,n)})),this},e.prototype.layerZoomed=function(t){},e}(bo);wo.prototype._class+=" map_Layer",wo.prototype.implements(n.ITooltip.prototype);var xo=function(t){function e(){var e=t.call(this)||this;return e.pins=new w,e}return h(e,t),e.prototype.layerEnter=function(t,e,n){wo.prototype.layerEnter.apply(this,arguments),this._parentOverlay.style("pointer-events","none"),this._pinsTransform=n.style("pointer-events","none").append("div").attr("class",this.classID()).style("width",t.width()+"px").style("height",t.height()+"px"),this.pins.target(this._pinsTransform.node())},e.prototype.layerUpdate=function(t){wo.prototype.layerUpdate.apply(this,arguments),this._pinsTransform.style("opacity",this.opacity()).style("width",t.width()+"px").style("height",t.height()+"px"),this.pins.resize(t.size()),this.layerZoomed(t)},e.prototype.layerExit=function(t){delete this._prevProjection,this.pins.target(null),delete this.pins},e.prototype.layerZoomed=function(t){wo.prototype.layerZoomed.apply(this,arguments);var e=this._db.fieldByLabel(this.latColumn()),n=this._db.fieldByLabel(this.longColumn()),i=this._db.fieldByLabel(this.weightColumn());this.pins.columns(this.columns()).data(this.visible()?this.data().map((function(o){var r=e?o[e.idx]:o[0],a=n?o[n.idx]:o[1],s=i?o[i.idx]:1,l=t.zoomTranslate(),h=t.project(r,a),u=t.zoomScale();return h[0]*=u,h[1]*=u,[l[0]+h[0],l[1]+h[1],s]})):[]).render()},e}(wo);function ko(t){return t}function Mo(t,e){return"string"==typeof e&&(e=t.objects[e]),"GeometryCollection"===e.type?{type:"FeatureCollection",features:e.geometries.map((function(e){return Co(t,e)}))}:Co(t,e)}function Co(t,e){var n=e.id,i=e.bbox,o=null==e.properties?{}:e.properties,r=Po(t,e);return null==n&&null==i?{type:"Feature",properties:o,geometry:r}:null==i?{type:"Feature",id:n,properties:o,geometry:r}:{type:"Feature",id:n,bbox:i,properties:o,geometry:r}}function Po(t,e){var n=function(t){if(null==t)return ko;var e,n,i=t.scale[0],o=t.scale[1],r=t.translate[0],a=t.translate[1];return function(t,s){s||(e=n=0);var l=2,h=t.length,u=new Array(h);for(u[0]=(e+=t[0])*i+r,u[1]=(n+=t[1])*o+a;l<h;)u[l]=t[l],++l;return u}}(t.transform),i=t.arcs;function o(t,e){e.length&&e.pop();for(var o=i[t<0?~t:t],r=0,a=o.length;r<a;++r)e.push(n(o[r],r));t<0&&function(t,e){for(var n,i=t.length,o=i-e;o<--i;)n=t[o],t[o++]=t[i],t[i]=n}(e,a)}function r(t){return n(t)}function a(t){for(var e=[],n=0,i=t.length;n<i;++n)o(t[n],e);return e.length<2&&e.push(e[0]),e}function s(t){for(var e=a(t);e.length<4;)e.push(e[0]);return e}function l(t){return t.map(s)}return function t(e){var n,i=e.type;switch(i){case"GeometryCollection":return{type:i,geometries:e.geometries.map(t)};case"Point":n=r(e.coordinates);break;case"MultiPoint":n=e.coordinates.map(r);break;case"LineString":n=a(e.arcs);break;case"MultiLineString":n=e.arcs.map(a);break;case"Polygon":n=l(e.arcs);break;case"MultiPolygon":n=e.arcs.map(l);break;default:return null}return{type:i,coordinates:n}}(e)}function Eo(t,e){var n={},i={},o={},r=[],a=-1;function s(t,e){for(var i in t){var o=t[i];delete e[o.start],delete o.start,delete o.end,o.forEach((function(t){n[t<0?~t:t]=1})),r.push(o)}}return e.forEach((function(n,i){var o,r=t.arcs[n<0?~n:n];r.length<3&&!r[1][0]&&!r[1][1]&&(o=e[++a],e[a]=n,e[i]=o)})),e.forEach((function(e){var n,r,a=function(e){var n,i=t.arcs[e<0?~e:e],o=i[0];t.transform?(n=[0,0],i.forEach((function(t){n[0]+=t[0],n[1]+=t[1]}))):n=i[i.length-1];return e<0?[n,o]:[o,n]}(e),s=a[0],l=a[1];if(n=o[s])if(delete o[n.end],n.push(e),n.end=l,r=i[l]){delete i[r.start];var h=r===n?n:n.concat(r);i[h.start=n.start]=o[h.end=r.end]=h}else i[n.start]=o[n.end]=n;else if(n=i[l])if(delete i[n.start],n.unshift(e),n.start=s,r=o[s]){delete o[r.end];var u=r===n?n:r.concat(n);i[u.start=r.start]=o[u.end=n.end]=u}else i[n.start]=o[n.end]=n;else i[(n=[e]).start=s]=o[n.end=l]=n})),s(o,i),s(i,o),e.forEach((function(t){n[t<0?~t:t]||r.push([t])})),r}function To(t){return Po(t,So.apply(this,arguments))}function So(t,e,n){var i,o,r;if(arguments.length>1)i=zo(t,e,n);else for(o=0,i=new Array(r=t.arcs.length);o<r;++o)i[o]=o;return{type:"MultiLineString",arcs:Eo(t,i)}}function zo(t,e,n){var i,o=[],r=[];function a(t){var e=t<0?~t:t;(r[e]||(r[e]=[])).push({i:t,g:i})}function s(t){t.forEach(a)}function l(t){t.forEach(s)}return function t(e){switch(i=e,e.type){case"GeometryCollection":e.geometries.forEach(t);break;case"LineString":s(e.arcs);break;case"MultiLineString":case"Polygon":l(e.arcs);break;case"MultiPolygon":!function(t){t.forEach(l)}(e.arcs)}}(e),r.forEach(null==n?function(t){o.push(t[0].i)}:function(t){n(t[0].g,t[t.length-1].g)&&o.push(t[0].i)}),o}xo.prototype._class+=" map_CanvasPinLayer",xo.prototype.publishProxy("clusterMode","pins","clusterMode"),xo.prototype.publishProxy("allCircles","pins","allCircles"),xo.prototype.publishProxy("showQuadtree","pins","showQuadtree"),xo.prototype.publishProxy("useAveragePos","pins","useAveragePos"),xo.prototype.publishProxy("shrinkFontToPin","pins","shrinkFontToPin"),xo.prototype.publishProxy("enableClustering","pins","enableClustering"),xo.prototype.publishProxy("useWeightedRadius","pins","useWeightedRadius"),xo.prototype.publishProxy("radiusWeightMult","pins","radiusWeightMult"),xo.prototype.publishProxy("searchRectMult","pins","searchRectMult"),xo.prototype.publishProxy("pinHeight","pins","pinHeight"),xo.prototype.publishProxy("pinWidth","pins","pinWidth"),xo.prototype.publishProxy("pinFontFamily","pins","pinFontFamily"),xo.prototype.publishProxy("pinFontSize","pins","pinFontSize"),xo.prototype.publishProxy("arrowHeight","pins","arrowHeight"),xo.prototype.publishProxy("arrowWidth","pins","arrowWidth"),xo.prototype.publish("latColumn",null,"set","latColumn",(function(){return this.columns()}),{optional:!0}),xo.prototype.publish("longColumn",null,"set","longColumn",(function(){return this.columns()}),{optional:!0}),xo.prototype.publish("weightColumn",null,"set","weightColumn",(function(){return this.columns()}),{optional:!0}),xo.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]});yo(".map_Layered .checkerFill{fill:red;stroke:red;opacity:.5}.map_Layered .checkerNoFill{fill:none;stroke:none;opacity:.5}.map_Layered .mesh{fill:none;stroke:#6d6e71;stroke-width:.25}.map_Layered .data{stroke:none;stroke-width:.25}.map_Layered .data .shape.selected{stroke:red;stroke-width:1.25px}");var Oo=window.__hpcc_topoJsonFolder||"./node_modules/@hpcc-js/map/TopoJSON";function Do(t){if(!arguments.length)return Oo;var e=Oo;return Oo=t,e}var Ao=function(t){function n(){var n=t.call(this)||this;return n._dataMap={},n._path=e.select(null),e.Utility.SimpleSelectionMixin.call(n),n}return h(n,t),n.prototype.data=function(t){var e=wo.prototype.data.apply(this,arguments);if(arguments.length){this._dataMap={},this._dataMinWeight=null,this._dataMaxWeight=null;var n=this;this.data().forEach((function(t){n._dataMap[t[0]]=t,(!n._dataMinWeight||t[1]<n._dataMinWeight)&&(n._dataMinWeight=t[1]),(!n._dataMaxWeight||t[1]>n._dataMaxWeight)&&(n._dataMaxWeight=t[1])}))}return e},n.prototype.getDataBounds=function(){var t=this._choroplethData.node().getBBox();return{x:t.x,y:t.y,width:t.width,height:t.height}},n.prototype.autoScale=function(){switch(this.autoScaleMode()){case"none":return;case"mesh":this.zoomToBBox(this.getBounds());break;case"data":this.zoomToBBox(this.getDataBounds())}},n.prototype.layerEnter=function(t,e,n){wo.prototype.layerEnter.apply(this,arguments),this._choroplethTransform=e,this._choroplethData=this._choroplethTransform.append("g").attr("class","data"),this._choropleth=this._choroplethTransform.append("path").attr("class","mesh")},n.prototype.layerUpdate=function(t,e){if(wo.prototype.layerUpdate.apply(this,arguments),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this._choroplethTransform.style("stroke",this.meshColor()).style("opacity",this.opacity()),!this.visible()||!this.meshVisible())return this._choropleth.attr("d",""),void delete this._prevProjection;(e||this._prevProjection!==t.projection()||this._prevInternalOnly!==this.internalOnly())&&(this._choropleth.attr("d",t._d3GeoPath(To(this._choroTopology,this._choroTopologyObjects,this.internalOnly()?function(t,e){return t!==e}:function(t,e){return!0}))),this._prevProjection=t.projection(),this._prevInternalOnly=this.internalOnly()),this._choropleth.style("stroke-width",this.meshStrokeWidth()).style("stroke",this.meshColor())},n.prototype.layerExit=function(t){delete this._prevProjection,delete this._prevInternalOnly},n.prototype.layerZoomed=function(e){t.prototype.layerZoomed.apply(this,arguments),this._choroplethData.style("stroke-width",this.meshVisible()?"0px":"".concat(.5/e.zoomScale(),"px"))},n.prototype.click=function(t,e,n){},n.prototype.dblclick=function(t,e,n){},n}(wo);Ao.prototype._class+=" map_Choropleth",Ao.prototype.mixin(e.Utility.SimpleSelectionMixin),Ao.prototype._palette=e.Palette.rainbow("default"),Ao.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Ao.prototype._palette.switch(),{tags:["Basic","Shared"]}),Ao.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),Ao.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),Ao.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),Ao.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),Ao.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width"),Ao.prototype.publish("internalOnly",!1,"boolean","Internal mesh only"),Ao.prototype.publish("autoScaleMode","mesh","set","Auto Scale",["none","mesh","data"],{tags:["Basic"],override:!0});var Io,Bo,No=(Io="application/json",Bo=function(t){return JSON.parse(t.responseText)},function(t,n){var i=function(t,n){var i,o,r,a,s=e.dispatch("beforesend","progress","load","error"),l=e.map(),h=new XMLHttpRequest,u=null,c=null,p=0;function d(t){var e,n=h.status;if(!n&&function(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}(h)||n>=200&&n<300||304===n){if(r)try{e=r.call(i,h)}catch(t){return void s.call("error",i,t)}else e=h;s.call("load",i,e)}else s.call("error",i,t)}if("undefined"!=typeof XDomainRequest&&!("withCredentials"in h)&&/^(http(s)?:)?\/\//.test(t)&&(h=new XDomainRequest),"onload"in h?h.onload=h.onerror=h.ontimeout=d:h.onreadystatechange=function(t){h.readyState>3&&d(t)},h.onprogress=function(t){s.call("progress",i,t)},i={header:function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?l.get(t):(null==e?l.remove(t):l.set(t,e+""),i)},mimeType:function(t){return arguments.length?(o=null==t?null:t+"",i):o},responseType:function(t){return arguments.length?(a=t,i):a},timeout:function(t){return arguments.length?(p=+t,i):p},user:function(t){return arguments.length<1?u:(u=null==t?null:t+"",i)},password:function(t){return arguments.length<1?c:(c=null==t?null:t+"",i)},response:function(t){return r=t,i},get:function(t,e){return i.send("GET",t,e)},post:function(t,e){return i.send("POST",t,e)},send:function(e,n,r){return h.open(e,t,!0,u,c),null==o||l.has("accept")||l.set("accept",o+",*/*"),h.setRequestHeader&&l.each((function(t,e){h.setRequestHeader(e,t)})),null!=o&&h.overrideMimeType&&h.overrideMimeType(o),null!=a&&(h.responseType=a),p>0&&(h.timeout=p),null==r&&"function"==typeof n&&(r=n,n=null),null!=r&&1===r.length&&(r=function(t){return function(e,n){t(null==e?n:null)}}(r)),null!=r&&i.on("error",r).on("load",(function(t){r(null,t)})),s.call("beforesend",i,h),h.send(null==n?null:n),i},abort:function(){return h.abort(),i},on:function(){var t=s.on.apply(s,arguments);return t===s?i:t}},null!=n){if("function"!=typeof n)throw new Error("invalid callback: "+n);return i.get(n)}return i}(t).mimeType(Io).response(Bo);if(null!=n){if("function"!=typeof n)throw new Error("invalid callback: "+n);return i.get(n)}return i}),Zo=null,Ro=null,jo=null,Go=function(t){function n(){return t.call(this)||this}return h(n,t),n.prototype.layerEnter=function(t,n,i){Ao.prototype.layerEnter.apply(this,arguments),this._choroTopology=Zo.topology,this._choroTopologyObjectsCountries=Zo.topology.objects.countries,this._choroTopologyObjectsLand=Zo.topology.objects.land,this._choroTopologyObjects=this._choroTopologyObjectsCountries,this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);var o=this;this.tooltipHTML((function(t){return o.tooltipFormat({label:t[0],value:t[1]})}))},n.prototype.layerUpdate=function(t){Ao.prototype.layerUpdate.apply(this,arguments),this._choroplethData.style("stroke",this.meshVisible()?null:"black"),this.choroPaths=this._choroplethData.selectAll(".shape").data(this.visible()?this.data():[],(function(t){return t[0]}));var e=this;this.choroPaths.enter().append("path").attr("class","shape").attr("vector-effect","non-scaling-stroke").call(this._selection.enter.bind(this._selection)).on("click",(function(t){e._dataMap[t[0]]&&e.click(e.rowToObj(e._dataMap[t[0]]),"weight",e._selection.selected(this))})).on("dblclick",(function(t){e._dataMap[t[0]]&&e.dblclick(e.rowToObj(e._dataMap[t[0]]),"weight",e._selection.selected(this))})).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show).merge(this.choroPaths).attr("d",(function(e){var n=t._d3GeoPath(jo[e[0]]);return n||console.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){Zo&&t(),No("".concat(Do(),"/countries.json"),(function(e){for(var n in Ro=Mo((Zo=e).topology,Zo.topology.objects.countries).features,jo={},Ro)Ro[n].id&&Zo.countryNames[Ro[n].id]&&(jo[Zo.countryNames[Ro[n].id].name]=Ro[n]);t()}))}))),this._topoJsonPromise},n}(Ao);Go.prototype._class+=" map_ChoroplethCountries";var Uo=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.layerEnter=function(t,e,n){Go.prototype.layerEnter.apply(this,arguments),this._choroTopologyObjects=this._choroTopologyObjectsLand},e}(Go);Uo.prototype._class+=" map_ChoroplethContinents";var Ho=null,Fo=null,Wo=null,Vo=function(t){function n(){var e=t.call(this)||this;return e.projection("AlbersUsaPr"),e}return h(n,t),n.prototype.layerEnter=function(t,n,i){Ao.prototype.layerEnter.apply(this,arguments),this._choroTopology=Ho.topology,this._choroTopologyObjects=Ho.topology.objects.counties,this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);var o=this;this.tooltipHTML((function(t){var e=t[0];return o.tooltipFormat({label:Ho.countyNames[e],value:o._dataMap[e]?o._dataMap[e][1]:"N/A"})}))},n.prototype.layerUpdate=function(t){Ao.prototype.layerUpdate.apply(this,arguments),this._choroplethData.style("stroke",this.meshVisible()?null:"black"),this.choroPaths=this._choroplethData.selectAll(".shape").data(this.visible()?this.data():[],(function(t){return t[0]}));var e=this;this.choroPaths.enter().append("path").attr("class","shape").attr("vector-effect","non-scaling-stroke").call(this._selection.enter.bind(this._selection)).on("click",(function(t){e.click(e.rowToObj(t),"weight",e._selection.selected(this))})).on("dblclick",(function(t){e.dblclick(e.rowToObj(t),"weight",e._selection.selected(this))})).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show).merge(this.choroPaths).attr("d",(function(e){var n=t._d3GeoPath(Wo[e[0]]);return n||console.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){Ho&&t(),No("".concat(Do(),"/us-counties.json"),(function(e){for(var n in Fo=Mo((Ho=e).topology,Ho.topology.objects.counties).features,Wo={},Fo)Fo[n].id&&(Wo[Fo[n].id]=Fo[n]);t()}))}))),this._topoJsonPromise},n.__inputs=[{id:"fips",type:"string"},{id:"value",type:"number"}],n}(Ao);Vo.prototype._class+=" map_ChoroplethCounties",Vo.prototype.publish("onClickFormatFIPS",!1,"boolean","format FIPS code as a String on Click");var qo=null,Yo=null,Ko=null,Xo=function(t){function n(){var e=t.call(this)||this;return e.projection("AlbersUsaPr"),e}return h(n,t),n.prototype.layerEnter=function(t,n,i){Ao.prototype.layerEnter.apply(this,arguments),this._choroTopology=qo.topology,this._choroTopologyObjects=qo.topology.objects.states,this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);var o=this;this.tooltipHTML((function(t){var e=Ko[t[0]].id;return o.tooltipFormat({label:qo.stateNames[e].name,value:t[1]})}))},n.prototype.layerUpdate=function(t){Ao.prototype.layerUpdate.apply(this,arguments),this._choroplethData.style("stroke",this.meshVisible()?null:"black"),this.choroPaths=this._choroplethData.selectAll(".shape").data(this.visible()?this.data():[],(function(t){return t[0]}));var e=this;this.choroPaths.enter().append("path").attr("class","shape").attr("vector-effect","non-scaling-stroke").call(this._selection.enter.bind(this._selection)).on("click",(function(t){e.click(e.rowToObj(t),"weight",e._selection.selected(this))})).on("dblclick",(function(t){e.dblclick(e.rowToObj(t),"weight",e._selection.selected(this))})).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show).merge(this.choroPaths).attr("d",(function(e){var n=t._d3GeoPath(Ko[e[0]]);return n||console.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){qo&&t(),No("".concat(Do(),"/us-states.json"),(function(e){for(var n in Yo=Mo((qo=e).topology,qo.topology.objects.states).features,Ko={},Yo)Yo[n].id&&(Ko[qo.stateNames[Yo[n].id].code]=Yo[n]);t()}))}))),this._topoJsonPromise},n.__inputs=[{id:"state",type:"string"},{id:"value",type:"number"}],n}(Ao);Xo.prototype._class+=" map_ChoroplethStates";var Jo=function(t){function e(){return t.call(this)||this}return h(e,t),e}(bo);Jo.prototype._class+=" map_ChoroplethStatesHeat";yo(".map_Layered .map_GeoHash .data{stroke:none}.map_Layered .map_GeoHash .data.selected{stroke:red}.map_Layered .map_GeoHash .data.over{stroke:orange}.map_Layered .map_GeoHash .data.selected.over{stroke:red}");var Qo=function(t){function n(){return t.call(this)||this}return h(n,t),n.prototype.data=function(t){var e=wo.prototype.data.apply(this,arguments);return arguments.length&&(this._dataMinWeight=null,this._dataMaxWeight=null,this.data().forEach((function(t){(!this._dataMinWeight||t[1]<this._dataMinWeight)&&(this._dataMinWeight=t[1]),(!this._dataMaxWeight||t[1]>this._dataMaxWeight)&&(this._dataMaxWeight=t[1])}),this)),e},n.prototype.layerEnter=function(t,n,i){wo.prototype.layerEnter.apply(this,arguments),this.geohash=new co,this._geoHashTransform=n.append("g").attr("class","map_GeoHash"),this._selection=new e.Utility.SimpleSelection(this,this._geoHashTransform),this.geoHashPaths=e.select(null)},n.prototype.layerUpdate=function(t){wo.prototype.layerUpdate.apply(this,arguments),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this._geoHashTransform.style("opacity",this.opacity()),this.geoHashPaths=this._geoHashTransform.selectAll(".data").data(this.visible()?this.data():[],(function(t){return t[0]}));var e=this;this.geoHashPaths.enter().append("path").attr("class","data").call(this._selection.enter.bind(this._selection)).on("click",(function(t){e.click(e.rowToObj(t),"weight",e._selection.selected(this))})).on("dblclick",(function(t){e.dblclick(e.rowToObj(t),"weight",e._selection.selected(this))})).merge(this.geoHashPaths).attr("d",(function(n){var i=e.geohash.bounds(n[0]),o={type:"LineString",coordinates:[[i.sw.lon,i.ne.lat],[i.ne.lon,i.ne.lat],[i.ne.lon,i.sw.lat],[i.sw.lon,i.sw.lat]]};return t._d3GeoPath(o)})).style("fill",(function(t){return e._palette(t[1],e._dataMinWeight,e._dataMaxWeight)})),this.geoHashPaths.exit().remove()},n.prototype.click=function(t,e,n){},n.prototype.dblclick=function(t,e,n){},n}(wo);Qo.prototype._class+=" map_GeoHash",Qo.prototype._palette=e.Palette.rainbow("default"),Qo.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Qo.prototype._palette.switch(),{tags:["Basic","Shared"]}),Qo.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),Qo.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),Qo.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),Qo.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),Qo.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width");var $o={exports:{}};!function(t,e){!function(e,n){if(null===(typeof window!=="undefined"?window:null))throw new Error("Google-maps package can be used only in browser");t.exports=function(){var t="3.31",e=null,n=null,i=!1,o=[],r=[],a=null,s={URL:"https://maps.googleapis.com/maps/api/js",KEY:null,LIBRARIES:[],CLIENT:null,CHANNEL:null,LANGUAGE:null,REGION:null};s.VERSION=t,s.WINDOW_CALLBACK_NAME="__google_maps_api_provider_initializator__",s._googleMockApiObject={},s.load=function(t){null===n?!0===i?t&&o.push(t):(i=!0,window[s.WINDOW_CALLBACK_NAME]=function(){l(t)},s.createLoader()):t&&t(n)},s.createLoader=function(){(e=document.createElement("script")).type="text/javascript",e.src=s.createUrl(),document.body.appendChild(e)},s.isLoaded=function(){return null!==n},s.createUrl=function(){var t=s.URL;return t+="?callback="+s.WINDOW_CALLBACK_NAME,s.KEY&&(t+="&key="+s.KEY),s.LIBRARIES.length>0&&(t+="&libraries="+s.LIBRARIES.join(",")),s.CLIENT&&(t+="&client="+s.CLIENT),s.CHANNEL&&(t+="&channel="+s.CHANNEL),s.LANGUAGE&&(t+="&language="+s.LANGUAGE),s.REGION&&(t+="&region="+s.REGION),s.VERSION&&(t+="&v="+s.VERSION),t},s.release=function(l){var h=function(){s.KEY=null,s.LIBRARIES=[],s.CLIENT=null,s.CHANNEL=null,s.LANGUAGE=null,s.REGION=null,s.VERSION=t,n=null,i=!1,o=[],r=[],void 0!==window.google&&delete window.google,void 0!==window[s.WINDOW_CALLBACK_NAME]&&delete window[s.WINDOW_CALLBACK_NAME],null!==a&&(s.createLoader=a,a=null),null!==e&&(e.parentElement.removeChild(e),e=null),l&&l()};i?s.load((function(){h()})):h()},s.onLoad=function(t){r.push(t)},s.makeMock=function(){a=s.createLoader,s.createLoader=function(){window.google=s._googleMockApiObject,window[s.WINDOW_CALLBACK_NAME]()}};var l=function(t){var e;for(i=!1,null===n&&(n=window.google),e=0;e<r.length;e++)r[e](n);for(t&&t(n),e=0;e<o.length;e++)o[e](n);o=[]};return s}()}()}($o);var tr=$o.exports,er=s({__proto__:null,default:tr},[$o.exports]);yo(".map_GMap .marker{fill:#656565;stroke:none;stroke-width:1px}.map_GMap .map_Layered{cursor:auto;pointer-events:auto}.gm-style img{max-width:none}.gm-style label{display:inline;width:auto}");var nr=tr||er;t.google=null;var ir,or=15e3;function rr(e){return ir||(ir=o.promiseTimeout(or,new Promise((function(n,i){if(t.google)n();else if(e)t.google=e,n();else{window.__hpcc_gmap_apikey||console.warn("__hpcc_gmap_apikey does not contain a valid API key, reverting to developers key (expect limited performance)");try{nr.KEY=window.__hpcc_gmap_apikey||"AIzaSyDwGn2i1i_pMZvnqYJN1BksD_tjYaCOWKg",nr.LIBRARIES=["geometry","drawing"],nr.load((function(e){t.google=e,n()}))}catch(t){console.warn("Failed to initialize Google Map API: ".concat(t.message)),n()}}}))).catch((function(t){console.warn("Timed out initializing Google Map API after ".concat(or,"ms."))}))),ir}var ar=function(){function e(t){this._userShapes=[],this.mapContext=t}return e.prototype.add=function(t){this._userShapes.indexOf(t)>=0||this._userShapes.push(t)},e.prototype.remove=function(t){var e=this._userShapes.indexOf(t);e>=0&&this._userShapes.splice(e,1),t.setMap(null)},e.prototype.save=function(){var t=this;return this._userShapes.map((function(e){return t._saveShape(e)}))},e.prototype.load=function(t){this._deserializeShapes(t)},e.prototype._saveShape=function(t){var e={},n={circle:function(t){e.type="circle",e.pos={lat:t.center.lat(),lng:t.center.lng()},e.radius=t.radius},rectangle:function(t){e.type="rectangle",e.bounds={ne:t.bounds.getNorthEast(),sw:t.bounds.getSouthWest()}},polygon:function(t){e.type=t.__hpcc_type;var n=t.getPath();e.vertices=[];for(var i=0;i<n.length;i++)e.vertices.push(n.getAt(i))},polyline:function(t){n.polygon(t)}};return n[t.__hpcc_type](t),e.strokeWeight=t.strokeWeight,e.fillColor=t.fillColor,e.fillOpacity=t.fillOpacity,e.editable=t.editable,e.clickable=t.clickable||!0,e},e.prototype._deserializeShapes=function(e){for(var n=JSON.parse(e),i=0,o=.45,r="#1f77b4",a=!0,s=!0,l={circle:function(e,n){return new t.google.maps.Circle({strokeWeight:e.strokeWeight||i,fillColor:e.fillColor||r,fillOpacity:e.fillOpacity||o,editable:e.editable||a,clickable:e.clickable||s,map:n,center:e.pos,radius:e.radius})},rectangle:function(e,n){return new t.google.maps.Rectangle({strokeWeight:e.strokeWeight||i,fillColor:e.fillColor||r,fillOpacity:e.fillOpacity||o,editable:e.editable||a,clickable:e.clickable||s,map:n,bounds:{north:e.bounds.ne.lat,west:e.bounds.sw.lng,south:e.bounds.sw.lat,east:e.bounds.ne.lng}})},polygon:function(e,n){return new t.google.maps.Polygon({strokeWeight:e.strokeWeight||i,fillColor:e.fillColor||r,fillOpacity:e.fillOpacity||o,editable:e.editable||a,clickable:e.clickable||s,map:n,paths:e.vertices})},polyline:function(e,n){return new t.google.maps.Polyline({strokeWeight:e.strokeWeight||i,fillColor:e.fillColor||r,fillOpacity:e.fillOpacity||o,editable:e.editable||a,clickable:e.clickable||s,map:n,path:e.vertices})}},h=0;h<n.length;h++){var u=l[n[h].type](n[h],this.mapContext._googleMap);this.mapContext.onDrawingComplete({type:n[h].type,overlay:u})}},e}(),sr=function(n){function o(){var e=n.call(this)||this;e._tag="div";var o=e;function r(e,n,i){var r=o._overlay.getProjection(),a=r.fromLatLngToDivPixel(new t.google.maps.LatLng(n,i)),s=r.getWorldWidth(),l=parseFloat(e.widgetX()),h=parseFloat(e.widgetY()),u=parseFloat(e.widgetWidth());for(a.x-=l,a.y-=h;a.x<0;)a.x+=s;for(;a.x>u;)a.x-=s;return a}return e._userShapes=new ar(e),e._worldSurface=new i.AbsoluteSurface,e._worldSurface.project=function(t,e){return r(this,t,e)},e._viewportSurface=new i.AbsoluteSurface,e._viewportSurface.project=function(t,e){return r(this,t,e)},e}return h(o,n),o.prototype.data=function(t){var n=e.HTMLWidget.prototype.data.apply(this,arguments);return n},o.prototype.getMapType=function(){switch(this.type()){case"terrain":return t.google.maps.MapTypeId.TERRAIN;case"road":default:return t.google.maps.MapTypeId.ROADMAP;case"satellite":return t.google.maps.MapTypeId.SATELLITE;case"hybrid":return t.google.maps.MapTypeId.HYBRID}},o.prototype.getMapOptions=function(){return{panControl:this.panControl(),zoomControl:this.zoomControl(),fullscreenControl:this.fullscreenControl(),mapTypeControl:this.mapTypeControl(),scaleControl:this.scaleControl(),streetViewControl:this.streetViewControl(),overviewMapControl:this.overviewMapControl(),overviewMapControlOptions:{opened:!0},styles:this.googleMapStyles()}},o.prototype.size=function(n){var i=e.HTMLWidget.prototype.size.apply(this,arguments);return arguments.length&&this._googleMapNode&&(this._googleMapNode.style("width",n.width+"px").style("height",n.height+"px"),t.google.maps.event.trigger(this._googleMap,"resize")),i},o.prototype.enter=function(i,o){n.prototype.enter.call(this,i,o);var r=this;this._googleGeocoder=new t.google.maps.Geocoder,this._googleMapNode=o.append("div").style("width",this.width()+"px").style("height",this.height()+"px"),this._googleMap=new t.google.maps.Map(this._googleMapNode.node(),{zoom:this.zoom(),center:new t.google.maps.LatLng(this.centerLat(),this.centerLong()),mapTypeId:this.getMapType(),disableDefaultUI:!0}),this._overlay=function(e,n,i){function o(e,n,i){t.google.maps.OverlayView.call(this),this._div=null,this._worldSurface=n,this._viewportSurface=i,this._map=e,this.setMap(e);var o=this;t.google.maps.event.addListener(e,"bounds_changed",(function(){o.draw()})),t.google.maps.event.addListener(e,"projection_changed",(function(){o.draw()})),this._prevWorldMin={x:0,y:0},this._prevWorldMax={x:0,y:0},this._prevMin={x:0,y:0},this._prevMax={x:0,y:0}}return o.prototype=t.google.maps.OverlayView.prototype,o.prototype.onAdd=function(){this.div=document.createElement("div"),this._viewportSurface.target(null).target(this.div).units("pixels"),this.getPanes().overlayMouseTarget.appendChild(this.div)},o.prototype.draw=function(){var e=this.getProjection();if(e){for(var n=this._map.getBounds(),i=e.fromLatLngToDivPixel(n.getCenter()),o=e.fromLatLngToDivPixel(n.getSouthWest()),r=e.fromLatLngToDivPixel(n.getNorthEast()),a={x:o.x,y:r.y},s={x:r.x,y:o.y},l=e.getWorldWidth();s.x<a.x+100;)s.x+=l;for(;a.x>i.x;)a.x-=l,s.x-=l;a.x===this._prevMin.x&&a.y===this._prevMin.y&&s.x===this._prevMax.x&&s.y===this._prevMax.y||(this._viewportSurface.resize({width:0,height:0}).widgetX(a.x).widgetY(a.y).widgetWidth(s.x-a.x).widgetHeight(s.y-a.y),this._viewportSurface._renderCount?(this._viewportSurface.render(),this._prevMin=a,this._prevMax=s):this._viewportSurface.lazyRender());for(var h=e.fromLatLngToDivPixel(new t.google.maps.LatLng(85,-179.9)),u=e.fromLatLngToDivPixel(new t.google.maps.LatLng(-85,179.9));u.x<h.x+100;)u.x+=l;for(;h.x>i.x;)h.x-=l,u.x-=l;h.x===this._prevWorldMin.x&&h.y===this._prevWorldMin.y&&u.x===this._prevWorldMax.x&&u.y===this._prevWorldMax.y||(this._worldSurface.widgetX(h.x).widgetY(h.y).widgetWidth(u.x-h.x).widgetHeight(u.y-h.y).render(),this._prevWorldMin=u,this._prevWorldMax=u)}},o.prototype.onRemove=function(){this._viewportSurface.target(null),this._div.parentNode.removeChild(this._div),this._div=null},new o(e,n,i)}(this._googleMap,this._worldSurface,this._viewportSurface),this._googleMap.addListener("center_changed",(function(){r.centerLat(r._googleMap.center.lat()),r._prevCenterLat=r.centerLat(),r.centerLong(r._googleMap.center.lng()),r._prevCenterLong=r.centerLong(),r._googleMapPanorama.setPosition({lat:r.centerLat(),lng:r.centerLong()}),r.zoom(r._googleMap.getZoom()),r._prevZoom=r.zoom(),r._overlay.draw()})),this._googleMap.addListener("zoom_changed",(function(){r.zoom(r._googleMap.zoom),r._prevZoom=r.zoom()})),this._googleStreetViewService=new t.google.maps.StreetViewService,this._googleMapPanorama=this._googleMap.getStreetView(),this._googleMapPanorama.addListener("visible_changed",(function(){r.streetView(r._googleMapPanorama.getVisible()),r._prevStreetView=r.streetView()})),this._circleMap=e.map([]),this._pinMap=e.map([]),this._prevCenterLat=this.centerLat(),this._prevCenterLong=this.centerLong(),this._prevZoom=this.zoom();var a={strokeWeight:0,fillOpacity:.45,fillColor:"#1f77b4",editable:!0,clickable:!0};this._drawingManager=new t.google.maps.drawing.DrawingManager({drawingMode:t.google.maps.drawing.OverlayType.MARKER,drawingControl:!0,drawingControlOptions:{position:t.google.maps.ControlPosition.TOP_CENTER,drawingModes:["polygon","rectangle","circle"]},rectangleOptions:a,circleOptions:a,polygonOptions:a}),this.drawingState()&&this._userShapes.load(this.drawingState())},o.prototype.update=function(e,n){var i=this;this._googleMapNode.style("width",this.width()+"px").style("height",this.height()+"px"),this._googleMap.setMapTypeId(this.getMapType()),this._googleMap.setOptions(this.getMapOptions()),this.centerAddress_exists()&&this._prevCenterAddress!==this.centerAddress()&&(this._prevCenterAddress=this.centerAddress(),this._googleGeocoder.geocode({address:this.centerAddress()},(function(e,n){if(n===t.google.maps.GeocoderStatus.OK){var o=e[0].geometry.bounds||e[0].geometry.viewport;i._googleMap.fitBounds(o),i.streetView()&&i.useComputedHeading()&&i.streetViewAt({lat:e[0].geometry.location.lat(),lng:e[0].geometry.location.lng()},50)}else i.statusError({data:e,status:n})}))),this._prevCenterLat===this.centerLat()&&this._prevCenterLong===this.centerLong()||(this._googleMap.setCenter(new t.google.maps.LatLng(this.centerLat(),this.centerLong())),this._prevCenterLat=this.centerLat(),this._prevCenterLong=this.centerLong()),this._prevZoom!==this.zoom()&&(this._googleMap.setZoom(this.zoom()),this._prevZoom=this.zoom()),this.updateCircles(),this.updatePins(),this._prevStreetView!==this.streetView()&&(this.streetView()?(this._googleMapPanorama.setPosition({lat:this.centerLat(),lng:this.centerLong()}),this._googleMapPanorama.setPov({heading:0,pitch:0}),this._googleMapPanorama.setVisible(!0)):this._googleMapPanorama.setVisible(!1),this._prevStreetView=this.streetView()),this.drawingTools()?(this._drawingManager.setMap(this._googleMap),t.google.maps.event.addListener(this._drawingManager,"overlaycomplete",(function(){o.prototype.onDrawingComplete.apply(i,arguments)}))):(this._drawingManager.setMap(null),t.google.maps.event.clearInstanceListeners(this._drawingManager))},o.prototype.render=function(t){var e=this,i=arguments;return rr().then((function(){n.prototype.render.apply(e,i)})),this},o.prototype.streetViewAt=function(e,n){void 0===n&&(n=1e3);var i=this,o=this.outdoorStreetViewOnly()?t.google.maps.StreetViewSource.OUTDOOR:t.google.maps.StreetViewSource.DEFAULT;this._googleStreetViewService.getPanorama({location:e,radius:n,source:o},(function(n,o){if("OK"===o){var r=new t.google.maps.Marker({position:e,map:i._googleMap}),a=t.google.maps.geometry.spherical.computeHeading(n.location.latLng,new t.google.maps.LatLng(e.lat,e.lng));i._googleMapPanorama.setPano(n.location.pano),i._googleMapPanorama.setPov({heading:a,pitch:0}),i.showStreetViewMarker()||r.setVisible(!1),i._googleMapPanorama.setVisible(!0);var s=t.google.maps.event.addListener(i._googleMap.getStreetView(),"visible_changed",(function(){this.getVisible()||(r.setMap(null),t.google.maps.event.removeListener(s))}))}else i.statusError({data:n,status:o})}))},o.prototype.updateCircles=function(){function t(t){return t[0]+"_"+t[1]}var n=[],i=e.map(this._circleMap.keys(),(function(t){return t}));this.data().forEach((function(e){i.remove(t(e)),e[3]&&!this._circleMap.has(t(e))?n.push(e):e[3]&&this._circleMap.has(t(e))||!e[3]&&this._circleMap.has(t(e))&&i.set(t(e),!0)}),this),n.forEach((function(e){var n=this.createCircle(e[0],e[1],e[3]);this._circleMap.set(t(e),n)}),this);var o=this;i.each((function(t){o._circleMap.get(t).setMap(null),o._circleMap.remove(t)}))},o.prototype.updatePins=function(){function t(t){return t[0]+"_"+t[1]}var n=[],i=[],o=e.map(this._pinMap.keys(),(function(t){return t}));this.data().forEach((function(e){o.remove(t(e)),e[2]&&!this._pinMap.has(t(e))?n.push(e):e[2]&&this._pinMap.has(t(e))?i.push(e):!e[2]&&this._pinMap.has(t(e))&&o.set(t(e),!0)}),this),n.forEach((function(e){var n=this.createMarker(e[0],e[1],e[2]);this._pinMap.set(t(e),n)}),this),i.forEach((function(e){this._pinMap.get(t(e)).setIcon(this.createIcon(e[2]))}),this);var r=this;o.each((function(t){r._pinMap.get(t).setMap(null),r._pinMap.remove(t)}))},o.prototype.createIcon=function(t){return{path:"M 0,0 C -2,-20 -10,-22 -10,-30 A 10,10 0 1,1 10,-30 C 10,-22 2,-20 0,0 z M -2,-30",fillColor:t.fillColor,fillOpacity:t.fillOpacity||.8,scale:.5,strokeColor:t.strokeColor||"black",strokeWeight:.25}},o.prototype.createMarker=function(e,n,i){return new t.google.maps.Marker({position:new t.google.maps.LatLng(e,n),animation:t.google.maps.Animation.DROP,title:i.title||"",icon:this.createIcon(i),map:this._googleMap})},o.prototype.createCircle=function(e,n,i){return i.radius=i.radius||1,new t.google.maps.Circle({center:new t.google.maps.LatLng(e,n),radius:16093*i.radius/10,fillColor:i.fillColor||"red",strokeColor:i.strokeColor||i.fillColor||"black",strokeWeight:.5,map:this._googleMap})},o.prototype.zoomTo=function(e,n){if(!this._renderCount)return this;n=n||this.singleZoomToMaxZoom();var i=0,o=new t.google.maps.LatLngBounds;switch(e.forEach((function(e){var n=new t.google.maps.LatLng(e[0],e[1]);o.extend(n),++i})),i){case 0:break;case 1:this._googleMap.setCenter(o.getCenter()),this._googleMap.setZoom(n);break;default:this._googleMap.fitBounds(o)}return this},o.prototype.zoomToFit=function(){return this.zoomTo(this.data())},o.prototype.drawingOptions=function(t){return arguments.length?(this._drawingManager.setOptions(t),this):this._drawingManager},o.prototype.userShapeSelection=function(t){return arguments.length?(this._userShapeSelection&&this._userShapeSelection.setEditable(!1),this._userShapeSelection=t,this._userShapeSelection&&this._userShapeSelection.setEditable(!0),this):this._userShapeSelection},o.prototype.deleteUserShape=function(t){this._userShapeSelection===t&&this.userShapeSelection(null),this._userShapes.remove(t)},o.prototype.onDrawingComplete=function(e){if(e.type!==t.google.maps.drawing.OverlayType.MARKER){this._drawingManager.setDrawingMode(null);var n=e.overlay;n.__hpcc_type=e.type,this._userShapes.add(n);var i=this,o=!1;window.addEventListener("keydown",(function(t){"Control"!==t.keyIdentifier&&!0!==t.ctrlKey||(o=!0)})),window.addEventListener("keyup",(function(t){!1===t.ctrlKey&&(o=!1)})),t.google.maps.event.addListener(n,"click",(function(t){return i.userShapeSelection(n),t&&!0===o&&(i.deleteUserShape(n),i.drawingState(JSON.stringify(i._userShapes.save()))),!1})),this.userShapeSelection(n),this.drawingState(JSON.stringify(this._userShapes.save()))}},o.prototype.statusError=function(t){console.warn("Data not found for this location.")},o}(e.HTMLWidget);sr.prototype._class+=" map_GMap",sr.prototype.publish("outdoorStreetViewOnly",!1,"boolean","If true, streetView will only display outdoor locations"),sr.prototype.publish("showStreetViewMarker",!1,"boolean","If true, streetView marker will be hidden"),sr.prototype.publish("useComputedHeading",!1,"boolean","If true, centerAddress streetView compute the ideal panorama heading"),sr.prototype.publish("type","road","set","Map Type",["terrain","road","satellite","hybrid"],{tags:["Basic"]}),sr.prototype.publish("centerLat",42.877742,"number","Center Latitude",null,{tags:["Basic"]}),sr.prototype.publish("centerLong",-97.380979,"number","Center Longitude",null,{tags:["Basic"]}),sr.prototype.publish("centerAddress",null,"string","Address to center map on",null,{tags:["Basic"],optional:!0}),sr.prototype.publish("zoom",4,"number","Zoom Level",null,{tags:["Basic"]}),sr.prototype.publish("singleZoomToMaxZoom",14,"number","Max zoomTo level with single item"),sr.prototype.publish("panControl",!0,"boolean","Pan Controls",null,{tags:["Basic"]}),sr.prototype.publish("zoomControl",!0,"boolean","Zoom Controls",null,{tags:["Basic"]}),sr.prototype.publish("scaleControl",!0,"boolean","Scale Controls",null,{tags:["Basic"]}),sr.prototype.publish("mapTypeControl",!1,"boolean","Map Type Controls",null,{tags:["Basic"]}),sr.prototype.publish("fullscreenControl",!1,"boolean","Fullscreen Controls",null,{tags:["Basic"]}),sr.prototype.publish("streetViewControl",!1,"boolean","StreetView Controls",null,{tags:["Basic"]}),sr.prototype.publish("overviewMapControl",!1,"boolean","OverviewMap Controls",null,{tags:["Basic"]}),sr.prototype.publish("streetView",!1,"boolean","Streetview",null,{tags:["Basic"]}),sr.prototype.publish("drawingTools",!1,"boolean","Drawing Tools",null,{tags:["Basic"]}),sr.prototype.publish("drawingState","","string","Map Drawings",null,{disable:function(t){return!1===t.drawingTools()}}),sr.prototype.publish("googleMapStyles",{},"object","Styling for map colors etc",null,{tags:["Basic"]});var lr=function(t){function e(e,n){var i=t.call(this)||this;return i.gmap=e,i.surface=n,i.autoScaleMode("none"),i.zoomable(!1).zoomDuration(10),i}return h(e,t),e.prototype.getProjection=function(){return this.gmap._overlay.getProjection()},e.prototype.render=function(e){var n=this;return t.prototype.render.call(this,(function(t){var i=n.getProjection();if(i){var o=new window.google.maps.LatLng(0,0),r=i.fromLatLngToDivPixel(o),a=n.surface.widgetX(),s=n.surface.widgetY(),l=[r.x-a,r.y-s],h=n.gmap._googleMap.getZoom();n.zoomTo(l,.0625*(1<<h),0)}e&&e(t)})),this},e}(bo),hr=function(e){function n(){var t=e.call(this)||this;return t.layered=new lr(t,t._viewportSurface),t._viewportSurface.widget(t.layered),t}return h(n,e),n.prototype.invert=function(t,e){return this.layered.invert(t,e)},n.prototype.rproject=function(e,n){var i=this.layered.getProjection().fromDivPixelToLatLng(new t.google.maps.Point(e,n));return{lat:i.lat(),lng:i.lng()}},n.prototype.updateCircles=function(){},n.prototype.updatePins=function(){},n.prototype.layers=function(t){return arguments.length?(this.layered.layers(t),this):this.layered.layers()},n.prototype.render=function(t){var n=this;return e.prototype.render.call(this,(function(e){n.layered.preRender().then((function(){n.layered.render((function(e){t&&t(e)}))}))}))},n}(sr);hr.prototype._class+=" map_GMapLayered";var ur=function(t){function e(){var e=t.call(this)||this,n=e;return e._counties=(new Vo).paletteID("Blues").meshVisible(!1).opacity(.8).columns(["fips","weight"]).on("click",(function(t,e,i){n.click(t,e,i)})).on("dblclick",(function(t,e,i){n.dblclick(t,e,i)})),e}return h(e,t),e.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),this.layers([this._counties])},e.prototype.update=function(e,n){this._counties.data(this.data()),t.prototype.update.call(this,e,n),this._palette=this._counties._palette,this._dataMinWeight=this._counties._dataMinWeight,this._dataMaxWeight=this._counties._dataMaxWeight},e.prototype.render=function(e){var n=this;return t.prototype.render.call(this,(function(t){if(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}(hr);ur.prototype._class+=" map_GMapCounties",ur.prototype.publish("autoScale",!1,"boolean","Auto scale to data");var cr=function(t){function n(){return t.call(this)||this}return h(n,t),n.prototype.enter=function(){t.prototype.enter.apply(this,arguments);var n=(new r.Graph).layout("None").zoomable(!1),i=n.render,o=this;n.render=function(t){var n=[],a=[],s=null;o.data().forEach((function(t){var i=o._viewportSurface.project(t[0],t[1]),l=(new e.Shape).shape("circle").radius(3).data(t).pos(i);n.push(l),s&&a.push((new r.Edge).sourceVertex(s).targetVertex(l).sourceMarker("none").targetMarker("arrow")),s=l})),this.data({vertices:n,edges:a});var l=i.apply(this,arguments);return l},this._viewportSurface.widget(n)},n}(sr);cr.prototype._class+=" map_GMapGraph";var pr=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.enter=function(){t.prototype.enter.apply(this,arguments);var e=new a.HeatMap,n=e.render,i=this;e.render=function(t){return this.data(i.data().map((function(t){var e=i._viewportSurface.project(t[0],t[1]);return[e.x,e.y,t[4]]}))),n.apply(this,arguments),this},this._viewportSurface.widget(e)},e}(sr);pr.prototype._class+=" map_GMapHeat";yo(".map_Layered .pin>path{stroke:#000;cursor:pointer}.map_Layered .pin.selected>path{stroke-width:1px;stroke:red}.map_Layered .pin.over>path{stroke:orange}.map_Layered .pin.selected.over>path{stroke-width:1px;stroke:red}");var dr=function(t){function n(){var n=t.call(this)||this;return e.Utility.SimpleSelectionMixin.call(n),n._geohash=new co,n}return h(n,t),n.prototype.pinsData=function(){var t=this._db.fieldByLabel(this.geohashColumn()),e=this._db.fieldByLabel(this.tooltipColumn()),n=this._db.fieldByLabel(this.latColumn()),i=this._db.fieldByLabel(this.longColumn()),o=this;return this.data().filter((function(t){var e=n?t[n.idx]:t[0],r=i?t[i.idx]:t[1];return!o.omitNullLatLong()||0!==e||0!==r})).map((function(o,r){var a={idx:r,lat:n?o[n.idx]:o[0],long:i?o[i.idx]:o[1],ext:o[2]instanceof Object?o[2]:{},origRow:o};if(t)try{var s=this._geohash.bounds(o[t.idx]);a.lat=(s.ne.lat+s.sw.lat)/2,a.long=(s.ne.lon+s.sw.lon)/2}catch(t){}return e&&(a.ext.tooltip=o[e.idx]),a}),this)},n.prototype.layerEnter=function(t,n,i){wo.prototype.layerEnter.apply(this,arguments),this._pinsTransform=n,this._selection.widgetElement(this._pinsTransform),this.pinsPaths=e.select(null),this.tooltipHTML((function(t){return void 0===t.ext.tooltip?"":t.ext.tooltip}))},n.prototype.layerUpdate=function(t){wo.prototype.layerUpdate.apply(this,arguments),this._pinsTransform.style("opacity",this.opacity()),this.pinsPaths=this._pinsTransform.selectAll(".pin").data(this.visible()?this.pinsData():[],(function(t){return t.idx}));var n=this,i=this.pinsPaths.enter().append("g").attr("class","pin").call(this._selection.enter.bind(this._selection)).on("click",(function(t){n.click(n.rowToObj(t.origRow),"geohash",n._selection.selected(this))})).on("dblclick",(function(t){n.dblclick(n.rowToObj(t.origRow),"geohash",n._selection.selected(this))})).on("mouseover",(function(t){e.Platform.isIE||this.parentNode.appendChild(this)})).on("mouseout.tooltip",(function(t){t.ext&&t.ext.tooltip&&n.tooltip.hide.apply(this,arguments)})).on("mousemove.tooltip",(function(t){t.ext&&t.ext.tooltip&&n.tooltip.show.apply(this,arguments)})).each((function(t){var n=e.select(this);n.append("path").attr("class","data"),n.append("text").attr("text-anchor","middle")})).merge(this.pinsPaths);i.selectAll("text").style("stroke",this.fontColor()).style("fill",this.fontColor()).style("font-size",this.fontSize()).style("font-family",this.fontFamily()).style("dominant-baseline",this.textBaseline()).attr("dx",0).attr("dy",this.pinTextDY()).text((function(t){return t.ext&&t.ext.text?t.ext.text:""}));var o=this.svgPinPath();i.selectAll("path.data").attr("d",o).attr("stroke-width",this.strokeWidth()+"px").style("display",(function(e){return t.project(e.lat,e.long)?null:"none"})).style("stroke",(function(t){return t.ext&&t.ext.strokeColor?t.ext.strokeColor:n.strokeColor()})).style("fill",(function(t){return t.ext&&t.ext.fillColor?t.ext.fillColor:n.fillColor()})),this.pinsPaths.exit().remove()},n.prototype.layerZoomed=function(t){wo.prototype.layerZoomed.apply(this,arguments),this.pinsPaths.attr("transform",(function(e){var n=t.project(e.lat,e.long);return n||(n=[0,0]),"translate("+n[0]+", "+n[1]+")scale("+1/t.zoomScale()+")"}))},n.prototype.pinTextDY=function(){switch(this.pinType()){case"pin":case"rectangle-pin":return-this.arrowHeight();case"circle":case"rectangle":return 0}},n.prototype.svgPinPath=function(){switch(this.pinType()){case"pin":return this.circlePinPath();case"circle":return this.circlePath();case"rectangle":return this.rectanglePath();case"rectangle-pin":return this.rectanglePinPath()}},n.prototype.rectanglePinPath=function(){var t=this.pinWidth(),e=this.pinHeight(),n=this.cornerRadius(),i=this.arrowHeight(),o=this.arrowWidth(),r=(t-2*n-o)/2;return"M"+(0-t/2)+","+(0-e+n)+"a"+-n+","+-n+" 0 0 1 "+n+","+-n+"h"+(t+2*-n)+"a"+n+","+n+" 0 0 1 "+n+","+n+"v"+(e+2*-n)+"a"+n+","+n+" 0 0 1 "+-n+","+n+"h"+-r+"l"+-o/2+","+i+"l"+-o/2+","+-i+"h"+-r+"a"+-n+","+-n+" 0 0 1 "+-n+","+-n+"z"},n.prototype.rectanglePath=function(){var t=this.pinWidth(),e=this.pinHeight(),n=this.cornerRadius(),i=-e/2;return"M"+-t/2+","+(i+=n)+"a"+-n+","+-n+" 0 0 1 "+n+","+-n+"h"+(t+2*-n)+"a"+n+","+n+" 0 0 1 "+n+","+n+"v"+(e+2*-n)+"a"+n+","+n+" 0 0 1 "+-n+","+n+"h"+(2*n-t)+"a"+-n+","+-n+" 0 0 1 "+-n+","+-n+"z"},n.prototype.circlePinPath=function(){var t=this.arrowHeight(),e=this.arrowWidth(),n=e/2,i=-t;return"M"+(0-e/2)+","+(0-t)+"c"+-n+" "+i+", "+(e+n)+" "+i+", "+e+" 0l"+-e/2+","+t+"l"+-e/2+","+-t+"z"},n.prototype.circlePath=function(){var t=+this.pinRadius();return"M 0, 0 m ".concat(-t,", 0 a ").concat(t,",").concat(t," 0 1,0 ").concat(2*t,",0 a ").concat(t,",").concat(t," 0 1,0 ").concat(2*-t,",0")},n.prototype.click=function(t,e,n){},n.prototype.dblclick=function(t,e,n){},n}(wo);dr.prototype._class+=" map_Pins",dr.prototype.mixin(e.Utility.SimpleSelectionMixin),dr.prototype.publish("geohashColumn",null,"set","Geohash column",(function(){return this.columns()}),{optional:!0}),dr.prototype.publish("tooltipColumn",null,"set","Tooltip column",(function(){return this.columns()}),{optional:!0}),dr.prototype.publish("latColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),dr.prototype.publish("longColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),dr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),dr.prototype.publish("fillColor","#00FFDD","html-color","Pin Color",null,{optional:!0}),dr.prototype.publish("omitNullLatLong",!1,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]}),dr.prototype.publish("strokeWidth",.5,"number","Pin Border Thickness (pixels)",null,{tags:["Basic"]}),dr.prototype.publish("strokeColor","","html-color","Pin Border Color",null,{optional:!0}),dr.prototype.publish("fontSize",18,"number","Font Size",null,{tags:["Basic","Shared"]}),dr.prototype.publish("fontFamily","Verdana","string","Font Name",null,{tags:["Basic","Shared","Shared"]}),dr.prototype.publish("fontColor","#000000","html-color","Font Color",null,{tags:["Basic","Shared"]}),dr.prototype.publish("pinType","pin","set","Pin Type",["pin","circle","rectangle","rectangle-pin"],{tags:["Basic"]}),dr.prototype.publish("arrowWidth",8,"number","Pin arrow width (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["pin","rectangle-pin"].indexOf(t.pinType())}}),dr.prototype.publish("arrowHeight",12,"number","Pin arrow height (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["pin","rectangle-pin"].indexOf(t.pinType())}}),dr.prototype.publish("pinWidth",20,"number","Width of pin (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["rectangle","rectangle-pin"].indexOf(t.pinType())}}),dr.prototype.publish("pinHeight",20,"number","Height of pin (pixels) (not including arrow)",null,{tags:["Basic"],disable:function(t){return-1===["rectangle","rectangle-pin"].indexOf(t.pinType())}}),dr.prototype.publish("cornerRadius",10,"number","Radius of rectangular pin corners (pixels)",null,{tags:["Basic"],disable:function(t){return-1===["rectangle","rectangle-pin"].indexOf(t.pinType())}}),dr.prototype.publish("pinRadius",12,"number","Radius of circle (pixels)",null,{tags:["Basic"],disable:function(t){return"circle"!==t.pinType()}}),dr.prototype.publish("textBaseline","central","set","Pin text vertical alignment",["auto","use-script","no-change","reset-size","ideographic","alphabetic","hanging","mathematical","central","middle","text-after-edge","text-before-edge","inherit"],{tags:["Basic"]});var fr=function(t){function e(){var e=t.call(this)||this,n=e;return e._pins=(new dr).columns(["lat","long","ext"]).on("click",(function(t,e,i){n.click(n.rowToObj(t.ext.origRow),"",i),n.clickStreetView(n.rowToObj(t.ext.origRow),"",i)})).on("dblclick",(function(t,e,i){n.dblclick(n.rowToObj(t.ext.origRow),"",i)})),e}return h(e,t),e.prototype.pinsData=function(){if(0===this.data().length)return[];var t=this.columns();return this._view=this._db.rollupView([this.latitudeColumn(),this.longitudeColumn()]),this._view.entries().map((function(e){var n=e.values[0].value[0];return[e.key,e.values[0].key,{fillColor:n[t.indexOf(this.colorColumn())],tooltip:n[t.indexOf(this.tooltipColumn())],origRow:n}]}),this)},e.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),this.layers([this._pins])},e.prototype.update=function(e,n){t.prototype.update.call(this,e,n),this._pins.data(this.pinsData()),this.autoScale()&&this._prevChecksum!==this._db.checksum()&&(this._prevChecksum=this._db.checksum(),this.zoomTo(this._pins.pinsData().map((function(t){return[t.lat,t.long]}))))},e.prototype.exit=function(e,n){t.prototype.exit.call(this,e,n)},e.prototype.click=function(t,e,n){},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}(hr);fr.prototype._class+=" map_GMapPin",fr.prototype.publish("autoScale",!1,"boolean","Auto scale to data"),fr.prototype.publishProxy("pinColor","_pins","fillColor"),fr.prototype.publishProxy("pinType","_pins","pinType"),fr.prototype.publishProxy("pinWidth","_pins","pinWidth"),fr.prototype.publishProxy("pinHeight","_pins","pinHeight"),fr.prototype.publishProxy("cornerRadius","_pins","cornerRadius"),fr.prototype.publishProxy("pinRadius","_pins","pinRadius"),fr.prototype.publishProxy("arrowWidth","_pins","arrowWidth"),fr.prototype.publishProxy("arrowHeight","_pins","arrowHeight"),fr.prototype.publishProxy("textBaseline","_pins","textBaseline"),fr.prototype.publishProxy("strokeWidth","_pins","strokeWidth"),fr.prototype.publishProxy("omitNullLatLong","_pins","omitNullLatLong"),fr.prototype.publish("latitudeColumn",null,"set","Latitude",(function(){return this.columns()}),{optional:!0}),fr.prototype.publish("longitudeColumn",null,"set","Longitude",(function(){return this.columns()}),{optional:!0}),fr.prototype.publish("colorColumn",null,"set","Color",(function(){return this.columns()}),{optional:!0}),fr.prototype.publish("tooltipColumn",null,"set","Tooltip",(function(){return this.columns()}),{optional:!0}),fr.prototype.publish("streetViewOnClick",!1,"boolean","Switch to street view when pin clicked");yo(".map_Layered .marker{fill:#656565;stroke:none}.map_Layered .dataEdge{stroke:#000;fill:none}");var _r=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.data=function(t){var e=wo.prototype.data.apply(this,arguments);return arguments.length&&(this.dataEdges=[],t.forEach((function(t){this.dataEdges.push({type:"LineString",coordinates:[[t[1],t[0]],[t[3],t[2]]]})}),this)),e},e.prototype.layerEnter=function(t,e,n){wo.prototype.layerEnter.apply(this,arguments),e.append("defs").append("marker").attr("class","marker").attr("id",this._id+"_arrowHead").attr("viewBox","0 0 10 10").attr("refX",10).attr("refY",5).attr("markerWidth",16).attr("markerHeight",16).attr("markerUnits","strokeWidth").attr("orient","auto").append("polyline").attr("points","0,0 10,5 0,10 1,5"),this._edgesTransform=e.append("g")},e.prototype.layerUpdate=function(t){wo.prototype.layerUpdate.apply(this,arguments),this._edgesTransform.style("opacity",this.opacity());var e=this._edgesTransform.selectAll(".dataEdge").data(this.visible()?this.dataEdges:[]);this._edgesPaths=e.enter().append("path").attr("class","dataEdge").attr("marker-end","url(#"+this._id+"_arrowHead)").merge(e).attr("d",t._d3GeoPath),e.exit().remove()},e.prototype.layerZoomed=function(t){wo.prototype.layerZoomed.apply(this,arguments),this._edgesPaths.attr("stroke-width","".concat(.5/t.zoomScale(),"px"))},e}(wo);_r.prototype._class+=" map_Lines",_r.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]});var mr=function(t){function e(){var e=t.call(this)||this,n=e;return e._lines=new _r,e._pins=(new dr).columns(["lat","long","ext"]).on("click",(function(t,e,i){n.click(n.rowToObj(t.ext.origRow),"",i)})).on("dblclick",(function(t,e,i){n.click(n.rowToObj(t.ext.origRow),"",i)})),e}return h(e,t),e.prototype.pinsData=function(){if(0===this.data().length)return[];var t=this.columns();this._fromView=this._db.rollupView([this.fromLatitudeColumn(),this.fromLongitudeColumn()]),this._toView=this._db.rollupView([this.toLatitudeColumn(),this.toLongitudeColumn()]);var e=this._fromView.entries().map((function(e){var n=e.values[0].value[0];return[e.key,e.values[0].key,{fillColor:n[t.indexOf(this.fromColorColumn())]||this.fromPinColor(),tooltip:n[t.indexOf(this.fromTooltipColumn())],origRow:n}]}),this),n=this._toView.entries().map((function(e){var n=e.values[0].value[0];return[e.key,e.values[0].key,{fillColor:n[t.indexOf(this.toColorColumn())]||this.toPinColor(),tooltip:n[t.indexOf(this.toTooltipColumn())],origRow:n}]}),this);return e.concat(n)},e.prototype.linesData=function(){return 0===this.data().length?[]:(this._linesView=this._db.rollupView([this.fromLatitudeColumn(),this.fromLongitudeColumn(),this.toLatitudeColumn(),this.toLongitudeColumn()]),this._linesView.data())},e.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),this.layers([this._lines,this._pins])},e.prototype.update=function(e,n){t.prototype.update.call(this,e,n),this._pins.data(this.pinsData()),this._lines.data(this.linesData()),this.autoScale()&&this._prevChecksum!==this._db.checksum()&&(this._prevChecksum=this._db.checksum(),this.zoomTo(this._pins.pinsData().map((function(t){return[t.lat,t.long]}))))},e.prototype.exit=function(e,n){t.prototype.exit.call(this,e,n)},e.prototype.click=function(t,e,n){},e.prototype.dblclick=function(t,e,n){},e}(hr);mr.prototype._class+=" map_GMapPinLine",mr.prototype.publish("autoScale",!1,"boolean","Auto scale to data"),mr.prototype.publish("fromPinColor","green","html-color","From Pin Color"),mr.prototype.publish("fromLatitudeColumn",null,"set","From Latitude",(function(){return this.columns()}),{optional:!0}),mr.prototype.publish("fromLongitudeColumn",null,"set","From Longitude",(function(){return this.columns()}),{optional:!0}),mr.prototype.publish("fromColorColumn",null,"set","From Color",(function(){return this.columns()}),{optional:!0}),mr.prototype.publish("fromTooltipColumn",null,"set","From Tooltip",(function(){return this.columns()}),{optional:!0}),mr.prototype.publish("toPinColor","red","html-color","To Pin Color"),mr.prototype.publish("toLatitudeColumn",null,"set","To Latitude",(function(){return this.columns()}),{optional:!0}),mr.prototype.publish("toLongitudeColumn",null,"set","To Longitude",(function(){return this.columns()}),{optional:!0}),mr.prototype.publish("toColorColumn",null,"set","To Color",(function(){return this.columns()}),{optional:!0}),mr.prototype.publish("toTooltipColumn",null,"set","To Tooltip",(function(){return this.columns()}),{optional:!0});yo(".map_Layered .marker{fill:#656565;stroke:none;stroke-width:1px}.map_Layered .dataEdge{stroke:#000;fill:none}");var gr=function(t){function e(){var e=t.call(this)||this;return e.dataEdges=[],e}return h(e,t),e.prototype.importJSON=function(t){var e=dr.prototype.importJSON.apply(this,arguments);if(arguments.length){this.dataEdges=[];var n=null;t.forEach((function(t){n&&this.dataEdges.push({type:"LineString",coordinates:[[n.long,n.lat],[t.long,t.lat]]}),n=t.eol?null:t}),this)}return e},e.prototype.data=function(t){var e=dr.prototype.data.apply(this,arguments);if(arguments.length){this.dataEdges=[];var n=null;t.forEach((function(t){n&&this.dataEdges.push({type:"LineString",coordinates:[[n[1],n[0]],[t[1],t[0]]]}),n=t}),this)}return e},e.prototype.layerEnter=function(t,e,n){dr.prototype.layerEnter.apply(this,arguments),e.append("defs").append("marker").attr("class","marker").attr("id",this._id+"_arrowHead").attr("viewBox","0 0 10 10").attr("refX",10).attr("refY",5).attr("markerWidth",16).attr("markerHeight",16).attr("markerUnits","strokeWidth").attr("orient","auto").append("polyline").attr("points","0,0 10,5 0,10 1,5"),this._edgesTransform=e.append("g")},e.prototype.layerUpdate=function(t){dr.prototype.layerUpdate.apply(this,arguments),this._edgesTransform.style("opacity",this.opacity());var e=this._edgesTransform.selectAll(".dataEdge").data(this.visible()?this.dataEdges:[]);this._edgesPaths=e.enter().append("path").attr("class","dataEdge").attr("marker-end","url(#"+this._id+"_arrowHead)").merge(e).attr("d",t._d3GeoPath),e.exit().remove()},e.prototype.layerZoomed=function(t){dr.prototype.layerZoomed.apply(this,arguments),this._edgesPaths.attr("stroke-width","".concat(.5/t.zoomScale(),"px"))},e}(dr);gr.prototype._class+=" map_Graph";yo(".map_Layered .graticule{fill:none;stroke:#a9a9a9;stroke-linejoin:round;stroke-width:.25px}.map_Layered .graticuleOutline{fill:none;stroke:#000;stroke-linejoin:round;stroke-width:.25px}");var yr=function(t){function n(){var n=t.call(this)||this;return n._dataMap={},n._path=e.select(null),n}return h(n,t),n.prototype.layerEnter=function(t,e,n){wo.prototype.layerEnter.apply(this,arguments),this._graticule=pn(),this._graticulePath=e.append("path").datum(this._graticule).attr("class","graticule").attr("vector-effect","non-scaling-stroke"),this._graticuleOutlinePath=e.append("path").datum(this._graticule.outline).attr("class","graticuleOutline").attr("vector-effect","non-scaling-stroke")},n.prototype.layerUpdate=function(t){if(!this.visible())return this._graticulePath.attr("d",""),this._graticuleOutlinePath.attr("d",""),void delete this._prevProjection;this._prevProjection!==t.projection()&&(this._graticulePath.attr("d",t._d3GeoPath),this._graticuleOutlinePath.attr("d",t._d3GeoPath),this._prevProjection=t.projection()),this._graticulePath.style("stroke",this.meshColor()),this._graticuleOutlinePath.style("stroke",this.meshColor())},n.prototype.layerExit=function(t){delete this._prevProjection},n}(wo);yr.prototype._class+=" map_Graticule",yr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),yr.prototype.publish("meshColor",null,"html-color","Stroke Color",null,{optional:!0}),yr.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width");yo(".map_Heat canvas{pointer-events:none}");var vr=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.layerEnter=function(t,e,n){wo.prototype.layerEnter.apply(this,arguments),this._parentOverlay.style("pointer-events","none"),this._heatTransform=n.style("pointer-events","none").append("div").attr("class",this.classID()).style("width",t.width()+"px").style("height",t.height()+"px"),this.heat=(new a.HeatMap).target(this._heatTransform.node())},e.prototype.layerUpdate=function(t){wo.prototype.layerUpdate.apply(this,arguments),this._heatTransform.style("opacity",this.opacity()).style("width",t.width()+"px").style("height",t.height()+"px"),this.heat.resize(t.size()),this.layerZoomed(t)},e.prototype.layerExit=function(t){delete this._prevProjection,this.heat.target(null),delete this.heat},e.prototype.layerZoomed=function(t){wo.prototype.layerZoomed.apply(this,arguments);var e=this._db.fieldByLabel(this.latColumn()),n=this._db.fieldByLabel(this.longColumn());this.heat.columns(this.columns()).data(this.visible()?this.data().map((function(i){var o=e?i[e.idx]:i[0],r=n?i[n.idx]:i[1],a=t.zoomTranslate(),s=t.project(o,r),l=t.zoomScale();return s[0]*=l,s[1]*=l,[a[0]+s[0],a[1]+s[1],i[4]||.5]})):[]).render()},e}(wo);function br(){}function Lr(t){return t.k}function wr(t){return[t.x,t.y]}function xr(t){return function(){return t}}vr.prototype._class+=" map_Heat",vr.prototype.publish("latColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),vr.prototype.publish("longColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),vr.prototype.publish("opacity",1,"number","Opacity",null,{tags:["Advanced"]}),br.prototype._palette=e.Palette.rainbow("default"),br.prototype.click=function(t,e,n){};yo(".map_OpenStreet .background{fill:#fff}.map_OpenStreet .graticule{fill:none;stroke:#777;stroke-width:.5px;stroke-opacity:.5}.map_Layered .vector{fill:none;stroke:navy;stroke-linejoin:round}");var kr=4096,Mr=function(t){function n(){var e=t.call(this)||this;return e._zoomLayerID=0,e.autoScaleMode("none"),e}return h(n,t),n.prototype.layerEnter=function(t,e,i){wo.prototype.layerEnter.apply(this,arguments),t.zoomExtent([.1,16384]),this._openStreet=e.append("g"),this._copyright=e.append("text").attr("x",-100).attr("y",-100).style("opacity",.5).text(n._copyrightText),this._copyrightBBox=this._copyright.node().getBBox()},n.prototype.layerUpdate=function(t){this._tile=function(){let t=0,e=0,n=960,i=500,o=!0,r=!0,a=256,s=Lr,l=wr,h=0;function u(){const u=+s.apply(this,arguments),c=l.apply(this,arguments),p=Math.log2(u/a),d=Math.round(Math.max(p+h,0)),f=Math.pow(2,p-d)*a,_=+c[0]-u/2,m=+c[1]-u/2,g=Math.max(o?0:-1/0,Math.floor((t-_)/f)),y=Math.min(o?1<<d:1/0,Math.ceil((n-_)/f)),v=Math.max(r?0:-1/0,Math.floor((e-m)/f)),b=Math.min(r?1<<d:1/0,Math.ceil((i-m)/f)),L=[];for(let t=v;t<b;++t)for(let e=g;e<y;++e)L.push([e,t,d]);return L.translate=[_/f,m/f],L.scale=f,L}return u.size=function(o){return arguments.length?(t=e=0,n=+o[0],i=+o[1],u):[n-t,i-e]},u.extent=function(o){return arguments.length?(t=+o[0][0],e=+o[0][1],n=+o[1][0],i=+o[1][1],u):[[t,e],[n,i]]},u.scale=function(t){return arguments.length?(s="function"==typeof t?t:xr(+t),u):s},u.translate=function(t){return arguments.length?(l="function"==typeof t?t:xr([+t[0],+t[1]]),u):l},u.zoomDelta=function(t){return arguments.length?(h=+t,u):h},u.tileSize=function(t){return arguments.length?(a=+t,u):a},u.clamp=function(t){return arguments.length?(o=r=!!t,u):o&&r},u.clampX=function(t){return arguments.length?(o=!!t,u):o},u.clampY=function(t){return arguments.length?(r=!!t,u):r},u}().size([t.width(),t.height()]).wrap(!1),this.visible()?this._copyright.attr("x",t.width()-this._copyrightBBox.width-this._copyrightBBox.height/2).attr("y",t.height()-this._copyrightBBox.height/2).text(n._copyrightText):this._copyright.text(""),this.layerZoomed(t)},n.prototype.layerZoomed=function(t){var n=t.zoomScale(),i=t.zoomTranslate(),o=this._tile.scale(n*kr).translate(i)(),r=o.scale/n;o.translate[0],o.scale,o.translate[1],o.scale;var a=Math.round(1e3*r);this._prevZoomLevel!==a&&(this._prevZoomLevel=a,this._zoomLayerID++);var s=this._openStreet.selectAll(".scaleG").data([this._zoomLayerID],(function(t){return t})),l=s.enter().append("g").attr("class","scaleG").attr("transform",function(t,e){return"translate(-2048,-2048) scale("+t/256+")"}(r)).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}(wo);Mr.prototype._class+=" map_OpenStreet",Mr.prototype.publish("tileProvider","OpenStreetMap","set","Tile Provider",["OpenStreetMap","OpenStreetMap Hot","MapQuest","MapQuest Sat","Stamen Watercolor","OpenCycleMap"],{tags:["Basic","Shared"]});var Cr=function(t){function e(){return t.call(this)||this}return h(e,t),e}(bo);function Pr(){Ao.call(this),this.projection("Mercator")}Cr.prototype._class+=" map_TestHeatMap",Pr.prototype=Object.create(Ao.prototype),Pr.prototype.constructor=Pr,Pr.prototype._class+=" map_TopoJSONChoropleth",Pr.prototype.publish("region","GB","set","Region Data",["AT","BE","BG","BR","CHLI","CY","CZ","DE","DK","EE","ES","FI","FR","GB","GE","GR","HR","HU","IE","IS","IT","KS","LT","LU","LV","MD","MK","MT","ND","NL","NO","PL","PT","RO","RS","SE","SI","SK","UA"]),Pr.prototype.layerEnter=function(t,n,i){Ao.prototype.layerEnter.apply(this,arguments),this._selection.widgetElement(this._choroplethData),this.choroPaths=e.select(null);var o=this;this.tooltipHTML((function(t){var e=o.columns(),n=e&&e.length?e[0]:"Location",i=t&&t.length?t[t.length-1]:[""];return o.tooltipFormat({label:i[0],series:n,value:t[1]})}))},Pr.prototype.layerUpdate=function(t){Ao.prototype.layerUpdate.apply(this,arguments);var e=[],n=this;this.data().forEach((function(t){if(isNaN(t[0]))for(var i in n._choroTopologyIndex)for(var o in n._choroTopologyIndex[i])o===t[0]&&n._choroTopologyIndex[i][o].forEach((function(n){e.push([n].concat(t.filter((function(t,e){return e>0}))).concat([t]))}));else e.push(t.concat([t]))})),this.choroPaths=this._choroplethData.selectAll(".data").data(this.visible()?e:[],(function(t){return t[0]})),this.choroPaths.enter().append("path").attr("class","data").call(this._selection.enter.bind(this._selection)).on("click",(function(t){n._dataMap[t[0]]&&n.click(n.rowToObj(n._dataMap[t[0]]),"weight",n._selection.selected(n))})).on("dblclick",(function(t){n._dataMap[t[0]]&&n.dblclick(n.rowToObj(n._dataMap[t[0]]),"weight",n._selection.selected(n))})).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show),this.choroPaths.attr("d",(function(e){var i=t._d3GeoPath(n._choroTopologyFeatures[e[0]]);return i||console.warn("Unknown Country: "+e),i})).style("fill",(function(t){return n._palette(t[1],n._dataMinWeight,n._dataMaxWeight)})),this.choroPaths.exit().remove()},Pr.prototype.layerPreRender=function(){if(this._prevRegion!==this.region()&&(this._prevRegion=this.region(),delete this._topoJsonPromise),!this._topoJsonPromise){var t=this;this._topoJsonPromise=new Promise((function(e,n){No("".concat(Do(),"/").concat(t.region(),".json"),(function(n){function i(n){t._choroTopologyIndex=n,e()}t._choroTopology=n,t._choroTopologyObjects=n.objects.PolbndA,t._choroTopologyFeatures=Mo(t._choroTopology,t._choroTopologyObjects).features,No("".concat(Do(),"/").concat(t.region(),"_idx.json"),i).on("error",(function(t){i({})}))}))}))}return this._topoJsonPromise};var Er={exports:{}};!function(t,e){var n;self,n=()=>(()=>{var t={363:(t,e,n)=>{n.d(e,{Z:()=>m});var i=n(601),o=n.n(i),r=n(609),a=n.n(r),s=n(991),l=n.n(s),h=new URL(n(2),n.b),u=new URL(n(122),n.b),c=new URL(n(734),n.b),p=a()(o()),d=l()(h),f=l()(u),_=l()(c);p.push([t.id,".leaflet-draw-section{position:relative}.leaflet-draw-toolbar{margin-top:12px}.leaflet-draw-toolbar-top{margin-top:0}.leaflet-draw-toolbar-notop a:first-child{border-top-right-radius:0}.leaflet-draw-toolbar-nobottom a:last-child{border-bottom-right-radius:0}.leaflet-draw-toolbar a{background-image:url("+d+");background-image:linear-gradient(transparent,transparent),url("+f+");background-repeat:no-repeat;background-size:300px 30px;background-clip:padding-box}.leaflet-retina .leaflet-draw-toolbar a{background-image:url("+_+");background-image:linear-gradient(transparent,transparent),url("+f+')}\n.leaflet-draw a{display:block;text-align:center;text-decoration:none}.leaflet-draw a .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.leaflet-draw-actions{display:none;list-style:none;margin:0;padding:0;position:absolute;left:26px;top:0;white-space:nowrap}.leaflet-touch .leaflet-draw-actions{left:32px}.leaflet-right .leaflet-draw-actions{right:26px;left:auto}.leaflet-touch .leaflet-right .leaflet-draw-actions{right:32px;left:auto}.leaflet-draw-actions li{display:inline-block}\n.leaflet-draw-actions li:first-child a{border-left:0}.leaflet-draw-actions li:last-child a{-webkit-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.leaflet-right .leaflet-draw-actions li:last-child a{-webkit-border-radius:0;border-radius:0}.leaflet-right .leaflet-draw-actions li:first-child a{-webkit-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.leaflet-draw-actions a{background-color:#919187;border-left:1px solid #AAA;color:#FFF;font:11px/19px "Helvetica Neue",Arial,Helvetica,sans-serif;line-height:28px;text-decoration:none;padding-left:10px;padding-right:10px;height:28px}\n.leaflet-touch .leaflet-draw-actions a{font-size:12px;line-height:30px;height:30px}.leaflet-draw-actions-bottom{margin-top:0}.leaflet-draw-actions-top{margin-top:1px}.leaflet-draw-actions-top a,.leaflet-draw-actions-bottom a{height:27px;line-height:27px}.leaflet-draw-actions a:hover{background-color:#a0a098}.leaflet-draw-actions-top.leaflet-draw-actions-bottom a{height:26px;line-height:26px}.leaflet-draw-toolbar .leaflet-draw-draw-polyline{background-position:-2px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polyline{background-position:0 -1px}\n.leaflet-draw-toolbar .leaflet-draw-draw-polygon{background-position:-31px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polygon{background-position:-29px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-rectangle{background-position:-62px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-rectangle{background-position:-60px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-circle{background-position:-92px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circle{background-position:-90px -1px}\n.leaflet-draw-toolbar .leaflet-draw-draw-marker{background-position:-122px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-marker{background-position:-120px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-circlemarker{background-position:-273px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circlemarker{background-position:-271px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-edit{background-position:-152px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit{background-position:-150px -1px}\n.leaflet-draw-toolbar .leaflet-draw-edit-remove{background-position:-182px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove{background-position:-180px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled{background-position:-212px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled{background-position:-210px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled{background-position:-242px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled{background-position:-240px -2px}\n.leaflet-mouse-marker{background-color:#fff;cursor:crosshair}.leaflet-draw-tooltip{background:#363636;background:rgba(0,0,0,0.5);border:1px solid transparent;-webkit-border-radius:4px;border-radius:4px;color:#fff;font:12px/18px "Helvetica Neue",Arial,Helvetica,sans-serif;margin-left:20px;margin-top:-21px;padding:4px 8px;position:absolute;visibility:hidden;white-space:nowrap;z-index:6}.leaflet-draw-tooltip:before{border-right:6px solid black;border-right-color:rgba(0,0,0,0.5);border-top:6px solid transparent;border-bottom:6px solid transparent;content:"";position:absolute;top:7px;left:-7px}\n.leaflet-error-draw-tooltip{background-color:#f2dede;border:1px solid #e6b6bd;color:#b94a48}.leaflet-error-draw-tooltip:before{border-right-color:#e6b6bd}.leaflet-draw-tooltip-single{margin-top:-12px}.leaflet-draw-tooltip-subtext{color:#f8d5e4}.leaflet-draw-guide-dash{font-size:1%;opacity:.6;position:absolute;width:5px;height:5px}.leaflet-edit-marker-selected{background-color:rgba(254,87,161,0.1);border:4px dashed rgba(254,87,161,0.6);-webkit-border-radius:4px;border-radius:4px;box-sizing:content-box}\n.leaflet-edit-move{cursor:move}.leaflet-edit-resize{cursor:pointer}.leaflet-oldie .leaflet-draw-toolbar{border:1px solid #999}',""]);const m=p},134:(t,e,n)=>{n.d(e,{Z:()=>s});var i=n(601),o=n.n(i),r=n(609),a=n.n(r)()(o());a.push([t.id,'.marker-cluster-small {\n\tbackground-color: rgba(181, 226, 140, 0.6);\n\t}\n.marker-cluster-small div {\n\tbackground-color: rgba(110, 204, 57, 0.6);\n\t}\n\n.marker-cluster-medium {\n\tbackground-color: rgba(241, 211, 87, 0.6);\n\t}\n.marker-cluster-medium div {\n\tbackground-color: rgba(240, 194, 12, 0.6);\n\t}\n\n.marker-cluster-large {\n\tbackground-color: rgba(253, 156, 115, 0.6);\n\t}\n.marker-cluster-large div {\n\tbackground-color: rgba(241, 128, 23, 0.6);\n\t}\n\n\t/* IE 6-8 fallback colors */\n.leaflet-oldie .marker-cluster-small {\n\tbackground-color: rgb(181, 226, 140);\n\t}\n.leaflet-oldie .marker-cluster-small div {\n\tbackground-color: rgb(110, 204, 57);\n\t}\n\n.leaflet-oldie .marker-cluster-medium {\n\tbackground-color: rgb(241, 211, 87);\n\t}\n.leaflet-oldie .marker-cluster-medium div {\n\tbackground-color: rgb(240, 194, 12);\n\t}\n\n.leaflet-oldie .marker-cluster-large {\n\tbackground-color: rgb(253, 156, 115);\n\t}\n.leaflet-oldie .marker-cluster-large div {\n\tbackground-color: rgb(241, 128, 23);\n}\n\n.marker-cluster {\n\tbackground-clip: padding-box;\n\tborder-radius: 20px;\n\t}\n.marker-cluster div {\n\twidth: 30px;\n\theight: 30px;\n\tmargin-left: 5px;\n\tmargin-top: 5px;\n\n\ttext-align: center;\n\tborder-radius: 15px;\n\tfont: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;\n\t}\n.marker-cluster span {\n\tline-height: 30px;\n\t}',""]);const s=a},182:(t,e,n)=>{n.d(e,{Z:()=>s});var i=n(601),o=n.n(i),r=n(609),a=n.n(r)()(o());a.push([t.id,".leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow {\n\t-webkit-transition: -webkit-transform 0.3s ease-out, opacity 0.3s ease-in;\n\t-moz-transition: -moz-transform 0.3s ease-out, opacity 0.3s ease-in;\n\t-o-transition: -o-transform 0.3s ease-out, opacity 0.3s ease-in;\n\ttransition: transform 0.3s ease-out, opacity 0.3s ease-in;\n}\n\n.leaflet-cluster-spider-leg {\n\t/* stroke-dashoffset (duration and function) should match with leaflet-marker-icon transform in order to track it exactly */\n\t-webkit-transition: -webkit-stroke-dashoffset 0.3s ease-out, -webkit-stroke-opacity 0.3s ease-in;\n\t-moz-transition: -moz-stroke-dashoffset 0.3s ease-out, -moz-stroke-opacity 0.3s ease-in;\n\t-o-transition: -o-stroke-dashoffset 0.3s ease-out, -o-stroke-opacity 0.3s ease-in;\n\ttransition: stroke-dashoffset 0.3s ease-out, stroke-opacity 0.3s ease-in;\n}\n",""]);const s=a},138:(t,e,n)=>{n.d(e,{Z:()=>m});var i=n(601),o=n.n(i),r=n(609),a=n.n(r),s=n(991),l=n.n(s),h=new URL(n(263),n.b),u=new URL(n(262),n.b),c=new URL(n(19),n.b),p=a()(o()),d=l()(h),f=l()(u),_=l()(c);p.push([t.id,"/* required styles */\r\n\r\n.leaflet-pane,\r\n.leaflet-tile,\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow,\r\n.leaflet-tile-container,\r\n.leaflet-pane > svg,\r\n.leaflet-pane > canvas,\r\n.leaflet-zoom-box,\r\n.leaflet-image-layer,\r\n.leaflet-layer {\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\t}\r\n.leaflet-container {\r\n\toverflow: hidden;\r\n\t}\r\n.leaflet-tile,\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow {\r\n\t-webkit-user-select: none;\r\n\t -moz-user-select: none;\r\n\t user-select: none;\r\n\t -webkit-user-drag: none;\r\n\t}\r\n/* Prevents IE11 from highlighting tiles in blue */\r\n.leaflet-tile::selection {\r\n\tbackground: transparent;\r\n}\r\n/* Safari renders non-retina tile on retina better with this, but Chrome is worse */\r\n.leaflet-safari .leaflet-tile {\r\n\timage-rendering: -webkit-optimize-contrast;\r\n\t}\r\n/* hack that prevents hw layers \"stretching\" when loading new tiles */\r\n.leaflet-safari .leaflet-tile-container {\r\n\twidth: 1600px;\r\n\theight: 1600px;\r\n\t-webkit-transform-origin: 0 0;\r\n\t}\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow {\r\n\tdisplay: block;\r\n\t}\r\n/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */\r\n/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */\r\n.leaflet-container .leaflet-overlay-pane svg,\r\n.leaflet-container .leaflet-marker-pane img,\r\n.leaflet-container .leaflet-shadow-pane img,\r\n.leaflet-container .leaflet-tile-pane img,\r\n.leaflet-container img.leaflet-image-layer,\r\n.leaflet-container .leaflet-tile {\r\n\tmax-width: none !important;\r\n\tmax-height: none !important;\r\n\t}\r\n\r\n.leaflet-container.leaflet-touch-zoom {\r\n\t-ms-touch-action: pan-x pan-y;\r\n\ttouch-action: pan-x pan-y;\r\n\t}\r\n.leaflet-container.leaflet-touch-drag {\r\n\t-ms-touch-action: pinch-zoom;\r\n\t/* Fallback for FF which doesn't support pinch-zoom */\r\n\ttouch-action: none;\r\n\ttouch-action: pinch-zoom;\r\n}\r\n.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {\r\n\t-ms-touch-action: none;\r\n\ttouch-action: none;\r\n}\r\n.leaflet-container {\r\n\t-webkit-tap-highlight-color: transparent;\r\n}\r\n.leaflet-container a {\r\n\t-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);\r\n}\r\n.leaflet-tile {\r\n\tfilter: inherit;\r\n\tvisibility: hidden;\r\n\t}\r\n.leaflet-tile-loaded {\r\n\tvisibility: inherit;\r\n\t}\r\n.leaflet-zoom-box {\r\n\twidth: 0;\r\n\theight: 0;\r\n\t-moz-box-sizing: border-box;\r\n\t box-sizing: border-box;\r\n\tz-index: 800;\r\n\t}\r\n/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */\r\n.leaflet-overlay-pane svg {\r\n\t-moz-user-select: none;\r\n\t}\r\n\r\n.leaflet-pane { z-index: 400; }\r\n\r\n.leaflet-tile-pane { z-index: 200; }\r\n.leaflet-overlay-pane { z-index: 400; }\r\n.leaflet-shadow-pane { z-index: 500; }\r\n.leaflet-marker-pane { z-index: 600; }\r\n.leaflet-tooltip-pane { z-index: 650; }\r\n.leaflet-popup-pane { z-index: 700; }\r\n\r\n.leaflet-map-pane canvas { z-index: 100; }\r\n.leaflet-map-pane svg { z-index: 200; }\r\n\r\n.leaflet-vml-shape {\r\n\twidth: 1px;\r\n\theight: 1px;\r\n\t}\r\n.lvml {\r\n\tbehavior: url(#default#VML);\r\n\tdisplay: inline-block;\r\n\tposition: absolute;\r\n\t}\r\n\r\n\r\n/* control positioning */\r\n\r\n.leaflet-control {\r\n\tposition: relative;\r\n\tz-index: 800;\r\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\r\n\tpointer-events: auto;\r\n\t}\r\n.leaflet-top,\r\n.leaflet-bottom {\r\n\tposition: absolute;\r\n\tz-index: 1000;\r\n\tpointer-events: none;\r\n\t}\r\n.leaflet-top {\r\n\ttop: 0;\r\n\t}\r\n.leaflet-right {\r\n\tright: 0;\r\n\t}\r\n.leaflet-bottom {\r\n\tbottom: 0;\r\n\t}\r\n.leaflet-left {\r\n\tleft: 0;\r\n\t}\r\n.leaflet-control {\r\n\tfloat: left;\r\n\tclear: both;\r\n\t}\r\n.leaflet-right .leaflet-control {\r\n\tfloat: right;\r\n\t}\r\n.leaflet-top .leaflet-control {\r\n\tmargin-top: 10px;\r\n\t}\r\n.leaflet-bottom .leaflet-control {\r\n\tmargin-bottom: 10px;\r\n\t}\r\n.leaflet-left .leaflet-control {\r\n\tmargin-left: 10px;\r\n\t}\r\n.leaflet-right .leaflet-control {\r\n\tmargin-right: 10px;\r\n\t}\r\n\r\n\r\n/* zoom and fade animations */\r\n\r\n.leaflet-fade-anim .leaflet-tile {\r\n\twill-change: opacity;\r\n\t}\r\n.leaflet-fade-anim .leaflet-popup {\r\n\topacity: 0;\r\n\t-webkit-transition: opacity 0.2s linear;\r\n\t -moz-transition: opacity 0.2s linear;\r\n\t transition: opacity 0.2s linear;\r\n\t}\r\n.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {\r\n\topacity: 1;\r\n\t}\r\n.leaflet-zoom-animated {\r\n\t-webkit-transform-origin: 0 0;\r\n\t -ms-transform-origin: 0 0;\r\n\t transform-origin: 0 0;\r\n\t}\r\n.leaflet-zoom-anim .leaflet-zoom-animated {\r\n\twill-change: transform;\r\n\t}\r\n.leaflet-zoom-anim .leaflet-zoom-animated {\r\n\t-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t transition: transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t}\r\n.leaflet-zoom-anim .leaflet-tile,\r\n.leaflet-pan-anim .leaflet-tile {\r\n\t-webkit-transition: none;\r\n\t -moz-transition: none;\r\n\t transition: none;\r\n\t}\r\n\r\n.leaflet-zoom-anim .leaflet-zoom-hide {\r\n\tvisibility: hidden;\r\n\t}\r\n\r\n\r\n/* cursors */\r\n\r\n.leaflet-interactive {\r\n\tcursor: pointer;\r\n\t}\r\n.leaflet-grab {\r\n\tcursor: -webkit-grab;\r\n\tcursor: -moz-grab;\r\n\tcursor: grab;\r\n\t}\r\n.leaflet-crosshair,\r\n.leaflet-crosshair .leaflet-interactive {\r\n\tcursor: crosshair;\r\n\t}\r\n.leaflet-popup-pane,\r\n.leaflet-control {\r\n\tcursor: auto;\r\n\t}\r\n.leaflet-dragging .leaflet-grab,\r\n.leaflet-dragging .leaflet-grab .leaflet-interactive,\r\n.leaflet-dragging .leaflet-marker-draggable {\r\n\tcursor: move;\r\n\tcursor: -webkit-grabbing;\r\n\tcursor: -moz-grabbing;\r\n\tcursor: grabbing;\r\n\t}\r\n\r\n/* marker & overlays interactivity */\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow,\r\n.leaflet-image-layer,\r\n.leaflet-pane > svg path,\r\n.leaflet-tile-container {\r\n\tpointer-events: none;\r\n\t}\r\n\r\n.leaflet-marker-icon.leaflet-interactive,\r\n.leaflet-image-layer.leaflet-interactive,\r\n.leaflet-pane > svg path.leaflet-interactive,\r\nsvg.leaflet-image-layer.leaflet-interactive path {\r\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\r\n\tpointer-events: auto;\r\n\t}\r\n\r\n/* visual tweaks */\r\n\r\n.leaflet-container {\r\n\tbackground: #ddd;\r\n\toutline: 0;\r\n\t}\r\n.leaflet-container a {\r\n\tcolor: #0078A8;\r\n\t}\r\n.leaflet-container a.leaflet-active {\r\n\toutline: 2px solid orange;\r\n\t}\r\n.leaflet-zoom-box {\r\n\tborder: 2px dotted #38f;\r\n\tbackground: rgba(255,255,255,0.5);\r\n\t}\r\n\r\n\r\n/* general typography */\r\n.leaflet-container {\r\n\tfont: 12px/1.5 \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n\t}\r\n\r\n\r\n/* general toolbar styles */\r\n\r\n.leaflet-bar {\r\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.65);\r\n\tborder-radius: 4px;\r\n\t}\r\n.leaflet-bar a,\r\n.leaflet-bar a:hover {\r\n\tbackground-color: #fff;\r\n\tborder-bottom: 1px solid #ccc;\r\n\twidth: 26px;\r\n\theight: 26px;\r\n\tline-height: 26px;\r\n\tdisplay: block;\r\n\ttext-align: center;\r\n\ttext-decoration: none;\r\n\tcolor: black;\r\n\t}\r\n.leaflet-bar a,\r\n.leaflet-control-layers-toggle {\r\n\tbackground-position: 50% 50%;\r\n\tbackground-repeat: no-repeat;\r\n\tdisplay: block;\r\n\t}\r\n.leaflet-bar a:hover {\r\n\tbackground-color: #f4f4f4;\r\n\t}\r\n.leaflet-bar a:first-child {\r\n\tborder-top-left-radius: 4px;\r\n\tborder-top-right-radius: 4px;\r\n\t}\r\n.leaflet-bar a:last-child {\r\n\tborder-bottom-left-radius: 4px;\r\n\tborder-bottom-right-radius: 4px;\r\n\tborder-bottom: none;\r\n\t}\r\n.leaflet-bar a.leaflet-disabled {\r\n\tcursor: default;\r\n\tbackground-color: #f4f4f4;\r\n\tcolor: #bbb;\r\n\t}\r\n\r\n.leaflet-touch .leaflet-bar a {\r\n\twidth: 30px;\r\n\theight: 30px;\r\n\tline-height: 30px;\r\n\t}\r\n.leaflet-touch .leaflet-bar a:first-child {\r\n\tborder-top-left-radius: 2px;\r\n\tborder-top-right-radius: 2px;\r\n\t}\r\n.leaflet-touch .leaflet-bar a:last-child {\r\n\tborder-bottom-left-radius: 2px;\r\n\tborder-bottom-right-radius: 2px;\r\n\t}\r\n\r\n/* zoom control */\r\n\r\n.leaflet-control-zoom-in,\r\n.leaflet-control-zoom-out {\r\n\tfont: bold 18px 'Lucida Console', Monaco, monospace;\r\n\ttext-indent: 1px;\r\n\t}\r\n\r\n.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {\r\n\tfont-size: 22px;\r\n\t}\r\n\r\n\r\n/* layers control */\r\n\r\n.leaflet-control-layers {\r\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.4);\r\n\tbackground: #fff;\r\n\tborder-radius: 5px;\r\n\t}\r\n.leaflet-control-layers-toggle {\r\n\tbackground-image: url("+d+");\r\n\twidth: 36px;\r\n\theight: 36px;\r\n\t}\r\n.leaflet-retina .leaflet-control-layers-toggle {\r\n\tbackground-image: url("+f+");\r\n\tbackground-size: 26px 26px;\r\n\t}\r\n.leaflet-touch .leaflet-control-layers-toggle {\r\n\twidth: 44px;\r\n\theight: 44px;\r\n\t}\r\n.leaflet-control-layers .leaflet-control-layers-list,\r\n.leaflet-control-layers-expanded .leaflet-control-layers-toggle {\r\n\tdisplay: none;\r\n\t}\r\n.leaflet-control-layers-expanded .leaflet-control-layers-list {\r\n\tdisplay: block;\r\n\tposition: relative;\r\n\t}\r\n.leaflet-control-layers-expanded {\r\n\tpadding: 6px 10px 6px 6px;\r\n\tcolor: #333;\r\n\tbackground: #fff;\r\n\t}\r\n.leaflet-control-layers-scrollbar {\r\n\toverflow-y: scroll;\r\n\toverflow-x: hidden;\r\n\tpadding-right: 5px;\r\n\t}\r\n.leaflet-control-layers-selector {\r\n\tmargin-top: 2px;\r\n\tposition: relative;\r\n\ttop: 1px;\r\n\t}\r\n.leaflet-control-layers label {\r\n\tdisplay: block;\r\n\t}\r\n.leaflet-control-layers-separator {\r\n\theight: 0;\r\n\tborder-top: 1px solid #ddd;\r\n\tmargin: 5px -10px 5px -6px;\r\n\t}\r\n\r\n/* Default icon URLs */\r\n.leaflet-default-icon-path {\r\n\tbackground-image: url("+_+');\r\n\t}\r\n\r\n\r\n/* attribution and scale controls */\r\n\r\n.leaflet-container .leaflet-control-attribution {\r\n\tbackground: #fff;\r\n\tbackground: rgba(255, 255, 255, 0.7);\r\n\tmargin: 0;\r\n\t}\r\n.leaflet-control-attribution,\r\n.leaflet-control-scale-line {\r\n\tpadding: 0 5px;\r\n\tcolor: #333;\r\n\t}\r\n.leaflet-control-attribution a {\r\n\ttext-decoration: none;\r\n\t}\r\n.leaflet-control-attribution a:hover {\r\n\ttext-decoration: underline;\r\n\t}\r\n.leaflet-container .leaflet-control-attribution,\r\n.leaflet-container .leaflet-control-scale {\r\n\tfont-size: 11px;\r\n\t}\r\n.leaflet-left .leaflet-control-scale {\r\n\tmargin-left: 5px;\r\n\t}\r\n.leaflet-bottom .leaflet-control-scale {\r\n\tmargin-bottom: 5px;\r\n\t}\r\n.leaflet-control-scale-line {\r\n\tborder: 2px solid #777;\r\n\tborder-top: none;\r\n\tline-height: 1.1;\r\n\tpadding: 2px 5px 1px;\r\n\tfont-size: 11px;\r\n\twhite-space: nowrap;\r\n\toverflow: hidden;\r\n\t-moz-box-sizing: border-box;\r\n\t box-sizing: border-box;\r\n\r\n\tbackground: #fff;\r\n\tbackground: rgba(255, 255, 255, 0.5);\r\n\t}\r\n.leaflet-control-scale-line:not(:first-child) {\r\n\tborder-top: 2px solid #777;\r\n\tborder-bottom: none;\r\n\tmargin-top: -2px;\r\n\t}\r\n.leaflet-control-scale-line:not(:first-child):not(:last-child) {\r\n\tborder-bottom: 2px solid #777;\r\n\t}\r\n\r\n.leaflet-touch .leaflet-control-attribution,\r\n.leaflet-touch .leaflet-control-layers,\r\n.leaflet-touch .leaflet-bar {\r\n\tbox-shadow: none;\r\n\t}\r\n.leaflet-touch .leaflet-control-layers,\r\n.leaflet-touch .leaflet-bar {\r\n\tborder: 2px solid rgba(0,0,0,0.2);\r\n\tbackground-clip: padding-box;\r\n\t}\r\n\r\n\r\n/* popup */\r\n\r\n.leaflet-popup {\r\n\tposition: absolute;\r\n\ttext-align: center;\r\n\tmargin-bottom: 20px;\r\n\t}\r\n.leaflet-popup-content-wrapper {\r\n\tpadding: 1px;\r\n\ttext-align: left;\r\n\tborder-radius: 12px;\r\n\t}\r\n.leaflet-popup-content {\r\n\tmargin: 13px 19px;\r\n\tline-height: 1.4;\r\n\t}\r\n.leaflet-popup-content p {\r\n\tmargin: 18px 0;\r\n\t}\r\n.leaflet-popup-tip-container {\r\n\twidth: 40px;\r\n\theight: 20px;\r\n\tposition: absolute;\r\n\tleft: 50%;\r\n\tmargin-left: -20px;\r\n\toverflow: hidden;\r\n\tpointer-events: none;\r\n\t}\r\n.leaflet-popup-tip {\r\n\twidth: 17px;\r\n\theight: 17px;\r\n\tpadding: 1px;\r\n\r\n\tmargin: -10px auto 0;\r\n\r\n\t-webkit-transform: rotate(45deg);\r\n\t -moz-transform: rotate(45deg);\r\n\t -ms-transform: rotate(45deg);\r\n\t transform: rotate(45deg);\r\n\t}\r\n.leaflet-popup-content-wrapper,\r\n.leaflet-popup-tip {\r\n\tbackground: white;\r\n\tcolor: #333;\r\n\tbox-shadow: 0 3px 14px rgba(0,0,0,0.4);\r\n\t}\r\n.leaflet-container a.leaflet-popup-close-button {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tpadding: 4px 4px 0 0;\r\n\tborder: none;\r\n\ttext-align: center;\r\n\twidth: 18px;\r\n\theight: 14px;\r\n\tfont: 16px/14px Tahoma, Verdana, sans-serif;\r\n\tcolor: #c3c3c3;\r\n\ttext-decoration: none;\r\n\tfont-weight: bold;\r\n\tbackground: transparent;\r\n\t}\r\n.leaflet-container a.leaflet-popup-close-button:hover {\r\n\tcolor: #999;\r\n\t}\r\n.leaflet-popup-scrolled {\r\n\toverflow: auto;\r\n\tborder-bottom: 1px solid #ddd;\r\n\tborder-top: 1px solid #ddd;\r\n\t}\r\n\r\n.leaflet-oldie .leaflet-popup-content-wrapper {\r\n\t-ms-zoom: 1;\r\n\t}\r\n.leaflet-oldie .leaflet-popup-tip {\r\n\twidth: 24px;\r\n\tmargin: 0 auto;\r\n\r\n\t-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";\r\n\tfilter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);\r\n\t}\r\n.leaflet-oldie .leaflet-popup-tip-container {\r\n\tmargin-top: -1px;\r\n\t}\r\n\r\n.leaflet-oldie .leaflet-control-zoom,\r\n.leaflet-oldie .leaflet-control-layers,\r\n.leaflet-oldie .leaflet-popup-content-wrapper,\r\n.leaflet-oldie .leaflet-popup-tip {\r\n\tborder: 1px solid #999;\r\n\t}\r\n\r\n\r\n/* div icon */\r\n\r\n.leaflet-div-icon {\r\n\tbackground: #fff;\r\n\tborder: 1px solid #666;\r\n\t}\r\n\r\n\r\n/* Tooltip */\r\n/* Base styles for the element that has a tooltip */\r\n.leaflet-tooltip {\r\n\tposition: absolute;\r\n\tpadding: 6px;\r\n\tbackground-color: #fff;\r\n\tborder: 1px solid #fff;\r\n\tborder-radius: 3px;\r\n\tcolor: #222;\r\n\twhite-space: nowrap;\r\n\t-webkit-user-select: none;\r\n\t-moz-user-select: none;\r\n\t-ms-user-select: none;\r\n\tuser-select: none;\r\n\tpointer-events: none;\r\n\tbox-shadow: 0 1px 3px rgba(0,0,0,0.4);\r\n\t}\r\n.leaflet-tooltip.leaflet-clickable {\r\n\tcursor: pointer;\r\n\tpointer-events: auto;\r\n\t}\r\n.leaflet-tooltip-top:before,\r\n.leaflet-tooltip-bottom:before,\r\n.leaflet-tooltip-left:before,\r\n.leaflet-tooltip-right:before {\r\n\tposition: absolute;\r\n\tpointer-events: none;\r\n\tborder: 6px solid transparent;\r\n\tbackground: transparent;\r\n\tcontent: "";\r\n\t}\r\n\r\n/* Directions */\r\n\r\n.leaflet-tooltip-bottom {\r\n\tmargin-top: 6px;\r\n}\r\n.leaflet-tooltip-top {\r\n\tmargin-top: -6px;\r\n}\r\n.leaflet-tooltip-bottom:before,\r\n.leaflet-tooltip-top:before {\r\n\tleft: 50%;\r\n\tmargin-left: -6px;\r\n\t}\r\n.leaflet-tooltip-top:before {\r\n\tbottom: 0;\r\n\tmargin-bottom: -12px;\r\n\tborder-top-color: #fff;\r\n\t}\r\n.leaflet-tooltip-bottom:before {\r\n\ttop: 0;\r\n\tmargin-top: -12px;\r\n\tmargin-left: -6px;\r\n\tborder-bottom-color: #fff;\r\n\t}\r\n.leaflet-tooltip-left {\r\n\tmargin-left: -6px;\r\n}\r\n.leaflet-tooltip-right {\r\n\tmargin-left: 6px;\r\n}\r\n.leaflet-tooltip-left:before,\r\n.leaflet-tooltip-right:before {\r\n\ttop: 50%;\r\n\tmargin-top: -6px;\r\n\t}\r\n.leaflet-tooltip-left:before {\r\n\tright: 0;\r\n\tmargin-right: -12px;\r\n\tborder-left-color: #fff;\r\n\t}\r\n.leaflet-tooltip-right:before {\r\n\tleft: 0;\r\n\tmargin-left: -12px;\r\n\tborder-right-color: #fff;\r\n\t}\r\n',""]);const m=p},282:(t,e,n)=>{n.d(e,{Z:()=>s});var i=n(601),o=n.n(i),r=n(609),a=n.n(r)()(o());a.push([t.id,"/*\n Leaflet.BeautifyIcon, a plugin that adds colorful iconic markers for Leaflet by giving full control of style to end user, It has also ability to adjust font awesome\n and glyphicon icons\n (c) 2016-2017, Muhammad Arslan Sajid\n http://leafletjs.com\n*/\n.beautify-marker {\n text-align: center;\n font-weight: 700;\n font-family: monospace;\n position:absolute;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n.beautify-marker.selected > div {\n outline: none;\n border-color: red;\n box-shadow: 0 0 10px red;\n}\n\n.beautify-marker.circle {\n border-radius: 100%;\n}\n\n.beautify-marker.circle-dot, .beautify-marker.doughnut {\n border-radius: 100%;\n}\n\n.beautify-marker.marker {\n border-top-left-radius: 50%;\n border-top-right-radius: 50% 100%;\n border-bottom-left-radius: 100% 50%;\n border-bottom-right-radius: 0%;\n /* rotating 45deg clockwise to get the corner bottom center */\n transform: rotate(45deg); \n \n}\n\n.beautify-marker.marker > * {\n /* rotating 45deg counterclock to adjust marker content back to normal */\n transform: rotate(-45deg);\n}\n",""]);const s=a},958:(t,e,n)=>{n.d(e,{Z:()=>s});var i=n(601),o=n.n(i),r=n(609),a=n.n(r)()(o());a.push([t.id,"g.d3-overlay * {\n pointer-events: visiblePainted;\n}\n",""]);const s=a},609:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",i=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),i&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),i&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,i,o,r){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(i)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var h=0;h<t.length;h++){var u=[].concat(t[h]);i&&a[u[0]]||(void 0!==r&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=r),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),e.push(u))}},e}},991:t=>{t.exports=function(t,e){return e||(e={}),t?(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t):t}},601:t=>{t.exports=function(t){return t[1]}},325:()=>{var t,e;t=window,e=document,L.drawVersion="1.0.4",L.Draw={},L.drawLocal={draw:{toolbar:{actions:{title:"Cancel drawing",text:"Cancel"},finish:{title:"Finish drawing",text:"Finish"},undo:{title:"Delete last point drawn",text:"Delete last point"},buttons:{polyline:"Draw a polyline",polygon:"Draw a polygon",rectangle:"Draw a rectangle",circle:"Draw a circle",marker:"Draw a marker",circlemarker:"Draw a circlemarker"}},handlers:{circle:{tooltip:{start:"Click and drag to draw circle."},radius:"Radius"},circlemarker:{tooltip:{start:"Click map to place circle marker."}},marker:{tooltip:{start:"Click map to place marker."}},polygon:{tooltip:{start:"Click to start drawing shape.",cont:"Click to continue drawing shape.",end:"Click first point to close this shape."}},polyline:{error:"<strong>Error:</strong> shape edges cannot cross!",tooltip:{start:"Click to start drawing line.",cont:"Click to continue drawing line.",end:"Click last point to finish line."}},rectangle:{tooltip:{start:"Click and drag to draw rectangle."}},simpleshape:{tooltip:{end:"Release mouse to finish drawing."}}}},edit:{toolbar:{actions:{save:{title:"Save changes",text:"Save"},cancel:{title:"Cancel editing, discards all changes",text:"Cancel"},clearAll:{title:"Clear all layers",text:"Clear All"}},buttons:{edit:"Edit layers",editDisabled:"No layers to edit",remove:"Delete layers",removeDisabled:"No layers to delete"}},handlers:{edit:{tooltip:{text:"Drag handles or markers to edit features.",subtext:"Click cancel to undo changes."}},remove:{tooltip:{text:"Click on a feature to remove."}}}}},L.Draw.Event={},L.Draw.Event.CREATED="draw:created",L.Draw.Event.EDITED="draw:edited",L.Draw.Event.DELETED="draw:deleted",L.Draw.Event.DRAWSTART="draw:drawstart",L.Draw.Event.DRAWSTOP="draw:drawstop",L.Draw.Event.DRAWVERTEX="draw:drawvertex",L.Draw.Event.EDITSTART="draw:editstart",L.Draw.Event.EDITMOVE="draw:editmove",L.Draw.Event.EDITRESIZE="draw:editresize",L.Draw.Event.EDITVERTEX="draw:editvertex",L.Draw.Event.EDITSTOP="draw:editstop",L.Draw.Event.DELETESTART="draw:deletestart",L.Draw.Event.DELETESTOP="draw:deletestop",L.Draw.Event.TOOLBAROPENED="draw:toolbaropened",L.Draw.Event.TOOLBARCLOSED="draw:toolbarclosed",L.Draw.Event.MARKERCONTEXT="draw:markercontext",L.Draw=L.Draw||{},L.Draw.Feature=L.Handler.extend({initialize:function(t,e){this._map=t,this._container=t._container,this._overlayPane=t._panes.overlayPane,this._popupPane=t._panes.popupPane,e&&e.shapeOptions&&(e.shapeOptions=L.Util.extend({},this.options.shapeOptions,e.shapeOptions)),L.setOptions(this,e);var n=L.version.split(".");1===parseInt(n[0],10)&&parseInt(n[1],10)>=2?L.Draw.Feature.include(L.Evented.prototype):L.Draw.Feature.include(L.Mixin.Events)},enable:function(){this._enabled||(L.Handler.prototype.enable.call(this),this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DRAWSTART,{layerType:this.type}))},disable:function(){this._enabled&&(L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DRAWSTOP,{layerType:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(L.DomUtil.disableTextSelection(),t.getContainer().focus(),this._tooltip=new L.Draw.Tooltip(this._map),L.DomEvent.on(this._container,"keyup",this._cancelDrawing,this))},removeHooks:function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,"keyup",this._cancelDrawing,this))},setOptions:function(t){L.setOptions(this,t)},_fireCreatedEvent:function(t){this._map.fire(L.Draw.Event.CREATED,{layer:t,layerType:this.type})},_cancelDrawing:function(t){27===t.keyCode&&(this._map.fire("draw:canceled",{layerType:this.type}),this.disable())}}),L.Draw.Polyline=L.Draw.Feature.extend({statics:{TYPE:"polyline"},Poly:L.Polyline,options:{allowIntersection:!0,repeatMode:!1,drawError:{color:"#b00b00",timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3,factor:1,maxPoints:0},initialize:function(t,e){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this.options.drawError.message=L.drawLocal.draw.handlers.polyline.error,e&&e.drawError&&(e.drawError=L.Util.extend({},this.options.drawError,e.drawError)),this.type=L.Draw.Polyline.TYPE,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new L.Polyline([],this.options.shapeOptions),this._tooltip.updateContent(this._getTooltipText()),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mouseout",this._onMouseOut,this).on("mousemove",this._onMouseMove,this).on("mousedown",this._onMouseDown,this).on("mouseup",this._onMouseUp,this).addTo(this._map),this._map.on("mouseup",this._onMouseUp,this).on("mousemove",this._onMouseMove,this).on("zoomlevelschange",this._onZoomEnd,this).on("touchstart",this._onTouch,this).on("zoomend",this._onZoomEnd,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._clearHideErrorTimeout(),this._cleanUpShape(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,this._map.removeLayer(this._poly),delete this._poly,this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseout",this._onMouseOut,this).off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._clearGuides(),this._map.off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this).off("zoomlevelschange",this._onZoomEnd,this).off("zoomend",this._onZoomEnd,this).off("touchstart",this._onTouch,this).off("click",this._onTouch,this)},deleteLastVertex:function(){if(!(this._markers.length<=1)){var t=this._markers.pop(),e=this._poly,n=e.getLatLngs(),i=n.splice(-1,1)[0];this._poly.setLatLngs(n),this._markerGroup.removeLayer(t),e.getLatLngs().length<2&&this._map.removeLayer(e),this._vertexChanged(i,!1)}},addVertex:function(t){this._markers.length>=2&&!this.options.allowIntersection&&this._poly.newLatLngIntersects(t)?this._showErrorTooltip():(this._errorShown&&this._hideErrorTooltip(),this._markers.push(this._createMarker(t)),this._poly.addLatLng(t),2===this._poly.getLatLngs().length&&this._map.addLayer(this._poly),this._vertexChanged(t,!0))},completeShape:function(){this._markers.length<=1||!this._shapeIsValid()||(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_finishShape:function(){var t=this._poly._defaultShape?this._poly._defaultShape():this._poly.getLatLngs(),e=this._poly.newLatLngIntersects(t[t.length-1]);!this.options.allowIntersection&&e||!this._shapeIsValid()?this._showErrorTooltip():(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_shapeIsValid:function(){return!0},_onZoomEnd:function(){null!==this._markers&&this._updateGuide()},_onMouseMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent),n=this._map.layerPointToLatLng(e);this._currentLatLng=n,this._updateTooltip(n),this._updateGuide(e),this._mouseMarker.setLatLng(n),L.DomEvent.preventDefault(t.originalEvent)},_vertexChanged:function(t,e){this._map.fire(L.Draw.Event.DRAWVERTEX,{layers:this._markerGroup}),this._updateFinishHandler(),this._updateRunningMeasure(t,e),this._clearGuides(),this._updateTooltip()},_onMouseDown:function(t){if(!this._clickHandled&&!this._touchHandled&&!this._disableMarkers){this._onMouseMove(t),this._clickHandled=!0,this._disableNewMarkers();var e=t.originalEvent,n=e.clientX,i=e.clientY;this._startPoint.call(this,n,i)}},_startPoint:function(t,e){this._mouseDownOrigin=L.point(t,e)},_onMouseUp:function(t){var e=t.originalEvent,n=e.clientX,i=e.clientY;this._endPoint.call(this,n,i,t),this._clickHandled=null},_endPoint:function(e,n,i){if(this._mouseDownOrigin){var o=L.point(e,n).distanceTo(this._mouseDownOrigin),r=this._calculateFinishDistance(i.latlng);this.options.maxPoints>1&&this.options.maxPoints==this._markers.length+1?(this.addVertex(i.latlng),this._finishShape()):r<10&&L.Browser.touch?this._finishShape():Math.abs(o)<9*(t.devicePixelRatio||1)&&this.addVertex(i.latlng),this._enableNewMarkers()}this._mouseDownOrigin=null},_onTouch:function(t){var e,n,i=t.originalEvent;!i.touches||!i.touches[0]||this._clickHandled||this._touchHandled||this._disableMarkers||(e=i.touches[0].clientX,n=i.touches[0].clientY,this._disableNewMarkers(),this._touchHandled=!0,this._startPoint.call(this,e,n),this._endPoint.call(this,e,n,t),this._touchHandled=null),this._clickHandled=null},_onMouseOut:function(){this._tooltip&&this._tooltip._onMouseOut.call(this._tooltip)},_calculateFinishDistance:function(t){var e;if(this._markers.length>0){var n;if(this.type===L.Draw.Polyline.TYPE)n=this._markers[this._markers.length-1];else{if(this.type!==L.Draw.Polygon.TYPE)return 1/0;n=this._markers[0]}var i=this._map.latLngToContainerPoint(n.getLatLng()),o=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),r=this._map.latLngToContainerPoint(o.getLatLng());e=i.distanceTo(r)}else e=1/0;return e},_updateFinishHandler:function(){var t=this._markers.length;t>1&&this._markers[t-1].on("click",this._finishShape,this),t>2&&this._markers[t-2].off("click",this._finishShape,this)},_createMarker:function(t){var e=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(e),e},_updateGuide:function(t){var e=this._markers?this._markers.length:0;e>0&&(t=t||this._map.latLngToLayerPoint(this._currentLatLng),this._clearGuides(),this._drawGuide(this._map.latLngToLayerPoint(this._markers[e-1].getLatLng()),t))},_updateTooltip:function(t){var e=this._getTooltipText();t&&this._tooltip.updatePosition(t),this._errorShown||this._tooltip.updateContent(e)},_drawGuide:function(t,e){var n,i,o,r=Math.floor(Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))),a=this.options.guidelineDistance,s=this.options.maxGuideLineLength,l=r>s?r-s:a;for(this._guidesContainer||(this._guidesContainer=L.DomUtil.create("div","leaflet-draw-guides",this._overlayPane));l<r;l+=this.options.guidelineDistance)n=l/r,i={x:Math.floor(t.x*(1-n)+n*e.x),y:Math.floor(t.y*(1-n)+n*e.y)},(o=L.DomUtil.create("div","leaflet-draw-guide-dash",this._guidesContainer)).style.backgroundColor=this._errorShown?this.options.drawError.color:this.options.shapeOptions.color,L.DomUtil.setPosition(o,i)},_updateGuideColor:function(t){if(this._guidesContainer)for(var e=0,n=this._guidesContainer.childNodes.length;e<n;e++)this._guidesContainer.childNodes[e].style.backgroundColor=t},_clearGuides:function(){if(this._guidesContainer)for(;this._guidesContainer.firstChild;)this._guidesContainer.removeChild(this._guidesContainer.firstChild)},_getTooltipText:function(){var t,e,n=this.options.showLength;return 0===this._markers.length?t={text:L.drawLocal.draw.handlers.polyline.tooltip.start}:(e=n?this._getMeasurementString():"",t=1===this._markers.length?{text:L.drawLocal.draw.handlers.polyline.tooltip.cont,subtext:e}:{text:L.drawLocal.draw.handlers.polyline.tooltip.end,subtext:e}),t},_updateRunningMeasure:function(t,e){var n,i,o=this._markers.length;1===this._markers.length?this._measurementRunningTotal=0:(n=o-(e?2:1),i=L.GeometryUtil.isVersion07x()?t.distanceTo(this._markers[n].getLatLng())*(this.options.factor||1):this._map.distance(t,this._markers[n].getLatLng())*(this.options.factor||1),this._measurementRunningTotal+=i*(e?1:-1))},_getMeasurementString:function(){var t,e=this._currentLatLng,n=this._markers[this._markers.length-1].getLatLng();return t=L.GeometryUtil.isVersion07x()?n&&e&&e.distanceTo?this._measurementRunningTotal+e.distanceTo(n)*(this.options.factor||1):this._measurementRunningTotal||0:n&&e?this._measurementRunningTotal+this._map.distance(e,n)*(this.options.factor||1):this._measurementRunningTotal||0,L.GeometryUtil.readableDistance(t,this.options.metric,this.options.feet,this.options.nautic,this.options.precision)},_showErrorTooltip:function(){this._errorShown=!0,this._tooltip.showAsError().updateContent({text:this.options.drawError.message}),this._updateGuideColor(this.options.drawError.color),this._poly.setStyle({color:this.options.drawError.color}),this._clearHideErrorTimeout(),this._hideErrorTimeout=setTimeout(L.Util.bind(this._hideErrorTooltip,this),this.options.drawError.timeout)},_hideErrorTooltip:function(){this._errorShown=!1,this._clearHideErrorTimeout(),this._tooltip.removeError().updateContent(this._getTooltipText()),this._updateGuideColor(this.options.shapeOptions.color),this._poly.setStyle({color:this.options.shapeOptions.color})},_clearHideErrorTimeout:function(){this._hideErrorTimeout&&(clearTimeout(this._hideErrorTimeout),this._hideErrorTimeout=null)},_disableNewMarkers:function(){this._disableMarkers=!0},_enableNewMarkers:function(){setTimeout(function(){this._disableMarkers=!1}.bind(this),50)},_cleanUpShape:function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this)},_fireCreatedEvent:function(){var t=new this.Poly(this._poly.getLatLngs(),this.options.shapeOptions);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.Polygon=L.Draw.Polyline.extend({statics:{TYPE:"polygon"},Poly:L.Polygon,options:{showArea:!1,showLength:!1,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},metric:!0,feet:!0,nautic:!1,precision:{}},initialize:function(t,e){L.Draw.Polyline.prototype.initialize.call(this,t,e),this.type=L.Draw.Polygon.TYPE},_updateFinishHandler:function(){var t=this._markers.length;1===t&&this._markers[0].on("click",this._finishShape,this),t>2&&(this._markers[t-1].on("dblclick",this._finishShape,this),t>3&&this._markers[t-2].off("dblclick",this._finishShape,this))},_getTooltipText:function(){var t,e;return 0===this._markers.length?t=L.drawLocal.draw.handlers.polygon.tooltip.start:this._markers.length<3?(t=L.drawLocal.draw.handlers.polygon.tooltip.cont,e=this._getMeasurementString()):(t=L.drawLocal.draw.handlers.polygon.tooltip.end,e=this._getMeasurementString()),{text:t,subtext:e}},_getMeasurementString:function(){var t=this._area,e="";return t||this.options.showLength?(this.options.showLength&&(e=L.Draw.Polyline.prototype._getMeasurementString.call(this)),t&&(e+="<br>"+L.GeometryUtil.readableArea(t,this.options.metric,this.options.precision)),e):null},_shapeIsValid:function(){return this._markers.length>=3},_vertexChanged:function(t,e){var n;!this.options.allowIntersection&&this.options.showArea&&(n=this._poly.getLatLngs(),this._area=L.GeometryUtil.geodesicArea(n)),L.Draw.Polyline.prototype._vertexChanged.call(this,t,e)},_cleanUpShape:function(){var t=this._markers.length;t>0&&(this._markers[0].off("click",this._finishShape,this),t>2&&this._markers[t-1].off("dblclick",this._finishShape,this))}}),L.SimpleShape={},L.Draw.SimpleShape=L.Draw.Feature.extend({options:{repeatMode:!1},initialize:function(t,e){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._mapDraggable=this._map.dragging.enabled(),this._mapDraggable&&this._map.dragging.disable(),this._container.style.cursor="crosshair",this._tooltip.updateContent({text:this._initialLabelText}),this._map.on("mousedown",this._onMouseDown,this).on("mousemove",this._onMouseMove,this).on("touchstart",this._onMouseDown,this).on("touchmove",this._onMouseMove,this),e.addEventListener("touchstart",L.DomEvent.preventDefault,{passive:!1}))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._mapDraggable&&this._map.dragging.enable(),this._container.style.cursor="",this._map.off("mousedown",this._onMouseDown,this).off("mousemove",this._onMouseMove,this).off("touchstart",this._onMouseDown,this).off("touchmove",this._onMouseMove,this),L.DomEvent.off(e,"mouseup",this._onMouseUp,this),L.DomEvent.off(e,"touchend",this._onMouseUp,this),e.removeEventListener("touchstart",L.DomEvent.preventDefault),this._shape&&(this._map.removeLayer(this._shape),delete this._shape)),this._isDrawing=!1},_getTooltipText:function(){return{text:this._endLabelText}},_onMouseDown:function(t){this._isDrawing=!0,this._startLatLng=t.latlng,L.DomEvent.on(e,"mouseup",this._onMouseUp,this).on(e,"touchend",this._onMouseUp,this).preventDefault(t.originalEvent)},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._isDrawing&&(this._tooltip.updateContent(this._getTooltipText()),this._drawShape(e))},_onMouseUp:function(){this._shape&&this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()}}),L.Draw.Rectangle=L.Draw.SimpleShape.extend({statics:{TYPE:"rectangle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showArea:!0,metric:!0},initialize:function(t,e){this.type=L.Draw.Rectangle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.rectangle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},disable:function(){this._enabled&&(this._isCurrentlyTwoClickDrawing=!1,L.Draw.SimpleShape.prototype.disable.call(this))},_onMouseUp:function(t){this._shape||this._isCurrentlyTwoClickDrawing?this._isCurrentlyTwoClickDrawing&&!function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}(t.target,"leaflet-pane")||L.Draw.SimpleShape.prototype._onMouseUp.call(this):this._isCurrentlyTwoClickDrawing=!0},_drawShape:function(t){this._shape?this._shape.setBounds(new L.LatLngBounds(this._startLatLng,t)):(this._shape=new L.Rectangle(new L.LatLngBounds(this._startLatLng,t),this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_getTooltipText:function(){var t,e,n,i=L.Draw.SimpleShape.prototype._getTooltipText.call(this),o=this._shape,r=this.options.showArea;return o&&(t=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),e=L.GeometryUtil.geodesicArea(t),n=r?L.GeometryUtil.readableArea(e,this.options.metric):""),{text:i.text,subtext:n}}}),L.Draw.Marker=L.Draw.Feature.extend({statics:{TYPE:"marker"},options:{icon:new L.Icon.Default,repeatMode:!1,zIndexOffset:2e3},initialize:function(t,e){this.type=L.Draw.Marker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.marker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,t,e)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._tooltip.updateContent({text:this._initialLabelText}),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("click",this._onClick,this).addTo(this._map),this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onTouch,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._map.off("click",this._onClick,this).off("click",this._onTouch,this),this._marker&&(this._marker.off("click",this._onClick,this),this._map.removeLayer(this._marker),delete this._marker),this._mouseMarker.off("click",this._onClick,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mousemove",this._onMouseMove,this))},_onMouseMove:function(t){var e=t.latlng;this._tooltip.updatePosition(e),this._mouseMarker.setLatLng(e),this._marker?(e=this._mouseMarker.getLatLng(),this._marker.setLatLng(e)):(this._marker=this._createMarker(e),this._marker.on("click",this._onClick,this),this._map.on("click",this._onClick,this).addLayer(this._marker))},_createMarker:function(t){return new L.Marker(t,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset})},_onClick:function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_onTouch:function(t){this._onMouseMove(t),this._onClick()},_fireCreatedEvent:function(){var t=new L.Marker.Touch(this._marker.getLatLng(),{icon:this.options.icon});L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)}}),L.Draw.CircleMarker=L.Draw.Marker.extend({statics:{TYPE:"circlemarker"},options:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0,zIndexOffset:2e3},initialize:function(t,e){this.type=L.Draw.CircleMarker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circlemarker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,t,e)},_fireCreatedEvent:function(){var t=new L.CircleMarker(this._marker.getLatLng(),this.options);L.Draw.Feature.prototype._fireCreatedEvent.call(this,t)},_createMarker:function(t){return new L.CircleMarker(t,this.options)}}),L.Draw.Circle=L.Draw.SimpleShape.extend({statics:{TYPE:"circle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showRadius:!0,metric:!0,feet:!0,nautic:!1},initialize:function(t,e){this.type=L.Draw.Circle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,t,e)},_drawShape:function(t){if(L.GeometryUtil.isVersion07x())var e=this._startLatLng.distanceTo(t);else e=this._map.distance(this._startLatLng,t);this._shape?this._shape.setRadius(e):(this._shape=new L.Circle(this._startLatLng,e,this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var t=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,t)},_onMouseMove:function(t){var e,n=t.latlng,i=this.options.showRadius,o=this.options.metric;if(this._tooltip.updatePosition(n),this._isDrawing){this._drawShape(n),e=this._shape.getRadius().toFixed(1);var r="";i&&(r=L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(e,o,this.options.feet,this.options.nautic)),this._tooltip.updateContent({text:this._endLabelText,subtext:r})}}}),L.Edit=L.Edit||{},L.Edit.Marker=L.Handler.extend({initialize:function(t,e){this._marker=t,L.setOptions(this,e)},addHooks:function(){var t=this._marker;t.dragging.enable(),t.on("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},removeHooks:function(){var t=this._marker;t.dragging.disable(),t.off("dragend",this._onDragEnd,t),this._toggleMarkerHighlight()},_onDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_toggleMarkerHighlight:function(){var t=this._marker._icon;t&&(t.style.display="none",L.DomUtil.hasClass(t,"leaflet-edit-marker-selected")?(L.DomUtil.removeClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,-4)):(L.DomUtil.addClass(t,"leaflet-edit-marker-selected"),this._offsetMarker(t,4)),t.style.display="")},_offsetMarker:function(t,e){var n=parseInt(t.style.marginTop,10)-e,i=parseInt(t.style.marginLeft,10)-e;t.style.marginTop=n+"px",t.style.marginLeft=i+"px"}}),L.Marker.addInitHook((function(){L.Edit.Marker&&(this.editing=new L.Edit.Marker(this),this.options.editable&&this.editing.enable())})),L.Edit=L.Edit||{},L.Edit.Poly=L.Handler.extend({initialize:function(t){this.latlngs=[t._latlngs],t._holes&&(this.latlngs=this.latlngs.concat(t._holes)),this._poly=t,this._poly.on("revert-edited",this._updateLatLngs,this)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._poly._latlngs)?this._poly._latlngs:this._poly._latlngs[0]:this._poly._latlngs},_eachVertexHandler:function(t){for(var e=0;e<this._verticesHandlers.length;e++)t(this._verticesHandlers[e])},addHooks:function(){this._initHandlers(),this._eachVertexHandler((function(t){t.addHooks()}))},removeHooks:function(){this._eachVertexHandler((function(t){t.removeHooks()}))},updateMarkers:function(){this._eachVertexHandler((function(t){t.updateMarkers()}))},_initHandlers:function(){this._verticesHandlers=[];for(var t=0;t<this.latlngs.length;t++)this._verticesHandlers.push(new L.Edit.PolyVerticesEdit(this._poly,this.latlngs[t],this._poly.options.poly))},_updateLatLngs:function(t){this.latlngs=[t.layer._latlngs],t.layer._holes&&(this.latlngs=this.latlngs.concat(t.layer._holes))}}),L.Edit.PolyVerticesEdit=L.Handler.extend({options:{icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),drawError:{color:"#b00b00",timeout:1e3}},initialize:function(t,e,n){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this._poly=t,n&&n.drawError&&(n.drawError=L.Util.extend({},this.options.drawError,n.drawError)),this._latlngs=e,L.setOptions(this,n)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]:this._latlngs},addHooks:function(){var t=this._poly,e=t._path;t instanceof L.Polygon||(t.options.fill=!1,t.options.editing&&(t.options.editing.fill=!1)),e&&t.options.editing&&t.options.editing.className&&(t.options.original.className&&t.options.original.className.split(" ").forEach((function(t){L.DomUtil.removeClass(e,t)})),t.options.editing.className.split(" ").forEach((function(t){L.DomUtil.addClass(e,t)}))),t.setStyle(t.options.editing),this._poly._map&&(this._map=this._poly._map,this._markerGroup||this._initMarkers(),this._poly._map.addLayer(this._markerGroup))},removeHooks:function(){var t=this._poly,e=t._path;e&&t.options.editing&&t.options.editing.className&&(t.options.editing.className.split(" ").forEach((function(t){L.DomUtil.removeClass(e,t)})),t.options.original.className&&t.options.original.className.split(" ").forEach((function(t){L.DomUtil.addClass(e,t)}))),t.setStyle(t.options.original),t._map&&(t._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers)},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._markers=[];var t,e,n,i,o,r,a=this._defaultShape();for(t=0,n=a.length;t<n;t++)(i=this._createMarker(a[t],t)).on("click",this._onMarkerClick,this),i.on("contextmenu",this._onContextMenu,this),this._markers.push(i);for(t=0,e=n-1;t<n;e=t++)(0!==t||L.Polygon&&this._poly instanceof L.Polygon)&&(o=this._markers[e],r=this._markers[t],this._createMiddleMarker(o,r),this._updatePrevNext(o,r))},_createMarker:function(t,e){var n=new L.Marker.Touch(t,{draggable:!0,icon:this.options.icon});return n._origLatLng=t,n._index=e,n.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._fireEdit,this).on("touchmove",this._onTouchMove,this).on("touchend",this._fireEdit,this).on("MSPointerMove",this._onTouchMove,this).on("MSPointerUp",this._fireEdit,this),this._markerGroup.addLayer(n),n},_onMarkerDragStart:function(){this._poly.fire("editstart")},_spliceLatLngs:function(){var t=this._defaultShape(),e=[].splice.apply(t,arguments);return this._poly._convertLatLngs(t,!0),this._poly.redraw(),e},_removeMarker:function(t){var e=t._index;this._markerGroup.removeLayer(t),this._markers.splice(e,1),this._spliceLatLngs(e,1),this._updateIndexes(e,-1),t.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._fireEdit,this).off("touchmove",this._onMarkerDrag,this).off("touchend",this._fireEdit,this).off("click",this._onMarkerClick,this).off("MSPointerMove",this._onTouchMove,this).off("MSPointerUp",this._fireEdit,this)},_fireEdit:function(){this._poly.edited=!0,this._poly.fire("edit"),this._poly._map.fire(L.Draw.Event.EDITVERTEX,{layers:this._markerGroup,poly:this._poly})},_onMarkerDrag:function(t){var e=t.target,n=this._poly,i=L.LatLngUtil.cloneLatLng(e._origLatLng);if(L.extend(e._origLatLng,e._latlng),n.options.poly){var o=n._map._editTooltip;if(!n.options.poly.allowIntersection&&n.intersects()){L.extend(e._origLatLng,i),e.setLatLng(i);var r=n.options.color;n.setStyle({color:this.options.drawError.color}),o&&o.updateContent({text:L.drawLocal.draw.handlers.polyline.error}),setTimeout((function(){n.setStyle({color:r}),o&&o.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext})}),1e3)}}e._middleLeft&&e._middleLeft.setLatLng(this._getMiddleLatLng(e._prev,e)),e._middleRight&&e._middleRight.setLatLng(this._getMiddleLatLng(e,e._next)),this._poly._bounds._southWest=L.latLng(1/0,1/0),this._poly._bounds._northEast=L.latLng(-1/0,-1/0);var a=this._poly.getLatLngs();this._poly._convertLatLngs(a,!0),this._poly.redraw(),this._poly.fire("editdrag")},_onMarkerClick:function(t){var e=L.Polygon&&this._poly instanceof L.Polygon?4:3,n=t.target;this._defaultShape().length<e||(this._removeMarker(n),this._updatePrevNext(n._prev,n._next),n._middleLeft&&this._markerGroup.removeLayer(n._middleLeft),n._middleRight&&this._markerGroup.removeLayer(n._middleRight),n._prev&&n._next?this._createMiddleMarker(n._prev,n._next):n._prev?n._next||(n._prev._middleRight=null):n._next._middleLeft=null,this._fireEdit())},_onContextMenu:function(t){var e=t.target;this._poly,this._poly._map.fire(L.Draw.Event.MARKERCONTEXT,{marker:e,layers:this._markerGroup,poly:this._poly}),L.DomEvent.stopPropagation},_onTouchMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent.touches[0]),n=this._map.layerPointToLatLng(e),i=t.target;L.extend(i._origLatLng,n),i._middleLeft&&i._middleLeft.setLatLng(this._getMiddleLatLng(i._prev,i)),i._middleRight&&i._middleRight.setLatLng(this._getMiddleLatLng(i,i._next)),this._poly.redraw(),this.updateMarkers()},_updateIndexes:function(t,e){this._markerGroup.eachLayer((function(n){n._index>t&&(n._index+=e)}))},_createMiddleMarker:function(t,e){var n,i,o,r=this._getMiddleLatLng(t,e),a=this._createMarker(r);a.setOpacity(.6),t._middleRight=e._middleLeft=a,i=function(){a.off("touchmove",i,this);var o=e._index;a._index=o,a.off("click",n,this).on("click",this._onMarkerClick,this),r.lat=a.getLatLng().lat,r.lng=a.getLatLng().lng,this._spliceLatLngs(o,0,r),this._markers.splice(o,0,a),a.setOpacity(1),this._updateIndexes(o,1),e._index++,this._updatePrevNext(t,a),this._updatePrevNext(a,e),this._poly.fire("editstart")},o=function(){a.off("dragstart",i,this),a.off("dragend",o,this),a.off("touchmove",i,this),this._createMiddleMarker(t,a),this._createMiddleMarker(a,e)},n=function(){i.call(this),o.call(this),this._fireEdit()},a.on("click",n,this).on("dragstart",i,this).on("dragend",o,this).on("touchmove",i,this),this._markerGroup.addLayer(a)},_updatePrevNext:function(t,e){t&&(t._next=e),e&&(e._prev=t)},_getMiddleLatLng:function(t,e){var n=this._poly._map,i=n.project(t.getLatLng()),o=n.project(e.getLatLng());return n.unproject(i._add(o)._divideBy(2))}}),L.Polyline.addInitHook((function(){this.editing||(L.Edit.Poly&&(this.editing=new L.Edit.Poly(this),this.options.editable&&this.editing.enable()),this.on("add",(function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()})),this.on("remove",(function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})))})),L.Edit=L.Edit||{},L.Edit.SimpleShape=L.Handler.extend({options:{moveIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move"}),resizeIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize"}),touchMoveIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move leaflet-touch-icon"}),touchResizeIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize leaflet-touch-icon"})},initialize:function(t,e){L.Browser.touch&&(this.options.moveIcon=this.options.touchMoveIcon,this.options.resizeIcon=this.options.touchResizeIcon),this._shape=t,L.Util.setOptions(this,e)},addHooks:function(){var t=this._shape;this._shape._map&&(this._map=this._shape._map,t.setStyle(t.options.editing),t._map&&(this._map=t._map,this._markerGroup||this._initMarkers(),this._map.addLayer(this._markerGroup)))},removeHooks:function(){var t=this._shape;if(t.setStyle(t.options.original),t._map){this._unbindMarker(this._moveMarker);for(var e=0,n=this._resizeMarkers.length;e<n;e++)this._unbindMarker(this._resizeMarkers[e]);this._resizeMarkers=null,this._map.removeLayer(this._markerGroup),delete this._markerGroup}this._map=null},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._createMoveMarker(),this._createResizeMarker()},_createMoveMarker:function(){},_createResizeMarker:function(){},_createMarker:function(t,e){var n=new L.Marker.Touch(t,{draggable:!0,icon:e,zIndexOffset:10});return this._bindMarker(n),this._markerGroup.addLayer(n),n},_bindMarker:function(t){t.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._onMarkerDragEnd,this).on("touchstart",this._onTouchStart,this).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onTouchEnd,this).on("MSPointerUp",this._onTouchEnd,this)},_unbindMarker:function(t){t.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._onMarkerDragEnd,this).off("touchstart",this._onTouchStart,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onTouchEnd,this).off("MSPointerUp",this._onTouchEnd,this)},_onMarkerDragStart:function(t){t.target.setOpacity(0),this._shape.fire("editstart")},_fireEdit:function(){this._shape.edited=!0,this._shape.fire("edit")},_onMarkerDrag:function(t){var e=t.target,n=e.getLatLng();e===this._moveMarker?this._move(n):this._resize(n),this._shape.redraw(),this._shape.fire("editdrag")},_onMarkerDragEnd:function(t){t.target.setOpacity(1),this._fireEdit()},_onTouchStart:function(t){if(L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,t),"function"==typeof this._getCorners){var e=this._getCorners(),n=t.target,i=n._cornerIndex;n.setOpacity(0),this._oppositeCorner=e[(i+2)%4],this._toggleCornerMarkers(0,i)}this._shape.fire("editstart")},_onTouchMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent.touches[0]),n=this._map.layerPointToLatLng(e);return t.target===this._moveMarker?this._move(n):this._resize(n),this._shape.redraw(),!1},_onTouchEnd:function(t){t.target.setOpacity(1),this.updateMarkers(),this._fireEdit()},_move:function(){},_resize:function(){}}),L.Edit=L.Edit||{},L.Edit.Rectangle=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var t=this._shape.getBounds().getCenter();this._moveMarker=this._createMarker(t,this.options.moveIcon)},_createResizeMarker:function(){var t=this._getCorners();this._resizeMarkers=[];for(var e=0,n=t.length;e<n;e++)this._resizeMarkers.push(this._createMarker(t[e],this.options.resizeIcon)),this._resizeMarkers[e]._cornerIndex=e},_onMarkerDragStart:function(t){L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,t);var e=this._getCorners(),n=t.target._cornerIndex;this._oppositeCorner=e[(n+2)%4],this._toggleCornerMarkers(0,n)},_onMarkerDragEnd:function(t){var e,n=t.target;n===this._moveMarker&&(e=this._shape.getBounds().getCenter(),n.setLatLng(e)),this._toggleCornerMarkers(1),this._repositionCornerMarkers(),L.Edit.SimpleShape.prototype._onMarkerDragEnd.call(this,t)},_move:function(t){for(var e,n=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),i=this._shape.getBounds().getCenter(),o=[],r=0,a=n.length;r<a;r++)e=[n[r].lat-i.lat,n[r].lng-i.lng],o.push([t.lat+e[0],t.lng+e[1]]);this._shape.setLatLngs(o),this._repositionCornerMarkers(),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})},_resize:function(t){var e;this._shape.setBounds(L.latLngBounds(t,this._oppositeCorner)),e=this._shape.getBounds(),this._moveMarker.setLatLng(e.getCenter()),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})},_getCorners:function(){var t=this._shape.getBounds();return[t.getNorthWest(),t.getNorthEast(),t.getSouthEast(),t.getSouthWest()]},_toggleCornerMarkers:function(t){for(var e=0,n=this._resizeMarkers.length;e<n;e++)this._resizeMarkers[e].setOpacity(t)},_repositionCornerMarkers:function(){for(var t=this._getCorners(),e=0,n=this._resizeMarkers.length;e<n;e++)this._resizeMarkers[e].setLatLng(t[e])}}),L.Rectangle.addInitHook((function(){L.Edit.Rectangle&&(this.editing=new L.Edit.Rectangle(this),this.options.editable&&this.editing.enable())})),L.Edit=L.Edit||{},L.Edit.CircleMarker=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var t=this._shape.getLatLng();this._moveMarker=this._createMarker(t,this.options.moveIcon)},_createResizeMarker:function(){this._resizeMarkers=[]},_move:function(t){if(this._resizeMarkers.length){var e=this._getResizeMarkerPoint(t);this._resizeMarkers[0].setLatLng(e)}this._shape.setLatLng(t),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})}}),L.CircleMarker.addInitHook((function(){L.Edit.CircleMarker&&(this.editing=new L.Edit.CircleMarker(this),this.options.editable&&this.editing.enable()),this.on("add",(function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()})),this.on("remove",(function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()}))})),L.Edit=L.Edit||{},L.Edit.Circle=L.Edit.CircleMarker.extend({_createResizeMarker:function(){var t=this._shape.getLatLng(),e=this._getResizeMarkerPoint(t);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(e,this.options.resizeIcon))},_getResizeMarkerPoint:function(t){var e=this._shape._radius*Math.cos(Math.PI/4),n=this._map.project(t);return this._map.unproject([n.x+e,n.y-e])},_resize:function(t){var e=this._moveMarker.getLatLng();L.GeometryUtil.isVersion07x()?radius=e.distanceTo(t):radius=this._map.distance(e,t),this._shape.setRadius(radius),this._map.editTooltip&&this._map._editTooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.subtext+"<br />"+L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(radius,!0,this.options.feet,this.options.nautic)}),this._shape.setRadius(radius),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})}}),L.Circle.addInitHook((function(){L.Edit.Circle&&(this.editing=new L.Edit.Circle(this),this.options.editable&&this.editing.enable())})),L.Map.mergeOptions({touchExtend:!0}),L.Map.TouchExtend=L.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane},addHooks:function(){L.DomEvent.on(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.on(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.on(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.on(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.on(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.on(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.on(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.on(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.on(this._container,"touchleave",this._onTouchLeave,this))},removeHooks:function(){L.DomEvent.off(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.off(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.off(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.off(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.off(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.off(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.off(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.off(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.off(this._container,"touchleave",this._onTouchLeave,this))},_touchEvent:function(t,e){var n={};if(void 0!==t.touches){if(!t.touches.length)return;n=t.touches[0]}else{if("touch"!==t.pointerType)return;if(n=t,!this._filterClick(t))return}var i=this._map.mouseEventToContainerPoint(n),o=this._map.mouseEventToLayerPoint(n),r=this._map.layerPointToLatLng(o);this._map.fire(e,{latlng:r,layerPoint:o,containerPoint:i,pageX:n.pageX,pageY:n.pageY,originalEvent:t})},_filterClick:function(t){var e=t.timeStamp||t.originalEvent.timeStamp,n=L.DomEvent._lastClick&&e-L.DomEvent._lastClick;return n&&n>100&&n<500||t.target._simulatedClick&&!t._simulated?(L.DomEvent.stop(t),!1):(L.DomEvent._lastClick=e,!0)},_onTouchStart:function(t){this._map._loaded&&this._touchEvent(t,"touchstart")},_onTouchEnd:function(t){this._map._loaded&&this._touchEvent(t,"touchend")},_onTouchCancel:function(t){if(this._map._loaded){var e="touchcancel";this._detectIE()&&(e="pointercancel"),this._touchEvent(t,e)}},_onTouchLeave:function(t){this._map._loaded&&this._touchEvent(t,"touchleave")},_onTouchMove:function(t){this._map._loaded&&this._touchEvent(t,"touchmove")},_detectIE:function(){var e=t.navigator.userAgent,n=e.indexOf("MSIE ");if(n>0)return parseInt(e.substring(n+5,e.indexOf(".",n)),10);if(e.indexOf("Trident/")>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}var o=e.indexOf("Edge/");return o>0&&parseInt(e.substring(o+5,e.indexOf(".",o)),10)}}),L.Map.addInitHook("addHandler","touchExtend",L.Map.TouchExtend),L.Marker.Touch=L.Marker.extend({_initInteraction:function(){return this.addInteractiveTarget?L.Marker.prototype._initInteraction.apply(this):this._initInteractionLegacy()},_initInteractionLegacy:function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu","touchstart","touchend","touchmove"];this._detectIE?e.concat(["MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"]):e.concat(["touchcancel"]),L.DomUtil.addClass(t,"leaflet-clickable"),L.DomEvent.on(t,"click",this._onMouseClick,this),L.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var n=0;n<e.length;n++)L.DomEvent.on(t,e[n],this._fireMouseEvent,this);L.Handler.MarkerDrag&&(this.dragging=new L.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_detectIE:function(){var e=t.navigator.userAgent,n=e.indexOf("MSIE ");if(n>0)return parseInt(e.substring(n+5,e.indexOf(".",n)),10);if(e.indexOf("Trident/")>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}var o=e.indexOf("Edge/");return o>0&&parseInt(e.substring(o+5,e.indexOf(".",o)),10)}}),L.LatLngUtil={cloneLatLngs:function(t){for(var e=[],n=0,i=t.length;n<i;n++)Array.isArray(t[n])?e.push(L.LatLngUtil.cloneLatLngs(t[n])):e.push(this.cloneLatLng(t[n]));return e},cloneLatLng:function(t){return L.latLng(t.lat,t.lng)}},function(){var t={km:2,ha:2,m:0,mi:2,ac:2,yd:0,ft:0,nm:2};L.GeometryUtil=L.extend(L.GeometryUtil||{},{geodesicArea:function(t){var e,n,i=t.length,o=0,r=Math.PI/180;if(i>2){for(var a=0;a<i;a++)e=t[a],o+=((n=t[(a+1)%i]).lng-e.lng)*r*(2+Math.sin(e.lat*r)+Math.sin(n.lat*r));o=6378137*o*6378137/2}return Math.abs(o)},formattedNumber:function(t,e){var n=parseFloat(t).toFixed(e),i=L.drawLocal.format&&L.drawLocal.format.numeric,o=i&&i.delimiters,r=o&&o.thousands,a=o&&o.decimal;if(r||a){var s=n.split(".");n=r?s[0].replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+r):s[0],a=a||".",s.length>1&&(n=n+a+s[1])}return n},readableArea:function(e,n,i){var o,r;return i=L.Util.extend({},t,i),n?(r=["ha","m"],type=typeof n,"string"===type?r=[n]:"boolean"!==type&&(r=n),o=e>=1e6&&-1!==r.indexOf("km")?L.GeometryUtil.formattedNumber(1e-6*e,i.km)+" km²":e>=1e4&&-1!==r.indexOf("ha")?L.GeometryUtil.formattedNumber(1e-4*e,i.ha)+" ha":L.GeometryUtil.formattedNumber(e,i.m)+" m²"):o=(e/=.836127)>=3097600?L.GeometryUtil.formattedNumber(e/3097600,i.mi)+" mi²":e>=4840?L.GeometryUtil.formattedNumber(e/4840,i.ac)+" acres":L.GeometryUtil.formattedNumber(e,i.yd)+" yd²",o},readableDistance:function(e,n,i,o,r){var a;switch(r=L.Util.extend({},t,r),n?"string"==typeof n?n:"metric":i?"feet":o?"nauticalMile":"yards"){case"metric":a=e>1e3?L.GeometryUtil.formattedNumber(e/1e3,r.km)+" km":L.GeometryUtil.formattedNumber(e,r.m)+" m";break;case"feet":e*=3.28083,a=L.GeometryUtil.formattedNumber(e,r.ft)+" ft";break;case"nauticalMile":e*=.53996,a=L.GeometryUtil.formattedNumber(e/1e3,r.nm)+" nm";break;default:a=(e*=1.09361)>1760?L.GeometryUtil.formattedNumber(e/1760,r.mi)+" miles":L.GeometryUtil.formattedNumber(e,r.yd)+" yd"}return a},isVersion07x:function(){var t=L.version.split(".");return 0===parseInt(t[0],10)&&7===parseInt(t[1],10)}})}(),L.Util.extend(L.LineUtil,{segmentsIntersect:function(t,e,n,i){return this._checkCounterclockwise(t,n,i)!==this._checkCounterclockwise(e,n,i)&&this._checkCounterclockwise(t,e,n)!==this._checkCounterclockwise(t,e,i)},_checkCounterclockwise:function(t,e,n){return(n.y-t.y)*(e.x-t.x)>(e.y-t.y)*(n.x-t.x)}}),L.Polyline.include({intersects:function(){var t,e,n,i=this._getProjectedPoints(),o=i?i.length:0;if(this._tooFewPointsForIntersection())return!1;for(t=o-1;t>=3;t--)if(e=i[t-1],n=i[t],this._lineSegmentsIntersectsRange(e,n,t-2))return!0;return!1},newLatLngIntersects:function(t,e){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(t),e)},newPointIntersects:function(t,e){var n=this._getProjectedPoints(),i=n?n.length:0,o=n?n[i-1]:null,r=i-2;return!this._tooFewPointsForIntersection(1)&&this._lineSegmentsIntersectsRange(o,t,r,e?1:0)},_tooFewPointsForIntersection:function(t){var e=this._getProjectedPoints(),n=e?e.length:0;return!e||(n+=t||0)<=3},_lineSegmentsIntersectsRange:function(t,e,n,i){var o,r,a=this._getProjectedPoints();i=i||0;for(var s=n;s>i;s--)if(o=a[s-1],r=a[s],L.LineUtil.segmentsIntersect(t,e,o,r))return!0;return!1},_getProjectedPoints:function(){if(!this._defaultShape)return this._originalPoints;for(var t=[],e=this._defaultShape(),n=0;n<e.length;n++)t.push(this._map.latLngToLayerPoint(e[n]));return t}}),L.Polygon.include({intersects:function(){var t,e,n,i,o=this._getProjectedPoints();return!this._tooFewPointsForIntersection()&&(!!L.Polyline.prototype.intersects.call(this)||(t=o.length,e=o[0],n=o[t-1],i=t-2,this._lineSegmentsIntersectsRange(n,e,i,1)))}}),L.Control.Draw=L.Control.extend({options:{position:"topleft",draw:{},edit:!1},initialize:function(t){if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");var e;L.Control.prototype.initialize.call(this,t),this._toolbars={},L.DrawToolbar&&this.options.draw&&(e=new L.DrawToolbar(this.options.draw),this._toolbars[L.DrawToolbar.TYPE]=e,this._toolbars[L.DrawToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.EditToolbar&&this.options.edit&&(e=new L.EditToolbar(this.options.edit),this._toolbars[L.EditToolbar.TYPE]=e,this._toolbars[L.EditToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.toolbar=this},onAdd:function(t){var e,n=L.DomUtil.create("div","leaflet-draw"),i=!1;for(var o in this._toolbars)this._toolbars.hasOwnProperty(o)&&(e=this._toolbars[o].addToolbar(t))&&(i||(L.DomUtil.hasClass(e,"leaflet-draw-toolbar-top")||L.DomUtil.addClass(e.childNodes[0],"leaflet-draw-toolbar-top"),i=!0),n.appendChild(e));return n},onRemove:function(){for(var t in this._toolbars)this._toolbars.hasOwnProperty(t)&&this._toolbars[t].removeToolbar()},setDrawingOptions:function(t){for(var e in this._toolbars)this._toolbars[e]instanceof L.DrawToolbar&&this._toolbars[e].setOptions(t)},_toolbarEnabled:function(t){var e=t.target;for(var n in this._toolbars)this._toolbars[n]!==e&&this._toolbars[n].disable()}}),L.Map.mergeOptions({drawControlTooltips:!0,drawControl:!1}),L.Map.addInitHook((function(){this.options.drawControl&&(this.drawControl=new L.Control.Draw,this.addControl(this.drawControl))})),L.Toolbar=L.Class.extend({initialize:function(t){L.setOptions(this,t),this._modes={},this._actionButtons=[],this._activeMode=null;var e=L.version.split(".");1===parseInt(e[0],10)&&parseInt(e[1],10)>=2?L.Toolbar.include(L.Evented.prototype):L.Toolbar.include(L.Mixin.Events)},enabled:function(){return null!==this._activeMode},disable:function(){this.enabled()&&this._activeMode.handler.disable()},addToolbar:function(t){var e,n=L.DomUtil.create("div","leaflet-draw-section"),i=0,o=this._toolbarClass||"",r=this.getModeHandlers(t);for(this._toolbarContainer=L.DomUtil.create("div","leaflet-draw-toolbar leaflet-bar"),this._map=t,e=0;e<r.length;e++)r[e].enabled&&this._initModeHandler(r[e].handler,this._toolbarContainer,i++,o,r[e].title);if(i)return this._lastButtonIndex=--i,this._actionsContainer=L.DomUtil.create("ul","leaflet-draw-actions"),n.appendChild(this._toolbarContainer),n.appendChild(this._actionsContainer),n},removeToolbar:function(){for(var t in this._modes)this._modes.hasOwnProperty(t)&&(this._disposeButton(this._modes[t].button,this._modes[t].handler.enable,this._modes[t].handler),this._modes[t].handler.disable(),this._modes[t].handler.off("enabled",this._handlerActivated,this).off("disabled",this._handlerDeactivated,this));this._modes={};for(var e=0,n=this._actionButtons.length;e<n;e++)this._disposeButton(this._actionButtons[e].button,this._actionButtons[e].callback,this);this._actionButtons=[],this._actionsContainer=null},_initModeHandler:function(t,e,n,i,o){var r=t.type;this._modes[r]={},this._modes[r].handler=t,this._modes[r].button=this._createButton({type:r,title:o,className:i+"-"+r,container:e,callback:this._modes[r].handler.enable,context:this._modes[r].handler}),this._modes[r].buttonIndex=n,this._modes[r].handler.on("enabled",this._handlerActivated,this).on("disabled",this._handlerDeactivated,this)},_detectIOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!t.MSStream},_createButton:function(t){var e=L.DomUtil.create("a",t.className||"",t.container),n=L.DomUtil.create("span","sr-only",t.container);e.href="#",e.appendChild(n),t.title&&(e.title=t.title,n.innerHTML=t.title),t.text&&(e.innerHTML=t.text,n.innerHTML=t.text);var i=this._detectIOS()?"touchstart":"click";return L.DomEvent.on(e,"click",L.DomEvent.stopPropagation).on(e,"mousedown",L.DomEvent.stopPropagation).on(e,"dblclick",L.DomEvent.stopPropagation).on(e,"touchstart",L.DomEvent.stopPropagation).on(e,"click",L.DomEvent.preventDefault).on(e,i,t.callback,t.context),e},_disposeButton:function(t,e){var n=this._detectIOS()?"touchstart":"click";L.DomEvent.off(t,"click",L.DomEvent.stopPropagation).off(t,"mousedown",L.DomEvent.stopPropagation).off(t,"dblclick",L.DomEvent.stopPropagation).off(t,"touchstart",L.DomEvent.stopPropagation).off(t,"click",L.DomEvent.preventDefault).off(t,n,e)},_handlerActivated:function(t){this.disable(),this._activeMode=this._modes[t.handler],L.DomUtil.addClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._showActionsToolbar(),this.fire("enable")},_handlerDeactivated:function(){this._hideActionsToolbar(),L.DomUtil.removeClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._activeMode=null,this.fire("disable")},_createActions:function(t){var e,n,i,o,r=this._actionsContainer,a=this.getActions(t),s=a.length;for(n=0,i=this._actionButtons.length;n<i;n++)this._disposeButton(this._actionButtons[n].button,this._actionButtons[n].callback);for(this._actionButtons=[];r.firstChild;)r.removeChild(r.firstChild);for(var l=0;l<s;l++)"enabled"in a[l]&&!a[l].enabled||(e=L.DomUtil.create("li","",r),o=this._createButton({title:a[l].title,text:a[l].text,container:e,callback:a[l].callback,context:a[l].context}),this._actionButtons.push({button:o,callback:a[l].callback}))},_showActionsToolbar:function(){var t=this._activeMode.buttonIndex,e=this._lastButtonIndex,n=this._activeMode.button.offsetTop-1;this._createActions(this._activeMode.handler),this._actionsContainer.style.top=n+"px",0===t&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-top")),t===e&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-bottom")),this._actionsContainer.style.display="block",this._map.fire(L.Draw.Event.TOOLBAROPENED)},_hideActionsToolbar:function(){this._actionsContainer.style.display="none",L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-top"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-bottom"),this._map.fire(L.Draw.Event.TOOLBARCLOSED)}}),L.Draw=L.Draw||{},L.Draw.Tooltip=L.Class.extend({initialize:function(t){this._map=t,this._popupPane=t._panes.popupPane,this._visible=!1,this._container=t.options.drawControlTooltips?L.DomUtil.create("div","leaflet-draw-tooltip",this._popupPane):null,this._singleLineLabel=!1,this._map.on("mouseout",this._onMouseOut,this)},dispose:function(){this._map.off("mouseout",this._onMouseOut,this),this._container&&(this._popupPane.removeChild(this._container),this._container=null)},updateContent:function(t){return this._container?(t.subtext=t.subtext||"",0!==t.subtext.length||this._singleLineLabel?t.subtext.length>0&&this._singleLineLabel&&(L.DomUtil.removeClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!1):(L.DomUtil.addClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!0),this._container.innerHTML=(t.subtext.length>0?'<span class="leaflet-draw-tooltip-subtext">'+t.subtext+"</span><br />":"")+"<span>"+t.text+"</span>",t.text||t.subtext?(this._visible=!0,this._container.style.visibility="inherit"):(this._visible=!1,this._container.style.visibility="hidden"),this):this},updatePosition:function(t){var e=this._map.latLngToLayerPoint(t),n=this._container;return this._container&&(this._visible&&(n.style.visibility="inherit"),L.DomUtil.setPosition(n,e)),this},showAsError:function(){return this._container&&L.DomUtil.addClass(this._container,"leaflet-error-draw-tooltip"),this},removeError:function(){return this._container&&L.DomUtil.removeClass(this._container,"leaflet-error-draw-tooltip"),this},_onMouseOut:function(){this._container&&(this._container.style.visibility="hidden")}}),L.DrawToolbar=L.Toolbar.extend({statics:{TYPE:"draw"},options:{polyline:{},polygon:{},rectangle:{},circle:{},marker:{},circlemarker:{}},initialize:function(t){for(var e in this.options)this.options.hasOwnProperty(e)&&t[e]&&(t[e]=L.extend({},this.options[e],t[e]));this._toolbarClass="leaflet-draw-draw",L.Toolbar.prototype.initialize.call(this,t)},getModeHandlers:function(t){return[{enabled:this.options.polyline,handler:new L.Draw.Polyline(t,this.options.polyline),title:L.drawLocal.draw.toolbar.buttons.polyline},{enabled:this.options.polygon,handler:new L.Draw.Polygon(t,this.options.polygon),title:L.drawLocal.draw.toolbar.buttons.polygon},{enabled:this.options.rectangle,handler:new L.Draw.Rectangle(t,this.options.rectangle),title:L.drawLocal.draw.toolbar.buttons.rectangle},{enabled:this.options.circle,handler:new L.Draw.Circle(t,this.options.circle),title:L.drawLocal.draw.toolbar.buttons.circle},{enabled:this.options.marker,handler:new L.Draw.Marker(t,this.options.marker),title:L.drawLocal.draw.toolbar.buttons.marker},{enabled:this.options.circlemarker,handler:new L.Draw.CircleMarker(t,this.options.circlemarker),title:L.drawLocal.draw.toolbar.buttons.circlemarker}]},getActions:function(t){return[{enabled:t.completeShape,title:L.drawLocal.draw.toolbar.finish.title,text:L.drawLocal.draw.toolbar.finish.text,callback:t.completeShape,context:t},{enabled:t.deleteLastVertex,title:L.drawLocal.draw.toolbar.undo.title,text:L.drawLocal.draw.toolbar.undo.text,callback:t.deleteLastVertex,context:t},{title:L.drawLocal.draw.toolbar.actions.title,text:L.drawLocal.draw.toolbar.actions.text,callback:this.disable,context:this}]},setOptions:function(t){for(var e in L.setOptions(this,t),this._modes)this._modes.hasOwnProperty(e)&&t.hasOwnProperty(e)&&this._modes[e].handler.setOptions(t[e])}}),L.EditToolbar=L.Toolbar.extend({statics:{TYPE:"edit"},options:{edit:{selectedPathOptions:{dashArray:"10, 10",fill:!0,fillColor:"#fe57a1",fillOpacity:.1,maintainColor:!1}},remove:{},poly:null,featureGroup:null},initialize:function(t){t.edit&&(void 0===t.edit.selectedPathOptions&&(t.edit.selectedPathOptions=this.options.edit.selectedPathOptions),t.edit.selectedPathOptions=L.extend({},this.options.edit.selectedPathOptions,t.edit.selectedPathOptions)),t.remove&&(t.remove=L.extend({},this.options.remove,t.remove)),t.poly&&(t.poly=L.extend({},this.options.poly,t.poly)),this._toolbarClass="leaflet-draw-edit",L.Toolbar.prototype.initialize.call(this,t),this._selectedFeatureCount=0},getModeHandlers:function(t){var e=this.options.featureGroup;return[{enabled:this.options.edit,handler:new L.EditToolbar.Edit(t,{featureGroup:e,selectedPathOptions:this.options.edit.selectedPathOptions,poly:this.options.poly}),title:L.drawLocal.edit.toolbar.buttons.edit},{enabled:this.options.remove,handler:new L.EditToolbar.Delete(t,{featureGroup:e}),title:L.drawLocal.edit.toolbar.buttons.remove}]},getActions:function(t){var e=[{title:L.drawLocal.edit.toolbar.actions.save.title,text:L.drawLocal.edit.toolbar.actions.save.text,callback:this._save,context:this},{title:L.drawLocal.edit.toolbar.actions.cancel.title,text:L.drawLocal.edit.toolbar.actions.cancel.text,callback:this.disable,context:this}];return t.removeAllLayers&&e.push({title:L.drawLocal.edit.toolbar.actions.clearAll.title,text:L.drawLocal.edit.toolbar.actions.clearAll.text,callback:this._clearAllLayers,context:this}),e},addToolbar:function(t){var e=L.Toolbar.prototype.addToolbar.call(this,t);return this._checkDisabled(),this.options.featureGroup.on("layeradd layerremove",this._checkDisabled,this),e},removeToolbar:function(){this.options.featureGroup.off("layeradd layerremove",this._checkDisabled,this),L.Toolbar.prototype.removeToolbar.call(this)},disable:function(){this.enabled()&&(this._activeMode.handler.revertLayers(),L.Toolbar.prototype.disable.call(this))},_save:function(){this._activeMode.handler.save(),this._activeMode&&this._activeMode.handler.disable()},_clearAllLayers:function(){this._activeMode.handler.removeAllLayers(),this._activeMode&&this._activeMode.handler.disable()},_checkDisabled:function(){var t,e=0!==this.options.featureGroup.getLayers().length;this.options.edit&&(t=this._modes[L.EditToolbar.Edit.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.edit:L.drawLocal.edit.toolbar.buttons.editDisabled)),this.options.remove&&(t=this._modes[L.EditToolbar.Delete.TYPE].button,e?L.DomUtil.removeClass(t,"leaflet-disabled"):L.DomUtil.addClass(t,"leaflet-disabled"),t.setAttribute("title",e?L.drawLocal.edit.toolbar.buttons.remove:L.drawLocal.edit.toolbar.buttons.removeDisabled))}}),L.EditToolbar.Edit=L.Handler.extend({statics:{TYPE:"edit"},initialize:function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.setOptions(this,e),this._featureGroup=e.featureGroup,!(this._featureGroup instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this._uneditedLayerProps={},this.type=L.EditToolbar.Edit.TYPE;var n=L.version.split(".");1===parseInt(n[0],10)&&parseInt(n[1],10)>=2?L.EditToolbar.Edit.include(L.Evented.prototype):L.EditToolbar.Edit.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.EDITSTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._featureGroup.on("layeradd",this._enableLayerEdit,this).on("layerremove",this._disableLayerEdit,this))},disable:function(){this._enabled&&(this._featureGroup.off("layeradd",this._enableLayerEdit,this).off("layerremove",this._disableLayerEdit,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.EDITSTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(t.getContainer().focus(),this._featureGroup.eachLayer(this._enableLayerEdit,this),this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}),t._editTooltip=this._tooltip,this._updateTooltip(),this._map.on("mousemove",this._onMouseMove,this).on("touchmove",this._onMouseMove,this).on("MSPointerMove",this._onMouseMove,this).on(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},removeHooks:function(){this._map&&(this._featureGroup.eachLayer(this._disableLayerEdit,this),this._uneditedLayerProps={},this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this).off("touchmove",this._onMouseMove,this).off("MSPointerMove",this._onMouseMove,this).off(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},revertLayers:function(){this._featureGroup.eachLayer((function(t){this._revertLayer(t)}),this)},save:function(){var t=new L.LayerGroup;this._featureGroup.eachLayer((function(e){e.edited&&(t.addLayer(e),e.edited=!1)})),this._map.fire(L.Draw.Event.EDITED,{layers:t})},_backupLayer:function(t){var e=L.Util.stamp(t);this._uneditedLayerProps[e]||(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?this._uneditedLayerProps[e]={latlngs:L.LatLngUtil.cloneLatLngs(t.getLatLngs())}:t instanceof L.Circle?this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng()),radius:t.getRadius()}:(t instanceof L.Marker||t instanceof L.CircleMarker)&&(this._uneditedLayerProps[e]={latlng:L.LatLngUtil.cloneLatLng(t.getLatLng())}))},_getTooltipText:function(){return{text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}},_updateTooltip:function(){this._tooltip.updateContent(this._getTooltipText())},_revertLayer:function(t){var e=L.Util.stamp(t);t.edited=!1,this._uneditedLayerProps.hasOwnProperty(e)&&(t instanceof L.Polyline||t instanceof L.Polygon||t instanceof L.Rectangle?t.setLatLngs(this._uneditedLayerProps[e].latlngs):t instanceof L.Circle?(t.setLatLng(this._uneditedLayerProps[e].latlng),t.setRadius(this._uneditedLayerProps[e].radius)):(t instanceof L.Marker||t instanceof L.CircleMarker)&&t.setLatLng(this._uneditedLayerProps[e].latlng),t.fire("revert-edited",{layer:t}))},_enableLayerEdit:function(t){var e,n,i=t.layer||t.target||t;this._backupLayer(i),this.options.poly&&(n=L.Util.extend({},this.options.poly),i.options.poly=n),this.options.selectedPathOptions&&((e=L.Util.extend({},this.options.selectedPathOptions)).maintainColor&&(e.color=i.options.color,e.fillColor=i.options.fillColor),i.options.original=L.extend({},i.options),i.options.editing=e),i instanceof L.Marker?(i.editing&&i.editing.enable(),i.dragging.enable(),i.on("dragend",this._onMarkerDragEnd).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onMarkerDragEnd,this).on("MSPointerUp",this._onMarkerDragEnd,this)):i.editing.enable()},_disableLayerEdit:function(t){var e=t.layer||t.target||t;e.edited=!1,e.editing&&e.editing.disable(),delete e.options.editing,delete e.options.original,this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e):(e.setStyle(e.options.previousOptions),delete e.options.previousOptions)),e instanceof L.Marker?(e.dragging.disable(),e.off("dragend",this._onMarkerDragEnd,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onMarkerDragEnd,this).off("MSPointerUp",this._onMarkerDragEnd,this)):e.editing.disable()},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_onMarkerDragEnd:function(t){var e=t.target;e.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:e})},_onTouchMove:function(t){var e=t.originalEvent.changedTouches[0],n=this._map.mouseEventToLayerPoint(e),i=this._map.layerPointToLatLng(n);t.target.setLatLng(i)},_hasAvailableLayers:function(){return 0!==this._featureGroup.getLayers().length}}),L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:"remove"},initialize:function(t,e){if(L.Handler.prototype.initialize.call(this,t),L.Util.setOptions(this,e),this._deletableLayers=this.options.featureGroup,!(this._deletableLayers instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this.type=L.EditToolbar.Delete.TYPE;var n=L.version.split(".");1===parseInt(n[0],10)&&parseInt(n[1],10)>=2?L.EditToolbar.Delete.include(L.Evented.prototype):L.EditToolbar.Delete.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DELETESTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._deletableLayers.on("layeradd",this._enableLayerDelete,this).on("layerremove",this._disableLayerDelete,this))},disable:function(){this._enabled&&(this._deletableLayers.off("layeradd",this._enableLayerDelete,this).off("layerremove",this._disableLayerDelete,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DELETESTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var t=this._map;t&&(t.getContainer().focus(),this._deletableLayers.eachLayer(this._enableLayerDelete,this),this._deletedLayers=new L.LayerGroup,this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.remove.tooltip.text}),this._map.on("mousemove",this._onMouseMove,this))},removeHooks:function(){this._map&&(this._deletableLayers.eachLayer(this._disableLayerDelete,this),this._deletedLayers=null,this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this))},revertLayers:function(){this._deletedLayers.eachLayer((function(t){this._deletableLayers.addLayer(t),t.fire("revert-deleted",{layer:t})}),this)},save:function(){this._map.fire(L.Draw.Event.DELETED,{layers:this._deletedLayers})},removeAllLayers:function(){this._deletableLayers.eachLayer((function(t){this._removeLayer({layer:t})}),this),this.save()},_enableLayerDelete:function(t){(t.layer||t.target||t).on("click",this._removeLayer,this)},_disableLayerDelete:function(t){var e=t.layer||t.target||t;e.off("click",this._removeLayer,this),this._deletedLayers.removeLayer(e)},_removeLayer:function(t){var e=t.layer||t.target||t;this._deletableLayers.removeLayer(e),this._deletedLayers.addLayer(e),e.fire("deleted")},_onMouseMove:function(t){this._tooltip.updatePosition(t.latlng)},_hasAvailableLayers:function(){return 0!==this._deletableLayers.getLayers().length}})},290:function(t,e){!function(t){var e=L.GridLayer.extend({options:{minZoom:0,maxZoom:23,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",opacity:1,continuousWorld:!1,noWrap:!1,type:"roadmap",maxNativeZoom:21},initialize:function(t){L.GridLayer.prototype.initialize.call(this,t),this._ready=!!window.google&&!!window.google.maps&&!!window.google.maps.Map,this._GAPIPromise=this._ready?Promise.resolve(window.google):new Promise((function(t,e){var n=0,i=null;i=setInterval((function(){return n>=10?(clearInterval(i),e(new Error("window.google not found after 10 attempts"))):window.google&&window.google.maps&&window.google.maps.Map?(clearInterval(i),t(window.google)):void n++}),500)})),this._tileCallbacks={},this._freshTiles={},this._imagesPerTile="hybrid"===this.options.type?2:1},onAdd:function(t){L.GridLayer.prototype.onAdd.call(this,t),this._initMutantContainer(),this._GAPIPromise.then(function(){if(this._ready=!0,this._map=t,this._initMutant(),t.on("viewreset",this._reset,this),t.on("move",this._update,this),t.on("zoomend",this._handleZoomAnim,this),t.on("resize",this._resize,this),google.maps.event.addListenerOnce(this._mutant,"idle",function(){this._checkZoomLevels(),this._mutantIsReady=!0}.bind(this)),t._controlCorners.bottomright.style.marginBottom="20px",t._controlCorners.bottomleft.style.marginBottom="20px",this._reset(),this._update(),this._subLayers)for(var e in this._subLayers)this._subLayers[e].setMap(this._mutant)}.bind(this))},onRemove:function(t){L.GridLayer.prototype.onRemove.call(this,t),t._container.removeChild(this._mutantContainer),this._mutantContainer=void 0,google.maps.event.clearListeners(t,"idle"),google.maps.event.clearListeners(this._mutant,"idle"),t.off("viewreset",this._reset,this),t.off("move",this._update,this),t.off("zoomend",this._handleZoomAnim,this),t.off("resize",this._resize,this),t._controlCorners&&(t._controlCorners.bottomright.style.marginBottom="0em",t._controlCorners.bottomleft.style.marginBottom="0em")},getAttribution:function(){return this.options.attribution},setOpacity:function(t){this.options.opacity=t,t<1&&L.DomUtil.setOpacity(this._mutantContainer,t)},setElementSize:function(t,e){t.style.width=e.x+"px",t.style.height=e.y+"px"},addGoogleLayer:function(t,e){return this._subLayers||(this._subLayers={}),this._GAPIPromise.then(function(){var n=new(0,google.maps[t])(e);return n.setMap(this._mutant),this._subLayers[t]=n,n}.bind(this))},removeGoogleLayer:function(t){var e=this._subLayers&&this._subLayers[t];e&&(e.setMap(null),delete this._subLayers[t])},_initMutantContainer:function(){this._mutantContainer||(this._mutantContainer=L.DomUtil.create("div","leaflet-google-mutant leaflet-top leaflet-left"),this._mutantContainer.id="_MutantContainer_"+L.Util.stamp(this._mutantContainer),this._mutantContainer.style.zIndex="800",this._mutantContainer.style.pointerEvents="none",this._map.getContainer().appendChild(this._mutantContainer)),this.setOpacity(this.options.opacity),this.setElementSize(this._mutantContainer,this._map.getSize()),this._attachObserver(this._mutantContainer)},_initMutant:function(){if(this._ready&&this._mutantContainer){this._mutantCenter=new google.maps.LatLng(0,0);var t=new google.maps.Map(this._mutantContainer,{center:this._mutantCenter,zoom:0,tilt:0,mapTypeId:this.options.type,disableDefaultUI:!0,keyboardShortcuts:!1,draggable:!1,disableDoubleClickZoom:!0,scrollwheel:!1,streetViewControl:!1,styles:this.options.styles||{},backgroundColor:"transparent"});this._mutant=t,google.maps.event.addListenerOnce(t,"idle",function(){for(var t=this._mutantContainer.querySelectorAll("a"),e=0;e<t.length;e++)t[e].style.pointerEvents="auto"}.bind(this)),this.fire("spawned",{mapObject:t})}},_attachObserver:function(t){new MutationObserver(this._onMutations.bind(this)).observe(t,{childList:!0,subtree:!0})},_onMutations:function(t){for(var e=0;e<t.length;++e)for(var n=t[e],i=0;i<n.addedNodes.length;++i){var o=n.addedNodes[i];o instanceof HTMLImageElement?this._onMutatedImage(o):o instanceof HTMLElement&&Array.prototype.forEach.call(o.querySelectorAll("img"),this._onMutatedImage.bind(this))}},_roadRegexp:/!1i(\d+)!2i(\d+)!3i(\d+)!/,_satRegexp:/x=(\d+)&y=(\d+)&z=(\d+)/,_staticRegExp:/StaticMapService\.GetMapImage/,_onMutatedImage:function(t){var e,n=t.src.match(this._roadRegexp),i=0;if(n?(e={z:n[1],x:n[2],y:n[3]},this._imagesPerTile>1&&(t.style.zIndex=1,i=1)):((n=t.src.match(this._satRegexp))&&(e={x:n[1],y:n[2],z:n[3]}),i=0),e){var o=this._tileCoordsToKey(e);t.style.position="absolute",t.style.visibility="hidden";var r=o+"/"+i;if(this._freshTiles[r]=t,r in this._tileCallbacks&&this._tileCallbacks[r])this._tileCallbacks[r].pop()(t),this._tileCallbacks[r].length||delete this._tileCallbacks[r];else if(this._tiles[o]){var a=this._tiles[o].el,s=0===i?a.firstChild:a.firstChild.nextSibling,l=this._clone(t);a.replaceChild(l,s)}}else t.src.match(this._staticRegExp)&&(t.style.visibility="hidden")},createTile:function(t,e){var n=this._tileCoordsToKey(t),i=L.DomUtil.create("div");i.dataset.pending=this._imagesPerTile,e=e.bind(this,null,i);for(var o=0;o<this._imagesPerTile;o++){var r=n+"/"+o;if(r in this._freshTiles){var a=this._freshTiles[r];i.appendChild(this._clone(a)),i.dataset.pending--}else this._tileCallbacks[r]=this._tileCallbacks[r]||[],this._tileCallbacks[r].push(function(t){return function(n){t.appendChild(this._clone(n)),t.dataset.pending--,parseInt(t.dataset.pending)||e()}.bind(this)}.bind(this)(i))}return parseInt(i.dataset.pending)||L.Util.requestAnimFrame(e),i},_clone:function(t){var e=t.cloneNode(!0);return e.style.visibility="visible",e},_checkZoomLevels:function(){var t=this._map.getZoom(),e=this._mutant.getZoom();t&&e&&(e!==t||e>this.options.maxNativeZoom)&&this._setMaxNativeZoom(e)},_setMaxNativeZoom:function(t){t!=this.options.maxNativeZoom&&(this.options.maxNativeZoom=t,this._resetView())},_reset:function(){this._initContainer()},_update:function(){if(this._mutant){var t=this._map.getCenter(),e=new google.maps.LatLng(t.lat,t.lng);this._mutant.setCenter(e);var n=this._map.getZoom(),i=n!==Math.round(n),o=this._mutant.getZoom();i||n==o||(this._mutant.setZoom(n),this._mutantIsReady&&this._checkZoomLevels())}L.GridLayer.prototype._update.call(this)},_resize:function(){var t=this._map.getSize();this._mutantContainer.style.width===t.x&&this._mutantContainer.style.height===t.y||(this.setElementSize(this._mutantContainer,t),this._mutant&&google.maps.event.trigger(this._mutant,"resize"))},_handleZoomAnim:function(){if(this._mutant){var t=this._map.getCenter(),e=new google.maps.LatLng(t.lat,t.lng);this._mutant.setCenter(e),this._mutant.setZoom(Math.round(this._map.getZoom()))}},_removeTile:function(t){if(this._mutant)return setTimeout(this._pruneTile.bind(this,t),1e3),L.GridLayer.prototype._removeTile.call(this,t)},_pruneTile:function(t){for(var e=this._mutant.getZoom(),n=t.split(":")[2],i=this._mutant.getBounds(),o=i.getSouthWest(),r=i.getNorthEast(),a=L.latLngBounds([[o.lat(),o.lng()],[r.lat(),r.lng()]]),s=0;s<this._imagesPerTile;s++){var l=t+"/"+s;if(l in this._freshTiles){var h=this._map&&this._keyToBounds(t);this._map&&h.overlaps(a)&&n==e||delete this._freshTiles[l]}}}});t.GoogleMutant=e}(e)},298:function(t,e){!function(t){var e=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnEveryZoom:!1,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyShapePositions:null,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var e=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,e?this._withAnimation:this._noAnimation),this._markerCluster=e?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(t){if(t instanceof L.LayerGroup)return this.addLayers([t]);if(!t.getLatLng)return this._nonPointGroup.addLayer(t),this.fire("layeradd",{layer:t}),this;if(!this._map)return this._needsClustering.push(t),this.fire("layeradd",{layer:t}),this;if(this.hasLayer(t))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(t,this._maxZoom),this.fire("layeradd",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var e=t,n=this._zoom;if(t.__parent)for(;e.__parent._zoom>=n;)e=e.__parent;return this._currentShownBounds.contains(e.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(t,e):this._animationAddLayerNonAnimated(t,e)),this},removeLayer:function(t){return t instanceof L.LayerGroup?this.removeLayers([t]):t.getLatLng?this._map?t.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(t)),this._removeLayer(t,!0),this.fire("layerremove",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),t.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(t)&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,t)&&this.hasLayer(t)&&this._needsRemoving.push({layer:t,latlng:t._latlng}),this.fire("layerremove",{layer:t}),this):(this._nonPointGroup.removeLayer(t),this.fire("layerremove",{layer:t}),this)},addLayers:function(t,e){if(!L.Util.isArray(t))return this.addLayer(t);var n,i=this._featureGroup,o=this._nonPointGroup,r=this.options.chunkedLoading,a=this.options.chunkInterval,s=this.options.chunkProgress,l=t.length,h=0,u=!0;if(this._map){var c=(new Date).getTime(),p=L.bind((function(){var d=(new Date).getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();h<l&&!(r&&h%200==0&&(new Date).getTime()-d>a);h++)if((n=t[h])instanceof L.LayerGroup)u&&(t=t.slice(),u=!1),this._extractNonGroupLayers(n,t),l=t.length;else if(n.getLatLng){if(!this.hasLayer(n)&&(this._addLayer(n,this._maxZoom),e||this.fire("layeradd",{layer:n}),n.__parent&&2===n.__parent.getChildCount())){var f=n.__parent.getAllChildMarkers(),_=f[0]===n?f[1]:f[0];i.removeLayer(_)}}else o.addLayer(n),e||this.fire("layeradd",{layer:n});s&&s(h,l,(new Date).getTime()-c),h===l?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(p,this.options.chunkDelay)}),this);p()}else for(var d=this._needsClustering;h<l;h++)(n=t[h])instanceof L.LayerGroup?(u&&(t=t.slice(),u=!1),this._extractNonGroupLayers(n,t),l=t.length):n.getLatLng?this.hasLayer(n)||d.push(n):o.addLayer(n);return this},removeLayers:function(t){var e,n,i=t.length,o=this._featureGroup,r=this._nonPointGroup,a=!0;if(!this._map){for(e=0;e<i;e++)(n=t[e])instanceof L.LayerGroup?(a&&(t=t.slice(),a=!1),this._extractNonGroupLayers(n,t),i=t.length):(this._arraySplice(this._needsClustering,n),r.removeLayer(n),this.hasLayer(n)&&this._needsRemoving.push({layer:n,latlng:n._latlng}),this.fire("layerremove",{layer:n}));return this}if(this._unspiderfy){this._unspiderfy();var s=t.slice(),l=i;for(e=0;e<l;e++)(n=s[e])instanceof L.LayerGroup?(this._extractNonGroupLayers(n,s),l=s.length):this._unspiderfyLayer(n)}for(e=0;e<i;e++)(n=t[e])instanceof L.LayerGroup?(a&&(t=t.slice(),a=!1),this._extractNonGroupLayers(n,t),i=t.length):n.__parent?(this._removeLayer(n,!0,!0),this.fire("layerremove",{layer:n}),o.hasLayer(n)&&(o.removeLayer(n),n.clusterShow&&n.clusterShow())):(r.removeLayer(n),this.fire("layerremove",{layer:n}));return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer((function(t){t.off(this._childMarkerEventHandlers,this),delete t.__parent}),this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var t=new L.LatLngBounds;this._topClusterLevel&&t.extend(this._topClusterLevel._bounds);for(var e=this._needsClustering.length-1;e>=0;e--)t.extend(this._needsClustering[e].getLatLng());return t.extend(this._nonPointGroup.getBounds()),t},eachLayer:function(t,e){var n,i,o,r=this._needsClustering.slice(),a=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(r),i=r.length-1;i>=0;i--){for(n=!0,o=a.length-1;o>=0;o--)if(a[o].layer===r[i]){n=!1;break}n&&t.call(e,r[i])}this._nonPointGroup.eachLayer(t,e)},getLayers:function(){var t=[];return this.eachLayer((function(e){t.push(e)})),t},getLayer:function(t){var e=null;return t=parseInt(t,10),this.eachLayer((function(n){L.stamp(n)===t&&(e=n)})),e},hasLayer:function(t){if(!t)return!1;var e,n=this._needsClustering;for(e=n.length-1;e>=0;e--)if(n[e]===t)return!0;for(e=(n=this._needsRemoving).length-1;e>=0;e--)if(n[e].layer===t)return!1;return!(!t.__parent||t.__parent._group!==this)||this._nonPointGroup.hasLayer(t)},zoomToShowLayer:function(t,e){var n=this._map;"function"!=typeof e&&(e=function(){});var i=function(){!n.hasLayer(t)&&!n.hasLayer(t.__parent)||this._inZoomAnimation||(this._map.off("moveend",i,this),this.off("animationend",i,this),n.hasLayer(t)?e():t.__parent._icon&&(this.once("spiderfied",e,this),t.__parent.spiderfy()))};t._icon&&this._map.getBounds().contains(t.getLatLng())?e():t.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",i,this),this._map.panTo(t.getLatLng())):(this._map.on("moveend",i,this),this.on("animationend",i,this),t.__parent.zoomToBounds())},onAdd:function(t){var e,n,i;if(this._map=t,!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(t),this._nonPointGroup.addTo(t),this._gridClusters||this._generateInitialClusters(),this._maxLat=t.options.crs.projection.MAX_LATITUDE,e=0,n=this._needsRemoving.length;e<n;e++)(i=this._needsRemoving[e]).newlatlng=i.layer._latlng,i.layer._latlng=i.latlng;for(e=0,n=this._needsRemoving.length;e<n;e++)i=this._needsRemoving[e],this._removeLayer(i.layer,!0),i.layer._latlng=i.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),n=this._needsClustering,this._needsClustering=[],this.addLayers(n,!0)},onRemove:function(t){t.off("zoomend",this._zoomEnd,this),t.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(t){for(var e=t;e&&!e._icon;)e=e.__parent;return e||null},_arraySplice:function(t,e){for(var n=t.length-1;n>=0;n--)if(t[n]===e)return t.splice(n,1),!0},_removeFromGridUnclustered:function(t,e){for(var n=this._map,i=this._gridUnclustered,o=Math.floor(this._map.getMinZoom());e>=o&&i[e].removeObject(t,n.project(t.getLatLng(),e));e--);},_childMarkerDragStart:function(t){t.target.__dragStart=t.target._latlng},_childMarkerMoved:function(t){if(!this._ignoreMove&&!t.target.__dragStart){var e=t.target._popup&&t.target._popup.isOpen();this._moveChild(t.target,t.oldLatLng,t.latlng),e&&t.target.openPopup()}},_moveChild:function(t,e,n){t._latlng=e,this.removeLayer(t),t._latlng=n,this.addLayer(t)},_childMarkerDragEnd:function(t){var e=t.target.__dragStart;delete t.target.__dragStart,e&&this._moveChild(t.target,e,t.target._latlng)},_removeLayer:function(t,e,n){var i=this._gridClusters,o=this._gridUnclustered,r=this._featureGroup,a=this._map,s=Math.floor(this._map.getMinZoom());e&&this._removeFromGridUnclustered(t,this._maxZoom);var l,h=t.__parent,u=h._markers;for(this._arraySplice(u,t);h&&(h._childCount--,h._boundsNeedUpdate=!0,!(h._zoom<s));)e&&h._childCount<=1?(l=h._markers[0]===t?h._markers[1]:h._markers[0],i[h._zoom].removeObject(h,a.project(h._cLatLng,h._zoom)),o[h._zoom].addObject(l,a.project(l.getLatLng(),h._zoom)),this._arraySplice(h.__parent._childClusters,h),h.__parent._markers.push(l),l.__parent=h.__parent,h._icon&&(r.removeLayer(h),n||r.addLayer(l))):h._iconNeedsUpdate=!0,h=h.__parent;delete t.__parent},_isOrIsParent:function(t,e){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},fire:function(t,e,n){if(e&&e.layer instanceof L.MarkerCluster){if(e.originalEvent&&this._isOrIsParent(e.layer._icon,e.originalEvent.relatedTarget))return;t="cluster"+t}L.FeatureGroup.prototype.fire.call(this,t,e,n)},listens:function(t,e){return L.FeatureGroup.prototype.listens.call(this,t,e)||L.FeatureGroup.prototype.listens.call(this,"cluster"+t,e)},_defaultIconCreateFunction:function(t){var e=t.getChildCount(),n=" marker-cluster-";return n+=e<10?"small":e<100?"medium":"large",new L.DivIcon({html:"<div><span>"+e+"</span></div>",className:"marker-cluster"+n,iconSize:new L.Point(40,40)})},_bindEvents:function(){var t=this._map,e=this.options.spiderfyOnMaxZoom,n=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,o=this.options.spiderfyOnEveryZoom;(e||i||o)&&this.on("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),n&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),t.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(t){var e=t.layer,n=e;if("clusterkeypress"!==t.type||!t.originalEvent||13===t.originalEvent.keyCode){for(;1===n._childClusters.length;)n=n._childClusters[0];n._zoom===this._maxZoom&&n._childCount===e._childCount&&this.options.spiderfyOnMaxZoom?e.spiderfy():this.options.zoomToBoundsOnClick&&e.zoomToBounds(),this.options.spiderfyOnEveryZoom&&e.spiderfy(),t.originalEvent&&13===t.originalEvent.keyCode&&this._map._container.focus()}},_showCoverage:function(t){var e=this._map;this._inZoomAnimation||(this._shownPolygon&&e.removeLayer(this._shownPolygon),t.layer.getChildCount()>2&&t.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(t.layer.getConvexHull(),this.options.polygonOptions),e.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick,i=this.options.spiderfyOnEveryZoom,o=this._map;(t||n||i)&&this.off("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),e&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),o.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var t=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),t),this._currentShownBounds=t}},_generateInitialClusters:function(){var t=Math.ceil(this._map.getMaxZoom()),e=Math.floor(this._map.getMinZoom()),n=this.options.maxClusterRadius,i=n;"function"!=typeof n&&(i=function(){return n}),null!==this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(var o=t;o>=e;o--)this._gridClusters[o]=new L.DistanceGrid(i(o)),this._gridUnclustered[o]=new L.DistanceGrid(i(o));this._topClusterLevel=new this._markerCluster(this,e-1)},_addLayer:function(t,e){var n,i,o=this._gridClusters,r=this._gridUnclustered,a=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(t),t.on(this._childMarkerEventHandlers,this);e>=a;e--){n=this._map.project(t.getLatLng(),e);var s=o[e].getNearObject(n);if(s)return s._addChild(t),void(t.__parent=s);if(s=r[e].getNearObject(n)){var l=s.__parent;l&&this._removeLayer(s,!1);var h=new this._markerCluster(this,e,s,t);o[e].addObject(h,this._map.project(h._cLatLng,e)),s.__parent=h,t.__parent=h;var u=h;for(i=e-1;i>l._zoom;i--)u=new this._markerCluster(this,i,u),o[i].addObject(u,this._map.project(s.getLatLng(),i));return l._addChild(u),void this._removeFromGridUnclustered(s,e)}r[e].addObject(t,n)}this._topClusterLevel._addChild(t),t.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer((function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()}))},_enqueue:function(t){this._queue.push(t),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var t=0;t<this._queue.length;t++)this._queue[t].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var t=Math.round(this._map._zoom);this._processQueue(),this._zoom<t&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,t)):this._zoom>t?(this._animationStart(),this._animationZoomOut(this._zoom,t)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(t){var e=this._maxLat;return void 0!==e&&(t.getNorth()>=e&&(t._northEast.lat=1/0),t.getSouth()<=-e&&(t._southWest.lat=-1/0)),t},_animationAddLayerNonAnimated:function(t,e){if(e===t)this._featureGroup.addLayer(t);else if(2===e._childCount){e._addToMap();var n=e.getAllChildMarkers();this._featureGroup.removeLayer(n[0]),this._featureGroup.removeLayer(n[1])}else e._updateIcon()},_extractNonGroupLayers:function(t,e){var n,i=t.getLayers(),o=0;for(e=e||[];o<i.length;o++)(n=i[o])instanceof L.LayerGroup?this._extractNonGroupLayers(n,e):e.push(n);return e},_overrideMarkerIcon:function(t){return t.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[t]}})}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(t,e){this._animationAddLayerNonAnimated(t,e)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(t,e){var n,i=this._getExpandedVisibleBounds(),o=this._featureGroup,r=Math.floor(this._map.getMinZoom());this._ignoreMove=!0,this._topClusterLevel._recursively(i,t,r,(function(r){var a,s=r._latlng,l=r._markers;for(i.contains(s)||(s=null),r._isSingleParent()&&t+1===e?(o.removeLayer(r),r._recursivelyAddChildrenToMap(null,e,i)):(r.clusterHide(),r._recursivelyAddChildrenToMap(s,e,i)),n=l.length-1;n>=0;n--)a=l[n],i.contains(a._latlng)||o.removeLayer(a)})),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(i,e),o.eachLayer((function(t){t instanceof L.MarkerCluster||!t._icon||t.clusterShow()})),this._topClusterLevel._recursively(i,t,e,(function(t){t._recursivelyRestoreChildPositions(e)})),this._ignoreMove=!1,this._enqueue((function(){this._topClusterLevel._recursively(i,t,r,(function(t){o.removeLayer(t),t.clusterShow()})),this._animationEnd()}))},_animationZoomOut:function(t,e){this._animationZoomOutSingle(this._topClusterLevel,t-1,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t,this._getExpandedVisibleBounds())},_animationAddLayer:function(t,e){var n=this,i=this._featureGroup;i.addLayer(t),e!==t&&(e._childCount>2?(e._updateIcon(),this._forceLayout(),this._animationStart(),t._setPos(this._map.latLngToLayerPoint(e.getLatLng())),t.clusterHide(),this._enqueue((function(){i.removeLayer(t),t.clusterShow(),n._animationEnd()}))):(this._forceLayout(),n._animationStart(),n._animationZoomOutSingle(e,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(t,e,n){var i=this._getExpandedVisibleBounds(),o=Math.floor(this._map.getMinZoom());t._recursivelyAnimateChildrenInAndAddSelfToMap(i,o,e+1,n);var r=this;this._forceLayout(),t._recursivelyBecomeVisible(i,n),this._enqueue((function(){if(1===t._childCount){var a=t._markers[0];this._ignoreMove=!0,a.setLatLng(a.getLatLng()),this._ignoreMove=!1,a.clusterShow&&a.clusterShow()}else t._recursively(i,n,o,(function(t){t._recursivelyRemoveChildrenFromMap(i,o,e+1)}));r._animationEnd()}))},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(t){return new L.MarkerClusterGroup(t)};var n=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(t,e,n,i){L.Marker.prototype.initialize.call(this,n?n._cLatLng||n.getLatLng():new L.LatLng(0,0),{icon:this,pane:t.options.clusterPane}),this._group=t,this._zoom=e,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,n&&this._addChild(n),i&&this._addChild(i)},getAllChildMarkers:function(t,e){t=t||[];for(var n=this._childClusters.length-1;n>=0;n--)this._childClusters[n].getAllChildMarkers(t,e);for(var i=this._markers.length-1;i>=0;i--)e&&this._markers[i].__dragStart||t.push(this._markers[i]);return t},getChildCount:function(){return this._childCount},zoomToBounds:function(t){for(var e,n=this._childClusters.slice(),i=this._group._map,o=i.getBoundsZoom(this._bounds),r=this._zoom+1,a=i.getZoom();n.length>0&&o>r;){r++;var s=[];for(e=0;e<n.length;e++)s=s.concat(n[e]._childClusters);n=s}o>r?this._group._map.setView(this._latlng,r):o<=a?this._group._map.setView(this._latlng,a+1):this._group._map.fitBounds(this._bounds,t)},getBounds:function(){var t=new L.LatLngBounds;return t.extend(this._bounds),t},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(t,e){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(t),t instanceof L.MarkerCluster?(e||(this._childClusters.push(t),t.__parent=this),this._childCount+=t._childCount):(e||this._markers.push(t),this._childCount++),this.__parent&&this.__parent._addChild(t,!0)},_setClusterCenter:function(t){this._cLatLng||(this._cLatLng=t._cLatLng||t._latlng)},_resetBounds:function(){var t=this._bounds;t._southWest&&(t._southWest.lat=1/0,t._southWest.lng=1/0),t._northEast&&(t._northEast.lat=-1/0,t._northEast.lng=-1/0)},_recalculateBounds:function(){var t,e,n,i,o=this._markers,r=this._childClusters,a=0,s=0,l=this._childCount;if(0!==l){for(this._resetBounds(),t=0;t<o.length;t++)n=o[t]._latlng,this._bounds.extend(n),a+=n.lat,s+=n.lng;for(t=0;t<r.length;t++)(e=r[t])._boundsNeedUpdate&&e._recalculateBounds(),this._bounds.extend(e._bounds),n=e._wLatLng,i=e._childCount,a+=n.lat*i,s+=n.lng*i;this._latlng=this._wLatLng=new L.LatLng(a/l,s/l),this._boundsNeedUpdate=!1}},_addToMap:function(t){t&&(this._backupLatlng=this._latlng,this.setLatLng(t)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(t,e,n){this._recursively(t,this._group._map.getMinZoom(),n-1,(function(t){var n,i,o=t._markers;for(n=o.length-1;n>=0;n--)(i=o[n])._icon&&(i._setPos(e),i.clusterHide())}),(function(t){var n,i,o=t._childClusters;for(n=o.length-1;n>=0;n--)(i=o[n])._icon&&(i._setPos(e),i.clusterHide())}))},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,e,n,i){this._recursively(t,i,e,(function(o){o._recursivelyAnimateChildrenIn(t,o._group._map.latLngToLayerPoint(o.getLatLng()).round(),n),o._isSingleParent()&&n-1===i?(o.clusterShow(),o._recursivelyRemoveChildrenFromMap(t,e,n)):o.clusterHide(),o._addToMap()}))},_recursivelyBecomeVisible:function(t,e){this._recursively(t,this._group._map.getMinZoom(),e,null,(function(t){t.clusterShow()}))},_recursivelyAddChildrenToMap:function(t,e,n){this._recursively(n,this._group._map.getMinZoom()-1,e,(function(i){if(e!==i._zoom)for(var o=i._markers.length-1;o>=0;o--){var r=i._markers[o];n.contains(r._latlng)&&(t&&(r._backupLatlng=r.getLatLng(),r.setLatLng(t),r.clusterHide&&r.clusterHide()),i._group._featureGroup.addLayer(r))}}),(function(e){e._addToMap(t)}))},_recursivelyRestoreChildPositions:function(t){for(var e=this._markers.length-1;e>=0;e--){var n=this._markers[e];n._backupLatlng&&(n.setLatLng(n._backupLatlng),delete n._backupLatlng)}if(t-1===this._zoom)for(var i=this._childClusters.length-1;i>=0;i--)this._childClusters[i]._restorePosition();else for(var o=this._childClusters.length-1;o>=0;o--)this._childClusters[o]._recursivelyRestoreChildPositions(t)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(t,e,n,i){var o,r;this._recursively(t,e-1,n-1,(function(t){for(r=t._markers.length-1;r>=0;r--)o=t._markers[r],i&&i.contains(o._latlng)||(t._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())}),(function(t){for(r=t._childClusters.length-1;r>=0;r--)o=t._childClusters[r],i&&i.contains(o._latlng)||(t._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())}))},_recursively:function(t,e,n,i,o){var r,a,s=this._childClusters,l=this._zoom;if(e<=l&&(i&&i(this),o&&l===n&&o(this)),l<e||l<n)for(r=s.length-1;r>=0;r--)(a=s[r])._boundsNeedUpdate&&a._recalculateBounds(),t.intersects(a._bounds)&&a._recursively(t,e,n,i,o)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var t=this.options.opacity;return this.setOpacity(0),this.options.opacity=t,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(t,e){var n=this._getCoord(e.x),i=this._getCoord(e.y),o=this._grid,r=o[i]=o[i]||{},a=r[n]=r[n]||[],s=L.Util.stamp(t);this._objectPoint[s]=e,a.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var n,i,o=this._getCoord(e.x),r=this._getCoord(e.y),a=this._grid,s=a[r]=a[r]||{},l=s[o]=s[o]||[];for(delete this._objectPoint[L.Util.stamp(t)],n=0,i=l.length;n<i;n++)if(l[n]===t)return l.splice(n,1),1===i&&delete s[o],!0},eachObject:function(t,e){var n,i,o,r,a,s,l=this._grid;for(n in l)for(i in a=l[n])for(o=0,r=(s=a[i]).length;o<r;o++)t.call(e,s[o])&&(o--,r--)},getNearObject:function(t){var e,n,i,o,r,a,s,l,h=this._getCoord(t.x),u=this._getCoord(t.y),c=this._objectPoint,p=this._sqCellSize,d=null;for(e=u-1;e<=u+1;e++)if(o=this._grid[e])for(n=h-1;n<=h+1;n++)if(r=o[n])for(i=0,a=r.length;i<a;i++)s=r[i],((l=this._sqDist(c[L.Util.stamp(s)],t))<p||l<=p&&null===d)&&(p=l,d=s);return d},_getCoord:function(t){var e=Math.floor(t/this._cellSize);return isFinite(e)?e:t},_sqDist:function(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}},L.QuickHull={getDistant:function(t,e){var n=e[1].lat-e[0].lat;return(e[0].lng-e[1].lng)*(t.lat-e[0].lat)+n*(t.lng-e[0].lng)},findMostDistantPointFromBaseLine:function(t,e){var n,i,o,r=0,a=null,s=[];for(n=e.length-1;n>=0;n--)i=e[n],(o=this.getDistant(i,t))>0&&(s.push(i),o>r&&(r=o,a=i));return{maxPoint:a,newPoints:s}},buildConvexHull:function(t,e){var n=[],i=this.findMostDistantPointFromBaseLine(t,e);return i.maxPoint?n=(n=n.concat(this.buildConvexHull([t[0],i.maxPoint],i.newPoints))).concat(this.buildConvexHull([i.maxPoint,t[1]],i.newPoints)):[t[0]]},getConvexHull:function(t){var e,n=!1,i=!1,o=!1,r=!1,a=null,s=null,l=null,h=null,u=null,c=null;for(e=t.length-1;e>=0;e--){var p=t[e];(!1===n||p.lat>n)&&(a=p,n=p.lat),(!1===i||p.lat<i)&&(s=p,i=p.lat),(!1===o||p.lng>o)&&(l=p,o=p.lng),(!1===r||p.lng<r)&&(h=p,r=p.lng)}return i!==n?(c=s,u=a):(c=h,u=l),[].concat(this.buildConvexHull([c,u],t),this.buildConvexHull([u,c],t))}},L.MarkerCluster.include({getConvexHull:function(){var t,e,n=this.getAllChildMarkers(),i=[];for(e=n.length-1;e>=0;e--)t=n[e].getLatLng(),i.push(t);return L.QuickHull.getConvexHull(i)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var t,e=this.getAllChildMarkers(null,!0),n=this._group._map.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),this._group._spiderfied=this,this._group.options.spiderfyShapePositions?t=this._group.options.spiderfyShapePositions(e.length,n):e.length>=this._circleSpiralSwitchover?t=this._generatePointsSpiral(e.length,n):(n.y+=10,t=this._generatePointsCircle(e.length,n)),this._animationSpiderfy(e,t)}},unspiderfy:function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},_generatePointsCircle:function(t,e){var n,i,o=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t)/this._2PI,r=this._2PI/t,a=[];for(o=Math.max(o,35),a.length=t,n=0;n<t;n++)i=this._circleStartAngle+n*r,a[n]=new L.Point(e.x+o*Math.cos(i),e.y+o*Math.sin(i))._round();return a},_generatePointsSpiral:function(t,e){var n,i=this._group.options.spiderfyDistanceMultiplier,o=i*this._spiralLengthStart,r=i*this._spiralFootSeparation,a=i*this._spiralLengthFactor*this._2PI,s=0,l=[];for(l.length=t,n=t;n>=0;n--)n<t&&(l[n]=new L.Point(e.x+o*Math.cos(s),e.y+o*Math.sin(s))._round()),o+=a/(s+=r/o+5e-4*n);return l},_noanimationUnspiderfy:function(){var t,e,n=this._group,i=n._map,o=n._featureGroup,r=this.getAllChildMarkers(null,!0);for(n._ignoreMove=!0,this.setOpacity(1),e=r.length-1;e>=0;e--)t=r[e],o.removeLayer(t),t._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng),t.setZIndexOffset&&t.setZIndexOffset(0),t._spiderLeg&&(i.removeLayer(t._spiderLeg),delete t._spiderLeg);n.fire("unspiderfied",{cluster:this,markers:r}),n._ignoreMove=!1,n._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(t,e){var n,i,o,r,a=this._group,s=a._map,l=a._featureGroup,h=this._group.options.spiderLegPolylineOptions;for(a._ignoreMove=!0,n=0;n<t.length;n++)r=s.layerPointToLatLng(e[n]),i=t[n],o=new L.Polyline([this._latlng,r],h),s.addLayer(o),i._spiderLeg=o,i._preSpiderfyLatlng=i._latlng,i.setLatLng(r),i.setZIndexOffset&&i.setZIndexOffset(1e6),l.addLayer(i);this.setOpacity(.3),a._ignoreMove=!1,a.fire("spiderfied",{cluster:this,markers:t})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(t,e){var n,i,o,r,a,s,l=this,h=this._group,u=h._map,c=h._featureGroup,p=this._latlng,d=u.latLngToLayerPoint(p),f=L.Path.SVG,_=L.extend({},this._group.options.spiderLegPolylineOptions),m=_.opacity;for(void 0===m&&(m=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),f?(_.opacity=0,_.className=(_.className||"")+" leaflet-cluster-spider-leg"):_.opacity=m,h._ignoreMove=!0,n=0;n<t.length;n++)i=t[n],s=u.layerPointToLatLng(e[n]),o=new L.Polyline([p,s],_),u.addLayer(o),i._spiderLeg=o,f&&(a=(r=o._path).getTotalLength()+.1,r.style.strokeDasharray=a,r.style.strokeDashoffset=a),i.setZIndexOffset&&i.setZIndexOffset(1e6),i.clusterHide&&i.clusterHide(),c.addLayer(i),i._setPos&&i._setPos(d);for(h._forceLayout(),h._animationStart(),n=t.length-1;n>=0;n--)s=u.layerPointToLatLng(e[n]),(i=t[n])._preSpiderfyLatlng=i._latlng,i.setLatLng(s),i.clusterShow&&i.clusterShow(),f&&((r=(o=i._spiderLeg)._path).style.strokeDashoffset=0,o.setStyle({opacity:m}));this.setOpacity(.3),h._ignoreMove=!1,setTimeout((function(){h._animationEnd(),h.fire("spiderfied",{cluster:l,markers:t})}),200)},_animationUnspiderfy:function(t){var e,n,i,o,r,a,s=this,l=this._group,h=l._map,u=l._featureGroup,c=t?h._latLngToNewLayerPoint(this._latlng,t.zoom,t.center):h.latLngToLayerPoint(this._latlng),p=this.getAllChildMarkers(null,!0),d=L.Path.SVG;for(l._ignoreMove=!0,l._animationStart(),this.setOpacity(1),n=p.length-1;n>=0;n--)(e=p[n])._preSpiderfyLatlng&&(e.closePopup(),e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng,a=!0,e._setPos&&(e._setPos(c),a=!1),e.clusterHide&&(e.clusterHide(),a=!1),a&&u.removeLayer(e),d&&(r=(o=(i=e._spiderLeg)._path).getTotalLength()+.1,o.style.strokeDashoffset=r,i.setStyle({opacity:0})));l._ignoreMove=!1,setTimeout((function(){var t=0;for(n=p.length-1;n>=0;n--)(e=p[n])._spiderLeg&&t++;for(n=p.length-1;n>=0;n--)(e=p[n])._spiderLeg&&(e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),t>1&&u.removeLayer(e),h.removeLayer(e._spiderLeg),delete e._spiderLeg);l._animationEnd(),l.fire("unspiderfied",{cluster:s,markers:p})}),200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(t){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(t){t._spiderLeg&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),this._map.removeLayer(t._spiderLeg),delete t._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(t){return t?t instanceof L.MarkerClusterGroup?t=t._topClusterLevel.getAllChildMarkers():t instanceof L.LayerGroup?t=t._layers:t instanceof L.MarkerCluster?t=t.getAllChildMarkers():t instanceof L.Marker&&(t=[t]):t=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(t),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(t),this},_flagParentsIconsNeedUpdate:function(t){var e,n;for(e in t)for(n=t[e].__parent;n;)n._iconNeedsUpdate=!0,n=n.__parent},_refreshSingleMarkerModeMarkers:function(t){var e,n;for(e in t)n=t[e],this.hasLayer(n)&&n.setIcon(this._overrideMarkerIcon(n))}}),L.Marker.include({refreshIconOptions:function(t,e){var n=this.options.icon;return L.setOptions(n,t),this.setIcon(n),e&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),t.MarkerClusterGroup=e,t.MarkerCluster=n,Object.defineProperty(t,"__esModule",{value:!0})}(e)},62:function(t,e){
2
2
  /* @preserve
3
3
  * Leaflet 1.7.1, a JS library for interactive maps. http://leafletjs.com
4
4
  * (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade
@@ -18,5 +18,5 @@
18
18
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
19
  PERFORMANCE OF THIS SOFTWARE.
20
20
  ***************************************************************************** */
21
- var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)};function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}},57:(t,e,n)=>{n.d(e,{M:()=>b});var i=n(62),o=n(402),r=n.n(o),a=n(36),s=n.n(a),l=n(793),h=n.n(l),u=n(892),c=n.n(u),p=n(173),d=n.n(p),f=n(464),_=n.n(f),m=n(282),g={};g.styleTagTransform=_(),g.setAttributes=c(),g.insert=h().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=d(),r()(m.Z,g),m.Z&&m.Z.locals&&m.Z.locals;var y={iconColor:"#1EB300",iconAnchor:{marker:[14,34],circle:[11,10],"circle-dot":[5,5],"rectangle-dot":[5,6],doughnut:[8,8]},popupAnchor:{marker:[0,-25],circle:[-3,-76],"circle-dot":[0,-2],"rectangle-dot":[0,-2],doughnut:[0,-2]},innerIconAnchor:{marker:[-2,5],circle:[0,2]},iconSize:{marker:[28,28],circle:[22,22],"circle-dot":[2,2],"rectangle-dot":[2,2],doughnut:[15,15]}},v=i.Icon.extend({options:{icon:"leaf",iconSize:y.iconSize.circle,iconAnchor:y.iconAnchor.marker,iconShape:"marker",iconStyle:"",innerIconAnchor:[0,3],innerIconStyle:"",isAlphaNumericIcon:!1,text:1,borderColor:y.iconColor,borderWidth:2,borderStyle:"solid",backgroundColor:"white",textColor:y.iconColor,customClasses:"",spin:!1,prefix:"fa",html:""},initialize:function(t){this.applyDefaults(t),this.options=t&&t.html?t:i.Util.setOptions(this,t)},applyDefaults:function(t){t&&(!t.iconSize&&t.iconShape&&(t.iconSize=y.iconSize[t.iconShape]),!t.iconAnchor&&t.iconShape&&(t.iconAnchor=y.iconAnchor[t.iconShape]),!t.popupAnchor&&t.iconShape&&(t.popupAnchor=y.popupAnchor[t.iconShape]),t.innerIconAnchor||"circle"!==t.iconShape&&"marker"!==t.iconShape||("circle"===t.iconShape&&t.isAlphaNumericIcon?t.innerIconAnchor=[0,-1]:"marker"!==t.iconShape||t.isAlphaNumericIcon||(t.innerIconAnchor=y.innerIconAnchor[t.iconShape])))},createIcon:function(){var t=document.createElement("div"),e=this.options;if(t.innerHTML=e.html?e.html:this.createIconInnerHtml(),this._setIconStyles(t),"marker"===this.options.iconShape){var n=document.createElement("div");return n.className="beautify-marker"+(e.props.owner._currSelRow===e.props.row?" selected":""),n.appendChild(t),n}return t},createIconInnerHtml:function(){var t=this.options;if("circle-dot"===t.iconShape||"rectangle-dot"===t.iconShape||"doughnut"===t.iconShape)return"";var e=this.getInnerIconStyle(t);if(t.isAlphaNumericIcon)return'<div style="'+e+'">'+t.text+"</div>";var n="";return t.spin&&(n=" fa-spin"),'<i class="'+t.prefix+" "+t.icon+n+'" style="'+e+'"></i>'},getInnerIconStyle:function(t){var e=(0,i.point)(t.innerIconAnchor);return"color:"+t.textColor+";margin-top:"+e.y+"px; margin-left:"+e.x+"px;"+t.innerIconStyle},_setIconStyles:function(t){var e=this.options,n=(0,i.point)(e.iconSize),o=(0,i.point)(e.iconAnchor);if(t.className="beautify-marker ",e.iconShape&&(t.className+=e.iconShape),e.customClasses&&(t.className+=" "+e.customClasses),t.style.backgroundColor=e.backgroundColor,t.style.color=e.textColor,t.style.borderColor=e.borderColor,t.style.borderWidth=e.borderWidth+"px",t.style.borderStyle=e.borderStyle,n&&(t.style.width=n.x+"px",t.style.height=n.y+"px"),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),e.iconStyle){var r=t.getAttribute("style");r+=e.iconStyle,t.setAttribute("style",r)}}});function b(t){return new v(t)}},132:(t,e,n)=>{n.d(e,{F:()=>He,c:()=>Ue});var i=n(163);function o(t){return t}function r(t,e){t&&s.hasOwnProperty(t.type)&&s[t.type](t,e)}var a={Feature:function(t,e){r(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,o=n.length;++i<o;)r(n[i].geometry,e)}},s={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)t=n[i],e.point(t[0],t[1],t[2])},LineString:function(t,e){l(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)l(n[i],e,0)},Polygon:function(t,e){h(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)h(n[i],e)},GeometryCollection:function(t,e){for(var n=t.geometries,i=-1,o=n.length;++i<o;)r(n[i],e)}};function l(t,e,n){var i,o=-1,r=t.length-n;for(e.lineStart();++o<r;)i=t[o],e.point(i[0],i[1],i[2]);e.lineEnd()}function h(t,e){var n=-1,i=t.length;for(e.polygonStart();++n<i;)l(t[n],e,1);e.polygonEnd()}function u(t,e){t&&a.hasOwnProperty(t.type)?a[t.type](t,e):r(t,e)}function c(){return new p}function p(){this.reset()}p.prototype={constructor:p,reset:function(){this.s=this.t=0},add:function(t){f(d,t,this.t),f(this,d.s,this.s),this.s?this.t+=d.t:this.s=d.t},valueOf:function(){return this.s}};var d=new p;function f(t,e,n){var i=t.s=e+n,o=i-e,r=i-o;t.t=e-r+(n-o)}var _=2*Math.PI,m=Math.abs,g=Math.sqrt;function y(){}var v,b,L,w,x=c(),k=c(),M={point:y,lineStart:y,lineEnd:y,polygonStart:function(){M.lineStart=C,M.lineEnd=T},polygonEnd:function(){M.lineStart=M.lineEnd=M.point=y,x.add(m(k)),k.reset()},result:function(){var t=x/2;return x.reset(),t}};function C(){M.point=P}function P(t,e){M.point=E,v=L=t,b=w=e}function E(t,e){k.add(w*t-L*e),L=t,w=e}function T(){E(v,b)}const S=M;var z=1/0,O=z,D=-z,A=D,I={point:function(t,e){t<z&&(z=t),t>D&&(D=t),e<O&&(O=e),e>A&&(A=e)},lineStart:y,lineEnd:y,polygonStart:y,polygonEnd:y,result:function(){var t=[[z,O],[D,A]];return D=A=-(O=z=1/0),t}};const B=I;var N,Z,R,j,G=0,U=0,H=0,F=0,W=0,V=0,q=0,Y=0,K=0,X={point:J,lineStart:Q,lineEnd:et,polygonStart:function(){X.lineStart=nt,X.lineEnd=it},polygonEnd:function(){X.point=J,X.lineStart=Q,X.lineEnd=et},result:function(){var t=K?[q/K,Y/K]:V?[F/V,W/V]:H?[G/H,U/H]:[NaN,NaN];return G=U=H=F=W=V=q=Y=K=0,t}};function J(t,e){G+=t,U+=e,++H}function Q(){X.point=$}function $(t,e){X.point=tt,J(R=t,j=e)}function tt(t,e){var n=t-R,i=e-j,o=g(n*n+i*i);F+=o*(R+t)/2,W+=o*(j+e)/2,V+=o,J(R=t,j=e)}function et(){X.point=J}function nt(){X.point=ot}function it(){rt(N,Z)}function ot(t,e){X.point=rt,J(N=R=t,Z=j=e)}function rt(t,e){var n=t-R,i=e-j,o=g(n*n+i*i);F+=o*(R+t)/2,W+=o*(j+e)/2,V+=o,q+=(o=j*t-R*e)*(R+t),Y+=o*(j+e),K+=3*o,J(R=t,j=e)}const at=X;function st(t){this._context=t}st.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,_)}},result:y};var lt,ht,ut,ct,pt,dt=c(),ft={point:y,lineStart:function(){ft.point=_t},lineEnd:function(){lt&&mt(ht,ut),ft.point=y},polygonStart:function(){lt=!0},polygonEnd:function(){lt=null},result:function(){var t=+dt;return dt.reset(),t}};function _t(t,e){ft.point=mt,ht=ct=t,ut=pt=e}function mt(t,e){ct-=t,pt-=e,dt.add(g(ct*ct+pt*pt)),ct=t,pt=e}const gt=ft;function yt(){this._string=[]}function vt(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function bt(t){return function(e){var n=new Lt;for(var i in t)n[i]=t[i];return n.stream=e,n}}function Lt(){}function wt(){}function xt(t){return null==t?wt:function(){return this.querySelector(t)}}function kt(){return[]}function Mt(t){return new Array(t.length)}function Ct(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function Pt(t,e,n,i,o,r){for(var a,s=0,l=e.length,h=r.length;s<h;++s)(a=e[s])?(a.__data__=r[s],i[s]=a):n[s]=new Ct(t,r[s]);for(;s<l;++s)(a=e[s])&&(o[s]=a)}function Et(t,e,n,i,o,r,a){var s,l,h,u={},c=e.length,p=r.length,d=new Array(c);for(s=0;s<c;++s)(l=e[s])&&(d[s]=h="$"+a.call(l,l.__data__,s,e),h in u?o[s]=l:u[h]=l);for(s=0;s<p;++s)(l=u[h="$"+a.call(t,r[s],s,r)])?(i[s]=l,l.__data__=r[s],u[h]=null):n[s]=new Ct(t,r[s]);for(s=0;s<c;++s)(l=e[s])&&u[d[s]]===l&&(o[s]=l)}function Tt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}yt.prototype={_radius:4.5,_circle:vt(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=vt(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},Lt.prototype={constructor:Lt,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},Ct.prototype={constructor:Ct,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var St="http://www.w3.org/1999/xhtml";const zt={svg:"http://www.w3.org/2000/svg",xhtml:St,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ot(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),zt.hasOwnProperty(e)?{space:zt[e],local:t}:t}function Dt(t){return function(){this.removeAttribute(t)}}function At(t){return function(){this.removeAttributeNS(t.space,t.local)}}function It(t,e){return function(){this.setAttribute(t,e)}}function Bt(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Nt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Zt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Rt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function jt(t){return function(){this.style.removeProperty(t)}}function Gt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Ut(t,e,n){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function Ht(t,e){return t.style.getPropertyValue(e)||Rt(t).getComputedStyle(t,null).getPropertyValue(e)}function Ft(t){return function(){delete this[t]}}function Wt(t,e){return function(){this[t]=e}}function Vt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function qt(t){return t.trim().split(/^|\s+/)}function Yt(t){return t.classList||new Kt(t)}function Kt(t){this._node=t,this._names=qt(t.getAttribute("class")||"")}function Xt(t,e){for(var n=Yt(t),i=-1,o=e.length;++i<o;)n.add(e[i])}function Jt(t,e){for(var n=Yt(t),i=-1,o=e.length;++i<o;)n.remove(e[i])}function Qt(t){return function(){Xt(this,t)}}function $t(t){return function(){Jt(this,t)}}function te(t,e){return function(){(e.apply(this,arguments)?Xt:Jt)(this,t)}}function ee(){this.textContent=""}function ne(t){return function(){this.textContent=t}}function ie(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function oe(){this.innerHTML=""}function re(t){return function(){this.innerHTML=t}}function ae(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function se(){this.nextSibling&&this.parentNode.appendChild(this)}function le(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function he(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===St&&e.documentElement.namespaceURI===St?e.createElement(t):e.createElementNS(n,t)}}function ue(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ce(t){var e=Ot(t);return(e.local?ue:he)(e)}function pe(){return null}function de(){var t=this.parentNode;t&&t.removeChild(this)}function fe(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function _e(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}Kt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var me={};function ge(t,e,n){return t=ye(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function ye(t,e,n){return function(i){try{t.call(this,this.__data__,e,n)}finally{}}}function ve(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function be(t){return function(){var e=this.__on;if(e){for(var n,i=0,o=-1,r=e.length;i<r;++i)n=e[i],t.type&&n.type!==t.type||n.name!==t.name?e[++o]=n:this.removeEventListener(n.type,n.listener,n.capture);++o?e.length=o:delete this.__on}}}function Le(t,e,n){var i=me.hasOwnProperty(t.type)?ge:ye;return function(o,r,a){var s,l=this.__on,h=i(e,r,a);if(l)for(var u=0,c=l.length;u<c;++u)if((s=l[u]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=h,s.capture=n),void(s.value=e);this.addEventListener(t.type,h,n),s={type:t.type,name:t.name,value:e,listener:h,capture:n},l?l.push(s):this.__on=[s]}}function we(t,e,n){var i=Rt(t),o=i.CustomEvent;"function"==typeof o?o=new o(e,n):(o=i.document.createEvent("Event"),n?(o.initEvent(e,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function xe(t,e){return function(){return we(this,t,e)}}function ke(t,e){return function(){return we(this,t,e.apply(this,arguments))}}"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(me={mouseenter:"mouseover",mouseleave:"mouseout"}));var Me=[null];function Ce(t,e){this._groups=t,this._parents=e}Ce.prototype={constructor:Ce,select:function(t){"function"!=typeof t&&(t=xt(t));for(var e=this._groups,n=e.length,i=new Array(n),o=0;o<n;++o)for(var r,a,s=e[o],l=s.length,h=i[o]=new Array(l),u=0;u<l;++u)(r=s[u])&&(a=t.call(r,r.__data__,u,s))&&("__data__"in r&&(a.__data__=r.__data__),h[u]=a);return new Ce(i,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=function(t){return null==t?kt:function(){return this.querySelectorAll(t)}}(t));for(var e=this._groups,n=e.length,i=[],o=[],r=0;r<n;++r)for(var a,s=e[r],l=s.length,h=0;h<l;++h)(a=s[h])&&(i.push(t.call(a,a.__data__,h,s)),o.push(a));return new Ce(i,o)},filter:function(t){"function"!=typeof t&&(t=function(t){return function(){return this.matches(t)}}(t));for(var e=this._groups,n=e.length,i=new Array(n),o=0;o<n;++o)for(var r,a=e[o],s=a.length,l=i[o]=[],h=0;h<s;++h)(r=a[h])&&t.call(r,r.__data__,h,a)&&l.push(r);return new Ce(i,this._parents)},data:function(t,e){if(!t)return f=new Array(this.size()),u=-1,this.each((function(t){f[++u]=t})),f;var n,i=e?Et:Pt,o=this._parents,r=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var a=r.length,s=new Array(a),l=new Array(a),h=new Array(a),u=0;u<a;++u){var c=o[u],p=r[u],d=p.length,f=t.call(c,c&&c.__data__,u,o),_=f.length,m=l[u]=new Array(_),g=s[u]=new Array(_);i(c,p,m,g,h[u]=new Array(d),f,e);for(var y,v,b=0,L=0;b<_;++b)if(y=m[b]){for(b>=L&&(L=b+1);!(v=g[L])&&++L<_;);y._next=v||null}}return(s=new Ce(s,o))._enter=l,s._exit=h,s},enter:function(){return new Ce(this._enter||this._groups.map(Mt),this._parents)},exit:function(){return new Ce(this._exit||this._groups.map(Mt),this._parents)},join:function(t,e,n){var i=this.enter(),o=this,r=this.exit();return i="function"==typeof t?t(i):i.append(t+""),null!=e&&(o=e(o)),null==n?r.remove():n(r),i&&o?i.merge(o).order():o},merge:function(t){for(var e=this._groups,n=t._groups,i=e.length,o=n.length,r=Math.min(i,o),a=new Array(i),s=0;s<r;++s)for(var l,h=e[s],u=n[s],c=h.length,p=a[s]=new Array(c),d=0;d<c;++d)(l=h[d]||u[d])&&(p[d]=l);for(;s<i;++s)a[s]=e[s];return new Ce(a,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i,o=t[e],r=o.length-1,a=o[r];--r>=0;)(i=o[r])&&(a&&4^i.compareDocumentPosition(a)&&a.parentNode.insertBefore(i,a),a=i);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Tt);for(var n=this._groups,i=n.length,o=new Array(i),r=0;r<i;++r){for(var a,s=n[r],l=s.length,h=o[r]=new Array(l),u=0;u<l;++u)(a=s[u])&&(h[u]=a);h.sort(e)}return new Ce(o,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],o=0,r=i.length;o<r;++o){var a=i[o];if(a)return a}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var o,r=e[n],a=0,s=r.length;a<s;++a)(o=r[a])&&t.call(o,o.__data__,a,r);return this},attr:function(t,e){var n=Ot(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==e?n.local?At:Dt:"function"==typeof e?n.local?Zt:Nt:n.local?Bt:It)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?jt:"function"==typeof e?Ut:Gt)(t,e,null==n?"":n)):Ht(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Ft:"function"==typeof e?Vt:Wt)(t,e)):this.node()[t]},classed:function(t,e){var n=qt(t+"");if(arguments.length<2){for(var i=Yt(this.node()),o=-1,r=n.length;++o<r;)if(!i.contains(n[o]))return!1;return!0}return this.each(("function"==typeof e?te:e?Qt:$t)(n,e))},text:function(t){return arguments.length?this.each(null==t?ee:("function"==typeof t?ie:ne)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?oe:("function"==typeof t?ae:re)(t)):this.node().innerHTML},raise:function(){return this.each(se)},lower:function(){return this.each(le)},append:function(t){var e="function"==typeof t?t:ce(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ce(t),i=null==e?pe:"function"==typeof e?e:xt(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(de)},clone:function(t){return this.select(t?_e:fe)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var i,o,r=ve(t+""),a=r.length;if(!(arguments.length<2)){for(s=e?Le:be,null==n&&(n=!1),i=0;i<a;++i)this.each(s(r[i],e,n));return this}var s=this.node().__on;if(s)for(var l,h=0,u=s.length;h<u;++h)for(i=0,l=s[h];i<a;++i)if((o=r[i]).type===l.type&&o.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?ke:xe)(t,e))}};var Pe=n(62),Ee=n(402),Te=n.n(Ee),Se=n(36),ze=n.n(Se),Oe=n(793),De=n.n(Oe),Ae=n(892),Ie=n.n(Ae),Be=n(173),Ne=n.n(Be),Ze=n(464),Re=n.n(Ze),je=n(958),Ge={};Ge.styleTagTransform=Re(),Ge.setAttributes=Ie(),Ge.insert=De().bind(null,"head"),Ge.domAPI=ze(),Ge.insertStyleElement=Ne(),Te()(je.Z,Ge),je.Z&&je.Z.locals&&je.Z.locals;var Ue=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e}(Pe.Layer),He=function(t){function e(e){void 0===e&&(e={});var n=t.call(this)||this;return n._options(e),n}return(0,i.ZT)(e,t),e.prototype.svg=function(){return this._rootGroup},e.prototype.drawCallback=function(t){return arguments.length?(this._drawCallback=t,this):this._drawCallback},e.prototype.getBounds=function(){if(!this.selection||!this.projection)return new Pe.LatLngBounds([-90,-180],[90,180]);var t,e,n=this.selection.node().getBBox();try{t=this.projection.layerPointToLatLng(new Pe.Point(n.x,n.y+n.height))}catch(e){t=[-90,-180]}try{e=this.projection.layerPointToLatLng(new Pe.Point(n.x+n.width,n.y))}catch(t){e=[90,180]}return new Pe.LatLngBounds(t,e)},e.prototype._undef=function(t){return void 0===t},e.prototype._options=function(t){return this._undef(t)?this.options:(t.zoomHide=!this._undef(t.zoomHide)&&t.zoomHide,t.zoomDraw=!!this._undef(t.zoomDraw)||t.zoomDraw,this.options=t)},e.prototype.draw=function(){this.map&&this._drawCallback&&(this.projection.metresPerPixel=40075016.686*Math.abs(Math.cos(this.map.getCenter().lat*Math.PI/180))/Math.pow(2,this.map.getZoom()+8)*this.projection.scale,this._drawCallback(this.selection,this.projection,this.map.getZoom()))},e.prototype._zoomChange=function(t){var e=this._undef(t.zoom)?this.map._zoom:t.zoom;this._zoomDiff=e-this._zoom,this._scale=Math.pow(2,this._zoomDiff),this.projection.scale=this._scale,this._shift=this.map.latLngToLayerPoint(this._wgsOrigin)._subtract(this._wgsInitialShift.multiplyBy(this._scale));var n=["translate(",this._shift.x,",",this._shift.y,") "],i=["scale(",this._scale,",",this._scale,") "];this._rootGroup.attr("transform",n.concat(i).join("")),this.options.zoomDraw&&this.draw()},e.prototype.onAdd=function(t){this.map=t;var e=this;return this._svg=Pe.svg(),t.addLayer(this._svg),this._rootGroup=function(t){return"string"==typeof t?new Ce([[document.querySelector(t)]],[document.documentElement]):new Ce([[t]],Me)}(this._svg._rootGroup).classed("d3-overlay",!0),this._rootGroup.classed("leaflet-zoom-hide",this.options.zoomHide),this.selection=this._rootGroup,this._pixelOrigin=t.getPixelOrigin(),this._wgsOrigin=Pe.latLng([0,0]),this._wgsInitialShift=this.map.latLngToLayerPoint(this._wgsOrigin),this._zoom=this.map.getZoom(),this._shift=Pe.point(0,0),this._scale=1,this.projection={latLngToLayerPoint:function(t,n){return n=e._undef(n)?e._zoom:n,e.map.project(Pe.latLng(t),n)._subtract(e._pixelOrigin)},layerPointToLatLng:function(t,n){n=e._undef(n)?e._zoom:n;var i=Pe.point(t).add(e._pixelOrigin);return e.map.unproject(i,n)},unitsPerMeter:256*Math.pow(2,e._zoom)/40075017,metresPerPixel:40075016.686*Math.abs(Math.cos(t.getCenter().lat*Math.PI/180))/Math.pow(2,t.getZoom()+8),map:e.map,layer:e,scale:1},this.projection._projectPoint=function(t,n){var i=e.projection.latLngToLayerPoint(new Pe.LatLng(n,t));this.stream.point(i.x,i.y)},this.projection.pathFromGeojson=function(t,e){var n,i,r=4.5;function a(t){return t&&("function"==typeof r&&i.pointRadius(+r.apply(this,arguments)),u(t,n(i))),i.result()}return a.area=function(t){return u(t,n(S)),S.result()},a.measure=function(t){return u(t,n(gt)),gt.result()},a.bounds=function(t){return u(t,n(B)),B.result()},a.centroid=function(t){return u(t,n(at)),at.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,o):(t=e).stream,a):t},a.context=function(t){return arguments.length?(i=null==t?(e=null,new yt):new st(e=t),"function"!=typeof r&&i.pointRadius(r),a):e},a.pointRadius=function(t){return arguments.length?(r="function"==typeof t?t:(i.pointRadius(+t),+t),a):r},a.projection(t).context(e)}().projection({stream:bt({point:this.projection._projectPoint})}),this.projection.latLngToLayerFloatPoint=this.projection.latLngToLayerPoint,this.projection.getZoom=this.map.getZoom.bind(this.map),this.projection.getBounds=this.map.getBounds.bind(this.map),this.selection=this._rootGroup,this.draw(),this},e.prototype.getEvents=function(){return{zoomend:this._zoomChange,viewreset:this._zoomChange}},e.prototype.onRemove=function(t){return this._svg.remove(),this},e.prototype.addTo=function(t){return t.addLayer(this),this},e}(Ue)},22:(t,e,n)=>{n.d(e,{O:()=>l,c:()=>h});var i=n(163),o=n(62),r=n(10),a=n.n(r),s=window.simpleheat||r&&a()||r,l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e}(o.Layer),h=function(t){function e(e,n){void 0===n&&(n={});var i=t.call(this,n)||this;return i._latlngs=e,i}return(0,i.ZT)(e,t),e.prototype.initialize=function(t){this.setOptions(t)},e.prototype.setLatLngs=function(t){return this._latlngs=t,this.redraw()},e.prototype.addLatLng=function(t){return this._latlngs.push(t),this.redraw()},e.prototype.setOptions=function(t){return this.options=t,this._heat&&this._updateOptions(),this.redraw()},e.prototype.redraw=function(){return!this._heat||this._frame||this._map._animating||(this._frame=o.Util.requestAnimFrame(this._redraw,this)),this},e.prototype.onAdd=function(t){return this._map=t,this._canvas||this._initCanvas(),t._panes.overlayPane.appendChild(this._canvas),t.on("moveend",this._reset,this),t.options.zoomAnimation&&o.Browser.any3d&&t.on("zoomanim",this._animateZoom,this),this._reset(),this},e.prototype.onRemove=function(t){return t.getPanes().overlayPane.removeChild(this._canvas),t.off("moveend",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this),this},e.prototype.addTo=function(t){return t.addLayer(this),this},e.prototype._initCanvas=function(){var t=this._canvas=o.DomUtil.create("canvas","leaflet-heatmap-layer leaflet-layer"),e=o.DomUtil.testProp(["transformOrigin","WebkitTransformOrigin","msTransformOrigin"]);t.style[e]="50% 50%";var n=this._map.getSize();t.width=n.x,t.height=n.y;var i=this._map.options.zoomAnimation&&o.Browser.any3d;o.DomUtil.addClass(t,"leaflet-zoom-"+(i?"animated":"hide")),this._heat=s(t),this._updateOptions()},e.prototype._updateOptions=function(){this._heat.radius(this.options.radius||this._heat.defaultRadius,this.options.blur),this.options.gradient&&this._heat.gradient(this.options.gradient),this.options.max&&this._heat.max(this.options.max)},e.prototype._reset=function(){var t=this._map.containerPointToLayerPoint([0,0]);o.DomUtil.setPosition(this._canvas,t);var e=this._map.getSize();this._heat._width!==e.x&&(this._canvas.width=this._heat._width=e.x),this._heat._height!==e.y&&(this._canvas.height=this._heat._height=e.y),this._redraw()},e.prototype._redraw=function(){var t,e,n,i,r,a,s,l,h,u=[],c=this._heat._r,p=this._map.getSize(),d=new o.Bounds(o.point([-c,-c]),p.add([c,c])),f=void 0===this.options.max?1:this.options.max,_=void 0===this.options.maxZoom?this._map.getMaxZoom():this.options.maxZoom,m=1/Math.pow(2,Math.max(0,Math.min(_-this._map.getZoom(),12))),g=c/2,y=[],v=this._map._getMapPanePos(),b=v.x%g,L=v.y%g;for(t=0,e=this._latlngs.length;t<e;t++)n=this._map.latLngToContainerPoint(this._latlngs[t]),d.contains(n)&&(r=Math.floor((n.x-b)/g)+2,a=Math.floor((n.y-L)/g)+2,h=(void 0!==this._latlngs[t].alt?this._latlngs[t].alt:void 0!==this._latlngs[t][2]?+this._latlngs[t][2]:1)*m,y[a]=y[a]||[],(i=y[a][r])?(i[0]=(i[0]*i[2]+n.x*h)/(i[2]+h),i[1]=(i[1]*i[2]+n.y*h)/(i[2]+h),i[2]+=h):y[a][r]=[n.x,n.y,h]);for(t=0,e=y.length;t<e;t++)if(y[t])for(s=0,l=y[t].length;s<l;s++)(i=y[t][s])&&u.push([Math.round(i[0]),Math.round(i[1]),Math.min(i[2],f)]);this._heat.data(u).draw(this.options.minOpacity),this._frame=null},e.prototype._animateZoom=function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._getCenterOffset(t.center)._multiplyBy(-e).subtract(this._map._getMapPanePos());o.DomUtil.setTransform?o.DomUtil.setTransform(this._canvas,n,e):this._canvas.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(n)+" scale("+e+")"},e}(l)},856:(t,e,n)=>{t.exports=n.p+"c6e9c007f41bd4d26c20.png"},614:(t,e,n)=>{t.exports=n.p+"44b38a404dec4643c46b.png"},39:(t,e,n)=>{t.exports=n.p+"194137260531ee29a5f2.svg"},555:(t,e,n)=>{t.exports=n.p+"4a4ee777ddc0d4cedee4.png"},212:(t,e,n)=>{t.exports=n.p+"011a678e3efe41981754.png"},758:(t,e,n)=>{t.exports=n.p+"1e8408af1a34bdf61457.png"}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={id:i,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.exports}n.m=t,n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.p="dist/",n.b=document.baseURI||self.location.href;var i={};return(()=>{n.r(i),n.d(i,{BeautifyIcon:()=>r.M,D3SvgOverlay:()=>a.F,Draw:()=>h,GoogleMutant:()=>o.GoogleMutant,HeatLayer:()=>s.c,LeafletLayer:()=>a.c,LeafletLayer2:()=>s.O,MarkerClusterGroup:()=>l});var t=n(62),e={};for(const n in t)["default","GoogleMutant","MarkerClusterGroup","Draw"].indexOf(n)<0&&(e[n]=()=>t[n]);n.d(i,e),n(72),n(325),n(684),n(298),n(738),n(152);var o=n(290),r=n(57),a=n(132),s=n(22),l=t.MarkerClusterGroup,h=t.Draw})(),i})(),t.exports=n()}(Er);var Tr=function(t){function e(e){var n=t.call(this)||this;return n._layer=new Er.exports.FeatureGroup,n._crs=Er.exports.CRS.EPSG3857,n._layer.__hpcc_layer=n,n}return h(e,t),e.prototype.crs=function(){return this._crs},e.prototype.attribution=function(){return""},e.prototype.clear=function(){this._layer.clearLayers()},e.prototype.add=function(t){this._layer.addLayer(t)},e.prototype.init=function(){return this._initPromise||(this._initPromise=Promise.resolve()),this._initPromise},e.prototype.hasBounds=function(){return!1},e.prototype.getBounds=function(){return this._layer.getBounds()},e.prototype.layerEnter=function(t){t.addLayer(this._layer)},e.prototype.layerUpdate=function(t){},e.prototype.layerExit=function(t){this._layer.clearLayers(),t.removeLayer(this._layer)},e.prototype.zoomEnd=function(t){},e.prototype.moveEnd=function(t){},e.prototype.viewReset=function(t){},e}(e.Widget),Sr=go("Albers").scale(.5),zr=go("AlbersUsaPr").scale(.5),Or={project:function(t){var e=zr([t.lng,t.lat]);return e||(e=Sr([t.lng,t.lat])),new Er.exports.Point(e[0],e[1])},unproject:function(t){if(isNaN(t.x)||isNaN(t.y))return new Er.exports.LatLng(0,0);var e=Sr.invert([t.x,t.y]);return new Er.exports.LatLng(e[1],e[0])}},Dr=Er.exports.Util.extend({},Er.exports.CRS,{projection:Or,transformation:new Er.exports.Transformation(1,0,1,0),infinite:!0}),Ar=function(t){function e(){var e=t.call(this)||this;return e._crs=Dr,e}return h(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.getBounds=function(){return new Er.exports.LatLngBounds([20,-123],[49,-64])},e}(Tr);Ar.prototype._class+=" map_AlbersLayer";var Ir=function(t){function e(){return t.call(this)||this}return h(e,t),e}(Tr);Ir.prototype._class+=" map_BlankLayer";var Br=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.init=function(){return this._initPromise||(this._initPromise=rr()),this._initPromise},e.prototype.attribution=function(){return window.__hpcc_gmap_apikey?"":"DEVELOPER USE ONLY (@hpcc-js)"},e.prototype.getMaxZoom=function(){return 23},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e),this.add(new Er.exports.GoogleMutant({type:"roadmap",styles:this.googleMapStyles()}))},e}(Tr);Br.prototype._class+=" map_GMapLayer",Br.prototype.publish("googleMapStyles",{},"object","Styling for map colors etc",null,{tags:["Basic"]});var Nr=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.attribution=function(){return window.__hpcc_mapbox_apikey?"":"DEVELOPER USE ONLY (@hpcc-js)"},e.prototype.getMaxZoom=function(){return 18},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e),window.__hpcc_mapbox_apikey||console.warn("__hpcc_mapbox_apikey does not contain a valid API key, reverting to developers key (expect limited performance)");var n=window.__hpcc_mapbox_apikey||"pk.eyJ1IjoibGVzY2htb28iLCJhIjoiY2psY2FqY3l3MDhqNDN3cDl1MzFmZnkwcCJ9.HRoFwmz1j80gyz18ruggqw";this.add(new Er.exports.TileLayer("https://api.mapbox.com/styles/v1/mapbox/{id}/tiles/{z}/{x}/{y}?access_token=".concat(n),{attribution:'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',maxZoom:18,id:"streets-v11",accessToken:n}))},e}(Tr);Nr.prototype._class+=" map_MapBoxLayer";var Zr=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.attribution=function(){return""},e.prototype.getMaxZoom=function(){return 18},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e),this.add(new Er.exports.TileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',maxZoom:18,id:"open.streets"}))},e}(Tr);Zr.prototype._class+=" map_MapBoxLayer";yo(".map_Leaflet .leaflet-container{background-color:rgba(255,0,0,0);background:rgba(255,0,0,0)}");var Rr=function(t){function n(){var n=t.call(this)||this;return n._iconBar=(new e.IconBar).buttons([(new e.Button).faChar("fa-plus").tooltip("Zoom in").on("click",(function(){n.zoomPlus()})),(new e.Button).faChar("fa-minus").tooltip("Zoom out").on("click",(function(){n.zoomMinus()})),new e.Spacer,(new e.Button).faChar("fa-arrows-alt").tooltip("Zoom to fit").on("click",(function(){n.zoomToFit()}))]),n._blankLayer=new Ir,n._albersLayer=new Ar,n._mapBoxLayer=new Nr,n._openStreetLayer=new Zr,n._gmapLayer=new Br,n.baseLayer(),n}return h(n,t),n.prototype.zoom=function(){return this._leafletMap.getZoom()},n.prototype.zoomPlus=function(){this._leafletMap.zoomIn()},n.prototype.zoomMinus=function(){this._leafletMap.zoomOut()},n.prototype.zoomToDefault=function(){this._leafletMap.flyTo({lat:this.defaultLat(),lng:this.defaultLong()},this.defaultZoom(),{animate:!1})},n.prototype.zoomToFit=function(){var t;"AlbersPR"===this.mapType()?t=this._albersLayer.getBounds():this.layers().filter((function(t){return t.hasBounds()})).forEach((function(e){t?t.extend(e.getBounds()):t=e.getBounds()})),t&&t.isValid()?this._leafletMap.fitBounds(t,{maxZoom:14}):this.zoomToDefault()},n.prototype.syncLayers=function(t,e,n){var i=this,o=c([],t,!0),r=[],a=[];this._leafletMap.eachLayer((function(t){var e=o.indexOf(t.__hpcc_layer);e>=0?(r.push(t.__hpcc_layer),o.splice(e,1)):t.__hpcc_layer&&a.push(t.__hpcc_layer)})),o.forEach((function(t){t.layerEnter(i._leafletMap),t.layerUpdate(i._leafletMap)})),r.forEach((function(t){t.layerUpdate(i._leafletMap)})),a.forEach((function(t){t.layerExit(i._leafletMap)}))},n.prototype.isLayer=function(){return void 0!==this._owner&&this._owner!==this},n.prototype.baseLayer=function(){switch(this.mapType()){case"AlbersPR":this.map(this._albersLayer);break;case"MapBox":this.map(this._mapBoxLayer);break;case"OpenStreet":this.map(this._openStreetLayer);break;case"Google":this.map(this._gmapLayer);break;default:this.map(this._blankLayer)}return this.map()},n.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),n.style("position","relative"),this._leafletElement=n.append("div").style("position","absolute").style("width","".concat(this.width(),"px")).style("height","".concat(this.height(),"px")),this._iconBar.target(e)},n.prototype.update=function(e,n){var i=this;t.prototype.update.call(this,e,n),this._leafletElement.style("width","".concat(this.width(),"px")).style("height","".concat(this.height(),"px"));var o=this.baseLayer();this._prevCRS!==o.crs()&&(this._prevCRS=o.crs(),this._leafletMap&&(this.syncLayers([],e,n),this._leafletMap.remove(),this._leafletElement.html("")),this._leafletMap=new Er.exports.Map(this._leafletElement.node(),{trackResize:!1,zoomControl:!1,zoomSnap:"AlbersPR"===this.mapType()?.1:1,crs:o.crs(),maxZoom:o.getMaxZoom?o.getMaxZoom():18}),this._leafletMap.setView([this.defaultLat(),this.defaultLong()],this.defaultZoom()),this._leafletMap.attributionControl.setPrefix(o.attribution()),this._leafletMap.on("zoomend",(function(t){return i.layers().forEach((function(e){return e.zoomEnd(t)}))})),this._leafletMap.on("moveend",(function(t){return i.layers().forEach((function(e){return e.moveEnd(t)}))})),this._leafletMap.on("viewreset",(function(t){return i.layers().forEach((function(e){return e.viewReset(t)}))})),this._renderCount=0),this.syncLayers(c([o],this.layers(),!0),e,n),this._leafletMap.invalidateSize(),this.autoZoomToFit()&&this._leafletMap.whenReady((function(){this.zoomToFit()}),this),this._iconBar.visible(this.showToolbar()).render((function(t){var e=t.getBBox();t.element().style("z-index",5e3).style("left","".concat(i.width()-e.width-4,"px"))}))},n.prototype.exit=function(e,n){this._iconBar.target(null),t.prototype.exit.call(this,e,n)},n.prototype.render=function(e){var n=this,i=c([this.baseLayer().init()],this.layers().map((function(t){return t.init()})),!0);return Promise.all(i).then((function(){t.prototype.render.call(n,e)})),this},n}(e.HTMLWidget);Rr.prototype._class+=" map_Leaflet",Rr.prototype.publish("showToolbar",!0,"boolean","Show toolbar",void 0,{hidden:function(t){return t.isLayer()}}),Rr.prototype.publish("mapType","Google","set","Base Layer Type",["None","AlbersPR","MapBox","OpenStreet","Google"],{hidden:function(t){return t.isLayer()}}),Rr.prototype.publish("map",null,"widget","Base Layer",void 0,{internal:!0}),Rr.prototype.publish("layers",[],"propertyArray","Layers",void 0,{hidden:function(t){return t.isLayer()}}),Rr.prototype.publish("defaultLat",42.877742,"number","Center Latitude",void 0,{hidden:function(t){return t.isLayer()}}),Rr.prototype.publish("defaultLong",-97.380979,"number","Center Longitude",void 0,{hidden:function(t){return t.isLayer()}}),Rr.prototype.publish("defaultZoom",4,"number","Zoom Level",void 0,{hidden:function(t){return t.isLayer()}}),Rr.prototype.publish("autoZoomToFit",!0,"boolean","Auto zoom to fit Data",void 0,{hidden:function(t){return t.isLayer()}});var jr=function(t){function n(n){void 0===n&&(n=!1);var i=t.call(this)||this;return i._layer=n?new Er.exports.MarkerClusterGroup:new Er.exports.FeatureGroup,i._layer.__hpcc_layer=i,e.Utility.SimpleSelectionMixin.call(i),i.layers([i]),i}return h(n,t),n.prototype.owner=function(t){this._owner=t},n.prototype.valid=function(){return!0},n.prototype.clear=function(){this._layer.clearLayers()},n.prototype.add=function(t){this._layer.addLayer(t)},n.prototype.maxZoom=function(){return this._owner._leafletMap.getMaxZoom()||24},n.prototype.zoom=function(){return this._owner._leafletMap.getZoom()},n.prototype.visibleBounds=function(){return this._owner._leafletMap.getBounds()},n.prototype.init=function(){return this._initPromise||(this._initPromise=Promise.resolve()),this._initPromise},n.prototype.hasBounds=function(){return!1},n.prototype.getBounds=function(){return this._layer.getBounds()},n.prototype.style=function(t,n){return void 0===n?e.select(this._layer.getPane()).style(t):(e.select(this._layer.getPane()).style(t,n),this)},n.prototype.propValue=function(t,e,n){return(t<0?n:e[t])||n},n.prototype.layerEnter=function(t){t.addLayer(this._layer);var n=e.select(t.getContainer()).select(".leaflet-pane.leaflet-marker-pane");this._selection.widgetElement(n)},n.prototype.layerUpdate=function(t){},n.prototype.layerExit=function(t){this._layer.clearLayers(),t.removeLayer(this._layer)},n.prototype.zoomEnd=function(t){},n.prototype.moveEnd=function(t){},n.prototype.viewReset=function(t){},n}(Rr);jr.prototype._class+=" map_FeatureLayer",jr.prototype.mixin(e.Utility.SimpleSelectionMixin),jr.prototype.publishReset(["layers"]);var Gr=function(t){function e(e){return void 0===e&&(e=!0),t.call(this,e)||this}return h(e,t),e}(jr);Gr.prototype._class+=" map_ClusterLayer";var Ur=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._lfd3=(new Er.exports.D3SvgOverlay).drawCallback((function(t,n){return e.layerUpdate(void 0,n)})),e}return h(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.getBounds=function(){return this._lfd3.getBounds()},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e),this.add(this._lfd3)},e.prototype.layerUpdate=function(e,n){t.prototype.layerUpdate.call(this,e)},e.prototype.clickHandler=function(t,e){},e}(jr),Hr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.layerUpdate=function(e){var n=this;t.prototype.layerUpdate.call(this,e);var i=this.columns(),o=i.indexOf(this.latitudeColumn()),r=i.indexOf(this.longitudeColumn()),a=i.indexOf(this.strokeColorColumn()),s=i.indexOf(this.fillColorColumn());this.clear(),this.data().filter((function(t){return!n.omitNullLatLong()||!!t[o]&&!!t[r]})).forEach((function(t){n.add(new Er.exports.Circle([t[o],t[r]],{color:n.propValue(a,t,n.strokeColor()),fill:!0,fillColor:n.propValue(s,t,n.fillColor()),fillOpacity:n.fillOpacity(),radius:n.radius(),origRow:t}).on("click",(function(e){return n.clickHandler(e,t)})))}))},e.prototype.clickHandler=function(t,e){},e}(Gr);Hr.prototype._class+=" map_Circles",Hr.prototype.publish("latitudeColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),Hr.prototype.publish("longitudeColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),Hr.prototype.publish("radius",50,"number","Radius (meters)"),Hr.prototype.publish("strokeColor","#376cea","html-color","Stroke Color",null,{optional:!0}),Hr.prototype.publish("strokeColorColumn",null,"set","Stroke color column",(function(){return this.columns()}),{optional:!0}),Hr.prototype.publish("fillColor","#376cea","html-color","Fill Color",null,{optional:!0}),Hr.prototype.publish("fillColorColumn",null,"set","Fill color column",(function(){return this.columns()}),{optional:!0}),Hr.prototype.publish("fillOpacity",.5,"number","Opacity",null,{tags:["Advanced"]}),Hr.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});var Fr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.layerUpdate=function(e,n){var i=this;t.prototype.layerUpdate.call(this,e,n);var o=this._lfd3._rootGroup;n=n||this._lfd3.projection;var r=this.columns(),a=r.indexOf(this.latitudeColumn()),s=r.indexOf(this.longitudeColumn()),l=r.indexOf(this.strokeColorColumn()),h=r.indexOf(this.fillColorColumn());function u(t){return{lat:+t[a],lng:+t[s]}}var c=o.selectAll("circle").data(this.data().filter((function(t){return!i.omitNullLatLong()||!!t[a]&&!!t[s]})));c.enter().append("circle").merge(c).attr("cx",(function(t){return n.latLngToLayerPoint(u(t)).x})).attr("cy",(function(t){return n.latLngToLayerPoint(u(t)).y})).attr("r",Math.max(3/n.scale,this.radius()/n.metresPerPixel)).style("fill-opacity",this.fillOpacity()).style("stroke",(function(t){return i.propValue(l,t,i.strokeColor())})).attr("stroke-width",Math.max(1/n.scale,1/n.metresPerPixel)).style("fill",(function(t){return i.propValue(h,t,i.fillColor())})),c.exit().remove()},e.prototype.clickHandler=function(t,e){},e}(Ur);Fr.prototype._class+=" map_D3Circles",Fr.prototype.publish("latitudeColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),Fr.prototype.publish("longitudeColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),Fr.prototype.publish("radius",50,"number","Radius (meters)"),Fr.prototype.publish("strokeColor","#376cea","html-color","Stroke Color",null,{optional:!0}),Fr.prototype.publish("strokeColorColumn",null,"set","Stroke color column",(function(){return this.columns()}),{optional:!0}),Fr.prototype.publish("fillColor","#376cea","html-color","Fill Color",null,{optional:!0}),Fr.prototype.publish("fillColorColumn",null,"set","Fill color column",(function(){return this.columns()}),{optional:!0}),Fr.prototype.publish("fillOpacity",.5,"number","Opacity",null,{tags:["Advanced"]}),Fr.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});yo(".cluster-circle{background-clip:padding-box;font:12px Helvetica Neue,Arial,Helvetica,sans-serif}.cluster-circle>div{border-radius:20px;height:40px;text-align:center;width:40px}.cluster-circle>div>div{border-radius:15px;display:inline-block;font:12px Helvetica Neue,Arial,Helvetica,sans-serif;height:30px;margin-top:5px;text-align:center;width:30px}.cluster-circle span{line-height:30px}");var Wr=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return h(n,t),n.prototype.createIcon=function(t,n,i){var o=e.hsl(n);return o.opacity=.5,new Er.exports.DivIcon({className:"cluster-circle",iconSize:new Er.exports.Point(40,40),html:"<div style='opacity:".concat(this.opacity(),";background-color:").concat(o.toString(),"'><div style='background-color:").concat(n,"'><span style='color:").concat(e.Palette.textColor(n),"'>").concat(i(t),"</span></div></div>")})},n.prototype.layerUpdate=function(n){var i=this;t.prototype.layerUpdate.call(this,n),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id()));var o=this.cellFunc(this.latitudeColumn(),0),r=this.cellFunc(this.longitudeColumn(),0),a=this.cellFunc(this.weightColumn(),0),s=this.data(),l=e.extent(s,a),h=this.weightFormat()?e.format(this.weightFormat()):function(t){return t};this.clear(),s.forEach((function(t){var e=new Er.exports.Marker(function(t){return[+o(t),+r(t)]}(t),{icon:i.createIcon(a(t),i._palette(a(t),l[0],l[1]),h),origRow:t}).on("click",(function(e){return i.clickHandler(e,t)}));e.bindTooltip("Weight: "+a(t)),i.add(e)}))},n.prototype.clickHandler=function(t,e){},n}(jr);Wr.prototype._class+=" map_ClusterCircles",Wr.prototype._palette=e.Palette.rainbow("default"),Wr.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Wr.prototype._palette.switch()),Wr.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette"),Wr.prototype.publish("latitudeColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),Wr.prototype.publish("longitudeColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),Wr.prototype.publish("weightColumn",null,"set","Weight column",(function(){return this.columns()}),{optional:!0}),Wr.prototype.publish("weightFormat",".2s","string","Number format for weight"),Wr.prototype.publish("opacity",.66,"number","Opacity",null,{tags:["Advanced"]});var Vr=function(t){function e(e,n){return t.call(this,e,u(u({},n),{onEachFeature:function(t,e){n.onEachFeature&&n.onEachFeature(t,e),function(t,e){var n=e.getLatLngs();n.forEach((function(t){t.forEach((function(t){if(Array.isArray(t)){var e=165,n=0,i=0,o=0,r=0;t.forEach((function(t){t.lat>-62&&(t.lng>e?++r:t.lng<-165&&++o,t.lng>0?++i:t.lng<0&&++n)})),o>0&&r>0&&t.forEach((function(t){t.lng>e&&n>i?t.lng-=360:t.lng<-165&&i>n&&(t.lng+=360)}))}}))})),e.setLatLngs(n)}(0,e)}}))||this}return h(e,t),e.prototype.addData=function(e){var n,i;if("Topology"===e.type){for(i in e.objects)e.objects.hasOwnProperty(i)&&(n=Mo(e,e.objects[i]),t.prototype.addData.call(this,n));return this}return t.prototype.addData.call(this,e),this},e}(Er.exports.GeoJSON),qr=null,Yr=null,Kr=null,Xr=null;!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}h(e,t),e.prototype.initStates=function(){return this._initPromise||(this._initPromise=new Promise((function(t,e){qr&&t(),No("".concat(Do(),"/us-states.json"),(function(e){for(var n in Kr=Mo((qr=e).topology,qr.topology.objects.states).features,Xr={},Kr)Kr[n].id&&(Xr[qr.stateNames[Kr[n].id].code]=Kr[n]);t()}))}))),this._initPromise},e.prototype.initCounties=function(){return this._initPromise||(this._initPromise=new Promise((function(t,e){Yr&&t(),No("".concat(Do(),"/us-counties.json"),(function(e){for(var n in Kr=Mo((Yr=e).topology,Yr.topology.objects.counties).features,Xr={},Kr)Kr[n].id&&(Xr[Kr[n].id]=Kr[n]);t()}))}))),this._initPromise},e.prototype.init=function(){return this.initCounties()},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e);var n=new Vr(Kr,{style:function(t){return{color:"#000",opacity:1,weight:1,fillColor:"#35495d",fillOpacity:.2}}});this.add(n)}}(jr);yo(".leaflet-interactive.selected{stroke:red;stroke-width:1.25px}");var Jr=function(t){function n(){var n=t.call(this)||this;return n._dataMap={},n._dataMinWeight=null,n._dataMaxWeight=null,e.Utility.SimpleSelectionMixin.call(n),n}return h(n,t),n.prototype.hasBounds=function(){return!0},n.prototype.getBounds=function(){var e=t.prototype.getBounds.call(this);return e.isValid()?new Er.exports.LatLngBounds([e.getNorth(),e.getWest()],[e.getSouth(),e.getEast()]):new Er.exports.LatLngBounds([90,-180],[-90,180])},n.prototype.updateDataMap=function(t){this._dataMap={},this._dataMinWeight=null,this._dataMaxWeight=null;var e=this;t.forEach((function(t){e._dataMap[t[0]]=t,(!e._dataMinWeight||t[1]<e._dataMinWeight)&&(e._dataMinWeight=t[1]),(!e._dataMaxWeight||t[1]>e._dataMaxWeight)&&(e._dataMaxWeight=t[1])}))},n.prototype.data=function(e){var n=t.prototype.data.apply(this,arguments);return arguments.length&&this.updateDataMap(e),n},n.prototype.styleFeature=function(t){var e=this._dataMap[t.properties.hpccID],n=e?this._palette(e[1],this._dataMinWeight,this._dataMaxWeight):"transparent";return{color:this.meshVisible()?this.meshColor():void 0,opacity:1,weight:this.meshStrokeWidth(),fillColor:n,fillOpacity:this.opacity()}},n.prototype.svgGlowID=function(){return this.id()+"_svgGlow"},n.prototype.layerEnter=function(n){if(t.prototype.layerEnter.call(this,n),!this._svgElement){this._svgElement=e.select(n.getContainer()).select(".leaflet-pane.leaflet-overlay-pane > svg");var i=this._svgElement.append("defs");new e.SVGGlowFilter(i,this.svgGlowID()),this._selection.widgetElement(this._svgElement)}},n.prototype.layerUpdate=function(e){var n=this;this._prevFeatures!==this._features&&(this.clear(),this._topoJson=new Vr(this._features,{onEachFeature:function(t,e){e.on("click",(function(t){return n.clickHandler(t,e,e.feature.properties.hpccID)}))}}).bindTooltip((function(t){return n.tooltipHandler(t,t.feature.properties.hpccID)}),{direction:"top",sticky:!0}),this.add(this._topoJson)),t.prototype.layerUpdate.call(this,e),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this._topoJson.setStyle((function(t){return n.styleFeature(t)}))},n.prototype.clickHandler=function(t,e,n){var i=this._selection.click(t.originalEvent.target);return this.click(this.rowToObj(this._dataMap[n]),this.columns()[0],i),i},n.prototype.tooltipText=function(t,e){return e},n.prototype.tooltipHandler=function(t,e){var n=this._dataMap[e],i=n&&n[1]||"";return this.tooltipText(this.rowToObj(n),"<b>".concat(e,"</b>: ").concat(i))},n.prototype.click=function(t,e,n){},n}(jr);Jr.prototype._class+=" map_World",Jr.prototype._palette=e.Palette.rainbow("default"),Jr.prototype.mixin(e.Utility.SimpleSelectionMixin),Jr.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Jr.prototype._palette.switch(),{tags:["Basic","Shared"]}),Jr.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),Jr.prototype.publish("opacity",.5,"number","Opacity",null,{tags:["Advanced"]}),Jr.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),Jr.prototype.publish("meshColor","black","html-color","Stroke Color"),Jr.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width"),Jr.prototype.publish("internalOnly",!1,"boolean","Internal mesh only");var Qr=null,$r=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.init=function(){var t=this;return this._initPromise||(this._initPromise=new Promise((function(t,e){Qr&&t(Qr),No("".concat(Do(),"/countries.json"),(function(e){t(Qr=e)}))})).then((function(e){var n;for(var i in t._features=Mo(e.topology,e.topology.objects.countries).features,t._features)if(t._features[i].id){var o=t._features[i].id,r=null===(n=e.countryNames[o])||void 0===n?void 0:n.name;t._features[i].properties.hpccID=r}}))),this._initPromise},e.prototype.tooltipHandler=function(t,e){var n=this._dataMap[e],i=n&&n[1]||"";return this.tooltipText(this.rowToObj(n),"<b>".concat(e,"</b>: ").concat(i))},e}(Jr);function ta(t,e){var n=t.indexOf(e);n>=0&&t.splice(n,1)}var ea=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._polylines=[],e._polygons=[],e._rectangles=[],e._circles=[],e}return h(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.drawOptions=function(){var t={marker:!1,circlemarker:!1};return this.enableCircle()||(t.circle=!1),this.enablePolyline()||(t.polyline=!1),this.enableRectangle()||(t.rectangle=!1),this.enablePolygon()||(t.polygon=!1),t},e.prototype.save=function(){return{polylines:this._polylines.map((function(t){return t.getLatLngs()})),polygons:this._polygons.map((function(t){return t.getLatLngs()})),rectangles:this._rectangles.map((function(t){return t.getBounds()})),circles:this._circles.map((function(t){return{center:t.getLatLng(),radius:t.getRadius()}}))}},e.prototype.restore=function(t){var e=this;this.clear(),this._polylines=(t.polylines||[]).map((function(t){return new Er.exports.Polyline(t)})),this._polygons=(t.polygons||[]).map((function(t){return new Er.exports.Polygon(t)})),this._rectangles=(t.rectangles||[]).map((function(t){return new Er.exports.Rectangle(t)})),this._circles=(t.circles||[]).map((function(t){return new Er.exports.Circle(t.center,{radius:t.radius})})),this._polylines.forEach((function(t){return e.add(t)})),this._polygons.forEach((function(t){return e.add(t)})),this._rectangles.forEach((function(t){return e.add(t)})),this._circles.forEach((function(t){return e.add(t)}))},e.prototype.layerEnter=function(e){var n=this;t.prototype.layerEnter.call(this,e),e.on(Er.exports.Draw.Event.CREATED,(function(t){var e=t.layerType,i=t.layer;switch(e){case"polyline":n._polylines.push(i);break;case"polygon":n._polygons.push(i);break;case"rectangle":n._rectangles.push(i);break;case"circle":n._circles.push(i);break;default:alert(e)}n.add(i),n.changed("ADD",i)})),e.on(Er.exports.Draw.Event.EDITED,(function(t){t.layers.eachLayer((function(t){n.changed("UPDATE",t)}))})),e.on(Er.exports.Draw.Event.DELETED,(function(t){t.layers.eachLayer((function(t){ta(n._polylines,t),ta(n._polygons,t),ta(n._rectangles,t),ta(n._circles,t),n.changed("DELETE",t)}))}))},e.prototype.layerUpdate=function(e){t.prototype.layerUpdate.call(this,e),this.style("opacity",this.opacity());var n=this.drawOptions(),i=o.hashSum(n);this._drawOptionsHash!==i&&(this._drawOptionsHash=i,this._drawControl&&e.removeControl(this._drawControl),this._drawControl=new Er.exports.Control.Draw({position:"topleft",draw:n,edit:{featureGroup:this._layer}}),e.addControl(this._drawControl))},e.prototype.layerExit=function(e){t.prototype.layerExit.call(this,e)},e.prototype.changed=function(t,e){},e}(jr);ea.prototype._class+=" map_DrawLayer",ea.prototype.publish("opacity",1,"number","Layer Opacity"),ea.prototype.publish("enablePolyline",!0,"boolean","Enable Polyline Creation"),ea.prototype.publish("enablePolygon",!0,"boolean","Enable Polygon Creation"),ea.prototype.publish("enableRectangle",!0,"boolean","Enable Rectangle Creation"),ea.prototype.publish("enableCircle",!0,"boolean","Enable Circle Creation");var na=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.layerUpdate=function(e){var n=this;t.prototype.layerUpdate.call(this,e),this.style("opacity",this.opacity());var i,o=this.columns(),r=this.latitudeColumn_exists()?o.indexOf(this.latitudeColumn()):0,a=this.longitudeColumn_exists()?o.indexOf(this.longitudeColumn()):1,s=o.indexOf(this.weightColumn());this.clear();var l=this.data().filter((function(t){return!n.omitNullLatLong()||!!t[r]&&!!t[a]})).map((function(t){return i?i.extend([t[r],t[a]]):i=new Er.exports.LatLngBounds([t[r],t[a]]),[t[r],t[a],n.weightColumn_exists()?t[s]:.5]})),h=new Er.exports.HeatLayer(l,{minOpacity:this.minOpacity(),max:this.max(),radius:this.radius(),blur:this.blur(),gradient:this.gradient()});h.getBounds=function(){return i},this.add(h)},e}(jr);na.prototype._class+=" map_Heat",na.prototype.publish("latitudeColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),na.prototype.publish("longitudeColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),na.prototype.publish("weightColumn",null,"set","Optional normalized intensity (0 -> 1) ",(function(){return this.columns()}),{optional:!0}),na.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from IconsData",null,{tags:["Basic"]}),na.prototype.publish("opacity",.5,"number","Layer Opacity"),na.prototype.publish("minOpacity",.5,"number","The minimum opacity the heat will start at",null,{tags:["Basic"]}),na.prototype.publish("max",1,"number","maximum point intensity, 1.0 by default",null,{tags:["Basic"]}),na.prototype.publish("radius",25,"number","radius of each point of the heatmap, 25 by default",null,{tags:["Basic"]}),na.prototype.publish("blur",15,"number","amount of blur, 15 by default",null,{tags:["Basic"]}),na.prototype.publish("gradient",null,"object","color gradient config",null,{tags:["Basic"],optional:!0});var ia=function(t){function e(e){return void 0===e&&(e=!1),t.call(this,e)||this}return h(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.tooltipText=function(t,e){return""+e},e.prototype.popupText=function(t,e){return""+e},e.prototype.layerUpdate=function(e,n){var i=this;if(t.prototype.layerUpdate.call(this,e),n){var o=this.columns(),r=o.indexOf(this.latitudeColumn()),a=o.indexOf(this.longitudeColumn()),s=o.indexOf(this.tooltipColumn()),l=o.indexOf(this.popupColumn()),h=this._db.checksum(),u=this.hashSum([],{dbChecksum:h});this._hashSum!==u&&(this._hashSum=u,this.clear(),this.data().filter((function(t){return!i.omitNullLatLong()||!!t[r]&&!!t[a]})).forEach((function(t){var e=new Er.exports.Marker([t[r],t[a]],n(t)).on("click",(function(n){return i.clickHandler(n,e,t)})),o=i.tooltipText(i.rowToObj(t),i.propValue(s,t,""));o&&e.bindTooltip(o,{direction:i.tooltipDirection(),offset:Er.exports.point(i.tooltipOffsetX(),i.tooltipOffsetY())});var h=i.popupText(i.rowToObj(t),i.propValue(l,t,""));h&&e.bindPopup(h,{offset:Er.exports.point(i.popupOffsetX(),i.popupOffsetY())}),i.add(e)})))}},e.prototype.clickHandler=function(t,e,n){var i=this._selection.click(e._icon);this._currSelRow=i?n:void 0,this.click(this.rowToObj(n),"",i)},e.prototype.click=function(t,e,n){},e}(Gr);ia.prototype._class+=" map_Markers",ia.prototype.publish("latitudeColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),ia.prototype.publish("longitudeColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),ia.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from IconsData",null,{tags:["Basic"]}),ia.prototype.publish("tooltipColumn",null,"set","Tooltip column",(function(){return this.columns()}),{optional:!0}),ia.prototype.publish("tooltipDirection","auto","set","Tooltip direction",["auto","left","top","right","bottom","center"]),ia.prototype.publish("tooltipOffsetX",0,"number","Tooltip offset X"),ia.prototype.publish("tooltipOffsetY",0,"number","Tooltip offset Y"),ia.prototype.publish("popupColumn",null,"set","Popup column",(function(){return this.columns()}),{optional:!0}),ia.prototype.publish("popupOffsetX",0,"number","Tooltip offset X"),ia.prototype.publish("popupOffsetY",0,"number","Tooltip offset Y");var oa=function(t){function e(e){return void 0===e&&(e=!1),t.call(this,e)||this}return h(e,t),e.prototype.layerUpdate=function(e){var n=this,i=this.columns().indexOf(this.iconUrlColumn());t.prototype.layerUpdate.call(this,e,(function(t){return{icon:new Er.exports.Icon({iconUrl:n.propValue(i,t,n.iconUrl()),iconSize:[n.iconWidth(),n.iconHeight()],iconAnchor:[n.iconAnchorX(),n.iconAnchorY()],props:{owner:n,row:t}}),draggable:!1}}))},e}(ia);oa.prototype._class+=" map_Icons",oa.prototype.publish("iconUrl","","string","Icon URL",null),oa.prototype.publish("iconUrlColumn",null,"set","Icon URL column",(function(){return this.columns()}),{optional:!0}),oa.prototype.publish("iconWidth",32,"number","Icon width"),oa.prototype.publish("iconHeight",32,"number","Icon height"),oa.prototype.publish("iconAnchorX",16,"number","Icon Anchor X"),oa.prototype.publish("iconAnchorY",32,"number","Icon Anchor Y");var ra=function(t){function e(){return t.call(this,!0)||this}return h(e,t),e}(oa);function aa(t){return[t[1],t[0]]}ra.prototype._class+=" map_ClusterIcons";var sa=function(t,e){return e[0]<-90?t[0]++:e[0]>90&&t[1]++,t},la=function(t){return t>90?t-360:t},ha=function(t){return t<-90?t+360:t},ua=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return h(n,t),n.prototype.fixDateLine=function(t){var e,n=t.reduce(sa,[0,0]),i=n[0],o=n[1];return i&&o?t.map((e=i>o?la:ha,function(t){return[e(t[0]),t[1]]})):t},n.prototype.hasBounds=function(){return!0},n.prototype.updateHexagons=function(){var t=this;this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id()));var n=this.cellFunc(this.polygonColumn(),[]),i=this.cellFunc(this.weightColumn(),0),o=this.data(),r=e.extent(o,i);this.clear(),o.forEach((function(e){t.add(new Er.exports.Polygon(t.fixDateLine(n(e)).map(aa),{color:t._palette(r[1],r[0],r[1]),fillColor:t._palette(i(e),r[0],r[1]),fillOpacity:t.opacity(),weight:1,origRow:e}).on("click",(function(n){return t.clickHandler(n,e)})))}))},n.prototype.layerUpdate=function(e){t.prototype.layerUpdate.call(this,e),this.updateHexagons()},n.prototype.zoomEnd=function(e){t.prototype.zoomEnd.call(this,e)},n.prototype.moveEnd=function(e){t.prototype.moveEnd.call(this,e),this.updateHexagons()},n.prototype.clickHandler=function(t,e){},n}(jr);ua.prototype._class+=" map_Polygons",ua.prototype._palette=e.Palette.rainbow("default"),ua.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",ua.prototype._palette.switch(),{tags:["Basic","Shared"]}),ua.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),ua.prototype.publish("polygonColumn",null,"set","Polygon column",(function(){return this.columns()}),{optional:!0}),ua.prototype.publish("weightColumn",null,"set","Weight column",(function(){return this.columns()}),{optional:!0}),ua.prototype.publish("opacity",.5,"number","Opacity",null,{tags:["Advanced"]});var ca=2048/Math.PI,pa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.lineData=function(){var t,e=this.columns(),n=e.indexOf(this.latitudeColumn()),i=e.indexOf(this.longitudeColumn()),o=[];return this.data().forEach((function(e){var r=[e[i],e[n]];t&&o.push({type:"LineString",coordinates:[r,t]}),t=r})),o},e.prototype.isNull=function(t){return!t[0]&&!t[1]},e.prototype.isNull2=function(t){return!!this.omitNullLatLong()&&(this.isNull(t[0])||this.isNull(t[1]))},e.prototype.layerUpdate=function(e,n){var i=this;t.prototype.layerUpdate.call(this,e,n);var o=this._lfd3._rootGroup;n=n||this._lfd3.projection,this._lfd3.svg().selectAll("defs").data([void 0]).enter().append("defs").append("marker").attr("class","marker").attr("id",this._id+"_arrowHead").attr("viewBox","0 0 10 10").attr("refX",10).attr("refY",5).attr("markerWidth",12).attr("markerHeight",12).attr("markerUnits","strokeWidth").attr("orient","auto").append("polyline").attr("points","0,0 10,5 0,10 1,5"),this._lfd3.svg().select("defs > marker").style("fill",this.strokeColor()).style("stroke",null);var r=n.latLngToLayerPoint({lat:0,lng:0}),a=go("Mercator").scale(ca).translate([r.x,r.y]),s=_i().projection(a),l=o.selectAll(".dataEdge").data(this.lineData().filter((function(t){return!i.isNull2(t.coordinates)})));l.enter().append("path").attr("class","dataEdge").attr("marker-end","url(#"+this._id+"_arrowHead)").merge(l).attr("d",s).style("stroke",this.strokeColor()).style("fill","none").attr("stroke-width",1/n.scale),l.exit().remove()},e.prototype.clickHandler=function(t,e){},e}(Ur);pa.prototype._class+=" map_Path",pa.prototype.publish("latitudeColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),pa.prototype.publish("longitudeColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),pa.prototype.publish("strokeColor"," #666666","html-color","Stroke Color",null,{optional:!0}),pa.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});var da=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.lineData=function(){var t=this.columns(),e=t.indexOf(this.latitudeColumn()),n=t.indexOf(this.longitudeColumn()),i=t.indexOf(this.latitude2Column()),o=t.indexOf(this.longitude2Column()),r=[];return this.data().forEach((function(t){var a=[t[n],t[e]],s=[t[o],t[i]];r.push({type:"LineString",coordinates:[a,s]})})),r},e}(pa);da.prototype._class+=" map_Lines",da.prototype.publish("latitude2Column",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),da.prototype.publish("longitude2Column",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0});var fa=function(t){function e(e){return void 0===e&&(e=!1),t.call(this,e)||this}return h(e,t),e.prototype.layerUpdate=function(e){var n=this,i=this.columns(),o=i.indexOf(this.faCharColumn()),r=i.indexOf(this.faCharColorColumn()),a=i.indexOf(this.strokeColorColumn()),s=i.indexOf(this.fillColorColumn());t.prototype.layerUpdate.call(this,e,(function(t){return{icon:Er.exports.BeautifyIcon({iconShape:"marker",icon:n.propValue(o,t,n.faChar()),textColor:n.propValue(r,t,n.faCharColor()),borderColor:n.propValue(a,t,n.strokeColor()),backgroundColor:n.propValue(s,t,n.fillColor()),props:{owner:n,row:t}}),draggable:!1}}))},e}(ia);fa.prototype._class+=" map_Pins",fa.prototype.publish("faChar","fa-circle","string","Default font awesome character"),fa.prototype.publish("faCharColumn",null,"set","Font awesome column",(function(){return this.columns()}),{optional:!0}),fa.prototype.publish("faCharColor","#ffffff","html-color","Default font awesome Color"),fa.prototype.publish("faCharColorColumn",null,"set","Font awesome color column",(function(){return this.columns()}),{optional:!0}),fa.prototype.publish("strokeColor","transparent","html-color","Default stroke Color",null,{optional:!0}),fa.prototype.publish("strokeColorColumn",null,"set","Stroke color column",(function(){return this.columns()}),{optional:!0}),fa.prototype.publish("fillColor","#376cea","html-color","Default fill Color",null,{optional:!0}),fa.prototype.publish("fillColorColumn",null,"set","Fill color column",(function(){return this.columns()}),{optional:!0});var _a=function(t){function e(){return t.call(this,!0)||this}return h(e,t),e}(fa);_a.prototype._class+=" map_ClusterPins";var ma={GB:["administrative_area_level_3","administrative_area_level_2","administrative_area_level_1"],IE:["administrative_area_level_2","administrative_area_level_1"],ND:["administrative_area_level_2","administrative_area_level_1"]},ga={};function ya(t){return ga[t]||(ga[t]={topology:void 0,nameIdx:{},codeIdx:{}}),ga[t]}var va=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.fetchTopo=function(t){return ya(t).topology?Promise.resolve(ya(t).topology):new Promise((function(e,n){No("".concat(Do(),"/").concat(t,".json"),(function(n){ya(t).topology=n,e(n)}))}))},e.prototype.fetchTopoIdx=function(t){for(var e in ya(t).nameIdx)return Promise.resolve(ya(t).nameIdx);return new Promise((function(e,n){No("".concat(Do(),"/").concat(t,"_idx.json"),(function(n){var i,o=ya(t),r=o.nameIdx,a=o.codeIdx;null===(i=ma[t])||void 0===i||i.forEach((function(t){var e=function(e){var i=n[t][e];Array.isArray(i)&&(r[e]||(r[e]={code:void 0,codes:[]}),r[e].codes=r[e].codes.concat(i),1===i.length&&(r[e].code=r[e].codes[0]),i.forEach((function(t){a[t]||(a[t]={name:void 0,score:9999,names:[]}),i.length<=a[t].score&&(a[t].name=e,a[t].score=i.length),a[t].names.push(e)})))};for(var i in n[t])e(i)})),e(r)}))}))},e.prototype.updateDataMap=function(e){var n=[],i=ya(this.region()).nameIdx;return e.forEach((function(t){var e,o=null===(e=i[t[0]])||void 0===e?void 0:e.codes;o?null==o||o.forEach((function(e){n.push([e,t[1],t])})):n.push([t[0],t[1],t])})),t.prototype.updateDataMap.call(this,n)},e.prototype.init=function(){var t=this,e=this.region();return this._initPromise&&this._prevRegion===e||(this._prevRegion=e,this._initPromise=Promise.all([this.fetchTopo(e),this.fetchTopoIdx(e)]).then((function(e){var n=e[0];for(var i in e[1],t._features=Mo(n,n.objects.PolbndA).features,t._features){var o=t._features[i].id||i;t._features[i].properties.hpccID=o}t.updateDataMap(t.data())}))),this._initPromise},e.prototype.tooltipHandler=function(t,e){var n,i=this._dataMap[e],o=ya(this.region()).codeIdx,r=i&&i[1]||"",a=null===(n=o[e])||void 0===n?void 0:n.names.map((function(t){var n;return(null===(n=o[e])||void 0===n?void 0:n.name)===t?"<u>".concat(t,"</u>"):t})).join(", ");return this.tooltipText(this.rowToObj(i),"<b>".concat(i&&i[2][0]||a||e,"</b>: ").concat(r))},e}(Jr);va.prototype._class+=" map_Region",va.prototype.publish("region","GB","set","Region Data",["AT","BE","BG","BR","CHLI","CY","CZ","DE","DK","EE","ES","FI","FR","GB","GE","GR","HR","HU","IE","IS","IT","KS","LT","LU","LV","MD","MK","MT","ND","NL","NO","PL","PT","RO","RS","SE","SI","SK","UA"]);var ba=function(t){function n(e){return void 0===e&&(e=!1),t.call(this,e)||this}return h(n,t),n.prototype.layerUpdate=function(n){var i=this,o=this.columns(),r=o.indexOf(this.textColumn()),a=o.indexOf(this.textColorColumn()),s=o.indexOf(this.strokeColorColumn()),l=o.indexOf(this.fillColorColumn());t.prototype.layerUpdate.call(this,n,(function(t){var n=i.propValue(r,t,i.text()),o=i.textSize(n,i.fontFamily(),i.fontSize());return i.textFormat_exists()&&(n=e.format(i.textFormat())(n)),{icon:Er.exports.BeautifyIcon({iconShape:"rectangle",iconAnchor:[o.width/2+i.textOffsetX(),o.height/2+i.textOffsetY()],html:'<span style="\n '.concat(i.fontFamily_exists()?"font-family:".concat(i.fontFamily(),";"):"","\n font-size:").concat(i.fontSize(),'px;\n pointer-events: none;\n white-space:nowrap;\n ">').concat(n,"</span>"),textColor:i.propValue(a,t,i.textColor()),borderColor:i.propValue(s,t,i.strokeColor()),backgroundColor:i.propValue(l,t,i.fillColor()),props:{owner:i,row:t}}),draggable:!1}}))},n}(ia);ba.prototype._class+=" map_Text",ba.prototype.publish("textOffsetX",0,"number","Horizontal offset of text"),ba.prototype.publish("textOffsetY",0,"number","Vertical offset of text"),ba.prototype.publish("text","","string","Default text"),ba.prototype.publish("textColumn",null,"set","Font awesome column",(function(){return this.columns()}),{optional:!0}),ba.prototype.publish("textColor","#ffffff","html-color","Default font awesome Color"),ba.prototype.publish("textColorColumn",null,"set","Text color column",(function(){return this.columns()}),{optional:!0}),ba.prototype.publish("textFontFamily",null,"set","Text color column",(function(){return this.columns()}),{optional:!0}),ba.prototype.publish("strokeColor","transparent","html-color","Default stroke Color",null,{optional:!0}),ba.prototype.publish("strokeColorColumn",null,"set","Stroke color column",(function(){return this.columns()}),{optional:!0}),ba.prototype.publish("fillColor","#376cea","html-color","Default fill Color",null,{optional:!0}),ba.prototype.publish("fillColorColumn",null,"set","Fill color column",(function(){return this.columns()}),{optional:!0}),ba.prototype.publish("fontFamily",null,"string","Font family",null,{optional:!0}),ba.prototype.publish("fontSize",16,"number","Font family",null,{optional:!0}),ba.prototype.publish("textFormat",null,"string","Format rules for text",null,{optional:!0});var La=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.getBounds=function(){var e=t.prototype.getBounds.call(this);return new Er.exports.LatLngBounds([e.getNorth(),e.getWest()],[17.755278,-64.565])},e}(Jr),wa=null,xa={},ka=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.init=function(){var t=this;return this._initPromise||(this._initPromise=new Promise((function(t,e){wa&&t(wa),No("".concat(Do(),"/us-counties.json"),(function(e){t(wa=e)}))})).then((function(e){for(var n in t._features=Mo(e.topology,e.topology.objects.counties).features,t._features)if(t._features[n].id){var i=t._features[n].id,o=e.countyNames[i];t._features[n].properties.hpccID=i,xa[i]=o}}))),this._initPromise},e.prototype.tooltipHandler=function(t,e){var n=this._dataMap[e],i=n&&n[1]||"";return this.tooltipText(this.rowToObj(n),"<b>".concat(xa[e],"</b>: ").concat(i))},e}(La);ka.prototype._class+=" map_USCounties";var Ma=null,Ca={},Pa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.init=function(){var t=this;return this._initPromise||(this._initPromise=new Promise((function(t,e){Ma&&t(Ma),No("".concat(Do(),"/us-states.json"),(function(e){t(Ma=e)}))})).then((function(e){for(var n in t._features=Mo(e.topology,e.topology.objects.states).features,t._features)if(t._features[n].id){var i=e.stateNames[t._features[n].id],o=i.code,r=i.name;t._features[n].properties.hpccID=o,Ca[o]=r}}))),this._initPromise},e.prototype.tooltipHandler=function(t,e){var n=this._dataMap[e],i=n&&n[1]||"";return this.tooltipText(this.rowToObj(n),"<b>".concat(Ca[e],"</b>: ").concat(i))},e}(La);Pa.prototype._class+=" map_USStates";var Ea=Object.freeze({__proto__:null,Circles:Hr,D3Circles:Fr,ClusterCircles:Wr,Countries:$r,DrawLayer:ea,FeatureLayer:jr,ClusterLayer:Gr,D3SurfaceLayer:Ur,HeatLayer:na,Icons:oa,ClusterIcons:ra,Leaflet:Rr,Markers:ia,Polygons:ua,Path:pa,Lines:da,Pins:fa,ClusterPins:_a,Region:va,Text:ba,TileLayer:Tr,USCounties:ka,USStates:Pa,World:Jr});t.BUILD_VERSION="2.103.0",t.CanvasPinLayer=xo,t.CanvasPins=w,t.Choropleth=Ao,t.ChoroplethContinents=Uo,t.ChoroplethCounties=Vo,t.ChoroplethCountries=Go,t.ChoroplethStates=Xo,t.ChoroplethStatesHeat=Jo,t.GMap=sr,t.GMapCounties=ur,t.GMapGraph=cr,t.GMapHeat=pr,t.GMapLayered=hr,t.GMapPin=fr,t.GMapPinLine=mr,t.GeoHash=Qo,t.Graph=gr,t.Graticule=yr,t.Heat=vr,t.IChoropleth=br,t.Layer=wo,t.Layered=bo,t.Leaflet=Ea,t.Lines=_r,t.OpenStreet=Mr,t.PKG_NAME="@hpcc-js/map",t.PKG_VERSION="2.75.7",t.Pins=dr,t.TestHeatMap=Cr,t.TopoJSONChoropleth=Pr,t.projections=_o,t.requireGoogleMap=rr,t.requireGoogleMapTimeout=function(t){or=t},t.resolve=go,t.topoJsonFolder=Do,t.types=fo,Object.defineProperty(t,"__esModule",{value:!0})}));
21
+ var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)};function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}},57:(t,e,n)=>{n.d(e,{M:()=>b});var i=n(62),o=n(402),r=n.n(o),a=n(36),s=n.n(a),l=n(793),h=n.n(l),u=n(892),c=n.n(u),p=n(173),d=n.n(p),f=n(464),_=n.n(f),m=n(282),g={};g.styleTagTransform=_(),g.setAttributes=c(),g.insert=h().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=d(),r()(m.Z,g),m.Z&&m.Z.locals&&m.Z.locals;var y={iconColor:"#1EB300",iconAnchor:{marker:[14,34],circle:[11,10],"circle-dot":[5,5],"rectangle-dot":[5,6],doughnut:[8,8]},popupAnchor:{marker:[0,-25],circle:[-3,-76],"circle-dot":[0,-2],"rectangle-dot":[0,-2],doughnut:[0,-2]},innerIconAnchor:{marker:[-2,5],circle:[0,2]},iconSize:{marker:[28,28],circle:[22,22],"circle-dot":[2,2],"rectangle-dot":[2,2],doughnut:[15,15]}},v=i.Icon.extend({options:{icon:"leaf",iconSize:y.iconSize.circle,iconAnchor:y.iconAnchor.marker,iconShape:"marker",iconStyle:"",innerIconAnchor:[0,3],innerIconStyle:"",isAlphaNumericIcon:!1,text:1,borderColor:y.iconColor,borderWidth:2,borderStyle:"solid",backgroundColor:"white",textColor:y.iconColor,customClasses:"",spin:!1,prefix:"fa",html:""},initialize:function(t){this.applyDefaults(t),this.options=t&&t.html?t:i.Util.setOptions(this,t)},applyDefaults:function(t){t&&(!t.iconSize&&t.iconShape&&(t.iconSize=y.iconSize[t.iconShape]),!t.iconAnchor&&t.iconShape&&(t.iconAnchor=y.iconAnchor[t.iconShape]),!t.popupAnchor&&t.iconShape&&(t.popupAnchor=y.popupAnchor[t.iconShape]),t.innerIconAnchor||"circle"!==t.iconShape&&"marker"!==t.iconShape||("circle"===t.iconShape&&t.isAlphaNumericIcon?t.innerIconAnchor=[0,-1]:"marker"!==t.iconShape||t.isAlphaNumericIcon||(t.innerIconAnchor=y.innerIconAnchor[t.iconShape])))},createIcon:function(){var t=document.createElement("div"),e=this.options;if(t.innerHTML=e.html?e.html:this.createIconInnerHtml(),this._setIconStyles(t),"marker"===this.options.iconShape){var n=document.createElement("div");return n.className="beautify-marker"+(e.props.owner._currSelRow===e.props.row?" selected":""),n.appendChild(t),n}return t},createIconInnerHtml:function(){var t=this.options;if("circle-dot"===t.iconShape||"rectangle-dot"===t.iconShape||"doughnut"===t.iconShape)return"";var e=this.getInnerIconStyle(t);if(t.isAlphaNumericIcon)return'<div style="'+e+'">'+t.text+"</div>";var n="";return t.spin&&(n=" fa-spin"),'<i class="'+t.prefix+" "+t.icon+n+'" style="'+e+'"></i>'},getInnerIconStyle:function(t){var e=(0,i.point)(t.innerIconAnchor);return"color:"+t.textColor+";margin-top:"+e.y+"px; margin-left:"+e.x+"px;"+t.innerIconStyle},_setIconStyles:function(t){var e=this.options,n=(0,i.point)(e.iconSize),o=(0,i.point)(e.iconAnchor);if(t.className="beautify-marker ",e.iconShape&&(t.className+=e.iconShape),e.customClasses&&(t.className+=" "+e.customClasses),t.style.backgroundColor=e.backgroundColor,t.style.color=e.textColor,t.style.borderColor=e.borderColor,t.style.borderWidth=e.borderWidth+"px",t.style.borderStyle=e.borderStyle,n&&(t.style.width=n.x+"px",t.style.height=n.y+"px"),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),e.iconStyle){var r=t.getAttribute("style");r+=e.iconStyle,t.setAttribute("style",r)}}});function b(t){return new v(t)}},132:(t,e,n)=>{n.d(e,{F:()=>He,c:()=>Ue});var i=n(163);function o(t){return t}function r(t,e){t&&s.hasOwnProperty(t.type)&&s[t.type](t,e)}var a={Feature:function(t,e){r(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,o=n.length;++i<o;)r(n[i].geometry,e)}},s={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)t=n[i],e.point(t[0],t[1],t[2])},LineString:function(t,e){l(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)l(n[i],e,0)},Polygon:function(t,e){h(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,i=-1,o=n.length;++i<o;)h(n[i],e)},GeometryCollection:function(t,e){for(var n=t.geometries,i=-1,o=n.length;++i<o;)r(n[i],e)}};function l(t,e,n){var i,o=-1,r=t.length-n;for(e.lineStart();++o<r;)i=t[o],e.point(i[0],i[1],i[2]);e.lineEnd()}function h(t,e){var n=-1,i=t.length;for(e.polygonStart();++n<i;)l(t[n],e,1);e.polygonEnd()}function u(t,e){t&&a.hasOwnProperty(t.type)?a[t.type](t,e):r(t,e)}function c(){return new p}function p(){this.reset()}p.prototype={constructor:p,reset:function(){this.s=this.t=0},add:function(t){f(d,t,this.t),f(this,d.s,this.s),this.s?this.t+=d.t:this.s=d.t},valueOf:function(){return this.s}};var d=new p;function f(t,e,n){var i=t.s=e+n,o=i-e,r=i-o;t.t=e-r+(n-o)}var _=2*Math.PI,m=Math.abs,g=Math.sqrt;function y(){}var v,b,L,w,x=c(),k=c(),M={point:y,lineStart:y,lineEnd:y,polygonStart:function(){M.lineStart=C,M.lineEnd=T},polygonEnd:function(){M.lineStart=M.lineEnd=M.point=y,x.add(m(k)),k.reset()},result:function(){var t=x/2;return x.reset(),t}};function C(){M.point=P}function P(t,e){M.point=E,v=L=t,b=w=e}function E(t,e){k.add(w*t-L*e),L=t,w=e}function T(){E(v,b)}const S=M;var z=1/0,O=z,D=-z,A=D,I={point:function(t,e){t<z&&(z=t),t>D&&(D=t),e<O&&(O=e),e>A&&(A=e)},lineStart:y,lineEnd:y,polygonStart:y,polygonEnd:y,result:function(){var t=[[z,O],[D,A]];return D=A=-(O=z=1/0),t}};const B=I;var N,Z,R,j,G=0,U=0,H=0,F=0,W=0,V=0,q=0,Y=0,K=0,X={point:J,lineStart:Q,lineEnd:et,polygonStart:function(){X.lineStart=nt,X.lineEnd=it},polygonEnd:function(){X.point=J,X.lineStart=Q,X.lineEnd=et},result:function(){var t=K?[q/K,Y/K]:V?[F/V,W/V]:H?[G/H,U/H]:[NaN,NaN];return G=U=H=F=W=V=q=Y=K=0,t}};function J(t,e){G+=t,U+=e,++H}function Q(){X.point=$}function $(t,e){X.point=tt,J(R=t,j=e)}function tt(t,e){var n=t-R,i=e-j,o=g(n*n+i*i);F+=o*(R+t)/2,W+=o*(j+e)/2,V+=o,J(R=t,j=e)}function et(){X.point=J}function nt(){X.point=ot}function it(){rt(N,Z)}function ot(t,e){X.point=rt,J(N=R=t,Z=j=e)}function rt(t,e){var n=t-R,i=e-j,o=g(n*n+i*i);F+=o*(R+t)/2,W+=o*(j+e)/2,V+=o,q+=(o=j*t-R*e)*(R+t),Y+=o*(j+e),K+=3*o,J(R=t,j=e)}const at=X;function st(t){this._context=t}st.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,_)}},result:y};var lt,ht,ut,ct,pt,dt=c(),ft={point:y,lineStart:function(){ft.point=_t},lineEnd:function(){lt&&mt(ht,ut),ft.point=y},polygonStart:function(){lt=!0},polygonEnd:function(){lt=null},result:function(){var t=+dt;return dt.reset(),t}};function _t(t,e){ft.point=mt,ht=ct=t,ut=pt=e}function mt(t,e){ct-=t,pt-=e,dt.add(g(ct*ct+pt*pt)),ct=t,pt=e}const gt=ft;function yt(){this._string=[]}function vt(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function bt(t){return function(e){var n=new Lt;for(var i in t)n[i]=t[i];return n.stream=e,n}}function Lt(){}function wt(){}function xt(t){return null==t?wt:function(){return this.querySelector(t)}}function kt(){return[]}function Mt(t){return new Array(t.length)}function Ct(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function Pt(t,e,n,i,o,r){for(var a,s=0,l=e.length,h=r.length;s<h;++s)(a=e[s])?(a.__data__=r[s],i[s]=a):n[s]=new Ct(t,r[s]);for(;s<l;++s)(a=e[s])&&(o[s]=a)}function Et(t,e,n,i,o,r,a){var s,l,h,u={},c=e.length,p=r.length,d=new Array(c);for(s=0;s<c;++s)(l=e[s])&&(d[s]=h="$"+a.call(l,l.__data__,s,e),h in u?o[s]=l:u[h]=l);for(s=0;s<p;++s)(l=u[h="$"+a.call(t,r[s],s,r)])?(i[s]=l,l.__data__=r[s],u[h]=null):n[s]=new Ct(t,r[s]);for(s=0;s<c;++s)(l=e[s])&&u[d[s]]===l&&(o[s]=l)}function Tt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}yt.prototype={_radius:4.5,_circle:vt(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=vt(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},Lt.prototype={constructor:Lt,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},Ct.prototype={constructor:Ct,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var St="http://www.w3.org/1999/xhtml";const zt={svg:"http://www.w3.org/2000/svg",xhtml:St,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ot(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),zt.hasOwnProperty(e)?{space:zt[e],local:t}:t}function Dt(t){return function(){this.removeAttribute(t)}}function At(t){return function(){this.removeAttributeNS(t.space,t.local)}}function It(t,e){return function(){this.setAttribute(t,e)}}function Bt(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Nt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Zt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Rt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function jt(t){return function(){this.style.removeProperty(t)}}function Gt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Ut(t,e,n){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function Ht(t,e){return t.style.getPropertyValue(e)||Rt(t).getComputedStyle(t,null).getPropertyValue(e)}function Ft(t){return function(){delete this[t]}}function Wt(t,e){return function(){this[t]=e}}function Vt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function qt(t){return t.trim().split(/^|\s+/)}function Yt(t){return t.classList||new Kt(t)}function Kt(t){this._node=t,this._names=qt(t.getAttribute("class")||"")}function Xt(t,e){for(var n=Yt(t),i=-1,o=e.length;++i<o;)n.add(e[i])}function Jt(t,e){for(var n=Yt(t),i=-1,o=e.length;++i<o;)n.remove(e[i])}function Qt(t){return function(){Xt(this,t)}}function $t(t){return function(){Jt(this,t)}}function te(t,e){return function(){(e.apply(this,arguments)?Xt:Jt)(this,t)}}function ee(){this.textContent=""}function ne(t){return function(){this.textContent=t}}function ie(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function oe(){this.innerHTML=""}function re(t){return function(){this.innerHTML=t}}function ae(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function se(){this.nextSibling&&this.parentNode.appendChild(this)}function le(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function he(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===St&&e.documentElement.namespaceURI===St?e.createElement(t):e.createElementNS(n,t)}}function ue(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ce(t){var e=Ot(t);return(e.local?ue:he)(e)}function pe(){return null}function de(){var t=this.parentNode;t&&t.removeChild(this)}function fe(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function _e(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}Kt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var me={};function ge(t,e,n){return t=ye(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function ye(t,e,n){return function(i){try{t.call(this,this.__data__,e,n)}finally{}}}function ve(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function be(t){return function(){var e=this.__on;if(e){for(var n,i=0,o=-1,r=e.length;i<r;++i)n=e[i],t.type&&n.type!==t.type||n.name!==t.name?e[++o]=n:this.removeEventListener(n.type,n.listener,n.capture);++o?e.length=o:delete this.__on}}}function Le(t,e,n){var i=me.hasOwnProperty(t.type)?ge:ye;return function(o,r,a){var s,l=this.__on,h=i(e,r,a);if(l)for(var u=0,c=l.length;u<c;++u)if((s=l[u]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=h,s.capture=n),void(s.value=e);this.addEventListener(t.type,h,n),s={type:t.type,name:t.name,value:e,listener:h,capture:n},l?l.push(s):this.__on=[s]}}function we(t,e,n){var i=Rt(t),o=i.CustomEvent;"function"==typeof o?o=new o(e,n):(o=i.document.createEvent("Event"),n?(o.initEvent(e,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function xe(t,e){return function(){return we(this,t,e)}}function ke(t,e){return function(){return we(this,t,e.apply(this,arguments))}}"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(me={mouseenter:"mouseover",mouseleave:"mouseout"}));var Me=[null];function Ce(t,e){this._groups=t,this._parents=e}Ce.prototype={constructor:Ce,select:function(t){"function"!=typeof t&&(t=xt(t));for(var e=this._groups,n=e.length,i=new Array(n),o=0;o<n;++o)for(var r,a,s=e[o],l=s.length,h=i[o]=new Array(l),u=0;u<l;++u)(r=s[u])&&(a=t.call(r,r.__data__,u,s))&&("__data__"in r&&(a.__data__=r.__data__),h[u]=a);return new Ce(i,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=function(t){return null==t?kt:function(){return this.querySelectorAll(t)}}(t));for(var e=this._groups,n=e.length,i=[],o=[],r=0;r<n;++r)for(var a,s=e[r],l=s.length,h=0;h<l;++h)(a=s[h])&&(i.push(t.call(a,a.__data__,h,s)),o.push(a));return new Ce(i,o)},filter:function(t){"function"!=typeof t&&(t=function(t){return function(){return this.matches(t)}}(t));for(var e=this._groups,n=e.length,i=new Array(n),o=0;o<n;++o)for(var r,a=e[o],s=a.length,l=i[o]=[],h=0;h<s;++h)(r=a[h])&&t.call(r,r.__data__,h,a)&&l.push(r);return new Ce(i,this._parents)},data:function(t,e){if(!t)return f=new Array(this.size()),u=-1,this.each((function(t){f[++u]=t})),f;var n,i=e?Et:Pt,o=this._parents,r=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var a=r.length,s=new Array(a),l=new Array(a),h=new Array(a),u=0;u<a;++u){var c=o[u],p=r[u],d=p.length,f=t.call(c,c&&c.__data__,u,o),_=f.length,m=l[u]=new Array(_),g=s[u]=new Array(_);i(c,p,m,g,h[u]=new Array(d),f,e);for(var y,v,b=0,L=0;b<_;++b)if(y=m[b]){for(b>=L&&(L=b+1);!(v=g[L])&&++L<_;);y._next=v||null}}return(s=new Ce(s,o))._enter=l,s._exit=h,s},enter:function(){return new Ce(this._enter||this._groups.map(Mt),this._parents)},exit:function(){return new Ce(this._exit||this._groups.map(Mt),this._parents)},join:function(t,e,n){var i=this.enter(),o=this,r=this.exit();return i="function"==typeof t?t(i):i.append(t+""),null!=e&&(o=e(o)),null==n?r.remove():n(r),i&&o?i.merge(o).order():o},merge:function(t){for(var e=this._groups,n=t._groups,i=e.length,o=n.length,r=Math.min(i,o),a=new Array(i),s=0;s<r;++s)for(var l,h=e[s],u=n[s],c=h.length,p=a[s]=new Array(c),d=0;d<c;++d)(l=h[d]||u[d])&&(p[d]=l);for(;s<i;++s)a[s]=e[s];return new Ce(a,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i,o=t[e],r=o.length-1,a=o[r];--r>=0;)(i=o[r])&&(a&&4^i.compareDocumentPosition(a)&&a.parentNode.insertBefore(i,a),a=i);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Tt);for(var n=this._groups,i=n.length,o=new Array(i),r=0;r<i;++r){for(var a,s=n[r],l=s.length,h=o[r]=new Array(l),u=0;u<l;++u)(a=s[u])&&(h[u]=a);h.sort(e)}return new Ce(o,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],o=0,r=i.length;o<r;++o){var a=i[o];if(a)return a}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var o,r=e[n],a=0,s=r.length;a<s;++a)(o=r[a])&&t.call(o,o.__data__,a,r);return this},attr:function(t,e){var n=Ot(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==e?n.local?At:Dt:"function"==typeof e?n.local?Zt:Nt:n.local?Bt:It)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?jt:"function"==typeof e?Ut:Gt)(t,e,null==n?"":n)):Ht(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Ft:"function"==typeof e?Vt:Wt)(t,e)):this.node()[t]},classed:function(t,e){var n=qt(t+"");if(arguments.length<2){for(var i=Yt(this.node()),o=-1,r=n.length;++o<r;)if(!i.contains(n[o]))return!1;return!0}return this.each(("function"==typeof e?te:e?Qt:$t)(n,e))},text:function(t){return arguments.length?this.each(null==t?ee:("function"==typeof t?ie:ne)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?oe:("function"==typeof t?ae:re)(t)):this.node().innerHTML},raise:function(){return this.each(se)},lower:function(){return this.each(le)},append:function(t){var e="function"==typeof t?t:ce(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ce(t),i=null==e?pe:"function"==typeof e?e:xt(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(de)},clone:function(t){return this.select(t?_e:fe)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var i,o,r=ve(t+""),a=r.length;if(!(arguments.length<2)){for(s=e?Le:be,null==n&&(n=!1),i=0;i<a;++i)this.each(s(r[i],e,n));return this}var s=this.node().__on;if(s)for(var l,h=0,u=s.length;h<u;++h)for(i=0,l=s[h];i<a;++i)if((o=r[i]).type===l.type&&o.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?ke:xe)(t,e))}};var Pe=n(62),Ee=n(402),Te=n.n(Ee),Se=n(36),ze=n.n(Se),Oe=n(793),De=n.n(Oe),Ae=n(892),Ie=n.n(Ae),Be=n(173),Ne=n.n(Be),Ze=n(464),Re=n.n(Ze),je=n(958),Ge={};Ge.styleTagTransform=Re(),Ge.setAttributes=Ie(),Ge.insert=De().bind(null,"head"),Ge.domAPI=ze(),Ge.insertStyleElement=Ne(),Te()(je.Z,Ge),je.Z&&je.Z.locals&&je.Z.locals;var Ue=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e}(Pe.Layer),He=function(t){function e(e){void 0===e&&(e={});var n=t.call(this)||this;return n._options(e),n}return(0,i.ZT)(e,t),e.prototype.svg=function(){return this._rootGroup},e.prototype.drawCallback=function(t){return arguments.length?(this._drawCallback=t,this):this._drawCallback},e.prototype.getBounds=function(){if(!this.selection||!this.projection)return new Pe.LatLngBounds([-90,-180],[90,180]);var t,e,n=this.selection.node().getBBox();try{t=this.projection.layerPointToLatLng(new Pe.Point(n.x,n.y+n.height))}catch(e){t=[-90,-180]}try{e=this.projection.layerPointToLatLng(new Pe.Point(n.x+n.width,n.y))}catch(t){e=[90,180]}return new Pe.LatLngBounds(t,e)},e.prototype._undef=function(t){return void 0===t},e.prototype._options=function(t){return this._undef(t)?this.options:(t.zoomHide=!this._undef(t.zoomHide)&&t.zoomHide,t.zoomDraw=!!this._undef(t.zoomDraw)||t.zoomDraw,this.options=t)},e.prototype.draw=function(){this.map&&this._drawCallback&&(this.projection.metresPerPixel=40075016.686*Math.abs(Math.cos(this.map.getCenter().lat*Math.PI/180))/Math.pow(2,this.map.getZoom()+8)*this.projection.scale,this._drawCallback(this.selection,this.projection,this.map.getZoom()))},e.prototype._zoomChange=function(t){var e=this._undef(t.zoom)?this.map._zoom:t.zoom;this._zoomDiff=e-this._zoom,this._scale=Math.pow(2,this._zoomDiff),this.projection.scale=this._scale,this._shift=this.map.latLngToLayerPoint(this._wgsOrigin)._subtract(this._wgsInitialShift.multiplyBy(this._scale));var n=["translate(",this._shift.x,",",this._shift.y,") "],i=["scale(",this._scale,",",this._scale,") "];this._rootGroup.attr("transform",n.concat(i).join("")),this.options.zoomDraw&&this.draw()},e.prototype.onAdd=function(t){this.map=t;var e=this;return this._svg=Pe.svg(),t.addLayer(this._svg),this._rootGroup=function(t){return"string"==typeof t?new Ce([[document.querySelector(t)]],[document.documentElement]):new Ce([[t]],Me)}(this._svg._rootGroup).classed("d3-overlay",!0),this._rootGroup.classed("leaflet-zoom-hide",this.options.zoomHide),this.selection=this._rootGroup,this._pixelOrigin=t.getPixelOrigin(),this._wgsOrigin=Pe.latLng([0,0]),this._wgsInitialShift=this.map.latLngToLayerPoint(this._wgsOrigin),this._zoom=this.map.getZoom(),this._shift=Pe.point(0,0),this._scale=1,this.projection={latLngToLayerPoint:function(t,n){return n=e._undef(n)?e._zoom:n,e.map.project(Pe.latLng(t),n)._subtract(e._pixelOrigin)},layerPointToLatLng:function(t,n){n=e._undef(n)?e._zoom:n;var i=Pe.point(t).add(e._pixelOrigin);return e.map.unproject(i,n)},unitsPerMeter:256*Math.pow(2,e._zoom)/40075017,metresPerPixel:40075016.686*Math.abs(Math.cos(t.getCenter().lat*Math.PI/180))/Math.pow(2,t.getZoom()+8),map:e.map,layer:e,scale:1},this.projection._projectPoint=function(t,n){var i=e.projection.latLngToLayerPoint(new Pe.LatLng(n,t));this.stream.point(i.x,i.y)},this.projection.pathFromGeojson=function(t,e){var n,i,r=4.5;function a(t){return t&&("function"==typeof r&&i.pointRadius(+r.apply(this,arguments)),u(t,n(i))),i.result()}return a.area=function(t){return u(t,n(S)),S.result()},a.measure=function(t){return u(t,n(gt)),gt.result()},a.bounds=function(t){return u(t,n(B)),B.result()},a.centroid=function(t){return u(t,n(at)),at.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,o):(t=e).stream,a):t},a.context=function(t){return arguments.length?(i=null==t?(e=null,new yt):new st(e=t),"function"!=typeof r&&i.pointRadius(r),a):e},a.pointRadius=function(t){return arguments.length?(r="function"==typeof t?t:(i.pointRadius(+t),+t),a):r},a.projection(t).context(e)}().projection({stream:bt({point:this.projection._projectPoint})}),this.projection.latLngToLayerFloatPoint=this.projection.latLngToLayerPoint,this.projection.getZoom=this.map.getZoom.bind(this.map),this.projection.getBounds=this.map.getBounds.bind(this.map),this.selection=this._rootGroup,this.draw(),this},e.prototype.getEvents=function(){return{zoomend:this._zoomChange,viewreset:this._zoomChange}},e.prototype.onRemove=function(t){return this._svg.remove(),this},e.prototype.addTo=function(t){return t.addLayer(this),this},e}(Ue)},22:(t,e,n)=>{n.d(e,{O:()=>l,c:()=>h});var i=n(163),o=n(62),r=n(10),a=n.n(r),s=window.simpleheat||r&&a()||r,l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),e}(o.Layer),h=function(t){function e(e,n){void 0===n&&(n={});var i=t.call(this,n)||this;return i._latlngs=e,i}return(0,i.ZT)(e,t),e.prototype.initialize=function(t){this.setOptions(t)},e.prototype.setLatLngs=function(t){return this._latlngs=t,this.redraw()},e.prototype.addLatLng=function(t){return this._latlngs.push(t),this.redraw()},e.prototype.setOptions=function(t){return this.options=t,this._heat&&this._updateOptions(),this.redraw()},e.prototype.redraw=function(){return!this._heat||this._frame||this._map._animating||(this._frame=o.Util.requestAnimFrame(this._redraw,this)),this},e.prototype.onAdd=function(t){return this._map=t,this._canvas||this._initCanvas(),t._panes.overlayPane.appendChild(this._canvas),t.on("moveend",this._reset,this),t.options.zoomAnimation&&o.Browser.any3d&&t.on("zoomanim",this._animateZoom,this),this._reset(),this},e.prototype.onRemove=function(t){return t.getPanes().overlayPane.removeChild(this._canvas),t.off("moveend",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this),this},e.prototype.addTo=function(t){return t.addLayer(this),this},e.prototype._initCanvas=function(){var t=this._canvas=o.DomUtil.create("canvas","leaflet-heatmap-layer leaflet-layer"),e=o.DomUtil.testProp(["transformOrigin","WebkitTransformOrigin","msTransformOrigin"]);t.style[e]="50% 50%";var n=this._map.getSize();t.width=n.x,t.height=n.y;var i=this._map.options.zoomAnimation&&o.Browser.any3d;o.DomUtil.addClass(t,"leaflet-zoom-"+(i?"animated":"hide")),this._heat=s(t),this._updateOptions()},e.prototype._updateOptions=function(){this._heat.radius(this.options.radius||this._heat.defaultRadius,this.options.blur),this.options.gradient&&this._heat.gradient(this.options.gradient),this.options.max&&this._heat.max(this.options.max)},e.prototype._reset=function(){var t=this._map.containerPointToLayerPoint([0,0]);o.DomUtil.setPosition(this._canvas,t);var e=this._map.getSize();this._heat._width!==e.x&&(this._canvas.width=this._heat._width=e.x),this._heat._height!==e.y&&(this._canvas.height=this._heat._height=e.y),this._redraw()},e.prototype._redraw=function(){var t,e,n,i,r,a,s,l,h,u=[],c=this._heat._r,p=this._map.getSize(),d=new o.Bounds(o.point([-c,-c]),p.add([c,c])),f=void 0===this.options.max?1:this.options.max,_=void 0===this.options.maxZoom?this._map.getMaxZoom():this.options.maxZoom,m=1/Math.pow(2,Math.max(0,Math.min(_-this._map.getZoom(),12))),g=c/2,y=[],v=this._map._getMapPanePos(),b=v.x%g,L=v.y%g;for(t=0,e=this._latlngs.length;t<e;t++)n=this._map.latLngToContainerPoint(this._latlngs[t]),d.contains(n)&&(r=Math.floor((n.x-b)/g)+2,a=Math.floor((n.y-L)/g)+2,h=(void 0!==this._latlngs[t].alt?this._latlngs[t].alt:void 0!==this._latlngs[t][2]?+this._latlngs[t][2]:1)*m,y[a]=y[a]||[],(i=y[a][r])?(i[0]=(i[0]*i[2]+n.x*h)/(i[2]+h),i[1]=(i[1]*i[2]+n.y*h)/(i[2]+h),i[2]+=h):y[a][r]=[n.x,n.y,h]);for(t=0,e=y.length;t<e;t++)if(y[t])for(s=0,l=y[t].length;s<l;s++)(i=y[t][s])&&u.push([Math.round(i[0]),Math.round(i[1]),Math.min(i[2],f)]);this._heat.data(u).draw(this.options.minOpacity),this._frame=null},e.prototype._animateZoom=function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._getCenterOffset(t.center)._multiplyBy(-e).subtract(this._map._getMapPanePos());o.DomUtil.setTransform?o.DomUtil.setTransform(this._canvas,n,e):this._canvas.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(n)+" scale("+e+")"},e}(l)},734:(t,e,n)=>{t.exports=n.p+"c6e9c007f41bd4d26c20.png"},2:(t,e,n)=>{t.exports=n.p+"44b38a404dec4643c46b.png"},122:(t,e,n)=>{t.exports=n.p+"194137260531ee29a5f2.svg"},262:(t,e,n)=>{t.exports=n.p+"4a4ee777ddc0d4cedee4.png"},263:(t,e,n)=>{t.exports=n.p+"011a678e3efe41981754.png"},19:(t,e,n)=>{t.exports=n.p+"1e8408af1a34bdf61457.png"}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={id:i,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.exports}n.m=t,n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.p="dist/",n.b=document.baseURI||self.location.href;var i={};return(()=>{n.r(i),n.d(i,{BeautifyIcon:()=>r.M,D3SvgOverlay:()=>a.F,Draw:()=>h,GoogleMutant:()=>o.GoogleMutant,HeatLayer:()=>s.c,LeafletLayer:()=>a.c,LeafletLayer2:()=>s.O,MarkerClusterGroup:()=>l});var t=n(62),e={};for(const n in t)["default","GoogleMutant","MarkerClusterGroup","Draw"].indexOf(n)<0&&(e[n]=()=>t[n]);n.d(i,e),n(72),n(325),n(684),n(298),n(738),n(152);var o=n(290),r=n(57),a=n(132),s=n(22),l=t.MarkerClusterGroup,h=t.Draw})(),i})(),t.exports=n()}(Er);var Tr=function(t){function e(e){var n=t.call(this)||this;return n._layer=new Er.exports.FeatureGroup,n._crs=Er.exports.CRS.EPSG3857,n._layer.__hpcc_layer=n,n}return h(e,t),e.prototype.crs=function(){return this._crs},e.prototype.attribution=function(){return""},e.prototype.clear=function(){this._layer.clearLayers()},e.prototype.add=function(t){this._layer.addLayer(t)},e.prototype.init=function(){return this._initPromise||(this._initPromise=Promise.resolve()),this._initPromise},e.prototype.hasBounds=function(){return!1},e.prototype.getBounds=function(){return this._layer.getBounds()},e.prototype.layerEnter=function(t){t.addLayer(this._layer)},e.prototype.layerUpdate=function(t){},e.prototype.layerExit=function(t){this._layer.clearLayers(),t.removeLayer(this._layer)},e.prototype.zoomEnd=function(t){},e.prototype.moveEnd=function(t){},e.prototype.viewReset=function(t){},e}(e.Widget),Sr=go("Albers").scale(.5),zr=go("AlbersUsaPr").scale(.5),Or={project:function(t){var e=zr([t.lng,t.lat]);return e||(e=Sr([t.lng,t.lat])),new Er.exports.Point(e[0],e[1])},unproject:function(t){if(isNaN(t.x)||isNaN(t.y))return new Er.exports.LatLng(0,0);var e=Sr.invert([t.x,t.y]);return new Er.exports.LatLng(e[1],e[0])}},Dr=Er.exports.Util.extend({},Er.exports.CRS,{projection:Or,transformation:new Er.exports.Transformation(1,0,1,0),infinite:!0}),Ar=function(t){function e(){var e=t.call(this)||this;return e._crs=Dr,e}return h(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.getBounds=function(){return new Er.exports.LatLngBounds([20,-123],[49,-64])},e}(Tr);Ar.prototype._class+=" map_AlbersLayer";var Ir=function(t){function e(){return t.call(this)||this}return h(e,t),e}(Tr);Ir.prototype._class+=" map_BlankLayer";var Br=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.init=function(){return this._initPromise||(this._initPromise=rr()),this._initPromise},e.prototype.attribution=function(){return window.__hpcc_gmap_apikey?"":"DEVELOPER USE ONLY (@hpcc-js)"},e.prototype.getMaxZoom=function(){return 23},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e),this.add(new Er.exports.GoogleMutant({type:"roadmap",styles:this.googleMapStyles()}))},e}(Tr);Br.prototype._class+=" map_GMapLayer",Br.prototype.publish("googleMapStyles",{},"object","Styling for map colors etc",null,{tags:["Basic"]});var Nr=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.attribution=function(){return window.__hpcc_mapbox_apikey?"":"DEVELOPER USE ONLY (@hpcc-js)"},e.prototype.getMaxZoom=function(){return 18},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e),window.__hpcc_mapbox_apikey||console.warn("__hpcc_mapbox_apikey does not contain a valid API key, reverting to developers key (expect limited performance)");var n=window.__hpcc_mapbox_apikey||"pk.eyJ1IjoibGVzY2htb28iLCJhIjoiY2psY2FqY3l3MDhqNDN3cDl1MzFmZnkwcCJ9.HRoFwmz1j80gyz18ruggqw";this.add(new Er.exports.TileLayer("https://api.mapbox.com/styles/v1/mapbox/{id}/tiles/{z}/{x}/{y}?access_token=".concat(n),{attribution:'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',maxZoom:18,id:"streets-v11",accessToken:n}))},e}(Tr);Nr.prototype._class+=" map_MapBoxLayer";var Zr=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.attribution=function(){return""},e.prototype.getMaxZoom=function(){return 18},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e),this.add(new Er.exports.TileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',maxZoom:18,id:"open.streets"}))},e}(Tr);Zr.prototype._class+=" map_MapBoxLayer";yo(".map_Leaflet .leaflet-container{background-color:rgba(255,0,0,0);background:rgba(255,0,0,0)}");var Rr=function(t){function n(){var n=t.call(this)||this;return n._iconBar=(new e.IconBar).buttons([(new e.Button).faChar("fa-plus").tooltip("Zoom in").on("click",(function(){n.zoomPlus()})),(new e.Button).faChar("fa-minus").tooltip("Zoom out").on("click",(function(){n.zoomMinus()})),new e.Spacer,(new e.Button).faChar("fa-arrows-alt").tooltip("Zoom to fit").on("click",(function(){n.zoomToFit()}))]),n._blankLayer=new Ir,n._albersLayer=new Ar,n._mapBoxLayer=new Nr,n._openStreetLayer=new Zr,n._gmapLayer=new Br,n.baseLayer(),n}return h(n,t),n.prototype.zoom=function(){return this._leafletMap.getZoom()},n.prototype.zoomPlus=function(){this._leafletMap.zoomIn()},n.prototype.zoomMinus=function(){this._leafletMap.zoomOut()},n.prototype.zoomToDefault=function(){this._leafletMap.flyTo({lat:this.defaultLat(),lng:this.defaultLong()},this.defaultZoom(),{animate:!1})},n.prototype.zoomToFit=function(){var t;"AlbersPR"===this.mapType()?t=this._albersLayer.getBounds():this.layers().filter((function(t){return t.hasBounds()})).forEach((function(e){t?t.extend(e.getBounds()):t=e.getBounds()})),t&&t.isValid()?this._leafletMap.fitBounds(t,{maxZoom:14}):this.zoomToDefault()},n.prototype.syncLayers=function(t,e,n){var i=this,o=c([],t,!0),r=[],a=[];this._leafletMap.eachLayer((function(t){var e=o.indexOf(t.__hpcc_layer);e>=0?(r.push(t.__hpcc_layer),o.splice(e,1)):t.__hpcc_layer&&a.push(t.__hpcc_layer)})),o.forEach((function(t){t.layerEnter(i._leafletMap),t.layerUpdate(i._leafletMap)})),r.forEach((function(t){t.layerUpdate(i._leafletMap)})),a.forEach((function(t){t.layerExit(i._leafletMap)}))},n.prototype.isLayer=function(){return void 0!==this._owner&&this._owner!==this},n.prototype.baseLayer=function(){switch(this.mapType()){case"AlbersPR":this.map(this._albersLayer);break;case"MapBox":this.map(this._mapBoxLayer);break;case"OpenStreet":this.map(this._openStreetLayer);break;case"Google":this.map(this._gmapLayer);break;default:this.map(this._blankLayer)}return this.map()},n.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),n.style("position","relative"),this._leafletElement=n.append("div").style("position","absolute").style("width","".concat(this.width(),"px")).style("height","".concat(this.height(),"px")),this._iconBar.target(e)},n.prototype.update=function(e,n){var i=this;t.prototype.update.call(this,e,n),this._leafletElement.style("width","".concat(this.width(),"px")).style("height","".concat(this.height(),"px"));var o=this.baseLayer();this._prevCRS!==o.crs()&&(this._prevCRS=o.crs(),this._leafletMap&&(this.syncLayers([],e,n),this._leafletMap.remove(),this._leafletElement.html("")),this._leafletMap=new Er.exports.Map(this._leafletElement.node(),{trackResize:!1,zoomControl:!1,zoomSnap:"AlbersPR"===this.mapType()?.1:1,crs:o.crs(),maxZoom:o.getMaxZoom?o.getMaxZoom():18}),this._leafletMap.setView([this.defaultLat(),this.defaultLong()],this.defaultZoom()),this._leafletMap.attributionControl.setPrefix(o.attribution()),this._leafletMap.on("zoomend",(function(t){return i.layers().forEach((function(e){return e.zoomEnd(t)}))})),this._leafletMap.on("moveend",(function(t){return i.layers().forEach((function(e){return e.moveEnd(t)}))})),this._leafletMap.on("viewreset",(function(t){return i.layers().forEach((function(e){return e.viewReset(t)}))})),this._renderCount=0),this.syncLayers(c([o],this.layers(),!0),e,n),this._leafletMap.invalidateSize(),this.autoZoomToFit()&&this._leafletMap.whenReady((function(){this.zoomToFit()}),this),this._iconBar.visible(this.showToolbar()).render((function(t){var e=t.getBBox();t.element().style("z-index",5e3).style("left","".concat(i.width()-e.width-4,"px"))}))},n.prototype.exit=function(e,n){this._iconBar.target(null),t.prototype.exit.call(this,e,n)},n.prototype.render=function(e){var n=this,i=c([this.baseLayer().init()],this.layers().map((function(t){return t.init()})),!0);return Promise.all(i).then((function(){t.prototype.render.call(n,e)})),this},n}(e.HTMLWidget);Rr.prototype._class+=" map_Leaflet",Rr.prototype.publish("showToolbar",!0,"boolean","Show toolbar",void 0,{hidden:function(t){return t.isLayer()}}),Rr.prototype.publish("mapType","Google","set","Base Layer Type",["None","AlbersPR","MapBox","OpenStreet","Google"],{hidden:function(t){return t.isLayer()}}),Rr.prototype.publish("map",null,"widget","Base Layer",void 0,{internal:!0}),Rr.prototype.publish("layers",[],"propertyArray","Layers",void 0,{hidden:function(t){return t.isLayer()}}),Rr.prototype.publish("defaultLat",42.877742,"number","Center Latitude",void 0,{hidden:function(t){return t.isLayer()}}),Rr.prototype.publish("defaultLong",-97.380979,"number","Center Longitude",void 0,{hidden:function(t){return t.isLayer()}}),Rr.prototype.publish("defaultZoom",4,"number","Zoom Level",void 0,{hidden:function(t){return t.isLayer()}}),Rr.prototype.publish("autoZoomToFit",!0,"boolean","Auto zoom to fit Data",void 0,{hidden:function(t){return t.isLayer()}});var jr=function(t){function n(n){void 0===n&&(n=!1);var i=t.call(this)||this;return i._layer=n?new Er.exports.MarkerClusterGroup:new Er.exports.FeatureGroup,i._layer.__hpcc_layer=i,e.Utility.SimpleSelectionMixin.call(i),i.layers([i]),i}return h(n,t),n.prototype.owner=function(t){this._owner=t},n.prototype.valid=function(){return!0},n.prototype.clear=function(){this._layer.clearLayers()},n.prototype.add=function(t){this._layer.addLayer(t)},n.prototype.maxZoom=function(){return this._owner._leafletMap.getMaxZoom()||24},n.prototype.zoom=function(){return this._owner._leafletMap.getZoom()},n.prototype.visibleBounds=function(){return this._owner._leafletMap.getBounds()},n.prototype.init=function(){return this._initPromise||(this._initPromise=Promise.resolve()),this._initPromise},n.prototype.hasBounds=function(){return!1},n.prototype.getBounds=function(){return this._layer.getBounds()},n.prototype.style=function(t,n){return void 0===n?e.select(this._layer.getPane()).style(t):(e.select(this._layer.getPane()).style(t,n),this)},n.prototype.propValue=function(t,e,n){return(t<0?n:e[t])||n},n.prototype.layerEnter=function(t){t.addLayer(this._layer);var n=e.select(t.getContainer()).select(".leaflet-pane.leaflet-marker-pane");this._selection.widgetElement(n)},n.prototype.layerUpdate=function(t){},n.prototype.layerExit=function(t){this._layer.clearLayers(),t.removeLayer(this._layer)},n.prototype.zoomEnd=function(t){},n.prototype.moveEnd=function(t){},n.prototype.viewReset=function(t){},n}(Rr);jr.prototype._class+=" map_FeatureLayer",jr.prototype.mixin(e.Utility.SimpleSelectionMixin),jr.prototype.publishReset(["layers"]);var Gr=function(t){function e(e){return void 0===e&&(e=!0),t.call(this,e)||this}return h(e,t),e}(jr);Gr.prototype._class+=" map_ClusterLayer";var Ur=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._lfd3=(new Er.exports.D3SvgOverlay).drawCallback((function(t,n){return e.layerUpdate(void 0,n)})),e}return h(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.getBounds=function(){return this._lfd3.getBounds()},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e),this.add(this._lfd3)},e.prototype.layerUpdate=function(e,n){t.prototype.layerUpdate.call(this,e)},e.prototype.clickHandler=function(t,e){},e}(jr),Hr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.layerUpdate=function(e){var n=this;t.prototype.layerUpdate.call(this,e);var i=this.columns(),o=i.indexOf(this.latitudeColumn()),r=i.indexOf(this.longitudeColumn()),a=i.indexOf(this.strokeColorColumn()),s=i.indexOf(this.fillColorColumn());this.clear(),this.data().filter((function(t){return!n.omitNullLatLong()||!!t[o]&&!!t[r]})).forEach((function(t){n.add(new Er.exports.Circle([t[o],t[r]],{color:n.propValue(a,t,n.strokeColor()),fill:!0,fillColor:n.propValue(s,t,n.fillColor()),fillOpacity:n.fillOpacity(),radius:n.radius(),origRow:t}).on("click",(function(e){return n.clickHandler(e,t)})))}))},e.prototype.clickHandler=function(t,e){},e}(Gr);Hr.prototype._class+=" map_Circles",Hr.prototype.publish("latitudeColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),Hr.prototype.publish("longitudeColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),Hr.prototype.publish("radius",50,"number","Radius (meters)"),Hr.prototype.publish("strokeColor","#376cea","html-color","Stroke Color",null,{optional:!0}),Hr.prototype.publish("strokeColorColumn",null,"set","Stroke color column",(function(){return this.columns()}),{optional:!0}),Hr.prototype.publish("fillColor","#376cea","html-color","Fill Color",null,{optional:!0}),Hr.prototype.publish("fillColorColumn",null,"set","Fill color column",(function(){return this.columns()}),{optional:!0}),Hr.prototype.publish("fillOpacity",.5,"number","Opacity",null,{tags:["Advanced"]}),Hr.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});var Fr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.layerUpdate=function(e,n){var i=this;t.prototype.layerUpdate.call(this,e,n);var o=this._lfd3._rootGroup;n=n||this._lfd3.projection;var r=this.columns(),a=r.indexOf(this.latitudeColumn()),s=r.indexOf(this.longitudeColumn()),l=r.indexOf(this.strokeColorColumn()),h=r.indexOf(this.fillColorColumn());function u(t){return{lat:+t[a],lng:+t[s]}}var c=o.selectAll("circle").data(this.data().filter((function(t){return!i.omitNullLatLong()||!!t[a]&&!!t[s]})));c.enter().append("circle").merge(c).attr("cx",(function(t){return n.latLngToLayerPoint(u(t)).x})).attr("cy",(function(t){return n.latLngToLayerPoint(u(t)).y})).attr("r",Math.max(3/n.scale,this.radius()/n.metresPerPixel)).style("fill-opacity",this.fillOpacity()).style("stroke",(function(t){return i.propValue(l,t,i.strokeColor())})).attr("stroke-width",Math.max(1/n.scale,1/n.metresPerPixel)).style("fill",(function(t){return i.propValue(h,t,i.fillColor())})),c.exit().remove()},e.prototype.clickHandler=function(t,e){},e}(Ur);Fr.prototype._class+=" map_D3Circles",Fr.prototype.publish("latitudeColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),Fr.prototype.publish("longitudeColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),Fr.prototype.publish("radius",50,"number","Radius (meters)"),Fr.prototype.publish("strokeColor","#376cea","html-color","Stroke Color",null,{optional:!0}),Fr.prototype.publish("strokeColorColumn",null,"set","Stroke color column",(function(){return this.columns()}),{optional:!0}),Fr.prototype.publish("fillColor","#376cea","html-color","Fill Color",null,{optional:!0}),Fr.prototype.publish("fillColorColumn",null,"set","Fill color column",(function(){return this.columns()}),{optional:!0}),Fr.prototype.publish("fillOpacity",.5,"number","Opacity",null,{tags:["Advanced"]}),Fr.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});yo(".cluster-circle{background-clip:padding-box;font:12px Helvetica Neue,Arial,Helvetica,sans-serif}.cluster-circle>div{border-radius:20px;height:40px;text-align:center;width:40px}.cluster-circle>div>div{border-radius:15px;display:inline-block;font:12px Helvetica Neue,Arial,Helvetica,sans-serif;height:30px;margin-top:5px;text-align:center;width:30px}.cluster-circle span{line-height:30px}");var Wr=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return h(n,t),n.prototype.createIcon=function(t,n,i){var o=e.hsl(n);return o.opacity=.5,new Er.exports.DivIcon({className:"cluster-circle",iconSize:new Er.exports.Point(40,40),html:"<div style='opacity:".concat(this.opacity(),";background-color:").concat(o.toString(),"'><div style='background-color:").concat(n,"'><span style='color:").concat(e.Palette.textColor(n),"'>").concat(i(t),"</span></div></div>")})},n.prototype.layerUpdate=function(n){var i=this;t.prototype.layerUpdate.call(this,n),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id()));var o=this.cellFunc(this.latitudeColumn(),0),r=this.cellFunc(this.longitudeColumn(),0),a=this.cellFunc(this.weightColumn(),0),s=this.data(),l=e.extent(s,a),h=this.weightFormat()?e.format(this.weightFormat()):function(t){return t};this.clear(),s.forEach((function(t){var e=new Er.exports.Marker(function(t){return[+o(t),+r(t)]}(t),{icon:i.createIcon(a(t),i._palette(a(t),l[0],l[1]),h),origRow:t}).on("click",(function(e){return i.clickHandler(e,t)}));e.bindTooltip("Weight: "+a(t)),i.add(e)}))},n.prototype.clickHandler=function(t,e){},n}(jr);Wr.prototype._class+=" map_ClusterCircles",Wr.prototype._palette=e.Palette.rainbow("default"),Wr.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Wr.prototype._palette.switch()),Wr.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette"),Wr.prototype.publish("latitudeColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),Wr.prototype.publish("longitudeColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),Wr.prototype.publish("weightColumn",null,"set","Weight column",(function(){return this.columns()}),{optional:!0}),Wr.prototype.publish("weightFormat",".2s","string","Number format for weight"),Wr.prototype.publish("opacity",.66,"number","Opacity",null,{tags:["Advanced"]});var Vr=function(t){function e(e,n){return t.call(this,e,u(u({},n),{onEachFeature:function(t,e){n.onEachFeature&&n.onEachFeature(t,e),function(t,e){var n=e.getLatLngs();n.forEach((function(t){t.forEach((function(t){if(Array.isArray(t)){var e=165,n=0,i=0,o=0,r=0;t.forEach((function(t){t.lat>-62&&(t.lng>e?++r:t.lng<-165&&++o,t.lng>0?++i:t.lng<0&&++n)})),o>0&&r>0&&t.forEach((function(t){t.lng>e&&n>i?t.lng-=360:t.lng<-165&&i>n&&(t.lng+=360)}))}}))})),e.setLatLngs(n)}(0,e)}}))||this}return h(e,t),e.prototype.addData=function(e){var n,i;if("Topology"===e.type){for(i in e.objects)e.objects.hasOwnProperty(i)&&(n=Mo(e,e.objects[i]),t.prototype.addData.call(this,n));return this}return t.prototype.addData.call(this,e),this},e}(Er.exports.GeoJSON),qr=null,Yr=null,Kr=null,Xr=null;!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}h(e,t),e.prototype.initStates=function(){return this._initPromise||(this._initPromise=new Promise((function(t,e){qr&&t(),No("".concat(Do(),"/us-states.json"),(function(e){for(var n in Kr=Mo((qr=e).topology,qr.topology.objects.states).features,Xr={},Kr)Kr[n].id&&(Xr[qr.stateNames[Kr[n].id].code]=Kr[n]);t()}))}))),this._initPromise},e.prototype.initCounties=function(){return this._initPromise||(this._initPromise=new Promise((function(t,e){Yr&&t(),No("".concat(Do(),"/us-counties.json"),(function(e){for(var n in Kr=Mo((Yr=e).topology,Yr.topology.objects.counties).features,Xr={},Kr)Kr[n].id&&(Xr[Kr[n].id]=Kr[n]);t()}))}))),this._initPromise},e.prototype.init=function(){return this.initCounties()},e.prototype.layerEnter=function(e){t.prototype.layerEnter.call(this,e);var n=new Vr(Kr,{style:function(t){return{color:"#000",opacity:1,weight:1,fillColor:"#35495d",fillOpacity:.2}}});this.add(n)}}(jr);yo(".leaflet-interactive.selected{stroke:red;stroke-width:1.25px}");var Jr=function(t){function n(){var n=t.call(this)||this;return n._dataMap={},n._dataMinWeight=null,n._dataMaxWeight=null,e.Utility.SimpleSelectionMixin.call(n),n}return h(n,t),n.prototype.hasBounds=function(){return!0},n.prototype.getBounds=function(){var e=t.prototype.getBounds.call(this);return e.isValid()?new Er.exports.LatLngBounds([e.getNorth(),e.getWest()],[e.getSouth(),e.getEast()]):new Er.exports.LatLngBounds([90,-180],[-90,180])},n.prototype.updateDataMap=function(t){this._dataMap={},this._dataMinWeight=null,this._dataMaxWeight=null;var e=this;t.forEach((function(t){e._dataMap[t[0]]=t,(!e._dataMinWeight||t[1]<e._dataMinWeight)&&(e._dataMinWeight=t[1]),(!e._dataMaxWeight||t[1]>e._dataMaxWeight)&&(e._dataMaxWeight=t[1])}))},n.prototype.data=function(e){var n=t.prototype.data.apply(this,arguments);return arguments.length&&this.updateDataMap(e),n},n.prototype.styleFeature=function(t){var e=this._dataMap[t.properties.hpccID],n=e?this._palette(e[1],this._dataMinWeight,this._dataMaxWeight):"transparent";return{color:this.meshVisible()?this.meshColor():void 0,opacity:1,weight:this.meshStrokeWidth(),fillColor:n,fillOpacity:this.opacity()}},n.prototype.svgGlowID=function(){return this.id()+"_svgGlow"},n.prototype.layerEnter=function(n){if(t.prototype.layerEnter.call(this,n),!this._svgElement){this._svgElement=e.select(n.getContainer()).select(".leaflet-pane.leaflet-overlay-pane > svg");var i=this._svgElement.append("defs");new e.SVGGlowFilter(i,this.svgGlowID()),this._selection.widgetElement(this._svgElement)}},n.prototype.layerUpdate=function(e){var n=this;this._prevFeatures!==this._features&&(this.clear(),this._topoJson=new Vr(this._features,{onEachFeature:function(t,e){e.on("click",(function(t){return n.clickHandler(t,e,e.feature.properties.hpccID)}))}}).bindTooltip((function(t){return n.tooltipHandler(t,t.feature.properties.hpccID)}),{direction:"top",sticky:!0}),this.add(this._topoJson)),t.prototype.layerUpdate.call(this,e),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this._topoJson.setStyle((function(t){return n.styleFeature(t)}))},n.prototype.clickHandler=function(t,e,n){var i=this._selection.click(t.originalEvent.target);return this.click(this.rowToObj(this._dataMap[n]),this.columns()[0],i),i},n.prototype.tooltipText=function(t,e){return e},n.prototype.tooltipHandler=function(t,e){var n=this._dataMap[e],i=n&&n[1]||"";return this.tooltipText(this.rowToObj(n),"<b>".concat(e,"</b>: ").concat(i))},n.prototype.click=function(t,e,n){},n}(jr);Jr.prototype._class+=" map_World",Jr.prototype._palette=e.Palette.rainbow("default"),Jr.prototype.mixin(e.Utility.SimpleSelectionMixin),Jr.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",Jr.prototype._palette.switch(),{tags:["Basic","Shared"]}),Jr.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),Jr.prototype.publish("opacity",.5,"number","Opacity",null,{tags:["Advanced"]}),Jr.prototype.publish("meshVisible",!0,"boolean","Mesh Visibility"),Jr.prototype.publish("meshColor","black","html-color","Stroke Color"),Jr.prototype.publish("meshStrokeWidth",.25,"number","Stroke Width"),Jr.prototype.publish("internalOnly",!1,"boolean","Internal mesh only");var Qr=null,$r=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.init=function(){var t=this;return this._initPromise||(this._initPromise=new Promise((function(t,e){Qr&&t(Qr),No("".concat(Do(),"/countries.json"),(function(e){t(Qr=e)}))})).then((function(e){var n;for(var i in t._features=Mo(e.topology,e.topology.objects.countries).features,t._features)if(t._features[i].id){var o=t._features[i].id,r=null===(n=e.countryNames[o])||void 0===n?void 0:n.name;t._features[i].properties.hpccID=r}}))),this._initPromise},e.prototype.tooltipHandler=function(t,e){var n=this._dataMap[e],i=n&&n[1]||"";return this.tooltipText(this.rowToObj(n),"<b>".concat(e,"</b>: ").concat(i))},e}(Jr);function ta(t,e){var n=t.indexOf(e);n>=0&&t.splice(n,1)}var ea=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._polylines=[],e._polygons=[],e._rectangles=[],e._circles=[],e}return h(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.drawOptions=function(){var t={marker:!1,circlemarker:!1};return this.enableCircle()||(t.circle=!1),this.enablePolyline()||(t.polyline=!1),this.enableRectangle()||(t.rectangle=!1),this.enablePolygon()||(t.polygon=!1),t},e.prototype.save=function(){return{polylines:this._polylines.map((function(t){return t.getLatLngs()})),polygons:this._polygons.map((function(t){return t.getLatLngs()})),rectangles:this._rectangles.map((function(t){return t.getBounds()})),circles:this._circles.map((function(t){return{center:t.getLatLng(),radius:t.getRadius()}}))}},e.prototype.restore=function(t){var e=this;this.clear(),this._polylines=(t.polylines||[]).map((function(t){return new Er.exports.Polyline(t)})),this._polygons=(t.polygons||[]).map((function(t){return new Er.exports.Polygon(t)})),this._rectangles=(t.rectangles||[]).map((function(t){return new Er.exports.Rectangle(t)})),this._circles=(t.circles||[]).map((function(t){return new Er.exports.Circle(t.center,{radius:t.radius})})),this._polylines.forEach((function(t){return e.add(t)})),this._polygons.forEach((function(t){return e.add(t)})),this._rectangles.forEach((function(t){return e.add(t)})),this._circles.forEach((function(t){return e.add(t)}))},e.prototype.layerEnter=function(e){var n=this;t.prototype.layerEnter.call(this,e),e.on(Er.exports.Draw.Event.CREATED,(function(t){var e=t.layerType,i=t.layer;switch(e){case"polyline":n._polylines.push(i);break;case"polygon":n._polygons.push(i);break;case"rectangle":n._rectangles.push(i);break;case"circle":n._circles.push(i);break;default:alert(e)}n.add(i),n.changed("ADD",i)})),e.on(Er.exports.Draw.Event.EDITED,(function(t){t.layers.eachLayer((function(t){n.changed("UPDATE",t)}))})),e.on(Er.exports.Draw.Event.DELETED,(function(t){t.layers.eachLayer((function(t){ta(n._polylines,t),ta(n._polygons,t),ta(n._rectangles,t),ta(n._circles,t),n.changed("DELETE",t)}))}))},e.prototype.layerUpdate=function(e){t.prototype.layerUpdate.call(this,e),this.style("opacity",this.opacity());var n=this.drawOptions(),i=o.hashSum(n);this._drawOptionsHash!==i&&(this._drawOptionsHash=i,this._drawControl&&e.removeControl(this._drawControl),this._drawControl=new Er.exports.Control.Draw({position:"topleft",draw:n,edit:{featureGroup:this._layer}}),e.addControl(this._drawControl))},e.prototype.layerExit=function(e){t.prototype.layerExit.call(this,e)},e.prototype.changed=function(t,e){},e}(jr);ea.prototype._class+=" map_DrawLayer",ea.prototype.publish("opacity",1,"number","Layer Opacity"),ea.prototype.publish("enablePolyline",!0,"boolean","Enable Polyline Creation"),ea.prototype.publish("enablePolygon",!0,"boolean","Enable Polygon Creation"),ea.prototype.publish("enableRectangle",!0,"boolean","Enable Rectangle Creation"),ea.prototype.publish("enableCircle",!0,"boolean","Enable Circle Creation");var na=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.layerUpdate=function(e){var n=this;t.prototype.layerUpdate.call(this,e),this.style("opacity",this.opacity());var i,o=this.columns(),r=this.latitudeColumn_exists()?o.indexOf(this.latitudeColumn()):0,a=this.longitudeColumn_exists()?o.indexOf(this.longitudeColumn()):1,s=o.indexOf(this.weightColumn());this.clear();var l=this.data().filter((function(t){return!n.omitNullLatLong()||!!t[r]&&!!t[a]})).map((function(t){return i?i.extend([t[r],t[a]]):i=new Er.exports.LatLngBounds([t[r],t[a]]),[t[r],t[a],n.weightColumn_exists()?t[s]:.5]})),h=new Er.exports.HeatLayer(l,{minOpacity:this.minOpacity(),max:this.max(),radius:this.radius(),blur:this.blur(),gradient:this.gradient()});h.getBounds=function(){return i},this.add(h)},e}(jr);na.prototype._class+=" map_Heat",na.prototype.publish("latitudeColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),na.prototype.publish("longitudeColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),na.prototype.publish("weightColumn",null,"set","Optional normalized intensity (0 -> 1) ",(function(){return this.columns()}),{optional:!0}),na.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from IconsData",null,{tags:["Basic"]}),na.prototype.publish("opacity",.5,"number","Layer Opacity"),na.prototype.publish("minOpacity",.5,"number","The minimum opacity the heat will start at",null,{tags:["Basic"]}),na.prototype.publish("max",1,"number","maximum point intensity, 1.0 by default",null,{tags:["Basic"]}),na.prototype.publish("radius",25,"number","radius of each point of the heatmap, 25 by default",null,{tags:["Basic"]}),na.prototype.publish("blur",15,"number","amount of blur, 15 by default",null,{tags:["Basic"]}),na.prototype.publish("gradient",null,"object","color gradient config",null,{tags:["Basic"],optional:!0});var ia=function(t){function e(e){return void 0===e&&(e=!1),t.call(this,e)||this}return h(e,t),e.prototype.hasBounds=function(){return!0},e.prototype.tooltipText=function(t,e){return""+e},e.prototype.popupText=function(t,e){return""+e},e.prototype.layerUpdate=function(e,n){var i=this;if(t.prototype.layerUpdate.call(this,e),n){var o=this.columns(),r=o.indexOf(this.latitudeColumn()),a=o.indexOf(this.longitudeColumn()),s=o.indexOf(this.tooltipColumn()),l=o.indexOf(this.popupColumn()),h=this._db.checksum(),u=this.hashSum([],{dbChecksum:h});this._hashSum!==u&&(this._hashSum=u,this.clear(),this.data().filter((function(t){return!i.omitNullLatLong()||!!t[r]&&!!t[a]})).forEach((function(t){var e=new Er.exports.Marker([t[r],t[a]],n(t)).on("click",(function(n){return i.clickHandler(n,e,t)})),o=i.tooltipText(i.rowToObj(t),i.propValue(s,t,""));o&&e.bindTooltip(o,{direction:i.tooltipDirection(),offset:Er.exports.point(i.tooltipOffsetX(),i.tooltipOffsetY())});var h=i.popupText(i.rowToObj(t),i.propValue(l,t,""));h&&e.bindPopup(h,{offset:Er.exports.point(i.popupOffsetX(),i.popupOffsetY())}),i.add(e)})))}},e.prototype.clickHandler=function(t,e,n){var i=this._selection.click(e._icon);this._currSelRow=i?n:void 0,this.click(this.rowToObj(n),"",i)},e.prototype.click=function(t,e,n){},e}(Gr);ia.prototype._class+=" map_Markers",ia.prototype.publish("latitudeColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),ia.prototype.publish("longitudeColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),ia.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from IconsData",null,{tags:["Basic"]}),ia.prototype.publish("tooltipColumn",null,"set","Tooltip column",(function(){return this.columns()}),{optional:!0}),ia.prototype.publish("tooltipDirection","auto","set","Tooltip direction",["auto","left","top","right","bottom","center"]),ia.prototype.publish("tooltipOffsetX",0,"number","Tooltip offset X"),ia.prototype.publish("tooltipOffsetY",0,"number","Tooltip offset Y"),ia.prototype.publish("popupColumn",null,"set","Popup column",(function(){return this.columns()}),{optional:!0}),ia.prototype.publish("popupOffsetX",0,"number","Tooltip offset X"),ia.prototype.publish("popupOffsetY",0,"number","Tooltip offset Y");var oa=function(t){function e(e){return void 0===e&&(e=!1),t.call(this,e)||this}return h(e,t),e.prototype.layerUpdate=function(e){var n=this,i=this.columns().indexOf(this.iconUrlColumn());t.prototype.layerUpdate.call(this,e,(function(t){return{icon:new Er.exports.Icon({iconUrl:n.propValue(i,t,n.iconUrl()),iconSize:[n.iconWidth(),n.iconHeight()],iconAnchor:[n.iconAnchorX(),n.iconAnchorY()],props:{owner:n,row:t}}),draggable:!1}}))},e}(ia);oa.prototype._class+=" map_Icons",oa.prototype.publish("iconUrl","","string","Icon URL",null),oa.prototype.publish("iconUrlColumn",null,"set","Icon URL column",(function(){return this.columns()}),{optional:!0}),oa.prototype.publish("iconWidth",32,"number","Icon width"),oa.prototype.publish("iconHeight",32,"number","Icon height"),oa.prototype.publish("iconAnchorX",16,"number","Icon Anchor X"),oa.prototype.publish("iconAnchorY",32,"number","Icon Anchor Y");var ra=function(t){function e(){return t.call(this,!0)||this}return h(e,t),e}(oa);function aa(t){return[t[1],t[0]]}ra.prototype._class+=" map_ClusterIcons";var sa=function(t,e){return e[0]<-90?t[0]++:e[0]>90&&t[1]++,t},la=function(t){return t>90?t-360:t},ha=function(t){return t<-90?t+360:t},ua=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return h(n,t),n.prototype.fixDateLine=function(t){var e,n=t.reduce(sa,[0,0]),i=n[0],o=n[1];return i&&o?t.map((e=i>o?la:ha,function(t){return[e(t[0]),t[1]]})):t},n.prototype.hasBounds=function(){return!0},n.prototype.updateHexagons=function(){var t=this;this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id()));var n=this.cellFunc(this.polygonColumn(),[]),i=this.cellFunc(this.weightColumn(),0),o=this.data(),r=e.extent(o,i);this.clear(),o.forEach((function(e){t.add(new Er.exports.Polygon(t.fixDateLine(n(e)).map(aa),{color:t._palette(r[1],r[0],r[1]),fillColor:t._palette(i(e),r[0],r[1]),fillOpacity:t.opacity(),weight:1,origRow:e}).on("click",(function(n){return t.clickHandler(n,e)})))}))},n.prototype.layerUpdate=function(e){t.prototype.layerUpdate.call(this,e),this.updateHexagons()},n.prototype.zoomEnd=function(e){t.prototype.zoomEnd.call(this,e)},n.prototype.moveEnd=function(e){t.prototype.moveEnd.call(this,e),this.updateHexagons()},n.prototype.clickHandler=function(t,e){},n}(jr);ua.prototype._class+=" map_Polygons",ua.prototype._palette=e.Palette.rainbow("default"),ua.prototype.publish("paletteID","YlOrRd","set","Color palette for this widget",ua.prototype._palette.switch(),{tags:["Basic","Shared"]}),ua.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),ua.prototype.publish("polygonColumn",null,"set","Polygon column",(function(){return this.columns()}),{optional:!0}),ua.prototype.publish("weightColumn",null,"set","Weight column",(function(){return this.columns()}),{optional:!0}),ua.prototype.publish("opacity",.5,"number","Opacity",null,{tags:["Advanced"]});var ca=2048/Math.PI,pa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.lineData=function(){var t,e=this.columns(),n=e.indexOf(this.latitudeColumn()),i=e.indexOf(this.longitudeColumn()),o=[];return this.data().forEach((function(e){var r=[e[i],e[n]];t&&o.push({type:"LineString",coordinates:[r,t]}),t=r})),o},e.prototype.isNull=function(t){return!t[0]&&!t[1]},e.prototype.isNull2=function(t){return!!this.omitNullLatLong()&&(this.isNull(t[0])||this.isNull(t[1]))},e.prototype.layerUpdate=function(e,n){var i=this;t.prototype.layerUpdate.call(this,e,n);var o=this._lfd3._rootGroup;n=n||this._lfd3.projection,this._lfd3.svg().selectAll("defs").data([void 0]).enter().append("defs").append("marker").attr("class","marker").attr("id",this._id+"_arrowHead").attr("viewBox","0 0 10 10").attr("refX",10).attr("refY",5).attr("markerWidth",12).attr("markerHeight",12).attr("markerUnits","strokeWidth").attr("orient","auto").append("polyline").attr("points","0,0 10,5 0,10 1,5"),this._lfd3.svg().select("defs > marker").style("fill",this.strokeColor()).style("stroke",null);var r=n.latLngToLayerPoint({lat:0,lng:0}),a=go("Mercator").scale(ca).translate([r.x,r.y]),s=_i().projection(a),l=o.selectAll(".dataEdge").data(this.lineData().filter((function(t){return!i.isNull2(t.coordinates)})));l.enter().append("path").attr("class","dataEdge").attr("marker-end","url(#"+this._id+"_arrowHead)").merge(l).attr("d",s).style("stroke",this.strokeColor()).style("fill","none").attr("stroke-width",1/n.scale),l.exit().remove()},e.prototype.clickHandler=function(t,e){},e}(Ur);pa.prototype._class+=" map_Path",pa.prototype.publish("latitudeColumn",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),pa.prototype.publish("longitudeColumn",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0}),pa.prototype.publish("strokeColor"," #666666","html-color","Stroke Color",null,{optional:!0}),pa.prototype.publish("omitNullLatLong",!0,"boolean","Remove lat=0,lng=0 from pinsData",null,{tags:["Basic"]});var da=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.lineData=function(){var t=this.columns(),e=t.indexOf(this.latitudeColumn()),n=t.indexOf(this.longitudeColumn()),i=t.indexOf(this.latitude2Column()),o=t.indexOf(this.longitude2Column()),r=[];return this.data().forEach((function(t){var a=[t[n],t[e]],s=[t[o],t[i]];r.push({type:"LineString",coordinates:[a,s]})})),r},e}(pa);da.prototype._class+=" map_Lines",da.prototype.publish("latitude2Column",null,"set","Latitude column",(function(){return this.columns()}),{optional:!0}),da.prototype.publish("longitude2Column",null,"set","Longitude column",(function(){return this.columns()}),{optional:!0});var fa=function(t){function e(e){return void 0===e&&(e=!1),t.call(this,e)||this}return h(e,t),e.prototype.layerUpdate=function(e){var n=this,i=this.columns(),o=i.indexOf(this.faCharColumn()),r=i.indexOf(this.faCharColorColumn()),a=i.indexOf(this.strokeColorColumn()),s=i.indexOf(this.fillColorColumn());t.prototype.layerUpdate.call(this,e,(function(t){return{icon:Er.exports.BeautifyIcon({iconShape:"marker",icon:n.propValue(o,t,n.faChar()),textColor:n.propValue(r,t,n.faCharColor()),borderColor:n.propValue(a,t,n.strokeColor()),backgroundColor:n.propValue(s,t,n.fillColor()),props:{owner:n,row:t}}),draggable:!1}}))},e}(ia);fa.prototype._class+=" map_Pins",fa.prototype.publish("faChar","fa-circle","string","Default font awesome character"),fa.prototype.publish("faCharColumn",null,"set","Font awesome column",(function(){return this.columns()}),{optional:!0}),fa.prototype.publish("faCharColor","#ffffff","html-color","Default font awesome Color"),fa.prototype.publish("faCharColorColumn",null,"set","Font awesome color column",(function(){return this.columns()}),{optional:!0}),fa.prototype.publish("strokeColor","transparent","html-color","Default stroke Color",null,{optional:!0}),fa.prototype.publish("strokeColorColumn",null,"set","Stroke color column",(function(){return this.columns()}),{optional:!0}),fa.prototype.publish("fillColor","#376cea","html-color","Default fill Color",null,{optional:!0}),fa.prototype.publish("fillColorColumn",null,"set","Fill color column",(function(){return this.columns()}),{optional:!0});var _a=function(t){function e(){return t.call(this,!0)||this}return h(e,t),e}(fa);_a.prototype._class+=" map_ClusterPins";var ma={GB:["administrative_area_level_3","administrative_area_level_2","administrative_area_level_1"],IE:["administrative_area_level_2","administrative_area_level_1"],ND:["administrative_area_level_2","administrative_area_level_1"]},ga={};function ya(t){return ga[t]||(ga[t]={topology:void 0,nameIdx:{},codeIdx:{}}),ga[t]}var va=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.fetchTopo=function(t){return ya(t).topology?Promise.resolve(ya(t).topology):new Promise((function(e,n){No("".concat(Do(),"/").concat(t,".json"),(function(n){ya(t).topology=n,e(n)}))}))},e.prototype.fetchTopoIdx=function(t){for(var e in ya(t).nameIdx)return Promise.resolve(ya(t).nameIdx);return new Promise((function(e,n){No("".concat(Do(),"/").concat(t,"_idx.json"),(function(n){var i,o=ya(t),r=o.nameIdx,a=o.codeIdx;null===(i=ma[t])||void 0===i||i.forEach((function(t){var e=function(e){var i=n[t][e];Array.isArray(i)&&(r[e]||(r[e]={code:void 0,codes:[]}),r[e].codes=r[e].codes.concat(i),1===i.length&&(r[e].code=r[e].codes[0]),i.forEach((function(t){a[t]||(a[t]={name:void 0,score:9999,names:[]}),i.length<=a[t].score&&(a[t].name=e,a[t].score=i.length),a[t].names.push(e)})))};for(var i in n[t])e(i)})),e(r)}))}))},e.prototype.updateDataMap=function(e){var n=[],i=ya(this.region()).nameIdx;return e.forEach((function(t){var e,o=null===(e=i[t[0]])||void 0===e?void 0:e.codes;o?null==o||o.forEach((function(e){n.push([e,t[1],t])})):n.push([t[0],t[1],t])})),t.prototype.updateDataMap.call(this,n)},e.prototype.init=function(){var t=this,e=this.region();return this._initPromise&&this._prevRegion===e||(this._prevRegion=e,this._initPromise=Promise.all([this.fetchTopo(e),this.fetchTopoIdx(e)]).then((function(e){var n=e[0];for(var i in e[1],t._features=Mo(n,n.objects.PolbndA).features,t._features){var o=t._features[i].id||i;t._features[i].properties.hpccID=o}t.updateDataMap(t.data())}))),this._initPromise},e.prototype.tooltipHandler=function(t,e){var n,i=this._dataMap[e],o=ya(this.region()).codeIdx,r=i&&i[1]||"",a=null===(n=o[e])||void 0===n?void 0:n.names.map((function(t){var n;return(null===(n=o[e])||void 0===n?void 0:n.name)===t?"<u>".concat(t,"</u>"):t})).join(", ");return this.tooltipText(this.rowToObj(i),"<b>".concat(i&&i[2][0]||a||e,"</b>: ").concat(r))},e}(Jr);va.prototype._class+=" map_Region",va.prototype.publish("region","GB","set","Region Data",["AT","BE","BG","BR","CHLI","CY","CZ","DE","DK","EE","ES","FI","FR","GB","GE","GR","HR","HU","IE","IS","IT","KS","LT","LU","LV","MD","MK","MT","ND","NL","NO","PL","PT","RO","RS","SE","SI","SK","UA"]);var ba=function(t){function n(e){return void 0===e&&(e=!1),t.call(this,e)||this}return h(n,t),n.prototype.layerUpdate=function(n){var i=this,o=this.columns(),r=o.indexOf(this.textColumn()),a=o.indexOf(this.textColorColumn()),s=o.indexOf(this.strokeColorColumn()),l=o.indexOf(this.fillColorColumn());t.prototype.layerUpdate.call(this,n,(function(t){var n=i.propValue(r,t,i.text()),o=i.textSize(n,i.fontFamily(),i.fontSize());return i.textFormat_exists()&&(n=e.format(i.textFormat())(n)),{icon:Er.exports.BeautifyIcon({iconShape:"rectangle",iconAnchor:[o.width/2+i.textOffsetX(),o.height/2+i.textOffsetY()],html:'<span style="\n '.concat(i.fontFamily_exists()?"font-family:".concat(i.fontFamily(),";"):"","\n font-size:").concat(i.fontSize(),'px;\n pointer-events: none;\n white-space:nowrap;\n ">').concat(n,"</span>"),textColor:i.propValue(a,t,i.textColor()),borderColor:i.propValue(s,t,i.strokeColor()),backgroundColor:i.propValue(l,t,i.fillColor()),props:{owner:i,row:t}}),draggable:!1}}))},n}(ia);ba.prototype._class+=" map_Text",ba.prototype.publish("textOffsetX",0,"number","Horizontal offset of text"),ba.prototype.publish("textOffsetY",0,"number","Vertical offset of text"),ba.prototype.publish("text","","string","Default text"),ba.prototype.publish("textColumn",null,"set","Font awesome column",(function(){return this.columns()}),{optional:!0}),ba.prototype.publish("textColor","#ffffff","html-color","Default font awesome Color"),ba.prototype.publish("textColorColumn",null,"set","Text color column",(function(){return this.columns()}),{optional:!0}),ba.prototype.publish("textFontFamily",null,"set","Text color column",(function(){return this.columns()}),{optional:!0}),ba.prototype.publish("strokeColor","transparent","html-color","Default stroke Color",null,{optional:!0}),ba.prototype.publish("strokeColorColumn",null,"set","Stroke color column",(function(){return this.columns()}),{optional:!0}),ba.prototype.publish("fillColor","#376cea","html-color","Default fill Color",null,{optional:!0}),ba.prototype.publish("fillColorColumn",null,"set","Fill color column",(function(){return this.columns()}),{optional:!0}),ba.prototype.publish("fontFamily",null,"string","Font family",null,{optional:!0}),ba.prototype.publish("fontSize",16,"number","Font family",null,{optional:!0}),ba.prototype.publish("textFormat",null,"string","Format rules for text",null,{optional:!0});var La=function(t){function e(){return t.call(this)||this}return h(e,t),e.prototype.getBounds=function(){var e=t.prototype.getBounds.call(this);return new Er.exports.LatLngBounds([e.getNorth(),e.getWest()],[17.755278,-64.565])},e}(Jr),wa=null,xa={},ka=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.init=function(){var t=this;return this._initPromise||(this._initPromise=new Promise((function(t,e){wa&&t(wa),No("".concat(Do(),"/us-counties.json"),(function(e){t(wa=e)}))})).then((function(e){for(var n in t._features=Mo(e.topology,e.topology.objects.counties).features,t._features)if(t._features[n].id){var i=t._features[n].id,o=e.countyNames[i];t._features[n].properties.hpccID=i,xa[i]=o}}))),this._initPromise},e.prototype.tooltipHandler=function(t,e){var n=this._dataMap[e],i=n&&n[1]||"";return this.tooltipText(this.rowToObj(n),"<b>".concat(xa[e],"</b>: ").concat(i))},e}(La);ka.prototype._class+=" map_USCounties";var Ma=null,Ca={},Pa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.init=function(){var t=this;return this._initPromise||(this._initPromise=new Promise((function(t,e){Ma&&t(Ma),No("".concat(Do(),"/us-states.json"),(function(e){t(Ma=e)}))})).then((function(e){for(var n in t._features=Mo(e.topology,e.topology.objects.states).features,t._features)if(t._features[n].id){var i=e.stateNames[t._features[n].id],o=i.code,r=i.name;t._features[n].properties.hpccID=o,Ca[o]=r}}))),this._initPromise},e.prototype.tooltipHandler=function(t,e){var n=this._dataMap[e],i=n&&n[1]||"";return this.tooltipText(this.rowToObj(n),"<b>".concat(Ca[e],"</b>: ").concat(i))},e}(La);Pa.prototype._class+=" map_USStates";var Ea=Object.freeze({__proto__:null,Circles:Hr,D3Circles:Fr,ClusterCircles:Wr,Countries:$r,DrawLayer:ea,FeatureLayer:jr,ClusterLayer:Gr,D3SurfaceLayer:Ur,HeatLayer:na,Icons:oa,ClusterIcons:ra,Leaflet:Rr,Markers:ia,Polygons:ua,Path:pa,Lines:da,Pins:fa,ClusterPins:_a,Region:va,Text:ba,TileLayer:Tr,USCounties:ka,USStates:Pa,World:Jr});t.BUILD_VERSION="2.103.5",t.CanvasPinLayer=xo,t.CanvasPins=w,t.Choropleth=Ao,t.ChoroplethContinents=Uo,t.ChoroplethCounties=Vo,t.ChoroplethCountries=Go,t.ChoroplethStates=Xo,t.ChoroplethStatesHeat=Jo,t.GMap=sr,t.GMapCounties=ur,t.GMapGraph=cr,t.GMapHeat=pr,t.GMapLayered=hr,t.GMapPin=fr,t.GMapPinLine=mr,t.GeoHash=Qo,t.Graph=gr,t.Graticule=yr,t.Heat=vr,t.IChoropleth=br,t.Layer=wo,t.Layered=bo,t.Leaflet=Ea,t.Lines=_r,t.OpenStreet=Mr,t.PKG_NAME="@hpcc-js/map",t.PKG_VERSION="2.75.10",t.Pins=dr,t.TestHeatMap=Cr,t.TopoJSONChoropleth=Pr,t.projections=_o,t.requireGoogleMap=rr,t.requireGoogleMapTimeout=function(t){or=t},t.resolve=go,t.topoJsonFolder=Do,t.types=fo,Object.defineProperty(t,"__esModule",{value:!0})}));
22
22
  //# sourceMappingURL=index.min.js.map