@syncfusion/ej2-maps 22.2.12 → 23.1.38
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/CHANGELOG.md +13 -1
- package/dist/ej2-maps.min.js +3 -3
- package/dist/ej2-maps.umd.min.js +3 -3
- package/dist/ej2-maps.umd.min.js.map +1 -1
- package/dist/es6/ej2-maps.es2015.js +69 -22
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +69 -22
- package/dist/es6/ej2-maps.es5.js.map +1 -1
- package/dist/global/ej2-maps.min.js +3 -3
- package/dist/global/ej2-maps.min.js.map +1 -1
- package/dist/global/index.d.ts +2 -2
- package/package.json +13 -13
- package/src/maps/layers/bubble.js +3 -3
- package/src/maps/layers/data-label.d.ts +1 -0
- package/src/maps/layers/data-label.js +32 -3
- package/src/maps/layers/layer-panel.js +7 -4
- package/src/maps/layers/marker.js +2 -2
- package/src/maps/maps.js +13 -2
- package/src/maps/model/base-model.d.ts +7 -0
- package/src/maps/model/base.d.ts +6 -0
- package/src/maps/model/base.js +3 -0
- package/src/maps/user-interaction/zoom.js +10 -10
- package/src/maps/utils/helper.js +4 -3
package/dist/ej2-maps.umd.min.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: ej2-maps.umd.min.js
|
|
3
|
-
* version :
|
|
4
|
-
* Copyright Syncfusion Inc. 2001 -
|
|
3
|
+
* version : 23.1.38
|
|
4
|
+
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
|
7
7
|
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
|
8
8
|
* applicable laws.
|
|
9
9
|
*/
|
|
10
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-svg-base"),require("@syncfusion/ej2-data"),require("@syncfusion/ej2-pdf-export")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-svg-base","@syncfusion/ej2-data","@syncfusion/ej2-pdf-export"],t):t(e.ej={},e.ej2Base,e.ej2SvgBase,e.ej2Data,e.ej2PdfExport)}(this,function(e,t,i,o,a){"use strict";function n(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function l(e){e.element.style.height=t.isNullOrUndefined(e.height)?"auto":e.height,e.element.style.width=t.isNullOrUndefined(e.width)?"auto":e.width,e.element.style.setProperty("display","block");var i=e.element.clientWidth,o=e.element.clientHeight,a=n(e.element.style.width,i),l=n(e.element.style.height,o);new Re(0,0);return"0px"===e.width||"0%"===e.width||"0%"===e.height||"0px"===e.height?new Re(0,0):new Re(n(e.width,i)||i||a||600,n(e.height,o)||o||l||(e.isDevice?Math.min(window.innerWidth,window.innerHeight):450))}function r(e){e.renderer=new i.SvgRenderer(e.element.id),e.availableSize=l(e),e.svgObject=e.renderer.createSvg({id:e.element.id+"_svg",width:e.availableSize.width,height:e.availableSize.height}),"0px"!==e.width&&"0%"!==e.width&&"0%"!==e.height&&"0px"!==e.height||(e.svgObject.setAttribute("height","0"),e.svgObject.setAttribute("width","0"))}function s(e,t,i){var o=i.getBoundingClientRect(),a=i.ownerDocument.defaultView.pageXOffset,n=i.ownerDocument.defaultView.pageYOffset,l=i.ownerDocument.documentElement.clientTop,r=i.ownerDocument.documentElement.clientLeft,s=o.left+a-r,d=o.top+n-l;return new $e(e-s,t-d)}function d(e){return e*(Math.PI/180)}function p(e){return e*(180/Math.PI)}function h(e,i,o,a,n){var l,r,s,h,m,f,b=new Re(n.mapAreaRect.width,n.mapAreaRect.height),S=n.baseMapBounds.longitude,x=n.baseMapBounds.latitude,O=d(e),_=d(i),C=n.projectionType,M=n.isTileMap?256*Math.pow(2,1):t.isNullOrUndefined(o)?Math.min(b.width,b.height):Math.min(b.width,b.height)*o;if("Normal"===a.geometryType)l=t.isNullOrUndefined(o)?i:Math.abs((i-S.min)*o),r=t.isNullOrUndefined(o)?e:Math.abs((x.max-e)*o);else if("Geographic"===a.geometryType){switch(C){case"Mercator":var L=new Ze(M/2,M/2);l=L.x+i*(M/360);var P=v(Math.sin(d(e)),-.9999,.9999);r=L.y+.5*Math.log((1+P)/(1-P))*(-M/(2*Math.PI));break;case"Winkel3":m=((s=g(_,O)).x+_/(Math.PI/2))/2,h=(s.y+O)/2;break;case"Miller":m=_,h=1.25*Math.log(Math.tan(Math.PI/4+.4*O));break;case"Eckert3":m=2/(f=Math.sqrt(Math.PI*(4+Math.PI)))*_*(1+Math.sqrt(1-4*O*O/(Math.PI*Math.PI))),h=4/f*O;break;case"AitOff":m=(s=g(_,O)).x,h=s.y;break;case"Eckert5":m=_*(1+Math.cos(O))/Math.sqrt(2+Math.PI),h=2*O/Math.sqrt(2+Math.PI);break;case"Equirectangular":m=_,h=O;break;case"Eckert6":f=(1+Math.PI/2)*Math.sin(O);for(var w=1/0,T=0;T<10&&Math.abs(w)>1e-6;T++)O-=w=(O+Math.sin(O)-f)/(1+Math.cos(O));f=Math.sqrt(2+Math.PI),m=_*(1+Math.cos(O))/f,h=2*O/f}l="Mercator"===C?l:y(c(n,p(m)),3),r="Mercator"===C?r:-y(u(n,p(h)),3)}return new Ze(l,r)}function m(e,t,i,o){var a=256*Math.pow(2,t),n=(e.x+180)/360,l=Math.sin(e.y*Math.PI/180),r=.5-Math.log((1+l)/(1-l))/(4*Math.PI),s=e.x,d=e.y;return o&&(s=n*a+.5+i.x,d=r*a+.5+i.y),{x:s,y:d}}function c(e,i){var o=e.baseMapBounds.longitude,a=t.isNullOrUndefined(e.baseSize)?e.mapAreaRect.width:e.mapAreaRect.width+Math.abs(e.baseSize.width-e.mapAreaRect.width)/2;return Math.round(a*(i-o.min)/(o.max-o.min)*100)/100}function u(e,t){var i=e.baseMapBounds.latitude;return Math.round(e.mapAreaRect.height*(t-i.min)/(i.max-i.min)*100)/100}function g(e,t){var i=Math.cos(t),o=f(b(i*Math.cos(e/=2)));return new Ze(2*i*Math.sin(e)*o,Math.sin(t)*o)}function y(e,t){var i=Math.pow(10,t);return Math.round(e*i)/i}function f(e){return e/Math.sin(e)}function b(e){return Math.acos(e)}function v(e,i,o){return t.isNullOrUndefined(i)||(e=Math.max(e,i)),t.isNullOrUndefined(o)||(e=Math.min(e,o)),e}function S(e,i,o,a){t.createElement("a",{attrs:{download:e+"."+i.toLocaleLowerCase(),href:o}}).dispatchEvent(new MouseEvent(a?"click":"move",{view:window,bubbles:!1,cancelable:!0}))}function x(e,i){var o=document.getElementById("mapsmeasuretext");return null===o&&(o=t.createElement("text",{id:"mapsmeasuretext"}),document.body.appendChild(o)),o.innerText=e,o.style.position="absolute","number"==typeof i.size?o.style.fontSize=i.size+"px":o.style.fontSize=i.size,o.style.fontWeight=i.fontWeight,o.style.fontStyle=i.fontStyle,o.style.fontFamily=i.fontFamily,o.style.visibility="hidden",o.style.top="-100",o.style.left="0",o.style.whiteSpace="nowrap",o.style.lineHeight="normal",new Re(o.clientWidth,o.clientHeight)}function O(e,t,o,a,n){void 0===n&&(n=!1);var l,r,s={id:e.id,x:e.x,y:e.y,fill:o,"font-size":t.size,"font-style":t.fontStyle,"font-family":t.fontFamily,"font-weight":t.fontWeight,"text-anchor":e.anchor,transform:e.transform,opacity:t.opacity,"dominant-baseline":e.baseLine},d="string"==typeof e.text||"number"==typeof e.text?e.text:n?e.text[e.text.length-1]:e.text[0],p=new i.SvgRenderer(""),h=p.createText(s,d);if(h.style["user-select"]="none",h.style["font-family"]=t.fontFamily,h.style["font-size"]=t.size,h.style["font-weight"]=t.fontWeight,h.style["font-color"]=t.color,h.style["-moz-user-select"]="none",h.style["-webkit-touch-callout"]="none",h.style["-webkit-user-select"]="none",h.style["-khtml-user-select"]="none",h.style["-ms-user-select"]="none",h.style["-o-user-select"]="none","string"!=typeof e.text&&e.text.length>1)for(var m=1,c=e.text.length;m<c;m++)r=x(e.text[m],t).height,l=p.createTSpan({x:e.x,id:e.id,y:e.y+(n?-m*r:m*r)},n?e.text[e.text.length-(m+1)]:e.text[m]),h.appendChild(l);return a.appendChild(h),h}function _(e,i,o,a,n){var l=t.createElement("div",{id:i,className:n.element.id+"_marker_template_element"});l.style.cssText="position: absolute;pointer-events: auto;";for(var r=e.length;r>0;)l.appendChild(e[0]),r--;for(var s=l.innerHTML,d=Object.keys(o),p=RegExp,h=0;h<d.length;h++)"object"==typeof o[d[h]]?s=M(s,"",o,n):"latitude"!==d[h].toLowerCase()&&"longitude"!==d[h].toLowerCase()&&(s=s.replace(new p("{{:"+d[h]+"}}","g"),o[d[h].toString()]));return l.innerHTML=s,l}function C(e,t){return t.format&&!isNaN(Number(e))?t.intl.getNumberFormat({format:t.format,useGrouping:t.useGroupingSeparator})(Number(e)):e}function M(e,t,i,o){for(var a=""===e?t:e,n=""===e?a.split("${"):a.split("{{:"),l=RegExp,r=0;r<n.length;r++)if(n[r].indexOf("}}")>-1&&n[r].indexOf(".")>-1||n[r].indexOf("}")>-1&&n[r].search(".")>-1)for(var s=""===e?n[r].split("}"):n[r].split("}}"),d=0;d<s.length;d++)if(s[d].indexOf(".")>-1){var p=w(i,s[d]).toString();a=""===e?a.split("${"+s[d]+"}").join(C(p,o)):a.replace(new l("{{:"+s[d]+"}}","g"),p)}return a}function L(e,i,o,a,n){for(var l=(t.isNullOrUndefined(e.childElementCount)?e[0]:e).outerHTML,r=Object.keys(o),s=RegExp,d=0;d<r.length;d++)l=l.replace(new s("{{:"+r[d]+"}}","g"),o[r[d].toString()]);var p=t.createElement("div",{id:i,innerHTML:l});return p.style.position="absolute",p}function P(e,i,o,a,n,l,r){var s,d,p,h,m=n.size,c=n.borderColor,u=parseFloat(n.borderWidth),g=parseFloat(n.borderOpacity),y=n.fill,f=n.dashArray,b={color:c,width:u,opacity:g},v=n.opacity,S=new Ge(a,y,u,c,v,g,f,"");if(m.width="string"==typeof m.width?parseInt(m.width,10):m.width,m.height="string"==typeof m.height?parseInt(m.height,10):m.height,"Circle"===e){var x=(m.width+m.height)/4,O=new qe(a,y,b,v,o.x,o.y,x,f);s=r.renderer.drawCircle(O)}else"Rectangle"===e?(d=o.x-m.width/2,p=o.y-m.height/2,h=new Xe(a,y,b,v,new et(d,p,m.width,m.height),null,null,"",f),s=r.renderer.drawRectangle(h)):"Image"===e?(d=o.x-m.width/2,p=o.y-(a.indexOf("cluster")>-1?m.height/2:m.height),t.merge(S,{href:i,height:m.height,width:m.width,x:d,y:p}),s=r.renderer.drawImage(S)):s=Z(r,e,S,m,o,l);return s}function w(e,i){if(!t.isNullOrUndefined(e)&&!t.isNullOrUndefined(i)){var o=i.replace(/\[/g,".").replace(/\]/g,"").split(".");if(1===o.length)e=e[o[0]];else for(var a=0;a<o.length&&!t.isNullOrUndefined(e);a++)e=e[o[a]]}return e}function T(e,i){var o=t.isNullOrUndefined(e.colorValuePath)?i[e.colorValuePath]:e.colorValuePath.indexOf(".")>-1?w(i,e.colorValuePath).toString():i[e.colorValuePath];return e.fill=t.isNullOrUndefined(e.colorValuePath)||t.isNullOrUndefined(o)?e.fill:e.colorValuePath.indexOf(".")>-1?w(i,e.colorValuePath).toString():i[e.colorValuePath],e}function I(e,i){if(t.isNullOrUndefined(e.shapeValuePath)||t.isNullOrUndefined(i[e.shapeValuePath])){var o=t.isNullOrUndefined(e.shapeValuePath)?e.shape:e.shapeValuePath.indexOf(".")>-1?w(i,e.shapeValuePath).toString():e.shape;e.shape=""!==o.toString()?o:e.shape;var a=t.isNullOrUndefined(e.imageUrlValuePath)?e.imageUrl:e.imageUrlValuePath.indexOf(".")>-1?w(i,e.imageUrlValuePath).toString():t.isNullOrUndefined(i[e.imageUrlValuePath])?e.imageUrl:i[e.imageUrlValuePath];e.imageUrl=a}else{var n=e.shapeValuePath.indexOf(".")>-1?w(i,e.shapeValuePath).toString():i[e.shapeValuePath];e.shape=""!==n.toString()?n:e.shape,"Image"===i[e.shapeValuePath]&&(e.imageUrl=t.isNullOrUndefined(e.imageUrlValuePath)?e.imageUrl:e.imageUrlValuePath.indexOf(".")>-1?w(i,e.imageUrlValuePath).toString():t.isNullOrUndefined(i[e.imageUrlValuePath])?e.imageUrl:i[e.imageUrlValuePath])}return e}function k(e,i,o,a,n,l,r,s){var d,p,c,u,g,y,f,b=[],v=[],S=0,x=0,_=e.markerClusterSettings.labelStyle,C=0,M=[],L=e.markerClusterSettings,T=o.renderer.createGroup({id:o.element.id+"_LayerIndex_"+a+"_markerCluster"}),I={cancel:!1,name:Xt,fill:L.fill,height:L.height,width:L.width,imageUrl:L.imageUrl,shape:L.shape,data:void 0,maps:o,cluster:L,border:L.border};o.trigger("markerClusterRendering",I,function(L){for(var k=0;k<i.childElementCount;k++)if(M=[],"hidden"!==i.childNodes[k].style.visibility){if(f=i.childNodes[k],d=f.getBoundingClientRect(),M.push(k),!t.isNullOrUndefined(d)){for(var N=k+1;N<i.childElementCount;N++)"hidden"!==i.childNodes[N].style.visibility&&(f=i.childNodes[N],p=f.getBoundingClientRect(),t.isNullOrUndefined(p)||d.left>p.right||d.right<p.left||d.top>p.bottom||d.bottom<p.top||(b.push(p),i.childNodes[N].style.visibility="hidden",M.push(N)));if(S=d.left+d.width/2,x=d.top+d.height,b.length>0){M=M.filter(function(e,t,i){return i.indexOf(e)===t});var F=o.element.getBoundingClientRect();S-=F.left,x-=o.availableSize.height<=F.height?F.top:F.bottom-F.top;o.isTileMap?new Object:$(o,e,!1);var E=parseInt(i.childNodes[k].id.split("_dataIndex_")[1].split("_")[0],10),z=parseInt(i.childNodes[k].id.split("_MarkerIndex_")[1].split("_")[0],10),A=e.markerSettings[z],B=A.dataSource[E],U=void 0,j=t.isNullOrUndefined(A.longitudeValuePath)?t.isNullOrUndefined(B.longitude)?t.isNullOrUndefined(B.Latitude)?0:parseFloat(B.Latitude):parseFloat(B.longitude):Number(w(B,A.longitudeValuePath)),R=t.isNullOrUndefined(A.latitudeValuePath)?t.isNullOrUndefined(B.latitude)?t.isNullOrUndefined(B.Latitude)?0:parseFloat(B.Latitude):parseFloat(B.latitude):Number(w(B,A.latitudeValuePath));o.isTileMap?o.isTileMap&&!o.zoomSettings.enable&&(U=m(new Ze(j,R),o.tileZoomLevel,o.tileTranslatePoint,!0)):U=h(R,j,o.mapLayerPanel.calculateFactor(e),e,o),i.childNodes[k].style.visibility="hidden";var Z=e.markerClusterSettings;I.cancel?((y={size:new Re(Z.width,Z.height),fill:Z.fill,borderColor:Z.border.color,borderWidth:Z.border.width,opacity:Z.opacity,dashArray:Z.dashArray}).fill=Z.fill,y.size.width=Z.width,y.size.height=Z.height,y.imageUrl=Z.imageUrl,y.shape=Z.shape,y.borderColor=Z.border.color,y.borderWidth=Z.border.width,y.borderOpacity=t.isNullOrUndefined(Z.border.opacity)?Z.opacity:Z.border.opacity):((y={size:new Re(Z.width,Z.height),fill:Z.fill,borderColor:Z.border.color,borderWidth:Z.border.width,opacity:Z.opacity,dashArray:Z.dashArray}).fill=I.fill,y.size.width=I.width,y.size.height=I.height,y.imageUrl=I.imageUrl,y.shape=I.shape,y.borderColor=I.border.color,y.borderWidth=I.border.width,y.borderOpacity=t.isNullOrUndefined(I.border.opacity)?Z.opacity:I.border.opacity),S=o.isTileMap?S:i.id.indexOf("_Markers_Group")>-1?S:S+3.75-I.width/2,x=o.isTileMap?x:i.id.indexOf("_Markers_Group")>-1?x:x-I.height/2,o.isTileMap&&!o.zoomSettings.enable&&(S=U.x,x=U.y);var D=o.element.id+"_LayerIndex_"+a+"_MarkerIndex_"+z+"_dataIndex_"+E+"_cluster_"+C,V=o.element.id+"_LayerIndex_"+a+"_MarkerIndex_"+z+"_dataIndex_"+E+"_cluster_"+C+"_datalabel_"+C;C++;var H=P(y.shape,y.imageUrl,{x:0,y:0},D,y,n,o);H.setAttribute("transform","translate( "+S+" "+x+" )"),"Balloon"===I.shape?H.children[0].textContent=M.toString():H.textContent=M.toString(),c=new He(V,0,3.75,"middle",(b.length+1).toString(),"",""),(u=O(c,_,_.color,n)).setAttribute("transform","translate( "+S+" "+x+" )"),T.appendChild(u),T.appendChild(H)}}b=[]}l.appendChild(T),o.svgObject.appendChild(l),o.element.appendChild(o.svgObject);for(k=0;k<T.childElementCount;k++)if("hidden"!==T.childNodes[k].style.visibility&&(f=T.childNodes[k],d=f.getBoundingClientRect(),!(t.isNullOrUndefined(d)||f.id.indexOf("_datalabel_")>-1))){for(N=k+1;N<T.childElementCount;N++)"hidden"!==T.childNodes[N].style.visibility&&(g=T.childNodes[N],p=g.getBoundingClientRect(),t.isNullOrUndefined(p)||g.id.indexOf("_datalabel_")>-1||d.left>p.right||d.right<p.left||d.top>p.bottom||d.bottom<p.top||(v.push(g),v.push(T.childNodes[N-1]),T.childNodes[N].style.visibility="hidden",T.childNodes[N-1].style.visibility="hidden",M.push(N)));if(v.length>0){f=T.childNodes[k];for(var G=0;G<v.length;G++)"g"===f.tagName?f.childNodes[0].textContent=f.childNodes[0].textContent+","+v[G].textContent:f.textContent=f.textContent+","+v[G].textContent,T.childNodes[k-1].textContent=(+T.childNodes[k-1].textContent+ +v[G+1].textContent).toString(),G++}v=[]}for(;0<T.childNodes.length;)n.insertBefore(T.childNodes[0],n.firstChild);r?l.appendChild(n):(ie(o.element.id+"_Secondary_Element").appendChild(n),l.appendChild(n));var W=document.getElementById(o.element.id+"_LayerIndex_"+a+"_markerCluster");if(t.isNullOrUndefined(W)||W.remove(),s){var X=document.getElementById(o.element.id+"_Layer_Collections");t.isNullOrUndefined(X)||X.appendChild(l)}})}function N(e,i,o){var a=e[0].layerIndex,n=e[0].targetClusterIndex,l=e[0].markerIndex,r=e[0].dataIndex,s=i.element.id+"_LayerIndex_"+a+"_MarkerIndex_"+l,d=i.layers[a].markerSettings[l],p=s+"_dataIndex_"+r+"_cluster_"+n,h="Balloon"===i.layers[a].markerClusterSettings.shape?ne(p+"_Group"):ne(p),m=ne(p+"_datalabel_"+n);h.setAttribute("visibility","visible"),m.setAttribute("visibility","visible");for(var c=e[0].data.length,u=0;u<c;u++)("Balloon"===d.shape&&t.isNullOrUndefined(d.template)?ne(s+"_dataIndex_"+e[0].data[u].index+"_Group"):ne(s+"_dataIndex_"+e[0].data[u].index)).style.visibility="hidden";Q(i.element.id+"_LayerIndex_"+a+"_MarkerIndex_"+l+"_markerClusterConnectorLine")}function F(e,i,o,a){var n=e[0].layerIndex,l=e[0].markerIndex,r=e[0].targetClusterIndex,s=e[0].dataIndex,d=a?ne:o.querySelector.bind(o),p=a?"":"#",h=i.element.id+"_LayerIndex_"+n+"_MarkerIndex_"+l,m=i.layers[n].markerSettings[l],c=h+"_dataIndex_"+s+"_cluster_"+r,u="Balloon"===i.layers[n].markerClusterSettings.shape?d(p+""+c+"_Group"):d(p+""+c),g=d(p+""+c+"_datalabel_"+r);u.setAttribute("visibility","hidden"),g.setAttribute("visibility","hidden");var y="Balloon"===m.shape&&t.isNullOrUndefined(m.template)?d(p+""+h+"_dataIndex_"+s+"_Group"):d(p+""+h+"_dataIndex_"+s),f=y.parentElement.id.indexOf("Template_Group")>-1?y.getBoundingClientRect().height:m.height,b=y.parentElement.id.indexOf("Template_Group")>-1?y.getBoundingClientRect().width:m.width,v=+u.getAttribute("transform").split("translate(")[1].trim().split(" ")[0],S=+u.getAttribute("transform").split("translate(")[1].trim().split(" ")[1].split(")")[0].trim(),x=b+5,O=6.28*x,_=0,C=Math.round(O/b);_+=C;for(var M=e[0].data.length,L=Math.round(f/O*100),P=(L=M<C?100/M:L)/100*360,w=M<C?45:0,T=1,I="M "+v+" "+S+" ",k="",N=0;N<M;N++){if(_===N||Math.round(w)>=360){for(w=0,O=6.28*(x=(b+5)*++T),C=Math.round(O/f),L=Math.round(f/O*100);L*C<100;)C++;P=L/100*360,_+=C}var F=v+x*Math.sin(2*Math.PI*w/360),E=S+x*Math.cos(2*Math.PI*w/360);k+=I+"L "+F+" "+E+" ",(y="Balloon"===m.shape&&t.isNullOrUndefined(m.template)?d(p+""+h+"_dataIndex_"+e[0].data[N].index+"_Group"):d(p+""+h+"_dataIndex_"+e[0].data[N].index)).parentElement.id.indexOf("Template_Group")>-1?(y.style.transform="",y.style.left=i.isTileMap?F-b/2+"px":F-b/2-10+"px",y.style.top=i.isTileMap?E-f/2+"px":E-f/2-10+"px",y.setAttribute("transform","translate( "+F+" "+E+")")):y.setAttribute("transform","translate( "+F+" "+E+")"),y.style.visibility="visible",w+=P}var z=i.layers[n].markerClusterSettings.connectorLineSettings,A={d:k,id:i.element.id+"_LayerIndex_"+n+"_MarkerIndex_"+l+"_dataIndex_"+s+"_markerClusterConnectorLine",stroke:z.color,"fill-opacity":z.opacity,"stroke-opacity":z.opacity,"stroke-width":z.width};o=a?d(i.element.id+"_Markers_Group"):o;var B=i.renderer.createGroup({id:i.element.id+"_LayerIndex_"+n+"_MarkerIndex_"+l+"_markerClusterConnectorLine"});B.appendChild(i.renderer.drawPath(A)),"Balloon"===m.shape?o.insertBefore(B,o.querySelector("#"+h+"_dataIndex_0_Group")):o.insertBefore(B,o.querySelector("#"+h+"_dataIndex_0"))}function E(e,i,o,a,n,l,r,s,d,p,h){var m={size:new Re(e.width,e.height),fill:e.fill,borderColor:e.border.color,borderWidth:e.border.width,opacity:i.opacity,dashArray:i.dashArray,borderOpacity:t.isNullOrUndefined(e.border.opacity)?i.opacity:e.border.opacity};Q(r);var c=P(e.shape,e.imageUrl,{x:0,y:0},r,m,h,p),u=(p.isTileMap?n.x:(n.x+l.x)*d)+s.x,g=(p.isTileMap?n.y:(n.y+l.y)*d)+s.y;c.setAttribute("transform","translate( "+u+" "+g+" )"),A(p.selectedMarkerElementId,p.markerSelectionClass,c,"MarkerselectionMapStyle"),h.appendChild(c);var y=o.length-1===a?"marker":null,f=new Ze(u,g);return i.animationDuration>0&&ge(c,i.animationDelay,i.animationDuration,f,p,y),h}function z(e,t,i,o,a,n,l,r,s,d,p){if((t=ae(e.template,p))&&t(o,p,e.template,p.element.id+"_MarkerTemplate"+a,!1).length){for(var h=_(t(o,p,e.template,p.element.id+"_MarkerTemplate"+a,!1),i,o,0,p),m=0;m<h.children.length;m++)h.children[m].style.pointerEvents="auto";if(h.style.left=(p.isTileMap?l.x:(l.x+r.x)*s)+d.x-p.mapAreaRect.x+"px",h.style.top=(p.isTileMap?l.y:(l.y+r.y)*s)+d.y-p.mapAreaRect.y+"px",n.appendChild(h),"GoogleStaticMap"===p.layers[p.baseLayerIndex].layerType){var c=ie(p.element.id+"_StaticGoogleMap").getBoundingClientRect(),u=h.getBoundingClientRect();(c.x>u.x||c.x+640<u.x+u.width)&&(c.y>u.y||c.y+c.height<u.y+u.height)&&(h.style.display="none")}}return n}function A(e,i,o,a){if(e)for(var n=0;n<e.length;n++)o.getAttribute("id")===e[n]&&(0!==n&&"g"!==o.tagName||(t.isNullOrUndefined(i)||t.isNullOrUndefined(i.id)||document.body.appendChild(i),o.id.indexOf("_MarkerIndex_")>-1&&o.childElementCount>0&&o.children[0].setAttribute("class",a)),o.setAttribute("class",a))}function B(e,i,o,a,n,l,r){if(!ne(e)){var s=t.createElement("style",{id:e});s.innerText="."+i+"{fill:"+o+";opacity:"+a+";stroke-width:"+l+";stroke:"+n+";}",r.shapeSelectionClass=s,document.body.appendChild(s)}}function U(e,t){return t&&t.appendChild(e),e}function j(e,t,i){return U(e.renderer.drawCircle(t),i)}function R(e,t,i){return U(e.renderer.drawRectangle(t),i)}function Z(e,t,i,o,a,n){var l;switch(t){case"Balloon":l=D(e,i,o,a,"Marker",n);break;case"Cross":i.d="M "+a.x+" "+(a.y-o.height/2)+" L "+a.x+" "+(a.y+o.height/2)+" M "+(a.x-o.width/2)+" "+a.y+" L "+(a.x+o.width/2)+" "+a.y;break;case"Diamond":i.d="M "+a.x+" "+(a.y-o.height/2)+" L "+(a.x+o.width/2)+" "+a.y+" L "+a.x+" "+(a.y+o.height/2)+" L "+(a.x-o.width/2)+" "+a.y+" Z";break;case"Star":i.d="M "+(a.x+o.width/3)+" "+(a.y-o.height/2)+" L "+(a.x-o.width/2)+" "+(a.y+o.height/6)+" L "+(a.x+o.width/2)+" "+(a.y+o.height/6)+" L "+(a.x-o.width/3)+" "+(a.y-o.height/2)+" L "+a.x+" "+(a.y+o.height/2)+" L "+(a.x+o.width/3)+" "+(a.y-o.height/2)+" Z";break;case"Triangle":i.d="M "+a.x+" "+(a.y-o.height/2)+" L "+(a.x+o.width/2)+" "+(a.y+o.height/2)+" L "+(a.x-o.width/2)+" "+(a.y+o.height/2)+" Z";break;case"HorizontalLine":i.d=" M "+(a.x-o.width/2)+" "+a.y+" L "+(a.x+o.width/2)+" "+a.y;break;case"VerticalLine":i.d="M "+a.x+" "+(a.y-o.height/2)+" L "+a.x+" "+(a.y+o.height/2);break;case"InvertedTriangle":i.d="M "+(a.x-o.width/2)+" "+(a.y-o.height/2)+" L "+(a.x+o.width/2)+" "+(a.y-o.height/2)+" L "+a.x+" "+(a.y+o.height/2)+" Z";break;case"Pentagon":for(var r=void 0,s=void 0,d=0;d<5;d++)r=o.width/2*Math.cos(Math.PI/180*(72*d)),s=o.height/2*Math.sin(Math.PI/180*(72*d)),i.d+=(0===d?"M ":"L ")+(a.x+r)+" "+(a.y+s);i.d+=" Z"}return"Cross"!==t&&"HorizontalLine"!==t&&"VerticalLine"!==t||(i.stroke="transparent"===i.stroke?i.fill:i.stroke),"Balloon"===t?l:e.renderer.drawPath(i)}function D(e,t,i,o,a,n){var l,r=i.width,s=i.height;o.x-=r/2,o.y-=s/2,t.d="M15,0C8.8,0,3.8,5,3.8,11.2C3.8,17.5,9.4,24.4,15,30c5.6-5.6,11.2-12.5,11.2-18.8C26.2,5,21.2,0,15,0z M15,16c-2.8,0-5-2.2-5-5s2.2-5,5-5s5,2.2,5,5S17.8,16,15,16z";var d=e.renderer.drawPath(t),p=i.width/30,h=i.height/30;if(d.setAttribute("transform","translate("+o.x+", "+o.y+") scale("+p+", "+h+")"),"Marker"===a){var m=e.renderer.createGroup({id:t.id+"_Group"});U(d,m),l=U(m,n)}else l=d;return l}function V(e,i,o,a,n){if(!t.isNullOrUndefined(i))for(var l=0;l<e.length;l++){var r=o.indexOf(".")>-1?w(e[l],o):e[l][o],s=H(r,a,i);if((!t.isNullOrUndefined(r)&&isNaN(i[s])&&"string"==typeof r?r.toLowerCase():r)===(!t.isNullOrUndefined(i[s])&&isNaN(i[s])?i[s].toLowerCase():i[s]))return l}return null}function H(e,i,o){if(!t.isNullOrUndefined(e)&&!t.isNullOrUndefined(o)&&!t.isNullOrUndefined(i))for(var a="[object Array]"===Object.prototype.toString.call(i)?i:[i],n=0;n<a.length;n++){if((t.isNullOrUndefined(e)||"string"!=typeof e?e:e.toLowerCase())===(!t.isNullOrUndefined(o[a[n]])&&isNaN(o[a[n]])?o[a[n]].toLowerCase():o[a[n]]))return a[n]}return null}function G(e,t,i){for(var o=[],a=0;a<e.length;a++){var n=e[a];t<=n.y&&i>=n.y&&o.push(n)}return o}function W(e,t,i,o,a){var n=(t-e)/100*(100/(a-o)*(i-o))+e;return a===o&&(n=(t-e)/100+e),n}function X(e,t,i){if(!e.length)return null;for(var o,a,n,l,r=e.length,s=0,d=0,p=0,h=0;h<=r-1;h++)o=e[h].x,a="Mercator"===t||"Normal"===i?e[h].y:-e[h].y,h===r-1?(n=e[0].x,l="Mercator"===t||"Normal"===i?e[0].y:-e[0].y):(n=e[h+1].x,l="Mercator"===t||"Normal"===i?e[h+1].y:-e[h+1].y),s+=Math.abs(o*l-n*a),d+=Math.abs((o+n)*(o*l-n*a)),p+=Math.abs((a+l)*(o*l-n*a));s*=.5;var m=e.some(function(e){return e.x<5&&e.y<5})&&"Normal"===i?6:4;d*=1/(m*s),p*=1/(m*s);var c={x:0,y:0},u={x:0,y:0},g={x:0,y:0},y={x:0,y:0},f={x:0,y:0},b={x:0,y:0},v={x:0,y:0},S={x:0,y:0},x=0;for(h=0;h<=r-1;h++){var O=e[h];O.y="Mercator"===t||"Normal"===i?O.y:-O.y,O.y>p?O.x<d&&d-O.x<d-f.x?f={x:O.x,y:O.y}:O.x>d&&(0===b.x||O.x-d<b.x-d)&&(b={x:O.x,y:O.y}):O.x<d&&d-O.x<d-v.x?v={x:O.x,y:O.y}:O.x>d&&(0===S.x||O.x-d<S.x-d)&&(S={x:O.x,y:O.y}),x=b.y-S.y+(b.y-S.y)/4,O.x>d?O.y<p&&p-O.y<p-c.y?c={x:O.x,y:O.y}:O.y>p&&(0===u.y||O.y-p<u.y-p)&&(u={x:O.x,y:O.y}):O.y<p&&p-O.y<p-g.y?g={x:O.x,y:O.y}:O.y>p&&(0===y.y||O.y-p<y.y-p)&&(y={x:O.x,y:O.y})}return{x:d,y:p,rightMin:c,rightMax:u,leftMin:g,leftMax:y,points:e,topMax:S,topMin:v,bottomMax:b,bottomMin:f,height:x}}function q(e){var i=!1;return"[object Array]"===Object.prototype.toString.call(e)&&Array.prototype.forEach.call(e,function(e,o){t.isNullOrUndefined(e.geometry)||"Path"!==e.geometry.type||(i=!0)}),i}function Y(e,t,i){var o=t,a=x(t,i).width;if(a>e)for(var n=t.length-1;n>=0;--n)if(o=t.substring(0,n)+"...",(a=x(o,i).width)<=e||o.length<4)return o.length<4&&(o=" "),o;return o}function J(e,t,i,o){var a;switch(t){case"Near":a=e.x;break;case"Center":a="title"===o?e.width/2-i.width/2:e.x+e.width/2-i.width/2;break;case"Far":a="title"===o?e.width-e.y-i.width:e.x+e.width-i.width}var n="title"===o?e.y+i.height/2:e.y+e.height/2+i.height/2;return new Ze(a,n)}function Q(e){var i=document.getElementById(e);return i?t.remove(i):null}function K(e,t){var i=h(e.minLatOfGivenLocation,e.minLongOfGivenLocation,e.mapLayerPanel.calculateFactor(t),t,e),o=h(e.maxLatOfGivenLocation,e.maxLongOfGivenLocation,e.mapLayerPanel.calculateFactor(t),t,e),a=(i.x+o.x)/2,n=(i.y+o.y)/2;return new Ze(a,n)}function $(e,i,o){var a,n=e.zoomSettings.zoomFactor,l=e.centerPosition,r=l.latitude,s=l.longitude,d=!t.isNullOrUndefined(e.centerLatOfGivenLocation)&&!t.isNullOrUndefined(e.centerLongOfGivenLocation)&&e.zoomNotApplied;t.isNullOrUndefined(e.mapScaleValue)&&(e.mapScaleValue=n),e.zoomSettings.shouldZoomInitially&&e.zoomSettings.enable&&(e.mapScaleValue=a=n=(e.zoomSettings.shouldZoomInitially||e.enablePersistence)&&1===e.scale?e.scale:t.isNullOrUndefined(e.markerZoomFactor)?1:e.markerZoomFactor,e.mapScaleValue===e.markerZoomFactor||e.enablePersistence||(e.mapScaleValue=n=e.markerZoomFactor),t.isNullOrUndefined(e.markerCenterLatitude)||t.isNullOrUndefined(e.markerCenterLongitude)||(r=e.markerCenterLatitude,s=e.markerCenterLongitude)),d&&(e.mapScaleValue=a=n=e.scaleOfGivenLocation);var p=t.isNullOrUndefined(e.baseMapRectBounds)?null:e.baseMapRectBounds.min,m=t.isNullOrUndefined(e.baseMapRectBounds)?null:e.baseMapRectBounds.max,c=o?1:e.mapScaleValue;t.isNullOrUndefined(e.currentShapeDataLength)&&(e.currentShapeDataLength=t.isNullOrUndefined(i.shapeData.features)?i.shapeData.geometries.length:i.shapeData.features.length);var u,g,y=e.totalRect&&e.legendSettings.visible?e.totalRect:e.mapAreaRect,f=e.availableSize;if(!t.isNullOrUndefined(p)&&!t.isNullOrUndefined(m)){var b=Math.abs(m.x-p.x),v=Math.abs(p.y-m.y),S=o?1:1===e.markerZoomFactor?e.mapScaleValue:n;if(l=e.zoomSettings.shouldZoomInitially&&e.markerZoomedState&&!e.zoomPersistence?e.markerZoomCenterPoint:e.centerPosition,!t.isNullOrUndefined(s)&&0!==s&&!t.isNullOrUndefined(r)&&0!==r||d){var x=((b+Math.abs(e.mapAreaRect.width-b))/2+e.mapAreaRect.x)/S,O=((v+Math.abs(e.mapAreaRect.height-v))/2+e.mapAreaRect.y)/S,_=d?K(e,i):h(r,s,e.mapLayerPanel.calculateFactor(i),i,e);t.isNullOrUndefined(e.previousProjection)||e.previousProjection!==e.projectionType?(u=-_.x+x,g=-_.y+O,a=c):(1!==Math.floor(e.scale)&&e.zoomSettings.shouldZoomInitially||e.zoomNotApplied?(u=-_.x+x,g=-_.y+O):e.zoomSettings.shouldZoomInitially||e.zoomNotApplied?(u=-_.x+x,g=-_.y+O,a=c):(u=e.zoomTranslatePoint.x,g=e.zoomTranslatePoint.y),a=e.mapScaleValue)}else if(t.isNullOrUndefined(e.previousProjection)||e.previousProjection!==e.projectionType){0!==v&&0!==b&&v!==b||(b=y.width/2,v=y.height),b*=a=(a=parseFloat(Math.min(y.width/b,y.height/v).toFixed(2)))>1.05?1:a,v*=a;var C=0!==p.x&&"layers"===e.translateType?f.width-y.width:0;u=y.x+(-p.x+(y.width/2-b/2))-C,g=y.y+(-p.y+(y.height/2-v/2)),e.previousTranslate=new Ze(u,g)}else if(e.zoomSettings.shouldZoomInitially||1!==e.markerZoomFactor||1!==e.mapScaleValue)if(a=e.mapScaleValue<1?e.mapScaleValue+1:e.mapScaleValue,e.mapScaleValue=e.zoomSettings.enable&&1!==e.mapScaleValue?e.mapScaleValue:1,e.currentShapeDataLength!==(t.isNullOrUndefined(i.shapeData.features)?i.shapeData.geometries.length:i.shapeData.features.length)&&"SubLayer"!==i.type){var M=parseFloat(Math.min(y.height/v,y.width/b).toFixed(2));v*=M,b*=M,g=y.y+(-p.y+(y.height/2-v/2)),a=M,u=y.x+(-p.x+(y.width/2-b/2))}else if(e.availableSize.height!==e.heightBeforeRefresh||e.widthBeforeRefresh!==e.availableSize.width){var L=parseFloat(Math.min(y.width/b,y.height/v).toFixed(2)),P=b;P*=L;var w=v;w*=L;var T=y.x+(-p.x+(y.width/2-P/2)),I=y.y+(-p.y+(y.height/2-w/2)),k=(e.translatePoint.x-e.previousTranslate.x)/e.widthBeforeRefresh,N=(e.translatePoint.y-e.previousTranslate.y)/e.heightBeforeRefresh;u=T+k*e.availableSize.width,g=I+N*e.availableSize.height,e.previousTranslate=new Ze(T,I),e.zoomTranslatePoint.x=u,e.zoomTranslatePoint.y=g}else t.isNullOrUndefined(e.previousProjection)||!(1===e.mapScaleValue||e.mapScaleValue<=1.05)||e.zoomModule.isDragZoom?(u=e.zoomTranslatePoint.x,g=e.zoomTranslatePoint.y,a=e.scale):(b*=a=(a=parseFloat(Math.min(y.width/b,y.height/v).toFixed(2)))>1.05?1:a,u=y.x+(-p.x+(y.width/2-b/2)),v*=a,g=y.y+(-p.y+(y.height/2-v/2)));else v*=a=parseFloat(Math.min(y.width/b,y.height/v).toFixed(2)),b*=a,g=y.y+(-p.y+(y.height/2-v/2)),u=y.x+(-p.x+(y.width/2-b/2));t.isNullOrUndefined(e.translatePoint)||(u=e.enablePersistence&&0!==e.translatePoint.x&&!e.zoomNotApplied?e.translatePoint.x:u,g=e.enablePersistence&&0!==e.translatePoint.y&&!e.zoomNotApplied?e.translatePoint.y:g)}return a=e.enablePersistence?e.mapScaleValue>=1?e.mapScaleValue:1:a,e.widthBeforeRefresh=e.availableSize.width,e.heightBeforeRefresh=e.availableSize.height,{scale:a,location:new Ze(u,g)}}function ee(e,i,o){var a,n=e.zoomSettings.zoomFactor,l=e.centerPosition,r=l.latitude,s=l.longitude,d=!t.isNullOrUndefined(e.centerLongOfGivenLocation)&&!t.isNullOrUndefined(e.centerLatOfGivenLocation)&&e.zoomNotApplied;t.isNullOrUndefined(e.previousCenterLatitude)&&t.isNullOrUndefined(e.previousCenterLongitude)?(e.previousCenterLatitude=e.centerPosition.latitude,e.previousCenterLongitude=e.centerPosition.longitude):e.previousCenterLatitude!==e.centerPosition.latitude&&e.previousCenterLongitude!==e.centerPosition.longitude?(e.centerPositionChanged=!0,e.previousCenterLatitude=e.centerPosition.latitude,e.previousCenterLongitude=e.centerPosition.longitude):e.centerPositionChanged=!1,(t.isNullOrUndefined(e.mapScaleValue)||n>e.mapScaleValue)&&(e.isReset&&1===e.mapScaleValue?e.mapScaleValue=e.mapScaleValue:e.mapScaleValue=n),e.mapScaleValue=1!==e.zoomSettings.zoomFactor&&e.zoomSettings.zoomFactor===e.mapScaleValue?e.zoomSettings.zoomFactor:e.zoomSettings.zoomFactor===e.mapScaleValue||e.centerPositionChanged?e.zoomSettings.zoomFactor:e.mapScaleValue,e.zoomSettings.shouldZoomInitially&&!e.isZoomByPosition&&(e.mapScaleValue=n=a=(e.enablePersistence||e.zoomSettings.shouldZoomInitially)&&1===e.scale?e.scale:t.isNullOrUndefined(e.markerZoomFactor)?e.mapScaleValue:e.markerZoomFactor,n=e.mapScaleValue,t.isNullOrUndefined(e.markerCenterLatitude)||t.isNullOrUndefined(e.markerCenterLongitude)||(r=e.markerCenterLatitude,s=e.markerCenterLongitude)),d&&(e.mapScaleValue=a=n=e.scaleOfGivenLocation);var p,m,c=o?1:e.mapScaleValue,u=e.mapAreaRect,g=e.baseMapRectBounds.min,y=e.baseMapRectBounds.max,f=o?1:e.mapScaleValue,b=Math.abs(y.x-g.x),v=Math.abs(g.y-y.y);if(!t.isNullOrUndefined(s)&&0!==s&&!t.isNullOrUndefined(r)&&0!==r||d){var S=(v+Math.abs(e.mapAreaRect.height-v))/2/f,x=(b+Math.abs(e.mapAreaRect.width-b))/2/f,O=d?K(e,i):h(r,s,e.mapLayerPanel.calculateFactor(i),i,e);t.isNullOrUndefined(e.zoomTranslatePoint)&&t.isNullOrUndefined(e.previousProjection)||e.zoomNotApplied?(p=-O.x+x+e.mapAreaRect.x/c,m=-O.y+S+e.mapAreaRect.y/c):e.previousProjection!==e.projectionType?(p=-O.x+x,m=-O.y+S):(e.isZoomByPosition&&(e.zoomTranslatePoint.x=-O.x+x,e.zoomTranslatePoint.y=-O.y+S),p=e.zoomTranslatePoint.x,m=e.zoomTranslatePoint.y,n=c),t.isNullOrUndefined(e.translatePoint)||(m=e.enablePersistence&&0!==e.translatePoint.y&&!e.zoomNotApplied?e.translatePoint.y:m,p=e.enablePersistence&&0!==e.translatePoint.x&&!e.zoomNotApplied?e.translatePoint.x:p),a=0!==n?n:1}else{var _=0===e.zoomSettings.zoomFactor?1:e.zoomSettings.zoomFactor,C=e.zoomSettings.maxZoom;a=_=_>C?C:_;var M=0===e.mapScaleValue?1:e.mapScaleValue>C?C:e.mapScaleValue;x=u.x+(-g.x+(u.width/2-b/2)),S=u.y+(-g.y+(u.height/2-v/2));if(!t.isNullOrUndefined(e.zoomTranslatePoint)||!t.isNullOrUndefined(e.previousProjection))if(e.previousProjection!==e.projectionType){var L=[],P={x:x,y:S};L.push(P);for(var w=1;w<C;w++){P={x:L[w-1].x-(u.width/w-u.width/(w+1))/2,y:L[w-1].y-(u.height/w-u.height/(w+1))/2},L.push(P)}x=L[_-1].x,S=L[_-1].y}else x=e.zoomTranslatePoint.x,S=e.zoomTranslatePoint.y,_!==M&&(a=M);t.isNullOrUndefined(e.translatePoint)||(p=e.enablePersistence&&0!==e.translatePoint.x&&!e.zoomNotApplied?e.translatePoint.x:x,m=e.enablePersistence&&0!==e.translatePoint.y&&!e.zoomNotApplied?e.translatePoint.y:S)}return a=e.enablePersistence?0===e.mapScaleValue?1:e.mapScaleValue:a,e.widthBeforeRefresh=e.availableSize.width,e.heightBeforeRefresh=e.availableSize.height,{scale:o?1:a,location:new Ze(p,m)}}function te(e){e.tileZoomScale=e.tileZoomLevel=Math.floor(e.availableSize.height/512)+1;var t="GoogleStaticMap"!==e.layers[e.baseLayerIndex].layerType?20:0,i=256*Math.pow(2,e.tileZoomLevel);e.tileTranslatePoint.x=e.availableSize.width/2-i/2,e.tileTranslatePoint.y=e.availableSize.height/2-i/2+t,e.previousTileWidth=e.availableSize.width,e.previousTileHeight=e.availableSize.height}function ie(e){return document.getElementById(e)}function oe(e,t){return e.formatFunction=e.intl.getNumberFormat({format:e.format,useGrouping:e.useGroupingSeparator}),e.formatFunction(t)}function ae(e,i){var o=null;try{"function"!=typeof e&&document.querySelectorAll(e).length?o=t.compile(document.querySelector(e).innerHTML.trim()):i.isVue||i.isVue3?o=t.compile(e):"function"==typeof e&&(o=t.compile(e))}catch(i){o=t.compile(e)}return o}function ne(e){return document.getElementById(e)}function le(e,t){var i,o=parseInt(e.split("_LayerIndex_")[1].split("_")[0],10),a=parseInt(e.split("_shapeIndex_")[1].split("_")[0],10),n=t.layersCollection[o],l=n.layerData[a].property;return n.dataSource&&(i=n.dataSource[V(n.dataSource,l,n.shapeDataPath,n.shapePropertyPath)]),{shapeData:l,data:i}}function re(e,i,o,a){var n=le(e,o),l={color:i.border.color,opacity:i.border.opacity,width:i.border.width},r=i.enableMultiSelect?{cancel:!1,name:a,fill:i.fill,opacity:i.opacity,border:l,shapeData:n.shapeData,data:n.data,target:e,maps:o,shapeDataCollection:o.shapeSelectionItem}:{cancel:!1,name:a,fill:i.fill,opacity:i.opacity,border:l,shapeData:n.shapeData,data:n.data,target:e,maps:o};return o.trigger(a,r,function(){r.border.opacity=t.isNullOrUndefined(r.border.opacity)?r.opacity:r.border.opacity}),r}function se(e){return document.getElementsByClassName(e)}function de(e,t){var i=null;return document.getElementById(t)&&(i=document.getElementById(t).querySelector("#"+e)),i}function pe(e,t,i,o){for(var a,n=o.layers[e].shapeData.features,l=0;l<n.length;l++)if(n[l].properties.name===t){a=o.element.id+"_LayerIndex_"+e+"_shapeIndex_"+l+"_dataIndex_undefined";break}return ne(a)}function he(e,i,o){var a=t.createElement("style",{id:e});return a.innerText="."+i+"{fill:"+o.fill+";fill-opacity:"+o.opacity.toString()+";stroke-opacity:"+o.border.opacity.toString()+";stroke-width:"+o.border.width.toString()+";stroke:"+o.border.color+";}",a}function me(e,i,o){var a=ne(e);t.isNullOrUndefined(a)||(a.innerText="."+i+"{fill:"+o.fill+";fill-opacity:"+o.opacity.toString()+";stroke-width:"+o.border.width.toString()+";stroke-opacity:"+o.border.opacity.toString()+";stroke:"+o.border.color+"}")}function ce(e,i,o,a,n){var l={color:e.border.color,width:e.border.width/i.scale,opacity:e.border.opacity},r={opacity:e.opacity,fill:e.fill,border:l,name:ni,target:o.id,cancel:!1,shapeData:a,data:n,maps:i};i.trigger("itemSelection",r,function(o){r.border.opacity=t.isNullOrUndefined(e.border.opacity)?e.opacity:e.border.opacity,i.shapeSelectionItem.push(r.shapeData),ne("ShapeselectionMap")?me("ShapeselectionMap","ShapeselectionMapStyle",r):document.body.appendChild(he("ShapeselectionMap","ShapeselectionMapStyle",r))})}function ue(e){e.removeAttribute("class")}function ge(e,i,o,a,n,l,r){void 0===r&&(r=0);var s=a.x,d=a.y,p=0,h=e.getAttribute("transform")||"";new t.Animation({}).animate(e,{duration:o,delay:i,progress:function(i){if(i.timeStamp>i.delay){if(n.isTileMap&&0===p){var o=document.querySelector(".GroupElement");t.isNullOrUndefined(o)||(o.style.display="block")}p=(i.timeStamp-i.delay)/i.duration,e.setAttribute("transform","translate( "+(s-r*p)+" "+(d-r*p)+" ) scale("+p+")")}},end:function(t){if(e.setAttribute("transform",h),l){var i={cancel:!1,name:oi,element:l,maps:n};n.trigger(oi,i)}}})}function ye(e){Q(e)}function fe(e,i,o,a,n,l,r,d,p){var h=s(o,a,d);t.isNullOrUndefined(h)||(o=h.x,a=h.y);for(var m=document.getElementById(r),c=x(e,{fontFamily:"Segoe UI",size:"8px",fontStyle:"Normal",fontWeight:"Regular"}).width,u=e.split(" "),g=u[0].length,y=1;y<u.length;y++)g<u[y].length&&(g=u[y].length);m||((m=t.createElement("div",{id:r})).style.cssText='background-color: rgb(255, 255, 255) !important; color:black !important; position:absolute;border:1px solid rgb(0, 0, 0); padding-left:5px;font-size:12px; font-family: "Segoe UI"; text-align:center'),o<n-c?o=o:o>n-c&&o<n-8*g?c=n-o:o>=n-8*g&&(o>c?o-=c:(c=o,o=0));var f=i.split("px");be(m,e,o,a,f,c,n,d);m.clientHeight+2*parseInt(f[0],10)>l&&(c=o,o=0),be(m,e,o,a,f,c,n,d),p&&setTimeout(ye,5e3,r)}function be(e,t,i,o,a,n,l,r){e.innerText=t,e.style.top=-1!==e.id.indexOf("_Legend")?(parseInt(a[0],10)+o).toString()+"px":(2*parseInt(a[0],10)).toString()+"px",e.style.left=i.toString()+"px",e.style.width=n.toString()+"px",e.style.maxWidth=l.toString()+"px",e.style.wordWrap="break-word",r.appendChild(e)}function ve(e,i,o,a,n){var l=ne(e),r=Se(n.borderColor),s=Se(n.fontColor),d="top:"+o.toString()+"px;left:"+a.toString()+"px;color:"+(s?"rgba("+s.r+","+s.g+","+s.b+","+n.fontOpacity+")":n.fontColor)+";background:"+n.fill+";z-index: 2;position:absolute;border:"+n.borderWidth+"px solid "+(r?"rgba("+r.r+","+r.g+","+r.b+","+n.borderOpacity+")":n.borderColor)+";font-family:"+n.fontFamily+";font-style:"+n.fontStyle+";font-weight:"+n.fontWeight+";font-size:"+n.fontSize+";border-radius:"+n.borderWidth+"px;";!l&&n.visible?((l=t.createElement("div",{id:e})).innerHTML=t.SanitizeHtmlHelper.sanitize(" "+i+" "),l.style.cssText=d,document.body.appendChild(l)):n.visible&&(l.innerHTML=t.SanitizeHtmlHelper.sanitize(" "+i+" "),l.style.cssText=d)}function Se(e){if(-1!==e.indexOf("#")&&-1===e.toLowerCase().indexOf("rgb")){return(i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e))?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null}if(-1!==e.toLowerCase().indexOf("rgb")){return(i=e.match(/\d+/g).map(function(e){return parseInt(e,10)}))?{r:i[0],g:i[1],b:i[2]}:null}var t=document.createElement("div");t.style.color=e;var i=window.getComputedStyle(document.body.appendChild(t)).color.match(/\d+/g).map(function(e){return parseInt(e,10)});return document.body.removeChild(t),i?{r:i[0],g:i[1],b:i[2]}:null}function xe(e,t,o,a,n){var l=new i.SvgRenderer(""),r=Oe(e,o,t,n,a);return l["draw"+r.functionName](r.renderOption)}function Oe(e,i,o,a,n){var l,r="Path",s=i.width,d=i.height,p=e.x,h=e.y,m=e.x+-s/2,c=e.y+-d/2;switch(a.stroke="HorizontalLine"===o||"VerticalLine"===o||"Cross"===o?a.fill:a.stroke,a["stroke-width"]=0!==a["stroke-width"]||"HorizontalLine"!==o&&"VerticalLine"!==o&&"Cross"!==o?a["stroke-width"]:1,o){case"Circle":case"Bubble":r="Ellipse",t.merge(a,{rx:s/2,ry:d/2,cx:p,cy:h});break;case"VerticalLine":l="M "+p+" "+(h+d/2)+" L "+p+" "+(h+-d/2),t.merge(a,{d:l});break;case"HorizontalLine":l="M "+p+" "+h+" L "+(p+s/2)+" "+h,t.merge(a,{d:l});break;case"Diamond":l="M "+m+" "+h+" L "+p+" "+(h+-d/2)+" L "+(p+s/2)+" "+h+" L "+p+" "+(h+d/2)+" L "+m+" "+h+" z",t.merge(a,{d:l});break;case"Rectangle":l="M "+m+" "+(h+-d/2)+" L "+(p+s/2)+" "+(h+-d/2)+" L "+(p+s/2)+" "+(h+d/2)+" L "+m+" "+(h+d/2)+" L "+m+" "+(h+-d/2)+" z",t.merge(a,{d:l});break;case"Triangle":l="M "+m+" "+(h+d/2)+" L "+p+" "+(h+-d/2)+" L "+(p+s/2)+" "+(h+d/2)+" L "+m+" "+(h+d/2)+" z",t.merge(a,{d:l});break;case"InvertedTriangle":l="M "+(p+s/2)+" "+(h-d/2)+" L "+p+" "+(h+d/2)+" L "+(p-s/2)+" "+(h-d/2)+" L "+(p+s/2)+" "+(h-d/2)+" z",t.merge(a,{d:l});break;case"Pentagon":for(var u=void 0,g=void 0,y=0;y<=5;y++)u=s/2*Math.cos(Math.PI/180*(72*y)),g=s/2*Math.sin(Math.PI/180*(72*y)),l=0===y?"M "+(p+u)+" "+(h+g)+" ":l.concat("L "+(p+u)+" "+(h+g)+" ");l=l.concat("Z"),t.merge(a,{d:l});break;case"Star":l="M "+(e.x+i.width/3)+" "+(e.y-i.height/2)+" L "+(e.x-i.width/2)+" "+(e.y+i.height/6)+" L "+(e.x+i.width/2)+" "+(e.y+i.height/6)+" L "+(e.x-i.width/3)+" "+(e.y-i.height/2)+" L "+e.x+" "+(e.y+i.height/2)+" L "+(e.x+i.width/3)+" "+(e.y-i.height/2)+" Z",t.merge(a,{d:l});break;case"Cross":l="M "+m+" "+h+" L "+(p+s/2)+" "+h+" M "+p+" "+(h+d/2)+" L "+p+" "+(h+-d/2),t.merge(a,{d:l});break;case"Image":r="Image",t.merge(a,{href:n,height:d,width:s,x:m,y:c})}return{renderOption:a,functionName:r}}function _e(e,t){t.appendChild(e);var i=e.offsetWidth,o=e.offsetHeight;return t.removeChild(e),new Re(i,o)}function Ce(e,i,o,a){for(var n,l=0;l<e.childElementCount;l++)if((n=e.childNodes[l]).id.indexOf("_NavigationGroup")>-1)Me(n,i,o,a);else{var r=void 0,s=0,d=a.layersCollection[i].shapeSettings.borderWidthValuePath,p=a.layersCollection[i].shapeSettings.border.width,h=a.layersCollection[i].shapeSettings.circleRadius;r=a.layersCollection[i].shapeSettings.borderWidthValuePath&&null!==(s=V(a.layersCollection[i].dataSource,a.layersCollection[i].layerData[l].property,a.layersCollection[i].shapeDataPath,a.layersCollection[i].shapePropertyPath,a.layersCollection[i]))&&a.layersCollection[i].dataSource[s][d]?a.layersCollection[i].dataSource[s][d]:t.isNullOrUndefined(p)?0:p,n.setAttribute("stroke-width",(r/o).toString()),(e.id.indexOf("_Point")>-1||e.id.indexOf("_MultiPoint")>-1)&&n.setAttribute("r",(h/o).toString())}}function Me(e,t,i,o){for(var a,n=0;n<e.childElementCount;n++)if("path"===(a=e.childNodes[n]).tagName){var l=o.layersCollection[t].navigationLineSettings[parseFloat(a.id.split("_NavigationIndex_")[1].split("_")[0])].width;a.setAttribute("stroke-width",(l/i).toString())}}function Le(e){for(var t=[],i=e.touches,o=0;o<i.length;o++)t.push({pageX:i[o].pageX,pageY:i[o].pageY});return t}function Pe(e,t){var i=we(e[0],e[1]);return we(t[0],t[1])/i}function we(e,t){var i=e.pageX-t.pageX,o=e.pageY-t.pageY;return Math.sqrt(i*i+o*o)}function Te(e,t){var i=t.element.getBoundingClientRect(),o=i.top+document.defaultView.pageXOffset,a=i.left+document.defaultView.pageYOffset;return Array.prototype.slice.call(e).map(function(e){return{x:e.pageX-a,y:e.pageY-o}})}function Ie(e){return{x:e.map(function(e){return e.x}).reduce(ke)/e.length,y:e.map(function(e){return e.y}).reduce(ke)/e.length}}function ke(e,t){return e+t}function Ne(e,t,i,o,a,n,l){var r=0,s=l.previousPoint,d=l.previousScale,p=a-d,h=new $e(0,0),m=1;if(a!==d){var c=function(e,t){return e.x===t.x?null:(t.y-e.y)/(t.x-e.x)}(s,o),u=function(e,t){return null===t?e.x:e.y-t*e.x}(s,c),g=o.x-s.x,y=o.y-s.y;Fe(e,t,i,function(e){e.timeStamp>e.delay&&(r=(e.timeStamp-e.delay)/e.duration,m=d+r*p,h.x=s.x+r*g/(m/a),h.y=null==c?s.y+r*y:c*h.x+u,e.element.setAttribute("transform","scale( "+m+" ) translate( "+h.x+" "+h.y+" )"),l.translatePoint=h,l.scale=m,l.zoomModule.processTemplate(o.x,o.y,m,l))},function(){l.translatePoint=o,l.scale=a,e.setAttribute("transform","scale( "+a+" ) translate( "+o.x+" "+o.y+" )"),l.zoomModule.processTemplate(o.x,o.y,a,l)})}else e.setAttribute("transform","scale( "+a+" ) translate( "+o.x+" "+o.y+" )")}function Fe(e,t,i,o,a){var n,l=this,r=null,s=function(t){r||(r=t);var d=t-r;if(d<i)o.call(l,{element:e,delay:0,timeStamp:d,duration:i}),window.requestAnimationFrame(s);else if(window.cancelAnimationFrame(n),a.call(l,{element:e}),e.id.indexOf("Marker")>-1){ie(e.id.split("_Layer")[0]+"_Markers_Group").style.cssText="visibility:visible"}};n=window.requestAnimationFrame(s)}function Ee(e,t,i,o){var a=0,n=e.getAttribute("transform").split(" ");2===n.length&&(n[2]=n[1].split(")")[0],n[1]=n[0].split("(")[1]);var l=new $e(parseInt(n[1],10),parseInt(n[2],10)),r=o.x-l.x,s=o.y-l.y,d=new $e(0,0);Fe(e,0,i,function(e){e.timeStamp>e.delay&&(a=(e.timeStamp-e.delay)/e.duration,d.x=l.x+a*r,d.y=l.y+a*s,e.element.setAttribute("transform","translate( "+d.x+" "+d.y+" )"))},function(){e.setAttribute("transform","translate( "+o.x+" "+o.y+" )")})}function ze(e,i){var o=t.isNullOrUndefined(i.shouldZoomPreviousFactor)?null:i.shouldZoomPreviousFactor,a=t.isNullOrUndefined(i.shouldZoomCurrentFactor)?null:i.shouldZoomCurrentFactor;t.isNullOrUndefined(a)?!t.isNullOrUndefined(o)&&t.isNullOrUndefined(a)&&i.shouldZoomPreviousFactor!==e?i.shouldZoomCurrentFactor=e:i.shouldZoomPreviousFactor=e:(i.shouldZoomCurrentFactor=null,i.shouldZoomPreviousFactor=null)}function Ae(e,t,i,o,a,n,l,r){var s,d,p=l.zoomSettings.maxZoom,h=Math.sin(t*Math.PI/180),m=Math.log((1+h)/(1-h))/2,c=Math.max(Math.min(m,Math.PI),-Math.PI)/2,u=Math.sin(e*Math.PI/180),g=Math.log((1+u)/(1-u))/2,y=Math.max(Math.min(g,Math.PI),-Math.PI)/2;if(l.zoomNotApplied&&!l.isTileMap){var f=Math.abs((l.baseMapBounds.latitude.max-l.baseMapBounds.latitude.min)/(t-e)),b=Math.abs((l.baseMapBounds.longitude.max-l.baseMapBounds.longitude.min)/(o-i));d=r?(f+b)/2:Math.min(f,b)}var v=(c-y)/Math.PI,S=o-i,x=(S<0?S+360:S)/360,O=Math.log(n/256/v)/Math.LN2,_=Math.log(a/256/x)/Math.LN2,C=l.zoomNotApplied&&!l.isTileMap?d:r&&!l.isTileMap?(O+_)/2:Math.min(O,_);return s=Math.min(C,p),s=l.isTileMap||!l.zoomNotApplied?Math.floor(s):s,l.isTileMap||ze(s,l),s}function Be(e){var i,o=t.isNullOrUndefined(e.result)?e.actual:e.result;return t.isNullOrUndefined(o.length)?t.isNullOrUndefined(o.Items)||(i=o.Items):i=o,i}var Ue,je=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),Re=function(){return function(e,t){this.width=e,this.height=t}}(),Ze=function(){return function(e,t){this.x=e,this.y=t}}(),De=function(){return function(e,t){this.min=e,this.max=t}}(),Ve=function(){return function(e,t){this.latitude=new De(e.min,e.max),this.longitude=new De(t.min,t.max)}}(),He=function(){return function(e,t,i,o,a,n,l){void 0===n&&(n=""),this.transform="",this.baseLine="auto",this.id=e,this.text=a,this.transform=n,this.anchor=o,this.x=t,this.y=i,this.baseLine=l}}(),Ge=function(){return function(e,t,i,o,a,n,l,r){this.id=e,this["fill-opacity"]=a,this["stroke-opacity"]=n,this.fill=t,this.stroke=o,this["stroke-width"]=i,this["stroke-dasharray"]=l,this.d=r}}(),We=function(){return function(e,t,i){this.r=e,this.g=t,this.b=i}}(),Xe=function(e){function t(t,i,o,a,n,l,r,s,d){var p=e.call(this,t,i,o.width,o.color,a,o.opacity)||this;return p.y=n.y,p.x=n.x,p.height=n.height,p.width=n.width,p.rx=l||0,p.ry=r||0,p.transform=s||"",p["stroke-dasharray"]=d,p["fill-opacity"]=a,p["stroke-opacity"]=o.opacity,p}return je(t,e),t}(Ge),qe=function(e){function t(t,i,o,a,n,l,r,s){var d=e.call(this,t,i,o.width,o.color,a,o.opacity,s)||this;return d.cy=l,d.cx=n,d.r=r,d["stroke-dasharray"]=s,d["fill-opacity"]=a,d["stroke-opacity"]=o.opacity,d}return je(t,e),t}(Ge),Ye=function(e){function t(t,i,o,a,n,l,r,s){void 0===l&&(l=1),void 0===r&&(r=1),void 0===s&&(s="");var d=e.call(this,t,o,a,n,l,r,s)||this;return d.points=i,d}return je(t,e),t}(Ge),Je=function(e){function t(t,i,o,a,n,l,r,s){return void 0===l&&(l=1),void 0===r&&(r=1),void 0===s&&(s=""),e.call(this,t,i,o,a,n,l,r,s)||this}return je(t,e),t}(Ye),Qe=function(e){function t(t,i,o,a,n,l,r,s){void 0===l&&(l=1),void 0===r&&(r=1),void 0===s&&(s="");var d=e.call(this,t,o,a,n,l,r,s)||this;return d.x1=i.x1,d.y1=i.y1,d.x2=i.x2,d.y2=i.y2,d}return je(t,e),t}(Ge),Ke=function(){return function(e,t,i,o){this.x1=e,this.y1=t,this.x2=i,this.y2=o}}(),$e=function(){return function(e,t){this.x=e,this.y=t}}(),et=function(){return function(e,t,i,o){this.x=e,this.y=t,this.width=i,this.height=o}}(),tt=function(){return function(e,t,i,o,a,n,l,r,s){void 0===n&&(n="userSpaceOnUse"),void 0===l&&(l="userSpaceOnUse"),void 0===r&&(r=""),void 0===s&&(s=""),this.id=e,this.x=t,this.y=i,this.width=o,this.height=a,this.patternUnits=n,this.patternContentUnits=l,this.patternTransform=r,this.href=s}}(),it=function(){return function(e,t,i,o,a){this.dataOptions=e,this.type=t||"GET",this.async=i||!0,this.contentType=o,this.sendData=a}}();!function(e){e.mapsTitleFont={size:"14px",fontWeight:null,color:"#424242",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},e.mapsSubTitleFont={size:"13px",fontWeight:null,color:"#424242",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},e.tooltipLabelFont={size:"12px",fontWeight:"Regular",color:null,fontStyle:"Regular",fontFamily:null},e.legendTitleFont={size:"12px",fontWeight:"Medium",color:null,fontStyle:"Medium",fontFamily:null},e.legendLabelFont={size:"13px",fontWeight:"Medium",color:null,fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},e.dataLabelFont={size:"12px",fontWeight:"Medium",color:"#000000",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"}}(Ue||(Ue={}));var ot;!function(e){e.mapsTitleFont={size:"14px",fontWeight:"Semibold",color:"#424242",fontStyle:"Semibold",fontFamily:"SegoeUI, Helvetica Neue, Helvetica, Arial, sans-serif"},e.mapsSubTitleFont={size:"13px",fontWeight:"Regular",color:"#424242",fontStyle:"Regular",fontFamily:"SegoeUI, Helvetica Neue, Helvetica, Arial, sans-serif"},e.tooltipLabelFont={size:"12px",fontWeight:"Regular",color:"#FFFFFF",fontStyle:"Regular",fontFamily:"Roboto"},e.legendTitleFont={size:"14px",fontWeight:"Regular",color:"#757575",fontStyle:"Regular",fontFamily:"SegoeUI, Helvetica Neue, Helvetica, Arial, sans-serif"},e.legendLabelFont={size:"13px",fontWeight:"Medium",color:"#757575",fontStyle:"Medium",fontFamily:"SegoeUI, Helvetica Neue, Helvetica, Arial, sans-serif"},e.dataLabelFont={size:"12px",fontWeight:"Medium",color:"#000000",fontStyle:"Medium",fontFamily:"SegoeUI, Helvetica Neue, Helvetica, Arial, sans-serif"}}(ot||(ot={}));var at;!function(e){e.mapsTitleFont={size:"14px",fontWeight:"Semibold",color:"#424242",fontStyle:"Semibold",fontFamily:"Helvetica Neue, Helvetica, Arial, sans-serif"},e.mapsSubTitleFont={size:"13px",fontWeight:"Regular",color:"#424242",fontStyle:"Regular",fontFamily:"Helvetica Neue, Helvetica, Arial, sans-serif"},e.tooltipLabelFont={size:"12px",fontWeight:"Regular",color:"#FFFFFF",fontStyle:"Regular",fontFamily:"Roboto"},e.legendTitleFont={size:"14px",fontWeight:"Regular",color:"#757575",fontStyle:"Regular",fontFamily:"Helvetica Neue, Helvetica, Arial, sans-serif"},e.legendLabelFont={size:"13px",fontWeight:"Medium",color:"#757575",fontStyle:"Medium",fontFamily:"Helvetica Neue, Helvetica, Arial, sans-serif"},e.dataLabelFont={size:"12px",fontWeight:"Medium",color:"#000000",fontStyle:"Medium",fontFamily:"Helvetica Neue, Helvetica, Arial, sans-serif"}}(at||(at={}));var nt;!function(e){e.mapsTitleFont={size:"14px",fontWeight:"Medium",color:"#FFFFFF",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},e.mapsSubTitleFont={size:"13px",fontWeight:"Medium",color:"#FFFFFF",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},e.tooltipLabelFont={size:"12px",fontWeight:"Regular",color:"#000000",fontStyle:"Regular",fontFamily:"Roboto"},e.legendTitleFont={size:"14px",fontWeight:"Regular",color:"#FFFFFF",fontStyle:"Regular",fontFamily:"Roboto, Noto, Sans-serif"},e.legendLabelFont={size:"13px",fontWeight:"Medium",color:"#FFFFFF",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},e.dataLabelFont={size:"12px",fontWeight:"Medium",color:"#000000",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"}}(nt||(nt={}));var lt;!function(e){e.mapsTitleFont={fontFamily:"Roboto, Noto, Sans-serif",fontWeight:"Medium",size:"14px",fontStyle:"Medium",color:"#FFFFFF"},e.mapsSubTitleFont={size:"13px",color:"#FFFFFF",fontWeight:"Medium",fontFamily:"Roboto, Noto, Sans-serif",fontStyle:"Medium"},e.tooltipLabelFont={size:"12px",color:"#282727",fontWeight:"Regular",fontFamily:"Roboto",fontStyle:"Regular"},e.legendTitleFont={size:"14px",fontWeight:"Regular",color:"#FFFFFF",fontStyle:"Regular",fontFamily:"Roboto, Noto, Sans-serif"},e.legendLabelFont={size:"13px",fontFamily:"Roboto, Noto, Sans-serif",fontWeight:"Medium",color:"#DADADA",fontStyle:"Medium"}}(lt||(lt={}));var rt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),st=function(e,t,i,o){var a,n=arguments.length,l=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(l=(n<3?a(l):n>3?a(t,i,l):a(t,i))||l);return n>3&&l&&Object.defineProperty(t,i,l),l},dt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property("")],i.prototype,"content",void 0),st([t.Property("0px")],i.prototype,"x",void 0),st([t.Property("0px")],i.prototype,"y",void 0),st([t.Property("None")],i.prototype,"verticalAlignment",void 0),st([t.Property("None")],i.prototype,"horizontalAlignment",void 0),st([t.Property("-1")],i.prototype,"zIndex",void 0),i}(t.ChildProperty),pt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property("Start")],i.prototype,"position",void 0),st([t.Property("false")],i.prototype,"showArrow",void 0),st([t.Property(2)],i.prototype,"size",void 0),st([t.Property("black")],i.prototype,"color",void 0),st([t.Property(0)],i.prototype,"offSet",void 0),i}(t.ChildProperty),ht=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property("12px")],i.prototype,"size",void 0),st([t.Property(null)],i.prototype,"color",void 0),st([t.Property("Roboto, Noto, Sans-serif")],i.prototype,"fontFamily",void 0),st([t.Property("Medium")],i.prototype,"fontWeight",void 0),st([t.Property("Medium")],i.prototype,"fontStyle",void 0),st([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),mt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property("transparent")],i.prototype,"fill",void 0),st([t.Property(null)],i.prototype,"color",void 0),st([t.Property(1)],i.prototype,"borderOpacity",void 0),st([t.Property(1)],i.prototype,"borderWidth",void 0),st([t.Property(null)],i.prototype,"borderColor",void 0),st([t.Property(30)],i.prototype,"radius",void 0),st([t.Property(null)],i.prototype,"selectionColor",void 0),st([t.Property(null)],i.prototype,"highlightColor",void 0),st([t.Property(5)],i.prototype,"padding",void 0),st([t.Property(1)],i.prototype,"opacity",void 0),st([t.Property(["ZoomIn","ZoomOut","Reset"])],i.prototype,"toolbarItems",void 0),i}(t.ChildProperty),ct=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(!0)],i.prototype,"visible",void 0),st([t.Property("white")],i.prototype,"fill",void 0),st([t.Property(1)],i.prototype,"borderOpacity",void 0),st([t.Property(1)],i.prototype,"borderWidth",void 0),st([t.Property("#707070")],i.prototype,"borderColor",void 0),st([t.Property("black")],i.prototype,"fontColor",void 0),st([t.Property("")],i.prototype,"fontFamily",void 0),st([t.Property("")],i.prototype,"fontStyle",void 0),st([t.Property("")],i.prototype,"fontWeight",void 0),st([t.Property("")],i.prototype,"fontSize",void 0),st([t.Property(1)],i.prototype,"fontOpacity",void 0),i}(t.ChildProperty),ut=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property("transparent")],i.prototype,"backgroundColor",void 0),st([t.Property(1)],i.prototype,"borderOpacity",void 0),st([t.Property(1)],i.prototype,"borderWidth",void 0),st([t.Property("transparent")],i.prototype,"borderColor",void 0),st([t.Property("Far")],i.prototype,"horizontalAlignment",void 0),st([t.Property("Near")],i.prototype,"verticalAlignment",void 0),st([t.Property("Horizontal")],i.prototype,"orientation",void 0),st([t.Complex({},mt)],i.prototype,"buttonSettings",void 0),st([t.Complex({},ct)],i.prototype,"tooltipSettings",void 0),i}(t.ChildProperty),gt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property("")],i.prototype,"color",void 0),st([t.Property(0)],i.prototype,"width",void 0),st([t.Property(null)],i.prototype,"opacity",void 0),i}(t.ChildProperty),yt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(null)],i.prototype,"latitude",void 0),st([t.Property(null)],i.prototype,"longitude",void 0),i}(t.ChildProperty),ft=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(!1)],i.prototype,"visible",void 0),st([t.Property("")],i.prototype,"template",void 0),st([t.Property("")],i.prototype,"fill",void 0),st([t.Complex({color:"transparent",width:1},gt)],i.prototype,"border",void 0),st([t.Complex({fontFamily:null,size:null,fontWeight:null},ht)],i.prototype,"textStyle",void 0),st([t.Property(null)],i.prototype,"format",void 0),st([t.Property(null)],i.prototype,"valuePath",void 0),i}(t.ChildProperty),bt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(10)],i.prototype,"left",void 0),st([t.Property(10)],i.prototype,"right",void 0),st([t.Property(10)],i.prototype,"top",void 0),st([t.Property(10)],i.prototype,"bottom",void 0),i}(t.ChildProperty),vt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property("#000000")],i.prototype,"color",void 0),st([t.Property(1)],i.prototype,"width",void 0),st([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),St=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(!1)],i.prototype,"allowClustering",void 0),st([t.Complex({color:"transparent",width:1},gt)],i.prototype,"border",void 0),st([t.Property("#D2691E")],i.prototype,"fill",void 0),st([t.Property(1)],i.prototype,"opacity",void 0),st([t.Property("Rectangle")],i.prototype,"shape",void 0),st([t.Property(12)],i.prototype,"width",void 0),st([t.Property(12)],i.prototype,"height",void 0),st([t.Property(new Ze(0,0))],i.prototype,"offset",void 0),st([t.Property("")],i.prototype,"imageUrl",void 0),st([t.Property("")],i.prototype,"dashArray",void 0),st([t.Complex({},ht)],i.prototype,"labelStyle",void 0),st([t.Property(!1)],i.prototype,"allowClusterExpand",void 0),st([t.Complex({},vt)],i.prototype,"connectorLineSettings",void 0),i}(t.ChildProperty),xt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return rt(t,e),t}(t.ChildProperty),Ot=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(null)],i.prototype,"from",void 0),st([t.Property(null)],i.prototype,"to",void 0),st([t.Property(null)],i.prototype,"value",void 0),st([t.Property(null)],i.prototype,"color",void 0),st([t.Property(null)],i.prototype,"minOpacity",void 0),st([t.Property(null)],i.prototype,"maxOpacity",void 0),st([t.Property(null)],i.prototype,"label",void 0),st([t.Property(!0)],i.prototype,"showLegend",void 0),i}(t.ChildProperty),_t=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(null)],i.prototype,"latitude",void 0),st([t.Property(null)],i.prototype,"longitude",void 0),i}(t.ChildProperty),Ct=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(null)],i.prototype,"shapePath",void 0),st([t.Property(null)],i.prototype,"shapeValue",void 0),i}(t.ChildProperty),Mt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(!1)],i.prototype,"enable",void 0),st([t.Property(null)],i.prototype,"fill",void 0),st([t.Property(1)],i.prototype,"opacity",void 0),st([t.Property(!1)],i.prototype,"enableMultiSelect",void 0),st([t.Complex({color:"transparent",width:0},gt)],i.prototype,"border",void 0),i}(t.ChildProperty),Lt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(null)],i.prototype,"fill",void 0),st([t.Property(!1)],i.prototype,"enable",void 0),st([t.Property(1)],i.prototype,"opacity",void 0),st([t.Complex({color:"transparent",width:0},gt)],i.prototype,"border",void 0),i}(t.ChildProperty),Pt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(!1)],i.prototype,"visible",void 0),st([t.Property(1)],i.prototype,"width",void 0),st([t.Property(null)],i.prototype,"longitude",void 0),st([t.Property(null)],i.prototype,"latitude",void 0),st([t.Property("")],i.prototype,"dashArray",void 0),st([t.Property("black")],i.prototype,"color",void 0),st([t.Property(0)],i.prototype,"angle",void 0),st([t.Complex({showArrow:!1,position:"Start",size:5,color:"black"},pt)],i.prototype,"arrowSettings",void 0),st([t.Complex({},Mt)],i.prototype,"selectionSettings",void 0),st([t.Complex({},Lt)],i.prototype,"highlightSettings",void 0),i}(t.ChildProperty),wt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Complex({},gt)],i.prototype,"border",void 0),st([t.Property(!1)],i.prototype,"visible",void 0),st([t.Property([])],i.prototype,"dataSource",void 0),st([t.Property()],i.prototype,"query",void 0),st([t.Property(1e3)],i.prototype,"animationDuration",void 0),st([t.Property(0)],i.prototype,"animationDelay",void 0),st([t.Property("")],i.prototype,"fill",void 0),st([t.Property(10)],i.prototype,"minRadius",void 0),st([t.Property(20)],i.prototype,"maxRadius",void 0),st([t.Property(1)],i.prototype,"opacity",void 0),st([t.Property(null)],i.prototype,"valuePath",void 0),st([t.Property("Circle")],i.prototype,"bubbleType",void 0),st([t.Property(null)],i.prototype,"colorValuePath",void 0),st([t.Collection([],Ot)],i.prototype,"colorMapping",void 0),st([t.Complex({},ft)],i.prototype,"tooltipSettings",void 0),st([t.Complex({},Mt)],i.prototype,"selectionSettings",void 0),st([t.Complex({},Lt)],i.prototype,"highlightSettings",void 0),i}(t.ChildProperty),Tt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property("")],i.prototype,"text",void 0),st([t.Property("")],i.prototype,"description",void 0),i}(t.ChildProperty),It=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Complex({size:null,fontWeight:null,fontFamily:null},ht)],i.prototype,"textStyle",void 0),st([t.Property("Center")],i.prototype,"alignment",void 0),i}(Tt),kt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Complex({size:null,fontWeight:null,fontFamily:null},ht)],i.prototype,"textStyle",void 0),st([t.Property("Center")],i.prototype,"alignment",void 0),st([t.Complex({},It)],i.prototype,"subtitleSettings",void 0),i}(Tt),Nt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(!1)],i.prototype,"enable",void 0),st([t.Property(!0)],i.prototype,"enablePanning",void 0),st([t.Property(!0)],i.prototype,"enableSelectionZooming",void 0),st([t.Property("Horizontal")],i.prototype,"toolBarOrientation",void 0),st([t.Property(null)],i.prototype,"color",void 0),st([t.Property(null)],i.prototype,"highlightColor",void 0),st([t.Property(null)],i.prototype,"selectionColor",void 0),st([t.Property("Far")],i.prototype,"horizontalAlignment",void 0),st([t.Property("Near")],i.prototype,"verticalAlignment",void 0),st([t.Property(["ZoomIn","ZoomOut","Reset"])],i.prototype,"toolbars",void 0),st([t.Property(!0)],i.prototype,"mouseWheelZoom",void 0),st([t.Property(!1)],i.prototype,"doubleClickZoom",void 0),st([t.Property(!0)],i.prototype,"pinchZooming",void 0),st([t.Property(!1)],i.prototype,"zoomOnClick",void 0),st([t.Property(1)],i.prototype,"zoomFactor",void 0),st([t.Property(10)],i.prototype,"maxZoom",void 0),st([t.Property(1)],i.prototype,"minZoom",void 0),st([t.Property(!1)],i.prototype,"shouldZoomInitially",void 0),st([t.Property(!0)],i.prototype,"resetToInitial",void 0),st([t.Complex({},ut)],i.prototype,"toolbarSettings",void 0),i}(t.ChildProperty),Ft=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(!1)],i.prototype,"enable",void 0),st([t.Property(!0)],i.prototype,"applyShapeSettings",void 0),st([t.Property(1)],i.prototype,"opacity",void 0),st([t.Property("")],i.prototype,"fill",void 0),st([t.Complex({color:"",width:0},gt)],i.prototype,"border",void 0),i}(t.ChildProperty),Et=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(!1)],i.prototype,"useMarkerShape",void 0),st([t.Property(!1)],i.prototype,"toggleVisibility",void 0),st([t.Property(!1)],i.prototype,"visible",void 0),st([t.Property("transparent")],i.prototype,"background",void 0),st([t.Property("Layers")],i.prototype,"type",void 0),st([t.Property(!1)],i.prototype,"invertedPointer",void 0),st([t.Property("After")],i.prototype,"labelPosition",void 0),st([t.Property("None")],i.prototype,"labelDisplayMode",void 0),st([t.Property("Circle")],i.prototype,"shape",void 0),st([t.Property("")],i.prototype,"width",void 0),st([t.Property("")],i.prototype,"height",void 0),st([t.Complex({fontFamily:null,fontWeight:null},ht)],i.prototype,"textStyle",void 0),st([t.Property(15)],i.prototype,"shapeWidth",void 0),st([t.Property(15)],i.prototype,"shapeHeight",void 0),st([t.Property(10)],i.prototype,"shapePadding",void 0),st([t.Complex({color:"#000000",width:0},gt)],i.prototype,"border",void 0),st([t.Complex({color:"#000000",width:0},gt)],i.prototype,"shapeBorder",void 0),st([t.Complex({},Tt)],i.prototype,"title",void 0),st([t.Complex({size:null,color:Ue.legendTitleFont.color,fontStyle:Ue.legendTitleFont.fontStyle,fontWeight:null,fontFamily:null},ht)],i.prototype,"titleStyle",void 0),st([t.Property("Bottom")],i.prototype,"position",void 0),st([t.Property("Center")],i.prototype,"alignment",void 0),st([t.Property("None")],i.prototype,"orientation",void 0),st([t.Property({x:0,y:0})],i.prototype,"location",void 0),st([t.Property(null)],i.prototype,"fill",void 0),st([t.Property(1)],i.prototype,"opacity",void 0),st([t.Property("Default")],i.prototype,"mode",void 0),st([t.Property(null)],i.prototype,"showLegendPath",void 0),st([t.Property(null)],i.prototype,"valuePath",void 0),st([t.Property(!1)],i.prototype,"removeDuplicateLegend",void 0),st([t.Complex({},Ft)],i.prototype,"toggleLegendSettings",void 0),i}(t.ChildProperty),zt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(!1)],i.prototype,"visible",void 0),st([t.Complex({width:0,color:"transparent"},gt)],i.prototype,"border",void 0),st([t.Property("black")],i.prototype,"fill",void 0),st([t.Property(1)],i.prototype,"opacity",void 0),st([t.Property(5)],i.prototype,"rx",void 0),st([t.Property(5)],i.prototype,"ry",void 0),st([t.Complex({fontWeight:null},ht)],i.prototype,"textStyle",void 0),st([t.Property("")],i.prototype,"labelPath",void 0),st([t.Property("None")],i.prototype,"smartLabelMode",void 0),st([t.Property("None")],i.prototype,"intersectionAction",void 0),st([t.Property("")],i.prototype,"template",void 0),i}(t.ChildProperty),At=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(null)],i.prototype,"fill",void 0),st([t.Property([])],i.prototype,"palette",void 0),st([t.Property(5)],i.prototype,"circleRadius",void 0),st([t.Complex({width:null,color:"#000000"},gt)],i.prototype,"border",void 0),st([t.Property("")],i.prototype,"dashArray",void 0),st([t.Property(1)],i.prototype,"opacity",void 0),st([t.Property(null)],i.prototype,"colorValuePath",void 0),st([t.Property(null)],i.prototype,"borderColorValuePath",void 0),st([t.Property(null)],i.prototype,"borderWidthValuePath",void 0),st([t.Property(null)],i.prototype,"valuePath",void 0),st([t.Collection([],Ot)],i.prototype,"colorMapping",void 0),st([t.Property(!1)],i.prototype,"autofill",void 0),i}(t.ChildProperty),Bt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Complex({color:"transparent",width:1},gt)],i.prototype,"border",void 0),st([t.Property(null)],i.prototype,"dashArray",void 0),st([t.Property(!1)],i.prototype,"visible",void 0),st([t.Property(!1)],i.prototype,"enableDrag",void 0),st([t.Property("#FF471A")],i.prototype,"fill",void 0),st([t.Property(10)],i.prototype,"height",void 0),st([t.Property(10)],i.prototype,"width",void 0),st([t.Property(1)],i.prototype,"opacity",void 0),st([t.Property(null)],i.prototype,"colorValuePath",void 0),st([t.Property(null)],i.prototype,"shapeValuePath",void 0),st([t.Property(null)],i.prototype,"imageUrlValuePath",void 0),st([t.Property("Balloon")],i.prototype,"shape",void 0),st([t.Property("")],i.prototype,"legendText",void 0),st([t.Property(new Ze(0,0))],i.prototype,"offset",void 0),st([t.Property("")],i.prototype,"imageUrl",void 0),st([t.Property(null)],i.prototype,"template",void 0),st([t.Property([])],i.prototype,"dataSource",void 0),st([t.Property()],i.prototype,"query",void 0),st([t.Complex({},ft)],i.prototype,"tooltipSettings",void 0),st([t.Property(1e3)],i.prototype,"animationDuration",void 0),st([t.Property(0)],i.prototype,"animationDelay",void 0),st([t.Complex({},Mt)],i.prototype,"selectionSettings",void 0),st([t.Complex({},Lt)],i.prototype,"highlightSettings",void 0),st([t.Property(null)],i.prototype,"latitudeValuePath",void 0),st([t.Property(null)],i.prototype,"longitudeValuePath",void 0),st([t.Collection([],_t)],i.prototype,"initialMarkerSelection",void 0),i}(t.ChildProperty),Ut=function(e){function t(t,i,o,a){return e.call(this,t,i,o,a)||this}return rt(t,e),t}(Bt),jt=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.isBaseLayer=!1,t}return rt(i,e),st([t.Property(null)],i.prototype,"shapeData",void 0),st([t.Property()],i.prototype,"query",void 0),st([t.Complex({},At)],i.prototype,"shapeSettings",void 0),st([t.Property([])],i.prototype,"dataSource",void 0),st([t.Property("Layer")],i.prototype,"type",void 0),st([t.Property("Geographic")],i.prototype,"geometryType",void 0),st([t.Property("Aerial")],i.prototype,"bingMapType",void 0),st([t.Property("RoadMap")],i.prototype,"staticMapType",void 0),st([t.Property("")],i.prototype,"key",void 0),st([t.Property("Geometry")],i.prototype,"layerType",void 0),st([t.Property("")],i.prototype,"urlTemplate",void 0),st([t.Property(!0)],i.prototype,"visible",void 0),st([t.Property("name")],i.prototype,"shapeDataPath",void 0),st([t.Property("name")],i.prototype,"shapePropertyPath",void 0),st([t.Property(0)],i.prototype,"animationDuration",void 0),st([t.Collection([],Ut)],i.prototype,"markerSettings",void 0),st([t.Complex({},St)],i.prototype,"markerClusterSettings",void 0),st([t.Complex({},zt)],i.prototype,"dataLabelSettings",void 0),st([t.Collection([],wt)],i.prototype,"bubbleSettings",void 0),st([t.Collection([],Pt)],i.prototype,"navigationLineSettings",void 0),st([t.Complex({},ft)],i.prototype,"tooltipSettings",void 0),st([t.Complex({},Mt)],i.prototype,"selectionSettings",void 0),st([t.Complex({},Lt)],i.prototype,"highlightSettings",void 0),st([t.Complex({},Ft)],i.prototype,"toggleLegendSettings",void 0),st([t.Collection([],Ct)],i.prototype,"initialShapeSelection",void 0),i}(t.ChildProperty),Rt=function(){return function(e,t,i,o,a,n,l){void 0===i&&(i=256),void 0===o&&(o=256),void 0===a&&(a=0),void 0===n&&(n=0),void 0===l&&(l=null),this.x=e,this.y=t,this.top=a,this.left=n,this.height=i,this.width=o,this.src=l}}(),Zt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(null)],i.prototype,"background",void 0),st([t.Complex({color:"transparent",width:1},gt)],i.prototype,"border",void 0),i}(t.ChildProperty),Dt=function(){function e(e){this.maps=e,this.trackElements=[],this.sameMarkerData=[]}return e.prototype.markerRender=function(e,i,o,a,n){var l=this,r=0,s=0,d=0;e.translateType="marker";var p=e.layersCollection[o];this.markerSVGObject=e.renderer.createGroup({id:e.element.id+"_Markers_Group",class:"GroupElement"}),this.markerSVGObject.style.pointerEvents="auto";var c=t.createElement("div",{id:e.element.id+"_LayerIndex_"+o+"_Markers_Template_Group",className:e.element.id+"_template"});c.style.cssText="overflow: hidden; position: absolute;pointer-events: none;top:"+e.mapAreaRect.y+"px;left:"+e.mapAreaRect.x+"px;height:"+e.mapAreaRect.height+"px;width:"+e.mapAreaRect.width+"px;",p.markerSettings.map(function(u,g){var y=u.dataSource;Array.prototype.forEach.call(y,function(f,b){e.markerNullCount=g>0&&0===b?0:e.markerNullCount;var v={cancel:!1,name:Wt,fill:u.fill,height:u.height,width:u.width,imageUrl:u.imageUrl,shape:u.shape,template:u.template,data:f,maps:e,marker:u,border:u.border,colorValuePath:u.colorValuePath,shapeValuePath:u.shapeValuePath,imageUrlValuePath:u.imageUrlValuePath};e.trigger("markerRendering",v,function(S){v=I(v=T(v,f),f);var x=t.isNullOrUndefined(u.longitudeValuePath)?t.isNullOrUndefined(f.longitude)?t.isNullOrUndefined(f.Longitude)?null:parseFloat(f.Longitude):parseFloat(f.longitude):Number(w(f,u.longitudeValuePath)),O=t.isNullOrUndefined(u.latitudeValuePath)?t.isNullOrUndefined(f.latitude)?t.isNullOrUndefined(f.Latitude)?null:parseFloat(f.Latitude):parseFloat(f.latitude):Number(w(f,u.latitudeValuePath)),_=u.offset;if(!v.cancel&&u.visible&&!t.isNullOrUndefined(x)&&!t.isNullOrUndefined(O)){var C=e.element.id+"_LayerIndex_"+o+"_MarkerIndex_"+g+"_dataIndex_"+b,M=e.isTileMap?m(new $e(x,O),a,e.tileTranslatePoint,!0):h(O,x,a,p,e),L=0!==p.animationDuration||t.isNullOrUndefined(e.zoomModule),P=e.isTileMap?"SubLayer"===p.type&&t.isNullOrUndefined(e.zoomModule)?M=m(new $e(x,O),e.tileZoomLevel,e.tileTranslatePoint,!0):new Object:!t.isNullOrUndefined(e.zoomModule)&&e.zoomSettings.zoomFactor>1?ee(e,p,L):$(e,p,L),N="AddMarker"===n?e.scale:P.scale,F="AddMarker"===n?e.translatePoint:P.location;!v.template||isNaN(M.x)||isNaN(M.y)?v.template||isNaN(M.x)||isNaN(M.y)||(r++,E(v,u,y,b,M,F,C,_,N,e,l.markerSVGObject)):(d++,z(v,void 0,C,f,g,c,M,F,N,_,e),e.renderReactTemplates())}s+=isNaN(O)||isNaN(x)?1:0,d+=v.cancel?1:0,r+=v.cancel?1:0,e.markerNullCount=t.isNullOrUndefined(x)||t.isNullOrUndefined(O)?e.markerNullCount+1:e.markerNullCount;var A=y.length-e.markerNullCount;l.markerSVGObject.childElementCount===A-d-s&&"Template"!==n&&(i.appendChild(l.markerSVGObject),p.markerClusterSettings.allowClustering&&(e.svgObject.appendChild(l.markerSVGObject),e.element.appendChild(e.svgObject),("OSM"===p.layerType||-1!==p.urlTemplate.indexOf("openstreetmap")&&t.isNullOrUndefined(p.shapeData))&&e.zoomSettings.enable?i.appendChild(l.markerSVGObject):k(p,l.markerSVGObject,e,o,l.markerSVGObject,i,!0,!1),e.renderReactTemplates())),c.childElementCount===A-r-s&&ie(e.element.id+"_Secondary_Element")&&(ie(e.element.id+"_Secondary_Element").appendChild(c),e.checkInitialRender&&p.markerClusterSettings.allowClustering&&(k(p,c,e,o,l.markerSVGObject,i,!1,!1),e.renderReactTemplates()))})})})},e.prototype.calculateIndividualLayerMarkerZoomLevel=function(e,t,i){var o,a,n=Math.abs(this.maps.baseMapBounds.latitude.max-this.maps.baseMapBounds.latitude.min),l=Math.abs(this.maps.baseMapBounds.longitude.max-this.maps.baseMapBounds.longitude.min);o=(o=Math.floor(Math.log(t/n)))>i?i:o,a=(a=Math.floor(Math.log(e/l)))>i?i:a;var r=Math.min(o,a),s=Math.min(r,i-1);return this.maps.isTileMap||ze(s,this.maps),s},e.prototype.calculateZoomCenterPositionAndFactor=function(e){if(!t.isNullOrUndefined(this.maps))if(this.maps.zoomSettings.shouldZoomInitially&&this.maps.markerModule){var i,o,a,n,l=void 0,r=void 0,s=void 0,d=this.maps.zoomSettings.maxZoom,p=this.maps.mapAreaRect.width,h=this.maps.mapAreaRect.height;if(this.maps.markerZoomedState=this.maps.markerZoomedState?this.maps.markerZoomedState:t.isNullOrUndefined(this.maps.markerZoomFactor)?!this.maps.markerZoomedState:this.maps.markerZoomFactor>1?this.maps.markerZoomedState:!this.maps.markerZoomedState,this.maps.defaultState=this.maps.markerZoomedState?!this.maps.markerZoomedState:this.maps.defaultState,Array.prototype.forEach.call(e,function(e){0!==e.markerSettings.length&&Array.prototype.forEach.call(e.markerSettings,function(e){var l=e.dataSource;Array.prototype.forEach.call(l,function(e,l){var r=t.isNullOrUndefined(e.latitude)?t.isNullOrUndefined(e.Latitude)?null:parseFloat(e.Latitude):parseFloat(e.latitude),s=t.isNullOrUndefined(e.longitude)?t.isNullOrUndefined(e.Longitude)?null:parseFloat(e.Longitude):parseFloat(e.longitude);i=t.isNullOrUndefined(i)&&0===l?s:i,o=t.isNullOrUndefined(o)&&0===l?r:o,a=t.isNullOrUndefined(a)&&0===l?r:a,n=t.isNullOrUndefined(n)&&0===l?s:n,i>s&&(i=s),a>r&&(a=r),n<s&&(n=s),o<r&&(o=r)})})}),!(t.isNullOrUndefined(a)||t.isNullOrUndefined(i)||t.isNullOrUndefined(n)||t.isNullOrUndefined(o))){r=(a+o)/2,s=(i+n)/2,this.maps.markerCenterLatitude=r,this.maps.markerCenterLongitude=s,(t.isNullOrUndefined(this.maps.markerZoomCenterPoint)||this.maps.markerZoomedState)&&(this.maps.markerZoomCenterPoint={latitude:r,longitude:s});var m=void 0;this.maps.isTileMap||0===this.maps.baseMapRectBounds.min.x?(l=Ae(a,o,i,n,p,h,this.maps,!1),this.maps.isTileMap?m=t.isNullOrUndefined(this.maps.markerZoomFactor)?l:t.isNullOrUndefined(this.maps.mapScaleValue)?l:this.maps.mapScaleValue>1&&1!==this.maps.markerZoomFactor?this.maps.mapScaleValue:l:(m=t.isNullOrUndefined(this.maps.mapScaleValue)?l:1!==Math.floor(this.maps.scale)&&this.maps.mapScaleValue!==l&&t.isNullOrUndefined(this.maps.shouldZoomCurrentFactor)?this.maps.mapScaleValue:l)!==this.maps.mapScaleValue||1!==this.maps.markerZoomFactor&&1!==this.maps.mapScaleValue||this.maps.enablePersistence||(m=l)):(l=this.calculateIndividualLayerMarkerZoomLevel(p,h,d),m=t.isNullOrUndefined(this.maps.mapScaleValue)?l:this.maps.mapScaleValue!==l?this.maps.mapScaleValue:l),this.maps.markerZoomFactor=m}}else this.maps.markerZoomedState=!1,this.maps.markerZoomFactor>1&&(this.maps.markerCenterLatitude=null,this.maps.markerCenterLongitude=null,this.maps.markerZoomFactor=1,this.maps.enablePersistence||(this.maps.mapScaleValue=1)),this.maps.isTileMap&&!this.maps.enablePersistence&&this.maps.mapScaleValue<=1&&(this.maps.tileZoomLevel=0===this.maps.mapScaleValue?this.maps.isZoomByPosition?this.maps.tileZoomLevel:1:this.maps.mapScaleValue,1===this.maps.mapScaleValue&&1===this.maps.markerZoomFactor&&(this.maps.tileTranslatePoint.x=0,this.maps.tileTranslatePoint.y=0))},e.prototype.markerClick=function(e){var i=e.target.id;if(!(-1===i.indexOf("_LayerIndex_")||i.indexOf("_cluster_")>0)){var o=this.getMarker(i);if(!t.isNullOrUndefined(o)){o.marker.enableDrag&&(document.getElementById(this.maps.element.id+"_svg").style.cursor="grabbing");var a={cancel:!1,name:qt,data:o.data,maps:this.maps,marker:o.marker,target:i,x:e.clientX,y:e.clientY,latitude:o.data.latitude||o.data.Latitude,longitude:o.data.longitude||o.data.Longitude,value:o.data.name};if(this.maps.trigger(qt,a),o.marker.enableDrag){var n=!1,l=parseInt(i.split("_LayerIndex_")[1].split("_")[0],10),r=parseInt(i.split("_MarkerIndex_")[1].split("_")[0],10),s=parseInt(i.split("_dataIndex_")[1].split("_")[0],10),d=this.maps.layers[l].markerSettings[r];if(this.sameMarkerData.length>0&&(n=this.sameMarkerData[0].data.filter(function(e){return e.index==s}).length>0&&this.sameMarkerData[0].layerIndex===l&&this.sameMarkerData[0].markerIndex===r),!n){var p={name:Yt,x:e.clientX,y:e.clientY,latitude:o.data.latitude||o.data.Latitude,longitude:o.data.longitude||o.data.Longitude,layerIndex:l,markerIndex:r,dataIndex:s};this.maps.trigger(Yt,p),this.maps.markerDragArgument={targetId:i,x:e.clientX,y:e.clientY,latitude:o.data.latitude||o.data.Latitude,longitude:o.data.longitude||o.data.Longitude,shape:t.isNullOrUndefined(d.shapeValuePath)?d.shape:d.dataSource[s][d.shapeValuePath],layerIndex:l,markerIndex:r,dataIndex:s}}}}}},e.prototype.markerClusterClick=function(e){var i=e.target.id;if(-1!==i.indexOf("_LayerIndex_")&&-1!==i.indexOf("_cluster_")){var o=this.getMarker(i);if(!t.isNullOrUndefined(o)){o.clusterCollection.length>0&&this.maps.markerClusterExpand&&(ne(this.maps.element.id+"_mapsTooltip")&&this.maps.mapsTooltipModule.tooltipTargetID.indexOf("_MarkerIndex_")>-1&&Q(this.maps.element.id+"_mapsTooltip"),this.sameMarkerData.length>0&&!this.maps.markerClusterExpandCheck?(this.maps.markerClusterExpandCheck=!0,N(this.sameMarkerData,this.maps,this.markerSVGObject)):(this.sameMarkerData=o.clusterCollection,this.maps.markerClusterExpandCheck=!1,F(this.sameMarkerData,this.maps,this.markerSVGObject,!0)));var a={cancel:!1,name:Jt,data:o,maps:this.maps,target:i,x:e.clientX,y:e.clientY,latitude:o.data.latitude||o.data.Latitude,longitude:o.data.longitude||o.data.Longitude,markerClusterCollection:o.markCollection};this.maps.trigger(Jt,a)}}},e.prototype.getMarker=function(e){var t,i,o=e.split("_LayerIndex_"),a=parseInt(o[1].split("_")[0],10),n=this.maps.layers[a],l=[],r=[];if(this.maps.markerClusterExpand=n.markerClusterSettings.allowClusterExpand,e.indexOf("_MarkerIndex_")>-1){var s=parseInt(o[1].split("_MarkerIndex_")[1].split("_")[0],10),d=parseInt(o[1].split("_dataIndex_")[1].split("_")[0],10);if(i=n.markerSettings[s],!isNaN(s)){t=i.dataSource[d];var p=[];if(!i.template&&e.indexOf("_cluster_")>-1&&this.maps.layers[a].markerClusterSettings.allowClusterExpand&&Array.prototype.forEach.call(i.dataSource,function(e,i){e.latitude===t.latitude&&e.longitude===t.longitude&&p.push({data:t,index:i})}),e.indexOf("_cluster_")>-1){var h=document.getElementById(e.indexOf("_datalabel_")>-1?"Balloon"===n.markerClusterSettings.shape?e.split("_datalabel_")[0]+"_Group":e.split("_datalabel_")[0]:"Balloon"===n.markerClusterSettings.shape?e+"_Group":e),m="Balloon"===n.markerClusterSettings.shape?h.children[0].textContent.split(",").map(Number):h.textContent.split(",").map(Number);p=[];for(var c=0,u=m;c<u.length;c++){var g=u[c];p.push({data:i.dataSource[g],index:g}),l.push(i.dataSource[g])}!1,r.push({data:p,layerIndex:a,markerIndex:s,dataIndex:d,targetClusterIndex:+(e.split("_cluster_")[1].indexOf("_datalabel_")>-1?e.split("_cluster_")[1].split("_datalabel_")[0]:e.split("_cluster_")[1]),isClusterSame:!1})}return{marker:i,data:t,clusterCollection:r,markCollection:l}}}return null},e.prototype.markerMove=function(e){var i=e.target.id;if(!(-1===i.indexOf("_LayerIndex_")||i.indexOf("_cluster_")>0)){var o=this.getMarker(i);if(!t.isNullOrUndefined(o)){o.marker.enableDrag&&(document.getElementById(this.maps.element.id+"_svg").style.cursor=t.isNullOrUndefined(this.maps.markerDragArgument)?"pointer":"grabbing");var a={cancel:!1,name:Qt,data:o.data,maps:this.maps,target:i,x:e.clientX,y:e.clientY};this.maps.trigger(Qt,a)}}},e.prototype.markerClusterMouseMove=function(e){var i=e.target.id;if(-1!==i.indexOf("_LayerIndex_")&&-1!==i.indexOf("_cluster_")){var o=this.getMarker(i);if(this.maps.markerClusterExpand&&(e.target.style.cursor="pointer"),!t.isNullOrUndefined(o)){var a={cancel:!1,name:Kt,data:o.data,maps:this.maps,target:i,x:e.clientX,y:e.clientY};this.maps.trigger(Kt,a)}}},e.prototype.getModuleName=function(){return"Marker"},e.prototype.destroy=function(){this.maps=null,this.trackElements=[],this.markerSVGObject=null,this.sameMarkerData=[]},e}(),Vt="click",Ht="tooltipRender",Gt="shapeHighlight",Wt="markerRendering",Xt="markerClusterRendering",qt="markerClick",Yt="markerDragStart",Jt="markerClusterClick",Qt="markerMouseMove",Kt="markerClusterMouseMove",$t="dataLabelRendering",ei="bubbleRendering",ti="bubbleClick",ii="bubbleMouseMove",oi="animationComplete",ai="annotationRendering",ni="itemSelection",li="itemHighlight",ri=function(){function e(e){this.maps=e}return e.prototype.getBingMap=function(e,i,o,a,n,l){for(var r="",s=Math.min(this.maps.tileZoomLevel,parseInt(this.maxZoom,10));s>0;s--){var d=0,p=1<<s-1;0!=(e.x&p)&&d++,0!=(e.y&p)&&(d+=2),r=r+""+d}if(t.isNullOrUndefined(l))return"";var h=l[Math.min(parseInt(r.substr(r.length-1,1),10),l.length)];return n=n.replace("{quadkey}",r).replace("{subdomain}",h),n+="&mkt="+a+"&ur=IN&Key="+i},e.prototype.destroy=function(){this.maps=null,this.subDomains=[]},e}(),si=function(){function e(e){this.maps=e}return e.prototype.getShapeColorMapping=function(e,i,o){var a=e.colorValuePath?e.colorValuePath:e.valuePath,n=t.isNullOrUndefined(a)?i[a]:a.indexOf(".")>-1?w(i,a):i[a],l=Number(n),r=this.getColorByValue(e.colorMapping,l,n);return t.isNullOrUndefined(r)?o:r},e.prototype.getColorByValue=function(e,i,o){if(isNaN(i)&&t.isNullOrUndefined(o))return null;for(var a,n="",l=0,r=e;l<r.length;l++){var s=r[l];(!t.isNullOrUndefined(s.from)&&!t.isNullOrUndefined(s.to)&&i>=s.from&&i<=s.to||s.value===o)&&(n="[object Array]"===Object.prototype.toString.call(s.color)?t.isNullOrUndefined(s.value)?this.getColor(s,i):s.color[0]:s.color),(i>=s.from&&i<=s.to||s.value===o)&&!t.isNullOrUndefined(s.minOpacity)&&!t.isNullOrUndefined(s.maxOpacity)&&n&&(a=this.deSaturationColor(s,n,i,o)),(""===n||t.isNullOrUndefined(n))&&t.isNullOrUndefined(s.from)&&t.isNullOrUndefined(s.to)&&t.isNullOrUndefined(s.minOpacity)&&t.isNullOrUndefined(s.maxOpacity)&&t.isNullOrUndefined(s.value)&&(n="[object Array]"===Object.prototype.toString.call(s.color)?s.color[0]:s.color)}return{fill:n||(e.length?null:o),opacity:a}},e.prototype.deSaturationColor=function(e,t,i,o){var a=1;if(i>=e.from&&i<=e.to||e.value===o){a=(isNaN(i)?e.from/(e.to-e.from):(i-e.from)/(e.to-e.from))*(e.maxOpacity-e.minOpacity)+e.minOpacity}return a},e.prototype.rgbToHex=function(e,t,i){return"#"+this.componentToHex(e)+this.componentToHex(t)+this.componentToHex(i)},e.prototype.componentToHex=function(e){var t=e.toString(16);return 1===t.length?"0"+t:t},e.prototype.getColor=function(e,t){var i,o="";return Number(t)===e.from?o=e.color[0]:Number(t)===e.to?o=e.color[e.color.length-1]:(i=this.getGradientColor(Number(t),e),o=this.rgbToHex(i.r,i.g,i.b)),o},e.prototype.getGradientColor=function(e,t){var i=t.from,o=t.to,a=0,n=o-i;a=(e-i)/n;var l,r;if(t.color.length<=2)l="#"===t.color[0].charAt(0)?t.color[0]:this._colorNameToHex(t.color[0]),r="#"===t.color[t.color.length-1].charAt(0)?t.color[t.color.length-1]:this._colorNameToHex(t.color[t.color.length-1]);else{l="#"===t.color[0].charAt(0)?t.color[0]:this._colorNameToHex(t.color[0]),r="#"===t.color[t.color.length-1].charAt(0)?t.color[t.color.length-1]:this._colorNameToHex(t.color[t.color.length-1]);for(var s=n/(t.color.length-1),d=t.color.length-1,p=[],h={},m=1;m<d;m++)h={b:i+m*s,color:t.color[m]},p.push(h);for(var c=0;c<p.length;c++)i<=e&&e<=p[c].b&&0===c?(r="#"===p[c].color.charAt(0)?p[c].color:this._colorNameToHex(p[c].color),a=e<p[c].b?1-Math.abs((e-p[c].b)/s):(e-p[c].b)/s):p[c].b<=e&&e<=o&&c===p.length-1&&(l="#"===p[c].color.charAt(0)?p[c].color:this._colorNameToHex(p[c].color),a=e<p[c].b?1-Math.abs((e-p[c].b)/s):(e-p[c].b)/s),c!==p.length-1&&c<p.length&&p[c].b<=e&&e<=p[c+1].b&&(l="#"===p[c].color.charAt(0)?p[c].color:this._colorNameToHex(p[c].color),r="#"===p[c+1].color.charAt(0)?p[c+1].color:this._colorNameToHex(p[c+1].color),a=Math.abs(e-p[c+1].b)/s)}return this.getPercentageColor(a,l,r)},e.prototype.getPercentageColor=function(e,t,i){var o=i.split("#")[1],a=t.split("#")[1],n=this.getPercentage(e,parseInt(a.substr(0,2),16),parseInt(o.substr(0,2),16)),l=this.getPercentage(e,parseInt(a.substr(2,2),16),parseInt(o.substr(2,2),16)),r=this.getPercentage(e,parseInt(a.substr(4,2),16),parseInt(o.substr(4,2),16));return new We(n,l,r)},e.prototype.getPercentage=function(e,t,i){var o=i-t;return Math.round(t+o*e)},e.prototype._colorNameToHex=function(e){var t={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c","indigo ":"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",orchid:"#da70d6",papayawhip:"#ffefd5",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};return"[object Array]"===Object.prototype.toString.call(e)?e:void 0!==t[e.toLowerCase()]?t[e.toLowerCase()]:e},e}(),di=function(){function e(e){this.isMapCoordinates=!0,this.horizontalPan=!1,this.horizontalPanXCount=0,this.mapObject=e,this.ajaxModule=new t.Fetch,this.ajaxResponse=[]}return e.prototype.measureLayerPanel=function(){var e=this,i=this.mapObject.layersCollection,o=this.mapObject.mapAreaRect,a=ie(this.mapObject.element.id+"_Secondary_Element");if(this.mapObject.isTileMap&&a){this.tileSvgObject=this.mapObject.renderer.createSvg({id:this.mapObject.element.id+"_Tile_SVG",width:o.width,height:o.height});var n=t.createElement("div",{id:this.mapObject.element.id+"_Tile_SVG_Parent"});n.style.cssText="position: absolute; height: "+o.height+"px; width: "+o.width+"px;",n.appendChild(this.tileSvgObject),a.appendChild(n)}if(this.layerGroup=this.mapObject.renderer.createGroup({id:this.mapObject.element.id+"_Layer_Collections","clip-path":"url(#"+this.mapObject.element.id+"_MapArea_ClipRect)"}),"GoogleStaticMap"===this.mapObject.layers[this.mapObject.baseLayerIndex].layerType){this.clipRectElement=this.mapObject.renderer.drawClipPath(new Xe(this.mapObject.element.id+"_MapArea_ClipRect","transparent",{width:1,color:"Gray"},1,{x:(o.width-640)/2,y:0,width:640,height:o.height}))}else this.clipRectElement=this.mapObject.renderer.drawClipPath(new Xe(this.mapObject.element.id+"_MapArea_ClipRect","transparent",{width:1,color:"Gray"},1,{x:this.mapObject.isTileMap?0:o.x,y:this.mapObject.isTileMap?0:o.y,width:o.width,height:o.height}));this.layerGroup.appendChild(this.clipRectElement),this.mapObject.baseMapBounds=null,this.mapObject.baseMapRectBounds=null,this.mapObject.baseSize=null,Array.prototype.forEach.call(i,function(t,i){e.currentLayer=t,e.processLayers(t,i)}),t.isNullOrUndefined(this.mapObject.legendModule)||"Float"!==this.mapObject.legendSettings.position||(this.mapObject.isTileMap?this.layerGroup.appendChild(this.mapObject.legendModule.legendGroup):this.mapObject.svgObject.appendChild(this.mapObject.legendModule.legendGroup))},e.prototype.renderTileLayer=function(e,i,o,a){e.currentFactor=e.calculateFactor(i),e.mapObject.defaultState=!(1!==e.mapObject.zoomSettings.zoomFactor&&!t.isNullOrUndefined(e.mapObject.tileZoomLevel)&&1!==e.mapObject.tileZoomLevel),t.isNullOrUndefined(e.mapObject.previousCenterLatitude)&&t.isNullOrUndefined(e.mapObject.previousCenterLongitude)&&!e.mapObject.isZoomByPosition?(e.mapObject.previousCenterLatitude=e.mapObject.centerPosition.latitude,e.mapObject.previousCenterLongitude=e.mapObject.centerPosition.longitude):e.mapObject.previousCenterLatitude!==e.mapObject.centerPosition.latitude&&e.mapObject.previousCenterLongitude!==e.mapObject.centerPosition.longitude||e.mapObject.isZoomByPosition?(e.mapObject.centerPositionChanged=!0,e.mapObject.previousCenterLatitude=e.mapObject.centerPosition.latitude,e.mapObject.previousCenterLongitude=e.mapObject.centerPosition.longitude):e.mapObject.centerPositionChanged=!1;var n=new Ze(e.mapObject.centerPosition.longitude,e.mapObject.centerPosition.latitude),l=n;this.mapObject.isTileMap&&e.mapObject.markerModule&&e.mapObject.zoomSettings.enable&&(e.mapObject.markerModule.calculateZoomCenterPositionAndFactor(this.mapObject.layersCollection),t.isNullOrUndefined(this.mapObject.markerCenterLatitude)||t.isNullOrUndefined(this.mapObject.markerCenterLongitude)||e.mapObject.isZoomByPosition||(l=new Ze(e.mapObject.markerCenterLongitude,e.mapObject.markerCenterLatitude))),n=!e.mapObject.zoomSettings.shouldZoomInitially&&e.mapObject.centerPosition.longitude&&e.mapObject.centerPosition.latitude&&!e.mapObject.zoomPersistence&&e.mapObject.defaultState?new Ze(e.mapObject.centerPosition.longitude,e.mapObject.centerPosition.latitude):e.mapObject.zoomSettings.shouldZoomInitially&&e.mapObject.markerZoomedState&&!e.mapObject.zoomPersistence&&!t.isNullOrUndefined(e.mapObject.markerZoomCenterPoint)?new Ze(e.mapObject.markerZoomCenterPoint.longitude,e.mapObject.markerZoomCenterPoint.latitude):{x:null,y:null};var r=e.mapObject.zoomSettings.shouldZoomInitially&&!e.mapObject.isZoomByPosition?t.isNullOrUndefined(e.mapObject.markerZoomFactor)?1:e.mapObject.markerZoomFactor:e.mapObject.zoomSettings.zoomFactor;if(r=e.mapObject.enablePersistence?t.isNullOrUndefined(e.mapObject.mapScaleValue)?t.isNullOrUndefined(e.mapObject.markerZoomFactor)?e.mapObject.zoomSettings.zoomFactor:e.mapObject.markerZoomFactor:e.mapObject.mapScaleValue:r,r=e.mapObject.zoomSettings.enable?r:e.mapObject.zoomSettings.zoomFactor,r=r>0?r:1,e.mapObject.defaultState=1===r,!e.mapObject.markerZoomedState&&e.mapObject.zoomSettings.shouldZoomInitially&&1===e.mapObject.zoomSettings.zoomFactor&&(e.mapObject.defaultState=!0),t.isNullOrUndefined(e.mapObject.tileZoomLevel))e.mapObject.tileZoomLevel=r,e.mapObject.previousZoomFactor=r;else if(this.mapObject.isReset&&1===e.mapObject.tileZoomLevel&&!e.mapObject.zoomSettings.shouldZoomInitially){var s=e.mapObject.tileZoomLevel;e.mapObject.tileZoomLevel=s}else 1!==e.mapObject.zoomSettings.zoomFactor||e.mapObject.zoomSettings.shouldZoomInitially?(e.mapObject.previousZoomFactor=e.mapObject.tileZoomLevel,e.mapObject.tileZoomLevel=e.mapObject.defaultState&&e.mapObject.zoomSettings.enable?e.mapObject.tileZoomLevel:e.mapObject.zoomSettings.shouldZoomInitially||e.mapObject.centerPositionChanged?r:e.mapObject.previousZoomFactor!==e.mapObject.zoomSettings.zoomFactor?e.mapObject.zoomSettings.zoomFactor:e.mapObject.tileZoomLevel,e.mapObject.tileZoomLevel=1===r&&0===e.mapObject.zoomSettings.zoomFactor?r:e.mapObject.tileZoomLevel,!t.isNullOrUndefined(e.mapObject.tileTranslatePoint)&&(e.mapObject.markerZoomFactor!==e.mapObject.mapScaleValue||t.isNullOrUndefined(e.mapObject.markerZoomFactor)&&t.isNullOrUndefined(e.mapObject.mapScaleValue))&&(e.mapObject.zoomSettings.zoomFactor<=1||e.mapObject.previousZoomFactor!==e.mapObject.zoomSettings.zoomFactor)&&(e.mapObject.tileTranslatePoint.x=0,e.mapObject.tileTranslatePoint.y=0)):e.mapObject.defaultState&&(e.mapObject.previousZoomFactor=e.mapObject.tileZoomLevel,e.mapObject.tileZoomLevel=r,e.mapObject.tileTranslatePoint.x=0,e.mapObject.tileTranslatePoint.y=0);if(r<=1&&!t.isNullOrUndefined(e.mapObject.height)&&!e.mapObject.zoomSettings.shouldZoomInitially&&e.mapObject.tileZoomLevel===e.mapObject.tileZoomScale&&this.mapObject.initialCheck&&te(this.mapObject),t.isNullOrUndefined(e.mapObject.centerLatOfGivenLocation)||t.isNullOrUndefined(e.mapObject.centerLongOfGivenLocation)||!e.mapObject.zoomNotApplied||(l.y=e.mapObject.centerLatOfGivenLocation,l.x=e.mapObject.centerLongOfGivenLocation,e.mapObject.tileZoomLevel=e.mapObject.mapScaleValue=e.mapObject.scaleOfGivenLocation),e.mapObject.tileTranslatePoint=e.panTileMap(e.mapObject.availableSize.width,e.mapObject.availableSize.height,l),this.mapObject.zoomSettings.resetToInitial&&this.mapObject.initialCheck&&!t.isNullOrUndefined(e.mapObject.height)&&this.mapObject.availableSize.height>512){this.mapObject.applyZoomReset=!0,this.mapObject.initialZoomLevel=Math.floor(this.mapObject.availableSize.height/512);var d="GoogleStaticMap"!==this.mapObject.layers[this.mapObject.baseLayerIndex].layerType?20:0,p=256*Math.pow(2,this.mapObject.initialZoomLevel);this.mapObject.initialTileTranslate.x=this.mapObject.availableSize.width/2-p/2,this.mapObject.initialTileTranslate.y=this.mapObject.availableSize.height/2-p/2+d}if(e.generateTiles(e.mapObject.tileZoomLevel,e.mapObject.tileTranslatePoint,null,a),t.isNullOrUndefined(e.mapObject.previousZoomFactor)||e.mapObject.previousZoomFactor===e.mapObject.zoomSettings.zoomFactor||(e.mapObject.previousZoomFactor=e.mapObject.zoomSettings.zoomFactor),e.mapObject.navigationLineModule){var h=e.mapObject.navigationLineModule.renderNavigation(e.currentLayer,e.mapObject.tileZoomLevel,o);t.isNullOrUndefined(h)||e.layerObject.appendChild(h)}e.mapObject.markerModule&&e.mapObject.markerModule.markerRender(this.mapObject,e.layerObject,o,e.mapObject.tileZoomLevel,null),e.translateLayerElements(e.layerObject,o),e.layerGroup.appendChild(e.layerObject)},e.prototype.processLayers=function(e,i){var o=this;if(this.layerObject=this.mapObject.renderer.createGroup({id:this.mapObject.element.id+"_LayerIndex_"+i}),!this.mapObject.enablePersistence){var a=this.mapObject.getModuleName()+this.mapObject.element.id;if(-1===navigator.userAgent.indexOf("Edge")){var n=void 0;try{n=window.localStorage}catch(e){n=null}!t.isNullOrUndefined(n)&&window.localStorage.getItem(a)&&window.localStorage.removeItem(a)}}var l={cancel:!1,name:"layerRendering",index:i,layer:e,maps:this.mapObject,visible:e.visible};this.mapObject.trigger("layerRendering",l,function(a){if(!l.cancel&&l.visible)if("OSM"===e.layerType&&(e.urlTemplate="https://a.tile.openstreetmap.org/level/tileX/tileY.png"),"Google"===e.layerType&&(e.urlTemplate="https://mt1.google.com/vt/lyrs=m@129&hl=en&x=tileX&y=tileY&z=level"),"Geometry"!==e.layerType||t.isNullOrUndefined(e.shapeData)&&!t.isNullOrUndefined(e.urlTemplate)&&""!==e.urlTemplate){if("Bing"!==e.layerType||o.bing)if(!t.isNullOrUndefined(e.urlTemplate)&&e.urlTemplate.indexOf("quadkey")>-1){var n=new ri(o.mapObject);o.bingMapCalculation(e,i,o,n)}else o.renderTileLayer(o,e,i);else if(e.key&&e.key.length>1){var r=o,s=new ri(o.mapObject),d="https://dev.virtualearth.net/REST/V1/Imagery/Metadata/"+("AerialWithLabel"===e.bingMapType?"AerialWithLabelsOnDemand":e.bingMapType),p=new t.Fetch({url:d+"?output=json&include=ImageryProviders&urischeme=https&key="+e.key});p.onSuccess=function(t){var a=t.resourceSets[0].resources[0],n=a.imageUrl,l=a.imageUrlSubdomains,d=a.zoomMax;null!==n&&void 0!==n&&n!==s.imageUrl&&(s.imageUrl=n),null!==l&&void 0!==l&&l!==s.subDomains&&(s.subDomains=l),null!==d&&void 0!==d&&d!==s.maxZoom&&(s.maxZoom=d),r.mapObject.bingMap=s,r.renderTileLayer(r,e,i,s),o.mapObject.arrangeTemplate(),o.mapObject.zoomModule&&o.mapObject.previousScale!==o.mapObject.scale&&o.mapObject.zoomModule.applyTransform(o.mapObject,!0)},p.send()}}else if(!(t.isNullOrUndefined(e.shapeData)||t.isNullOrUndefined(e.shapeData.geometries)&&t.isNullOrUndefined(e.shapeData.features))){var h=!t.isNullOrUndefined(e.shapeData.geometries)&&e.shapeData.geometries.length>0?e.shapeData.geometries:e.shapeData.features;e.layerData=[];var m=e.shapeData.bbox;!t.isNullOrUndefined(m)&&e.isBaseLayer?o.mapObject.baseMapBounds=new Ve({min:m[0][1],max:m[1][1]},{min:m[0][0],max:m[1][0]}):t.isNullOrUndefined(o.mapObject.baseMapBounds)&&!q(h)&&o.calculateRectBounds(h),o.calculatePathCollection(i,h)}}),this.mapObject.isTileMap?this.tileSvgObject&&(this.tileSvgObject.appendChild(this.layerGroup),this.mapObject.baseMapBounds=null):this.mapObject.svgObject.appendChild(this.layerGroup)},e.prototype.bingMapCalculation=function(e,t,i,o){o.imageUrl=e.urlTemplate,o.subDomains=["t0","t1","t2","t3"],o.maxZoom="21",i.mapObject.bingMap=o,i.renderTileLayer(i,e,t,o),this.mapObject.arrangeTemplate(),this.mapObject.zoomModule&&this.mapObject.previousScale!==this.mapObject.scale&&this.mapObject.zoomModule.applyTransform(this.mapObject,!0)},e.prototype.bubbleCalculation=function(e,i){if(null!=e.dataSource&&null!=e)for(var o=e.dataSource,a=0;a<o.length;a++){var n=t.isNullOrUndefined(e.valuePath)?parseFloat(e.dataSource[a][e.valuePath]):e.valuePath.indexOf(".")>-1?Number(w(e.dataSource[a],e.valuePath)):parseFloat(e.dataSource[a][e.valuePath]);0!==a?n>i.max?i.max=n:n<i.min&&(i.min=n):i.max=i.min=n}},e.prototype.calculatePathCollection=function(e,i){var o=this;this.groupElements=[],q(i)||(this.currentFactor=this.calculateFactor(this.currentLayer)),this.rectBounds=null;var a=this.currentLayer.shapeSettings;this.currentLayer.bubbleSettings;Array.prototype.forEach.call(i,function(e,i){if(!t.isNullOrUndefined(e.geometry)||!t.isNullOrUndefined(e.coordinates)){var a=t.isNullOrUndefined(e.geometry)?e.type:e.geometry.type,n=t.isNullOrUndefined(e.geometry)?e.coordinates:e.geometry.coordinates,l=e.geometry,r=e.properties;o.generatePoints(a,n,l,r)}}),this.currentLayer.rectBounds=this.rectBounds,t.isNullOrUndefined(this.mapObject.baseMapRectBounds)&&this.currentLayer.isBaseLayer&&(this.mapObject.baseMapRectBounds=this.rectBounds);var n=a.palette.length>1?a.palette:function(e){var t;switch(e.toLowerCase()){case"tailwind":t=["#0369A1","#14B8A6","#15803D","#334155","#5A61F6","#65A30D","#8B5CF6","#9333EA","#F59E0B","#F97316"];break;case"tailwinddark":t=["#10B981","#22D3EE","#2DD4BF","#4ADE80","#8B5CF6","#E879F9","#F472B6","#F87171","#F97316","#FCD34D"];break;case"bootstrap5":t=["#262E0B","#668E1F","#AF6E10","#862C0B","#1F2D50","#64680B","#311508","#4C4C81","#0C7DA0","#862C0B"];break;case"bootstrap5dark":t=["#5ECB9B","#A860F1","#EBA844","#557EF7","#E9599B","#BFC529","#3BC6CF","#7A68EC","#74B706","#EA6266"];break;case"fluent":t=["#614570","#4C6FB1","#CC6952","#3F579A","#4EA09B","#6E7A89","#D4515C","#E6AF5D","#639751","#9D4D69"];break;case"fluentdark":t=["#8AB113","#2A72D5","#43B786","#584EC6","#E85F9C","#6E7A89","#EA6266","#EBA844","#26BC7A","#BC4870"];break;case"material3":t=["#6200EE","#E77A16","#82C100","#7107DC","#05BB3D","#D21020","#FAD200","#0085FF","#9204EA","#08EE9B"];break;case"material3dark":t=["#4EAAFF","#FA4EAB","#FFF500","#17EA58","#38FFE7","#FF9E45","#B3F32F","#B93CE4","#FC5664","#9B55FF"];break;default:t=["#B5E485","#7BC1E8","#DF819C","#EC9B79","#78D0D3","#D6D572","#9178E3","#A1E5B4","#87A4B4","#E4C16C"]}return t}(this.mapObject.theme),l=t.createElement("div",{id:this.mapObject.element.id+"_LayerIndex_"+e+"_Label_Template_Group",className:this.mapObject.element.id+"_template"});if(l.style.cssText="pointer-events: none; overflow: hidden; position: absolute;top:"+this.mapObject.mapAreaRect.y+"px;left:"+this.mapObject.mapAreaRect.x+"px;height:"+this.mapObject.mapAreaRect.height+"px;width:"+this.mapObject.mapAreaRect.width+"px;",0!==this.currentLayer.layerData.length)for(var r=function(r){var d,p,h,m=void 0,c={color:a.border.color,width:a.border.width,opacity:a.border.opacity},u=s.currentLayer.layerData[r],g="",y=a.autofill?n[r%n.length]:a.fill||s.mapObject.themeStyle.shapeFill;null===a.colorValuePath||t.isNullOrUndefined(u.property)||(null!==(m=V(s.currentLayer.dataSource,u.property,s.currentLayer.shapeDataPath,s.currentLayer.shapePropertyPath,s.currentLayer))&&0===a.colorMapping.length?y=s.currentLayer.shapeSettings.colorValuePath.indexOf(".")>-1?w(s.currentLayer.dataSource[m],a.colorValuePath):s.currentLayer.dataSource[m][a.colorValuePath]:u.property[a.colorValuePath]&&0===s.currentLayer.dataSource.length&&0===a.colorMapping.length&&(y=s.currentLayer.shapeSettings.colorValuePath.indexOf(".")>-1?w(u.property,a.colorValuePath):u.property[a.colorValuePath]),y=t.isNullOrUndefined(y)?a.fill||s.mapObject.themeStyle.shapeFill:y);var f=s.mapObject.element.id+"_LayerIndex_"+e+"_shapeIndex_"+r+"_dataIndex_"+m,b=s.getShapeColorMapping(s.currentLayer,u.property,y);y="[object Object]"!==Object.prototype.toString.call(b)||t.isNullOrUndefined(b.fill)?y:b.fill,(s.currentLayer.shapeSettings.borderColorValuePath||s.currentLayer.shapeSettings.borderWidthValuePath)&&null!==(m=V(s.currentLayer.dataSource,u.property,s.currentLayer.shapeDataPath,s.currentLayer.shapePropertyPath,s.currentLayer))&&(s.currentLayer.dataSource[m][a.borderColorValuePath]&&(c.color=s.currentLayer.dataSource[m][a.borderColorValuePath]),s.currentLayer.dataSource[m][a.borderWidthValuePath]&&(c.width=s.currentLayer.dataSource[m][a.borderWidthValuePath]));var v="[object Object]"!==Object.prototype.toString.call(b)||t.isNullOrUndefined(b.opacity)?a.opacity:b.opacity,S={cancel:!1,name:"shapeRendering",index:r,data:s.currentLayer.dataSource?s.currentLayer.dataSource[m]:null,maps:s.mapObject,shape:a,fill:y,border:{width:c.width,color:c.color,opacity:c.opacity}},x=function(s){var m=t.isNullOrUndefined(u._isMultiPolygon)?t.isNullOrUndefined(u.type)?u[0].type:u.type:"MultiPolygon";if(m="Polygon"===m||"MultiPolygon"===m?"Polygon":m,s.cancel?(s.fill=y,s.border.color=a.border.color,s.border.width=a.border.width,o.mapObject.layers[e].shapeSettings.border=a.border):(s.fill="#A6A6A6"===s.fill?s.shape.fill||o.mapObject.themeStyle.shapeFill:s.fill,s.border.color="#000000"===s.border.color?s.shape.border.color:s.border.color,s.border.width=0===s.border.width?s.shape.border.width:s.border.width,t.isNullOrUndefined(a.borderColorValuePath)&&(o.mapObject.layers[e].shapeSettings.border.color=s.border.color),t.isNullOrUndefined(a.borderWidthValuePath)&&(o.mapObject.layers[e].shapeSettings.border.width=s.border.width)),s.border.opacity=t.isNullOrUndefined(s.border.opacity)?v:s.border.opacity,o.groupElements.length<1)h=o.mapObject.renderer.createGroup({id:o.mapObject.element.id+"_LayerIndex_"+e+"_"+m+"_Group",transform:""}),o.groupElements.push(h);else for(var c=0;c<o.groupElements.length;c++){var b=o.groupElements[c];if(b.id.indexOf(m)>-1){h=b;break}if(c>=o.groupElements.length-1){h=o.mapObject.renderer.createGroup({id:o.mapObject.element.id+"_LayerIndex_"+e+"_"+m+"_Group"}),o.groupElements.push(h);break}}var S;switch(m){case"Polygon":u._isMultiPolygon?g=o.generateMultiPolygonPath(u):(g+="M"+u[0].point.x+" "+u[0].point.y,u.map(function(e){g+=" L "+e.point.x+" "+e.point.y})),(g+=" z ").length>3&&(d=new Ge(f,s.fill,s.border.width,s.border.color,v,s.border.opacity,a.dashArray,g),S=o.mapObject.renderer.drawPath(d));break;case"LineString":u.map(function(e,t){g+=0===t?"M "+e.point.x+" "+e.point.y:"L"+e.point.x+" , "+e.point.y+" "}),g.length>3&&(d=new Ge(f,"transparent",t.isNullOrUndefined(s.border.width)?1:s.border.width,t.isNullOrUndefined(s.fill)?s.border.color:s.fill,v,s.border.opacity,a.dashArray,g),S=o.mapObject.renderer.drawPath(d));break;case"MultiLineString":u.map(function(e){e.map(function(e,t){g+=0===t?"M "+e.point.x+" "+e.point.y:"L"+e.point.x+" , "+e.point.y+" "})}),g.length>3&&(d=new Ge(f,"transparent",t.isNullOrUndefined(s.border.width)?1:s.border.width,t.isNullOrUndefined(s.fill)?s.border.color:s.fill,v,s.border.opacity,a.dashArray,g),S=o.mapObject.renderer.drawPath(d));break;case"Point":var x=u.point,O="SubLayer"!==o.mapObject.layers[e].type?a.circleRadius:a.circleRadius/(o.mapObject.isTileMap?o.mapObject.scale:o.currentFactor);p=new qe(f,s.fill,s.border,v,x.x,x.y,O,a.dashArray),S=o.mapObject.renderer.drawCircle(p);break;case"MultiPoint":u.map(function(t,i){var n=t.point,l="SubLayer"!==o.mapObject.layers[e].type?a.circleRadius:a.circleRadius/(o.mapObject.isTileMap?o.mapObject.scale:o.currentFactor);p=new qe(f+"_multiLine_"+i,s.fill,s.border,v,n.x,n.y,l,a.dashArray),S=o.mapObject.renderer.drawCircle(p),o.pathAttributeCalculate(h,S,m,u,r)});break;case"Path":g=u.point,d=new Ge(f,s.fill,s.border.width,s.border.color,v,s.border.opacity,a.dashArray,g),S=o.mapObject.renderer.drawPath(d)}t.isNullOrUndefined(S)||"MultiPoint"===m||o.pathAttributeCalculate(h,S,m,u,r),r===o.currentLayer.layerData.length-1&&o.layerFeatures(e,n,i,l)};x.bind(s),s.mapObject.trigger("shapeRendering",S,x)},s=this,d=0;d<this.currentLayer.layerData.length;d++)r(d);else this.layerFeatures(e,n,i,l)},e.prototype.pathAttributeCalculate=function(e,i,o,a,n){for(var l,r="[object Array]"===Object.prototype.toString.call(this.currentLayer.shapePropertyPath)?this.currentLayer.shapePropertyPath:[this.currentLayer.shapePropertyPath],s=0;s<r.length;s++)if(!t.isNullOrUndefined(a.property)){l=r[s];break}if(i.setAttribute("aria-label",t.isNullOrUndefined(a.property)?"":a.property[l]),this.currentLayer.selectionSettings.enable||this.currentLayer.highlightSettings.enable?(i.tabIndex=this.mapObject.tabIndex+n+3,i.setAttribute("role","button"),i.style.cursor=this.currentLayer.highlightSettings.enable&&!this.currentLayer.selectionSettings.enable?"default":"pointer"):i.setAttribute("role","region"),"LineString"!==o&&"MultiLineString"!==o||(i.style.cssText="outline:none"),A(this.mapObject.selectedElementId,this.mapObject.shapeSelectionClass,i,"ShapeselectionMapStyle"),this.mapObject.toggledShapeElementId)for(s=0;s<this.mapObject.toggledShapeElementId.length;s++){var d=this.mapObject.legendSettings.toggleLegendSettings.applyShapeSettings?this.currentLayer.shapeSettings:this.mapObject.legendSettings.toggleLegendSettings;this.mapObject.toggledShapeElementId[s]===i.id&&(i.setAttribute("fill",d.fill),i.setAttribute("stroke",d.border.color),i.setAttribute("fill-opacity",d.opacity.toString()),i.setAttribute("stroke-opacity",(t.isNullOrUndefined(d.border.opacity)?d.opacity:d.border.opacity).toString()),i.setAttribute("stroke-width",(t.isNullOrUndefined(d.border.width)?0:d.border.width).toString()))}e.appendChild(i)},e.prototype.layerFeatures=function(e,t,i,o){var a,n=this;if(this.currentLayer.bubbleSettings.length&&this.mapObject.bubbleModule)for(var l,r=this.currentLayer.bubbleSettings.length,s=function(i){l=d.currentLayer.bubbleSettings[i],a=d.mapObject.renderer.createGroup({id:d.mapObject.element.id+"_LayerIndex_"+e+"_bubble_Group_"+i});var o={min:0,max:0};d.bubbleCalculation(l,o);var r=l.dataSource;d.mapObject.bubbleModule.bubbleCollection=[],r.map(function(r,s){n.renderBubble(n.currentLayer,r,t[s%t.length],o,i,s,a,e,l)}),d.groupElements.push(a)},d=this,p=0;p<r;p++)s(p);this.mapObject.markerModule&&!this.mapObject.isTileMap&&this.mapObject.zoomSettings.enable&&this.mapObject.markerModule.calculateZoomCenterPositionAndFactor(this.mapObject.layersCollection);var h=this.mapObject.renderer.createGroup({id:this.mapObject.element.id+"_LayerIndex_"+e+"_dataLableIndex_Group"});if(h.style.pointerEvents="none",this.mapObject.dataLabelModule&&this.currentLayer.dataLabelSettings.visible){var m=[];i.map(function(t,i){n.renderLabel(n.currentLayer,e,t,h,i,o,m)}),this.groupElements.push(h)}this.mapObject.navigationLineModule&&this.groupElements.push(this.mapObject.navigationLineModule.renderNavigation(this.currentLayer,this.currentFactor,e)),this.groupElements.map(function(e){n.layerObject.appendChild(e)}),this.mapObject.markerModule&&this.mapObject.markerModule.markerRender(this.mapObject,this.layerObject,e,this.mapObject.isTileMap?Math.floor(this.currentFactor):this.currentFactor,null),this.translateLayerElements(this.layerObject,e),this.layerGroup.appendChild(this.layerObject)},e.prototype.renderLabel=function(e,t,i,o,a,n,l){this.mapObject.dataLabelModule.renderLabel(e,t,i,e.layerData,o,n,a,l)},e.prototype.generateMultiPolygonPath=function(e){for(var t="",i=0;i<e.length;i++)t+="M"+e[i][0].point.x+" "+e[i][0].point.y,e[i].map(function(e){t+=" L "+e.point.x+" "+e.point.y});return t},e.prototype.renderBubble=function(e,i,o,a,n,l,r,s,d){if(t.isNullOrUndefined(this.mapObject.bubbleModule)||!d.visible)return null;o=d.fill?d.fill:o,this.mapObject.bubbleModule.id=this.mapObject.element.id+"_LayerIndex_"+s+"_BubbleIndex_"+n+"_dataIndex_"+l,this.mapObject.bubbleModule.renderBubble(d,i,o,a,n,l,s,e,r,this.mapObject.bubbleModule.id)},e.prototype.getShapeColorMapping=function(e,i,o){if(o=o||e.shapeSettings.fill,0===e.shapeSettings.colorMapping.length&&t.isNullOrUndefined(e.dataSource))return o;var a=V(e.dataSource,i,e.shapeDataPath,e.shapePropertyPath),n=new si(this.mapObject);return t.isNullOrUndefined(e.dataSource[a])?o:n.getShapeColorMapping(e.shapeSettings,e.dataSource[a],o)},e.prototype.generatePoints=function(e,i,o,a){var n,l,r=this,s=[];switch(e.toLowerCase()){case"polygon":(s=this.calculatePolygonBox(i[0],o,a)).length>0&&(s.property=a,s.type=e,s._isMultiPolygon=!1,this.currentLayer.layerData.push(s));break;case"multipolygon":for(var d=[],p=0;p<i.length;p++)for(var m=0;m<i[p].length;m++)(s=this.calculatePolygonBox(i[p][m],o,a)).length>0&&d.push(s);d.property=a,d.type=e,d._isMultiPolygon=!0,this.currentLayer.layerData.push(d);break;case"linestring":var c=t.isNullOrUndefined(this.currentLayer.shapeSettings.border.width)?1:"string"==typeof this.currentLayer.shapeSettings.border.width?parseInt(this.currentLayer.shapeSettings.border.width,10):this.currentLayer.shapeSettings.border.width;i.map(function(e){n=e[1],l=e[0];var t=h(n,l,r.currentFactor,r.currentLayer,r.mapObject);r.calculateBox(t,c),s.push({point:t,lat:n,lng:l})}),s.property=a,s.type=e,this.currentLayer.layerData.push(s);break;case"multilinestring":var u=t.isNullOrUndefined(this.currentLayer.shapeSettings.border.width)?1:"string"==typeof this.currentLayer.shapeSettings.border.width?parseInt(this.currentLayer.shapeSettings.border.width,10):this.currentLayer.shapeSettings.border.width,g=[];i.map(function(e){s=[],e.map(function(e){n=e[1],l=e[0];var t=h(n,l,r.currentFactor,r.currentLayer,r.mapObject);r.calculateBox(t,u),s.push({point:t,lat:n,lng:l})}),g.push(s)}),g.property=a,g.type=e,this.currentLayer.layerData.push(g);break;case"point":var y=(t.isNullOrUndefined(this.currentLayer.shapeSettings.border.width)?1:"string"==typeof this.currentLayer.shapeSettings.border.width?parseInt(this.currentLayer.shapeSettings.border.width,10):this.currentLayer.shapeSettings.border.width)+2*this.currentLayer.shapeSettings.circleRadius;n=i[1],l=i[0];var f=h(n,l,this.currentFactor,this.currentLayer,this.mapObject);this.calculateBox(f,y),this.currentLayer.layerData.push({point:f,type:e,lat:n,lng:l,property:a});break;case"multipoint":var b=(t.isNullOrUndefined(this.currentLayer.shapeSettings.border.width)?1:"string"==typeof this.currentLayer.shapeSettings.border.width?parseInt(this.currentLayer.shapeSettings.border.width,10):this.currentLayer.shapeSettings.border.width)+2*this.currentLayer.shapeSettings.circleRadius;s=[],i.map(function(e){n=e[1],l=e[0];var t=h(n,l,r.currentFactor,r.currentLayer,r.mapObject);r.calculateBox(t,b),s.push({point:t,lat:n,lng:l})}),s.property=a,s.type=e,this.currentLayer.layerData.push(s);break;case"path":this.currentLayer.layerData.push({point:o.d,type:e,property:a})}},e.prototype.calculateBox=function(e,i){t.isNullOrUndefined(this.rectBounds)?this.rectBounds={min:{x:e.x-i,y:e.y-i},max:{x:e.x+i,y:e.y+i}}:(this.rectBounds.min.x=Math.min(this.rectBounds.min.x,e.x-i),this.rectBounds.min.y=Math.min(this.rectBounds.min.y,e.y-i),this.rectBounds.max.x=Math.max(this.rectBounds.max.x,e.x+i),this.rectBounds.max.y=Math.max(this.rectBounds.max.y,e.y+i))},e.prototype.calculateFactor=function(e){var t,i,o,a=1,n=this.mapObject.baseMapBounds,l=new Re(this.mapObject.mapAreaRect.width,this.mapObject.mapAreaRect.height-5);if(n){var r=h(n.latitude.min,n.longitude.min,null,e,this.mapObject),s=h(n.latitude.max,n.longitude.max,null,e,this.mapObject);i=s.y-r.y,o=s.x-r.x,0!==i&&0!==o||(o=l.width/2,i=l.height)}else i=o=500;return t=i<l.height?parseFloat(Math.abs(100*Number(l.height/Number(i.toString()+"e+1"))).toString().split(".")[0])/10:l.height/i,a=o<l.width?parseFloat(Math.abs(100*Number(l.width/Number(o.toString()+"e+1"))).toString().split(".")[0])/10:l.width/o,Math.min(a,t)},e.prototype.translateLayerElements=function(e,i){var o;if(this.mapObject.translateType="layer",t.isNullOrUndefined(this.mapObject.baseMapRectBounds)){if(this.mapObject.isTileMap&&!t.isNullOrUndefined(this.mapObject.scale))for(var a=0;a<e.childElementCount;a++)if(!((o=e.childNodes[a]).id.indexOf("_Markers_Group")>-1||o.id.indexOf("_bubble_Group")>-1||o.id.indexOf("_dataLableIndex_Group")>-1||o.id.indexOf("_line_Group")>-1)){h="scale( "+this.mapObject.scale+" ) translate( "+this.mapObject.translatePoint.x+" "+this.mapObject.translatePoint.y+" ) ";o.setAttribute("transform",h)}}else{var n=this.currentLayer.animationDuration,l=0!==n||t.isNullOrUndefined(this.mapObject.zoomModule);this.mapObject.baseTranslatePoint=this.mapObject.zoomTranslatePoint;var r=void 0;r=this.mapObject.zoomSettings.zoomFactor>1&&!t.isNullOrUndefined(this.mapObject.zoomModule)?ee(this.mapObject,this.currentLayer,l):$(this.mapObject,this.currentLayer,l);var s=this.mapObject.previousScale=r.scale,d=this.mapObject.previousPoint=r.location;this.mapObject.baseTranslatePoint=this.mapObject.translatePoint=d,this.mapObject.baseScale=this.mapObject.scale=s;for(var p=0;p<e.childElementCount;p++)if(!((o=e.childNodes[p]).id.indexOf("_Markers_Group")>-1||o.id.indexOf("_bubble_Group")>-1||o.id.indexOf("_dataLableIndex_Group")>-1)){var h="scale( "+s+" ) translate( "+d.x+" "+d.y+" ) ";o.setAttribute("transform",h),n>0&&!t.isNullOrUndefined(this.mapObject.zoomModule)&&(r=this.mapObject.zoomSettings.zoomFactor>1?ee(this.mapObject,this.currentLayer):$(this.mapObject,this.currentLayer),this.mapObject.scale=r.scale,this.mapObject.zoomTranslatePoint=this.mapObject.translatePoint=r.location)}}},e.prototype.calculateRectBounds=function(e){var i=this;Array.prototype.forEach.call(e,function(e,o){if(!t.isNullOrUndefined(e.geometry)||!t.isNullOrUndefined(e.coordinates)){var a=t.isNullOrUndefined(e.geometry)?e.type:e.geometry.type,n=t.isNullOrUndefined(e.geometry)?e.coordinates:e.geometry.coordinates;switch(a.toLowerCase()){case"polygon":i.calculateRectBox(n[0]);break;case"multipolygon":n.map(function(e,t){i.calculateRectBox(e[0])});break;case"multilinestring":n.map(function(e,t){e.map(function(e,t){i.calculateRectBox(e,"multilinestring",0===t)})});break;case"linestring":n.map(function(e,t){i.calculateRectBox(e,"linestring",0===t)});break;case"point":i.calculateRectBox(n,"point");break;case"multipoint":n.map(function(e,t){i.calculateRectBox(e,"multipoint",0===t)})}}})},e.prototype.calculatePolygonBox=function(e,i,o){var a=this,n=[],l=this.mapObject.baseMapBounds;return e.map(function(e){var i=e[1],o=e[0];if(o>=l.longitude.min&&o<=l.longitude.max&&i>=l.latitude.min&&i<=l.latitude.max){var r=h(i,o,a.currentFactor,a.currentLayer,a.mapObject);t.isNullOrUndefined(a.rectBounds)?a.rectBounds={min:{x:r.x,y:r.y},max:{x:r.x,y:r.y}}:(a.rectBounds.min.x=Math.min(a.rectBounds.min.x,r.x),a.rectBounds.min.y=Math.min(a.rectBounds.min.y,r.y),a.rectBounds.max.x=Math.max(a.rectBounds.max.x,r.x),a.rectBounds.max.y=Math.max(a.rectBounds.max.y,r.y)),n.push({point:r,lat:i,lng:o})}}),n},e.prototype.calculateRectBox=function(e,i,o){var a=this;"linestring"!==i&&"multilinestring"!==i&&"point"!==i&&"multipoint"!==i?Array.prototype.forEach.call(e,function(e){t.isNullOrUndefined(a.mapObject.baseMapBounds)?a.mapObject.baseMapBounds=new Ve({min:e[1],max:e[1]},{min:e[0],max:e[0]}):(a.mapObject.baseMapBounds.latitude.min=Math.min(a.mapObject.baseMapBounds.latitude.min,e[1]),a.mapObject.baseMapBounds.latitude.max=Math.max(a.mapObject.baseMapBounds.latitude.max,e[1]),a.mapObject.baseMapBounds.longitude.min=Math.min(a.mapObject.baseMapBounds.longitude.min,e[0]),a.mapObject.baseMapBounds.longitude.max=Math.max(a.mapObject.baseMapBounds.longitude.max,e[0]))}):(o||"point"===i)&&t.isNullOrUndefined(this.mapObject.baseMapBounds)?this.mapObject.baseMapBounds=new Ve({min:e[1],max:e[1]},{min:e[0],max:e[0]}):(this.mapObject.baseMapBounds.latitude.min=Math.min(this.mapObject.baseMapBounds.latitude.min,e[1]),this.mapObject.baseMapBounds.latitude.max=Math.max(this.mapObject.baseMapBounds.latitude.max,e[1]),this.mapObject.baseMapBounds.longitude.min=Math.min(this.mapObject.baseMapBounds.longitude.min,e[0]),this.mapObject.baseMapBounds.longitude.max=Math.max(this.mapObject.baseMapBounds.longitude.max,e[0]))},e.prototype.generateTiles=function(e,i,o,a,n){var l=this.mapObject.locale,r=this.mapObject.availableSize;this.tiles=[];var s,d;s=d=Math.pow(2,e);var p=0,h=0;i.x+256*s<r.width&&(p=i.x>0?Math.ceil(i.x/256):0,h=i.x+256*s<r.width?Math.ceil((r.width-(i.x+256*s))/256):0),s+=p+h,"Pan"===o?(s=this.horizontalPanXCount>=s?this.horizontalPanXCount:s,this.horizontalPan=!1):(this.horizontalPanXCount=s,this.horizontalPan=!0);var m=this.mapObject.layers[this.mapObject.baseLayerIndex];this.urlTemplate=m.urlTemplate;var c=Math.min(d,(-i.y+r.height)/256+1),u=Math.min(s,(-i.x+r.width+256*h)/256+1),g=-(i.x+256*p+256)/256,y=-(i.y+256)/256;a=a||this.bing||this.mapObject.bingMap;for(var f=Math.round(g);f<Math.round(u);f++)for(var b=Math.round(y);b<Math.round(c);b++){var v=256*f+i.x,S=256*b+i.y;if(v>-256&&v<=r.width&&S>-256&&S<r.height&&b>=0){var x=f;f<0&&(x=x%d+d);var O=new Rt(x%d,b);if(O.left=Math.round(v),O.top=Math.round(S),"Bing"===m.layerType||a&&!t.isNullOrUndefined(m.urlTemplate)&&""!==m.urlTemplate){var _=m.key;O.src=a.getBingMap(O,_,m.bingMapType,l,a.imageUrl,a.subDomains)}else O.src=this.urlTemplate.replace("level",e.toString()).replace("tileX",O.x.toString()).replace("tileY",O.y.toString());this.tiles.push(O)}}t.isNullOrUndefined(o)||(o.indexOf("wheel")>1?(this.animateToZoomX=this.mapObject.availableSize.width/2-n.x-10,this.animateToZoomY=-n.y):(this.animateToZoomX=-10,this.animateToZoomY=10-(this.mapObject.availableSize.height/2+11.5)));for(var C=t.extend([],this.tiles,[],!0),M=0,L=this.mapObject.layers;M<L.length;M++){var P=L[M];if("SubLayer"===P.type&&P.visible&&("Geometry"!==P.layerType&&"GoogleStaticMap"!==P.layerType||"Geometry"===P.layerType&&t.isNullOrUndefined(P.shapeData)&&!t.isNullOrUndefined(P.urlTemplate)&&""!==P.urlTemplate))for(var w=0,T=C;w<T.length;w++){var I=T[w],k=t.extend({},I,{},!0);"Bing"===P.layerType?(a=new ri(this.mapObject),k.src=a.getBingMap(k,P.key,P.bingMapType,l,a.imageUrl,a.subDomains)):k.src=P.urlTemplate.replace("level",e.toString()).replace("tileX",I.x.toString()).replace("tileY",I.y.toString()),this.tiles.push(k)}}(this.mapObject.previousScale!==this.mapObject.scale||this.mapObject.isReset||this.mapObject.isZoomByPosition||this.mapObject.zoomNotApplied)&&this.arrangeTiles(o,this.animateToZoomX,this.animateToZoomY)},e.prototype.arrangeTiles=function(e,i,o){var a,n=this,l=document.getElementById(this.mapObject.element.id+"_tile_parent"),r=document.getElementById(this.mapObject.element.id+"_tiles");t.isNullOrUndefined(e)||"Pan"===e?a=0:(this.tileAnimation(e,i,o),a=this.mapObject.layersCollection[0].animationDuration),"GoogleStaticMap"===this.mapObject.layers[this.mapObject.baseLayerIndex].layerType?this.renderGoogleMap(this.mapObject.layers[0].key,this.mapObject.staticMapZoom):setTimeout(function(){l&&(l.style.zIndex="1"),r&&(r.style.zIndex="0");var i;!document.getElementById(n.mapObject.element.id+"_animated_tiles")&&l?(i=t.createElement("div",{id:n.mapObject.element.id+"_animated_tiles"}),l.appendChild(i)):"Pan"!==e&&r&&l?(r.appendChild(l.children[0]),n.mapObject.isAddLayer||t.isNullOrUndefined(document.getElementById(n.mapObject.element.id+"_animated_tiles"))||(document.getElementById(n.mapObject.element.id+"_animated_tiles").id=n.mapObject.element.id+"_animated_tiles_old"),i=t.createElement("div",{id:n.mapObject.element.id+"_animated_tiles"}),l.appendChild(i)):i=l?l.children[0]:null;for(var o=0;o<n.tiles.length;o++){var a=n.tiles[o],s=null,d=n.mapObject.element.id;if("Pan"===e){var p=document.getElementById(d+"_tile_"+o),h=!1;t.isNullOrUndefined(p)?(h=!0,p=t.createElement("div",{id:d+"_tile_"+o}),s=t.createElement("img")):(p.style.removeProperty("display"),s=p.children[0]),!h&&s&&s.src!==a.src&&(s.src=a.src),p.style.position="absolute",p.style.left=a.left+"px",p.style.top=a.top+"px",p.style.height=a.height+"px",p.style.width=a.width+"px",h&&(s.setAttribute("height","256px"),s.setAttribute("width","256px"),s.setAttribute("src",a.src),s.setAttribute("alt",n.mapObject.getLocalizedLabel("ImageNotFound")),s.style.setProperty("user-select","none"),p.appendChild(s),i.appendChild(p))}else{(s=t.createElement("img")).setAttribute("height","256px"),s.setAttribute("width","256px"),s.setAttribute("src",a.src),s.style.setProperty("user-select","none"),s.setAttribute("alt",n.mapObject.getLocalizedLabel("ImageNotFound"));(p=t.createElement("div",{id:d+"_tile_"+o})).style.position="absolute",p.style.left=a.left+"px",p.style.top=a.top+"px",p.style.height=a.height+"px",p.style.width=a.width+"px",p.appendChild(s),i&&i.appendChild(p)}o===n.tiles.length-1&&document.getElementById(n.mapObject.element.id+"_animated_tiles_old")&&Q(n.mapObject.element.id+"_animated_tiles_old")}if(!t.isNullOrUndefined(n.mapObject.currentTiles))for(var m=n.tiles.length;m<i.childElementCount;m++){for(var c=!1,u=0;u<n.mapObject.currentTiles.childElementCount;u++)c||n.mapObject.currentTiles.children[u].id!==i.children[m].id||(c=!0);c?i.children[m].style.display="none":i.removeChild(i.children[m])}},a)},e.prototype.tileAnimation=function(e,i,o){var a=document.getElementById(this.mapObject.element.id+"_tile_parent"),n=document.getElementById(this.mapObject.element.id+"_animated_tiles"),l=document.getElementById(this.mapObject.element.id+"_tiles"),r="2";if(0===e.indexOf("ZoomOut")||"Reset"===e){for(l.style.zIndex="1",a.style.zIndex="0";l.childElementCount>=1;)l.removeChild(l.children[0]);i=0,o=document.getElementById(this.mapObject.element.id+"_tile_parent").getClientRects()[0].height/4,r=0===e.indexOf("ZoomOut")?"0.5":"0.2"}t.isNullOrUndefined(n)||(n.style.transition=this.mapObject.layersCollection[0].animationDuration+"ms",n.style.transform="translate("+i+"px, "+o+"px) scale("+r+")")},e.prototype.renderGoogleMap=function(e,i){var o=this.mapObject;i=this.mapObject.tileZoomLevel;var a=256*Math.pow(2,i),n=o.mapAreaRect.width/2-a/2,l=o.mapAreaRect.height/2-a/2,r=0,s=0,d=m(new Ze(null,null),i,{x:n,y:l},this.isMapCoordinates);o.zoomModule&&o.zoomSettings.enable&&(r=o.zoomModule.mouseDownLatLong.x-o.zoomModule.mouseMoveLatLong.x,s=o.zoomModule.mouseDownLatLong.y-o.zoomModule.mouseMoveLatLong.y);var p=o.pointToLatLong(d.x-r,d.y-s);o.centerPosition.latitude=p.latitude,o.centerPosition.longitude=p.longitude;var h,c;h=t.isNullOrUndefined(parseInt(o.width,10))?parseInt(o.width,10)-22:Math.round(o.mapAreaRect.width),c=t.isNullOrUndefined(parseInt(o.height,10))?parseInt(o.height,10)-22:Math.round(o.mapAreaRect.height);var u=h>640?(h-640)/2:0,g=c>640?(c-640)/2:0,y=o.layers[o.layers.length-1].staticMapType.toString().toLowerCase(),f="https://maps.googleapis.com/maps/api/staticmap?size="+h+"x"+c+"&zoom="+i+"¢er="+(o.centerPosition.latitude&&o.centerPosition.longitude?o.centerPosition.latitude.toString()+","+o.centerPosition.longitude.toString():"0,0")+"&maptype="+y+"&key="+e;document.getElementById(this.mapObject.element.id+"_tile_parent").innerHTML='<div id="'+this.mapObject.element.id+'_StaticGoogleMap"style="position:absolute; left:'+u+"px; top:"+g+'px"><img src="'+f+'"alt="'+this.mapObject.getLocalizedLabel("ImageNotFound")+'"></div>'},e.prototype.panTileMap=function(e,i,o){this.mapObject.tileZoomLevel<=this.mapObject.tileZoomScale&&this.mapObject.initialCheck&&(this.mapObject.tileZoomLevel=this.mapObject.tileZoomScale);var a,n,l=this.mapObject.tileZoomLevel,r="GoogleStaticMap"!==this.mapObject.layers[this.mapObject.layers.length-1].layerType?20:0,s=256*Math.pow(2,l),d=m(o,l,{x:a=e/2-s/2,y:n=i/2-s/2},this.isMapCoordinates);if(r=this.mapObject.zoomNotApplied?0:r,a-=d.x-e/2,n=n-(d.y-i/2)+r,this.mapObject.scale=Math.pow(2,l-1),(t.isNullOrUndefined(this.mapObject.tileTranslatePoint)||0===this.mapObject.tileTranslatePoint.y&&0===this.mapObject.tileTranslatePoint.x||t.isNullOrUndefined(this.mapObject.previousTileWidth)||t.isNullOrUndefined(this.mapObject.previousTileHeight))&&(this.mapObject.previousTileWidth=e,this.mapObject.previousTileHeight=i),!t.isNullOrUndefined(this.mapObject.tileTranslatePoint)&&t.isNullOrUndefined(o.x)&&(1===this.mapObject.zoomSettings.zoomFactor||this.mapObject.zoomSettings.zoomFactor!==l||!this.mapObject.defaultState)&&(e!==this.mapObject.previousTileWidth||i!==this.mapObject.previousTileHeight)){var p=a-(this.mapObject.previousTileWidth/2-s/2),h=n-(this.mapObject.previousTileHeight/2-s/2+r);this.mapObject.tileTranslatePoint.x=this.mapObject.tileTranslatePoint.x+p,this.mapObject.tileTranslatePoint.y=this.mapObject.tileTranslatePoint.y+h}return t.isNullOrUndefined(this.mapObject.tileTranslatePoint)||this.mapObject.zoomNotApplied||(0===this.mapObject.tileTranslatePoint.x||this.mapObject.tileTranslatePoint.x===a||this.mapObject.centerPositionChanged||(a=this.mapObject.tileTranslatePoint.x),0===this.mapObject.tileTranslatePoint.y||this.mapObject.tileTranslatePoint.y===n||this.mapObject.centerPositionChanged||(n=this.mapObject.tileTranslatePoint.y)),this.mapObject.translatePoint=new Ze((a-.01*this.mapObject.zoomSettings.zoomFactor)/this.mapObject.scale,(n-.01*this.mapObject.zoomSettings.zoomFactor)/this.mapObject.scale),this.mapObject.previousTileWidth=e,this.mapObject.previousTileHeight=i,new Ze(a,n)},e.prototype.destroy=function(){this.mapObject=null,this.groupElements=[],this.layerObject=null,this.currentLayer=null,this.rectBounds=null,this.tiles=[],this.clipRectElement=null,this.tileSvgObject=null,this.ajaxModule=null,this.ajaxResponse=[],this.layerGroup=null,t.isNullOrUndefined(this.bing)||this.bing.destroy(),this.bing=null},e}(),pi=function(){function e(e){this.map=e}return e.prototype.renderAnnotationElements=function(){var e=this,i=this.map.element.id+"_Secondary_Element",o=t.createElement("div",{id:this.map.element.id+"_Annotations_Group"});o.style.position="absolute",o.style.top="0px",o.style.left="0px",this.map.annotations.map(function(t,i){null!==t.content&&e.createAnnotationTemplate(o,t,i)}),o.childElementCount>0&&!t.isNullOrUndefined(ie(i))&&ie(i).appendChild(o),this.map.renderReactTemplates()},e.prototype.createAnnotationTemplate=function(e,i,o){var a,n,l,r,s=this,d=this.map,p=d.availableSize,h=(d.element.id,t.createElement("div",{id:d.element.id+"_Annotation_"+o}));h.style.cssText="position: absolute; z-index:"+i.zIndex+";";var m={cancel:!1,name:ai,content:i.content,annotation:i};this.map.trigger(ai,m,function(e){if(!m.cancel)if((l=ae(m.content,s.map))&&l(s.map,s.map,m.content,s.map.element.id+"_ContentTemplate_"+o).length)for(var i=(r=Array.prototype.slice.call(l(s.map,s.map,m.content,s.map.element.id+"_ContentTemplate_"+o))).length,a=0;a<i;a++)h.appendChild(r[a]);else h.appendChild(t.createElement("div",{innerHTML:m.content}))});var c=_e(h.cloneNode(!0),d.element),u=d.element.getBoundingClientRect(),g=d.svgObject.getBoundingClientRect();a=Math.abs(g.left-u.left),n=Math.abs(g.top-u.top);var y=i.x.indexOf("%")>-1?p.width/100*parseFloat(i.x):parseFloat(i.x),f=i.y.indexOf("%")>-1?p.height/100*parseFloat(i.y):parseFloat(i.y);switch(a="None"===i.horizontalAlignment?a+y:a,n="None"===i.verticalAlignment?n+f:n,i.verticalAlignment){case"Near":n+=f;break;case"Center":n=n+f+(g.height/2-c.height/2);break;case"Far":n=n+g.height+f-c.height}switch(i.horizontalAlignment){case"Near":a+=y;break;case"Center":a=a+y+(g.width/2-c.width/2);break;case"Far":a=a+g.width+y-c.width}h.style.left=a+"px",h.style.top=n+"px",e.appendChild(h)},e.prototype.getModuleName=function(){return"Annotations"},e.prototype.destroy=function(){this.map=null},e}(),hi=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),mi=function(e,t,i,o){var a,n=arguments.length,l=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(l=(n<3?a(l):n>3?a(t,i,l):a(t,i))||l);return n>3&&l&&Object.defineProperty(t,i,l),l},ci=function(e){function a(i,o){var a=e.call(this,i,o)||this;return a.isTileMap=!1,a.isResize=!1,a.isReset=!1,a.baseSize=new Re(0,0),a.translatePoint=new Ze(0,0),a.baseTranslatePoint=new Ze(0,0),a.zoomTranslatePoint=new Ze(0,0),a.markerZoomedState=!0,a.zoomPersistence=!1,a.defaultState=!0,a.centerPositionChanged=!1,a.isTileMapSubLayer=!1,a.markerNullCount=0,a.tileTranslatePoint=new Ze(0,0),a.baseTileTranslatePoint=new Ze(0,0),a.isDevice=!1,a.staticMapZoom=a.zoomSettings.enable?a.zoomSettings.zoomFactor:0,a.zoomNotApplied=!1,a.dataLabelShape=[],a.zoomShapeCollection=[],a.zoomLabelPositions=[],a.mouseDownEvent={x:null,y:null},a.mouseClickEvent={x:null,y:null},a.selectedElementId=[],a.selectedMarkerElementId=[],a.selectedBubbleElementId=[],a.selectedNavigationElementId=[],a.selectedLegendElementId=[],a.legendSelectionCollection=[],a.shapeSelections=!0,a.legendSelection=!0,a.toggledLegendId=[],a.toggledShapeElementId=[],a.checkInitialRender=!0,a.initialTileTranslate=new Ze(0,0),a.markerDragId="",a.initialCheck=!0,a.applyZoomReset=!1,a.markerClusterExpandCheck=!1,a.markerClusterExpand=!1,a.mouseMoveId="",a.shapeSelectionItem=[],a.markerDragArgument=null,t.setValue("mergePersistData",a.mergePersistMapsData,a),a}return hi(a,e),Object.defineProperty(a.prototype,"isShapeSelected",{get:function(){return this.mapSelect},enumerable:!0,configurable:!0}),a.prototype.mergePersistMapsData=function(){var e,i;try{i=window.localStorage}catch(e){i=null}if(t.isNullOrUndefined(i)||(e=window.localStorage.getItem(this.getModuleName()+this.element.id)),!t.isNullOrUndefined(e)&&""!==e){var o=JSON.parse(e),a=Object.keys(o);this.isProtectedOnChange=!0;for(var n=0,l=a;n<l.length;n++){var r=l[n];"object"!=typeof this[r]||t.isNullOrUndefined(this[r])?this[r]=o[r]:t.extend(this[r],o[r])}this.isProtectedOnChange=!1}},a.prototype.getLocalizedLabel=function(e){return this.localeObject.getConstant(e)},a.prototype.preRender=function(){this.isDevice=t.Browser.isDevice,this.initPrivateVariable(),this.allowServerDataBinding=!1,this.unWireEVents(),this.wireEVents(),this.setCulture()},a.prototype.renderElements=function(){this.isDestroyed||(this.trigger("load",{maps:this}),this.createSVG(),this.findBaseAndSubLayers(),this.createSecondaryElement(),this.addTabIndex(),this.themeStyle=function(e){var t,i;switch(e.toLowerCase()){case"materialdark":i="#303030";break;case"fabricdark":i="#201F1F";break;case"bootstrapdark":i="#1A1A1A"}switch(e.toLowerCase()){case"materialdark":case"fabricdark":case"bootstrapdark":t={backgroundColor:i,areaBackgroundColor:i,titleFontColor:"#FFFFFF",titleFontSize:"14px",subTitleFontColor:"#FFFFFF",legendTitleFontColor:"#DADADA",legendTextColor:"#DADADA",dataLabelFontColor:"#DADADA",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#363F4C",zoomFillColor:"#FFFFFF",labelFontFamily:"Roboto, Noto, Sans-serif",fontFamily:"Roboto, Noto, Sans-serif",fontSize:"12px",fontWeight:"Medium",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900"};break;case"highcontrast":t={backgroundColor:"#000000",areaBackgroundColor:"#000000",titleFontColor:"#FFFFFF",titleFontSize:"14px",subTitleFontColor:"#FFFFFF",legendTitleFontColor:"#FFFFFF",legendTextColor:"#FFFFFF",dataLabelFontColor:"#000000",tooltipFontColor:"#000000",tooltipFillColor:"#ffffff",zoomFillColor:"#FFFFFF",fontFamily:"Roboto, Noto, Sans-serif",fontSize:"12px",fontWeight:"Medium",labelFontFamily:"Roboto, Noto, Sans-serif",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900"};break;case"bootstrap4":t={backgroundColor:"#FFFFFF",areaBackgroundColor:"#FFFFFF",titleFontColor:"#212529",subTitleFontColor:"#212529",legendTitleFontColor:"#212529",legendTextColor:"#212529",dataLabelFontColor:"#212529",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#000000",zoomFillColor:"#5B6269",fontFamily:"HelveticaNeue-Medium",fontSize:"12px",fontWeight:"Medium",titleFontSize:"16px",legendFontSize:"14px",tooltipFillOpacity:1,tooltipTextOpacity:.9,labelFontFamily:"HelveticaNeue-Medium",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900"};break;case"tailwind":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#374151",subTitleFontColor:"#374151",legendTitleFontColor:"#374151",legendTextColor:"#6B7280",dataLabelFontColor:"#505967",tooltipFontColor:"#F9FAFB",tooltipFillColor:"#111827",zoomFillColor:"#6b7280",fontFamily:"Inter",fontSize:"12px",fontWeight:"Medium",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:.9,labelFontFamily:"Inter",titleFontWeight:"500",zoomSelectionColor:"#374151",shapeFill:"#E5E7EB",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900"};break;case"tailwinddark":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#D1D5DB",subTitleFontColor:"#D1D5DB",legendTitleFontColor:"#D1D5DB",legendTextColor:"#D1D5DB",dataLabelFontColor:"#D1D5DB",tooltipFontColor:"#1F2937",tooltipFillColor:"#F9FAFB",zoomFillColor:"#D1D5DB",fontFamily:"Inter",fontSize:"12px",fontWeight:"Medium",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:.9,labelFontFamily:"Inter",titleFontWeight:"500",zoomSelectionColor:"#F3F4F6",shapeFill:"#374151",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900"};break;case"bootstrap5":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#212529",subTitleFontColor:"#212529",legendTitleFontColor:"#212529",legendTextColor:"#212529",dataLabelFontColor:"#212529",tooltipFontColor:"#F9FAFB",tooltipFillColor:"#212529",zoomFillColor:"#6C757D",fontFamily:"Helvetica Neue",fontSize:"12px",fontWeight:"Medium",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Helvetica Neue",titleFontWeight:"normal",zoomSelectionColor:"#343A40",shapeFill:"#E9ECEF",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900"};break;case"bootstrap5dark":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#FFFFFF",subTitleFontColor:"#FFFFFF",legendTitleFontColor:"#FFFFFF",legendTextColor:"#FFFFFF",dataLabelFontColor:"#FFFFFF",tooltipFontColor:"#212529",tooltipFillColor:"#E9ECEF",zoomFillColor:"#B5BABE",fontFamily:"Helvetica Neue",fontSize:"12px",fontWeight:"Medium",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Helvetica Neue",titleFontWeight:"normal",zoomSelectionColor:"#DEE2E6",shapeFill:"#495057",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900"};break;case"fluent":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#201F1E",subTitleFontColor:"#201F1E",legendTitleFontColor:"#201F1E",legendTextColor:"#201F1E",dataLabelFontColor:"#201F1E",tooltipFontColor:"#323130",tooltipFillColor:"#FFFFFF",zoomFillColor:"#A19F9D",fontFamily:"Segoe UI",fontSize:"12px",fontWeight:"Medium",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"600",zoomSelectionColor:"#323130",shapeFill:"#F3F2F1",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900"};break;case"fluentdark":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#F3F2F1",subTitleFontColor:"#F3F2F1",legendTitleFontColor:"#F3F2F1",legendTextColor:"#F3F2F1",dataLabelFontColor:"#F3F2F1",tooltipFontColor:"#F3F2F1",tooltipFillColor:"#252423",zoomFillColor:"#484644",fontFamily:"Segoe UI",fontSize:"12px",fontWeight:"Medium",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"600",zoomSelectionColor:"#F3F2F1",shapeFill:"#252423",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900"};break;case"material3":t={backgroundColor:"transparent",areaBackgroundColor:"transparent",titleFontColor:"#1C1B1F",subTitleFontColor:"#1C1B1F",legendTitleFontColor:"#1C1B1F",legendTextColor:"#49454E",dataLabelFontColor:"#1C1B1F",tooltipFontColor:"#F4EFF4",tooltipFillColor:"#313033",zoomFillColor:"#49454E",fontFamily:"Roboto",fontSize:"14px",titleFontSize:"16px",subTitleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Roboto",titleFontWeight:"500",fontWeight:"400",zoomSelectionColor:"#49454E",shapeFill:"#E7E0EC",rectangleZoomFillColor:"#6750A4",rectangleZoomFillOpacity:.24,rectangleZoomBorderColor:"#6750A4"};break;case"material3dark":t={backgroundColor:"transparent",areaBackgroundColor:"transparent",titleFontColor:"#E6E1E5",subTitleFontColor:"#E6E1E5",legendTitleFontColor:"#E6E1E5",legendTextColor:"#CAC4D0",dataLabelFontColor:"#E6E1E5",tooltipFontColor:"#313033",tooltipFillColor:"#E6E1E5",zoomFillColor:"#E6E1E5",fontFamily:"Roboto",fontSize:"14px",titleFontSize:"16px",subTitleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Roboto",titleFontWeight:"500",fontWeight:"400",zoomSelectionColor:"#E6E1E5",shapeFill:"#49454F",rectangleZoomFillColor:"#D0BCFF",rectangleZoomFillOpacity:.24,rectangleZoomBorderColor:"#D0BCFF"};break;default:t={backgroundColor:"#FFFFFF",areaBackgroundColor:"#FFFFFF",titleFontColor:"#424242",titleFontSize:"14px",subTitleFontColor:"#424242",legendTitleFontColor:"#757575",legendTextColor:"#757575",dataLabelFontColor:"#000000",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#000000",zoomFillColor:"#737373",labelFontFamily:"Roboto, Noto, Sans-serif",fontFamily:"Roboto, Noto, Sans-serif",fontSize:"12px",fontWeight:"Medium",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900"}}return t}(this.theme),this.renderBorder(),this.renderTitle(this.titleSettings,"title",null,null),this.renderArea(),this.processRequestJsonData(),this.renderComplete(),this.isAddLayer=!!this.isTileMap&&this.isAddLayer)},a.prototype.render=function(){this.renderElements()},a.prototype.processRequestJsonData=function(){var e=this,i=this.layersCollection.length-1;this.serverProcess={request:0,response:0};var a,n;Array.prototype.forEach.call(this.layersCollection,function(l,r){if(l.shapeData instanceof o.DataManager){e.serverProcess.request++,n=l.shapeData,a=l.query instanceof o.Query?l.query:new o.Query;n.executeQuery(a).then(function(t){e.processResponseJsonData("DataManager",t,l,"ShapeData")})}else(l.shapeData instanceof it||l.shapeData)&&(t.isNullOrUndefined(l.shapeData.dataOptions)||e.processAjaxRequest(l,l.shapeData,"ShapeData"));if(l.dataSource instanceof o.DataManager){e.serverProcess.request++,n=l.dataSource,a=l.query instanceof o.Query?l.query:new o.Query;n.executeQuery(a).then(function(e){l.dataSource=Be(e)})}if(l.markerSettings.length>0)for(var s=function(t){if(l.markerSettings[t].dataSource instanceof o.DataManager){e.serverProcess.request++,n=l.markerSettings[t].dataSource,a=l.markerSettings[t].query instanceof o.Query?l.markerSettings[t].query:new o.Query;n.executeQuery(a).then(function(e){l.markerSettings[t].dataSource=Be(e)})}},d=0;d<l.markerSettings.length;d++)s(d);if(l.bubbleSettings.length>0){var p=function(t){if(l.bubbleSettings[t].dataSource instanceof o.DataManager){e.serverProcess.request++,n=l.bubbleSettings[t].dataSource,a=l.bubbleSettings[t].query instanceof o.Query?l.bubbleSettings[t].query:new o.Query;n.executeQuery(a).then(function(e){l.bubbleSettings[t].dataSource=Be(e)})}};for(d=0;d<l.bubbleSettings.length;d++)p(d)}(l.dataSource instanceof it||!t.isNullOrUndefined(l.dataSource.dataOptions))&&e.processAjaxRequest(l,l.dataSource,"DataSource"),e.serverProcess.request===e.serverProcess.response&&i===r&&e.processResponseJsonData(null)})},a.prototype.processAjaxRequest=function(e,i,o){var a=this;this.serverProcess.request++;var n=new t.Fetch(i.dataOptions,i.type,i.contentType);n.onSuccess=function(t){a.processResponseJsonData("Fetch",t,e,o)},n.send(i.sendData)},a.prototype.processResponseJsonData=function(e,i,o,a){if(this.serverProcess.response++,e&&("ShapeData"===a?o.shapeData="DataManager"===e?Be(i):i:o.dataSource="DataManager"===e?Be(i):i),t.isNullOrUndefined(e)||this.serverProcess.request!==this.serverProcess.response)t.isNullOrUndefined(e)&&this.renderMap();else{var n=this.layersCollection;this.layersCollection=[];for(var l=0;l<n.length;l++)n[l].isBaseLayer&&this.layersCollection.push(n[l]);for(var r=0;r<n.length;r++)n[r].isBaseLayer||this.layersCollection.push(n[r]);this.renderMap()}},a.prototype.renderMap=function(){this.legendModule&&this.legendSettings.visible&&this.legendModule.renderLegend(),this.createTile(),this.zoomSettings.enable&&this.zoomModule&&this.zoomModule.createZoomingToolbars(),t.isNullOrUndefined(this.dataLabelModule)||(this.dataLabelModule.dataLabelCollections=[]),this.mapLayerPanel.measureLayerPanel(),t.isNullOrUndefined(this.svgObject)||this.element.appendChild(this.svgObject),this.setSecondaryElementPosition();for(var e=0;e<this.layers.length;e++){if(this.layers[e].selectionSettings&&this.layers[e].selectionSettings.enable&&this.layers[e].initialShapeSelection.length>0&&this.checkInitialRender){var i=this.layers[e].selectionSettings.enableMultiSelect;this.layers[e].selectionSettings.enableMultiSelect=i||!0;for(var o=this.layers[e].initialShapeSelection,a=0;a<this.layers[e].initialShapeSelection.length;a++)this.shapeSelection(e,o[a].shapePath,o[a].shapeValue,!0);this.layers[e].selectionSettings.enableMultiSelect=i,e===this.layers.length-1&&(this.checkInitialRender=!1)}if(!this.isResize)for(var n=0;n<this.layers[e].markerSettings.length;n++)if(this.layers[e].markerSettings[n].selectionSettings&&this.layers[e].markerSettings[n].selectionSettings.enable&&this.layers[e].markerSettings[n].initialMarkerSelection.length>0){var l=this.layers[e].markerSettings[n].initialMarkerSelection;for(a=0;a<l.length;a++)this.markerInitialSelection(e,n,this.layers[e].markerSettings[n],l[a].latitude,l[a].longitude)}}if(!t.isNullOrUndefined(document.getElementById(this.element.id+"_tile_parent"))){var r,s=this.svgObject.getBoundingClientRect(),d=document.getElementById(this.element.id),p=document.getElementById(this.element.id+"_tile_parent"),h=document.getElementById(this.element.id+"_tiles"),m=p.getBoundingClientRect(),c=void 0,u=void 0;u=parseFloat(p.style.left);var g=x(this.titleSettings.text,this.titleSettings.textStyle),y=x(this.titleSettings.subtitleSettings.text,this.titleSettings.subtitleSettings.textStyle);this.isTileMap&&this.isTileMapSubLayer&&"Bottom"===this.legendSettings.position&&this.legendSettings.visible?"Default"!==this.legendSettings.mode?r=0!==g.width&&0!==g.height?parseFloat(p.style.top)+y.height/2-this.legendModule.legendBorderRect.height/2:parseFloat(p.style.top)-this.mapAreaRect.y:(u=this.legendModule.legendBorderRect.x,r=0!==g.width&&0!==g.height?parseFloat(p.style.top)+y.height/2-this.legendModule.legendBorderRect.y:parseFloat(p.style.top)+y.height/2):(c=s.bottom-m.bottom-d.offsetTop,r=parseFloat(p.style.top)),r=c<=11?r:t.isNullOrUndefined(this.legendModule)||"Bottom"!==this.legendSettings.position?2*r:this.mapAreaRect.y,u=c<=11?u:t.isNullOrUndefined(this.legendModule)?2*u:u,p.style.top=r+"px",p.style.left=u+"px",h.style.top=r+"px",h.style.left=u+"px",!t.isNullOrUndefined(this.legendModule)&&this.legendModule.totalPages.length>0&&(p.style.height=h.style.height=this.legendModule.legendTotalRect.height+"px",p.style.width=h.style.width=this.legendModule.legendTotalRect.width+"px")}this.arrangeTemplate(),this.annotationsModule&&"0px"!==this.width&&"0px"!==this.height&&"0%"!==this.width&&"0%"!==this.height&&this.annotationsModule.renderAnnotationElements(),this.element.style.outline="none",this.element.style.position="relative";for(e=0;e<document.getElementsByTagName("path").length-1;e++)document.getElementsByTagName("path")[e].id.indexOf("shapeIndex")>-1&&(document.getElementsByTagName("path")[e].style.outline="none");this.zoomingChange(),this.zoomModule&&this.isDevice&&this.zoomModule.removeToolbarOpacity(this.isTileMap?Math.round(this.tileZoomLevel):this.mapScaleValue,this.element.id+"_Zooming_"),this.isZoomByPosition||this.zoomNotApplied||this.trigger("loaded",{maps:this,isResized:this.isResize}),this.isResize=!1},a.prototype.markerSelection=function(e,t,i,o){var a={color:e.border.color,width:e.border.width/t.scale,opacity:e.border.opacity},n={opacity:e.opacity,fill:e.fill,border:a,target:i.id,cancel:!1,data:o,maps:t};ne("MarkerselectionMap")?me("MarkerselectionMap","MarkerselectionMapStyle",n):document.body.appendChild(he("MarkerselectionMap","MarkerselectionMapStyle",n)),(0===this.selectedMarkerElementId.length||e.enableMultiSelect)&&("g"===i.tagName?(i.children[0].setAttribute("class","MarkerselectionMapStyle"),this.selectedMarkerElementId.push(i.children[0].id)):(i.setAttribute("class","MarkerselectionMapStyle"),this.selectedMarkerElementId.push(i.id)))},a.prototype.markerInitialSelection=function(e,t,i,o,a){var n=i.selectionSettings;if(n.enable)for(var l=0;l<i.dataSource.length;l++){var r=i.dataSource[l];if(r.latitude===o&&r.longitude===a){var s=this.element.id+"_LayerIndex_"+e+"_MarkerIndex_"+t+"_dataIndex_"+l;this.markerSelection(n,this,ne(s),r)}}},a.prototype.renderArea=function(){var e=this.mapsArea.border.width,i=this.mapsArea.background;if(e>0||i||this.themeStyle.areaBackgroundColor){var o={opacity:t.isNullOrUndefined(this.mapsArea.border.opacity)?1:this.mapsArea.border.opacity,color:this.mapsArea.border.color,width:this.mapsArea.border.width},a=new Xe(this.element.id+"_MapAreaBorder",i||this.themeStyle.areaBackgroundColor,o,1,this.mapAreaRect);this.svgObject.appendChild(this.renderer.drawRectangle(a))}},a.prototype.addTabIndex=function(){this.element.setAttribute("aria-label",this.description||"Maps Element"),this.element.setAttribute("role",""),this.element.tabIndex=this.tabIndex},a.prototype.setSecondaryElementPosition=function(){var e=ie(this.element.id+"_Secondary_Element"),i=this.element.getBoundingClientRect(),o=ie(this.element.id+"_svg");if(!t.isNullOrUndefined(o)){var a=o.getBoundingClientRect();e.style.left=Math.max(a.left-i.left,0)+"px",e.style.top=Math.max(a.top-i.top,0)+"px"}},a.prototype.zoomingChange=function(){var e,i;if(ie(this.element.id+"_Layer_Collections")&&this.zoomModule&&(this.zoomModule.layerCollectionEle=ie(this.element.id+"_Layer_Collections")),this.isTileMap&&ie(this.element.id+"_Tile_SVG")&&ie(this.element.id+"_tile_parent")){var o=ie(this.element.id+"_tile_parent"),a=ie(this.element.id+"_Tile_SVG"),n=ie(this.element.id+"_Tile_SVG_Parent"),l=o.getBoundingClientRect(),r=a.getBoundingClientRect();e=l.left-r.left,i=l.top-r.top,n.style.left=e+"px",n.style.top=i+"px",!t.isNullOrUndefined(this.legendModule)&&this.legendModule.totalPages.length>0&&(o.style.width=a.style.width=this.legendModule.legendTotalRect.width.toString(),o.style.height=a.style.height=this.legendModule.legendTotalRect.height.toString(),n.style.width=this.legendModule.legendTotalRect.width+"px",n.style.height=this.legendModule.legendTotalRect.height+"px");var s=document.getElementsByClassName("template");if(!t.isNullOrUndefined(s)&&s.length>0)for(var d=0;d<s.length;d++){var p=s[d];p.style.left=e+"px",p.style.top=i+"px"}}if(this.zoomSettings.zoomFactor>=0){this.zoomModule&&this.zoomModule.toolBarGroup&&this.zoomSettings.enable&&this.zoomModule.alignToolBar();var h=document.getElementById(this.element.id+"_Layer_Collections");if(!t.isNullOrUndefined(h)&&h.childElementCount>0)for(d=0;d<h.childNodes.length;d++){var m=h.childNodes[d];if("g"===m.tagName&&-1===m.id.indexOf("_Legend_Group"))for(var c=parseFloat(m.id.split("_LayerIndex_")[1].split("_")[0]),u=0;u<m.childNodes.length;u++){var g=m.childNodes[u];g.id.indexOf("_Markers_Group")>-1||g.id.indexOf("_bubble_Group")>-1||g.id.indexOf("_dataLableIndex_Group")>-1||Ce(g,c,this.scale,this)}}this.zoomModule&&(this.previousScale!==this.scale||this.zoomNotApplied||this.isZoomByPosition)&&this.zoomModule.applyTransform(this,!0)}},a.prototype.createSecondaryElement=function(){if(t.isNullOrUndefined(document.getElementById(this.element.id+"_Secondary_Element"))){var e=t.createElement("div",{id:this.element.id+"_Secondary_Element"});e.style.cssText="position: relative;z-index:2;",this.element.appendChild(e)}},a.prototype.arrangeTemplate=function(){document.getElementById(this.element.id+"_Legend_Border")&&(document.getElementById(this.element.id+"_Legend_Border").style.pointerEvents="none");var e=document.getElementsByClassName(this.element.id+"_template");if(!t.isNullOrUndefined(e)&&e.length>0&&ie(this.element.id+"_Layer_Collections")&&!this.isTileMap)for(var i=0;i<e.length;i++){var o=0,a=0,n=e[i];if(!t.isNullOrUndefined(n)&&n.childElementCount>0){var l=ie(this.element.id+"_Layer_Collections").getBoundingClientRect(),r=ie(n.id).getBoundingClientRect();-1===n.id.indexOf("Marker")&&(o=this.isTileMap?0:l.left<r.left?-Math.abs(r.left-l.left):Math.abs(r.left-l.left),a=this.isTileMap?0:l.top<r.top?-Math.abs(r.top-l.top):Math.abs(r.top-l.top));for(var s=0;s<n.childElementCount;s++){var d=n.childNodes[s];if(-1!==d.id.indexOf("Marker")){var p=ie(d.id).getBoundingClientRect();d.style.left=parseFloat(d.style.left)-(this.isTileMap?0:p.width/2)+"px",d.style.top=parseFloat(d.style.top)-(this.isTileMap?0:p.height/2)+"px"}else d.style.left=parseFloat(d.style.left)+o+"px",d.style.top=parseFloat(d.style.top)+a+"px",d.style.transform="translate(-50%, -50%)"}}}},a.prototype.createTile=function(){var e=this.layersCollection[0];if(e.isBaseLayer&&("OSM"===e.layerType||"Bing"===e.layerType||"GoogleStaticMap"===e.layerType||"Google"===e.layerType||!t.isNullOrUndefined(e.urlTemplate)&&""!==e.urlTemplate)){Q(this.element.id+"_tile_parent"),Q(this.element.id+"_tiles"),Q("animated_tiles");var i=t.createElement("div",{id:this.element.id+"_tile_parent"});i.style.cssText="position: absolute; left: "+this.mapAreaRect.x+"px; right: "+this.margin.right+"px; top: "+(this.mapAreaRect.y+0)+"px; height: "+this.mapAreaRect.height+"px; width: "+this.mapAreaRect.width+"px; overflow: hidden;";var o=t.createElement("div",{id:this.element.id+"_tiles"});o.style.cssText="position: absolute; left: "+this.mapAreaRect.x+"px; right: "+this.margin.right+"px; top: "+(this.mapAreaRect.y+0)+"px; height: "+this.mapAreaRect.height+"px; width: "+this.mapAreaRect.width+"px; overflow: hidden;",this.element.appendChild(i),this.element.appendChild(o)}},a.prototype.initPrivateVariable=function(){if(""===this.element.id){var e=document.getElementsByClassName("e-maps").length;this.element.id="maps_control_"+e}this.renderer=new i.SvgRenderer(this.element.id),this.mapLayerPanel=new di(this)},a.prototype.findBaseAndSubLayers=function(){var e=this,i=this.baseLayerIndex,o=[],a=[];this.layersCollection=[],Array.prototype.forEach.call(this.layers,function(e){"Layer"===e.type?o.push(e):a.push(e)});for(var n=0;n<o.length;n++){var l=o[n];if(l.visible&&i===n){l.isBaseLayer=!0,this.isTileMap=!("Geometry"===l.layerType&&!t.isNullOrUndefined(l.shapeData)),this.layersCollection.push(l);break}if(n===o.length-1){this.layersCollection.push(o[0]);break}}a.map(function(t){t.visible&&e.layersCollection.push(t)})},a.prototype.renderBorder=function(){var e=this.border.width,i=this.svgObject.querySelector("#"+this.element.id+"_MapBorder");if((e>0||this.background||this.themeStyle.backgroundColor)&&t.isNullOrUndefined(i)){var o={opacity:t.isNullOrUndefined(this.border.opacity)?1:this.border.opacity,color:this.border.color,width:this.border.width},a=new Xe(this.element.id+"_MapBorder",this.background||this.themeStyle.backgroundColor,o,1,new et(e/2,e/2,this.availableSize.width-e,this.availableSize.height-e));this.svgObject.appendChild(this.renderer.drawRectangle(a))}else i.setAttribute("fill",this.background||this.themeStyle.backgroundColor)},a.prototype.renderTitle=function(e,i,o,a){var n,l={size:e.textStyle.size,color:e.textStyle.color,fontFamily:e.textStyle.fontFamily,fontWeight:e.textStyle.fontWeight,fontStyle:e.textStyle.fontStyle,opacity:e.textStyle.opacity},r=Math.abs(this.margin.left+this.margin.right-this.availableSize.width);if(l.fontFamily=t.isNullOrUndefined(l.fontFamily)?this.themeStyle.fontFamily:l.fontFamily,l.fontWeight=l.fontWeight||this.themeStyle.titleFontWeight,l.size="title"===i?l.size||this.themeStyle.titleFontSize:l.size||this.themeStyle.subTitleFontSize||Ue.mapsSubTitleFont.size,e.text){t.isNullOrUndefined(a)&&(a=this.renderer.createGroup({id:this.element.id+"_Title_Group"}));var s=Y(r,e.text,l),d=x(s,l),p=J(t.isNullOrUndefined(o)?new et(this.margin.left,this.margin.top,this.availableSize.width,this.availableSize.height):o,e.alignment,d,i),h=new He(this.element.id+"_Map_"+i,p.x,p.y,"start",s),m=new et(p.x,p.y,d.width,d.height),c=O(h,l,l.color||("title"===i?this.themeStyle.titleFontColor:this.themeStyle.subTitleFontColor),a);c.setAttribute("aria-label",this.description||e.text),c.setAttribute("role",""),("title"===i&&!e.subtitleSettings.text||"subtitle"===i)&&(n=Math.abs(m.y+this.margin.bottom-this.availableSize.height),this.mapAreaRect=new et(this.margin.left,m.y+10,r,n-10)),"subtitle"!==i&&e.subtitleSettings.text?this.renderTitle(e.subtitleSettings,"subtitle",m,a):this.svgObject.appendChild(a)}else n=Math.abs(this.margin.top+this.margin.bottom-this.availableSize.height),this.mapAreaRect=new et(this.margin.left,this.margin.top,r,n)},a.prototype.createSVG=function(){this.removeSvg(),r(this)},a.prototype.removeSvg=function(){if(Q(this.element.id+"_Secondary_Element"),Q(this.element.id+"_tile_parent"),Q(this.element.id+"_tiles"),this.svgObject){for(;this.svgObject.childNodes.length>0;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&t.remove(this.svgObject)}this.clearTemplate()},a.prototype.wireEVents=function(){t.EventHandler.add(this.element,"click",this.mapsOnClick,this),t.EventHandler.add(this.element,"contextmenu",this.mapsOnRightClick,this),t.EventHandler.add(this.element,"dblclick",this.mapsOnDoubleClick,this),t.EventHandler.add(this.element,t.Browser.touchStartEvent,this.mouseDownOnMap,this),t.EventHandler.add(this.element,t.Browser.touchMoveEvent,this.mouseMoveOnMap,this),t.EventHandler.add(this.element,t.Browser.touchEndEvent,this.mouseEndOnMap,this),t.EventHandler.add(this.element,"pointerleave mouseleave",this.mouseLeaveOnMap,this),t.EventHandler.add(this.element,"keydown",this.keyDownHandler,this),t.EventHandler.add(this.element,"keyup",this.keyUpHandler,this),this.resizeEvent=this.mapsOnResize.bind(this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeEvent)},a.prototype.unWireEVents=function(){t.EventHandler.remove(this.element,"click",this.mapsOnClick),t.EventHandler.remove(this.element,"contextmenu",this.mapsOnRightClick),t.EventHandler.remove(this.element,"dblclick",this.mapsOnDoubleClick),t.EventHandler.remove(this.element,t.Browser.touchStartEvent,this.mouseDownOnMap),t.EventHandler.remove(this.element,t.Browser.touchMoveEvent,this.mouseMoveOnMap),t.EventHandler.remove(this.element,t.Browser.touchEndEvent,this.mouseEndOnMap),t.EventHandler.remove(this.element,"pointerleave mouseleave",this.mouseLeaveOnMap),t.EventHandler.remove(this.element,"keydown",this.keyDownHandler),t.EventHandler.remove(this.element,"keyup",this.keyUpHandler),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeEvent)},a.prototype.mouseLeaveOnMap=function(e){document.getElementsByClassName("highlightMapStyle").length>0&&this.legendModule&&(this.legendModule.removeShapeHighlightCollection(),ue(document.getElementsByClassName("highlightMapStyle")[0]))},a.prototype.keyUpHandler=function(e){var t=e.target.id;this.isTileMap&&this.removeTileMap(),"Tab"===e.code&&t.indexOf("_LayerIndex_")>-1&&t.indexOf("shapeIndex")>-1?this.keyboardHighlightSelection(t,e.type):-1===t.indexOf("_LayerIndex_")&&-1===t.indexOf("shapeIndex")&&se("highlightMapStyle").length>0&&(ue(se("highlightMapStyle")[0]),this.legendSettings.visible&&this.legendModule&&this.legendModule.removeShapeHighlightCollection())},a.prototype.keyboardHighlightSelection=function(e,i){var o=parseInt(e.split("_LayerIndex_")[1].split("_")[0],10),a=parseInt(e.split("_shapeIndex_")[1].split("_")[0],10),n=this.layers[o].shapeData.features.length>a?this.layers[o].shapeData.features[a].properties:null,l=parseInt(e.split("_dataIndex_")[1].split("_")[0],10),r=t.isNullOrUndefined(l)?null:this.layers[o].dataSource[l];this.layers[o].selectionSettings.enable&&"keydown"===i&&this.selectionModule?(this.selectionModule.selectionsettings=this.layers[o].selectionSettings,this.selectionModule.selectionType="Shape",this.selectionModule.selectElement(event.target,o,r,n)):this.highlightModule&&this.layers[o].highlightSettings.enable&&"keyup"===i&&!event.target.classList.contains("ShapeselectionMapStyle")&&(this.highlightModule.highlightSettings=this.layers[o].highlightSettings,this.highlightModule.handleHighlight(event.target,o,r,n))},a.prototype.keyDownHandler=function(e){var i=this.zoomModule,o=e.target.id;if(("ArrowUp"===e.code||"ArrowDown"===e.code||"ArrowLeft"===e.code||"ArrowRight"===e.code)&&i){var a=document.getElementById(this.element.id+"_animated_tiles");this.isTileMap&&!t.isNullOrUndefined(a)&&(this.currentTiles=a.cloneNode(!0))}if(this.zoomSettings.enable&&i&&("+"===e.key||"Equal"===e.code))i.performZoomingByToolBar("zoomin");else if(this.zoomSettings.enable&&i&&("-"===e.key||"Minus"===e.code))i.performZoomingByToolBar("zoomout");else if(this.zoomSettings.enable&&i&&82===e.keyCode)i.performZoomingByToolBar("reset"),i.isPanning=!1;else if(this.zoomSettings.enable&&this.zoomSettings.enablePanning&&i&&("ArrowUp"===e.code||"ArrowDown"===e.code))e.preventDefault(),i.mouseDownLatLong.x=0,i.mouseMoveLatLong.y=this.mapAreaRect.height/7,i.panning("None",i.mouseDownLatLong.x,"ArrowUp"===e.code?-i.mouseMoveLatLong.y:i.mouseMoveLatLong.y,e),i.mouseDownLatLong.y=i.mouseMoveLatLong.y;else if(this.zoomSettings.enable&&this.zoomSettings.enablePanning&&i&&("ArrowLeft"===e.code||"ArrowRight"===e.code))e.preventDefault(),i.mouseDownLatLong.y=0,i.mouseMoveLatLong.x=this.mapAreaRect.width/7,i.panning("None","ArrowLeft"===e.code?-i.mouseMoveLatLong.x:i.mouseMoveLatLong.x,i.mouseDownLatLong.y,e),i.mouseDownLatLong.x=i.mouseMoveLatLong.x;else if("Enter"===e.code){if(o=e.target.id,e.preventDefault(),this.legendModule&&(o.indexOf("_Left_Page_Rect")>-1||o.indexOf("_Right_Page_Rect")>-1)){this.mapAreaRect=this.legendModule.initialMapAreaRect,this.legendModule.currentPage=o.indexOf("_Left_Page_")>-1?this.legendModule.currentPage-1:this.legendModule.currentPage+1,this.legendModule.legendGroup=this.renderer.createGroup({id:this.element.id+"_Legend_Group"}),this.legendModule.drawLegendItem(this.legendModule.currentPage);var n=document.getElementById(this.element.id+"_Paging_Text").textContent.split("/").map(Number);o.indexOf("_Left_Page_Rect")>-1?(1!==n[0]&&e.target.focus(),e.target.style.outlineColor=n[0]-1!==n[1]?"":"transparent"):o.indexOf("_Right_Page_Rect")>-1&&(n[0]!==n[1]&&e.target.focus(),e.target.style.outlineColor=n[0]!==n[1]+1?"":"transparent"),de(this.element.id+"_Legend_Border",this.element.id)&&(de(this.element.id+"_Legend_Border",this.element.id).style.pointerEvents="none")}o.indexOf("shapeIndex")>-1&&this.keyboardHighlightSelection(o,e.type)}this.zoomModule&&this.zoomModule.removeToolbarOpacity(this.isTileMap?Math.round(this.tileZoomLevel):this.mapScaleValue,this.mouseMoveId)},a.prototype.SelectedElement=function(e){var t=!1;return"ShapeselectionMapStyle"===e.getAttribute("class")&&(t=!0),t},a.prototype.mapsOnClick=function(e){var i=this,o=e.target,a=o.id,n=null,l=null;if(this.mouseClickEvent={x:e.x,y:e.y},-1===o.id.indexOf("_ToolBar")){var r=this.getClickLocation(a,e.pageX,e.pageY,o,e.layerX,e.layerY);t.isNullOrUndefined(r)||(n=r.latitude,l=r.longitude);var s={cancel:!1,name:Vt,target:a,x:e.clientX,y:e.clientY,latitude:n,longitude:l,isShapeSelected:this.SelectedElement(o)};this.onclick?(s.name="onclick",this.trigger("onclick",s,function(t){i.clickHandler(e,s,o)})):this.trigger("click",s,function(t){i.clickHandler(e,s,o)})}this.zoomModule&&(this.zoomModule.removeToolbarOpacity(this.isTileMap?Math.round(this.tileZoomLevel):this.mapScaleValue,a),this.isDevice&&this.zoomModule.removeToolbarClass("","","","",""))},a.prototype.clickHandler=function(e,t,i){i.id.indexOf("shapeIndex")>-1&&(this.mergeCluster(),ne(this.element.id+"_mapsTooltip")&&this.mapsTooltipModule.tooltipTargetID.indexOf("_MarkerIndex_")>-1&&Q(this.element.id+"_mapsTooltip")),this.markerModule&&this.markerModule.markerClusterClick(e),t.cancel||this.notify(Vt,i),t.cancel||-1===i.id.indexOf("shapeIndex")||this.triggerShapeSelection(i)},a.prototype.triggerShapeSelection=function(e){var i=parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10),o=re(e.id,this.layers[i].selectionSettings,this,"shapeSelected");o.cancel||!this.selectionModule||t.isNullOrUndefined(this.shapeSelected)?o.cancel&&this.selectionModule&&t.isNullOrUndefined(o.data)&&(ue(e),this.selectionModule.removedSelectionList(e)):me(this.selectionModule.selectionType+"selectionMap",this.selectionModule.selectionType+"selectionMapStyle",o)},a.prototype.getMarkerClickLocation=function(e,t,i,o,a,n){document.getElementById(this.element.id+"_svg").style.cursor="grabbing";var l=ne(a.targetId),r=this.getClickLocation(a.targetId,e,t,l,i,o),s=this.isTileMap?m(new $e(r.longitude,r.latitude),this.scale,this.tileTranslatePoint,!0):h(r.latitude,r.longitude,this.mapLayerPanel.currentFactor,this.layersCollection[a.layerIndex],this),d=this.translatePoint,p=this.isTileMap?s.x:(s.x+d.x)*this.scale,c=this.isTileMap?s.y:(s.y+d.y)*this.scale;if("Balloon"!==this.markerDragArgument.shape?l.setAttribute("transform","translate( "+p+" "+c+" )"):l.parentElement.setAttribute("transform","translate( "+p+" "+c+" )"),n){var u=this.layers[a.layerIndex].markerSettings[a.markerIndex];r=this.getClickLocation(a.targetId,e-u.offset.x,t-u.offset.y,l,i-u.offset.x,o-u.offset.y)}return r},a.prototype.getClickLocation=function(e,t,i,o,a,n){var l,r=0;if(-1===e.indexOf("_LayerIndex_")||this.isTileMap||parseInt(this.mouseDownEvent.x,10)!==parseInt(this.mouseClickEvent.x,10)||parseInt(this.mouseDownEvent.y,10)!==parseInt(this.mouseClickEvent.y,10))this.isTileMap&&parseInt(this.mouseDownEvent.x,10)===parseInt(this.mouseClickEvent.x,10)&&parseInt(this.mouseDownEvent.y,10)===parseInt(this.mouseClickEvent.y,10)&&(l=this.getTileGeoLocation(a,n));else if(r=parseFloat(e.split("_LayerIndex_")[1].split("_")[0]),"Normal"===this.layers[r].geometryType)if(e.indexOf("_shapeIndex_")>-1){var d=s(t,i,o.parentElement),p=Math.abs(-this.baseMapBounds.longitude.min*this.mapLayerPanel.currentFactor),h=Math.abs(this.baseMapBounds.latitude.max*this.mapLayerPanel.currentFactor);l={latitude:Math.abs(this.baseMapBounds.latitude.max-d.y/this.mapLayerPanel.currentFactor),longitude:Math.abs(d.x/this.mapLayerPanel.currentFactor+this.baseMapBounds.longitude.min)},this.baseMapBounds.longitude.min<0&&p>d.x&&(l.longitude=-l.longitude),this.baseMapBounds.latitude.min<0&&h>d.y&&(l.latitude=-l.latitude)}else if(e.indexOf("_MarkerIndex_")>-1&&this.markerModule&&!this.markerDragArgument){var m=parseInt(e.split("_MarkerIndex_")[1].split("_")[0],10),c=parseInt(e.split("_dataIndex_")[1].split("_")[0],10);if(isNaN(m)||isNaN(c))l={latitude:null,longitude:null};else{var u=this.layers[r].markerSettings[m].dataSource[c];l={latitude:u.latitude,longitude:u.longitude}}}else if(e.indexOf("_MarkerIndex_")>-1&&this.markerModule&&this.markerDragArgument){var g=document.getElementById(this.element.id+"_LayerIndex_"+this.markerDragArgument.layerIndex).getBoundingClientRect(),y=new $e(t>g.left?Math.abs(g.left-t):0,i>g.top?Math.abs(g.top-i):0);p=Math.abs(-this.baseMapBounds.longitude.min*this.mapLayerPanel.currentFactor),h=Math.abs(this.baseMapBounds.latitude.max*this.mapLayerPanel.currentFactor);l={latitude:Math.abs(this.baseMapBounds.latitude.max-y.y/(this.mapLayerPanel.currentFactor*this.scale)),longitude:Math.abs(y.x/(this.mapLayerPanel.currentFactor*this.scale)+this.baseMapBounds.longitude.min)},this.baseMapBounds.longitude.min<0&&p>y.x&&(l.longitude=-l.longitude),this.baseMapBounds.latitude.min<0&&h>y.y&&(l.latitude=-l.latitude)}else l={latitude:null,longitude:null};else l=this.getGeoLocation(r,a,n);return l},a.prototype.removeTileMap=function(){var e=document.getElementById(this.element.id+"_animated_tiles");if(!t.isNullOrUndefined(this.currentTiles)&&e.childElementCount<this.currentTiles.childElementCount)for(var i=e.childElementCount-1;i>=this.currentTiles.childElementCount;i--)e.removeChild(e.children[i]);this.currentTiles=null},a.prototype.mouseEndOnMap=function(e){var i,o,a,n=e.target,l=n.id,r=0,s=0;this.element.getBoundingClientRect(),e.target;if(-1!==e.type.indexOf("touch")?(this.isTouch=!0,r=i=(a=e).changedTouches[0].pageX,s=(o=a.changedTouches[0].pageY)-(this.isTileMap?10:0),a.target,this.mouseClickEvent={x:i,y:o}):(this.isTouch="touch"===e.pointerType,i=e.pageX,o=e.pageY,r=e.layerX,s=e.layerY-(this.isTileMap?10:0),e.target),this.isTileMap&&this.removeTileMap(),this.isTouch){if(-1===n.id.indexOf("_ToolBar")){var d=this.getClickLocation(l,i,o,n,i,o);t.isNullOrUndefined(d)||(d.latitude,d.longitude)}this.titleTooltip(e,i,o,!0),t.isNullOrUndefined(this.legendModule)||this.legendTooltip(e,e.pageX,e.pageY,!0)}if(this.notify(t.Browser.touchEndEvent,e),e.cancelable&&!this.isTouch&&e.preventDefault(),t.isNullOrUndefined(this.markerDragArgument))document.getElementById(this.element.id+"_svg").style.cursor="auto";else{var p=this.markerDragArgument;this.mouseClickEvent.x=this.mouseDownEvent.x,this.mouseClickEvent.y=this.mouseDownEvent.y;d=this.getMarkerClickLocation(i,o,r,s,this.markerDragArgument,!0);var h=this.layers[p.layerIndex].markerSettings[p.markerIndex];document.getElementById(this.element.id+"_svg").style.cursor=h.enableDrag?"pointer":"grabbing";var m={name:"markerDragEnd",x:i,y:o,latitude:d.latitude,longitude:d.longitude,layerIndex:p.layerIndex,markerIndex:p.markerIndex,dataIndex:p.dataIndex};if(t.isNullOrUndefined(h.latitudeValuePath)&&t.isNullOrUndefined(h.longitudeValuePath)){var c=h.dataSource[p.dataIndex];t.isNullOrUndefined(c.Longitude)||t.isNullOrUndefined(c.Latitude)?(h.dataSource[p.dataIndex].latitude=m.latitude,h.dataSource[p.dataIndex].longitude=m.longitude):(h.dataSource[p.dataIndex].Latitude=m.latitude,h.dataSource[p.dataIndex].Longitude=m.longitude)}else h.dataSource[p.dataIndex][h.latitudeValuePath]=m.latitude,h.dataSource[p.dataIndex][h.longitudeValuePath]=m.longitude;this.markerDragId="",this.markerDragArgument=null,this.trigger("markerDragEnd",m)}return this.zoomModule&&this.isDevice&&(this.zoomModule.removeToolbarOpacity(this.isTileMap?Math.round(this.tileZoomLevel):this.scale,this.element.id+"_Zooming_"),this.zoomModule.removeToolbarClass("","","","","")),!1},a.prototype.mouseDownOnMap=function(e){this.mouseDownEvent={x:e.x,y:e.y},-1!==e.type.indexOf("touch")&&e.changedTouches&&(this.mouseDownEvent={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}),this.isDevice&&this.mapsTooltipModule.renderTooltip(e);this.element.getBoundingClientRect();var i=e.target;this.markerDragId=i.id;var o=document.getElementById(this.element.id+"_animated_tiles");if(this.isTileMap&&!t.isNullOrUndefined(o)&&(this.currentTiles=o.cloneNode(!0)),-1===i.id.indexOf("_ToolBar")){var a=this.markerModule;(i.id.indexOf("shapeIndex")>-1||i.id.indexOf("Tile")>-1)&&this.mergeCluster(),a&&(a.markerClick(e),a.markerClusterClick(e)),this.bubbleModule&&this.bubbleModule.bubbleClick(e)}this.notify(t.Browser.touchStartEvent,e)},a.prototype.mergeCluster=function(){this.markerModule&&this.markerModule.sameMarkerData.length>0&&(!this.zoomModule||this.zoomModule.isSingleClick)&&(N(this.markerModule.sameMarkerData,this,ne(this.element.id+"_Markers_Group")),this.markerModule.sameMarkerData=[])},a.prototype.mapsOnRightClick=function(e){var i=e.target,o=i.id,a=null,n=null;if(this.mouseClickEvent=this.mouseDownEvent={x:e.x,y:e.y},-1===i.id.indexOf("_ToolBar")){var l=this.getClickLocation(o,e.pageX,e.pageY,i,e.layerX,e.layerY);t.isNullOrUndefined(l)||(a=l.latitude,n=l.longitude);var r={cancel:!1,name:"rightClick",target:o,x:e.clientX,y:e.clientY,latitude:a,longitude:n,isShapeSelected:!1};this.trigger("rightClick",r)}},a.prototype.mapsOnDoubleClick=function(e){this.notify("dblclick",e);var t,i=e.target,o=i.id,a=0,n=null,l=null;if(-1===i.id.indexOf("_ToolBar")){-1===i.id.indexOf("_LayerIndex_")||this.isTileMap||this.mouseDownEvent.x!==e.clientX||this.mouseDownEvent.y!==e.clientY?this.isTileMap&&this.mouseDownEvent.x===e.clientX&&this.mouseDownEvent.y===e.clientY&&(n=(t=this.getTileGeoLocation(e.layerX,e.layerY)).latitude,l=t.longitude):(a=parseFloat(i.id.split("_LayerIndex_")[1].split("_")[0]),n=(t=this.getGeoLocation(a,e.layerX,e.layerY)).latitude,l=t.longitude);var r={cancel:!1,name:"doubleClick",x:e.clientX,y:e.clientY,target:o,latitude:n,longitude:l,isShapeSelected:null};this.trigger("doubleClick",r)}},a.prototype.mouseMoveOnMap=function(e){var i;i="touchmove"===e.type?e.target:i=e.target,this.markerModule&&(this.markerModule.markerMove(e),this.markerModule.markerClusterMouseMove(e)),this.bubbleModule&&this.bubbleModule.bubbleMove(e),-1==i.id.indexOf("MarkerIndex")&&(document.getElementById(this.element.id+"_svg").style.cursor="auto"),this.onMouseMove(e),this.notify(t.Browser.touchMoveEvent,e)},a.prototype.onMouseMove=function(e){var i=e.target;this.mouseMoveId=i.id;var o,a,n=null,l=0,r=0;if(-1==e.type.indexOf("touch")?(o=e.pageX,a=e.pageY,l=e.layerX,r=e.layerY-(this.isTileMap?10:0),this.titleTooltip(e,e.pageX,e.pageY),t.isNullOrUndefined(this.legendModule)||this.legendTooltip(e,e.pageX,e.pageY,!0)):(l=o=(n=e.touches)[0].clientX,r=a=n[0].clientY-(this.isTileMap?10:0)),!t.isNullOrUndefined(this.markerDragArgument)){var s=this.markerDragArgument;this.mouseClickEvent.x=this.mouseDownEvent.x,this.mouseClickEvent.y=this.mouseDownEvent.y,this.getMarkerClickLocation(o,a,l,r,s,!1)}return this.zoomModule&&this.zoomModule.removeToolbarOpacity(this.isTileMap?Math.round(this.tileZoomLevel):this.scale,e.target.id),!1},a.prototype.legendTooltip=function(e,t,i,o){var a,n,l=e.target.id,r=this.legendModule.currentPage,s=e.target.id.split("_Index_")[1];r=this.legendModule.totalPages.length<=this.legendModule.currentPage?this.legendModule.totalPages.length-1:this.legendModule.currentPage<0?0:this.legendModule.currentPage;for(var d=0!==this.legendModule.totalPages.length?this.legendModule.totalPages[r].Collection.length:this.legendModule.totalPages.length,p=0;p<d;p++)a=(n=this.legendModule.totalPages[r].Collection[p]).DisplayText,l=e.target.id,s=e.target.id.split("_Index_")[1],l===this.element.id+"_Legend_Text_Index_"+s&&e.target.textContent.indexOf("...")>-1&&n.idIndex===parseInt(s,10)&&fe(a,this.legendSettings.textStyle.size,t,i,this.element.offsetWidth,this.element.offsetHeight,this.element.id+"_EJ2_Legend_Text_Tooltip",ne(this.element.id+"_Secondary_Element"),o);l!==this.element.id+"_Legend_Text_Index_"+s&&Q(this.element.id+"_EJ2_Legend_Text_Tooltip")},a.prototype.titleTooltip=function(e,t,i,o){var a=e.target.id;a===this.element.id+"_LegendTitle"&&e.target.textContent.indexOf("...")>-1?fe(this.legendSettings.title.text,this.legendSettings.titleStyle.size,t,i,this.element.offsetWidth,this.element.offsetHeight,this.element.id+"_EJ2_LegendTitle_Tooltip",ne(this.element.id+"_Secondary_Element"),o):Q(this.element.id+"_EJ2_LegendTitle_Tooltip"),a===this.element.id+"_Map_title"&&e.target.textContent.indexOf("...")>-1?fe(this.titleSettings.text,this.titleSettings.textStyle.size||this.themeStyle.titleFontSize,t,i,this.element.offsetWidth,this.element.offsetHeight,this.element.id+"_EJ2_Title_Tooltip",ne(this.element.id+"_Secondary_Element"),o):Q(this.element.id+"_EJ2_Title_Tooltip")},a.prototype.mapsOnResize=function(e){var i=this;if(!this.isDestroyed&&!this.isExportInitialTileMap){this.isResize=this.isReset=!0;var o={cancel:!1,name:"resize",previousSize:this.availableSize,currentSize:l(this),maps:this};this.trigger("resize",o),o.cancel||(this.resizeTo&&clearTimeout(this.resizeTo),!t.isNullOrUndefined(this.element)&&this.element.classList.contains("e-maps")&&(this.resizeTo=setTimeout(function(){i.unWireEVents(),i.createSVG(),i.refreshing=!0,i.wireEVents(),i.render(),i.refreshing=!1},500)))}return!1},a.prototype.zoomByPosition=function(e,i){if(!this.isDestroyed){this.zoomNotApplied=!1;var o=this.zoomSettings.zoomFactor===i;!this.isTileMap&&this.zoomModule?t.isNullOrUndefined(e)?(this.zoomSettings.zoomFactor=i,this.isZoomByPosition=!0,this.mapScaleValue=null):(this.zoomSettings.zoomFactor=i,o=this.centerPosition.latitude===e.latitude&&this.centerPosition.longitude===e.longitude||o,this.centerPosition=e,this.isZoomByPosition=!0,this.mapScaleValue=null):this.zoomModule&&(this.tileZoomLevel=this.zoomSettings.zoomFactor=i,o=this.centerPosition.latitude===e.latitude&&this.centerPosition.longitude===e.longitude||o,this.centerPosition=e,this.isZoomByPosition=!0),o&&this.refresh()}},a.prototype.panByDirection=function(e,t){if(!this.isDestroyed){var i=0,o=0;switch(e){case"Left":i=-this.mapAreaRect.width/7;break;case"Right":i=this.mapAreaRect.width/7;break;case"Top":o=-this.mapAreaRect.height/7;break;case"Bottom":o=this.mapAreaRect.height/7}this.zoomModule&&this.zoomModule.panning(e,i,o,t)}},a.prototype.addLayer=function(e){if(!this.isDestroyed){var t=this.layers;t.push(e),this.isAddLayer=!0,this.layers=t}},a.prototype.removeLayer=function(e){if(!this.isDestroyed){var t=this.layers;t.splice(e,1),this.layers=t}},a.prototype.addMarker=function(e,t){if(!this.isDestroyed){var i=document.getElementById(this.element.id+"_LayerIndex_"+e);if(t.length>0&&i){for(var o=0,a=t;o<a.length;o++){var n=a[o];this.layersCollection[e].markerSettings.push(new Ut(this,"markerSettings",n))}new Dt(this).markerRender(this,i,e,this.mapLayerPanel.currentFactor,"AddMarker"),this.arrangeTemplate()}}},a.prototype.shapeSelection=function(e,i,o,a){if(!this.isDestroyed){var n=void 0,l=void 0,r=Array.isArray(i)?i:Array(i);t.isNullOrUndefined(a)&&(a=!0);var s=this.layers[e].selectionSettings;if(!s.enableMultiSelect&&this.legendSelection&&a&&this.removeShapeSelection(),"SubLayer"===this.layers[e].type)for(var d=0;d<this.layersCollection.length;d++)if(this.layersCollection[d].shapeData===this.layers[e].shapeData){l=d;break}if(s.enable){var p=void 0,h=void 0,m=void 0,c=void 0,u=void 0,g=void 0,y=this.layers[e].shapeData.features;for(d=0;d<y.length;d++)for(var f=0;f<r.length;f++){var b=void 0;if((!t.isNullOrUndefined(y[d].properties[r[f]])&&isNaN(y[d].properties[r[f]])?y[d].properties[r[f]].toLowerCase():y[d].properties[r[f]])===(t.isNullOrUndefined(o)||"string"!=typeof o?o:o.toLowerCase())){t.isNullOrUndefined(this.layers[e].shapeSettings.colorValuePath)||(b=V(this.layers[e].dataSource,y[d].properties,this.layers[e].shapeDataPath,this.layers[e].shapePropertyPath,this.layers[e]));var v=this.layers[e];if(this.baseLayerIndex>=0&&v.isBaseLayer?c=0:"SubLayer"===this.layers[e].type&&(c=l),p=this.element.id+"_LayerIndex_"+c+"_shapeIndex_"+d+"_dataIndex_"+b,n=ne(p),t.isNullOrUndefined(b)&&t.isNullOrUndefined(n)&&(n=ne(p=this.element.id+"_LayerIndex_"+e+"_shapeIndex_"+d+"_dataIndex_null")),m=parseInt(n.id.split("_shapeIndex_")[1].split("_")[0],10),u=this.layers[e].shapeData.features.length>m?this.layers[e].shapeData.features[m].properties:null,h=parseInt(n.id.split("_dataIndex_")[1].split("_")[0],10),g=t.isNullOrUndefined(h)?null:this.layers[e].dataSource[h],a){ce(s,this,n,u,g),this.shapeSelectionClass=ne("ShapeselectionMap"),this.legendSettings.visible&&-1===n.id.indexOf("_MarkerIndex_")&&this.legendModule.shapeHighLightAndSelection(n,g,s,"selection",e);if((!this.legendSettings.visible||this.legendModule.shapeToggled)&&(n.setAttribute("class","ShapeselectionMapStyle"),-1===this.selectedElementId.indexOf(n.getAttribute("id"))&&this.selectedElementId.push(n.getAttribute("id")),!s.enableMultiSelect))return}else{this.legendSelection=!s.enableMultiSelect&&!this.legendSelection||this.legendSelection,this.legendSettings.visible&&-1===n.id.indexOf("_MarkerIndex_")&&"ShapeselectionMapStyle"===n.getAttribute("class")&&this.legendModule.shapeHighLightAndSelection(n,g,s,"selection",e);if(!this.legendSettings.visible||this.legendModule.shapeToggled){ue(n);var S=this.selectedElementId.indexOf(n.getAttribute("id"));-1!==S&&(this.selectedElementId.splice(S,1),!s.enableMultiSelect&&this.legendSelection&&this.selectedElementId.length>0&&this.removeShapeSelection())}}}}}}},a.prototype.zoomToCoordinates=function(e,i,o,a){var n,l;if(!this.isDestroyed){var r=void 0,s=void 0,d=!1;this.centerPosition={latitude:null,longitude:null},this.isZoomByPosition=!1,(t.isNullOrUndefined(o)&&t.isNullOrUndefined(a)||t.isNullOrUndefined(e)&&t.isNullOrUndefined(i))&&(e=t.isNullOrUndefined(e)?0:e,i=t.isNullOrUndefined(e)?0:i,o=t.isNullOrUndefined(o)?e:o,a=t.isNullOrUndefined(a)?i:a,d=!0),e>o&&(e=(n=[o,e])[0],o=n[1]),i>a&&(i=(l=[a,i])[0],a=l[1]),d?(r=e+o,s=i+a):(r=(e+o)/2,s=(i+a)/2),this.centerLatOfGivenLocation=r,this.centerLongOfGivenLocation=s,this.minLatOfGivenLocation=e,this.minLongOfGivenLocation=i,this.maxLatOfGivenLocation=o,this.maxLongOfGivenLocation=a,this.zoomNotApplied=!0,this.scaleOfGivenLocation=Ae(e,o,i,a,this.mapAreaRect.width,this.mapAreaRect.height,this,!0);var p={cancel:!1,name:"zoom",type:"zoomIn",maps:this,tileTranslatePoint:{},translatePoint:{},tileZoomLevel:this.isTileMap?{previous:this.tileZoomLevel,current:this.scaleOfGivenLocation}:{},scale:this.isTileMap?{previous:this.tileZoomLevel,current:this.scaleOfGivenLocation}:{previous:this.scale,current:this.scaleOfGivenLocation}};this.trigger("zoom",p),this.refresh()}},a.prototype.removeShapeSelection=function(){for(var e=this.selectedElementId.length,t=0;t<e;t++)ue(ie(this.selectedElementId[0])),this.selectedElementId.splice(0,1);if(this.legendSettings.visible){var i=this.legendSelectionCollection.length;for(t=0;t<i;t++)ue(ie(this.legendSelectionCollection[t].legendElement.id)),this.selectedLegendElementId.splice(0,1)}this.shapeSelectionItem=[],this.legendSelectionCollection=[]},a.prototype.setCulture=function(){this.intl=new t.Internationalization,this.setLocaleConstants(),this.localeObject=new t.L10n(this.getModuleName(),this.defaultLocalConstants,this.locale)},a.prototype.setLocaleConstants=function(){this.defaultLocalConstants={ZoomIn:"Zoom in",Zoom:"Zoom",ZoomOut:"Zoom out",Pan:"Pan",Reset:"Reset",ImageNotFound:"Image Not Found"}},a.prototype.destroy=function(){this.unWireEVents(),t.isNullOrUndefined(this.mapsTooltipModule)||this.mapsTooltipModule.removeEventListener(),e.prototype.destroy.call(this),this.shapeSelectionItem=[],this.toggledShapeElementId=[],this.toggledLegendId=[],this.legendSelectionCollection=[],this.selectedLegendElementId=[],this.selectedNavigationElementId=[],this.selectedBubbleElementId=[],this.selectedMarkerElementId=[],this.selectedElementId=[],this.dataLabelShape=[],this.zoomShapeCollection=[],this.zoomLabelPositions=[],this.mouseDownEvent={x:null,y:null},this.mouseClickEvent={x:null,y:null},this.formatFunction=null,this.availableSize=new Re(0,0),document.getElementById("mapsmeasuretext")&&document.getElementById("mapsmeasuretext").remove(),this.removeSvg()},a.prototype.getModuleName=function(){return"maps"},a.prototype.getPersistData=function(){return this.addOnPersist(["translatePoint","zoomSettings","mapScaleValue","tileTranslatePoint","baseTranslatePoint","scale","zoomPersistence","defaultState","markerZoomedState","initialCheck","initialZoomLevel","initialTileTranslate","applyZoomReset","markerZoomFactor"])},a.prototype.onPropertyChanged=function(i,o){if(!this.isDestroyed){var a=!1,n=!1,l=!1,r=!1;if(i.layers){var s=Object.keys(i.layers).length;document.getElementById(this.element.id+"_LayerIndex_"+(s-1))}for(var d=0,p=Object.keys(i);d<p.length;d++){var h=p[d];switch(h){case"background":this.renderBorder();break;case"height":case"width":case"layers":case"projectionType":case"centerPosition":case"legendSettings":case"baseLayerIndex":if("layers"===h){l=!0;for(var m=Object.keys(i.layers).length,c=0;c<m;c++)if(!t.isNullOrUndefined(i.layers[c]))for(var u=0,g=Object.keys(i.layers[c]);u<g.length;u++){var y=g[u];"layerType"===y&&"Geometry"!==i.layers[c].layerType||t.isNullOrUndefined(this.layers[c].shapeData)&&!t.isNullOrUndefined(this.layers[c].urlTemplate)&&""!==this.layers[c].urlTemplate?this.isReset=!0:"markerSettings"===y?n=!0:"staticMapType"===y&&(r=!0)}}a=!0;break;case"zoomSettings":t.isNullOrUndefined(o.zoomSettings)||(i.zoomSettings.zoomFactor===o.zoomSettings.zoomFactor||l?i.zoomSettings.shouldZoomInitially!==o.zoomSettings.shouldZoomInitially?(this.zoomSettings.zoomFactor=1,a=!0):i.zoomSettings.enable!==o.zoomSettings.enable?(this.zoomSettings.zoomFactor=1,a=!0):a=!0:a=!1);break;case"locale":case"currencyCode":e.prototype.refresh.call(this)}}a&&(i.layers&&n?(Q(this.element.id+"_Markers_Group"),this.isTileMap?this.mapLayerPanel.renderTileLayer(this.mapLayerPanel,this.layers.currentFactor,this.layers.length-1):this.render()):i.layers&&r?this.mapLayerPanel.renderGoogleMap(this.layers[this.layers.length-1].key,this.staticMapZoom):(this.createSVG(),this.renderElements()))}},a.prototype.requiredModules=function(){var e=[],t=this.findVisibleLayers(this.layers),i=!1;return this.annotations.map(function(e){i=null!=e.content}),this.isBubbleVisible()&&e.push({member:"Bubble",args:[this]}),t.highlight&&e.push({member:"Highlight",args:[this]}),t.selection&&e.push({member:"Selection",args:[this]}),this.legendSettings.visible&&e.push({member:"Legend",args:[this]}),(this.zoomSettings.enable||this.zoomSettings.zoomFactor>this.zoomSettings.minZoom)&&e.push({member:"Zoom",args:[this]}),this.isMarkersVisible()&&e.push({member:"Marker",args:[this]}),this.isDataLabelVisible()&&e.push({member:"DataLabel",args:[this]}),this.isNavigationVisible()&&e.push({member:"NavigationLine",args:[this]}),t.tooltip&&e.push({member:"MapsTooltip",args:[this]}),i&&e.push({member:"Annotations",args:[this,pi]}),this.allowPrint&&e.push({member:"Print",args:[this]}),this.allowImageExport&&e.push({member:"ImageExport",args:[this]}),this.allowPdfExport&&e.push({member:"PdfExport",args:[this]}),e},a.prototype.isMarkersVisible=function(){var e=!1;return Array.prototype.forEach.call(this.layers,function(t){for(var i=0;i<t.markerSettings.length;i++)if(t.markerSettings[i].visible){e=!0;break}}),e},a.prototype.isDataLabelVisible=function(){for(var e=!1,t=0;t<this.layers.length;t++)if(this.layers[t].dataLabelSettings.visible){e=!0;break}return e},a.prototype.isNavigationVisible=function(){var e=!1;return Array.prototype.forEach.call(this.layers,function(t){for(var i=0;i<t.navigationLineSettings.length;i++)if(t.navigationLineSettings[i].visible){e=!0;break}}),e},a.prototype.isBubbleVisible=function(){for(var e=!1,t=0,i=this.layers;t<i.length;t++){var o=i[t];if(this.getBubbleVisible(o)){e=!0;break}}return e},a.prototype.getBubbleVisible=function(e){for(var t=!1,i=0,o=e.bubbleSettings;i<o.length;i++){if(o[i].visible){t=!0;break}}return t},a.prototype.print=function(e){this.allowPrint&&this.printModule&&!this.isDestroyed&&this.printModule.print(this,e)},a.prototype.export=function(e,i,o,a){var n=this;if(!this.isDestroyed){if(t.isNullOrUndefined(a)&&(a=!0),"PDF"!==e&&this.allowImageExport&&this.imageExportModule)return new Promise(function(t,o){t(n.imageExportModule.export(n,e,i,a))});if(this.allowPdfExport&&this.pdfExportModule)return new Promise(function(t,l){t(n.pdfExportModule.export(n,e,i,a,o))})}return null},a.prototype.getBingUrlTemplate=function(e){var i;return this.isDestroyed||(i=new Promise(function(i,o){var a=new t.Fetch({url:e});a.onSuccess=function(e){var t=e.resourceSets[0].resources[0];i(t.imageUrl)},a.send()})),i},a.prototype.findVisibleLayers=function(e,t,i,o,a,n){void 0===t&&(t=!1),void 0===i&&(i=!1),void 0===o&&(o=!1),void 0===a&&(a=!1),void 0===n&&(n=!1);for(var l,r,s=0,d=e;s<d.length;s++){var p=d[s];if(t=p.visible||t,p.visible){l=p.bubbleSettings,r=p.markerSettings;for(var h=0,m=p.navigationLineSettings;h<m.length;h++){var c=m[h];c.visible&&(a=c.highlightSettings.enable||a,n=c.selectionSettings.enable||n)}for(var u=0,g=r;u<g.length;u++){var y=g[u];if(y.visible&&(o=y.tooltipSettings.visible||o,a=y.selectionSettings.enable||a,n=y.highlightSettings.enable||n),o)break}for(var f=0,b=l;f<b.length;f++){var v=b[f];if(v.visible&&(o=v.tooltipSettings.visible||o,a=v.selectionSettings.enable||a,n=v.highlightSettings.enable||n),o)break}o=p.tooltipSettings.visible||o,a=p.selectionSettings.enable||a,n=p.highlightSettings.enable||n}if(t&&i&&o)break}return{layer:t,bubble:i,tooltip:o,selection:a,highlight:n}},a.prototype.getGeoLocation=function(e,i,o){var a=0,n=0;if(!this.isDestroyed){var l=document.getElementById(this.element.id),r=i-(t.isNullOrUndefined(this.markerDragArgument)?l.offsetLeft:0),s=o-(t.isNullOrUndefined(this.markerDragArgument)?l.offsetTop:0),d=$(this,this.layersCollection[e],!1).location,p=d.x*this.scale,h=d.y*this.scale,m=Math.min(this.mapAreaRect.height,this.mapAreaRect.width)*this.mapLayerPanel.currentFactor*this.scale,c=this.clip(r-p,0,m-1)/m-.5,u=.5-this.clip(s-h,0,m-1)/m;a=90-360*Math.atan(Math.exp(2*-u*Math.PI))/Math.PI,n=360*c}return{latitude:a,longitude:n}},a.prototype.clip=function(e,t,i){return Math.min(Math.max(e,t),i)},a.prototype.getTileGeoLocation=function(e,i){var o=0,a=0;if(!this.isDestroyed){var n=document.getElementById(this.element.id),l=document.getElementById(this.element.id+"_tile_parent"),r=this.pointToLatLong(e+this.mapAreaRect.x-(l.offsetLeft-(t.isNullOrUndefined(this.markerDragArgument)?n.offsetLeft:0)),i+this.mapAreaRect.y-(l.offsetTop-(t.isNullOrUndefined(this.markerDragArgument)?n.offsetTop:0)));o=r.latitude,a=r.longitude}return{latitude:o,longitude:a}},a.prototype.pointToLatLong=function(e,t){var i=0,o=0;if(!this.isDestroyed){t+="GoogleStaticMap"===this.layers[this.layers.length-1].layerType?0:10;var a=256*Math.pow(2,this.tileZoomLevel),n=this.clip(e-this.translatePoint.x*this.scale,0,a-1)/a-.5,l=.5-this.clip(t-this.translatePoint.y*this.scale,0,a-1)/a;i=90-360*Math.atan(Math.exp(2*-l*Math.PI))/Math.PI,o=360*n}return{latitude:i,longitude:o}},mi([t.Property(null)],a.prototype,"background",void 0),mi([t.Property(!1)],a.prototype,"useGroupingSeparator",void 0),mi([t.Property(null)],a.prototype,"format",void 0),mi([t.Property(null)],a.prototype,"width",void 0),mi([t.Property(null)],a.prototype,"height",void 0),mi([t.Property("MouseMove")],a.prototype,"tooltipDisplayMode",void 0),mi([t.Property(!1)],a.prototype,"allowPrint",void 0),mi([t.Property(!1)],a.prototype,"allowImageExport",void 0),mi([t.Property(!1)],a.prototype,"allowPdfExport",void 0),mi([t.Complex({},kt)],a.prototype,"titleSettings",void 0),mi([t.Complex({},Nt)],a.prototype,"zoomSettings",void 0),mi([t.Complex({},Et)],a.prototype,"legendSettings",void 0),mi([t.Collection([],jt)],a.prototype,"layers",void 0),mi([t.Collection([],dt)],a.prototype,"annotations",void 0),mi([t.Complex({},bt)],a.prototype,"margin",void 0),mi([t.Complex({color:"#DDDDDD",width:0},gt)],a.prototype,"border",void 0),mi([t.Property("Material")],a.prototype,"theme",void 0),mi([t.Property("Mercator")],a.prototype,"projectionType",void 0),mi([t.Property(0)],a.prototype,"baseLayerIndex",void 0),mi([t.Property(null)],a.prototype,"description",void 0),mi([t.Property(1)],a.prototype,"tabIndex",void 0),mi([t.Complex({latitude:null,longitude:null},yt)],a.prototype,"centerPosition",void 0),mi([t.Complex({},Zt)],a.prototype,"mapsArea",void 0),mi([t.Event()],a.prototype,"load",void 0),mi([t.Event()],a.prototype,"beforePrint",void 0),mi([t.Event()],a.prototype,"loaded",void 0),mi([t.Event()],a.prototype,"click",void 0),mi([t.Event()],a.prototype,"onclick",void 0),mi([t.Event()],a.prototype,"doubleClick",void 0),mi([t.Event()],a.prototype,"rightClick",void 0),mi([t.Event()],a.prototype,"resize",void 0),mi([t.Event()],a.prototype,"tooltipRender",void 0),mi([t.Event()],a.prototype,"legendRendering",void 0),mi([t.Event()],a.prototype,"tooltipRenderComplete",void 0),mi([t.Event()],a.prototype,"shapeSelected",void 0),mi([t.Event()],a.prototype,"itemSelection",void 0),mi([t.Event()],a.prototype,"itemHighlight",void 0),mi([t.Event()],a.prototype,"shapeHighlight",void 0),mi([t.Event()],a.prototype,"layerRendering",void 0),mi([t.Event()],a.prototype,"shapeRendering",void 0),mi([t.Event()],a.prototype,"markerRendering",void 0),mi([t.Event()],a.prototype,"markerClusterRendering",void 0),mi([t.Event()],a.prototype,"markerClick",void 0),mi([t.Event()],a.prototype,"markerDragStart",void 0),mi([t.Event()],a.prototype,"markerDragEnd",void 0),mi([t.Event()],a.prototype,"markerClusterClick",void 0),mi([t.Event()],a.prototype,"markerClusterMouseMove",void 0),mi([t.Event()],a.prototype,"markerMouseMove",void 0),mi([t.Event()],a.prototype,"dataLabelRendering",void 0),mi([t.Event()],a.prototype,"bubbleRendering",void 0),mi([t.Event()],a.prototype,"bubbleClick",void 0),mi([t.Event()],a.prototype,"bubbleMouseMove",void 0),mi([t.Event()],a.prototype,"animationComplete",void 0),mi([t.Event()],a.prototype,"annotationRendering",void 0),mi([t.Event()],a.prototype,"zoom",void 0),mi([t.Event()],a.prototype,"pan",void 0),a=mi([t.NotifyPropertyChanges],a)}(t.Component),ui=function(){function e(e){this.id="",this.maps=e,this.bubbleCollection=[]}return e.prototype.renderBubble=function(e,i,o,a,n,l,r,s,d,p){var h,m,c=this,u=s.layerData,g=e.colorValuePath,y=t.isNullOrUndefined(g)?i[g]:g.indexOf(".")>-1?w(i,e.colorValuePath):i[g],f=t.isNullOrUndefined(g)?Number(i[g]):g.indexOf(".")>-1?Number(w(i,e.colorValuePath)):Number(i[g]),b=t.isNullOrUndefined(e.valuePath)?Number(i[e.valuePath]):e.valuePath.indexOf(".")>-1?Number(w(i,e.valuePath)):Number(i[e.valuePath]);if(isNaN(b)&&isNaN(f)&&t.isNullOrUndefined(y))return null;var v=W(e.minRadius,e.maxRadius,b,a.min,a.max),S=new si(this.maps).getColorByValue(e.colorMapping,f,y);m="[object Object]"!==Object.prototype.toString.call(S)||t.isNullOrUndefined(S.fill)?o:S.fill,h="[object Object]"!==Object.prototype.toString.call(S)||t.isNullOrUndefined(S.opacity)?e.opacity:S.opacity;var x=[[]];this.maps.translateType="bubble";for(var O=0,_=0,C=0,M=0,L=u.length;M<L;M++){var P=u[M];P=P.property;var T=H(i[s.shapeDataPath],s.shapePropertyPath,P);if((!t.isNullOrUndefined(i[s.shapeDataPath])&&isNaN(i[s.shapeDataPath])?i[s.shapeDataPath].toLowerCase():i[s.shapeDataPath])===(!t.isNullOrUndefined(P[T])&&isNaN(P[T])?P[T].toLowerCase():P[T])&&"LineString"!==u[M].type&&"MultiLineString"!==u[M].type&&"Point"!==u[M].type&&"MultiPoint"!==u[M].type)if(u[M]._isMultiPolygon)for(var I=u[M],k=0;k<I.length;k++)x.push(this.getPoints(I[k],[])),_<(C=x[x.length-1].length)&&(_=C,O=x.length-1);else x.push(this.getPoints(u[M],[])),_<(C=x[x.length-1].length)&&(_=C,O=x.length-1)}var N,F,E=this.maps.projectionType,z={color:e.border.color,opacity:e.border.opacity,width:e.border.width},B=X(x[O],E,s.geometryType);if(e.visible){if(t.isNullOrUndefined(B)){var U=x.length-1;if(!x[U].x||!x[U].y)return;F={cancel:!1,name:ei,border:z,cx:x[U].x,cy:x[U].y,data:i,fill:m,maps:this.maps,radius:v}}else N="Mercator"===this.maps.projectionType?B.y:-B.y,F={cancel:!1,name:ei,border:z,cx:B.x,cy:N,data:i,fill:m,maps:this.maps,radius:v};this.maps.trigger("bubbleRendering",F,function(i){if(!F.cancel){var o;if(F.border.opacity=t.isNullOrUndefined(F.border.opacity)?h:F.border.opacity,"Circle"===e.bubbleType){var a=new qe(p,F.fill,F.border,h,0,0,F.radius,null);o=j(c.maps,a,d)}else{var m="Mercator"===c.maps.projectionType?F.cy-v:F.cy+v,u=new Xe(p,F.fill,F.border,h,new et(0,0,2*v,2*v),2,2);F.cx-=v,F.cy=m,o=R(c.maps,u,d)}A(c.maps.selectedBubbleElementId,c.maps.bubbleSelectionClass,o,"BubbleselectionMapStyle"),c.bubbleCollection.push({LayerIndex:r,BubbleIndex:n,DataIndex:l,element:o,center:{x:F.cx,y:F.cy}});var g,y=0!==s.animationDuration||t.isNullOrUndefined(c.maps.zoomModule);g=c.maps.zoomSettings.zoomFactor>1&&!t.isNullOrUndefined(c.maps.zoomModule)&&!c.maps.isTileMap?ee(c.maps,s,y):$(c.maps,s,y);var f=e.dataSource,b=g.scale,S=g.location,x=new $e(c.maps.isTileMap?(F.cx+c.maps.translatePoint.x)*c.maps.tileZoomLevel:(F.cx+S.x)*b,c.maps.isTileMap?(F.cy+c.maps.translatePoint.y)*c.maps.tileZoomLevel:(F.cy+S.y)*b);o.setAttribute("transform","translate( "+x.x+" "+x.y+" )");var O=f.length-1===l?"bubble":null;"Square"===e.bubbleType?(x.x+=v,x.y+=v*("Mercator"===c.maps.projectionType?1:-1)):v=0,e.animationDuration>0&&ge(o,e.animationDelay,e.animationDuration,x,c.maps,O,v)}})}},e.prototype.getPoints=function(e,i){return t.isNullOrUndefined(e.map)?i=e.point:e.map(function(e){i.push(new Ze(e.point.x,e.point.y))}),i},e.prototype.bubbleClick=function(e){var i=e.target.id;if(-1!==i.indexOf("_LayerIndex_")){var o=this.getbubble(i);if(!t.isNullOrUndefined(o)){var a={cancel:!1,name:ti,data:o,maps:this.maps,target:i,x:e.clientX,y:e.clientY};this.maps.trigger(ti,a)}}},e.prototype.getbubble=function(e){var t=e.split("_LayerIndex_"),i=parseInt(t[1].split("_")[0],10),o=this.maps.layers[i];if(e.indexOf("_BubbleIndex_")>-1){var a=parseInt(t[1].split("_BubbleIndex_")[1],10),n=parseInt(t[1].split("_BubbleIndex_")[1].split("_dataIndex_")[1],10);if(!isNaN(a))return o.bubbleSettings[a].dataSource[n]}return null},e.prototype.bubbleMove=function(e){var i=e.target.id;if(-1!==i.indexOf("_LayerIndex_")){var o=this.getbubble(i);if(!t.isNullOrUndefined(o)){var a={cancel:!1,name:ii,data:o,maps:this.maps,target:i,x:e.clientX,y:e.clientY};this.maps.trigger(ii,a)}}},e.prototype.getModuleName=function(){return"Bubble"},e.prototype.destroy=function(){this.bubbleCollection=[]},e}(),gi=function(){function e(e){this.value={rightWidth:0,leftWidth:0,heightTop:0,heightBottom:0},this.maps=e,this.dataLabelCollections=[]}return e.prototype.getDataLabel=function(e,i,o,a){for(var n,l,r=0;r<e.length;r++){var s=e[r],d=!t.isNullOrUndefined(s[a])&&isNaN(s[a])&&"string"==typeof s[a]?s[a].toLowerCase():s[a];if(o=t.isNullOrUndefined(o)||"string"!=typeof o?o:o.toString(),l=t.isNullOrUndefined(o)||"string"!=typeof o?o:o.toLowerCase(),d===l){n=s;break}}return n},e.prototype.renderLabel=function(e,i,o,a,n,l,r,s){var d,p,h,m,c,u,g,y,f=this,b=e.dataLabelSettings,v=e.dataLabelSettings.textStyle,S=e.dataLabelSettings,_=e.dataLabelSettings.labelPath,C=[[]],M=0,P=0,w=o,T="",I=0,k=!1,N=o.properties,F=this.maps.element.id+"_LayerIndex_"+i+"_shapeIndex_"+r+"_LabelIndex_"+r,E=new Ze(0,0),z=a[r];v.fontFamily="material"!==this.maps.theme.toLowerCase()?this.maps.themeStyle.labelFontFamily:v.fontFamily,v.fontWeight=v.fontWeight||this.maps.themeStyle.fontWeight||Ue.dataLabelFont.fontWeight,o=z.property;var A,B,U="[object Array]"===Object.prototype.toString.call(e.shapePropertyPath)?e.shapePropertyPath:[e.shapePropertyPath],j=0!==e.animationDuration||t.isNullOrUndefined(this.maps.zoomModule),R=this.maps.isTileMap?new Object:this.maps.zoomSettings.zoomFactor>1&&!t.isNullOrUndefined(this.maps.zoomModule)?ee(this.maps,e,j):$(this.maps,e,j),Z=this.maps.isTileMap?this.maps.scale:R.scale,D=this.maps.isTileMap?this.maps.translatePoint:R.location,V=this.maps.zoomTranslatePoint,H=t.isNullOrUndefined(this.maps.scale)?1:Math.floor(this.maps.scale),W=this.maps.zoomSettings.enable?!t.isNullOrUndefined(this.maps.zoomShapeCollection)&&this.maps.zoomShapeCollection.length>0&&!this.maps.isAddLayer:this.maps.zoomSettings.enable;this.maps.translateType="labels";for(var q=0;q<U.length&&!(N[U[q]]&&(A=U[q],m=this.getDataLabel(e.dataSource,e.shapeDataPath,w.properties[A],e.shapeDataPath)));q++);if(m=this.getDataLabel(e.dataSource,e.shapeDataPath,w.properties[A],e.shapeDataPath),!t.isNullOrUndefined(z.property))if(C=[[]],a[r]._isMultiPolygon||"Point"===a[r].type||"MultiPoint"===a[r].type){if("Point"!==a[r].type&&"MultiPoint"!==a[r].type){var J=a[r];for(q=0;q<J.length;q++)C.push(this.getPoint(J[q],[])),P<(I=C[C.length-1].length)&&(P=I,M=C.length-1)}}else C.push(this.getPoint(a[r],[])),P<(I=C[C.length-1].length)&&(P=I,M=C.length-1);if(T=t.isNullOrUndefined(m)?w.properties[_]:t.isNullOrUndefined(m[_])?m[e.shapeDataPath]:m[_].toString(),"[object Array]"===Object.prototype.toString.call(e.shapePropertyPath)&&t.isNullOrUndefined(T)&&0===e.dataSource.length)for(var Q=0;Q<e.shapePropertyPath.length;Q++)if(w.properties[e.shapePropertyPath[Q]]){T=w.properties[e.shapePropertyPath[Q]];break}t.isNullOrUndefined(T)&&""!==e.dataLabelSettings.template&&0===e.dataSource.length&&(T=w.properties[e.shapePropertyPath]),t.isNullOrUndefined(T)&&e.dataSource.length>0&&(T="");var K=T,te=this.maps.projectionType,ie=u=X(C[M],te,e.geometryType);if(!t.isNullOrUndefined(T)&&!t.isNullOrUndefined(u)){if(W&&H>1&&!this.maps.zoomNotApplied&&""===b.template){if(i>0)for(var ne=0;ne<this.maps.zoomLabelPositions.length;ne++)if(this.maps.zoomLabelPositions[ne].dataLabelText===T){c=r,r=ne,k=!0;break}g=u.x,y=u.y,u.x=(u.x+V.x)*Z,u.y=(u.y+V.y)*Z}u.y="Mercator"===this.maps.projectionType||"Normal"===e.geometryType?u.y:-u.y,t.isNullOrUndefined(this.maps.format)||isNaN(parseFloat(T))||this.maps.useGroupingSeparator&&(T=oe(this.maps,parseFloat(T)),t.isNullOrUndefined(m)||(m[_]=T));var le={name:$t,maps:this.maps,cancel:!1,border:{color:b.border.color,width:b.border.width,opacity:b.border.opacity},datalabel:b,fill:b.fill,template:b.template,text:T,offsetX:0,offsetY:0};this.maps.trigger("dataLabelRendering",le,function(o){if(!le.cancel){var a=[],b=W&&H>1&&!f.maps.zoomNotApplied&&f.maps.zoomShapeCollection.length>r?f.maps.dataLabelShape[r]*Z:(u.rightMax.x-u.leftMax.x)*Z;t.isNullOrUndefined(f.maps.dataLabelShape)||f.maps.isReset||(B=ie.rightMax.x-ie.leftMax.x,f.maps.dataLabelShape.push(B)),le.text===T||le.cancel||(T=le.text);var _=x(T,v),P=T,I=_,N=u.y-_.height/4,z=u.y+_.height/4,A=(u.y+D.y)*Z-_.height/4,U=(u.y+D.y)*Z+_.height/4;if((a=G(C[M],N,z)).length>5&&"MultiPolygon"!==w.geometry.type&&"MultiPolygon"!==w.type){var j=X(a,te,e.geometryType);W&&H>1&&!f.maps.zoomNotApplied&&""===le.template&&(j.x=(f.maps.zoomLabelPositions[r].location.x+V.x)*Z,j.y=(f.maps.zoomLabelPositions[r].location.y+V.y)*Z),g=j.x,u.x=j.x,b=W&&H>1&&!f.maps.zoomNotApplied&&f.maps.zoomShapeCollection.length>r?f.maps.dataLabelShape[r]*Z:(j.rightMax.x-j.leftMax.x)*Z>0?(j.rightMax.x-j.leftMax.x)*Z:b}var R=(u.x+D.x)*Z+_.width/2,q=(u.x+D.x)*Z-_.width/2;f.value[r]={rightWidth:R,leftWidth:q,heightTop:A,heightBottom:U};var J;if(""!==le.template){var Q=(d=ae(le.template,f.maps))?d(t.isNullOrUndefined(m)?w.properties:m,f.maps,le.template,f.maps.element.id+"_LabelTemplate",!1):document.createElement("div");Q.innerHTML=d?"":le.template,J=L(Q,F,t.isNullOrUndefined(m)?w.properties:m,0,f.maps),f.maps.isTileMap?(J.style.left=(u.x+D.x)*Z-_.width/2+"px",J.style.top=(u.y+D.y)*Z-_.height+"px"):(J.style.left=Math.abs(f.maps.baseMapRectBounds.min.x-u.x)*Z+o.offsetX+"px",J.style.top=Math.abs(f.maps.baseMapRectBounds.min.y-u.y)*Z+o.offsetY+"px"),l.appendChild(J)}else{if("Trim"===S.smartLabelMode){I=x(P=Y(b,"number"==typeof T?T.toString():T,v),v),p=new He(F,E.x,E.y,"middle",P,"","")}if("None"===S.smartLabelMode&&(p=new He(F,E.x,E.y,"middle",T,"","")),"Hide"===S.smartLabelMode&&(T=b>=_.width?T:"",p=new He(F,E.x,E.y,"middle",T,"","")),T=p.text,"Hide"===S.intersectionAction){for(var $=0;$<s.length;$++)if(!t.isNullOrUndefined(s[$])&&!(f.value[r].leftWidth>s[$].rightWidth||f.value[r].rightWidth<s[$].leftWidth||f.value[r].heightTop>s[$].heightBottom||f.value[r].heightBottom<s[$].heightTop)){T="";break}s.push(f.value[r]),p=new He(F,E.x,E.y,"middle",T,"","")}if("Trim"===S.intersectionAction){for(var ee=0;ee<s.length;ee++)if(!t.isNullOrUndefined(s[ee]))if(s[ee].rightWidth<f.value[r].leftWidth||s[ee].leftWidth>f.value[r].rightWidth||s[ee].heightBottom<f.value[r].heightTop||s[ee].heightTop>f.value[r].heightBottom)P=T,0;else{if(f.value[r].leftWidth>s[ee].leftWidth){P=Y((b=s[ee].rightWidth-f.value[r].leftWidth)-(f.value[r].rightWidth-f.value[r].leftWidth),T,v);break}if(f.value[r].leftWidth<s[ee].leftWidth){b=f.value[r].rightWidth-s[ee].leftWidth,P=Y(Math.abs(b-(f.value[r].rightWidth-f.value[r].leftWidth)),T,v);break}}I=x(P,v),s.push(f.value[r]),p=new He(F,E.x,E.y,"middle",P,"","")}if("None"===S.intersectionAction&&(p=new He(F,E.x,E.y,"middle",T,"","")),P.length>1){var oe=le.border;if(oe.width>1){var ne=le.fill,re=S.opacity,se=S.rx,de=S.ry,pe=void 0,he=void 0;W&&H>1&&!f.maps.zoomNotApplied?(pe=u.x-_.width/2,he=u.y-_.height/2-5):(pe=(u.x+D.x)*Z-_.width/2,he=(u.y+D.y)*Z-_.height/2),oe.opacity=t.isNullOrUndefined(oe.opacity)?re:oe.opacity;var me=new Xe(f.maps.element.id+"_LayerIndex_"+i+"_shapeIndex_"+r+"_rectIndex_"+r,ne,oe,re,new et(pe+o.offsetX,he+o.offsetY,_.width,_.height),se,de),ce=f.maps.renderer.drawRectangle(me);n.appendChild(ce)}}h=O(p,v,v.color||f.maps.themeStyle.dataLabelFontColor,n),W&&H>1&&!f.maps.zoomNotApplied?(h.setAttribute("transform","translate( "+(u.x+o.offsetX)+" "+(u.y+o.offsetY)+" )"),u.x=g,u.y=y):h.setAttribute("transform","translate( "+((u.x+D.x)*Z+o.offsetX)+" "+((u.y+D.y)*Z+I.height/4+o.offsetY)+" )"),n.appendChild(h)}f.dataLabelCollections.push({location:{x:u.x+o.offsetX,y:u.y+o.offsetY},element:t.isNullOrUndefined(J)?h:J,layerIndex:i,shapeIndex:k?c:r,labelIndex:k?c:r,dataLabelText:K}),l.childElementCount>0&&!f.maps.element.contains(l)&&(document.getElementById(f.maps.element.id+"_Secondary_Element").appendChild(l),f.maps.renderReactTemplates())}})}},e.prototype.getPoint=function(e,t){return"MultiLineString"===e.type?e.map(function(e){e.map(function(e){t.push(new Ze(e.point.x,e.point.y))})}):e.map(function(e){t.push(new Ze(e.point.x,e.point.y))}),t},e.prototype.getModuleName=function(){return"DataLabel"},e.prototype.destroy=function(){this.dataLabelCollections=[],this.value=null,this.maps=null},e}(),yi=function(){function e(e){this.maps=e}return e.prototype.renderNavigation=function(e,i,o){var a;if(!t.isNullOrUndefined(this.maps)){var n=void 0,l=e.navigationLineSettings,r=void 0,s=[],d=void 0,p=void 0,c=void 0,u=void 0,g=void 0,y=void 0,f=void 0,b=void 0,v=void 0,S=void 0,x=void 0,O=void 0,_=void 0,C=void 0,M=void 0,L=void 0,P=void 0,w=void 0,T=void 0;a=this.maps.renderer.createGroup({id:this.maps.element.id+"_LayerIndex_"+o+"_line_Group"});for(var I=0;I<l.length;I++){if(d=l[I].properties.latitude,r=l[I].properties.longitude,p=l[I].properties.visible,c=l[I].angle,u=l[I].width||1,g=l[I].color,y=l[I].properties.dashArray,O=l[I].properties.arrowSettings,v=!t.isNullOrUndefined(O)&&O.properties.showArrow,r.length===d.length&&p)for(var k=0;k<r.length;k++){var N=this.maps.isTileMap?m(new Ze(r[k],d[k]),i,this.maps.tileTranslatePoint,!0):h(d[k],r[k],i,e,this.maps);s.push(N)}w=this.maps.renderer.createGroup({id:this.maps.element.id+"_LayerIndex_"+o+"_NavigationGroup"+I});for(var F=0;F<s.length-1;F++){c=1<(c=-1>c?-1:c)?1:c;var E=this.maps.element.id+"_LayerIndex_"+o+"_NavigationIndex_"+I+"_Line"+F,z=this.convertRadius(s[F],s[F+1]);if(c<=1&&c>0&&(b=0,s[F].x>s[F+1].x&&(b=1)),c>=-1&&c<0&&(b=1,s[F].x>s[F+1].x&&(b=0)),v){S=O.properties.color,x=O.properties.size,P=void 0===O.properties.offSet?0:O.properties.offSet;var B=Math.round(x/2);C="Start"===(_=O.properties.position)?"url(#triangle"+I+")":null,M="End"===_?"url(#triangle"+I+")":null,0!==L&&0===c&&(L="Start"===_?P:-P),L=t.isNullOrUndefined(L)?0:L;var U=this.maps.element.id+"_triangle",j=this.maps.renderer.createDefs();j.innerHTML+='<marker id="triangle'+I+'"></marker>';var R=j.querySelector("#triangle"+I);R.setAttribute("markerWidth",x.toString()),R.setAttribute("markerHeight",x.toString()),R.setAttribute("refX",(B-L).toString()),R.setAttribute("refY",B.toString()),R.setAttribute("orient","auto");f=new Ge(U,S,u,g,1,1,y,"M 0,0 L 0,"+x+" L "+B+", "+B+" Z"),n=this.maps.renderer.drawPath(f),R.appendChild(n),j.appendChild(R),w.appendChild(j)}if(c=Math.abs(c),T=0===c?"M "+s[F].x+","+s[F].y+"L "+s[F+1].x+","+s[F+1].y+" ":"M "+s[F].x+","+s[F].y+" A "+(z/2+(1-c)*z/(10*c))+" "+(z/2+(1-c)*z/(10*c))+" 0,0,"+b+" , "+s[F+1].x+","+s[F+1].y+" ",f=new Ge(E,"none",u,g,1,1,y,T),n=this.maps.renderer.drawPath(f),!t.isNullOrUndefined(_))"Start"===_?n.setAttribute("marker-start",C):n.setAttribute("marker-end",M);A(this.maps.selectedNavigationElementId,this.maps.navigationSelectionClass,n,"navigationlineselectionMapStyle"),w.appendChild(n),a.appendChild(w)}s=[]}}return a},e.prototype.convertRadius=function(e,t){var i=t.x-e.x,o=t.y-e.y;return Math.sqrt(Math.pow(i,2)+Math.pow(o,2))},e.prototype.getModuleName=function(){return"NavigationLine"},e.prototype.destroy=function(){this.maps=null},e}(),fi=function(){function e(e){this.legendBorderRect=new et(0,0,0,0),this.initialMapAreaRect=new et(0,0,0,0),this.legendTotalRect=new et(0,0,0,0),this.totalPages=[],this.page=0,this.currentPage=0,this.legendItemRect=new et(0,0,0,0),this.heightIncrement=0,this.widthIncrement=0,this.textMaxWidth=0,this.shapeHighlightCollection=[],this.legendHighlightCollection=[],this.shapePreviousColor=[],this.selectedNonLegendShapes=[],this.shapeToggled=!0,this.legendElement=null,this.maps=e,this.addEventListener()}return e.prototype.renderLegend=function(){this.legendRenderingCollections=[],this.legendCollection=[],this.totalPages=[],this.widthIncrement=0,this.heightIncrement=0,this.defsElement=this.maps.renderer.createDefs(),this.maps.svgObject.appendChild(this.defsElement),this.initialMapAreaRect=this.maps.mapAreaRect,this.calculateLegendBounds(),this.drawLegend()},e.prototype.calculateLegendBounds=function(){var e=this,i=this.maps,o=i.legendSettings;this.legendCollection=[];var a=i.mapAreaRect.y;if(this.legendRenderingCollections=[],Array.prototype.forEach.call(i.layersCollection,function(i,a){if(!t.isNullOrUndefined(i.shapeData)){var n=i.shapeData.features,l=i.shapeDataPath,r=i.shapePropertyPath,s=i.dataSource,d=void 0,p=void 0;if("Layers"===o.type&&i.visible)d=i.shapeSettings.colorValuePath,p=i.shapeSettings.colorMapping,e.getLegends(a,n,p,s,l,d,r);else if("Bubbles"===o.type)for(var h=0,m=i.bubbleSettings;h<m.length;h++){var c=m[h];c.visible&&(d=c.colorValuePath,p=c.colorMapping,s=c.dataSource,e.getLegends(a,n,p,s,l,d,r))}}"Markers"===o.type&&e.getMarkersLegendCollections(a,i.markerSettings)}),this.legendCollection.length>0)for(var n=0;n<this.legendCollection.length;n++){var l={name:"legendRendering",cancel:!1,fill:(H=this.legendCollection[n]).fill,shape:o.shape,shapeBorder:o.shapeBorder,text:"number"==typeof H.text?H.text.toString():H.text};i.trigger("legendRendering",l),H.fill=l.fill,H.shape=l.shape,H.shapeBorder=l.shapeBorder,H.text=l.text,l.cancel&&(this.legendCollection.splice(n,1),n--)}var r=i.legendSettings.title.text,s=i.legendSettings.titleStyle;if(this.legendCollection.length>0){var d,p,h=o.mode,m=0,c=0,u=0,g=0,y=o.shapePadding,f=o.shapeHeight,b=o.shapeWidth,v=[],S=[],O=o.position,_=o.labelDisplayMode,C="None"===o.orientation?"Top"===O||"Bottom"===O?"Horizontal":"Vertical":o.orientation,M=o.width.length>1?o.width.indexOf("%")>-1?i.availableSize.width/100*parseInt(o.width,10):parseInt(o.width,10):null,L=o.height.length>1?o.height.indexOf("%")>-1?i.availableSize.height/100*parseInt(o.height,10):parseInt(o.height,10):null,P=0,w=0,T=x(r,s);if("Interactive"===h){var I=o.textStyle,k=this.legendCollection.length,N="Horizontal"===C?t.isNullOrUndefined(M)?i.mapAreaRect.width/k:M/k:t.isNullOrUndefined(M)?25:M,F="Horizontal"===C?t.isNullOrUndefined(L)?25:L:t.isNullOrUndefined(L)?i.mapAreaRect.height/k:L/k;P=0,w=T.height+10;var E=o.labelPosition,z=0,A=0,B=0,U=0,j=0,R=0;for(n=0;n<this.legendCollection.length;n++){P="Horizontal"===C?P+N:P,w="Horizontal"===C?w:w+F;var Z=this.legendCollection[n].text,D=new Re(0,0);"None"===_?D=x(Z,I):"Trim"===_?D=x(Z=Y("Horizontal"===C?N:F,Z,I),I):Z="",j=Math.max(j,D.height),R=Math.max(R,D.width),D.width>0&&D.height>0&&("Horizontal"===C?(z=P+N/2,A="After"===E?w+F+D.height/2+10:w-10):(z="After"===E?P-D.width/2-10:P+N+D.width/2+10,A=w+F/2+D.height/4)),0===n?(B="Horizontal"===C?P:"After"===E?z-D.width/2:P,U="Horizontal"===C?"After"===E?w:A-D.height/2:w,1===this.legendCollection.length&&(M="Horizontal"===C?Math.abs(P+N-B):N+R+10,L="Horizontal"===C?F+j/2+10:Math.abs(w+F-U))):n===this.legendCollection.length-1&&(M="Horizontal"===C?Math.abs(P+N-B):N+R+10,L="Horizontal"===C?F+j/2+10:Math.abs(w+F-U)),this.legendRenderingCollections.push({fill:this.legendCollection[n].fill,x:P,y:w,width:N,height:F,text:Z,textX:z,textY:A,textWidth:D.width,textHeight:D.height,shapeBorder:this.legendCollection[n].shapeBorder})}1===this.legendCollection.length&&(L=F,M=N),this.legendItemRect={x:B,y:U,width:M,height:L}}else{M=t.isNullOrUndefined(M)?i.mapAreaRect.width:M,L=t.isNullOrUndefined(L)?i.mapAreaRect.height:L;var V=0;this.page=0;for(n=0;n<this.legendCollection.length;n++){var H=this.legendCollection[n];t.isNullOrUndefined(this.totalPages[this.page])&&(this.totalPages[this.page]={Page:this.page+1,Collection:[]});var G=x(H.text,o.textStyle);if(this.textMaxWidth=Math.max(this.textMaxWidth,G.width),0===n)P=m=10+b/2,w=c=a+T.height+(f>G.height?f/2:G.height/4);else{var W=G.height>f?G.height:f;if("Horizontal"===C){var X=S[V-1].x+S[V-1].width+10+b;if(X+y+G.width>M){var q=(S[V-1].y>v[V-1].y+f/2?S[V-1].y:v[V-1].y+f/2)+a;q+W>L?(this.getPageChanged(),V=0,v=[],S=[],m=P,c=w):(m=v[0].x,c=q+W/2)}else m=X-b/2,c=v[V-1].y}else{var J=S[V-1].y>v[V-1].y+f/2?S[V-1].y:v[V-1].y+f/2;if(J+a+W>L){var Q=S[V-1].x+this.textMaxWidth+10;Q+y+G.width>M?(m=P,c=w,S=[],v=[],this.getPageChanged(),V=0):(m=Q+b/2,c=v[0].y)}else{m=v[V-1].x,c=J+10+f/2}}}u=m+b/2+y,g=c+G.height/4,v.push({x:m,y:c}),S.push({x:u,y:g,width:G.width,height:G.height/2}),this.totalPages[this.page].Collection.push({DisplayText:H.text,ImageSrc:H.imageSrc,Shape:{x:m,y:c},Text:{x:u,y:g},Fill:H.fill,legendShape:H.shape,shapeBorder:H.shapeBorder,idIndex:n,Rect:{x:v[V].x-b/2,y:v[V].y-f/2<g-G.height?v[V].y-f/2:g-G.height,width:Math.abs(v[V].x-b/2-(u+G.width)),height:f>G.height?f:G.height}}),V++}var K=this.totalPages[0].Collection;Array.prototype.forEach.call(K,function(t,i){var o=new et(t.Rect.x,t.Rect.y,t.Rect.width,t.Rect.height);0===i&&(d=o.x,p=o.y),e.widthIncrement=Math.max(e.widthIncrement,Math.abs(d-(o.x+o.width))),e.heightIncrement=Math.max(e.heightIncrement,Math.abs(p-(o.y+o.height)))}),M=this.widthIncrement<M?this.widthIncrement:M,L=this.heightIncrement<L?this.heightIncrement:L,this.legendItemRect={x:K[0].Rect.x,y:K[0].Rect.y,width:M,height:L}}}},e.prototype.getLegends=function(e,t,i,o,a,n,l){this.getRangeLegendCollection(e,t,i,o,a,n,l),this.getEqualLegendCollection(e,t,i,o,a,n,l),this.getDataLegendCollection(e,t,i,o,a,n,l)},e.prototype.getPageChanged=function(){this.page++,t.isNullOrUndefined(this.totalPages[this.page])&&(this.totalPages[this.page]={Page:this.page+1,Collection:[]})},e.prototype.legendTextTrim=function(e,t,i,o){var a=t,n=x(t,i).width,l=o-n;if(o>e)for(var r=t.length-1;r>=0;--r){if(l+(n=x(a=t.substring(0,r)+"...",i).width)<=e||a.length<4)return a.length<4&&(a=" "),a}return a},e.prototype.drawLegend=function(){var e,i=this.maps,o=i.legendSettings,a=i.renderer,n={size:o.textStyle.size,color:o.textStyle.color,fontFamily:o.textStyle.fontFamily,fontWeight:o.textStyle.fontWeight,fontStyle:o.textStyle.fontStyle,opacity:o.textStyle.opacity};if(this.legendGroup=a.createGroup({id:i.element.id+"_Legend_Group"}),"Interactive"===o.mode)for(var l=0;l<this.legendRenderingCollections.length;l++){var r=i.element.id+"_Legend_Index_"+l,s=i.element.id+"_Legend_Index_"+l+"_Text",d=this.legendRenderingCollections[l],p=new et(d.x,d.y,d.width,d.height);0===l&&this.renderLegendBorder();var h=new Ze(d.textX,d.textY);n.color=null!==n.color?n.color:this.maps.themeStyle.legendTextColor;var m=new Xe(r,d.fill,d.shapeBorder,o.opacity,p);e=new He(s,h.x,h.y,"middle",d.text,"",""),n.fontFamily=t.isNullOrUndefined(n.fontFamily)?this.maps.themeStyle.fontFamily:n.fontFamily,n.size=i.themeStyle.legendFontSize||n.size,O(e,n,n.color,this.legendGroup),this.legendGroup.appendChild(a.drawRectangle(m)),this.legendToggle()}else this.drawLegendItem(this.currentPage)},e.prototype.drawLegendItem=function(e){var i,o=this.maps,a=o.legendSettings,n=new Re(a.shapeWidth,a.shapeHeight),l=o.renderer,r=a.shape;if(e>=0&&e<this.totalPages.length){de(this.legendGroup.id,this.maps.element.id)&&t.remove(de(this.legendGroup.id,this.maps.element.id));for(var s=0;s<this.totalPages[e].Collection.length;s++){var d=this.totalPages[e].Collection[s],p=d.shapeBorder,h=l.createGroup({id:o.element.id+"_Legend_Index_"+d.idIndex}),m=d.DisplayText,c=("Markers"===a.type?t.isNullOrUndefined(d.ImageSrc)&&a.shape:d.legendShape,"HorizontalLine"===a.shape||"VerticalLine"===a.shape||"Cross"===a.shape?t.isNullOrUndefined(a.fill)?"#000000":a.fill:p.color),u=("HorizontalLine"===a.shape||"VerticalLine"===a.shape||"Cross"===a.shape)&&0===p.width?1:p.width,g=o.element.id+"_Legend_Shape_Index_"+d.idIndex,y=o.element.id+"_Legend_Text_Index_"+d.idIndex,f=new Ze(d.Shape.x,d.Shape.y-4),b=new Ze(d.Text.x,d.Text.y-4),v=new Ge(g,d.Fill,u,c,a.opacity,t.isNullOrUndefined(p.opacity)?a.opacity:p.opacity,""),S={fontFamily:a.textStyle.fontFamily,fontStyle:a.textStyle.fontStyle,fontWeight:a.textStyle.fontWeight,size:a.textStyle.size,color:a.textStyle.color,opacity:a.textStyle.opacity};if(S.color=null!==S.color?S.color:this.maps.themeStyle.legendTextColor,S.fontFamily=t.isNullOrUndefined(S.fontFamily)?this.maps.themeStyle.fontFamily:S.fontFamily,S.size=o.themeStyle.legendFontSize||S.size,S.fontWeight=S.fontWeight||o.themeStyle.fontWeight,0===s&&this.renderLegendBorder(),"Markers"===a.type&&a.useMarkerShape){var _=this.legendCollection[d.idIndex].data[0],C=o.layers[_.layerIndex].markerSettings[_.markerIndex];r=t.isNullOrUndefined(C.dataSource[_.dataIndex][C.shapeValuePath])||""===C.dataSource[_.dataIndex][C.shapeValuePath]?C.shape:C.dataSource[_.dataIndex][C.shapeValuePath]}"Balloon"===r?h.appendChild(D(o,v,n,{x:f.x,y:f.y+5},"Legend")):h.appendChild(xe(f,r,n,d.ImageSrc,v));var M=d.Rect.x+d.Rect.width;if(M>this.legendBorderRect.width){m=this.legendTextTrim(this.legendBorderRect.width,m,S,M)}if(i=new He(y,b.x,b.y,"start",m,"",""),O(i,S,S.color,h),this.legendGroup.appendChild(h),s===this.totalPages[e].Collection.length-1){var L=void 0;if(0!==this.page){var P=e+1+"/"+this.totalPages.length,w=a.textStyle,T=x(P,w),I=this.legendItemRect.x+this.legendItemRect.width-T.width-20-20+2,k=this.legendItemRect.x+this.legendItemRect.width,N=k-10-T.width/2-5-4,F=this.legendItemRect.y+this.legendItemRect.height+2.5+10;L=l.createGroup({id:o.element.id+"_Legend_Paging_Group"});var E=l.createGroup({id:o.element.id+"_Legend_Left_Paging_Group"}),z=l.createGroup({id:o.element.id+"_Legend_Right_Paging_Group"}),A=" M "+k+" "+F+" L "+(k-10)+" "+(F-5)+" L "+(k-10)+" "+(F+5)+" z ",B=" M "+I+" "+F+" L "+(I+10)+" "+(F-5)+" L "+(I+10)+" "+(F+5)+" z ",U=new Ge(o.element.id+"_Left_Page",this.maps.themeStyle.legendTextColor,0,this.maps.themeStyle.legendTextColor,e+1===1?.5:1,1,"",B);E.appendChild(l.drawPath(U));var j=new Xe(o.element.id+"_Left_Page_Rect","transparent",{},1,new et(I-5,F-10,20,20),null,null,"",""),R=l.drawRectangle(j);R.tabIndex=e+1===1?-1:o.tabIndex+1,E.appendChild(R),this.wireEvents(E);var Z=new Ge(o.element.id+"_Right_Page",this.maps.themeStyle.legendTextColor,0,this.maps.themeStyle.legendTextColor,e+1===this.totalPages.length?.5:1,1,"",A);z.appendChild(l.drawPath(Z));var V=new Xe(o.element.id+"_Right_Page_Rect","transparent",{},1,new et(k-10-5,F-10,20,20),null,null,"","");(R=l.drawRectangle(V)).tabIndex=e+1===this.totalPages.length?-1:o.tabIndex+2,z.appendChild(R),this.wireEvents(z),L.appendChild(E),L.appendChild(z);var H={id:o.element.id+"_Paging_Text",x:N,y:F+T.height/4,fill:this.maps.themeStyle.legendTextColor,"font-size":"14px","font-style":w.fontStyle,"font-family":w.fontFamily,"font-weight":w.fontWeight,"text-anchor":"middle",transform:"",opacity:1,"dominant-baseline":""},G=l.createText(H,P);G.style.cssText="user-select: none;",L.appendChild(G),this.legendGroup.appendChild(L)}this.legendToggle()}}}},e.prototype.legendHighLightAndSelection=function(e,i){var o,a,n,l,r,s="Default"===this.maps.legendSettings.mode?document.getElementById(e.id.replace("Shape","Text")):document.getElementById(e.id+"_Text"),d=this.maps.legendModule.legendCollection,p=!t.isNullOrUndefined(d[0].data[0].layerIndex)&&this.maps.layers[d[0].data[0].layerIndex].selectionSettings.enableMultiSelect,h=0,m=!0,c=parseFloat(e.id.charAt(e.id.length-1));this.updateLegendElement();var u=this.maps.toggledLegendId.indexOf(c);if(this.maps.legendSettings.toggleLegendSettings.enable&&"highlight"===i&&-1!==u){var g=this.getIndexofLegend(this.legendHighlightCollection,e);return-1!==g&&this.legendHighlightCollection.splice(g,1),this.removeLegendHighlightCollection(),null}if("selection"===i){if(this.shapeHighlightCollection=[],this.maps.shapeSelections||p||(this.removeAllSelections(),this.maps.shapeSelections=!0),this.maps.legendSelectionCollection.length>0&&(p||this.maps.shapeSelections))for(var y=0;y<this.maps.legendSelectionCollection.length;y++){if(e===this.maps.legendSelectionCollection[y].legendElement){this.maps.legendSelectionCollection[y].legendElement=e,m=!1,this.removeLegendSelectionCollection(this.maps.legendSelectionCollection[y].legendElement),this.maps.selectedLegendElementId.splice(this.maps.selectedLegendElementId.indexOf(c),1),this.maps.legendSelectionCollection.splice(y,1),this.maps.legendSelection=!(this.maps.legendSelectionCollection.length>0);break}if(!p)if(this.maps.legendSelectionCollection.length>1){for(var f=0;f<this.maps.legendSelectionCollection.length;f++)this.removeLegendSelectionCollection(this.maps.legendSelectionCollection[f].legendElement);this.maps.legendSelectionCollection=[]}else this.removeLegendSelectionCollection(this.maps.legendSelectionCollection[y].legendElement),this.maps.legendSelectionCollection.splice(y,1)}}else{if(this.maps.legendSelectionCollection.length>0)for(y=0;y<this.maps.legendSelectionCollection.length;y++){if((e.id.indexOf("_Legend_Shape")>-1||e.id.indexOf("_Legend_Index"))&&e===this.maps.legendSelectionCollection[y].legendElement){m=!1;break}this.removeLegendHighlightCollection()}this.removeLegendHighlightCollection()}if(m)for(var b=0;b<d.length;b++){var v="Interactive"===this.maps.legendSettings.mode?parseFloat(e.id.split("_Legend_Index_")[1]):parseFloat(e.id.split("_Legend_Shape_Index_")[1]);if(s.textContent===d[b].text&&d[b].data.length>0&&v===b){var S=this.maps.layers[d[b].data[0].layerIndex],x=void 0,O=void 0,_=void 0;if(t.isNullOrUndefined(S)||(x="selection"===i?S.selectionSettings.enable:S.highlightSettings.enable,O=void 0,O="selection"===i?S.selectionSettings:S.highlightSettings,_=d[b].data),x)for(var C=0;C<_.length;C++){var M=void 0;if(o=_[C].shapeIndex,a=_[C].layerIndex,n=_[C].dataIndex,l=_[C].pointIndex,null!==(M=-1===l?document.getElementById(this.maps.element.id+"_LayerIndex_"+a+"_shapeIndex_"+o+"_dataIndex_"+n):document.getElementById(this.maps.element.id+"_LayerIndex_"+a+"_shapeIndex_"+o+"_dataIndex_"+n+"_multiLine_"+l))){var L=!0;if(null!==this.maps.legendSelectionCollection)for(var P=0;P<this.maps.legendSelectionCollection.length;P++)if(this.maps.legendSelectionCollection[P].legendElement===e){L=!1;break}if("highlight"===i&&L){0===C&&(this.legendHighlightCollection=[],this.pushCollection(e,this.legendHighlightCollection,d[b],S.shapeSettings)),r=this.legendHighlightCollection.length;var w=this.legendHighlightCollection[r-1].legendOldFill;this.legendHighlightCollection[r-1].MapShapeCollection.Elements.push(M);var T=this.legendHighlightCollection[r-1].MapShapeCollection.Elements.length-1,I=M.getAttribute("fill"),k=M.getAttribute("fill-opacity");this.legendHighlightCollection[r-1].shapeOldFillColor.push(I),this.legendHighlightCollection[r-1].shapeOldOpacity=k;var N=this.legendHighlightCollection[r-1].shapeOldFillColor[T],F=this.legendHighlightCollection[r-1].shapeOldOpacity;this.shapePreviousColor=this.legendHighlightCollection[r-1].shapeOldFillColor,this.setColor(M,t.isNullOrUndefined(O.fill)?N:O.fill,t.isNullOrUndefined(O.opacity)?F:O.opacity.toString(),O.border.color,O.border.width.toString(),"highlight"),this.setColor(e,t.isNullOrUndefined(O.fill)?w:O.fill,t.isNullOrUndefined(O.opacity)?F:O.opacity.toString(),O.border.color,O.border.width.toString(),"highlight")}else if("selection"===i){this.legendHighlightCollection=[],this.maps.legendSelectionClass=O,0===C&&(this.pushCollection(e,this.maps.legendSelectionCollection,d[b],S.shapeSettings),p?this.maps.selectedLegendElementId.push(b):0===this.maps.selectedLegendElementId.length?this.maps.selectedLegendElementId.push(b):(this.maps.selectedLegendElementId=[],this.maps.selectedLegendElementId.push(b))),h=this.maps.legendSelectionCollection.length;var E=this.maps.legendSelectionCollection[h-1].legendOldFill;this.maps.legendSelectionCollection[h-1].MapShapeCollection.Elements.push(M),this.maps.legendSelectionCollection[h-1].shapeOldFillColor=this.shapePreviousColor,this.setColor(e,t.isNullOrUndefined(O.fill)?E:O.fill,O.opacity.toString(),O.border.color,O.border.width.toString(),"selection"),this.setColor(M,t.isNullOrUndefined(O.fill)?E:O.fill,O.opacity.toString(),O.border.color,O.border.width.toString(),"selection"),-1===this.maps.selectedElementId.indexOf(M.getAttribute("id"))&&this.maps.selectedElementId.push(M.getAttribute("id")),C===_.length-1&&(this.maps.legendSelection=!1,this.removeLegend(this.maps.legendSelectionCollection))}}}}}},e.prototype.setColor=function(e,t,i,o,a,n){var l=e.parentElement.id.indexOf("LineString")>-1;"selection"===n?(B(l?"LineselectionMap":"ShapeselectionMap",l?"LineselectionMapStyle":"ShapeselectionMapStyle",l?"transparent":t,i,l?t:o,a,this.maps),e.setAttribute("class",l?"LineselectionMapStyle":"ShapeselectionMapStyle")):(e.setAttribute("fill",l?"transparent":t),e.setAttribute("fill-opacity",i),e.setAttribute("stroke",l?t:o),e.setAttribute("stroke-width",(Number(a)/this.maps.scale).toString()))},e.prototype.pushCollection=function(e,t,i,o){t.push({legendElement:e,legendOldFill:i.fill,legendOldOpacity:i.opacity,legendOldBorderColor:i.borderColor,legendOldBorderWidth:i.borderWidth,shapeOpacity:o.opacity,shapeOldBorderColor:o.border.color,shapeOldBorderWidth:o.border.width});var a=t.length;t[a-1].MapShapeCollection={Elements:[]},t[a-1].shapeOldFillColor=[],t[a-1].shapeOldOpacity=null},e.prototype.removeLegend=function(e){for(var i=0;i<e.length;i++){var o=e[i];this.setColor(o.legendElement,o.legendOldFill,o.legendOldOpacity,o.legendOldBorderColor,o.legendOldBorderWidth,"highlight");for(var a=o.MapShapeCollection.Elements.length,n=0;n<a;n++){var l=-1!==o.legendOldFill.indexOf("url")?o.shapeOldFillColor[n]:o.legendOldFill,r=t.isNullOrUndefined(o.shapeOldOpacity)?o.shapeOpacity:o.shapeOldOpacity;this.setColor(o.MapShapeCollection.Elements[n],l,r,o.shapeOldBorderColor,o.shapeOldBorderWidth,"highlight")}}},e.prototype.removeLegendHighlightCollection=function(){this.legendHighlightCollection.length>0&&(this.removeLegend(this.legendHighlightCollection),this.legendHighlightCollection=[])},e.prototype.removeLegendSelectionCollection=function(e){if(this.maps.legendSelectionCollection.length>0){ue(e);for(var t=this.shapesOfLegend(e),i=t.length,o=0;o<i;o++){var a=ne(t[o]);if("ShapeselectionMapStyle"===a.getAttribute("class")||"LineselectionMapStyle"===a.getAttribute("class")){ue(a);var n=this.maps.selectedElementId.indexOf(a.id);-1!==n&&this.maps.selectedElementId.splice(n,1)}}}},e.prototype.removeShapeHighlightCollection=function(){if(this.shapeHighlightCollection.length>0)for(var e=0;e<this.shapeHighlightCollection.length;e++){for(var t=this.shapeHighlightCollection[e],i=!0,o=0;o<this.maps.legendSelectionCollection.length;o++)this.maps.legendSelectionCollection[o].legendElement===t.legendElement&&(i=!1);i&&this.setColor(t.legendElement,t.legendOldFill,t.legendOldOpacity,t.legendOldBorderColor,t.legendOldBorderWidth,"highlight")}},e.prototype.shapeHighLightAndSelection=function(e,i,o,a,n){if(void 0!==i){this.updateLegendElement(),this.shapeToggled=!0;var l=this.maps.legendModule.legendCollection,r=this.legendIndexOnShape(i,n),s=this.shapeDataOnLegend(e),d=this.maps.toggledLegendId.indexOf(r.actualIndex);if(this.maps.legendSettings.toggleLegendSettings.enable&&-1!==d){this.shapeToggled=!1,this.legendHighlightCollection=[];var p=this.getIndexofLegend(this.shapeHighlightCollection,s.LegendEle);return-1!==p&&this.shapeHighlightCollection.splice(p,1),this.removeShapeHighlightCollection(),null}if(void 0===r.currentIndex&&void 0===r.actualIndex)return this.removeShapeHighlightCollection(),null;if(void 0!==r.currentIndex||"selection"!==a||this.maps.layers[n].selectionSettings.enableMultiSelect||"ShapeselectionMapStyle"===e.getAttribute("class")||(this.maps.legendSelection=!1),"selection"!==a||this.maps.layers[n].selectionSettings.enableMultiSelect||this.maps.legendSelection||(this.removeAllSelections(),this.maps.legendSelection=!0),void 0===r.currentIndex){if("selection"===a&&void 0!==r.actualIndex){for(var h=0,m=0;m<s.Elements.length;m++)"ShapeselectionMapStyle"===s.Elements[m].getAttribute("class")&&h++;var c=this.maps.selectedLegendElementId.indexOf(r.actualIndex);-1===c?(this.maps.selectedLegendElementId.push(r.actualIndex),this.maps.legendSelectionClass=o):h<=1&&("ShapeselectionMapStyle"===e.getAttribute("class")||"LineselectionMapStyle"===e.getAttribute("class"))&&(this.maps.layers[n].selectionSettings.enableMultiSelect?h<=1&&("ShapeselectionMapStyle"===e.getAttribute("class")||"LineselectionMapStyle"===e.getAttribute("class"))&&this.maps.selectedLegendElementId.splice(c,1):this.maps.selectedLegendElementId.splice(c,1))}return this.removeShapeHighlightCollection(),null}var u=l[r.actualIndex].text,g=void 0,y=void 0;"Default"===this.maps.legendSettings.mode?void 0!==r.currentIndex&&(g=document.getElementById(this.maps.element.id+"_Legend_Text_Index_"+r.actualIndex).textContent,y=document.getElementById(this.maps.element.id+"_Legend_Shape_Index_"+r.actualIndex)):(g=document.getElementById(this.maps.element.id+"_Legend_Index_"+r.actualIndex+"_Text").textContent,y=document.getElementById(this.maps.element.id+"_Legend_Index_"+r.actualIndex)),this.oldShapeElement=s.LegendEle;var f=this.maps.legendSelectionCollection.length;if(u===g){var b=!0;if(this.maps.legendSelectionCollection)for(m=0;m<this.maps.legendSelectionCollection.length;m++)if(this.maps.legendSelectionCollection[m].legendElement===s.LegendEle){b=!1;break}if("highlight"===a&&b){(void 0===(S=this.isTargetSelected(s,this.shapeHighlightCollection))||S&&!S.IsSelected)&&this.pushCollection(y,this.shapeHighlightCollection,l[r.actualIndex],this.maps.layers[n].shapeSettings);for(var v=0;v<this.shapeHighlightCollection.length;v++)s.LegendEle.id===this.shapeHighlightCollection[v].legendElement.id&&(this.shapeHighlightCollection[v].legendElement=s.LegendEle);if(f>0)for(v=0;v<f;v++){if(s.LegendEle===this.maps.legendSelectionCollection[v].legendElement){this.maps.legendSelectionCollection[v].legendElement=s.LegendEle,this.removeShapeHighlightCollection();break}v===f-1&&(this.removeShapeHighlightCollection(),this.setColor(y,t.isNullOrUndefined(o.fill)?y.getAttribute("fill"):o.fill,o.opacity.toString(),o.border.color,o.border.width.toString(),"highlight"))}else this.removeShapeHighlightCollection(),this.setColor(y,t.isNullOrUndefined(o.fill)?y.getAttribute("fill"):o.fill,o.opacity.toString(),o.border.color,o.border.width.toString(),"highlight")}else if("selection"===a){var S=this.isTargetSelected(s,this.maps.legendSelectionCollection);if(f>0)for(v=0;v<this.maps.legendSelectionCollection.length;)if(s.LegendEle===this.maps.legendSelectionCollection[v].legendElement||o.enableMultiSelect)v++;else{var x=this.maps.legendSelectionCollection[v],O=this.maps.selectedLegendElementId.indexOf(r.actualIndex);this.maps.selectedLegendElementId.splice(O,1),this.maps.legendSelectionCollection.splice(v,1),ue(x.legendElement),this.maps.shapeSelections=!0,v=0}if(S&&S.IsSelected&&("ShapeselectionMapStyle"===e.getAttribute("class")||"LineselectionMapStyle"===e.getAttribute("class"))){var _=0;if(o.enableMultiSelect)for(m=0;m<s.Elements.length;m++)e.getAttribute("class")===s.Elements[m].getAttribute("class")&&_++;_<=1&&(o.enableMultiSelect||this.maps.legendSelection)&&(this.maps.selectedLegendElementId.splice(this.maps.selectedLegendElementId.indexOf(r.actualIndex),1),t.isNullOrUndefined(s.LegendEle)||ue(s.LegendEle),this.maps.legendSelectionCollection.splice(S.SelectionIndex,1),this.maps.shapeSelections=!0)}else{if((void 0===S||S&&!S.IsSelected)&&!t.isNullOrUndefined(y)){-1===(M=this.getIndexofLegend(this.maps.legendSelectionCollection,y))&&this.pushCollection(y,this.maps.legendSelectionCollection,l[r.actualIndex],this.maps.layers[n].shapeSettings)}var C=!0;for(m=0;m<this.maps.selectedLegendElementId.length;m++)r.actualIndex===this.maps.selectedLegendElementId[m]&&(C=!1);if(C&&this.maps.selectedLegendElementId.push(r.actualIndex),this.maps.legendSelectionClass=o,this.removeLegend(this.shapeHighlightCollection),!t.isNullOrUndefined(y)){this.setColor(y,t.isNullOrUndefined(o.fill)?y.getAttribute("fill"):o.fill,o.opacity.toString(),o.border.color,o.border.width.toString(),"selection");var M=this.getIndexofLegend(this.maps.legendSelectionCollection,y);this.maps.legendSelectionCollection[M].MapShapeCollection.Elements.push(e)}this.maps.shapeSelections=!1}}else document.getElementsByClassName("highlightMapStyle").length>0&&(this.removeShapeHighlightCollection(),ue(document.getElementsByClassName("highlightMapStyle")[0]))}}else this.removeShapeHighlightCollection()},e.prototype.isTargetSelected=function(e,i){for(var o,a=0;a<i.length;a++)t.isNullOrUndefined(e.LegendEle.getAttribute("id"))||e.LegendEle.getAttribute("id")!==i[a].legendElement.getAttribute("id")||(o={IsSelected:!0,SelectionIndex:a});return o},e.prototype.updateLegendElement=function(){for(var e=0;e<this.maps.legendSelectionCollection.length;e++)document.getElementById(this.maps.legendSelectionCollection[e].legendElement.id)&&(this.maps.legendSelectionCollection[e].legendElement=document.getElementById(this.maps.legendSelectionCollection[e].legendElement.id))},e.prototype.getIndexofLegend=function(e,t){return e.map(function(e){return e.legendElement}).indexOf(t)},e.prototype.removeAllSelections=function(){for(var e=0;e<this.maps.selectedElementId.length;e++){ue(o=document.getElementById(this.maps.selectedElementId[e]))}for(var i=0;i<this.maps.selectedLegendElementId.length;i++){var o=("Interactive"===this.maps.legendSettings.mode?this.maps.element.id+"_Legend_Index_":this.maps.element.id+"_Legend_Shape_Index_")+this.maps.selectedLegendElementId[i],a=document.getElementById(o);t.isNullOrUndefined(a)||ue(document.getElementById(o))}this.maps.legendSelectionCollection=[],this.maps.selectedLegendElementId=[],this.maps.selectedElementId=[]},e.prototype.legendIndexOnShape=function(e,i){var o,a,n,l=e[this.maps.layers[i].shapeDataPath],r=this.maps.legendSettings.mode,s=this.maps.legendModule.legendCollection;"Default"!==r||t.isNullOrUndefined(this.maps.legendModule.totalPages)||(n=this.maps.legendModule.totalPages[this.maps.legendModule.currentPage].Collection);for(var d="Default"===r?n.length:1,p=0;p<s.length;p++){for(var h=s[p].data,m=0;m<d;m++)if("Default"!==r||s[p].text===n[m].DisplayText)for(var c=0;c<h.length;c++)l===h[c].name&&(o=m);for(c=0;c<h.length;c++)l===h[c].name&&(a=p)}return{currentIndex:o,actualIndex:a}},e.prototype.shapeDataOnLegend=function(e){for(var i,o,a,n,l=this.maps.legendModule.legendCollection,r=this.maps.legendSettings,s=0;s<l.length;s++){for(var d=l[s].data,p=!1,h=[],m={Elements:[]},c=0;c<d.length;c++){var u=void 0;i=d[c].shapeIndex,o=d[c].layerIndex,a=d[c].dataIndex,e===(u=-1===(n=d[c].pointIndex)?document.getElementById(this.maps.element.id+"_LayerIndex_"+o+"_shapeIndex_"+i+"_dataIndex_"+a):document.getElementById(this.maps.element.id+"_LayerIndex_"+o+"_shapeIndex_"+i+"_dataIndex_"+a+"_multiLine_"+n))&&(p=!0),h.push(u)}if(p)return t.isNullOrUndefined(m.LegendEle)&&(m.LegendEle="Default"===r.mode?document.getElementById(this.maps.element.id+"_Legend_Shape_Index_"+s):document.getElementById(this.maps.element.id+"_Legend_Index_"+s)),m.Elements=h,m}return null},e.prototype.shapesOfLegend=function(e){for(var i,o,a,n,l=parseFloat(e.id.charAt(e.id.length-1)),r=this.maps.legendModule.legendCollection[l].data,s=[],d=0;d<r.length;d++){var p=void 0;i=r[d].shapeIndex,o=r[d].layerIndex,a=r[d].dataIndex,p=-1===(n=r[d].pointIndex)?document.getElementById(this.maps.element.id+"_LayerIndex_"+o+"_shapeIndex_"+i+"_dataIndex_"+a):document.getElementById(this.maps.element.id+"_LayerIndex_"+o+"_shapeIndex_"+i+"_dataIndex_"+a+"_multiLine_"+n),t.isNullOrUndefined(p)||s.push(p.id)}return s},e.prototype.legendToggle=function(){var e=this.maps,i=e.legendSettings;if(this.maps.selectedLegendElementId)for(var o=0;o<this.maps.selectedLegendElementId.length;o++){var a="Interactive"===i.mode?this.maps.element.id+"_Legend_Index_":this.maps.element.id+"_Legend_Shape_Index_",n=e.svgObject.querySelector("#"+a+this.maps.selectedLegendElementId[o]);if(!t.isNullOrUndefined(n)){var l=t.isNullOrUndefined(this.maps.legendSelectionClass.fill)?n.getAttribute("fill"):this.maps.legendSelectionClass.fill;this.setColor(n,l,this.maps.legendSelectionClass.opacity.toString(),this.maps.legendSelectionClass.border.color,this.maps.legendSelectionClass.border.width.toString(),"selection");for(var r=0;r<this.maps.legendSelectionCollection.length;r++)this.maps.legendSelectionCollection[r].legendElement.id===n.id&&(this.maps.legendSelectionCollection[r].legendElement=n);if(-1===this.getIndexofLegend(this.maps.legendSelectionCollection,n)){var s=this.maps.legendModule.legendCollection[this.maps.selectedLegendElementId[o]].data[o].layerIndex;this.pushCollection(n,this.maps.legendSelectionCollection,this.maps.legendModule.legendCollection[this.maps.selectedLegendElementId[o]],this.maps.layers[s].shapeSettings)}}}if(this.maps.toggledLegendId)for(o=0;o<this.maps.toggledLegendId.length;o++){var d="Interactive"===i.mode?"#"+this.maps.element.id+"_Legend_Index_"+this.maps.toggledLegendId[o]+"_Text":"#"+this.maps.element.id+"_Legend_Text_Index_"+this.maps.toggledLegendId[o],p=e.svgObject.querySelector(d);t.isNullOrUndefined(p)||p.setAttribute("fill","#E5E5E5");var h="Interactive"===i.mode?"#"+this.maps.element.id+"_Legend_Index_"+this.maps.toggledLegendId[o]:"#"+this.maps.element.id+"_Legend_Shape_Index_"+this.maps.toggledLegendId[o],m=e.svgObject.querySelector(h);t.isNullOrUndefined(m)||m.setAttribute("fill","#E5E5E5")}},e.prototype.renderLegendBorder=function(){var e=this.maps,i=e.legendSettings,o=i.title.text,a={fontFamily:i.titleStyle.fontFamily,fontStyle:i.titleStyle.fontStyle,fontWeight:i.titleStyle.fontWeight,size:i.titleStyle.size,color:i.titleStyle.color,opacity:i.titleStyle.opacity},n=Y(this.legendItemRect.width+20,o,a),l=x(n,a);this.legendBorderRect=new et(this.legendItemRect.x-10,this.legendItemRect.y-10-l.height,this.legendItemRect.width+20,this.legendItemRect.height+20+l.height+("Interactive"===i.mode?0:0!==this.page?10:0));var r={color:i.border.color,width:i.border.width,opacity:i.border.opacity};r.opacity=t.isNullOrUndefined(r.opacity)?1:r.opacity;var s=new Xe(e.element.id+"_Legend_Border",i.background,r,1,this.legendBorderRect,null,null,"","");this.legendGroup.appendChild(e.renderer.drawRectangle(s)),this.getLegendAlignment(e,this.legendBorderRect.width,this.legendBorderRect.height,i),this.legendGroup.setAttribute("transform","translate( "+(this.translate.x+-this.legendBorderRect.x)+" "+(this.translate.y+-this.legendBorderRect.y)+" )"),"Float"!==i.position&&e.svgObject.appendChild(this.legendGroup),o&&(a.color=null!==a.color?a.color:this.maps.themeStyle.legendTitleFontColor,a.fontFamily=t.isNullOrUndefined(a.fontFamily)?this.maps.themeStyle.fontFamily:a.fontFamily,a.size=t.isNullOrUndefined(a.size)?this.maps.themeStyle.subTitleFontSize||Ue.legendTitleFont.size:a.size,a.fontWeight=t.isNullOrUndefined(a.fontWeight)?this.maps.themeStyle.titleFontWeight||Ue.legendTitleFont.fontWeight:a.fontWeight,O(new He(e.element.id+"_LegendTitle",this.legendItemRect.x+this.legendItemRect.width/2,this.legendItemRect.y-l.height/2-5,"middle",n,""),a,a.color,this.legendGroup))},e.prototype.changeNextPage=function(e){this.currentPage=e.target.id.indexOf("_Left_Page_")>-1?this.currentPage-1:this.currentPage+1,this.legendGroup=this.maps.renderer.createGroup({id:this.maps.element.id+"_Legend_Group"}),this.maps.mapAreaRect=this.initialMapAreaRect,this.drawLegendItem(this.currentPage),t.isNullOrUndefined(this.maps.legendModule)||"Float"!==this.maps.legendSettings.position||(this.maps.isTileMap?this.maps.mapLayerPanel.layerGroup.appendChild(this.maps.legendModule.legendGroup):this.maps.svgObject.appendChild(this.maps.legendModule.legendGroup)),de(this.maps.element.id+"_Legend_Border",this.maps.element.id)&&(de(this.maps.element.id+"_Legend_Border",this.maps.element.id).style.pointerEvents="none")},e.prototype.getLegendAlignment=function(e,i,o,a){var n,l,r,s=(r=t.extend({},e.mapAreaRect,r,!0)).x,d=r.y,p=r.height,h=r.width,m=e.availableSize.width,c=e.availableSize.height,u=t.isNullOrUndefined(a.location.x)?0:a.location.x,g=t.isNullOrUndefined(a.location.y)?0:a.location.y;if("Float"===a.position)this.translate=e.isTileMap?new Ze(u,g+2.5):new Ze(u+e.mapAreaRect.x,g+e.mapAreaRect.y),this.legendTotalRect=e.mapAreaRect;else{switch(a.position){case"Top":case"Bottom":r.height="Top"===a.position?p-o:p-o-20,n=m/2-i/2,l="Top"===a.position?d:d+r.height,r.y="Top"===a.position?d+o+(e.isTileMap?5:10):d-5;break;case"Left":case"Right":r.width=h-i-e.mapAreaRect.x,n="Left"===a.position?s+5:s+r.width+10,l=c/2-o/2,r.x="Left"===a.position?s+i+10:s}switch(a.alignment){case"Near":"Top"===a.position||"Bottom"===a.position?n=r.x-("Interactive"===a.mode?10:0):l=r.y-(a.height&&a.width||"Interactive"!==a.mode?0:e.mapAreaRect.x);break;case"Far":"Top"===a.position||"Bottom"===a.position?n=m-i-("Interactive"===a.mode?0:10):l=c-o-("Default"===a.mode?10:0)}(a.height||a.width)&&"Interactive"!==a.mode?this.legendTotalRect=e.mapAreaRect=e.totalRect=r:(e.totalRect=null,(a.height||a.width)&&"Interactive"===a.mode&&(e.totalRect=r),this.legendTotalRect=e.mapAreaRect=r),"Left"===a.position&&(e.mapAreaRect.width=r.width),this.translate=new Ze(n,l)}},e.prototype.getMarkersLegendCollections=function(e,i){var o=this;Array.prototype.forEach.call(i,function(i,a){var n=i.dataSource,l=i.legendText;Array.prototype.forEach.call(n,function(n,r){var s=!!t.isNullOrUndefined(n[o.maps.legendSettings.showLegendPath])||n[o.maps.legendSettings.showLegendPath];if(i.visible&&s&&!t.isNullOrUndefined(n.latitude)&&!t.isNullOrUndefined(n.longitude)){if(i.template){var d=ae(i.template,o.maps)(o.maps);(t.isNullOrUndefined(d.childElementCount)?d[0]:d).querySelector("img").src}var p=t.isNullOrUndefined(n[l])?"":n[l],h=t.isNullOrUndefined(i.colorValuePath)?i.fill:n[i.colorValuePath],m=[];o.maps.legendSettings.removeDuplicateLegend?(m.push(o.getMarkerLegendData(e,p,h)),o.getOverallLegendItemsCollection(p,h,m,s)):(m.push({layerIndex:e,markerIndex:a,dataIndex:r,value:h,name:p,shape:t.isNullOrUndefined(i.shapeValuePath)||t.isNullOrUndefined(n[i.shapeValuePath])||""===n[i.shapeValuePath]?o.maps.legendSettings.useMarkerShape?i.shape:o.maps.legendSettings.shape:n[i.shapeValuePath]}),o.getOverallLegendItemsCollection(p,h,m,s))}})})},e.prototype.getMarkerLegendData=function(e,i,o){var a=this,n=[];return this.maps.layers[e].markerSettings.map(function(l,r){var s=l.dataSource;Array.prototype.forEach.call(s,function(l,s){var d=a.maps.layers[e].markerSettings[r];i!==l[d.legendText]&&""!==i||o!==l[d.colorValuePath]||n.push({layerIndex:e,markerIndex:r,dataIndex:s,value:o,name:i,shape:t.isNullOrUndefined(d.shapeValuePath)?d.shape:l[d.shapeValuePath]})})}),n},e.prototype.getRangeLegendCollection=function(e,i,o,a,n,l,r){for(var s,d=this,p=0,h=this.maps.legendSettings.fill,m=[],c=function(o){if(!t.isNullOrUndefined(o.from)&&!t.isNullOrUndefined(o.to)){s=t.isNullOrUndefined(o.label)?o.from+" - "+o.to:o.label,m=[];var c=!1;Array.prototype.forEach.call(a,function(t,a){var s=l.indexOf(".")>-1?Number(w(t,l)):parseFloat(t[l]);s>=o.from&&s<=o.to&&(c=!0,m.push(d.getLegendData(e,a,t,n,i,r,s)))}),c||m.push({layerIndex:e,shapeIndex:null,dataIndex:null,name:null,value:null});var g=t.isNullOrUndefined(h)?"[object Array]"===Object.prototype.toString.call(o.color)?t.isNullOrUndefined(o.value)?u.legendGradientColor(o,p):o.color[0]:o.color:h;p++,u.getOverallLegendItemsCollection(s,g,m,o.showLegend)}},u=this,g=0,y=o;g<y.length;g++){c(y[g])}},e.prototype.getOverallLegendItemsCollection=function(e,t,i,o){var a=[],n=this.maps.legendSettings;if(i.length>0&&o){for(var l=0;l<i.length;l++){var r=i[l];if(r.length>0)for(var s=0;s<r.length;s++)a.push(r[s]);else a.push(i[l]);a._isVisible=!0}if(!!this.maps.legendSettings.removeDuplicateLegend&&this.removeDuplicates(this.legendCollection,e,t))for(l=0;l<this.legendCollection.length;l++)this.legendCollection[l].text===e&&this.legendCollection[l].fill===t&&this.legendCollection[l].data.push(a[0]);else this.legendCollection.push({text:e,fill:t,data:a,opacity:n.opacity,borderColor:n.shapeBorder.color,borderWidth:n.shapeBorder.width})}},e.prototype.removeDuplicates=function(e,t,i){for(var o=!1,a=0;a<e.length;a++)if((e[a].text===t||""===e[a].text)&&e[a].fill===i){o=!0;break}return o},e.prototype.getEqualLegendCollection=function(e,i,o,a,n,l,r){for(var s,d=this,p=this.maps.legendSettings.fill,h=[],m=[],c=[],u=[],g=function(g){if(t.isNullOrUndefined(g.value)){if(t.isNullOrUndefined(g.minOpacity)&&t.isNullOrUndefined(g.maxOpacity)&&t.isNullOrUndefined(g.value)&&t.isNullOrUndefined(g.from)&&t.isNullOrUndefined(g.to)&&!t.isNullOrUndefined(g.color)){if(Array.prototype.forEach.call(a,function(t,o){for(var a=l.indexOf(".")>-1?w(t,l):t[l],s=0;s<c.length;s++)a===c[s]&&u.push(d.getLegendData(e,o,t,n,i,r,a))}),0===c.length){var f=!1;Array.prototype.forEach.call(a,function(a,s){f=!1;for(var p=a[l],h=0;h<o.length;h++)t.isNullOrUndefined(p)||isNaN(p)?f||(f=!1):p>=o[h].from&&p<=o[h].to&&(f=!0);f||u.push(d.getLegendData(e,s,a,n,i,r,p))})}s=t.isNullOrUndefined(g.label)?"Others":g.label;var b="[object Array]"===Object.prototype.toString.call(g.color)?g.color[0]:g.color;y.getOverallLegendItemsCollection(s,b,u,g.showLegend)}}else{s=t.isNullOrUndefined(g.label)?g.value:g.label,m=[];var v=!1;Array.prototype.forEach.call(a,function(t,o){var a=l.indexOf(".")>-1?w(t,l):t[l];a===g.value?(v=!0,-1===h.indexOf(a)&&h.push(a),m.push(d.getLegendData(e,o,t,n,i,r,a))):-1===c.indexOf(a)&&c.push(a)});for(var S=0;S<h.length;S++)for(var x=0;x<c.length;x++)if(h[S]===c[x]){var O=c.indexOf(h[S]);c.splice(O,1)}v||m.push({layerIndex:e,shapeIndex:null,dataIndex:null,name:null,value:null});var _=t.isNullOrUndefined(p)?"[object Array]"===Object.prototype.toString.call(g.color)?g.color[0]:g.color:p;y.getOverallLegendItemsCollection(s,_,m,g.showLegend)}},y=this,f=0,b=o;f<b.length;f++){g(b[f])}},e.prototype.getDataLegendCollection=function(e,i,o,a,n,l,r){var s,d=this,p=this.maps.legendSettings.fill,h=this.maps.legendSettings.valuePath;t.isNullOrUndefined(l)||t.isNullOrUndefined(a)||Array.prototype.forEach.call(a,function(a,m){var c=!!t.isNullOrUndefined(d.maps.legendSettings.showLegendPath)||!t.isNullOrUndefined(a[d.maps.legendSettings.showLegendPath])&&a[d.maps.legendSettings.showLegendPath],u=l.indexOf(".")>-1?w(a,l):a[l],g=[],y=t.isNullOrUndefined(p)?u:p;t.isNullOrUndefined(u)||0!==o.length||(s=t.isNullOrUndefined(a[h])?n.indexOf(".")>-1?w(a,n):a[n]:h.indexOf(".")>-1?w(a,h):a[h],g.push(d.getLegendData(e,m,a,n,i,r,u))),d.getOverallLegendItemsCollection(s,y,g,c)})},e.prototype.interactiveHandler=function(e){var i=e.target,o=this.maps.legendSettings,a=this.maps.element.id+"_Interactive_Legend",n="Layers"===o.type?"_shapeIndex_":"Markers"===o.type?"_MarkerIndex_":"_BubbleIndex_";if(i.id.indexOf(n)>1){var l=parseFloat(i.id.split("_LayerIndex_")[1].split("_")[0]),r=parseFloat(i.id.split(/_dataIndex_/i)[1].split("_")[0]),s=void 0,d=void 0,p=void 0;t.isNullOrUndefined(de(a,this.maps.element.id))||t.remove(de(a,this.maps.element.id));var h=this.maps.layersCollection[l],m="Layers"===o.type?h.visible:"Markers"===o.type?h.markerSettings[parseFloat(i.id.split("_MarkerIndex_")[1].split("_")[0])].visible:this.maps.getBubbleVisible(this.maps.layersCollection[l]);if(o.visible&&this.legendRenderingCollections.length>0&&"Interactive"===o.mode&&m)for(var c=this.maps.svgObject.getBoundingClientRect(),u=0;u<this.legendCollection.length;u++){var g=this.legendCollection[u],y=de(this.maps.element.id+"_Legend_Index_"+u,this.maps.element.id),f=y.getBoundingClientRect(),b=new et(Math.abs(f.left-c.left),Math.abs(f.top-c.top),f.width,f.height);if(s=y.getAttribute("fill"),d=o.shapeBorder.color,p=o.shapeBorder.width,!t.isNullOrUndefined(g.data))for(var v=g.data,S=0;S<v.length;S++)if(r===v[S].dataIndex&&l===v[S].layerIndex){this.renderInteractivePointer(o,s,d,a,p,b);break}}}else t.isNullOrUndefined(de(a,this.maps.element.id))||t.remove(de(a,this.maps.element.id))},e.prototype.renderInteractivePointer=function(e,t,i,o,a,n){var l,r,s,d="None"===e.orientation?"Top"===e.position||"Bottom"===e.position?"Horizontal":"Vertical":e.orientation;n.y="Float"===e.position&&this.maps.isTileMap?n.y-this.maps.mapAreaRect.y:n.y,l="Horizontal"===d?e.invertedPointer?" M "+(r=n.x+n.width/2-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(s=n.y+n.height)+" L "+(r-10)+" "+(s+10)+" L "+(r+10)+" "+(s+10)+" Z ":" M "+(r=n.x+n.width/2-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(s=n.y)+" L "+(r-10)+" "+(s-10)+" L "+(r+10)+" "+(s-10)+" Z ":e.invertedPointer?" M "+(r=n.x-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(s=n.y+n.height/2)+" L "+(r-10)+" "+(s-10)+" L "+(r-10)+" "+(s+10)+" z ":" M "+(r=n.x+n.width-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(s=n.y+n.height/2)+" L "+(r+10)+" "+(s-10)+" L "+(r+10)+" "+(s+10)+" z ";var p=new Ge(o,t,a,i,1,1,"",l);"Float"===e.position&&this.maps.isTileMap?this.maps.mapLayerPanel.layerGroup.appendChild(this.maps.renderer.drawPath(p)):this.maps.svgObject.appendChild(this.maps.renderer.drawPath(p))},e.prototype.wireEvents=function(e){t.EventHandler.add(e,t.Browser.touchStartEvent,this.changeNextPage,this)},e.prototype.addEventListener=function(){this.maps.isDestroyed||(this.maps.on(t.Browser.touchMoveEvent,this.interactiveHandler,this),this.maps.on(t.Browser.touchEndEvent,this.interactiveHandler,this),this.maps.on(Vt,this.legendClick,this))},e.prototype.markerToggleSelection=function(e,i,o,a){e.setAttribute("fill",this.legendCollection[a].fill),e.setAttribute("stroke",this.maps.layers[i].markerSettings[o].border.color),e.setAttribute("fill-opacity",this.maps.layers[i].markerSettings[o].opacity.toString()),e.setAttribute("stroke-width",this.maps.layers[i].markerSettings[o].border.width.toString()),e.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[i].markerSettings[o].border.opacity)?this.maps.layers[i].markerSettings[o].opacity:this.maps.layers[i].markerSettings[o].border.opacity).toString())},e.prototype.bubbleToggleSelection=function(e,i,o,a){e.setAttribute("fill",this.legendCollection[a].fill),e.setAttribute("stroke",this.maps.layers[i].bubbleSettings[o].border.color),e.setAttribute("fill-opacity",this.maps.layers[i].bubbleSettings[o].opacity.toString()),e.setAttribute("stroke-width",this.maps.layers[i].bubbleSettings[o].border.width.toString()),e.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[i].bubbleSettings[o].border.opacity)?this.maps.layers[i].bubbleSettings[o].opacity:this.maps.layers[i].bubbleSettings[o].border.opacity).toString())},e.prototype.legendClick=function(e){var i,o,a=this.maps.legendSettings.toggleLegendSettings.fill,n=this.maps.legendSettings.toggleLegendSettings.opacity,l=this.maps.legendSettings.toggleLegendSettings.border.color,r=this.maps.legendSettings.toggleLegendSettings.border.width,s=t.isNullOrUndefined(this.maps.legendSettings.toggleLegendSettings.border.opacity)?this.maps.legendSettings.toggleLegendSettings.opacity:this.maps.legendSettings.toggleLegendSettings.border.opacity;if(e.parentNode.id.indexOf(this.maps.element.id+"_Legend_Index_")>-1){var d=void 0,p=parseFloat(e.parentElement.id.substr((this.maps.element.id+"_Legend_Index_").length)),h=(v=this.legendCollection[p].data)._isVisible,m=void 0;if(this.maps.legendSettings.toggleLegendSettings.enable&&("Bubbles"===this.maps.legendSettings.type||"Markers"===this.maps.legendSettings.type))for(var c=0;c<this.maps.layers.length;c++)for(var u=0;u<("Bubbles"===this.maps.legendSettings.type?this.maps.layers[c].bubbleSettings.length:this.maps.layers[c].markerSettings.length);u++){for(var g=0;g<v.length;g++)m=this.legendCollection[p].data[g],d="Bubbles"===this.maps.legendSettings.type?de(this.maps.element.id+"_LayerIndex_"+m.layerIndex+"_BubbleIndex_"+u+"_dataIndex_"+m.dataIndex,this.maps.element.id):de(this.maps.element.id+"_LayerIndex_"+m.layerIndex+"_MarkerIndex_"+m.markerIndex+"_dataIndex_"+m.dataIndex,this.maps.element.id),t.isNullOrUndefined(m.shape)||"Balloon"!==m.shape||(d=(d="Bubbles"===this.maps.legendSettings.type?de(this.maps.element.id+"_LayerIndex_"+m.layerIndex+"_BubbleIndex_"+u+"_dataIndex_"+m.dataIndex+"_Group",this.maps.element.id):de(this.maps.element.id+"_LayerIndex_"+m.layerIndex+"_MarkerIndex_"+m.markerIndex+"_dataIndex_"+m.dataIndex+"_Group",this.maps.element.id)).children[0]),h&&null!==d?(this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(d.setAttribute("fill",this.maps.layers[c].shapeSettings.fill),d.setAttribute("stroke",this.maps.layers[c].shapeSettings.border.color),d.setAttribute("fill-opacity",this.maps.layers[c].shapeSettings.opacity.toString()),d.setAttribute("stroke-width",(t.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width).toString()),d.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.opacity)?this.maps.layers[c].shapeSettings.opacity:this.maps.layers[c].shapeSettings.border.opacity).toString())):(d.setAttribute("fill",a),d.setAttribute("fill-opacity",n.toString()),d.setAttribute("stroke",l),d.setAttribute("stroke-width",r.toString()),d.setAttribute("stroke-opacity",s.toString())),null!==e&&(i=de(this.maps.element.id+"_Legend_Shape_Index_"+p,this.maps.element.id),o=de(this.maps.element.id+"_Legend_Text_Index_"+p,this.maps.element.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?this.setToggleAttributes(o,i,this.maps.layers[c].shapeSettings.fill,this.maps.layers[c].shapeSettings.opacity,this.maps.layers[c].shapeSettings.border.color,t.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width,t.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.opacity)?this.maps.layers[c].shapeSettings.opacity:this.maps.layers[c].shapeSettings.border.opacity,this.maps.layers[c].shapeSettings.fill):this.setToggleAttributes(o,i,a,n,l,r,s,a))):("Markers"===this.maps.legendSettings.type?this.markerToggleSelection(d,c,u,p):this.bubbleToggleSelection(d,c,u,p),null!==e&&(i=de(this.maps.element.id+"_Legend_Shape_Index_"+p,this.maps.element.id),o=de(this.maps.element.id+"_Legend_Text_Index_"+p,this.maps.element.id),this.setToggleAttributes(o,i,this.legendCollection[p].fill,this.legendCollection[p].opacity,this.legendCollection[p].shapeBorder.color,this.legendCollection[p].shapeBorder.width,this.legendCollection[p].shapeBorder.opacity,"#757575"),"HorizontalLine"!==this.maps.legendSettings.shape&&"VerticalLine"!==this.maps.legendSettings.shape&&"Cross"!==this.maps.legendSettings.shape||i.setAttribute("stroke",this.legendCollection[p].fill)));v._isVisible=!h}if("Layers"===this.maps.legendSettings.type&&this.maps.legendSettings.toggleLegendSettings.enable){var y=void 0;this.removeCollections(e,p);var f=this.maps.toggledLegendId.indexOf(p);-1!==f&&(h=!1);for(u=0;u<this.maps.layers.length;u++)for(g=0;g<v.length;g++)if(m=this.legendCollection[p].data[g],null!==(y=de(this.maps.element.id+"_LayerIndex_"+m.layerIndex+"_shapeIndex_"+m.shapeIndex+"_dataIndex_"+m.dataIndex,this.maps.element.id))){var b=this.maps.toggledShapeElementId.indexOf(y.id);h?(0===g&&this.maps.toggledLegendId.push(p),-1===b&&this.maps.toggledShapeElementId.push(y.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(y.setAttribute("fill",this.maps.layers[u].shapeSettings.fill),y.setAttribute("fill-opacity",this.maps.layers[u].shapeSettings.opacity.toString()),y.setAttribute("stroke",this.maps.layers[u].shapeSettings.border.color),y.setAttribute("stroke-width",(t.isNullOrUndefined(this.maps.layers[u].shapeSettings.border.width)?0:this.maps.layers[u].shapeSettings.border.width).toString()),y.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[u].shapeSettings.border.opacity)?this.maps.layers[u].shapeSettings.opacity:this.maps.layers[u].shapeSettings.border.opacity).toString())):(y.setAttribute("fill",a),y.setAttribute("fill-opacity",n.toString()),y.setAttribute("stroke",l),y.setAttribute("stroke-width",r.toString()),y.setAttribute("stroke-opacity",s.toString())),null!==e&&(o=de(this.maps.element.id+"_Legend_Text_Index_"+p,this.maps.element.id),i=de(this.maps.element.id+"_Legend_Shape_Index_"+p,this.maps.element.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?this.setToggleAttributes(o,i,this.maps.layers[u].shapeSettings.fill,this.maps.layers[u].shapeSettings.opacity,this.maps.layers[u].shapeSettings.border.color,t.isNullOrUndefined(this.maps.layers[u].shapeSettings.border.width)?0:this.maps.layers[u].shapeSettings.border.width,t.isNullOrUndefined(this.maps.layers[u].shapeSettings.border.opacity)?this.maps.layers[u].shapeSettings.opacity:this.maps.layers[u].shapeSettings.border.opacity,this.maps.layers[u].shapeSettings.fill):this.setToggleAttributes(o,i,a,n,l,r,s,a))):(-1!==f&&0===g&&this.maps.toggledLegendId.splice(f,1),-1!==b&&this.maps.toggledShapeElementId.splice(b,1),y.setAttribute("fill",this.legendCollection[p].fill),y.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[u].shapeSettings.border.opacity)?this.maps.layers[u].shapeSettings.opacity:this.maps.layers[u].shapeSettings.border.opacity).toString()),y.setAttribute("stroke-width",(t.isNullOrUndefined(this.maps.layers[u].shapeSettings.border.width)?0:this.maps.layers[u].shapeSettings.border.width).toString()),y.setAttribute("fill-opacity",this.maps.layers[u].shapeSettings.opacity.toString()),y.setAttribute("stroke",this.maps.layers[u].shapeSettings.border.color),null!==e&&(o=de(this.maps.element.id+"_Legend_Text_Index_"+p,this.maps.element.id),i=de(this.maps.element.id+"_Legend_Shape_Index_"+p,this.maps.element.id),this.setToggleAttributes(o,i,this.legendCollection[p].fill,this.legendCollection[p].opacity,this.legendCollection[p].shapeBorder.color,this.legendCollection[p].shapeBorder.width,this.legendCollection[p].shapeBorder.opacity,"#757575")))}v._isVisible=!h}}else if(!t.isNullOrUndefined(e.id)&&(e.id.indexOf(this.maps.element.id+"_Legend_Shape_Index")>-1||-1!==e.id.indexOf(this.maps.element.id+"_Legend_Index"))&&this.maps.legendSettings.visible&&-1===e.id.indexOf("_Text")){var v,S=void 0,x=(p=parseFloat(e.id.split(this.maps.element.id+"_Legend_Index_")[1]),void 0);h=(v=this.legendCollection[p].data)._isVisible;if(("Bubbles"===this.maps.legendSettings.type||"Markers"===this.maps.legendSettings.type)&&this.maps.legendSettings.toggleLegendSettings.enable)for(c=0;c<this.maps.layers.length;c++)for(u=0;u<("Bubbles"===this.maps.legendSettings.type?this.maps.layers[c].bubbleSettings.length:this.maps.layers[c].markerSettings.length);u++){for(g=0;g<v.length;g++)x=this.legendCollection[p].data[g],S="Bubbles"===this.maps.legendSettings.type?de(this.maps.element.id+"_LayerIndex_"+x.layerIndex+"_BubbleIndex_"+u+"_dataIndex_"+x.dataIndex,this.maps.element.id):de(this.maps.element.id+"_LayerIndex_"+x.layerIndex+"_MarkerIndex_"+u+"_dataIndex_"+x.dataIndex,this.maps.element.id),t.isNullOrUndefined(x.shape)||"Balloon"!==x.shape||(S=(S="Bubbles"===this.maps.legendSettings.type?de(this.maps.element.id+"_LayerIndex_"+x.layerIndex+"_BubbleIndex_"+u+"_dataIndex_"+x.dataIndex+"_Group",this.maps.element.id):de(this.maps.element.id+"_LayerIndex_"+x.layerIndex+"_MarkerIndex_"+u+"_dataIndex_"+x.dataIndex+"_Group",this.maps.element.id)).children[0]),h&&null!==S?(this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(S.setAttribute("fill",this.maps.layers[c].shapeSettings.fill),S.setAttribute("stroke",this.maps.layers[c].shapeSettings.border.color),S.setAttribute("stroke-width",(t.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width).toString()),S.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.opacity)?this.maps.layers[c].shapeSettings.opacity:this.maps.layers[c].shapeSettings.border.opacity).toString()),S.setAttribute("fill-opacity",this.maps.layers[c].shapeSettings.opacity.toString())):(S.setAttribute("fill",a),S.setAttribute("fill-opacity",n.toString()),S.setAttribute("stroke",l),S.setAttribute("stroke-width",r.toString()),S.setAttribute("stroke-opacity",s.toString())),null!==e&&(o=de(this.maps.element.id+"_Legend_Index_"+p+"_Text",this.maps.element.id),i=de(this.maps.element.id+"_Legend_Index_"+p,this.maps.element.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?this.setToggleAttributes(o,i,this.maps.layers[c].shapeSettings.fill,this.maps.layers[c].shapeSettings.opacity,this.maps.layers[c].shapeSettings.border.color,t.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width,t.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.opacity)?this.maps.layers[c].shapeSettings.opacity:this.maps.layers[c].shapeSettings.border.opacity,this.maps.layers[c].shapeSettings.fill):this.setToggleAttributes(o,i,a,n,l,r,s,a))):("Markers"===this.maps.legendSettings.type?this.markerToggleSelection(S,c,u,p):this.bubbleToggleSelection(S,c,u,p),null!==e&&((i=de(this.maps.element.id+"_Legend_Index_"+p,this.maps.element.id)).setAttribute("fill",this.legendCollection[p].fill),i.setAttribute("fill-opacity",this.legendCollection[p].opacity),i.setAttribute("stroke",this.legendCollection[p].shapeBorder.color),i.setAttribute("stroke-width",this.legendCollection[p].shapeBorder.width),i.setAttribute("stroke-opacity",this.legendCollection[p].shapeBorder.opacity),(o=de(this.maps.element.id+"_Legend_Index_"+p+"_Text",this.maps.element.id)).setAttribute("fill","#757575")));v._isVisible=!h}if("Layers"===this.maps.legendSettings.type&&this.maps.legendSettings.toggleLegendSettings.enable){var O=void 0;this.removeCollections(e,p);var _=this.maps.toggledLegendId.indexOf(p);-1!==_&&(h=!1);for(c=0;c<this.maps.layers.length;c++)for(g=0;g<v.length;g++)if(x=this.legendCollection[p].data[g],null!==(O=de(this.maps.element.id+"_LayerIndex_"+x.layerIndex+"_shapeIndex_"+x.shapeIndex+"_dataIndex_"+x.dataIndex,this.maps.element.id))){b=this.maps.toggledShapeElementId.indexOf(O.id);h?(0===g&&this.maps.toggledLegendId.push(p),-1===b&&this.maps.toggledShapeElementId.push(O.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(O.setAttribute("fill",this.maps.layers[0].shapeSettings.fill),O.setAttribute("stroke",this.maps.layers[0].shapeSettings.border.color),O.setAttribute("fill-opacity",this.maps.layers[c].shapeSettings.opacity.toString()),O.setAttribute("stroke-width",(t.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width).toString()),O.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.opacity)?this.maps.layers[c].shapeSettings.opacity:this.maps.layers[c].shapeSettings.border.opacity).toString())):(O.setAttribute("fill",a),O.setAttribute("fill-opacity",n.toString()),O.setAttribute("stroke",l),O.setAttribute("stroke-width",r.toString()),O.setAttribute("stroke-opacity",s.toString())),null!==e&&(i=de(this.maps.element.id+"_Legend_Index_"+p,this.maps.element.id),o=de(this.maps.element.id+"_Legend_Index_"+p+"_Text",this.maps.element.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?this.setToggleAttributes(o,i,this.maps.layers[0].shapeSettings.fill,this.maps.layers[c].shapeSettings.opacity,this.maps.layers[0].shapeSettings.border.color,t.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width,t.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.opacity)?this.maps.layers[c].shapeSettings.opacity:this.maps.layers[c].shapeSettings.border.opacity,this.maps.layers[0].shapeSettings.fill):this.setToggleAttributes(o,i,a,n,l,r,s,a))):(-1!==_&&0===g&&this.maps.toggledLegendId.splice(_,1),-1!==b&&this.maps.toggledShapeElementId.splice(b,1),O.setAttribute("fill-opacity",this.maps.layers[c].shapeSettings.opacity.toString()),O.setAttribute("stroke-width",(t.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width).toString()),O.setAttribute("stroke",this.maps.layers[0].shapeSettings.border.color),O.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.opacity)?this.maps.layers[c].shapeSettings.opacity:this.maps.layers[c].shapeSettings.border.opacity).toString()),O.setAttribute("fill",this.legendCollection[p].fill),null!==e&&(o=de(this.maps.element.id+"_Legend_Index_"+p+"_Text",this.maps.element.id),i=de(this.maps.element.id+"_Legend_Index_"+p,this.maps.element.id),this.setToggleAttributes(o,i,this.legendCollection[p].fill,this.legendCollection[p].opacity,this.legendCollection[p].shapeBorder.color,this.legendCollection[p].shapeBorder.width,this.legendCollection[p].shapeBorder.opacity,"#757575")))}v._isVisible=!h}}},e.prototype.removeCollections=function(e,t){this.removeLegendSelectionCollection(e);var i=this.getIndexofLegend(this.maps.legendSelectionCollection,e);-1!==i&&this.maps.legendSelectionCollection.splice(i,1);-1!==this.getIndexofLegend(this.legendHighlightCollection,e)&&this.legendHighlightCollection.splice(i,1);var o=this.getIndexofLegend(this.shapeHighlightCollection,e);-1!==o&&this.shapeHighlightCollection.splice(o,1);var a=this.maps.selectedLegendElementId.indexOf(t);-1!==a&&this.maps.selectedLegendElementId.splice(a,1)},e.prototype.removeEventListener=function(){this.maps.isDestroyed||(this.maps.off(t.Browser.touchMoveEvent,this.interactiveHandler),this.maps.off(t.Browser.touchEndEvent,this.interactiveHandler),this.maps.off(Vt,this.legendClick))},e.prototype.getLegendData=function(e,i,o,a,n,l,r){var s=[];if("[object Array]"===Object.prototype.toString.call(n))for(var d=0;d<n.length;d++){var p=n[d],h=a.indexOf(".")>-1?w(o,a):o[a],m=H(o[a],l,p.properties),c=t.isNullOrUndefined(h)||"string"!=typeof h?h:h.toLowerCase();if((!t.isNullOrUndefined(p.properties[m])&&isNaN(p.properties[m])?p.properties[m].toLowerCase():p.properties[m])===c)if("MultiPoint"!==p.geometry.type)s.push({layerIndex:e,shapeIndex:d,dataIndex:i,name:o[a],value:r,pointIndex:-1});else for(var u=0;u<p.geometry.coordinates.length;u++)s.push({layerIndex:e,shapeIndex:d,dataIndex:i,name:o[a],value:r,pointIndex:u})}return s},e.prototype.setToggleAttributes=function(e,i,o,a,n,l,r,s){e.setAttribute("fill",s),i.setAttribute("fill",o),i.setAttribute("fill-opacity",a.toString()),i.setAttribute("stroke",n),i.setAttribute("stroke-width",l.toString()),t.isNullOrUndefined(r)||i.setAttribute("stroke-opacity",r.toString())},e.prototype.legendGradientColor=function(e,i){var o,a="http://www.w3.org/2000/svg";if(!t.isNullOrUndefined(e.color)&&"object"==typeof e.color){var n=document.createElementNS(a,"linearGradient"),l=this.maps.legendSettings.position,r="Top"===l||"Bottom"===l?"100":"0",s="Top"===l||"Bottom"===l?"0":"100";n.setAttribute("id","linear_"+i+"_"+this.maps.element.id),n.setAttribute("x1","0%"),n.setAttribute("y1","0%"),n.setAttribute("x2",r+"%"),n.setAttribute("y2",s+"%");for(var d=0;d<e.color.length;d++){var p=100/(e.color.length-1),h=document.createElementNS(a,"stop");h.setAttribute("offset",d*p+"%"),h.setAttribute("stop-color",e.color[d]),h.setAttribute("stop-opacity",1..toString()),n.appendChild(h)}this.legendLinearGradient=n;var m="url(#linear_"+i+"_"+this.maps.element.id+")";this.defsElement.appendChild(n),o=m}return o},e.prototype.getModuleName=function(){return"Legend"},e.prototype.destroy=function(){this.legendCollection=[],this.legendRenderingCollections=[],this.translate=null,this.legendBorderRect=null,this.initialMapAreaRect=null,this.legendTotalRect=null,this.totalPages=[],this.legendItemRect=null,this.legendGroup=null,this.shapeHighlightCollection=[],this.legendHighlightCollection=[],this.shapePreviousColor=[],this.selectedNonLegendShapes=[],this.legendLinearGradient=null,this.currentLayer=null,this.defsElement=null,this.legendElement=[],this.oldShapeElement=null,this.removeEventListener(),this.maps=null},e}(),bi=function(){function e(e){this.maps=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.maps.isDestroyed||(this.maps.on(t.Browser.touchMoveEvent,this.mouseMove,this),this.maps.on(t.Browser.touchStartEvent,this.mouseMove,this))},e.prototype.removeEventListener=function(){this.maps.isDestroyed||(this.maps.off(t.Browser.touchMoveEvent,this.mouseMove),this.maps.off(t.Browser.touchStartEvent,this.mouseMove))},e.prototype.addHighlight=function(e,t,i){var o=pe(e,t,0,this.maps);i?this.mapHighlight(o,null,null):ue(o)},e.prototype.mouseMove=function(e){var i,o=e.target,a="touch"===e.pointerType||"2"===e.pointerType||e.type.indexOf("touch")>-1;if((-1!==o.id.indexOf("LayerIndex")||o.id.indexOf("NavigationIndex")>-1)&&"ShapeselectionMapStyle"!==o.getAttribute("class")&&!a&&"MarkerselectionMapStyle"!==o.getAttribute("class")&&"BubbleselectionMapStyle"!==o.getAttribute("class")&&"navigationlineselectionMapStyle"!==o.getAttribute("class")&&"LineselectionMapStyle"!==o.getAttribute("class")){i=parseInt(o.id.split("_LayerIndex_")[1].split("_")[0],10);var n=void 0,l=void 0,r=void 0,s=void 0;if(o.id.indexOf("shapeIndex")>-1)r=parseInt(o.id.split("_shapeIndex_")[1].split("_")[0],10),n=this.maps.layers[i].shapeData.features&&!t.isNullOrUndefined(this.maps.layersCollection[i].layerData[r])?this.maps.layersCollection[i].layerData[r].property:null,s=parseInt(o.id.split("_dataIndex_")[1].split("_")[0],10),l=t.isNullOrUndefined(s)?null:this.maps.layers[i].dataSource[s],this.highlightSettings=this.maps.layers[i].highlightSettings;else if(o.id.indexOf("BubbleIndex")>-1){var d=parseInt(o.id.split("_BubbleIndex_")[1].split("_")[0],10);s=parseInt(o.id.split("_dataIndex_")[1].split("_")[0],10),l=this.maps.layers[i].bubbleSettings[d].dataSource[s],this.highlightSettings=this.maps.layers[i].bubbleSettings[d].highlightSettings}else if(o.id.indexOf("MarkerIndex")>-1){var p=parseInt(o.id.split("_MarkerIndex_")[1].split("_")[0],10);s=parseInt(o.id.split("_dataIndex_")[1].split("_")[0],10),l=this.maps.layers[i].markerSettings[p].dataSource[s],this.highlightSettings=this.maps.layers[i].markerSettings[p].highlightSettings}else{var h=parseInt(o.id.split("_NavigationIndex_")[1].split("_")[0],10);i=parseInt(o.id.split("_LayerIndex_")[1].split("_")[0],10),n=null,l={latitude:this.maps.layers[i].navigationLineSettings[h].latitude,longitude:this.maps.layers[i].navigationLineSettings[h].longitude},this.highlightSettings=this.maps.layers[i].navigationLineSettings[h].highlightSettings}if(this.highlightSettings.enable)this.handleHighlight(o,i,l,n);else{var m=document.getElementsByClassName("highlightMapStyle")[0];if(!t.isNullOrUndefined(m)&&(ue(m),m.id.indexOf("NavigationIndex")>-1)){h=parseInt(m.id.split("_NavigationIndex_")[1].split("_")[0],10);var c=parseInt(m.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10);m.setAttribute("stroke-width",this.maps.layers[c].navigationLineSettings[h].width.toString()),m.setAttribute("stroke",this.maps.layers[c].navigationLineSettings[h].color)}}}else if(se("highlightMapStyle").length>0){if((o=se("highlightMapStyle")[0]).id.indexOf("NavigationIndex")>-1){h=parseInt(o.id.split("_NavigationIndex_")[1].split("_")[0],10);i=parseInt(o.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10),o.setAttribute("stroke-width",this.maps.layers[i].navigationLineSettings[h].width.toString()),o.setAttribute("stroke",this.maps.layers[i].navigationLineSettings[h].color)}ue(o),this.maps.legendSettings.visible&&this.maps.legendModule&&this.maps.legendModule.removeShapeHighlightCollection()}else(-1!==o.id.indexOf(this.maps.element.id+"_Legend_Shape_Index")||-1!==o.id.indexOf(this.maps.element.id+"_Legend_Index"))&&this.maps.legendModule&&this.maps.legendSettings.visible&&-1===o.id.indexOf("_Text")?this.maps.legendModule.legendHighLightAndSelection(o,"highlight"):this.maps.legendSettings.visible&&this.maps.legendModule&&this.maps.legendModule.removeLegendHighlightCollection()},e.prototype.handleHighlight=function(e,t,i,o){this.maps.legendSettings.visible&&-1===e.id.indexOf("_MarkerIndex_")&&this.maps.legendModule&&"Layers"===this.maps.legendSettings.type&&this.maps.legendModule.shapeHighLightAndSelection(e,i,this.highlightSettings,"highlight",t);(!(e.id.indexOf("shapeIndex")>-1&&this.maps.legendSettings.visible&&this.maps.legendModule)||this.maps.legendModule.shapeToggled)&&this.mapHighlight(e,o,i)},e.prototype.mapHighlight=function(e,i,o){var a=this,n=parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10),l=!1;if(e.id.indexOf("MarkerIndex")>-1){var r=parseInt(e.id.split("_MarkerIndex_")[1].split("_")[0],10);l=this.maps.layers[n].markerSettings[r].highlightSettings.enable}var s=-1===e.parentElement.id.indexOf("LineString")?this.highlightSettings.border.color:this.highlightSettings.fill||this.highlightSettings.border.color,d=-1===e.parentElement.id.indexOf("LineString")?this.highlightSettings.border.width/(l?1:this.maps.scale):this.highlightSettings.border.width/this.maps.scale,p=t.isNullOrUndefined(this.highlightSettings.border.opacity)?this.highlightSettings.opacity:this.highlightSettings.border.opacity,h={opacity:this.highlightSettings.opacity,fill:-1===e.parentElement.id.indexOf("LineString")?-1===e.id.indexOf("NavigationIndex")?t.isNullOrUndefined(this.highlightSettings.fill)?e.getAttribute("fill"):this.highlightSettings.fill:"none":"transparent",border:{color:s,width:d,opacity:p},cancel:!1},m={opacity:h.opacity,fill:h.fill,border:{color:s,width:d,opacity:p},name:Gt,target:e.id,cancel:!1,shapeData:i,data:o,maps:this.maps};e.id.indexOf("shapeIndex")>-1&&this.maps.trigger(Gt,m,function(){});var c={opacity:h.opacity,fill:h.fill,border:{color:s,width:d,opacity:p},name:li,target:e.id,cancel:!1,shapeData:i,data:o,maps:this.maps};this.maps.trigger(li,c,function(){c.cancel=h.cancel!==c.cancel?c.cancel:e.id.indexOf("shapeIndex")>-1?m.cancel:h.cancel,c.fill=h.fill!==c.fill?c.fill:e.id.indexOf("shapeIndex")>-1?m.fill:h.fill,c.opacity=h.opacity!==c.opacity?c.opacity:e.id.indexOf("shapeIndex")>-1?m.opacity:h.opacity,c.border.color=h.border.color!==c.border.color?c.border.color:e.id.indexOf("shapeIndex")>-1?m.border.color:h.border.color,c.border.width=h.border.width!==c.border.width?c.border.width:e.id.indexOf("shapeIndex")>-1?m.border.width:h.border.width,c.border.opacity=h.border.opacity!==c.border.opacity?c.border.opacity:e.id.indexOf("shapeIndex")>-1?m.border.opacity:h.border.opacity,a.highlightMap(e,c)})},e.prototype.highlightMap=function(e,t){if("highlightMapStyle"!==e.getAttribute("class")&&!t.cancel){if(se("highlightMapStyle").length>0){var i=se("highlightMapStyle")[0];if(ue(i),i.id.indexOf("NavigationIndex")>-1){var o=parseInt(i.id.split("_NavigationIndex_")[1].split("_")[0],10),a=parseInt(i.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10);i.setAttribute("stroke-width",this.maps.layers[a].navigationLineSettings[o].width.toString()),i.setAttribute("stroke",this.maps.layers[a].navigationLineSettings[o].color)}}ne("highlightMap")?me("highlightMap","highlightMapStyle",t):document.body.appendChild(he("highlightMap","highlightMapStyle",t)),e.setAttribute("class","highlightMapStyle")}},e.prototype.getModuleName=function(){return"Highlight"},e.prototype.destroy=function(){this.highlightSettings=null,this.removeEventListener(),this.maps=null},e}(),vi=function(){function e(e){this.maps=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.maps.isDestroyed||this.maps.on(Vt,this.mouseClick,this)},e.prototype.removeEventListener=function(){this.maps.isDestroyed||this.maps.off(Vt,this.mouseClick)},e.prototype.mouseClick=function(e){if(!t.isNullOrUndefined(e.type)&&-1!==e.type.indexOf("touch")&&t.isNullOrUndefined(e.id)&&(e=e.target),!t.isNullOrUndefined(e.id)&&(e.id.indexOf("LayerIndex")>-1||e.id.indexOf("NavigationIndex")>-1)){var i=void 0,o=void 0,a=void 0,n=void 0,l=parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10);if(e.id.indexOf("shapeIndex")>-1)a=parseInt(e.id.split("_shapeIndex_")[1].split("_")[0],10),i=!t.isNullOrUndefined(this.maps.layers[l].shapeData.features)&&this.maps.layers[l].shapeData.features.length>a?this.maps.layers[l].shapeData.features[a].properties:!t.isNullOrUndefined(this.maps.layers[l].shapeData.geometries)&&this.maps.layers[l].shapeData.geometries.length>a?this.maps.layers[l].shapeData.geometries[a].properties:null,n=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),o=t.isNullOrUndefined(n)?null:this.maps.layers[l].dataSource[n],this.selectionsettings=this.maps.layers[l].selectionSettings,this.selectionType="Shape";else if(e.id.indexOf("BubbleIndex")>-1){var r=parseInt(e.id.split("_BubbleIndex_")[1].split("_")[0],10);n=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),o=this.maps.layers[l].bubbleSettings[r].dataSource[n],this.selectionsettings=this.maps.layers[l].bubbleSettings[r].selectionSettings,this.selectionType="Bubble"}else if(e.id.indexOf("MarkerIndex")>-1){var s=parseInt(e.id.split("_MarkerIndex_")[1].split("_")[0],10);n=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),o=this.maps.layers[l].markerSettings[s].dataSource[n],this.selectionsettings=this.maps.layers[l].markerSettings[s].selectionSettings,this.selectionType="Marker"}else if(e.id.indexOf("NavigationIndex")>-1){var d=parseInt(e.id.split("_NavigationIndex_")[1].split("_")[0],10);i=null,o={latitude:this.maps.layers[l].navigationLineSettings[d].latitude,longitude:this.maps.layers[l].navigationLineSettings[d].longitude},this.selectionsettings=this.maps.layers[l].navigationLineSettings[d].selectionSettings,this.selectionType="navigationline"}!t.isNullOrUndefined(this.selectionsettings)&&this.selectionsettings.enable&&this.selectElement(e,l,o,i)}else this.maps.legendSettings.visible&&!this.maps.legendSettings.toggleLegendSettings.enable&&this.maps.legendModule&&!t.isNullOrUndefined(e.id)&&-1===e.id.indexOf("_Text")&&(e.id.indexOf(this.maps.element.id+"_Legend_Shape_Index")>-1||-1!==e.id.indexOf(this.maps.element.id+"_Legend_Index"))&&this.maps.legendModule.legendHighLightAndSelection(e,"selection")},e.prototype.selectElement=function(e,t,i,o){this.maps.mapSelect=!!e,this.maps.legendModule&&this.maps.legendSettings.visible&&-1===e.id.indexOf("_MarkerIndex_")&&this.maps.legendModule.shapeHighLightAndSelection(e,i,this.selectionsettings,"selection",t);(!(e.id.indexOf("shapeIndex")>-1&&this.maps.legendSettings.visible&&this.maps.legendModule)||this.maps.legendModule.shapeToggled)&&this.selectMap(e,o,i)},e.prototype.addSelection=function(e,t,i){var o=pe(e,t,0,this.maps);i?this.selectMap(o,null,null):ue(o)},e.prototype.selectMap=function(e,i,o){var a=this,n=(parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10),e.parentElement.id.indexOf("LineString")>-1),l=(this.selectionsettings,{color:n?this.selectionsettings.fill||this.selectionsettings.border.color:this.selectionsettings.border.color,width:n?this.selectionsettings.border.width/this.maps.scale:this.selectionsettings.border.width/("Marker"===this.selectionType?1:this.maps.scale),opacity:this.selectionsettings.border.opacity}),r={opacity:this.selectionsettings.opacity,fill:n?"transparent":"navigationline"!==this.selectionType?this.selectionsettings.fill:"none",border:l,name:ni,target:e.id,cancel:!1,shapeData:i,data:o,maps:this.maps};this.maps.trigger("itemSelection",r,function(i){if(r.border.opacity=t.isNullOrUndefined(a.selectionsettings.border.opacity)?a.selectionsettings.opacity:a.selectionsettings.border.opacity,!r.cancel)if(e.getAttribute("class")===a.selectionType+"selectionMapStyle"||"LineselectionMapStyle"===e.getAttribute("class")){ue(e),a.removedSelectionList(e);for(var o=0;o<a.maps.shapeSelectionItem.length;o++)if(a.maps.shapeSelectionItem[o]===r.shapeData){a.maps.shapeSelectionItem.splice(o,1);break}if(e.id.indexOf("NavigationIndex")>-1){var l=parseInt(e.id.split("_NavigationIndex_")[1].split("_")[0],10),s=parseInt(e.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10);e.setAttribute("stroke-width",a.maps.layers[s].navigationLineSettings[l].width.toString()),e.setAttribute("stroke",a.maps.layers[s].navigationLineSettings[l].color)}}else{var d=ie(a.maps.element.id+"_Layer_Collections");if(!a.selectionsettings.enableMultiSelect&&(d.getElementsByClassName(a.selectionType+"selectionMapStyle").length>0||d.getElementsByClassName("LineselectionMapStyle").length>0)){for(var p=d.getElementsByClassName(a.selectionType+"selectionMapStyle").length,h=void 0,m=0;m<p;m++)ue(h=d.getElementsByClassName(a.selectionType+"selectionMapStyle")[0]),a.removedSelectionList(h);if(d.getElementsByClassName("LineselectionMapStyle").length>0){p=d.getElementsByClassName("LineselectionMapStyle").length;for(m=0;m<p;m++)ue(h=d.getElementsByClassName("LineselectionMapStyle")[0]),a.removedSelectionList(h)}if("Shape"===a.selectionType){a.maps.shapeSelectionItem=[];for(var c=a.maps.selectedElementId.length,u=0;u<c;u++){ue(h=d.getElementsByClassName(a.selectionType+"selectionMapStyle")[0]);var g=a.maps.selectedElementId.indexOf(h.getAttribute("id"));a.maps.selectedElementId.splice(g,1)}}if(h.id.indexOf("NavigationIndex")>-1){l=parseInt(e.id.split("_NavigationIndex_")[1].split("_")[0],10);var y=parseInt(e.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10);h.setAttribute("stroke-width",a.maps.layers[y].navigationLineSettings[l].width.toString()),h.setAttribute("stroke",a.maps.layers[y].navigationLineSettings[l].color)}}n?(ne("LineselectionMap")?me("LineselectionMap","LineselectionMapStyle",r):document.body.appendChild(he("LineselectionMap","LineselectionMapStyle",r)),e.setAttribute("class","LineselectionMapStyle")):(ne(a.selectionType+"selectionMap")?me(a.selectionType+"selectionMap",a.selectionType+"selectionMapStyle",r):document.body.appendChild(he(a.selectionType+"selectionMap",a.selectionType+"selectionMapStyle",r)),e.setAttribute("class",a.selectionType+"selectionMapStyle")),"ShapeselectionMapStyle"===e.getAttribute("class")&&(a.maps.shapeSelectionClass=ne(a.selectionType+"selectionMap"),a.maps.selectedElementId.push(e.getAttribute("id")),a.maps.shapeSelectionItem.push(r.shapeData)),"MarkerselectionMapStyle"===e.getAttribute("class")&&(a.maps.markerSelectionClass=ne(a.selectionType+"selectionMap"),a.maps.selectedMarkerElementId.push(e.getAttribute("id"))),"BubbleselectionMapStyle"===e.getAttribute("class")&&(a.maps.bubbleSelectionClass=ne(a.selectionType+"selectionMap"),a.maps.selectedBubbleElementId.push(e.getAttribute("id"))),"navigationlineselectionMapStyle"===e.getAttribute("class")&&(a.maps.navigationSelectionClass=ne(a.selectionType+"selectionMap"),a.maps.selectedNavigationElementId.push(e.getAttribute("id")))}})},e.prototype.removedSelectionList=function(e){"Shape"===this.selectionType&&this.maps.selectedElementId.splice(this.maps.selectedElementId.indexOf(e.getAttribute("id")),1),"Bubble"===this.selectionType&&this.maps.selectedBubbleElementId.splice(this.maps.selectedBubbleElementId.indexOf(e.getAttribute("id")),1),"Marker"===this.selectionType&&this.maps.selectedMarkerElementId.splice(this.maps.selectedMarkerElementId.indexOf(e.getAttribute("id")),1),"navigationline"===this.selectionType&&this.maps.selectedBubbleElementId.splice(this.maps.selectedBubbleElementId.indexOf(e.getAttribute("id")),1)},e.prototype.getModuleName=function(){return"Selection"},e.prototype.destroy=function(){this.selectionsettings=null,this.removeEventListener(),this.maps=null},e}(),Si=function(){function e(e){this.maps=e,this.tooltipId=this.maps.element.id+"_mapsTooltip",this.addEventListener()}return e.prototype.renderTooltip=function(e){var o,a,n,l,r,d,p=this;if(-1!==e.type.indexOf("touch")?(this.isTouch=!0,o=(l=e).changedTouches[0].pageX,a=l.changedTouches[0].pageY,n=l.target):(this.isTouch="touch"===e.pointerType,o=e.pageX,a=e.pageY,n=e.target),this.maps.isDevice&&(clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeTooltip.bind(this),2e3)),-1===n.id.indexOf(this.maps.element.id)){var h=n.closest("."+this.maps.element.id+"_marker_template_element");!t.isNullOrUndefined(h)&&h.id.indexOf("_MarkerIndex_")>-1&&(n=h)}var m,c,u,g="",y=n.id,f=[],b=y.indexOf("_LayerIndex_")>-1&&parseFloat(y.split("_LayerIndex_")[1].split("_")[0]),v=this.maps.layersCollection[b],S=s(o,a,this.maps.svgObject);this.tooltipTargetID=y;if((y.indexOf("_shapeIndex_")>-1||y.indexOf("_MarkerIndex_")>-1||y.indexOf("_BubbleIndex_")>-1)&&null===this.maps.markerDragArgument){if(y.indexOf("_shapeIndex_")>-1){m=v.tooltipSettings;var x=parseInt(y.split("_shapeIndex_")[1].split("_")[0],10);if(t.isNullOrUndefined(v.layerData)||t.isNullOrUndefined(v.layerData[x]))return;var O=v.layerData[x].property,_=!1,M="[object Array]"===Object.prototype.toString.call(v.shapePropertyPath)?v.shapePropertyPath:[v.shapePropertyPath];if(!t.isNullOrUndefined(M)){for(var L=0;L<M.length;L++)for(var P=0;P<v.dataSource.length;P++){var T=v.dataSource[P],I=v.shapeDataPath.indexOf(".")>-1?w(T,v.shapeDataPath):T[v.shapeDataPath];if((!t.isNullOrUndefined(I)&&isNaN(T[v.shapeDataPath])?I.toLowerCase():I)===(!t.isNullOrUndefined(O[M[L]])&&isNaN(O[M[L]])?O[M[L]].toLowerCase():O[M[L]])){_=!0,b=P,L=M.length;break}}if(b=_?b:null,!t.isNullOrUndefined(v.dataSource[b])){f=JSON.parse(JSON.stringify(v.dataSource[b]));for(u in O)f.hasOwnProperty(u)||(f[u]=O[u])}}if(m.visible&&(!t.isNullOrUndefined(b)&&!isNaN(b)||!t.isNullOrUndefined(O)))if(v.tooltipSettings.format)g=this.formatter(v.tooltipSettings.format,f);else{var k=H(v.shapeDataPath,v.shapePropertyPath,O);g=t.isNullOrUndefined(v.dataSource)||t.isNullOrUndefined(b)?O[k]:C(m.valuePath.indexOf(".")>-1?w(v.dataSource[b],m.valuePath):v.dataSource[b][m.valuePath],this.maps),t.isNullOrUndefined(g)&&(g=m.valuePath.indexOf(".")>-1?w(O,m.valuePath):O[m.valuePath])}}else if(y.indexOf("_MarkerIndex_")>-1){var N=parseInt(y.split("_MarkerIndex_")[1].split("_")[0],10),F=parseInt(y.split("_MarkerIndex_")[1].split("_")[2],10),E=v.markerSettings[N];m=E.tooltipSettings,f=E.dataSource[F],m.visible&&!isNaN(N)&&(g=E.tooltipSettings.format?this.formatter(E.tooltipSettings.format,E.dataSource[F]):"function"!=typeof E.template&&E.template&&!E.tooltipSettings.valuePath?E.template.split(">")[1].split("<")[0]:C(E.tooltipSettings.valuePath.indexOf(".")>-1?w(E.dataSource[F],E.tooltipSettings.valuePath):E.dataSource[F][E.tooltipSettings.valuePath],this.maps))}else if(y.indexOf("_BubbleIndex_")>-1){var z=parseInt(y.split("_BubbleIndex_")[1].split("_")[0],10),A=(F=parseInt(y.split("_BubbleIndex_")[1].split("_")[2],10),v.bubbleSettings[z]);m=A.tooltipSettings,f=A.dataSource[F],m.visible&&!isNaN(F)&&(g=A.tooltipSettings.format?this.formatter(A.tooltipSettings.format,A.dataSource[F]):C(A.tooltipSettings.valuePath.indexOf(".")>-1?w(A.dataSource[F],A.tooltipSettings.valuePath):A.dataSource[F][A.tooltipSettings.valuePath],this.maps))}document.getElementById(this.tooltipId)?c=document.getElementById(this.tooltipId):((c=t.createElement("div",{id:this.maps.element.id+"_mapsTooltip",className:"EJ2-maps-Tooltip"})).style.cssText="position: absolute;pointer-events:none;",document.getElementById(this.maps.element.id+"_Secondary_Element").appendChild(c)),"function"!=typeof m.template&&null!==m.template&&1===Object.keys("object"==typeof m.template?m.template:{}).length&&(m.template=m.template[Object.keys(m.template)[0]]);var B={location:S,text:[],data:f=this.setTooltipContent(m,f),textStyle:{color:m.textStyle.color,fontFamily:m.textStyle.fontFamily,fontStyle:m.textStyle.fontStyle,fontWeight:m.textStyle.fontWeight,opacity:m.textStyle.opacity,size:m.textStyle.size},template:m.template};r={cancel:!1,name:Ht,options:B,fill:m.fill,maps:this.maps,element:n,eventArgs:e,content:t.isNullOrUndefined(g)?"":g.toString()},this.maps.trigger(Ht,r,function(o){if(r.cancel||!m.visible||t.isNullOrUndefined(g)||-1!==y.indexOf("_cluster_")||-1!==y.indexOf("_dataLabel_"))p.clearTooltip(e.target);else if(p.maps.isProtectedOnChange=!0,r.options.textStyle.size=r.options.textStyle.size||p.maps.themeStyle.fontSize,r.options.textStyle.color=r.options.textStyle.color||p.maps.themeStyle.tooltipFontColor,r.options.textStyle.fontFamily=r.options.textStyle.fontFamily||p.maps.themeStyle.fontFamily,r.options.textStyle.fontWeight=r.options.textStyle.fontWeight||p.maps.themeStyle.fontWeight,r.options.textStyle.opacity=r.options.textStyle.opacity||p.maps.themeStyle.tooltipTextOpacity,r.cancel?p.svgTooltip=new i.Tooltip({enable:!0,header:"",data:m.data,template:m.template,content:r.content.toString()!==g.toString()?[t.SanitizeHtmlHelper.sanitize(r.content.toString())]:[t.SanitizeHtmlHelper.sanitize(g.toString())],shapes:[],location:m.location,palette:[void 0],areaBounds:p.maps.mapAreaRect,textStyle:m.textStyle,availableSize:p.maps.availableSize,fill:m.fill||p.maps.themeStyle.tooltipFillColor}):p.svgTooltip=new i.Tooltip({enable:!0,header:"",data:r.options.data,template:r.options.template,content:r.content.toString()!==g.toString()?[t.SanitizeHtmlHelper.sanitize(r.content.toString())]:[t.SanitizeHtmlHelper.sanitize(g.toString())],shapes:[],location:r.options.location,palette:[void 0],areaBounds:p.maps.mapAreaRect,textStyle:r.options.textStyle,availableSize:p.maps.availableSize,fill:r.fill||p.maps.themeStyle.tooltipFillColor}),(p.maps.isVue||p.maps.isVue3)&&(p.svgTooltip.controlInstance=p.maps),p.svgTooltip.opacity=p.maps.themeStyle.tooltipFillOpacity||p.svgTooltip.opacity,p.svgTooltip.appendTo(c),p.maps.renderReactTemplates(),null!==(d=document.getElementById(p.maps.element.id+"_mapsTooltip"))&&-1!==d.innerHTML.indexOf("href")&&-1!==d.innerHTML.indexOf("</a>")){var a=d.getAttribute("style");a=a.replace("pointer-events: none;","position-events:all;"),d.style.cssText=a}}),this.svgTooltip&&this.maps.trigger("tooltipRenderComplete",{cancel:!1,name:"tooltipRenderComplete",maps:this.maps,options:B,element:this.svgTooltip.element}),this.svgTooltip?this.maps.trigger("tooltipRenderComplete",{cancel:!1,name:"tooltipRenderComplete",maps:this.maps,options:B,element:this.svgTooltip.element}):this.clearTooltip(e.target)}else null!==(d=document.getElementById(this.maps.element.id+"_mapsTooltip"))&&-1!==d.innerHTML.indexOf("href")&&-1!==d.innerHTML.indexOf("</a>")?this.maps.notify(Vt,this):this.clearTooltip(e.target)},e.prototype.setTooltipContent=function(e,i){var o=t.extend({},i,null,!0);return this.maps.format&&!isNaN(Number(o[e.valuePath]))?o[e.valuePath]=oe(this.maps,Number(o[e.valuePath])):o=Object.keys(o).length?o:void 0,o},e.prototype.formatter=function(e,t){void 0===t&&(t={});for(var i=0,o=Object.keys(t);i<o.length;i++){var a=o[i];e="object"==typeof t[a]?M("",e,t,this.maps):e.split("${"+a+"}").join(C(t[a],this.maps))}return e},e.prototype.mouseUpHandler=function(e){this.renderTooltip(e),"MouseMove"===this.maps.tooltipDisplayMode&&(clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeTooltip.bind(this),2e3))},e.prototype.removeTooltip=function(){var e=!1;return document.getElementsByClassName("EJ2-maps-Tooltip").length>0&&(t.remove(document.getElementsByClassName("EJ2-maps-Tooltip")[0]),e=!0),e},e.prototype.clearTooltip=function(e){var i=e.closest("#"+this.maps.element.id+"_mapsTooltipparent_template");if(t.isNullOrUndefined(i)){this.removeTooltip()&&this.maps.clearTemplate()}},e.prototype.addEventListener=function(){this.maps.isDestroyed||("DoubleClick"===this.maps.tooltipDisplayMode?this.maps.on("dblclick",this.renderTooltip,this):"Click"===this.maps.tooltipDisplayMode?this.maps.on(t.Browser.touchEndEvent,this.mouseUpHandler,this):this.maps.on(t.Browser.touchMoveEvent,this.renderTooltip,this),this.maps.on(t.Browser.touchCancelEvent,this.removeTooltip,this),this.maps.element.addEventListener("contextmenu",this.removeTooltip))},e.prototype.removeEventListener=function(){if(this.maps){if(this.maps.isDestroyed)return;"DoubleClick"===this.maps.tooltipDisplayMode?this.maps.off("dblclick",this.removeTooltip):"Click"===this.maps.tooltipDisplayMode?this.maps.off(t.Browser.touchEndEvent,this.mouseUpHandler):this.maps.off(t.Browser.touchMoveEvent,this.renderTooltip),this.maps.off(t.Browser.touchCancelEvent,this.removeTooltip),this.maps.element.removeEventListener("contextmenu",this.removeTooltip)}},e.prototype.getModuleName=function(){return"MapsTooltip"},e.prototype.destroy=function(){t.isNullOrUndefined(this.svgTooltip)||this.svgTooltip.destroy(),this.svgTooltip=null},e}(),xi=function(){function e(e){this.isPanning=!1,this.mouseEnter=!1,this.isTouch=!1,this.rectZoomingStart=!1,this.browserName=t.Browser.info.name,this.isPointer=t.Browser.isPointer,this.handled=!1,this.isPan=!1,this.isZoomFinal=!1,this.isZoomSelection=!1,this.pinchFactor=1,this.startTouches=[],this.intersect=[],this.mouseDownLatLong={x:0,y:0},this.mouseMoveLatLong={x:0,y:0},this.isSingleClick=!1,this.maps=e,this.wheelEvent="mozilla"===this.browserName?this.isPointer?"mousewheel":"DOMMouseScroll":"mousewheel",this.cancelEvent=this.isPointer?"pointerleave":"mouseleave",this.selectionColor=null==this.maps.zoomSettings.toolbarSettings.buttonSettings.selectionColor?this.maps.zoomSettings.selectionColor:this.maps.zoomSettings.toolbarSettings.buttonSettings.selectionColor,this.fillColor=null==this.maps.zoomSettings.toolbarSettings.buttonSettings.color?this.maps.zoomSettings.color:this.maps.zoomSettings.toolbarSettings.buttonSettings.color,this.addEventListener()}return e.prototype.performZooming=function(e,t,i){var o=this,a=this.maps;a.previousProjection=a.projectionType,a.defaultState=!1,a.initialCheck=!1,a.markerZoomedState=!1,a.zoomPersistence=a.enablePersistence;var n=a.tileZoomLevel,l=a.previousScale=a.scale,r=a.zoomSettings.maxZoom,s=a.zoomSettings.minZoom;t=r>=t?t:r;var d=!0;switch(i.toLowerCase()){case"zoomin":d=t<=this.maps.zoomSettings.maxZoom;break;case"zoomout":d=t>=this.maps.zoomSettings.minZoom}if(d){var p=a.tileTranslatePoint;if(a.isTileMap||!("ZoomIn"===i?t>=s&&t<=r:t>=s)&&!a.isReset){if(a.isTileMap&&t>=s&&t<=r)if(this.getTileTranslatePosition(n,t,e,i),a.tileZoomLevel=t,a.zoomSettings.zoomFactor=t,a.scale=Math.pow(2,t-1),"ZoomOut"===i&&a.zoomSettings.resetToInitial&&a.applyZoomReset&&t<=a.initialZoomLevel&&(a.initialCheck=!0,a.zoomPersistence=!1,a.tileTranslatePoint.x=a.initialTileTranslate.x,a.tileTranslatePoint.y=a.initialTileTranslate.y,t=a.tileZoomLevel=a.mapScaleValue=a.initialZoomLevel,a.scale=Math.pow(2,t-1)),a.translatePoint.y=(a.tileTranslatePoint.y-.01*a.mapScaleValue)/a.scale,a.translatePoint.x=(a.tileTranslatePoint.x-.01*a.mapScaleValue)/a.scale,this.triggerZoomEvent(p,n,i))a.translatePoint=a.tileTranslatePoint=new Ze(0,0),a.scale=a.previousScale,a.tileZoomLevel=n,a.zoomSettings.zoomFactor=a.previousScale;else{document.querySelector(".GroupElement")&&(document.querySelector(".GroupElement").style.display="none"),document.getElementById(this.maps.element.id+"_LayerIndex_1")&&(document.getElementById(this.maps.element.id+"_LayerIndex_1").style.display="none"),this.markerLineAnimation(a),a.mapLayerPanel.generateTiles(t,a.tileTranslatePoint,i+"wheel",null,e);document.getElementById(this.maps.element.id+"_tiles");var h=this.maps.layersCollection[0].animationDuration;setTimeout(function(){o.applyTransform(o.maps),document.getElementById(o.maps.element.id+"_LayerIndex_1")&&(document.getElementById(o.maps.element.id+"_LayerIndex_1").style.display="block")},h)}}else{var m=a.mapAreaRect,c=a.baseMapRectBounds.min,u=a.baseMapRectBounds.max,g=Math.abs(c.x-u.x),y=Math.abs(c.y-u.y),f=void 0,b=void 0;if(t<1.2&&"Eckert5"!==a.projectionType)0!==g&&0!==y&&g!==y||(g=m.width/2,y=m.height),t=(t=parseFloat(Math.min(m.width/g,m.height/y).toFixed(2)))>1.05?1:t,a.translatePoint=this.calculateInitalZoomTranslatePoint(t,g,y,m,c,a);else{var v=a.translatePoint;f=v.x-(m.width/l-m.width/t)/(m.width/e.x),b=v.y-(m.height/l-m.height/t)/(m.height/e.y);var S=Math.abs(a.baseMapRectBounds.max.y-a.baseMapRectBounds.min.y)*t;f=S<a.mapAreaRect.height?m.x+(-c.x+(m.width/2-g/2)):f,b=S<a.mapAreaRect.height?m.y+(-c.y+(m.height/2-y/2)):b,a.translatePoint=new Ze(f,b)}a.scale=t,this.triggerZoomEvent(p,n,i)?(a.translatePoint=a.previousPoint,a.scale=a.mapScaleValue=a.previousScale):this.applyTransform(a)}}this.maps.zoomNotApplied=!1,this.maps.isDevice&&this.removeToolbarOpacity(a.isTileMap?Math.round(a.tileZoomLevel):a.scale,a.element.id+"_Zooming_")},e.prototype.calculateInitalZoomTranslatePoint=function(e,t,i,o,a,n){t*=e,i*=e;var l=0!==a.x&&"layers"===n.translateType?n.availableSize.width-o.width:0,r=o.x+(-a.x+(o.width/2-t/2))-l,s=o.y+(-a.y+(o.height/2-i/2));return new Ze(r,s)},e.prototype.triggerZoomEvent=function(e,t,i){var o,a=this.maps;return o=a.isTileMap?{cancel:!1,name:"zoom",type:i,maps:a,tileTranslatePoint:{previous:e,current:a.tileTranslatePoint},translatePoint:{previous:a.previousPoint,current:a.translatePoint},tileZoomLevel:{previous:t,current:a.tileZoomLevel},scale:{previous:a.previousScale,current:a.scale}}:{cancel:!1,name:"zoom",type:i,maps:a,tileTranslatePoint:{},translatePoint:{previous:a.previousPoint,current:a.translatePoint},tileZoomLevel:{},scale:{previous:a.previousScale,current:a.scale}},a.trigger("zoom",o),o.cancel},e.prototype.getTileTranslatePosition=function(e,t,i,o){var a=this.maps,n="ZoomOut"===o?10:"Reset"===o&&t>1?0:10,l=a.availableSize,r=256*Math.pow(2,e),s=256*Math.pow(2,t),d=(i.x-a.tileTranslatePoint.x)/r*100,p=(i.y-a.tileTranslatePoint.y)/r*100;a.tileTranslatePoint.x=1===t?l.width/2-256:i.x-d*s/100,a.tileTranslatePoint.y=1===t?l.height/2-256+2*n:i.y-p*s/100},e.prototype.performRectZooming=function(){this.isDragZoom=!0;var e=this.maps,t=e.availableSize;e.previousProjection=e.projectionType;var i,o=e.tileZoomLevel,a=e.tileTranslatePoint,n=this.zoomingRect,l=e.zoomSettings.maxZoom,r=e.zoomSettings.minZoom;if(n.height>0&&n.width>0){var s=this.zoomingRect.x+this.zoomingRect.width/2,d=this.zoomingRect.y+this.zoomingRect.height/2,p=void 0;if(e.isTileMap)p=(p=o+Math.round(o+(t.width/n.width+t.height/n.height)/2))>=r&&p<=l?p:l,e.zoomSettings.zoomFactor=p,this.getTileTranslatePosition(o,p,{x:s,y:d}),e.tileZoomLevel=p,e.translatePoint.x=(e.tileTranslatePoint.x-.5*Math.pow(2,p))/Math.pow(2,p),e.translatePoint.y=(e.tileTranslatePoint.y-.5*Math.pow(2,p))/Math.pow(2,p),e.scale=Math.pow(2,p),(i=this.triggerZoomEvent(a,o,""))?(e.translatePoint=e.tileTranslatePoint=new Ze(0,0),e.scale=e.tileZoomLevel=e.zoomSettings.zoomFactor=o):e.mapLayerPanel.generateTiles(p,e.tileTranslatePoint);else{var h=e.previousScale=e.scale;p=(p=h+Math.round((t.width/n.width+t.height/n.height)/2))<this.maps.zoomSettings.maxZoom?p:this.maps.zoomSettings.maxZoom;var m=e.previousPoint=e.translatePoint;if(p<=l){var c=m.x-(t.width/h-t.width/p)/(t.width/s),u=m.y-(t.height/h-t.height/p)/(t.height/d);e.translatePoint=new Ze(c,u)}e.scale=p<this.maps.zoomSettings.maxZoom?p:this.maps.zoomSettings.maxZoom,(i=this.triggerZoomEvent(a,o,""))&&(e.translatePoint=e.previousPoint,e.scale=e.previousScale)}i||(e.mapScaleValue=p,this.applyTransform(e,!0),this.maps.zoomNotApplied=!1,this.zoomingRect=null)}this.isZoomFinal=this.isZoomSelection&&Math.round(e.scale)===this.maps.zoomSettings.maxZoom,this.removeToolbarOpacity(e.scale,this.maps.element.id+"_Zooming_")},e.prototype.setInteraction=function(e){this.lastScale=1,this.interaction=e},e.prototype.updateInteraction=function(){2===this.fingers?this.setInteraction("zoom"):this.setInteraction(null)},e.prototype.performPinchZooming=function(e){var i=this.maps,o=i.tileZoomLevel,a=i.mapAreaRect;i.previousScale=i.scale,i.previousPoint=i.translatePoint;var n=i.tileTranslatePoint,l=Pe(this.touchStartList,this.touchMoveList),r=Ie(Te(this.touchMoveList,this.maps)),s=l/this.lastScale;this.lastScale=l,this.pinchFactor*=s,this.pinchFactor=Math.min(this.maps.zoomSettings.maxZoom,Math.max(this.pinchFactor,this.maps.zoomSettings.minZoom));var d,p=this.pinchFactor;if(i.isTileMap){var h=p;this.getTileTranslatePosition(o,h,{x:r.x,y:r.y}),i.tileZoomLevel=h,i.translatePoint.x=(i.tileTranslatePoint.x-.5*Math.pow(2,h))/Math.pow(2,h),i.translatePoint.y=(i.tileTranslatePoint.y-.5*Math.pow(2,h))/Math.pow(2,h),i.scale=Math.pow(2,h),(d=this.triggerZoomEvent(n,o,""))?(i.translatePoint=i.tileTranslatePoint=new Ze(0,0),i.scale=i.previousScale,i.tileZoomLevel=o,i.zoomSettings.zoomFactor=i.previousScale):i.mapLayerPanel.generateTiles(h,i.tileTranslatePoint)}else{var m=i.baseMapRectBounds.min,c=i.baseMapRectBounds.max,u=Math.abs(m.y-c.y),g=Math.abs(m.x-c.x),y=i.translatePoint,f=void 0,b=void 0;if(p<1.2&&"Eckert5"!==i.projectionType)0!==g&&0!==u&&g!==u||(g=a.width/2,u=a.height),p=(p=parseFloat(Math.min(a.width/g,a.height/u).toFixed(2)))>1.05?1:p,i.translatePoint=this.calculateInitalZoomTranslatePoint(p,g,u,a,m,i);else{var v=Math.abs(i.baseMapRectBounds.max.y-i.baseMapRectBounds.min.y)*p;f=y.x-(a.width/i.scale-a.width/p)/(a.width/r.x),b=y.y-(a.height/i.scale-a.height/p)/(a.height/r.y),f=v<i.mapAreaRect.height?a.x+(-m.x+(a.width/2-g/2)):f,b=v<i.mapAreaRect.height?a.y+(-m.y+(a.height/2-u/2)):b,i.translatePoint=new Ze(f,b)}i.scale=p,(d=this.triggerZoomEvent(n,o,""))&&(i.translatePoint=i.previousPoint,i.scale=i.previousScale)}d||this.applyTransform(i),t.Browser.isDevice&&this.removeToolbarOpacity(i.isTileMap?Math.round(i.tileZoomLevel):i.scale,i.element.id+"_Zooming_")},e.prototype.drawZoomRectangle=function(){var e=this.maps,t=this.mouseDownPoints,i=this.mouseMovePoints,o={width:1,color:this.maps.themeStyle.rectangleZoomBorderColor},a=Math.abs(i.x-t.x),n=Math.abs(i.y-t.y),l=i.x>t.x?t.x:t.x-a,r=i.y>t.y?t.y:t.y-n;ie(e.element.id).getBoundingClientRect();if(l>e.mapAreaRect.x&&l<e.mapAreaRect.x+e.mapAreaRect.width&&r>e.mapAreaRect.y&&r<e.mapAreaRect.y+e.mapAreaRect.height){this.zoomingRect=new et(l,r,a,n);var s=e.renderer.createSvg({id:e.element.id+"_Selection_Rect_Zooming",width:e.availableSize.width,height:e.availableSize.height,style:"position: absolute;"}),d=new Xe(e.element.id+"_ZoomRect",this.maps.themeStyle.rectangleZoomFillColor,o,this.maps.themeStyle.rectangleZoomFillOpacity,this.zoomingRect,0,0,"","3");s.appendChild(e.renderer.drawRectangle(d)),ie(e.element.id+"_Secondary_Element").appendChild(s)}},e.prototype.animateTransform=function(e,t,i,o,a){var n=this.currentLayer.animationDuration;t&&0!==n&&!this.maps.isTileMap?this.maps.isTileMap||Ne(e,0,n,new $e(i,o),a,this.maps.mapAreaRect,this.maps):e.setAttribute("transform","scale("+a+") translate( "+i+" "+o+" )")},e.prototype.applyTransform=function(e,i){var o;this.templateCount=0;var a,n=e.scale,l=e.translatePoint.x,r=e.translatePoint.y;if(e.zoomShapeCollection=[],document.getElementById(e.element.id+"_mapsTooltip")&&Q(e.element.id+"_mapsTooltip"),this.layerCollectionEle){for(var s=0;s<this.layerCollectionEle.childElementCount;s++){var d=this.layerCollectionEle.childNodes[s];if("g"===d.tagName){this.templateCount++,this.index=d.id.indexOf("_LayerIndex_")>-1&&parseFloat(d.id.split("_LayerIndex_")[1].split("_")[0]),this.currentLayer=e.layersCollection[this.index];for(var p=e.mapLayerPanel.calculateFactor(this.currentLayer),h=d.childElementCount,m=0;m<h;m++){var c=d.childNodes[m];if(c.id.indexOf("_Markers_Group")>-1||c.id.indexOf("_bubble_Group")>-1||c.id.indexOf("_dataLableIndex_Group")>-1){if(c.id.indexOf("_Markers_Group")>-1){this.isPanning||t.isNullOrUndefined(c.childNodes[0])||this.markerTranslates(c.childNodes[0],p,l,r,n,"Marker",d,i),c=d.childNodes[m];var u=void 0;if(!t.isNullOrUndefined(c)&&-1!==c.id.indexOf("Markers")){for(var g=0;g<c.childElementCount;g++){this.markerTranslate(c.childNodes[g],p,l,r,n,"Marker",i);parseInt(c.childNodes[g].id.split("_LayerIndex_")[1].split("_")[0],10);var y=parseInt(c.childNodes[g].id.split("_dataIndex_")[1].split("_")[0],10),f=parseInt(c.childNodes[g].id.split("_MarkerIndex_")[1].split("_")[0],10);u=this.currentLayer.markerSettings[f].animationDuration>0;for(var b=this.currentLayer.markerSettings[f].dataSource[y],v=0;v<this.currentLayer.markerSettings[f].initialMarkerSelection.length;v++)this.currentLayer.markerSettings[f].initialMarkerSelection[v].latitude!==b.latitude&&this.currentLayer.markerSettings[f].initialMarkerSelection[v].longitude!==b.longitude||e.markerSelection(this.currentLayer.markerSettings[f].selectionSettings,e,c.children[g],this.currentLayer.markerSettings[f].dataSource[y]);if((this.currentLayer.animationDuration>0||e.layersCollection[0].animationDuration>0&&"SubLayer"===this.currentLayer.type)&&!this.isPanning)if(e.isTileMap){var S=document.querySelector(".GroupElement");S&&!document.querySelector(".ClusterGroupElement")&&u&&(S.style.display="none")}else a="visibility:hidden",c.style.cssText=a}if(this.isPanning&&e.markerModule.sameMarkerData.length>0?F(e.markerModule.sameMarkerData,e,c,!0):e.markerModule.sameMarkerData.length>0&&(e.markerModule.sameMarkerData=[],document.getElementById(e.element.id+"_mapsTooltip")&&Q(e.element.id+"_mapsTooltip")),document.getElementById(e.element.id+"_mapsTooltip")&&e.mapsTooltipModule.tooltipTargetID.indexOf("_MarkerIndex_")&&!this.isPanning){var O=e.mapsTooltipModule,_=c.querySelector("#"+O.tooltipTargetID);if(!t.isNullOrUndefined(_))if("hidden"===_.style.visibility)Q(e.element.id+"_mapsTooltip");else{var C=parseFloat(_.getAttribute("transform").split("(")[1].split(")")[0].split(" ")[1]),M=parseFloat(_.getAttribute("transform").split("(")[1].split(")")[0].split(" ")[2]);e.isTileMap&&(C+=+ne(e.element.id+"_tile_parent").style.left.split("px")[0],M+=+ne(e.element.id+"_tile_parent").style.top.split("px")[0]),O.svgTooltip.location.x=C,O.svgTooltip.location.y=M,O.svgTooltip.enableAnimation=!1}}}}else if(c.id.indexOf("_bubble_Group")>-1){var L=void 0;for(g=0;g<c.childElementCount;g++){L=c.childNodes[g],o=parseFloat(L.id.split("_LayerIndex_")[1].split("_")[0]);for(var P=parseFloat(L.id.split("_BubbleIndex_")[1].split("_")[0]),w=(y=parseFloat(L.id.split("_BubbleIndex_")[1].split("_")[2]),0);w<e.bubbleModule.bubbleCollection.length;w++){var T=e.bubbleModule.bubbleCollection[w];if(T.LayerIndex===o&&T.BubbleIndex===P&&T.DataIndex===y){var I=(T.center.x+l)*n,k=(T.center.y+r)*n,N=this.currentLayer.animationDuration;i&&0!==N?Ee(L,0,N,new $e(I,k)):L.setAttribute("transform","translate( "+I+" "+k+" )");break}}}}else if(c.id.indexOf("_dataLableIndex_Group")>-1&&!t.isNullOrUndefined(e.layers[this.index])){this.intersect=[],e.zoomLabelPositions=[],e.zoomLabelPositions=e.dataLabelModule.dataLabelCollections;var E=!e.isTileMap&&i;for(g=0;g<c.childElementCount;g++)if(c.childNodes[g].id.indexOf("_LabelIndex_")>-1){var z=parseFloat(c.childNodes[g].id.split("_LabelIndex_")[1].split("_")[0]);this.zoomshapewidth=c.childNodes[g].getBoundingClientRect(),e.zoomShapeCollection.push(this.zoomshapewidth),this.dataLabelTranslate(c.childNodes[g],p,l,r,n,"DataLabel",E);var A=e.layers[this.index].dataLabelSettings.border;if(g>0&&A.width>1&&c.childNodes[g-1].id.indexOf("_rectIndex_")>-1&&!t.isNullOrUndefined(e.zoomLabelPositions[z])){var B=(e.zoomLabelPositions[z].location.x+l)*n,U=(e.zoomLabelPositions[z].location.y+r)*n,j=x(c.childNodes[g].textContent,e.layers[this.index].dataLabelSettings.textStyle),R=c.childNodes[g-1],Z=B-j.width/2,D=U-j.height/2-5;R.setAttribute("x",Z),R.setAttribute("y",D)}}}}else e.isTileMap&&c.id.indexOf("_line_Group")>-1?(c.remove(),d.children.length>0&&d.children[0]?d.insertBefore(e.navigationLineModule.renderNavigation(this.currentLayer,e.tileZoomLevel,this.index),d.children[1]):d.appendChild(e.navigationLineModule.renderNavigation(this.currentLayer,e.tileZoomLevel,this.index))):-1===c.id.indexOf("Legend")&&(Ce(c,this.index,n,e),e.zoomTranslatePoint=e.translatePoint,this.animateTransform(c,i,l,r,n))}}e.arrangeTemplate()}t.isNullOrUndefined(this.currentLayer)||i&&0!==this.currentLayer.animationDuration&&!e.isTileMap||this.processTemplate(l,r,n,e)}},e.prototype.markerTranslates=function(e,i,o,a,n,l,r,s){var d=this;void 0===s&&(s=!1);var p=0,c=0,u=0,g=parseInt((e||r).id.split("_LayerIndex_")[1].split("_")[0],10),y=this.maps.renderer.createGroup({id:this.maps.element.id+"_Markers_Group",class:"GroupElement"});y.style.pointerEvents="auto",document.getElementById(y.id)&&Q(y.id);var f=this.maps.mapAreaRect,b=t.createElement("div",{id:this.maps.element.id+"_LayerIndex_"+g+"_Markers_Template_Group",className:"template"});b.style.cssText="overflow: hidden; position: absolute;pointer-events: none;top:"+f.y+"px;left:"+f.x+"px;height:"+f.height+"px;width:"+f.width+"px;",document.getElementById(b.id)&&Q(b.id);var v=this.maps.layersCollection[g];v.markerSettings.map(function(e,s){var f=e.dataSource;Array.prototype.forEach.call(f,function(S,x){d.maps.markerNullCount=s>=0&&0===x?0:d.maps.markerNullCount;var O={template:e.template,data:S,maps:d.maps,marker:e,cancel:!1,name:Wt,fill:e.fill,colorValuePath:e.colorValuePath,shapeValuePath:e.shapeValuePath,height:e.height,width:e.width,imageUrl:e.imageUrl,imageUrlValuePath:e.imageUrlValuePath,shape:e.shape,border:e.border};O=T(O=I(O,S),S),d.maps.trigger("markerRendering",O,function(_){e.shapeValuePath!==O.shapeValuePath&&(O=I(O,S)),e.colorValuePath!==O.colorValuePath&&(O=T(O,S));var C=t.isNullOrUndefined(e.latitudeValuePath)?t.isNullOrUndefined(S.latitude)?t.isNullOrUndefined(S.Latitude)?null:S.Latitude:parseFloat(S.latitude):Number(w(S,e.latitudeValuePath)),M=t.isNullOrUndefined(e.longitudeValuePath)?t.isNullOrUndefined(S.longitude)?t.isNullOrUndefined(S.Longitude)?null:S.Longitude:parseFloat(S.longitude):Number(w(S,e.longitudeValuePath)),L=e.offset;if(!O.cancel&&e.visible&&!t.isNullOrUndefined(M)&&!t.isNullOrUndefined(C)){var P=d.maps.element.id+"_LayerIndex_"+g+"_MarkerIndex_"+s+"_dataIndex_"+x,N=d.maps.isTileMap?m(new $e(M,C),d.maps.tileZoomLevel,d.maps.tileTranslatePoint,!0):h(C,M,i,v,d.maps),F={x:o,y:a};!O.template||isNaN(N.x)||isNaN(N.y)?O.template||isNaN(N.x)||isNaN(N.y)||(c++,E(O,e,f,x,N,F,P,L,n,d.maps,y)):(u++,z(O,void 0,P,S,s,b,N,F,n,L,d.maps))}p+=isNaN(C)||isNaN(M)?1:0,u+=O.cancel?1:0,c+=O.cancel?1:0,d.maps.markerNullCount=t.isNullOrUndefined(C)||t.isNullOrUndefined(M)?d.maps.markerNullCount+1:d.maps.markerNullCount;var A=f.length-d.maps.markerNullCount;y.childElementCount===A-u-p&&"Template"!==l&&(r.appendChild(y),v.markerClusterSettings.allowClustering&&(d.maps.svgObject.appendChild(y),d.maps.element.appendChild(d.maps.svgObject),k(v,y,d.maps,g,y,r,!0,!0))),b.childElementCount===A-c-p&&ie(d.maps.element.id+"_Secondary_Element")&&(ie(d.maps.element.id+"_Secondary_Element").appendChild(b),n>=1&&v.markerClusterSettings.allowClustering&&k(v,b,d.maps,g,y,r,!1,!0))})})})},e.prototype.processTemplate=function(e,i,o,a){for(var n=0;n<this.templateCount;n++){var l=a.mapLayerPanel.calculateFactor(this.currentLayer),r=ie(a.element.id+"_LayerIndex_"+n+"_Markers_Template_Group"),s=ie(a.element.id+"_LayerIndex_"+n+"_Label_Template_Group");if(!t.isNullOrUndefined(r)&&r.childElementCount>0){r.style.visibility="visible";for(var d=0;d<r.childElementCount;d++)this.markerTranslate(r.childNodes[d],l,e,i,o,"Template")}if(!t.isNullOrUndefined(s)&&s.childElementCount>0)for(d=0;d<s.childElementCount;d++)this.dataLabelTranslate(s.childNodes[d],l,e,i,o,"Template")}},e.prototype.dataLabelTranslate=function(e,i,o,a,n,l,r){void 0===r&&(r=!1);var s,d,p,h,m,c=this.maps.dataLabelModule.dataLabelCollections,u=this.maps.layers[this.index].dataLabelSettings.textStyle,g=parseFloat(e.id.split("_LayerIndex_")[1].split("_")[0]),y=parseFloat(e.id.split("_shapeIndex_")[1].split("_")[0]);e.id.indexOf("_LabelIndex_")>-1&&(m=parseFloat(e.id.split("_LabelIndex_")[1].split("_")[0]));for(var f=this.currentLayer.animationDuration,b=0;b<c.length;b++){var v=c[b];if(v.layerIndex===g&&v.shapeIndex===y&&v.labelIndex===m){var S=v.location.x,O=v.location.y;if("Template"===l){var _=0,C=0;if(this.maps.isTileMap)_=(S+o)*n-(h=x(p=v.dataLabelText,u)).width/2,C=(O+a)*n-h.height;else{var M=ie(this.maps.element.id+"_Layer_Collections");S=Math.abs(this.maps.baseMapRectBounds.min.x-S)*n,O=Math.abs(this.maps.baseMapRectBounds.min.y-O)*n;var L=M.getBoundingClientRect(),P=e.parentElement.getBoundingClientRect();_=S+(L.left-P.left),C=O+(L.top-P.top)}e.style.left=_+"px",e.style.top=C+"px"}else{S=(S+o)*n;var w=(O=(O+a)*n)-(h=x(p=v.dataLabelText,u)).height/4,T=O+h.height/4;O=T;var I={rightWidth:S+h.width/2,leftWidth:S-h.width/2,heightTop:w,heightBottom:T};if(r&&0!==f||e.setAttribute("transform","translate( "+S+" "+O+" )"),"Hide"===this.maps.layers[this.index].dataLabelSettings.smartLabelMode&&(n>1?(s=this.maps.dataLabelShape[b]*n>=h.width?p:"",e.textContent=s):(s=this.maps.dataLabelShape[b]>=h.width?p:"",e.textContent=s)),"Trim"===this.maps.layers[this.index].dataLabelSettings.smartLabelMode&&(n>1?(s=Y(this.maps.dataLabelShape[b]*n,p,u),e.textContent=s):(s=Y(this.maps.dataLabelShape[b],p,u),e.textContent=s)),"Hide"===this.maps.layers[this.index].dataLabelSettings.intersectionAction){for(var k=0;k<this.intersect.length;k++)if(!t.isNullOrUndefined(this.intersect[k])){if(!(I.leftWidth>this.intersect[k].rightWidth||I.rightWidth<this.intersect[k].leftWidth||I.heightTop>this.intersect[k].heightBottom||I.heightBottom<this.intersect[k].heightTop)){s="",e.textContent=s;break}s=t.isNullOrUndefined(s)?p:s,e.textContent=s}this.intersect.push(I)}if("Trim"===this.maps.layers[this.index].dataLabelSettings.intersectionAction){for(var N=0;N<this.intersect.length;N++)if(!t.isNullOrUndefined(this.intersect[N]))if(I.rightWidth<this.intersect[N].leftWidth||I.leftWidth>this.intersect[N].rightWidth||I.heightBottom<this.intersect[N].heightTop||I.heightTop>this.intersect[N].heightBottom)d=t.isNullOrUndefined(s)?p:s,n>1&&(d=Y(this.maps.dataLabelShape[b]*n,d,u)),e.textContent=d;else{if(I.leftWidth>this.intersect[N].leftWidth){d=Y((F=this.intersect[N].rightWidth-I.leftWidth)-(I.rightWidth-I.leftWidth),s=t.isNullOrUndefined(s)?p:s,u),e.textContent=d;break}if(I.leftWidth<this.intersect[N].leftWidth){var F=I.rightWidth-this.intersect[N].leftWidth;d=Y(Math.abs(F-(I.rightWidth-I.leftWidth)),s=t.isNullOrUndefined(s)?p:s,u),e.textContent=d;break}}this.intersect.push(I),t.isNullOrUndefined(d)&&(d=Y(this.maps.dataLabelShape[b]*n,p,u),e.textContent=d)}(r||f>0)&&Ee(e,0,f,new $e(S,O))}}}},e.prototype.markerTranslate=function(e,i,o,a,n,l,r){void 0===r&&(r=!1);var s=parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10),d=parseInt(e.id.split("_MarkerIndex_")[1].split("_")[0],10),p=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),c=this.maps.layersCollection[s],u=c.markerSettings[d];if(!t.isNullOrUndefined(u)&&!t.isNullOrUndefined(u.dataSource)&&!t.isNullOrUndefined(u.dataSource[p])){var g=t.isNullOrUndefined(u.longitudeValuePath)?t.isNullOrUndefined(u.dataSource[p].longitude)?t.isNullOrUndefined(u.dataSource[p].Latitude)?0:parseFloat(u.dataSource[p].Latitude):parseFloat(u.dataSource[p].longitude):Number(w(u.dataSource[p],u.longitudeValuePath)),y=t.isNullOrUndefined(u.latitudeValuePath)?t.isNullOrUndefined(u.dataSource[p].latitude)?t.isNullOrUndefined(u.dataSource[p].Latitude)?0:parseFloat(u.dataSource[p].Latitude):parseFloat(u.dataSource[p].latitude):Number(w(u.dataSource[p],u.latitudeValuePath)),f=this.currentLayer.animationDuration,b=this.maps.isTileMap?m(new Ze(g,y),this.maps.tileZoomLevel,this.maps.tileTranslatePoint,!0):h(y,g,i,c,this.maps);if(this.maps.isTileMap)if("Template"===l){var v=e.getBoundingClientRect();if(e.style.left=b.x-v.width/2+u.offset.x+"px",e.style.top=b.y-v.height/2+u.offset.y+"px","GoogleStaticMap"===this.maps.layers[this.maps.baseLayerIndex].layerType){var S=ie(this.maps.element.id+"_StaticGoogleMap").getBoundingClientRect();"none"!==e.style.display&&((S.x>v.x||S.x+640<v.x+v.width)&&(S.y>v.y||S.y+S.height<v.y+v.height)?e.style.display="none":(S.x>v.x||S.x+640<v.x+v.width)&&(e.style.display="none"))}}else b.x+=u.offset.x,b.y+=u.offset.y,e.setAttribute("transform","translate( "+b.x+" "+b.y+" )");else if("Template"===l)if(f>0){b.x=Math.abs(this.maps.baseMapRectBounds.min.x-b.x)*n,b.y=Math.abs(this.maps.baseMapRectBounds.min.y-b.y)*n;var x=ie(this.maps.element.id+"_Layer_Collections").getBoundingClientRect(),O=e.parentElement.getBoundingClientRect();e.style.left=b.x+(x.left-O.left)+u.offset.x+"px",e.style.top=b.y+(x.top-O.top)+u.offset.y+"px",e.style.transform="translate(-50%, -50%)"}else{O=e.getBoundingClientRect();e.style.left=(b.x+o)*n+u.offset.x-this.maps.mapAreaRect.x-O.width/2+"px",e.style.top=(b.y+a)*n+u.offset.y-this.maps.mapAreaRect.y-O.height/2+"px"}else b.x=(b.x+o)*n+u.offset.x,b.y=(b.y+a)*n+u.offset.y,r&&0!==f?Ee(e,0,f,b):e.setAttribute("transform","translate( "+b.x+" "+b.y+" )")}},e.prototype.markerLineAnimation=function(e){if(e.isTileMap)for(var i=0;i<e.layersCollection.length;i++){var o=ie(this.maps.element.id+"_LayerIndex_"+i+"_Markers_Template_Group"),a=ie(this.maps.element.id+"_LayerIndex_"+i+"_line_Group");t.isNullOrUndefined(o)||(o.style.visibility="hidden"),t.isNullOrUndefined(a)||(a.style.visibility="hidden")}},e.prototype.panning=function(e,i,o,a){var n,l=this.maps,r=this.mouseDownPoints,s=this.mouseMovePoints,d=l.scale;l.markerZoomedState=!1,l.zoomPersistence=l.enablePersistence,l.defaultState=!1,l.initialCheck=!1;var p,h,m=l.translatePoint,c=l.tileTranslatePoint;if(i=t.isNullOrUndefined(i)?r.x-s.x:i,o=t.isNullOrUndefined(o)?r.y-s.y:o,this.maps.mergeCluster(),l.isTileMap){if(this.maps.tileZoomLevel>1){p=l.tileTranslatePoint.x-i,h=l.tileTranslatePoint.y-o,this.distanceX=p-l.tileTranslatePoint.x,this.distanceY=h-l.tileTranslatePoint.y,l.tileTranslatePoint.x=p,l.tileTranslatePoint.y=h,(l.tileTranslatePoint.y>-10&&o<0||l.tileTranslatePoint.y<-256*(Math.pow(2,this.maps.tileZoomLevel)-2)&&o>0)&&(l.tileTranslatePoint.x=p+i,l.tileTranslatePoint.y=h+o),l.translatePoint.x=(l.tileTranslatePoint.x-i)/l.scale,l.translatePoint.y=(l.tileTranslatePoint.y-o)/l.scale;var u=this.maps.getTileGeoLocation(a.layerX,a.layerY);n={cancel:!1,name:"pan",maps:l,tileTranslatePoint:{previous:c,current:l.tileTranslatePoint},translatePoint:{previous:m,current:l.translatePoint},scale:l.scale,tileZoomLevel:l.tileZoomLevel,latitude:u.latitude,longitude:u.longitude},l.trigger("pan",n),l.mapLayerPanel.generateTiles(l.tileZoomLevel,l.tileTranslatePoint,"Pan"),this.applyTransform(l)}}else{var g=document.getElementById(l.element.id+"_Legend_Group"),y=t.isNullOrUndefined(g)?0:g.getClientRects()[0].height;p=m.x-i/d,h=m.y-o/d;var f=ie(l.element.id+"_Layer_Collections").getBoundingClientRect(),b=ie(l.element.id+"_svg").getBoundingClientRect(),v=i<0?f.left<=b.left+l.mapAreaRect.x:f.left+f.width+l.mapAreaRect.x>=b.width,S=o<0?f.top<=b.top+l.mapAreaRect.y:f.top+f.height+y+l.margin.top>=b.top+b.height,x=this.maps.getGeoLocation(this.maps.layersCollection.length-1,a.layerX,a.layerY);n={cancel:!1,name:"pan",maps:l,tileTranslatePoint:{},translatePoint:{previous:m,current:new Ze(p,h)},scale:l.scale,tileZoomLevel:l.tileZoomLevel,latitude:x.latitude,longitude:x.longitude},l.trigger("pan",n),n.cancel||(v&&S?(l.translatePoint=new Ze(p,h),this.applyTransform(l)):v?(l.translatePoint=new Ze(p,l.translatePoint.y),this.applyTransform(l)):S&&(l.translatePoint=new Ze(l.translatePoint.x,h),this.applyTransform(l))),this.maps.zoomNotApplied=!1}l.zoomTranslatePoint=l.translatePoint,this.mouseDownPoints=this.mouseMovePoints,this.isSingleClick=!1},e.prototype.toAlignSublayer=function(){this.maps.translatePoint.x=t.isNullOrUndefined(this.distanceX)?this.maps.translatePoint.x:this.maps.translatePoint.x-this.distanceX/this.maps.scale,this.maps.translatePoint.y=t.isNullOrUndefined(this.distanceY)?this.maps.translatePoint.y:this.maps.translatePoint.y-this.distanceY/this.maps.scale,this.applyTransform(this.maps,!1)},e.prototype.toolBarZooming=function(e,t){var i=this,o=this.maps;o.initialCheck=!1,o.defaultState="Reset"===t&&1===e&&!(o.zoomSettings.resetToInitial&&o.applyZoomReset)||"ZoomOut"===t&&1===e;var a=o.tileZoomLevel,n=o.previousScale=o.scale;o.markerZoomedState=!1,o.zoomPersistence=o.enablePersistence,o.mapScaleValue=e;var l=o.zoomSettings.maxZoom,r=o.zoomSettings.minZoom,s=o.mapAreaRect,d=o.previousPoint=o.translatePoint,p=o.tileTranslatePoint;if(o.previousProjection=o.projectionType,e="ZoomOut"===t&&1===Math.round(e)?1:e,e="Reset"===t?r:0===Math.round(e)?1:e,e=r>e&&"ZoomIn"===t?r+1:e,!o.isTileMap&&("ZoomIn"===t?e>=r&&Math.round(e)<=l:e>=r||o.isReset)){var h=o.baseMapRectBounds.min,m=o.baseMapRectBounds.max,c=Math.abs(m.x-h.x),u=Math.abs(h.y-m.y),g=void 0,y=void 0;if(e<1.2&&"Eckert5"!==o.projectionType)0!==u&&0!==c&&u!==c||(c=s.width/2,u=s.height),e=(e=parseFloat(Math.min(s.width/c,s.height/u).toFixed(2)))>1.05?1:e,o.translatePoint=this.calculateInitalZoomTranslatePoint(e,c,u,s,h,o);else{g=d.x-(s.width/n-s.width/e)/2,y=d.y-(s.height/n-s.height/e)/2;var f=Math.abs(o.baseMapRectBounds.max.y-o.baseMapRectBounds.min.y)*e;g=f<o.mapAreaRect.height?s.x+(-h.x+(s.width/2-c/2)):g,y=f<o.mapAreaRect.height?s.y+(-h.y+(s.height/2-u/2)):y,o.translatePoint=new Ze(g,y)}o.zoomTranslatePoint=o.translatePoint,o.scale=e,this.triggerZoomEvent(p,a,t)?(o.translatePoint=o.zoomTranslatePoint=o.previousPoint,o.scale=o.previousScale):this.applyTransform(o,!0)}else if(o.isTileMap&&(e>=r&&e<=l||o.isReset)){var b=a<r&&!o.isReset?r:e;if(o.scale=Math.pow(2,b-1),o.tileZoomLevel=b,o.previousScale!==o.scale||o.isReset){o.zoomSettings.zoomFactor=e;var v={x:o.availableSize.width/2,y:o.availableSize.height/2};if(this.getTileTranslatePosition(a,b,v,t),(o.zoomSettings.resetToInitial&&o.applyZoomReset&&"Reset"===t||"ZoomOut"===t&&o.zoomSettings.resetToInitial&&o.applyZoomReset&&b<=o.initialZoomLevel)&&(o.initialCheck=!0,o.zoomPersistence=!1,o.tileTranslatePoint.x=o.initialTileTranslate.x,o.tileTranslatePoint.y=o.initialTileTranslate.y,b=o.tileZoomLevel=o.mapScaleValue=o.initialZoomLevel),this.triggerZoomEvent(p,a,t))o.translatePoint=o.tileTranslatePoint=new Ze(0,0),o.scale=o.previousScale,o.tileZoomLevel=a,o.zoomSettings.zoomFactor=o.previousScale;else{o.translatePoint.y=(o.tileTranslatePoint.y-.01*o.mapScaleValue)/o.scale,o.translatePoint.x=(o.tileTranslatePoint.x-.01*o.mapScaleValue)/o.scale,document.getElementById(this.maps.element.id+"_LayerIndex_1")&&(document.getElementById(this.maps.element.id+"_LayerIndex_1").style.display="none"),document.querySelector(".GroupElement")&&(document.querySelector(".GroupElement").style.display="none"),this.markerLineAnimation(o),o.mapLayerPanel.generateTiles(b,o.tileTranslatePoint,t);document.getElementById(this.maps.element.id+"_tiles");var S=this.maps.layersCollection[0].animationDuration;setTimeout(function(){i.applyTransform(i.maps,!0),document.getElementById(i.maps.element.id+"_LayerIndex_1")&&(document.getElementById(i.maps.element.id+"_LayerIndex_1").style.display="block"),i.maps.isAddLayer=!1},S)}}this.maps.zoomNotApplied=!1}},e.prototype.createZoomingToolbars=function(){var e=this.maps;this.toolBarGroup=e.renderer.createGroup({id:e.element.id+"_Zooming_KitCollection",opacity:"fluentdark"===e.theme.toLowerCase()?.6:.3});var i=15,o=15,a=e.zoomSettings.toolbarSettings,n=e.zoomSettings.toolbarSettings.buttonSettings;this.maps.toolbarProperties={toolBarOrientation:"Horizontal"===a.orientation?e.zoomSettings.toolBarOrientation:a.orientation,highlightColor:null==n.highlightColor?e.zoomSettings.highlightColor:n.highlightColor,selectionColor:null==n.selectionColor?e.zoomSettings.selectionColor:n.selectionColor,horizontalAlignment:"Far"===a.horizontalAlignment?e.zoomSettings.horizontalAlignment:a.horizontalAlignment,verticalAlignment:"Near"===a.verticalAlignment?e.zoomSettings.verticalAlignment:a.verticalAlignment,color:null==n.color?e.zoomSettings.color:n.color,shapeOpacity:1!==n.opacity?n.opacity:1,borderOpacity:1!==n.borderOpacity?n.borderOpacity:1};var l=n.radius/4,r=n.radius/4,s=n.radius/2,d=n.padding,p=this.maps.toolbarProperties.toolBarOrientation,h=e.zoomSettings.toolbarSettings.buttonSettings.toolbarItems.map(function(e){return e}),m=3===h.length?e.zoomSettings.toolbars:h;i=n.radius/4+n.borderWidth/2+d,o=n.radius/4+n.borderWidth/2+d;var c='<filter id="chart_shadow" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="5"/>';c+='<feOffset dx="-3" dy="4" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="1"/>',c+='</feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>';var u=h.length,g="Horizontal"===p?u*n.radius+u*d+d+u*n.borderWidth:n.radius+n.borderWidth+2*d,y="Horizontal"===p?n.radius+n.borderWidth+2*d:u*n.radius+u*d+d+u*n.borderWidth,f=e.renderer.createDefs();f.innerHTML=c,this.toolBarGroup.appendChild(f);var b=e.renderer.drawRectangle(new Xe(e.element.id+"_Zooming_Rect",a.backgroundColor,{color:a.borderColor,width:a.borderWidth,opacity:a.borderOpacity},a.borderOpacity,new et(a.borderWidth/2,a.borderWidth/2,g-a.borderWidth,y-a.borderWidth),0,0));this.toolBarGroup.appendChild(b);for(var v=(n.radius-n.borderWidth/2)/30,S=0;S<m.length;S++){0!==S&&(i="Horizontal"===e.toolbarProperties.toolBarOrientation?i+(n.radius+d)+n.borderWidth:i,o="Horizontal"===e.toolbarProperties.toolBarOrientation?o:o+(n.radius+d)+n.borderWidth);var x=m[S],O=t.isNullOrUndefined(this.maps.toolbarProperties.color)?this.maps.themeStyle.zoomFillColor:this.maps.toolbarProperties.color,_=n.borderColor||this.maps.themeStyle.zoomFillColor;this.currentToolbarEle=e.renderer.createGroup({id:e.element.id+"_Zooming_ToolBar_"+x+"_Group",transform:"translate( "+i+" "+o+" ) "}),this.currentToolbarEle.setAttribute("class","e-maps-toolbar"),this.currentToolbarEle.appendChild(e.renderer.drawCircle(new qe(e.element.id+"_Zooming_ToolBar_"+x+"_Rect",n.fill,{color:_,width:n.borderWidth,opacity:n.borderOpacity},n.opacity,l,r,s,"")));var C="",M=n.fill;switch(this.selectionColor=this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor,x.toLowerCase()){case"zoom":var L=void 0,P=void 0;C="M0.001,14.629L1.372,16l4.571-4.571v-0.685l0.228-0.274c1.051,0.868,2.423,1.417,3.885,1.417c3.291,0,",C+="5.943-2.651,5.943-5.943S13.395,0,10.103,0S4.16,2.651,4.16,5.943c0,1.508,0.503,2.834,1.417,3.885l-0.274,0.228H4.571",C+="L0.001,14.629L0.001,14.629z M5.943,5.943c0-2.285,1.828-4.114,4.114-4.114s4.114,1.828,4.114,",this.currentToolbarEle.setAttribute("class",this.maps.zoomSettings.enableSelectionZooming?"e-maps-toolbar":""),this.maps.zoomSettings.enablePanning&&!this.maps.zoomSettings.enableSelectionZooming?(L=M,P=O):this.maps.zoomSettings.enablePanning&&this.maps.zoomSettings.enableSelectionZooming?(L=M,P=O):this.maps.zoomSettings.enablePanning||this.maps.zoomSettings.enableSelectionZooming?!this.maps.zoomSettings.enablePanning&&this.maps.zoomSettings.enableSelectionZooming?(L=this.maps.themeStyle.zoomFillColor,P=O):this.maps.zoomSettings.enablePanning||this.maps.zoomSettings.enableSelectionZooming?(L=this.selectionColor,P=this.selectionColor):(L=M,P=O):(L=M,P=O);var w=e.renderer.drawPath(new Ge(e.element.id+"_Zooming_ToolBar_"+x,L,1,P,1,1,null,C+"4.114s-1.828,4.114-4.114,4.114S5.943,8.229,5.943,5.943z"));w.setAttribute("transform","scale( "+v+","+v+" )"),this.currentToolbarEle.appendChild(w),this.zoomElements=this.currentToolbarEle,this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"zoomin":C="M 8, 0 L 8, 16 M 0, 8 L 16, 8";var T=e.renderer.drawPath(new Ge(e.element.id+"_Zooming_ToolBar_"+x+"_Path",M,3,O,1,1,null,C));T.setAttribute("transform","scale( "+v+","+v+" )"),this.currentToolbarEle.appendChild(T),this.currentToolbarEle,this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"zoomout":C="M 0, 8 L 16, 8";var I=e.renderer.drawPath(new Ge(e.element.id+"_Zooming_ToolBar_"+x,M,3,O,1,1,null,C));I.setAttribute("transform","scale( "+v+","+v+" )"),this.currentToolbarEle.appendChild(I),this.currentToolbarEle,this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"pan":var k=void 0;C="M5,3h2.3L7.275,5.875h1.4L8.65,3H11L8,0L5,3z M3,11V8.7l2.875,0.025v-1.4L3,7.35V5L0,8L3,",C+="11z M11,13H8.7l0.025-2.875h-1.4L7.35,13H5l3,3L11,13z M13,5v2.3l-2.875-0.025v1.4L13,8.65V11l3-3L13,5z",this.currentToolbarEle.setAttribute("class",this.maps.zoomSettings.enablePanning?"e-maps-toolbar":""),this.maps.zoomSettings.enablePanning&&this.maps.zoomModule.isDragZoom?k=this.selectionColor||this.maps.themeStyle.zoomFillColor:this.maps.zoomSettings.enablePanning?k=M||this.maps.themeStyle.zoomFillColor:(k=this.selectionColor||this.maps.themeStyle.zoomFillColor,this.currentToolbarEle.setAttribute("class",""));var N=e.renderer.drawPath(new Ge(e.element.id+"_Zooming_ToolBar_"+x,k,1,O,1,1,null,C));N.setAttribute("transform","scale( "+v+","+v+" )"),this.currentToolbarEle.appendChild(N),this.panColor=k,this.panElements=this.currentToolbarEle,this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"reset":C="M12.364,8h-2.182l2.909,3.25L16,8h-2.182c0-3.575-2.618-6.5-5.818-6.5c-1.128,0-2.218,0.366-3.091,",C+="1.016l1.055,1.178C6.581,3.328,7.272,3.125,8,3.125C10.4,3.125,12.363,5.319,12.364,8L12.364,8z M11.091,",C+="13.484l-1.055-1.178C9.419,12.672,8.728,12.875,8,12.875c-2.4,0-4.364-2.194-4.364-4.875h2.182L2.909,4.75L0,8h2.182c0,";var F=e.renderer.drawPath(new Ge(e.element.id+"_Zooming_ToolBar_"+x,M,null,O,1,1,null,C+"3.575,2.618,6.5,5.818,6.5C9.128,14.5,10.219,14.134,11.091,13.484L11.091,13.484z"));F.setAttribute("transform","scale( "+v+","+v+" )"),this.currentToolbarEle.appendChild(F),this.wireEvents(this.currentToolbarEle,this.performToolBarAction)}this.toolBarGroup.appendChild(this.currentToolbarEle)}},e.prototype.performToolBarAction=function(e){var t=e.target;e.stopImmediatePropagation();var i="touch"===e.pointerType||"2"===e.pointerType||e.type.indexOf("touch")>-1,o=t.id.split("_Zooming_ToolBar_")[1].split("_")[0],a=!0;switch(o.toLowerCase()){case"zoomin":a=(this.maps.isTileMap?this.maps.tileZoomLevel:this.maps.scale)+1<=this.maps.zoomSettings.maxZoom;break;case"zoomout":a=(this.maps.isTileMap?this.maps.tileZoomLevel:this.maps.scale)-1>=this.maps.zoomSettings.minZoom;break;case"reset":a=Math.round(this.maps.isTileMap?this.maps.tileZoomLevel:this.maps.scale)!=this.maps.zoomSettings.minZoom}i&&a?(this.handled=!0,this.performZoomingByToolBar(o)):"mousedown"!==e.type&&"pointerdown"!==e.type||this.handled||!a?this.handled=!1:(this.handled=!1,this.performZoomingByToolBar(o))},e.prototype.performZoomingByToolBar=function(e){var t=this.maps;t.isReset=!1;var i=0,o=this.fillColor||this.maps.themeStyle.zoomFillColor;switch(e.toLowerCase()){case"zoom":this.panColor=o,this.zoomColor=this.maps.zoomSettings.enableSelectionZooming?this.selectionColor:o,this.applySelection(this.zoomElements,this.zoomColor),this.applySelection(this.panElements,this.panColor),this.isPan=!1,this.isZoomSelection=this.maps.zoomSettings.enableSelectionZooming;break;case"pan":this.panColor=this.maps.zoomSettings.enablePanning?this.selectionColor:o,this.zoomColor=o,this.maps.zoomSettings.enablePanning?(this.applySelection(this.zoomElements,this.fillColor||o),this.applySelection(this.panElements,this.panColor)):(this.applySelection(this.zoomElements,this.selectionColor),this.applySelection(this.panElements,this.panColor)),this.isPan=this.maps.zoomSettings.enablePanning,this.isZoomSelection=!1;break;case"zoomin":t.staticMapZoom=t.tileZoomLevel,t.staticMapZoom>0&&t.staticMapZoom<22&&(t.staticMapZoom+=1),this.toolBarZooming((t.isTileMap?t.tileZoomLevel:t.scale)+1,"ZoomIn"),i=this.maps.isTileMap?Math.round(this.maps.tileZoomLevel):Math.round(this.maps.mapScaleValue),this.isZoomSelection||(i===t.zoomSettings.maxZoom||i>1||1===i&&this.maps.isTileMap?(this.applySelection(this.zoomElements,o),this.applySelection(this.panElements,t.zoomSettings.enablePanning?this.selectionColor:o)):1!==i||this.maps.isTileMap||(this.applySelection(this.zoomElements,o),this.applySelection(this.panElements,o)));break;case"zoomout":t.staticMapZoom=t.tileZoomLevel,t.markerCenterLatitude=null,t.markerCenterLongitude=null,this.toolBarZooming((t.isTileMap?t.tileZoomLevel:t.scale)-1,"ZoomOut"),i=this.maps.isTileMap?Math.round(this.maps.tileZoomLevel):Math.round(this.maps.mapScaleValue),!this.isPan&&this.isZoomSelection?(this.panColor=o,this.zoomColor=this.selectionColor,this.applySelection(this.zoomElements,this.selectionColor),this.applySelection(this.panElements,this.panColor)):i<=1&&!t.isTileMap?this.applySelection(this.panElements,o):this.applySelection(this.panElements,t.zoomSettings.enablePanning?this.selectionColor:o);break;case"reset":t.staticMapZoom=t.zoomSettings.enable?t.zoomSettings.zoomFactor:0,t.markerCenterLatitude=null,t.markerCenterLongitude=null,this.isZoomSelection=!1,this.isPan=t.zoomSettings.enablePanning,this.toolBarZooming(t.zoomSettings.minZoom,"Reset"),this.isPan&&!this.isZoomSelection||!this.isPan&&this.isZoomSelection?this.maps.zoomSettings.enablePanning?(this.applySelection(this.zoomElements,o),this.applySelection(this.panElements,this.selectionColor)):(this.applySelection(this.zoomElements,this.selectionColor),this.applySelection(this.panElements,o)):this.isPan||this.isZoomSelection||(this.applySelection(this.zoomElements,o),this.applySelection(this.panElements,o))}this.panningStyle(e.toLowerCase())},e.prototype.panningStyle=function(e){var t=ie(this.maps.element.id+"_svg");"pan"===e||this.isPanning&&"reset"!==e?t.setAttribute("class","e-maps-panning"):t.setAttribute("class","")},e.prototype.applySelection=function(e,t){if(e)for(var i,o=0;o<e.childElementCount;o++)"circle"!==(i=e.childNodes[o]).tagName&&(i.setAttribute("fill",e.id.indexOf("Pan")>-1?t:"transparent"),i.setAttribute("stroke",t))},e.prototype.showTooltip=function(e){var t=e.target.id.split("_Zooming_ToolBar_")[1].split("_")[0],i=this.maps.zoomSettings.toolbarSettings.tooltipSettings,o={visible:i.visible,fill:i.fill,borderOpacity:i.borderOpacity,borderWidth:i.borderWidth,borderColor:i.borderColor,fontColor:i.fontColor,fontFamily:i.fontFamily,fontStyle:i.fontStyle,fontWeight:i.fontWeight,fontSize:i.fontSize||"10px",fontOpacity:i.fontOpacity};o.fontFamily=this.maps.themeStyle.fontFamily,this.isTouch||(ve("EJ2_Map_Toolbar_Tip",this.maps.getLocalizedLabel(t),e.pageY+10,e.pageX+10,o),this.maps.isDevice&&(clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeTooltip.bind(this),2e3)))},e.prototype.removeTooltip=function(){ie("EJ2_Map_Toolbar_Tip")&&t.remove(ie("EJ2_Map_Toolbar_Tip"))},e.prototype.alignToolBar=function(){var e=this.maps,i=t.createElement("div",{id:e.element.id+"_ToolBar"});i.style.cssText="position:absolute;z-index:2";var o=e.renderer.createSvg({id:e.element.id+"_Zooming_ToolBar",width:10,height:10});o.appendChild(this.toolBarGroup),i.appendChild(o),ie(e.element.id+"_Secondary_Element")&&ie(e.element.id+"_Secondary_Element").appendChild(i);var a=this.toolBarGroup.getBoundingClientRect();o.setAttribute("height",(a.height+e.zoomSettings.toolbarSettings.borderWidth).toString()),o.setAttribute("width",(a.width+e.zoomSettings.toolbarSettings.borderWidth).toString());var n=t.isNullOrUndefined(e.totalRect)?e.mapAreaRect:e.totalRect,l=0,r=0;switch(e.toolbarProperties.verticalAlignment){case"Near":r=n.y;break;case"Center":r=n.height/2-a.height/2;break;case"Far":r=n.height-a.height-10}switch(e.toolbarProperties.horizontalAlignment){case"Near":l=n.x;break;case"Center":l=n.width/2-a.width/2;break;case"Far":l=t.isNullOrUndefined(e.legendModule)||"Left"!==e.legendSettings.position?n.width-a.width-10:n.width+n.x-a.width-10}i.style.left=l+"px",i.style.top=r+"px";var s=this.maps.toolbarProperties.highlightColor||this.maps.themeStyle.zoomSelectionColor,d=" .e-maps-toolbar:hover > circle { stroke:"+s+"; } .e-maps-toolbar:hover > path { fill: "+s+" ; stroke: "+s+"; }.e-maps-toolbar:hover { cursor: pointer; } .e-maps-cursor-disable:hover { cursor: not-allowed; } .e-maps-panning:hover { cursor: pointer; } .e-maps-popup-close { display: block; opacity: 0; }",p=document.createElement("style");p.appendChild(document.createTextNode(d)),i.appendChild(p)},e.prototype.removeToolbarOpacity=function(e,t){if(this.maps.zoomModule&&this.maps.zoomSettings.enable)if(ie(this.maps.element.id+"_Zooming_KitCollection")&&t.indexOf(this.maps.element.id+"_Zooming_")>-1){this.maps.isDevice?(ie(this.maps.element.id+"_Zooming_KitCollection").setAttribute("opacity","1"),this.removeToolbarClass("","","","","")):this.removeToolbarClass(this.maps.zoomSettings.enableSelectionZooming?"e-maps-toolbar":"","e-maps-toolbar","e-maps-toolbar",this.maps.zoomSettings.enablePanning?"e-maps-toolbar":"","e-maps-toolbar");var i=this.maps.toolbarProperties.shapeOpacity,o=this.maps.toolbarProperties.borderOpacity;this.maps.isTileMap&&(e<=1.1||this.maps.zoomSettings.minZoom===e)?(this.maps.isDevice||this.removeToolbarClass(this.maps.zoomSettings.enableSelectionZooming?"e-maps-toolbar":"","e-maps-toolbar","",this.maps.zoomSettings.enablePanning?"e-maps-toolbar":"",""),this.maps.zoomSettings.enablePanning&&this.removePanColor(this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor),this.isZoomSelection&&this.maps.zoomSettings.enableSelectionZooming&&!this.maps.isReset&&(this.removeZoomColor(this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor),this.removePanColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor)),this.removeZoomOpacity(this.maps.zoomSettings.enableSelectionZooming?i:.3,this.maps.zoomSettings.enableSelectionZooming?o:.3,i,o,.3,.3,this.maps.zoomSettings.enablePanning?i:.3,this.maps.zoomSettings.enablePanning?o:.3,.3,.3)):e<=1.1||this.maps.zoomSettings.minZoom===e?(this.maps.isDevice||this.removeToolbarClass(this.maps.zoomSettings.enableSelectionZooming?"e-maps-toolbar":"","e-maps-toolbar","","",""),!this.isZoomSelection&&this.maps.zoomSettings.enablePanning&&this.removePanColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor),this.isZoomSelection&&this.maps.zoomSettings.enableSelectionZooming&&!this.maps.isReset&&(this.removeZoomColor(this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor),this.removePanColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor)),this.removeZoomOpacity(this.maps.zoomSettings.enableSelectionZooming?i:.3,this.maps.zoomSettings.enableSelectionZooming?o:.3,i,o,.3,.3,.3,.3,.3,.3)):e<this.maps.zoomSettings.maxZoom?(this.maps.isDevice||this.removeToolbarClass(this.maps.zoomSettings.enableSelectionZooming?"e-maps-toolbar":"","e-maps-toolbar","e-maps-toolbar",this.maps.zoomSettings.enablePanning?"e-maps-toolbar":"","e-maps-toolbar"),this.maps.zoomModule.isZoomFinal?this.maps.zoomModule.isZoomFinal=!1:this.removeZoomOpacity(this.maps.zoomSettings.enableSelectionZooming?i:.3,this.maps.zoomSettings.enableSelectionZooming?o:.3,i,o,i,o,this.maps.zoomSettings.enablePanning?i:.3,this.maps.zoomSettings.enablePanning?o:.3,i,o),this.isZoomSelection&&this.maps.zoomSettings.enableSelectionZooming?(this.removeZoomColor(this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor),this.maps.zoomModule.isPan&&this.maps.zoomSettings.enablePanning&&this.removePanColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor)):!this.isZoomSelection&&this.maps.zoomSettings.enablePanning&&(this.removePanColor(this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor),this.maps.zoomSettings.enableSelectionZooming&&this.removeZoomColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor))):(this.maps.isDevice||this.removeToolbarClass("","","e-maps-toolbar",this.maps.zoomSettings.enablePanning?"e-maps-toolbar":"","e-maps-toolbar"),this.removeZoomOpacity(.3,.3,.3,.3,i,o,this.maps.zoomSettings.enablePanning?i:.3,this.maps.zoomSettings.enablePanning?o:.3,i,o),this.maps.zoomSettings.enableSelectionZooming&&this.removeZoomColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor),!this.isZoomSelection&&this.maps.zoomSettings.enablePanning&&this.removePanColor(this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor))}else this.maps.isDevice||(this.removePanColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor),this.removeZoomColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor),this.removeZoomOpacity(1,1,1,1,1,1,1,1,1,1))},e.prototype.setOpacity=function(e,t,i,o){ie(this.maps.element.id+e)&&(ie(this.maps.element.id+e).setAttribute("stroke-opacity",i.toString()),ie(this.maps.element.id+e).setAttribute("fill-opacity",i.toString()),ie(this.maps.element.id+t).setAttribute("stroke-opacity",o.toString()),ie(this.maps.element.id+t).setAttribute("fill-opacity",o.toString()))},e.prototype.removeZoomOpacity=function(e,t,i,o,a,n,l,r,s,d){this.setOpacity("_Zooming_ToolBar_Zoom_Rect","_Zooming_ToolBar_Zoom",t,e),this.setOpacity("_Zooming_ToolBar_ZoomIn_Rect","_Zooming_ToolBar_ZoomIn_Path",o,i),this.setOpacity("_Zooming_ToolBar_ZoomOut_Rect","_Zooming_ToolBar_ZoomOut",n,a),this.setOpacity("_Zooming_ToolBar_Pan_Rect","_Zooming_ToolBar_Pan",r,l),this.setOpacity("_Zooming_ToolBar_Reset_Rect","_Zooming_ToolBar_Reset",d,s)},e.prototype.removeToolbarClass=function(e,t,i,o,a){ie(this.maps.element.id+"_Zooming_KitCollection")&&(document.getElementById(this.maps.element.id+"_Zooming_ToolBar_ZoomIn_Group")&&ie(this.maps.element.id+"_Zooming_ToolBar_ZoomIn_Group").setAttribute("class",t),document.getElementById(this.maps.element.id+"_Zooming_ToolBar_ZoomOut_Group")&&ie(this.maps.element.id+"_Zooming_ToolBar_ZoomOut_Group").setAttribute("class",i),document.getElementById(this.maps.element.id+"_Zooming_ToolBar_Reset_Group")&&ie(this.maps.element.id+"_Zooming_ToolBar_Reset_Group").setAttribute("class",a),document.getElementById(this.maps.element.id+"_Zooming_ToolBar_Zoom_Group")&&this.maps.zoomSettings.enableSelectionZooming&&ie(this.maps.element.id+"_Zooming_ToolBar_Zoom_Group").setAttribute("class",e),document.getElementById(this.maps.element.id+"_Zooming_ToolBar_Pan_Group")&&this.maps.zoomSettings.enablePanning&&ie(this.maps.element.id+"_Zooming_ToolBar_Pan_Group").setAttribute("class",o))},e.prototype.removePanColor=function(e){ie(this.maps.element.id+"_Zooming_ToolBar_Pan_Rect")&&this.maps.zoomSettings.enablePanning&&(ie(this.maps.element.id+"_Zooming_ToolBar_Pan").setAttribute("fill",e),ie(this.maps.element.id+"_Zooming_ToolBar_Pan").setAttribute("stroke",e))},e.prototype.removeZoomColor=function(e){ie(this.maps.element.id+"_Zooming_ToolBar_Zoom_Rect")&&this.maps.zoomSettings.enableSelectionZooming&&(ie(this.maps.element.id+"_Zooming_ToolBar_Zoom").setAttribute("fill","transparent"),ie(this.maps.element.id+"_Zooming_ToolBar_Zoom").setAttribute("stroke",e))},e.prototype.wireEvents=function(e,i){t.EventHandler.add(e,t.Browser.touchStartEvent,i,this),t.EventHandler.add(e,"mouseover",this.showTooltip,this),t.EventHandler.add(e,"mouseout",this.removeTooltip,this)},e.prototype.mapMouseWheel=function(e){if(this.maps.zoomSettings.enable&&this.maps.zoomSettings.mouseWheelZoom){var i=this.maps;i.availableSize;i.markerZoomedState=!1,i.zoomPersistence=i.enablePersistence;var o=this.getMousePosition(e.pageX,e.pageY),a=i.tileZoomLevel,n=i.scale,l=i.isTileMap?a:n;if(o.x>i.mapAreaRect.x&&o.x<i.mapAreaRect.x+i.mapAreaRect.width&&o.y>i.mapAreaRect.y&&o.y<i.mapAreaRect.y+i.mapAreaRect.height){e.preventDefault();var r="mozilla"!==this.browserName||this.isPointer?e.wheelDelta/120>0?"ZoomIn":"ZoomOut":-e.detail/3>0?"ZoomIn":"ZoomOut";"ZoomIn"===r?(i.mapScaleValue=l+1,i.staticMapZoom=i.tileZoomLevel,i.staticMapZoom>0&&i.staticMapZoom<22&&(i.staticMapZoom+=1),this.performZooming(o,l+1,r)):(i.mapScaleValue=l-1,i.isReset=i.mapScaleValue<1,i.staticMapZoom=i.tileZoomLevel,1===i.mapScaleValue&&(i.markerCenterLatitude=null,i.markerCenterLongitude=null),i.staticMapZoom>1&&i.staticMapZoom<22&&(i.staticMapZoom-=1),this.performZooming(o,l-1,r))}this.removeToolbarOpacity(i.mapScaleValue,this.maps.isDevice?this.maps.element.id+"_Zooming_":t.isNullOrUndefined(e.target)?this.maps.element.id:e.target.id)}},e.prototype.doubleClick=function(e){var t=e.pageX,i=e.pageY;e.target;if(this.maps.zoomSettings.enable&&this.maps.zoomSettings.doubleClickZoom&&!(e.target.id.indexOf("_Zooming_")>-1)){var o=this.getMousePosition(t,i),a=this.maps,n=(a.availableSize,a.tileZoomLevel),l=a.scale;a.mapScaleValue=a.mapScaleValue+1;var r=a.isTileMap?n:l;o.x>a.mapAreaRect.x&&o.x<a.mapAreaRect.x+a.mapAreaRect.width&&o.y>a.mapAreaRect.y&&o.y<a.mapAreaRect.y+a.mapAreaRect.height&&this.performZooming(o,r+1,"ZoomIn")}},e.prototype.mouseDownHandler=function(e){var t,i,o=null;e.target;"touchstart"===e.type?(this.isTouch=!0,o=e.touches,e.target,t=o[0].clientX,i=o[0].clientY):(t=e.pageX,i=e.pageY,e.target),this.maps.zoomSettings.enablePanning?this.isPan=this.isPanning=!this.isZoomSelection:this.isPan=this.isPanning=this.panColor!==this.selectionColor?this.maps.zoomSettings.enablePanning:this.zoomColor===this.selectionColor,this.mouseDownLatLong={x:t,y:i};var a=this.maps.isTileMap?Math.round(this.maps.tileZoomLevel):Math.round(this.maps.mapScaleValue);this.rectZoomingStart=this.isZoomSelection&&a<this.maps.zoomSettings.maxZoom&&this.maps.zoomSettings.enable,this.mouseDownPoints=this.getMousePosition(t,i),this.isTouch&&(this.firstMove=!0,this.pinchFactor=this.maps.scale,this.fingers=o.length),this.isSingleClick=!0},e.prototype.mouseMoveHandler=function(e){var i,o,a,n=this.maps,l=null,r=this.maps.zoomSettings;"touchmove"===e.type?(this.isTouch=!0,a=e.target,i=(l=e.touches)[0].clientX,o=l[0].clientY):(i=e.pageX,o=e.pageY,a=e.target),ie(n.element.id+"_Zooming_KitCollection")&&(a.id.indexOf("_Zooming_")>-1?ie(n.element.id+"_Zooming_KitCollection").setAttribute("opacity","1"):n.isDevice||ie(n.element.id+"_Zooming_KitCollection").setAttribute("opacity","fluentdark"===n.theme.toLowerCase()?"0.6":"0.3")),this.isTouch&&this.maps.zoomSettings.pinchZooming&&(this.firstMove&&2===l.length?(this.rectZoomingStart=!1,this.updateInteraction(),this.touchStartList=Le(e)):2===l.length&&2===this.touchStartList.length&&(this.touchMoveList=Le(e),e.preventDefault(),this.rectZoomingStart=!1,this.performPinchZooming(e)),this.firstMove=!1),this.mouseMovePoints=this.getMousePosition(i,o);e.target.id,e.target;if(r.enable&&this.isPanning&&-1==this.maps.markerDragId.indexOf("_MarkerIndex_")&&(t.Browser.isDevice&&l.length>=1||!t.Browser.isDevice)&&(e.preventDefault(),this.maps.element.style.cursor="pointer",this.mouseMoveLatLong={x:i,y:o},this.mouseDownLatLong.x!==this.mouseMoveLatLong.x&&this.mouseDownLatLong.y!==this.mouseMoveLatLong.y&&(this.maps.zoomSettings.enablePanning&&this.panning("None",null,null,e),this.mouseDownLatLong.x=i,this.mouseDownLatLong.y=o)),this.isTouch?1===l.length&&this.rectZoomingStart:this.rectZoomingStart){e.preventDefault();var s=this.maps.isTileMap?Math.round(this.maps.tileZoomLevel):Math.round(this.maps.mapScaleValue);this.maps.zoomSettings.enableSelectionZooming&&s<this.maps.zoomSettings.maxZoom?this.drawZoomRectangle():(this.rectZoomingStart=!1,this.isPan=!0)}},e.prototype.mouseUpHandler=function(e){this.maps;this.rectZoomingStart=!1,this.isPanning=!1,this.isSingleClick=!!this.isSingleClick,this.isTouch=!1,this.touchStartList=[],this.touchMoveList=[],this.lastScale=1,this.maps.element.style.cursor="auto",t.isNullOrUndefined(this.distanceX)&&t.isNullOrUndefined(this.distanceY)||t.isNullOrUndefined(this.currentLayer)||"SubLayer"!==this.currentLayer.type||(this.toAlignSublayer(),this.distanceX=this.distanceY=null);var i=ie(this.maps.element.id+"_Selection_Rect_Zooming");i&&this.maps.zoomSettings.enable&&this.maps.zoomSettings.enableSelectionZooming&&(t.remove(i),this.performRectZooming()),this.mouseMoveLatLong={x:0,y:0},this.mouseDownLatLong={x:0,y:0}},e.prototype.mouseCancelHandler=function(e){this.isPanning=!1,this.isTouch=!1,this.rectZoomingStart=!1;var i=ie(this.maps.element.id+"_Selection_Rect_Zooming");i&&this.maps.zoomSettings.enable&&(t.remove(i),this.performRectZooming())},e.prototype.click=function(e){var t=this.maps;if(t.markerModule&&t.markerModule.sameMarkerData.length>0||e.target.id.indexOf("MarkerIndex")>-1&&-1===e.target.id.indexOf("cluster"))return null;if(this.isSingleClick&&t.zoomSettings.zoomOnClick&&!(e.target.id.indexOf("_Zooming_")>-1)&&!t.zoomSettings.doubleClickZoom&&this.zoomColor!==this.selectionColor){var i=e.pageX,o=e.pageY,a=this.getMousePosition(i,o),n=t.tileZoomLevel,l=t.scale;t.mapScaleValue=t.mapScaleValue+1;var r=t.isTileMap?n:l;a.x>t.mapAreaRect.x&&a.x<t.mapAreaRect.x+t.mapAreaRect.width&&a.y>t.mapAreaRect.y&&a.y<t.mapAreaRect.y+t.mapAreaRect.height&&this.performZooming(a,r+1,"ZoomIn")}},e.prototype.getMousePosition=function(e,t){var i=this.maps,o=i.element.getBoundingClientRect(),a=i.element.ownerDocument.defaultView.pageXOffset,n=i.element.ownerDocument.defaultView.pageYOffset,l=i.element.ownerDocument.documentElement.clientTop,r=i.element.ownerDocument.documentElement.clientLeft,s=o.left+a-r,d=o.top+n-l;return new Ze(Math.abs(e-s),Math.abs(t-d))},e.prototype.addEventListener=function(){this.maps.isDestroyed||(t.EventHandler.add(this.maps.element,this.wheelEvent,this.mapMouseWheel,this),t.EventHandler.add(this.maps.element,"click",this.click,this),t.EventHandler.add(this.maps.element,"dblclick",this.doubleClick,this),this.maps.on(t.Browser.touchMoveEvent,this.mouseMoveHandler,this),this.maps.on(t.Browser.touchStartEvent,this.mouseDownHandler,this),this.maps.on(t.Browser.touchEndEvent,this.mouseUpHandler,this),t.EventHandler.add(this.maps.element,this.cancelEvent,this.mouseCancelHandler,this))},e.prototype.removeEventListener=function(){this.maps.isDestroyed||(t.EventHandler.remove(this.maps.element,this.wheelEvent,this.mapMouseWheel),t.EventHandler.remove(this.maps.element,"click",this.click),t.EventHandler.remove(this.maps.element,"dblclick",this.doubleClick),this.maps.off(t.Browser.touchMoveEvent,this.mouseMoveHandler),this.maps.off(t.Browser.touchStartEvent,this.mouseDownHandler),this.maps.off(t.Browser.touchEndEvent,this.mouseUpHandler),this.maps.off(this.cancelEvent,this.mouseCancelHandler))},e.prototype.getModuleName=function(){return"Zoom"},e.prototype.destroy=function(){this.toolBarGroup=null,this.currentToolbarEle=null,this.zoomingRect=null,this.zoomElements=null,this.panElements=null,this.baseTranslatePoint=null,this.touchStartList=null,this.touchMoveList=null,this.previousTouchMoveList=null,this.mouseDownPoints=null,this.mouseMovePoints=null,this.startTouches=[],this.zoomshapewidth=null,this.intersect=[],this.mouseDownLatLong=null,this.mouseMoveLatLong=null,this.removeEventListener(),this.currentLayer=null},e}(),Oi=function(){function e(e){}return e.prototype.print=function(e,i){var o=window.open("","print","height="+window.outerHeight+",width="+window.outerWidth+",tabbar=no");o.moveTo(0,0),o.resizeTo(screen.availWidth,screen.availHeight);var a={cancel:!1,htmlContent:this.getHTMLContent(e,i),name:"beforePrint"};e.trigger("beforePrint",a,function(e){a.cancel||t.print(a.htmlContent,o)})},e.prototype.getHTMLContent=function(e,i){var o=t.createElement("div"),a=e.element.cloneNode(!0),n=e.isTileMap?a.getElementsByTagName("svg")[1]:a.getElementsByTagName("svg")[0];if(!t.isNullOrUndefined(n)&&(n=n.childNodes[0],!t.isNullOrUndefined(n))){var l=n.getAttribute("fill");"Tailwind"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme||"rgba(255,255,255, 0.0)"!==l&&"transparent"!==l?"TailwindDark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme||"rgba(255,255,255, 0.0)"!==l&&"transparent"!==l||n.setAttribute("fill","rgba(0, 0, 0, 1)"):n.setAttribute("fill","rgba(255,255,255, 1)")}if(e.isTileMap)for(var r=0;r<a.childElementCount;r++)if(a.children[r].id===e.element.id+"_tile_parent"){a.children[r].style.removeProperty("height"),a.children[r].style.removeProperty("width"),a.children[r].style.removeProperty("top"),a.children[r].style.removeProperty("left"),a.children[r].style.removeProperty("right"),a.children[r].style.removeProperty("overflow");var s=document.getElementById(e.element.id+"_Tile_SVG_Parent");a.children[r].children[0].style.overflow="hidden",a.children[r].children[0].style.position="absolute",a.children[r].children[0].style.height=s.style.height,a.children[r].children[0].style.width=s.style.width,a.children[r].children[0].style.left=s.style.left,a.children[r].children[0].style.top=s.style.top;break}return i?i instanceof Array?Array.prototype.forEach.call(i,function(e){o.appendChild(ne(e).cloneNode(!0))}):i instanceof Element?o.appendChild(i.cloneNode(!0)):o.appendChild(ne(i).cloneNode(!0)):o.appendChild(a),o},e.prototype.getModuleName=function(){return"Print"},e.prototype.destroy=function(){},e}(),_i=function(){function e(e){}return e.prototype.export=function(e,i,o,a){return new Promise(function(n,l){var r,s,d=t.createElement("canvas",{id:"ej2-canvas",attrs:{width:e.availableSize.width.toString(),height:e.availableSize.height.toString()}}),p=!(t.Browser.userAgent.toString().indexOf("HeadlessChrome")>-1),h=document.getElementById(e.element.id+"_Tile_SVG_Parent"),m=ie(e.element.id+"_svg").cloneNode(!0),c=m.childNodes[0].getAttribute("fill");"Tailwind"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme||"rgba(255,255,255, 0.0)"!==c&&"transparent"!==c?"TailwindDark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme||"rgba(255,255,255, 0.0)"!==c&&"transparent"!==c||m.childNodes[0].setAttribute("fill","rgba(0, 0, 0, 1)"):m.childNodes[0].setAttribute("fill","rgba(255,255,255, 1)"),e.isTileMap?(s=ie(e.element.id+"_Tile_SVG").cloneNode(!0),r='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'+m.outerHTML+s.outerHTML+"</svg>"):r='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'+m.outerHTML+"</svg>";var u=window.URL.createObjectURL(new Blob("SVG"===i?[r]:[(new XMLSerializer).serializeToString(m)],{type:"image/svg+xml"}));if("SVG"===i)a?S(o,i,u,p):n(null);else{var g=new Image,y=d.getContext("2d");if(e.isTileMap){e.isExportInitialTileMap=!0;for(var f=document.getElementById(e.element.id+"_MapAreaBorder"),b=parseFloat(f.getAttribute("y")),v=parseFloat(f.getAttribute("x")),x=new XMLHttpRequest,O=e.mapLayerPanel.tiles.length,_=function(l){var r=document.getElementById(e.element.id+"_tile_"+(l-1)),m=new Image;m.crossOrigin="Anonymous";var g=e.background?e.background:"Tailwind"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme||"rgba(255,255,255, 0.0)"!==c&&"transparent"!==c?"TailwindDark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme||"rgba(255,255,255, 0.0)"!==c&&"transparent"!==c?"#ffffff":"#000000":"#ffffff";y.fillStyle=g,y.fillRect(0,0,e.availableSize.width,e.availableSize.height),y.font=e.titleSettings.textStyle.size+" Arial";var f=document.getElementById(e.element.id+"_Map_title");t.isNullOrUndefined(f)||(y.fillStyle=f.getAttribute("fill"),y.fillText(e.titleSettings.text,parseFloat(f.getAttribute("x")),parseFloat(f.getAttribute("y")))),m.onload=function(){if(0===l||l===O+1?0===l?(y.setTransform(1,0,0,1,0,0),y.rect(0,b,parseFloat(h.style.width),parseFloat(h.style.height)),y.clip()):y.setTransform(1,0,0,1,v,b):y.setTransform(1,0,0,1,parseFloat(r.style.left)+v,parseFloat(r.style.top)+b),y.drawImage(m,0,0),l===O+1){localStorage.setItem("local-canvasImage",d.toDataURL("image/png"));var t=localStorage.getItem("local-canvasImage");a?(S(o,i,t,p),localStorage.removeItem("local-canvasImage"),e.isExportInitialTileMap=!1):(e.isExportInitialTileMap=!1,"PNG"===i?n(t):"JPEG"===i&&n(d.toDataURL("image/jpeg")))}},0===l||l===O+1?0===l?m.src=u:setTimeout(function(){m.src=window.URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(s)],{type:"image/svg+xml"}))},300):(x.open("GET",r.children[0].getAttribute("src"),!0),x.send(),m.src=r.children[0].getAttribute("src"))},C=0;C<=O+1;C++)_(C)}else g.onload=function(){y.drawImage(g,0,0),window.URL.revokeObjectURL(u),a?S(o,i,d.toDataURL("image/png").replace("image/png","image/octet-stream"),p):"PNG"===i?n(d.toDataURL("image/png")):"JPEG"===i&&n(d.toDataURL("image/jpeg"))},g.src=u}})},e.prototype.getModuleName=function(){return"ImageExport"},e.prototype.destroy=function(){},e}(),Ci=function(){function e(){}return e.prototype.export=function(e,i,o,n,l){return new Promise(function(r,s){e.isTileMap&&(e.isExportInitialTileMap=!0);var d=t.createElement("canvas",{id:"ej2-canvas",attrs:{width:e.availableSize.width.toString(),height:e.availableSize.height.toString()}});l=t.isNullOrUndefined(l)?a.PdfPageOrientation.Landscape:l;var p=document.getElementById(e.element.id+"_Tile_SVG_Parent"),h=e.svgObject.cloneNode(!0),m=h.childNodes[0].getAttribute("fill");"Tailwind"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme||"rgba(255,255,255, 0.0)"!==m&&"transparent"!==m?"TailwindDark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme||"rgba(255,255,255, 0.0)"!==m&&"transparent"!==m||h.childNodes[0].setAttribute("fill","rgba(0, 0, 0, 1)"):h.childNodes[0].setAttribute("fill","rgba(255,255,255, 1)");var c=window.URL.createObjectURL(new Blob("SVG"===i?[void 0]:[(new XMLSerializer).serializeToString(h)],{type:"image/svg+xml"})),u=new a.PdfDocument,g=new Image,y=d.getContext("2d");if(e.isTileMap)for(var f=document.getElementById(e.element.id+"_MapAreaBorder"),b=parseFloat(f.getAttribute("y")),v=parseFloat(f.getAttribute("x")),S=new XMLHttpRequest,x=e.mapLayerPanel.tiles.length,O=function(s){var h=document.getElementById(e.element.id+"_tile_"+(s-1)),g=new Image;g.crossOrigin="Anonymous";var f=e.background?e.background:"Tailwind"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme||"rgba(255,255,255, 0.0)"!==m&&"transparent"!==m?"TailwindDark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme||"rgba(255,255,255, 0.0)"!==m&&"transparent"!==m?"#ffffff":"#000000":"#ffffff";y.fillStyle=f,y.fillRect(0,0,e.availableSize.width,e.availableSize.height),y.font=e.titleSettings.textStyle.size+" Arial";var O=document.getElementById(e.element.id+"_Map_title");t.isNullOrUndefined(O)||(y.fillStyle=O.getAttribute("fill"),y.fillText(e.titleSettings.text,parseFloat(O.getAttribute("x")),parseFloat(O.getAttribute("y")))),g.onload=function(){if(0===s||s===x+1?0===s?(y.setTransform(1,0,0,1,0,0),y.rect(0,b,parseFloat(p.style.width),parseFloat(p.style.height)),y.clip()):y.setTransform(1,0,0,1,v,b):y.setTransform(1,0,0,1,parseFloat(h.style.left)+v,parseFloat(h.style.top)+b),y.drawImage(g,0,0),s===x+1&&"PDF"===i){localStorage.setItem("saved-image-example",d.toDataURL("image/jpeg"));var t=localStorage.getItem("saved-image-example");u.pageSettings.orientation=l,t=t.slice(t.indexOf(",")+1),u.pages.add().graphics.drawImage(new a.PdfBitmap(t),0,0,e.availableSize.width-60,e.availableSize.height),e.isExportInitialTileMap=!1,n?(u.save(o+".pdf"),u.destroy()):r(null)}},0===s||s===x+1?0===s?g.src=c:setTimeout(function(){var t=document.getElementById(e.element.id+"_Tile_SVG");g.src=window.URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(t)],{type:"image/svg+xml"}))},300):(S.open("GET",h.children[0].getAttribute("src"),!0),S.send(),g.src=h.children[0].getAttribute("src"))},_=0;_<=x+1;_++)O(_);else g.onload=function(){if(y.drawImage(g,0,0),window.URL.revokeObjectURL(c),"PDF"===i){var t=d.toDataURL("image/jpeg").replace("image/jpeg","image/octet-stream");u.pageSettings.orientation=l,t=t.slice(t.indexOf(",")+1),u.pages.add().graphics.drawImage(new a.PdfBitmap(t),0,0,e.availableSize.width-60,e.availableSize.height),n?(u.save(o+".pdf"),u.destroy()):r(null)}},g.src=c})},e.prototype.getModuleName=function(){return"PdfExport"},e.prototype.destroy=function(){},e}();e.Maps=ci,e.load="load",e.loaded="loaded",e.click=Vt,e.onclick="onclick",e.rightClick="rightClick",e.doubleClick="doubleClick",e.resize="resize",e.tooltipRender=Ht,e.shapeSelected="shapeSelected",e.shapeHighlight=Gt,e.mousemove="mousemove",e.mouseup="mouseup",e.mousedown="mousedown",e.layerRendering="layerRendering",e.shapeRendering="shapeRendering",e.markerRendering=Wt,e.markerClusterRendering=Xt,e.markerClick=qt,e.markerDragStart=Yt,e.markerDragEnd="markerDragEnd",e.markerClusterClick=Jt,e.markerMouseMove=Qt,e.markerClusterMouseMove=Kt,e.dataLabelRendering=$t,e.bubbleRendering=ei,e.bubbleClick=ti,e.bubbleMouseMove=ii,e.animationComplete=oi,e.legendRendering="legendRendering",e.annotationRendering=ai,e.itemSelection=ni,e.itemHighlight=li,e.beforePrint="beforePrint",e.zoomIn="zoomIn",e.zoomOut="zoomOut",e.pan="pan",e.Annotation=dt,e.Arrow=pt,e.Font=ht,e.ZoomToolbarButtonSettings=mt,e.ZoomToolbarTooltipSettings=ct,e.ZoomToolbarSettings=ut,e.Border=gt,e.CenterPosition=yt,e.TooltipSettings=ft,e.Margin=bt,e.ConnectorLineSettings=vt,e.MarkerClusterSettings=St,e.MarkerClusterData=xt,e.ColorMappingSettings=Ot,e.InitialMarkerSelectionSettings=_t,e.InitialShapeSelectionSettings=Ct,e.SelectionSettings=Mt,e.HighlightSettings=Lt,e.NavigationLineSettings=Pt,e.BubbleSettings=wt,e.CommonTitleSettings=Tt,e.SubTitleSettings=It,e.TitleSettings=kt,e.ZoomSettings=Nt,e.ToggleLegendSettings=Ft,e.LegendSettings=Et,e.DataLabelSettings=zt,e.ShapeSettings=At,e.MarkerBase=Bt,e.MarkerSettings=Ut,e.LayerSettings=jt,e.Tile=Rt,e.MapsAreaSettings=Zt,e.Size=Re,e.stringToNumber=n,e.calculateSize=l,e.createSvg=r,e.getMousePosition=s,e.degreesToRadians=d,e.radiansToDegrees=p,e.convertGeoToPoint=h,e.convertTileLatLongToPoint=m,e.xToCoordinate=c,e.yToCoordinate=u,e.aitoff=g,e.roundTo=y,e.sinci=f,e.acos=b,e.calculateBound=v,e.triggerDownload=S,e.Point=Ze,e.MinMax=De,e.GeoLocation=Ve,e.measureText=x,e.TextOption=He,e.PathOption=Ge,e.ColorValue=We,e.RectOption=Xe,e.CircleOption=qe,e.PolygonOption=Ye,e.PolylineOption=Je,e.LineOption=Qe,e.Line=Ke,e.MapLocation=$e,e.Rect=et,e.PatternOptions=tt,e.renderTextElement=O,e.convertElement=_,e.formatValue=C,e.convertStringToValue=M,e.convertElementFromLabel=L,e.drawSymbols=P,e.getValueFromObject=w,e.markerColorChoose=T,e.markerShapeChoose=I,e.clusterTemplate=k,e.mergeSeparateCluster=N,e.clusterSeparate=F,e.marker=E,e.markerTemplate=z,e.maintainSelection=A,e.maintainStyleClass=B,e.appendShape=U,e.drawCircle=j,e.drawRectangle=R,e.drawPath=function(e,t,i){return U(e.renderer.drawPath(t),i)},e.drawPolygon=function(e,t,i){return U(e.renderer.drawPolygon(t),i)},e.drawPolyline=function(e,t,i){return U(e.renderer.drawPolyline(t),i)},e.drawLine=function(e,t,i){return U(e.renderer.drawLine(t),i)},e.calculateShapes=Z,e.drawDiamond=function(e,t,i,o,a){return t.d="M "+o.x+" "+(o.y-i.height/2)+" L "+(o.x+i.width/2)+" "+o.y+" L "+o.x+" "+(o.y+i.height/2)+" L "+(o.x-i.width/2)+" "+o.y+" Z",U(e.renderer.drawPath(t),a)},e.drawTriangle=function(e,t,i,o,a){return t.d="M "+o.x+" "+(o.y-i.height/2)+" L "+(o.x+i.width/2)+" "+(o.y+i.height/2)+" L "+(o.x-i.width/2)+" "+(o.y+i.height/2)+" Z",U(e.renderer.drawPath(t),a)},e.drawCross=function(e,t,i,o,a){return t.d="M "+o.x+" "+(o.y-i.height/2)+" L "+o.x+" "+(o.y+i.height/2)+" M "+(o.x-i.width/2)+" "+o.y+" L "+(o.x+i.width/2)+" "+o.y,U(e.renderer.drawPath(t),a)},e.drawHorizontalLine=function(e,t,i,o,a){return t.d=" M "+(o.x-i.width/2)+" "+o.y+" L "+(o.x+i.width/2)+" "+o.y,U(e.renderer.drawPath(t),a)},e.drawVerticalLine=function(e,t,i,o,a){return t.d="M "+o.x+" "+(o.y-i.height/2)+" L "+o.x+" "+(o.y+i.height/2),U(e.renderer.drawPath(t),a)},e.drawStar=function(e,t,i,o,a){return t.d="M "+(o.x+i.width/3)+" "+(o.y-i.height/2)+" L "+(o.x-i.width/2)+" "+(o.y+i.height/6)+" L "+(o.x+i.width/2)+" "+(o.y+i.height/6)+" L "+(o.x-i.width/3)+" "+(o.y-i.height/2)+" L "+o.x+" "+(o.y+i.height/2)+" L "+(o.x+i.width/3)+" "+(o.y-i.height/2)+" Z",U(e.renderer.drawPath(t),a)},e.drawBalloon=D,e.drawPattern=function(e,t,i,o){for(var a=e.renderer.createPattern(t,"pattern"),n=0,l=i;n<l.length;n++)U(l[n],a);return U(a,o)},e.getFieldData=function(e,t){for(var i,o=[],a=0,n=e;a<n.length;a++){var l=n[a];i={};for(var r=0,s=t;r<s.length;r++){var d=s[r];l[d]&&(i[d]=l[d])}o.push(i)}return o},e.checkShapeDataFields=V,e.checkPropertyPath=H,e.filter=G,e.getRatioOfBubble=W,e.findMidPointOfPolygon=X,e.isCustomPath=q,e.textTrim=Y,e.findPosition=J,e.removeElement=Q,e.calculateCenterFromPixel=K,e.getTranslate=$,e.getZoomTranslate=ee,e.fixInitialScaleForTile=te,e.getElementByID=ie,e.getClientElement=function(e){var i=document.getElementById(e);return t.isNullOrUndefined(i)?null:i.getClientRects()[0]},e.Internalize=oe,e.getTemplateFunction=ae,e.getElement=ne,e.getShapeData=le,e.triggerShapeEvent=re,e.getElementsByClassName=se,e.querySelector=de,e.getTargetElement=pe,e.createStyle=he,e.customizeStyle=me,e.triggerItemSelectionEvent=ce,e.removeClass=ue,e.elementAnimate=ge,e.timeout=ye,e.showTooltip=fe,e.wordWrap=be,e.createTooltip=ve,e.getHexColor=Se,e.drawSymbol=xe,e.renderLegendShape=Oe,e.getElementOffset=_e,e.changeBorderWidth=Ce,e.changeNavaigationLineWidth=Me,e.targetTouches=Le,e.calculateScale=Pe,e.getDistance=we,e.getTouches=Te,e.getTouchCenter=Ie,e.sum=ke,e.zoomAnimate=Ne,e.animate=Fe,e.MapAjax=it,e.smoothTranslate=Ee,e.compareZoomFactor=ze,e.calculateZoomLevel=Ae,e.processResult=Be,e.LayerPanel=di,e.Bubble=ui,e.BingMap=ri,e.Marker=Dt,e.ColorMapping=si,e.DataLabel=gi,e.NavigationLine=yi,e.Legend=fi,e.Highlight=bi,e.Selection=vi,e.MapsTooltip=Si,e.Zoom=xi,e.Annotations=pi,e.Print=Oi,e.ImageExport=_i,e.PdfExport=Ci,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-svg-base"),require("@syncfusion/ej2-data"),require("@syncfusion/ej2-pdf-export")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-svg-base","@syncfusion/ej2-data","@syncfusion/ej2-pdf-export"],t):t(e.ej={},e.ej2Base,e.ej2SvgBase,e.ej2Data,e.ej2PdfExport)}(this,function(e,t,i,o,a){"use strict";function n(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function l(e){e.element.style.height=t.isNullOrUndefined(e.height)?"auto":e.height,e.element.style.width=t.isNullOrUndefined(e.width)?"auto":e.width,e.element.style.setProperty("display","block");var i=e.element.clientWidth,o=e.element.clientHeight,a=n(e.element.style.width,i),l=n(e.element.style.height,o);new Re(0,0);return"0px"===e.width||"0%"===e.width||"0%"===e.height||"0px"===e.height?new Re(0,0):new Re(n(e.width,i)||i||a||600,n(e.height,o)||o||l||(e.isDevice?Math.min(window.innerWidth,window.innerHeight):450))}function r(e){e.renderer=new i.SvgRenderer(e.element.id),e.availableSize=l(e),e.svgObject=e.renderer.createSvg({id:e.element.id+"_svg",width:e.availableSize.width,height:e.availableSize.height}),"0px"!==e.width&&"0%"!==e.width&&"0%"!==e.height&&"0px"!==e.height||(e.svgObject.setAttribute("height","0"),e.svgObject.setAttribute("width","0"))}function s(e,t,i){var o=i.getBoundingClientRect(),a=i.ownerDocument.defaultView.pageXOffset,n=i.ownerDocument.defaultView.pageYOffset,l=i.ownerDocument.documentElement.clientTop,r=i.ownerDocument.documentElement.clientLeft,s=o.left+a-r,d=o.top+n-l;return new $e(e-s,t-d)}function d(e){return e*(Math.PI/180)}function p(e){return e*(180/Math.PI)}function h(e,i,o,a,n){var l,r,s,h,m,f,b=new Re(n.mapAreaRect.width,n.mapAreaRect.height),S=n.baseMapBounds.longitude,x=n.baseMapBounds.latitude,O=d(e),C=d(i),_=n.projectionType,M=n.isTileMap?256*Math.pow(2,1):t.isNullOrUndefined(o)?Math.min(b.width,b.height):Math.min(b.width,b.height)*o;if("Normal"===a.geometryType)l=t.isNullOrUndefined(o)?i:Math.abs((i-S.min)*o),r=t.isNullOrUndefined(o)?e:Math.abs((x.max-e)*o);else if("Geographic"===a.geometryType){switch(_){case"Mercator":var L=new Ze(M/2,M/2);l=L.x+i*(M/360);var P=v(Math.sin(d(e)),-.9999,.9999);r=L.y+.5*Math.log((1+P)/(1-P))*(-M/(2*Math.PI));break;case"Winkel3":m=((s=g(C,O)).x+C/(Math.PI/2))/2,h=(s.y+O)/2;break;case"Miller":m=C,h=1.25*Math.log(Math.tan(Math.PI/4+.4*O));break;case"Eckert3":m=2/(f=Math.sqrt(Math.PI*(4+Math.PI)))*C*(1+Math.sqrt(1-4*O*O/(Math.PI*Math.PI))),h=4/f*O;break;case"AitOff":m=(s=g(C,O)).x,h=s.y;break;case"Eckert5":m=C*(1+Math.cos(O))/Math.sqrt(2+Math.PI),h=2*O/Math.sqrt(2+Math.PI);break;case"Equirectangular":m=C,h=O;break;case"Eckert6":f=(1+Math.PI/2)*Math.sin(O);for(var w=1/0,T=0;T<10&&Math.abs(w)>1e-6;T++)O-=w=(O+Math.sin(O)-f)/(1+Math.cos(O));f=Math.sqrt(2+Math.PI),m=C*(1+Math.cos(O))/f,h=2*O/f}l="Mercator"===_?l:y(c(n,p(m)),3),r="Mercator"===_?r:-y(u(n,p(h)),3)}return new Ze(l,r)}function m(e,t,i,o){var a=256*Math.pow(2,t),n=(e.x+180)/360,l=Math.sin(e.y*Math.PI/180),r=.5-Math.log((1+l)/(1-l))/(4*Math.PI),s=e.x,d=e.y;return o&&(s=n*a+.5+i.x,d=r*a+.5+i.y),{x:s,y:d}}function c(e,i){var o=e.baseMapBounds.longitude,a=t.isNullOrUndefined(e.baseSize)?e.mapAreaRect.width:e.mapAreaRect.width+Math.abs(e.baseSize.width-e.mapAreaRect.width)/2;return Math.round(a*(i-o.min)/(o.max-o.min)*100)/100}function u(e,t){var i=e.baseMapBounds.latitude;return Math.round(e.mapAreaRect.height*(t-i.min)/(i.max-i.min)*100)/100}function g(e,t){var i=Math.cos(t),o=f(b(i*Math.cos(e/=2)));return new Ze(2*i*Math.sin(e)*o,Math.sin(t)*o)}function y(e,t){var i=Math.pow(10,t);return Math.round(e*i)/i}function f(e){return e/Math.sin(e)}function b(e){return Math.acos(e)}function v(e,i,o){return t.isNullOrUndefined(i)||(e=Math.max(e,i)),t.isNullOrUndefined(o)||(e=Math.min(e,o)),e}function S(e,i,o,a){t.createElement("a",{attrs:{download:e+"."+i.toLocaleLowerCase(),href:o}}).dispatchEvent(new MouseEvent(a?"click":"move",{view:window,bubbles:!1,cancelable:!0}))}function x(e,i){var o=document.getElementById("mapsmeasuretext");return null===o&&(o=t.createElement("text",{id:"mapsmeasuretext"}),document.body.appendChild(o)),o.innerText=e,o.style.position="absolute","number"==typeof i.size?o.style.fontSize=i.size+"px":o.style.fontSize=i.size,o.style.fontWeight=i.fontWeight,o.style.fontStyle=i.fontStyle,o.style.fontFamily=i.fontFamily,o.style.visibility="hidden",o.style.top="-100",o.style.left="0",o.style.whiteSpace="nowrap",o.style.lineHeight="normal",new Re(o.clientWidth,o.clientHeight)}function O(e,t,o,a,n){void 0===n&&(n=!1);var l,r,s={id:e.id,x:e.x,y:e.y,fill:o,"font-size":t.size,"font-style":t.fontStyle,"font-family":t.fontFamily,"font-weight":t.fontWeight,"text-anchor":e.anchor,transform:e.transform,opacity:t.opacity,"dominant-baseline":e.baseLine},d="string"==typeof e.text||"number"==typeof e.text?e.text:n?e.text[e.text.length-1]:e.text[0],p=new i.SvgRenderer(""),h=p.createText(s,d);if(h.style["user-select"]="none",h.style["font-family"]=t.fontFamily,h.style["font-size"]=t.size,h.style["font-weight"]=t.fontWeight,h.style["font-color"]=t.color,h.style["-moz-user-select"]="none",h.style["-webkit-touch-callout"]="none",h.style["-webkit-user-select"]="none",h.style["-khtml-user-select"]="none",h.style["-ms-user-select"]="none",h.style["-o-user-select"]="none","string"!=typeof e.text&&e.text.length>1)for(var m=1,c=e.text.length;m<c;m++)r=x(e.text[m],t).height,l=p.createTSpan({x:e.x,id:e.id,y:e.y+(n?-m*r:m*r)},n?e.text[e.text.length-(m+1)]:e.text[m]),h.appendChild(l);return a.appendChild(h),h}function C(e,i,o,a,n){var l=t.createElement("div",{id:i,className:n.element.id+"_marker_template_element"});l.style.cssText="position: absolute;pointer-events: auto;";for(var r=e.length;r>0;)l.appendChild(e[0]),r--;for(var s=l.innerHTML,d=Object.keys(o),p=RegExp,h=0;h<d.length;h++)"object"==typeof o[d[h]]?s=M(s,"",o,n):"latitude"!==d[h].toLowerCase()&&"longitude"!==d[h].toLowerCase()&&(s=s.replace(new p("{{:"+d[h]+"}}","g"),o[d[h].toString()]));return l.innerHTML=s,l}function _(e,t){return t.format&&!isNaN(Number(e))?t.intl.getNumberFormat({format:t.format,useGrouping:t.useGroupingSeparator})(Number(e)):e}function M(e,t,i,o){for(var a=""===e?t:e,n=""===e?a.split("${"):a.split("{{:"),l=RegExp,r=0;r<n.length;r++)if(n[r].indexOf("}}")>-1&&n[r].indexOf(".")>-1||n[r].indexOf("}")>-1&&n[r].search(".")>-1)for(var s=""===e?n[r].split("}"):n[r].split("}}"),d=0;d<s.length;d++)if(s[d].indexOf(".")>-1){var p=w(i,s[d]).toString();a=""===e?a.split("${"+s[d]+"}").join(_(p,o)):a.replace(new l("{{:"+s[d]+"}}","g"),p)}return a}function L(e,i,o,a,n){for(var l=(t.isNullOrUndefined(e.childElementCount)?e[0]:e).outerHTML,r=Object.keys(o),s=RegExp,d=0;d<r.length;d++)l=l.replace(new s("{{:"+r[d]+"}}","g"),o[r[d].toString()]);var p=t.createElement("div",{id:i,innerHTML:l});return p.style.position="absolute",p}function P(e,i,o,a,n,l,r){var s,d,p,h,m=n.size,c=n.borderColor,u=parseFloat(n.borderWidth),g=parseFloat(n.borderOpacity),y=n.fill,f=n.dashArray,b={color:c,width:u,opacity:g},v=n.opacity,S=new Ge(a,y,u,c,v,g,f,"");if(m.width="string"==typeof m.width?parseInt(m.width,10):m.width,m.height="string"==typeof m.height?parseInt(m.height,10):m.height,"Circle"===e){var x=(m.width+m.height)/4,O=new qe(a,y,b,v,o.x,o.y,x,f);s=r.renderer.drawCircle(O)}else"Rectangle"===e?(d=o.x-m.width/2,p=o.y-m.height/2,h=new Xe(a,y,b,v,new et(d,p,m.width,m.height),null,null,"",f),s=r.renderer.drawRectangle(h)):"Image"===e?(d=o.x-m.width/2,p=o.y-(a.indexOf("cluster")>-1?m.height/2:m.height),t.merge(S,{href:i,height:m.height,width:m.width,x:d,y:p}),s=r.renderer.drawImage(S)):s=Z(r,e,S,m,o,l);return s}function w(e,i){if(!t.isNullOrUndefined(e)&&!t.isNullOrUndefined(i)){var o=i.replace(/\[/g,".").replace(/\]/g,"").split(".");if(1===o.length)e=e[o[0]];else for(var a=0;a<o.length&&!t.isNullOrUndefined(e);a++)e=e[o[a]]}return e}function T(e,i){var o=t.isNullOrUndefined(e.colorValuePath)?i[e.colorValuePath]:e.colorValuePath.indexOf(".")>-1?w(i,e.colorValuePath).toString():i[e.colorValuePath];return e.fill=t.isNullOrUndefined(e.colorValuePath)||t.isNullOrUndefined(o)?e.fill:e.colorValuePath.indexOf(".")>-1?w(i,e.colorValuePath).toString():i[e.colorValuePath],e}function I(e,i){if(t.isNullOrUndefined(e.shapeValuePath)||t.isNullOrUndefined(i[e.shapeValuePath])){var o=t.isNullOrUndefined(e.shapeValuePath)?e.shape:e.shapeValuePath.indexOf(".")>-1?w(i,e.shapeValuePath).toString():e.shape;e.shape=""!==o.toString()?o:e.shape;var a=t.isNullOrUndefined(e.imageUrlValuePath)?e.imageUrl:e.imageUrlValuePath.indexOf(".")>-1?w(i,e.imageUrlValuePath).toString():t.isNullOrUndefined(i[e.imageUrlValuePath])?e.imageUrl:i[e.imageUrlValuePath];e.imageUrl=a}else{var n=e.shapeValuePath.indexOf(".")>-1?w(i,e.shapeValuePath).toString():i[e.shapeValuePath];e.shape=""!==n.toString()?n:e.shape,"Image"===i[e.shapeValuePath]&&(e.imageUrl=t.isNullOrUndefined(e.imageUrlValuePath)?e.imageUrl:e.imageUrlValuePath.indexOf(".")>-1?w(i,e.imageUrlValuePath).toString():t.isNullOrUndefined(i[e.imageUrlValuePath])?e.imageUrl:i[e.imageUrlValuePath])}return e}function k(e,i,o,a,n,l,r,s){var d,p,c,u,g,y,f,b=[],v=[],S=0,x=0,C=e.markerClusterSettings.labelStyle,_=0,M=[],L=e.markerClusterSettings,T=o.renderer.createGroup({id:o.element.id+"_LayerIndex_"+a+"_markerCluster"}),I={cancel:!1,name:Xt,fill:L.fill,height:L.height,width:L.width,imageUrl:L.imageUrl,shape:L.shape,data:void 0,maps:o,cluster:L,border:L.border};o.trigger("markerClusterRendering",I,function(L){for(var k=0;k<i.childElementCount;k++)if(M=[],"hidden"!==i.childNodes[k].style.visibility){if(f=i.childNodes[k],d=f.getBoundingClientRect(),M.push(k),!t.isNullOrUndefined(d)){for(var N=k+1;N<i.childElementCount;N++)"hidden"!==i.childNodes[N].style.visibility&&(f=i.childNodes[N],p=f.getBoundingClientRect(),t.isNullOrUndefined(p)||d.left>p.right||d.right<p.left||d.top>p.bottom||d.bottom<p.top||(b.push(p),i.childNodes[N].style.visibility="hidden",M.push(N)));if(S=d.left+d.width/2,x=d.top+d.height,b.length>0){M=M.filter(function(e,t,i){return i.indexOf(e)===t});var F=o.element.getBoundingClientRect();S-=F.left,x-=o.availableSize.height<=F.height?F.top:F.bottom-F.top;o.isTileMap?new Object:$(o,e,!1);var E=parseInt(i.childNodes[k].id.split("_dataIndex_")[1].split("_")[0],10),z=parseInt(i.childNodes[k].id.split("_MarkerIndex_")[1].split("_")[0],10),A=e.markerSettings[z],B=A.dataSource[E],U=void 0,j=t.isNullOrUndefined(A.longitudeValuePath)?t.isNullOrUndefined(B.longitude)?t.isNullOrUndefined(B.Latitude)?0:parseFloat(B.Latitude):parseFloat(B.longitude):Number(w(B,A.longitudeValuePath)),R=t.isNullOrUndefined(A.latitudeValuePath)?t.isNullOrUndefined(B.latitude)?t.isNullOrUndefined(B.Latitude)?0:parseFloat(B.Latitude):parseFloat(B.latitude):Number(w(B,A.latitudeValuePath));o.isTileMap?o.isTileMap&&!o.zoomSettings.enable&&(U=m(new Ze(j,R),o.tileZoomLevel,o.tileTranslatePoint,!0)):U=h(R,j,o.mapLayerPanel.calculateFactor(e),e,o),i.childNodes[k].style.visibility="hidden";var Z=e.markerClusterSettings;I.cancel?((y={size:new Re(Z.width,Z.height),fill:Z.fill,borderColor:Z.border.color,borderWidth:Z.border.width,opacity:Z.opacity,dashArray:Z.dashArray}).fill=Z.fill,y.size.width=Z.width,y.size.height=Z.height,y.imageUrl=Z.imageUrl,y.shape=Z.shape,y.borderColor=Z.border.color,y.borderWidth=Z.border.width,y.borderOpacity=t.isNullOrUndefined(Z.border.opacity)?Z.opacity:Z.border.opacity):((y={size:new Re(Z.width,Z.height),fill:Z.fill,borderColor:Z.border.color,borderWidth:Z.border.width,opacity:Z.opacity,dashArray:Z.dashArray}).fill=I.fill,y.size.width=I.width,y.size.height=I.height,y.imageUrl=I.imageUrl,y.shape=I.shape,y.borderColor=I.border.color,y.borderWidth=I.border.width,y.borderOpacity=t.isNullOrUndefined(I.border.opacity)?Z.opacity:I.border.opacity),S=o.isTileMap?S:i.id.indexOf("_Markers_Group")>-1?S:S+3.75-I.width/2,x=o.isTileMap?x:i.id.indexOf("_Markers_Group")>-1?x:x-I.height/2,o.isTileMap&&!o.zoomSettings.enable&&(S=U.x,x=U.y);var D=o.element.id+"_LayerIndex_"+a+"_MarkerIndex_"+z+"_dataIndex_"+E+"_cluster_"+_,V=o.element.id+"_LayerIndex_"+a+"_MarkerIndex_"+z+"_dataIndex_"+E+"_cluster_"+_+"_datalabel_"+_;_++;var H=P(y.shape,y.imageUrl,{x:0,y:0},D,y,n,o);H.setAttribute("transform","translate( "+S+" "+x+" )"),"Balloon"===I.shape?H.children[0].textContent=M.toString():H.textContent=M.toString(),c=new He(V,0,3.75,"middle",(b.length+1).toString(),"",""),(u=O(c,C,C.color,n)).setAttribute("transform","translate( "+S+" "+x+" )"),T.appendChild(u),T.appendChild(H)}}b=[]}l.appendChild(T),o.svgObject.appendChild(l),o.element.appendChild(o.svgObject);for(k=0;k<T.childElementCount;k++)if("hidden"!==T.childNodes[k].style.visibility&&(f=T.childNodes[k],d=f.getBoundingClientRect(),!(t.isNullOrUndefined(d)||f.id.indexOf("_datalabel_")>-1))){for(N=k+1;N<T.childElementCount;N++)"hidden"!==T.childNodes[N].style.visibility&&(g=T.childNodes[N],p=g.getBoundingClientRect(),t.isNullOrUndefined(p)||g.id.indexOf("_datalabel_")>-1||d.left>p.right||d.right<p.left||d.top>p.bottom||d.bottom<p.top||(v.push(g),v.push(T.childNodes[N-1]),T.childNodes[N].style.visibility="hidden",T.childNodes[N-1].style.visibility="hidden",M.push(N)));if(v.length>0){f=T.childNodes[k];for(var G=0;G<v.length;G++)"g"===f.tagName?f.childNodes[0].textContent=f.childNodes[0].textContent+","+v[G].textContent:f.textContent=f.textContent+","+v[G].textContent,T.childNodes[k-1].textContent=(+T.childNodes[k-1].textContent+ +v[G+1].textContent).toString(),G++}v=[]}for(;0<T.childNodes.length;)n.insertBefore(T.childNodes[0],n.firstChild);r?l.appendChild(n):(ie(o.element.id+"_Secondary_Element").appendChild(n),l.appendChild(n));var W=document.getElementById(o.element.id+"_LayerIndex_"+a+"_markerCluster");if(t.isNullOrUndefined(W)||W.remove(),s){var X=document.getElementById(o.element.id+"_Layer_Collections");t.isNullOrUndefined(X)||X.appendChild(l)}})}function N(e,i,o){var a=e[0].layerIndex,n=e[0].targetClusterIndex,l=e[0].markerIndex,r=e[0].dataIndex,s=i.element.id+"_LayerIndex_"+a+"_MarkerIndex_"+l,d=i.layers[a].markerSettings[l],p=s+"_dataIndex_"+r+"_cluster_"+n,h="Balloon"===i.layers[a].markerClusterSettings.shape?ne(p+"_Group"):ne(p),m=ne(p+"_datalabel_"+n);h.setAttribute("visibility","visible"),m.setAttribute("visibility","visible");for(var c=e[0].data.length,u=0;u<c;u++)("Balloon"===d.shape&&t.isNullOrUndefined(d.template)?ne(s+"_dataIndex_"+e[0].data[u].index+"_Group"):ne(s+"_dataIndex_"+e[0].data[u].index)).style.visibility="hidden";Q(i.element.id+"_LayerIndex_"+a+"_MarkerIndex_"+l+"_markerClusterConnectorLine")}function F(e,i,o,a){var n=e[0].layerIndex,l=e[0].markerIndex,r=e[0].targetClusterIndex,s=e[0].dataIndex,d=a?ne:o.querySelector.bind(o),p=a?"":"#",h=i.element.id+"_LayerIndex_"+n+"_MarkerIndex_"+l,m=i.layers[n].markerSettings[l],c=h+"_dataIndex_"+s+"_cluster_"+r,u="Balloon"===i.layers[n].markerClusterSettings.shape?d(p+""+c+"_Group"):d(p+""+c),g=d(p+""+c+"_datalabel_"+r);u.setAttribute("visibility","hidden"),g.setAttribute("visibility","hidden");var y="Balloon"===m.shape&&t.isNullOrUndefined(m.template)?d(p+""+h+"_dataIndex_"+s+"_Group"):d(p+""+h+"_dataIndex_"+s),f=y.parentElement.id.indexOf("Template_Group")>-1?y.getBoundingClientRect().height:m.height,b=y.parentElement.id.indexOf("Template_Group")>-1?y.getBoundingClientRect().width:m.width,v=+u.getAttribute("transform").split("translate(")[1].trim().split(" ")[0],S=+u.getAttribute("transform").split("translate(")[1].trim().split(" ")[1].split(")")[0].trim(),x=b+5,O=6.28*x,C=0,_=Math.round(O/b);C+=_;for(var M=e[0].data.length,L=Math.round(f/O*100),P=(L=M<_?100/M:L)/100*360,w=M<_?45:0,T=1,I="M "+v+" "+S+" ",k="",N=0;N<M;N++){if(C===N||Math.round(w)>=360){for(w=0,O=6.28*(x=(b+5)*++T),_=Math.round(O/f),L=Math.round(f/O*100);L*_<100;)_++;P=L/100*360,C+=_}var F=v+x*Math.sin(2*Math.PI*w/360),E=S+x*Math.cos(2*Math.PI*w/360);k+=I+"L "+F+" "+E+" ",(y="Balloon"===m.shape&&t.isNullOrUndefined(m.template)?d(p+""+h+"_dataIndex_"+e[0].data[N].index+"_Group"):d(p+""+h+"_dataIndex_"+e[0].data[N].index)).parentElement.id.indexOf("Template_Group")>-1?(y.style.transform="",y.style.left=i.isTileMap?F-b/2+"px":F-b/2-10+"px",y.style.top=i.isTileMap?E-f/2+"px":E-f/2-10+"px",y.setAttribute("transform","translate( "+F+" "+E+")")):y.setAttribute("transform","translate( "+F+" "+E+")"),y.style.visibility="visible",w+=P}var z=i.layers[n].markerClusterSettings.connectorLineSettings,A={d:k,id:i.element.id+"_LayerIndex_"+n+"_MarkerIndex_"+l+"_dataIndex_"+s+"_markerClusterConnectorLine",stroke:z.color,"fill-opacity":z.opacity,"stroke-opacity":z.opacity,"stroke-width":z.width};o=a?d(i.element.id+"_Markers_Group"):o;var B=i.renderer.createGroup({id:i.element.id+"_LayerIndex_"+n+"_MarkerIndex_"+l+"_markerClusterConnectorLine"});B.appendChild(i.renderer.drawPath(A)),"Balloon"===m.shape?o.insertBefore(B,o.querySelector("#"+h+"_dataIndex_0_Group")):o.insertBefore(B,o.querySelector("#"+h+"_dataIndex_0"))}function E(e,i,o,a,n,l,r,s,d,p,h){var m={size:new Re(e.width,e.height),fill:e.fill,borderColor:e.border.color,borderWidth:e.border.width,opacity:i.opacity,dashArray:i.dashArray,borderOpacity:t.isNullOrUndefined(e.border.opacity)?i.opacity:e.border.opacity};Q(r);var c=P(e.shape,e.imageUrl,{x:0,y:0},r,m,h,p),u=(p.isTileMap?n.x:(n.x+l.x)*d)+s.x,g=(p.isTileMap?n.y:(n.y+l.y)*d)+s.y;c.setAttribute("transform","translate( "+u+" "+g+" )"),A(p.selectedMarkerElementId,p.markerSelectionClass,c,"MarkerselectionMapStyle"),h.appendChild(c);var y=o.length-1===a?"marker":null,f=new Ze(u,g);return(i.animationDuration>0||"Enable"===t.animationMode)&&ge(c,i.animationDelay,i.animationDuration,f,p,y),h}function z(e,t,i,o,a,n,l,r,s,d,p){if((t=ae(e.template,p))&&t(o,p,e.template,p.element.id+"_MarkerTemplate"+a,!1).length){for(var h=C(t(o,p,e.template,p.element.id+"_MarkerTemplate"+a,!1),i,o,0,p),m=0;m<h.children.length;m++)h.children[m].style.pointerEvents="auto";if(h.style.left=(p.isTileMap?l.x:(l.x+r.x)*s)+d.x-p.mapAreaRect.x+"px",h.style.top=(p.isTileMap?l.y:(l.y+r.y)*s)+d.y-p.mapAreaRect.y+"px",n.appendChild(h),"GoogleStaticMap"===p.layers[p.baseLayerIndex].layerType){var c=ie(p.element.id+"_StaticGoogleMap").getBoundingClientRect(),u=h.getBoundingClientRect();(c.x>u.x||c.x+640<u.x+u.width)&&(c.y>u.y||c.y+c.height<u.y+u.height)&&(h.style.display="none")}}return n}function A(e,i,o,a){if(e)for(var n=0;n<e.length;n++)o.getAttribute("id")===e[n]&&(0!==n&&"g"!==o.tagName||(t.isNullOrUndefined(i)||t.isNullOrUndefined(i.id)||document.body.appendChild(i),o.id.indexOf("_MarkerIndex_")>-1&&o.childElementCount>0&&o.children[0].setAttribute("class",a)),o.setAttribute("class",a))}function B(e,i,o,a,n,l,r){if(!ne(e)){var s=t.createElement("style",{id:e});s.innerText="."+i+"{fill:"+o+";opacity:"+a+";stroke-width:"+l+";stroke:"+n+";}",r.shapeSelectionClass=s,document.body.appendChild(s)}}function U(e,t){return t&&t.appendChild(e),e}function j(e,t,i){return U(e.renderer.drawCircle(t),i)}function R(e,t,i){return U(e.renderer.drawRectangle(t),i)}function Z(e,t,i,o,a,n){var l;switch(t){case"Balloon":l=D(e,i,o,a,"Marker",n);break;case"Cross":i.d="M "+a.x+" "+(a.y-o.height/2)+" L "+a.x+" "+(a.y+o.height/2)+" M "+(a.x-o.width/2)+" "+a.y+" L "+(a.x+o.width/2)+" "+a.y;break;case"Diamond":i.d="M "+a.x+" "+(a.y-o.height/2)+" L "+(a.x+o.width/2)+" "+a.y+" L "+a.x+" "+(a.y+o.height/2)+" L "+(a.x-o.width/2)+" "+a.y+" Z";break;case"Star":i.d="M "+(a.x+o.width/3)+" "+(a.y-o.height/2)+" L "+(a.x-o.width/2)+" "+(a.y+o.height/6)+" L "+(a.x+o.width/2)+" "+(a.y+o.height/6)+" L "+(a.x-o.width/3)+" "+(a.y-o.height/2)+" L "+a.x+" "+(a.y+o.height/2)+" L "+(a.x+o.width/3)+" "+(a.y-o.height/2)+" Z";break;case"Triangle":i.d="M "+a.x+" "+(a.y-o.height/2)+" L "+(a.x+o.width/2)+" "+(a.y+o.height/2)+" L "+(a.x-o.width/2)+" "+(a.y+o.height/2)+" Z";break;case"HorizontalLine":i.d=" M "+(a.x-o.width/2)+" "+a.y+" L "+(a.x+o.width/2)+" "+a.y;break;case"VerticalLine":i.d="M "+a.x+" "+(a.y-o.height/2)+" L "+a.x+" "+(a.y+o.height/2);break;case"InvertedTriangle":i.d="M "+(a.x-o.width/2)+" "+(a.y-o.height/2)+" L "+(a.x+o.width/2)+" "+(a.y-o.height/2)+" L "+a.x+" "+(a.y+o.height/2)+" Z";break;case"Pentagon":for(var r=void 0,s=void 0,d=0;d<5;d++)r=o.width/2*Math.cos(Math.PI/180*(72*d)),s=o.height/2*Math.sin(Math.PI/180*(72*d)),i.d+=(0===d?"M ":"L ")+(a.x+r)+" "+(a.y+s);i.d+=" Z"}return"Cross"!==t&&"HorizontalLine"!==t&&"VerticalLine"!==t||(i.stroke="transparent"===i.stroke?i.fill:i.stroke),"Balloon"===t?l:e.renderer.drawPath(i)}function D(e,t,i,o,a,n){var l,r=i.width,s=i.height;o.x-=r/2,o.y-=s/2,t.d="M15,0C8.8,0,3.8,5,3.8,11.2C3.8,17.5,9.4,24.4,15,30c5.6-5.6,11.2-12.5,11.2-18.8C26.2,5,21.2,0,15,0z M15,16c-2.8,0-5-2.2-5-5s2.2-5,5-5s5,2.2,5,5S17.8,16,15,16z";var d=e.renderer.drawPath(t),p=i.width/30,h=i.height/30;if(d.setAttribute("transform","translate("+o.x+", "+o.y+") scale("+p+", "+h+")"),"Marker"===a){var m=e.renderer.createGroup({id:t.id+"_Group"});U(d,m),l=U(m,n)}else l=d;return l}function V(e,i,o,a,n){if(!t.isNullOrUndefined(i))for(var l=0;l<e.length;l++){var r=o.indexOf(".")>-1?w(e[l],o):e[l][o],s=H(r,a,i);if((!t.isNullOrUndefined(r)&&isNaN(i[s])&&"string"==typeof r?r.toLowerCase():r)===(!t.isNullOrUndefined(i[s])&&isNaN(i[s])?i[s].toLowerCase():i[s]))return l}return null}function H(e,i,o){if(!t.isNullOrUndefined(e)&&!t.isNullOrUndefined(o)&&!t.isNullOrUndefined(i))for(var a="[object Array]"===Object.prototype.toString.call(i)?i:[i],n=0;n<a.length;n++){if((t.isNullOrUndefined(e)||"string"!=typeof e?e:e.toLowerCase())===(!t.isNullOrUndefined(o[a[n]])&&isNaN(o[a[n]])?o[a[n]].toLowerCase():o[a[n]]))return a[n]}return null}function G(e,t,i){for(var o=[],a=0;a<e.length;a++){var n=e[a];t<=n.y&&i>=n.y&&o.push(n)}return o}function W(e,t,i,o,a){var n=(t-e)/100*(100/(a-o)*(i-o))+e;return a===o&&(n=(t-e)/100+e),n}function X(e,t,i){if(!e.length)return null;for(var o,a,n,l,r=e.length,s=0,d=0,p=0,h=0;h<=r-1;h++)o=e[h].x,a="Mercator"===t||"Normal"===i?e[h].y:-e[h].y,h===r-1?(n=e[0].x,l="Mercator"===t||"Normal"===i?e[0].y:-e[0].y):(n=e[h+1].x,l="Mercator"===t||"Normal"===i?e[h+1].y:-e[h+1].y),s+=Math.abs(o*l-n*a),d+=Math.abs((o+n)*(o*l-n*a)),p+=Math.abs((a+l)*(o*l-n*a));s*=.5;var m=e.some(function(e){return e.x<5&&e.y<5})&&"Normal"===i?6:4;d*=1/(m*s),p*=1/(m*s);var c={x:0,y:0},u={x:0,y:0},g={x:0,y:0},y={x:0,y:0},f={x:0,y:0},b={x:0,y:0},v={x:0,y:0},S={x:0,y:0},x=0;for(h=0;h<=r-1;h++){var O=e[h];O.y="Mercator"===t||"Normal"===i?O.y:-O.y,O.y>p?O.x<d&&d-O.x<d-f.x?f={x:O.x,y:O.y}:O.x>d&&(0===b.x||O.x-d<b.x-d)&&(b={x:O.x,y:O.y}):O.x<d&&d-O.x<d-v.x?v={x:O.x,y:O.y}:O.x>d&&(0===S.x||O.x-d<S.x-d)&&(S={x:O.x,y:O.y}),x=b.y-S.y+(b.y-S.y)/4,O.x>d?O.y<p&&p-O.y<p-c.y?c={x:O.x,y:O.y}:O.y>p&&(0===u.y||O.y-p<u.y-p)&&(u={x:O.x,y:O.y}):O.y<p&&p-O.y<p-g.y?g={x:O.x,y:O.y}:O.y>p&&(0===y.y||O.y-p<y.y-p)&&(y={x:O.x,y:O.y})}return{x:d,y:p,rightMin:c,rightMax:u,leftMin:g,leftMax:y,points:e,topMax:S,topMin:v,bottomMax:b,bottomMin:f,height:x}}function q(e){var i=!1;return"[object Array]"===Object.prototype.toString.call(e)&&Array.prototype.forEach.call(e,function(e,o){t.isNullOrUndefined(e.geometry)||"Path"!==e.geometry.type||(i=!0)}),i}function Y(e,t,i){var o=t,a=x(t,i).width;if(a>e)for(var n=t.length-1;n>=0;--n)if(o=t.substring(0,n)+"...",(a=x(o,i).width)<=e||o.length<4)return o.length<4&&(o=" "),o;return o}function J(e,t,i,o){var a;switch(t){case"Near":a=e.x;break;case"Center":a="title"===o?e.width/2-i.width/2:e.x+e.width/2-i.width/2;break;case"Far":a="title"===o?e.width-e.y-i.width:e.x+e.width-i.width}var n="title"===o?e.y+i.height/2:e.y+e.height/2+i.height/2;return new Ze(a,n)}function Q(e){var i=document.getElementById(e);return i?t.remove(i):null}function K(e,t){var i=h(e.minLatOfGivenLocation,e.minLongOfGivenLocation,e.mapLayerPanel.calculateFactor(t),t,e),o=h(e.maxLatOfGivenLocation,e.maxLongOfGivenLocation,e.mapLayerPanel.calculateFactor(t),t,e),a=(i.x+o.x)/2,n=(i.y+o.y)/2;return new Ze(a,n)}function $(e,i,o){var a,n=e.zoomSettings.zoomFactor,l=e.centerPosition,r=l.latitude,s=l.longitude,d=!t.isNullOrUndefined(e.centerLatOfGivenLocation)&&!t.isNullOrUndefined(e.centerLongOfGivenLocation)&&e.zoomNotApplied;t.isNullOrUndefined(e.mapScaleValue)&&(e.mapScaleValue=n),e.zoomSettings.shouldZoomInitially&&e.zoomSettings.enable&&(e.mapScaleValue=a=n=(e.zoomSettings.shouldZoomInitially||e.enablePersistence)&&1===e.scale?e.scale:t.isNullOrUndefined(e.markerZoomFactor)?1:e.markerZoomFactor,e.mapScaleValue===e.markerZoomFactor||e.enablePersistence||(e.mapScaleValue=n=e.markerZoomFactor),t.isNullOrUndefined(e.markerCenterLatitude)||t.isNullOrUndefined(e.markerCenterLongitude)||(r=e.markerCenterLatitude,s=e.markerCenterLongitude)),d&&(e.mapScaleValue=a=n=e.scaleOfGivenLocation);var p=t.isNullOrUndefined(e.baseMapRectBounds)?null:e.baseMapRectBounds.min,m=t.isNullOrUndefined(e.baseMapRectBounds)?null:e.baseMapRectBounds.max,c=o?1:e.mapScaleValue;t.isNullOrUndefined(e.currentShapeDataLength)&&(e.currentShapeDataLength=t.isNullOrUndefined(i.shapeData.features)?i.shapeData.geometries.length:i.shapeData.features.length);var u,g,y=e.totalRect&&e.legendSettings.visible?e.totalRect:e.mapAreaRect,f=e.availableSize;if(!t.isNullOrUndefined(p)&&!t.isNullOrUndefined(m)){var b=Math.abs(m.x-p.x),v=Math.abs(p.y-m.y),S=o?1:1===e.markerZoomFactor?e.mapScaleValue:n;if(l=e.zoomSettings.shouldZoomInitially&&e.markerZoomedState&&!e.zoomPersistence?e.markerZoomCenterPoint:e.centerPosition,!t.isNullOrUndefined(s)&&0!==s&&!t.isNullOrUndefined(r)&&0!==r||d){var x=((b+Math.abs(e.mapAreaRect.width-b))/2+e.mapAreaRect.x)/S,O=((v+Math.abs(e.mapAreaRect.height-v))/2+e.mapAreaRect.y)/S,C=d?K(e,i):h(r,s,e.mapLayerPanel.calculateFactor(i),i,e);t.isNullOrUndefined(e.previousProjection)||e.previousProjection!==e.projectionType?(u=-C.x+x,g=-C.y+O,a=c):(1!==Math.floor(e.scale)&&e.zoomSettings.shouldZoomInitially||e.zoomNotApplied?(u=-C.x+x,g=-C.y+O):e.zoomSettings.shouldZoomInitially||e.zoomNotApplied?(u=-C.x+x,g=-C.y+O,a=c):(u=e.zoomTranslatePoint.x,g=e.zoomTranslatePoint.y),a=e.mapScaleValue)}else if(t.isNullOrUndefined(e.previousProjection)||e.previousProjection!==e.projectionType){0!==v&&0!==b&&v!==b||(b=y.width/2,v=y.height),b*=a=(a=parseFloat(Math.min(y.width/b,y.height/v).toFixed(2)))>1.05?1:a,v*=a;var _=0!==p.x&&"layers"===e.translateType?f.width-y.width:0;u=y.x+(-p.x+(y.width/2-b/2))-_,g=y.y+(-p.y+(y.height/2-v/2)),e.previousTranslate=new Ze(u,g)}else if(e.zoomSettings.shouldZoomInitially||1!==e.markerZoomFactor||1!==e.mapScaleValue)if(a=e.mapScaleValue<1?e.mapScaleValue+1:e.mapScaleValue,e.mapScaleValue=e.zoomSettings.enable&&1!==e.mapScaleValue?e.mapScaleValue:1,e.currentShapeDataLength!==(t.isNullOrUndefined(i.shapeData.features)?i.shapeData.geometries.length:i.shapeData.features.length)&&"SubLayer"!==i.type){var M=parseFloat(Math.min(y.height/v,y.width/b).toFixed(2));v*=M,b*=M,g=y.y+(-p.y+(y.height/2-v/2)),a=M,u=y.x+(-p.x+(y.width/2-b/2))}else if(e.availableSize.height!==e.heightBeforeRefresh||e.widthBeforeRefresh!==e.availableSize.width){var L=parseFloat(Math.min(y.width/b,y.height/v).toFixed(2)),P=b;P*=L;var w=v;w*=L;var T=y.x+(-p.x+(y.width/2-P/2)),I=y.y+(-p.y+(y.height/2-w/2)),k=(e.translatePoint.x-e.previousTranslate.x)/e.widthBeforeRefresh,N=(e.translatePoint.y-e.previousTranslate.y)/e.heightBeforeRefresh;u=T+k*e.availableSize.width,g=I+N*e.availableSize.height,e.previousTranslate=new Ze(T,I),e.zoomTranslatePoint.x=u,e.zoomTranslatePoint.y=g}else t.isNullOrUndefined(e.previousProjection)||!(1===e.mapScaleValue||e.mapScaleValue<=1.05)||e.zoomModule.isDragZoom?(u=e.zoomTranslatePoint.x,g=e.zoomTranslatePoint.y,a=e.scale):(b*=a=(a=parseFloat(Math.min(y.width/b,y.height/v).toFixed(2)))>1.05?1:a,u=y.x+(-p.x+(y.width/2-b/2)),v*=a,g=y.y+(-p.y+(y.height/2-v/2)));else v*=a=parseFloat(Math.min(y.width/b,y.height/v).toFixed(2)),b*=a,g=y.y+(-p.y+(y.height/2-v/2)),u=y.x+(-p.x+(y.width/2-b/2));t.isNullOrUndefined(e.translatePoint)||(u=e.enablePersistence&&0!==e.translatePoint.x&&!e.zoomNotApplied?e.translatePoint.x:u,g=e.enablePersistence&&0!==e.translatePoint.y&&!e.zoomNotApplied?e.translatePoint.y:g)}return a=e.enablePersistence?e.mapScaleValue>=1?e.mapScaleValue:1:a,e.widthBeforeRefresh=e.availableSize.width,e.heightBeforeRefresh=e.availableSize.height,{scale:a,location:new Ze(u,g)}}function ee(e,i,o){var a,n=e.zoomSettings.zoomFactor,l=e.centerPosition,r=l.latitude,s=l.longitude,d=!t.isNullOrUndefined(e.centerLongOfGivenLocation)&&!t.isNullOrUndefined(e.centerLatOfGivenLocation)&&e.zoomNotApplied;t.isNullOrUndefined(e.previousCenterLatitude)&&t.isNullOrUndefined(e.previousCenterLongitude)?(e.previousCenterLatitude=e.centerPosition.latitude,e.previousCenterLongitude=e.centerPosition.longitude):e.previousCenterLatitude!==e.centerPosition.latitude&&e.previousCenterLongitude!==e.centerPosition.longitude?(e.centerPositionChanged=!0,e.previousCenterLatitude=e.centerPosition.latitude,e.previousCenterLongitude=e.centerPosition.longitude):e.centerPositionChanged=!1,(t.isNullOrUndefined(e.mapScaleValue)||n>e.mapScaleValue)&&(e.isReset&&1===e.mapScaleValue?e.mapScaleValue=e.mapScaleValue:e.mapScaleValue=n),e.mapScaleValue=1!==e.zoomSettings.zoomFactor&&e.zoomSettings.zoomFactor===e.mapScaleValue?e.zoomSettings.zoomFactor:e.zoomSettings.zoomFactor===e.mapScaleValue||e.centerPositionChanged?e.zoomSettings.zoomFactor:e.mapScaleValue,e.zoomSettings.shouldZoomInitially&&!e.isZoomByPosition&&(e.mapScaleValue=n=a=(e.enablePersistence||e.zoomSettings.shouldZoomInitially)&&1===e.scale?e.scale:t.isNullOrUndefined(e.markerZoomFactor)?e.mapScaleValue:e.markerZoomFactor,n=e.mapScaleValue,t.isNullOrUndefined(e.markerCenterLatitude)||t.isNullOrUndefined(e.markerCenterLongitude)||(r=e.markerCenterLatitude,s=e.markerCenterLongitude)),d&&(e.mapScaleValue=a=n=e.scaleOfGivenLocation);var p,m,c=o?1:e.mapScaleValue,u=e.mapAreaRect,g=e.baseMapRectBounds.min,y=e.baseMapRectBounds.max,f=o?1:e.mapScaleValue,b=Math.abs(y.x-g.x),v=Math.abs(g.y-y.y);if(!t.isNullOrUndefined(s)&&0!==s&&!t.isNullOrUndefined(r)&&0!==r||d){var S=(v+Math.abs(e.mapAreaRect.height-v))/2/f,x=(b+Math.abs(e.mapAreaRect.width-b))/2/f,O=d?K(e,i):h(r,s,e.mapLayerPanel.calculateFactor(i),i,e);t.isNullOrUndefined(e.zoomTranslatePoint)&&t.isNullOrUndefined(e.previousProjection)||e.zoomNotApplied?(p=-O.x+x+e.mapAreaRect.x/c,m=-O.y+S+e.mapAreaRect.y/c):e.previousProjection!==e.projectionType?(p=-O.x+x,m=-O.y+S):(e.isZoomByPosition&&(e.zoomTranslatePoint.x=-O.x+x,e.zoomTranslatePoint.y=-O.y+S),p=e.zoomTranslatePoint.x,m=e.zoomTranslatePoint.y,n=c),t.isNullOrUndefined(e.translatePoint)||(m=e.enablePersistence&&0!==e.translatePoint.y&&!e.zoomNotApplied?e.translatePoint.y:m,p=e.enablePersistence&&0!==e.translatePoint.x&&!e.zoomNotApplied?e.translatePoint.x:p),a=0!==n?n:1}else{var C=0===e.zoomSettings.zoomFactor?1:e.zoomSettings.zoomFactor,_=e.zoomSettings.maxZoom;a=C=C>_?_:C;var M=0===e.mapScaleValue?1:e.mapScaleValue>_?_:e.mapScaleValue;x=u.x+(-g.x+(u.width/2-b/2)),S=u.y+(-g.y+(u.height/2-v/2));if(!t.isNullOrUndefined(e.zoomTranslatePoint)||!t.isNullOrUndefined(e.previousProjection))if(e.previousProjection!==e.projectionType){var L=[],P={x:x,y:S};L.push(P);for(var w=1;w<_;w++){P={x:L[w-1].x-(u.width/w-u.width/(w+1))/2,y:L[w-1].y-(u.height/w-u.height/(w+1))/2},L.push(P)}x=L[C-1].x,S=L[C-1].y}else x=e.zoomTranslatePoint.x,S=e.zoomTranslatePoint.y,C!==M&&(a=M);t.isNullOrUndefined(e.translatePoint)||(p=e.enablePersistence&&0!==e.translatePoint.x&&!e.zoomNotApplied?e.translatePoint.x:x,m=e.enablePersistence&&0!==e.translatePoint.y&&!e.zoomNotApplied?e.translatePoint.y:S)}return a=e.enablePersistence?0===e.mapScaleValue?1:e.mapScaleValue:a,e.widthBeforeRefresh=e.availableSize.width,e.heightBeforeRefresh=e.availableSize.height,{scale:o?1:a,location:new Ze(p,m)}}function te(e){e.tileZoomScale=e.tileZoomLevel=Math.floor(e.availableSize.height/512)+1;var t="GoogleStaticMap"!==e.layers[e.baseLayerIndex].layerType?20:0,i=256*Math.pow(2,e.tileZoomLevel);e.tileTranslatePoint.x=e.availableSize.width/2-i/2,e.tileTranslatePoint.y=e.availableSize.height/2-i/2+t,e.previousTileWidth=e.availableSize.width,e.previousTileHeight=e.availableSize.height}function ie(e){return document.getElementById(e)}function oe(e,t){return e.formatFunction=e.intl.getNumberFormat({format:e.format,useGrouping:e.useGroupingSeparator}),e.formatFunction(t)}function ae(e,i){var o=null;try{"function"!=typeof e&&document.querySelectorAll(e).length?o=t.compile(document.querySelector(e).innerHTML.trim()):i.isVue||i.isVue3?o=t.compile(e):"function"==typeof e&&(o=t.compile(e))}catch(i){o=t.compile(e)}return o}function ne(e){return document.getElementById(e)}function le(e,t){var i,o=parseInt(e.split("_LayerIndex_")[1].split("_")[0],10),a=parseInt(e.split("_shapeIndex_")[1].split("_")[0],10),n=t.layersCollection[o],l=n.layerData[a].property;return n.dataSource&&(i=n.dataSource[V(n.dataSource,l,n.shapeDataPath,n.shapePropertyPath)]),{shapeData:l,data:i}}function re(e,i,o,a){var n=le(e,o),l={color:i.border.color,opacity:i.border.opacity,width:i.border.width},r=i.enableMultiSelect?{cancel:!1,name:a,fill:i.fill,opacity:i.opacity,border:l,shapeData:n.shapeData,data:n.data,target:e,maps:o,shapeDataCollection:o.shapeSelectionItem}:{cancel:!1,name:a,fill:i.fill,opacity:i.opacity,border:l,shapeData:n.shapeData,data:n.data,target:e,maps:o};return o.trigger(a,r,function(){r.border.opacity=t.isNullOrUndefined(r.border.opacity)?r.opacity:r.border.opacity}),r}function se(e){return document.getElementsByClassName(e)}function de(e,t){var i=null;return document.getElementById(t)&&(i=document.getElementById(t).querySelector("#"+e)),i}function pe(e,t,i,o){for(var a,n=o.layers[e].shapeData.features,l=0;l<n.length;l++)if(n[l].properties.name===t){a=o.element.id+"_LayerIndex_"+e+"_shapeIndex_"+l+"_dataIndex_undefined";break}return ne(a)}function he(e,i,o){var a=t.createElement("style",{id:e});return a.innerText="."+i+"{fill:"+o.fill+";fill-opacity:"+o.opacity.toString()+";stroke-opacity:"+o.border.opacity.toString()+";stroke-width:"+o.border.width.toString()+";stroke:"+o.border.color+";}",a}function me(e,i,o){var a=ne(e);t.isNullOrUndefined(a)||(a.innerText="."+i+"{fill:"+o.fill+";fill-opacity:"+o.opacity.toString()+";stroke-width:"+o.border.width.toString()+";stroke-opacity:"+o.border.opacity.toString()+";stroke:"+o.border.color+"}")}function ce(e,i,o,a,n){var l={color:e.border.color,width:e.border.width/i.scale,opacity:e.border.opacity},r={opacity:e.opacity,fill:e.fill,border:l,name:ni,target:o.id,cancel:!1,shapeData:a,data:n,maps:i};i.trigger("itemSelection",r,function(o){r.border.opacity=t.isNullOrUndefined(e.border.opacity)?e.opacity:e.border.opacity,i.shapeSelectionItem.push(r.shapeData),ne("ShapeselectionMap")?me("ShapeselectionMap","ShapeselectionMapStyle",r):document.body.appendChild(he("ShapeselectionMap","ShapeselectionMapStyle",r))})}function ue(e){e.removeAttribute("class")}function ge(e,i,o,a,n,l,r){void 0===r&&(r=0);var s=a.x,d=a.y,p=0,h=e.getAttribute("transform")||"";new t.Animation({}).animate(e,{duration:0===o&&"Enable"===t.animationMode?1e3:o,delay:i,progress:function(i){if(i.timeStamp>i.delay){if(n.isTileMap&&0===p){var o=document.querySelector(".GroupElement");t.isNullOrUndefined(o)||(o.style.display="block")}p=(i.timeStamp-i.delay)/i.duration,e.setAttribute("transform","translate( "+(s-r*p)+" "+(d-r*p)+" ) scale("+p+")")}},end:function(t){if(e.setAttribute("transform",h),l){var i={cancel:!1,name:oi,element:l,maps:n};n.trigger(oi,i)}}})}function ye(e){Q(e)}function fe(e,i,o,a,n,l,r,d,p){var h=s(o,a,d);t.isNullOrUndefined(h)||(o=h.x,a=h.y);for(var m=document.getElementById(r),c=x(e,{fontFamily:"Segoe UI",size:"8px",fontStyle:"Normal",fontWeight:"Regular"}).width,u=e.split(" "),g=u[0].length,y=1;y<u.length;y++)g<u[y].length&&(g=u[y].length);m||((m=t.createElement("div",{id:r})).style.cssText='background-color: rgb(255, 255, 255) !important; color:black !important; position:absolute;border:1px solid rgb(0, 0, 0); padding-left:5px;font-size:12px; font-family: "Segoe UI"; text-align:center'),o<n-c?o=o:o>n-c&&o<n-8*g?c=n-o:o>=n-8*g&&(o>c?o-=c:(c=o,o=0));var f=i.split("px");be(m,e,o,a,f,c,n,d);m.clientHeight+2*parseInt(f[0],10)>l&&(c=o,o=0),be(m,e,o,a,f,c,n,d),p&&setTimeout(ye,5e3,r)}function be(e,t,i,o,a,n,l,r){e.innerText=t,e.style.top=-1!==e.id.indexOf("_Legend")?(parseInt(a[0],10)+o).toString()+"px":(2*parseInt(a[0],10)).toString()+"px",e.style.left=i.toString()+"px",e.style.width=n.toString()+"px",e.style.maxWidth=l.toString()+"px",e.style.wordWrap="break-word",r.appendChild(e)}function ve(e,i,o,a,n){var l=ne(e),r=Se(n.borderColor),s=Se(n.fontColor),d="top:"+o.toString()+"px;left:"+a.toString()+"px;color:"+(s?"rgba("+s.r+","+s.g+","+s.b+","+n.fontOpacity+")":n.fontColor)+";background:"+n.fill+";z-index: 2;position:absolute;border:"+n.borderWidth+"px solid "+(r?"rgba("+r.r+","+r.g+","+r.b+","+n.borderOpacity+")":n.borderColor)+";font-family:"+n.fontFamily+";font-style:"+n.fontStyle+";font-weight:"+n.fontWeight+";font-size:"+n.fontSize+";border-radius:"+n.borderWidth+"px;";!l&&n.visible?((l=t.createElement("div",{id:e})).innerHTML=t.SanitizeHtmlHelper.sanitize(" "+i+" "),l.style.cssText=d,document.body.appendChild(l)):n.visible&&(l.innerHTML=t.SanitizeHtmlHelper.sanitize(" "+i+" "),l.style.cssText=d)}function Se(e){if(-1!==e.indexOf("#")&&-1===e.toLowerCase().indexOf("rgb")){return(i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e))?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null}if(-1!==e.toLowerCase().indexOf("rgb")){return(i=e.match(/\d+/g).map(function(e){return parseInt(e,10)}))?{r:i[0],g:i[1],b:i[2]}:null}var t=document.createElement("div");t.style.color=e;var i=window.getComputedStyle(document.body.appendChild(t)).color.match(/\d+/g).map(function(e){return parseInt(e,10)});return document.body.removeChild(t),i?{r:i[0],g:i[1],b:i[2]}:null}function xe(e,t,o,a,n){var l=new i.SvgRenderer(""),r=Oe(e,o,t,n,a);return l["draw"+r.functionName](r.renderOption)}function Oe(e,i,o,a,n){var l,r="Path",s=i.width,d=i.height,p=e.x,h=e.y,m=e.x+-s/2,c=e.y+-d/2;switch(a.stroke="HorizontalLine"===o||"VerticalLine"===o||"Cross"===o?a.fill:a.stroke,a["stroke-width"]=0!==a["stroke-width"]||"HorizontalLine"!==o&&"VerticalLine"!==o&&"Cross"!==o?a["stroke-width"]:1,o){case"Circle":case"Bubble":r="Ellipse",t.merge(a,{rx:s/2,ry:d/2,cx:p,cy:h});break;case"VerticalLine":l="M "+p+" "+(h+d/2)+" L "+p+" "+(h+-d/2),t.merge(a,{d:l});break;case"HorizontalLine":l="M "+p+" "+h+" L "+(p+s/2)+" "+h,t.merge(a,{d:l});break;case"Diamond":l="M "+m+" "+h+" L "+p+" "+(h+-d/2)+" L "+(p+s/2)+" "+h+" L "+p+" "+(h+d/2)+" L "+m+" "+h+" z",t.merge(a,{d:l});break;case"Rectangle":l="M "+m+" "+(h+-d/2)+" L "+(p+s/2)+" "+(h+-d/2)+" L "+(p+s/2)+" "+(h+d/2)+" L "+m+" "+(h+d/2)+" L "+m+" "+(h+-d/2)+" z",t.merge(a,{d:l});break;case"Triangle":l="M "+m+" "+(h+d/2)+" L "+p+" "+(h+-d/2)+" L "+(p+s/2)+" "+(h+d/2)+" L "+m+" "+(h+d/2)+" z",t.merge(a,{d:l});break;case"InvertedTriangle":l="M "+(p+s/2)+" "+(h-d/2)+" L "+p+" "+(h+d/2)+" L "+(p-s/2)+" "+(h-d/2)+" L "+(p+s/2)+" "+(h-d/2)+" z",t.merge(a,{d:l});break;case"Pentagon":for(var u=void 0,g=void 0,y=0;y<=5;y++)u=s/2*Math.cos(Math.PI/180*(72*y)),g=s/2*Math.sin(Math.PI/180*(72*y)),l=0===y?"M "+(p+u)+" "+(h+g)+" ":l.concat("L "+(p+u)+" "+(h+g)+" ");l=l.concat("Z"),t.merge(a,{d:l});break;case"Star":l="M "+(e.x+i.width/3)+" "+(e.y-i.height/2)+" L "+(e.x-i.width/2)+" "+(e.y+i.height/6)+" L "+(e.x+i.width/2)+" "+(e.y+i.height/6)+" L "+(e.x-i.width/3)+" "+(e.y-i.height/2)+" L "+e.x+" "+(e.y+i.height/2)+" L "+(e.x+i.width/3)+" "+(e.y-i.height/2)+" Z",t.merge(a,{d:l});break;case"Cross":l="M "+m+" "+h+" L "+(p+s/2)+" "+h+" M "+p+" "+(h+d/2)+" L "+p+" "+(h+-d/2),t.merge(a,{d:l});break;case"Image":r="Image",t.merge(a,{href:n,height:d,width:s,x:m,y:c})}return{renderOption:a,functionName:r}}function Ce(e,t){t.appendChild(e);var i=e.offsetWidth,o=e.offsetHeight;return t.removeChild(e),new Re(i,o)}function _e(e,i,o,a){for(var n,l=0;l<e.childElementCount;l++)if((n=e.childNodes[l]).id.indexOf("_NavigationGroup")>-1)Me(n,i,o,a);else{var r=void 0,s=0,d=a.layersCollection[i].shapeSettings.borderWidthValuePath,p=a.layersCollection[i].shapeSettings.border.width,h=a.layersCollection[i].shapeSettings.circleRadius;r=a.layersCollection[i].shapeSettings.borderWidthValuePath&&null!==(s=V(a.layersCollection[i].dataSource,a.layersCollection[i].layerData[l].property,a.layersCollection[i].shapeDataPath,a.layersCollection[i].shapePropertyPath,a.layersCollection[i]))&&a.layersCollection[i].dataSource[s][d]?a.layersCollection[i].dataSource[s][d]:t.isNullOrUndefined(p)?0:p,n.setAttribute("stroke-width",(r/o).toString()),(e.id.indexOf("_Point")>-1||e.id.indexOf("_MultiPoint")>-1)&&n.setAttribute("r",(h/o).toString())}}function Me(e,t,i,o){for(var a,n=0;n<e.childElementCount;n++)if("path"===(a=e.childNodes[n]).tagName){var l=o.layersCollection[t].navigationLineSettings[parseFloat(a.id.split("_NavigationIndex_")[1].split("_")[0])].width;a.setAttribute("stroke-width",(l/i).toString())}}function Le(e){for(var t=[],i=e.touches,o=0;o<i.length;o++)t.push({pageX:i[o].pageX,pageY:i[o].pageY});return t}function Pe(e,t){var i=we(e[0],e[1]);return we(t[0],t[1])/i}function we(e,t){var i=e.pageX-t.pageX,o=e.pageY-t.pageY;return Math.sqrt(i*i+o*o)}function Te(e,t){var i=t.element.getBoundingClientRect(),o=i.top+document.defaultView.pageXOffset,a=i.left+document.defaultView.pageYOffset;return Array.prototype.slice.call(e).map(function(e){return{x:e.pageX-a,y:e.pageY-o}})}function Ie(e){return{x:e.map(function(e){return e.x}).reduce(ke)/e.length,y:e.map(function(e){return e.y}).reduce(ke)/e.length}}function ke(e,t){return e+t}function Ne(e,t,i,o,a,n,l){var r=0,s=l.previousPoint,d=l.previousScale,p=a-d,h=new $e(0,0),m=1;if(a!==d){var c=function(e,t){return e.x===t.x?null:(t.y-e.y)/(t.x-e.x)}(s,o),u=function(e,t){return null===t?e.x:e.y-t*e.x}(s,c),g=o.x-s.x,y=o.y-s.y;Fe(e,t,i,function(e){e.timeStamp>e.delay&&(r=(e.timeStamp-e.delay)/e.duration,m=d+r*p,h.x=s.x+r*g/(m/a),h.y=null==c?s.y+r*y:c*h.x+u,e.element.setAttribute("transform","scale( "+m+" ) translate( "+h.x+" "+h.y+" )"),l.translatePoint=h,l.scale=m,l.zoomModule.processTemplate(o.x,o.y,m,l))},function(){l.translatePoint=o,l.scale=a,e.setAttribute("transform","scale( "+a+" ) translate( "+o.x+" "+o.y+" )"),l.zoomModule.processTemplate(o.x,o.y,a,l)})}else e.setAttribute("transform","scale( "+a+" ) translate( "+o.x+" "+o.y+" )")}function Fe(e,i,o,a,n){var l,r=this,s=null;o="Disable"===t.animationMode?0:o;var d=function(t){s||(s=t);var i=t-s;if(i<o)a.call(r,{element:e,delay:0,timeStamp:i,duration:o}),window.requestAnimationFrame(d);else if(window.cancelAnimationFrame(l),n.call(r,{element:e}),e.id.indexOf("Marker")>-1){ie(e.id.split("_Layer")[0]+"_Markers_Group").style.cssText="visibility:visible"}};l=window.requestAnimationFrame(d)}function Ee(e,t,i,o){var a=0,n=e.getAttribute("transform").split(" ");2===n.length&&(n[2]=n[1].split(")")[0],n[1]=n[0].split("(")[1]);var l=new $e(parseInt(n[1],10),parseInt(n[2],10)),r=o.x-l.x,s=o.y-l.y,d=new $e(0,0);Fe(e,0,i,function(e){e.timeStamp>e.delay&&(a=(e.timeStamp-e.delay)/e.duration,d.x=l.x+a*r,d.y=l.y+a*s,e.element.setAttribute("transform","translate( "+d.x+" "+d.y+" )"))},function(){e.setAttribute("transform","translate( "+o.x+" "+o.y+" )")})}function ze(e,i){var o=t.isNullOrUndefined(i.shouldZoomPreviousFactor)?null:i.shouldZoomPreviousFactor,a=t.isNullOrUndefined(i.shouldZoomCurrentFactor)?null:i.shouldZoomCurrentFactor;t.isNullOrUndefined(a)?!t.isNullOrUndefined(o)&&t.isNullOrUndefined(a)&&i.shouldZoomPreviousFactor!==e?i.shouldZoomCurrentFactor=e:i.shouldZoomPreviousFactor=e:(i.shouldZoomCurrentFactor=null,i.shouldZoomPreviousFactor=null)}function Ae(e,t,i,o,a,n,l,r){var s,d,p=l.zoomSettings.maxZoom,h=Math.sin(t*Math.PI/180),m=Math.log((1+h)/(1-h))/2,c=Math.max(Math.min(m,Math.PI),-Math.PI)/2,u=Math.sin(e*Math.PI/180),g=Math.log((1+u)/(1-u))/2,y=Math.max(Math.min(g,Math.PI),-Math.PI)/2;if(l.zoomNotApplied&&!l.isTileMap){var f=Math.abs((l.baseMapBounds.latitude.max-l.baseMapBounds.latitude.min)/(t-e)),b=Math.abs((l.baseMapBounds.longitude.max-l.baseMapBounds.longitude.min)/(o-i));d=r?(f+b)/2:Math.min(f,b)}var v=(c-y)/Math.PI,S=o-i,x=(S<0?S+360:S)/360,O=Math.log(n/256/v)/Math.LN2,C=Math.log(a/256/x)/Math.LN2,_=l.zoomNotApplied&&!l.isTileMap?d:r&&!l.isTileMap?(O+C)/2:Math.min(O,C);return s=Math.min(_,p),s=l.isTileMap||!l.zoomNotApplied?Math.floor(s):s,l.isTileMap||ze(s,l),s}function Be(e){var i,o=t.isNullOrUndefined(e.result)?e.actual:e.result;return t.isNullOrUndefined(o.length)?t.isNullOrUndefined(o.Items)||(i=o.Items):i=o,i}var Ue,je=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),Re=function(){return function(e,t){this.width=e,this.height=t}}(),Ze=function(){return function(e,t){this.x=e,this.y=t}}(),De=function(){return function(e,t){this.min=e,this.max=t}}(),Ve=function(){return function(e,t){this.latitude=new De(e.min,e.max),this.longitude=new De(t.min,t.max)}}(),He=function(){return function(e,t,i,o,a,n,l){void 0===n&&(n=""),this.transform="",this.baseLine="auto",this.id=e,this.text=a,this.transform=n,this.anchor=o,this.x=t,this.y=i,this.baseLine=l}}(),Ge=function(){return function(e,t,i,o,a,n,l,r){this.id=e,this["fill-opacity"]=a,this["stroke-opacity"]=n,this.fill=t,this.stroke=o,this["stroke-width"]=i,this["stroke-dasharray"]=l,this.d=r}}(),We=function(){return function(e,t,i){this.r=e,this.g=t,this.b=i}}(),Xe=function(e){function t(t,i,o,a,n,l,r,s,d){var p=e.call(this,t,i,o.width,o.color,a,o.opacity)||this;return p.y=n.y,p.x=n.x,p.height=n.height,p.width=n.width,p.rx=l||0,p.ry=r||0,p.transform=s||"",p["stroke-dasharray"]=d,p["fill-opacity"]=a,p["stroke-opacity"]=o.opacity,p}return je(t,e),t}(Ge),qe=function(e){function t(t,i,o,a,n,l,r,s){var d=e.call(this,t,i,o.width,o.color,a,o.opacity,s)||this;return d.cy=l,d.cx=n,d.r=r,d["stroke-dasharray"]=s,d["fill-opacity"]=a,d["stroke-opacity"]=o.opacity,d}return je(t,e),t}(Ge),Ye=function(e){function t(t,i,o,a,n,l,r,s){void 0===l&&(l=1),void 0===r&&(r=1),void 0===s&&(s="");var d=e.call(this,t,o,a,n,l,r,s)||this;return d.points=i,d}return je(t,e),t}(Ge),Je=function(e){function t(t,i,o,a,n,l,r,s){return void 0===l&&(l=1),void 0===r&&(r=1),void 0===s&&(s=""),e.call(this,t,i,o,a,n,l,r,s)||this}return je(t,e),t}(Ye),Qe=function(e){function t(t,i,o,a,n,l,r,s){void 0===l&&(l=1),void 0===r&&(r=1),void 0===s&&(s="");var d=e.call(this,t,o,a,n,l,r,s)||this;return d.x1=i.x1,d.y1=i.y1,d.x2=i.x2,d.y2=i.y2,d}return je(t,e),t}(Ge),Ke=function(){return function(e,t,i,o){this.x1=e,this.y1=t,this.x2=i,this.y2=o}}(),$e=function(){return function(e,t){this.x=e,this.y=t}}(),et=function(){return function(e,t,i,o){this.x=e,this.y=t,this.width=i,this.height=o}}(),tt=function(){return function(e,t,i,o,a,n,l,r,s){void 0===n&&(n="userSpaceOnUse"),void 0===l&&(l="userSpaceOnUse"),void 0===r&&(r=""),void 0===s&&(s=""),this.id=e,this.x=t,this.y=i,this.width=o,this.height=a,this.patternUnits=n,this.patternContentUnits=l,this.patternTransform=r,this.href=s}}(),it=function(){return function(e,t,i,o,a){this.dataOptions=e,this.type=t||"GET",this.async=i||!0,this.contentType=o,this.sendData=a}}();!function(e){e.mapsTitleFont={size:"14px",fontWeight:null,color:"#424242",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},e.mapsSubTitleFont={size:"13px",fontWeight:null,color:"#424242",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},e.tooltipLabelFont={size:"12px",fontWeight:"Regular",color:null,fontStyle:"Regular",fontFamily:null},e.legendTitleFont={size:"12px",fontWeight:"Medium",color:null,fontStyle:"Medium",fontFamily:null},e.legendLabelFont={size:"13px",fontWeight:"Medium",color:null,fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},e.dataLabelFont={size:"12px",fontWeight:"Medium",color:"#000000",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"}}(Ue||(Ue={}));var ot;!function(e){e.mapsTitleFont={size:"14px",fontWeight:"Semibold",color:"#424242",fontStyle:"Semibold",fontFamily:"SegoeUI, Helvetica Neue, Helvetica, Arial, sans-serif"},e.mapsSubTitleFont={size:"13px",fontWeight:"Regular",color:"#424242",fontStyle:"Regular",fontFamily:"SegoeUI, Helvetica Neue, Helvetica, Arial, sans-serif"},e.tooltipLabelFont={size:"12px",fontWeight:"Regular",color:"#FFFFFF",fontStyle:"Regular",fontFamily:"Roboto"},e.legendTitleFont={size:"14px",fontWeight:"Regular",color:"#757575",fontStyle:"Regular",fontFamily:"SegoeUI, Helvetica Neue, Helvetica, Arial, sans-serif"},e.legendLabelFont={size:"13px",fontWeight:"Medium",color:"#757575",fontStyle:"Medium",fontFamily:"SegoeUI, Helvetica Neue, Helvetica, Arial, sans-serif"},e.dataLabelFont={size:"12px",fontWeight:"Medium",color:"#000000",fontStyle:"Medium",fontFamily:"SegoeUI, Helvetica Neue, Helvetica, Arial, sans-serif"}}(ot||(ot={}));var at;!function(e){e.mapsTitleFont={size:"14px",fontWeight:"Semibold",color:"#424242",fontStyle:"Semibold",fontFamily:"Helvetica Neue, Helvetica, Arial, sans-serif"},e.mapsSubTitleFont={size:"13px",fontWeight:"Regular",color:"#424242",fontStyle:"Regular",fontFamily:"Helvetica Neue, Helvetica, Arial, sans-serif"},e.tooltipLabelFont={size:"12px",fontWeight:"Regular",color:"#FFFFFF",fontStyle:"Regular",fontFamily:"Roboto"},e.legendTitleFont={size:"14px",fontWeight:"Regular",color:"#757575",fontStyle:"Regular",fontFamily:"Helvetica Neue, Helvetica, Arial, sans-serif"},e.legendLabelFont={size:"13px",fontWeight:"Medium",color:"#757575",fontStyle:"Medium",fontFamily:"Helvetica Neue, Helvetica, Arial, sans-serif"},e.dataLabelFont={size:"12px",fontWeight:"Medium",color:"#000000",fontStyle:"Medium",fontFamily:"Helvetica Neue, Helvetica, Arial, sans-serif"}}(at||(at={}));var nt;!function(e){e.mapsTitleFont={size:"14px",fontWeight:"Medium",color:"#FFFFFF",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},e.mapsSubTitleFont={size:"13px",fontWeight:"Medium",color:"#FFFFFF",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},e.tooltipLabelFont={size:"12px",fontWeight:"Regular",color:"#000000",fontStyle:"Regular",fontFamily:"Roboto"},e.legendTitleFont={size:"14px",fontWeight:"Regular",color:"#FFFFFF",fontStyle:"Regular",fontFamily:"Roboto, Noto, Sans-serif"},e.legendLabelFont={size:"13px",fontWeight:"Medium",color:"#FFFFFF",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},e.dataLabelFont={size:"12px",fontWeight:"Medium",color:"#000000",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"}}(nt||(nt={}));var lt;!function(e){e.mapsTitleFont={fontFamily:"Roboto, Noto, Sans-serif",fontWeight:"Medium",size:"14px",fontStyle:"Medium",color:"#FFFFFF"},e.mapsSubTitleFont={size:"13px",color:"#FFFFFF",fontWeight:"Medium",fontFamily:"Roboto, Noto, Sans-serif",fontStyle:"Medium"},e.tooltipLabelFont={size:"12px",color:"#282727",fontWeight:"Regular",fontFamily:"Roboto",fontStyle:"Regular"},e.legendTitleFont={size:"14px",fontWeight:"Regular",color:"#FFFFFF",fontStyle:"Regular",fontFamily:"Roboto, Noto, Sans-serif"},e.legendLabelFont={size:"13px",fontFamily:"Roboto, Noto, Sans-serif",fontWeight:"Medium",color:"#DADADA",fontStyle:"Medium"}}(lt||(lt={}));var rt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),st=function(e,t,i,o){var a,n=arguments.length,l=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(l=(n<3?a(l):n>3?a(t,i,l):a(t,i))||l);return n>3&&l&&Object.defineProperty(t,i,l),l},dt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property("")],i.prototype,"content",void 0),st([t.Property("0px")],i.prototype,"x",void 0),st([t.Property("0px")],i.prototype,"y",void 0),st([t.Property("None")],i.prototype,"verticalAlignment",void 0),st([t.Property("None")],i.prototype,"horizontalAlignment",void 0),st([t.Property("-1")],i.prototype,"zIndex",void 0),i}(t.ChildProperty),pt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property("Start")],i.prototype,"position",void 0),st([t.Property("false")],i.prototype,"showArrow",void 0),st([t.Property(2)],i.prototype,"size",void 0),st([t.Property("black")],i.prototype,"color",void 0),st([t.Property(0)],i.prototype,"offSet",void 0),i}(t.ChildProperty),ht=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property("12px")],i.prototype,"size",void 0),st([t.Property(null)],i.prototype,"color",void 0),st([t.Property("Roboto, Noto, Sans-serif")],i.prototype,"fontFamily",void 0),st([t.Property("Medium")],i.prototype,"fontWeight",void 0),st([t.Property("Medium")],i.prototype,"fontStyle",void 0),st([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),mt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property("transparent")],i.prototype,"fill",void 0),st([t.Property(null)],i.prototype,"color",void 0),st([t.Property(1)],i.prototype,"borderOpacity",void 0),st([t.Property(1)],i.prototype,"borderWidth",void 0),st([t.Property(null)],i.prototype,"borderColor",void 0),st([t.Property(30)],i.prototype,"radius",void 0),st([t.Property(null)],i.prototype,"selectionColor",void 0),st([t.Property(null)],i.prototype,"highlightColor",void 0),st([t.Property(5)],i.prototype,"padding",void 0),st([t.Property(1)],i.prototype,"opacity",void 0),st([t.Property(["ZoomIn","ZoomOut","Reset"])],i.prototype,"toolbarItems",void 0),i}(t.ChildProperty),ct=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(!0)],i.prototype,"visible",void 0),st([t.Property("white")],i.prototype,"fill",void 0),st([t.Property(1)],i.prototype,"borderOpacity",void 0),st([t.Property(1)],i.prototype,"borderWidth",void 0),st([t.Property("#707070")],i.prototype,"borderColor",void 0),st([t.Property("black")],i.prototype,"fontColor",void 0),st([t.Property("")],i.prototype,"fontFamily",void 0),st([t.Property("")],i.prototype,"fontStyle",void 0),st([t.Property("")],i.prototype,"fontWeight",void 0),st([t.Property("")],i.prototype,"fontSize",void 0),st([t.Property(1)],i.prototype,"fontOpacity",void 0),i}(t.ChildProperty),ut=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property("transparent")],i.prototype,"backgroundColor",void 0),st([t.Property(1)],i.prototype,"borderOpacity",void 0),st([t.Property(1)],i.prototype,"borderWidth",void 0),st([t.Property("transparent")],i.prototype,"borderColor",void 0),st([t.Property("Far")],i.prototype,"horizontalAlignment",void 0),st([t.Property("Near")],i.prototype,"verticalAlignment",void 0),st([t.Property("Horizontal")],i.prototype,"orientation",void 0),st([t.Complex({},mt)],i.prototype,"buttonSettings",void 0),st([t.Complex({},ct)],i.prototype,"tooltipSettings",void 0),i}(t.ChildProperty),gt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property("")],i.prototype,"color",void 0),st([t.Property(0)],i.prototype,"width",void 0),st([t.Property(null)],i.prototype,"opacity",void 0),i}(t.ChildProperty),yt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(null)],i.prototype,"latitude",void 0),st([t.Property(null)],i.prototype,"longitude",void 0),i}(t.ChildProperty),ft=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(!1)],i.prototype,"visible",void 0),st([t.Property("")],i.prototype,"template",void 0),st([t.Property("")],i.prototype,"fill",void 0),st([t.Complex({color:"transparent",width:1},gt)],i.prototype,"border",void 0),st([t.Complex({fontFamily:null,size:null,fontWeight:null},ht)],i.prototype,"textStyle",void 0),st([t.Property(null)],i.prototype,"format",void 0),st([t.Property(null)],i.prototype,"valuePath",void 0),i}(t.ChildProperty),bt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(10)],i.prototype,"left",void 0),st([t.Property(10)],i.prototype,"right",void 0),st([t.Property(10)],i.prototype,"top",void 0),st([t.Property(10)],i.prototype,"bottom",void 0),i}(t.ChildProperty),vt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property("#000000")],i.prototype,"color",void 0),st([t.Property(1)],i.prototype,"width",void 0),st([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),St=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(!1)],i.prototype,"allowClustering",void 0),st([t.Complex({color:"transparent",width:1},gt)],i.prototype,"border",void 0),st([t.Property("#D2691E")],i.prototype,"fill",void 0),st([t.Property(1)],i.prototype,"opacity",void 0),st([t.Property("Rectangle")],i.prototype,"shape",void 0),st([t.Property(12)],i.prototype,"width",void 0),st([t.Property(12)],i.prototype,"height",void 0),st([t.Property(new Ze(0,0))],i.prototype,"offset",void 0),st([t.Property("")],i.prototype,"imageUrl",void 0),st([t.Property("")],i.prototype,"dashArray",void 0),st([t.Complex({},ht)],i.prototype,"labelStyle",void 0),st([t.Property(!1)],i.prototype,"allowClusterExpand",void 0),st([t.Complex({},vt)],i.prototype,"connectorLineSettings",void 0),i}(t.ChildProperty),xt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return rt(t,e),t}(t.ChildProperty),Ot=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(null)],i.prototype,"from",void 0),st([t.Property(null)],i.prototype,"to",void 0),st([t.Property(null)],i.prototype,"value",void 0),st([t.Property(null)],i.prototype,"color",void 0),st([t.Property(null)],i.prototype,"minOpacity",void 0),st([t.Property(null)],i.prototype,"maxOpacity",void 0),st([t.Property(null)],i.prototype,"label",void 0),st([t.Property(!0)],i.prototype,"showLegend",void 0),i}(t.ChildProperty),Ct=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(null)],i.prototype,"latitude",void 0),st([t.Property(null)],i.prototype,"longitude",void 0),i}(t.ChildProperty),_t=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(null)],i.prototype,"shapePath",void 0),st([t.Property(null)],i.prototype,"shapeValue",void 0),i}(t.ChildProperty),Mt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(!1)],i.prototype,"enable",void 0),st([t.Property(null)],i.prototype,"fill",void 0),st([t.Property(1)],i.prototype,"opacity",void 0),st([t.Property(!1)],i.prototype,"enableMultiSelect",void 0),st([t.Complex({color:"transparent",width:0},gt)],i.prototype,"border",void 0),i}(t.ChildProperty),Lt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(null)],i.prototype,"fill",void 0),st([t.Property(!1)],i.prototype,"enable",void 0),st([t.Property(1)],i.prototype,"opacity",void 0),st([t.Complex({color:"transparent",width:0},gt)],i.prototype,"border",void 0),i}(t.ChildProperty),Pt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(!1)],i.prototype,"visible",void 0),st([t.Property(1)],i.prototype,"width",void 0),st([t.Property(null)],i.prototype,"longitude",void 0),st([t.Property(null)],i.prototype,"latitude",void 0),st([t.Property("")],i.prototype,"dashArray",void 0),st([t.Property("black")],i.prototype,"color",void 0),st([t.Property(0)],i.prototype,"angle",void 0),st([t.Complex({showArrow:!1,position:"Start",size:5,color:"black"},pt)],i.prototype,"arrowSettings",void 0),st([t.Complex({},Mt)],i.prototype,"selectionSettings",void 0),st([t.Complex({},Lt)],i.prototype,"highlightSettings",void 0),i}(t.ChildProperty),wt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Complex({},gt)],i.prototype,"border",void 0),st([t.Property(!1)],i.prototype,"visible",void 0),st([t.Property([])],i.prototype,"dataSource",void 0),st([t.Property()],i.prototype,"query",void 0),st([t.Property(1e3)],i.prototype,"animationDuration",void 0),st([t.Property(0)],i.prototype,"animationDelay",void 0),st([t.Property("")],i.prototype,"fill",void 0),st([t.Property(10)],i.prototype,"minRadius",void 0),st([t.Property(20)],i.prototype,"maxRadius",void 0),st([t.Property(1)],i.prototype,"opacity",void 0),st([t.Property(null)],i.prototype,"valuePath",void 0),st([t.Property("Circle")],i.prototype,"bubbleType",void 0),st([t.Property(null)],i.prototype,"colorValuePath",void 0),st([t.Collection([],Ot)],i.prototype,"colorMapping",void 0),st([t.Complex({},ft)],i.prototype,"tooltipSettings",void 0),st([t.Complex({},Mt)],i.prototype,"selectionSettings",void 0),st([t.Complex({},Lt)],i.prototype,"highlightSettings",void 0),i}(t.ChildProperty),Tt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property("")],i.prototype,"text",void 0),st([t.Property("")],i.prototype,"description",void 0),i}(t.ChildProperty),It=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Complex({size:null,fontWeight:null,fontFamily:null},ht)],i.prototype,"textStyle",void 0),st([t.Property("Center")],i.prototype,"alignment",void 0),i}(Tt),kt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Complex({size:null,fontWeight:null,fontFamily:null},ht)],i.prototype,"textStyle",void 0),st([t.Property("Center")],i.prototype,"alignment",void 0),st([t.Complex({},It)],i.prototype,"subtitleSettings",void 0),i}(Tt),Nt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(!1)],i.prototype,"enable",void 0),st([t.Property(!0)],i.prototype,"enablePanning",void 0),st([t.Property(!0)],i.prototype,"enableSelectionZooming",void 0),st([t.Property("Horizontal")],i.prototype,"toolBarOrientation",void 0),st([t.Property(null)],i.prototype,"color",void 0),st([t.Property(null)],i.prototype,"highlightColor",void 0),st([t.Property(null)],i.prototype,"selectionColor",void 0),st([t.Property("Far")],i.prototype,"horizontalAlignment",void 0),st([t.Property("Near")],i.prototype,"verticalAlignment",void 0),st([t.Property(["ZoomIn","ZoomOut","Reset"])],i.prototype,"toolbars",void 0),st([t.Property(!0)],i.prototype,"mouseWheelZoom",void 0),st([t.Property(!1)],i.prototype,"doubleClickZoom",void 0),st([t.Property(!0)],i.prototype,"pinchZooming",void 0),st([t.Property(!1)],i.prototype,"zoomOnClick",void 0),st([t.Property(1)],i.prototype,"zoomFactor",void 0),st([t.Property(10)],i.prototype,"maxZoom",void 0),st([t.Property(1)],i.prototype,"minZoom",void 0),st([t.Property(!1)],i.prototype,"shouldZoomInitially",void 0),st([t.Property(!0)],i.prototype,"resetToInitial",void 0),st([t.Complex({},ut)],i.prototype,"toolbarSettings",void 0),i}(t.ChildProperty),Ft=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(!1)],i.prototype,"enable",void 0),st([t.Property(!0)],i.prototype,"applyShapeSettings",void 0),st([t.Property(1)],i.prototype,"opacity",void 0),st([t.Property("")],i.prototype,"fill",void 0),st([t.Complex({color:"",width:0},gt)],i.prototype,"border",void 0),i}(t.ChildProperty),Et=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(!1)],i.prototype,"useMarkerShape",void 0),st([t.Property(!1)],i.prototype,"toggleVisibility",void 0),st([t.Property(!1)],i.prototype,"visible",void 0),st([t.Property("transparent")],i.prototype,"background",void 0),st([t.Property("Layers")],i.prototype,"type",void 0),st([t.Property(!1)],i.prototype,"invertedPointer",void 0),st([t.Property("After")],i.prototype,"labelPosition",void 0),st([t.Property("None")],i.prototype,"labelDisplayMode",void 0),st([t.Property("Circle")],i.prototype,"shape",void 0),st([t.Property("")],i.prototype,"width",void 0),st([t.Property("")],i.prototype,"height",void 0),st([t.Complex({fontFamily:null,fontWeight:null},ht)],i.prototype,"textStyle",void 0),st([t.Property(15)],i.prototype,"shapeWidth",void 0),st([t.Property(15)],i.prototype,"shapeHeight",void 0),st([t.Property(10)],i.prototype,"shapePadding",void 0),st([t.Complex({color:"#000000",width:0},gt)],i.prototype,"border",void 0),st([t.Complex({color:"#000000",width:0},gt)],i.prototype,"shapeBorder",void 0),st([t.Complex({},Tt)],i.prototype,"title",void 0),st([t.Complex({size:null,color:Ue.legendTitleFont.color,fontStyle:Ue.legendTitleFont.fontStyle,fontWeight:null,fontFamily:null},ht)],i.prototype,"titleStyle",void 0),st([t.Property("Bottom")],i.prototype,"position",void 0),st([t.Property("Center")],i.prototype,"alignment",void 0),st([t.Property("None")],i.prototype,"orientation",void 0),st([t.Property({x:0,y:0})],i.prototype,"location",void 0),st([t.Property(null)],i.prototype,"fill",void 0),st([t.Property(1)],i.prototype,"opacity",void 0),st([t.Property("Default")],i.prototype,"mode",void 0),st([t.Property(null)],i.prototype,"showLegendPath",void 0),st([t.Property(null)],i.prototype,"valuePath",void 0),st([t.Property(!1)],i.prototype,"removeDuplicateLegend",void 0),st([t.Complex({},Ft)],i.prototype,"toggleLegendSettings",void 0),i}(t.ChildProperty),zt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(!1)],i.prototype,"visible",void 0),st([t.Complex({width:0,color:"transparent"},gt)],i.prototype,"border",void 0),st([t.Property("black")],i.prototype,"fill",void 0),st([t.Property(1)],i.prototype,"opacity",void 0),st([t.Property(5)],i.prototype,"rx",void 0),st([t.Property(5)],i.prototype,"ry",void 0),st([t.Complex({fontWeight:null},ht)],i.prototype,"textStyle",void 0),st([t.Property("")],i.prototype,"labelPath",void 0),st([t.Property("None")],i.prototype,"smartLabelMode",void 0),st([t.Property("None")],i.prototype,"intersectionAction",void 0),st([t.Property("")],i.prototype,"template",void 0),st([t.Property(0)],i.prototype,"animationDuration",void 0),i}(t.ChildProperty),At=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(null)],i.prototype,"fill",void 0),st([t.Property([])],i.prototype,"palette",void 0),st([t.Property(5)],i.prototype,"circleRadius",void 0),st([t.Complex({width:null,color:"#000000"},gt)],i.prototype,"border",void 0),st([t.Property("")],i.prototype,"dashArray",void 0),st([t.Property(1)],i.prototype,"opacity",void 0),st([t.Property(null)],i.prototype,"colorValuePath",void 0),st([t.Property(null)],i.prototype,"borderColorValuePath",void 0),st([t.Property(null)],i.prototype,"borderWidthValuePath",void 0),st([t.Property(null)],i.prototype,"valuePath",void 0),st([t.Collection([],Ot)],i.prototype,"colorMapping",void 0),st([t.Property(!1)],i.prototype,"autofill",void 0),i}(t.ChildProperty),Bt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Complex({color:"transparent",width:1},gt)],i.prototype,"border",void 0),st([t.Property(null)],i.prototype,"dashArray",void 0),st([t.Property(!1)],i.prototype,"visible",void 0),st([t.Property(!1)],i.prototype,"enableDrag",void 0),st([t.Property("#FF471A")],i.prototype,"fill",void 0),st([t.Property(10)],i.prototype,"height",void 0),st([t.Property(10)],i.prototype,"width",void 0),st([t.Property(1)],i.prototype,"opacity",void 0),st([t.Property(null)],i.prototype,"colorValuePath",void 0),st([t.Property(null)],i.prototype,"shapeValuePath",void 0),st([t.Property(null)],i.prototype,"imageUrlValuePath",void 0),st([t.Property("Balloon")],i.prototype,"shape",void 0),st([t.Property("")],i.prototype,"legendText",void 0),st([t.Property(new Ze(0,0))],i.prototype,"offset",void 0),st([t.Property("")],i.prototype,"imageUrl",void 0),st([t.Property(null)],i.prototype,"template",void 0),st([t.Property([])],i.prototype,"dataSource",void 0),st([t.Property()],i.prototype,"query",void 0),st([t.Complex({},ft)],i.prototype,"tooltipSettings",void 0),st([t.Property(1e3)],i.prototype,"animationDuration",void 0),st([t.Property(0)],i.prototype,"animationDelay",void 0),st([t.Complex({},Mt)],i.prototype,"selectionSettings",void 0),st([t.Complex({},Lt)],i.prototype,"highlightSettings",void 0),st([t.Property(null)],i.prototype,"latitudeValuePath",void 0),st([t.Property(null)],i.prototype,"longitudeValuePath",void 0),st([t.Collection([],Ct)],i.prototype,"initialMarkerSelection",void 0),i}(t.ChildProperty),Ut=function(e){function t(t,i,o,a){return e.call(this,t,i,o,a)||this}return rt(t,e),t}(Bt),jt=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.isBaseLayer=!1,t}return rt(i,e),st([t.Property(null)],i.prototype,"shapeData",void 0),st([t.Property()],i.prototype,"query",void 0),st([t.Complex({},At)],i.prototype,"shapeSettings",void 0),st([t.Property([])],i.prototype,"dataSource",void 0),st([t.Property("Layer")],i.prototype,"type",void 0),st([t.Property("Geographic")],i.prototype,"geometryType",void 0),st([t.Property("Aerial")],i.prototype,"bingMapType",void 0),st([t.Property("RoadMap")],i.prototype,"staticMapType",void 0),st([t.Property("")],i.prototype,"key",void 0),st([t.Property("Geometry")],i.prototype,"layerType",void 0),st([t.Property("")],i.prototype,"urlTemplate",void 0),st([t.Property(!0)],i.prototype,"visible",void 0),st([t.Property("name")],i.prototype,"shapeDataPath",void 0),st([t.Property("name")],i.prototype,"shapePropertyPath",void 0),st([t.Property(0)],i.prototype,"animationDuration",void 0),st([t.Collection([],Ut)],i.prototype,"markerSettings",void 0),st([t.Complex({},St)],i.prototype,"markerClusterSettings",void 0),st([t.Complex({},zt)],i.prototype,"dataLabelSettings",void 0),st([t.Collection([],wt)],i.prototype,"bubbleSettings",void 0),st([t.Collection([],Pt)],i.prototype,"navigationLineSettings",void 0),st([t.Complex({},ft)],i.prototype,"tooltipSettings",void 0),st([t.Complex({},Mt)],i.prototype,"selectionSettings",void 0),st([t.Complex({},Lt)],i.prototype,"highlightSettings",void 0),st([t.Complex({},Ft)],i.prototype,"toggleLegendSettings",void 0),st([t.Collection([],_t)],i.prototype,"initialShapeSelection",void 0),i}(t.ChildProperty),Rt=function(){return function(e,t,i,o,a,n,l){void 0===i&&(i=256),void 0===o&&(o=256),void 0===a&&(a=0),void 0===n&&(n=0),void 0===l&&(l=null),this.x=e,this.y=t,this.top=a,this.left=n,this.height=i,this.width=o,this.src=l}}(),Zt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return rt(i,e),st([t.Property(null)],i.prototype,"background",void 0),st([t.Complex({color:"transparent",width:1},gt)],i.prototype,"border",void 0),i}(t.ChildProperty),Dt=function(){function e(e){this.maps=e,this.trackElements=[],this.sameMarkerData=[]}return e.prototype.markerRender=function(e,i,o,a,n){var l=this,r=0,s=0,d=0;e.translateType="marker";var p=e.layersCollection[o];this.markerSVGObject=e.renderer.createGroup({id:e.element.id+"_Markers_Group",class:"GroupElement"}),this.markerSVGObject.style.pointerEvents="auto";var c=t.createElement("div",{id:e.element.id+"_LayerIndex_"+o+"_Markers_Template_Group",className:e.element.id+"_template"});c.style.cssText="overflow: hidden; position: absolute;pointer-events: none;top:"+e.mapAreaRect.y+"px;left:"+e.mapAreaRect.x+"px;height:"+e.mapAreaRect.height+"px;width:"+e.mapAreaRect.width+"px;",p.markerSettings.map(function(u,g){var y=u.dataSource;Array.prototype.forEach.call(y,function(f,b){e.markerNullCount=g>0&&0===b?0:e.markerNullCount;var v={cancel:!1,name:Wt,fill:u.fill,height:u.height,width:u.width,imageUrl:u.imageUrl,shape:u.shape,template:u.template,data:f,maps:e,marker:u,border:u.border,colorValuePath:u.colorValuePath,shapeValuePath:u.shapeValuePath,imageUrlValuePath:u.imageUrlValuePath};e.trigger("markerRendering",v,function(S){v=I(v=T(v,f),f);var x=t.isNullOrUndefined(u.longitudeValuePath)?t.isNullOrUndefined(f.longitude)?t.isNullOrUndefined(f.Longitude)?null:parseFloat(f.Longitude):parseFloat(f.longitude):Number(w(f,u.longitudeValuePath)),O=t.isNullOrUndefined(u.latitudeValuePath)?t.isNullOrUndefined(f.latitude)?t.isNullOrUndefined(f.Latitude)?null:parseFloat(f.Latitude):parseFloat(f.latitude):Number(w(f,u.latitudeValuePath)),C=u.offset;if(!v.cancel&&u.visible&&!t.isNullOrUndefined(x)&&!t.isNullOrUndefined(O)){var _=e.element.id+"_LayerIndex_"+o+"_MarkerIndex_"+g+"_dataIndex_"+b,M=e.isTileMap?m(new $e(x,O),a,e.tileTranslatePoint,!0):h(O,x,a,p,e),L=0!==p.animationDuration||"Enable"===t.animationMode||t.isNullOrUndefined(e.zoomModule),P=e.isTileMap?"SubLayer"===p.type&&t.isNullOrUndefined(e.zoomModule)?M=m(new $e(x,O),e.tileZoomLevel,e.tileTranslatePoint,!0):new Object:!t.isNullOrUndefined(e.zoomModule)&&e.zoomSettings.zoomFactor>1?ee(e,p,L):$(e,p,L),N="AddMarker"===n?e.scale:P.scale,F="AddMarker"===n?e.translatePoint:P.location;!v.template||isNaN(M.x)||isNaN(M.y)?v.template||isNaN(M.x)||isNaN(M.y)||(r++,E(v,u,y,b,M,F,_,C,N,e,l.markerSVGObject)):(d++,z(v,void 0,_,f,g,c,M,F,N,C,e),e.renderReactTemplates())}s+=isNaN(O)||isNaN(x)?1:0,d+=v.cancel?1:0,r+=v.cancel?1:0,e.markerNullCount=t.isNullOrUndefined(x)||t.isNullOrUndefined(O)?e.markerNullCount+1:e.markerNullCount;var A=y.length-e.markerNullCount;l.markerSVGObject.childElementCount===A-d-s&&"Template"!==n&&(i.appendChild(l.markerSVGObject),p.markerClusterSettings.allowClustering&&(e.svgObject.appendChild(l.markerSVGObject),e.element.appendChild(e.svgObject),("OSM"===p.layerType||-1!==p.urlTemplate.indexOf("openstreetmap")&&t.isNullOrUndefined(p.shapeData))&&e.zoomSettings.enable?i.appendChild(l.markerSVGObject):k(p,l.markerSVGObject,e,o,l.markerSVGObject,i,!0,!1),e.renderReactTemplates())),c.childElementCount===A-r-s&&ie(e.element.id+"_Secondary_Element")&&(ie(e.element.id+"_Secondary_Element").appendChild(c),e.checkInitialRender&&p.markerClusterSettings.allowClustering&&(k(p,c,e,o,l.markerSVGObject,i,!1,!1),e.renderReactTemplates()))})})})},e.prototype.calculateIndividualLayerMarkerZoomLevel=function(e,t,i){var o,a,n=Math.abs(this.maps.baseMapBounds.latitude.max-this.maps.baseMapBounds.latitude.min),l=Math.abs(this.maps.baseMapBounds.longitude.max-this.maps.baseMapBounds.longitude.min);o=(o=Math.floor(Math.log(t/n)))>i?i:o,a=(a=Math.floor(Math.log(e/l)))>i?i:a;var r=Math.min(o,a),s=Math.min(r,i-1);return this.maps.isTileMap||ze(s,this.maps),s},e.prototype.calculateZoomCenterPositionAndFactor=function(e){if(!t.isNullOrUndefined(this.maps))if(this.maps.zoomSettings.shouldZoomInitially&&this.maps.markerModule){var i,o,a,n,l=void 0,r=void 0,s=void 0,d=this.maps.zoomSettings.maxZoom,p=this.maps.mapAreaRect.width,h=this.maps.mapAreaRect.height;if(this.maps.markerZoomedState=this.maps.markerZoomedState?this.maps.markerZoomedState:t.isNullOrUndefined(this.maps.markerZoomFactor)?!this.maps.markerZoomedState:this.maps.markerZoomFactor>1?this.maps.markerZoomedState:!this.maps.markerZoomedState,this.maps.defaultState=this.maps.markerZoomedState?!this.maps.markerZoomedState:this.maps.defaultState,Array.prototype.forEach.call(e,function(e){0!==e.markerSettings.length&&Array.prototype.forEach.call(e.markerSettings,function(e){var l=e.dataSource;Array.prototype.forEach.call(l,function(e,l){var r=t.isNullOrUndefined(e.latitude)?t.isNullOrUndefined(e.Latitude)?null:parseFloat(e.Latitude):parseFloat(e.latitude),s=t.isNullOrUndefined(e.longitude)?t.isNullOrUndefined(e.Longitude)?null:parseFloat(e.Longitude):parseFloat(e.longitude);i=t.isNullOrUndefined(i)&&0===l?s:i,o=t.isNullOrUndefined(o)&&0===l?r:o,a=t.isNullOrUndefined(a)&&0===l?r:a,n=t.isNullOrUndefined(n)&&0===l?s:n,i>s&&(i=s),a>r&&(a=r),n<s&&(n=s),o<r&&(o=r)})})}),!(t.isNullOrUndefined(a)||t.isNullOrUndefined(i)||t.isNullOrUndefined(n)||t.isNullOrUndefined(o))){r=(a+o)/2,s=(i+n)/2,this.maps.markerCenterLatitude=r,this.maps.markerCenterLongitude=s,(t.isNullOrUndefined(this.maps.markerZoomCenterPoint)||this.maps.markerZoomedState)&&(this.maps.markerZoomCenterPoint={latitude:r,longitude:s});var m=void 0;this.maps.isTileMap||0===this.maps.baseMapRectBounds.min.x?(l=Ae(a,o,i,n,p,h,this.maps,!1),this.maps.isTileMap?m=t.isNullOrUndefined(this.maps.markerZoomFactor)?l:t.isNullOrUndefined(this.maps.mapScaleValue)?l:this.maps.mapScaleValue>1&&1!==this.maps.markerZoomFactor?this.maps.mapScaleValue:l:(m=t.isNullOrUndefined(this.maps.mapScaleValue)?l:1!==Math.floor(this.maps.scale)&&this.maps.mapScaleValue!==l&&t.isNullOrUndefined(this.maps.shouldZoomCurrentFactor)?this.maps.mapScaleValue:l)!==this.maps.mapScaleValue||1!==this.maps.markerZoomFactor&&1!==this.maps.mapScaleValue||this.maps.enablePersistence||(m=l)):(l=this.calculateIndividualLayerMarkerZoomLevel(p,h,d),m=t.isNullOrUndefined(this.maps.mapScaleValue)?l:this.maps.mapScaleValue!==l?this.maps.mapScaleValue:l),this.maps.markerZoomFactor=m}}else this.maps.markerZoomedState=!1,this.maps.markerZoomFactor>1&&(this.maps.markerCenterLatitude=null,this.maps.markerCenterLongitude=null,this.maps.markerZoomFactor=1,this.maps.enablePersistence||(this.maps.mapScaleValue=1)),this.maps.isTileMap&&!this.maps.enablePersistence&&this.maps.mapScaleValue<=1&&(this.maps.tileZoomLevel=0===this.maps.mapScaleValue?this.maps.isZoomByPosition?this.maps.tileZoomLevel:1:this.maps.mapScaleValue,1===this.maps.mapScaleValue&&1===this.maps.markerZoomFactor&&(this.maps.tileTranslatePoint.x=0,this.maps.tileTranslatePoint.y=0))},e.prototype.markerClick=function(e){var i=e.target.id;if(!(-1===i.indexOf("_LayerIndex_")||i.indexOf("_cluster_")>0)){var o=this.getMarker(i);if(!t.isNullOrUndefined(o)){o.marker.enableDrag&&(document.getElementById(this.maps.element.id+"_svg").style.cursor="grabbing");var a={cancel:!1,name:qt,data:o.data,maps:this.maps,marker:o.marker,target:i,x:e.clientX,y:e.clientY,latitude:o.data.latitude||o.data.Latitude,longitude:o.data.longitude||o.data.Longitude,value:o.data.name};if(this.maps.trigger(qt,a),o.marker.enableDrag){var n=!1,l=parseInt(i.split("_LayerIndex_")[1].split("_")[0],10),r=parseInt(i.split("_MarkerIndex_")[1].split("_")[0],10),s=parseInt(i.split("_dataIndex_")[1].split("_")[0],10),d=this.maps.layers[l].markerSettings[r];if(this.sameMarkerData.length>0&&(n=this.sameMarkerData[0].data.filter(function(e){return e.index==s}).length>0&&this.sameMarkerData[0].layerIndex===l&&this.sameMarkerData[0].markerIndex===r),!n){var p={name:Yt,x:e.clientX,y:e.clientY,latitude:o.data.latitude||o.data.Latitude,longitude:o.data.longitude||o.data.Longitude,layerIndex:l,markerIndex:r,dataIndex:s};this.maps.trigger(Yt,p),this.maps.markerDragArgument={targetId:i,x:e.clientX,y:e.clientY,latitude:o.data.latitude||o.data.Latitude,longitude:o.data.longitude||o.data.Longitude,shape:t.isNullOrUndefined(d.shapeValuePath)?d.shape:d.dataSource[s][d.shapeValuePath],layerIndex:l,markerIndex:r,dataIndex:s}}}}}},e.prototype.markerClusterClick=function(e){var i=e.target.id;if(-1!==i.indexOf("_LayerIndex_")&&-1!==i.indexOf("_cluster_")){var o=this.getMarker(i);if(!t.isNullOrUndefined(o)){o.clusterCollection.length>0&&this.maps.markerClusterExpand&&(ne(this.maps.element.id+"_mapsTooltip")&&this.maps.mapsTooltipModule.tooltipTargetID.indexOf("_MarkerIndex_")>-1&&Q(this.maps.element.id+"_mapsTooltip"),this.sameMarkerData.length>0&&!this.maps.markerClusterExpandCheck?(this.maps.markerClusterExpandCheck=!0,N(this.sameMarkerData,this.maps,this.markerSVGObject)):(this.sameMarkerData=o.clusterCollection,this.maps.markerClusterExpandCheck=!1,F(this.sameMarkerData,this.maps,this.markerSVGObject,!0)));var a={cancel:!1,name:Jt,data:o,maps:this.maps,target:i,x:e.clientX,y:e.clientY,latitude:o.data.latitude||o.data.Latitude,longitude:o.data.longitude||o.data.Longitude,markerClusterCollection:o.markCollection};this.maps.trigger(Jt,a)}}},e.prototype.getMarker=function(e){var t,i,o=e.split("_LayerIndex_"),a=parseInt(o[1].split("_")[0],10),n=this.maps.layers[a],l=[],r=[];if(this.maps.markerClusterExpand=n.markerClusterSettings.allowClusterExpand,e.indexOf("_MarkerIndex_")>-1){var s=parseInt(o[1].split("_MarkerIndex_")[1].split("_")[0],10),d=parseInt(o[1].split("_dataIndex_")[1].split("_")[0],10);if(i=n.markerSettings[s],!isNaN(s)){t=i.dataSource[d];var p=[];if(!i.template&&e.indexOf("_cluster_")>-1&&this.maps.layers[a].markerClusterSettings.allowClusterExpand&&Array.prototype.forEach.call(i.dataSource,function(e,i){e.latitude===t.latitude&&e.longitude===t.longitude&&p.push({data:t,index:i})}),e.indexOf("_cluster_")>-1){var h=document.getElementById(e.indexOf("_datalabel_")>-1?"Balloon"===n.markerClusterSettings.shape?e.split("_datalabel_")[0]+"_Group":e.split("_datalabel_")[0]:"Balloon"===n.markerClusterSettings.shape?e+"_Group":e),m="Balloon"===n.markerClusterSettings.shape?h.children[0].textContent.split(",").map(Number):h.textContent.split(",").map(Number);p=[];for(var c=0,u=m;c<u.length;c++){var g=u[c];p.push({data:i.dataSource[g],index:g}),l.push(i.dataSource[g])}!1,r.push({data:p,layerIndex:a,markerIndex:s,dataIndex:d,targetClusterIndex:+(e.split("_cluster_")[1].indexOf("_datalabel_")>-1?e.split("_cluster_")[1].split("_datalabel_")[0]:e.split("_cluster_")[1]),isClusterSame:!1})}return{marker:i,data:t,clusterCollection:r,markCollection:l}}}return null},e.prototype.markerMove=function(e){var i=e.target.id;if(!(-1===i.indexOf("_LayerIndex_")||i.indexOf("_cluster_")>0)){var o=this.getMarker(i);if(!t.isNullOrUndefined(o)){o.marker.enableDrag&&(document.getElementById(this.maps.element.id+"_svg").style.cursor=t.isNullOrUndefined(this.maps.markerDragArgument)?"pointer":"grabbing");var a={cancel:!1,name:Qt,data:o.data,maps:this.maps,target:i,x:e.clientX,y:e.clientY};this.maps.trigger(Qt,a)}}},e.prototype.markerClusterMouseMove=function(e){var i=e.target.id;if(-1!==i.indexOf("_LayerIndex_")&&-1!==i.indexOf("_cluster_")){var o=this.getMarker(i);if(this.maps.markerClusterExpand&&(e.target.style.cursor="pointer"),!t.isNullOrUndefined(o)){var a={cancel:!1,name:Kt,data:o.data,maps:this.maps,target:i,x:e.clientX,y:e.clientY};this.maps.trigger(Kt,a)}}},e.prototype.getModuleName=function(){return"Marker"},e.prototype.destroy=function(){this.maps=null,this.trackElements=[],this.markerSVGObject=null,this.sameMarkerData=[]},e}(),Vt="click",Ht="tooltipRender",Gt="shapeHighlight",Wt="markerRendering",Xt="markerClusterRendering",qt="markerClick",Yt="markerDragStart",Jt="markerClusterClick",Qt="markerMouseMove",Kt="markerClusterMouseMove",$t="dataLabelRendering",ei="bubbleRendering",ti="bubbleClick",ii="bubbleMouseMove",oi="animationComplete",ai="annotationRendering",ni="itemSelection",li="itemHighlight",ri=function(){function e(e){this.maps=e}return e.prototype.getBingMap=function(e,i,o,a,n,l){for(var r="",s=Math.min(this.maps.tileZoomLevel,parseInt(this.maxZoom,10));s>0;s--){var d=0,p=1<<s-1;0!=(e.x&p)&&d++,0!=(e.y&p)&&(d+=2),r=r+""+d}if(t.isNullOrUndefined(l))return"";var h=l[Math.min(parseInt(r.substr(r.length-1,1),10),l.length)];return n=n.replace("{quadkey}",r).replace("{subdomain}",h),n+="&mkt="+a+"&ur=IN&Key="+i},e.prototype.destroy=function(){this.maps=null,this.subDomains=[]},e}(),si=function(){function e(e){this.maps=e}return e.prototype.getShapeColorMapping=function(e,i,o){var a=e.colorValuePath?e.colorValuePath:e.valuePath,n=t.isNullOrUndefined(a)?i[a]:a.indexOf(".")>-1?w(i,a):i[a],l=Number(n),r=this.getColorByValue(e.colorMapping,l,n);return t.isNullOrUndefined(r)?o:r},e.prototype.getColorByValue=function(e,i,o){if(isNaN(i)&&t.isNullOrUndefined(o))return null;for(var a,n="",l=0,r=e;l<r.length;l++){var s=r[l];(!t.isNullOrUndefined(s.from)&&!t.isNullOrUndefined(s.to)&&i>=s.from&&i<=s.to||s.value===o)&&(n="[object Array]"===Object.prototype.toString.call(s.color)?t.isNullOrUndefined(s.value)?this.getColor(s,i):s.color[0]:s.color),(i>=s.from&&i<=s.to||s.value===o)&&!t.isNullOrUndefined(s.minOpacity)&&!t.isNullOrUndefined(s.maxOpacity)&&n&&(a=this.deSaturationColor(s,n,i,o)),(""===n||t.isNullOrUndefined(n))&&t.isNullOrUndefined(s.from)&&t.isNullOrUndefined(s.to)&&t.isNullOrUndefined(s.minOpacity)&&t.isNullOrUndefined(s.maxOpacity)&&t.isNullOrUndefined(s.value)&&(n="[object Array]"===Object.prototype.toString.call(s.color)?s.color[0]:s.color)}return{fill:n||(e.length?null:o),opacity:a}},e.prototype.deSaturationColor=function(e,t,i,o){var a=1;if(i>=e.from&&i<=e.to||e.value===o){a=(isNaN(i)?e.from/(e.to-e.from):(i-e.from)/(e.to-e.from))*(e.maxOpacity-e.minOpacity)+e.minOpacity}return a},e.prototype.rgbToHex=function(e,t,i){return"#"+this.componentToHex(e)+this.componentToHex(t)+this.componentToHex(i)},e.prototype.componentToHex=function(e){var t=e.toString(16);return 1===t.length?"0"+t:t},e.prototype.getColor=function(e,t){var i,o="";return Number(t)===e.from?o=e.color[0]:Number(t)===e.to?o=e.color[e.color.length-1]:(i=this.getGradientColor(Number(t),e),o=this.rgbToHex(i.r,i.g,i.b)),o},e.prototype.getGradientColor=function(e,t){var i=t.from,o=t.to,a=0,n=o-i;a=(e-i)/n;var l,r;if(t.color.length<=2)l="#"===t.color[0].charAt(0)?t.color[0]:this._colorNameToHex(t.color[0]),r="#"===t.color[t.color.length-1].charAt(0)?t.color[t.color.length-1]:this._colorNameToHex(t.color[t.color.length-1]);else{l="#"===t.color[0].charAt(0)?t.color[0]:this._colorNameToHex(t.color[0]),r="#"===t.color[t.color.length-1].charAt(0)?t.color[t.color.length-1]:this._colorNameToHex(t.color[t.color.length-1]);for(var s=n/(t.color.length-1),d=t.color.length-1,p=[],h={},m=1;m<d;m++)h={b:i+m*s,color:t.color[m]},p.push(h);for(var c=0;c<p.length;c++)i<=e&&e<=p[c].b&&0===c?(r="#"===p[c].color.charAt(0)?p[c].color:this._colorNameToHex(p[c].color),a=e<p[c].b?1-Math.abs((e-p[c].b)/s):(e-p[c].b)/s):p[c].b<=e&&e<=o&&c===p.length-1&&(l="#"===p[c].color.charAt(0)?p[c].color:this._colorNameToHex(p[c].color),a=e<p[c].b?1-Math.abs((e-p[c].b)/s):(e-p[c].b)/s),c!==p.length-1&&c<p.length&&p[c].b<=e&&e<=p[c+1].b&&(l="#"===p[c].color.charAt(0)?p[c].color:this._colorNameToHex(p[c].color),r="#"===p[c+1].color.charAt(0)?p[c+1].color:this._colorNameToHex(p[c+1].color),a=Math.abs(e-p[c+1].b)/s)}return this.getPercentageColor(a,l,r)},e.prototype.getPercentageColor=function(e,t,i){var o=i.split("#")[1],a=t.split("#")[1],n=this.getPercentage(e,parseInt(a.substr(0,2),16),parseInt(o.substr(0,2),16)),l=this.getPercentage(e,parseInt(a.substr(2,2),16),parseInt(o.substr(2,2),16)),r=this.getPercentage(e,parseInt(a.substr(4,2),16),parseInt(o.substr(4,2),16));return new We(n,l,r)},e.prototype.getPercentage=function(e,t,i){var o=i-t;return Math.round(t+o*e)},e.prototype._colorNameToHex=function(e){var t={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c","indigo ":"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",orchid:"#da70d6",papayawhip:"#ffefd5",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};return"[object Array]"===Object.prototype.toString.call(e)?e:void 0!==t[e.toLowerCase()]?t[e.toLowerCase()]:e},e}(),di=function(){function e(e){this.isMapCoordinates=!0,this.horizontalPan=!1,this.horizontalPanXCount=0,this.mapObject=e,this.ajaxModule=new t.Fetch,this.ajaxResponse=[]}return e.prototype.measureLayerPanel=function(){var e=this,i=this.mapObject.layersCollection,o=this.mapObject.mapAreaRect,a=ie(this.mapObject.element.id+"_Secondary_Element");if(this.mapObject.isTileMap&&a){this.tileSvgObject=this.mapObject.renderer.createSvg({id:this.mapObject.element.id+"_Tile_SVG",width:o.width,height:o.height});var n=t.createElement("div",{id:this.mapObject.element.id+"_Tile_SVG_Parent"});n.style.cssText="position: absolute; height: "+o.height+"px; width: "+o.width+"px;",n.appendChild(this.tileSvgObject),a.appendChild(n)}if(this.layerGroup=this.mapObject.renderer.createGroup({id:this.mapObject.element.id+"_Layer_Collections","clip-path":"url(#"+this.mapObject.element.id+"_MapArea_ClipRect)"}),"GoogleStaticMap"===this.mapObject.layers[this.mapObject.baseLayerIndex].layerType){this.clipRectElement=this.mapObject.renderer.drawClipPath(new Xe(this.mapObject.element.id+"_MapArea_ClipRect","transparent",{width:1,color:"Gray"},1,{x:(o.width-640)/2,y:0,width:640,height:o.height}))}else this.clipRectElement=this.mapObject.renderer.drawClipPath(new Xe(this.mapObject.element.id+"_MapArea_ClipRect","transparent",{width:1,color:"Gray"},1,{x:this.mapObject.isTileMap?0:o.x,y:this.mapObject.isTileMap?0:o.y,width:o.width,height:o.height}));this.layerGroup.appendChild(this.clipRectElement),this.mapObject.baseMapBounds=null,this.mapObject.baseMapRectBounds=null,this.mapObject.baseSize=null,Array.prototype.forEach.call(i,function(t,i){e.currentLayer=t,e.processLayers(t,i)}),t.isNullOrUndefined(this.mapObject.legendModule)||"Float"!==this.mapObject.legendSettings.position||(this.mapObject.isTileMap?this.layerGroup.appendChild(this.mapObject.legendModule.legendGroup):this.mapObject.svgObject.appendChild(this.mapObject.legendModule.legendGroup))},e.prototype.renderTileLayer=function(e,i,o,a){e.currentFactor=e.calculateFactor(i),e.mapObject.defaultState=!(1!==e.mapObject.zoomSettings.zoomFactor&&!t.isNullOrUndefined(e.mapObject.tileZoomLevel)&&1!==e.mapObject.tileZoomLevel),t.isNullOrUndefined(e.mapObject.previousCenterLatitude)&&t.isNullOrUndefined(e.mapObject.previousCenterLongitude)&&!e.mapObject.isZoomByPosition?(e.mapObject.previousCenterLatitude=e.mapObject.centerPosition.latitude,e.mapObject.previousCenterLongitude=e.mapObject.centerPosition.longitude):e.mapObject.previousCenterLatitude!==e.mapObject.centerPosition.latitude&&e.mapObject.previousCenterLongitude!==e.mapObject.centerPosition.longitude||e.mapObject.isZoomByPosition?(e.mapObject.centerPositionChanged=!0,e.mapObject.previousCenterLatitude=e.mapObject.centerPosition.latitude,e.mapObject.previousCenterLongitude=e.mapObject.centerPosition.longitude):e.mapObject.centerPositionChanged=!1;var n=new Ze(e.mapObject.centerPosition.longitude,e.mapObject.centerPosition.latitude),l=n;this.mapObject.isTileMap&&e.mapObject.markerModule&&e.mapObject.zoomSettings.enable&&(e.mapObject.markerModule.calculateZoomCenterPositionAndFactor(this.mapObject.layersCollection),t.isNullOrUndefined(this.mapObject.markerCenterLatitude)||t.isNullOrUndefined(this.mapObject.markerCenterLongitude)||e.mapObject.isZoomByPosition||(l=new Ze(e.mapObject.markerCenterLongitude,e.mapObject.markerCenterLatitude))),n=!e.mapObject.zoomSettings.shouldZoomInitially&&e.mapObject.centerPosition.longitude&&e.mapObject.centerPosition.latitude&&!e.mapObject.zoomPersistence&&e.mapObject.defaultState?new Ze(e.mapObject.centerPosition.longitude,e.mapObject.centerPosition.latitude):e.mapObject.zoomSettings.shouldZoomInitially&&e.mapObject.markerZoomedState&&!e.mapObject.zoomPersistence&&!t.isNullOrUndefined(e.mapObject.markerZoomCenterPoint)?new Ze(e.mapObject.markerZoomCenterPoint.longitude,e.mapObject.markerZoomCenterPoint.latitude):{x:null,y:null};var r=e.mapObject.zoomSettings.shouldZoomInitially&&!e.mapObject.isZoomByPosition?t.isNullOrUndefined(e.mapObject.markerZoomFactor)?1:e.mapObject.markerZoomFactor:e.mapObject.zoomSettings.zoomFactor;if(r=e.mapObject.enablePersistence?t.isNullOrUndefined(e.mapObject.mapScaleValue)?t.isNullOrUndefined(e.mapObject.markerZoomFactor)?e.mapObject.zoomSettings.zoomFactor:e.mapObject.markerZoomFactor:e.mapObject.mapScaleValue:r,r=e.mapObject.zoomSettings.enable?r:e.mapObject.zoomSettings.zoomFactor,r=r>0?r:1,e.mapObject.defaultState=1===r,!e.mapObject.markerZoomedState&&e.mapObject.zoomSettings.shouldZoomInitially&&1===e.mapObject.zoomSettings.zoomFactor&&(e.mapObject.defaultState=!0),t.isNullOrUndefined(e.mapObject.tileZoomLevel))e.mapObject.tileZoomLevel=r,e.mapObject.previousZoomFactor=r;else if(this.mapObject.isReset&&1===e.mapObject.tileZoomLevel&&!e.mapObject.zoomSettings.shouldZoomInitially){var s=e.mapObject.tileZoomLevel;e.mapObject.tileZoomLevel=s}else 1!==e.mapObject.zoomSettings.zoomFactor||e.mapObject.zoomSettings.shouldZoomInitially?(e.mapObject.previousZoomFactor=e.mapObject.tileZoomLevel,e.mapObject.tileZoomLevel=e.mapObject.defaultState&&e.mapObject.zoomSettings.enable?e.mapObject.tileZoomLevel:e.mapObject.zoomSettings.shouldZoomInitially||e.mapObject.centerPositionChanged?r:e.mapObject.previousZoomFactor!==e.mapObject.zoomSettings.zoomFactor?e.mapObject.zoomSettings.zoomFactor:e.mapObject.tileZoomLevel,e.mapObject.tileZoomLevel=1===r&&0===e.mapObject.zoomSettings.zoomFactor?r:e.mapObject.tileZoomLevel,!t.isNullOrUndefined(e.mapObject.tileTranslatePoint)&&(e.mapObject.markerZoomFactor!==e.mapObject.mapScaleValue||t.isNullOrUndefined(e.mapObject.markerZoomFactor)&&t.isNullOrUndefined(e.mapObject.mapScaleValue))&&(e.mapObject.zoomSettings.zoomFactor<=1||e.mapObject.previousZoomFactor!==e.mapObject.zoomSettings.zoomFactor)&&(e.mapObject.tileTranslatePoint.x=0,e.mapObject.tileTranslatePoint.y=0)):e.mapObject.defaultState&&(e.mapObject.previousZoomFactor=e.mapObject.tileZoomLevel,e.mapObject.tileZoomLevel=r,e.mapObject.tileTranslatePoint.x=0,e.mapObject.tileTranslatePoint.y=0);if(r<=1&&!t.isNullOrUndefined(e.mapObject.height)&&!e.mapObject.zoomSettings.shouldZoomInitially&&e.mapObject.tileZoomLevel===e.mapObject.tileZoomScale&&this.mapObject.initialCheck&&te(this.mapObject),t.isNullOrUndefined(e.mapObject.centerLatOfGivenLocation)||t.isNullOrUndefined(e.mapObject.centerLongOfGivenLocation)||!e.mapObject.zoomNotApplied||(l.y=e.mapObject.centerLatOfGivenLocation,l.x=e.mapObject.centerLongOfGivenLocation,e.mapObject.tileZoomLevel=e.mapObject.mapScaleValue=e.mapObject.scaleOfGivenLocation),e.mapObject.tileTranslatePoint=e.panTileMap(e.mapObject.availableSize.width,e.mapObject.availableSize.height,l),this.mapObject.zoomSettings.resetToInitial&&this.mapObject.initialCheck&&!t.isNullOrUndefined(e.mapObject.height)&&this.mapObject.availableSize.height>512){this.mapObject.applyZoomReset=!0,this.mapObject.initialZoomLevel=Math.floor(this.mapObject.availableSize.height/512);var d="GoogleStaticMap"!==this.mapObject.layers[this.mapObject.baseLayerIndex].layerType?20:0,p=256*Math.pow(2,this.mapObject.initialZoomLevel);this.mapObject.initialTileTranslate.x=this.mapObject.availableSize.width/2-p/2,this.mapObject.initialTileTranslate.y=this.mapObject.availableSize.height/2-p/2+d}if(e.generateTiles(e.mapObject.tileZoomLevel,e.mapObject.tileTranslatePoint,null,a),t.isNullOrUndefined(e.mapObject.previousZoomFactor)||e.mapObject.previousZoomFactor===e.mapObject.zoomSettings.zoomFactor||(e.mapObject.previousZoomFactor=e.mapObject.zoomSettings.zoomFactor),e.mapObject.navigationLineModule){var h=e.mapObject.navigationLineModule.renderNavigation(e.currentLayer,e.mapObject.tileZoomLevel,o);t.isNullOrUndefined(h)||e.layerObject.appendChild(h)}e.mapObject.markerModule&&e.mapObject.markerModule.markerRender(this.mapObject,e.layerObject,o,e.mapObject.tileZoomLevel,null),e.translateLayerElements(e.layerObject,o),e.layerGroup.appendChild(e.layerObject)},e.prototype.processLayers=function(e,i){var o=this;if(this.layerObject=this.mapObject.renderer.createGroup({id:this.mapObject.element.id+"_LayerIndex_"+i}),!this.mapObject.enablePersistence){var a=this.mapObject.getModuleName()+this.mapObject.element.id;if(-1===navigator.userAgent.indexOf("Edge")){var n=void 0;try{n=window.localStorage}catch(e){n=null}!t.isNullOrUndefined(n)&&window.localStorage.getItem(a)&&window.localStorage.removeItem(a)}}var l={cancel:!1,name:"layerRendering",index:i,layer:e,maps:this.mapObject,visible:e.visible};this.mapObject.trigger("layerRendering",l,function(a){if(!l.cancel&&l.visible)if("OSM"===e.layerType&&(e.urlTemplate="https://a.tile.openstreetmap.org/level/tileX/tileY.png"),"Google"===e.layerType&&(e.urlTemplate="https://mt1.google.com/vt/lyrs=m@129&hl=en&x=tileX&y=tileY&z=level"),"Geometry"!==e.layerType||t.isNullOrUndefined(e.shapeData)&&!t.isNullOrUndefined(e.urlTemplate)&&""!==e.urlTemplate){if("Bing"!==e.layerType||o.bing)if(!t.isNullOrUndefined(e.urlTemplate)&&e.urlTemplate.indexOf("quadkey")>-1){var n=new ri(o.mapObject);o.bingMapCalculation(e,i,o,n)}else o.renderTileLayer(o,e,i);else if(e.key&&e.key.length>1){var r=o,s=new ri(o.mapObject),d="https://dev.virtualearth.net/REST/V1/Imagery/Metadata/"+("AerialWithLabel"===e.bingMapType?"AerialWithLabelsOnDemand":e.bingMapType),p=new t.Fetch({url:d+"?output=json&include=ImageryProviders&urischeme=https&key="+e.key});p.onSuccess=function(t){var a=t.resourceSets[0].resources[0],n=a.imageUrl,l=a.imageUrlSubdomains,d=a.zoomMax;null!==n&&void 0!==n&&n!==s.imageUrl&&(s.imageUrl=n),null!==l&&void 0!==l&&l!==s.subDomains&&(s.subDomains=l),null!==d&&void 0!==d&&d!==s.maxZoom&&(s.maxZoom=d),r.mapObject.bingMap=s,r.renderTileLayer(r,e,i,s),o.mapObject.arrangeTemplate(),o.mapObject.zoomModule&&o.mapObject.previousScale!==o.mapObject.scale&&o.mapObject.zoomModule.applyTransform(o.mapObject,!0)},p.send()}}else if(!(t.isNullOrUndefined(e.shapeData)||t.isNullOrUndefined(e.shapeData.geometries)&&t.isNullOrUndefined(e.shapeData.features))){var h=!t.isNullOrUndefined(e.shapeData.geometries)&&e.shapeData.geometries.length>0?e.shapeData.geometries:e.shapeData.features;e.layerData=[];var m=e.shapeData.bbox;!t.isNullOrUndefined(m)&&e.isBaseLayer?o.mapObject.baseMapBounds=new Ve({min:m[0][1],max:m[1][1]},{min:m[0][0],max:m[1][0]}):t.isNullOrUndefined(o.mapObject.baseMapBounds)&&!q(h)&&o.calculateRectBounds(h),o.calculatePathCollection(i,h)}}),this.mapObject.isTileMap?this.tileSvgObject&&(this.tileSvgObject.appendChild(this.layerGroup),this.mapObject.baseMapBounds=null):this.mapObject.svgObject.appendChild(this.layerGroup)},e.prototype.bingMapCalculation=function(e,t,i,o){o.imageUrl=e.urlTemplate,o.subDomains=["t0","t1","t2","t3"],o.maxZoom="21",i.mapObject.bingMap=o,i.renderTileLayer(i,e,t,o),this.mapObject.arrangeTemplate(),this.mapObject.zoomModule&&this.mapObject.previousScale!==this.mapObject.scale&&this.mapObject.zoomModule.applyTransform(this.mapObject,!0)},e.prototype.bubbleCalculation=function(e,i){if(null!=e.dataSource&&null!=e)for(var o=e.dataSource,a=0;a<o.length;a++){var n=t.isNullOrUndefined(e.valuePath)?parseFloat(e.dataSource[a][e.valuePath]):e.valuePath.indexOf(".")>-1?Number(w(e.dataSource[a],e.valuePath)):parseFloat(e.dataSource[a][e.valuePath]);0!==a?n>i.max?i.max=n:n<i.min&&(i.min=n):i.max=i.min=n}},e.prototype.calculatePathCollection=function(e,i){var o=this;this.groupElements=[],q(i)||(this.currentFactor=this.calculateFactor(this.currentLayer)),this.rectBounds=null;var a=this.currentLayer.shapeSettings;this.currentLayer.bubbleSettings;Array.prototype.forEach.call(i,function(e,i){if(!t.isNullOrUndefined(e.geometry)||!t.isNullOrUndefined(e.coordinates)){var a=t.isNullOrUndefined(e.geometry)?e.type:e.geometry.type,n=t.isNullOrUndefined(e.geometry)?e.coordinates:e.geometry.coordinates,l=e.geometry,r=e.properties;o.generatePoints(a,n,l,r)}}),this.currentLayer.rectBounds=this.rectBounds,t.isNullOrUndefined(this.mapObject.baseMapRectBounds)&&this.currentLayer.isBaseLayer&&(this.mapObject.baseMapRectBounds=this.rectBounds);var n=a.palette.length>1?a.palette:function(e){var t;switch(e.toLowerCase()){case"tailwind":t=["#0369A1","#14B8A6","#15803D","#334155","#5A61F6","#65A30D","#8B5CF6","#9333EA","#F59E0B","#F97316"];break;case"tailwinddark":t=["#10B981","#22D3EE","#2DD4BF","#4ADE80","#8B5CF6","#E879F9","#F472B6","#F87171","#F97316","#FCD34D"];break;case"bootstrap5":t=["#262E0B","#668E1F","#AF6E10","#862C0B","#1F2D50","#64680B","#311508","#4C4C81","#0C7DA0","#862C0B"];break;case"bootstrap5dark":t=["#5ECB9B","#A860F1","#EBA844","#557EF7","#E9599B","#BFC529","#3BC6CF","#7A68EC","#74B706","#EA6266"];break;case"fluent":t=["#614570","#4C6FB1","#CC6952","#3F579A","#4EA09B","#6E7A89","#D4515C","#E6AF5D","#639751","#9D4D69"];break;case"fluentdark":t=["#8AB113","#2A72D5","#43B786","#584EC6","#E85F9C","#6E7A89","#EA6266","#EBA844","#26BC7A","#BC4870"];break;case"material3":t=["#6200EE","#E77A16","#82C100","#7107DC","#05BB3D","#D21020","#FAD200","#0085FF","#9204EA","#08EE9B"];break;case"material3dark":t=["#4EAAFF","#FA4EAB","#FFF500","#17EA58","#38FFE7","#FF9E45","#B3F32F","#B93CE4","#FC5664","#9B55FF"];break;default:t=["#B5E485","#7BC1E8","#DF819C","#EC9B79","#78D0D3","#D6D572","#9178E3","#A1E5B4","#87A4B4","#E4C16C"]}return t}(this.mapObject.theme),l=t.createElement("div",{id:this.mapObject.element.id+"_LayerIndex_"+e+"_Label_Template_Group",className:this.mapObject.element.id+"_template"});if(l.style.cssText="pointer-events: none; overflow: hidden; position: absolute;top:"+this.mapObject.mapAreaRect.y+"px;left:"+this.mapObject.mapAreaRect.x+"px;height:"+this.mapObject.mapAreaRect.height+"px;width:"+this.mapObject.mapAreaRect.width+"px;",0!==this.currentLayer.layerData.length)for(var r=function(r){var d,p,h,m=void 0,c={color:a.border.color,width:a.border.width,opacity:a.border.opacity},u=s.currentLayer.layerData[r],g="",y=a.autofill?n[r%n.length]:a.fill||s.mapObject.themeStyle.shapeFill;null===a.colorValuePath||t.isNullOrUndefined(u.property)||(null!==(m=V(s.currentLayer.dataSource,u.property,s.currentLayer.shapeDataPath,s.currentLayer.shapePropertyPath,s.currentLayer))&&0===a.colorMapping.length?y=s.currentLayer.shapeSettings.colorValuePath.indexOf(".")>-1?w(s.currentLayer.dataSource[m],a.colorValuePath):s.currentLayer.dataSource[m][a.colorValuePath]:u.property[a.colorValuePath]&&0===s.currentLayer.dataSource.length&&0===a.colorMapping.length&&(y=s.currentLayer.shapeSettings.colorValuePath.indexOf(".")>-1?w(u.property,a.colorValuePath):u.property[a.colorValuePath]),y=t.isNullOrUndefined(y)?a.fill||s.mapObject.themeStyle.shapeFill:y);var f=s.mapObject.element.id+"_LayerIndex_"+e+"_shapeIndex_"+r+"_dataIndex_"+m,b=s.getShapeColorMapping(s.currentLayer,u.property,y);y="[object Object]"!==Object.prototype.toString.call(b)||t.isNullOrUndefined(b.fill)?y:b.fill,(s.currentLayer.shapeSettings.borderColorValuePath||s.currentLayer.shapeSettings.borderWidthValuePath)&&null!==(m=V(s.currentLayer.dataSource,u.property,s.currentLayer.shapeDataPath,s.currentLayer.shapePropertyPath,s.currentLayer))&&(s.currentLayer.dataSource[m][a.borderColorValuePath]&&(c.color=s.currentLayer.dataSource[m][a.borderColorValuePath]),s.currentLayer.dataSource[m][a.borderWidthValuePath]&&(c.width=s.currentLayer.dataSource[m][a.borderWidthValuePath]));var v="[object Object]"!==Object.prototype.toString.call(b)||t.isNullOrUndefined(b.opacity)?a.opacity:b.opacity,S={cancel:!1,name:"shapeRendering",index:r,data:s.currentLayer.dataSource?s.currentLayer.dataSource[m]:null,maps:s.mapObject,shape:a,fill:y,border:{width:c.width,color:c.color,opacity:c.opacity}},x=function(s){var m=t.isNullOrUndefined(u._isMultiPolygon)?t.isNullOrUndefined(u.type)?u[0].type:u.type:"MultiPolygon";if(m="Polygon"===m||"MultiPolygon"===m?"Polygon":m,s.cancel?(s.fill=y,s.border.color=a.border.color,s.border.width=a.border.width,o.mapObject.layers[e].shapeSettings.border=a.border):(s.fill="#A6A6A6"===s.fill?s.shape.fill||o.mapObject.themeStyle.shapeFill:s.fill,s.border.color="#000000"===s.border.color?s.shape.border.color:s.border.color,s.border.width=0===s.border.width?s.shape.border.width:s.border.width,t.isNullOrUndefined(a.borderColorValuePath)&&(o.mapObject.layers[e].shapeSettings.border.color=s.border.color),t.isNullOrUndefined(a.borderWidthValuePath)&&(o.mapObject.layers[e].shapeSettings.border.width=s.border.width)),s.border.opacity=t.isNullOrUndefined(s.border.opacity)?v:s.border.opacity,o.groupElements.length<1)h=o.mapObject.renderer.createGroup({id:o.mapObject.element.id+"_LayerIndex_"+e+"_"+m+"_Group",transform:""}),o.groupElements.push(h);else for(var c=0;c<o.groupElements.length;c++){var b=o.groupElements[c];if(b.id.indexOf(m)>-1){h=b;break}if(c>=o.groupElements.length-1){h=o.mapObject.renderer.createGroup({id:o.mapObject.element.id+"_LayerIndex_"+e+"_"+m+"_Group"}),o.groupElements.push(h);break}}var S;switch(m){case"Polygon":u._isMultiPolygon?g=o.generateMultiPolygonPath(u):(g+="M"+u[0].point.x+" "+u[0].point.y,u.map(function(e){g+=" L "+e.point.x+" "+e.point.y})),(g+=" z ").length>3&&(d=new Ge(f,s.fill,s.border.width,s.border.color,v,s.border.opacity,a.dashArray,g),S=o.mapObject.renderer.drawPath(d));break;case"LineString":u.map(function(e,t){g+=0===t?"M "+e.point.x+" "+e.point.y:"L"+e.point.x+" , "+e.point.y+" "}),g.length>3&&(d=new Ge(f,"transparent",t.isNullOrUndefined(s.border.width)?1:s.border.width,t.isNullOrUndefined(s.fill)?s.border.color:s.fill,v,s.border.opacity,a.dashArray,g),S=o.mapObject.renderer.drawPath(d));break;case"MultiLineString":u.map(function(e){e.map(function(e,t){g+=0===t?"M "+e.point.x+" "+e.point.y:"L"+e.point.x+" , "+e.point.y+" "})}),g.length>3&&(d=new Ge(f,"transparent",t.isNullOrUndefined(s.border.width)?1:s.border.width,t.isNullOrUndefined(s.fill)?s.border.color:s.fill,v,s.border.opacity,a.dashArray,g),S=o.mapObject.renderer.drawPath(d));break;case"Point":var x=u.point,O="SubLayer"!==o.mapObject.layers[e].type?a.circleRadius:a.circleRadius/(o.mapObject.isTileMap?o.mapObject.scale:o.currentFactor);p=new qe(f,s.fill,s.border,v,x.x,x.y,O,a.dashArray),S=o.mapObject.renderer.drawCircle(p);break;case"MultiPoint":u.map(function(t,i){var n=t.point,l="SubLayer"!==o.mapObject.layers[e].type?a.circleRadius:a.circleRadius/(o.mapObject.isTileMap?o.mapObject.scale:o.currentFactor);p=new qe(f+"_multiLine_"+i,s.fill,s.border,v,n.x,n.y,l,a.dashArray),S=o.mapObject.renderer.drawCircle(p),o.pathAttributeCalculate(h,S,m,u,r)});break;case"Path":g=u.point,d=new Ge(f,s.fill,s.border.width,s.border.color,v,s.border.opacity,a.dashArray,g),S=o.mapObject.renderer.drawPath(d)}t.isNullOrUndefined(S)||"MultiPoint"===m||o.pathAttributeCalculate(h,S,m,u,r),r===o.currentLayer.layerData.length-1&&o.layerFeatures(e,n,i,l)};x.bind(s),s.mapObject.trigger("shapeRendering",S,x)},s=this,d=0;d<this.currentLayer.layerData.length;d++)r(d);else this.layerFeatures(e,n,i,l)},e.prototype.pathAttributeCalculate=function(e,i,o,a,n){for(var l,r="[object Array]"===Object.prototype.toString.call(this.currentLayer.shapePropertyPath)?this.currentLayer.shapePropertyPath:[this.currentLayer.shapePropertyPath],s=0;s<r.length;s++)if(!t.isNullOrUndefined(a.property)){l=r[s];break}if(i.setAttribute("aria-label",t.isNullOrUndefined(a.property)?"":a.property[l]),this.currentLayer.selectionSettings.enable||this.currentLayer.highlightSettings.enable?(i.tabIndex=this.mapObject.tabIndex+n+3,i.setAttribute("role","button"),i.style.cursor=this.currentLayer.highlightSettings.enable&&!this.currentLayer.selectionSettings.enable?"default":"pointer"):i.setAttribute("role","region"),"LineString"!==o&&"MultiLineString"!==o||(i.style.cssText="outline:none"),A(this.mapObject.selectedElementId,this.mapObject.shapeSelectionClass,i,"ShapeselectionMapStyle"),this.mapObject.toggledShapeElementId)for(s=0;s<this.mapObject.toggledShapeElementId.length;s++){var d=this.mapObject.legendSettings.toggleLegendSettings.applyShapeSettings?this.currentLayer.shapeSettings:this.mapObject.legendSettings.toggleLegendSettings;this.mapObject.toggledShapeElementId[s]===i.id&&(i.setAttribute("fill",d.fill),i.setAttribute("stroke",d.border.color),i.setAttribute("fill-opacity",d.opacity.toString()),i.setAttribute("stroke-opacity",(t.isNullOrUndefined(d.border.opacity)?d.opacity:d.border.opacity).toString()),i.setAttribute("stroke-width",(t.isNullOrUndefined(d.border.width)?0:d.border.width).toString()))}e.appendChild(i)},e.prototype.layerFeatures=function(e,t,i,o){var a,n=this;if(this.currentLayer.bubbleSettings.length&&this.mapObject.bubbleModule)for(var l,r=this.currentLayer.bubbleSettings.length,s=function(i){l=d.currentLayer.bubbleSettings[i],a=d.mapObject.renderer.createGroup({id:d.mapObject.element.id+"_LayerIndex_"+e+"_bubble_Group_"+i});var o={min:0,max:0};d.bubbleCalculation(l,o);var r=l.dataSource;d.mapObject.bubbleModule.bubbleCollection=[],r.map(function(r,s){n.renderBubble(n.currentLayer,r,t[s%t.length],o,i,s,a,e,l)}),d.groupElements.push(a)},d=this,p=0;p<r;p++)s(p);this.mapObject.markerModule&&!this.mapObject.isTileMap&&this.mapObject.zoomSettings.enable&&this.mapObject.markerModule.calculateZoomCenterPositionAndFactor(this.mapObject.layersCollection);var h=this.mapObject.renderer.createGroup({id:this.mapObject.element.id+"_LayerIndex_"+e+"_dataLableIndex_Group"});if(h.style.pointerEvents="none",this.mapObject.dataLabelModule&&this.currentLayer.dataLabelSettings.visible){var m=[];i.map(function(t,i){n.renderLabel(n.currentLayer,e,t,h,i,o,m)}),this.groupElements.push(h)}this.mapObject.navigationLineModule&&this.groupElements.push(this.mapObject.navigationLineModule.renderNavigation(this.currentLayer,this.currentFactor,e)),this.groupElements.map(function(e){n.layerObject.appendChild(e)}),this.mapObject.markerModule&&this.mapObject.markerModule.markerRender(this.mapObject,this.layerObject,e,this.mapObject.isTileMap?Math.floor(this.currentFactor):this.currentFactor,null),this.translateLayerElements(this.layerObject,e),this.layerGroup.appendChild(this.layerObject)},e.prototype.renderLabel=function(e,t,i,o,a,n,l){this.mapObject.dataLabelModule.renderLabel(e,t,i,e.layerData,o,n,a,l)},e.prototype.generateMultiPolygonPath=function(e){for(var t="",i=0;i<e.length;i++)t+="M"+e[i][0].point.x+" "+e[i][0].point.y,e[i].map(function(e){t+=" L "+e.point.x+" "+e.point.y});return t},e.prototype.renderBubble=function(e,i,o,a,n,l,r,s,d){if(t.isNullOrUndefined(this.mapObject.bubbleModule)||!d.visible)return null;o=d.fill?d.fill:o,this.mapObject.bubbleModule.id=this.mapObject.element.id+"_LayerIndex_"+s+"_BubbleIndex_"+n+"_dataIndex_"+l,this.mapObject.bubbleModule.renderBubble(d,i,o,a,n,l,s,e,r,this.mapObject.bubbleModule.id)},e.prototype.getShapeColorMapping=function(e,i,o){if(o=o||e.shapeSettings.fill,0===e.shapeSettings.colorMapping.length&&t.isNullOrUndefined(e.dataSource))return o;var a=V(e.dataSource,i,e.shapeDataPath,e.shapePropertyPath),n=new si(this.mapObject);return t.isNullOrUndefined(e.dataSource[a])?o:n.getShapeColorMapping(e.shapeSettings,e.dataSource[a],o)},e.prototype.generatePoints=function(e,i,o,a){var n,l,r=this,s=[];switch(e.toLowerCase()){case"polygon":(s=this.calculatePolygonBox(i[0],o,a)).length>0&&(s.property=a,s.type=e,s._isMultiPolygon=!1,this.currentLayer.layerData.push(s));break;case"multipolygon":for(var d=[],p=0;p<i.length;p++)for(var m=0;m<i[p].length;m++)(s=this.calculatePolygonBox(i[p][m],o,a)).length>0&&d.push(s);d.property=a,d.type=e,d._isMultiPolygon=!0,this.currentLayer.layerData.push(d);break;case"linestring":var c=t.isNullOrUndefined(this.currentLayer.shapeSettings.border.width)?1:"string"==typeof this.currentLayer.shapeSettings.border.width?parseInt(this.currentLayer.shapeSettings.border.width,10):this.currentLayer.shapeSettings.border.width;i.map(function(e){n=e[1],l=e[0];var t=h(n,l,r.currentFactor,r.currentLayer,r.mapObject);r.calculateBox(t,c),s.push({point:t,lat:n,lng:l})}),s.property=a,s.type=e,this.currentLayer.layerData.push(s);break;case"multilinestring":var u=t.isNullOrUndefined(this.currentLayer.shapeSettings.border.width)?1:"string"==typeof this.currentLayer.shapeSettings.border.width?parseInt(this.currentLayer.shapeSettings.border.width,10):this.currentLayer.shapeSettings.border.width,g=[];i.map(function(e){s=[],e.map(function(e){n=e[1],l=e[0];var t=h(n,l,r.currentFactor,r.currentLayer,r.mapObject);r.calculateBox(t,u),s.push({point:t,lat:n,lng:l})}),g.push(s)}),g.property=a,g.type=e,this.currentLayer.layerData.push(g);break;case"point":var y=(t.isNullOrUndefined(this.currentLayer.shapeSettings.border.width)?1:"string"==typeof this.currentLayer.shapeSettings.border.width?parseInt(this.currentLayer.shapeSettings.border.width,10):this.currentLayer.shapeSettings.border.width)+2*this.currentLayer.shapeSettings.circleRadius;n=i[1],l=i[0];var f=h(n,l,this.currentFactor,this.currentLayer,this.mapObject);this.calculateBox(f,y),this.currentLayer.layerData.push({point:f,type:e,lat:n,lng:l,property:a});break;case"multipoint":var b=(t.isNullOrUndefined(this.currentLayer.shapeSettings.border.width)?1:"string"==typeof this.currentLayer.shapeSettings.border.width?parseInt(this.currentLayer.shapeSettings.border.width,10):this.currentLayer.shapeSettings.border.width)+2*this.currentLayer.shapeSettings.circleRadius;s=[],i.map(function(e){n=e[1],l=e[0];var t=h(n,l,r.currentFactor,r.currentLayer,r.mapObject);r.calculateBox(t,b),s.push({point:t,lat:n,lng:l})}),s.property=a,s.type=e,this.currentLayer.layerData.push(s);break;case"path":this.currentLayer.layerData.push({point:o.d,type:e,property:a})}},e.prototype.calculateBox=function(e,i){t.isNullOrUndefined(this.rectBounds)?this.rectBounds={min:{x:e.x-i,y:e.y-i},max:{x:e.x+i,y:e.y+i}}:(this.rectBounds.min.x=Math.min(this.rectBounds.min.x,e.x-i),this.rectBounds.min.y=Math.min(this.rectBounds.min.y,e.y-i),this.rectBounds.max.x=Math.max(this.rectBounds.max.x,e.x+i),this.rectBounds.max.y=Math.max(this.rectBounds.max.y,e.y+i))},e.prototype.calculateFactor=function(e){var t,i,o,a=1,n=this.mapObject.baseMapBounds,l=new Re(this.mapObject.mapAreaRect.width,this.mapObject.mapAreaRect.height-5);if(n){var r=h(n.latitude.min,n.longitude.min,null,e,this.mapObject),s=h(n.latitude.max,n.longitude.max,null,e,this.mapObject);i=s.y-r.y,o=s.x-r.x,0!==i&&0!==o||(o=l.width/2,i=l.height)}else i=o=500;return t=i<l.height?parseFloat(Math.abs(100*Number(l.height/Number(i.toString()+"e+1"))).toString().split(".")[0])/10:l.height/i,a=o<l.width?parseFloat(Math.abs(100*Number(l.width/Number(o.toString()+"e+1"))).toString().split(".")[0])/10:l.width/o,Math.min(a,t)},e.prototype.translateLayerElements=function(e,i){var o;if(this.mapObject.translateType="layer",t.isNullOrUndefined(this.mapObject.baseMapRectBounds)){if(this.mapObject.isTileMap&&!t.isNullOrUndefined(this.mapObject.scale))for(var a=0;a<e.childElementCount;a++)if(!((o=e.childNodes[a]).id.indexOf("_Markers_Group")>-1||o.id.indexOf("_bubble_Group")>-1||o.id.indexOf("_dataLableIndex_Group")>-1||o.id.indexOf("_line_Group")>-1)){h="scale( "+this.mapObject.scale+" ) translate( "+this.mapObject.translatePoint.x+" "+this.mapObject.translatePoint.y+" ) ";o.setAttribute("transform",h)}}else{var n="Disable"===t.animationMode?0:0===this.currentLayer.animationDuration&&"Enable"===t.animationMode?1e3:this.currentLayer.animationDuration,l=0!==n||t.isNullOrUndefined(this.mapObject.zoomModule);this.mapObject.baseTranslatePoint=this.mapObject.zoomTranslatePoint;var r=void 0;r=this.mapObject.zoomSettings.zoomFactor>1&&!t.isNullOrUndefined(this.mapObject.zoomModule)?ee(this.mapObject,this.currentLayer,l):$(this.mapObject,this.currentLayer,l);var s=this.mapObject.previousScale=r.scale,d=this.mapObject.previousPoint=r.location;this.mapObject.baseTranslatePoint=this.mapObject.translatePoint=d,this.mapObject.baseScale=this.mapObject.scale=s;for(var p=0;p<e.childElementCount;p++)if(!((o=e.childNodes[p]).id.indexOf("_Markers_Group")>-1||o.id.indexOf("_bubble_Group")>-1||o.id.indexOf("_dataLableIndex_Group")>-1)){var h="scale( "+s+" ) translate( "+d.x+" "+d.y+" ) ";o.setAttribute("transform",h),n>0&&!t.isNullOrUndefined(this.mapObject.zoomModule)&&(r=this.mapObject.zoomSettings.zoomFactor>1?ee(this.mapObject,this.currentLayer):$(this.mapObject,this.currentLayer),this.mapObject.scale=r.scale,this.mapObject.zoomTranslatePoint=this.mapObject.translatePoint=r.location)}}},e.prototype.calculateRectBounds=function(e){var i=this;Array.prototype.forEach.call(e,function(e,o){if(!t.isNullOrUndefined(e.geometry)||!t.isNullOrUndefined(e.coordinates)){var a=t.isNullOrUndefined(e.geometry)?e.type:e.geometry.type,n=t.isNullOrUndefined(e.geometry)?e.coordinates:e.geometry.coordinates;switch(a.toLowerCase()){case"polygon":i.calculateRectBox(n[0]);break;case"multipolygon":n.map(function(e,t){i.calculateRectBox(e[0])});break;case"multilinestring":n.map(function(e,t){e.map(function(e,t){i.calculateRectBox(e,"multilinestring",0===t)})});break;case"linestring":n.map(function(e,t){i.calculateRectBox(e,"linestring",0===t)});break;case"point":i.calculateRectBox(n,"point");break;case"multipoint":n.map(function(e,t){i.calculateRectBox(e,"multipoint",0===t)})}}})},e.prototype.calculatePolygonBox=function(e,i,o){var a=this,n=[],l=this.mapObject.baseMapBounds;return e.map(function(e){var i=e[1],o=e[0];if(o>=l.longitude.min&&o<=l.longitude.max&&i>=l.latitude.min&&i<=l.latitude.max){var r=h(i,o,a.currentFactor,a.currentLayer,a.mapObject);t.isNullOrUndefined(a.rectBounds)?a.rectBounds={min:{x:r.x,y:r.y},max:{x:r.x,y:r.y}}:(a.rectBounds.min.x=Math.min(a.rectBounds.min.x,r.x),a.rectBounds.min.y=Math.min(a.rectBounds.min.y,r.y),a.rectBounds.max.x=Math.max(a.rectBounds.max.x,r.x),a.rectBounds.max.y=Math.max(a.rectBounds.max.y,r.y)),n.push({point:r,lat:i,lng:o})}}),n},e.prototype.calculateRectBox=function(e,i,o){var a=this;"linestring"!==i&&"multilinestring"!==i&&"point"!==i&&"multipoint"!==i?Array.prototype.forEach.call(e,function(e){t.isNullOrUndefined(a.mapObject.baseMapBounds)?a.mapObject.baseMapBounds=new Ve({min:e[1],max:e[1]},{min:e[0],max:e[0]}):(a.mapObject.baseMapBounds.latitude.min=Math.min(a.mapObject.baseMapBounds.latitude.min,e[1]),a.mapObject.baseMapBounds.latitude.max=Math.max(a.mapObject.baseMapBounds.latitude.max,e[1]),a.mapObject.baseMapBounds.longitude.min=Math.min(a.mapObject.baseMapBounds.longitude.min,e[0]),a.mapObject.baseMapBounds.longitude.max=Math.max(a.mapObject.baseMapBounds.longitude.max,e[0]))}):(o||"point"===i)&&t.isNullOrUndefined(this.mapObject.baseMapBounds)?this.mapObject.baseMapBounds=new Ve({min:e[1],max:e[1]},{min:e[0],max:e[0]}):(this.mapObject.baseMapBounds.latitude.min=Math.min(this.mapObject.baseMapBounds.latitude.min,e[1]),this.mapObject.baseMapBounds.latitude.max=Math.max(this.mapObject.baseMapBounds.latitude.max,e[1]),this.mapObject.baseMapBounds.longitude.min=Math.min(this.mapObject.baseMapBounds.longitude.min,e[0]),this.mapObject.baseMapBounds.longitude.max=Math.max(this.mapObject.baseMapBounds.longitude.max,e[0]))},e.prototype.generateTiles=function(e,i,o,a,n){var l=this.mapObject.locale,r=this.mapObject.availableSize;this.tiles=[];var s,d;s=d=Math.pow(2,e);var p=0,h=0;i.x+256*s<r.width&&(p=i.x>0?Math.ceil(i.x/256):0,h=i.x+256*s<r.width?Math.ceil((r.width-(i.x+256*s))/256):0),s+=p+h,"Pan"===o?(s=this.horizontalPanXCount>=s?this.horizontalPanXCount:s,this.horizontalPan=!1):(this.horizontalPanXCount=s,this.horizontalPan=!0);var m=this.mapObject.layers[this.mapObject.baseLayerIndex];this.urlTemplate=m.urlTemplate;var c=Math.min(d,(-i.y+r.height)/256+1),u=Math.min(s,(-i.x+r.width+256*h)/256+1),g=-(i.x+256*p+256)/256,y=-(i.y+256)/256;a=a||this.bing||this.mapObject.bingMap;for(var f=Math.round(g);f<Math.round(u);f++)for(var b=Math.round(y);b<Math.round(c);b++){var v=256*f+i.x,S=256*b+i.y;if(v>-256&&v<=r.width&&S>-256&&S<r.height&&b>=0){var x=f;f<0&&(x=x%d+d);var O=new Rt(x%d,b);if(O.left=Math.round(v),O.top=Math.round(S),"Bing"===m.layerType||a&&!t.isNullOrUndefined(m.urlTemplate)&&""!==m.urlTemplate){var C=m.key;O.src=a.getBingMap(O,C,m.bingMapType,l,a.imageUrl,a.subDomains)}else O.src=this.urlTemplate.replace("level",e.toString()).replace("tileX",O.x.toString()).replace("tileY",O.y.toString());this.tiles.push(O)}}t.isNullOrUndefined(o)||(o.indexOf("wheel")>1?(this.animateToZoomX=this.mapObject.availableSize.width/2-n.x-10,this.animateToZoomY=-n.y):(this.animateToZoomX=-10,this.animateToZoomY=10-(this.mapObject.availableSize.height/2+11.5)));for(var _=t.extend([],this.tiles,[],!0),M=0,L=this.mapObject.layers;M<L.length;M++){var P=L[M];if("SubLayer"===P.type&&P.visible&&("Geometry"!==P.layerType&&"GoogleStaticMap"!==P.layerType||"Geometry"===P.layerType&&t.isNullOrUndefined(P.shapeData)&&!t.isNullOrUndefined(P.urlTemplate)&&""!==P.urlTemplate))for(var w=0,T=_;w<T.length;w++){var I=T[w],k=t.extend({},I,{},!0);"Bing"===P.layerType?(a=new ri(this.mapObject),k.src=a.getBingMap(k,P.key,P.bingMapType,l,a.imageUrl,a.subDomains)):k.src=P.urlTemplate.replace("level",e.toString()).replace("tileX",I.x.toString()).replace("tileY",I.y.toString()),this.tiles.push(k)}}(this.mapObject.previousScale!==this.mapObject.scale||this.mapObject.isReset||this.mapObject.isZoomByPosition||this.mapObject.zoomNotApplied)&&this.arrangeTiles(o,this.animateToZoomX,this.animateToZoomY)},e.prototype.arrangeTiles=function(e,i,o){var a,n=this,l=document.getElementById(this.mapObject.element.id+"_tile_parent"),r=document.getElementById(this.mapObject.element.id+"_tiles");t.isNullOrUndefined(e)||"Pan"===e?a=0:(this.tileAnimation(e,i,o),a="Disable"===t.animationMode?0:0===this.mapObject.layersCollection[0].animationDuration&&"Enable"===t.animationMode?1e3:this.mapObject.layersCollection[0].animationDuration),"GoogleStaticMap"===this.mapObject.layers[this.mapObject.baseLayerIndex].layerType?this.renderGoogleMap(this.mapObject.layers[0].key,this.mapObject.staticMapZoom):setTimeout(function(){l&&(l.style.zIndex="1"),r&&(r.style.zIndex="0");var i;!document.getElementById(n.mapObject.element.id+"_animated_tiles")&&l?(i=t.createElement("div",{id:n.mapObject.element.id+"_animated_tiles"}),l.appendChild(i)):"Pan"!==e&&r&&l?(r.appendChild(l.children[0]),n.mapObject.isAddLayer||t.isNullOrUndefined(document.getElementById(n.mapObject.element.id+"_animated_tiles"))||(document.getElementById(n.mapObject.element.id+"_animated_tiles").id=n.mapObject.element.id+"_animated_tiles_old"),i=t.createElement("div",{id:n.mapObject.element.id+"_animated_tiles"}),l.appendChild(i)):i=l?l.children[0]:null;for(var o=0;o<n.tiles.length;o++){var a=n.tiles[o],s=null,d=n.mapObject.element.id;if("Pan"===e){var p=document.getElementById(d+"_tile_"+o),h=!1;t.isNullOrUndefined(p)?(h=!0,p=t.createElement("div",{id:d+"_tile_"+o}),s=t.createElement("img")):(p.style.removeProperty("display"),s=p.children[0]),!h&&s&&s.src!==a.src&&(s.src=a.src),p.style.position="absolute",p.style.left=a.left+"px",p.style.top=a.top+"px",p.style.height=a.height+"px",p.style.width=a.width+"px",h&&(s.setAttribute("height","256px"),s.setAttribute("width","256px"),s.setAttribute("src",a.src),s.setAttribute("alt",n.mapObject.getLocalizedLabel("ImageNotFound")),s.style.setProperty("user-select","none"),p.appendChild(s),i.appendChild(p))}else{(s=t.createElement("img")).setAttribute("height","256px"),s.setAttribute("width","256px"),s.setAttribute("src",a.src),s.style.setProperty("user-select","none"),s.setAttribute("alt",n.mapObject.getLocalizedLabel("ImageNotFound"));(p=t.createElement("div",{id:d+"_tile_"+o})).style.position="absolute",p.style.left=a.left+"px",p.style.top=a.top+"px",p.style.height=a.height+"px",p.style.width=a.width+"px",p.appendChild(s),i&&i.appendChild(p)}o===n.tiles.length-1&&document.getElementById(n.mapObject.element.id+"_animated_tiles_old")&&Q(n.mapObject.element.id+"_animated_tiles_old")}if(!t.isNullOrUndefined(n.mapObject.currentTiles))for(var m=n.tiles.length;m<i.childElementCount;m++){for(var c=!1,u=0;u<n.mapObject.currentTiles.childElementCount;u++)c||n.mapObject.currentTiles.children[u].id!==i.children[m].id||(c=!0);c?i.children[m].style.display="none":i.removeChild(i.children[m])}},a)},e.prototype.tileAnimation=function(e,i,o){var a=document.getElementById(this.mapObject.element.id+"_tile_parent"),n=document.getElementById(this.mapObject.element.id+"_animated_tiles"),l=document.getElementById(this.mapObject.element.id+"_tiles"),r="2";if(0===e.indexOf("ZoomOut")||"Reset"===e){for(l.style.zIndex="1",a.style.zIndex="0";l.childElementCount>=1;)l.removeChild(l.children[0]);i=0,o=document.getElementById(this.mapObject.element.id+"_tile_parent").getClientRects()[0].height/4,r=0===e.indexOf("ZoomOut")?"0.5":"0.2"}t.isNullOrUndefined(n)||(n.style.transition="Disable"===t.animationMode?"0ms":0===this.mapObject.layersCollection[0].animationDuration&&"Enable"===t.animationMode?"1000ms":this.mapObject.layersCollection[0].animationDuration+"ms",n.style.transform="translate("+i+"px, "+o+"px) scale("+r+")")},e.prototype.renderGoogleMap=function(e,i){var o=this.mapObject;i=this.mapObject.tileZoomLevel;var a=256*Math.pow(2,i),n=o.mapAreaRect.width/2-a/2,l=o.mapAreaRect.height/2-a/2,r=0,s=0,d=m(new Ze(null,null),i,{x:n,y:l},this.isMapCoordinates);o.zoomModule&&o.zoomSettings.enable&&(r=o.zoomModule.mouseDownLatLong.x-o.zoomModule.mouseMoveLatLong.x,s=o.zoomModule.mouseDownLatLong.y-o.zoomModule.mouseMoveLatLong.y);var p=o.pointToLatLong(d.x-r,d.y-s);o.centerPosition.latitude=p.latitude,o.centerPosition.longitude=p.longitude;var h,c;h=t.isNullOrUndefined(parseInt(o.width,10))?parseInt(o.width,10)-22:Math.round(o.mapAreaRect.width),c=t.isNullOrUndefined(parseInt(o.height,10))?parseInt(o.height,10)-22:Math.round(o.mapAreaRect.height);var u=h>640?(h-640)/2:0,g=c>640?(c-640)/2:0,y=o.layers[o.layers.length-1].staticMapType.toString().toLowerCase(),f="https://maps.googleapis.com/maps/api/staticmap?size="+h+"x"+c+"&zoom="+i+"¢er="+(o.centerPosition.latitude&&o.centerPosition.longitude?o.centerPosition.latitude.toString()+","+o.centerPosition.longitude.toString():"0,0")+"&maptype="+y+"&key="+e;document.getElementById(this.mapObject.element.id+"_tile_parent").innerHTML='<div id="'+this.mapObject.element.id+'_StaticGoogleMap"style="position:absolute; left:'+u+"px; top:"+g+'px"><img src="'+f+'"alt="'+this.mapObject.getLocalizedLabel("ImageNotFound")+'"></div>'},e.prototype.panTileMap=function(e,i,o){this.mapObject.tileZoomLevel<=this.mapObject.tileZoomScale&&this.mapObject.initialCheck&&(this.mapObject.tileZoomLevel=this.mapObject.tileZoomScale);var a,n,l=this.mapObject.tileZoomLevel,r="GoogleStaticMap"!==this.mapObject.layers[this.mapObject.layers.length-1].layerType?20:0,s=256*Math.pow(2,l),d=m(o,l,{x:a=e/2-s/2,y:n=i/2-s/2},this.isMapCoordinates);if(r=this.mapObject.zoomNotApplied?0:r,a-=d.x-e/2,n=n-(d.y-i/2)+r,this.mapObject.scale=Math.pow(2,l-1),(t.isNullOrUndefined(this.mapObject.tileTranslatePoint)||0===this.mapObject.tileTranslatePoint.y&&0===this.mapObject.tileTranslatePoint.x||t.isNullOrUndefined(this.mapObject.previousTileWidth)||t.isNullOrUndefined(this.mapObject.previousTileHeight))&&(this.mapObject.previousTileWidth=e,this.mapObject.previousTileHeight=i),!t.isNullOrUndefined(this.mapObject.tileTranslatePoint)&&t.isNullOrUndefined(o.x)&&(1===this.mapObject.zoomSettings.zoomFactor||this.mapObject.zoomSettings.zoomFactor!==l||!this.mapObject.defaultState)&&(e!==this.mapObject.previousTileWidth||i!==this.mapObject.previousTileHeight)){var p=a-(this.mapObject.previousTileWidth/2-s/2),h=n-(this.mapObject.previousTileHeight/2-s/2+r);this.mapObject.tileTranslatePoint.x=this.mapObject.tileTranslatePoint.x+p,this.mapObject.tileTranslatePoint.y=this.mapObject.tileTranslatePoint.y+h}return t.isNullOrUndefined(this.mapObject.tileTranslatePoint)||this.mapObject.zoomNotApplied||(0===this.mapObject.tileTranslatePoint.x||this.mapObject.tileTranslatePoint.x===a||this.mapObject.centerPositionChanged||(a=this.mapObject.tileTranslatePoint.x),0===this.mapObject.tileTranslatePoint.y||this.mapObject.tileTranslatePoint.y===n||this.mapObject.centerPositionChanged||(n=this.mapObject.tileTranslatePoint.y)),this.mapObject.translatePoint=new Ze((a-.01*this.mapObject.zoomSettings.zoomFactor)/this.mapObject.scale,(n-.01*this.mapObject.zoomSettings.zoomFactor)/this.mapObject.scale),this.mapObject.previousTileWidth=e,this.mapObject.previousTileHeight=i,new Ze(a,n)},e.prototype.destroy=function(){this.mapObject=null,this.groupElements=[],this.layerObject=null,this.currentLayer=null,this.rectBounds=null,this.tiles=[],this.clipRectElement=null,this.tileSvgObject=null,this.ajaxModule=null,this.ajaxResponse=[],this.layerGroup=null,t.isNullOrUndefined(this.bing)||this.bing.destroy(),this.bing=null},e}(),pi=function(){function e(e){this.map=e}return e.prototype.renderAnnotationElements=function(){var e=this,i=this.map.element.id+"_Secondary_Element",o=t.createElement("div",{id:this.map.element.id+"_Annotations_Group"});o.style.position="absolute",o.style.top="0px",o.style.left="0px",this.map.annotations.map(function(t,i){null!==t.content&&e.createAnnotationTemplate(o,t,i)}),o.childElementCount>0&&!t.isNullOrUndefined(ie(i))&&ie(i).appendChild(o),this.map.renderReactTemplates()},e.prototype.createAnnotationTemplate=function(e,i,o){var a,n,l,r,s=this,d=this.map,p=d.availableSize,h=(d.element.id,t.createElement("div",{id:d.element.id+"_Annotation_"+o}));h.style.cssText="position: absolute; z-index:"+i.zIndex+";";var m={cancel:!1,name:ai,content:i.content,annotation:i};this.map.trigger(ai,m,function(e){if(!m.cancel)if((l=ae(m.content,s.map))&&l(s.map,s.map,m.content,s.map.element.id+"_ContentTemplate_"+o).length)for(var i=(r=Array.prototype.slice.call(l(s.map,s.map,m.content,s.map.element.id+"_ContentTemplate_"+o))).length,a=0;a<i;a++)h.appendChild(r[a]);else h.appendChild(t.createElement("div",{innerHTML:m.content}))});var c=Ce(h.cloneNode(!0),d.element),u=d.element.getBoundingClientRect(),g=d.svgObject.getBoundingClientRect();a=Math.abs(g.left-u.left),n=Math.abs(g.top-u.top);var y=i.x.indexOf("%")>-1?p.width/100*parseFloat(i.x):parseFloat(i.x),f=i.y.indexOf("%")>-1?p.height/100*parseFloat(i.y):parseFloat(i.y);switch(a="None"===i.horizontalAlignment?a+y:a,n="None"===i.verticalAlignment?n+f:n,i.verticalAlignment){case"Near":n+=f;break;case"Center":n=n+f+(g.height/2-c.height/2);break;case"Far":n=n+g.height+f-c.height}switch(i.horizontalAlignment){case"Near":a+=y;break;case"Center":a=a+y+(g.width/2-c.width/2);break;case"Far":a=a+g.width+y-c.width}h.style.left=a+"px",h.style.top=n+"px",e.appendChild(h)},e.prototype.getModuleName=function(){return"Annotations"},e.prototype.destroy=function(){this.map=null},e}(),hi=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),mi=function(e,t,i,o){var a,n=arguments.length,l=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(l=(n<3?a(l):n>3?a(t,i,l):a(t,i))||l);return n>3&&l&&Object.defineProperty(t,i,l),l},ci=function(e){function a(i,o){var a=e.call(this,i,o)||this;return a.isTileMap=!1,a.isResize=!1,a.isReset=!1,a.baseSize=new Re(0,0),a.translatePoint=new Ze(0,0),a.baseTranslatePoint=new Ze(0,0),a.zoomTranslatePoint=new Ze(0,0),a.markerZoomedState=!0,a.zoomPersistence=!1,a.defaultState=!0,a.centerPositionChanged=!1,a.isTileMapSubLayer=!1,a.markerNullCount=0,a.tileTranslatePoint=new Ze(0,0),a.baseTileTranslatePoint=new Ze(0,0),a.isDevice=!1,a.staticMapZoom=a.zoomSettings.enable?a.zoomSettings.zoomFactor:0,a.zoomNotApplied=!1,a.dataLabelShape=[],a.zoomShapeCollection=[],a.zoomLabelPositions=[],a.mouseDownEvent={x:null,y:null},a.mouseClickEvent={x:null,y:null},a.selectedElementId=[],a.selectedMarkerElementId=[],a.selectedBubbleElementId=[],a.selectedNavigationElementId=[],a.selectedLegendElementId=[],a.legendSelectionCollection=[],a.shapeSelections=!0,a.legendSelection=!0,a.toggledLegendId=[],a.toggledShapeElementId=[],a.checkInitialRender=!0,a.initialTileTranslate=new Ze(0,0),a.markerDragId="",a.initialCheck=!0,a.applyZoomReset=!1,a.markerClusterExpandCheck=!1,a.markerClusterExpand=!1,a.mouseMoveId="",a.shapeSelectionItem=[],a.markerDragArgument=null,t.setValue("mergePersistData",a.mergePersistMapsData,a),a}return hi(a,e),Object.defineProperty(a.prototype,"isShapeSelected",{get:function(){return this.mapSelect},enumerable:!0,configurable:!0}),a.prototype.mergePersistMapsData=function(){var e,i;try{i=window.localStorage}catch(e){i=null}if(t.isNullOrUndefined(i)||(e=window.localStorage.getItem(this.getModuleName()+this.element.id)),!t.isNullOrUndefined(e)&&""!==e){var o=JSON.parse(e),a=Object.keys(o);this.isProtectedOnChange=!0;for(var n=0,l=a;n<l.length;n++){var r=l[n];"object"!=typeof this[r]||t.isNullOrUndefined(this[r])?this[r]=o[r]:t.extend(this[r],o[r])}this.isProtectedOnChange=!1}},a.prototype.getLocalizedLabel=function(e){return this.localeObject.getConstant(e)},a.prototype.preRender=function(){this.isDevice=t.Browser.isDevice,this.initPrivateVariable(),this.allowServerDataBinding=!1,this.unWireEVents(),this.wireEVents(),this.setCulture()},a.prototype.renderElements=function(){this.isDestroyed||(this.trigger("load",{maps:this}),this.createSVG(),this.findBaseAndSubLayers(),this.createSecondaryElement(),this.addTabIndex(),this.themeStyle=function(e){var t,i;switch(e.toLowerCase()){case"materialdark":i="#303030";break;case"fabricdark":i="#201F1F";break;case"bootstrapdark":i="#1A1A1A"}switch(e.toLowerCase()){case"materialdark":case"fabricdark":case"bootstrapdark":t={backgroundColor:i,areaBackgroundColor:i,titleFontColor:"#FFFFFF",titleFontSize:"14px",subTitleFontColor:"#FFFFFF",legendTitleFontColor:"#DADADA",legendTextColor:"#DADADA",dataLabelFontColor:"#DADADA",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#363F4C",zoomFillColor:"#FFFFFF",labelFontFamily:"Roboto, Noto, Sans-serif",fontFamily:"Roboto, Noto, Sans-serif",fontSize:"12px",fontWeight:"Medium",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900"};break;case"highcontrast":t={backgroundColor:"#000000",areaBackgroundColor:"#000000",titleFontColor:"#FFFFFF",titleFontSize:"14px",subTitleFontColor:"#FFFFFF",legendTitleFontColor:"#FFFFFF",legendTextColor:"#FFFFFF",dataLabelFontColor:"#000000",tooltipFontColor:"#000000",tooltipFillColor:"#ffffff",zoomFillColor:"#FFFFFF",fontFamily:"Roboto, Noto, Sans-serif",fontSize:"12px",fontWeight:"Medium",labelFontFamily:"Roboto, Noto, Sans-serif",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900"};break;case"bootstrap4":t={backgroundColor:"#FFFFFF",areaBackgroundColor:"#FFFFFF",titleFontColor:"#212529",subTitleFontColor:"#212529",legendTitleFontColor:"#212529",legendTextColor:"#212529",dataLabelFontColor:"#212529",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#000000",zoomFillColor:"#5B6269",fontFamily:"HelveticaNeue-Medium",fontSize:"12px",fontWeight:"Medium",titleFontSize:"16px",legendFontSize:"14px",tooltipFillOpacity:1,tooltipTextOpacity:.9,labelFontFamily:"HelveticaNeue-Medium",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900"};break;case"tailwind":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#374151",subTitleFontColor:"#374151",legendTitleFontColor:"#374151",legendTextColor:"#6B7280",dataLabelFontColor:"#505967",tooltipFontColor:"#F9FAFB",tooltipFillColor:"#111827",zoomFillColor:"#6b7280",fontFamily:"Inter",fontSize:"12px",fontWeight:"Medium",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:.9,labelFontFamily:"Inter",titleFontWeight:"500",zoomSelectionColor:"#374151",shapeFill:"#E5E7EB",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900"};break;case"tailwinddark":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#D1D5DB",subTitleFontColor:"#D1D5DB",legendTitleFontColor:"#D1D5DB",legendTextColor:"#D1D5DB",dataLabelFontColor:"#D1D5DB",tooltipFontColor:"#1F2937",tooltipFillColor:"#F9FAFB",zoomFillColor:"#D1D5DB",fontFamily:"Inter",fontSize:"12px",fontWeight:"Medium",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:.9,labelFontFamily:"Inter",titleFontWeight:"500",zoomSelectionColor:"#F3F4F6",shapeFill:"#374151",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900"};break;case"bootstrap5":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#212529",subTitleFontColor:"#212529",legendTitleFontColor:"#212529",legendTextColor:"#212529",dataLabelFontColor:"#212529",tooltipFontColor:"#F9FAFB",tooltipFillColor:"#212529",zoomFillColor:"#6C757D",fontFamily:"Helvetica Neue",fontSize:"12px",fontWeight:"Medium",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Helvetica Neue",titleFontWeight:"normal",zoomSelectionColor:"#343A40",shapeFill:"#E9ECEF",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900"};break;case"bootstrap5dark":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#FFFFFF",subTitleFontColor:"#FFFFFF",legendTitleFontColor:"#FFFFFF",legendTextColor:"#FFFFFF",dataLabelFontColor:"#FFFFFF",tooltipFontColor:"#212529",tooltipFillColor:"#E9ECEF",zoomFillColor:"#B5BABE",fontFamily:"Helvetica Neue",fontSize:"12px",fontWeight:"Medium",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Helvetica Neue",titleFontWeight:"normal",zoomSelectionColor:"#DEE2E6",shapeFill:"#495057",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900"};break;case"fluent":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#201F1E",subTitleFontColor:"#201F1E",legendTitleFontColor:"#201F1E",legendTextColor:"#201F1E",dataLabelFontColor:"#201F1E",tooltipFontColor:"#323130",tooltipFillColor:"#FFFFFF",zoomFillColor:"#A19F9D",fontFamily:"Segoe UI",fontSize:"12px",fontWeight:"Medium",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"600",zoomSelectionColor:"#323130",shapeFill:"#F3F2F1",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900"};break;case"fluentdark":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#F3F2F1",subTitleFontColor:"#F3F2F1",legendTitleFontColor:"#F3F2F1",legendTextColor:"#F3F2F1",dataLabelFontColor:"#F3F2F1",tooltipFontColor:"#F3F2F1",tooltipFillColor:"#252423",zoomFillColor:"#484644",fontFamily:"Segoe UI",fontSize:"12px",fontWeight:"Medium",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"600",zoomSelectionColor:"#F3F2F1",shapeFill:"#252423",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900"};break;case"material3":t={backgroundColor:"transparent",areaBackgroundColor:"transparent",titleFontColor:"#1C1B1F",subTitleFontColor:"#1C1B1F",legendTitleFontColor:"#1C1B1F",legendTextColor:"#49454E",dataLabelFontColor:"#1C1B1F",tooltipFontColor:"#F4EFF4",tooltipFillColor:"#313033",zoomFillColor:"#49454E",fontFamily:"Roboto",fontSize:"14px",titleFontSize:"16px",subTitleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Roboto",titleFontWeight:"500",fontWeight:"400",zoomSelectionColor:"#49454E",shapeFill:"#E7E0EC",rectangleZoomFillColor:"#6750A4",rectangleZoomFillOpacity:.24,rectangleZoomBorderColor:"#6750A4"};break;case"material3dark":t={backgroundColor:"transparent",areaBackgroundColor:"transparent",titleFontColor:"#E6E1E5",subTitleFontColor:"#E6E1E5",legendTitleFontColor:"#E6E1E5",legendTextColor:"#CAC4D0",dataLabelFontColor:"#E6E1E5",tooltipFontColor:"#313033",tooltipFillColor:"#E6E1E5",zoomFillColor:"#E6E1E5",fontFamily:"Roboto",fontSize:"14px",titleFontSize:"16px",subTitleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Roboto",titleFontWeight:"500",fontWeight:"400",zoomSelectionColor:"#E6E1E5",shapeFill:"#49454F",rectangleZoomFillColor:"#D0BCFF",rectangleZoomFillOpacity:.24,rectangleZoomBorderColor:"#D0BCFF"};break;default:t={backgroundColor:"#FFFFFF",areaBackgroundColor:"#FFFFFF",titleFontColor:"#424242",titleFontSize:"14px",subTitleFontColor:"#424242",legendTitleFontColor:"#757575",legendTextColor:"#757575",dataLabelFontColor:"#000000",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#000000",zoomFillColor:"#737373",labelFontFamily:"Roboto, Noto, Sans-serif",fontFamily:"Roboto, Noto, Sans-serif",fontSize:"12px",fontWeight:"Medium",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900"}}return t}(this.theme),this.renderBorder(),this.renderTitle(this.titleSettings,"title",null,null),this.renderArea(),this.processRequestJsonData(),this.renderComplete(),this.isAddLayer=!!this.isTileMap&&this.isAddLayer)},a.prototype.render=function(){this.renderElements()},a.prototype.processRequestJsonData=function(){var e=this,i=this.layersCollection.length-1;this.serverProcess={request:0,response:0};var a,n;Array.prototype.forEach.call(this.layersCollection,function(l,r){if(l.shapeData instanceof o.DataManager){e.serverProcess.request++,n=l.shapeData,a=l.query instanceof o.Query?l.query:new o.Query;n.executeQuery(a).then(function(t){e.processResponseJsonData("DataManager",t,l,"ShapeData")})}else(l.shapeData instanceof it||l.shapeData)&&(t.isNullOrUndefined(l.shapeData.dataOptions)||e.processAjaxRequest(l,l.shapeData,"ShapeData"));if(l.dataSource instanceof o.DataManager){e.serverProcess.request++,n=l.dataSource,a=l.query instanceof o.Query?l.query:new o.Query;n.executeQuery(a).then(function(e){l.dataSource=Be(e)})}if(l.markerSettings.length>0)for(var s=function(t){if(l.markerSettings[t].dataSource instanceof o.DataManager){e.serverProcess.request++,n=l.markerSettings[t].dataSource,a=l.markerSettings[t].query instanceof o.Query?l.markerSettings[t].query:new o.Query;n.executeQuery(a).then(function(e){l.markerSettings[t].dataSource=Be(e)})}},d=0;d<l.markerSettings.length;d++)s(d);if(l.bubbleSettings.length>0){var p=function(t){if(l.bubbleSettings[t].dataSource instanceof o.DataManager){e.serverProcess.request++,n=l.bubbleSettings[t].dataSource,a=l.bubbleSettings[t].query instanceof o.Query?l.bubbleSettings[t].query:new o.Query;n.executeQuery(a).then(function(e){l.bubbleSettings[t].dataSource=Be(e)})}};for(d=0;d<l.bubbleSettings.length;d++)p(d)}(l.dataSource instanceof it||!t.isNullOrUndefined(l.dataSource.dataOptions))&&e.processAjaxRequest(l,l.dataSource,"DataSource"),e.serverProcess.request===e.serverProcess.response&&i===r&&e.processResponseJsonData(null)})},a.prototype.processAjaxRequest=function(e,i,o){var a=this;this.serverProcess.request++;var n=new t.Fetch(i.dataOptions,i.type,i.contentType);n.onSuccess=function(i){if(t.isNullOrUndefined(i.type)||"application/octet-stream"!==i.type)a.processResponseJsonData("Fetch",i,e,o);else{var n=new FileReader,l=a;n.onload=function(t){i=JSON.parse(n.result.toString()),l.processResponseJsonData("Fetch",i,e,o)},n.readAsText(i)}},n.send(i.sendData)},a.prototype.processResponseJsonData=function(e,i,o,a){if(this.serverProcess.response++,e&&("ShapeData"===a?o.shapeData="DataManager"===e?Be(i):i:o.dataSource="DataManager"===e?Be(i):i),t.isNullOrUndefined(e)||this.serverProcess.request!==this.serverProcess.response)t.isNullOrUndefined(e)&&this.renderMap();else{var n=this.layersCollection;this.layersCollection=[];for(var l=0;l<n.length;l++)n[l].isBaseLayer&&this.layersCollection.push(n[l]);for(var r=0;r<n.length;r++)n[r].isBaseLayer||this.layersCollection.push(n[r]);this.renderMap()}},a.prototype.renderMap=function(){this.legendModule&&this.legendSettings.visible&&this.legendModule.renderLegend(),this.createTile(),this.zoomSettings.enable&&this.zoomModule&&this.zoomModule.createZoomingToolbars(),t.isNullOrUndefined(this.dataLabelModule)||(this.dataLabelModule.dataLabelCollections=[]),this.mapLayerPanel.measureLayerPanel(),t.isNullOrUndefined(this.svgObject)||this.element.appendChild(this.svgObject),this.setSecondaryElementPosition();for(var e=0;e<this.layers.length;e++){if(this.layers[e].selectionSettings&&this.layers[e].selectionSettings.enable&&this.layers[e].initialShapeSelection.length>0&&this.checkInitialRender){var i=this.layers[e].selectionSettings.enableMultiSelect;this.layers[e].selectionSettings.enableMultiSelect=i||!0;for(var o=this.layers[e].initialShapeSelection,a=0;a<this.layers[e].initialShapeSelection.length;a++)this.shapeSelection(e,o[a].shapePath,o[a].shapeValue,!0);this.layers[e].selectionSettings.enableMultiSelect=i,e===this.layers.length-1&&(this.checkInitialRender=!1)}if(!this.isResize)for(var n=0;n<this.layers[e].markerSettings.length;n++)if(this.layers[e].markerSettings[n].selectionSettings&&this.layers[e].markerSettings[n].selectionSettings.enable&&this.layers[e].markerSettings[n].initialMarkerSelection.length>0){var l=this.layers[e].markerSettings[n].initialMarkerSelection;for(a=0;a<l.length;a++)this.markerInitialSelection(e,n,this.layers[e].markerSettings[n],l[a].latitude,l[a].longitude)}}if(!t.isNullOrUndefined(document.getElementById(this.element.id+"_tile_parent"))){var r,s=this.svgObject.getBoundingClientRect(),d=document.getElementById(this.element.id),p=document.getElementById(this.element.id+"_tile_parent"),h=document.getElementById(this.element.id+"_tiles"),m=p.getBoundingClientRect(),c=void 0,u=void 0;u=parseFloat(p.style.left);var g=x(this.titleSettings.text,this.titleSettings.textStyle),y=x(this.titleSettings.subtitleSettings.text,this.titleSettings.subtitleSettings.textStyle);this.isTileMap&&this.isTileMapSubLayer&&"Bottom"===this.legendSettings.position&&this.legendSettings.visible?"Default"!==this.legendSettings.mode?r=0!==g.width&&0!==g.height?parseFloat(p.style.top)+y.height/2-this.legendModule.legendBorderRect.height/2:parseFloat(p.style.top)-this.mapAreaRect.y:(u=this.legendModule.legendBorderRect.x,r=0!==g.width&&0!==g.height?parseFloat(p.style.top)+y.height/2-this.legendModule.legendBorderRect.y:parseFloat(p.style.top)+y.height/2):(c=s.bottom-m.bottom-d.offsetTop,r=parseFloat(p.style.top)),r=c<=11?r:t.isNullOrUndefined(this.legendModule)||"Bottom"!==this.legendSettings.position?2*r:this.mapAreaRect.y,u=c<=11?u:t.isNullOrUndefined(this.legendModule)?2*u:u,p.style.top=r+"px",p.style.left=u+"px",h.style.top=r+"px",h.style.left=u+"px",!t.isNullOrUndefined(this.legendModule)&&this.legendModule.totalPages.length>0&&(p.style.height=h.style.height=this.legendModule.legendTotalRect.height+"px",p.style.width=h.style.width=this.legendModule.legendTotalRect.width+"px")}this.arrangeTemplate(),this.annotationsModule&&"0px"!==this.width&&"0px"!==this.height&&"0%"!==this.width&&"0%"!==this.height&&this.annotationsModule.renderAnnotationElements(),this.element.style.outline="none",this.element.style.position="relative";for(e=0;e<document.getElementsByTagName("path").length-1;e++)document.getElementsByTagName("path")[e].id.indexOf("shapeIndex")>-1&&(document.getElementsByTagName("path")[e].style.outline="none");this.zoomingChange(),this.zoomModule&&this.isDevice&&this.zoomModule.removeToolbarOpacity(this.isTileMap?Math.round(this.tileZoomLevel):this.mapScaleValue,this.element.id+"_Zooming_"),this.isZoomByPosition||this.zoomNotApplied||this.trigger("loaded",{maps:this,isResized:this.isResize}),this.isResize=!1},a.prototype.markerSelection=function(e,t,i,o){var a={color:e.border.color,width:e.border.width/t.scale,opacity:e.border.opacity},n={opacity:e.opacity,fill:e.fill,border:a,target:i.id,cancel:!1,data:o,maps:t};ne("MarkerselectionMap")?me("MarkerselectionMap","MarkerselectionMapStyle",n):document.body.appendChild(he("MarkerselectionMap","MarkerselectionMapStyle",n)),(0===this.selectedMarkerElementId.length||e.enableMultiSelect)&&("g"===i.tagName?(i.children[0].setAttribute("class","MarkerselectionMapStyle"),this.selectedMarkerElementId.push(i.children[0].id)):(i.setAttribute("class","MarkerselectionMapStyle"),this.selectedMarkerElementId.push(i.id)))},a.prototype.markerInitialSelection=function(e,t,i,o,a){var n=i.selectionSettings;if(n.enable)for(var l=0;l<i.dataSource.length;l++){var r=i.dataSource[l];if(r.latitude===o&&r.longitude===a){var s=this.element.id+"_LayerIndex_"+e+"_MarkerIndex_"+t+"_dataIndex_"+l;this.markerSelection(n,this,ne(s),r)}}},a.prototype.renderArea=function(){var e=this.mapsArea.border.width,i=this.mapsArea.background;if(e>0||i||this.themeStyle.areaBackgroundColor){var o={opacity:t.isNullOrUndefined(this.mapsArea.border.opacity)?1:this.mapsArea.border.opacity,color:this.mapsArea.border.color,width:this.mapsArea.border.width},a=new Xe(this.element.id+"_MapAreaBorder",i||this.themeStyle.areaBackgroundColor,o,1,this.mapAreaRect);this.svgObject.appendChild(this.renderer.drawRectangle(a))}},a.prototype.addTabIndex=function(){this.element.setAttribute("aria-label",this.description||"Maps Element"),this.element.setAttribute("role",""),this.element.tabIndex=this.tabIndex},a.prototype.setSecondaryElementPosition=function(){var e=ie(this.element.id+"_Secondary_Element"),i=this.element.getBoundingClientRect(),o=ie(this.element.id+"_svg");if(!t.isNullOrUndefined(o)){var a=o.getBoundingClientRect();e.style.left=Math.max(a.left-i.left,0)+"px",e.style.top=Math.max(a.top-i.top,0)+"px"}},a.prototype.zoomingChange=function(){var e,i;if(ie(this.element.id+"_Layer_Collections")&&this.zoomModule&&(this.zoomModule.layerCollectionEle=ie(this.element.id+"_Layer_Collections")),this.isTileMap&&ie(this.element.id+"_Tile_SVG")&&ie(this.element.id+"_tile_parent")){var o=ie(this.element.id+"_tile_parent"),a=ie(this.element.id+"_Tile_SVG"),n=ie(this.element.id+"_Tile_SVG_Parent"),l=o.getBoundingClientRect(),r=a.getBoundingClientRect();e=l.left-r.left,i=l.top-r.top,n.style.left=e+"px",n.style.top=i+"px",!t.isNullOrUndefined(this.legendModule)&&this.legendModule.totalPages.length>0&&(o.style.width=a.style.width=this.legendModule.legendTotalRect.width.toString(),o.style.height=a.style.height=this.legendModule.legendTotalRect.height.toString(),n.style.width=this.legendModule.legendTotalRect.width+"px",n.style.height=this.legendModule.legendTotalRect.height+"px");var s=document.getElementsByClassName("template");if(!t.isNullOrUndefined(s)&&s.length>0)for(var d=0;d<s.length;d++){var p=s[d];p.style.left=e+"px",p.style.top=i+"px"}}if(this.zoomSettings.zoomFactor>=0){this.zoomModule&&this.zoomModule.toolBarGroup&&this.zoomSettings.enable&&this.zoomModule.alignToolBar();var h=document.getElementById(this.element.id+"_Layer_Collections");if(!t.isNullOrUndefined(h)&&h.childElementCount>0)for(d=0;d<h.childNodes.length;d++){var m=h.childNodes[d];if("g"===m.tagName&&-1===m.id.indexOf("_Legend_Group"))for(var c=parseFloat(m.id.split("_LayerIndex_")[1].split("_")[0]),u=0;u<m.childNodes.length;u++){var g=m.childNodes[u];g.id.indexOf("_Markers_Group")>-1||g.id.indexOf("_bubble_Group")>-1||g.id.indexOf("_dataLableIndex_Group")>-1||_e(g,c,this.scale,this)}}this.zoomModule&&(this.previousScale!==this.scale||this.zoomNotApplied||this.isZoomByPosition)&&this.zoomModule.applyTransform(this,!0)}},a.prototype.createSecondaryElement=function(){if(t.isNullOrUndefined(document.getElementById(this.element.id+"_Secondary_Element"))){var e=t.createElement("div",{id:this.element.id+"_Secondary_Element"});e.style.cssText="position: relative;z-index:2;",this.element.appendChild(e)}},a.prototype.arrangeTemplate=function(){document.getElementById(this.element.id+"_Legend_Border")&&(document.getElementById(this.element.id+"_Legend_Border").style.pointerEvents="none");var e=document.getElementsByClassName(this.element.id+"_template");if(!t.isNullOrUndefined(e)&&e.length>0&&ie(this.element.id+"_Layer_Collections")&&!this.isTileMap)for(var i=0;i<e.length;i++){var o=0,a=0,n=e[i];if(!t.isNullOrUndefined(n)&&n.childElementCount>0){var l=ie(this.element.id+"_Layer_Collections").getBoundingClientRect(),r=ie(n.id).getBoundingClientRect();-1===n.id.indexOf("Marker")&&(o=this.isTileMap?0:l.left<r.left?-Math.abs(r.left-l.left):Math.abs(r.left-l.left),a=this.isTileMap?0:l.top<r.top?-Math.abs(r.top-l.top):Math.abs(r.top-l.top));for(var s=0;s<n.childElementCount;s++){var d=n.childNodes[s];if(-1!==d.id.indexOf("Marker")){var p=ie(d.id).getBoundingClientRect();d.style.left=parseFloat(d.style.left)-(this.isTileMap?0:p.width/2)+"px",d.style.top=parseFloat(d.style.top)-(this.isTileMap?0:p.height/2)+"px"}else d.style.left=parseFloat(d.style.left)+o+"px",d.style.top=parseFloat(d.style.top)+a+"px",d.style.transform="translate(-50%, -50%)"}}}},a.prototype.createTile=function(){var e=this.layersCollection[0];if(e.isBaseLayer&&("OSM"===e.layerType||"Bing"===e.layerType||"GoogleStaticMap"===e.layerType||"Google"===e.layerType||!t.isNullOrUndefined(e.urlTemplate)&&""!==e.urlTemplate)){Q(this.element.id+"_tile_parent"),Q(this.element.id+"_tiles"),Q("animated_tiles");var i=t.createElement("div",{id:this.element.id+"_tile_parent"});i.style.cssText="position: absolute; left: "+this.mapAreaRect.x+"px; right: "+this.margin.right+"px; top: "+(this.mapAreaRect.y+0)+"px; height: "+this.mapAreaRect.height+"px; width: "+this.mapAreaRect.width+"px; overflow: hidden;";var o=t.createElement("div",{id:this.element.id+"_tiles"});o.style.cssText="position: absolute; left: "+this.mapAreaRect.x+"px; right: "+this.margin.right+"px; top: "+(this.mapAreaRect.y+0)+"px; height: "+this.mapAreaRect.height+"px; width: "+this.mapAreaRect.width+"px; overflow: hidden;",this.element.appendChild(i),this.element.appendChild(o)}},a.prototype.initPrivateVariable=function(){if(""===this.element.id){var e=document.getElementsByClassName("e-maps").length;this.element.id="maps_control_"+e}this.renderer=new i.SvgRenderer(this.element.id),this.mapLayerPanel=new di(this)},a.prototype.findBaseAndSubLayers=function(){var e=this,i=this.baseLayerIndex,o=[],a=[];this.layersCollection=[],Array.prototype.forEach.call(this.layers,function(e){"Layer"===e.type?o.push(e):a.push(e)});for(var n=0;n<o.length;n++){var l=o[n];if(l.visible&&i===n){l.isBaseLayer=!0,this.isTileMap=!("Geometry"===l.layerType&&!t.isNullOrUndefined(l.shapeData)),this.layersCollection.push(l);break}if(n===o.length-1){this.layersCollection.push(o[0]);break}}a.map(function(t){t.visible&&e.layersCollection.push(t)})},a.prototype.renderBorder=function(){var e=this.border.width,i=this.svgObject.querySelector("#"+this.element.id+"_MapBorder");if((e>0||this.background||this.themeStyle.backgroundColor)&&t.isNullOrUndefined(i)){var o={opacity:t.isNullOrUndefined(this.border.opacity)?1:this.border.opacity,color:this.border.color,width:this.border.width},a=new Xe(this.element.id+"_MapBorder",this.background||this.themeStyle.backgroundColor,o,1,new et(e/2,e/2,this.availableSize.width-e,this.availableSize.height-e));this.svgObject.appendChild(this.renderer.drawRectangle(a))}else i.setAttribute("fill",this.background||this.themeStyle.backgroundColor)},a.prototype.renderTitle=function(e,i,o,a){var n,l={size:e.textStyle.size,color:e.textStyle.color,fontFamily:e.textStyle.fontFamily,fontWeight:e.textStyle.fontWeight,fontStyle:e.textStyle.fontStyle,opacity:e.textStyle.opacity},r=Math.abs(this.margin.left+this.margin.right-this.availableSize.width);if(l.fontFamily=t.isNullOrUndefined(l.fontFamily)?this.themeStyle.fontFamily:l.fontFamily,l.fontWeight=l.fontWeight||this.themeStyle.titleFontWeight,l.size="title"===i?l.size||this.themeStyle.titleFontSize:l.size||this.themeStyle.subTitleFontSize||Ue.mapsSubTitleFont.size,e.text){t.isNullOrUndefined(a)&&(a=this.renderer.createGroup({id:this.element.id+"_Title_Group"}));var s=Y(r,e.text,l),d=x(s,l),p=J(t.isNullOrUndefined(o)?new et(this.margin.left,this.margin.top,this.availableSize.width,this.availableSize.height):o,e.alignment,d,i),h=new He(this.element.id+"_Map_"+i,p.x,p.y,"start",s),m=new et(p.x,p.y,d.width,d.height),c=O(h,l,l.color||("title"===i?this.themeStyle.titleFontColor:this.themeStyle.subTitleFontColor),a);c.setAttribute("aria-label",this.description||e.text),c.setAttribute("role",""),("title"===i&&!e.subtitleSettings.text||"subtitle"===i)&&(n=Math.abs(m.y+this.margin.bottom-this.availableSize.height),this.mapAreaRect=new et(this.margin.left,m.y+10,r,n-10)),"subtitle"!==i&&e.subtitleSettings.text?this.renderTitle(e.subtitleSettings,"subtitle",m,a):this.svgObject.appendChild(a)}else n=Math.abs(this.margin.top+this.margin.bottom-this.availableSize.height),this.mapAreaRect=new et(this.margin.left,this.margin.top,r,n)},a.prototype.createSVG=function(){this.removeSvg(),r(this)},a.prototype.removeSvg=function(){if(Q(this.element.id+"_Secondary_Element"),Q(this.element.id+"_tile_parent"),Q(this.element.id+"_tiles"),this.svgObject){for(;this.svgObject.childNodes.length>0;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&t.remove(this.svgObject)}this.clearTemplate()},a.prototype.wireEVents=function(){t.EventHandler.add(this.element,"click",this.mapsOnClick,this),t.EventHandler.add(this.element,"contextmenu",this.mapsOnRightClick,this),t.EventHandler.add(this.element,"dblclick",this.mapsOnDoubleClick,this),t.EventHandler.add(this.element,t.Browser.touchStartEvent,this.mouseDownOnMap,this),t.EventHandler.add(this.element,t.Browser.touchMoveEvent,this.mouseMoveOnMap,this),t.EventHandler.add(this.element,t.Browser.touchEndEvent,this.mouseEndOnMap,this),t.EventHandler.add(this.element,"pointerleave mouseleave",this.mouseLeaveOnMap,this),t.EventHandler.add(this.element,"keydown",this.keyDownHandler,this),t.EventHandler.add(this.element,"keyup",this.keyUpHandler,this),this.resizeEvent=this.mapsOnResize.bind(this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeEvent)},a.prototype.unWireEVents=function(){t.EventHandler.remove(this.element,"click",this.mapsOnClick),t.EventHandler.remove(this.element,"contextmenu",this.mapsOnRightClick),t.EventHandler.remove(this.element,"dblclick",this.mapsOnDoubleClick),t.EventHandler.remove(this.element,t.Browser.touchStartEvent,this.mouseDownOnMap),t.EventHandler.remove(this.element,t.Browser.touchMoveEvent,this.mouseMoveOnMap),t.EventHandler.remove(this.element,t.Browser.touchEndEvent,this.mouseEndOnMap),t.EventHandler.remove(this.element,"pointerleave mouseleave",this.mouseLeaveOnMap),t.EventHandler.remove(this.element,"keydown",this.keyDownHandler),t.EventHandler.remove(this.element,"keyup",this.keyUpHandler),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeEvent)},a.prototype.mouseLeaveOnMap=function(e){document.getElementsByClassName("highlightMapStyle").length>0&&this.legendModule&&(this.legendModule.removeShapeHighlightCollection(),ue(document.getElementsByClassName("highlightMapStyle")[0]))},a.prototype.keyUpHandler=function(e){var t=e.target.id;this.isTileMap&&this.removeTileMap(),"Tab"===e.code&&t.indexOf("_LayerIndex_")>-1&&t.indexOf("shapeIndex")>-1?this.keyboardHighlightSelection(t,e.type):-1===t.indexOf("_LayerIndex_")&&-1===t.indexOf("shapeIndex")&&se("highlightMapStyle").length>0&&(ue(se("highlightMapStyle")[0]),this.legendSettings.visible&&this.legendModule&&this.legendModule.removeShapeHighlightCollection())},a.prototype.keyboardHighlightSelection=function(e,i){var o=parseInt(e.split("_LayerIndex_")[1].split("_")[0],10),a=parseInt(e.split("_shapeIndex_")[1].split("_")[0],10),n=this.layers[o].shapeData.features.length>a?this.layers[o].shapeData.features[a].properties:null,l=parseInt(e.split("_dataIndex_")[1].split("_")[0],10),r=t.isNullOrUndefined(l)?null:this.layers[o].dataSource[l];this.layers[o].selectionSettings.enable&&"keydown"===i&&this.selectionModule?(this.selectionModule.selectionsettings=this.layers[o].selectionSettings,this.selectionModule.selectionType="Shape",this.selectionModule.selectElement(event.target,o,r,n)):this.highlightModule&&this.layers[o].highlightSettings.enable&&"keyup"===i&&!event.target.classList.contains("ShapeselectionMapStyle")&&(this.highlightModule.highlightSettings=this.layers[o].highlightSettings,this.highlightModule.handleHighlight(event.target,o,r,n))},a.prototype.keyDownHandler=function(e){var i=this.zoomModule,o=e.target.id;if(("ArrowUp"===e.code||"ArrowDown"===e.code||"ArrowLeft"===e.code||"ArrowRight"===e.code)&&i){var a=document.getElementById(this.element.id+"_animated_tiles");this.isTileMap&&!t.isNullOrUndefined(a)&&(this.currentTiles=a.cloneNode(!0))}if(this.zoomSettings.enable&&i&&("+"===e.key||"Equal"===e.code))i.performZoomingByToolBar("zoomin");else if(this.zoomSettings.enable&&i&&("-"===e.key||"Minus"===e.code))i.performZoomingByToolBar("zoomout");else if(this.zoomSettings.enable&&i&&82===e.keyCode)i.performZoomingByToolBar("reset"),i.isPanning=!1;else if(this.zoomSettings.enable&&this.zoomSettings.enablePanning&&i&&("ArrowUp"===e.code||"ArrowDown"===e.code))e.preventDefault(),i.mouseDownLatLong.x=0,i.mouseMoveLatLong.y=this.mapAreaRect.height/7,i.panning("None",i.mouseDownLatLong.x,"ArrowUp"===e.code?-i.mouseMoveLatLong.y:i.mouseMoveLatLong.y,e),i.mouseDownLatLong.y=i.mouseMoveLatLong.y;else if(this.zoomSettings.enable&&this.zoomSettings.enablePanning&&i&&("ArrowLeft"===e.code||"ArrowRight"===e.code))e.preventDefault(),i.mouseDownLatLong.y=0,i.mouseMoveLatLong.x=this.mapAreaRect.width/7,i.panning("None","ArrowLeft"===e.code?-i.mouseMoveLatLong.x:i.mouseMoveLatLong.x,i.mouseDownLatLong.y,e),i.mouseDownLatLong.x=i.mouseMoveLatLong.x;else if("Enter"===e.code){if(o=e.target.id,e.preventDefault(),this.legendModule&&(o.indexOf("_Left_Page_Rect")>-1||o.indexOf("_Right_Page_Rect")>-1)){this.mapAreaRect=this.legendModule.initialMapAreaRect,this.legendModule.currentPage=o.indexOf("_Left_Page_")>-1?this.legendModule.currentPage-1:this.legendModule.currentPage+1,this.legendModule.legendGroup=this.renderer.createGroup({id:this.element.id+"_Legend_Group"}),this.legendModule.drawLegendItem(this.legendModule.currentPage);var n=document.getElementById(this.element.id+"_Paging_Text").textContent.split("/").map(Number);o.indexOf("_Left_Page_Rect")>-1?(1!==n[0]&&e.target.focus(),e.target.style.outlineColor=n[0]-1!==n[1]?"":"transparent"):o.indexOf("_Right_Page_Rect")>-1&&(n[0]!==n[1]&&e.target.focus(),e.target.style.outlineColor=n[0]!==n[1]+1?"":"transparent"),de(this.element.id+"_Legend_Border",this.element.id)&&(de(this.element.id+"_Legend_Border",this.element.id).style.pointerEvents="none")}o.indexOf("shapeIndex")>-1&&this.keyboardHighlightSelection(o,e.type)}this.zoomModule&&this.zoomModule.removeToolbarOpacity(this.isTileMap?Math.round(this.tileZoomLevel):this.mapScaleValue,this.mouseMoveId)},a.prototype.SelectedElement=function(e){var t=!1;return"ShapeselectionMapStyle"===e.getAttribute("class")&&(t=!0),t},a.prototype.mapsOnClick=function(e){var i=this,o=e.target,a=o.id,n=null,l=null;if(this.mouseClickEvent={x:e.x,y:e.y},-1===o.id.indexOf("_ToolBar")){var r=this.getClickLocation(a,e.pageX,e.pageY,o,e.layerX,e.layerY);t.isNullOrUndefined(r)||(n=r.latitude,l=r.longitude);var s={cancel:!1,name:Vt,target:a,x:e.clientX,y:e.clientY,latitude:n,longitude:l,isShapeSelected:this.SelectedElement(o)};this.onclick?(s.name="onclick",this.trigger("onclick",s,function(t){i.clickHandler(e,s,o)})):this.trigger("click",s,function(t){i.clickHandler(e,s,o)})}this.zoomModule&&(this.zoomModule.removeToolbarOpacity(this.isTileMap?Math.round(this.tileZoomLevel):this.mapScaleValue,a),this.isDevice&&this.zoomModule.removeToolbarClass("","","","",""))},a.prototype.clickHandler=function(e,t,i){i.id.indexOf("shapeIndex")>-1&&(this.mergeCluster(),ne(this.element.id+"_mapsTooltip")&&this.mapsTooltipModule.tooltipTargetID.indexOf("_MarkerIndex_")>-1&&Q(this.element.id+"_mapsTooltip")),this.markerModule&&this.markerModule.markerClusterClick(e),t.cancel||this.notify(Vt,i),t.cancel||-1===i.id.indexOf("shapeIndex")||this.triggerShapeSelection(i)},a.prototype.triggerShapeSelection=function(e){var i=parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10),o=re(e.id,this.layers[i].selectionSettings,this,"shapeSelected");o.cancel||!this.selectionModule||t.isNullOrUndefined(this.shapeSelected)?o.cancel&&this.selectionModule&&t.isNullOrUndefined(o.data)&&(ue(e),this.selectionModule.removedSelectionList(e)):me(this.selectionModule.selectionType+"selectionMap",this.selectionModule.selectionType+"selectionMapStyle",o)},a.prototype.getMarkerClickLocation=function(e,t,i,o,a,n){document.getElementById(this.element.id+"_svg").style.cursor="grabbing";var l=ne(a.targetId),r=this.getClickLocation(a.targetId,e,t,l,i,o),s=this.isTileMap?m(new $e(r.longitude,r.latitude),this.scale,this.tileTranslatePoint,!0):h(r.latitude,r.longitude,this.mapLayerPanel.currentFactor,this.layersCollection[a.layerIndex],this),d=this.translatePoint,p=this.isTileMap?s.x:(s.x+d.x)*this.scale,c=this.isTileMap?s.y:(s.y+d.y)*this.scale;if("Balloon"!==this.markerDragArgument.shape?l.setAttribute("transform","translate( "+p+" "+c+" )"):l.parentElement.setAttribute("transform","translate( "+p+" "+c+" )"),n){var u=this.layers[a.layerIndex].markerSettings[a.markerIndex];r=this.getClickLocation(a.targetId,e-u.offset.x,t-u.offset.y,l,i-u.offset.x,o-u.offset.y)}return r},a.prototype.getClickLocation=function(e,t,i,o,a,n){var l,r=0;if(-1===e.indexOf("_LayerIndex_")||this.isTileMap||parseInt(this.mouseDownEvent.x,10)!==parseInt(this.mouseClickEvent.x,10)||parseInt(this.mouseDownEvent.y,10)!==parseInt(this.mouseClickEvent.y,10))this.isTileMap&&parseInt(this.mouseDownEvent.x,10)===parseInt(this.mouseClickEvent.x,10)&&parseInt(this.mouseDownEvent.y,10)===parseInt(this.mouseClickEvent.y,10)&&(l=this.getTileGeoLocation(a,n));else if(r=parseFloat(e.split("_LayerIndex_")[1].split("_")[0]),"Normal"===this.layers[r].geometryType)if(e.indexOf("_shapeIndex_")>-1){var d=s(t,i,o.parentElement),p=Math.abs(-this.baseMapBounds.longitude.min*this.mapLayerPanel.currentFactor),h=Math.abs(this.baseMapBounds.latitude.max*this.mapLayerPanel.currentFactor);l={latitude:Math.abs(this.baseMapBounds.latitude.max-d.y/this.mapLayerPanel.currentFactor),longitude:Math.abs(d.x/this.mapLayerPanel.currentFactor+this.baseMapBounds.longitude.min)},this.baseMapBounds.longitude.min<0&&p>d.x&&(l.longitude=-l.longitude),this.baseMapBounds.latitude.min<0&&h>d.y&&(l.latitude=-l.latitude)}else if(e.indexOf("_MarkerIndex_")>-1&&this.markerModule&&!this.markerDragArgument){var m=parseInt(e.split("_MarkerIndex_")[1].split("_")[0],10),c=parseInt(e.split("_dataIndex_")[1].split("_")[0],10);if(isNaN(m)||isNaN(c))l={latitude:null,longitude:null};else{var u=this.layers[r].markerSettings[m].dataSource[c];l={latitude:u.latitude,longitude:u.longitude}}}else if(e.indexOf("_MarkerIndex_")>-1&&this.markerModule&&this.markerDragArgument){var g=document.getElementById(this.element.id+"_LayerIndex_"+this.markerDragArgument.layerIndex).getBoundingClientRect(),y=new $e(t>g.left?Math.abs(g.left-t):0,i>g.top?Math.abs(g.top-i):0);p=Math.abs(-this.baseMapBounds.longitude.min*this.mapLayerPanel.currentFactor),h=Math.abs(this.baseMapBounds.latitude.max*this.mapLayerPanel.currentFactor);l={latitude:Math.abs(this.baseMapBounds.latitude.max-y.y/(this.mapLayerPanel.currentFactor*this.scale)),longitude:Math.abs(y.x/(this.mapLayerPanel.currentFactor*this.scale)+this.baseMapBounds.longitude.min)},this.baseMapBounds.longitude.min<0&&p>y.x&&(l.longitude=-l.longitude),this.baseMapBounds.latitude.min<0&&h>y.y&&(l.latitude=-l.latitude)}else l={latitude:null,longitude:null};else l=this.getGeoLocation(r,a,n);return l},a.prototype.removeTileMap=function(){var e=document.getElementById(this.element.id+"_animated_tiles");if(!t.isNullOrUndefined(this.currentTiles)&&e.childElementCount<this.currentTiles.childElementCount)for(var i=e.childElementCount-1;i>=this.currentTiles.childElementCount;i--)e.removeChild(e.children[i]);this.currentTiles=null},a.prototype.mouseEndOnMap=function(e){var i,o,a,n=e.target,l=n.id,r=0,s=0;this.element.getBoundingClientRect(),e.target;if(-1!==e.type.indexOf("touch")?(this.isTouch=!0,r=i=(a=e).changedTouches[0].pageX,s=(o=a.changedTouches[0].pageY)-(this.isTileMap?10:0),a.target,this.mouseClickEvent={x:i,y:o}):(this.isTouch="touch"===e.pointerType,i=e.pageX,o=e.pageY,r=e.layerX,s=e.layerY-(this.isTileMap?10:0),e.target),this.isTileMap&&this.removeTileMap(),this.isTouch){if(-1===n.id.indexOf("_ToolBar")){var d=this.getClickLocation(l,i,o,n,i,o);t.isNullOrUndefined(d)||(d.latitude,d.longitude)}this.titleTooltip(e,i,o,!0),t.isNullOrUndefined(this.legendModule)||this.legendTooltip(e,e.pageX,e.pageY,!0)}if(this.notify(t.Browser.touchEndEvent,e),e.cancelable&&!this.isTouch&&e.preventDefault(),t.isNullOrUndefined(this.markerDragArgument))document.getElementById(this.element.id+"_svg").style.cursor="auto";else{var p=this.markerDragArgument;this.mouseClickEvent.x=this.mouseDownEvent.x,this.mouseClickEvent.y=this.mouseDownEvent.y;d=this.getMarkerClickLocation(i,o,r,s,this.markerDragArgument,!0);var h=this.layers[p.layerIndex].markerSettings[p.markerIndex];document.getElementById(this.element.id+"_svg").style.cursor=h.enableDrag?"pointer":"grabbing";var m={name:"markerDragEnd",x:i,y:o,latitude:d.latitude,longitude:d.longitude,layerIndex:p.layerIndex,markerIndex:p.markerIndex,dataIndex:p.dataIndex};if(t.isNullOrUndefined(h.latitudeValuePath)&&t.isNullOrUndefined(h.longitudeValuePath)){var c=h.dataSource[p.dataIndex];t.isNullOrUndefined(c.Longitude)||t.isNullOrUndefined(c.Latitude)?(h.dataSource[p.dataIndex].latitude=m.latitude,h.dataSource[p.dataIndex].longitude=m.longitude):(h.dataSource[p.dataIndex].Latitude=m.latitude,h.dataSource[p.dataIndex].Longitude=m.longitude)}else h.dataSource[p.dataIndex][h.latitudeValuePath]=m.latitude,h.dataSource[p.dataIndex][h.longitudeValuePath]=m.longitude;this.markerDragId="",this.markerDragArgument=null,this.trigger("markerDragEnd",m)}return this.zoomModule&&this.isDevice&&(this.zoomModule.removeToolbarOpacity(this.isTileMap?Math.round(this.tileZoomLevel):this.scale,this.element.id+"_Zooming_"),this.zoomModule.removeToolbarClass("","","","","")),!1},a.prototype.mouseDownOnMap=function(e){this.mouseDownEvent={x:e.x,y:e.y},-1!==e.type.indexOf("touch")&&e.changedTouches&&(this.mouseDownEvent={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}),this.isDevice&&!t.isNullOrUndefined(this.mapsTooltipModule)&&this.mapsTooltipModule.renderTooltip(e);this.element.getBoundingClientRect();var i=e.target;this.markerDragId=i.id;var o=document.getElementById(this.element.id+"_animated_tiles");if(this.isTileMap&&!t.isNullOrUndefined(o)&&(this.currentTiles=o.cloneNode(!0)),-1===i.id.indexOf("_ToolBar")){var a=this.markerModule;(i.id.indexOf("shapeIndex")>-1||i.id.indexOf("Tile")>-1)&&this.mergeCluster(),a&&(a.markerClick(e),a.markerClusterClick(e)),this.bubbleModule&&this.bubbleModule.bubbleClick(e)}this.notify(t.Browser.touchStartEvent,e)},a.prototype.mergeCluster=function(){this.markerModule&&this.markerModule.sameMarkerData.length>0&&(!this.zoomModule||this.zoomModule.isSingleClick)&&(N(this.markerModule.sameMarkerData,this,ne(this.element.id+"_Markers_Group")),this.markerModule.sameMarkerData=[])},a.prototype.mapsOnRightClick=function(e){var i=e.target,o=i.id,a=null,n=null;if(this.mouseClickEvent=this.mouseDownEvent={x:e.x,y:e.y},-1===i.id.indexOf("_ToolBar")){var l=this.getClickLocation(o,e.pageX,e.pageY,i,e.layerX,e.layerY);t.isNullOrUndefined(l)||(a=l.latitude,n=l.longitude);var r={cancel:!1,name:"rightClick",target:o,x:e.clientX,y:e.clientY,latitude:a,longitude:n,isShapeSelected:!1};this.trigger("rightClick",r)}},a.prototype.mapsOnDoubleClick=function(e){this.notify("dblclick",e);var t,i=e.target,o=i.id,a=0,n=null,l=null;if(-1===i.id.indexOf("_ToolBar")){-1===i.id.indexOf("_LayerIndex_")||this.isTileMap||this.mouseDownEvent.x!==e.clientX||this.mouseDownEvent.y!==e.clientY?this.isTileMap&&this.mouseDownEvent.x===e.clientX&&this.mouseDownEvent.y===e.clientY&&(n=(t=this.getTileGeoLocation(e.layerX,e.layerY)).latitude,l=t.longitude):(a=parseFloat(i.id.split("_LayerIndex_")[1].split("_")[0]),n=(t=this.getGeoLocation(a,e.layerX,e.layerY)).latitude,l=t.longitude);var r={cancel:!1,name:"doubleClick",x:e.clientX,y:e.clientY,target:o,latitude:n,longitude:l,isShapeSelected:null};this.trigger("doubleClick",r)}},a.prototype.mouseMoveOnMap=function(e){var i;i="touchmove"===e.type?e.target:i=e.target,this.markerModule&&(this.markerModule.markerMove(e),this.markerModule.markerClusterMouseMove(e)),this.bubbleModule&&this.bubbleModule.bubbleMove(e),-1==i.id.indexOf("MarkerIndex")&&(document.getElementById(this.element.id+"_svg").style.cursor="auto"),this.onMouseMove(e),this.notify(t.Browser.touchMoveEvent,e)},a.prototype.onMouseMove=function(e){var i=e.target;this.mouseMoveId=i.id;var o,a,n=null,l=0,r=0;if(-1==e.type.indexOf("touch")?(o=e.pageX,a=e.pageY,l=e.layerX,r=e.layerY-(this.isTileMap?10:0),this.titleTooltip(e,e.pageX,e.pageY),t.isNullOrUndefined(this.legendModule)||this.legendTooltip(e,e.pageX,e.pageY,!0)):(l=o=(n=e.touches)[0].clientX,r=a=n[0].clientY-(this.isTileMap?10:0)),!t.isNullOrUndefined(this.markerDragArgument)){var s=this.markerDragArgument;this.mouseClickEvent.x=this.mouseDownEvent.x,this.mouseClickEvent.y=this.mouseDownEvent.y,this.getMarkerClickLocation(o,a,l,r,s,!1)}return this.zoomModule&&this.zoomModule.removeToolbarOpacity(this.isTileMap?Math.round(this.tileZoomLevel):this.scale,e.target.id),!1},a.prototype.legendTooltip=function(e,t,i,o){var a,n,l=e.target.id,r=this.legendModule.currentPage,s=e.target.id.split("_Index_")[1];r=this.legendModule.totalPages.length<=this.legendModule.currentPage?this.legendModule.totalPages.length-1:this.legendModule.currentPage<0?0:this.legendModule.currentPage;for(var d=0!==this.legendModule.totalPages.length?this.legendModule.totalPages[r].Collection.length:this.legendModule.totalPages.length,p=0;p<d;p++)a=(n=this.legendModule.totalPages[r].Collection[p]).DisplayText,l=e.target.id,s=e.target.id.split("_Index_")[1],l===this.element.id+"_Legend_Text_Index_"+s&&e.target.textContent.indexOf("...")>-1&&n.idIndex===parseInt(s,10)&&fe(a,this.legendSettings.textStyle.size,t,i,this.element.offsetWidth,this.element.offsetHeight,this.element.id+"_EJ2_Legend_Text_Tooltip",ne(this.element.id+"_Secondary_Element"),o);l!==this.element.id+"_Legend_Text_Index_"+s&&Q(this.element.id+"_EJ2_Legend_Text_Tooltip")},a.prototype.titleTooltip=function(e,t,i,o){var a=e.target.id;a===this.element.id+"_LegendTitle"&&e.target.textContent.indexOf("...")>-1?fe(this.legendSettings.title.text,this.legendSettings.titleStyle.size,t,i,this.element.offsetWidth,this.element.offsetHeight,this.element.id+"_EJ2_LegendTitle_Tooltip",ne(this.element.id+"_Secondary_Element"),o):Q(this.element.id+"_EJ2_LegendTitle_Tooltip"),a===this.element.id+"_Map_title"&&e.target.textContent.indexOf("...")>-1?fe(this.titleSettings.text,this.titleSettings.textStyle.size||this.themeStyle.titleFontSize,t,i,this.element.offsetWidth,this.element.offsetHeight,this.element.id+"_EJ2_Title_Tooltip",ne(this.element.id+"_Secondary_Element"),o):Q(this.element.id+"_EJ2_Title_Tooltip")},a.prototype.mapsOnResize=function(e){var i=this;if(!this.isDestroyed&&!this.isExportInitialTileMap){this.isResize=this.isReset=!0;var o={cancel:!1,name:"resize",previousSize:this.availableSize,currentSize:l(this),maps:this};this.trigger("resize",o),o.cancel||(this.resizeTo&&clearTimeout(this.resizeTo),!t.isNullOrUndefined(this.element)&&this.element.classList.contains("e-maps")&&(this.resizeTo=setTimeout(function(){i.unWireEVents(),i.createSVG(),i.refreshing=!0,i.wireEVents(),i.render(),i.refreshing=!1},500)))}return!1},a.prototype.zoomByPosition=function(e,i){if(!this.isDestroyed){this.zoomNotApplied=!1;var o=this.zoomSettings.zoomFactor===i;!this.isTileMap&&this.zoomModule?t.isNullOrUndefined(e)?(this.zoomSettings.zoomFactor=i,this.isZoomByPosition=!0,this.mapScaleValue=null):(this.zoomSettings.zoomFactor=i,o=this.centerPosition.latitude===e.latitude&&this.centerPosition.longitude===e.longitude||o,this.centerPosition=e,this.isZoomByPosition=!0,this.mapScaleValue=null):this.zoomModule&&(this.tileZoomLevel=this.zoomSettings.zoomFactor=i,o=this.centerPosition.latitude===e.latitude&&this.centerPosition.longitude===e.longitude||o,this.centerPosition=e,this.isZoomByPosition=!0),o&&this.refresh()}},a.prototype.panByDirection=function(e,t){if(!this.isDestroyed){var i=0,o=0;switch(e){case"Left":i=-this.mapAreaRect.width/7;break;case"Right":i=this.mapAreaRect.width/7;break;case"Top":o=-this.mapAreaRect.height/7;break;case"Bottom":o=this.mapAreaRect.height/7}this.zoomModule&&this.zoomModule.panning(e,i,o,t)}},a.prototype.addLayer=function(e){if(!this.isDestroyed){var t=this.layers;t.push(e),this.isAddLayer=!0,this.layers=t}},a.prototype.removeLayer=function(e){if(!this.isDestroyed){var t=this.layers;t.splice(e,1),this.layers=t}},a.prototype.addMarker=function(e,t){if(!this.isDestroyed){var i=document.getElementById(this.element.id+"_LayerIndex_"+e);if(t.length>0&&i){for(var o=0,a=t;o<a.length;o++){var n=a[o];this.layersCollection[e].markerSettings.push(new Ut(this,"markerSettings",n))}new Dt(this).markerRender(this,i,e,this.mapLayerPanel.currentFactor,"AddMarker"),this.arrangeTemplate()}}},a.prototype.shapeSelection=function(e,i,o,a){if(!this.isDestroyed){var n=void 0,l=void 0,r=Array.isArray(i)?i:Array(i);t.isNullOrUndefined(a)&&(a=!0);var s=this.layers[e].selectionSettings;if(!s.enableMultiSelect&&this.legendSelection&&a&&this.removeShapeSelection(),"SubLayer"===this.layers[e].type)for(var d=0;d<this.layersCollection.length;d++)if(this.layersCollection[d].shapeData===this.layers[e].shapeData){l=d;break}if(s.enable){var p=void 0,h=void 0,m=void 0,c=void 0,u=void 0,g=void 0,y=this.layers[e].shapeData.features;for(d=0;d<y.length;d++)for(var f=0;f<r.length;f++){var b=void 0;if((!t.isNullOrUndefined(y[d].properties[r[f]])&&isNaN(y[d].properties[r[f]])?y[d].properties[r[f]].toLowerCase():y[d].properties[r[f]])===(t.isNullOrUndefined(o)||"string"!=typeof o?o:o.toLowerCase())){t.isNullOrUndefined(this.layers[e].shapeSettings.colorValuePath)||(b=V(this.layers[e].dataSource,y[d].properties,this.layers[e].shapeDataPath,this.layers[e].shapePropertyPath,this.layers[e]));var v=this.layers[e];if(this.baseLayerIndex>=0&&v.isBaseLayer?c=0:"SubLayer"===this.layers[e].type&&(c=l),p=this.element.id+"_LayerIndex_"+c+"_shapeIndex_"+d+"_dataIndex_"+b,n=ne(p),t.isNullOrUndefined(b)&&t.isNullOrUndefined(n)&&(n=ne(p=this.element.id+"_LayerIndex_"+e+"_shapeIndex_"+d+"_dataIndex_null")),m=parseInt(n.id.split("_shapeIndex_")[1].split("_")[0],10),u=this.layers[e].shapeData.features.length>m?this.layers[e].shapeData.features[m].properties:null,h=parseInt(n.id.split("_dataIndex_")[1].split("_")[0],10),g=t.isNullOrUndefined(h)?null:this.layers[e].dataSource[h],a){ce(s,this,n,u,g),this.shapeSelectionClass=ne("ShapeselectionMap"),this.legendSettings.visible&&-1===n.id.indexOf("_MarkerIndex_")&&this.legendModule.shapeHighLightAndSelection(n,g,s,"selection",e);if((!this.legendSettings.visible||this.legendModule.shapeToggled)&&(n.setAttribute("class","ShapeselectionMapStyle"),-1===this.selectedElementId.indexOf(n.getAttribute("id"))&&this.selectedElementId.push(n.getAttribute("id")),!s.enableMultiSelect))return}else{this.legendSelection=!s.enableMultiSelect&&!this.legendSelection||this.legendSelection,this.legendSettings.visible&&-1===n.id.indexOf("_MarkerIndex_")&&"ShapeselectionMapStyle"===n.getAttribute("class")&&this.legendModule.shapeHighLightAndSelection(n,g,s,"selection",e);if(!this.legendSettings.visible||this.legendModule.shapeToggled){ue(n);var S=this.selectedElementId.indexOf(n.getAttribute("id"));-1!==S&&(this.selectedElementId.splice(S,1),!s.enableMultiSelect&&this.legendSelection&&this.selectedElementId.length>0&&this.removeShapeSelection())}}}}}}},a.prototype.zoomToCoordinates=function(e,i,o,a){var n,l;if(!this.isDestroyed){var r=void 0,s=void 0,d=!1;this.centerPosition={latitude:null,longitude:null},this.isZoomByPosition=!1,(t.isNullOrUndefined(o)&&t.isNullOrUndefined(a)||t.isNullOrUndefined(e)&&t.isNullOrUndefined(i))&&(e=t.isNullOrUndefined(e)?0:e,i=t.isNullOrUndefined(e)?0:i,o=t.isNullOrUndefined(o)?e:o,a=t.isNullOrUndefined(a)?i:a,d=!0),e>o&&(e=(n=[o,e])[0],o=n[1]),i>a&&(i=(l=[a,i])[0],a=l[1]),d?(r=e+o,s=i+a):(r=(e+o)/2,s=(i+a)/2),this.centerLatOfGivenLocation=r,this.centerLongOfGivenLocation=s,this.minLatOfGivenLocation=e,this.minLongOfGivenLocation=i,this.maxLatOfGivenLocation=o,this.maxLongOfGivenLocation=a,this.zoomNotApplied=!0,this.scaleOfGivenLocation=Ae(e,o,i,a,this.mapAreaRect.width,this.mapAreaRect.height,this,!0);var p={cancel:!1,name:"zoom",type:"zoomIn",maps:this,tileTranslatePoint:{},translatePoint:{},tileZoomLevel:this.isTileMap?{previous:this.tileZoomLevel,current:this.scaleOfGivenLocation}:{},scale:this.isTileMap?{previous:this.tileZoomLevel,current:this.scaleOfGivenLocation}:{previous:this.scale,current:this.scaleOfGivenLocation}};this.trigger("zoom",p),this.refresh()}},a.prototype.removeShapeSelection=function(){for(var e=this.selectedElementId.length,t=0;t<e;t++)ue(ie(this.selectedElementId[0])),this.selectedElementId.splice(0,1);if(this.legendSettings.visible){var i=this.legendSelectionCollection.length;for(t=0;t<i;t++)ue(ie(this.legendSelectionCollection[t].legendElement.id)),this.selectedLegendElementId.splice(0,1)}this.shapeSelectionItem=[],this.legendSelectionCollection=[]},a.prototype.setCulture=function(){this.intl=new t.Internationalization,this.setLocaleConstants(),this.localeObject=new t.L10n(this.getModuleName(),this.defaultLocalConstants,this.locale)},a.prototype.setLocaleConstants=function(){this.defaultLocalConstants={ZoomIn:"Zoom in",Zoom:"Zoom",ZoomOut:"Zoom out",Pan:"Pan",Reset:"Reset",ImageNotFound:"Image Not Found"}},a.prototype.destroy=function(){this.unWireEVents(),t.isNullOrUndefined(this.mapsTooltipModule)||this.mapsTooltipModule.removeEventListener(),e.prototype.destroy.call(this),this.shapeSelectionItem=[],this.toggledShapeElementId=[],this.toggledLegendId=[],this.legendSelectionCollection=[],this.selectedLegendElementId=[],this.selectedNavigationElementId=[],this.selectedBubbleElementId=[],this.selectedMarkerElementId=[],this.selectedElementId=[],this.dataLabelShape=[],this.zoomShapeCollection=[],this.zoomLabelPositions=[],this.mouseDownEvent={x:null,y:null},this.mouseClickEvent={x:null,y:null},this.formatFunction=null,this.availableSize=new Re(0,0),document.getElementById("mapsmeasuretext")&&document.getElementById("mapsmeasuretext").remove(),this.removeSvg()},a.prototype.getModuleName=function(){return"maps"},a.prototype.getPersistData=function(){return this.addOnPersist(["translatePoint","zoomSettings","mapScaleValue","tileTranslatePoint","baseTranslatePoint","scale","zoomPersistence","defaultState","markerZoomedState","initialCheck","initialZoomLevel","initialTileTranslate","applyZoomReset","markerZoomFactor"])},a.prototype.onPropertyChanged=function(i,o){if(!this.isDestroyed){var a=!1,n=!1,l=!1,r=!1;if(i.layers){var s=Object.keys(i.layers).length;document.getElementById(this.element.id+"_LayerIndex_"+(s-1))}for(var d=0,p=Object.keys(i);d<p.length;d++){var h=p[d];switch(h){case"background":this.renderBorder();break;case"height":case"width":case"layers":case"projectionType":case"centerPosition":case"legendSettings":case"baseLayerIndex":if("layers"===h){l=!0;for(var m=Object.keys(i.layers).length,c=0;c<m;c++)if(!t.isNullOrUndefined(i.layers[c]))for(var u=0,g=Object.keys(i.layers[c]);u<g.length;u++){var y=g[u];"layerType"===y&&"Geometry"!==i.layers[c].layerType||t.isNullOrUndefined(this.layers[c].shapeData)&&!t.isNullOrUndefined(this.layers[c].urlTemplate)&&""!==this.layers[c].urlTemplate?this.isReset=!0:"markerSettings"===y?n=!0:"staticMapType"===y&&(r=!0)}}a=!0;break;case"zoomSettings":t.isNullOrUndefined(o.zoomSettings)||(i.zoomSettings.zoomFactor===o.zoomSettings.zoomFactor||l?i.zoomSettings.shouldZoomInitially!==o.zoomSettings.shouldZoomInitially?(this.zoomSettings.zoomFactor=1,a=!0):i.zoomSettings.enable!==o.zoomSettings.enable?(this.zoomSettings.zoomFactor=1,a=!0):a=!0:a=!1);break;case"locale":case"currencyCode":e.prototype.refresh.call(this)}}a&&(i.layers&&n?(Q(this.element.id+"_Markers_Group"),this.isTileMap?this.mapLayerPanel.renderTileLayer(this.mapLayerPanel,this.layers.currentFactor,this.layers.length-1):this.render()):i.layers&&r?this.mapLayerPanel.renderGoogleMap(this.layers[this.layers.length-1].key,this.staticMapZoom):(this.createSVG(),this.renderElements()))}},a.prototype.requiredModules=function(){var e=[],t=this.findVisibleLayers(this.layers),i=!1;return this.annotations.map(function(e){i=null!=e.content}),this.isBubbleVisible()&&e.push({member:"Bubble",args:[this]}),t.highlight&&e.push({member:"Highlight",args:[this]}),t.selection&&e.push({member:"Selection",args:[this]}),this.legendSettings.visible&&e.push({member:"Legend",args:[this]}),(this.zoomSettings.enable||this.zoomSettings.zoomFactor>this.zoomSettings.minZoom)&&e.push({member:"Zoom",args:[this]}),this.isMarkersVisible()&&e.push({member:"Marker",args:[this]}),this.isDataLabelVisible()&&e.push({member:"DataLabel",args:[this]}),this.isNavigationVisible()&&e.push({member:"NavigationLine",args:[this]}),t.tooltip&&e.push({member:"MapsTooltip",args:[this]}),i&&e.push({member:"Annotations",args:[this,pi]}),this.allowPrint&&e.push({member:"Print",args:[this]}),this.allowImageExport&&e.push({member:"ImageExport",args:[this]}),this.allowPdfExport&&e.push({member:"PdfExport",args:[this]}),e},a.prototype.isMarkersVisible=function(){var e=!1;return Array.prototype.forEach.call(this.layers,function(t){for(var i=0;i<t.markerSettings.length;i++)if(t.markerSettings[i].visible){e=!0;break}}),e},a.prototype.isDataLabelVisible=function(){for(var e=!1,t=0;t<this.layers.length;t++)if(this.layers[t].dataLabelSettings.visible){e=!0;break}return e},a.prototype.isNavigationVisible=function(){var e=!1;return Array.prototype.forEach.call(this.layers,function(t){for(var i=0;i<t.navigationLineSettings.length;i++)if(t.navigationLineSettings[i].visible){e=!0;break}}),e},a.prototype.isBubbleVisible=function(){for(var e=!1,t=0,i=this.layers;t<i.length;t++){var o=i[t];if(this.getBubbleVisible(o)){e=!0;break}}return e},a.prototype.getBubbleVisible=function(e){for(var t=!1,i=0,o=e.bubbleSettings;i<o.length;i++){if(o[i].visible){t=!0;break}}return t},a.prototype.print=function(e){this.allowPrint&&this.printModule&&!this.isDestroyed&&this.printModule.print(this,e)},a.prototype.export=function(e,i,o,a){var n=this;if(!this.isDestroyed){if(t.isNullOrUndefined(a)&&(a=!0),"PDF"!==e&&this.allowImageExport&&this.imageExportModule)return new Promise(function(t,o){t(n.imageExportModule.export(n,e,i,a))});if(this.allowPdfExport&&this.pdfExportModule)return new Promise(function(t,l){t(n.pdfExportModule.export(n,e,i,a,o))})}return null},a.prototype.getBingUrlTemplate=function(e){var i;return this.isDestroyed||(i=new Promise(function(i,o){var a=new t.Fetch({url:e});a.onSuccess=function(e){var t=e.resourceSets[0].resources[0];i(t.imageUrl)},a.send()})),i},a.prototype.findVisibleLayers=function(e,t,i,o,a,n){void 0===t&&(t=!1),void 0===i&&(i=!1),void 0===o&&(o=!1),void 0===a&&(a=!1),void 0===n&&(n=!1);for(var l,r,s=0,d=e;s<d.length;s++){var p=d[s];if(t=p.visible||t,p.visible){l=p.bubbleSettings,r=p.markerSettings;for(var h=0,m=p.navigationLineSettings;h<m.length;h++){var c=m[h];c.visible&&(a=c.highlightSettings.enable||a,n=c.selectionSettings.enable||n)}for(var u=0,g=r;u<g.length;u++){var y=g[u];if(y.visible&&(o=y.tooltipSettings.visible||o,a=y.selectionSettings.enable||a,n=y.highlightSettings.enable||n),o)break}for(var f=0,b=l;f<b.length;f++){var v=b[f];if(v.visible&&(o=v.tooltipSettings.visible||o,a=v.selectionSettings.enable||a,n=v.highlightSettings.enable||n),o)break}o=p.tooltipSettings.visible||o,a=p.selectionSettings.enable||a,n=p.highlightSettings.enable||n}if(t&&i&&o)break}return{layer:t,bubble:i,tooltip:o,selection:a,highlight:n}},a.prototype.getGeoLocation=function(e,i,o){var a=0,n=0;if(!this.isDestroyed){var l=document.getElementById(this.element.id),r=i-(t.isNullOrUndefined(this.markerDragArgument)?l.offsetLeft:0),s=o-(t.isNullOrUndefined(this.markerDragArgument)?l.offsetTop:0),d=$(this,this.layersCollection[e],!1).location,p=d.x*this.scale,h=d.y*this.scale,m=Math.min(this.mapAreaRect.height,this.mapAreaRect.width)*this.mapLayerPanel.currentFactor*this.scale,c=this.clip(r-p,0,m-1)/m-.5,u=.5-this.clip(s-h,0,m-1)/m;a=90-360*Math.atan(Math.exp(2*-u*Math.PI))/Math.PI,n=360*c}return{latitude:a,longitude:n}},a.prototype.clip=function(e,t,i){return Math.min(Math.max(e,t),i)},a.prototype.getTileGeoLocation=function(e,i){var o=0,a=0;if(!this.isDestroyed){var n=document.getElementById(this.element.id),l=document.getElementById(this.element.id+"_tile_parent"),r=this.pointToLatLong(e+this.mapAreaRect.x-(l.offsetLeft-(t.isNullOrUndefined(this.markerDragArgument)?n.offsetLeft:0)),i+this.mapAreaRect.y-(l.offsetTop-(t.isNullOrUndefined(this.markerDragArgument)?n.offsetTop:0)));o=r.latitude,a=r.longitude}return{latitude:o,longitude:a}},a.prototype.pointToLatLong=function(e,t){var i=0,o=0;if(!this.isDestroyed){t+="GoogleStaticMap"===this.layers[this.layers.length-1].layerType?0:10;var a=256*Math.pow(2,this.tileZoomLevel),n=this.clip(e-this.translatePoint.x*this.scale,0,a-1)/a-.5,l=.5-this.clip(t-this.translatePoint.y*this.scale,0,a-1)/a;i=90-360*Math.atan(Math.exp(2*-l*Math.PI))/Math.PI,o=360*n}return{latitude:i,longitude:o}},mi([t.Property(null)],a.prototype,"background",void 0),mi([t.Property(!1)],a.prototype,"useGroupingSeparator",void 0),mi([t.Property(null)],a.prototype,"format",void 0),mi([t.Property(null)],a.prototype,"width",void 0),mi([t.Property(null)],a.prototype,"height",void 0),mi([t.Property("MouseMove")],a.prototype,"tooltipDisplayMode",void 0),mi([t.Property(!1)],a.prototype,"allowPrint",void 0),mi([t.Property(!1)],a.prototype,"allowImageExport",void 0),mi([t.Property(!1)],a.prototype,"allowPdfExport",void 0),mi([t.Complex({},kt)],a.prototype,"titleSettings",void 0),mi([t.Complex({},Nt)],a.prototype,"zoomSettings",void 0),mi([t.Complex({},Et)],a.prototype,"legendSettings",void 0),mi([t.Collection([],jt)],a.prototype,"layers",void 0),mi([t.Collection([],dt)],a.prototype,"annotations",void 0),mi([t.Complex({},bt)],a.prototype,"margin",void 0),mi([t.Complex({color:"#DDDDDD",width:0},gt)],a.prototype,"border",void 0),mi([t.Property("Material")],a.prototype,"theme",void 0),mi([t.Property("Mercator")],a.prototype,"projectionType",void 0),mi([t.Property(0)],a.prototype,"baseLayerIndex",void 0),mi([t.Property(null)],a.prototype,"description",void 0),mi([t.Property(1)],a.prototype,"tabIndex",void 0),mi([t.Complex({latitude:null,longitude:null},yt)],a.prototype,"centerPosition",void 0),mi([t.Complex({},Zt)],a.prototype,"mapsArea",void 0),mi([t.Event()],a.prototype,"load",void 0),mi([t.Event()],a.prototype,"beforePrint",void 0),mi([t.Event()],a.prototype,"loaded",void 0),mi([t.Event()],a.prototype,"click",void 0),mi([t.Event()],a.prototype,"onclick",void 0),mi([t.Event()],a.prototype,"doubleClick",void 0),mi([t.Event()],a.prototype,"rightClick",void 0),mi([t.Event()],a.prototype,"resize",void 0),mi([t.Event()],a.prototype,"tooltipRender",void 0),mi([t.Event()],a.prototype,"legendRendering",void 0),mi([t.Event()],a.prototype,"tooltipRenderComplete",void 0),mi([t.Event()],a.prototype,"shapeSelected",void 0),mi([t.Event()],a.prototype,"itemSelection",void 0),mi([t.Event()],a.prototype,"itemHighlight",void 0),mi([t.Event()],a.prototype,"shapeHighlight",void 0),mi([t.Event()],a.prototype,"layerRendering",void 0),mi([t.Event()],a.prototype,"shapeRendering",void 0),mi([t.Event()],a.prototype,"markerRendering",void 0),mi([t.Event()],a.prototype,"markerClusterRendering",void 0),mi([t.Event()],a.prototype,"markerClick",void 0),mi([t.Event()],a.prototype,"markerDragStart",void 0),mi([t.Event()],a.prototype,"markerDragEnd",void 0),mi([t.Event()],a.prototype,"markerClusterClick",void 0),mi([t.Event()],a.prototype,"markerClusterMouseMove",void 0),mi([t.Event()],a.prototype,"markerMouseMove",void 0),mi([t.Event()],a.prototype,"dataLabelRendering",void 0),mi([t.Event()],a.prototype,"bubbleRendering",void 0),mi([t.Event()],a.prototype,"bubbleClick",void 0),mi([t.Event()],a.prototype,"bubbleMouseMove",void 0),mi([t.Event()],a.prototype,"animationComplete",void 0),mi([t.Event()],a.prototype,"annotationRendering",void 0),mi([t.Event()],a.prototype,"zoom",void 0),mi([t.Event()],a.prototype,"pan",void 0),a=mi([t.NotifyPropertyChanges],a)}(t.Component),ui=function(){function e(e){this.id="",this.maps=e,this.bubbleCollection=[]}return e.prototype.renderBubble=function(e,i,o,a,n,l,r,s,d,p){var h,m,c=this,u=s.layerData,g=e.colorValuePath,y=t.isNullOrUndefined(g)?i[g]:g.indexOf(".")>-1?w(i,e.colorValuePath):i[g],f=t.isNullOrUndefined(g)?Number(i[g]):g.indexOf(".")>-1?Number(w(i,e.colorValuePath)):Number(i[g]),b=t.isNullOrUndefined(e.valuePath)?Number(i[e.valuePath]):e.valuePath.indexOf(".")>-1?Number(w(i,e.valuePath)):Number(i[e.valuePath]);if(isNaN(b)&&isNaN(f)&&t.isNullOrUndefined(y))return null;var v=W(e.minRadius,e.maxRadius,b,a.min,a.max),S=new si(this.maps).getColorByValue(e.colorMapping,f,y);m="[object Object]"!==Object.prototype.toString.call(S)||t.isNullOrUndefined(S.fill)?o:S.fill,h="[object Object]"!==Object.prototype.toString.call(S)||t.isNullOrUndefined(S.opacity)?e.opacity:S.opacity;var x=[[]];this.maps.translateType="bubble";for(var O=0,C=0,_=0,M=0,L=u.length;M<L;M++){var P=u[M];P=P.property;var T=H(i[s.shapeDataPath],s.shapePropertyPath,P);if((!t.isNullOrUndefined(i[s.shapeDataPath])&&isNaN(i[s.shapeDataPath])?i[s.shapeDataPath].toLowerCase():i[s.shapeDataPath])===(!t.isNullOrUndefined(P[T])&&isNaN(P[T])?P[T].toLowerCase():P[T])&&"LineString"!==u[M].type&&"MultiLineString"!==u[M].type&&"Point"!==u[M].type&&"MultiPoint"!==u[M].type)if(u[M]._isMultiPolygon)for(var I=u[M],k=0;k<I.length;k++)x.push(this.getPoints(I[k],[])),C<(_=x[x.length-1].length)&&(C=_,O=x.length-1);else x.push(this.getPoints(u[M],[])),C<(_=x[x.length-1].length)&&(C=_,O=x.length-1)}var N,F,E=this.maps.projectionType,z={color:e.border.color,opacity:e.border.opacity,width:e.border.width},B=X(x[O],E,s.geometryType);if(e.visible){if(t.isNullOrUndefined(B)){var U=x.length-1;if(!x[U].x||!x[U].y)return;F={cancel:!1,name:ei,border:z,cx:x[U].x,cy:x[U].y,data:i,fill:m,maps:this.maps,radius:v}}else N="Mercator"===this.maps.projectionType?B.y:-B.y,F={cancel:!1,name:ei,border:z,cx:B.x,cy:N,data:i,fill:m,maps:this.maps,radius:v};this.maps.trigger("bubbleRendering",F,function(i){if(!F.cancel){var o;if(F.border.opacity=t.isNullOrUndefined(F.border.opacity)?h:F.border.opacity,"Circle"===e.bubbleType){var a=new qe(p,F.fill,F.border,h,0,0,F.radius,null);o=j(c.maps,a,d)}else{var m="Mercator"===c.maps.projectionType?F.cy-v:F.cy+v,u=new Xe(p,F.fill,F.border,h,new et(0,0,2*v,2*v),2,2);F.cx-=v,F.cy=m,o=R(c.maps,u,d)}A(c.maps.selectedBubbleElementId,c.maps.bubbleSelectionClass,o,"BubbleselectionMapStyle"),c.bubbleCollection.push({LayerIndex:r,BubbleIndex:n,DataIndex:l,element:o,center:{x:F.cx,y:F.cy}});var g,y=0!==s.animationDuration||"Enable"===t.animationMode||t.isNullOrUndefined(c.maps.zoomModule);g=c.maps.zoomSettings.zoomFactor>1&&!t.isNullOrUndefined(c.maps.zoomModule)&&!c.maps.isTileMap?ee(c.maps,s,y):$(c.maps,s,y);var f=e.dataSource,b=g.scale,S=g.location,x=new $e(c.maps.isTileMap?(F.cx+c.maps.translatePoint.x)*c.maps.tileZoomLevel:(F.cx+S.x)*b,c.maps.isTileMap?(F.cy+c.maps.translatePoint.y)*c.maps.tileZoomLevel:(F.cy+S.y)*b);o.setAttribute("transform","translate( "+x.x+" "+x.y+" )");var O=f.length-1===l?"bubble":null;"Square"===e.bubbleType?(x.x+=v,x.y+=v*("Mercator"===c.maps.projectionType?1:-1)):v=0,(e.animationDuration>0||"Enable"===t.animationMode)&&ge(o,e.animationDelay,e.animationDuration,x,c.maps,O,v)}})}},e.prototype.getPoints=function(e,i){return t.isNullOrUndefined(e.map)?i=e.point:e.map(function(e){i.push(new Ze(e.point.x,e.point.y))}),i},e.prototype.bubbleClick=function(e){var i=e.target.id;if(-1!==i.indexOf("_LayerIndex_")){var o=this.getbubble(i);if(!t.isNullOrUndefined(o)){var a={cancel:!1,name:ti,data:o,maps:this.maps,target:i,x:e.clientX,y:e.clientY};this.maps.trigger(ti,a)}}},e.prototype.getbubble=function(e){var t=e.split("_LayerIndex_"),i=parseInt(t[1].split("_")[0],10),o=this.maps.layers[i];if(e.indexOf("_BubbleIndex_")>-1){var a=parseInt(t[1].split("_BubbleIndex_")[1],10),n=parseInt(t[1].split("_BubbleIndex_")[1].split("_dataIndex_")[1],10);if(!isNaN(a))return o.bubbleSettings[a].dataSource[n]}return null},e.prototype.bubbleMove=function(e){var i=e.target.id;if(-1!==i.indexOf("_LayerIndex_")){var o=this.getbubble(i);if(!t.isNullOrUndefined(o)){var a={cancel:!1,name:ii,data:o,maps:this.maps,target:i,x:e.clientX,y:e.clientY};this.maps.trigger(ii,a)}}},e.prototype.getModuleName=function(){return"Bubble"},e.prototype.destroy=function(){this.bubbleCollection=[]},e}(),gi=function(){function e(e){this.value={rightWidth:0,leftWidth:0,heightTop:0,heightBottom:0},this.maps=e,this.dataLabelCollections=[]}return e.prototype.getDataLabel=function(e,i,o,a){for(var n,l,r=0;r<e.length;r++){var s=e[r],d=!t.isNullOrUndefined(s[a])&&isNaN(s[a])&&"string"==typeof s[a]?s[a].toLowerCase():s[a];if(o=t.isNullOrUndefined(o)||"string"!=typeof o?o:o.toString(),l=t.isNullOrUndefined(o)||"string"!=typeof o?o:o.toLowerCase(),d===l){n=s;break}}return n},e.prototype.renderLabel=function(e,i,o,a,n,l,r,s){var d,p,h,m,c,u,g,y,f,b=this,v=e.dataLabelSettings,S=e.dataLabelSettings.textStyle,C=e.dataLabelSettings,_=e.dataLabelSettings.labelPath,M=[[]],P=0,w=0,T=o,I="",k=0,N=!1,F=o.properties,E=this.maps.element.id+"_LayerIndex_"+i+"_shapeIndex_"+r+"_LabelIndex_"+r,z=new Ze(0,0),A=a[r];S.fontFamily="material"!==this.maps.theme.toLowerCase()?this.maps.themeStyle.labelFontFamily:S.fontFamily,S.fontWeight=S.fontWeight||this.maps.themeStyle.fontWeight||Ue.dataLabelFont.fontWeight,o=A.property;var B,U,j="[object Array]"===Object.prototype.toString.call(e.shapePropertyPath)?e.shapePropertyPath:[e.shapePropertyPath],R=0!==e.animationDuration||"Enable"===t.animationMode||t.isNullOrUndefined(this.maps.zoomModule),Z=this.maps.isTileMap?new Object:this.maps.zoomSettings.zoomFactor>1&&!t.isNullOrUndefined(this.maps.zoomModule)?ee(this.maps,e,R):$(this.maps,e,R),D=this.maps.isTileMap?this.maps.scale:Z.scale,V=this.maps.isTileMap?this.maps.translatePoint:Z.location,H=this.maps.zoomTranslatePoint,W=t.isNullOrUndefined(this.maps.scale)?1:Math.floor(this.maps.scale),q=this.maps.zoomSettings.enable?!t.isNullOrUndefined(this.maps.zoomShapeCollection)&&this.maps.zoomShapeCollection.length>0&&!this.maps.isAddLayer:this.maps.zoomSettings.enable;this.maps.translateType="labels";for(var J=0;J<j.length&&!(F[j[J]]&&(B=j[J],c=this.getDataLabel(e.dataSource,e.shapeDataPath,T.properties[B],e.shapeDataPath)));J++);if(c=this.getDataLabel(e.dataSource,e.shapeDataPath,T.properties[B],e.shapeDataPath),!t.isNullOrUndefined(A.property))if(M=[[]],a[r]._isMultiPolygon||"Point"===a[r].type||"MultiPoint"===a[r].type){if("Point"!==a[r].type&&"MultiPoint"!==a[r].type){var Q=a[r];for(J=0;J<Q.length;J++)M.push(this.getPoint(Q[J],[])),w<(k=M[M.length-1].length)&&(w=k,P=M.length-1)}}else M.push(this.getPoint(a[r],[])),w<(k=M[M.length-1].length)&&(w=k,P=M.length-1);if(I=t.isNullOrUndefined(c)?T.properties[_]:t.isNullOrUndefined(c[_])?c[e.shapeDataPath]:c[_].toString(),"[object Array]"===Object.prototype.toString.call(e.shapePropertyPath)&&t.isNullOrUndefined(I)&&0===e.dataSource.length)for(var K=0;K<e.shapePropertyPath.length;K++)if(T.properties[e.shapePropertyPath[K]]){I=T.properties[e.shapePropertyPath[K]];break}t.isNullOrUndefined(I)&&""!==e.dataLabelSettings.template&&0===e.dataSource.length&&(I=T.properties[e.shapePropertyPath]),t.isNullOrUndefined(I)&&e.dataSource.length>0&&(I="");var te=I,ie=this.maps.projectionType,ne=g=X(M[P],ie,e.geometryType);if(!t.isNullOrUndefined(I)&&!t.isNullOrUndefined(g)){if(q&&W>1&&!this.maps.zoomNotApplied&&""===v.template){if(i>0)for(var le=0;le<this.maps.zoomLabelPositions.length;le++)if(this.maps.zoomLabelPositions[le].dataLabelText===I){u=r,r=le,N=!0;break}y=g.x,f=g.y,g.x=(g.x+H.x)*D,g.y=(g.y+H.y)*D}g.y="Mercator"===this.maps.projectionType||"Normal"===e.geometryType?g.y:-g.y,t.isNullOrUndefined(this.maps.format)||isNaN(parseFloat(I))||this.maps.useGroupingSeparator&&(I=oe(this.maps,parseFloat(I)),t.isNullOrUndefined(c)||(c[_]=I));var re={name:$t,maps:this.maps,cancel:!1,border:{color:v.border.color,width:v.border.width,opacity:v.border.opacity},datalabel:v,fill:v.fill,template:v.template,text:I,offsetX:0,offsetY:0};this.maps.trigger("dataLabelRendering",re,function(o){if(!re.cancel){var a=[],v=q&&W>1&&!b.maps.zoomNotApplied&&b.maps.zoomShapeCollection.length>r?b.maps.dataLabelShape[r]*D:(g.rightMax.x-g.leftMax.x)*D;t.isNullOrUndefined(b.maps.dataLabelShape)||b.maps.isReset||(U=ne.rightMax.x-ne.leftMax.x,b.maps.dataLabelShape.push(U)),re.text===I||re.cancel||(I=re.text);var _=x(I,S),w=I,k=_,F=g.y-_.height/4,A=g.y+_.height/4,B=(g.y+V.y)*D-_.height/4,j=(g.y+V.y)*D+_.height/4;if((a=G(M[P],F,A)).length>5&&"MultiPolygon"!==T.geometry.type&&"MultiPolygon"!==T.type){var R=X(a,ie,e.geometryType);q&&W>1&&!b.maps.zoomNotApplied&&""===re.template&&(R.x=(b.maps.zoomLabelPositions[r].location.x+H.x)*D,R.y=(b.maps.zoomLabelPositions[r].location.y+H.y)*D),y=R.x,g.x=R.x,v=q&&W>1&&!b.maps.zoomNotApplied&&b.maps.zoomShapeCollection.length>r?b.maps.dataLabelShape[r]*D:(R.rightMax.x-R.leftMax.x)*D>0?(R.rightMax.x-R.leftMax.x)*D:v}var Z=(g.x+V.x)*D+_.width/2,J=(g.x+V.x)*D-_.width/2;b.value[r]={rightWidth:Z,leftWidth:J,heightTop:B,heightBottom:j};var Q;if(""!==re.template){var K=(d=ae(re.template,b.maps))?d(t.isNullOrUndefined(c)?T.properties:c,b.maps,re.template,b.maps.element.id+"_LabelTemplate",!1):document.createElement("div");K.innerHTML=d?"":re.template,Q=L(K,E,t.isNullOrUndefined(c)?T.properties:c,0,b.maps),b.maps.isTileMap?(Q.style.left=(g.x+V.x)*D-_.width/2+"px",Q.style.top=(g.y+V.y)*D-_.height+"px"):(Q.style.left=Math.abs(b.maps.baseMapRectBounds.min.x-g.x)*D+o.offsetX+"px",Q.style.top=Math.abs(b.maps.baseMapRectBounds.min.y-g.y)*D+o.offsetY+"px"),l.appendChild(Q)}else{if("Trim"===C.smartLabelMode){k=x(w=Y(v,"number"==typeof I?I.toString():I,S),S),p=new He(E,z.x,z.y,"middle",w,"","")}if("None"===C.smartLabelMode&&(p=new He(E,z.x,z.y,"middle",I,"","")),"Hide"===C.smartLabelMode&&(I=v>=_.width?I:"",p=new He(E,z.x,z.y,"middle",I,"","")),I=p.text,"Hide"===C.intersectionAction){for(var $=0;$<s.length;$++)if(!t.isNullOrUndefined(s[$])&&!(b.value[r].leftWidth>s[$].rightWidth||b.value[r].rightWidth<s[$].leftWidth||b.value[r].heightTop>s[$].heightBottom||b.value[r].heightBottom<s[$].heightTop)){I="";break}s.push(b.value[r]),p=new He(E,z.x,z.y,"middle",I,"","")}if("Trim"===C.intersectionAction){for(var ee=0;ee<s.length;ee++)if(!t.isNullOrUndefined(s[ee]))if(s[ee].rightWidth<b.value[r].leftWidth||s[ee].leftWidth>b.value[r].rightWidth||s[ee].heightBottom<b.value[r].heightTop||s[ee].heightTop>b.value[r].heightBottom)w=I,0;else{if(b.value[r].leftWidth>s[ee].leftWidth){w=Y((v=s[ee].rightWidth-b.value[r].leftWidth)-(b.value[r].rightWidth-b.value[r].leftWidth),I,S);break}if(b.value[r].leftWidth<s[ee].leftWidth){v=b.value[r].rightWidth-s[ee].leftWidth,w=Y(Math.abs(v-(b.value[r].rightWidth-b.value[r].leftWidth)),I,S);break}}k=x(w,S),s.push(b.value[r]),p=new He(E,z.x,z.y,"middle",w,"","")}if("None"===C.intersectionAction&&(p=new He(E,z.x,z.y,"middle",I,"","")),w.length>1){var oe=re.border;if(oe.width>1){var le=re.fill,se=C.opacity,de=C.rx,pe=C.ry,he=void 0,me=void 0;q&&W>1&&!b.maps.zoomNotApplied?(he=g.x-_.width/2,me=g.y-_.height/2-5):(he=(g.x+V.x)*D-_.width/2,me=(g.y+V.y)*D-_.height/2),oe.opacity=t.isNullOrUndefined(oe.opacity)?se:oe.opacity;var ce=new Xe(b.maps.element.id+"_LayerIndex_"+i+"_shapeIndex_"+r+"_rectIndex_"+r,le,oe,se,new et(he+o.offsetX,me+o.offsetY,_.width,_.height),de,pe);(m=b.maps.renderer.drawRectangle(ce)).setAttribute("visibility",e.dataLabelSettings.animationDuration>0||"Enable"===t.animationMode?"hidden":"visibile"),n.appendChild(m)}}(h=O(p,S,S.color||b.maps.themeStyle.dataLabelFontColor,n)).setAttribute("visibility",e.dataLabelSettings.animationDuration>0||"Enable"===t.animationMode?"hidden":"visibile"),q&&W>1&&!b.maps.zoomNotApplied?(h.setAttribute("transform","translate( "+(g.x+o.offsetX)+" "+(g.y+o.offsetY)+" )"),g.x=y,g.y=f):h.setAttribute("transform","translate( "+((g.x+V.x)*D+o.offsetX)+" "+((g.y+V.y)*D+k.height/4+o.offsetY)+" )"),n.appendChild(h)}b.dataLabelCollections.push({location:{x:g.x+o.offsetX,y:g.y+o.offsetY},element:t.isNullOrUndefined(Q)?h:Q,layerIndex:i,shapeIndex:N?u:r,labelIndex:N?u:r,dataLabelText:te}),l.childElementCount>0&&!b.maps.element.contains(l)&&(document.getElementById(b.maps.element.id+"_Secondary_Element").appendChild(l),b.maps.renderReactTemplates()),(e.dataLabelSettings.animationDuration>0||"Enable"===t.animationMode)&&(t.isNullOrUndefined(h)||(b.datalabelAnimate(h,C.animationDuration,S.opacity,!1),t.isNullOrUndefined(m)||b.datalabelAnimate(m,C.animationDuration,C.opacity,!0)))}})}},e.prototype.datalabelAnimate=function(e,i,o,a){var n=0;new t.Animation({}).animate(e,{duration:0===i&&"Enable"===t.animationMode?1e3:i,delay:0,progress:function(t){t.timeStamp>t.delay&&(n=(t.timeStamp-t.delay)/t.duration,e.setAttribute("style","user-select: none; visibility: visible;"),e.setAttribute(a?"fill-opacity":"opacity",(o*n).toString()))},end:function(t){e.style.visibility="visible",e.setAttribute(a?"fill-opacity":"opacity",o.toString())}})},e.prototype.getPoint=function(e,t){return"MultiLineString"===e.type?e.map(function(e){e.map(function(e){t.push(new Ze(e.point.x,e.point.y))})}):e.map(function(e){t.push(new Ze(e.point.x,e.point.y))}),t},e.prototype.getModuleName=function(){return"DataLabel"},e.prototype.destroy=function(){this.dataLabelCollections=[],this.value=null,this.maps=null},e}(),yi=function(){function e(e){this.maps=e}return e.prototype.renderNavigation=function(e,i,o){var a;if(!t.isNullOrUndefined(this.maps)){var n=void 0,l=e.navigationLineSettings,r=void 0,s=[],d=void 0,p=void 0,c=void 0,u=void 0,g=void 0,y=void 0,f=void 0,b=void 0,v=void 0,S=void 0,x=void 0,O=void 0,C=void 0,_=void 0,M=void 0,L=void 0,P=void 0,w=void 0,T=void 0;a=this.maps.renderer.createGroup({id:this.maps.element.id+"_LayerIndex_"+o+"_line_Group"});for(var I=0;I<l.length;I++){if(d=l[I].properties.latitude,r=l[I].properties.longitude,p=l[I].properties.visible,c=l[I].angle,u=l[I].width||1,g=l[I].color,y=l[I].properties.dashArray,O=l[I].properties.arrowSettings,v=!t.isNullOrUndefined(O)&&O.properties.showArrow,r.length===d.length&&p)for(var k=0;k<r.length;k++){var N=this.maps.isTileMap?m(new Ze(r[k],d[k]),i,this.maps.tileTranslatePoint,!0):h(d[k],r[k],i,e,this.maps);s.push(N)}w=this.maps.renderer.createGroup({id:this.maps.element.id+"_LayerIndex_"+o+"_NavigationGroup"+I});for(var F=0;F<s.length-1;F++){c=1<(c=-1>c?-1:c)?1:c;var E=this.maps.element.id+"_LayerIndex_"+o+"_NavigationIndex_"+I+"_Line"+F,z=this.convertRadius(s[F],s[F+1]);if(c<=1&&c>0&&(b=0,s[F].x>s[F+1].x&&(b=1)),c>=-1&&c<0&&(b=1,s[F].x>s[F+1].x&&(b=0)),v){S=O.properties.color,x=O.properties.size,P=void 0===O.properties.offSet?0:O.properties.offSet;var B=Math.round(x/2);_="Start"===(C=O.properties.position)?"url(#triangle"+I+")":null,M="End"===C?"url(#triangle"+I+")":null,0!==L&&0===c&&(L="Start"===C?P:-P),L=t.isNullOrUndefined(L)?0:L;var U=this.maps.element.id+"_triangle",j=this.maps.renderer.createDefs();j.innerHTML+='<marker id="triangle'+I+'"></marker>';var R=j.querySelector("#triangle"+I);R.setAttribute("markerWidth",x.toString()),R.setAttribute("markerHeight",x.toString()),R.setAttribute("refX",(B-L).toString()),R.setAttribute("refY",B.toString()),R.setAttribute("orient","auto");f=new Ge(U,S,u,g,1,1,y,"M 0,0 L 0,"+x+" L "+B+", "+B+" Z"),n=this.maps.renderer.drawPath(f),R.appendChild(n),j.appendChild(R),w.appendChild(j)}if(c=Math.abs(c),T=0===c?"M "+s[F].x+","+s[F].y+"L "+s[F+1].x+","+s[F+1].y+" ":"M "+s[F].x+","+s[F].y+" A "+(z/2+(1-c)*z/(10*c))+" "+(z/2+(1-c)*z/(10*c))+" 0,0,"+b+" , "+s[F+1].x+","+s[F+1].y+" ",f=new Ge(E,"none",u,g,1,1,y,T),n=this.maps.renderer.drawPath(f),!t.isNullOrUndefined(C))"Start"===C?n.setAttribute("marker-start",_):n.setAttribute("marker-end",M);A(this.maps.selectedNavigationElementId,this.maps.navigationSelectionClass,n,"navigationlineselectionMapStyle"),w.appendChild(n),a.appendChild(w)}s=[]}}return a},e.prototype.convertRadius=function(e,t){var i=t.x-e.x,o=t.y-e.y;return Math.sqrt(Math.pow(i,2)+Math.pow(o,2))},e.prototype.getModuleName=function(){return"NavigationLine"},e.prototype.destroy=function(){this.maps=null},e}(),fi=function(){function e(e){this.legendBorderRect=new et(0,0,0,0),this.initialMapAreaRect=new et(0,0,0,0),this.legendTotalRect=new et(0,0,0,0),this.totalPages=[],this.page=0,this.currentPage=0,this.legendItemRect=new et(0,0,0,0),this.heightIncrement=0,this.widthIncrement=0,this.textMaxWidth=0,this.shapeHighlightCollection=[],this.legendHighlightCollection=[],this.shapePreviousColor=[],this.selectedNonLegendShapes=[],this.shapeToggled=!0,this.legendElement=null,this.maps=e,this.addEventListener()}return e.prototype.renderLegend=function(){this.legendRenderingCollections=[],this.legendCollection=[],this.totalPages=[],this.widthIncrement=0,this.heightIncrement=0,this.defsElement=this.maps.renderer.createDefs(),this.maps.svgObject.appendChild(this.defsElement),this.initialMapAreaRect=this.maps.mapAreaRect,this.calculateLegendBounds(),this.drawLegend()},e.prototype.calculateLegendBounds=function(){var e=this,i=this.maps,o=i.legendSettings;this.legendCollection=[];var a=i.mapAreaRect.y;if(this.legendRenderingCollections=[],Array.prototype.forEach.call(i.layersCollection,function(i,a){if(!t.isNullOrUndefined(i.shapeData)){var n=i.shapeData.features,l=i.shapeDataPath,r=i.shapePropertyPath,s=i.dataSource,d=void 0,p=void 0;if("Layers"===o.type&&i.visible)d=i.shapeSettings.colorValuePath,p=i.shapeSettings.colorMapping,e.getLegends(a,n,p,s,l,d,r);else if("Bubbles"===o.type)for(var h=0,m=i.bubbleSettings;h<m.length;h++){var c=m[h];c.visible&&(d=c.colorValuePath,p=c.colorMapping,s=c.dataSource,e.getLegends(a,n,p,s,l,d,r))}}"Markers"===o.type&&e.getMarkersLegendCollections(a,i.markerSettings)}),this.legendCollection.length>0)for(var n=0;n<this.legendCollection.length;n++){var l={name:"legendRendering",cancel:!1,fill:(H=this.legendCollection[n]).fill,shape:o.shape,shapeBorder:o.shapeBorder,text:"number"==typeof H.text?H.text.toString():H.text};i.trigger("legendRendering",l),H.fill=l.fill,H.shape=l.shape,H.shapeBorder=l.shapeBorder,H.text=l.text,l.cancel&&(this.legendCollection.splice(n,1),n--)}var r=i.legendSettings.title.text,s=i.legendSettings.titleStyle;if(this.legendCollection.length>0){var d,p,h=o.mode,m=0,c=0,u=0,g=0,y=o.shapePadding,f=o.shapeHeight,b=o.shapeWidth,v=[],S=[],O=o.position,C=o.labelDisplayMode,_="None"===o.orientation?"Top"===O||"Bottom"===O?"Horizontal":"Vertical":o.orientation,M=o.width.length>1?o.width.indexOf("%")>-1?i.availableSize.width/100*parseInt(o.width,10):parseInt(o.width,10):null,L=o.height.length>1?o.height.indexOf("%")>-1?i.availableSize.height/100*parseInt(o.height,10):parseInt(o.height,10):null,P=0,w=0,T=x(r,s);if("Interactive"===h){var I=o.textStyle,k=this.legendCollection.length,N="Horizontal"===_?t.isNullOrUndefined(M)?i.mapAreaRect.width/k:M/k:t.isNullOrUndefined(M)?25:M,F="Horizontal"===_?t.isNullOrUndefined(L)?25:L:t.isNullOrUndefined(L)?i.mapAreaRect.height/k:L/k;P=0,w=T.height+10;var E=o.labelPosition,z=0,A=0,B=0,U=0,j=0,R=0;for(n=0;n<this.legendCollection.length;n++){P="Horizontal"===_?P+N:P,w="Horizontal"===_?w:w+F;var Z=this.legendCollection[n].text,D=new Re(0,0);"None"===C?D=x(Z,I):"Trim"===C?D=x(Z=Y("Horizontal"===_?N:F,Z,I),I):Z="",j=Math.max(j,D.height),R=Math.max(R,D.width),D.width>0&&D.height>0&&("Horizontal"===_?(z=P+N/2,A="After"===E?w+F+D.height/2+10:w-10):(z="After"===E?P-D.width/2-10:P+N+D.width/2+10,A=w+F/2+D.height/4)),0===n?(B="Horizontal"===_?P:"After"===E?z-D.width/2:P,U="Horizontal"===_?"After"===E?w:A-D.height/2:w,1===this.legendCollection.length&&(M="Horizontal"===_?Math.abs(P+N-B):N+R+10,L="Horizontal"===_?F+j/2+10:Math.abs(w+F-U))):n===this.legendCollection.length-1&&(M="Horizontal"===_?Math.abs(P+N-B):N+R+10,L="Horizontal"===_?F+j/2+10:Math.abs(w+F-U)),this.legendRenderingCollections.push({fill:this.legendCollection[n].fill,x:P,y:w,width:N,height:F,text:Z,textX:z,textY:A,textWidth:D.width,textHeight:D.height,shapeBorder:this.legendCollection[n].shapeBorder})}1===this.legendCollection.length&&(L=F,M=N),this.legendItemRect={x:B,y:U,width:M,height:L}}else{M=t.isNullOrUndefined(M)?i.mapAreaRect.width:M,L=t.isNullOrUndefined(L)?i.mapAreaRect.height:L;var V=0;this.page=0;for(n=0;n<this.legendCollection.length;n++){var H=this.legendCollection[n];t.isNullOrUndefined(this.totalPages[this.page])&&(this.totalPages[this.page]={Page:this.page+1,Collection:[]});var G=x(H.text,o.textStyle);if(this.textMaxWidth=Math.max(this.textMaxWidth,G.width),0===n)P=m=10+b/2,w=c=a+T.height+(f>G.height?f/2:G.height/4);else{var W=G.height>f?G.height:f;if("Horizontal"===_){var X=S[V-1].x+S[V-1].width+10+b;if(X+y+G.width>M){var q=(S[V-1].y>v[V-1].y+f/2?S[V-1].y:v[V-1].y+f/2)+a;q+W>L?(this.getPageChanged(),V=0,v=[],S=[],m=P,c=w):(m=v[0].x,c=q+W/2)}else m=X-b/2,c=v[V-1].y}else{var J=S[V-1].y>v[V-1].y+f/2?S[V-1].y:v[V-1].y+f/2;if(J+a+W>L){var Q=S[V-1].x+this.textMaxWidth+10;Q+y+G.width>M?(m=P,c=w,S=[],v=[],this.getPageChanged(),V=0):(m=Q+b/2,c=v[0].y)}else{m=v[V-1].x,c=J+10+f/2}}}u=m+b/2+y,g=c+G.height/4,v.push({x:m,y:c}),S.push({x:u,y:g,width:G.width,height:G.height/2}),this.totalPages[this.page].Collection.push({DisplayText:H.text,ImageSrc:H.imageSrc,Shape:{x:m,y:c},Text:{x:u,y:g},Fill:H.fill,legendShape:H.shape,shapeBorder:H.shapeBorder,idIndex:n,Rect:{x:v[V].x-b/2,y:v[V].y-f/2<g-G.height?v[V].y-f/2:g-G.height,width:Math.abs(v[V].x-b/2-(u+G.width)),height:f>G.height?f:G.height}}),V++}var K=this.totalPages[0].Collection;Array.prototype.forEach.call(K,function(t,i){var o=new et(t.Rect.x,t.Rect.y,t.Rect.width,t.Rect.height);0===i&&(d=o.x,p=o.y),e.widthIncrement=Math.max(e.widthIncrement,Math.abs(d-(o.x+o.width))),e.heightIncrement=Math.max(e.heightIncrement,Math.abs(p-(o.y+o.height)))}),M=this.widthIncrement<M?this.widthIncrement:M,L=this.heightIncrement<L?this.heightIncrement:L,this.legendItemRect={x:K[0].Rect.x,y:K[0].Rect.y,width:M,height:L}}}},e.prototype.getLegends=function(e,t,i,o,a,n,l){this.getRangeLegendCollection(e,t,i,o,a,n,l),this.getEqualLegendCollection(e,t,i,o,a,n,l),this.getDataLegendCollection(e,t,i,o,a,n,l)},e.prototype.getPageChanged=function(){this.page++,t.isNullOrUndefined(this.totalPages[this.page])&&(this.totalPages[this.page]={Page:this.page+1,Collection:[]})},e.prototype.legendTextTrim=function(e,t,i,o){var a=t,n=x(t,i).width,l=o-n;if(o>e)for(var r=t.length-1;r>=0;--r){if(l+(n=x(a=t.substring(0,r)+"...",i).width)<=e||a.length<4)return a.length<4&&(a=" "),a}return a},e.prototype.drawLegend=function(){var e,i=this.maps,o=i.legendSettings,a=i.renderer,n={size:o.textStyle.size,color:o.textStyle.color,fontFamily:o.textStyle.fontFamily,fontWeight:o.textStyle.fontWeight,fontStyle:o.textStyle.fontStyle,opacity:o.textStyle.opacity};if(this.legendGroup=a.createGroup({id:i.element.id+"_Legend_Group"}),"Interactive"===o.mode)for(var l=0;l<this.legendRenderingCollections.length;l++){var r=i.element.id+"_Legend_Index_"+l,s=i.element.id+"_Legend_Index_"+l+"_Text",d=this.legendRenderingCollections[l],p=new et(d.x,d.y,d.width,d.height);0===l&&this.renderLegendBorder();var h=new Ze(d.textX,d.textY);n.color=null!==n.color?n.color:this.maps.themeStyle.legendTextColor;var m=new Xe(r,d.fill,d.shapeBorder,o.opacity,p);e=new He(s,h.x,h.y,"middle",d.text,"",""),n.fontFamily=t.isNullOrUndefined(n.fontFamily)?this.maps.themeStyle.fontFamily:n.fontFamily,n.size=i.themeStyle.legendFontSize||n.size,O(e,n,n.color,this.legendGroup),this.legendGroup.appendChild(a.drawRectangle(m)),this.legendToggle()}else this.drawLegendItem(this.currentPage)},e.prototype.drawLegendItem=function(e){var i,o=this.maps,a=o.legendSettings,n=new Re(a.shapeWidth,a.shapeHeight),l=o.renderer,r=a.shape;if(e>=0&&e<this.totalPages.length){de(this.legendGroup.id,this.maps.element.id)&&t.remove(de(this.legendGroup.id,this.maps.element.id));for(var s=0;s<this.totalPages[e].Collection.length;s++){var d=this.totalPages[e].Collection[s],p=d.shapeBorder,h=l.createGroup({id:o.element.id+"_Legend_Index_"+d.idIndex}),m=d.DisplayText,c=("Markers"===a.type?t.isNullOrUndefined(d.ImageSrc)&&a.shape:d.legendShape,"HorizontalLine"===a.shape||"VerticalLine"===a.shape||"Cross"===a.shape?t.isNullOrUndefined(a.fill)?"#000000":a.fill:p.color),u=("HorizontalLine"===a.shape||"VerticalLine"===a.shape||"Cross"===a.shape)&&0===p.width?1:p.width,g=o.element.id+"_Legend_Shape_Index_"+d.idIndex,y=o.element.id+"_Legend_Text_Index_"+d.idIndex,f=new Ze(d.Shape.x,d.Shape.y-4),b=new Ze(d.Text.x,d.Text.y-4),v=new Ge(g,d.Fill,u,c,a.opacity,t.isNullOrUndefined(p.opacity)?a.opacity:p.opacity,""),S={fontFamily:a.textStyle.fontFamily,fontStyle:a.textStyle.fontStyle,fontWeight:a.textStyle.fontWeight,size:a.textStyle.size,color:a.textStyle.color,opacity:a.textStyle.opacity};if(S.color=null!==S.color?S.color:this.maps.themeStyle.legendTextColor,S.fontFamily=t.isNullOrUndefined(S.fontFamily)?this.maps.themeStyle.fontFamily:S.fontFamily,S.size=o.themeStyle.legendFontSize||S.size,S.fontWeight=S.fontWeight||o.themeStyle.fontWeight,0===s&&this.renderLegendBorder(),"Markers"===a.type&&a.useMarkerShape){var C=this.legendCollection[d.idIndex].data[0],_=o.layers[C.layerIndex].markerSettings[C.markerIndex];r=t.isNullOrUndefined(_.dataSource[C.dataIndex][_.shapeValuePath])||""===_.dataSource[C.dataIndex][_.shapeValuePath]?_.shape:_.dataSource[C.dataIndex][_.shapeValuePath]}"Balloon"===r?h.appendChild(D(o,v,n,{x:f.x,y:f.y+5},"Legend")):h.appendChild(xe(f,r,n,d.ImageSrc,v));var M=d.Rect.x+d.Rect.width;if(M>this.legendBorderRect.width){m=this.legendTextTrim(this.legendBorderRect.width,m,S,M)}if(i=new He(y,b.x,b.y,"start",m,"",""),O(i,S,S.color,h),this.legendGroup.appendChild(h),s===this.totalPages[e].Collection.length-1){var L=void 0;if(0!==this.page){var P=e+1+"/"+this.totalPages.length,w=a.textStyle,T=x(P,w),I=this.legendItemRect.x+this.legendItemRect.width-T.width-20-20+2,k=this.legendItemRect.x+this.legendItemRect.width,N=k-10-T.width/2-5-4,F=this.legendItemRect.y+this.legendItemRect.height+2.5+10;L=l.createGroup({id:o.element.id+"_Legend_Paging_Group"});var E=l.createGroup({id:o.element.id+"_Legend_Left_Paging_Group"}),z=l.createGroup({id:o.element.id+"_Legend_Right_Paging_Group"}),A=" M "+k+" "+F+" L "+(k-10)+" "+(F-5)+" L "+(k-10)+" "+(F+5)+" z ",B=" M "+I+" "+F+" L "+(I+10)+" "+(F-5)+" L "+(I+10)+" "+(F+5)+" z ",U=new Ge(o.element.id+"_Left_Page",this.maps.themeStyle.legendTextColor,0,this.maps.themeStyle.legendTextColor,e+1===1?.5:1,1,"",B);E.appendChild(l.drawPath(U));var j=new Xe(o.element.id+"_Left_Page_Rect","transparent",{},1,new et(I-5,F-10,20,20),null,null,"",""),R=l.drawRectangle(j);R.tabIndex=e+1===1?-1:o.tabIndex+1,E.appendChild(R),this.wireEvents(E);var Z=new Ge(o.element.id+"_Right_Page",this.maps.themeStyle.legendTextColor,0,this.maps.themeStyle.legendTextColor,e+1===this.totalPages.length?.5:1,1,"",A);z.appendChild(l.drawPath(Z));var V=new Xe(o.element.id+"_Right_Page_Rect","transparent",{},1,new et(k-10-5,F-10,20,20),null,null,"","");(R=l.drawRectangle(V)).tabIndex=e+1===this.totalPages.length?-1:o.tabIndex+2,z.appendChild(R),this.wireEvents(z),L.appendChild(E),L.appendChild(z);var H={id:o.element.id+"_Paging_Text",x:N,y:F+T.height/4,fill:this.maps.themeStyle.legendTextColor,"font-size":"14px","font-style":w.fontStyle,"font-family":w.fontFamily,"font-weight":w.fontWeight,"text-anchor":"middle",transform:"",opacity:1,"dominant-baseline":""},G=l.createText(H,P);G.style.cssText="user-select: none;",L.appendChild(G),this.legendGroup.appendChild(L)}this.legendToggle()}}}},e.prototype.legendHighLightAndSelection=function(e,i){var o,a,n,l,r,s="Default"===this.maps.legendSettings.mode?document.getElementById(e.id.replace("Shape","Text")):document.getElementById(e.id+"_Text"),d=this.maps.legendModule.legendCollection,p=!t.isNullOrUndefined(d[0].data[0].layerIndex)&&this.maps.layers[d[0].data[0].layerIndex].selectionSettings.enableMultiSelect,h=0,m=!0,c=parseFloat(e.id.charAt(e.id.length-1));this.updateLegendElement();var u=this.maps.toggledLegendId.indexOf(c);if(this.maps.legendSettings.toggleLegendSettings.enable&&"highlight"===i&&-1!==u){var g=this.getIndexofLegend(this.legendHighlightCollection,e);return-1!==g&&this.legendHighlightCollection.splice(g,1),this.removeLegendHighlightCollection(),null}if("selection"===i){if(this.shapeHighlightCollection=[],this.maps.shapeSelections||p||(this.removeAllSelections(),this.maps.shapeSelections=!0),this.maps.legendSelectionCollection.length>0&&(p||this.maps.shapeSelections))for(var y=0;y<this.maps.legendSelectionCollection.length;y++){if(e===this.maps.legendSelectionCollection[y].legendElement){this.maps.legendSelectionCollection[y].legendElement=e,m=!1,this.removeLegendSelectionCollection(this.maps.legendSelectionCollection[y].legendElement),this.maps.selectedLegendElementId.splice(this.maps.selectedLegendElementId.indexOf(c),1),this.maps.legendSelectionCollection.splice(y,1),this.maps.legendSelection=!(this.maps.legendSelectionCollection.length>0);break}if(!p)if(this.maps.legendSelectionCollection.length>1){for(var f=0;f<this.maps.legendSelectionCollection.length;f++)this.removeLegendSelectionCollection(this.maps.legendSelectionCollection[f].legendElement);this.maps.legendSelectionCollection=[]}else this.removeLegendSelectionCollection(this.maps.legendSelectionCollection[y].legendElement),this.maps.legendSelectionCollection.splice(y,1)}}else{if(this.maps.legendSelectionCollection.length>0)for(y=0;y<this.maps.legendSelectionCollection.length;y++){if((e.id.indexOf("_Legend_Shape")>-1||e.id.indexOf("_Legend_Index"))&&e===this.maps.legendSelectionCollection[y].legendElement){m=!1;break}this.removeLegendHighlightCollection()}this.removeLegendHighlightCollection()}if(m)for(var b=0;b<d.length;b++){var v="Interactive"===this.maps.legendSettings.mode?parseFloat(e.id.split("_Legend_Index_")[1]):parseFloat(e.id.split("_Legend_Shape_Index_")[1]);if(s.textContent===d[b].text&&d[b].data.length>0&&v===b){var S=this.maps.layers[d[b].data[0].layerIndex],x=void 0,O=void 0,C=void 0;if(t.isNullOrUndefined(S)||(x="selection"===i?S.selectionSettings.enable:S.highlightSettings.enable,O=void 0,O="selection"===i?S.selectionSettings:S.highlightSettings,C=d[b].data),x)for(var _=0;_<C.length;_++){var M=void 0;if(o=C[_].shapeIndex,a=C[_].layerIndex,n=C[_].dataIndex,l=C[_].pointIndex,null!==(M=-1===l?document.getElementById(this.maps.element.id+"_LayerIndex_"+a+"_shapeIndex_"+o+"_dataIndex_"+n):document.getElementById(this.maps.element.id+"_LayerIndex_"+a+"_shapeIndex_"+o+"_dataIndex_"+n+"_multiLine_"+l))){var L=!0;if(null!==this.maps.legendSelectionCollection)for(var P=0;P<this.maps.legendSelectionCollection.length;P++)if(this.maps.legendSelectionCollection[P].legendElement===e){L=!1;break}if("highlight"===i&&L){0===_&&(this.legendHighlightCollection=[],this.pushCollection(e,this.legendHighlightCollection,d[b],S.shapeSettings)),r=this.legendHighlightCollection.length;var w=this.legendHighlightCollection[r-1].legendOldFill;this.legendHighlightCollection[r-1].MapShapeCollection.Elements.push(M);var T=this.legendHighlightCollection[r-1].MapShapeCollection.Elements.length-1,I=M.getAttribute("fill"),k=M.getAttribute("fill-opacity");this.legendHighlightCollection[r-1].shapeOldFillColor.push(I),this.legendHighlightCollection[r-1].shapeOldOpacity=k;var N=this.legendHighlightCollection[r-1].shapeOldFillColor[T],F=this.legendHighlightCollection[r-1].shapeOldOpacity;this.shapePreviousColor=this.legendHighlightCollection[r-1].shapeOldFillColor,this.setColor(M,t.isNullOrUndefined(O.fill)?N:O.fill,t.isNullOrUndefined(O.opacity)?F:O.opacity.toString(),O.border.color,O.border.width.toString(),"highlight"),this.setColor(e,t.isNullOrUndefined(O.fill)?w:O.fill,t.isNullOrUndefined(O.opacity)?F:O.opacity.toString(),O.border.color,O.border.width.toString(),"highlight")}else if("selection"===i){this.legendHighlightCollection=[],this.maps.legendSelectionClass=O,0===_&&(this.pushCollection(e,this.maps.legendSelectionCollection,d[b],S.shapeSettings),p?this.maps.selectedLegendElementId.push(b):0===this.maps.selectedLegendElementId.length?this.maps.selectedLegendElementId.push(b):(this.maps.selectedLegendElementId=[],this.maps.selectedLegendElementId.push(b))),h=this.maps.legendSelectionCollection.length;var E=this.maps.legendSelectionCollection[h-1].legendOldFill;this.maps.legendSelectionCollection[h-1].MapShapeCollection.Elements.push(M),this.maps.legendSelectionCollection[h-1].shapeOldFillColor=this.shapePreviousColor,this.setColor(e,t.isNullOrUndefined(O.fill)?E:O.fill,O.opacity.toString(),O.border.color,O.border.width.toString(),"selection"),this.setColor(M,t.isNullOrUndefined(O.fill)?E:O.fill,O.opacity.toString(),O.border.color,O.border.width.toString(),"selection"),-1===this.maps.selectedElementId.indexOf(M.getAttribute("id"))&&this.maps.selectedElementId.push(M.getAttribute("id")),_===C.length-1&&(this.maps.legendSelection=!1,this.removeLegend(this.maps.legendSelectionCollection))}}}}}},e.prototype.setColor=function(e,t,i,o,a,n){var l=e.parentElement.id.indexOf("LineString")>-1;"selection"===n?(B(l?"LineselectionMap":"ShapeselectionMap",l?"LineselectionMapStyle":"ShapeselectionMapStyle",l?"transparent":t,i,l?t:o,a,this.maps),e.setAttribute("class",l?"LineselectionMapStyle":"ShapeselectionMapStyle")):(e.setAttribute("fill",l?"transparent":t),e.setAttribute("fill-opacity",i),e.setAttribute("stroke",l?t:o),e.setAttribute("stroke-width",(Number(a)/this.maps.scale).toString()))},e.prototype.pushCollection=function(e,t,i,o){t.push({legendElement:e,legendOldFill:i.fill,legendOldOpacity:i.opacity,legendOldBorderColor:i.borderColor,legendOldBorderWidth:i.borderWidth,shapeOpacity:o.opacity,shapeOldBorderColor:o.border.color,shapeOldBorderWidth:o.border.width});var a=t.length;t[a-1].MapShapeCollection={Elements:[]},t[a-1].shapeOldFillColor=[],t[a-1].shapeOldOpacity=null},e.prototype.removeLegend=function(e){for(var i=0;i<e.length;i++){var o=e[i];this.setColor(o.legendElement,o.legendOldFill,o.legendOldOpacity,o.legendOldBorderColor,o.legendOldBorderWidth,"highlight");for(var a=o.MapShapeCollection.Elements.length,n=0;n<a;n++){var l=-1!==o.legendOldFill.indexOf("url")?o.shapeOldFillColor[n]:o.legendOldFill,r=t.isNullOrUndefined(o.shapeOldOpacity)?o.shapeOpacity:o.shapeOldOpacity;this.setColor(o.MapShapeCollection.Elements[n],l,r,o.shapeOldBorderColor,o.shapeOldBorderWidth,"highlight")}}},e.prototype.removeLegendHighlightCollection=function(){this.legendHighlightCollection.length>0&&(this.removeLegend(this.legendHighlightCollection),this.legendHighlightCollection=[])},e.prototype.removeLegendSelectionCollection=function(e){if(this.maps.legendSelectionCollection.length>0){ue(e);for(var t=this.shapesOfLegend(e),i=t.length,o=0;o<i;o++){var a=ne(t[o]);if("ShapeselectionMapStyle"===a.getAttribute("class")||"LineselectionMapStyle"===a.getAttribute("class")){ue(a);var n=this.maps.selectedElementId.indexOf(a.id);-1!==n&&this.maps.selectedElementId.splice(n,1)}}}},e.prototype.removeShapeHighlightCollection=function(){if(this.shapeHighlightCollection.length>0)for(var e=0;e<this.shapeHighlightCollection.length;e++){for(var t=this.shapeHighlightCollection[e],i=!0,o=0;o<this.maps.legendSelectionCollection.length;o++)this.maps.legendSelectionCollection[o].legendElement===t.legendElement&&(i=!1);i&&this.setColor(t.legendElement,t.legendOldFill,t.legendOldOpacity,t.legendOldBorderColor,t.legendOldBorderWidth,"highlight")}},e.prototype.shapeHighLightAndSelection=function(e,i,o,a,n){if(void 0!==i){this.updateLegendElement(),this.shapeToggled=!0;var l=this.maps.legendModule.legendCollection,r=this.legendIndexOnShape(i,n),s=this.shapeDataOnLegend(e),d=this.maps.toggledLegendId.indexOf(r.actualIndex);if(this.maps.legendSettings.toggleLegendSettings.enable&&-1!==d){this.shapeToggled=!1,this.legendHighlightCollection=[];var p=this.getIndexofLegend(this.shapeHighlightCollection,s.LegendEle);return-1!==p&&this.shapeHighlightCollection.splice(p,1),this.removeShapeHighlightCollection(),null}if(void 0===r.currentIndex&&void 0===r.actualIndex)return this.removeShapeHighlightCollection(),null;if(void 0!==r.currentIndex||"selection"!==a||this.maps.layers[n].selectionSettings.enableMultiSelect||"ShapeselectionMapStyle"===e.getAttribute("class")||(this.maps.legendSelection=!1),"selection"!==a||this.maps.layers[n].selectionSettings.enableMultiSelect||this.maps.legendSelection||(this.removeAllSelections(),this.maps.legendSelection=!0),void 0===r.currentIndex){if("selection"===a&&void 0!==r.actualIndex){for(var h=0,m=0;m<s.Elements.length;m++)"ShapeselectionMapStyle"===s.Elements[m].getAttribute("class")&&h++;var c=this.maps.selectedLegendElementId.indexOf(r.actualIndex);-1===c?(this.maps.selectedLegendElementId.push(r.actualIndex),this.maps.legendSelectionClass=o):h<=1&&("ShapeselectionMapStyle"===e.getAttribute("class")||"LineselectionMapStyle"===e.getAttribute("class"))&&(this.maps.layers[n].selectionSettings.enableMultiSelect?h<=1&&("ShapeselectionMapStyle"===e.getAttribute("class")||"LineselectionMapStyle"===e.getAttribute("class"))&&this.maps.selectedLegendElementId.splice(c,1):this.maps.selectedLegendElementId.splice(c,1))}return this.removeShapeHighlightCollection(),null}var u=l[r.actualIndex].text,g=void 0,y=void 0;"Default"===this.maps.legendSettings.mode?void 0!==r.currentIndex&&(g=document.getElementById(this.maps.element.id+"_Legend_Text_Index_"+r.actualIndex).textContent,y=document.getElementById(this.maps.element.id+"_Legend_Shape_Index_"+r.actualIndex)):(g=document.getElementById(this.maps.element.id+"_Legend_Index_"+r.actualIndex+"_Text").textContent,y=document.getElementById(this.maps.element.id+"_Legend_Index_"+r.actualIndex)),this.oldShapeElement=s.LegendEle;var f=this.maps.legendSelectionCollection.length;if(u===g){var b=!0;if(this.maps.legendSelectionCollection)for(m=0;m<this.maps.legendSelectionCollection.length;m++)if(this.maps.legendSelectionCollection[m].legendElement===s.LegendEle){b=!1;break}if("highlight"===a&&b){(void 0===(S=this.isTargetSelected(s,this.shapeHighlightCollection))||S&&!S.IsSelected)&&this.pushCollection(y,this.shapeHighlightCollection,l[r.actualIndex],this.maps.layers[n].shapeSettings);for(var v=0;v<this.shapeHighlightCollection.length;v++)s.LegendEle.id===this.shapeHighlightCollection[v].legendElement.id&&(this.shapeHighlightCollection[v].legendElement=s.LegendEle);if(f>0)for(v=0;v<f;v++){if(s.LegendEle===this.maps.legendSelectionCollection[v].legendElement){this.maps.legendSelectionCollection[v].legendElement=s.LegendEle,this.removeShapeHighlightCollection();break}v===f-1&&(this.removeShapeHighlightCollection(),this.setColor(y,t.isNullOrUndefined(o.fill)?y.getAttribute("fill"):o.fill,o.opacity.toString(),o.border.color,o.border.width.toString(),"highlight"))}else this.removeShapeHighlightCollection(),this.setColor(y,t.isNullOrUndefined(o.fill)?y.getAttribute("fill"):o.fill,o.opacity.toString(),o.border.color,o.border.width.toString(),"highlight")}else if("selection"===a){var S=this.isTargetSelected(s,this.maps.legendSelectionCollection);if(f>0)for(v=0;v<this.maps.legendSelectionCollection.length;)if(s.LegendEle===this.maps.legendSelectionCollection[v].legendElement||o.enableMultiSelect)v++;else{var x=this.maps.legendSelectionCollection[v],O=this.maps.selectedLegendElementId.indexOf(r.actualIndex);this.maps.selectedLegendElementId.splice(O,1),this.maps.legendSelectionCollection.splice(v,1),ue(x.legendElement),this.maps.shapeSelections=!0,v=0}if(S&&S.IsSelected&&("ShapeselectionMapStyle"===e.getAttribute("class")||"LineselectionMapStyle"===e.getAttribute("class"))){var C=0;if(o.enableMultiSelect)for(m=0;m<s.Elements.length;m++)e.getAttribute("class")===s.Elements[m].getAttribute("class")&&C++;C<=1&&(o.enableMultiSelect||this.maps.legendSelection)&&(this.maps.selectedLegendElementId.splice(this.maps.selectedLegendElementId.indexOf(r.actualIndex),1),t.isNullOrUndefined(s.LegendEle)||ue(s.LegendEle),this.maps.legendSelectionCollection.splice(S.SelectionIndex,1),this.maps.shapeSelections=!0)}else{if((void 0===S||S&&!S.IsSelected)&&!t.isNullOrUndefined(y)){-1===(M=this.getIndexofLegend(this.maps.legendSelectionCollection,y))&&this.pushCollection(y,this.maps.legendSelectionCollection,l[r.actualIndex],this.maps.layers[n].shapeSettings)}var _=!0;for(m=0;m<this.maps.selectedLegendElementId.length;m++)r.actualIndex===this.maps.selectedLegendElementId[m]&&(_=!1);if(_&&this.maps.selectedLegendElementId.push(r.actualIndex),this.maps.legendSelectionClass=o,this.removeLegend(this.shapeHighlightCollection),!t.isNullOrUndefined(y)){this.setColor(y,t.isNullOrUndefined(o.fill)?y.getAttribute("fill"):o.fill,o.opacity.toString(),o.border.color,o.border.width.toString(),"selection");var M=this.getIndexofLegend(this.maps.legendSelectionCollection,y);this.maps.legendSelectionCollection[M].MapShapeCollection.Elements.push(e)}this.maps.shapeSelections=!1}}else document.getElementsByClassName("highlightMapStyle").length>0&&(this.removeShapeHighlightCollection(),ue(document.getElementsByClassName("highlightMapStyle")[0]))}}else this.removeShapeHighlightCollection()},e.prototype.isTargetSelected=function(e,i){for(var o,a=0;a<i.length;a++)t.isNullOrUndefined(e.LegendEle.getAttribute("id"))||e.LegendEle.getAttribute("id")!==i[a].legendElement.getAttribute("id")||(o={IsSelected:!0,SelectionIndex:a});return o},e.prototype.updateLegendElement=function(){for(var e=0;e<this.maps.legendSelectionCollection.length;e++)document.getElementById(this.maps.legendSelectionCollection[e].legendElement.id)&&(this.maps.legendSelectionCollection[e].legendElement=document.getElementById(this.maps.legendSelectionCollection[e].legendElement.id))},e.prototype.getIndexofLegend=function(e,t){return e.map(function(e){return e.legendElement}).indexOf(t)},e.prototype.removeAllSelections=function(){for(var e=0;e<this.maps.selectedElementId.length;e++){ue(o=document.getElementById(this.maps.selectedElementId[e]))}for(var i=0;i<this.maps.selectedLegendElementId.length;i++){var o=("Interactive"===this.maps.legendSettings.mode?this.maps.element.id+"_Legend_Index_":this.maps.element.id+"_Legend_Shape_Index_")+this.maps.selectedLegendElementId[i],a=document.getElementById(o);t.isNullOrUndefined(a)||ue(document.getElementById(o))}this.maps.legendSelectionCollection=[],this.maps.selectedLegendElementId=[],this.maps.selectedElementId=[]},e.prototype.legendIndexOnShape=function(e,i){var o,a,n,l=e[this.maps.layers[i].shapeDataPath],r=this.maps.legendSettings.mode,s=this.maps.legendModule.legendCollection;"Default"!==r||t.isNullOrUndefined(this.maps.legendModule.totalPages)||(n=this.maps.legendModule.totalPages[this.maps.legendModule.currentPage].Collection);for(var d="Default"===r?n.length:1,p=0;p<s.length;p++){for(var h=s[p].data,m=0;m<d;m++)if("Default"!==r||s[p].text===n[m].DisplayText)for(var c=0;c<h.length;c++)l===h[c].name&&(o=m);for(c=0;c<h.length;c++)l===h[c].name&&(a=p)}return{currentIndex:o,actualIndex:a}},e.prototype.shapeDataOnLegend=function(e){for(var i,o,a,n,l=this.maps.legendModule.legendCollection,r=this.maps.legendSettings,s=0;s<l.length;s++){for(var d=l[s].data,p=!1,h=[],m={Elements:[]},c=0;c<d.length;c++){var u=void 0;i=d[c].shapeIndex,o=d[c].layerIndex,a=d[c].dataIndex,e===(u=-1===(n=d[c].pointIndex)?document.getElementById(this.maps.element.id+"_LayerIndex_"+o+"_shapeIndex_"+i+"_dataIndex_"+a):document.getElementById(this.maps.element.id+"_LayerIndex_"+o+"_shapeIndex_"+i+"_dataIndex_"+a+"_multiLine_"+n))&&(p=!0),h.push(u)}if(p)return t.isNullOrUndefined(m.LegendEle)&&(m.LegendEle="Default"===r.mode?document.getElementById(this.maps.element.id+"_Legend_Shape_Index_"+s):document.getElementById(this.maps.element.id+"_Legend_Index_"+s)),m.Elements=h,m}return null},e.prototype.shapesOfLegend=function(e){for(var i,o,a,n,l=parseFloat(e.id.charAt(e.id.length-1)),r=this.maps.legendModule.legendCollection[l].data,s=[],d=0;d<r.length;d++){var p=void 0;i=r[d].shapeIndex,o=r[d].layerIndex,a=r[d].dataIndex,p=-1===(n=r[d].pointIndex)?document.getElementById(this.maps.element.id+"_LayerIndex_"+o+"_shapeIndex_"+i+"_dataIndex_"+a):document.getElementById(this.maps.element.id+"_LayerIndex_"+o+"_shapeIndex_"+i+"_dataIndex_"+a+"_multiLine_"+n),t.isNullOrUndefined(p)||s.push(p.id)}return s},e.prototype.legendToggle=function(){var e=this.maps,i=e.legendSettings;if(this.maps.selectedLegendElementId)for(var o=0;o<this.maps.selectedLegendElementId.length;o++){var a="Interactive"===i.mode?this.maps.element.id+"_Legend_Index_":this.maps.element.id+"_Legend_Shape_Index_",n=e.svgObject.querySelector("#"+a+this.maps.selectedLegendElementId[o]);if(!t.isNullOrUndefined(n)){var l=t.isNullOrUndefined(this.maps.legendSelectionClass.fill)?n.getAttribute("fill"):this.maps.legendSelectionClass.fill;this.setColor(n,l,this.maps.legendSelectionClass.opacity.toString(),this.maps.legendSelectionClass.border.color,this.maps.legendSelectionClass.border.width.toString(),"selection");for(var r=0;r<this.maps.legendSelectionCollection.length;r++)this.maps.legendSelectionCollection[r].legendElement.id===n.id&&(this.maps.legendSelectionCollection[r].legendElement=n);if(-1===this.getIndexofLegend(this.maps.legendSelectionCollection,n)){var s=this.maps.legendModule.legendCollection[this.maps.selectedLegendElementId[o]].data[o].layerIndex;this.pushCollection(n,this.maps.legendSelectionCollection,this.maps.legendModule.legendCollection[this.maps.selectedLegendElementId[o]],this.maps.layers[s].shapeSettings)}}}if(this.maps.toggledLegendId)for(o=0;o<this.maps.toggledLegendId.length;o++){var d="Interactive"===i.mode?"#"+this.maps.element.id+"_Legend_Index_"+this.maps.toggledLegendId[o]+"_Text":"#"+this.maps.element.id+"_Legend_Text_Index_"+this.maps.toggledLegendId[o],p=e.svgObject.querySelector(d);t.isNullOrUndefined(p)||p.setAttribute("fill","#E5E5E5");var h="Interactive"===i.mode?"#"+this.maps.element.id+"_Legend_Index_"+this.maps.toggledLegendId[o]:"#"+this.maps.element.id+"_Legend_Shape_Index_"+this.maps.toggledLegendId[o],m=e.svgObject.querySelector(h);t.isNullOrUndefined(m)||m.setAttribute("fill","#E5E5E5")}},e.prototype.renderLegendBorder=function(){var e=this.maps,i=e.legendSettings,o=i.title.text,a={fontFamily:i.titleStyle.fontFamily,fontStyle:i.titleStyle.fontStyle,fontWeight:i.titleStyle.fontWeight,size:i.titleStyle.size,color:i.titleStyle.color,opacity:i.titleStyle.opacity},n=Y(this.legendItemRect.width+20,o,a),l=x(n,a);this.legendBorderRect=new et(this.legendItemRect.x-10,this.legendItemRect.y-10-l.height,this.legendItemRect.width+20,this.legendItemRect.height+20+l.height+("Interactive"===i.mode?0:0!==this.page?10:0));var r={color:i.border.color,width:i.border.width,opacity:i.border.opacity};r.opacity=t.isNullOrUndefined(r.opacity)?1:r.opacity;var s=new Xe(e.element.id+"_Legend_Border",i.background,r,1,this.legendBorderRect,null,null,"","");this.legendGroup.appendChild(e.renderer.drawRectangle(s)),this.getLegendAlignment(e,this.legendBorderRect.width,this.legendBorderRect.height,i),this.legendGroup.setAttribute("transform","translate( "+(this.translate.x+-this.legendBorderRect.x)+" "+(this.translate.y+-this.legendBorderRect.y)+" )"),"Float"!==i.position&&e.svgObject.appendChild(this.legendGroup),o&&(a.color=null!==a.color?a.color:this.maps.themeStyle.legendTitleFontColor,a.fontFamily=t.isNullOrUndefined(a.fontFamily)?this.maps.themeStyle.fontFamily:a.fontFamily,a.size=t.isNullOrUndefined(a.size)?this.maps.themeStyle.subTitleFontSize||Ue.legendTitleFont.size:a.size,a.fontWeight=t.isNullOrUndefined(a.fontWeight)?this.maps.themeStyle.titleFontWeight||Ue.legendTitleFont.fontWeight:a.fontWeight,O(new He(e.element.id+"_LegendTitle",this.legendItemRect.x+this.legendItemRect.width/2,this.legendItemRect.y-l.height/2-5,"middle",n,""),a,a.color,this.legendGroup))},e.prototype.changeNextPage=function(e){this.currentPage=e.target.id.indexOf("_Left_Page_")>-1?this.currentPage-1:this.currentPage+1,this.legendGroup=this.maps.renderer.createGroup({id:this.maps.element.id+"_Legend_Group"}),this.maps.mapAreaRect=this.initialMapAreaRect,this.drawLegendItem(this.currentPage),t.isNullOrUndefined(this.maps.legendModule)||"Float"!==this.maps.legendSettings.position||(this.maps.isTileMap?this.maps.mapLayerPanel.layerGroup.appendChild(this.maps.legendModule.legendGroup):this.maps.svgObject.appendChild(this.maps.legendModule.legendGroup)),de(this.maps.element.id+"_Legend_Border",this.maps.element.id)&&(de(this.maps.element.id+"_Legend_Border",this.maps.element.id).style.pointerEvents="none")},e.prototype.getLegendAlignment=function(e,i,o,a){var n,l,r,s=(r=t.extend({},e.mapAreaRect,r,!0)).x,d=r.y,p=r.height,h=r.width,m=e.availableSize.width,c=e.availableSize.height,u=t.isNullOrUndefined(a.location.x)?0:a.location.x,g=t.isNullOrUndefined(a.location.y)?0:a.location.y;if("Float"===a.position)this.translate=e.isTileMap?new Ze(u,g+2.5):new Ze(u+e.mapAreaRect.x,g+e.mapAreaRect.y),this.legendTotalRect=e.mapAreaRect;else{switch(a.position){case"Top":case"Bottom":r.height="Top"===a.position?p-o:p-o-20,n=m/2-i/2,l="Top"===a.position?d:d+r.height,r.y="Top"===a.position?d+o+(e.isTileMap?5:10):d-5;break;case"Left":case"Right":r.width=h-i-e.mapAreaRect.x,n="Left"===a.position?s+5:s+r.width+10,l=c/2-o/2,r.x="Left"===a.position?s+i+10:s}switch(a.alignment){case"Near":"Top"===a.position||"Bottom"===a.position?n=r.x-("Interactive"===a.mode?10:0):l=r.y-(a.height&&a.width||"Interactive"!==a.mode?0:e.mapAreaRect.x);break;case"Far":"Top"===a.position||"Bottom"===a.position?n=m-i-("Interactive"===a.mode?0:10):l=c-o-("Default"===a.mode?10:0)}(a.height||a.width)&&"Interactive"!==a.mode?this.legendTotalRect=e.mapAreaRect=e.totalRect=r:(e.totalRect=null,(a.height||a.width)&&"Interactive"===a.mode&&(e.totalRect=r),this.legendTotalRect=e.mapAreaRect=r),"Left"===a.position&&(e.mapAreaRect.width=r.width),this.translate=new Ze(n,l)}},e.prototype.getMarkersLegendCollections=function(e,i){var o=this;Array.prototype.forEach.call(i,function(i,a){var n=i.dataSource,l=i.legendText;Array.prototype.forEach.call(n,function(n,r){var s=!!t.isNullOrUndefined(n[o.maps.legendSettings.showLegendPath])||n[o.maps.legendSettings.showLegendPath];if(i.visible&&s&&!t.isNullOrUndefined(n.latitude)&&!t.isNullOrUndefined(n.longitude)){if(i.template){var d=ae(i.template,o.maps)(o.maps);(t.isNullOrUndefined(d.childElementCount)?d[0]:d).querySelector("img").src}var p=t.isNullOrUndefined(n[l])?"":n[l],h=t.isNullOrUndefined(i.colorValuePath)?i.fill:n[i.colorValuePath],m=[];o.maps.legendSettings.removeDuplicateLegend?(m.push(o.getMarkerLegendData(e,p,h)),o.getOverallLegendItemsCollection(p,h,m,s)):(m.push({layerIndex:e,markerIndex:a,dataIndex:r,value:h,name:p,shape:t.isNullOrUndefined(i.shapeValuePath)||t.isNullOrUndefined(n[i.shapeValuePath])||""===n[i.shapeValuePath]?o.maps.legendSettings.useMarkerShape?i.shape:o.maps.legendSettings.shape:n[i.shapeValuePath]}),o.getOverallLegendItemsCollection(p,h,m,s))}})})},e.prototype.getMarkerLegendData=function(e,i,o){var a=this,n=[];return this.maps.layers[e].markerSettings.map(function(l,r){var s=l.dataSource;Array.prototype.forEach.call(s,function(l,s){var d=a.maps.layers[e].markerSettings[r];i!==l[d.legendText]&&""!==i||o!==l[d.colorValuePath]||n.push({layerIndex:e,markerIndex:r,dataIndex:s,value:o,name:i,shape:t.isNullOrUndefined(d.shapeValuePath)?d.shape:l[d.shapeValuePath]})})}),n},e.prototype.getRangeLegendCollection=function(e,i,o,a,n,l,r){for(var s,d=this,p=0,h=this.maps.legendSettings.fill,m=[],c=function(o){if(!t.isNullOrUndefined(o.from)&&!t.isNullOrUndefined(o.to)){s=t.isNullOrUndefined(o.label)?o.from+" - "+o.to:o.label,m=[];var c=!1;Array.prototype.forEach.call(a,function(t,a){var s=l.indexOf(".")>-1?Number(w(t,l)):parseFloat(t[l]);s>=o.from&&s<=o.to&&(c=!0,m.push(d.getLegendData(e,a,t,n,i,r,s)))}),c||m.push({layerIndex:e,shapeIndex:null,dataIndex:null,name:null,value:null});var g=t.isNullOrUndefined(h)?"[object Array]"===Object.prototype.toString.call(o.color)?t.isNullOrUndefined(o.value)?u.legendGradientColor(o,p):o.color[0]:o.color:h;p++,u.getOverallLegendItemsCollection(s,g,m,o.showLegend)}},u=this,g=0,y=o;g<y.length;g++){c(y[g])}},e.prototype.getOverallLegendItemsCollection=function(e,t,i,o){var a=[],n=this.maps.legendSettings;if(i.length>0&&o){for(var l=0;l<i.length;l++){var r=i[l];if(r.length>0)for(var s=0;s<r.length;s++)a.push(r[s]);else a.push(i[l]);a._isVisible=!0}if(!!this.maps.legendSettings.removeDuplicateLegend&&this.removeDuplicates(this.legendCollection,e,t))for(l=0;l<this.legendCollection.length;l++)this.legendCollection[l].text===e&&this.legendCollection[l].fill===t&&this.legendCollection[l].data.push(a[0]);else this.legendCollection.push({text:e,fill:t,data:a,opacity:n.opacity,borderColor:n.shapeBorder.color,borderWidth:n.shapeBorder.width})}},e.prototype.removeDuplicates=function(e,t,i){for(var o=!1,a=0;a<e.length;a++)if((e[a].text===t||""===e[a].text)&&e[a].fill===i){o=!0;break}return o},e.prototype.getEqualLegendCollection=function(e,i,o,a,n,l,r){for(var s,d=this,p=this.maps.legendSettings.fill,h=[],m=[],c=[],u=[],g=function(g){if(t.isNullOrUndefined(g.value)){if(t.isNullOrUndefined(g.minOpacity)&&t.isNullOrUndefined(g.maxOpacity)&&t.isNullOrUndefined(g.value)&&t.isNullOrUndefined(g.from)&&t.isNullOrUndefined(g.to)&&!t.isNullOrUndefined(g.color)){if(Array.prototype.forEach.call(a,function(t,o){for(var a=l.indexOf(".")>-1?w(t,l):t[l],s=0;s<c.length;s++)a===c[s]&&u.push(d.getLegendData(e,o,t,n,i,r,a))}),0===c.length){var f=!1;Array.prototype.forEach.call(a,function(a,s){f=!1;for(var p=a[l],h=0;h<o.length;h++)t.isNullOrUndefined(p)||isNaN(p)?f||(f=!1):p>=o[h].from&&p<=o[h].to&&(f=!0);f||u.push(d.getLegendData(e,s,a,n,i,r,p))})}s=t.isNullOrUndefined(g.label)?"Others":g.label;var b="[object Array]"===Object.prototype.toString.call(g.color)?g.color[0]:g.color;y.getOverallLegendItemsCollection(s,b,u,g.showLegend)}}else{s=t.isNullOrUndefined(g.label)?g.value:g.label,m=[];var v=!1;Array.prototype.forEach.call(a,function(t,o){var a=l.indexOf(".")>-1?w(t,l):t[l];a===g.value?(v=!0,-1===h.indexOf(a)&&h.push(a),m.push(d.getLegendData(e,o,t,n,i,r,a))):-1===c.indexOf(a)&&c.push(a)});for(var S=0;S<h.length;S++)for(var x=0;x<c.length;x++)if(h[S]===c[x]){var O=c.indexOf(h[S]);c.splice(O,1)}v||m.push({layerIndex:e,shapeIndex:null,dataIndex:null,name:null,value:null});var C=t.isNullOrUndefined(p)?"[object Array]"===Object.prototype.toString.call(g.color)?g.color[0]:g.color:p;y.getOverallLegendItemsCollection(s,C,m,g.showLegend)}},y=this,f=0,b=o;f<b.length;f++){g(b[f])}},e.prototype.getDataLegendCollection=function(e,i,o,a,n,l,r){var s,d=this,p=this.maps.legendSettings.fill,h=this.maps.legendSettings.valuePath;t.isNullOrUndefined(l)||t.isNullOrUndefined(a)||Array.prototype.forEach.call(a,function(a,m){var c=!!t.isNullOrUndefined(d.maps.legendSettings.showLegendPath)||!t.isNullOrUndefined(a[d.maps.legendSettings.showLegendPath])&&a[d.maps.legendSettings.showLegendPath],u=l.indexOf(".")>-1?w(a,l):a[l],g=[],y=t.isNullOrUndefined(p)?u:p;t.isNullOrUndefined(u)||0!==o.length||(s=t.isNullOrUndefined(a[h])?n.indexOf(".")>-1?w(a,n):a[n]:h.indexOf(".")>-1?w(a,h):a[h],g.push(d.getLegendData(e,m,a,n,i,r,u))),d.getOverallLegendItemsCollection(s,y,g,c)})},e.prototype.interactiveHandler=function(e){var i=e.target,o=this.maps.legendSettings,a=this.maps.element.id+"_Interactive_Legend",n="Layers"===o.type?"_shapeIndex_":"Markers"===o.type?"_MarkerIndex_":"_BubbleIndex_";if(i.id.indexOf(n)>1){var l=parseFloat(i.id.split("_LayerIndex_")[1].split("_")[0]),r=parseFloat(i.id.split(/_dataIndex_/i)[1].split("_")[0]),s=void 0,d=void 0,p=void 0;t.isNullOrUndefined(de(a,this.maps.element.id))||t.remove(de(a,this.maps.element.id));var h=this.maps.layersCollection[l],m="Layers"===o.type?h.visible:"Markers"===o.type?h.markerSettings[parseFloat(i.id.split("_MarkerIndex_")[1].split("_")[0])].visible:this.maps.getBubbleVisible(this.maps.layersCollection[l]);if(o.visible&&this.legendRenderingCollections.length>0&&"Interactive"===o.mode&&m)for(var c=this.maps.svgObject.getBoundingClientRect(),u=0;u<this.legendCollection.length;u++){var g=this.legendCollection[u],y=de(this.maps.element.id+"_Legend_Index_"+u,this.maps.element.id),f=y.getBoundingClientRect(),b=new et(Math.abs(f.left-c.left),Math.abs(f.top-c.top),f.width,f.height);if(s=y.getAttribute("fill"),d=o.shapeBorder.color,p=o.shapeBorder.width,!t.isNullOrUndefined(g.data))for(var v=g.data,S=0;S<v.length;S++)if(r===v[S].dataIndex&&l===v[S].layerIndex){this.renderInteractivePointer(o,s,d,a,p,b);break}}}else t.isNullOrUndefined(de(a,this.maps.element.id))||t.remove(de(a,this.maps.element.id))},e.prototype.renderInteractivePointer=function(e,t,i,o,a,n){var l,r,s,d="None"===e.orientation?"Top"===e.position||"Bottom"===e.position?"Horizontal":"Vertical":e.orientation;n.y="Float"===e.position&&this.maps.isTileMap?n.y-this.maps.mapAreaRect.y:n.y,l="Horizontal"===d?e.invertedPointer?" M "+(r=n.x+n.width/2-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(s=n.y+n.height)+" L "+(r-10)+" "+(s+10)+" L "+(r+10)+" "+(s+10)+" Z ":" M "+(r=n.x+n.width/2-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(s=n.y)+" L "+(r-10)+" "+(s-10)+" L "+(r+10)+" "+(s-10)+" Z ":e.invertedPointer?" M "+(r=n.x-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(s=n.y+n.height/2)+" L "+(r-10)+" "+(s-10)+" L "+(r-10)+" "+(s+10)+" z ":" M "+(r=n.x+n.width-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(s=n.y+n.height/2)+" L "+(r+10)+" "+(s-10)+" L "+(r+10)+" "+(s+10)+" z ";var p=new Ge(o,t,a,i,1,1,"",l);"Float"===e.position&&this.maps.isTileMap?this.maps.mapLayerPanel.layerGroup.appendChild(this.maps.renderer.drawPath(p)):this.maps.svgObject.appendChild(this.maps.renderer.drawPath(p))},e.prototype.wireEvents=function(e){t.EventHandler.add(e,t.Browser.touchStartEvent,this.changeNextPage,this)},e.prototype.addEventListener=function(){this.maps.isDestroyed||(this.maps.on(t.Browser.touchMoveEvent,this.interactiveHandler,this),this.maps.on(t.Browser.touchEndEvent,this.interactiveHandler,this),this.maps.on(Vt,this.legendClick,this))},e.prototype.markerToggleSelection=function(e,i,o,a){e.setAttribute("fill",this.legendCollection[a].fill),e.setAttribute("stroke",this.maps.layers[i].markerSettings[o].border.color),e.setAttribute("fill-opacity",this.maps.layers[i].markerSettings[o].opacity.toString()),e.setAttribute("stroke-width",this.maps.layers[i].markerSettings[o].border.width.toString()),e.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[i].markerSettings[o].border.opacity)?this.maps.layers[i].markerSettings[o].opacity:this.maps.layers[i].markerSettings[o].border.opacity).toString())},e.prototype.bubbleToggleSelection=function(e,i,o,a){e.setAttribute("fill",this.legendCollection[a].fill),e.setAttribute("stroke",this.maps.layers[i].bubbleSettings[o].border.color),e.setAttribute("fill-opacity",this.maps.layers[i].bubbleSettings[o].opacity.toString()),e.setAttribute("stroke-width",this.maps.layers[i].bubbleSettings[o].border.width.toString()),e.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[i].bubbleSettings[o].border.opacity)?this.maps.layers[i].bubbleSettings[o].opacity:this.maps.layers[i].bubbleSettings[o].border.opacity).toString())},e.prototype.legendClick=function(e){var i,o,a=this.maps.legendSettings.toggleLegendSettings.fill,n=this.maps.legendSettings.toggleLegendSettings.opacity,l=this.maps.legendSettings.toggleLegendSettings.border.color,r=this.maps.legendSettings.toggleLegendSettings.border.width,s=t.isNullOrUndefined(this.maps.legendSettings.toggleLegendSettings.border.opacity)?this.maps.legendSettings.toggleLegendSettings.opacity:this.maps.legendSettings.toggleLegendSettings.border.opacity;if(e.parentNode.id.indexOf(this.maps.element.id+"_Legend_Index_")>-1){var d=void 0,p=parseFloat(e.parentElement.id.substr((this.maps.element.id+"_Legend_Index_").length)),h=(v=this.legendCollection[p].data)._isVisible,m=void 0;if(this.maps.legendSettings.toggleLegendSettings.enable&&("Bubbles"===this.maps.legendSettings.type||"Markers"===this.maps.legendSettings.type))for(var c=0;c<this.maps.layers.length;c++)for(var u=0;u<("Bubbles"===this.maps.legendSettings.type?this.maps.layers[c].bubbleSettings.length:this.maps.layers[c].markerSettings.length);u++){for(var g=0;g<v.length;g++)m=this.legendCollection[p].data[g],d="Bubbles"===this.maps.legendSettings.type?de(this.maps.element.id+"_LayerIndex_"+m.layerIndex+"_BubbleIndex_"+u+"_dataIndex_"+m.dataIndex,this.maps.element.id):de(this.maps.element.id+"_LayerIndex_"+m.layerIndex+"_MarkerIndex_"+m.markerIndex+"_dataIndex_"+m.dataIndex,this.maps.element.id),t.isNullOrUndefined(m.shape)||"Balloon"!==m.shape||(d=(d="Bubbles"===this.maps.legendSettings.type?de(this.maps.element.id+"_LayerIndex_"+m.layerIndex+"_BubbleIndex_"+u+"_dataIndex_"+m.dataIndex+"_Group",this.maps.element.id):de(this.maps.element.id+"_LayerIndex_"+m.layerIndex+"_MarkerIndex_"+m.markerIndex+"_dataIndex_"+m.dataIndex+"_Group",this.maps.element.id)).children[0]),h&&null!==d?(this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(d.setAttribute("fill",this.maps.layers[c].shapeSettings.fill),d.setAttribute("stroke",this.maps.layers[c].shapeSettings.border.color),d.setAttribute("fill-opacity",this.maps.layers[c].shapeSettings.opacity.toString()),d.setAttribute("stroke-width",(t.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width).toString()),d.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.opacity)?this.maps.layers[c].shapeSettings.opacity:this.maps.layers[c].shapeSettings.border.opacity).toString())):(d.setAttribute("fill",a),d.setAttribute("fill-opacity",n.toString()),d.setAttribute("stroke",l),d.setAttribute("stroke-width",r.toString()),d.setAttribute("stroke-opacity",s.toString())),null!==e&&(i=de(this.maps.element.id+"_Legend_Shape_Index_"+p,this.maps.element.id),o=de(this.maps.element.id+"_Legend_Text_Index_"+p,this.maps.element.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?this.setToggleAttributes(o,i,this.maps.layers[c].shapeSettings.fill,this.maps.layers[c].shapeSettings.opacity,this.maps.layers[c].shapeSettings.border.color,t.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width,t.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.opacity)?this.maps.layers[c].shapeSettings.opacity:this.maps.layers[c].shapeSettings.border.opacity,this.maps.layers[c].shapeSettings.fill):this.setToggleAttributes(o,i,a,n,l,r,s,a))):("Markers"===this.maps.legendSettings.type?this.markerToggleSelection(d,c,u,p):this.bubbleToggleSelection(d,c,u,p),null!==e&&(i=de(this.maps.element.id+"_Legend_Shape_Index_"+p,this.maps.element.id),o=de(this.maps.element.id+"_Legend_Text_Index_"+p,this.maps.element.id),this.setToggleAttributes(o,i,this.legendCollection[p].fill,this.legendCollection[p].opacity,this.legendCollection[p].shapeBorder.color,this.legendCollection[p].shapeBorder.width,this.legendCollection[p].shapeBorder.opacity,"#757575"),"HorizontalLine"!==this.maps.legendSettings.shape&&"VerticalLine"!==this.maps.legendSettings.shape&&"Cross"!==this.maps.legendSettings.shape||i.setAttribute("stroke",this.legendCollection[p].fill)));v._isVisible=!h}if("Layers"===this.maps.legendSettings.type&&this.maps.legendSettings.toggleLegendSettings.enable){var y=void 0;this.removeCollections(e,p);var f=this.maps.toggledLegendId.indexOf(p);-1!==f&&(h=!1);for(u=0;u<this.maps.layers.length;u++)for(g=0;g<v.length;g++)if(m=this.legendCollection[p].data[g],null!==(y=de(this.maps.element.id+"_LayerIndex_"+m.layerIndex+"_shapeIndex_"+m.shapeIndex+"_dataIndex_"+m.dataIndex,this.maps.element.id))){var b=this.maps.toggledShapeElementId.indexOf(y.id);h?(0===g&&this.maps.toggledLegendId.push(p),-1===b&&this.maps.toggledShapeElementId.push(y.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(y.setAttribute("fill",this.maps.layers[u].shapeSettings.fill),y.setAttribute("fill-opacity",this.maps.layers[u].shapeSettings.opacity.toString()),y.setAttribute("stroke",this.maps.layers[u].shapeSettings.border.color),y.setAttribute("stroke-width",(t.isNullOrUndefined(this.maps.layers[u].shapeSettings.border.width)?0:this.maps.layers[u].shapeSettings.border.width).toString()),y.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[u].shapeSettings.border.opacity)?this.maps.layers[u].shapeSettings.opacity:this.maps.layers[u].shapeSettings.border.opacity).toString())):(y.setAttribute("fill",a),y.setAttribute("fill-opacity",n.toString()),y.setAttribute("stroke",l),y.setAttribute("stroke-width",r.toString()),y.setAttribute("stroke-opacity",s.toString())),null!==e&&(o=de(this.maps.element.id+"_Legend_Text_Index_"+p,this.maps.element.id),i=de(this.maps.element.id+"_Legend_Shape_Index_"+p,this.maps.element.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?this.setToggleAttributes(o,i,this.maps.layers[u].shapeSettings.fill,this.maps.layers[u].shapeSettings.opacity,this.maps.layers[u].shapeSettings.border.color,t.isNullOrUndefined(this.maps.layers[u].shapeSettings.border.width)?0:this.maps.layers[u].shapeSettings.border.width,t.isNullOrUndefined(this.maps.layers[u].shapeSettings.border.opacity)?this.maps.layers[u].shapeSettings.opacity:this.maps.layers[u].shapeSettings.border.opacity,this.maps.layers[u].shapeSettings.fill):this.setToggleAttributes(o,i,a,n,l,r,s,a))):(-1!==f&&0===g&&this.maps.toggledLegendId.splice(f,1),-1!==b&&this.maps.toggledShapeElementId.splice(b,1),y.setAttribute("fill",this.legendCollection[p].fill),y.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[u].shapeSettings.border.opacity)?this.maps.layers[u].shapeSettings.opacity:this.maps.layers[u].shapeSettings.border.opacity).toString()),y.setAttribute("stroke-width",(t.isNullOrUndefined(this.maps.layers[u].shapeSettings.border.width)?0:this.maps.layers[u].shapeSettings.border.width).toString()),y.setAttribute("fill-opacity",this.maps.layers[u].shapeSettings.opacity.toString()),y.setAttribute("stroke",this.maps.layers[u].shapeSettings.border.color),null!==e&&(o=de(this.maps.element.id+"_Legend_Text_Index_"+p,this.maps.element.id),i=de(this.maps.element.id+"_Legend_Shape_Index_"+p,this.maps.element.id),this.setToggleAttributes(o,i,this.legendCollection[p].fill,this.legendCollection[p].opacity,this.legendCollection[p].shapeBorder.color,this.legendCollection[p].shapeBorder.width,this.legendCollection[p].shapeBorder.opacity,"#757575")))}v._isVisible=!h}}else if(!t.isNullOrUndefined(e.id)&&(e.id.indexOf(this.maps.element.id+"_Legend_Shape_Index")>-1||-1!==e.id.indexOf(this.maps.element.id+"_Legend_Index"))&&this.maps.legendSettings.visible&&-1===e.id.indexOf("_Text")){var v,S=void 0,x=(p=parseFloat(e.id.split(this.maps.element.id+"_Legend_Index_")[1]),void 0);h=(v=this.legendCollection[p].data)._isVisible;if(("Bubbles"===this.maps.legendSettings.type||"Markers"===this.maps.legendSettings.type)&&this.maps.legendSettings.toggleLegendSettings.enable)for(c=0;c<this.maps.layers.length;c++)for(u=0;u<("Bubbles"===this.maps.legendSettings.type?this.maps.layers[c].bubbleSettings.length:this.maps.layers[c].markerSettings.length);u++){for(g=0;g<v.length;g++)x=this.legendCollection[p].data[g],S="Bubbles"===this.maps.legendSettings.type?de(this.maps.element.id+"_LayerIndex_"+x.layerIndex+"_BubbleIndex_"+u+"_dataIndex_"+x.dataIndex,this.maps.element.id):de(this.maps.element.id+"_LayerIndex_"+x.layerIndex+"_MarkerIndex_"+u+"_dataIndex_"+x.dataIndex,this.maps.element.id),t.isNullOrUndefined(x.shape)||"Balloon"!==x.shape||(S=(S="Bubbles"===this.maps.legendSettings.type?de(this.maps.element.id+"_LayerIndex_"+x.layerIndex+"_BubbleIndex_"+u+"_dataIndex_"+x.dataIndex+"_Group",this.maps.element.id):de(this.maps.element.id+"_LayerIndex_"+x.layerIndex+"_MarkerIndex_"+u+"_dataIndex_"+x.dataIndex+"_Group",this.maps.element.id)).children[0]),h&&null!==S?(this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(S.setAttribute("fill",this.maps.layers[c].shapeSettings.fill),S.setAttribute("stroke",this.maps.layers[c].shapeSettings.border.color),S.setAttribute("stroke-width",(t.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width).toString()),S.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.opacity)?this.maps.layers[c].shapeSettings.opacity:this.maps.layers[c].shapeSettings.border.opacity).toString()),S.setAttribute("fill-opacity",this.maps.layers[c].shapeSettings.opacity.toString())):(S.setAttribute("fill",a),S.setAttribute("fill-opacity",n.toString()),S.setAttribute("stroke",l),S.setAttribute("stroke-width",r.toString()),S.setAttribute("stroke-opacity",s.toString())),null!==e&&(o=de(this.maps.element.id+"_Legend_Index_"+p+"_Text",this.maps.element.id),i=de(this.maps.element.id+"_Legend_Index_"+p,this.maps.element.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?this.setToggleAttributes(o,i,this.maps.layers[c].shapeSettings.fill,this.maps.layers[c].shapeSettings.opacity,this.maps.layers[c].shapeSettings.border.color,t.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width,t.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.opacity)?this.maps.layers[c].shapeSettings.opacity:this.maps.layers[c].shapeSettings.border.opacity,this.maps.layers[c].shapeSettings.fill):this.setToggleAttributes(o,i,a,n,l,r,s,a))):("Markers"===this.maps.legendSettings.type?this.markerToggleSelection(S,c,u,p):this.bubbleToggleSelection(S,c,u,p),null!==e&&((i=de(this.maps.element.id+"_Legend_Index_"+p,this.maps.element.id)).setAttribute("fill",this.legendCollection[p].fill),i.setAttribute("fill-opacity",this.legendCollection[p].opacity),i.setAttribute("stroke",this.legendCollection[p].shapeBorder.color),i.setAttribute("stroke-width",this.legendCollection[p].shapeBorder.width),i.setAttribute("stroke-opacity",this.legendCollection[p].shapeBorder.opacity),(o=de(this.maps.element.id+"_Legend_Index_"+p+"_Text",this.maps.element.id)).setAttribute("fill","#757575")));v._isVisible=!h}if("Layers"===this.maps.legendSettings.type&&this.maps.legendSettings.toggleLegendSettings.enable){var O=void 0;this.removeCollections(e,p);var C=this.maps.toggledLegendId.indexOf(p);-1!==C&&(h=!1);for(c=0;c<this.maps.layers.length;c++)for(g=0;g<v.length;g++)if(x=this.legendCollection[p].data[g],null!==(O=de(this.maps.element.id+"_LayerIndex_"+x.layerIndex+"_shapeIndex_"+x.shapeIndex+"_dataIndex_"+x.dataIndex,this.maps.element.id))){b=this.maps.toggledShapeElementId.indexOf(O.id);h?(0===g&&this.maps.toggledLegendId.push(p),-1===b&&this.maps.toggledShapeElementId.push(O.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(O.setAttribute("fill",this.maps.layers[0].shapeSettings.fill),O.setAttribute("stroke",this.maps.layers[0].shapeSettings.border.color),O.setAttribute("fill-opacity",this.maps.layers[c].shapeSettings.opacity.toString()),O.setAttribute("stroke-width",(t.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width).toString()),O.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.opacity)?this.maps.layers[c].shapeSettings.opacity:this.maps.layers[c].shapeSettings.border.opacity).toString())):(O.setAttribute("fill",a),O.setAttribute("fill-opacity",n.toString()),O.setAttribute("stroke",l),O.setAttribute("stroke-width",r.toString()),O.setAttribute("stroke-opacity",s.toString())),null!==e&&(i=de(this.maps.element.id+"_Legend_Index_"+p,this.maps.element.id),o=de(this.maps.element.id+"_Legend_Index_"+p+"_Text",this.maps.element.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?this.setToggleAttributes(o,i,this.maps.layers[0].shapeSettings.fill,this.maps.layers[c].shapeSettings.opacity,this.maps.layers[0].shapeSettings.border.color,t.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width,t.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.opacity)?this.maps.layers[c].shapeSettings.opacity:this.maps.layers[c].shapeSettings.border.opacity,this.maps.layers[0].shapeSettings.fill):this.setToggleAttributes(o,i,a,n,l,r,s,a))):(-1!==C&&0===g&&this.maps.toggledLegendId.splice(C,1),-1!==b&&this.maps.toggledShapeElementId.splice(b,1),O.setAttribute("fill-opacity",this.maps.layers[c].shapeSettings.opacity.toString()),O.setAttribute("stroke-width",(t.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width).toString()),O.setAttribute("stroke",this.maps.layers[0].shapeSettings.border.color),O.setAttribute("stroke-opacity",(t.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.opacity)?this.maps.layers[c].shapeSettings.opacity:this.maps.layers[c].shapeSettings.border.opacity).toString()),O.setAttribute("fill",this.legendCollection[p].fill),null!==e&&(o=de(this.maps.element.id+"_Legend_Index_"+p+"_Text",this.maps.element.id),i=de(this.maps.element.id+"_Legend_Index_"+p,this.maps.element.id),this.setToggleAttributes(o,i,this.legendCollection[p].fill,this.legendCollection[p].opacity,this.legendCollection[p].shapeBorder.color,this.legendCollection[p].shapeBorder.width,this.legendCollection[p].shapeBorder.opacity,"#757575")))}v._isVisible=!h}}},e.prototype.removeCollections=function(e,t){this.removeLegendSelectionCollection(e);var i=this.getIndexofLegend(this.maps.legendSelectionCollection,e);-1!==i&&this.maps.legendSelectionCollection.splice(i,1);-1!==this.getIndexofLegend(this.legendHighlightCollection,e)&&this.legendHighlightCollection.splice(i,1);var o=this.getIndexofLegend(this.shapeHighlightCollection,e);-1!==o&&this.shapeHighlightCollection.splice(o,1);var a=this.maps.selectedLegendElementId.indexOf(t);-1!==a&&this.maps.selectedLegendElementId.splice(a,1)},e.prototype.removeEventListener=function(){this.maps.isDestroyed||(this.maps.off(t.Browser.touchMoveEvent,this.interactiveHandler),this.maps.off(t.Browser.touchEndEvent,this.interactiveHandler),this.maps.off(Vt,this.legendClick))},e.prototype.getLegendData=function(e,i,o,a,n,l,r){var s=[];if("[object Array]"===Object.prototype.toString.call(n))for(var d=0;d<n.length;d++){var p=n[d],h=a.indexOf(".")>-1?w(o,a):o[a],m=H(o[a],l,p.properties),c=t.isNullOrUndefined(h)||"string"!=typeof h?h:h.toLowerCase();if((!t.isNullOrUndefined(p.properties[m])&&isNaN(p.properties[m])?p.properties[m].toLowerCase():p.properties[m])===c)if("MultiPoint"!==p.geometry.type)s.push({layerIndex:e,shapeIndex:d,dataIndex:i,name:o[a],value:r,pointIndex:-1});else for(var u=0;u<p.geometry.coordinates.length;u++)s.push({layerIndex:e,shapeIndex:d,dataIndex:i,name:o[a],value:r,pointIndex:u})}return s},e.prototype.setToggleAttributes=function(e,i,o,a,n,l,r,s){e.setAttribute("fill",s),i.setAttribute("fill",o),i.setAttribute("fill-opacity",a.toString()),i.setAttribute("stroke",n),i.setAttribute("stroke-width",l.toString()),t.isNullOrUndefined(r)||i.setAttribute("stroke-opacity",r.toString())},e.prototype.legendGradientColor=function(e,i){var o,a="http://www.w3.org/2000/svg";if(!t.isNullOrUndefined(e.color)&&"object"==typeof e.color){var n=document.createElementNS(a,"linearGradient"),l=this.maps.legendSettings.position,r="Top"===l||"Bottom"===l?"100":"0",s="Top"===l||"Bottom"===l?"0":"100";n.setAttribute("id","linear_"+i+"_"+this.maps.element.id),n.setAttribute("x1","0%"),n.setAttribute("y1","0%"),n.setAttribute("x2",r+"%"),n.setAttribute("y2",s+"%");for(var d=0;d<e.color.length;d++){var p=100/(e.color.length-1),h=document.createElementNS(a,"stop");h.setAttribute("offset",d*p+"%"),h.setAttribute("stop-color",e.color[d]),h.setAttribute("stop-opacity",1..toString()),n.appendChild(h)}this.legendLinearGradient=n;var m="url(#linear_"+i+"_"+this.maps.element.id+")";this.defsElement.appendChild(n),o=m}return o},e.prototype.getModuleName=function(){return"Legend"},e.prototype.destroy=function(){this.legendCollection=[],this.legendRenderingCollections=[],this.translate=null,this.legendBorderRect=null,this.initialMapAreaRect=null,this.legendTotalRect=null,this.totalPages=[],this.legendItemRect=null,this.legendGroup=null,this.shapeHighlightCollection=[],this.legendHighlightCollection=[],this.shapePreviousColor=[],this.selectedNonLegendShapes=[],this.legendLinearGradient=null,this.currentLayer=null,this.defsElement=null,this.legendElement=[],this.oldShapeElement=null,this.removeEventListener(),this.maps=null},e}(),bi=function(){function e(e){this.maps=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.maps.isDestroyed||(this.maps.on(t.Browser.touchMoveEvent,this.mouseMove,this),this.maps.on(t.Browser.touchStartEvent,this.mouseMove,this))},e.prototype.removeEventListener=function(){this.maps.isDestroyed||(this.maps.off(t.Browser.touchMoveEvent,this.mouseMove),this.maps.off(t.Browser.touchStartEvent,this.mouseMove))},e.prototype.addHighlight=function(e,t,i){var o=pe(e,t,0,this.maps);i?this.mapHighlight(o,null,null):ue(o)},e.prototype.mouseMove=function(e){var i,o=e.target,a="touch"===e.pointerType||"2"===e.pointerType||e.type.indexOf("touch")>-1;if((-1!==o.id.indexOf("LayerIndex")||o.id.indexOf("NavigationIndex")>-1)&&"ShapeselectionMapStyle"!==o.getAttribute("class")&&!a&&"MarkerselectionMapStyle"!==o.getAttribute("class")&&"BubbleselectionMapStyle"!==o.getAttribute("class")&&"navigationlineselectionMapStyle"!==o.getAttribute("class")&&"LineselectionMapStyle"!==o.getAttribute("class")){i=parseInt(o.id.split("_LayerIndex_")[1].split("_")[0],10);var n=void 0,l=void 0,r=void 0,s=void 0;if(o.id.indexOf("shapeIndex")>-1)r=parseInt(o.id.split("_shapeIndex_")[1].split("_")[0],10),n=this.maps.layers[i].shapeData.features&&!t.isNullOrUndefined(this.maps.layersCollection[i].layerData[r])?this.maps.layersCollection[i].layerData[r].property:null,s=parseInt(o.id.split("_dataIndex_")[1].split("_")[0],10),l=t.isNullOrUndefined(s)?null:this.maps.layers[i].dataSource[s],this.highlightSettings=this.maps.layers[i].highlightSettings;else if(o.id.indexOf("BubbleIndex")>-1){var d=parseInt(o.id.split("_BubbleIndex_")[1].split("_")[0],10);s=parseInt(o.id.split("_dataIndex_")[1].split("_")[0],10),l=this.maps.layers[i].bubbleSettings[d].dataSource[s],this.highlightSettings=this.maps.layers[i].bubbleSettings[d].highlightSettings}else if(o.id.indexOf("MarkerIndex")>-1){var p=parseInt(o.id.split("_MarkerIndex_")[1].split("_")[0],10);s=parseInt(o.id.split("_dataIndex_")[1].split("_")[0],10),l=this.maps.layers[i].markerSettings[p].dataSource[s],this.highlightSettings=this.maps.layers[i].markerSettings[p].highlightSettings}else{var h=parseInt(o.id.split("_NavigationIndex_")[1].split("_")[0],10);i=parseInt(o.id.split("_LayerIndex_")[1].split("_")[0],10),n=null,l={latitude:this.maps.layers[i].navigationLineSettings[h].latitude,longitude:this.maps.layers[i].navigationLineSettings[h].longitude},this.highlightSettings=this.maps.layers[i].navigationLineSettings[h].highlightSettings}if(this.highlightSettings.enable)this.handleHighlight(o,i,l,n);else{var m=document.getElementsByClassName("highlightMapStyle")[0];if(!t.isNullOrUndefined(m)&&(ue(m),m.id.indexOf("NavigationIndex")>-1)){h=parseInt(m.id.split("_NavigationIndex_")[1].split("_")[0],10);var c=parseInt(m.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10);m.setAttribute("stroke-width",this.maps.layers[c].navigationLineSettings[h].width.toString()),m.setAttribute("stroke",this.maps.layers[c].navigationLineSettings[h].color)}}}else if(se("highlightMapStyle").length>0){if((o=se("highlightMapStyle")[0]).id.indexOf("NavigationIndex")>-1){h=parseInt(o.id.split("_NavigationIndex_")[1].split("_")[0],10);i=parseInt(o.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10),o.setAttribute("stroke-width",this.maps.layers[i].navigationLineSettings[h].width.toString()),o.setAttribute("stroke",this.maps.layers[i].navigationLineSettings[h].color)}ue(o),this.maps.legendSettings.visible&&this.maps.legendModule&&this.maps.legendModule.removeShapeHighlightCollection()}else(-1!==o.id.indexOf(this.maps.element.id+"_Legend_Shape_Index")||-1!==o.id.indexOf(this.maps.element.id+"_Legend_Index"))&&this.maps.legendModule&&this.maps.legendSettings.visible&&-1===o.id.indexOf("_Text")?this.maps.legendModule.legendHighLightAndSelection(o,"highlight"):this.maps.legendSettings.visible&&this.maps.legendModule&&this.maps.legendModule.removeLegendHighlightCollection()},e.prototype.handleHighlight=function(e,t,i,o){this.maps.legendSettings.visible&&-1===e.id.indexOf("_MarkerIndex_")&&this.maps.legendModule&&"Layers"===this.maps.legendSettings.type&&this.maps.legendModule.shapeHighLightAndSelection(e,i,this.highlightSettings,"highlight",t);(!(e.id.indexOf("shapeIndex")>-1&&this.maps.legendSettings.visible&&this.maps.legendModule)||this.maps.legendModule.shapeToggled)&&this.mapHighlight(e,o,i)},e.prototype.mapHighlight=function(e,i,o){var a=this,n=parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10),l=!1;if(e.id.indexOf("MarkerIndex")>-1){var r=parseInt(e.id.split("_MarkerIndex_")[1].split("_")[0],10);l=this.maps.layers[n].markerSettings[r].highlightSettings.enable}var s=-1===e.parentElement.id.indexOf("LineString")?this.highlightSettings.border.color:this.highlightSettings.fill||this.highlightSettings.border.color,d=-1===e.parentElement.id.indexOf("LineString")?this.highlightSettings.border.width/(l?1:this.maps.scale):this.highlightSettings.border.width/this.maps.scale,p=t.isNullOrUndefined(this.highlightSettings.border.opacity)?this.highlightSettings.opacity:this.highlightSettings.border.opacity,h={opacity:this.highlightSettings.opacity,fill:-1===e.parentElement.id.indexOf("LineString")?-1===e.id.indexOf("NavigationIndex")?t.isNullOrUndefined(this.highlightSettings.fill)?e.getAttribute("fill"):this.highlightSettings.fill:"none":"transparent",border:{color:s,width:d,opacity:p},cancel:!1},m={opacity:h.opacity,fill:h.fill,border:{color:s,width:d,opacity:p},name:Gt,target:e.id,cancel:!1,shapeData:i,data:o,maps:this.maps};e.id.indexOf("shapeIndex")>-1&&this.maps.trigger(Gt,m,function(){});var c={opacity:h.opacity,fill:h.fill,border:{color:s,width:d,opacity:p},name:li,target:e.id,cancel:!1,shapeData:i,data:o,maps:this.maps};this.maps.trigger(li,c,function(){c.cancel=h.cancel!==c.cancel?c.cancel:e.id.indexOf("shapeIndex")>-1?m.cancel:h.cancel,c.fill=h.fill!==c.fill?c.fill:e.id.indexOf("shapeIndex")>-1?m.fill:h.fill,c.opacity=h.opacity!==c.opacity?c.opacity:e.id.indexOf("shapeIndex")>-1?m.opacity:h.opacity,c.border.color=h.border.color!==c.border.color?c.border.color:e.id.indexOf("shapeIndex")>-1?m.border.color:h.border.color,c.border.width=h.border.width!==c.border.width?c.border.width:e.id.indexOf("shapeIndex")>-1?m.border.width:h.border.width,c.border.opacity=h.border.opacity!==c.border.opacity?c.border.opacity:e.id.indexOf("shapeIndex")>-1?m.border.opacity:h.border.opacity,a.highlightMap(e,c)})},e.prototype.highlightMap=function(e,t){if("highlightMapStyle"!==e.getAttribute("class")&&!t.cancel){if(se("highlightMapStyle").length>0){var i=se("highlightMapStyle")[0];if(ue(i),i.id.indexOf("NavigationIndex")>-1){var o=parseInt(i.id.split("_NavigationIndex_")[1].split("_")[0],10),a=parseInt(i.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10);i.setAttribute("stroke-width",this.maps.layers[a].navigationLineSettings[o].width.toString()),i.setAttribute("stroke",this.maps.layers[a].navigationLineSettings[o].color)}}ne("highlightMap")?me("highlightMap","highlightMapStyle",t):document.body.appendChild(he("highlightMap","highlightMapStyle",t)),e.setAttribute("class","highlightMapStyle")}},e.prototype.getModuleName=function(){return"Highlight"},e.prototype.destroy=function(){this.highlightSettings=null,this.removeEventListener(),this.maps=null},e}(),vi=function(){function e(e){this.maps=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.maps.isDestroyed||this.maps.on(Vt,this.mouseClick,this)},e.prototype.removeEventListener=function(){this.maps.isDestroyed||this.maps.off(Vt,this.mouseClick)},e.prototype.mouseClick=function(e){if(!t.isNullOrUndefined(e.type)&&-1!==e.type.indexOf("touch")&&t.isNullOrUndefined(e.id)&&(e=e.target),!t.isNullOrUndefined(e.id)&&(e.id.indexOf("LayerIndex")>-1||e.id.indexOf("NavigationIndex")>-1)){var i=void 0,o=void 0,a=void 0,n=void 0,l=parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10);if(e.id.indexOf("shapeIndex")>-1)a=parseInt(e.id.split("_shapeIndex_")[1].split("_")[0],10),i=!t.isNullOrUndefined(this.maps.layers[l].shapeData.features)&&this.maps.layers[l].shapeData.features.length>a?this.maps.layers[l].shapeData.features[a].properties:!t.isNullOrUndefined(this.maps.layers[l].shapeData.geometries)&&this.maps.layers[l].shapeData.geometries.length>a?this.maps.layers[l].shapeData.geometries[a].properties:null,n=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),o=t.isNullOrUndefined(n)?null:this.maps.layers[l].dataSource[n],this.selectionsettings=this.maps.layers[l].selectionSettings,this.selectionType="Shape";else if(e.id.indexOf("BubbleIndex")>-1){var r=parseInt(e.id.split("_BubbleIndex_")[1].split("_")[0],10);n=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),o=this.maps.layers[l].bubbleSettings[r].dataSource[n],this.selectionsettings=this.maps.layers[l].bubbleSettings[r].selectionSettings,this.selectionType="Bubble"}else if(e.id.indexOf("MarkerIndex")>-1){var s=parseInt(e.id.split("_MarkerIndex_")[1].split("_")[0],10);n=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),o=this.maps.layers[l].markerSettings[s].dataSource[n],this.selectionsettings=this.maps.layers[l].markerSettings[s].selectionSettings,this.selectionType="Marker"}else if(e.id.indexOf("NavigationIndex")>-1){var d=parseInt(e.id.split("_NavigationIndex_")[1].split("_")[0],10);i=null,o={latitude:this.maps.layers[l].navigationLineSettings[d].latitude,longitude:this.maps.layers[l].navigationLineSettings[d].longitude},this.selectionsettings=this.maps.layers[l].navigationLineSettings[d].selectionSettings,this.selectionType="navigationline"}!t.isNullOrUndefined(this.selectionsettings)&&this.selectionsettings.enable&&this.selectElement(e,l,o,i)}else this.maps.legendSettings.visible&&!this.maps.legendSettings.toggleLegendSettings.enable&&this.maps.legendModule&&!t.isNullOrUndefined(e.id)&&-1===e.id.indexOf("_Text")&&(e.id.indexOf(this.maps.element.id+"_Legend_Shape_Index")>-1||-1!==e.id.indexOf(this.maps.element.id+"_Legend_Index"))&&this.maps.legendModule.legendHighLightAndSelection(e,"selection")},e.prototype.selectElement=function(e,t,i,o){this.maps.mapSelect=!!e,this.maps.legendModule&&this.maps.legendSettings.visible&&-1===e.id.indexOf("_MarkerIndex_")&&this.maps.legendModule.shapeHighLightAndSelection(e,i,this.selectionsettings,"selection",t);(!(e.id.indexOf("shapeIndex")>-1&&this.maps.legendSettings.visible&&this.maps.legendModule)||this.maps.legendModule.shapeToggled)&&this.selectMap(e,o,i)},e.prototype.addSelection=function(e,t,i){var o=pe(e,t,0,this.maps);i?this.selectMap(o,null,null):ue(o)},e.prototype.selectMap=function(e,i,o){var a=this,n=(parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10),e.parentElement.id.indexOf("LineString")>-1),l=(this.selectionsettings,{color:n?this.selectionsettings.fill||this.selectionsettings.border.color:this.selectionsettings.border.color,width:n?this.selectionsettings.border.width/this.maps.scale:this.selectionsettings.border.width/("Marker"===this.selectionType?1:this.maps.scale),opacity:this.selectionsettings.border.opacity}),r={opacity:this.selectionsettings.opacity,fill:n?"transparent":"navigationline"!==this.selectionType?this.selectionsettings.fill:"none",border:l,name:ni,target:e.id,cancel:!1,shapeData:i,data:o,maps:this.maps};this.maps.trigger("itemSelection",r,function(i){if(r.border.opacity=t.isNullOrUndefined(a.selectionsettings.border.opacity)?a.selectionsettings.opacity:a.selectionsettings.border.opacity,!r.cancel)if(e.getAttribute("class")===a.selectionType+"selectionMapStyle"||"LineselectionMapStyle"===e.getAttribute("class")){ue(e),a.removedSelectionList(e);for(var o=0;o<a.maps.shapeSelectionItem.length;o++)if(a.maps.shapeSelectionItem[o]===r.shapeData){a.maps.shapeSelectionItem.splice(o,1);break}if(e.id.indexOf("NavigationIndex")>-1){var l=parseInt(e.id.split("_NavigationIndex_")[1].split("_")[0],10),s=parseInt(e.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10);e.setAttribute("stroke-width",a.maps.layers[s].navigationLineSettings[l].width.toString()),e.setAttribute("stroke",a.maps.layers[s].navigationLineSettings[l].color)}}else{var d=ie(a.maps.element.id+"_Layer_Collections");if(!a.selectionsettings.enableMultiSelect&&(d.getElementsByClassName(a.selectionType+"selectionMapStyle").length>0||d.getElementsByClassName("LineselectionMapStyle").length>0)){for(var p=d.getElementsByClassName(a.selectionType+"selectionMapStyle").length,h=void 0,m=0;m<p;m++)ue(h=d.getElementsByClassName(a.selectionType+"selectionMapStyle")[0]),a.removedSelectionList(h);if(d.getElementsByClassName("LineselectionMapStyle").length>0){p=d.getElementsByClassName("LineselectionMapStyle").length;for(m=0;m<p;m++)ue(h=d.getElementsByClassName("LineselectionMapStyle")[0]),a.removedSelectionList(h)}if("Shape"===a.selectionType){a.maps.shapeSelectionItem=[];for(var c=a.maps.selectedElementId.length,u=0;u<c;u++){ue(h=d.getElementsByClassName(a.selectionType+"selectionMapStyle")[0]);var g=a.maps.selectedElementId.indexOf(h.getAttribute("id"));a.maps.selectedElementId.splice(g,1)}}if(h.id.indexOf("NavigationIndex")>-1){l=parseInt(e.id.split("_NavigationIndex_")[1].split("_")[0],10);var y=parseInt(e.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10);h.setAttribute("stroke-width",a.maps.layers[y].navigationLineSettings[l].width.toString()),h.setAttribute("stroke",a.maps.layers[y].navigationLineSettings[l].color)}}n?(ne("LineselectionMap")?me("LineselectionMap","LineselectionMapStyle",r):document.body.appendChild(he("LineselectionMap","LineselectionMapStyle",r)),e.setAttribute("class","LineselectionMapStyle")):(ne(a.selectionType+"selectionMap")?me(a.selectionType+"selectionMap",a.selectionType+"selectionMapStyle",r):document.body.appendChild(he(a.selectionType+"selectionMap",a.selectionType+"selectionMapStyle",r)),e.setAttribute("class",a.selectionType+"selectionMapStyle")),"ShapeselectionMapStyle"===e.getAttribute("class")&&(a.maps.shapeSelectionClass=ne(a.selectionType+"selectionMap"),a.maps.selectedElementId.push(e.getAttribute("id")),a.maps.shapeSelectionItem.push(r.shapeData)),"MarkerselectionMapStyle"===e.getAttribute("class")&&(a.maps.markerSelectionClass=ne(a.selectionType+"selectionMap"),a.maps.selectedMarkerElementId.push(e.getAttribute("id"))),"BubbleselectionMapStyle"===e.getAttribute("class")&&(a.maps.bubbleSelectionClass=ne(a.selectionType+"selectionMap"),a.maps.selectedBubbleElementId.push(e.getAttribute("id"))),"navigationlineselectionMapStyle"===e.getAttribute("class")&&(a.maps.navigationSelectionClass=ne(a.selectionType+"selectionMap"),a.maps.selectedNavigationElementId.push(e.getAttribute("id")))}})},e.prototype.removedSelectionList=function(e){"Shape"===this.selectionType&&this.maps.selectedElementId.splice(this.maps.selectedElementId.indexOf(e.getAttribute("id")),1),"Bubble"===this.selectionType&&this.maps.selectedBubbleElementId.splice(this.maps.selectedBubbleElementId.indexOf(e.getAttribute("id")),1),"Marker"===this.selectionType&&this.maps.selectedMarkerElementId.splice(this.maps.selectedMarkerElementId.indexOf(e.getAttribute("id")),1),"navigationline"===this.selectionType&&this.maps.selectedBubbleElementId.splice(this.maps.selectedBubbleElementId.indexOf(e.getAttribute("id")),1)},e.prototype.getModuleName=function(){return"Selection"},e.prototype.destroy=function(){this.selectionsettings=null,this.removeEventListener(),this.maps=null},e}(),Si=function(){function e(e){this.maps=e,this.tooltipId=this.maps.element.id+"_mapsTooltip",this.addEventListener()}return e.prototype.renderTooltip=function(e){var o,a,n,l,r,d,p=this;if(-1!==e.type.indexOf("touch")?(this.isTouch=!0,o=(l=e).changedTouches[0].pageX,a=l.changedTouches[0].pageY,n=l.target):(this.isTouch="touch"===e.pointerType,o=e.pageX,a=e.pageY,n=e.target),this.maps.isDevice&&(clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeTooltip.bind(this),2e3)),-1===n.id.indexOf(this.maps.element.id)){var h=n.closest("."+this.maps.element.id+"_marker_template_element");!t.isNullOrUndefined(h)&&h.id.indexOf("_MarkerIndex_")>-1&&(n=h)}var m,c,u,g="",y=n.id,f=[],b=y.indexOf("_LayerIndex_")>-1&&parseFloat(y.split("_LayerIndex_")[1].split("_")[0]),v=this.maps.layersCollection[b],S=s(o,a,this.maps.svgObject);this.tooltipTargetID=y;if((y.indexOf("_shapeIndex_")>-1||y.indexOf("_MarkerIndex_")>-1||y.indexOf("_BubbleIndex_")>-1)&&null===this.maps.markerDragArgument){if(y.indexOf("_shapeIndex_")>-1){m=v.tooltipSettings;var x=parseInt(y.split("_shapeIndex_")[1].split("_")[0],10);if(t.isNullOrUndefined(v.layerData)||t.isNullOrUndefined(v.layerData[x]))return;var O=v.layerData[x].property,C=!1,M="[object Array]"===Object.prototype.toString.call(v.shapePropertyPath)?v.shapePropertyPath:[v.shapePropertyPath];if(!t.isNullOrUndefined(M)){for(var L=0;L<M.length;L++)for(var P=0;P<v.dataSource.length;P++){var T=v.dataSource[P],I=v.shapeDataPath.indexOf(".")>-1?w(T,v.shapeDataPath):T[v.shapeDataPath];if((!t.isNullOrUndefined(I)&&isNaN(T[v.shapeDataPath])?I.toLowerCase():I)===(!t.isNullOrUndefined(O[M[L]])&&isNaN(O[M[L]])?O[M[L]].toLowerCase():O[M[L]])){C=!0,b=P,L=M.length;break}}if(b=C?b:null,!t.isNullOrUndefined(v.dataSource[b])){f=JSON.parse(JSON.stringify(v.dataSource[b]));for(u in O)f.hasOwnProperty(u)||(f[u]=O[u])}}if(m.visible&&(!t.isNullOrUndefined(b)&&!isNaN(b)||!t.isNullOrUndefined(O)))if(v.tooltipSettings.format)g=this.formatter(v.tooltipSettings.format,f);else{var k=H(v.shapeDataPath,v.shapePropertyPath,O);g=t.isNullOrUndefined(v.dataSource)||t.isNullOrUndefined(b)?O[k]:_(m.valuePath.indexOf(".")>-1?w(v.dataSource[b],m.valuePath):v.dataSource[b][m.valuePath],this.maps),t.isNullOrUndefined(g)&&(g=m.valuePath.indexOf(".")>-1?w(O,m.valuePath):O[m.valuePath])}}else if(y.indexOf("_MarkerIndex_")>-1){var N=parseInt(y.split("_MarkerIndex_")[1].split("_")[0],10),F=parseInt(y.split("_MarkerIndex_")[1].split("_")[2],10),E=v.markerSettings[N];m=E.tooltipSettings,f=E.dataSource[F],m.visible&&!isNaN(N)&&(g=E.tooltipSettings.format?this.formatter(E.tooltipSettings.format,E.dataSource[F]):"function"!=typeof E.template&&E.template&&!E.tooltipSettings.valuePath?E.template.split(">")[1].split("<")[0]:_(E.tooltipSettings.valuePath.indexOf(".")>-1?w(E.dataSource[F],E.tooltipSettings.valuePath):E.dataSource[F][E.tooltipSettings.valuePath],this.maps))}else if(y.indexOf("_BubbleIndex_")>-1){var z=parseInt(y.split("_BubbleIndex_")[1].split("_")[0],10),A=(F=parseInt(y.split("_BubbleIndex_")[1].split("_")[2],10),v.bubbleSettings[z]);m=A.tooltipSettings,f=A.dataSource[F],m.visible&&!isNaN(F)&&(g=A.tooltipSettings.format?this.formatter(A.tooltipSettings.format,A.dataSource[F]):_(A.tooltipSettings.valuePath.indexOf(".")>-1?w(A.dataSource[F],A.tooltipSettings.valuePath):A.dataSource[F][A.tooltipSettings.valuePath],this.maps))}document.getElementById(this.tooltipId)?c=document.getElementById(this.tooltipId):((c=t.createElement("div",{id:this.maps.element.id+"_mapsTooltip",className:"EJ2-maps-Tooltip"})).style.cssText="position: absolute;pointer-events:none;",document.getElementById(this.maps.element.id+"_Secondary_Element").appendChild(c)),"function"!=typeof m.template&&null!==m.template&&1===Object.keys("object"==typeof m.template?m.template:{}).length&&(m.template=m.template[Object.keys(m.template)[0]]);var B={location:S,text:[],data:f=this.setTooltipContent(m,f),textStyle:{color:m.textStyle.color,fontFamily:m.textStyle.fontFamily,fontStyle:m.textStyle.fontStyle,fontWeight:m.textStyle.fontWeight,opacity:m.textStyle.opacity,size:m.textStyle.size},template:m.template};r={cancel:!1,name:Ht,options:B,fill:m.fill,maps:this.maps,element:n,eventArgs:e,content:t.isNullOrUndefined(g)?"":g.toString()},this.maps.trigger(Ht,r,function(o){if(r.cancel||!m.visible||t.isNullOrUndefined(g)||-1!==y.indexOf("_cluster_")||-1!==y.indexOf("_dataLabel_"))p.clearTooltip(e.target);else if(p.maps.isProtectedOnChange=!0,r.options.textStyle.size=r.options.textStyle.size||p.maps.themeStyle.fontSize,r.options.textStyle.color=r.options.textStyle.color||p.maps.themeStyle.tooltipFontColor,r.options.textStyle.fontFamily=r.options.textStyle.fontFamily||p.maps.themeStyle.fontFamily,r.options.textStyle.fontWeight=r.options.textStyle.fontWeight||p.maps.themeStyle.fontWeight,r.options.textStyle.opacity=r.options.textStyle.opacity||p.maps.themeStyle.tooltipTextOpacity,r.cancel?p.svgTooltip=new i.Tooltip({enable:!0,header:"",data:m.data,template:m.template,content:r.content.toString()!==g.toString()?[t.SanitizeHtmlHelper.sanitize(r.content.toString())]:[t.SanitizeHtmlHelper.sanitize(g.toString())],shapes:[],location:m.location,palette:[void 0],areaBounds:p.maps.mapAreaRect,textStyle:m.textStyle,availableSize:p.maps.availableSize,fill:m.fill||p.maps.themeStyle.tooltipFillColor}):p.svgTooltip=new i.Tooltip({enable:!0,header:"",data:r.options.data,template:r.options.template,content:r.content.toString()!==g.toString()?[t.SanitizeHtmlHelper.sanitize(r.content.toString())]:[t.SanitizeHtmlHelper.sanitize(g.toString())],shapes:[],location:r.options.location,palette:[void 0],areaBounds:p.maps.mapAreaRect,textStyle:r.options.textStyle,availableSize:p.maps.availableSize,fill:r.fill||p.maps.themeStyle.tooltipFillColor}),(p.maps.isVue||p.maps.isVue3)&&(p.svgTooltip.controlInstance=p.maps),p.svgTooltip.opacity=p.maps.themeStyle.tooltipFillOpacity||p.svgTooltip.opacity,p.svgTooltip.appendTo(c),p.maps.renderReactTemplates(),null!==(d=document.getElementById(p.maps.element.id+"_mapsTooltip"))&&-1!==d.innerHTML.indexOf("href")&&-1!==d.innerHTML.indexOf("</a>")){var a=d.getAttribute("style");a=a.replace("pointer-events: none;","position-events:all;"),d.style.cssText=a}}),this.svgTooltip&&this.maps.trigger("tooltipRenderComplete",{cancel:!1,name:"tooltipRenderComplete",maps:this.maps,options:B,element:this.svgTooltip.element}),this.svgTooltip?this.maps.trigger("tooltipRenderComplete",{cancel:!1,name:"tooltipRenderComplete",maps:this.maps,options:B,element:this.svgTooltip.element}):this.clearTooltip(e.target)}else null!==(d=document.getElementById(this.maps.element.id+"_mapsTooltip"))&&-1!==d.innerHTML.indexOf("href")&&-1!==d.innerHTML.indexOf("</a>")?this.maps.notify(Vt,this):this.clearTooltip(e.target)},e.prototype.setTooltipContent=function(e,i){var o=t.extend({},i,null,!0);return this.maps.format&&!isNaN(Number(o[e.valuePath]))?o[e.valuePath]=oe(this.maps,Number(o[e.valuePath])):o=Object.keys(o).length?o:void 0,o},e.prototype.formatter=function(e,t){void 0===t&&(t={});for(var i=0,o=Object.keys(t);i<o.length;i++){var a=o[i];e="object"==typeof t[a]?M("",e,t,this.maps):e.split("${"+a+"}").join(_(t[a],this.maps))}return e},e.prototype.mouseUpHandler=function(e){this.renderTooltip(e),"MouseMove"===this.maps.tooltipDisplayMode&&(clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeTooltip.bind(this),2e3))},e.prototype.removeTooltip=function(){var e=!1;return document.getElementsByClassName("EJ2-maps-Tooltip").length>0&&(t.remove(document.getElementsByClassName("EJ2-maps-Tooltip")[0]),e=!0),e},e.prototype.clearTooltip=function(e){var i=e.closest("#"+this.maps.element.id+"_mapsTooltipparent_template");if(t.isNullOrUndefined(i)){this.removeTooltip()&&this.maps.clearTemplate()}},e.prototype.addEventListener=function(){this.maps.isDestroyed||("DoubleClick"===this.maps.tooltipDisplayMode?this.maps.on("dblclick",this.renderTooltip,this):"Click"===this.maps.tooltipDisplayMode?this.maps.on(t.Browser.touchEndEvent,this.mouseUpHandler,this):this.maps.on(t.Browser.touchMoveEvent,this.renderTooltip,this),this.maps.on(t.Browser.touchCancelEvent,this.removeTooltip,this),this.maps.element.addEventListener("contextmenu",this.removeTooltip))},e.prototype.removeEventListener=function(){if(this.maps){if(this.maps.isDestroyed)return;"DoubleClick"===this.maps.tooltipDisplayMode?this.maps.off("dblclick",this.removeTooltip):"Click"===this.maps.tooltipDisplayMode?this.maps.off(t.Browser.touchEndEvent,this.mouseUpHandler):this.maps.off(t.Browser.touchMoveEvent,this.renderTooltip),this.maps.off(t.Browser.touchCancelEvent,this.removeTooltip),this.maps.element.removeEventListener("contextmenu",this.removeTooltip)}},e.prototype.getModuleName=function(){return"MapsTooltip"},e.prototype.destroy=function(){t.isNullOrUndefined(this.svgTooltip)||this.svgTooltip.destroy(),this.svgTooltip=null},e}(),xi=function(){function e(e){this.isPanning=!1,this.mouseEnter=!1,this.isTouch=!1,this.rectZoomingStart=!1,this.browserName=t.Browser.info.name,this.isPointer=t.Browser.isPointer,this.handled=!1,this.isPan=!1,this.isZoomFinal=!1,this.isZoomSelection=!1,this.pinchFactor=1,this.startTouches=[],this.intersect=[],this.mouseDownLatLong={x:0,y:0},this.mouseMoveLatLong={x:0,y:0},this.isSingleClick=!1,this.maps=e,this.wheelEvent="mozilla"===this.browserName?this.isPointer?"mousewheel":"DOMMouseScroll":"mousewheel",this.cancelEvent=this.isPointer?"pointerleave":"mouseleave",this.selectionColor=null==this.maps.zoomSettings.toolbarSettings.buttonSettings.selectionColor?this.maps.zoomSettings.selectionColor:this.maps.zoomSettings.toolbarSettings.buttonSettings.selectionColor,this.fillColor=null==this.maps.zoomSettings.toolbarSettings.buttonSettings.color?this.maps.zoomSettings.color:this.maps.zoomSettings.toolbarSettings.buttonSettings.color,this.addEventListener()}return e.prototype.performZooming=function(e,i,o){var a=this,n=this.maps;n.previousProjection=n.projectionType,n.defaultState=!1,n.initialCheck=!1,n.markerZoomedState=!1,n.zoomPersistence=n.enablePersistence;var l=n.tileZoomLevel,r=n.previousScale=n.scale,s=n.zoomSettings.maxZoom,d=n.zoomSettings.minZoom;i=s>=i?i:s;var p=!0;switch(o.toLowerCase()){case"zoomin":p=i<=this.maps.zoomSettings.maxZoom;break;case"zoomout":p=i>=this.maps.zoomSettings.minZoom}if(p){var h=n.tileTranslatePoint;if(n.isTileMap||!("ZoomIn"===o?i>=d&&i<=s:i>=d)&&!n.isReset){if(n.isTileMap&&i>=d&&i<=s)if(this.getTileTranslatePosition(l,i,e,o),n.tileZoomLevel=i,n.zoomSettings.zoomFactor=i,n.scale=Math.pow(2,i-1),"ZoomOut"===o&&n.zoomSettings.resetToInitial&&n.applyZoomReset&&i<=n.initialZoomLevel&&(n.initialCheck=!0,n.zoomPersistence=!1,n.tileTranslatePoint.x=n.initialTileTranslate.x,n.tileTranslatePoint.y=n.initialTileTranslate.y,i=n.tileZoomLevel=n.mapScaleValue=n.initialZoomLevel,n.scale=Math.pow(2,i-1)),n.translatePoint.y=(n.tileTranslatePoint.y-.01*n.mapScaleValue)/n.scale,n.translatePoint.x=(n.tileTranslatePoint.x-.01*n.mapScaleValue)/n.scale,this.triggerZoomEvent(h,l,o))n.translatePoint=n.tileTranslatePoint=new Ze(0,0),n.scale=n.previousScale,n.tileZoomLevel=l,n.zoomSettings.zoomFactor=n.previousScale;else{document.querySelector(".GroupElement")&&(document.querySelector(".GroupElement").style.display="none"),document.getElementById(this.maps.element.id+"_LayerIndex_1")&&(document.getElementById(this.maps.element.id+"_LayerIndex_1").style.display="none"),this.markerLineAnimation(n),n.mapLayerPanel.generateTiles(i,n.tileTranslatePoint,o+"wheel",null,e);document.getElementById(this.maps.element.id+"_tiles");var m=0===this.maps.layersCollection[0].animationDuration&&"Enable"===t.animationMode?1e3:this.maps.layersCollection[0].animationDuration;setTimeout(function(){a.applyTransform(a.maps),document.getElementById(a.maps.element.id+"_LayerIndex_1")&&(document.getElementById(a.maps.element.id+"_LayerIndex_1").style.display="block")},m)}}else{var c=n.mapAreaRect,u=n.baseMapRectBounds.min,g=n.baseMapRectBounds.max,y=Math.abs(u.x-g.x),f=Math.abs(u.y-g.y),b=void 0,v=void 0;if(i<1.2&&"Eckert5"!==n.projectionType)0!==y&&0!==f&&y!==f||(y=c.width/2,f=c.height),i=(i=parseFloat(Math.min(c.width/y,c.height/f).toFixed(2)))>1.05?1:i,n.translatePoint=this.calculateInitalZoomTranslatePoint(i,y,f,c,u,n);else{var S=n.translatePoint;b=S.x-(c.width/r-c.width/i)/(c.width/e.x),v=S.y-(c.height/r-c.height/i)/(c.height/e.y);var x=Math.abs(n.baseMapRectBounds.max.y-n.baseMapRectBounds.min.y)*i;b=x<n.mapAreaRect.height?c.x+(-u.x+(c.width/2-y/2)):b,v=x<n.mapAreaRect.height?c.y+(-u.y+(c.height/2-f/2)):v,n.translatePoint=new Ze(b,v)}n.scale=i,this.triggerZoomEvent(h,l,o)?(n.translatePoint=n.previousPoint,n.scale=n.mapScaleValue=n.previousScale):this.applyTransform(n)}}this.maps.zoomNotApplied=!1,this.maps.isDevice&&this.removeToolbarOpacity(n.isTileMap?Math.round(n.tileZoomLevel):n.scale,n.element.id+"_Zooming_")},e.prototype.calculateInitalZoomTranslatePoint=function(e,t,i,o,a,n){t*=e,i*=e;var l=0!==a.x&&"layers"===n.translateType?n.availableSize.width-o.width:0,r=o.x+(-a.x+(o.width/2-t/2))-l,s=o.y+(-a.y+(o.height/2-i/2));return new Ze(r,s)},e.prototype.triggerZoomEvent=function(e,t,i){var o,a=this.maps;return o=a.isTileMap?{cancel:!1,name:"zoom",type:i,maps:a,tileTranslatePoint:{previous:e,current:a.tileTranslatePoint},translatePoint:{previous:a.previousPoint,current:a.translatePoint},tileZoomLevel:{previous:t,current:a.tileZoomLevel},scale:{previous:a.previousScale,current:a.scale}}:{cancel:!1,name:"zoom",type:i,maps:a,tileTranslatePoint:{},translatePoint:{previous:a.previousPoint,current:a.translatePoint},tileZoomLevel:{},scale:{previous:a.previousScale,current:a.scale}},a.trigger("zoom",o),o.cancel},e.prototype.getTileTranslatePosition=function(e,t,i,o){var a=this.maps,n="ZoomOut"===o?10:"Reset"===o&&t>1?0:10,l=a.availableSize,r=256*Math.pow(2,e),s=256*Math.pow(2,t),d=(i.x-a.tileTranslatePoint.x)/r*100,p=(i.y-a.tileTranslatePoint.y)/r*100;a.tileTranslatePoint.x=1===t?l.width/2-256:i.x-d*s/100,a.tileTranslatePoint.y=1===t?l.height/2-256+2*n:i.y-p*s/100},e.prototype.performRectZooming=function(){this.isDragZoom=!0;var e=this.maps,t=e.availableSize;e.previousProjection=e.projectionType;var i,o=e.tileZoomLevel,a=e.tileTranslatePoint,n=this.zoomingRect,l=e.zoomSettings.maxZoom,r=e.zoomSettings.minZoom;if(n.height>0&&n.width>0){var s=this.zoomingRect.x+this.zoomingRect.width/2,d=this.zoomingRect.y+this.zoomingRect.height/2,p=void 0;if(e.isTileMap)p=(p=o+Math.round(o+(t.width/n.width+t.height/n.height)/2))>=r&&p<=l?p:l,e.zoomSettings.zoomFactor=p,this.getTileTranslatePosition(o,p,{x:s,y:d}),e.tileZoomLevel=p,e.translatePoint.x=(e.tileTranslatePoint.x-.5*Math.pow(2,p))/Math.pow(2,p),e.translatePoint.y=(e.tileTranslatePoint.y-.5*Math.pow(2,p))/Math.pow(2,p),e.scale=Math.pow(2,p),(i=this.triggerZoomEvent(a,o,""))?(e.translatePoint=e.tileTranslatePoint=new Ze(0,0),e.scale=e.tileZoomLevel=e.zoomSettings.zoomFactor=o):e.mapLayerPanel.generateTiles(p,e.tileTranslatePoint);else{var h=e.previousScale=e.scale;p=(p=h+Math.round((t.width/n.width+t.height/n.height)/2))<this.maps.zoomSettings.maxZoom?p:this.maps.zoomSettings.maxZoom;var m=e.previousPoint=e.translatePoint;if(p<=l){var c=m.x-(t.width/h-t.width/p)/(t.width/s),u=m.y-(t.height/h-t.height/p)/(t.height/d);e.translatePoint=new Ze(c,u)}e.scale=p<this.maps.zoomSettings.maxZoom?p:this.maps.zoomSettings.maxZoom,(i=this.triggerZoomEvent(a,o,""))&&(e.translatePoint=e.previousPoint,e.scale=e.previousScale)}i||(e.mapScaleValue=p,this.applyTransform(e,!0),this.maps.zoomNotApplied=!1,this.zoomingRect=null)}this.isZoomFinal=this.isZoomSelection&&Math.round(e.scale)===this.maps.zoomSettings.maxZoom,this.removeToolbarOpacity(e.scale,this.maps.element.id+"_Zooming_")},e.prototype.setInteraction=function(e){this.lastScale=1,this.interaction=e},e.prototype.updateInteraction=function(){2===this.fingers?this.setInteraction("zoom"):this.setInteraction(null)},e.prototype.performPinchZooming=function(e){var i=this.maps,o=i.tileZoomLevel,a=i.mapAreaRect;i.previousScale=i.scale,i.previousPoint=i.translatePoint;var n=i.tileTranslatePoint,l=Pe(this.touchStartList,this.touchMoveList),r=Ie(Te(this.touchMoveList,this.maps)),s=l/this.lastScale;this.lastScale=l,this.pinchFactor*=s,this.pinchFactor=Math.min(this.maps.zoomSettings.maxZoom,Math.max(this.pinchFactor,this.maps.zoomSettings.minZoom));var d,p=this.pinchFactor;if(i.isTileMap){var h=p;this.getTileTranslatePosition(o,h,{x:r.x,y:r.y}),i.tileZoomLevel=h,i.translatePoint.x=(i.tileTranslatePoint.x-.5*Math.pow(2,h))/Math.pow(2,h),i.translatePoint.y=(i.tileTranslatePoint.y-.5*Math.pow(2,h))/Math.pow(2,h),i.scale=Math.pow(2,h),(d=this.triggerZoomEvent(n,o,""))?(i.translatePoint=i.tileTranslatePoint=new Ze(0,0),i.scale=i.previousScale,i.tileZoomLevel=o,i.zoomSettings.zoomFactor=i.previousScale):i.mapLayerPanel.generateTiles(h,i.tileTranslatePoint)}else{var m=i.baseMapRectBounds.min,c=i.baseMapRectBounds.max,u=Math.abs(m.y-c.y),g=Math.abs(m.x-c.x),y=i.translatePoint,f=void 0,b=void 0;if(p<1.2&&"Eckert5"!==i.projectionType)0!==g&&0!==u&&g!==u||(g=a.width/2,u=a.height),p=(p=parseFloat(Math.min(a.width/g,a.height/u).toFixed(2)))>1.05?1:p,i.translatePoint=this.calculateInitalZoomTranslatePoint(p,g,u,a,m,i);else{var v=Math.abs(i.baseMapRectBounds.max.y-i.baseMapRectBounds.min.y)*p;f=y.x-(a.width/i.scale-a.width/p)/(a.width/r.x),b=y.y-(a.height/i.scale-a.height/p)/(a.height/r.y),f=v<i.mapAreaRect.height?a.x+(-m.x+(a.width/2-g/2)):f,b=v<i.mapAreaRect.height?a.y+(-m.y+(a.height/2-u/2)):b,i.translatePoint=new Ze(f,b)}i.scale=p,(d=this.triggerZoomEvent(n,o,""))&&(i.translatePoint=i.previousPoint,i.scale=i.previousScale)}d||this.applyTransform(i),t.Browser.isDevice&&this.removeToolbarOpacity(i.isTileMap?Math.round(i.tileZoomLevel):i.scale,i.element.id+"_Zooming_")},e.prototype.drawZoomRectangle=function(){var e=this.maps,t=this.mouseDownPoints,i=this.mouseMovePoints,o={width:1,color:this.maps.themeStyle.rectangleZoomBorderColor},a=Math.abs(i.x-t.x),n=Math.abs(i.y-t.y),l=i.x>t.x?t.x:t.x-a,r=i.y>t.y?t.y:t.y-n;ie(e.element.id).getBoundingClientRect();if(l>e.mapAreaRect.x&&l<e.mapAreaRect.x+e.mapAreaRect.width&&r>e.mapAreaRect.y&&r<e.mapAreaRect.y+e.mapAreaRect.height){this.zoomingRect=new et(l,r,a,n);var s=e.renderer.createSvg({id:e.element.id+"_Selection_Rect_Zooming",width:e.availableSize.width,height:e.availableSize.height,style:"position: absolute;"}),d=new Xe(e.element.id+"_ZoomRect",this.maps.themeStyle.rectangleZoomFillColor,o,this.maps.themeStyle.rectangleZoomFillOpacity,this.zoomingRect,0,0,"","3");s.appendChild(e.renderer.drawRectangle(d)),ie(e.element.id+"_Secondary_Element").appendChild(s)}},e.prototype.animateTransform=function(e,i,o,a,n){var l=0===this.currentLayer.animationDuration&&"Enable"===t.animationMode?1e3:this.currentLayer.animationDuration;i&&0!==l&&!this.maps.isTileMap?this.maps.isTileMap||Ne(e,0,l,new $e(o,a),n,this.maps.mapAreaRect,this.maps):e.setAttribute("transform","scale("+n+") translate( "+o+" "+a+" )")},e.prototype.applyTransform=function(e,i){var o;this.templateCount=0;var a,n=e.scale,l=e.translatePoint.x,r=e.translatePoint.y;if(e.zoomShapeCollection=[],document.getElementById(e.element.id+"_mapsTooltip")&&Q(e.element.id+"_mapsTooltip"),this.layerCollectionEle){for(var s=0;s<this.layerCollectionEle.childElementCount;s++){var d=this.layerCollectionEle.childNodes[s];if("g"===d.tagName){this.templateCount++,this.index=d.id.indexOf("_LayerIndex_")>-1&&parseFloat(d.id.split("_LayerIndex_")[1].split("_")[0]),this.currentLayer=e.layersCollection[this.index];for(var p=e.mapLayerPanel.calculateFactor(this.currentLayer),h=d.childElementCount,m=0;m<h;m++){var c=d.childNodes[m];if(c.id.indexOf("_Markers_Group")>-1||c.id.indexOf("_bubble_Group")>-1||c.id.indexOf("_dataLableIndex_Group")>-1){if(c.id.indexOf("_Markers_Group")>-1){this.isPanning||t.isNullOrUndefined(c.childNodes[0])||this.markerTranslates(c.childNodes[0],p,l,r,n,"Marker",d,i),c=d.childNodes[m];var u=void 0;if(!t.isNullOrUndefined(c)&&-1!==c.id.indexOf("Markers")){for(var g=0;g<c.childElementCount;g++){this.markerTranslate(c.childNodes[g],p,l,r,n,"Marker",i);parseInt(c.childNodes[g].id.split("_LayerIndex_")[1].split("_")[0],10);var y=parseInt(c.childNodes[g].id.split("_dataIndex_")[1].split("_")[0],10),f=parseInt(c.childNodes[g].id.split("_MarkerIndex_")[1].split("_")[0],10);u=this.currentLayer.markerSettings[f].animationDuration>0||"Enable"===t.animationMode;for(var b=this.currentLayer.markerSettings[f].dataSource[y],v=0;v<this.currentLayer.markerSettings[f].initialMarkerSelection.length;v++)this.currentLayer.markerSettings[f].initialMarkerSelection[v].latitude!==b.latitude&&this.currentLayer.markerSettings[f].initialMarkerSelection[v].longitude!==b.longitude||e.markerSelection(this.currentLayer.markerSettings[f].selectionSettings,e,c.children[g],this.currentLayer.markerSettings[f].dataSource[y]);if((this.currentLayer.animationDuration>0||"Enable"===t.animationMode||(e.layersCollection[0].animationDuration>0||"Enable"===t.animationMode)&&"SubLayer"===this.currentLayer.type)&&!this.isPanning)if(e.isTileMap){var S=document.querySelector(".GroupElement");S&&!document.querySelector(".ClusterGroupElement")&&u&&(S.style.display="none")}else a="visibility:hidden",c.style.cssText=a}if(this.isPanning&&e.markerModule.sameMarkerData.length>0?F(e.markerModule.sameMarkerData,e,c,!0):e.markerModule.sameMarkerData.length>0&&(e.markerModule.sameMarkerData=[],document.getElementById(e.element.id+"_mapsTooltip")&&Q(e.element.id+"_mapsTooltip")),document.getElementById(e.element.id+"_mapsTooltip")&&e.mapsTooltipModule.tooltipTargetID.indexOf("_MarkerIndex_")&&!this.isPanning){var O=e.mapsTooltipModule,C=c.querySelector("#"+O.tooltipTargetID);if(!t.isNullOrUndefined(C))if("hidden"===C.style.visibility)Q(e.element.id+"_mapsTooltip");else{var _=parseFloat(C.getAttribute("transform").split("(")[1].split(")")[0].split(" ")[1]),M=parseFloat(C.getAttribute("transform").split("(")[1].split(")")[0].split(" ")[2]);e.isTileMap&&(_+=+ne(e.element.id+"_tile_parent").style.left.split("px")[0],M+=+ne(e.element.id+"_tile_parent").style.top.split("px")[0]),O.svgTooltip.location.x=_,O.svgTooltip.location.y=M,O.svgTooltip.enableAnimation=!1}}}}else if(c.id.indexOf("_bubble_Group")>-1){var L=void 0;for(g=0;g<c.childElementCount;g++){L=c.childNodes[g],o=parseFloat(L.id.split("_LayerIndex_")[1].split("_")[0]);for(var P=parseFloat(L.id.split("_BubbleIndex_")[1].split("_")[0]),w=(y=parseFloat(L.id.split("_BubbleIndex_")[1].split("_")[2]),0);w<e.bubbleModule.bubbleCollection.length;w++){var T=e.bubbleModule.bubbleCollection[w];if(T.LayerIndex===o&&T.BubbleIndex===P&&T.DataIndex===y){var I=(T.center.x+l)*n,k=(T.center.y+r)*n,N=0===this.currentLayer.animationDuration&&"Enable"===t.animationMode?1e3:this.currentLayer.animationDuration;i&&0!==N?Ee(L,0,N,new $e(I,k)):L.setAttribute("transform","translate( "+I+" "+k+" )");break}}}}else if(c.id.indexOf("_dataLableIndex_Group")>-1&&!t.isNullOrUndefined(e.layers[this.index])){this.intersect=[],e.zoomLabelPositions=[],e.zoomLabelPositions=e.dataLabelModule.dataLabelCollections;var E=!e.isTileMap&&i;for(g=0;g<c.childElementCount;g++)if(c.childNodes[g].id.indexOf("_LabelIndex_")>-1){var z=parseFloat(c.childNodes[g].id.split("_LabelIndex_")[1].split("_")[0]);this.zoomshapewidth=c.childNodes[g].getBoundingClientRect(),e.zoomShapeCollection.push(this.zoomshapewidth),this.dataLabelTranslate(c.childNodes[g],p,l,r,n,"DataLabel",E);var A=e.layers[this.index].dataLabelSettings.border;if(g>0&&A.width>1&&c.childNodes[g-1].id.indexOf("_rectIndex_")>-1&&!t.isNullOrUndefined(e.zoomLabelPositions[z])){var B=(e.zoomLabelPositions[z].location.x+l)*n,U=(e.zoomLabelPositions[z].location.y+r)*n,j=x(c.childNodes[g].textContent,e.layers[this.index].dataLabelSettings.textStyle),R=c.childNodes[g-1],Z=B-j.width/2,D=U-j.height/2-5;R.setAttribute("x",Z),R.setAttribute("y",D)}}}}else e.isTileMap&&c.id.indexOf("_line_Group")>-1?(c.remove(),d.children.length>0&&d.children[0]?d.insertBefore(e.navigationLineModule.renderNavigation(this.currentLayer,e.tileZoomLevel,this.index),d.children[1]):d.appendChild(e.navigationLineModule.renderNavigation(this.currentLayer,e.tileZoomLevel,this.index))):-1===c.id.indexOf("Legend")&&(_e(c,this.index,n,e),e.zoomTranslatePoint=e.translatePoint,this.animateTransform(c,i,l,r,n))}}e.arrangeTemplate()}t.isNullOrUndefined(this.currentLayer)||i&&0!==this.currentLayer.animationDuration&&!e.isTileMap||this.processTemplate(l,r,n,e)}},e.prototype.markerTranslates=function(e,i,o,a,n,l,r,s){var d=this;void 0===s&&(s=!1);var p=0,c=0,u=0,g=parseInt((e||r).id.split("_LayerIndex_")[1].split("_")[0],10),y=this.maps.renderer.createGroup({id:this.maps.element.id+"_Markers_Group",class:"GroupElement"});y.style.pointerEvents="auto",document.getElementById(y.id)&&Q(y.id);var f=this.maps.mapAreaRect,b=t.createElement("div",{id:this.maps.element.id+"_LayerIndex_"+g+"_Markers_Template_Group",className:"template"});b.style.cssText="overflow: hidden; position: absolute;pointer-events: none;top:"+f.y+"px;left:"+f.x+"px;height:"+f.height+"px;width:"+f.width+"px;",document.getElementById(b.id)&&Q(b.id);var v=this.maps.layersCollection[g];v.markerSettings.map(function(e,s){var f=e.dataSource;Array.prototype.forEach.call(f,function(S,x){d.maps.markerNullCount=s>=0&&0===x?0:d.maps.markerNullCount;var O={template:e.template,data:S,maps:d.maps,marker:e,cancel:!1,name:Wt,fill:e.fill,colorValuePath:e.colorValuePath,shapeValuePath:e.shapeValuePath,height:e.height,width:e.width,imageUrl:e.imageUrl,imageUrlValuePath:e.imageUrlValuePath,shape:e.shape,border:e.border};O=T(O=I(O,S),S),d.maps.trigger("markerRendering",O,function(C){e.shapeValuePath!==O.shapeValuePath&&(O=I(O,S)),e.colorValuePath!==O.colorValuePath&&(O=T(O,S));var _=t.isNullOrUndefined(e.latitudeValuePath)?t.isNullOrUndefined(S.latitude)?t.isNullOrUndefined(S.Latitude)?null:S.Latitude:parseFloat(S.latitude):Number(w(S,e.latitudeValuePath)),M=t.isNullOrUndefined(e.longitudeValuePath)?t.isNullOrUndefined(S.longitude)?t.isNullOrUndefined(S.Longitude)?null:S.Longitude:parseFloat(S.longitude):Number(w(S,e.longitudeValuePath)),L=e.offset;if(!O.cancel&&e.visible&&!t.isNullOrUndefined(M)&&!t.isNullOrUndefined(_)){var P=d.maps.element.id+"_LayerIndex_"+g+"_MarkerIndex_"+s+"_dataIndex_"+x,N=d.maps.isTileMap?m(new $e(M,_),d.maps.tileZoomLevel,d.maps.tileTranslatePoint,!0):h(_,M,i,v,d.maps),F={x:o,y:a};!O.template||isNaN(N.x)||isNaN(N.y)?O.template||isNaN(N.x)||isNaN(N.y)||(c++,E(O,e,f,x,N,F,P,L,n,d.maps,y)):(u++,z(O,void 0,P,S,s,b,N,F,n,L,d.maps))}p+=isNaN(_)||isNaN(M)?1:0,u+=O.cancel?1:0,c+=O.cancel?1:0,d.maps.markerNullCount=t.isNullOrUndefined(_)||t.isNullOrUndefined(M)?d.maps.markerNullCount+1:d.maps.markerNullCount;var A=f.length-d.maps.markerNullCount;y.childElementCount===A-u-p&&"Template"!==l&&(r.appendChild(y),v.markerClusterSettings.allowClustering&&(d.maps.svgObject.appendChild(y),d.maps.element.appendChild(d.maps.svgObject),k(v,y,d.maps,g,y,r,!0,!0))),b.childElementCount===A-c-p&&ie(d.maps.element.id+"_Secondary_Element")&&(ie(d.maps.element.id+"_Secondary_Element").appendChild(b),n>=1&&v.markerClusterSettings.allowClustering&&k(v,b,d.maps,g,y,r,!1,!0))})})})},e.prototype.processTemplate=function(e,i,o,a){for(var n=0;n<this.templateCount;n++){var l=a.mapLayerPanel.calculateFactor(this.currentLayer),r=ie(a.element.id+"_LayerIndex_"+n+"_Markers_Template_Group"),s=ie(a.element.id+"_LayerIndex_"+n+"_Label_Template_Group");if(!t.isNullOrUndefined(r)&&r.childElementCount>0){r.style.visibility="visible";for(var d=0;d<r.childElementCount;d++)this.markerTranslate(r.childNodes[d],l,e,i,o,"Template")}if(!t.isNullOrUndefined(s)&&s.childElementCount>0)for(d=0;d<s.childElementCount;d++)this.dataLabelTranslate(s.childNodes[d],l,e,i,o,"Template")}},e.prototype.dataLabelTranslate=function(e,i,o,a,n,l,r){void 0===r&&(r=!1);var s,d,p,h,m,c=this.maps.dataLabelModule.dataLabelCollections,u=this.maps.layers[this.index].dataLabelSettings.textStyle,g=parseFloat(e.id.split("_LayerIndex_")[1].split("_")[0]),y=parseFloat(e.id.split("_shapeIndex_")[1].split("_")[0]);e.id.indexOf("_LabelIndex_")>-1&&(m=parseFloat(e.id.split("_LabelIndex_")[1].split("_")[0]));for(var f=0===this.currentLayer.animationDuration&&"Enable"===t.animationMode?1e3:this.currentLayer.animationDuration,b=0;b<c.length;b++){var v=c[b];if(v.layerIndex===g&&v.shapeIndex===y&&v.labelIndex===m){var S=v.location.x,O=v.location.y;if("Template"===l){var C=0,_=0;if(this.maps.isTileMap)C=(S+o)*n-(h=x(p=v.dataLabelText,u)).width/2,_=(O+a)*n-h.height;else{var M=ie(this.maps.element.id+"_Layer_Collections");S=Math.abs(this.maps.baseMapRectBounds.min.x-S)*n,O=Math.abs(this.maps.baseMapRectBounds.min.y-O)*n;var L=M.getBoundingClientRect(),P=e.parentElement.getBoundingClientRect();C=S+(L.left-P.left),_=O+(L.top-P.top)}e.style.left=C+"px",e.style.top=_+"px"}else{S=(S+o)*n;var w=(O=(O+a)*n)-(h=x(p=v.dataLabelText,u)).height/4,T=O+h.height/4;O=T;var I={rightWidth:S+h.width/2,leftWidth:S-h.width/2,heightTop:w,heightBottom:T};if(r&&0!==f||e.setAttribute("transform","translate( "+S+" "+O+" )"),"Hide"===this.maps.layers[this.index].dataLabelSettings.smartLabelMode&&(n>1?(s=this.maps.dataLabelShape[b]*n>=h.width?p:"",e.textContent=s):(s=this.maps.dataLabelShape[b]>=h.width?p:"",e.textContent=s)),"Trim"===this.maps.layers[this.index].dataLabelSettings.smartLabelMode&&(n>1?(s=Y(this.maps.dataLabelShape[b]*n,p,u),e.textContent=s):(s=Y(this.maps.dataLabelShape[b],p,u),e.textContent=s)),"Hide"===this.maps.layers[this.index].dataLabelSettings.intersectionAction){for(var k=0;k<this.intersect.length;k++)if(!t.isNullOrUndefined(this.intersect[k])){if(!(I.leftWidth>this.intersect[k].rightWidth||I.rightWidth<this.intersect[k].leftWidth||I.heightTop>this.intersect[k].heightBottom||I.heightBottom<this.intersect[k].heightTop)){s="",e.textContent=s;break}s=t.isNullOrUndefined(s)?p:s,e.textContent=s}this.intersect.push(I)}if("Trim"===this.maps.layers[this.index].dataLabelSettings.intersectionAction){for(var N=0;N<this.intersect.length;N++)if(!t.isNullOrUndefined(this.intersect[N]))if(I.rightWidth<this.intersect[N].leftWidth||I.leftWidth>this.intersect[N].rightWidth||I.heightBottom<this.intersect[N].heightTop||I.heightTop>this.intersect[N].heightBottom)d=t.isNullOrUndefined(s)?p:s,n>1&&(d=Y(this.maps.dataLabelShape[b]*n,d,u)),e.textContent=d;else{if(I.leftWidth>this.intersect[N].leftWidth){d=Y((F=this.intersect[N].rightWidth-I.leftWidth)-(I.rightWidth-I.leftWidth),s=t.isNullOrUndefined(s)?p:s,u),e.textContent=d;break}if(I.leftWidth<this.intersect[N].leftWidth){var F=I.rightWidth-this.intersect[N].leftWidth;d=Y(Math.abs(F-(I.rightWidth-I.leftWidth)),s=t.isNullOrUndefined(s)?p:s,u),e.textContent=d;break}}this.intersect.push(I),t.isNullOrUndefined(d)&&(d=Y(this.maps.dataLabelShape[b]*n,p,u),e.textContent=d)}(r||f>0)&&Ee(e,0,f,new $e(S,O))}}}},e.prototype.markerTranslate=function(e,i,o,a,n,l,r){void 0===r&&(r=!1);var s=parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10),d=parseInt(e.id.split("_MarkerIndex_")[1].split("_")[0],10),p=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),c=this.maps.layersCollection[s],u=c.markerSettings[d];if(!t.isNullOrUndefined(u)&&!t.isNullOrUndefined(u.dataSource)&&!t.isNullOrUndefined(u.dataSource[p])){var g=t.isNullOrUndefined(u.longitudeValuePath)?t.isNullOrUndefined(u.dataSource[p].longitude)?t.isNullOrUndefined(u.dataSource[p].Longitude)?0:parseFloat(u.dataSource[p].Longitude):parseFloat(u.dataSource[p].longitude):Number(w(u.dataSource[p],u.longitudeValuePath)),y=t.isNullOrUndefined(u.latitudeValuePath)?t.isNullOrUndefined(u.dataSource[p].latitude)?t.isNullOrUndefined(u.dataSource[p].Latitude)?0:parseFloat(u.dataSource[p].Latitude):parseFloat(u.dataSource[p].latitude):Number(w(u.dataSource[p],u.latitudeValuePath)),f=0===this.currentLayer.animationDuration&&"Enable"===t.animationMode?1e3:this.currentLayer.animationDuration,b=this.maps.isTileMap?m(new Ze(g,y),this.maps.tileZoomLevel,this.maps.tileTranslatePoint,!0):h(y,g,i,c,this.maps);if(this.maps.isTileMap)if("Template"===l){var v=e.getBoundingClientRect();if(e.style.left=b.x-v.width/2+u.offset.x+"px",e.style.top=b.y-v.height/2+u.offset.y+"px","GoogleStaticMap"===this.maps.layers[this.maps.baseLayerIndex].layerType){var S=ie(this.maps.element.id+"_StaticGoogleMap").getBoundingClientRect();"none"!==e.style.display&&((S.x>v.x||S.x+640<v.x+v.width)&&(S.y>v.y||S.y+S.height<v.y+v.height)?e.style.display="none":(S.x>v.x||S.x+640<v.x+v.width)&&(e.style.display="none"))}}else b.x+=u.offset.x,b.y+=u.offset.y,e.setAttribute("transform","translate( "+b.x+" "+b.y+" )");else if("Template"===l)if(f>0){b.x=Math.abs(this.maps.baseMapRectBounds.min.x-b.x)*n,b.y=Math.abs(this.maps.baseMapRectBounds.min.y-b.y)*n;var x=ie(this.maps.element.id+"_Layer_Collections").getBoundingClientRect(),O=e.parentElement.getBoundingClientRect();e.style.left=b.x+(x.left-O.left)+u.offset.x+"px",e.style.top=b.y+(x.top-O.top)+u.offset.y+"px",e.style.transform="translate(-50%, -50%)"}else{O=e.getBoundingClientRect();e.style.left=(b.x+o)*n+u.offset.x-this.maps.mapAreaRect.x-O.width/2+"px",e.style.top=(b.y+a)*n+u.offset.y-this.maps.mapAreaRect.y-O.height/2+"px"}else b.x=(b.x+o)*n+u.offset.x,b.y=(b.y+a)*n+u.offset.y,r&&0!==f?Ee(e,0,f,b):e.setAttribute("transform","translate( "+b.x+" "+b.y+" )")}},e.prototype.markerLineAnimation=function(e){if(e.isTileMap)for(var i=0;i<e.layersCollection.length;i++){var o=ie(this.maps.element.id+"_LayerIndex_"+i+"_Markers_Template_Group"),a=ie(this.maps.element.id+"_LayerIndex_"+i+"_line_Group");t.isNullOrUndefined(o)||(o.style.visibility="hidden"),t.isNullOrUndefined(a)||(a.style.visibility="hidden")}},e.prototype.panning=function(e,i,o,a){var n,l=this.maps,r=this.mouseDownPoints,s=this.mouseMovePoints,d=l.scale;l.markerZoomedState=!1,l.zoomPersistence=l.enablePersistence,l.defaultState=!1,l.initialCheck=!1;var p,h,m=l.translatePoint,c=l.tileTranslatePoint;if(i=t.isNullOrUndefined(i)?r.x-s.x:i,o=t.isNullOrUndefined(o)?r.y-s.y:o,this.maps.mergeCluster(),l.isTileMap){if(this.maps.tileZoomLevel>1){p=l.tileTranslatePoint.x-i,h=l.tileTranslatePoint.y-o,this.distanceX=p-l.tileTranslatePoint.x,this.distanceY=h-l.tileTranslatePoint.y,l.tileTranslatePoint.x=p,l.tileTranslatePoint.y=h,(l.tileTranslatePoint.y>-10&&o<0||l.tileTranslatePoint.y<-256*(Math.pow(2,this.maps.tileZoomLevel)-2)&&o>0)&&(l.tileTranslatePoint.x=p+i,l.tileTranslatePoint.y=h+o),l.translatePoint.x=(l.tileTranslatePoint.x-i)/l.scale,l.translatePoint.y=(l.tileTranslatePoint.y-o)/l.scale;var u=this.maps.getTileGeoLocation(a.layerX,a.layerY);n={cancel:!1,name:"pan",maps:l,tileTranslatePoint:{previous:c,current:l.tileTranslatePoint},translatePoint:{previous:m,current:l.translatePoint},scale:l.scale,tileZoomLevel:l.tileZoomLevel,latitude:u.latitude,longitude:u.longitude},l.trigger("pan",n),l.mapLayerPanel.generateTiles(l.tileZoomLevel,l.tileTranslatePoint,"Pan"),this.applyTransform(l)}}else{var g=document.getElementById(l.element.id+"_Legend_Group"),y=t.isNullOrUndefined(g)?0:g.getClientRects()[0].height;p=m.x-i/d,h=m.y-o/d;var f=ie(l.element.id+"_Layer_Collections").getBoundingClientRect(),b=ie(l.element.id+"_svg").getBoundingClientRect(),v=i<0?f.left<=b.left+l.mapAreaRect.x:f.left+f.width+l.mapAreaRect.x>=b.width,S=o<0?f.top<=b.top+l.mapAreaRect.y:f.top+f.height+y+l.margin.top>=b.top+b.height,x=this.maps.getGeoLocation(this.maps.layersCollection.length-1,a.layerX,a.layerY);n={cancel:!1,name:"pan",maps:l,tileTranslatePoint:{},translatePoint:{previous:m,current:new Ze(p,h)},scale:l.scale,tileZoomLevel:l.tileZoomLevel,latitude:x.latitude,longitude:x.longitude},l.trigger("pan",n),n.cancel||(v&&S?(l.translatePoint=new Ze(p,h),this.applyTransform(l)):v?(l.translatePoint=new Ze(p,l.translatePoint.y),this.applyTransform(l)):S&&(l.translatePoint=new Ze(l.translatePoint.x,h),this.applyTransform(l))),this.maps.zoomNotApplied=!1}l.zoomTranslatePoint=l.translatePoint,this.mouseDownPoints=this.mouseMovePoints,this.isSingleClick=!1},e.prototype.toAlignSublayer=function(){this.maps.translatePoint.x=t.isNullOrUndefined(this.distanceX)?this.maps.translatePoint.x:this.maps.translatePoint.x-this.distanceX/this.maps.scale,this.maps.translatePoint.y=t.isNullOrUndefined(this.distanceY)?this.maps.translatePoint.y:this.maps.translatePoint.y-this.distanceY/this.maps.scale,this.applyTransform(this.maps,!1)},e.prototype.toolBarZooming=function(e,i){var o=this,a=this.maps;a.initialCheck=!1,a.defaultState="Reset"===i&&1===e&&!(a.zoomSettings.resetToInitial&&a.applyZoomReset)||"ZoomOut"===i&&1===e;var n=a.tileZoomLevel,l=a.previousScale=a.scale;a.markerZoomedState=!1,a.zoomPersistence=a.enablePersistence,a.mapScaleValue=e;var r=a.zoomSettings.maxZoom,s=a.zoomSettings.minZoom,d=a.mapAreaRect,p=a.previousPoint=a.translatePoint,h=a.tileTranslatePoint;if(a.previousProjection=a.projectionType,e="ZoomOut"===i&&1===Math.round(e)?1:e,e="Reset"===i?s:0===Math.round(e)?1:e,e=s>e&&"ZoomIn"===i?s+1:e,!a.isTileMap&&("ZoomIn"===i?e>=s&&Math.round(e)<=r:e>=s||a.isReset)){var m=a.baseMapRectBounds.min,c=a.baseMapRectBounds.max,u=Math.abs(c.x-m.x),g=Math.abs(m.y-c.y),y=void 0,f=void 0;if(e<1.2&&"Eckert5"!==a.projectionType)0!==g&&0!==u&&g!==u||(u=d.width/2,g=d.height),e=(e=parseFloat(Math.min(d.width/u,d.height/g).toFixed(2)))>1.05?1:e,a.translatePoint=this.calculateInitalZoomTranslatePoint(e,u,g,d,m,a);else{y=p.x-(d.width/l-d.width/e)/2,f=p.y-(d.height/l-d.height/e)/2;var b=Math.abs(a.baseMapRectBounds.max.y-a.baseMapRectBounds.min.y)*e;y=b<a.mapAreaRect.height?d.x+(-m.x+(d.width/2-u/2)):y,f=b<a.mapAreaRect.height?d.y+(-m.y+(d.height/2-g/2)):f,a.translatePoint=new Ze(y,f)}a.zoomTranslatePoint=a.translatePoint,a.scale=e,this.triggerZoomEvent(h,n,i)?(a.translatePoint=a.zoomTranslatePoint=a.previousPoint,a.scale=a.previousScale):this.applyTransform(a,!0)}else if(a.isTileMap&&(e>=s&&e<=r||a.isReset)){var v=n<s&&!a.isReset?s:e;if(a.scale=Math.pow(2,v-1),a.tileZoomLevel=v,a.previousScale!==a.scale||a.isReset){a.zoomSettings.zoomFactor=e;var S={x:a.availableSize.width/2,y:a.availableSize.height/2};if(this.getTileTranslatePosition(n,v,S,i),(a.zoomSettings.resetToInitial&&a.applyZoomReset&&"Reset"===i||"ZoomOut"===i&&a.zoomSettings.resetToInitial&&a.applyZoomReset&&v<=a.initialZoomLevel)&&(a.initialCheck=!0,a.zoomPersistence=!1,a.tileTranslatePoint.x=a.initialTileTranslate.x,a.tileTranslatePoint.y=a.initialTileTranslate.y,v=a.tileZoomLevel=a.mapScaleValue=a.initialZoomLevel),this.triggerZoomEvent(h,n,i))a.translatePoint=a.tileTranslatePoint=new Ze(0,0),a.scale=a.previousScale,a.tileZoomLevel=n,a.zoomSettings.zoomFactor=a.previousScale;else{a.translatePoint.y=(a.tileTranslatePoint.y-.01*a.mapScaleValue)/a.scale,a.translatePoint.x=(a.tileTranslatePoint.x-.01*a.mapScaleValue)/a.scale,document.getElementById(this.maps.element.id+"_LayerIndex_1")&&(document.getElementById(this.maps.element.id+"_LayerIndex_1").style.display="none"),document.querySelector(".GroupElement")&&(document.querySelector(".GroupElement").style.display="none"),this.markerLineAnimation(a),a.mapLayerPanel.generateTiles(v,a.tileTranslatePoint,i);document.getElementById(this.maps.element.id+"_tiles");var x=0===this.maps.layersCollection[0].animationDuration&&"Enable"===t.animationMode?1e3:this.maps.layersCollection[0].animationDuration;setTimeout(function(){o.applyTransform(o.maps,!0),document.getElementById(o.maps.element.id+"_LayerIndex_1")&&(document.getElementById(o.maps.element.id+"_LayerIndex_1").style.display="block"),o.maps.isAddLayer=!1},x)}}this.maps.zoomNotApplied=!1}},e.prototype.createZoomingToolbars=function(){var e=this.maps;this.toolBarGroup=e.renderer.createGroup({id:e.element.id+"_Zooming_KitCollection",opacity:"fluentdark"===e.theme.toLowerCase()?.6:.3});var i=15,o=15,a=e.zoomSettings.toolbarSettings,n=e.zoomSettings.toolbarSettings.buttonSettings;this.maps.toolbarProperties={toolBarOrientation:"Horizontal"===a.orientation?e.zoomSettings.toolBarOrientation:a.orientation,highlightColor:null==n.highlightColor?e.zoomSettings.highlightColor:n.highlightColor,selectionColor:null==n.selectionColor?e.zoomSettings.selectionColor:n.selectionColor,horizontalAlignment:"Far"===a.horizontalAlignment?e.zoomSettings.horizontalAlignment:a.horizontalAlignment,verticalAlignment:"Near"===a.verticalAlignment?e.zoomSettings.verticalAlignment:a.verticalAlignment,color:null==n.color?e.zoomSettings.color:n.color,shapeOpacity:1!==n.opacity?n.opacity:1,borderOpacity:1!==n.borderOpacity?n.borderOpacity:1};var l=n.radius/4,r=n.radius/4,s=n.radius/2,d=n.padding,p=this.maps.toolbarProperties.toolBarOrientation,h=e.zoomSettings.toolbarSettings.buttonSettings.toolbarItems.map(function(e){return e}),m=3===h.length?e.zoomSettings.toolbars:h;i=n.radius/4+n.borderWidth/2+d,o=n.radius/4+n.borderWidth/2+d;var c='<filter id="chart_shadow" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="5"/>';c+='<feOffset dx="-3" dy="4" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="1"/>',c+='</feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>';var u=h.length,g="Horizontal"===p?u*n.radius+u*d+d+u*n.borderWidth:n.radius+n.borderWidth+2*d,y="Horizontal"===p?n.radius+n.borderWidth+2*d:u*n.radius+u*d+d+u*n.borderWidth,f=e.renderer.createDefs();f.innerHTML=c,this.toolBarGroup.appendChild(f);var b=e.renderer.drawRectangle(new Xe(e.element.id+"_Zooming_Rect",a.backgroundColor,{color:a.borderColor,width:a.borderWidth,opacity:a.borderOpacity},a.borderOpacity,new et(a.borderWidth/2,a.borderWidth/2,g-a.borderWidth,y-a.borderWidth),0,0));this.toolBarGroup.appendChild(b);for(var v=(n.radius-n.borderWidth/2)/30,S=0;S<m.length;S++){0!==S&&(i="Horizontal"===e.toolbarProperties.toolBarOrientation?i+(n.radius+d)+n.borderWidth:i,o="Horizontal"===e.toolbarProperties.toolBarOrientation?o:o+(n.radius+d)+n.borderWidth);var x=m[S],O=t.isNullOrUndefined(this.maps.toolbarProperties.color)?this.maps.themeStyle.zoomFillColor:this.maps.toolbarProperties.color,C=n.borderColor||this.maps.themeStyle.zoomFillColor;this.currentToolbarEle=e.renderer.createGroup({id:e.element.id+"_Zooming_ToolBar_"+x+"_Group",transform:"translate( "+i+" "+o+" ) "}),this.currentToolbarEle.setAttribute("class","e-maps-toolbar"),this.currentToolbarEle.appendChild(e.renderer.drawCircle(new qe(e.element.id+"_Zooming_ToolBar_"+x+"_Rect",n.fill,{color:C,width:n.borderWidth,opacity:n.borderOpacity},n.opacity,l,r,s,"")));var _="",M=n.fill;switch(this.selectionColor=this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor,x.toLowerCase()){case"zoom":var L=void 0,P=void 0;_="M0.001,14.629L1.372,16l4.571-4.571v-0.685l0.228-0.274c1.051,0.868,2.423,1.417,3.885,1.417c3.291,0,",_+="5.943-2.651,5.943-5.943S13.395,0,10.103,0S4.16,2.651,4.16,5.943c0,1.508,0.503,2.834,1.417,3.885l-0.274,0.228H4.571",_+="L0.001,14.629L0.001,14.629z M5.943,5.943c0-2.285,1.828-4.114,4.114-4.114s4.114,1.828,4.114,",this.currentToolbarEle.setAttribute("class",this.maps.zoomSettings.enableSelectionZooming?"e-maps-toolbar":""),this.maps.zoomSettings.enablePanning&&!this.maps.zoomSettings.enableSelectionZooming?(L=M,P=O):this.maps.zoomSettings.enablePanning&&this.maps.zoomSettings.enableSelectionZooming?(L=M,P=O):this.maps.zoomSettings.enablePanning||this.maps.zoomSettings.enableSelectionZooming?!this.maps.zoomSettings.enablePanning&&this.maps.zoomSettings.enableSelectionZooming?(L=this.maps.themeStyle.zoomFillColor,P=O):this.maps.zoomSettings.enablePanning||this.maps.zoomSettings.enableSelectionZooming?(L=this.selectionColor,P=this.selectionColor):(L=M,P=O):(L=M,P=O);var w=e.renderer.drawPath(new Ge(e.element.id+"_Zooming_ToolBar_"+x,L,1,P,1,1,null,_+"4.114s-1.828,4.114-4.114,4.114S5.943,8.229,5.943,5.943z"));w.setAttribute("transform","scale( "+v+","+v+" )"),this.currentToolbarEle.appendChild(w),this.zoomElements=this.currentToolbarEle,this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"zoomin":_="M 8, 0 L 8, 16 M 0, 8 L 16, 8";var T=e.renderer.drawPath(new Ge(e.element.id+"_Zooming_ToolBar_"+x+"_Path",M,3,O,1,1,null,_));T.setAttribute("transform","scale( "+v+","+v+" )"),this.currentToolbarEle.appendChild(T),this.currentToolbarEle,this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"zoomout":_="M 0, 8 L 16, 8";var I=e.renderer.drawPath(new Ge(e.element.id+"_Zooming_ToolBar_"+x,M,3,O,1,1,null,_));I.setAttribute("transform","scale( "+v+","+v+" )"),this.currentToolbarEle.appendChild(I),this.currentToolbarEle,this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"pan":var k=void 0;_="M5,3h2.3L7.275,5.875h1.4L8.65,3H11L8,0L5,3z M3,11V8.7l2.875,0.025v-1.4L3,7.35V5L0,8L3,",_+="11z M11,13H8.7l0.025-2.875h-1.4L7.35,13H5l3,3L11,13z M13,5v2.3l-2.875-0.025v1.4L13,8.65V11l3-3L13,5z",this.currentToolbarEle.setAttribute("class",this.maps.zoomSettings.enablePanning?"e-maps-toolbar":""),this.maps.zoomSettings.enablePanning&&this.maps.zoomModule.isDragZoom?k=this.selectionColor||this.maps.themeStyle.zoomFillColor:this.maps.zoomSettings.enablePanning?k=M||this.maps.themeStyle.zoomFillColor:(k=this.selectionColor||this.maps.themeStyle.zoomFillColor,this.currentToolbarEle.setAttribute("class",""));var N=e.renderer.drawPath(new Ge(e.element.id+"_Zooming_ToolBar_"+x,k,1,O,1,1,null,_));N.setAttribute("transform","scale( "+v+","+v+" )"),this.currentToolbarEle.appendChild(N),this.panColor=k,this.panElements=this.currentToolbarEle,this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"reset":_="M12.364,8h-2.182l2.909,3.25L16,8h-2.182c0-3.575-2.618-6.5-5.818-6.5c-1.128,0-2.218,0.366-3.091,",_+="1.016l1.055,1.178C6.581,3.328,7.272,3.125,8,3.125C10.4,3.125,12.363,5.319,12.364,8L12.364,8z M11.091,",_+="13.484l-1.055-1.178C9.419,12.672,8.728,12.875,8,12.875c-2.4,0-4.364-2.194-4.364-4.875h2.182L2.909,4.75L0,8h2.182c0,";var F=e.renderer.drawPath(new Ge(e.element.id+"_Zooming_ToolBar_"+x,M,null,O,1,1,null,_+"3.575,2.618,6.5,5.818,6.5C9.128,14.5,10.219,14.134,11.091,13.484L11.091,13.484z"));F.setAttribute("transform","scale( "+v+","+v+" )"),this.currentToolbarEle.appendChild(F),this.wireEvents(this.currentToolbarEle,this.performToolBarAction)}this.toolBarGroup.appendChild(this.currentToolbarEle)}},e.prototype.performToolBarAction=function(e){var t=e.target;e.stopImmediatePropagation();var i="touch"===e.pointerType||"2"===e.pointerType||e.type.indexOf("touch")>-1,o=t.id.split("_Zooming_ToolBar_")[1].split("_")[0],a=!0;switch(o.toLowerCase()){case"zoomin":a=(this.maps.isTileMap?this.maps.tileZoomLevel:this.maps.scale)+1<=this.maps.zoomSettings.maxZoom;break;case"zoomout":a=(this.maps.isTileMap?this.maps.tileZoomLevel:this.maps.scale)-1>=this.maps.zoomSettings.minZoom;break;case"reset":a=Math.round(this.maps.isTileMap?this.maps.tileZoomLevel:this.maps.scale)!=this.maps.zoomSettings.minZoom}i&&a?(this.handled=!0,this.performZoomingByToolBar(o)):"mousedown"!==e.type&&"pointerdown"!==e.type||this.handled||!a?this.handled=!1:(this.handled=!1,this.performZoomingByToolBar(o))},e.prototype.performZoomingByToolBar=function(e){var t=this.maps;t.isReset=!1;var i=0,o=this.fillColor||this.maps.themeStyle.zoomFillColor;switch(e.toLowerCase()){case"zoom":this.panColor=o,this.zoomColor=this.maps.zoomSettings.enableSelectionZooming?this.selectionColor:o,this.applySelection(this.zoomElements,this.zoomColor),this.applySelection(this.panElements,this.panColor),this.isPan=!1,this.isZoomSelection=this.maps.zoomSettings.enableSelectionZooming;break;case"pan":this.panColor=this.maps.zoomSettings.enablePanning?this.selectionColor:o,this.zoomColor=o,this.maps.zoomSettings.enablePanning?(this.applySelection(this.zoomElements,this.fillColor||o),this.applySelection(this.panElements,this.panColor)):(this.applySelection(this.zoomElements,this.selectionColor),this.applySelection(this.panElements,this.panColor)),this.isPan=this.maps.zoomSettings.enablePanning,this.isZoomSelection=!1;break;case"zoomin":t.staticMapZoom=t.tileZoomLevel,t.staticMapZoom>0&&t.staticMapZoom<22&&(t.staticMapZoom+=1),this.toolBarZooming((t.isTileMap?t.tileZoomLevel:t.scale)+1,"ZoomIn"),i=this.maps.isTileMap?Math.round(this.maps.tileZoomLevel):Math.round(this.maps.mapScaleValue),this.isZoomSelection||(i===t.zoomSettings.maxZoom||i>1||1===i&&this.maps.isTileMap?(this.applySelection(this.zoomElements,o),this.applySelection(this.panElements,t.zoomSettings.enablePanning?this.selectionColor:o)):1!==i||this.maps.isTileMap||(this.applySelection(this.zoomElements,o),this.applySelection(this.panElements,o)));break;case"zoomout":t.staticMapZoom=t.tileZoomLevel,t.markerCenterLatitude=null,t.markerCenterLongitude=null,this.toolBarZooming((t.isTileMap?t.tileZoomLevel:t.scale)-1,"ZoomOut"),i=this.maps.isTileMap?Math.round(this.maps.tileZoomLevel):Math.round(this.maps.mapScaleValue),!this.isPan&&this.isZoomSelection?(this.panColor=o,this.zoomColor=this.selectionColor,this.applySelection(this.zoomElements,this.selectionColor),this.applySelection(this.panElements,this.panColor)):i<=1&&!t.isTileMap?this.applySelection(this.panElements,o):this.applySelection(this.panElements,t.zoomSettings.enablePanning?this.selectionColor:o);break;case"reset":t.staticMapZoom=t.zoomSettings.enable?t.zoomSettings.zoomFactor:0,t.markerCenterLatitude=null,t.markerCenterLongitude=null,this.isZoomSelection=!1,this.isPan=t.zoomSettings.enablePanning,this.toolBarZooming(t.zoomSettings.minZoom,"Reset"),this.isPan&&!this.isZoomSelection||!this.isPan&&this.isZoomSelection?this.maps.zoomSettings.enablePanning?(this.applySelection(this.zoomElements,o),this.applySelection(this.panElements,this.selectionColor)):(this.applySelection(this.zoomElements,this.selectionColor),this.applySelection(this.panElements,o)):this.isPan||this.isZoomSelection||(this.applySelection(this.zoomElements,o),this.applySelection(this.panElements,o))}this.panningStyle(e.toLowerCase())},e.prototype.panningStyle=function(e){var t=ie(this.maps.element.id+"_svg");"pan"===e||this.isPanning&&"reset"!==e?t.setAttribute("class","e-maps-panning"):t.setAttribute("class","")},e.prototype.applySelection=function(e,t){if(e)for(var i,o=0;o<e.childElementCount;o++)"circle"!==(i=e.childNodes[o]).tagName&&(i.setAttribute("fill",e.id.indexOf("Pan")>-1?t:"transparent"),i.setAttribute("stroke",t))},e.prototype.showTooltip=function(e){var t=e.target.id.split("_Zooming_ToolBar_")[1].split("_")[0],i=this.maps.zoomSettings.toolbarSettings.tooltipSettings,o={visible:i.visible,fill:i.fill,borderOpacity:i.borderOpacity,borderWidth:i.borderWidth,borderColor:i.borderColor,fontColor:i.fontColor,fontFamily:i.fontFamily,fontStyle:i.fontStyle,fontWeight:i.fontWeight,fontSize:i.fontSize||"10px",fontOpacity:i.fontOpacity};o.fontFamily=this.maps.themeStyle.fontFamily,this.isTouch||(ve("EJ2_Map_Toolbar_Tip",this.maps.getLocalizedLabel(t),e.pageY+10,e.pageX+10,o),this.maps.isDevice&&(clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeTooltip.bind(this),2e3)))},e.prototype.removeTooltip=function(){ie("EJ2_Map_Toolbar_Tip")&&t.remove(ie("EJ2_Map_Toolbar_Tip"))},e.prototype.alignToolBar=function(){var e=this.maps,i=t.createElement("div",{id:e.element.id+"_ToolBar"});i.style.cssText="position:absolute;z-index:2";var o=e.renderer.createSvg({id:e.element.id+"_Zooming_ToolBar",width:10,height:10});o.appendChild(this.toolBarGroup),i.appendChild(o),ie(e.element.id+"_Secondary_Element")&&ie(e.element.id+"_Secondary_Element").appendChild(i);var a=this.toolBarGroup.getBoundingClientRect();o.setAttribute("height",(a.height+e.zoomSettings.toolbarSettings.borderWidth).toString()),o.setAttribute("width",(a.width+e.zoomSettings.toolbarSettings.borderWidth).toString());var n=t.isNullOrUndefined(e.totalRect)?e.mapAreaRect:e.totalRect,l=0,r=0;switch(e.toolbarProperties.verticalAlignment){case"Near":r=n.y;break;case"Center":r=n.height/2-a.height/2;break;case"Far":r=n.height-a.height-10}switch(e.toolbarProperties.horizontalAlignment){case"Near":l=n.x;break;case"Center":l=n.width/2-a.width/2;break;case"Far":l=t.isNullOrUndefined(e.legendModule)||"Left"!==e.legendSettings.position?n.width-a.width-10:n.width+n.x-a.width-10}i.style.left=l+"px",i.style.top=r+"px";var s=this.maps.toolbarProperties.highlightColor||this.maps.themeStyle.zoomSelectionColor,d=" .e-maps-toolbar:hover > circle { stroke:"+s+"; } .e-maps-toolbar:hover > path { fill: "+s+" ; stroke: "+s+"; }.e-maps-toolbar:hover { cursor: pointer; } .e-maps-cursor-disable:hover { cursor: not-allowed; } .e-maps-panning:hover { cursor: pointer; } .e-maps-popup-close { display: block; opacity: 0; }",p=document.createElement("style");p.appendChild(document.createTextNode(d)),i.appendChild(p)},e.prototype.removeToolbarOpacity=function(e,t){if(this.maps.zoomModule&&this.maps.zoomSettings.enable)if(ie(this.maps.element.id+"_Zooming_KitCollection")&&t.indexOf(this.maps.element.id+"_Zooming_")>-1){this.maps.isDevice?(ie(this.maps.element.id+"_Zooming_KitCollection").setAttribute("opacity","1"),this.removeToolbarClass("","","","","")):this.removeToolbarClass(this.maps.zoomSettings.enableSelectionZooming?"e-maps-toolbar":"","e-maps-toolbar","e-maps-toolbar",this.maps.zoomSettings.enablePanning?"e-maps-toolbar":"","e-maps-toolbar");var i=this.maps.toolbarProperties.shapeOpacity,o=this.maps.toolbarProperties.borderOpacity;this.maps.isTileMap&&(e<=1.1||this.maps.zoomSettings.minZoom===e)?(this.maps.isDevice||this.removeToolbarClass(this.maps.zoomSettings.enableSelectionZooming?"e-maps-toolbar":"","e-maps-toolbar","",this.maps.zoomSettings.enablePanning?"e-maps-toolbar":"",""),this.maps.zoomSettings.enablePanning&&this.removePanColor(this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor),this.isZoomSelection&&this.maps.zoomSettings.enableSelectionZooming&&!this.maps.isReset&&(this.removeZoomColor(this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor),this.removePanColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor)),this.removeZoomOpacity(this.maps.zoomSettings.enableSelectionZooming?i:.3,this.maps.zoomSettings.enableSelectionZooming?o:.3,i,o,.3,.3,this.maps.zoomSettings.enablePanning?i:.3,this.maps.zoomSettings.enablePanning?o:.3,.3,.3)):e<=1.1||this.maps.zoomSettings.minZoom===e?(this.maps.isDevice||this.removeToolbarClass(this.maps.zoomSettings.enableSelectionZooming?"e-maps-toolbar":"","e-maps-toolbar","","",""),!this.isZoomSelection&&this.maps.zoomSettings.enablePanning&&this.removePanColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor),this.isZoomSelection&&this.maps.zoomSettings.enableSelectionZooming&&!this.maps.isReset&&(this.removeZoomColor(this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor),this.removePanColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor)),this.removeZoomOpacity(this.maps.zoomSettings.enableSelectionZooming?i:.3,this.maps.zoomSettings.enableSelectionZooming?o:.3,i,o,.3,.3,.3,.3,.3,.3)):e<this.maps.zoomSettings.maxZoom?(this.maps.isDevice||this.removeToolbarClass(this.maps.zoomSettings.enableSelectionZooming?"e-maps-toolbar":"","e-maps-toolbar","e-maps-toolbar",this.maps.zoomSettings.enablePanning?"e-maps-toolbar":"","e-maps-toolbar"),this.maps.zoomModule.isZoomFinal?this.maps.zoomModule.isZoomFinal=!1:this.removeZoomOpacity(this.maps.zoomSettings.enableSelectionZooming?i:.3,this.maps.zoomSettings.enableSelectionZooming?o:.3,i,o,i,o,this.maps.zoomSettings.enablePanning?i:.3,this.maps.zoomSettings.enablePanning?o:.3,i,o),this.isZoomSelection&&this.maps.zoomSettings.enableSelectionZooming?(this.removeZoomColor(this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor),this.maps.zoomModule.isPan&&this.maps.zoomSettings.enablePanning&&this.removePanColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor)):!this.isZoomSelection&&this.maps.zoomSettings.enablePanning&&(this.removePanColor(this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor),this.maps.zoomSettings.enableSelectionZooming&&this.removeZoomColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor))):(this.maps.isDevice||this.removeToolbarClass("","","e-maps-toolbar",this.maps.zoomSettings.enablePanning?"e-maps-toolbar":"","e-maps-toolbar"),this.removeZoomOpacity(.3,.3,.3,.3,i,o,this.maps.zoomSettings.enablePanning?i:.3,this.maps.zoomSettings.enablePanning?o:.3,i,o),this.maps.zoomSettings.enableSelectionZooming&&this.removeZoomColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor),!this.isZoomSelection&&this.maps.zoomSettings.enablePanning&&this.removePanColor(this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor))}else this.maps.isDevice||(this.removePanColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor),this.removeZoomColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor),this.removeZoomOpacity(1,1,1,1,1,1,1,1,1,1))},e.prototype.setOpacity=function(e,t,i,o){ie(this.maps.element.id+e)&&(ie(this.maps.element.id+e).setAttribute("stroke-opacity",i.toString()),ie(this.maps.element.id+e).setAttribute("fill-opacity",i.toString()),ie(this.maps.element.id+t).setAttribute("stroke-opacity",o.toString()),ie(this.maps.element.id+t).setAttribute("fill-opacity",o.toString()))},e.prototype.removeZoomOpacity=function(e,t,i,o,a,n,l,r,s,d){this.setOpacity("_Zooming_ToolBar_Zoom_Rect","_Zooming_ToolBar_Zoom",t,e),this.setOpacity("_Zooming_ToolBar_ZoomIn_Rect","_Zooming_ToolBar_ZoomIn_Path",o,i),this.setOpacity("_Zooming_ToolBar_ZoomOut_Rect","_Zooming_ToolBar_ZoomOut",n,a),this.setOpacity("_Zooming_ToolBar_Pan_Rect","_Zooming_ToolBar_Pan",r,l),this.setOpacity("_Zooming_ToolBar_Reset_Rect","_Zooming_ToolBar_Reset",d,s)},e.prototype.removeToolbarClass=function(e,t,i,o,a){ie(this.maps.element.id+"_Zooming_KitCollection")&&(document.getElementById(this.maps.element.id+"_Zooming_ToolBar_ZoomIn_Group")&&ie(this.maps.element.id+"_Zooming_ToolBar_ZoomIn_Group").setAttribute("class",t),document.getElementById(this.maps.element.id+"_Zooming_ToolBar_ZoomOut_Group")&&ie(this.maps.element.id+"_Zooming_ToolBar_ZoomOut_Group").setAttribute("class",i),document.getElementById(this.maps.element.id+"_Zooming_ToolBar_Reset_Group")&&ie(this.maps.element.id+"_Zooming_ToolBar_Reset_Group").setAttribute("class",a),document.getElementById(this.maps.element.id+"_Zooming_ToolBar_Zoom_Group")&&this.maps.zoomSettings.enableSelectionZooming&&ie(this.maps.element.id+"_Zooming_ToolBar_Zoom_Group").setAttribute("class",e),document.getElementById(this.maps.element.id+"_Zooming_ToolBar_Pan_Group")&&this.maps.zoomSettings.enablePanning&&ie(this.maps.element.id+"_Zooming_ToolBar_Pan_Group").setAttribute("class",o))},e.prototype.removePanColor=function(e){ie(this.maps.element.id+"_Zooming_ToolBar_Pan_Rect")&&this.maps.zoomSettings.enablePanning&&(ie(this.maps.element.id+"_Zooming_ToolBar_Pan").setAttribute("fill",e),ie(this.maps.element.id+"_Zooming_ToolBar_Pan").setAttribute("stroke",e))},e.prototype.removeZoomColor=function(e){ie(this.maps.element.id+"_Zooming_ToolBar_Zoom_Rect")&&this.maps.zoomSettings.enableSelectionZooming&&(ie(this.maps.element.id+"_Zooming_ToolBar_Zoom").setAttribute("fill","transparent"),ie(this.maps.element.id+"_Zooming_ToolBar_Zoom").setAttribute("stroke",e))},e.prototype.wireEvents=function(e,i){t.EventHandler.add(e,t.Browser.touchStartEvent,i,this),t.EventHandler.add(e,"mouseover",this.showTooltip,this),t.EventHandler.add(e,"mouseout",this.removeTooltip,this)},e.prototype.mapMouseWheel=function(e){if(this.maps.zoomSettings.enable&&this.maps.zoomSettings.mouseWheelZoom){var i=this.maps;i.availableSize;i.markerZoomedState=!1,i.zoomPersistence=i.enablePersistence;var o=this.getMousePosition(e.pageX,e.pageY),a=i.tileZoomLevel,n=i.scale,l=i.isTileMap?a:n;if(o.x>i.mapAreaRect.x&&o.x<i.mapAreaRect.x+i.mapAreaRect.width&&o.y>i.mapAreaRect.y&&o.y<i.mapAreaRect.y+i.mapAreaRect.height){e.preventDefault();var r="mozilla"!==this.browserName||this.isPointer?e.wheelDelta/120>0?"ZoomIn":"ZoomOut":-e.detail/3>0?"ZoomIn":"ZoomOut";"ZoomIn"===r?(i.mapScaleValue=l+1,i.staticMapZoom=i.tileZoomLevel,i.staticMapZoom>0&&i.staticMapZoom<22&&(i.staticMapZoom+=1),this.performZooming(o,l+1,r)):(i.mapScaleValue=l-1,i.isReset=i.mapScaleValue<1,i.staticMapZoom=i.tileZoomLevel,1===i.mapScaleValue&&(i.markerCenterLatitude=null,i.markerCenterLongitude=null),i.staticMapZoom>1&&i.staticMapZoom<22&&(i.staticMapZoom-=1),this.performZooming(o,l-1,r))}this.removeToolbarOpacity(i.mapScaleValue,this.maps.isDevice?this.maps.element.id+"_Zooming_":t.isNullOrUndefined(e.target)?this.maps.element.id:e.target.id)}},e.prototype.doubleClick=function(e){var t=e.pageX,i=e.pageY;e.target;if(this.maps.zoomSettings.enable&&this.maps.zoomSettings.doubleClickZoom&&!(e.target.id.indexOf("_Zooming_")>-1)){var o=this.getMousePosition(t,i),a=this.maps,n=(a.availableSize,a.tileZoomLevel),l=a.scale;a.mapScaleValue=a.mapScaleValue+1;var r=a.isTileMap?n:l;o.x>a.mapAreaRect.x&&o.x<a.mapAreaRect.x+a.mapAreaRect.width&&o.y>a.mapAreaRect.y&&o.y<a.mapAreaRect.y+a.mapAreaRect.height&&this.performZooming(o,r+1,"ZoomIn")}},e.prototype.mouseDownHandler=function(e){var t,i,o=null;e.target;"touchstart"===e.type?(this.isTouch=!0,o=e.touches,e.target,t=o[0].clientX,i=o[0].clientY):(t=e.pageX,i=e.pageY,e.target),this.maps.zoomSettings.enablePanning?this.isPan=this.isPanning=!this.isZoomSelection:this.isPan=this.isPanning=this.panColor!==this.selectionColor?this.maps.zoomSettings.enablePanning:this.zoomColor===this.selectionColor,this.mouseDownLatLong={x:t,y:i};var a=this.maps.isTileMap?Math.round(this.maps.tileZoomLevel):Math.round(this.maps.mapScaleValue);this.rectZoomingStart=this.isZoomSelection&&a<this.maps.zoomSettings.maxZoom&&this.maps.zoomSettings.enable,this.mouseDownPoints=this.getMousePosition(t,i),this.isTouch&&(this.firstMove=!0,this.pinchFactor=this.maps.scale,this.fingers=o.length),this.isSingleClick=!0},e.prototype.mouseMoveHandler=function(e){var i,o,a,n=this.maps,l=null,r=this.maps.zoomSettings;"touchmove"===e.type?(this.isTouch=!0,a=e.target,i=(l=e.touches)[0].clientX,o=l[0].clientY):(i=e.pageX,o=e.pageY,a=e.target),ie(n.element.id+"_Zooming_KitCollection")&&(a.id.indexOf("_Zooming_")>-1?ie(n.element.id+"_Zooming_KitCollection").setAttribute("opacity","1"):n.isDevice||ie(n.element.id+"_Zooming_KitCollection").setAttribute("opacity","fluentdark"===n.theme.toLowerCase()?"0.6":"0.3")),this.isTouch&&this.maps.zoomSettings.pinchZooming&&(this.firstMove&&2===l.length?(this.rectZoomingStart=!1,this.updateInteraction(),this.touchStartList=Le(e)):2===l.length&&2===this.touchStartList.length&&(this.touchMoveList=Le(e),e.preventDefault(),this.rectZoomingStart=!1,this.performPinchZooming(e)),this.firstMove=!1),this.mouseMovePoints=this.getMousePosition(i,o);e.target.id,e.target;if(r.enable&&this.isPanning&&-1==this.maps.markerDragId.indexOf("_MarkerIndex_")&&(t.Browser.isDevice&&l.length>=1||!t.Browser.isDevice)&&(e.preventDefault(),this.maps.element.style.cursor="pointer",this.mouseMoveLatLong={x:i,y:o},this.mouseDownLatLong.x!==this.mouseMoveLatLong.x&&this.mouseDownLatLong.y!==this.mouseMoveLatLong.y&&(this.maps.zoomSettings.enablePanning&&this.panning("None",null,null,e),this.mouseDownLatLong.x=i,this.mouseDownLatLong.y=o)),this.isTouch?1===l.length&&this.rectZoomingStart:this.rectZoomingStart){e.preventDefault();var s=this.maps.isTileMap?Math.round(this.maps.tileZoomLevel):Math.round(this.maps.mapScaleValue);this.maps.zoomSettings.enableSelectionZooming&&s<this.maps.zoomSettings.maxZoom?this.drawZoomRectangle():(this.rectZoomingStart=!1,this.isPan=!0)}},e.prototype.mouseUpHandler=function(e){this.maps;this.rectZoomingStart=!1,this.isPanning=!1,this.isSingleClick=!!this.isSingleClick,this.isTouch=!1,this.touchStartList=[],this.touchMoveList=[],this.lastScale=1,this.maps.element.style.cursor="auto",t.isNullOrUndefined(this.distanceX)&&t.isNullOrUndefined(this.distanceY)||t.isNullOrUndefined(this.currentLayer)||"SubLayer"!==this.currentLayer.type||(this.toAlignSublayer(),this.distanceX=this.distanceY=null);var i=ie(this.maps.element.id+"_Selection_Rect_Zooming");i&&this.maps.zoomSettings.enable&&this.maps.zoomSettings.enableSelectionZooming&&(t.remove(i),this.performRectZooming()),this.mouseMoveLatLong={x:0,y:0},this.mouseDownLatLong={x:0,y:0}},e.prototype.mouseCancelHandler=function(e){this.isPanning=!1,this.isTouch=!1,this.rectZoomingStart=!1;var i=ie(this.maps.element.id+"_Selection_Rect_Zooming");i&&this.maps.zoomSettings.enable&&(t.remove(i),this.performRectZooming())},e.prototype.click=function(e){var t=this.maps;if(t.markerModule&&t.markerModule.sameMarkerData.length>0||e.target.id.indexOf("MarkerIndex")>-1&&-1===e.target.id.indexOf("cluster"))return null;if(this.isSingleClick&&t.zoomSettings.zoomOnClick&&!(e.target.id.indexOf("_Zooming_")>-1)&&!t.zoomSettings.doubleClickZoom&&this.zoomColor!==this.selectionColor){var i=e.pageX,o=e.pageY,a=this.getMousePosition(i,o),n=t.tileZoomLevel,l=t.scale;t.mapScaleValue=t.mapScaleValue+1;var r=t.isTileMap?n:l;a.x>t.mapAreaRect.x&&a.x<t.mapAreaRect.x+t.mapAreaRect.width&&a.y>t.mapAreaRect.y&&a.y<t.mapAreaRect.y+t.mapAreaRect.height&&this.performZooming(a,r+1,"ZoomIn")}},e.prototype.getMousePosition=function(e,t){var i=this.maps,o=i.element.getBoundingClientRect(),a=i.element.ownerDocument.defaultView.pageXOffset,n=i.element.ownerDocument.defaultView.pageYOffset,l=i.element.ownerDocument.documentElement.clientTop,r=i.element.ownerDocument.documentElement.clientLeft,s=o.left+a-r,d=o.top+n-l;return new Ze(Math.abs(e-s),Math.abs(t-d))},e.prototype.addEventListener=function(){this.maps.isDestroyed||(t.EventHandler.add(this.maps.element,this.wheelEvent,this.mapMouseWheel,this),t.EventHandler.add(this.maps.element,"click",this.click,this),t.EventHandler.add(this.maps.element,"dblclick",this.doubleClick,this),this.maps.on(t.Browser.touchMoveEvent,this.mouseMoveHandler,this),this.maps.on(t.Browser.touchStartEvent,this.mouseDownHandler,this),this.maps.on(t.Browser.touchEndEvent,this.mouseUpHandler,this),t.EventHandler.add(this.maps.element,this.cancelEvent,this.mouseCancelHandler,this))},e.prototype.removeEventListener=function(){this.maps.isDestroyed||(t.EventHandler.remove(this.maps.element,this.wheelEvent,this.mapMouseWheel),t.EventHandler.remove(this.maps.element,"click",this.click),t.EventHandler.remove(this.maps.element,"dblclick",this.doubleClick),this.maps.off(t.Browser.touchMoveEvent,this.mouseMoveHandler),this.maps.off(t.Browser.touchStartEvent,this.mouseDownHandler),this.maps.off(t.Browser.touchEndEvent,this.mouseUpHandler),this.maps.off(this.cancelEvent,this.mouseCancelHandler))},e.prototype.getModuleName=function(){return"Zoom"},e.prototype.destroy=function(){this.toolBarGroup=null,this.currentToolbarEle=null,this.zoomingRect=null,this.zoomElements=null,this.panElements=null,this.baseTranslatePoint=null,this.touchStartList=null,this.touchMoveList=null,this.previousTouchMoveList=null,this.mouseDownPoints=null,this.mouseMovePoints=null,this.startTouches=[],this.zoomshapewidth=null,this.intersect=[],this.mouseDownLatLong=null,this.mouseMoveLatLong=null,this.removeEventListener(),this.currentLayer=null},e}(),Oi=function(){function e(e){}return e.prototype.print=function(e,i){var o=window.open("","print","height="+window.outerHeight+",width="+window.outerWidth+",tabbar=no");o.moveTo(0,0),o.resizeTo(screen.availWidth,screen.availHeight);var a={cancel:!1,htmlContent:this.getHTMLContent(e,i),name:"beforePrint"};e.trigger("beforePrint",a,function(e){a.cancel||t.print(a.htmlContent,o)})},e.prototype.getHTMLContent=function(e,i){var o=t.createElement("div"),a=e.element.cloneNode(!0),n=e.isTileMap?a.getElementsByTagName("svg")[1]:a.getElementsByTagName("svg")[0];if(!t.isNullOrUndefined(n)&&(n=n.childNodes[0],!t.isNullOrUndefined(n))){var l=n.getAttribute("fill");"Tailwind"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme||"rgba(255,255,255, 0.0)"!==l&&"transparent"!==l?"TailwindDark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme||"rgba(255,255,255, 0.0)"!==l&&"transparent"!==l||n.setAttribute("fill","rgba(0, 0, 0, 1)"):n.setAttribute("fill","rgba(255,255,255, 1)")}if(e.isTileMap)for(var r=0;r<a.childElementCount;r++)if(a.children[r].id===e.element.id+"_tile_parent"){a.children[r].style.removeProperty("height"),a.children[r].style.removeProperty("width"),a.children[r].style.removeProperty("top"),a.children[r].style.removeProperty("left"),a.children[r].style.removeProperty("right"),a.children[r].style.removeProperty("overflow");var s=document.getElementById(e.element.id+"_Tile_SVG_Parent");a.children[r].children[0].style.overflow="hidden",a.children[r].children[0].style.position="absolute",a.children[r].children[0].style.height=s.style.height,a.children[r].children[0].style.width=s.style.width,a.children[r].children[0].style.left=s.style.left,a.children[r].children[0].style.top=s.style.top;break}return i?i instanceof Array?Array.prototype.forEach.call(i,function(e){o.appendChild(ne(e).cloneNode(!0))}):i instanceof Element?o.appendChild(i.cloneNode(!0)):o.appendChild(ne(i).cloneNode(!0)):o.appendChild(a),o},e.prototype.getModuleName=function(){return"Print"},e.prototype.destroy=function(){},e}(),Ci=function(){function e(e){}return e.prototype.export=function(e,i,o,a){return new Promise(function(n,l){var r,s,d=t.createElement("canvas",{id:"ej2-canvas",attrs:{width:e.availableSize.width.toString(),height:e.availableSize.height.toString()}}),p=!(t.Browser.userAgent.toString().indexOf("HeadlessChrome")>-1),h=document.getElementById(e.element.id+"_Tile_SVG_Parent"),m=ie(e.element.id+"_svg").cloneNode(!0),c=m.childNodes[0].getAttribute("fill");"Tailwind"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme||"rgba(255,255,255, 0.0)"!==c&&"transparent"!==c?"TailwindDark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme||"rgba(255,255,255, 0.0)"!==c&&"transparent"!==c||m.childNodes[0].setAttribute("fill","rgba(0, 0, 0, 1)"):m.childNodes[0].setAttribute("fill","rgba(255,255,255, 1)"),e.isTileMap?(s=ie(e.element.id+"_Tile_SVG").cloneNode(!0),r='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'+m.outerHTML+s.outerHTML+"</svg>"):r='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'+m.outerHTML+"</svg>";var u=window.URL.createObjectURL(new Blob("SVG"===i?[r]:[(new XMLSerializer).serializeToString(m)],{type:"image/svg+xml"}));if("SVG"===i)a?S(o,i,u,p):n(null);else{var g=new Image,y=d.getContext("2d");if(e.isTileMap){e.isExportInitialTileMap=!0;for(var f=document.getElementById(e.element.id+"_MapAreaBorder"),b=parseFloat(f.getAttribute("y")),v=parseFloat(f.getAttribute("x")),x=new XMLHttpRequest,O=e.mapLayerPanel.tiles.length,C=function(l){var r=document.getElementById(e.element.id+"_tile_"+(l-1)),m=new Image;m.crossOrigin="Anonymous";var g=e.background?e.background:"Tailwind"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme||"rgba(255,255,255, 0.0)"!==c&&"transparent"!==c?"TailwindDark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme||"rgba(255,255,255, 0.0)"!==c&&"transparent"!==c?"#ffffff":"#000000":"#ffffff";y.fillStyle=g,y.fillRect(0,0,e.availableSize.width,e.availableSize.height),y.font=e.titleSettings.textStyle.size+" Arial";var f=document.getElementById(e.element.id+"_Map_title");t.isNullOrUndefined(f)||(y.fillStyle=f.getAttribute("fill"),y.fillText(e.titleSettings.text,parseFloat(f.getAttribute("x")),parseFloat(f.getAttribute("y")))),m.onload=function(){if(0===l||l===O+1?0===l?(y.setTransform(1,0,0,1,0,0),y.rect(0,b,parseFloat(h.style.width),parseFloat(h.style.height)),y.clip()):y.setTransform(1,0,0,1,v,b):y.setTransform(1,0,0,1,parseFloat(r.style.left)+v,parseFloat(r.style.top)+b),y.drawImage(m,0,0),l===O+1){localStorage.setItem("local-canvasImage",d.toDataURL("image/png"));var t=localStorage.getItem("local-canvasImage");a?(S(o,i,t,p),localStorage.removeItem("local-canvasImage"),e.isExportInitialTileMap=!1):(e.isExportInitialTileMap=!1,"PNG"===i?n(t):"JPEG"===i&&n(d.toDataURL("image/jpeg")))}},0===l||l===O+1?0===l?m.src=u:setTimeout(function(){m.src=window.URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(s)],{type:"image/svg+xml"}))},300):(x.open("GET",r.children[0].getAttribute("src"),!0),x.send(),m.src=r.children[0].getAttribute("src"))},_=0;_<=O+1;_++)C(_)}else g.onload=function(){y.drawImage(g,0,0),window.URL.revokeObjectURL(u),a?S(o,i,d.toDataURL("image/png").replace("image/png","image/octet-stream"),p):"PNG"===i?n(d.toDataURL("image/png")):"JPEG"===i&&n(d.toDataURL("image/jpeg"))},g.src=u}})},e.prototype.getModuleName=function(){return"ImageExport"},e.prototype.destroy=function(){},e}(),_i=function(){function e(){}return e.prototype.export=function(e,i,o,n,l){return new Promise(function(r,s){e.isTileMap&&(e.isExportInitialTileMap=!0);var d=t.createElement("canvas",{id:"ej2-canvas",attrs:{width:e.availableSize.width.toString(),height:e.availableSize.height.toString()}});l=t.isNullOrUndefined(l)?a.PdfPageOrientation.Landscape:l;var p=document.getElementById(e.element.id+"_Tile_SVG_Parent"),h=e.svgObject.cloneNode(!0),m=h.childNodes[0].getAttribute("fill");"Tailwind"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme||"rgba(255,255,255, 0.0)"!==m&&"transparent"!==m?"TailwindDark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme||"rgba(255,255,255, 0.0)"!==m&&"transparent"!==m||h.childNodes[0].setAttribute("fill","rgba(0, 0, 0, 1)"):h.childNodes[0].setAttribute("fill","rgba(255,255,255, 1)");var c=window.URL.createObjectURL(new Blob("SVG"===i?[void 0]:[(new XMLSerializer).serializeToString(h)],{type:"image/svg+xml"})),u=new a.PdfDocument,g=new Image,y=d.getContext("2d");if(e.isTileMap)for(var f=document.getElementById(e.element.id+"_MapAreaBorder"),b=parseFloat(f.getAttribute("y")),v=parseFloat(f.getAttribute("x")),S=new XMLHttpRequest,x=e.mapLayerPanel.tiles.length,O=function(s){var h=document.getElementById(e.element.id+"_tile_"+(s-1)),g=new Image;g.crossOrigin="Anonymous";var f=e.background?e.background:"Tailwind"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme||"rgba(255,255,255, 0.0)"!==m&&"transparent"!==m?"TailwindDark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme||"rgba(255,255,255, 0.0)"!==m&&"transparent"!==m?"#ffffff":"#000000":"#ffffff";y.fillStyle=f,y.fillRect(0,0,e.availableSize.width,e.availableSize.height),y.font=e.titleSettings.textStyle.size+" Arial";var O=document.getElementById(e.element.id+"_Map_title");t.isNullOrUndefined(O)||(y.fillStyle=O.getAttribute("fill"),y.fillText(e.titleSettings.text,parseFloat(O.getAttribute("x")),parseFloat(O.getAttribute("y")))),g.onload=function(){if(0===s||s===x+1?0===s?(y.setTransform(1,0,0,1,0,0),y.rect(0,b,parseFloat(p.style.width),parseFloat(p.style.height)),y.clip()):y.setTransform(1,0,0,1,v,b):y.setTransform(1,0,0,1,parseFloat(h.style.left)+v,parseFloat(h.style.top)+b),y.drawImage(g,0,0),s===x+1&&"PDF"===i){localStorage.setItem("saved-image-example",d.toDataURL("image/jpeg"));var t=localStorage.getItem("saved-image-example");u.pageSettings.orientation=l,t=t.slice(t.indexOf(",")+1),u.pages.add().graphics.drawImage(new a.PdfBitmap(t),0,0,e.availableSize.width-60,e.availableSize.height),e.isExportInitialTileMap=!1,n?(u.save(o+".pdf"),u.destroy()):r(null)}},0===s||s===x+1?0===s?g.src=c:setTimeout(function(){var t=document.getElementById(e.element.id+"_Tile_SVG");g.src=window.URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(t)],{type:"image/svg+xml"}))},300):(S.open("GET",h.children[0].getAttribute("src"),!0),S.send(),g.src=h.children[0].getAttribute("src"))},C=0;C<=x+1;C++)O(C);else g.onload=function(){if(y.drawImage(g,0,0),window.URL.revokeObjectURL(c),"PDF"===i){var t=d.toDataURL("image/jpeg").replace("image/jpeg","image/octet-stream");u.pageSettings.orientation=l,t=t.slice(t.indexOf(",")+1),u.pages.add().graphics.drawImage(new a.PdfBitmap(t),0,0,e.availableSize.width-60,e.availableSize.height),n?(u.save(o+".pdf"),u.destroy()):r(null)}},g.src=c})},e.prototype.getModuleName=function(){return"PdfExport"},e.prototype.destroy=function(){},e}();e.Maps=ci,e.load="load",e.loaded="loaded",e.click=Vt,e.onclick="onclick",e.rightClick="rightClick",e.doubleClick="doubleClick",e.resize="resize",e.tooltipRender=Ht,e.shapeSelected="shapeSelected",e.shapeHighlight=Gt,e.mousemove="mousemove",e.mouseup="mouseup",e.mousedown="mousedown",e.layerRendering="layerRendering",e.shapeRendering="shapeRendering",e.markerRendering=Wt,e.markerClusterRendering=Xt,e.markerClick=qt,e.markerDragStart=Yt,e.markerDragEnd="markerDragEnd",e.markerClusterClick=Jt,e.markerMouseMove=Qt,e.markerClusterMouseMove=Kt,e.dataLabelRendering=$t,e.bubbleRendering=ei,e.bubbleClick=ti,e.bubbleMouseMove=ii,e.animationComplete=oi,e.legendRendering="legendRendering",e.annotationRendering=ai,e.itemSelection=ni,e.itemHighlight=li,e.beforePrint="beforePrint",e.zoomIn="zoomIn",e.zoomOut="zoomOut",e.pan="pan",e.Annotation=dt,e.Arrow=pt,e.Font=ht,e.ZoomToolbarButtonSettings=mt,e.ZoomToolbarTooltipSettings=ct,e.ZoomToolbarSettings=ut,e.Border=gt,e.CenterPosition=yt,e.TooltipSettings=ft,e.Margin=bt,e.ConnectorLineSettings=vt,e.MarkerClusterSettings=St,e.MarkerClusterData=xt,e.ColorMappingSettings=Ot,e.InitialMarkerSelectionSettings=Ct,e.InitialShapeSelectionSettings=_t,e.SelectionSettings=Mt,e.HighlightSettings=Lt,e.NavigationLineSettings=Pt,e.BubbleSettings=wt,e.CommonTitleSettings=Tt,e.SubTitleSettings=It,e.TitleSettings=kt,e.ZoomSettings=Nt,e.ToggleLegendSettings=Ft,e.LegendSettings=Et,e.DataLabelSettings=zt,e.ShapeSettings=At,e.MarkerBase=Bt,e.MarkerSettings=Ut,e.LayerSettings=jt,e.Tile=Rt,e.MapsAreaSettings=Zt,e.Size=Re,e.stringToNumber=n,e.calculateSize=l,e.createSvg=r,e.getMousePosition=s,e.degreesToRadians=d,e.radiansToDegrees=p,e.convertGeoToPoint=h,e.convertTileLatLongToPoint=m,e.xToCoordinate=c,e.yToCoordinate=u,e.aitoff=g,e.roundTo=y,e.sinci=f,e.acos=b,e.calculateBound=v,e.triggerDownload=S,e.Point=Ze,e.MinMax=De,e.GeoLocation=Ve,e.measureText=x,e.TextOption=He,e.PathOption=Ge,e.ColorValue=We,e.RectOption=Xe,e.CircleOption=qe,e.PolygonOption=Ye,e.PolylineOption=Je,e.LineOption=Qe,e.Line=Ke,e.MapLocation=$e,e.Rect=et,e.PatternOptions=tt,e.renderTextElement=O,e.convertElement=C,e.formatValue=_,e.convertStringToValue=M,e.convertElementFromLabel=L,e.drawSymbols=P,e.getValueFromObject=w,e.markerColorChoose=T,e.markerShapeChoose=I,e.clusterTemplate=k,e.mergeSeparateCluster=N,e.clusterSeparate=F,e.marker=E,e.markerTemplate=z,e.maintainSelection=A,e.maintainStyleClass=B,e.appendShape=U,e.drawCircle=j,e.drawRectangle=R,e.drawPath=function(e,t,i){return U(e.renderer.drawPath(t),i)},e.drawPolygon=function(e,t,i){return U(e.renderer.drawPolygon(t),i)},e.drawPolyline=function(e,t,i){return U(e.renderer.drawPolyline(t),i)},e.drawLine=function(e,t,i){return U(e.renderer.drawLine(t),i)},e.calculateShapes=Z,e.drawDiamond=function(e,t,i,o,a){return t.d="M "+o.x+" "+(o.y-i.height/2)+" L "+(o.x+i.width/2)+" "+o.y+" L "+o.x+" "+(o.y+i.height/2)+" L "+(o.x-i.width/2)+" "+o.y+" Z",U(e.renderer.drawPath(t),a)},e.drawTriangle=function(e,t,i,o,a){return t.d="M "+o.x+" "+(o.y-i.height/2)+" L "+(o.x+i.width/2)+" "+(o.y+i.height/2)+" L "+(o.x-i.width/2)+" "+(o.y+i.height/2)+" Z",U(e.renderer.drawPath(t),a)},e.drawCross=function(e,t,i,o,a){return t.d="M "+o.x+" "+(o.y-i.height/2)+" L "+o.x+" "+(o.y+i.height/2)+" M "+(o.x-i.width/2)+" "+o.y+" L "+(o.x+i.width/2)+" "+o.y,U(e.renderer.drawPath(t),a)},e.drawHorizontalLine=function(e,t,i,o,a){return t.d=" M "+(o.x-i.width/2)+" "+o.y+" L "+(o.x+i.width/2)+" "+o.y,U(e.renderer.drawPath(t),a)},e.drawVerticalLine=function(e,t,i,o,a){return t.d="M "+o.x+" "+(o.y-i.height/2)+" L "+o.x+" "+(o.y+i.height/2),U(e.renderer.drawPath(t),a)},e.drawStar=function(e,t,i,o,a){return t.d="M "+(o.x+i.width/3)+" "+(o.y-i.height/2)+" L "+(o.x-i.width/2)+" "+(o.y+i.height/6)+" L "+(o.x+i.width/2)+" "+(o.y+i.height/6)+" L "+(o.x-i.width/3)+" "+(o.y-i.height/2)+" L "+o.x+" "+(o.y+i.height/2)+" L "+(o.x+i.width/3)+" "+(o.y-i.height/2)+" Z",U(e.renderer.drawPath(t),a)},e.drawBalloon=D,e.drawPattern=function(e,t,i,o){for(var a=e.renderer.createPattern(t,"pattern"),n=0,l=i;n<l.length;n++)U(l[n],a);return U(a,o)},e.getFieldData=function(e,t){for(var i,o=[],a=0,n=e;a<n.length;a++){var l=n[a];i={};for(var r=0,s=t;r<s.length;r++){var d=s[r];l[d]&&(i[d]=l[d])}o.push(i)}return o},e.checkShapeDataFields=V,e.checkPropertyPath=H,e.filter=G,e.getRatioOfBubble=W,e.findMidPointOfPolygon=X,e.isCustomPath=q,e.textTrim=Y,e.findPosition=J,e.removeElement=Q,e.calculateCenterFromPixel=K,e.getTranslate=$,e.getZoomTranslate=ee,e.fixInitialScaleForTile=te,e.getElementByID=ie,e.getClientElement=function(e){var i=document.getElementById(e);return t.isNullOrUndefined(i)?null:i.getClientRects()[0]},e.Internalize=oe,e.getTemplateFunction=ae,e.getElement=ne,e.getShapeData=le,e.triggerShapeEvent=re,e.getElementsByClassName=se,e.querySelector=de,e.getTargetElement=pe,e.createStyle=he,e.customizeStyle=me,e.triggerItemSelectionEvent=ce,e.removeClass=ue,e.elementAnimate=ge,e.timeout=ye,e.showTooltip=fe,e.wordWrap=be,e.createTooltip=ve,e.getHexColor=Se,e.drawSymbol=xe,e.renderLegendShape=Oe,e.getElementOffset=Ce,e.changeBorderWidth=_e,e.changeNavaigationLineWidth=Me,e.targetTouches=Le,e.calculateScale=Pe,e.getDistance=we,e.getTouches=Te,e.getTouchCenter=Ie,e.sum=ke,e.zoomAnimate=Ne,e.animate=Fe,e.MapAjax=it,e.smoothTranslate=Ee,e.compareZoomFactor=ze,e.calculateZoomLevel=Ae,e.processResult=Be,e.LayerPanel=di,e.Bubble=ui,e.BingMap=ri,e.Marker=Dt,e.ColorMapping=si,e.DataLabel=gi,e.NavigationLine=yi,e.Legend=fi,e.Highlight=bi,e.Selection=vi,e.MapsTooltip=Si,e.Zoom=xi,e.Annotations=pi,e.Print=Oi,e.ImageExport=Ci,e.PdfExport=_i,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
11
11
|
//# sourceMappingURL=ej2-maps.umd.min.js.map
|