ts-maps-vue
Version:
Vue components for ts-maps - Interactive Vector Maps
1 lines • 1.22 MB
JavaScript
(function(u,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],c):(u=typeof globalThis<"u"?globalThis:u||self,c(u["ts-maps-vue"]={},u.vue))})(this,(function(u,c){"use strict";var $l=Object.defineProperty;var Wl=(u,c,R)=>c in u?$l(u,c,{enumerable:!0,configurable:!0,writable:!0,value:R}):u[c]=R;var Z=(u,c,R)=>Wl(u,typeof c!="symbol"?c+"":c,R);const R=c.defineComponent({__name:"GoogleMap",props:{apiKey:{},center:{default:()=>({lat:0,lng:0})},zoom:{default:2},mapId:{default:""},options:{default:()=>({})},markers:{default:()=>[]}},emits:["mapLoaded","boundsChanged","markerClicked"],setup(t,{emit:e}){const l=t,a=e,n=c.ref(null),M=c.ref(null),i=c.ref([]);let s=null;function r(){i.value.forEach(p=>p.setMap(null)),i.value=[]}function h(){M.value&&(r(),l.markers.forEach((p,d)=>{const f=new window.google.maps.Marker({...p,map:M.value});f.addListener("click",()=>{a("markerClicked",f,d)}),i.value.push(f)}))}function o(){if(!n.value)return;const p={center:l.center,zoom:l.zoom,mapId:l.mapId,...l.options};M.value=new window.google.maps.Map(n.value,p),a("mapLoaded",M.value),M.value.addListener("bounds_changed",()=>{var d;a("boundsChanged",((d=M.value)==null?void 0:d.getBounds())??null)}),h()}function m(){var p;if((p=window.google)!=null&&p.maps){o();return}s=document.createElement("script"),s.src=`https://maps.googleapis.com/maps/api/js?key=${l.apiKey}`,s.async=!0,s.defer=!0,s.onload=o,document.head.appendChild(s)}return c.watch(()=>l.center,p=>{M.value&&p&&M.value.setCenter(p)}),c.watch(()=>l.zoom,p=>{M.value&&p&&M.value.setZoom(p)}),c.watch(()=>l.markers,()=>{M.value&&h()},{deep:!0}),c.onMounted(()=>{m()}),c.onUnmounted(()=>{r(),s&&s.parentNode&&s.parentNode.removeChild(s)}),(p,d)=>(c.openBlock(),c.createElementBlock("div",{ref_key:"mapContainer",ref:n,class:"google-map"},null,512))}}),K=(t,e)=>{const l=t.__vccOpts||t;for(const[a,n]of e)l[a]=n;return l},H=K(R,[["__scopeId","data-v-7f2f6c16"]]);var L=function(e,l,a={}){a.arrayMerge=a.arrayMerge||r0,a.isMergeableObject=a.isMergeableObject||Y,a.cloneUnlessOtherwiseSpecified=A;const n=Array.isArray(l),M=Array.isArray(e);return n===M?n?a.arrayMerge(e,l,a):c0(e,l,a):A(l,a)};function Y(t){return t0(t)&&!n0(t)}function t0(t){return!!t&&typeof t=="object"}function n0(t){const e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||Z0(t)||s0(t)}var M0=typeof Symbol=="function"&&Symbol.for,i0=M0?Symbol.for("react.element"):60103;function s0(t){return t.$$typeof===i0}function Z0(t){return t instanceof Node}function o0(t){return Array.isArray(t)?[]:{}}function A(t,e){const l=(e.isMergeableObject||Y)(t);return e.clone!==!1&&l?L(o0(t),t,e):t}function r0(t,e,l){return t.concat(e).map(a=>A(a,l))}function h0(t,e){if(!e.customMerge)return L;const l=e.customMerge(t);return typeof l=="function"?l:L}function m0(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e)):[]}function X(t){const e=m0(t);return[...Object.keys(t),...e]}function $(t,e){try{return e in t}catch{return!1}}function p0(t,e){return $(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function c0(t,e,l){const a={},n=l.isMergeableObject||Y;return n(t)&&X(t).forEach(M=>{a[M]=A(t[M],l)}),X(e).forEach(M=>{p0(t,M)||($(t,M)&&n(e[M])?a[M]=h0(M,l)(t[M],e[M],l):a[M]=A(e[M],l))}),a}var d0=L;function W(t){return typeof t=="object"&&typeof t.nodeType<"u"?t:typeof t=="string"?document.querySelector(t):null}function _(t,e,l,a=!1){const n=document.createElement(t);return l&&(n[a?"innerHTML":"textContent"]=l),e&&(n.className=e),n}function N(t){var e;(e=t.parentNode)==null||e.removeChild(t)}function u0(t){return/\.[jpe?g|ifn]$/i.test(t)}function f0(t){return t.replace(/\w([A-Z])/g,e=>`${e[0]}-${e[1]}`).toLowerCase()}function g(t,e,l=!1){return l?d0(t,e):Object.assign(t,e)}function x(t,e){return`${t.toLowerCase()}:to:${e.toLowerCase()}`}class S0{constructor(){Z(this,"_tooltip");Z(this,"shape")}dispose(){this._tooltip?N(this._tooltip):this.shape&&this.shape.remove();for(const e of Object.getOwnPropertyNames(this))this[e]=null}}var I=S0;class g0 extends I{constructor(l){super();Z(this,"_map");Z(this,"_tooltip");Z(this,"_hoveredRegion",null);Z(this,"_hoveredMarker",null);Z(this,"_customPositioning",!0);return this._map=l,this._tooltip=_("div","jvm-tooltip",""),this._tooltip.style.display="none",this._map.container.appendChild(this._tooltip),this}getElement(){return this._tooltip}show(l){this._tooltip.style.display="block",this._tooltip.innerHTML=l,this._tooltip.classList.add("active")}hide(){this._tooltip.style.display="none",this._tooltip.classList.remove("active"),this._hoveredRegion=null,this._hoveredMarker=null}text(l){this._tooltip&&(this._tooltip.innerHTML=l)}html(l){this._tooltip&&(this._tooltip.innerHTML=l)}css(l){if(this._customPositioning&&(l.top||l.left))return this;for(const a in l)this._tooltip.style[a]=l[a];return this}setHoveredRegion(l){this._hoveredRegion=l}getHoveredRegion(){return this._hoveredRegion}setHoveredMarker(l){this._hoveredMarker=l}getHoveredMarker(){return this._hoveredMarker}}var y0=g0;function _0(){let t,e,l,a;this._defaultWidth*this.scale<=this._width?(t=(this._width-this._defaultWidth*this.scale)/(2*this.scale),l=(this._width-this._defaultWidth*this.scale)/(2*this.scale)):(t=0,l=(this._width-this._defaultWidth*this.scale)/this.scale),this._defaultHeight*this.scale<=this._height?(e=(this._height-this._defaultHeight*this.scale)/(2*this.scale),a=(this._height-this._defaultHeight*this.scale)/(2*this.scale)):(e=0,a=(this._height-this._defaultHeight*this.scale)/this.scale),this.transY>e?this.transY=e:this.transY<a&&(this.transY=a),this.transX>t?this.transX=t:this.transX<l&&(this.transX=l),this.canvas.applyTransformParams(this.scale,this.transX,this.transY),this._markers&&this._repositionMarkers(),this._lines&&this._repositionLines(),this._repositionLabels()}function b0(t,e){var r;const a=(((r=this.params.map)==null?void 0:r.projection)||"mercator")==="mercator"?this.mercator.convert(t,e):this.miller.convert(t,e);if(a===!1)return!1;const n=this.getInsetForPoint(a.x,a.y);if(!n)return!1;const{bbox:M}=n,i=(a.x-M[0].x)/(M[1].x-M[0].x)*n.width*this.scale,s=(a.y-M[0].y)/(M[1].y-M[0].y)*n.height*this.scale;return{x:i+this.transX*this.scale+n.left*this.scale,y:s+this.transY*this.scale+n.top*this.scale}}var k0="jvm-line";class v0 extends I{constructor(l,a){super();Z(this,"_options");Z(this,"_style");this._options=l,this._style=a,this._draw()}setStyle(l,a){var n;(n=this.shape)==null||n.setStyle(l,a)}getConfig(){return this._options.config}_draw(){var s,r;const{index:l,group:a,map:n,animate:M}=this._options,i={d:this._getDAttribute(),fill:"none",dataIndex:l};this.shape=n.canvas.createPath(i,this._style,a),(s=this.shape)==null||s.addClass(k0),M&&((r=this.shape)==null||r.setStyle({animation:!0}))}_getDAttribute(){const{x1:l,y1:a,x2:n,y2:M}=this._options;return`M${l},${a}${this._getQCommand(l,a,n,M)}${n},${M}`}_getQCommand(l,a,n,M){if(!this._options.curvature)return" ";const i=this._options.curvature||.6,s=(l+n)/2+i*(M-a),r=(a+M)/2-i*(n-l);return` Q${s},${r} `}}var U0=v0;function R0(t){const e=this._markers||{},{style:l,elements:a,...n}=this.params.lines||{};let M=!1,i=!1;for(const s in t){const r=t[s];for(const{config:h}of Object.values(e))h.name===r.from&&(M=this.getMarkerPosition(h)),h.name===r.to&&(i=this.getMarkerPosition(h));M!==!1&&i!==!1&&(this._lines=this._lines||{},this._lines[x(r.from,r.to)]=new U0({index:s,map:this,group:this._linesGroup,config:r,x1:M.x,y1:M.y,x2:i.x,y2:i.y,...n},g({initial:l},{initial:r.style||{}},!0)))}}var C0={getLabelText(t,e){if(e){if(typeof e.render=="function"){const l=[];return this.constructor.Name==="marker"&&l.push(this.getConfig()),l.push(t),e.render.apply(this,l)}return t}},getLabelOffsets(t,e){return e&&typeof e.offsets=="function"?e.offsets(t):e&&Array.isArray(e.offsets)?e.offsets[t]||[0,0]:[0,0]},setStyle(t,e){this.shape.setStyle(t,e)},remove(){this.shape.remove(),this.label&&this.label.remove()},hover(t){this._setStatus("isHovered",t)},select(t){this._setStatus("isSelected",t)},_setStatus(t,e){this.shape[t]=e,this.shape.updateStyle(),this[t]=e,this.label&&(this.label[t]=e,this.label.updateStyle())}},b=C0,A0="marker",z="jvm-",w0=`${z}element ${z}marker`,E0=`${z}element ${z}label`;class T0 extends I{constructor(l,a){super();Z(this,"_options");Z(this,"_style");Z(this,"_labelX",null);Z(this,"_labelY",null);Z(this,"_offsets",null);Z(this,"_isImage");Z(this,"label");Z(this,"isHovered",!1);Z(this,"isSelected",!1);Z(this,"setStyle");Z(this,"remove");Z(this,"hover");Z(this,"select");Z(this,"_setStatus");this._options=l,this._style=a,this._isImage=!!a.initial.image,this.setStyle=b.setStyle.bind(this),this.remove=b.remove.bind(this),this.hover=b.hover.bind(this),this.select=b.select.bind(this),this._setStatus=b._setStatus.bind(this),this._draw(),this._options.label&&this._drawLabel(),this._isImage&&this.updateLabelPosition()}static get Name(){return A0}getConfig(){return this._options.config}updateLabelPosition(){var a,n,M,i,s;const l=this._options.map;this.label&&this._labelX!==null&&this._labelY!==null&&this._offsets&&this.label.set({x:this._labelX*l.scale+this._offsets[0]+l.transX*l.scale+5+(this._isImage?(((a=this.shape)==null?void 0:a.width)||0)/2:((s=(i=(M=(n=this.shape)==null?void 0:n.node)==null?void 0:M.r)==null?void 0:i.baseVal)==null?void 0:s.value)||0),y:this._labelY*l.scale+l.transY*this._options.map.scale+this._offsets[1]})}_draw(){var r;const{index:l,map:a,group:n,cx:M,cy:i}=this._options,s=this._isImage?"createImage":"createCircle";this.shape=a.canvas[s]({dataIndex:l,cx:M,cy:i},this._style,n),(r=this.shape)==null||r.addClass(w0)}_drawLabel(){const{index:l,map:a,label:n,labelsGroup:M,cx:i,cy:s,config:r,isRecentlyCreated:h}=this._options,o=this.getLabelText(l,n);this._labelX=i/a.scale-a.transX,this._labelY=s/a.scale-a.transY,this._offsets=h&&(r!=null&&r.offsets)?r.offsets:this.getLabelOffsets(l,n),this.label=a.canvas.createText({text:o,dataIndex:l,x:this._labelX,y:this._labelY,dy:"0.6ex"},a.params.markerLabelStyle,M),this.label.addClass(E0),h&&this.updateLabelPosition()}getLabelText(l,a){if(a)return typeof a.render=="function"?a.render(this.getConfig(),l):l}getLabelOffsets(l,a){return a&&typeof a.offsets=="function"?a.offsets(l):a&&Array.isArray(a.offsets)?a.offsets[l]||[0,0]:[0,0]}}var L0=T0;function N0(t={},e=!1){var l,a;for(let n in t){const M=t[n],i=this.getMarkerPosition(M),s=M.coords.join(":");if(!i)continue;if(e){if(Object.keys(this._markers||{}).filter(h=>{var o;return((o=this._markers)==null?void 0:o[h]._uid)===s}).length)continue;n=String(Object.keys(this._markers||{}).length)}const r=new L0({index:n,map:this,label:(l=this.params.labels)==null?void 0:l.markers,labelsGroup:this._markerLabelsGroup,cx:i.x,cy:i.y,group:this._markersGroup,config:M,isRecentlyCreated:e},g({initial:{}},g(this.params.markerStyle||{},{...M.style||{}},!0)));(a=this._markers)!=null&&a[n]&&this.removeMarkers([n]),this._markers[n]={_uid:s,config:M,element:r}}}class x0 extends I{constructor({map:l,code:a,path:n,style:M,label:i,labelStyle:s,labelsGroup:r}){var o;super();Z(this,"_map");Z(this,"labelX",0);Z(this,"labelY",0);Z(this,"label");Z(this,"isHovered");Z(this,"isSelected",!1);Z(this,"shape");Z(this,"setStyle");Z(this,"remove");Z(this,"hover");Z(this,"select");Z(this,"_setStatus");this._map=l,this.setStyle=b.setStyle.bind(this),this.remove=b.remove.bind(this),this.hover=b.hover.bind(this),this.select=b.select.bind(this),this._setStatus=b._setStatus.bind(this),this.shape=this._createRegion(n,a,M);const h=this.getLabelText(a,i);if(i&&h){const m=(o=this.shape)==null?void 0:o.getBBox(),p=this.getLabelOffsets(a,i);this.labelX=((m==null?void 0:m.x)??0)+((m==null?void 0:m.width)??0)/2+p[0],this.labelY=((m==null?void 0:m.y)??0)+((m==null?void 0:m.height)??0)/2+p[1],this.label=this._map.canvas.createText({text:h,textAnchor:"middle",alignmentBaseline:"central",dataCode:a,x:this.labelX,y:this.labelY},s,r),this.label.addClass("jvm-region jvm-element")}}_createRegion(l,a,n){const M=this._map.canvas.createPath({d:l,dataCode:a},n);return M.addClass("jvm-region jvm-element"),M}updateLabelPosition(){this.label&&this.label.set({x:this.labelX*this._map.scale+this._map.transX*this._map.scale,y:this.labelY*this._map.scale+this._map.transY*this._map.scale})}getLabelText(l,a){if(a)return typeof a.render=="function"?a.render(l):l}getLabelOffsets(l,a){return a&&typeof a.offsets=="function"?a.offsets(l):a&&Array.isArray(a.offsets)?a.offsets[l]||[0,0]:[0,0]}}var I0=x0;function z0(){var t;this._regionLabelsGroup=this._regionLabelsGroup||this.canvas.createGroup("jvm-regions-labels-group");for(const e in this._mapData.paths){const l=new I0({map:this,code:e,path:this._mapData.paths[e].path,style:g({initial:{}},this.params.regionStyle||{}),labelStyle:this.params.regionLabelStyle,labelsGroup:this._regionLabelsGroup,label:(t=this.params.labels)!=null&&t.regions?{}:void 0});this.regions[e]={config:this._mapData.paths[e],element:l,path:this._mapData.paths[e].path,name:e}}}class O0{constructor(e){Z(this,"_options");Z(this,"_map");Z(this,"_series");Z(this,"_body");this._options=e,this._map=this._options.map,this._series=this._options.series,this._body=_("div","jvm-legend"),this._options.cssClass&&this._body.setAttribute("class",this._options.cssClass),e.vertical?this._map.legendVertical.appendChild(this._body):this._map.legendHorizontal.appendChild(this._body),this.render()}render(){const e=this._series.scale.getTicks(),l=_("div","jvm-legend-inner");if(this._body.innerHTML="",this._options.title){const a=_("div","jvm-legend-title",this._options.title);this._body.appendChild(a)}this._body.appendChild(l);for(let a=0;a<e.length;a++){const n=_("div","jvm-legend-tick"),M=_("div","jvm-legend-tick-sample");switch(this._series.config.attribute){case"fill":u0(e[a].value)?M.style.background=`url(${e[a].value})`:M.style.background=e[a].value;break;case"stroke":M.style.background=e[a].value;break;case"image":M.style.background=`url(${e[a].value}) no-repeat center center`,M.style.backgroundSize="cover";break}n.appendChild(M);let i=e[a].label;this._options.labelRender&&(i=this._options.labelRender(i));const s=_("div","jvm-legend-tick-text",i);n.appendChild(s),l.appendChild(n)}}}var B0=O0;class P0{constructor(e){Z(this,"_scale");this._scale=e.scale}getValue(e){return this._scale[String(e)]}getTicks(){const e=[];for(const l in this._scale)e.push({value:this._scale[l],label:l});return e}}var G0=P0;class D0{constructor(e,l,a){Z(this,"_map");Z(this,"_elements");Z(this,"_values");Z(this,"config");Z(this,"scale");Z(this,"legend");this._map=a,this._elements=l,this._values=e.values||{},this.config=e,this.config.attribute=e.attribute||"fill",e.attributes&&this.setAttributes(e.attributes),typeof e.scale=="object"&&(this.scale=new G0(e.scale)),this.config.legend&&(this.legend=new B0(g({map:this._map,series:this},this.config.legend))),this.setValues(this._values)}setValues(e){const l={};for(const a in e)e[a]&&(l[a]=this.scale.getValue(e[a]));this.setAttributes(l)}setAttributes(e){for(const l in e)this._elements[l]&&this._elements[l].element.setStyle(this.config.attribute||"fill",e[l])}clear(){const e={};for(const l in this._values)this._elements[l]&&(e[l]=this._elements[l].element.shape.style.initial[this.config.attribute||"fill"]);this.setAttributes(e),this._values={}}}var K0=D0;function Y0(){this.series={markers:[],regions:[]};for(const t in this.params.series){const e=t;if(this.params.series[e])for(let l=0;l<this.params.series[e].length;l++)this.series[e][l]=new K0(this.params.series[e][l],e==="markers"?this._markers||{}:this.regions,this)}}function V0(t,e){const l=P.maps[this.params.map.name].insets;if(!(!l||l.length===0))for(let a=0;a<l.length;a++){const n=l[a];if(!n||!n.bbox||n.bbox.length<2)continue;const[M,i]=n.bbox;if(!(!M||!i)&&t>M.x&&t<i.x&&e>M.y&&e<i.y)return n}}function j0({coords:t}){return P.maps[this.params.map.name].projection?this.coordsToPoint(...t):{x:t[0]*this.scale+this.transX*this.scale,y:t[1]*this.scale+this.transY*this.scale}}function H0(){const t=this.params.labels||{};if(t.regions)for(const e in this.regions){const l=this.regions[e];!l||!l.element||!l.element.label||l.element.updateLabelPosition()}if(t.markers)for(const e in this._markers){const l=this._markers[e];l.element&&typeof l.element.updateLabelPosition=="function"&&l.element.updateLabelPosition()}}function X0(){var e;const t=((e=this.params.lines)==null?void 0:e.curvature)||.5;Object.values(this._lines||{}).forEach(l=>{const a=Object.values(this._markers||{}).find(({config:M})=>M.name===l.getConfig().from),n=Object.values(this._markers||{}).find(({config:M})=>M.name===l.getConfig().to);if(a&&n){const M=this.getMarkerPosition(a.config),i=this.getMarkerPosition(n.config);if(M&&i){const{x:s,y:r}=M,{x:h,y:o}=i,m=(s+h)/2,p=(r+o)/2,d=m+t*(o-r),f=p-t*(h-s);l.setStyle({d:`M${s},${r} Q${d},${f} ${h},${o}`})}}})}function $0(){if(this._markers)for(const t in this._markers){const e=this._markers[t];if(!e||!e.element||!e.element.shape)continue;const l=this.getMarkerPosition(e.config);if(l!==!1){const a=Number.isNaN(l.x)?0:l.x,n=Number.isNaN(l.y)?0:l.y;e.element.shape.set({cx:a,cy:n})}}}function W0(){const t=this._baseScale;this._width/this._height>this._defaultWidth/this._defaultHeight?(this._baseScale=this._height/this._defaultHeight,this._baseTransX=Math.abs(this._width-this._defaultWidth*this._baseScale)/(2*this._baseScale)):(this._baseScale=this._width/this._defaultWidth,this._baseTransY=Math.abs(this._height-this._defaultHeight*this._baseScale)/(2*this._baseScale)),this.scale*=this._baseScale/t,this.transX*=this._baseScale/t,this.transY*=this._baseScale/t}var F=W0;function F0(t={}){let e,l=[];if(t.region?l.push(t.region):t.regions&&(l=t.regions),l.length){if(l.forEach(a=>{if(this.regions[a]){const n=this.regions[a].element.shape.getBBox();n&&(typeof e>"u"?e=n:e={x:Math.min(e.x,n.x),y:Math.min(e.y,n.y),width:Math.max(e.x+e.width,n.x+n.width)-Math.min(e.x,n.x),height:Math.max(e.y+e.height,n.y+n.height)-Math.min(e.y,n.y)})}}),e)return this._setScale(Math.min(this._width/e.width,this._height/e.height),-(e.x+e.width/2),-(e.y+e.height/2),!0,t.animate)}else if(t.coords){const a=this.coordsToPoint(t.coords[0],t.coords[1]);if(a){const n=this.transX-a.x/this.scale,M=this.transY-a.y/this.scale;return this._setScale(t.scale?t.scale*this._baseScale:this._baseScale,n,M,!0,t.animate)}}}var J0={onLoaded:"map:loaded",onViewportChange:"viewport:changed",onRegionClick:"region:clicked",onMarkerClick:"marker:clicked",onRegionSelected:"region:selected",onMarkerSelected:"marker:selected",onRegionTooltipShow:"region.tooltip:show",onMarkerTooltipShow:"marker.tooltip:show",onDestroyed:"map:destroyed"},y=J0;function O(t,e,l,a,n){let M,i,s=0;const r=Math.abs(Math.round((t-this.scale)*60/Math.max(t,this.scale)));let h,o,m,p,d,f,U=this.transX,D=this.transY;const e0=this.params.zoomMax??8,a0=this.params.zoomMin??1;t>e0*this._baseScale?t=e0*this._baseScale:t<a0*this._baseScale&&(t=a0*this._baseScale),typeof e<"u"&&typeof l<"u"&&(M=t/this.scale,a?(U=e+this._defaultWidth*(this._width/(this._defaultWidth*t))/2,D=l+this._defaultHeight*(this._height/(this._defaultHeight*t))/2):(U=this.transX-(M-1)/t*e,D=this.transY-(M-1)/t*l)),n&&r>0?(h=this.scale,o=(t-h)/r,m=this.transX*this.scale,d=this.transY*this.scale,p=(U*t-m)/r,f=(D*t-d)/r,i=setInterval(()=>{s+=1,this.scale=h+o*s,this.transX=(m+p*s)/this.scale,this.transY=(d+f*s)/this.scale,this._applyTransform(),s===r&&(clearInterval(i),this._emit(y.onViewportChange,[this.scale,this.transX,this.transY]))},10)):(this.transX=U,this.transY=D,this.scale=t,this._applyTransform(),this._emit(y.onViewportChange,[this.scale,this.transX,this.transY]))}var C={},q0=1,V={on(t,e,l,a={}){const n=`jvm:${e}::${q0++}`;C[n]={selector:t,handler:l},l._uid=n,t.addEventListener(e,l,a)},delegate(t,e,l,a){e.split(" ").forEach(M=>{V.on(t,M,i=>{const s=i.target;s&&s.matches&&s.matches(l)&&a.call(s,i)})})},off(t,e,l){const a=e.split(":")[1];t.removeEventListener(a,l),delete C[l._uid]},flush(){Object.keys(C).forEach(t=>{V.off(C[t].selector,t,C[t].handler)})},getEventRegistry(){return C}},S=V;function Q0(){let t=!1,e,l;this.params.draggable&&(S.on(this.container,"mousemove",a=>{if(!t)return!1;const n=a;e!==void 0&&l!==void 0&&(this.transX-=(e-n.pageX)/this.scale,this.transY-=(l-n.pageY)/this.scale,this._applyTransform()),e=n.pageX,l=n.pageY}),S.on(this.container,"mousedown",a=>{t=!0;const n=a;return e=n.pageX,l=n.pageY,!1}),S.on(document.body,"mouseup",()=>{t=!1})),this.params.zoomOnScroll&&S.on(this.container,"wheel",a=>{const n=a,M=((n.deltaY||0)>>10||1)*75,i=this.container.getBoundingClientRect(),s=n.pageX-i.left-window.scrollX,r=n.pageY-i.top-window.scrollY,h=(1+(this.params.zoomOnScrollSpeed||3)/1e3)**(-1.5*M);O.call(this,this.scale*h,s,r),a.preventDefault()})}function ll(){let t=1,e=0,l=0,a=0,n=0,M=0,i=0,s={top:0,left:0};const r=h=>{const o=h.touches;let m=this.scale;if(o.length===1){if(n===1){const p=o[0];t===m&&(this.transX-=(M-p.pageX)/m,this.transY-=(i-p.pageY)/m,this.canvas.applyTransformParams(m,this.transX,this.transY)),M=p.pageX,i=p.pageY}}else if(o.length===2)if(n===2)m=Math.sqrt((o[0].pageX-o[1].pageX)**2+(o[0].pageY-o[1].pageY)**2)/e,O.call(this,t*m,l,a,!1,!1),h.preventDefault();else{const p=this.container.getBoundingClientRect();s={top:p.top+window.scrollY,left:p.left+window.scrollX},l=o[0].pageX>o[1].pageX?o[1].pageX+(o[0].pageX-o[1].pageX)/2:o[0].pageX+(o[1].pageX-o[0].pageX)/2,a=o[0].pageY>o[1].pageY?o[1].pageY+(o[0].pageY-o[1].pageY)/2:o[0].pageY+(o[1].pageY-o[0].pageY)/2,l-=s.left,a-=s.top,t=this.scale,e=Math.sqrt((o[0].pageX-o[1].pageX)**2+(o[0].pageY-o[1].pageY)**2)}n=o.length};S.on(this.container,"touchstart",r),S.on(this.container,"touchmove",r)}function j(t,e,l){var h,o,m,p,d,f,U;const a=W(e),n=(h=a==null?void 0:a.getAttribute("class"))!=null&&h.includes("jvm-region")?"region":"marker",M=n==="region",i=M?a==null?void 0:a.getAttribute("data-code"):a==null?void 0:a.getAttribute("data-index");if(!i)throw new Error("Element does not have required data attribute");let s=M?y.onRegionSelected:y.onMarkerSelected;l&&(s=M?y.onRegionTooltipShow:y.onMarkerTooltipShow);const r=M?(o=t.regions[i])==null?void 0:o.element:(p=(m=t._markers)==null?void 0:m[i])==null?void 0:p.element;if(!r)throw!M&&!((d=t._markers)!=null&&d[i])?new Error(`Marker with index ${i} not found in map markers collection`):M&&!t.regions[i]?new Error(`Region with code ${i} not found in map regions collection`):new Error(`Element with code ${i} not found`);return{type:n,code:i,event:s,element:r,tooltipText:M?t._mapData.paths[i].name||"":((U=(f=t._markers)==null?void 0:f[i])==null?void 0:U.config.name)||""}}function el(){const t=this.container;let e,l,a=!1;S.on(t,"mousemove",n=>{const M=n;Math.abs((e||0)-M.pageX)+Math.abs((l||0)-M.pageY)>2&&(a=!0)}),S.delegate(t,"mousedown",".jvm-element",n=>{const M=n;e=M.pageX,l=M.pageY,a=!1}),S.delegate(t,"mouseover mouseout",".jvm-element",n=>{try{const M=j(this,n.target,!0),{showTooltip:i}=this.params,s=this._tooltip;n.type==="mouseover"?(typeof M.element.hover=="function"&&M.element.hover(!0),i&&s&&(this._emit(M.event,[M.event,s,M.code]),n.defaultPrevented||s.show(M.tooltipText))):(typeof M.element.hover=="function"&&M.element.hover(!1),i&&s&&s.hide())}catch(M){const i=M instanceof Error?M.message:String(M);console.warn("Skipping mouseover/mouseout event due to error:",i),n.type==="mouseout"&&this._tooltip&&this._tooltip.hide()}}),S.delegate(t,"mouseup",".jvm-element",n=>{try{const M=j(this,n.target,!1);if(a)return;if(M.type==="region"&&this.params.regionsSelectable||M.type==="marker"&&this.params.markersSelectable){const i=M.element;this.params[`${M.type}sSelectableOne`]&&(M.type==="region"?this.clearSelectedRegions():this.clearSelectedMarkers()),typeof i.select=="function"&&(i.isSelected?i.select(!1):i.select(!0),this._emit(M.event,[M.event,M.code,i.isSelected,M.type==="region"?this.getSelectedRegions():this.getSelectedMarkers()]))}}catch(M){console.error("Error in mouseup handler:",M)}}),S.delegate(t,"click",".jvm-element",n=>{try{const{type:M,code:i}=j(this,n.target,!1);this._emit(M==="region"?y.onRegionClick:y.onMarkerClick,[n,i])}catch(M){console.error("Error in click handler:",M)}})}function al(){const t=_("div","jvm-zoom-btn jvm-zoomin","+",!0),e=_("div","jvm-zoom-btn jvm-zoomout","−",!0);this.container.appendChild(t),this.container.appendChild(e);const l=(a=!0)=>()=>O.call(this,a?this.scale*(this.params.zoomStep||1.5):this.scale/(this.params.zoomStep||1.5),this._width/2,this._height/2,!1,this.params.zoomAnimate);S.on(t,"click",l()),S.on(e,"click",l(!1))}function tl(){this._width=this.container.offsetWidth,this._height=this.container.offsetHeight,F.call(this),this.canvas.setSize(this._width,this._height),this._applyTransform()}var nl={_setupContainerEvents:Q0,_setupElementEvents:el,_setupZoomButtons:al,_setupContainerTouchEvents:ll,_createRegions:z0,_createLines:R0,_createMarkers:N0,_createSeries:Y0,_applyTransform:_0,_resize:F,_setScale:O,setFocus:F0,updateSize:tl,coordsToPoint:b0,getInsetForPoint:V0,getMarkerPosition:j0,_repositionLines:X0,_repositionMarkers:$0,_repositionLabels:H0},Ml=nl;class il{constructor({scale:e,values:l},a){Z(this,"_scale");Z(this,"_values");Z(this,"_fromColor");Z(this,"_toColor");Z(this,"_map");Z(this,"min",Number.MAX_VALUE);Z(this,"max",0);this._scale=e,this._values=l,this._fromColor=this.hexToRgb(e[0]),this._toColor=this.hexToRgb(e[1]),this._map=a,this.setMinMaxValues(l),this.visualize()}setMinMaxValues(e){for(const l in e){const a=Number.parseFloat(String(e[l]));a>this.max&&(this.max=a),a<this.min&&(this.min=a)}}visualize(){const e={};let l;for(const a in this._values)l=Number.parseFloat(String(this._values[a])),Number.isNaN(l)||(e[a]=this.getValue(l));this.setAttributes(e)}setAttributes(e){for(const l in e)this._map.regions[l]&&this._map.regions[l].element.setStyle("fill",e[l])}getValue(e){if(this.min===this.max)return`#${this._toColor.join("")}`;let l,a="#";for(let n=0;n<3;n++)l=Math.round(this._fromColor[n]+(this._toColor[n]-this._fromColor[n])*((e-this.min)/(this.max-this.min))).toString(16),a+=(l.length===1?"0":"")+l;return a}hexToRgb(e){let l="0",a="0",n="0";return e.length===4?(l=`0x${e[1]}${e[1]}`,a=`0x${e[2]}${e[2]}`,n=`0x${e[3]}${e[3]}`):e.length===7&&(l=`0x${e[1]}${e[2]}`,a=`0x${e[3]}${e[4]}`,n=`0x${e[5]}${e[6]}`),[Number.parseInt(l,16),Number.parseInt(a,16),Number.parseInt(n,16)]}}var sl=il,Zl={map:{name:"world",projection:"mercator"},backgroundColor:"transparent",draggable:!0,zoomButtons:!0,zoomOnScroll:!0,zoomOnScrollSpeed:3,zoomMax:12,zoomMin:1,zoomAnimate:!0,showTooltip:!0,zoomStep:1.5,bindTouchEvents:!0,selector:"",lines:{style:{stroke:"#808080",strokeWidth:1,strokeLinecap:"round"},elements:[]},markersSelectable:!1,markersSelectableOne:!1,markerStyle:{initial:{r:7,fill:"#374151",fillOpacity:1,stroke:"#FFF",strokeWidth:5,strokeOpacity:.5},hover:{fill:"#3cc0ff",cursor:"pointer"},selected:{fill:"blue"},selectedHover:{}},markerLabelStyle:{initial:{fontFamily:"Verdana",fontSize:12,fontWeight:500,cursor:"default",fill:"#374151"},hover:{cursor:"pointer"},selected:{},selectedHover:{}},regionsSelectable:!1,regionsSelectableOne:!1,regionStyle:{initial:{fill:"#dee2e8",fillOpacity:1,stroke:"none",strokeWidth:0},hover:{fillOpacity:.7,cursor:"pointer"},selected:{fill:"#9ca3af"},selectedHover:{}},regionLabelStyle:{initial:{fontFamily:"Verdana",fontSize:"12",fontWeight:"bold",cursor:"default",fill:"#35373e"},hover:{cursor:"pointer"}}},ol=Zl,rl={mill(t,e,l){return{x:this.radius*(e-l)*this.radDeg,y:-this.radius*Math.log(Math.tan((45+.4*t)*this.radDeg))/.8}},merc(t,e,l){return{x:this.radius*(e-l)*this.radDeg,y:-this.radius*Math.log(Math.tan(Math.PI/4+t*Math.PI/360))}},aea(t,e,l){const n=l*this.radDeg,M=29.5*this.radDeg,i=45.5*this.radDeg,s=t*this.radDeg,r=e*this.radDeg,h=(Math.sin(M)+Math.sin(i))/2,o=Math.cos(M)*Math.cos(M)+2*h*Math.sin(M),m=h*(r-n),p=Math.sqrt(o-2*h*Math.sin(s))/h,d=Math.sqrt(o-2*h*Math.sin(0))/h;return{x:p*Math.sin(m)*this.radius,y:-(d-p*Math.cos(m))*this.radius}},lcc(t,e,l){const n=l*this.radDeg,M=e*this.radDeg,i=33*this.radDeg,s=45*this.radDeg,r=t*this.radDeg,h=Math.log(Math.cos(i)*(1/Math.cos(s)))/Math.log(Math.tan(Math.PI/4+s/2)*(1/Math.tan(Math.PI/4+i/2))),o=Math.cos(i)*Math.tan(Math.PI/4+i/2)**h/h,m=o*(1/Math.tan(Math.PI/4+r/2))**h,p=o*(1/Math.tan(Math.PI/4+0/2))**h;return{x:m*Math.sin(h*(M-n))*this.radius,y:-(p-m*Math.cos(h*(M-n)))*this.radius}},degRad:180/Math.PI,radDeg:Math.PI/180,radius:6381372},J=rl;class hl{constructor(e,l){Z(this,"node");Z(this,"style");this.node=this._createElement(e),this.style={initial:{}},l&&this.set(l)}_createElement(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}addClass(e){this.node.setAttribute("class",e)}getBBox(){return this.node.getBBox()}set(e,l){if(typeof e=="object")for(const a in e)this.applyAttr(a,e[a]);else l!==void 0&&this.applyAttr(e,l)}get(e){return this.style.initial[e]}applyAttr(e,l){this.node.setAttribute(f0(e),String(l))}remove(){N(this.node)}}var w=hl;class ml extends w{constructor(l,a,n={initial:{}}){super(l,a);Z(this,"isHovered");Z(this,"isSelected");Z(this,"style");this.isHovered=!1,this.isSelected=!1,this.style=n,this.style.current={},this.updateStyle()}hover(l){this.isHovered=l,this.updateStyle()}select(l){this.isSelected=l,this.updateStyle()}setStyle(l,a){typeof l=="object"?g(this.style.current,l):g(this.style.current,{[l]:a}),this.updateStyle()}updateStyle(){const l={};g(l,this.style.initial),g(l,this.style.current||{}),this.isHovered&&g(l,this.style.hover||{}),this.isSelected&&(g(l,this.style.selected||{}),this.isHovered&&g(l,this.style.selectedHover||{})),this.set(l)}}var E=ml;class pl extends E{constructor(l,a){super("image",l,a);Z(this,"width",0);Z(this,"height",0);Z(this,"cx",0);Z(this,"cy",0);Z(this,"offset",[0,0])}applyAttr(l,a){let n;if(l==="image"){if(typeof a=="object"){const M=a;n=M.url||"",this.offset=M.offset||[0,0]}else n=String(a),this.offset=[0,0];this.node.setAttributeNS("http://www.w3.org/1999/xlink","href",n),this.width=23,this.height=23,this.applyAttr("width",this.width),this.applyAttr("height",this.height),this.applyAttr("x",this.cx-this.width/2+this.offset[0]),this.applyAttr("y",this.cy-this.height/2+this.offset[1])}else l==="cx"?(this.cx=Number(a),this.width&&this.applyAttr("x",this.cx-this.width/2+this.offset[0])):l==="cy"?(this.cy=Number(a),this.height&&this.applyAttr("y",this.cy-this.height/2+this.offset[1])):super.applyAttr(l,a)}}var cl=pl;class dl extends E{constructor(e,l){super("text",e,l)}applyAttr(e,l){e==="text"?this.node.textContent=String(l):e==="x"||e==="y"||e==="cx"||e==="cy"?this.node.setAttribute(e,`${l}`):super.applyAttr(e,l)}}var ul=dl;class fl extends w{constructor(l){super("svg");Z(this,"_container");Z(this,"_defsElement");Z(this,"_rootElement");this._container=l,this._defsElement=new w("defs"),this._rootElement=new w("g",{id:"jvm-regions-group"}),this.node.appendChild(this._defsElement.node),this.node.appendChild(this._rootElement.node),this._container.appendChild(this.node)}setSize(l,a){this.node.setAttribute("width",String(l)),this.node.setAttribute("height",String(a))}applyTransformParams(l,a,n){this._rootElement.node.setAttribute("transform",`scale(${l}) translate(${a}, ${n})`)}createPath(l,a,n){const M=new E("path",l,a);return M.node.setAttribute("fill-rule","evenodd"),this._add(M,n)}createCircle(l,a,n){const M=new E("circle",l,a);return this._add(M,n)}createLine(l,a,n){const M=new E("line",l,a);return this._add(M,n)}createText(l,a,n){const M=new ul(l,a);return this._add(M,n)}createImage(l,a,n){const M=new cl(l,a);return this._add(M,n)}createGroup(l){const a=new w("g");return this.node.appendChild(a.node),l&&(a.node.id=l),a.canvas=this,a}_add(l,a){return a=a||this._rootElement,a&&a.node?a.node.appendChild(l.node):this._rootElement.node.appendChild(l.node),l}}var Sl=fl,k="jvm-",gl=`${k}container`,yl=`${k}markers-group`,_l=`${k}markers-labels-group`,bl=`${k}lines-group`,q=`${k}series-container`,kl=`${q} ${k}series-h`,vl=`${q} ${k}series-v`;const v=class v{constructor(e={}){Z(this,"params");Z(this,"regions",{});Z(this,"scale",1);Z(this,"transX",0);Z(this,"transY",0);Z(this,"container");Z(this,"canvas");Z(this,"dataVisualization");Z(this,"legendHorizontal");Z(this,"legendVertical");Z(this,"series",{markers:[],regions:[]});Z(this,"_mapData");Z(this,"_markers",{});Z(this,"_lines",{});Z(this,"_defaultWidth");Z(this,"_defaultHeight");Z(this,"_height",0);Z(this,"_width",0);Z(this,"_baseScale",1);Z(this,"_baseTransX",0);Z(this,"_baseTransY",0);Z(this,"_tooltip");Z(this,"_linesGroup");Z(this,"_markersGroup");Z(this,"_markerLabelsGroup");Z(this,"_canvasImpl");Z(this,"mercator",{convert:(e,l)=>{var M;const a=((M=this._mapData.projection)==null?void 0:M.centralMeridian)||0;return J.merc(e,l,a)}});Z(this,"miller",{convert:(e,l)=>{var M;const a=((M=this._mapData.projection)==null?void 0:M.centralMeridian)||0;return J.mill(e,l,a)}});this.params=g(v.defaults,e,!0);const l=this.params.map,a=typeof l=="string"?l:l.name,n=v.maps[a];if(!n)throw new Error(`Attempt to use map which was not loaded: ${a}`);this._mapData=n,this._defaultWidth=this._mapData.width,this._defaultHeight=this._mapData.height,document.readyState!=="loading"?this._init():window.addEventListener("DOMContentLoaded",()=>this._init())}_init(){var a,n;const e=this.params,l=W(e.selector);if(!l)throw new Error(`Element not found: ${e.selector}`);if(this.container=l,this.container.classList.add(gl),this._canvasImpl=new Sl(this.container),this.canvas=this._canvasImpl,this.setBackgroundColor(e.backgroundColor||""),this._createRegions(),this.updateSize(),(a=e.lines)!=null&&a.elements){const M=this._canvasImpl.createGroup(bl);if(!M)throw new TypeError("Failed to create lines group");this._linesGroup=M}if(e.markers){const M=this._canvasImpl.createGroup(yl),i=this._canvasImpl.createGroup(_l);if(!M||!i)throw new TypeError("Failed to create markers groups");this._markersGroup=M,this._markerLabelsGroup=i}this._createMarkers(e.markers||[]),this._createLines(((n=e.lines)==null?void 0:n.elements)||[]),this._repositionLabels(),this._setupContainerEvents(),this._setupElementEvents(),e.zoomButtons&&this._setupZoomButtons(),e.showTooltip&&(this._tooltip=new y0(this)),e.selectedRegions&&this._setSelected("regions",e.selectedRegions),e.selectedMarkers&&this._setSelected("_markers",e.selectedMarkers),e.focusOn&&this.setFocus(e.focusOn),e.visualizeData&&(this.dataVisualization=new sl(e.visualizeData,this)),e.bindTouchEvents&&"ontouchstart"in window&&this._setupContainerTouchEvents(),e.series&&(this.container.appendChild(this.legendHorizontal=_("div",kl)),this.container.appendChild(this.legendVertical=_("div",vl)),this._createSeries()),this._emit(y.onLoaded,[this])}setBackgroundColor(e){this.container.style.backgroundColor=e}getSelectedRegions(){return this._getSelected("regions")}clearSelectedRegions(e){(this._normalizeRegions(e)||this._getSelected("regions")).forEach(a=>{this.regions[a].element.select(!1)})}setSelectedRegions(e){this.clearSelectedRegions();const l=this._normalizeRegions(e);l&&this._setSelected("regions",l)}getSelectedMarkers(){return this._getSelected("_markers")}clearSelectedMarkers(){this._clearSelected("_markers")}setSelectedMarkers(e){const l=this._normalizeRegions(e);l&&this._setSelected("_markers",l)}addMarkers(e){const l=Array.isArray(e)?e:[e];this._createMarkers(l,!0)}removeMarkers(e){(e||Object.keys(this._markers)).forEach(a=>{const n=this._markers[a];n&&(typeof n.remove=="function"?n.remove():n.shape&&(n.shape.remove(),n.label&&n.label.remove()),delete this._markers[a])})}addLine(e,l,a={}){console.warn("`addLine` method is deprecated, please use `addLines` instead."),this._createLines([{from:e,to:l,style:a}])}addLines(e){const l=this._getLinesAsUids(),a=Array.isArray(e)?e:[e];this._createLines(a.filter(n=>!l.includes(x(n.from,n.to))))}removeLines(e){Array.isArray(e)&&typeof e[0]!="string"?e=e.map(l=>x(l.from,l.to)):Array.isArray(e)||(e=this._getLinesAsUids()),e.forEach(l=>{this._lines[l].dispose(),delete this._lines[l]})}removeLine(e,l){console.warn("`removeLine` method is deprecated, please use `removeLines` instead.");const a=x(e,l);Object.prototype.hasOwnProperty.call(this._lines,a)&&(this._lines[a].element.remove(),delete this._lines[a])}reset(){var e,l,a,n;for(const M in this.series||{})for(let i=0;i<(((l=(e=this.series)==null?void 0:e[M])==null?void 0:l.length)||0);i++)(n=(a=this.series)==null?void 0:a[M][i])==null||n.clear();this.legendHorizontal&&(N(this.legendHorizontal),this.legendHorizontal=void 0),this.legendVertical&&(N(this.legendVertical),this.legendVertical=void 0),this.scale=this._baseScale,this.transX=this._baseTransX,this.transY=this._baseTransY,this._applyTransform(),this.clearSelectedMarkers(),this.clearSelectedRegions(),this.removeMarkers()}destroy(e=!0){var l;S.flush(),(l=this._tooltip)==null||l.dispose(),this._emit(y.onDestroyed,[]),e&&Object.keys(this).forEach(a=>{try{delete this[a]}catch{}})}extend(e,l){if(typeof this[e]=="function")throw new TypeError(`The method [${e}] does already exist, please use another name.`);v.prototype[e]=l}getInsetForPoint(e,l){return!1}getMarkerPosition(e){return{x:0,y:0}}coordsToPoint(e,l){return{x:0,y:0}}_repositionMarkers(){}_repositionLines(){}_setScale(e){}_emit(e,l){var a;for(const n in y)y[n]===e&&typeof this.params[n]=="function"&&((a=this.params[n])==null||a.apply(this,l))}_getSelected(e){const l=[];for(const a in this[e])this[e][a].element.isSelected&&l.push(a);return l}_setSelected(e,l){l.forEach(a=>{this[e][a]&&this[e][a].element.select(!0)})}_clearSelected(e){this._getSelected(e).forEach(l=>{this[e][l].element.select(!1)})}_getLinesAsUids(){return Object.keys(this._lines)}_normalizeRegions(e){if(e)return typeof e=="string"?[e]:e}_createRegions(){}_createMarkers(e,l=!1){}_createLines(e){}_createSeries(){}_repositionLabels(){}_setupContainerEvents(){}_setupElementEvents(){}_setupZoomButtons(){}_setupContainerTouchEvents(){}_applyTransform(){}updateSize(){}setFocus(e){}};Z(v,"maps",{}),Z(v,"defaults",ol);let B=v;Object.assign(B.prototype,Ml);var P=B;class T{constructor(e={}){if(!e.selector)throw new Error("Selector is not given.");return new P(e)}static addMap(e,l){P.maps[e]=l}}typeof window<"u"&&(window.VectorMap=T);var Ul={insets:[{width:600,top:0,height:650.3183105409283,bbox:[{y:-168643134312261e-7,x:903208.6719108557},{y:-5043360381389352e-9,x:19992582811667882e-9}],left:0}],paths:{"BR-AC":{path:"M30.732574,238.03114l-2.08,-0.04l0.54,-1.81l-0.21,-0.83l-0.25,-0.49l-1.25,-0.7l-0.14,-0.45l0.27,-1.15l-0.77,-1.95l-1.09,-0.64l-5.6,-1.25l-7.34,-0.19l0.27,-0.56l2.49,-2.26l0.89,-1.23l0.29,-1.2l-0.22,-1.23l-0.68,-0.91l-0.83,-0.44l-1.68,-2.95l-0.77,-0.44l-0.9,-0.19l-1.13,-1.13l-0.92,-2.38l-2,-1.53l-0.98,-3.62l-0.87,-1.64l-1.88,-1.08l-0.08,-1.17l0.81,0.1l0.42,-0.52l0.07,-0.67l-0.2,-0.42l-2.12,-0.93l-0.36,-0.66l-2.16999996,-1.89l0.04,-0.37l0.62,-0.05l0.49999996,-1.32l-0.01,-1.31l3.01,-0.39l0.5,-0.39l-0.22,-1.35l-1.17,-1.57l0,0l17.95,7.48l23.66,5.66l12.14,3.14l26.44,14.17l28.509996,12.13l0,0l2.97,1.26l0,0l-0.3,0.48l-1.57,0.66l-2.09,1.59l-2.86,2.79l-1.65,0.86l-0.66,-0.18l-1.53,0.18l-0.05,0.56l-1.92,1.3l-2.08,0.99l-1.439996,1.83l-0.44,1.18l-0.61,0.28l-1.17,-0.75l-0.76,-0.13l-2.37,0.05l-0.68,0.26l-0.63,0.45l-0.36,0.86l-2.44,3.48l-3.77,1.25l-0.84,0.69l-1.94,0.51l-1.03,0.03l0.08,-2.11l-1.36,0.2l-3.55,-0.77l-5.24,-0.47l-5.09,0.38l-0.66,-0.58l-2.27,-0.17l-3.56,1.83l-2.73,0.62l-1.68,-0.67l-1.4,-1.44l-1.64,1.16l0.04,-17.55l0.05,-1.1l0.47,-0.71l0.07,-2.35l-0.26,-0.88l0.97,-1.18l0.48,-1.14l-1.16,0.2l-2.97,2.59l-1.6,1.01l-2.06,2.38l-1.95,0.67l-0.65,1.08l-1.81,0.99z",name:"Acre"},"BR-AL":{path:"m 562.17257,230.56114 -0.2,-0.73 -1.42,-0.78 -0.45,0.09 -1.02,-0.29 -0.54,-1.4 0,0 1.32,-1.07 0.64,-1.09 2.17,-0.76 2.38,-3.29 0.09,-0.69 0.82,-0.6 1,1.22 1.67,0.3 1.08,-0.12 2.55,2.02 1.9,2.12 1.78,1.05 1.91,0.48 2.5,-0.65 3.14,0.29 1.17,-0.11 1.86,-1.06 1.16,0.05 1.81,-1.11 2.18,-2.29 0.12,-0.45 1.55,-1.24 2,-0.24 2.24,0.85 2.56,-1.29 1.47,-0.19 1.92,0.81 2.9,0.27 0.27,0.21 0,0 -2.78,4.96 -4.55,5.13 -3.58,3.58 -3.04,4.58 -3.33,2.88 -1,2.03 -1.32,1.79 0,0 -0.6,-1.31 -3.59,-2.23 -0.46,-0.03 -1.66,-0.79 -1.76,-1.45 -1.3,-2.45 -5.42,-3.07 -3.68,-0.95 z",name:"Alagoas"},"BR-AM":{path:"m 166.08257,47.551144 0.72,0.78 0.75,0.34 0.61,0.01 1.13,-0.42 0.63,0.11 0.06,0.96 1.21,1.17 0.97,0.37 0.88,-0.21 1.36,0.11 1.95,0.95 0.49,0.66 -0.91,3.32 -0.71,1.5 2.73,3.74 1.66,4.76 0.19,2.26 0.87,1.12 0.05,0.45 -1.62,1.46 0.36,1.59 0.66,1.58 -0.77,3.04 -0.57,0.96 0.29,4.98 0.88,2.17 1.22,0.84 0.58,0.9 1.13,4.33 -0.06,0.58 -1.14,1.32 -1.84,-0.33 -0.14,1.14 5.01,4.42 0.52,0.04 1.96,1.31 1.48,1.649996 1.04,2.04 0.53,0.07 1.34,-0.42 2.36,1.04 -0.44,-2.11 0.75,-2.289996 0.25,-1.73 -0.37,-1.8 0.82,-2.97 1.02,-1.26 1.28,-0.69 2.09,-0.71 0.55,-0.89 1.6,-0.06 2.83,0.93 1.87,2.04 0.92,2.51 1.82,0.23 1.25,-0.46 1.41,-1.41 2.03,-0.55 0.42,-0.39 0.02,-0.53 -1.14,-1.41 -0.23,-0.73 0.11,-0.66 1.15,-2.64 0.07,-1.13 1.66,-3.03 2.33,-3.26 -0.03,-0.68 18.49,0.07 0,0 0.4,4.86 -0.43,1.45 0.18,2.27 0.24,0.68 1.7,0.85 0.18,0.41 -0.35,0.69 -0.05,2.11 1.83,1.99 0.36,0.19 0.7,-0.18 1.84,1.23 0.55,1.83 0.04,0.93 0.3,0.45 4.64,3.769996 4.58,2.54 0.63,0.9 1.35,1.09 1.88,0.67 2.37,1.31 2.26,0.65 1.36,0.15 1.32,0.82 0.08,0.61 1.27,1.34 2.7,1.44 1.1,2.17 1.87,0.79 0.85,-0.61 1.38,-0.35 0.19,0.48 -0.13,0.78 1.81,1.67 -29.9,64.24 -0.78,1.31 -1.45,1.13 -0.58,0.97 -0.03,1.13 0.82,2.33 0.38,0.57 1.07,0.58 1.58,1.56 0.64,1.26 0.15,1.96 0.57,0.57 0,0 -1.18,1.2 -0.2,0.61 -0.06,0.76 0.34,0.84 -0.27,1.01 -1.2,1.82 -0.86,0.64 -0.42,0.85 0.1,0.85 0.66,1.37 0.46,1.94 -1.38,4.22 -1.18,5.22 -1.21,0.73 -47.85,0.32 0,0 0.04,-0.7 -0.36,-0.38 -1.39,-0.28 -1.92,1.08 -0.54,1.74 -0.68,0.19 -3.24,-1.48 -0.68,-2.88 -0.62,-0.2 -0.98,0.13 -0.46,-0.21 -1.25,-3.27 -2.54,-0.98 -1.33,-1.27 -0.8,-1.91 -0.45,-0.49 -2.15,-1.13 -10.79,0.06 -1.38,2.56 -1.72,0.5 0.09,1.17 -0.26,0.22 -2.48,0.53 -1.19,1.59 -0.05,0.67 0.9,0.7 0.17,0.45 -0.36,1.02 -0.81,1.15 -2.06,1.21 -0.11,1.81 0.24,1.46 -3.87,-0.46 -2.13,0.38 -1.2,1.07 -1.79,-0.1 -0.84,-0.55 -0.46,-0.02 -1.75,1.26 -0.53,0.84 0.26,1.75 -2.54,3.16 -0.68,0.08 -0.68,-0.53 -0.64,-2.26 -0.38,-0.09 -1.84,1.02 -1.3,1.21 -1.37,0.39 -0.77,-0.13 -1.08,0.5 -0.41,0.53 -0.13,0.72 -1.22,0.79 -0.37,0.02 -2.31,-2.33 -0.72,-0.37 -2.87,0.33 -3.96,-0.26 0.16,1.29 -0.15,0.56 -1.55,1.81 -1.92,0.58 -3.26,2.56 0,0 -28.509996,-12.13 -26.44,-14.17 -12.14,-3.14 -23.66,-5.66 -17.95,-7.48 0,0 -0.07,-0.65 0.7,-2.92 1.22,-1.4 4.92,-3.47 2.26,-0.24 0.47,-0.3 0.98,-1.56 0.08,-1.03 -1.74,-4.49 0.38,-1.19 1.18,-2.19 1.28,-1.32 0.92,-1.25 0.42,-0.98 0.3,-1.74 -0.29,-1.32 0.67,-2.04 0.31,-2.31 0.73,-0.75 3.66,-1.63 2.19,-1.23 1.15,-1.04 0.44,-1.4 0.78,-0.37 1.41,-0.11 1.65,-0.93 3.54,-2.73 2.42,-0.43 1.51,0.29 4.19,-1.22 1.5,-0.77 1.82,-0.36 3.33,0.38 1.3,-1.59 0.63,-1.45 1.09,-0.61 2.14,0.2 0.64,0.54 1.32,-0.24 1.1,-0.74 1.71,0.12 0.31,0.53 -0.02,1.18 1.61,1.29 2.83,0.08 0.58,-0.4 0.46,-0.78 -0.11,-0.39 1.17,-4.92 6.7,-37.17 1.16,-2.92 -0.99,-4.959996 0.12,-0.26 -1.3,-1.05 -1.48,-2.75 -0.04,-0.49 0.65,-1.39 -0.52,-1.78 -0.37,-0.4 -1.7,-0.59 -3.03,-2.35 -1.94,-2.28 0.2,-11.51 3.89,-0.26 1.75,-1.17 3.5,-0.92 2.68,1.76 1.22,0.11 1.27,-0.43 -0.49,-1.69 0.3,-1.72 -1.37,-2.1 -0.57,-0.54 -1.15,-0.6 -1.51,0.53 -2.79,-0.61 -3.57,0.09 -0.06,-9.9 0.96,0.04 1.32,-0.58 2.28,-0.6 2.84,0.87 19.03,0.06 -0.46,-0.66 -0.79,-0.14 -0.38,-1.2 0.95,-1.93 1.43,0.4 0.61,1.52 0.87,1.32 0.66,0.35 0.83,0.01 1.61,-0.61 1.94,-2.09 0.32,-0.84 1.259996,-1.24 2.55,-1.39 1.29,0.46 1.17,2.58 1.62,1.99 0.74,1.3 0.66,1.78 0.23,1.55 -0.49,3.63 0.2,1.76 3.2,-0.75 8.31,7.06 0.79,0.28 2.5,0.21 2.3,-1 1.7,-1.7 2.11,-1.16 2.19,-0.11 0.56,0.29 0.77,1.08 -0.02,0.97 -1.11,1.7 0.37,0.98 0.58,0.27 1.33,-0.72 0.56,-0.91 0.23,-1.29 1,-1.16 0.47,-0.23 1,0.18 0.55,-0.18 0.41,-0.66 0.46,-2.31 0.51,-0.37 1.51,-0.36 2.93,-1.77 0.97,0.55 0.93,-0.29 1.6,-1.04 1.02,-1.61 2.11,-1.21 2.03,0.55 2.36,-1.65 0.55,-0.82 0.44,-2.66 -0.03,-1.29 0.77,-0.92 1.03,-0.42 1.74,-0.02 1.34,-0.39 2.06,-1.6 0.96,-0.37 2.28,-0.3 z",name:"Amazonas"},"BR-AP":{path:"m 345.24257,99.961144 -0.94,-0.06 -0.77,0.339996 -1.3,0.12 -2.79,-0.679996 -1.45,-1.03 -0.43,-1.5 -1.87,-1.39 -0.11,-1.3 0.21,-0.69 -0.31,-1.58 -0.33,-0.47 -0.95,-0.19 -0.41,-0.94 0.08,-2.43 -2.93,-3.28 -0.78,0.36 -0.82,-0.19 -1.5,-3.48 0.13,-1.58 -0.59,-1.81 -0.62,-0.56 -0.67,-1.51 -0.19,-2.11 0.43,-3.14 -0.17,-0.33 -2.57,-0.73 -2.02,-2.26 -0.76,-2.83 0.19,-0.72 0.68,-0.23 -0.49,-1.18 -0.68,0.03 -2.84,-2.66 -0.94,0.14 -0.38,0.42 -1.33,0.14 -0.84,-0.27 -0.8,-0.98 -1.14,-0.84 -1.19,-0.12 -0.49,-1.28 -0.67,-0.8 -1.93,-1.05 -1.29,-0.49 -3.39,-0.37 -1.08,0.29 -1.17,-0.02 -0.31,-0.54 -0.24,-1.44 0.25,-4.54 0.62,-1.3 -0.37,-2.3 -0.62,-0.57 0,0 0.35,-0.21 0.99,0.3 -0.01,0.81 -0.29,0.18 0.34,0.97 1.47,-0.06 0.82,0.23 0.35,0.9 0.84,0.71 2.25,0.78 3.29,0.75 2.76,-1.78 0.35,-0.76 1.73,-1.17 0.83,-0.29 0.69,0.94 2.71,0.94 1.08,-0.12 1.72,-1.01 0.12,-0.42 0.32,0.03 1.46,1.3 -0.2,0.87 2.37,-0.17 0.51,0.5 0.95,0.17 0.62,-0.01 0.91,-0.48 1.67,-1.5 1.78,-1.1 1.75,-2.3 0.37,-1 -0.2,-0.54 3.13,-6.5 0.11,-1.82 1.11,-1.3 0.73,-0.19 3.6,-5.79 0.23,-1.15 0.84,-1.2 1.79,-1.55 0.63,-1.66 2.11,-1.14 0.47,-0.92 1.04,-0.58 0.56,1.46 0.88,1.36 -1.67,-4.8 -0.07,-1.29 0.18,-0.33 3.37,2.42 1.14,1.21 0.91,1.22 0.52,1.19 0.03,1.58 0.44,0.31 0.32,-0.48 0.38,-0.1 0.21,0.4 0.21,7.89 0.66,3.87 2.71,6.05 2.66,8.94 3.32,5 1.01,0.35 3.27,-0.08 2.78,0.94 1.29,0.85 0.77,2.65 -0.16,3.33 -1.29,0.96 -1.73,0.43 -0.38,0.33 1.79,-0.15 1.04,-0.42 0.28,0.23 0.12,0.59 -0.17,0.73 -5.03,4.06 -1.17,2.1 -2.15,1.41 -1.94,3.72 -2.91,3.5 -0.7,0.46 -0.94,-0.09 -1.45,0.52 -2.08,2.98 0,0 -1.34,0.07 -0.75,0.9 0,0 -1.47,1.68 -0.97,2.22 -1.12,1.87 -0.84,0.65 -3.01,3.45 -0.36,2.4 0.17,1.8 -1.95,1.81 -0.98,0.12 z m 23.36,-46.99 -0.45,-0.33 -1.1,-1.86 0.07,-0.88 0.23,-0.41 1.66,-0.45 0.43,0.39 0.83,2.27 -0.99,1.1 -0.68,0.17 z m 2.49,17.61 -0.4,-0.25 -0.08,-0.71 1.11,-1.1 0.88,-0.15 1.25,0.24 0.46,-0.11 0.44,-0.64 0.05,0.59 -0.97,1.44 -0.99,0.5 -1.75,0.19 z m 3.44,-2.87 -0.78,-0.23 0,-0.56 0.72,-1.04 1.25,-0.1 0.18,0.35 -0.1,0.51 -1.27,1.07 z m -7.19,-18.42 -0.76,-0.5 0.26,-0.83 0.88,-0.17 0.86,0.32 0.01,0.73 -1.25,0.45 z",name:"Amapá"},"BR-BA":{path:"m 527.76257,365.59114 -0.36,-0.83 0.68,-1.35 -0.01,-0.53 -0.53,-1.04 -4.13,-3.05 -0.15,-0.51 0.22,-1.51 -0.57,-1.23 -0.65,0.24 -0.2,0.45 -0.34,0.18 -0.22,-0.25 0.53,-4.4 0.82,-3.3 0.82,-0.88 2.47,0.24 1.02,-0.71 0,-0.42 -0.56,-1.02 0.16,-2.65 4.96,-4.22 1.47,-3.08 -0.42,-1.17 -0.78,-1.02 -0.89,-0.06 -0.73,-0.38 -2.83,-2.47 -2.12,0.02 -2.19,-0.6 -2.27,-1.08 -2.73,-0.56 -1.98,-0.14 -1.32,0.99 -1.47,0.5 -2.61,-0.45 -0.57,0.21 -0.44,-3.96 -6.52,-6.2 -0.38,-0.18 -4.39,1.23 -1.53,-1.24 -0.51,0.21 -0.93,-0.22 -2.54,-1.22 -2.17,-1.62 -0.98,0.18 -4.35,-3.63 -1.1,-0.54 -2.73,-0.75 -1.77,0.25 -1.88,0.9 -0.81,1.12 -0.64,0.18 -5.33,-1.47 -0.61,-0.49 -0.26,-1.5 0.14,-0.89 1.29,-2.74 -0.86,-0.46 -2.28,-0.52 -2.18,-0.04 -1.2,-0.5 -1.79,-0.08 -3.83,1.58 -4.26,3.03 -0.64,1.11 -3.37,1.87 -2.02,0.4 -0.95,1.18 -1.81,1.55 -1.43,0.52 -1,-0.15 -1.85,2.58 -1.04,0.77 -2.13,-0.38 -0.72,0.13 -0.69,1 -1.34,0.92 -0.4,-0.24 1.43,-3.43 -0.51,-2.41 0,0 1.48,-1.97 0.25,-0.77 -0.23,-1.27 -0.67,-1.72 0.1,-0.67 0.71,-1.42 -0.05,-0.46 -3.21,-2.62 -1.69,-3.46 -0.62,-3.52 0.05,-1.55 1.2,-3.83 1.59,-1.03 0.23,-0.38 0.06,-0.94 -1.63,-0.84 -0.11,-0.33 0.48,-2.52 1.43,-1.06 -0.02,-0.37 -2.72,-2.46 0,0 -0.04,-0.93 1.36,-2.38 -0.04,-1.07 -0.17,-0.42 -1.46,-0.49 -0.94,-0.65 -0.35,-1.26 0.06,-2.92 0.19,-0.85 1.95,-1.67 1.14,-0.42 0.96,-0.72 -0.29,-0.63 -0.58,-0.52 -0.92,-0.29 -1.03,0.18 -0.35,-0.33 -0.09,-0.5 0.42,-0.96 2.04,-0.82 0.56,-0.45 -0.04,-0.76 -1.88,-0.98 -3.58,-0.67 -1.86,-1.96 -0.23,-0.92 0.5,-1.16 1.01,-0.73 1.52,-3.48 0.9,-0.61 1.01,-0.27 0.35,-0.38 -1.29,-1.8 0.19,-0.37 3.21,-2.62 3.82,-2.02 0.56,-0.47 0.22,-0.98 0.69,-0.65 0,0 2.33,-0.02 1.44,1.34 0.66,1.04 0.53,2.21 1.76,2.49 4.18,1.86 1.8,-0.52 2.11,0.18 0.33,-0.21 0.75,-1.45 1.14,-0.37 0.67,-0.87 1.17,-0.89 2.21,-0.75 1.33,0.17 1.48,0.53 1.35,-0.42 2.97,-2.42 2.95,-5.05 0.72,-0.86 0.24,-0.92 0.3,-2.56 -0.12,-1.16 -2.24,-4.43 0.05,-0.93 3.24,-1.65 1.95,-0.02 1.5,0.46 0.41,0.93 0.32,0.18 2.12,-0.43 1.39,-0.54 1.33,0.38 1.71,0.99 -0.13,0.65 0.19,0.29 0.82,0.28 3,-0.11 1.47,-0.64 1.7,-0.1 0.82,-1.22 1.51,-1.34 2.73,-0.34 0.77,-0.36 0.81,-0.98 2.17,0.01 0.62,0.63 0.31,0.05 1.86,-1.81 -0.1,-2.4 1.99,-0.38 0.79,0.18 1.05,-0.66 1.5,-2.31 0.46,-1.15 0,0 0.89,0.4 1.16,-0.27 2.2,0.29 2.82,1.39 0.44,0.51 -0.06,2.73 0.72,1.94 2.21,0.91 0.27,2 -0.92,1.68 1.83,0.62 0.96,-0.22 0.82,-0.92 2.87,-0.88 0.77,-3.58 0.5,-0.87 0.75,-0.16 0.78,0.53 0.63,0.05 2.39,-1.02 1.1,-1.24 0.17,-0.59 -0.25,-1.36 0.29,-0.25 2.24,-0.45 0.77,-2.05 1.65,-0.44 2.53,-1.46 0.59,-0.1 1.49,0.56 0.83,1.44 1.36,0.81 2.36,0.78 2.99,0.4 1.58,1.15 0.54,1.65 0.39,0.27 0.43,-0.15 0.29,-1.75 0.43,-0.44 1,-0.01 0.45,0.32 0.02,0.63 -0.62,0.88 0.45,0.83 0.5,0.37 2.1,0.86 0.02,0.94 1.22,3.05 0,0 0.54,1.4 1.02,0.29 0.45,-0.09 1.43,0.79 0.2,0.72 0,0 -0.67,1.16 0.21,2.14 1.28,2.5 1.99,1.95 0.75,1.15 -0.08,3.12 -0.66,1.62 -0.09,0.88 0.76,2.75 -0.3,0.58 -0.69,0.55 -2.55,1 -1.13,-0.75 -1.71,-0.01 -0.32,0.3 -0.59,1.58 0.02,0.77 0.95,1.6 1.1,0.66 0.52,1.49 1.43,1.51 0.15,0.39 -0.13,1.42 -0.34,0.39 0.12,0.42 0.59,0.52 1.93,0.92 0.48,0.71 0.54,0.34 1.55,0.64 2.89,-0.88 0,0 0.64,-0.02 0.36,0.41 -4.08,8.83 -3.83,5.19 -1.03,2.33 -5.03,5.74 -2.45,1.26 -0.87,-0.01 0.3,-1.43 0.37,-0.15 0.14,-1.1 -0.45,-1.93 -1.87,-0.25 -0.43,-1.3 -0.68,-0.75 -0.37,0.6 -0.46,2.33 -0.5,0.87 -0.55,0.38 -0.56,-0.29 -0.49,-1.74 0.11,-0.32 0.31,-0.13 -0.03,-0.39 -0.87,1.29 0.93,1.69 0.46,0.23 0.37,-0.15 1.15,0.26 -0.46,1.81 -1.21,1.15 -0.25,1.82 -1.25,0.97 -0.35,0.67 -0.2,0.84 0.18,0.85 -1.35,-0.39 -0.21,0.39 -0.36,2.52 0.36,-0.72 0.75,0.21 0.24,0.54 -0.23,0.41 0.06,0.62 0.3,0.3 0.33,1 -1.04,2.51 0.57,3.44 -0.55,0.49 -0.57,-0.22 -0.14,1.13 0.59,0.46 1.21,-1.72 -0.47,-2.21 0.82,-0.61 0.25,0.54 -0.06,1.76 -0.96,2.61 -0.74,5.43 -0.51,1.81 0.2,2.47 0.78,2.85 0.19,4.54 0.87,6.41 0.99,3.42 -2.21,6.66 -1.35,6.65 -0.