@syncfusion/ej2-maps 28.2.5 → 28.2.9

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.
@@ -1,10 +1,10 @@
1
1
  /*!
2
2
  * filename: ej2-maps.min.js
3
- * version : 28.2.5
3
+ * version : 28.2.9
4
4
  * Copyright Syncfusion Inc. 2001 - 2024. 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&&"object"==typeof module?module.exports=t(require("SyncfusionBase"),require("SyncfusionSvgBase"),require("SyncfusionData"),require("SyncfusionPdfExport")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionSvgBase","SyncfusionData","SyncfusionPdfExport"],t):"object"==typeof exports?exports.SyncfusionMaps=t(require("SyncfusionBase"),require("SyncfusionSvgBase"),require("SyncfusionData"),require("SyncfusionPdfExport")):e.SyncfusionMaps=t(e.SyncfusionBase,e.SyncfusionSvgBase,e.SyncfusionData,e.SyncfusionPdfExport)}(self,((e,t,i,o)=>(()=>{"use strict";var n={766:t=>{t.exports=e},74:e=>{e.exports=i},461:e=>{e.exports=o},727:e=>{e.exports=t}},a={};function l(e){var t=a[e];if(void 0!==t)return t.exports;var i=a[e]={exports:{}};return n[e](i,i.exports,l),i.exports}l.d=(e,t)=>{for(var i in t)l.o(t,i)&&!l.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{l.r(r),l.d(r,{Annotation:()=>kt,Annotations:()=>io,Arrow:()=>Nt,BingMap:()=>$i,Border:()=>Ut,Bubble:()=>ro,BubbleSettings:()=>ei,CenterPosition:()=>jt,CircleOption:()=>z,ColorMapping:()=>eo,ColorMappingSettings:()=>Wt,ColorValue:()=>N,CommonTitleSettings:()=>ti,ConnectorLineSettings:()=>Vt,Coordinate:()=>L,DataLabel:()=>ho,DataLabelSettings:()=>ri,Font:()=>Et,GeoLocation:()=>w,Highlight:()=>uo,HighlightSettings:()=>Jt,ImageExport:()=>vo,InitialMarkerSelectionSettings:()=>qt,InitialShapeSelectionSettings:()=>Xt,Internalize:()=>Ve,LayerPanel:()=>to,LayerSettings:()=>hi,Legend:()=>co,LegendSettings:()=>li,Line:()=>j,LineOption:()=>U,MapAjax:()=>Mt,MapLocation:()=>Z,Maps:()=>lo,MapsAreaSettings:()=>ci,MapsTooltip:()=>yo,Margin:()=>Dt,Marker:()=>so,MarkerBase:()=>di,MarkerClusterData:()=>Ht,MarkerClusterSettings:()=>Gt,MarkerSettings:()=>pi,MinMax:()=>P,NavigationLine:()=>mo,NavigationLineSettings:()=>$t,PathOption:()=>k,PatternOptions:()=>D,PdfExport:()=>xo,Point:()=>_,Polygon:()=>po,PolygonOption:()=>B,PolygonSetting:()=>Qt,PolygonSettings:()=>Kt,PolygonTooltipSettings:()=>Rt,PolylineOption:()=>A,Print:()=>bo,Rect:()=>R,RectOption:()=>E,RelativePoint:()=>M,Selection:()=>go,SelectionSettings:()=>Yt,ShapeSettings:()=>si,Size:()=>n,SubTitleSettings:()=>ii,TextOption:()=>I,Tile:()=>mi,TitleSettings:()=>oi,ToggleLegendSettings:()=>ai,TooltipSettings:()=>Zt,Zoom:()=>fo,ZoomSettings:()=>ni,ZoomToolbarButtonSettings:()=>zt,ZoomToolbarSettings:()=>At,ZoomToolbarTooltipSettings:()=>Bt,acos:()=>x,aitoff:()=>b,animate:()=>vt,animationComplete:()=>Di,annotationRendering:()=>Gi,appendShape:()=>he,beforePrint:()=>Yi,bubbleClick:()=>Zi,bubbleMouseMove:()=>Ri,bubbleRendering:()=>ji,calculateBound:()=>C,calculateCenterFromPixel:()=>Ae,calculatePolygonPath:()=>u,calculateScale:()=>ct,calculateShapes:()=>be,calculateSize:()=>s,calculateZoomLevel:()=>wt,changeBorderWidth:()=>pt,changeNavaigationLineWidth:()=>ht,checkPropertyPath:()=>Te,checkShapeDataFields:()=>we,click:()=>yi,clusterSeparate:()=>ae,clusterTemplate:()=>te,compareZoomFactor:()=>Pt,convertElement:()=>G,convertElementFromLabel:()=>q,convertGeoToPoint:()=>c,convertStringToValue:()=>W,convertTileLatLongToPoint:()=>g,createStyle:()=>Qe,createSvg:()=>d,createTooltip:()=>at,customizeStyle:()=>Ke,dataLabelRendering:()=>Ui,degreesToRadians:()=>h,doubleClick:()=>vi,drawBalloon:()=>Me,drawCircle:()=>me,drawCross:()=>xe,drawDiamond:()=>ve,drawHorizontalLine:()=>Ce,drawLine:()=>fe,drawPath:()=>ue,drawPattern:()=>Le,drawPolygon:()=>ge,drawPolyline:()=>ye,drawRectangle:()=>ce,drawStar:()=>_e,drawSymbol:()=>rt,drawSymbols:()=>X,drawTriangle:()=>Se,drawVerticalLine:()=>Oe,elementAnimate:()=>tt,filter:()=>Fe,findMidPointOfPolygon:()=>ke,findPosition:()=>ze,fixInitialScaleForTile:()=>Ze,formatValue:()=>H,getDistance:()=>ut,getElement:()=>He,getElementByID:()=>Re,getElementOffset:()=>dt,getElementsByClassName:()=>Xe,getFieldData:()=>Pe,getHexColor:()=>lt,getMousePosition:()=>p,getProcessedMarginValue:()=>De,getRatioOfBubble:()=>Ie,getShapeData:()=>We,getTargetElement:()=>Je,getTemplateFunction:()=>Ge,getTouchCenter:()=>yt,getTouches:()=>gt,getTranslate:()=>Ue,getValueFromObject:()=>Y,getZoomTranslate:()=>je,isCustomPath:()=>Ne,itemHighlight:()=>Xi,itemSelection:()=>Hi,layerRendering:()=>Pi,legendRendering:()=>Vi,load:()=>ui,loaded:()=>gi,maintainSelection:()=>se,maintainStyleClass:()=>pe,maintainToggleSelection:()=>de,marker:()=>le,markerBoundsComparer:()=>oe,markerClick:()=>Ii,markerClusterClick:()=>Ei,markerClusterListHandler:()=>ie,markerClusterMouseMove:()=>Ai,markerClusterRendering:()=>Fi,markerColorChoose:()=>J,markerDragEnd:()=>Ni,markerDragStart:()=>ki,markerMouseMove:()=>zi,markerRendering:()=>Ti,markerShapeChoose:()=>Q,markerTemplate:()=>re,measureText:()=>T,measureTextElement:()=>F,mergeSeparateCluster:()=>ne,mouseMove:()=>Bi,mousedown:()=>Li,mousemove:()=>_i,mouseup:()=>Mi,onclick:()=>fi,pan:()=>Ki,panComplete:()=>Wi,processResult:()=>Tt,querySelector:()=>Ye,radiansToDegrees:()=>m,removeClass:()=>et,removeElement:()=>Be,renderLegendShape:()=>st,renderTextElement:()=>V,resize:()=>Si,rightClick:()=>bi,roundTo:()=>v,shapeHighlight:()=>Oi,shapeRendering:()=>wi,shapeSelected:()=>Ci,showTooltip:()=>ot,sinci:()=>S,smoothTranslate:()=>Lt,stringToNumber:()=>a,sum:()=>ft,targetTouches:()=>mt,textTrim:()=>Ee,timeout:()=>it,tooltipRender:()=>xi,triggerDownload:()=>O,triggerItemSelectionEvent:()=>$e,triggerShapeEvent:()=>qe,wordWrap:()=>nt,xToCoordinate:()=>y,yToCoordinate:()=>f,zoomAnimate:()=>bt,zoomComplete:()=>qi,zoomIn:()=>Ji,zoomOut:()=>Qi});var e,t=l(766),i=l(727),o=(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])},e(t,i)},function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}),n=function(e,t){this.width=e,this.height=t};function a(e,i){return"string"!=typeof e?e:(0,t.isNullOrUndefined)(e)?null:-1!==e.indexOf("%")?i/100*parseInt(e,10):parseInt(e,10)}function s(e){e.element.style.height=(0,t.isNullOrUndefined)(e.height)?"auto":e.height,e.element.style.width=(0,t.isNullOrUndefined)(e.width)?"auto":e.width,e.element.style.setProperty("display","block");var i=e.element.clientWidth,o=e.element.clientHeight,l="string"==typeof e.element.style.width?a(e.element.style.width,i):e.element.style.width,r="string"==typeof e.element.style.height?a(e.element.style.height,o):e.element.style.height;new n(0,0);return"0px"===e.width||"0%"===e.width||"0%"===e.height||"0px"===e.height?new n(0,0):new n(a(e.width,i)||i||l||600,a(e.height,o)||o||r||(e.isDevice?Math.min(window.innerWidth,window.innerHeight):450))}function d(e){e.renderer=new i.SvgRenderer(e.element.id),e.availableSize=s(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 p(e,t,i){var o=i.getBoundingClientRect(),n=i.ownerDocument.defaultView.pageXOffset,a=i.ownerDocument.defaultView.pageYOffset,l=i.ownerDocument.documentElement.clientTop,r=i.ownerDocument.documentElement.clientLeft,s=o.left+n-r,d=o.top+a-l;return new Z(e-s,t-d)}function h(e){return e*(Math.PI/180)}function m(e){return e*(180/Math.PI)}function c(e,i,o,a,l){var r,s,d,p,c,u,g=new n(l.mapAreaRect.width,l.mapAreaRect.height),S=l.baseMapBounds.longitude,x=l.baseMapBounds.latitude,O=h(e),M=h(i),L=(0,t.isNullOrUndefined)(l.projectionType)?"Mercator":l.projectionType,P=l.isTileMap?256*Math.pow(2,1):(0,t.isNullOrUndefined)(o)?Math.min(g.width,g.height):Math.min(g.width,g.height)*o;if("Normal"===a.geometryType)r=(0,t.isNullOrUndefined)(o)?i:Math.abs((i-S.min)*o),s=(0,t.isNullOrUndefined)(o)?e:Math.abs((x.max-e)*o);else if("Geographic"===a.geometryType){switch(L){case"Mercator":var w=new _(P/2,P/2);r=w.x+i*(P/360);var T=C(Math.sin(h(e)),-.9999,.9999);s=w.y+.5*Math.log((1+T)/(1-T))*(-P/(2*Math.PI));break;case"Winkel3":c=((d=b(M,O)).x+M/(Math.PI/2))/2,p=(d.y+O)/2;break;case"Miller":c=M,p=1.25*Math.log(Math.tan(Math.PI/4+.4*O));break;case"Eckert3":c=2/(u=Math.sqrt(Math.PI*(4+Math.PI)))*M*(1+Math.sqrt(1-4*O*O/(Math.PI*Math.PI))),p=4/u*O;break;case"AitOff":c=(d=b(M,O)).x,p=d.y;break;case"Eckert5":c=M*(1+Math.cos(O))/Math.sqrt(2+Math.PI),p=2*O/Math.sqrt(2+Math.PI);break;case"Equirectangular":c=M,p=O;break;case"Eckert6":u=(1+Math.PI/2)*Math.sin(O);for(var F=1/0,I=0;I<10&&Math.abs(F)>1e-6;I++)O-=F=(O+Math.sin(O)-u)/(1+Math.cos(O));u=Math.sqrt(2+Math.PI),c=M*(1+Math.cos(O))/u,p=2*O/u}r="Mercator"===L?r:v(y(l,m(c)),3),s="Mercator"===L?s:-v(f(l,m(p)),3)}return new _(r,s)}function u(e,i,o,n){var a="";return!(0,t.isNullOrUndefined)(n)&&n.length>1&&(Array.prototype.forEach.call(n,(function(t,n){var l=t.latitude,r=t.longitude,s=e.isTileMap?g(new Z(r,l),i,e.tileTranslatePoint,!0):c(l,r,i,o,e);a+=0===n?"M "+s.x+" "+s.y:" L "+s.x+" "+s.y})),a+=" z "),a}function g(e,t,i,o){var n=256*Math.pow(2,t),a=(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=a*n+.5+i.x,d=r*n+.5+i.y),{x:s,y:d}}function y(e,i){var o=e.baseMapBounds.longitude,n=(0,t.isNullOrUndefined)(e.baseSize)?e.mapAreaRect.width:e.mapAreaRect.width+Math.abs(e.baseSize.width-e.mapAreaRect.width)/2;return Math.round(n*(i-o.min)/(o.max-o.min)*100)/100}function f(e,t){var i=e.baseMapBounds.latitude;return Math.round(e.mapAreaRect.height*(t-i.min)/(i.max-i.min)*100)/100}function b(e,t){var i=Math.cos(t),o=S(x(i*Math.cos(e/=2)));return new _(2*i*Math.sin(e)*o,Math.sin(t)*o)}function v(e,t){var i=Math.pow(10,t);return Math.round(e*i)/i}function S(e){return e/Math.sin(e)}function x(e){return Math.acos(e)}function C(e,i,o){return(0,t.isNullOrUndefined)(i)||(e=Math.max(e,i)),(0,t.isNullOrUndefined)(o)||(e=Math.min(e,o)),e}function O(e,i,o,n){(0,t.createElement)("a",{attrs:{download:e+"."+i.toLocaleLowerCase(),href:o}}).dispatchEvent(new MouseEvent(n?"click":"move",{view:window,bubbles:!1,cancelable:!0}))}var _=function(e,t){this.x=e,this.y=t},M=function(e,t){this.x=e,this.y=t},L=function(e,t){this.latitude=e,this.longitude=t},P=function(e,t){this.min=e,this.max=t},w=function(e,t){this.latitude=new P(e.min,e.max),this.longitude=new P(t.min,t.max)};function T(e,t){var i=document.getElementById("mapsmeasuretext");return null===i&&((i=document.createElement("text")).id="mapsmeasuretext",document.body.appendChild(i)),i.innerText=e,i.style.cssText="position: absolute; font-size: "+("number"==typeof t.size?t.size+"px":t.size)+"; font-weight: "+t.fontWeight+"; font-style: "+t.fontStyle+"; font-family: "+t.fontFamily+"; visibility: hidden; top: -100; left: 0; whiteSpace: nowrap; lineHeight: normal",new n(i.clientWidth,i.clientHeight)}function F(e,t){var i=document.createElement("canvas"),o=i.getContext("2d");o.font=t.fontStyle+" "+t.fontWeight+" "+("number"==typeof t.size?t.size+"px":t.size)+" "+t.fontFamily;var a=o.measureText(e).width,l=parseFloat(t.size)||16;return i=null,new n(a,l)}var I=function(e,t,i,o,n,a,l){void 0===a&&(a=""),this.transform="",this.baseLine="auto",this.id=e,this.text=n,this.transform=a,this.anchor=o,this.x=t,this.y=i,this.baseLine=l},k=function(e,t,i,o,n,a,l,r){this.id=e,this["fill-opacity"]=n,this["stroke-opacity"]=a,this.fill=t,this.stroke=o,this["stroke-width"]=i,this["stroke-dasharray"]=l,this.d=r},N=function(e,t,i){this.r=e,this.g=t,this.b=i},E=function(e){function t(t,i,o,n,a,l,r,s,d){var p=e.call(this,t,i,o.width,o.color,n,o.opacity)||this;return p.y=a.y,p.x=a.x,p.height=a.height,p.width=a.width,p.rx=l||0,p.ry=r||0,p.transform=s||"",p["stroke-dasharray"]=d,p["fill-opacity"]=n,p["stroke-opacity"]=o.opacity,p}return o(t,e),t}(k),z=function(e){function t(t,i,o,n,a,l,r,s){var d=e.call(this,t,i,o.width,o.color,n,o.opacity,s)||this;return d.cy=l,d.cx=a,d.r=r,d["stroke-dasharray"]=s,d["fill-opacity"]=n,d["stroke-opacity"]=o.opacity,d}return o(t,e),t}(k),B=function(e){function t(t,i,o,n,a,l,r,s){void 0===l&&(l=1),void 0===r&&(r=1),void 0===s&&(s="");var d=e.call(this,t,o,n,a,l,r,s)||this;return d.points=i,d}return o(t,e),t}(k),A=function(e){function t(t,i,o,n,a,l,r,s){return void 0===l&&(l=1),void 0===r&&(r=1),void 0===s&&(s=""),e.call(this,t,i,o,n,a,l,r,s)||this}return o(t,e),t}(B),U=function(e){function t(t,i,o,n,a,l,r,s){void 0===l&&(l=1),void 0===r&&(r=1),void 0===s&&(s="");var d=e.call(this,t,o,n,a,l,r,s)||this;return d.x1=i.x1,d.y1=i.y1,d.x2=i.x2,d.y2=i.y2,d}return o(t,e),t}(k),j=function(e,t,i,o){this.x1=e,this.y1=t,this.x2=i,this.y2=o},Z=function(e,t){this.x=e,this.y=t},R=function(e,t,i,o){this.x=e,this.y=t,this.width=i,this.height=o},D=function(e,t,i,o,n,a,l,r,s){void 0===a&&(a="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=n,this.patternUnits=a,this.patternContentUnits=l,this.patternTransform=r,this.href=s};function V(e,t,o,n,a){void 0===a&&(a=!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:a?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=T(e.text[m],t).height,l=p.createTSpan({x:e.x,id:e.id,y:e.y+(a?-m*r:m*r)},a?e.text[e.text.length-(m+1)]:e.text[m]),h.appendChild(l);return n.appendChild(h),h}function G(e,i,o,n,a,l){var r=(0,t.createElement)("div",{id:i,className:a.element.id+"_marker_template_element"});r.style.cssText="position: absolute;pointer-events: auto;";for(var s=e.length;s>0;)r.appendChild(e[0]),s--;if(!a.isReact||"function"!==l){for(var d=r.innerHTML,p=Object.keys(o),h=RegExp,m=0;m<p.length;m++)"object"==typeof o[p[m]]?d=W(d,"",o,a):"latitude"!==p[m].toLowerCase()&&"longitude"!==p[m].toLowerCase()&&(d=d.replace(new h("{{:"+p[m]+"}}","g"),o[p[m].toString()]));r.innerHTML=d}return r}function H(e,t){return t.format&&!isNaN(Number(e))?t.intl.getNumberFormat({format:t.format,useGrouping:t.useGroupingSeparator})(Number(e)):e}function W(e,t,i,o){for(var n=""===e?t:e,a=""===e?n.split("${"):n.split("{{:"),l=RegExp,r=0;r<a.length;r++)if(a[r].indexOf("}}")>-1&&a[r].indexOf(".")>-1||a[r].indexOf("}")>-1&&a[r].search(".")>-1)for(var s=""===e?a[r].split("}"):a[r].split("}}"),d=0;d<s.length;d++)if(s[d].indexOf(".")>-1){var p=Y(i,s[d]).toString();n=""===e?n.split("${"+s[d]+"}").join(H(p,o)):n.replace(new l("{{:"+s[d]+"}}","g"),p)}return n}function q(e,i,o){for(var n=((0,t.isNullOrUndefined)(e.childElementCount)?e[0]:e).outerHTML,a=Object.keys(o),l=RegExp,r=0;r<a.length;r++)n=n.replace(new l("{{:"+a[r]+"}}","g"),o[a[r].toString()]);var s=(0,t.createElement)("div",{id:i,innerHTML:n});return s.style.position="absolute",s}function X(e,i,o,n,a,l,r){var s,d,p,h,m=a.size,c=a.borderColor,u=parseFloat(a.borderWidth),g=parseFloat(a.borderOpacity),y=a.fill,f=a.dashArray,b={color:c,width:u,opacity:g},v=a.opacity,S=new k(n,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,C=new z(n,y,b,v,o.x,o.y,x,f);s=r.renderer.drawCircle(C)}else"Rectangle"===e?(d=o.x-m.width/2,p=o.y-m.height/2,h=new E(n,y,b,v,new R(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-(n.indexOf("cluster")>-1?m.height/2:m.height),(0,t.merge)(S,{href:i,height:m.height,width:m.width,x:d,y:p}),s=r.renderer.drawImage(S)):s=be(r,e,S,m,o,l);return s}function Y(e,i){if(!(0,t.isNullOrUndefined)(e)&&!(0,t.isNullOrUndefined)(i)){var o=i.replace(/\[/g,".").replace(/\]/g,"").split(".");if(1===o.length)e=e[o[0]];else for(var n=0;n<o.length&&!(0,t.isNullOrUndefined)(e);n++)e=e[o[n]]}return e}function J(e,i){var o=(0,t.isNullOrUndefined)(e.colorValuePath)?i[e.colorValuePath]:e.colorValuePath.indexOf(".")>-1?Y(i,e.colorValuePath).toString():i[e.colorValuePath];return e.fill=(0,t.isNullOrUndefined)(e.colorValuePath)||(0,t.isNullOrUndefined)(o)?e.fill:e.colorValuePath.indexOf(".")>-1?Y(i,e.colorValuePath).toString():i[e.colorValuePath],e}function Q(e,i){return(0,t.isNullOrUndefined)(e.shapeValuePath)||(0,t.isNullOrUndefined)(i[e.shapeValuePath])?($(e,i),ee(e,i)):($(e,i),"Image"===i[e.shapeValuePath]&&ee(e,i)),e}function K(e,t){return e.indexOf(".")>-1?Y(t,e).toString():t[e]}function $(e,i){if(!(0,t.isNullOrUndefined)(e.shapeValuePath)){var o=K(e.shapeValuePath,i);e.shape=(0,t.isNullOrUndefined)(o)||""===o.toString()?e.shape:o}}function ee(e,i){if(!(0,t.isNullOrUndefined)(e.imageUrlValuePath)){var o=K(e.imageUrlValuePath,i);e.imageUrl=(0,t.isNullOrUndefined)(o)?e.imageUrl:o}}function te(e,i,o,a,l,r,s,d,p,h,m){var u,y,f,b,v,S,x,C,O=[],M=[],L=0,P=0,w=e.markerSettings[l],T=0,F=[],k=!m&&e.markerClusterSettings.allowClustering?e.markerClusterSettings:w.clusterSettings,N=k.labelStyle,E=o.renderer.createGroup({id:o.element.id+"_LayerIndex_"+a+"_markerCluster"}),z={cancel:!1,name:Fi,fill:k.fill,height:k.height,width:k.width,imageUrl:k.imageUrl,shape:k.shape,data:undefined,maps:o,cluster:k,border:k.border},B=o.element.getBoundingClientRect();o.isTileMap?new Object:Ue(o,e,!1),o.isTileMap||(C=o.mapLayerPanel.calculateFactor(e));var A=!1,U=o.isTileMap?o.tileZoomLevel:o.mapScaleValue,j=w.clusterSettings.allowClustering||e.markerClusterSettings.allowClustering&&e.markerSettings.length>1?i.querySelectorAll("[id*='LayerIndex_"+a+"_MarkerIndex_"+l+"']:not([id*='_Group'])"):i.childNodes;return o.trigger("markerClusterRendering",z,(function(Z){for(Array.prototype.forEach.call(j,(function(s,d){if(F=[],"hidden"!==s.style.visibility){if(u=(x=s).getBoundingClientRect(),F.push(d),!(0,t.isNullOrUndefined)(u)){var p=o.markerModule.zoomedMarkerCluster.length>0&&o.markerModule.zoomedMarkerCluster[a]&&o.markerModule.zoomedMarkerCluster[a][d]&&o.markerModule.zoomedMarkerCluster[a][d].length>0||o.markerModule.initialMarkerCluster.length>0&&o.markerModule.initialMarkerCluster[a]&&o.markerModule.initialMarkerCluster[a][d]&&o.markerModule.initialMarkerCluster[a][d].length>0?o.previousScale<U?o.markerModule.zoomedMarkerCluster[a][d]:o.markerModule.initialMarkerCluster[a][d]:null;if((0,t.isNullOrUndefined)(p)||0===p.length||w.clusterSettings.allowClustering?Array.prototype.forEach.call(j,(function(e,t){t>=d+1&&"hidden"!==e.style.visibility&&oe(e,u,O,F,t)})):Array.prototype.forEach.call(p,(function(e){if(d!==e){var t=document.getElementById(o.element.id+"_LayerIndex_"+a+"_MarkerIndex_"+l+"_dataIndex_"+e);t&&"hidden"!==t.style.visibility&&oe(t,u,O,F,e)}})),ie(o,U,a,d,F),L=u.left+u.width/2,P=u.top+u.height,O.length>0){F=F.filter((function(e,t,i){return i.indexOf(e)===t})),L-=B.left,P-=o.availableSize.height<=B.height?B.top:B.bottom-B.top;var m,y=parseInt(s.id.split("_dataIndex_")[1].split("_")[0],10),v=parseInt(s.id.split("_MarkerIndex_")[1].split("_")[0],10),M=e.markerSettings[v],Z=M.dataSource[y],R=(0,t.isNullOrUndefined)(M.longitudeValuePath)?(0,t.isNullOrUndefined)(Z.longitude)?(0,t.isNullOrUndefined)(Z.Longitude)?0:parseFloat(Z.Longitude):parseFloat(Z.longitude):Number(Y(Z,M.longitudeValuePath)),D=(0,t.isNullOrUndefined)(M.latitudeValuePath)?(0,t.isNullOrUndefined)(Z.latitude)?(0,t.isNullOrUndefined)(Z.Latitude)?0:parseFloat(Z.Latitude):parseFloat(Z.latitude):Number(Y(Z,M.latitudeValuePath));o.isTileMap?o.isTileMap&&(m=g(new _(R,D),o.tileZoomLevel,o.tileTranslatePoint,!0)):m=c(D,R,C,e,o),s.style.visibility="hidden",z.cancel?(S={size:new n(k.width,k.height),fill:k.fill,borderColor:k.border.color,borderWidth:k.border.width,opacity:k.opacity,dashArray:k.dashArray,imageUrl:k.imageUrl,shape:k.shape}).borderOpacity=(0,t.isNullOrUndefined)(k.border.opacity)?k.opacity:k.border.opacity:(S={size:new n(z.width,z.height),fill:z.fill,borderColor:z.border.color,borderWidth:z.border.width,opacity:k.opacity,dashArray:k.dashArray,imageUrl:z.imageUrl,shape:z.shape}).borderOpacity=(0,t.isNullOrUndefined)(z.border.opacity)?k.opacity:z.border.opacity,L=o.isTileMap||i.id.indexOf("_Markers_Group")>-1?L:L+3.75-z.width/2,P=o.isTileMap||i.id.indexOf("_Markers_Group")>-1?P:P-z.height/2,o.isTileMap?(L=m.x,P=m.y):(L=(m.x+((0,t.isNullOrUndefined)(o.translatePoint)||0===o.translatePoint.x||o.isResize?h.location.x:o.translatePoint.x))*((0,t.isNullOrUndefined)(o.scale)?h.scale:o.scale)+M.offset.x,P=(m.y+((0,t.isNullOrUndefined)(o.translatePoint)||0===o.translatePoint.y||o.isResize?h.location.y:o.translatePoint.y))*((0,t.isNullOrUndefined)(o.scale)?h.scale:o.scale)+M.offset.y);var G=o.element.id+"_LayerIndex_"+a+"_MarkerIndex_"+v+"_dataIndex_"+y+"_cluster_"+T,H=o.element.id+"_LayerIndex_"+a+"_MarkerIndex_"+v+"_dataIndex_"+y+"_cluster_"+T+"_datalabel_"+T;T++;var W=X(S.shape,S.imageUrl,{x:0,y:0},G,S,r,o);W.setAttribute("transform","translate( "+L+" "+P+" )"),"Balloon"===z.shape?W.children[0].textContent=F.toString():W.textContent=F.toString(),f=new I(H,0,3.75,"middle",(O.length+1).toString(),"",""),(b=V(f,N,N.color,r)).setAttribute("transform","translate( "+L+" "+P+" )");var q=parseFloat(W.id.split("_MarkerIndex_")[1]);M.clusterSettings.allowClustering&&q===v||e.markerClusterSettings.allowClustering&&e.markerSettings.length>1&&q===v?(E.appendChild(W),E.appendChild(b)):(E.appendChild(b),E.appendChild(W))}}O=[]}else ie(o,U,a,d,F);A=!0})),s.appendChild(E),o.svgObject.appendChild(s),o.element.appendChild(o.svgObject),k.allowDeepClustering&&!m&&Array.prototype.forEach.call(E.childNodes,(function(i,o){if("hidden"!==i.style.visibility&&(u=(x=i).getBoundingClientRect(),!((0,t.isNullOrUndefined)(u)||x.id.indexOf("_datalabel_")>-1))){for(var n=o+1;n<E.childElementCount;n++)if("hidden"!==E.childNodes[n].style.visibility&&(v=E.childNodes[n],y=v.getBoundingClientRect(),!((0,t.isNullOrUndefined)(y)||v.id.indexOf("_datalabel_")>-1||u.left>y.right||u.right<y.left||u.top>y.bottom||u.bottom<y.top))){M.push(v),M.push(E.childNodes[n-1]),E.childNodes[n].style.visibility="hidden";var a=(0,t.isNullOrUndefined)(E.childNodes[n+1])?null:parseFloat(E.childNodes[n+1].id.split("_MarkerIndex_")[1]);w.clusterSettings.allowClustering&&a===l||e.markerClusterSettings.allowClustering&&e.markerSettings.length>1&&a===l?E.childNodes[n+1].style.visibility="hidden":(a=parseFloat(E.childNodes[n-1].id.split("_MarkerIndex_")[1]),E.childNodes[n-1].style.visibility=a===l?"hidden":E.childNodes[n-1].style.visibility),F.push(n)}if(M.length>0){x=i;for(var r=0;r<M.length;r++){"g"===x.tagName?x.childNodes[0].textContent=x.childNodes[0].textContent+","+M[r].textContent:x.textContent=x.textContent+","+M[r].textContent;a=parseFloat(E.childNodes[o+1].id.split("_MarkerIndex_")[1]);w.clusterSettings.allowClustering&&a===l||e.markerClusterSettings.allowClustering&&e.markerSettings.length>1&&a===l?E.childNodes[o+1].textContent=(+E.childNodes[o+1].textContent+ +M[r+1].textContent).toString():(a=parseFloat(E.childNodes[o-1].id.split("_MarkerIndex_")[1]),E.childNodes[o-1].textContent=a===l?(+E.childNodes[o-1].textContent+ +M[r+1].textContent).toString():E.childNodes[o-1].textContent),r++}}M=[]}}));0<E.childNodes.length;){var R=parseFloat(E.childNodes[0].id.split("_MarkerIndex_")[1]);w.clusterSettings.allowClustering&&R===l||e.markerClusterSettings.allowClustering&&e.markerSettings.length>1&&R===l?r.insertBefore(E.childNodes[0],null):R===l&&r.insertBefore(E.childNodes[0],r.firstChild)}d||Re(o.element.id+"_Secondary_Element").appendChild(r);var D=document.getElementById(o.element.id+"_LayerIndex_"+a+"_Polygon_Group"),G=document.getElementById(o.element.id+"_LayerIndex_"+a+"_Polygons_Group");(0,t.isNullOrUndefined)(D)&&!o.isTileMap?s.insertBefore(r,s.firstChild):o.isTileMap?(0,t.isNullOrUndefined)(G)?(0,t.isNullOrUndefined)(D)?s.insertBefore(r,s.firstChild):D.insertAdjacentElement("afterend",r):G.insertAdjacentElement("afterend",r):s.appendChild(r);var H=document.getElementById(o.element.id+"_LayerIndex_"+a+"_markerCluster");if((0,t.isNullOrUndefined)(H)||H.remove(),p){var W=document.getElementById(o.element.id+"_Layer_Collections"),q=document.getElementById(o.element.id+"_LayerIndex_"+(a+1));(0,t.isNullOrUndefined)(W)||(0,t.isNullOrUndefined)(q)?(0,t.isNullOrUndefined)(W)||W.appendChild(s):W.insertBefore(s,q)}})),A}function ie(e,i,o,n,a){if(1===i){var l=(0,t.isNullOrUndefined)(e.markerModule.initialMarkerCluster[o][n])?[]:a.length>1?a:[];e.markerModule.initialMarkerCluster[o][n]=l;var r=(0,t.isNullOrUndefined)(e.markerModule.zoomedMarkerCluster[o][n])?[]:a.length>1?a:[];e.markerModule.zoomedMarkerCluster[o][n]=r}else i>1&&(e.markerModule.zoomedMarkerCluster[o][n]=a.length>1?a:[])}function oe(e,i,o,n,a){var l=e.getBoundingClientRect();(0,t.isNullOrUndefined)(l)||i.left>l.right||i.right<l.left||i.top>l.bottom||i.bottom<l.top||(o.push(l),e.style.visibility="hidden",n.push(a))}function ne(e,t){var i,o=e[0].layerIndex,n=e[0].targetClusterIndex,a=e[0].markerIndex,l=e[0].dataIndex,r=t.element.id+"_LayerIndex_"+o+"_MarkerIndex_"+a,s=(t.layers[o].markerSettings[a],r+"_dataIndex_"+l+"_cluster_"+n),d="Balloon"===t.layers[o].markerClusterSettings.shape?He(s+"_Group"):He(s),p=He(s+"_datalabel_"+n);d.setAttribute("visibility","visible"),p.setAttribute("visibility","visible");for(var h=e[0].data.length,m=0;m<h;m++){if((i=He(r+"_dataIndex_"+e[0].data[m].index+"_Group")?He(r+"_dataIndex_"+e[0].data[m].index+"_Group"):He(r+"_dataIndex_"+e[0].data[m].index)).style.visibility="hidden",i.id.indexOf("Group")>-1)He(r+"_dataIndex_"+e[0].data[m].index).style.visibility="hidden"}Be(t.element.id+"_LayerIndex_"+o+"_MarkerIndex_"+a+"_markerClusterConnectorLine")}function ae(e,t,i,o){var n=e[0].layerIndex,a=e[0].markerIndex,l=e[0].targetClusterIndex,r=e[0].dataIndex,s=o?He:i.querySelector.bind(i),d=o?"":"#",p=t.element.id+"_LayerIndex_"+n+"_MarkerIndex_"+a,h=t.layers[n],m=!t.markerModule.allowInnerClusterSetting(h)&&h.markerClusterSettings.allowClustering?h.markerClusterSettings:h.markerSettings[a].clusterSettings,c=h.markerSettings[a],u=p+"_dataIndex_"+r+"_cluster_"+l,g="Balloon"===m.shape?s(d+""+u+"_Group"):s(d+""+u),y=s(d+""+u+"_datalabel_"+l);g.setAttribute("visibility","hidden"),y.setAttribute("visibility","hidden");var f=s(d+""+p+"_dataIndex_"+r+"_Group")?s(d+""+p+"_dataIndex_"+r+"_Group"):s(d+""+p+"_dataIndex_"+r),b=f.parentElement.id.indexOf("Template_Group")>-1?f.getBoundingClientRect().height:c.height,v=f.parentElement.id.indexOf("Template_Group")>-1?f.getBoundingClientRect().width:c.width,S=+g.getAttribute("transform").split("translate(")[1].trim().split(" ")[0],x=+g.getAttribute("transform").split("translate(")[1].trim().split(" ")[1].split(")")[0].trim(),C=(v="string"==typeof v?parseFloat(v):v)+5,O=6.28*C,_=0,M=Math.round(O/v);_+=M;for(var L=e[0].data.length,P=Math.round(b/O*100),w=(P=L<M?100/L:P)/100*360,T=L<M?45:0,F=1,I="M "+S+" "+x+" ",k="",N=0;N<L;N++){if(_===N||Math.round(T)>=360){for(T=0,O=6.28*(C=(v+5)*++F),M=Math.round(O/b),P=Math.round(b/O*100);P*M<100;)M++;w=P/100*360,_+=M}var E=S+C*Math.sin(2*Math.PI*T/360),z=x+C*Math.cos(2*Math.PI*T/360);if(k+=I+"L "+E+" "+z+" ",(f=s(d+""+p+"_dataIndex_"+e[0].data[N].index+"_Group")?s(d+""+p+"_dataIndex_"+e[0].data[N].index+"_Group"):s(d+""+p+"_dataIndex_"+e[0].data[N].index)).parentElement.id.indexOf("Template_Group")>-1?(f.style.transform="",f.style.left=t.isTileMap?E-v/2+"px":E-v/2-10+"px",f.style.top=t.isTileMap?z-b/2+"px":z-b/2-10+"px",f.setAttribute("transform","translate( "+E+" "+z+")")):f.setAttribute("transform","translate( "+E+" "+z+")"),f.style.visibility="visible",f.id.indexOf("Group")>-1)s(d+""+p+"_dataIndex_"+e[0].data[N].index).style.visibility="visible";T+=w}var B=m.connectorLineSettings,A={d:k,id:t.element.id+"_LayerIndex_"+n+"_MarkerIndex_"+a+"_dataIndex_"+r+"_markerClusterConnectorLine",stroke:B.color,"fill-opacity":B.opacity,"stroke-opacity":B.opacity,"stroke-width":B.width};i=o?s(t.element.id+"_Markers_Group"):i,i=s(t.element.id+"_LayerIndex_"+n).querySelector("#"+i.id);var U=t.renderer.createGroup({id:t.element.id+"_LayerIndex_"+n+"_MarkerIndex_"+a+"_markerClusterConnectorLine"});U.appendChild(t.renderer.drawPath(A)),"Balloon"===c.shape?i.insertBefore(U,i.querySelector("#"+p+"_dataIndex_0_Group")):i.insertBefore(U,i.querySelector("#"+p+"_dataIndex_0"))}function le(e,i,o,a,l,r,s,d,p,h,m){var c={size:new n(e.width,e.height),fill:e.fill,borderColor:e.border.color,borderWidth:e.border.width,opacity:i.opacity,dashArray:i.dashArray,borderOpacity:(0,t.isNullOrUndefined)(e.border.opacity)?i.opacity:e.border.opacity};Be(s);var u=X(e.shape,e.imageUrl,{x:0,y:0},s,c,m,h),g=(h.isTileMap?l.x:(l.x+r.x)*p)+((0,t.isNullOrUndefined)(d)||(0,t.isNullOrUndefined)(d.x)?0:d.x),y=(h.isTileMap?l.y:(l.y+r.y)*p)+((0,t.isNullOrUndefined)(d)||(0,t.isNullOrUndefined)(d.y)?0:d.y);if(u.setAttribute("transform","translate( "+g+" "+y+" )"),se(h.selectedMarkerElementId,h.markerSelectionClass,u,"MarkerselectionMapStyle"),h.legendSettings.toggleLegendSettings.enable&&"Markers"===h.legendSettings.type){var f=parseInt(u.id.split("_LayerIndex_")[1],10);de(h.toggledElementId,"g"===u.tagName?u.children[0]:u,h.legendSettings.toggleLegendSettings.applyShapeSettings?h.layers[f].shapeSettings:h.legendSettings.toggleLegendSettings)}m.appendChild(u);var b=o.length-1===a?"marker":null,v=new _(g,y);return(i.animationDuration>0||"Enable"===t.animationMode)&&tt(u,i.animationDelay,i.animationDuration,v,h,b),m}function re(e,t,i,o,n,a,l,r,s,d,p){if((t=Ge(e.template,p))&&t(o,p,e.template,p.element.id+"_MarkerTemplate"+n,!1).length){for(var h=G(t(o,p,e.template,p.element.id+"_MarkerTemplate"+n,!1),i,o,0,p,typeof e.template),m=0;m<h.children.length;m++)h.children[m].style.pointerEvents="auto";h.style.left=(p.isTileMap?l.x:(l.x+r.x)*s)+d.x-(p.isTileMap?0:p.mapAreaRect.x)+"px",h.style.top=(p.isTileMap?l.y:(l.y+r.y)*s)+d.y-(p.isTileMap?0:p.mapAreaRect.y)+"px",h.style.transform="translate(-50%, -50%)",a.appendChild(h)}return a}function se(e,i,o,n){if(e)for(var a=0;a<e.length;a++)o.getAttribute("id")===e[a]&&(0!==a&&"g"!==o.tagName||((0,t.isNullOrUndefined)(i)||(0,t.isNullOrUndefined)(i.id)||document.body.appendChild(i),o.id.indexOf("_MarkerIndex_")>-1&&o.childElementCount>0&&o.children[0].setAttribute("class",n)),o.setAttribute("class",n))}function de(e,i,o){if(!(0,t.isNullOrUndefined)(e)&&e.length>0)for(var n=0;n<e.length;n++)e[n]===i.id&&(i.setAttribute("fill",o.fill),i.setAttribute("stroke",o.border.color),i.setAttribute("fill-opacity",o.opacity.toString()),i.setAttribute("stroke-opacity",((0,t.isNullOrUndefined)(o.border.opacity)?o.opacity:o.border.opacity).toString()),i.setAttribute("stroke-width",((0,t.isNullOrUndefined)(o.border.width)?0:o.border.width).toString()))}function pe(e,i,o,n,a,l,r){if(!He(e)){var s=(0,t.createElement)("style",{id:e});s.innerText="."+i+"{fill:"+o+";opacity:"+n+";stroke-width:"+l+";stroke:"+a+";}",r.shapeSelectionClass=s,document.body.appendChild(s)}}function he(e,t){return t&&t.appendChild(e),e}function me(e,t,i){return he(e.renderer.drawCircle(t),i)}function ce(e,t,i){return he(e.renderer.drawRectangle(t),i)}function ue(e,t,i){return he(e.renderer.drawPath(t),i)}function ge(e,t,i){return he(e.renderer.drawPolygon(t),i)}function ye(e,t,i){return he(e.renderer.drawPolyline(t),i)}function fe(e,t,i){return he(e.renderer.drawLine(t),i)}function be(e,t,i,o,n,a){var l;switch(t){case"Balloon":l=Me(e,i,o,n,"Marker",a);break;case"Cross":i.d="M "+n.x+" "+(n.y-o.height/2)+" L "+n.x+" "+(n.y+o.height/2)+" M "+(n.x-o.width/2)+" "+n.y+" L "+(n.x+o.width/2)+" "+n.y;break;case"Diamond":i.d="M "+n.x+" "+(n.y-o.height/2)+" L "+(n.x+o.width/2)+" "+n.y+" L "+n.x+" "+(n.y+o.height/2)+" L "+(n.x-o.width/2)+" "+n.y+" Z";break;case"Star":i.d="M "+(n.x+o.width/3)+" "+(n.y+o.height/2)+" L "+(n.x-o.width/2)+" "+(n.y-o.height/6)+" L "+(n.x+o.width/2)+" "+(n.y-o.height/6)+" L "+(n.x-o.width/3)+" "+(n.y+o.height/2)+" L "+n.x+" "+(n.y-o.height/2)+" L "+(n.x+o.width/3)+" "+(n.y+o.height/2)+" Z";break;case"Triangle":i.d="M "+n.x+" "+(n.y-o.height/2)+" L "+(n.x+o.width/2)+" "+(n.y+o.height/2)+" L "+(n.x-o.width/2)+" "+(n.y+o.height/2)+" Z";break;case"HorizontalLine":i.d=" M "+(n.x-o.width/2)+" "+n.y+" L "+(n.x+o.width/2)+" "+n.y;break;case"VerticalLine":i.d="M "+n.x+" "+(n.y-o.height/2)+" L "+n.x+" "+(n.y+o.height/2);break;case"InvertedTriangle":i.d="M "+(n.x-o.width/2)+" "+(n.y-o.height/2)+" L "+(n.x+o.width/2)+" "+(n.y-o.height/2)+" L "+n.x+" "+(n.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 ")+(n.x+r)+" "+(n.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 ve(e,t,i,o,n){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",he(e.renderer.drawPath(t),n)}function Se(e,t,i,o,n){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",he(e.renderer.drawPath(t),n)}function xe(e,t,i,o,n){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,he(e.renderer.drawPath(t),n)}function Ce(e,t,i,o,n){return t.d=" M "+(o.x-i.width/2)+" "+o.y+" L "+(o.x+i.width/2)+" "+o.y,he(e.renderer.drawPath(t),n)}function Oe(e,t,i,o,n){return t.d="M "+o.x+" "+(o.y-i.height/2)+" L "+o.x+" "+(o.y+i.height/2),he(e.renderer.drawPath(t),n)}function _e(e,t,i,o,n){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",he(e.renderer.drawPath(t),n)}function Me(e,t,i,o,n,a){var l,r=i.width,s=i.height;o.x-=r/2,o.y-=t.id.indexOf("cluster")>-1?s/2:t.id.indexOf("Legend")>-1?s/1.25:s,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"===n){var m=e.renderer.createGroup({id:t.id+"_Group"});he(d,m),l=he(m,a)}else l=d;return l}function Le(e,t,i,o){for(var n=e.renderer.createPattern(t,"pattern"),a=0,l=i;a<l.length;a++){he(l[a],n)}return he(n,o)}function Pe(e,t){for(var i,o=[],n=0,a=e;n<a.length;n++){var l=a[n];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}function we(e,i,o,n,a){if(!(0,t.isNullOrUndefined)(i)&&!(0,t.isNullOrUndefined)(e)&&!(0,t.isNullOrUndefined)(o))for(var l=0;l<e.length;l++){var r=o.indexOf(".")>-1?Y(e[l],o):e[l][o],s=Te(r,n,i);if((!(0,t.isNullOrUndefined)(r)&&isNaN(i[s])&&"string"==typeof r?r.toLowerCase():r)===(!(0,t.isNullOrUndefined)(i[s])&&isNaN(i[s])?i[s].toLowerCase():i[s]))return l}return null}function Te(e,i,o){if(!(0,t.isNullOrUndefined)(e)&&!(0,t.isNullOrUndefined)(o)&&!(0,t.isNullOrUndefined)(i))for(var n="[object Array]"===Object.prototype.toString.call(i)?i:[i],a=0;a<n.length;a++){if(((0,t.isNullOrUndefined)(e)||"string"!=typeof e?e:e.toLowerCase())===(!(0,t.isNullOrUndefined)(o[n[a]])&&isNaN(o[n[a]])?o[n[a]].toLowerCase():o[n[a]]))return n[a]}return null}function Fe(e,t,i){for(var o=[],n=0;n<e.length;n++){var a=e[n];t<=a.y&&i>=a.y&&o.push(a)}return o}function Ie(e,t,i,o,n){var a=(t-e)/100*(100/(n-o)*(i-o))+e;return n===o&&(a=(t-e)/100+e),a}function ke(e,t,i){if(!e.length)return null;for(var o,n,a,l,r=e.length,s=0,d=0,p=0,h=0;h<=r-1;h++)o=e[h].x,n="Mercator"===t||"Normal"===i?e[h].y:-e[h].y,h===r-1?(a=e[0].x,l="Mercator"===t||"Normal"===i?e[0].y:-e[0].y):(a=e[h+1].x,l="Mercator"===t||"Normal"===i?e[h+1].y:-e[h+1].y),s+=Math.abs(o*l-a*n),d+=Math.abs((o+a)*(o*l-a*n)),p+=Math.abs((n+l)*(o*l-a*n));s*=.5;var m=e.some((function(e){return e.x<5&&e.y<5}))&&"Normal"===i?6:4;d=0!==s?1/(m*s)*d:0,p=0!==s?1/(m*s)*p:0;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 C=e[h];C.y="Mercator"===t||"Normal"===i?C.y:-C.y,C.y>p?C.x<d&&d-C.x<d-f.x?f={x:C.x,y:C.y}:C.x>d&&(0===b.x||C.x-d<b.x-d)&&(b={x:C.x,y:C.y}):C.x<d&&d-C.x<d-v.x?v={x:C.x,y:C.y}:C.x>d&&(0===S.x||C.x-d<S.x-d)&&(S={x:C.x,y:C.y}),x=b.y-S.y+(b.y-S.y)/4,C.x>d?C.y<p&&p-C.y<p-c.y?c={x:C.x,y:C.y}:C.y>p&&(0===u.y||C.y-p<u.y-p)&&(u={x:C.x,y:C.y}):C.y<p&&p-C.y<p-g.y?g={x:C.x,y:C.y}:C.y>p&&(0===y.y||C.y-p<y.y-p)&&(y={x:C.x,y:C.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 Ne(e){var i=!1;return"[object Array]"===Object.prototype.toString.call(e)&&Array.prototype.forEach.call(e,(function(e){(0,t.isNullOrUndefined)(e.geometry)||"Path"!==e.geometry.type||(i=!0)})),i}function Ee(e,i,o,n,a,l){var r=i;if((0,t.isNullOrUndefined)(n)&&(n=a?F(i,o).width:T(i,o).width),n>e)for(var s=i.length-1;s>=0;--s)if(r=i.substring(0,s)+"...",(n=a?F(r,o).width:T(r,o).width)<=e||r.length<4)return r.length<4&&(r=" "),(0,t.isNullOrUndefined)(l)||l.push(n),r;return(0,t.isNullOrUndefined)(l)||l.push(n),r}function ze(e,t,i,o){var n;switch(t){case"Near":n=e.x;break;case"Center":n="title"===o?e.width/2-i.width/2:e.x+e.width/2-i.width/2;break;case"Far":n="title"===o?e.width-e.y-i.width:e.x+e.width-i.width}var a="title"===o?e.y+i.height/2:e.y+e.height/2+i.height/2;return new _(n,a)}function Be(e){var i=document.getElementById(e);return i?(0,t.remove)(i):null}function Ae(e,t){var i=c(e.minLatOfGivenLocation,e.minLongOfGivenLocation,e.mapLayerPanel.calculateFactor(t),t,e),o=c(e.maxLatOfGivenLocation,e.maxLongOfGivenLocation,e.mapLayerPanel.calculateFactor(t),t,e),n=(i.x+o.x)/2,a=(i.y+o.y)/2;return new _(n,a)}function Ue(e,i,o){var n,a=e.zoomSettings.zoomFactor,l=e.centerPosition,r=l.latitude,s=l.longitude,d=!(0,t.isNullOrUndefined)(e.centerLatOfGivenLocation)&&!(0,t.isNullOrUndefined)(e.centerLongOfGivenLocation)&&e.zoomNotApplied;(0,t.isNullOrUndefined)(e.mapScaleValue)&&(e.mapScaleValue=a),e.zoomSettings.shouldZoomInitially&&e.zoomSettings.enable&&(e.mapScaleValue=n=a=(e.zoomSettings.shouldZoomInitially||e.enablePersistence)&&1===e.scale?e.scale:(0,t.isNullOrUndefined)(e.markerZoomFactor)?1:e.markerZoomedState?e.markerZoomFactor:parseInt(e.scale.toString()),e.markerZoomedState&&e.mapScaleValue!==e.markerZoomFactor&&!e.enablePersistence&&(e.mapScaleValue=a=e.markerZoomFactor),!e.markerZoomedState||(0,t.isNullOrUndefined)(e.markerCenterLatitude)||(0,t.isNullOrUndefined)(e.markerCenterLongitude)||(r=e.markerCenterLatitude,s=e.markerCenterLongitude)),d&&(e.mapScaleValue=n=a=e.scaleOfGivenLocation);var p=(0,t.isNullOrUndefined)(e.baseMapRectBounds)?null:e.baseMapRectBounds.min,h=(0,t.isNullOrUndefined)(e.baseMapRectBounds)?null:e.baseMapRectBounds.max,m=o?1:e.mapScaleValue;(0,t.isNullOrUndefined)(e.currentShapeDataLength)&&!(0,t.isNullOrUndefined)(i.shapeData)&&(e.currentShapeDataLength=(0,t.isNullOrUndefined)(i.shapeData.features)?(0,t.isNullOrUndefined)(i.shapeData.geometries)?0: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(!(0,t.isNullOrUndefined)(p)&&!(0,t.isNullOrUndefined)(h)){var b=Math.abs(h.x-p.x),v=Math.abs(p.y-h.y),S=o?1:1===e.markerZoomFactor?e.mapScaleValue:a;if(l=e.zoomSettings.shouldZoomInitially&&e.markerZoomedState&&!e.zoomPersistence?e.markerZoomCenterPoint:e.centerPosition,!(0,t.isNullOrUndefined)(s)&&0!==s&&!(0,t.isNullOrUndefined)(r)&&0!==r||d){var x=((b+Math.abs(e.mapAreaRect.width-b))/2+e.mapAreaRect.x)/S,C=((v+Math.abs(e.mapAreaRect.height-v))/2+e.mapAreaRect.y)/S,O=d?Ae(e,i):c(r,s,e.mapLayerPanel.calculateFactor(i),i,e);(0,t.isNullOrUndefined)(e.previousProjection)||e.previousProjection!==e.projectionType||e.isMarkerZoomCompleted?(u=-O.x+x,g=-O.y+C,n=m):(1!==Math.floor(e.scale)&&e.zoomSettings.shouldZoomInitially||e.zoomNotApplied?(u=-O.x+x,g=-O.y+C):e.zoomSettings.shouldZoomInitially||e.zoomNotApplied?(u=-O.x+x,g=-O.y+C,n=m):(u=e.zoomTranslatePoint.x,g=e.zoomTranslatePoint.y),n=e.mapScaleValue)}else if((0,t.isNullOrUndefined)(e.previousProjection)||e.previousProjection!==e.projectionType){0!==v&&0!==b&&v!==b||(b=y.width/2,v=y.height),b*=n=(n=parseFloat(Math.min(y.width/b,y.height/v).toFixed(2)))>1.05?1:n,v*=n;var M=0!==p.x&&"layers"===e.translateType?f.width-y.width:0;u=y.x+(-p.x+(y.width/2-b/2))-M,g=y.y+(-p.y+(y.height/2-v/2)),e.previousTranslate=new _(u,g)}else if(e.zoomSettings.shouldZoomInitially||1!==e.markerZoomFactor||1!==e.mapScaleValue)if(n=e.mapScaleValue<1?e.mapScaleValue+1:e.mapScaleValue,e.mapScaleValue=e.zoomSettings.enable&&1!==e.mapScaleValue?e.mapScaleValue:1,e.currentShapeDataLength!==((0,t.isNullOrUndefined)(i.shapeData.features)?i.shapeData.geometries.length:i.shapeData.features.length)&&"SubLayer"!==i.type){var L=parseFloat(Math.min(y.height/v,y.width/b).toFixed(2));v*=L,b*=L,g=y.y+(-p.y+(y.height/2-v/2)),n=L,u=y.x+(-p.x+(y.width/2-b/2))}else if(e.availableSize.height===e.heightBeforeRefresh&&e.widthBeforeRefresh===e.availableSize.width||(0,t.isNullOrUndefined)(e.translatePoint)||(0,t.isNullOrUndefined)(e.previousTranslate))(0,t.isNullOrUndefined)(e.previousProjection)||!(1===e.mapScaleValue||e.mapScaleValue<=1.05)||e.zoomModule.isDragZoom?(u=e.zoomTranslatePoint.x,g=e.zoomTranslatePoint.y,n=e.scale):(b*=n=(n=parseFloat(Math.min(y.width/b,y.height/v).toFixed(2)))>1.05?1:n,u=y.x+(-p.x+(y.width/2-b/2)),v*=n,g=y.y+(-p.y+(y.height/2-v/2)));else{var P=parseFloat(Math.min(y.width/b,y.height/v).toFixed(2)),w=b;w*=P;var T=v;T*=P;var F=y.x+(-p.x+(y.width/2-w/2)),I=y.y+(-p.y+(y.height/2-T/2)),k=(e.translatePoint.x-e.previousTranslate.x)/e.widthBeforeRefresh,N=(e.translatePoint.y-e.previousTranslate.y)/e.heightBeforeRefresh;u=F+k*e.availableSize.width,g=I+N*e.availableSize.height,e.previousTranslate=new _(F,I),e.zoomTranslatePoint.x=u,e.zoomTranslatePoint.y=g}else v*=n=parseFloat(Math.min(y.width/b,y.height/v).toFixed(2)),b*=n,g=y.y+(-p.y+(y.height/2-v/2)),u=y.x+(-p.x+(y.width/2-b/2));(0,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 n=e.enablePersistence?e.mapScaleValue>=1?e.mapScaleValue:1:n,e.widthBeforeRefresh=e.availableSize.width,e.heightBeforeRefresh=e.availableSize.height,{scale:n,location:new _(u,g)}}function je(e,i,o){var n,a=e.zoomSettings.zoomFactor,l=e.centerPosition,r=l.latitude,s=l.longitude,d=!(0,t.isNullOrUndefined)(e.centerLongOfGivenLocation)&&!(0,t.isNullOrUndefined)(e.centerLatOfGivenLocation)&&e.zoomNotApplied;(0,t.isNullOrUndefined)(e.previousCenterLatitude)&&(0,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,((0,t.isNullOrUndefined)(e.mapScaleValue)||a>e.mapScaleValue)&&(e.isReset&&1===e.mapScaleValue?e.mapScaleValue=e.mapScaleValue:!(0,t.isNullOrUndefined)(e.mapScaleValue)&&e.mapScaleValue<=e.scale?e.mapScaleValue=e.scale:e.mapScaleValue=a),e.mapScaleValue=1!==e.zoomSettings.zoomFactor&&e.zoomSettings.zoomFactor===e.mapScaleValue||e.zoomSettings.zoomFactor===e.mapScaleValue||e.centerPositionChanged?e.zoomSettings.zoomFactor:e.mapScaleValue,e.zoomSettings.shouldZoomInitially&&!e.isZoomByPosition&&(e.mapScaleValue=a=n=(e.enablePersistence||e.zoomSettings.shouldZoomInitially)&&1===e.scale?e.scale:(0,t.isNullOrUndefined)(e.markerZoomFactor)?e.mapScaleValue:e.markerZoomFactor,a=e.mapScaleValue,(0,t.isNullOrUndefined)(e.markerCenterLatitude)||(0,t.isNullOrUndefined)(e.markerCenterLongitude)||(r=e.markerCenterLatitude,s=e.markerCenterLongitude)),d&&(e.mapScaleValue=n=a=e.scaleOfGivenLocation);var p,h,m=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(!(0,t.isNullOrUndefined)(s)&&0!==s&&!(0,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,C=d?Ae(e,i):c(r,s,e.mapLayerPanel.calculateFactor(i),i,e);(0,t.isNullOrUndefined)(e.zoomTranslatePoint)&&(0,t.isNullOrUndefined)(e.previousProjection)||e.zoomNotApplied?(p=-C.x+x+e.mapAreaRect.x/m,h=-C.y+S+e.mapAreaRect.y/m):e.previousProjection!==e.projectionType?(p=-C.x+x,h=-C.y+S):(e.isZoomByPosition&&(e.zoomTranslatePoint.x=-C.x+x,e.zoomTranslatePoint.y=-C.y+S),p=e.zoomTranslatePoint.x,h=e.zoomTranslatePoint.y,a=m),(0,t.isNullOrUndefined)(e.translatePoint)||(h=e.enablePersistence&&0!==e.translatePoint.y&&!e.zoomNotApplied?e.translatePoint.y:h,p=e.enablePersistence&&0!==e.translatePoint.x&&!e.zoomNotApplied?e.translatePoint.x:p),n=0!==a?a:1}else{var O=0===e.zoomSettings.zoomFactor?1:e.zoomSettings.zoomFactor,M=e.zoomSettings.maxZoom;n=O=O>M?M:O;var L=0===e.mapScaleValue?1:e.mapScaleValue>M?M:e.mapScaleValue;x=u.x+(-g.x+(u.width/2-b/2)),S=u.y+(-g.y+(u.height/2-v/2));if(!(0,t.isNullOrUndefined)(e.zoomTranslatePoint)||!(0,t.isNullOrUndefined)(e.previousProjection))if(e.previousProjection!==e.projectionType){var P=[],w={x,y:S};P.push(w);for(var T=1;T<M;T++){w={x:P[T-1].x-(u.width/T-u.width/(T+1))/2,y:P[T-1].y-(u.height/T-u.height/(T+1))/2},P.push(w)}x=P[O-1].x,S=P[O-1].y}else x=e.zoomTranslatePoint.x,S=e.zoomTranslatePoint.y,O!==L&&(n=L);(0,t.isNullOrUndefined)(e.translatePoint)||(p=e.enablePersistence&&0!==e.translatePoint.x&&!e.zoomNotApplied?e.translatePoint.x:x,h=e.enablePersistence&&0!==e.translatePoint.y&&!e.zoomNotApplied?e.translatePoint.y:S)}return n=e.enablePersistence?0===e.mapScaleValue?1:e.mapScaleValue:n,e.widthBeforeRefresh=e.availableSize.width,e.heightBeforeRefresh=e.availableSize.height,{scale:o?1:n,location:new _(p,h)}}function Ze(e){e.tileZoomScale=e.tileZoomLevel=Math.floor(e.availableSize.height/512)+1;var t=256*Math.pow(2,e.tileZoomLevel);e.tileTranslatePoint.x=e.availableSize.width/2-t/2,e.tileTranslatePoint.y=e.availableSize.height/2-t/2+20,e.previousTileWidth=e.availableSize.width,e.previousTileHeight=e.availableSize.height}function Re(e){return document.getElementById(e)}function De(e){return"string"==typeof e?parseFloat(e):e}function Ve(e,t){return e.formatFunction=e.intl.getNumberFormat({format:e.format,useGrouping:e.useGroupingSeparator}),e.formatFunction(t)}function Ge(e,i){var o=null;try{"function"!=typeof e&&document.querySelectorAll(e).length?o=(0,t.compile)(document.querySelector(e).innerHTML.trim()):(i.isVue||i.isVue3||"function"==typeof e)&&(o=(0,t.compile)(e))}catch(i){o=(0,t.compile)(e)}return o}function He(e){return document.getElementById(e)}function We(e,t){var i,o=parseInt(e.split("_LayerIndex_")[1].split("_")[0],10),n=parseInt(e.split("_shapeIndex_")[1].split("_")[0],10),a=t.layersCollection[o],l=a.layerData[n].property;return a.dataSource&&(i=a.dataSource[we(a.dataSource,l,a.shapeDataPath,a.shapePropertyPath)]),{shapeData:l,data:i}}function qe(e,i,o,n){var a=We(e,o),l={color:i.border.color,opacity:i.border.opacity,width:i.border.width},r=i.enableMultiSelect?{cancel:!1,name:n,fill:i.fill,opacity:i.opacity,border:l,shapeData:a.shapeData,data:a.data,target:e,maps:o,shapeDataCollection:o.shapeSelectionItem}:{cancel:!1,name:n,fill:i.fill,opacity:i.opacity,border:l,shapeData:a.shapeData,data:a.data,target:e,maps:o};return o.trigger(n,r,(function(){r.border.opacity=(0,t.isNullOrUndefined)(r.border.opacity)?r.opacity:r.border.opacity})),r}function Xe(e){return document.getElementsByClassName(e)}function Ye(e,t){var i=null;return document.getElementById(t)&&(i=document.getElementById(t).querySelector("#"+e)),i}function Je(e,t,i,o){for(var n,a=o.layers[e].shapeData.features,l=0;l<a.length;l++)if(a[l].properties.name===t){n=o.element.id+"_LayerIndex_"+e+"_shapeIndex_"+l+"_dataIndex_undefined";break}return He(n)}function Qe(e,i,o){var n=(0,t.createElement)("style",{id:e});return n.innerText="."+i+"{fill:"+o.fill+";fill-opacity:"+((0,t.isNullOrUndefined)(o.opacity)?"1":o.opacity.toString())+";stroke-opacity:"+((0,t.isNullOrUndefined)(o.border.opacity)?"1":o.border.opacity.toString())+";stroke-width:"+o.border.width.toString()+";stroke:"+o.border.color+";}",n}function Ke(e,i,o){var n=He(e);(0,t.isNullOrUndefined)(n)||(n.innerText="."+i+"{fill:"+o.fill+";fill-opacity:"+((0,t.isNullOrUndefined)(o.opacity)?"1":o.opacity.toString())+";stroke-width:"+o.border.width.toString()+";stroke-opacity:"+((0,t.isNullOrUndefined)(o.border.opacity)?"1":o.border.opacity.toString())+";stroke:"+o.border.color+"}")}function $e(e,i,o,n,a){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:Hi,target:o.id,cancel:!1,shapeData:n,data:a,maps:i};i.trigger("itemSelection",r,(function(o){r.border.opacity=(0,t.isNullOrUndefined)(e.border.opacity)?e.opacity:e.border.opacity,i.shapeSelectionItem.push(r.shapeData),He("ShapeselectionMap")?Ke("ShapeselectionMap","ShapeselectionMapStyle",r):document.body.appendChild(Qe("ShapeselectionMap","ShapeselectionMapStyle",r))}))}function et(e){e.removeAttribute("class")}function tt(e,i,o,n,a,l,r){void 0===r&&(r=0);var s=n.x,d=n.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&&!a.zoomModule.isPanningInProgress){if(a.isTileMap&&0===p){var o=document.querySelector(".GroupElement");(0,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+")")}else a.zoomModule.isPanningInProgress&&(h=e.getAttribute("transform"))},end:function(t){if(a.zoomModule.isPanningInProgress||e.setAttribute("transform",h),a.zoomModule.isPanningInProgress=!1,l){var i={cancel:!1,name:Di,element:l,maps:a};a.trigger(Di,i)}}})}function it(e){Be(e)}function ot(e,i,o,n,a,l,r,s,d){var h=p(o,n,s);(0,t.isNullOrUndefined)(h)||(o=h.x,n=h.y);for(var m=document.getElementById(r),c=T(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=(0,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<a-c||(o>a-c&&o<a-8*g?c=a-o:o>=a-8*g&&(o>c?o-=c:(c=o,o=0)));var f=i.split("px");nt(m,e,o,n,f,c,a,s),m.clientHeight+2*parseInt(f[0],10)>l&&(c=o,o=0),nt(m,e,o,n,f,c,a,s),d&&setTimeout(it,5e3,r)}function nt(e,t,i,o,n,a,l,r){e.innerText=t,e.style.top=-1!==e.id.indexOf("_Legend")?(parseInt(n[0],10)+o).toString()+"px":(2*parseInt(n[0],10)).toString()+"px",e.style.left=i.toString()+"px",e.style.width=a.toString()+"px",e.style.maxWidth=l.toString()+"px",e.style.wordWrap="break-word",r.appendChild(e)}function at(e,i,o,n,a){var l=He(e),r=lt(a.borderColor),s=lt(a.fontColor),d="top:"+o.toString()+"px;left:"+n.toString()+"px;color:"+(s?"rgba("+s.r+","+s.g+","+s.b+","+a.fontOpacity+")":a.fontColor)+";background:"+a.fill+";z-index: 2;position:absolute;border:"+a.borderWidth+"px solid "+(r?"rgba("+r.r+","+r.g+","+r.b+","+a.borderOpacity+")":a.borderColor)+";font-family:"+a.fontFamily+";font-style:"+a.fontStyle+";font-weight:"+a.fontWeight+";font-size:"+a.fontSize+";border-radius:"+a.borderWidth+"px;";!l&&a.visible?((l=(0,t.createElement)("div",{id:e})).innerHTML=t.SanitizeHtmlHelper.sanitize("&nbsp;"+i+"&nbsp;"),l.style.cssText=d,document.body.appendChild(l)):a.visible&&(l.innerHTML=t.SanitizeHtmlHelper.sanitize("&nbsp;"+i+"&nbsp;"),l.style.cssText=d)}function lt(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 rt(e,t,o,n,a){var l=new i.SvgRenderer(""),r=st(e,o,t,a,n);return l["draw"+r.functionName](r.renderOption)}function st(e,i,o,n,a){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(n.stroke="HorizontalLine"===o||"VerticalLine"===o||"Cross"===o?n.fill:n.stroke,n["stroke-width"]=0!==n["stroke-width"]||"HorizontalLine"!==o&&"VerticalLine"!==o&&"Cross"!==o?n["stroke-width"]:1,o){case"Circle":case"Bubble":r="Ellipse",(0,t.merge)(n,{rx:s/2,ry:d/2,cx:p,cy:h});break;case"VerticalLine":l="M "+p+" "+(h+d/2)+" L "+p+" "+(h+-d/2),(0,t.merge)(n,{d:l});break;case"HorizontalLine":l="M "+p+" "+h+" L "+(p+s/2)+" "+h,(0,t.merge)(n,{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",(0,t.merge)(n,{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",(0,t.merge)(n,{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",(0,t.merge)(n,{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",(0,t.merge)(n,{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"),(0,t.merge)(n,{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",(0,t.merge)(n,{d:l});break;case"Cross":l="M "+m+" "+h+" L "+(p+s/2)+" "+h+" M "+p+" "+(h+d/2)+" L "+p+" "+(h+-d/2),(0,t.merge)(n,{d:l});break;case"Image":r="Image",(0,t.merge)(n,{href:a,height:d,width:s,x:m,y:c})}return{renderOption:n,functionName:r}}function dt(e,t){t.appendChild(e);var i=e.offsetWidth,o=e.offsetHeight;return t.removeChild(e),new n(i,o)}function pt(e,i,o,n){for(var a,l=0;l<e.childElementCount;l++)if((a=e.childNodes[l]).id.indexOf("_NavigationGroup")>-1)ht(a,i,o,n);else if(a.id.indexOf("_Polygons_Group")>-1)for(var r=0;r<a.childElementCount;r++){var s=n.layersCollection[i].polygonSettings.polygons[parseInt(a.children[r].id.split("_PolygonIndex_")[1])].borderWidth;a.children[r].setAttribute("stroke-width",(s/o).toString())}else{var d=void 0,p=0,h=n.layersCollection[i].shapeSettings.borderWidthValuePath,m=n.layersCollection[i].shapeSettings.border.width,c=n.layersCollection[i].shapeSettings.circleRadius;d=n.layersCollection[i].shapeSettings.borderWidthValuePath&&null!==(p=we(n.layersCollection[i].dataSource,n.layersCollection[i].layerData[l].property,n.layersCollection[i].shapeDataPath,n.layersCollection[i].shapePropertyPath,n.layersCollection[i]))&&n.layersCollection[i].dataSource[p][h]?n.layersCollection[i].dataSource[p][h]:(0,t.isNullOrUndefined)(m)?0:m,a.setAttribute("stroke-width",(d/o).toString()),(e.id.indexOf("_Point")>-1||e.id.indexOf("_MultiPoint")>-1)&&a.setAttribute("r",(c/o).toString())}}function ht(e,t,i,o){for(var n,a=0;a<e.childElementCount;a++)if("path"===(n=e.childNodes[a]).tagName){var l=o.layersCollection[t].navigationLineSettings[parseFloat(n.id.split("_NavigationIndex_")[1].split("_")[0])].width;n.setAttribute("stroke-width",(l/i).toString())}}function mt(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 ct(e,t){var i=ut(e[0],e[1]);return ut(t[0],t[1])/i}function ut(e,t){var i=e.pageX-t.pageX,o=e.pageY-t.pageY;return Math.sqrt(i*i+o*o)}function gt(e,t){var i=t.element.getBoundingClientRect(),o=i.top+document.defaultView.pageXOffset,n=i.left+document.defaultView.pageYOffset;return Array.prototype.slice.call(e).map((function(e){return{x:e.pageX-n,y:e.pageY-o}}))}function yt(e){return{x:e.map((function(e){return e.x})).reduce(ft)/e.length,y:e.map((function(e){return e.y})).reduce(ft)/e.length}}function ft(e,t){return e+t}function bt(e,t,i,o,n,a,l){var r=0,s=l.previousPoint,d=l.previousScale,p=n-d,h=new Z(0,0),m=1;if(n!==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;vt(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/n),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=n,e.setAttribute("transform","scale( "+n+" ) translate( "+o.x+" "+o.y+" )"),l.zoomModule.processTemplate(o.x,o.y,n,l)}))}else e.setAttribute("transform","scale( "+n+" ) translate( "+o.x+" "+o.y+" )")}function vt(e,i,o,n,a){var l,r=this,s=null;o="Disable"===t.animationMode?0:o;var d=function(t){s||(s=t);var i=t-s;i<o?(n.call(r,{element:e,delay:0,timeStamp:i,duration:o}),window.requestAnimationFrame(d)):(window.cancelAnimationFrame(l),a.call(r,{element:e}),e.id.indexOf("Marker")>-1&&(Re(e.id.split("_Layer")[0]+"_Markers_Group").style.cssText="visibility:visible"))};l=window.requestAnimationFrame(d)}var St,xt,Ct,Ot,_t,Mt=function(e,t,i,o,n){this.dataOptions=e,this.type=t||"GET",this.async=i||!0,this.contentType=o,this.sendData=n};function Lt(e,t,i,o){var n=0,a=e.getAttribute("transform").split(" ");2===a.length&&(a[2]=a[1].split(")")[0],a[1]=a[0].split("(")[1]);var l=new Z(parseInt(a[1],10),parseInt(a[2],10)),r=o.x-l.x,s=o.y-l.y,d=new Z(0,0);vt(e,0,i,(function(e){e.timeStamp>e.delay&&(n=(e.timeStamp-e.delay)/e.duration,d.x=l.x+n*r,d.y=l.y+n*s,e.element.setAttribute("transform","translate( "+d.x+" "+d.y+" )"))}),(function(){e.setAttribute("transform","translate( "+o.x+" "+o.y+" )")}))}function Pt(e,i){var o=(0,t.isNullOrUndefined)(i.shouldZoomPreviousFactor)?null:i.shouldZoomPreviousFactor,n=(0,t.isNullOrUndefined)(i.shouldZoomCurrentFactor)?null:i.shouldZoomCurrentFactor;(0,t.isNullOrUndefined)(n)?!(0,t.isNullOrUndefined)(o)&&(0,t.isNullOrUndefined)(n)&&i.shouldZoomPreviousFactor!==e?i.shouldZoomCurrentFactor=e:i.shouldZoomPreviousFactor=e:(i.shouldZoomCurrentFactor=null,i.shouldZoomPreviousFactor=null)}function wt(e,t,i,o,n,a,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,C=Math.log(a/256/v)/Math.LN2,O=Math.log(n/256/x)/Math.LN2,_=l.zoomNotApplied&&!l.isTileMap?d:r&&!l.isTileMap?(C+O)/2:Math.min(C,O);return s=Math.min(_,p),s=l.isTileMap||!l.zoomNotApplied?Math.floor(s):s,l.isTileMap||Pt(s,l),s}function Tt(e){var i,o=(0,t.isNullOrUndefined)(e.result)?e.actual:e.result;return(0,t.isNullOrUndefined)(o.length)?(0,t.isNullOrUndefined)(o.Items)||(i=o.Items):i=o,i}!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:null,fontWeight:"Medium",color:"#000000",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"}}(St||(St={})),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"}}(xt||(xt={})),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"}}(Ct||(Ct={})),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:null,fontWeight:"Medium",color:"#000000",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"}}(Ot||(Ot={})),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"}}(_t||(_t={}));var Ft=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])},e(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)}}(),It=function(e,t,i,o){var n,a=arguments.length,l=a<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--)(n=e[r])&&(l=(a<3?n(l):a>3?n(t,i,l):n(t,i))||l);return a>3&&l&&Object.defineProperty(t,i,l),l},kt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)("")],i.prototype,"content",void 0),It([(0,t.Property)("0px")],i.prototype,"x",void 0),It([(0,t.Property)("0px")],i.prototype,"y",void 0),It([(0,t.Property)("None")],i.prototype,"verticalAlignment",void 0),It([(0,t.Property)("None")],i.prototype,"horizontalAlignment",void 0),It([(0,t.Property)("-1")],i.prototype,"zIndex",void 0),i}(t.ChildProperty),Nt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)("Start")],i.prototype,"position",void 0),It([(0,t.Property)("false")],i.prototype,"showArrow",void 0),It([(0,t.Property)(2)],i.prototype,"size",void 0),It([(0,t.Property)("black")],i.prototype,"color",void 0),It([(0,t.Property)(0)],i.prototype,"offSet",void 0),i}(t.ChildProperty),Et=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(null)],i.prototype,"size",void 0),It([(0,t.Property)(null)],i.prototype,"color",void 0),It([(0,t.Property)("Roboto, Noto, Sans-serif")],i.prototype,"fontFamily",void 0),It([(0,t.Property)("Medium")],i.prototype,"fontWeight",void 0),It([(0,t.Property)("Medium")],i.prototype,"fontStyle",void 0),It([(0,t.Property)(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),zt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)("transparent")],i.prototype,"fill",void 0),It([(0,t.Property)(null)],i.prototype,"color",void 0),It([(0,t.Property)(1)],i.prototype,"borderOpacity",void 0),It([(0,t.Property)(1)],i.prototype,"borderWidth",void 0),It([(0,t.Property)(null)],i.prototype,"borderColor",void 0),It([(0,t.Property)(null)],i.prototype,"radius",void 0),It([(0,t.Property)(null)],i.prototype,"selectionColor",void 0),It([(0,t.Property)(null)],i.prototype,"highlightColor",void 0),It([(0,t.Property)(5)],i.prototype,"padding",void 0),It([(0,t.Property)(1)],i.prototype,"opacity",void 0),It([(0,t.Property)(["ZoomIn","ZoomOut","Reset"])],i.prototype,"toolbarItems",void 0),i}(t.ChildProperty),Bt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(!0)],i.prototype,"visible",void 0),It([(0,t.Property)("white")],i.prototype,"fill",void 0),It([(0,t.Property)(1)],i.prototype,"borderOpacity",void 0),It([(0,t.Property)(1)],i.prototype,"borderWidth",void 0),It([(0,t.Property)("#707070")],i.prototype,"borderColor",void 0),It([(0,t.Property)("black")],i.prototype,"fontColor",void 0),It([(0,t.Property)("")],i.prototype,"fontFamily",void 0),It([(0,t.Property)("")],i.prototype,"fontStyle",void 0),It([(0,t.Property)("")],i.prototype,"fontWeight",void 0),It([(0,t.Property)("")],i.prototype,"fontSize",void 0),It([(0,t.Property)(1)],i.prototype,"fontOpacity",void 0),i}(t.ChildProperty),At=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)("transparent")],i.prototype,"backgroundColor",void 0),It([(0,t.Property)(1)],i.prototype,"borderOpacity",void 0),It([(0,t.Property)(1)],i.prototype,"borderWidth",void 0),It([(0,t.Property)("transparent")],i.prototype,"borderColor",void 0),It([(0,t.Property)("Far")],i.prototype,"horizontalAlignment",void 0),It([(0,t.Property)("Near")],i.prototype,"verticalAlignment",void 0),It([(0,t.Property)("Horizontal")],i.prototype,"orientation",void 0),It([(0,t.Complex)({},zt)],i.prototype,"buttonSettings",void 0),It([(0,t.Complex)({},Bt)],i.prototype,"tooltipSettings",void 0),i}(t.ChildProperty),Ut=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)("")],i.prototype,"color",void 0),It([(0,t.Property)(0)],i.prototype,"width",void 0),It([(0,t.Property)(null)],i.prototype,"opacity",void 0),i}(t.ChildProperty),jt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(null)],i.prototype,"latitude",void 0),It([(0,t.Property)(null)],i.prototype,"longitude",void 0),i}(t.ChildProperty),Zt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(!1)],i.prototype,"visible",void 0),It([(0,t.Property)("")],i.prototype,"template",void 0),It([(0,t.Property)("")],i.prototype,"fill",void 0),It([(0,t.Complex)({color:null,width:1},Ut)],i.prototype,"border",void 0),It([(0,t.Complex)({fontFamily:null,size:null,fontWeight:null},Et)],i.prototype,"textStyle",void 0),It([(0,t.Property)(null)],i.prototype,"format",void 0),It([(0,t.Property)(null)],i.prototype,"valuePath",void 0),It([(0,t.Property)(2e3)],i.prototype,"duration",void 0),i}(t.ChildProperty),Rt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(!1)],i.prototype,"visible",void 0),It([(0,t.Property)("")],i.prototype,"fill",void 0),It([(0,t.Complex)({color:null,width:1},Ut)],i.prototype,"border",void 0),It([(0,t.Complex)({fontFamily:null,size:null,fontWeight:null},Et)],i.prototype,"textStyle",void 0),It([(0,t.Property)(2e3)],i.prototype,"duration",void 0),i}(t.ChildProperty),Dt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(10)],i.prototype,"left",void 0),It([(0,t.Property)(10)],i.prototype,"right",void 0),It([(0,t.Property)(10)],i.prototype,"top",void 0),It([(0,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 Ft(i,e),It([(0,t.Property)("#000000")],i.prototype,"color",void 0),It([(0,t.Property)(1)],i.prototype,"width",void 0),It([(0,t.Property)(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),Gt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(!1)],i.prototype,"allowClustering",void 0),It([(0,t.Property)(!0)],i.prototype,"allowDeepClustering",void 0),It([(0,t.Complex)({color:"transparent",width:1},Ut)],i.prototype,"border",void 0),It([(0,t.Property)("#D2691E")],i.prototype,"fill",void 0),It([(0,t.Property)(1)],i.prototype,"opacity",void 0),It([(0,t.Property)("Rectangle")],i.prototype,"shape",void 0),It([(0,t.Property)(12)],i.prototype,"width",void 0),It([(0,t.Property)(12)],i.prototype,"height",void 0),It([(0,t.Property)(new _(0,0))],i.prototype,"offset",void 0),It([(0,t.Property)("")],i.prototype,"imageUrl",void 0),It([(0,t.Property)("")],i.prototype,"dashArray",void 0),It([(0,t.Complex)({},Et)],i.prototype,"labelStyle",void 0),It([(0,t.Property)(!1)],i.prototype,"allowClusterExpand",void 0),It([(0,t.Complex)({},Vt)],i.prototype,"connectorLineSettings",void 0),i}(t.ChildProperty),Ht=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ft(t,e),t}(t.ChildProperty),Wt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(null)],i.prototype,"from",void 0),It([(0,t.Property)(null)],i.prototype,"to",void 0),It([(0,t.Property)(null)],i.prototype,"value",void 0),It([(0,t.Property)(null)],i.prototype,"color",void 0),It([(0,t.Property)(null)],i.prototype,"minOpacity",void 0),It([(0,t.Property)(null)],i.prototype,"maxOpacity",void 0),It([(0,t.Property)(null)],i.prototype,"label",void 0),It([(0,t.Property)(!0)],i.prototype,"showLegend",void 0),i}(t.ChildProperty),qt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(null)],i.prototype,"latitude",void 0),It([(0,t.Property)(null)],i.prototype,"longitude",void 0),i}(t.ChildProperty),Xt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(null)],i.prototype,"shapePath",void 0),It([(0,t.Property)(null)],i.prototype,"shapeValue",void 0),i}(t.ChildProperty),Yt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(!1)],i.prototype,"enable",void 0),It([(0,t.Property)(null)],i.prototype,"fill",void 0),It([(0,t.Property)(1)],i.prototype,"opacity",void 0),It([(0,t.Property)(!1)],i.prototype,"enableMultiSelect",void 0),It([(0,t.Complex)({color:"transparent",width:0},Ut)],i.prototype,"border",void 0),i}(t.ChildProperty),Jt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(null)],i.prototype,"fill",void 0),It([(0,t.Property)(!1)],i.prototype,"enable",void 0),It([(0,t.Property)(1)],i.prototype,"opacity",void 0),It([(0,t.Complex)({color:"transparent",width:0},Ut)],i.prototype,"border",void 0),i}(t.ChildProperty),Qt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(1)],i.prototype,"borderWidth",void 0),It([(0,t.Property)(1)],i.prototype,"borderOpacity",void 0),It([(0,t.Property)(1)],i.prototype,"opacity",void 0),It([(0,t.Property)("#FF471A")],i.prototype,"borderColor",void 0),It([(0,t.Property)("#FF471A")],i.prototype,"fill",void 0),It([(0,t.Property)([])],i.prototype,"points",void 0),It([(0,t.Property)("")],i.prototype,"tooltipText",void 0),It([(0,t.Property)("")],i.prototype,"tooltipTemplate",void 0),i}(t.ChildProperty),Kt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Collection)([],Qt)],i.prototype,"polygons",void 0),It([(0,t.Complex)({},Yt)],i.prototype,"selectionSettings",void 0),It([(0,t.Complex)({},Jt)],i.prototype,"highlightSettings",void 0),It([(0,t.Complex)({},Rt)],i.prototype,"tooltipSettings",void 0),i}(t.ChildProperty),$t=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(!1)],i.prototype,"visible",void 0),It([(0,t.Property)(1)],i.prototype,"width",void 0),It([(0,t.Property)(null)],i.prototype,"longitude",void 0),It([(0,t.Property)(null)],i.prototype,"latitude",void 0),It([(0,t.Property)("")],i.prototype,"dashArray",void 0),It([(0,t.Property)("black")],i.prototype,"color",void 0),It([(0,t.Property)(0)],i.prototype,"angle",void 0),It([(0,t.Complex)({showArrow:!1,position:"Start",size:5,color:"black"},Nt)],i.prototype,"arrowSettings",void 0),It([(0,t.Complex)({},Yt)],i.prototype,"selectionSettings",void 0),It([(0,t.Complex)({},Jt)],i.prototype,"highlightSettings",void 0),i}(t.ChildProperty),ei=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Complex)({},Ut)],i.prototype,"border",void 0),It([(0,t.Property)(!1)],i.prototype,"visible",void 0),It([(0,t.Property)([])],i.prototype,"dataSource",void 0),It([(0,t.Property)()],i.prototype,"query",void 0),It([(0,t.Property)(1e3)],i.prototype,"animationDuration",void 0),It([(0,t.Property)(0)],i.prototype,"animationDelay",void 0),It([(0,t.Property)("")],i.prototype,"fill",void 0),It([(0,t.Property)(10)],i.prototype,"minRadius",void 0),It([(0,t.Property)(20)],i.prototype,"maxRadius",void 0),It([(0,t.Property)(1)],i.prototype,"opacity",void 0),It([(0,t.Property)(null)],i.prototype,"valuePath",void 0),It([(0,t.Property)("Circle")],i.prototype,"bubbleType",void 0),It([(0,t.Property)(null)],i.prototype,"colorValuePath",void 0),It([(0,t.Collection)([],Wt)],i.prototype,"colorMapping",void 0),It([(0,t.Complex)({},Zt)],i.prototype,"tooltipSettings",void 0),It([(0,t.Complex)({},Yt)],i.prototype,"selectionSettings",void 0),It([(0,t.Complex)({},Jt)],i.prototype,"highlightSettings",void 0),i}(t.ChildProperty),ti=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)("")],i.prototype,"text",void 0),It([(0,t.Property)("")],i.prototype,"description",void 0),i}(t.ChildProperty),ii=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Complex)({size:null,fontWeight:null,fontFamily:null},Et)],i.prototype,"textStyle",void 0),It([(0,t.Property)("Center")],i.prototype,"alignment",void 0),i}(ti),oi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Complex)({size:null,fontWeight:null,fontFamily:null},Et)],i.prototype,"textStyle",void 0),It([(0,t.Property)("Center")],i.prototype,"alignment",void 0),It([(0,t.Complex)({},ii)],i.prototype,"subtitleSettings",void 0),i}(ti),ni=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(!1)],i.prototype,"enable",void 0),It([(0,t.Property)(!0)],i.prototype,"enablePanning",void 0),It([(0,t.Property)(!0)],i.prototype,"enableSelectionZooming",void 0),It([(0,t.Property)(!0)],i.prototype,"mouseWheelZoom",void 0),It([(0,t.Property)(!1)],i.prototype,"doubleClickZoom",void 0),It([(0,t.Property)(!0)],i.prototype,"pinchZooming",void 0),It([(0,t.Property)(!1)],i.prototype,"zoomOnClick",void 0),It([(0,t.Property)(1)],i.prototype,"zoomFactor",void 0),It([(0,t.Property)(10)],i.prototype,"maxZoom",void 0),It([(0,t.Property)(1)],i.prototype,"minZoom",void 0),It([(0,t.Property)(!1)],i.prototype,"shouldZoomInitially",void 0),It([(0,t.Property)(!0)],i.prototype,"resetToInitial",void 0),It([(0,t.Complex)({},At)],i.prototype,"toolbarSettings",void 0),i}(t.ChildProperty),ai=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(!1)],i.prototype,"enable",void 0),It([(0,t.Property)(!0)],i.prototype,"applyShapeSettings",void 0),It([(0,t.Property)(1)],i.prototype,"opacity",void 0),It([(0,t.Property)("")],i.prototype,"fill",void 0),It([(0,t.Complex)({color:"",width:0},Ut)],i.prototype,"border",void 0),i}(t.ChildProperty),li=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(!1)],i.prototype,"useMarkerShape",void 0),It([(0,t.Property)(!1)],i.prototype,"toggleVisibility",void 0),It([(0,t.Property)(!1)],i.prototype,"visible",void 0),It([(0,t.Property)("transparent")],i.prototype,"background",void 0),It([(0,t.Property)("Layers")],i.prototype,"type",void 0),It([(0,t.Property)(!1)],i.prototype,"invertedPointer",void 0),It([(0,t.Property)("After")],i.prototype,"labelPosition",void 0),It([(0,t.Property)("None")],i.prototype,"labelDisplayMode",void 0),It([(0,t.Property)("Circle")],i.prototype,"shape",void 0),It([(0,t.Property)("")],i.prototype,"width",void 0),It([(0,t.Property)("")],i.prototype,"height",void 0),It([(0,t.Complex)({fontFamily:null,fontWeight:null},Et)],i.prototype,"textStyle",void 0),It([(0,t.Property)(15)],i.prototype,"shapeWidth",void 0),It([(0,t.Property)(15)],i.prototype,"shapeHeight",void 0),It([(0,t.Property)(10)],i.prototype,"shapePadding",void 0),It([(0,t.Complex)({color:null,width:0},Ut)],i.prototype,"border",void 0),It([(0,t.Complex)({color:"#000000",width:0},Ut)],i.prototype,"shapeBorder",void 0),It([(0,t.Complex)({},ti)],i.prototype,"title",void 0),It([(0,t.Complex)({size:null,color:St.legendTitleFont.color,fontStyle:St.legendTitleFont.fontStyle,fontWeight:null,fontFamily:null},Et)],i.prototype,"titleStyle",void 0),It([(0,t.Property)("Bottom")],i.prototype,"position",void 0),It([(0,t.Property)("Center")],i.prototype,"alignment",void 0),It([(0,t.Property)("None")],i.prototype,"orientation",void 0),It([(0,t.Property)({x:0,y:0})],i.prototype,"location",void 0),It([(0,t.Property)(null)],i.prototype,"fill",void 0),It([(0,t.Property)(1)],i.prototype,"opacity",void 0),It([(0,t.Property)("Default")],i.prototype,"mode",void 0),It([(0,t.Property)(null)],i.prototype,"showLegendPath",void 0),It([(0,t.Property)(null)],i.prototype,"valuePath",void 0),It([(0,t.Property)(!1)],i.prototype,"removeDuplicateLegend",void 0),It([(0,t.Complex)({},ai)],i.prototype,"toggleLegendSettings",void 0),i}(t.ChildProperty),ri=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(!1)],i.prototype,"visible",void 0),It([(0,t.Complex)({width:0,color:"transparent"},Ut)],i.prototype,"border",void 0),It([(0,t.Property)("black")],i.prototype,"fill",void 0),It([(0,t.Property)(1)],i.prototype,"opacity",void 0),It([(0,t.Property)(5)],i.prototype,"rx",void 0),It([(0,t.Property)(5)],i.prototype,"ry",void 0),It([(0,t.Complex)({fontWeight:null},Et)],i.prototype,"textStyle",void 0),It([(0,t.Property)("")],i.prototype,"labelPath",void 0),It([(0,t.Property)("None")],i.prototype,"smartLabelMode",void 0),It([(0,t.Property)("None")],i.prototype,"intersectionAction",void 0),It([(0,t.Property)("")],i.prototype,"template",void 0),It([(0,t.Property)(0)],i.prototype,"animationDuration",void 0),i}(t.ChildProperty),si=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(null)],i.prototype,"fill",void 0),It([(0,t.Property)([])],i.prototype,"palette",void 0),It([(0,t.Property)(5)],i.prototype,"circleRadius",void 0),It([(0,t.Complex)({width:null,color:null},Ut)],i.prototype,"border",void 0),It([(0,t.Property)("")],i.prototype,"dashArray",void 0),It([(0,t.Property)(1)],i.prototype,"opacity",void 0),It([(0,t.Property)(null)],i.prototype,"colorValuePath",void 0),It([(0,t.Property)(null)],i.prototype,"borderColorValuePath",void 0),It([(0,t.Property)(null)],i.prototype,"borderWidthValuePath",void 0),It([(0,t.Property)(null)],i.prototype,"valuePath",void 0),It([(0,t.Collection)([],Wt)],i.prototype,"colorMapping",void 0),It([(0,t.Property)(!1)],i.prototype,"autofill",void 0),i}(t.ChildProperty),di=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Complex)({color:"transparent",width:1},Ut)],i.prototype,"border",void 0),It([(0,t.Property)(null)],i.prototype,"dashArray",void 0),It([(0,t.Property)(!1)],i.prototype,"visible",void 0),It([(0,t.Property)(!1)],i.prototype,"enableDrag",void 0),It([(0,t.Property)("#FF471A")],i.prototype,"fill",void 0),It([(0,t.Property)(null)],i.prototype,"heightValuePath",void 0),It([(0,t.Property)(null)],i.prototype,"widthValuePath",void 0),It([(0,t.Property)(10)],i.prototype,"height",void 0),It([(0,t.Property)(10)],i.prototype,"width",void 0),It([(0,t.Property)(1)],i.prototype,"opacity",void 0),It([(0,t.Property)(null)],i.prototype,"colorValuePath",void 0),It([(0,t.Property)(null)],i.prototype,"shapeValuePath",void 0),It([(0,t.Property)(null)],i.prototype,"imageUrlValuePath",void 0),It([(0,t.Property)("Balloon")],i.prototype,"shape",void 0),It([(0,t.Property)("")],i.prototype,"legendText",void 0),It([(0,t.Property)(new _(0,0))],i.prototype,"offset",void 0),It([(0,t.Property)("")],i.prototype,"imageUrl",void 0),It([(0,t.Property)(null)],i.prototype,"template",void 0),It([(0,t.Property)([])],i.prototype,"dataSource",void 0),It([(0,t.Property)()],i.prototype,"query",void 0),It([(0,t.Complex)({},Zt)],i.prototype,"tooltipSettings",void 0),It([(0,t.Property)(1e3)],i.prototype,"animationDuration",void 0),It([(0,t.Property)(0)],i.prototype,"animationDelay",void 0),It([(0,t.Complex)({},Yt)],i.prototype,"selectionSettings",void 0),It([(0,t.Complex)({},Jt)],i.prototype,"highlightSettings",void 0),It([(0,t.Property)(null)],i.prototype,"latitudeValuePath",void 0),It([(0,t.Property)(null)],i.prototype,"longitudeValuePath",void 0),It([(0,t.Collection)([],qt)],i.prototype,"initialMarkerSelection",void 0),It([(0,t.Complex)({},Gt)],i.prototype,"clusterSettings",void 0),i}(t.ChildProperty),pi=function(e){function t(t,i,o,n){return e.call(this,t,i,o,n)||this}return Ft(t,e),t}(di),hi=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.isBaseLayer=!1,t}return Ft(i,e),It([(0,t.Property)(null)],i.prototype,"shapeData",void 0),It([(0,t.Property)()],i.prototype,"query",void 0),It([(0,t.Complex)({},si)],i.prototype,"shapeSettings",void 0),It([(0,t.Property)([])],i.prototype,"dataSource",void 0),It([(0,t.Property)("Layer")],i.prototype,"type",void 0),It([(0,t.Property)("Geographic")],i.prototype,"geometryType",void 0),It([(0,t.Property)("")],i.prototype,"urlTemplate",void 0),It([(0,t.Property)(!0)],i.prototype,"visible",void 0),It([(0,t.Property)("name")],i.prototype,"shapeDataPath",void 0),It([(0,t.Property)("name")],i.prototype,"shapePropertyPath",void 0),It([(0,t.Property)(0)],i.prototype,"animationDuration",void 0),It([(0,t.Collection)([],pi)],i.prototype,"markerSettings",void 0),It([(0,t.Complex)({},Gt)],i.prototype,"markerClusterSettings",void 0),It([(0,t.Complex)({},ri)],i.prototype,"dataLabelSettings",void 0),It([(0,t.Collection)([],ei)],i.prototype,"bubbleSettings",void 0),It([(0,t.Collection)([],$t)],i.prototype,"navigationLineSettings",void 0),It([(0,t.Complex)({},Kt)],i.prototype,"polygonSettings",void 0),It([(0,t.Complex)({},Zt)],i.prototype,"tooltipSettings",void 0),It([(0,t.Complex)({},Yt)],i.prototype,"selectionSettings",void 0),It([(0,t.Complex)({},Jt)],i.prototype,"highlightSettings",void 0),It([(0,t.Complex)({},ai)],i.prototype,"toggleLegendSettings",void 0),It([(0,t.Collection)([],Xt)],i.prototype,"initialShapeSelection",void 0),i}(t.ChildProperty),mi=function(e,t,i,o,n,a,l){void 0===i&&(i=256),void 0===o&&(o=256),void 0===n&&(n=0),void 0===a&&(a=0),void 0===l&&(l=null),this.x=e,this.y=t,this.top=n,this.left=a,this.height=i,this.width=o,this.src=l},ci=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(null)],i.prototype,"background",void 0),It([(0,t.Complex)({color:"transparent",width:1},Ut)],i.prototype,"border",void 0),i}(t.ChildProperty),ui="load",gi="loaded",yi="click",fi="onclick",bi="rightClick",vi="doubleClick",Si="resize",xi="tooltipRender",Ci="shapeSelected",Oi="shapeHighlight",_i="mousemove",Mi="mouseup",Li="mousedown",Pi="layerRendering",wi="shapeRendering",Ti="markerRendering",Fi="markerClusterRendering",Ii="markerClick",ki="markerDragStart",Ni="markerDragEnd",Ei="markerClusterClick",zi="markerMouseMove",Bi="mouseMove",Ai="markerClusterMouseMove",Ui="dataLabelRendering",ji="bubbleRendering",Zi="bubbleClick",Ri="bubbleMouseMove",Di="animationComplete",Vi="legendRendering",Gi="annotationRendering",Hi="itemSelection",Wi="panComplete",qi="zoomComplete",Xi="itemHighlight",Yi="beforePrint",Ji="zoomIn",Qi="zoomOut",Ki="pan",$i=function(){function e(e){this.maps=e}return e.prototype.getBingMap=function(e,i,o,n,a,l){for(var r="",s=Math.min(this.maps.tileZoomLevel,parseInt(this.maxZoom,10));s>0;s--){var d=0,p=1<<s-1;e.x&p&&d++,e.y&p&&(d+=2),r=r+""+d}if((0,t.isNullOrUndefined)(l))return"";var h=l[Math.min(parseInt(r.substr(r.length-1,1),10),l.length)];return(a=a.replace("{quadkey}",r).replace("{subdomain}",h))+"&mkt="+n+"&ur=IN&Key="+i},e.prototype.destroy=function(){this.maps=null,this.subDomains=[]},e}(),eo=function(){function e(e){}return e.prototype.getShapeColorMapping=function(e,i,o){var n=e.colorValuePath?e.colorValuePath:e.valuePath,a=(0,t.isNullOrUndefined)(n)?i[n]:n.indexOf(".")>-1?Y(i,n):i[n],l=Number(a),r=this.getColorByValue(e.colorMapping,l,a);return(0,t.isNullOrUndefined)(r)?o:r},e.prototype.getColorByValue=function(e,i,o){if(isNaN(i)&&(0,t.isNullOrUndefined)(o))return null;for(var n,a="",l=0,r=e;l<r.length;l++){var s=r[l];(!(0,t.isNullOrUndefined)(s.from)&&!(0,t.isNullOrUndefined)(s.to)&&i>=s.from&&i<=s.to||s.value===o)&&(a="[object Array]"===Object.prototype.toString.call(s.color)?(0,t.isNullOrUndefined)(s.value)?this.getColor(s,i):s.color[0]:s.color),(i>=s.from&&i<=s.to||s.value===o)&&!(0,t.isNullOrUndefined)(s.minOpacity)&&!(0,t.isNullOrUndefined)(s.maxOpacity)&&a&&(n=this.deSaturationColor(s,a,i,o)),(""===a||(0,t.isNullOrUndefined)(a))&&(0,t.isNullOrUndefined)(s.from)&&(0,t.isNullOrUndefined)(s.to)&&(0,t.isNullOrUndefined)(s.minOpacity)&&(0,t.isNullOrUndefined)(s.maxOpacity)&&(0,t.isNullOrUndefined)(s.value)&&(a="[object Array]"===Object.prototype.toString.call(s.color)?s.color[0]:s.color)}return{fill:a||(e.length?null:o),opacity:n}},e.prototype.deSaturationColor=function(e,t,i,o){var n=1;(i>=e.from&&i<=e.to||e.value===o)&&(n=(isNaN(i)?e.from/(e.to-e.from):(i-e.from)/(e.to-e.from))*(e.maxOpacity-e.minOpacity)+e.minOpacity);return n},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,o,n=t.from,a=t.to,l=0,r=a-n;if(l=(e-n)/r,t.color.length<=2)i="#"===t.color[0].charAt(0)?t.color[0]:this._colorNameToHex(t.color[0]),o="#"===t.color[t.color.length-1].charAt(0)?t.color[t.color.length-1]:this._colorNameToHex(t.color[t.color.length-1]);else{i="#"===t.color[0].charAt(0)?t.color[0]:this._colorNameToHex(t.color[0]),o="#"===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=r/(t.color.length-1),d=t.color.length-1,p=[],h={},m=1;m<d;m++)h={b:n+m*s,color:t.color[m]},p.push(h);for(var c=0;c<p.length;c++)n<=e&&e<=p[c].b&&0===c?(o="#"===p[c].color.charAt(0)?p[c].color:this._colorNameToHex(p[c].color),l=e<p[c].b?1-Math.abs((e-p[c].b)/s):(e-p[c].b)/s):p[c].b<=e&&e<=a&&c===p.length-1&&(i="#"===p[c].color.charAt(0)?p[c].color:this._colorNameToHex(p[c].color),l=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&&(i="#"===p[c].color.charAt(0)?p[c].color:this._colorNameToHex(p[c].color),o="#"===p[c+1].color.charAt(0)?p[c+1].color:this._colorNameToHex(p[c+1].color),l=Math.abs(e-p[c+1].b)/s)}return this.getPercentageColor(l,i,o)},e.prototype.getPercentageColor=function(e,t,i){var o=i.split("#")[1],n=t.split("#")[1],a=this.getPercentage(e,parseInt(n.substr(0,2),16),parseInt(o.substr(0,2),16)),l=this.getPercentage(e,parseInt(n.substr(2,2),16),parseInt(o.substr(2,2),16)),r=this.getPercentage(e,parseInt(n.substr(4,2),16),parseInt(o.substr(4,2),16));return new N(a,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}(),to=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,n=Re(this.mapObject.element.id+"_Secondary_Element");if(this.mapObject.isTileMap&&n){this.tileSvgObject=this.mapObject.renderer.createSvg({id:this.mapObject.element.id+"_Tile_SVG",width:o.width,height:o.height});var a=(0,t.createElement)("div",{id:this.mapObject.element.id+"_Tile_SVG_Parent"});a.style.cssText="position: absolute; height: "+o.height+"px; width: "+o.width+"px;",a.appendChild(this.tileSvgObject),n.appendChild(a)}this.layerGroup=this.mapObject.renderer.createGroup({id:this.mapObject.element.id+"_Layer_Collections","clip-path":"url(#"+this.mapObject.element.id+"_MapArea_ClipRect)"}),this.clipRectElement=this.mapObject.renderer.drawClipPath(new E(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)})),(0,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,n){e.currentFactor=e.calculateFactor(i),e.mapObject.defaultState=!(1!==e.mapObject.zoomSettings.zoomFactor&&!(0,t.isNullOrUndefined)(e.mapObject.tileZoomLevel)&&1!==e.mapObject.tileZoomLevel),(0,t.isNullOrUndefined)(e.mapObject.previousCenterLatitude)&&(0,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 a=new _(e.mapObject.centerPosition.longitude,e.mapObject.centerPosition.latitude),l=a;this.mapObject.isTileMap&&e.mapObject.markerModule&&e.mapObject.zoomSettings.enable&&(e.mapObject.markerModule.calculateZoomCenterPositionAndFactor(this.mapObject.layersCollection),(0,t.isNullOrUndefined)(this.mapObject.markerCenterLatitude)||(0,t.isNullOrUndefined)(this.mapObject.markerCenterLongitude)||e.mapObject.isZoomByPosition||(l=new _(e.mapObject.markerCenterLongitude,e.mapObject.markerCenterLatitude))),a=!e.mapObject.zoomSettings.shouldZoomInitially&&e.mapObject.centerPosition.longitude&&e.mapObject.centerPosition.latitude&&!e.mapObject.zoomPersistence&&e.mapObject.defaultState?new _(e.mapObject.centerPosition.longitude,e.mapObject.centerPosition.latitude):e.mapObject.zoomSettings.shouldZoomInitially&&e.mapObject.markerZoomedState&&!e.mapObject.zoomPersistence&&!(0,t.isNullOrUndefined)(e.mapObject.markerZoomCenterPoint)?new _(e.mapObject.markerZoomCenterPoint.longitude,e.mapObject.markerZoomCenterPoint.latitude):{x:null,y:null};var r=e.mapObject.zoomSettings.shouldZoomInitially&&!e.mapObject.isZoomByPosition?(0,t.isNullOrUndefined)(e.mapObject.markerZoomFactor)?1:e.mapObject.markerZoomFactor:e.mapObject.zoomSettings.zoomFactor;if(r=e.mapObject.enablePersistence?(0,t.isNullOrUndefined)(e.mapObject.mapScaleValue)?(0,t.isNullOrUndefined)(e.mapObject.markerZoomFactor)?e.mapObject.zoomSettings.zoomFactor:e.mapObject.markerZoomFactor:e.mapObject.mapScaleValue:r,r=(r=e.mapObject.zoomSettings.enable?r:e.mapObject.zoomSettings.zoomFactor)>0?r:1,e.mapObject.defaultState=1===r,!e.mapObject.markerZoomedState&&e.mapObject.zoomSettings.shouldZoomInitially&&1===e.mapObject.zoomSettings.zoomFactor&&(e.mapObject.defaultState=!0),(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,!(0,t.isNullOrUndefined)(e.mapObject.tileTranslatePoint)&&(e.mapObject.markerZoomFactor!==e.mapObject.mapScaleValue||(0,t.isNullOrUndefined)(e.mapObject.markerZoomFactor)&&(0,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,(0,t.isNullOrUndefined)(e.mapObject.tileTranslatePoint)||(e.mapObject.tileTranslatePoint.x=0,e.mapObject.tileTranslatePoint.y=0));if(r<=1&&!(0,t.isNullOrUndefined)(e.mapObject.height)&&!e.mapObject.zoomSettings.shouldZoomInitially&&e.mapObject.tileZoomLevel===e.mapObject.tileZoomScale&&this.mapObject.initialCheck&&Ze(this.mapObject),(0,t.isNullOrUndefined)(e.mapObject.centerLatOfGivenLocation)||(0,t.isNullOrUndefined)(e.mapObject.centerLongOfGivenLocation)||!e.mapObject.zoomNotApplied||((0,t.isNullOrUndefined)(l)||(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&&!(0,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=256*Math.pow(2,this.mapObject.initialZoomLevel);(0,t.isNullOrUndefined)(this.mapObject.initialTileTranslate)||(this.mapObject.initialTileTranslate.x=this.mapObject.availableSize.width/2-d/2,this.mapObject.initialTileTranslate.y=this.mapObject.availableSize.height/2-d/2+20)}if(e.generateTiles(e.mapObject.tileZoomLevel,e.mapObject.tileTranslatePoint,null,n),(0,t.isNullOrUndefined)(e.mapObject.previousZoomFactor)||e.mapObject.previousZoomFactor===e.mapObject.zoomSettings.zoomFactor||(e.mapObject.previousZoomFactor=e.mapObject.zoomSettings.zoomFactor),e.mapObject.polygonModule){var p=e.mapObject.polygonModule.polygonRender(this.mapObject,o,e.mapObject.tileZoomLevel);(0,t.isNullOrUndefined)(p)||e.layerObject.appendChild(p)}if(e.mapObject.navigationLineModule){var h=e.mapObject.navigationLineModule.renderNavigation(e.currentLayer,e.mapObject.tileZoomLevel,o);(0,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),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 n=this.mapObject.getModuleName()+this.mapObject.element.id;if(-1===navigator.userAgent.indexOf("Edge")){var a=void 0;try{a=window.localStorage}catch(e){a=null}!(0,t.isNullOrUndefined)(a)&&window.localStorage.getItem(n)&&window.localStorage.removeItem(n)}}var l={cancel:!1,name:Pi,index:i,layer:e,maps:this.mapObject,visible:e.visible};this.mapObject.trigger("layerRendering",l,(function(n){if(!l.cancel&&l.visible)if((0,t.isNullOrUndefined)(e.shapeData)&&!(0,t.isNullOrUndefined)(e.urlTemplate)&&""!==e.urlTemplate)if(!(0,t.isNullOrUndefined)(e.urlTemplate)&&e.urlTemplate.indexOf("quadkey")>-1){var a=new $i(o.mapObject);o.bingMapCalculation(e,i,o,a)}else o.renderTileLayer(o,e,i);else if(!((0,t.isNullOrUndefined)(e.shapeData)||(0,t.isNullOrUndefined)(e.shapeData.geometries)&&(0,t.isNullOrUndefined)(e.shapeData.features))){var r=!(0,t.isNullOrUndefined)(e.shapeData.geometries)&&e.shapeData.geometries.length>0?e.shapeData.geometries:e.shapeData.features;e.layerData=[];var s=e.shapeData.bbox;!(0,t.isNullOrUndefined)(s)&&e.isBaseLayer?o.mapObject.baseMapBounds=new w({min:s[0][1],max:s[1][1]},{min:s[0][0],max:s[1][0]}):(0,t.isNullOrUndefined)(o.mapObject.baseMapBounds)&&!Ne(r)&&o.calculateRectBounds(r),o.calculatePathCollection(i,r)}})),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,!1,!0)},e.prototype.bubbleCalculation=function(e,i){if(null!=e.dataSource&&null!=e)for(var o=e.dataSource,n=0;n<o.length;n++){var a=(0,t.isNullOrUndefined)(e.valuePath)?parseFloat(e.dataSource[n][e.valuePath]):e.valuePath.indexOf(".")>-1?Number(Y(e.dataSource[n],e.valuePath)):parseFloat(e.dataSource[n][e.valuePath]);isNaN(a)||(0!==n?a>i.max?i.max=a:a<i.min&&(i.min=a):i.max=i.min=a)}},e.prototype.calculatePathCollection=function(e,i){var o=this;this.groupElements=[],Ne(i)||(this.currentFactor=this.calculateFactor(this.currentLayer)),this.rectBounds=null;var n=this.currentLayer.shapeSettings;Array.prototype.forEach.call(i,(function(e){if(!(0,t.isNullOrUndefined)(e.geometry)||!(0,t.isNullOrUndefined)(e.coordinates)){var i=(0,t.isNullOrUndefined)(e.geometry)?e.type:e.geometry.type,n=(0,t.isNullOrUndefined)(e.geometry)?e.coordinates:e.geometry.coordinates,a=e.geometry,l=e.properties;o.generatePoints(i,n,a,l)}})),this.currentLayer.rectBounds=this.rectBounds,(0,t.isNullOrUndefined)(this.mapObject.baseMapRectBounds)&&this.currentLayer.isBaseLayer&&(this.mapObject.baseMapRectBounds=this.rectBounds);var a=!(0,t.isNullOrUndefined)(n.palette)&&n.palette.length>1?n.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"tailwind3":t=["#2F4074","#03B4B4","#0D72DE","#FF5733","#D63384","#F39C12","#EF291F","#91C822"];break;case"tailwind3dark":t=["#8029F1","#1ABC9C","#0D72DE","#FF5733","#D63384","#F39C12","#EF291F","#91C822"];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;case"fluent2":t=["#6200EE","#09AF74","#0076E5","#CB3587","#E7910F","#0364DE","#66CD15","#F3A93C","#107C10","#C19C00"];break;case"fluent2dark":case"fluent2highcontrast":t=["#9BB449","#2A72D5","#43B786","#3F579A","#584EC6","#E85F9C","#6E7A89","#EA6266","#0B6A0B","#C19C00"];break;case"bootstrap5":case"bootstrap5dark":t=["#6610F2","#6f42C1","#D63384","#DC3545","#FD7E14","#FFC107","#198754","#0DCAF0"];break;default:t=["#B5E485","#7BC1E8","#DF819C","#EC9B79","#78D0D3","#D6D572","#9178E3","#A1E5B4","#87A4B4","#E4C16C"]}return t}(this.mapObject.theme),l=(0,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:n.border.color||s.mapObject.themeStyle.shapeBorderColor,width:n.border.width,opacity:n.border.opacity},u=s.currentLayer.layerData[r],g="",y=n.autofill?a[r%a.length]:n.fill||s.mapObject.themeStyle.shapeFill;null===n.colorValuePath||(0,t.isNullOrUndefined)(u.property)||(null!==(m=we(s.currentLayer.dataSource,u.property,s.currentLayer.shapeDataPath,s.currentLayer.shapePropertyPath,s.currentLayer))&&0===n.colorMapping.length?y=s.currentLayer.shapeSettings.colorValuePath.indexOf(".")>-1?Y(s.currentLayer.dataSource[m],n.colorValuePath):s.currentLayer.dataSource[m][n.colorValuePath]:u.property[n.colorValuePath]&&0===s.currentLayer.dataSource.length&&0===n.colorMapping.length&&(y=s.currentLayer.shapeSettings.colorValuePath.indexOf(".")>-1?Y(u.property,n.colorValuePath):u.property[n.colorValuePath]),y=(0,t.isNullOrUndefined)(y)?n.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)||(0,t.isNullOrUndefined)(b.fill)?y:b.fill,(s.currentLayer.shapeSettings.borderColorValuePath||s.currentLayer.shapeSettings.borderWidthValuePath)&&null!==(m=we(s.currentLayer.dataSource,u.property,s.currentLayer.shapeDataPath,s.currentLayer.shapePropertyPath,s.currentLayer))&&(s.currentLayer.dataSource[m][n.borderColorValuePath]&&(c.color=s.currentLayer.dataSource[m][n.borderColorValuePath]),s.currentLayer.dataSource[m][n.borderWidthValuePath]&&(c.width=s.currentLayer.dataSource[m][n.borderWidthValuePath]));var v="[object Object]"!==Object.prototype.toString.call(b)||(0,t.isNullOrUndefined)(b.opacity)?n.opacity:b.opacity,S={cancel:!1,name:wi,index:r,data:s.currentLayer.dataSource?s.currentLayer.dataSource[m]:null,maps:s.mapObject,shape:n,fill:y,border:{width:c.width,color:c.color,opacity:c.opacity}},x=function(s){var m,b=(0,t.isNullOrUndefined)(u._isMultiPolygon)?(0,t.isNullOrUndefined)(u.type)?u[0].type:u.type:"MultiPolygon";if(b="Polygon"===b||"MultiPolygon"===b?"Polygon":b,s.cancel?(s.fill=y,s.border.color=n.border.color||o.mapObject.themeStyle.shapeBorderColor,s.border.width=n.border.width):(s.fill="#A6A6A6"===s.fill?s.shape.fill||o.mapObject.themeStyle.shapeFill:s.fill,s.border.color="transparent"===s.border.color?s.shape.border.color:s.border.color,s.border.width=0===s.border.width?s.shape.border.width:s.border.width,(0,t.isNullOrUndefined)(n.borderColorValuePath)&&(c.color=s.border.color),(0,t.isNullOrUndefined)(n.borderWidthValuePath)&&(c.width=s.border.width)),s.border.opacity=(0,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+"_"+b+"_Group",transform:""}),o.groupElements.push(h);else for(var S=0;S<o.groupElements.length;S++){var x=o.groupElements[S];if(x.id.indexOf(b)>-1){h=x;break}if(S>=o.groupElements.length-1){h=o.mapObject.renderer.createGroup({id:o.mapObject.element.id+"_LayerIndex_"+e+"_"+b+"_Group"}),o.groupElements.push(h);break}}switch(b){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 k(f,s.fill,s.border.width,s.border.color,v,s.border.opacity,n.dashArray,g),m=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 k(f,"transparent",(0,t.isNullOrUndefined)(s.border.width)?1:s.border.width,(0,t.isNullOrUndefined)(s.fill)?s.border.color:s.fill,v,s.border.opacity,n.dashArray,g),m=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 k(f,"transparent",(0,t.isNullOrUndefined)(s.border.width)?1:s.border.width,(0,t.isNullOrUndefined)(s.fill)?s.border.color:s.fill,v,s.border.opacity,n.dashArray,g),m=o.mapObject.renderer.drawPath(d));break;case"Point":var C=u.point,O="SubLayer"!==o.mapObject.layers[e].type?n.circleRadius:n.circleRadius/(o.mapObject.isTileMap?o.mapObject.scale:o.currentFactor);p=new z(f,s.fill,s.border,v,C.x,C.y,O,n.dashArray),m=o.mapObject.renderer.drawCircle(p);break;case"MultiPoint":u.map((function(t,i){var a=t.point,l="SubLayer"!==o.mapObject.layers[e].type?n.circleRadius:n.circleRadius/(o.mapObject.isTileMap?o.mapObject.scale:o.currentFactor);p=new z(f+"_multiLine_"+i,s.fill,s.border,v,a.x,a.y,l,n.dashArray),m=o.mapObject.renderer.drawCircle(p),o.pathAttributeCalculate(h,m,b,u)}));break;case"Path":g=u.point,d=new k(f,s.fill,s.border.width,s.border.color,v,s.border.opacity,n.dashArray,g),m=o.mapObject.renderer.drawPath(d)}(0,t.isNullOrUndefined)(m)||"MultiPoint"===b||o.pathAttributeCalculate(h,m,b,u),r===o.currentLayer.layerData.length-1&&o.layerFeatures(e,a,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,a,i,l)},e.prototype.pathAttributeCalculate=function(e,i,o,n){for(var a,l="[object Array]"===Object.prototype.toString.call(this.currentLayer.shapePropertyPath)?this.currentLayer.shapePropertyPath:[this.currentLayer.shapePropertyPath],r=0;r<l.length;r++)if(!(0,t.isNullOrUndefined)(n.property)){a=l[r];break}i.setAttribute("aria-label",(0,t.isNullOrUndefined)(n.property)?"":n.property[a]),this.currentLayer.selectionSettings.enable||this.currentLayer.highlightSettings.enable?(i.tabIndex=this.mapObject.tabIndex,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"),se(this.mapObject.selectedElementId,this.mapObject.shapeSelectionClass,i,"ShapeselectionMapStyle"),this.mapObject.legendSettings.toggleLegendSettings.enable&&"Layers"===this.mapObject.legendSettings.type&&de(this.mapObject.toggledElementId,i,this.mapObject.legendSettings.toggleLegendSettings.applyShapeSettings?this.currentLayer.shapeSettings:this.mapObject.legendSettings.toggleLegendSettings),e.appendChild(i)},e.prototype.layerFeatures=function(e,i,o,n){var a,l=this;if(this.mapObject.polygonModule&&this.groupElements.push(this.mapObject.polygonModule.polygonRender(this.mapObject,e,this.mapObject.isTileMap?Math.floor(this.currentFactor):this.currentFactor)),this.currentLayer.bubbleSettings.length&&this.mapObject.bubbleModule)for(var r,s=this.currentLayer.bubbleSettings.length,d=function(o){r=p.currentLayer.bubbleSettings[o],a=p.mapObject.renderer.createGroup({id:p.mapObject.element.id+"_LayerIndex_"+e+"_bubble_Group_"+o});var n={min:0,max:0};p.bubbleCalculation(r,n);var s=r.dataSource;p.mapObject.bubbleModule.bubbleCollection=[],!(0,t.isNullOrUndefined)(s)&&s.length>0&&(s.map((function(t,s){l.renderBubble(l.currentLayer,t,i[s%i.length],n,o,s,a,e,r)})),p.groupElements.push(a))},p=this,h=0;h<s;h++)d(h);this.mapObject.markerModule&&!this.mapObject.isTileMap&&this.mapObject.zoomSettings.enable&&this.mapObject.markerModule.calculateZoomCenterPositionAndFactor(this.mapObject.layersCollection);var m=this.mapObject.renderer.createGroup({id:this.mapObject.element.id+"_LayerIndex_"+e+"_dataLableIndex_Group"});if(m.style.pointerEvents="none",this.mapObject.dataLabelModule&&this.currentLayer.dataLabelSettings.visible){var c=[];Array.prototype.forEach.call(o,(function(t,i){l.renderLabel(l.currentLayer,e,t,m,i,n,c)})),this.groupElements.push(m)}this.mapObject.navigationLineModule&&this.groupElements.push(this.mapObject.navigationLineModule.renderNavigation(this.currentLayer,this.currentFactor,e)),(0,t.isNullOrUndefined)(this.groupElements)||(0,t.isNullOrUndefined)(this.layerObject)||this.groupElements.map((function(e){(0,t.isNullOrUndefined)(e)||l.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),this.layerGroup.appendChild(this.layerObject)},e.prototype.renderLabel=function(e,t,i,o,n,a,l){this.mapObject.dataLabelModule.renderLabel(e,t,i,e.layerData,o,a,n,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,n,a,l,r,s,d){if((0,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_"+a+"_dataIndex_"+l,this.mapObject.bubbleModule.renderBubble(d,i,o,n,a,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&&(0,t.isNullOrUndefined)(e.dataSource))return o;var n=we(e.dataSource,i,e.shapeDataPath,e.shapePropertyPath),a=new eo(this.mapObject);return(0,t.isNullOrUndefined)(e.dataSource)||(0,t.isNullOrUndefined)(e.dataSource[n])?o:a.getShapeColorMapping(e.shapeSettings,e.dataSource[n],o)},e.prototype.generatePoints=function(e,i,o,n){var a,l,r=this,s=[];switch(e.toLowerCase()){case"polygon":(s=this.calculatePolygonBox(i[0])).length>0&&(s.property=n,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 h=0;h<i[p].length;h++)(s=this.calculatePolygonBox(i[p][h])).length>0&&d.push(s);d.property=n,d.type=e,d._isMultiPolygon=!0,this.currentLayer.layerData.push(d);break;case"linestring":var m=(0,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){a=e[1],l=e[0];var t=c(a,l,r.currentFactor,r.currentLayer,r.mapObject);r.calculateBox(t,m),s.push({point:t,lat:a,lng:l})})),s.property=n,s.type=e,this.currentLayer.layerData.push(s);break;case"multilinestring":var u=(0,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){a=e[1],l=e[0];var t=c(a,l,r.currentFactor,r.currentLayer,r.mapObject);r.calculateBox(t,u),s.push({point:t,lat:a,lng:l})})),g.push(s)})),g.property=n,g.type=e,this.currentLayer.layerData.push(g);break;case"point":var y=((0,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;a=i[1],l=i[0];var f=c(a,l,this.currentFactor,this.currentLayer,this.mapObject);this.calculateBox(f,y),this.currentLayer.layerData.push({point:f,type:e,lat:a,lng:l,property:n});break;case"multipoint":var b=((0,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){a=e[1],l=e[0];var t=c(a,l,r.currentFactor,r.currentLayer,r.mapObject);r.calculateBox(t,b),s.push({point:t,lat:a,lng:l})})),s.property=n,s.type=e,this.currentLayer.layerData.push(s);break;case"path":this.currentLayer.layerData.push({point:o.d,type:e,property:n})}},e.prototype.calculateBox=function(e,i){(0,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,l=this.mapObject.baseMapBounds,r=new n(this.mapObject.mapAreaRect.width,this.mapObject.mapAreaRect.height-5);if(l){var s=c(l.latitude.min,l.longitude.min,null,e,this.mapObject),d=c(l.latitude.max,l.longitude.max,null,e,this.mapObject);i=d.y-s.y,o=d.x-s.x,0!==i&&0!==o||(o=r.width/2,i=r.height)}else i=o=500;return t=i<r.height?parseFloat(Math.abs(100*Number(r.height/Number(i.toString()+"e+1"))).toString().split(".")[0])/10:r.height/i,a=o<r.width?parseFloat(Math.abs(100*Number(r.width/Number(o.toString()+"e+1"))).toString().split(".")[0])/10:r.width/o,Math.min(a,t)},e.prototype.translateLayerElements=function(e){var i;if(this.mapObject.translateType="layer",(0,t.isNullOrUndefined)(this.mapObject.baseMapRectBounds)){if(this.mapObject.isTileMap&&!(0,t.isNullOrUndefined)(this.mapObject.scale))for(var o=0;o<e.childElementCount;o++)if(!((i=e.childNodes[o]).id.indexOf("_Markers_Group")>-1||i.id.indexOf("_bubble_Group")>-1||i.id.indexOf("_dataLableIndex_Group")>-1||i.id.indexOf("_line_Group")>-1)&&-1===i.id.indexOf("_Polygons_Group")){p="scale( "+this.mapObject.scale+" ) translate( "+this.mapObject.translatePoint.x+" "+this.mapObject.translatePoint.y+" ) ";i.setAttribute("transform",p)}}else{var n="Disable"===t.animationMode?0:0===this.currentLayer.animationDuration&&"Enable"===t.animationMode?1e3:this.currentLayer.animationDuration,a=0!==n||(0,t.isNullOrUndefined)(this.mapObject.zoomModule);this.mapObject.baseTranslatePoint=this.mapObject.zoomTranslatePoint;var l=void 0;l=this.mapObject.zoomSettings.zoomFactor>1&&!(0,t.isNullOrUndefined)(this.mapObject.zoomModule)?je(this.mapObject,this.currentLayer,a):Ue(this.mapObject,this.currentLayer,a);var r=this.mapObject.previousScale=l.scale,s=this.mapObject.previousPoint=l.location;this.mapObject.baseTranslatePoint=this.mapObject.translatePoint=s,this.mapObject.baseScale=this.mapObject.scale=r;for(var d=0;d<e.childElementCount;d++)if(!((i=e.childNodes[d]).id.indexOf("_Markers_Group")>-1||i.id.indexOf("_bubble_Group")>-1||i.id.indexOf("_dataLableIndex_Group")>-1)){var p="scale( "+r+" ) translate( "+s.x+" "+s.y+" ) ";i.setAttribute("transform",p),n>0&&!(0,t.isNullOrUndefined)(this.mapObject.zoomModule)&&(l=this.mapObject.zoomSettings.zoomFactor>1?je(this.mapObject,this.currentLayer):Ue(this.mapObject,this.currentLayer),this.mapObject.scale=l.scale,this.mapObject.zoomTranslatePoint=this.mapObject.translatePoint=l.location)}}},e.prototype.calculateRectBounds=function(e){var i=this;Array.prototype.forEach.call(e,(function(e){if(!(0,t.isNullOrUndefined)(e.geometry)||!(0,t.isNullOrUndefined)(e.coordinates)){var o=(0,t.isNullOrUndefined)(e.geometry)?e.type:e.geometry.type,n=(0,t.isNullOrUndefined)(e.geometry)?e.coordinates:e.geometry.coordinates;switch(o.toLowerCase()){case"polygon":i.calculateRectBox(n[0]);break;case"multipolygon":n.map((function(e){i.calculateRectBox(e[0])}));break;case"multilinestring":n.map((function(e){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){var i=this,o=[],n=this.mapObject.baseMapBounds;return e.map((function(e){var a=e[1],l=e[0];if(l>=n.longitude.min&&l<=n.longitude.max&&a>=n.latitude.min&&a<=n.latitude.max){var r=c(a,l,i.currentFactor,i.currentLayer,i.mapObject);(0,t.isNullOrUndefined)(i.rectBounds)?i.rectBounds={min:{x:r.x,y:r.y},max:{x:r.x,y:r.y}}:(i.rectBounds.min.x=Math.min(i.rectBounds.min.x,r.x),i.rectBounds.min.y=Math.min(i.rectBounds.min.y,r.y),i.rectBounds.max.x=Math.max(i.rectBounds.max.x,r.x),i.rectBounds.max.y=Math.max(i.rectBounds.max.y,r.y)),o.push({point:r,lat:a,lng:l})}})),o},e.prototype.calculateRectBox=function(e,i,o){var n=this;"linestring"!==i&&"multilinestring"!==i&&"point"!==i&&"multipoint"!==i?Array.prototype.forEach.call(e,(function(e){(0,t.isNullOrUndefined)(n.mapObject.baseMapBounds)?n.mapObject.baseMapBounds=new w({min:e[1],max:e[1]},{min:e[0],max:e[0]}):(n.mapObject.baseMapBounds.latitude.min=Math.min(n.mapObject.baseMapBounds.latitude.min,e[1]),n.mapObject.baseMapBounds.latitude.max=Math.max(n.mapObject.baseMapBounds.latitude.max,e[1]),n.mapObject.baseMapBounds.longitude.min=Math.min(n.mapObject.baseMapBounds.longitude.min,e[0]),n.mapObject.baseMapBounds.longitude.max=Math.max(n.mapObject.baseMapBounds.longitude.max,e[0]))})):(o||"point"===i)&&(0,t.isNullOrUndefined)(this.mapObject.baseMapBounds)?this.mapObject.baseMapBounds=new w({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,n,a){var l,r,s=this.mapObject.locale,d=this.mapObject.availableSize;this.tiles=[],l=r=Math.pow(2,e);var p=0,h=0;i.x+256*l<d.width&&(p=i.x>0?Math.ceil(i.x/256):0,h=i.x+256*l<d.width?Math.ceil((d.width-(i.x+256*l))/256):0),l+=p+h,"Pan"===o?(l=this.horizontalPanXCount>=l?this.horizontalPanXCount:l,this.horizontalPan=!1):(this.horizontalPanXCount=l,this.horizontalPan=!0);var m=this.mapObject.layers[this.mapObject.baseLayerIndex];this.urlTemplate=m.urlTemplate;var c=Math.min(r,(-i.y+d.height)/256+1),u=Math.min(l,(-i.x+d.width+256*h)/256+1),g=-(i.x+256*p+256)/256,y=-(i.y+256)/256;n=n||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<=d.width&&S>-256&&S<d.height&&b>=0){var x=f;f<0&&(x=x%r+r);var C=new mi(x%r,b);C.left=Math.round(v),C.top=Math.round(S),n&&!(0,t.isNullOrUndefined)(m.urlTemplate)&&""!==m.urlTemplate&&m.urlTemplate.indexOf("quadkey")>-1?C.src=n.getBingMap(C,"","",s,n.imageUrl,n.subDomains):(n=null,C.src=this.urlTemplate.replace("level",e.toString()).replace("tileX",C.x.toString()).replace("tileY",C.y.toString())),this.tiles.push(C)}}(0,t.isNullOrUndefined)(o)||(o.indexOf("wheel")>1?(this.animateToZoomX=this.mapObject.availableSize.width/2-a.x-10,this.animateToZoomY=-a.y):(this.animateToZoomX=-10,this.animateToZoomY=10-(this.mapObject.availableSize.height/2+11.5)));for(var O=(0,t.extend)([],this.tiles,[],!0),_=0,M=this.mapObject.layers;_<M.length;_++){var L=M[_];if("SubLayer"===L.type&&L.visible&&((0,t.isNullOrUndefined)(L.shapeData)&&!(0,t.isNullOrUndefined)(L.urlTemplate)&&""!==L.urlTemplate))for(var P=0,w=O;P<w.length;P++){var T=w[P],F=(0,t.extend)({},T,{},!0);L.urlTemplate.indexOf("quadkey")?(n=new $i(this.mapObject),F.src=n.getBingMap(F,"","",s,n.imageUrl,n.subDomains)):F.src=L.urlTemplate.replace("level",e.toString()).replace("tileX",T.x.toString()).replace("tileY",T.y.toString()),this.tiles.push(F)}}(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 n,a=this,l=document.getElementById(this.mapObject.element.id+"_tile_parent"),r=document.getElementById(this.mapObject.element.id+"_tiles");(0,t.isNullOrUndefined)(e)||"Pan"===e?n=0:(this.tileAnimation(e,i,o),n="Disable"===t.animationMode?0:0===this.mapObject.layersCollection[0].animationDuration&&"Enable"===t.animationMode?1e3:this.mapObject.layersCollection[0].animationDuration),setTimeout((function(){var i;l&&(l.style.zIndex="1"),r&&(r.style.zIndex="0"),!document.getElementById(a.mapObject.element.id+"_animated_tiles")&&l?(i=(0,t.createElement)("div",{id:a.mapObject.element.id+"_animated_tiles"}),l.appendChild(i)):"Pan"!==e&&r&&l?(r.appendChild(l.children[0]),a.mapObject.isAddLayer||(0,t.isNullOrUndefined)(document.getElementById(a.mapObject.element.id+"_animated_tiles"))||(document.getElementById(a.mapObject.element.id+"_animated_tiles").id=a.mapObject.element.id+"_animated_tiles_old"),i=(0,t.createElement)("div",{id:a.mapObject.element.id+"_animated_tiles"}),l.appendChild(i)):i=l?l.children[0]:null;for(var o=0;o<a.tiles.length;o++){var n=a.tiles[o],s=null,d=a.mapObject.element.id;if("Pan"===e){var p=document.getElementById(d+"_tile_"+o),h=!1;(0,t.isNullOrUndefined)(p)?(h=!0,p=(0,t.createElement)("div",{id:d+"_tile_"+o}),s=(0,t.createElement)("img")):(p.style.removeProperty("display"),s=p.children[0]),!h&&s&&s.src!==n.src&&(s.src=n.src),p.style.position="absolute",p.style.left=n.left+"px",p.style.top=n.top+"px",p.style.height=n.height+"px",p.style.width=n.width+"px",h&&(s.setAttribute("height","256px"),s.setAttribute("width","256px"),s.setAttribute("src",n.src),s.setAttribute("alt",a.mapObject.getLocalizedLabel("ImageNotFound")),s.style.setProperty("user-select","none"),p.appendChild(s),i.appendChild(p))}else{(s=(0,t.createElement)("img")).setAttribute("height","256px"),s.setAttribute("width","256px"),s.setAttribute("src",n.src),s.style.setProperty("user-select","none"),s.setAttribute("alt",a.mapObject.getLocalizedLabel("ImageNotFound")),(p=(0,t.createElement)("div",{id:d+"_tile_"+o})).style.position="absolute",p.style.left=n.left+"px",p.style.top=n.top+"px",p.style.height=n.height+"px",p.style.width=n.width+"px",p.appendChild(s),i&&i.appendChild(p)}o===a.tiles.length-1&&document.getElementById(a.mapObject.element.id+"_animated_tiles_old")&&Be(a.mapObject.element.id+"_animated_tiles_old")}if(!(0,t.isNullOrUndefined)(a.mapObject.currentTiles))for(var m=a.tiles.length;m<i.childElementCount;m++){for(var c=!1,u=0;u<a.mapObject.currentTiles.childElementCount;u++)c||a.mapObject.currentTiles.children[u].id!==i.children[m].id||(c=!0);c?i.children[m].style.display="none":i.removeChild(i.children[m])}}),n)},e.prototype.tileAnimation=function(e,i,o){var n=document.getElementById(this.mapObject.element.id+"_tile_parent"),a=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",n.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"}(0,t.isNullOrUndefined)(a)||(a.style.transition="Disable"===t.animationMode?"0ms":0===this.mapObject.layersCollection[0].animationDuration&&"Enable"===t.animationMode?"1000ms":this.mapObject.layersCollection[0].animationDuration+"ms",a.style.transform="translate("+i+"px, "+o+"px) scale("+r+")")},e.prototype.panTileMap=function(e,i,o){this.mapObject.tileZoomLevel<=this.mapObject.tileZoomScale&&this.mapObject.initialCheck&&(this.mapObject.tileZoomLevel=this.mapObject.tileZoomScale);var n,a,l=this.mapObject.tileZoomLevel,r=20,s=256*Math.pow(2,l),d=g(o,l,{x:n=e/2-s/2,y:a=i/2-s/2},this.isMapCoordinates);if(r=this.mapObject.zoomNotApplied?0:r,n-=d.x-e/2,a=a-(d.y-i/2)+r,this.mapObject.scale=Math.pow(2,l-1),((0,t.isNullOrUndefined)(this.mapObject.tileTranslatePoint)||0===this.mapObject.tileTranslatePoint.y&&0===this.mapObject.tileTranslatePoint.x||(0,t.isNullOrUndefined)(this.mapObject.previousTileWidth)||(0,t.isNullOrUndefined)(this.mapObject.previousTileHeight))&&(this.mapObject.previousTileWidth=e,this.mapObject.previousTileHeight=i),!(0,t.isNullOrUndefined)(this.mapObject.tileTranslatePoint)&&(0,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=n-(this.mapObject.previousTileWidth/2-s/2),h=a-(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(0,t.isNullOrUndefined)(this.mapObject.tileTranslatePoint)||this.mapObject.zoomNotApplied||(0===this.mapObject.tileTranslatePoint.x||this.mapObject.tileTranslatePoint.x===n||this.mapObject.centerPositionChanged||(n=this.mapObject.tileTranslatePoint.x),0===this.mapObject.tileTranslatePoint.y||this.mapObject.tileTranslatePoint.y===a||this.mapObject.centerPositionChanged||(a=this.mapObject.tileTranslatePoint.y)),this.mapObject.translatePoint=new _((n-.01*this.mapObject.zoomSettings.zoomFactor)/this.mapObject.scale,(a-.01*this.mapObject.zoomSettings.zoomFactor)/this.mapObject.scale),this.mapObject.previousTileWidth=e,this.mapObject.previousTileHeight=i,new _(n,a)},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,(0,t.isNullOrUndefined)(this.bing)||this.bing.destroy(),this.bing=null},e}(),io=function(){function e(e){this.map=e}return e.prototype.renderAnnotationElements=function(){var e=this,i=this.map.element.id+"_Secondary_Element",o=(0,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&&!(0,t.isNullOrUndefined)(Re(i))&&Re(i).appendChild(o),this.map.renderReactTemplates()},e.prototype.createAnnotationTemplate=function(e,i,o){var n,a,l,r,s=this,d=this.map,p=d.availableSize,h=(0,t.createElement)("div",{id:d.element.id+"_Annotation_"+o});h.style.cssText="position: absolute; z-index:"+i.zIndex+";";var m={cancel:!1,name:Gi,content:i.content,annotation:i};this.map.trigger(Gi,m,(function(e){if(!m.cancel)if((l=Ge(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,n=0;n<i;n++)h.appendChild(r[n]);else h.appendChild((0,t.createElement)("div",{innerHTML:m.content}))}));var c=dt(h.cloneNode(!0),d.element),u=d.element.getBoundingClientRect(),g=d.svgObject.getBoundingClientRect();n=Math.abs(g.left-u.left),a=Math.abs(g.top-u.top);var y=(0,t.isNullOrUndefined)(i.x)?"0%":i.x,f=(0,t.isNullOrUndefined)(i.y)?"0%":i.y,b=y.indexOf("%")>-1?p.width/100*parseFloat(y):parseFloat(y),v=f.indexOf("%")>-1?p.height/100*parseFloat(f):parseFloat(f);switch(n="None"===i.horizontalAlignment?n+b:n,a="None"===i.verticalAlignment?a+v:a,i.verticalAlignment){case"Near":a+=v;break;case"Center":a=a+v+(g.height/2-c.height/2);break;case"Far":a=a+g.height+v-c.height}switch(i.horizontalAlignment){case"Near":n+=b;break;case"Center":n=n+b+(g.width/2-c.width/2);break;case"Far":n=n+g.width+b-c.width}h.style.left=n+"px",h.style.top=a+"px",e.appendChild(h)},e.prototype.getModuleName=function(){return"Annotations"},e.prototype.destroy=function(){this.map=null},e}(),oo=l(74),no=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])},e(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)}}(),ao=function(e,t,i,o){var n,a=arguments.length,l=a<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--)(n=e[r])&&(l=(a<3?n(l):a>3?n(t,i,l):n(t,i))||l);return a>3&&l&&Object.defineProperty(t,i,l),l},lo=function(e){function o(i,o){var a=e.call(this,i,o)||this;return a.isTileMap=!1,a.isResize=!1,a.isReset=!1,a.baseSize=new n(0,0),a.translatePoint=new _(0,0),a.baseTranslatePoint=new _(0,0),a.zoomTranslatePoint=new _(0,0),a.markerZoomedState=!0,a.zoomPersistence=!1,a.defaultState=!0,a.centerPositionChanged=!1,a.markerNullCount=0,a.tileTranslatePoint=new _(0,0),a.baseTileTranslatePoint=new _(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.selectedPolygonElementId=[],a.selectedLegendElementId=[],a.legendSelectionCollection=[],a.shapeSelections=!0,a.legendSelection=!0,a.toggledLegendId=[],a.toggledElementId=[],a.checkInitialRender=!0,a.initialTileTranslate=new _(0,0),a.isMarkerZoomCompleted=!1,a.markerDragId="",a.initialCheck=!0,a.applyZoomReset=!1,a.markerClusterExpandCheck=!1,a.markerClusterExpand=!1,a.mouseMoveId="",a.shapeSelectionItem=[],a.markerDragArgument=null,(0,t.setValue)("mergePersistData",a.mergePersistMapsData,a),a}return no(o,e),Object.defineProperty(o.prototype,"isShapeSelected",{get:function(){return this.mapSelect},enumerable:!0,configurable:!0}),o.prototype.mergePersistMapsData=function(){var e,i;try{i=window.localStorage}catch(e){i=null}if((0,t.isNullOrUndefined)(i)||(e=window.localStorage.getItem(this.getModuleName()+this.element.id)),!(0,t.isNullOrUndefined)(e)&&""!==e){var o=JSON.parse(e),n=Object.keys(o);this.isProtectedOnChange=!0;for(var a=0,l=n;a<l.length;a++){var r=l[a];"object"!=typeof this[r]||(0,t.isNullOrUndefined)(this[r])?this[r]=o[r]:(0,t.extend)(this[r],o[r])}this.isProtectedOnChange=!1}},o.prototype.getLocalizedLabel=function(e){return this.localeObject.getConstant(e)},o.prototype.preRender=function(){this.isDevice=t.Browser.isDevice,this.initPrivateVariable(),this.allowServerDataBinding=!1,this.unWireEVents(),this.wireEVents(),this.setCulture()},o.prototype.renderElements=function(){this.isDestroyed||(this.trigger(ui,{maps:this}),this.createSVG(),this.findBaseAndSubLayers(),!(0,t.isNullOrUndefined)(this.markerModule)&&this.markerModule.getMapsInstance()&&this.markerModule.initializeMarkerClusterList(),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",legendFontSize:"12px",fontWeight:"Medium",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};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",legendFontSize:"12px",fontWeight:"Medium",labelFontFamily:"Roboto, Noto, Sans-serif",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};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",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};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",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};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",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};break;case"tailwind3":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#111827",subTitleFontColor:"#111827",legendTitleFontColor:"#111827",legendTextColor:"#6B7280",dataLabelFontColor:"#111827",tooltipFontColor:"#F9FAFB",tooltipFillColor:"#111827",zoomFillColor:"#374151",fontFamily:"Inter",fontSize:"12px",fontWeight:"400",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Inter",titleFontWeight:"500",zoomSelectionColor:"#6B7280",shapeFill:"#F3F4F6",shapeBorderColor:"#E5E7EB",rectangleZoomFillColor:"#818CF8",rectangleZoomFillOpacity:.3,rectangleZoomBorderColor:"#4F46E5",legendBorderColor:"#E5E7EB",legendBorderWidth:0,tooltipBorderColor:"#111827",zoomButtonRadius:32};break;case"tailwind3dark":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#FFFFFF",subTitleFontColor:"#FFFFFF",legendTitleFontColor:"#FFFFFF",legendTextColor:"#9CA3AF",dataLabelFontColor:"#FFFFFF",tooltipFontColor:"#1F2937",tooltipFillColor:"#F9FAFB",zoomFillColor:"#D1D5DB",fontFamily:"Inter",fontSize:"12px",fontWeight:"400",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Inter",titleFontWeight:"600",zoomSelectionColor:"#9CA3AF",shapeFill:"#282F3C",shapeBorderColor:"#282F3C",rectangleZoomFillColor:"#3730A3",rectangleZoomFillOpacity:.3,rectangleZoomBorderColor:"#6366F1",legendBorderColor:"#282F3C",legendBorderWidth:0,tooltipBorderColor:"#F9FAFB",zoomButtonRadius:30};break;case"bootstrap5":t={backgroundColor:"transparent",areaBackgroundColor:"transparent",titleFontColor:"#212529",subTitleFontColor:"#212529",legendTitleFontColor:"#212529",legendTextColor:"#212529",dataLabelFontColor:"#212529",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#000000",zoomFillColor:"#6E757D",fontFamily:"Segoe UI",fontSize:"10px",fontWeight:"400",titleFontSize:"14px",subTitleFontSize:"12px",legendFontSize:"10px",tooltipFillOpacity:.9,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"400",zoomSelectionColor:"#212529",zoomBorderColor:"#DEE2E6",shapeFill:"#E9ECEF",shapeBorderColor:"#DEE2E6",zoomButtonRadius:32,rectangleZoomBorderColor:"#0D6EFD",rectangleZoomFillColor:"#86B7FE",rectangleZoomFillOpacity:.3,legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent"};break;case"bootstrap5dark":t={backgroundColor:"transparent",areaBackgroundColor:"transparent",titleFontColor:"#DEE2E6",subTitleFontColor:"#DEE2E6",legendTitleFontColor:"#DEE2E6",legendTextColor:"#DEE2E6",dataLabelFontColor:"#DEE2E6",tooltipFontColor:"#212529",tooltipFillColor:"#FFFFFF",zoomFillColor:"#ADB5BD",fontFamily:"Segoe UI",fontSize:"10px",fontWeight:"400",titleFontSize:"14px",subTitleFontSize:"12px",legendFontSize:"10px",tooltipFillOpacity:.9,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"400",zoomSelectionColor:"#F8F9FA",zoomBorderColor:"#495057",shapeFill:"#343A40",shapeBorderColor:"#495057",zoomButtonRadius:32,rectangleZoomFillColor:"#86B7FE",rectangleZoomBorderColor:"#0D6EFD",rectangleZoomFillOpacity:.3,legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent"};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",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};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",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};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",shapeBorderColor:"#000000",rectangleZoomFillColor:"#6750A4",rectangleZoomFillOpacity:.24,rectangleZoomBorderColor:"#6750A4",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};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",shapeBorderColor:"#000000",rectangleZoomFillColor:"#D0BCFF",rectangleZoomFillOpacity:.24,rectangleZoomBorderColor:"#D0BCFF",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};break;case"fluent2":t={backgroundColor:"transparent",areaBackgroundColor:"transparent",titleFontColor:"#242424",subTitleFontColor:"#242424",legendTitleFontColor:"#242424",legendTextColor:"#242424",dataLabelFontColor:"#242424",tooltipFontColor:"#242424",tooltipFillColor:"#FFFFFF",zoomFillColor:"#D1D1D1",fontFamily:"Segoe UI",fontSize:"10px",fontWeight:"400",titleFontSize:"14px",subTitleFontSize:"12px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"600",zoomSelectionColor:"#242424",shapeFill:"#E6E6E6",shapeBorderColor:"#EBEBEB",rectangleZoomFillColor:"#B4D6FA",rectangleZoomFillOpacity:.25,rectangleZoomBorderColor:"#0F6CBD",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:32};break;case"fluent2dark":t={backgroundColor:"transparent",areaBackgroundColor:"transparent",titleFontColor:"#FFFFFF",subTitleFontColor:"#FFFFFF",legendTitleFontColor:"#FFFFFF",legendTextColor:"#FFFFFF",dataLabelFontColor:"#FFFFFF",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#292929",zoomFillColor:"#666",fontFamily:"Segoe UI",fontSize:"10px",fontWeight:"400",titleFontSize:"14px",subTitleFontSize:"12px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"600",zoomSelectionColor:"#FFFFFF",shapeFill:"#333333",shapeBorderColor:"#000000",rectangleZoomFillColor:"#0E4775",rectangleZoomFillOpacity:.25,rectangleZoomBorderColor:"#0E4775",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:32};break;case"fluent2highcontrast":t={backgroundColor:"transparent",areaBackgroundColor:"transparent",titleFontColor:"#FFFFFF",subTitleFontColor:"#FFFFFF",legendTitleFontColor:"#FFFFFF",legendTextColor:"#FFFFFF",dataLabelFontColor:"#FFFFFF",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#000000",zoomFillColor:"#3FF23F",fontFamily:"Segoe UI",fontSize:"10px",fontWeight:"400",titleFontSize:"14px",subTitleFontSize:"12px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"600",zoomSelectionColor:"#FFFFFF",zoomBorderColor:"#FFFFFF",shapeFill:"#FFFFFF",shapeBorderColor:"#FFFFFF",rectangleZoomFillColor:"#1AEBFF",rectangleZoomFillOpacity:.25,rectangleZoomBorderColor:"#1AEBFF",legendBorderColor:"#FFFFFF",legendBorderWidth:1,tooltipBorderColor:"#FFF",zoomButtonRadius:32};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",legendFontSize:"12px",fontWeight:"Medium",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30}}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)},o.prototype.render=function(){this.renderElements()},o.prototype.processRequestJsonData=function(){var e,i,o=this,n=this.layersCollection.length-1;this.serverProcess={request:0,response:0},Array.prototype.forEach.call(this.layersCollection,(function(a,l){a.shapeData instanceof oo.DataManager?(o.serverProcess.request++,i=a.shapeData,e=a.query instanceof oo.Query?a.query:new oo.Query,i.executeQuery(e).then((function(e){o.processResponseJsonData("DataManager",e,a,"ShapeData")}))):(a.shapeData instanceof Mt||a.shapeData)&&((0,t.isNullOrUndefined)(a.shapeData.dataOptions)||o.processAjaxRequest(a,a.shapeData,"ShapeData"));a.dataSource instanceof oo.DataManager&&(o.serverProcess.request++,i=a.dataSource,e=a.query instanceof oo.Query?a.query:new oo.Query,i.executeQuery(e).then((function(e){a.dataSource=Tt(e)})));if(a.markerSettings.length>0)for(var r=function(t){a.markerSettings[t].dataSource instanceof oo.DataManager&&(o.serverProcess.request++,i=a.markerSettings[t].dataSource,e=a.markerSettings[t].query instanceof oo.Query?a.markerSettings[t].query:new oo.Query,i.executeQuery(e).then((function(e){a.markerSettings[t].dataSource=Tt(e)})))},s=0;s<a.markerSettings.length;s++)r(s);if(a.bubbleSettings.length>0){var d=function(t){a.bubbleSettings[t].dataSource instanceof oo.DataManager&&(o.serverProcess.request++,i=a.bubbleSettings[t].dataSource,e=a.bubbleSettings[t].query instanceof oo.Query?a.bubbleSettings[t].query:new oo.Query,i.executeQuery(e).then((function(e){a.bubbleSettings[t].dataSource=Tt(e)})))};for(s=0;s<a.bubbleSettings.length;s++)d(s)}(a.dataSource instanceof Mt||!(0,t.isNullOrUndefined)(a.dataSource)&&!(0,t.isNullOrUndefined)(a.dataSource.dataOptions))&&o.processAjaxRequest(a,a.dataSource,"DataSource"),o.serverProcess.request===o.serverProcess.response&&n===l&&o.processResponseJsonData(null)}))},o.prototype.processAjaxRequest=function(e,i,o){var n=this;this.serverProcess.request++;var a=new t.Fetch(i.dataOptions,i.type,i.contentType);a.onSuccess=function(i){if((0,t.isNullOrUndefined)(i.type)||"application/octet-stream"!==i.type)n.processResponseJsonData("Fetch",i,e,o);else{var a=new FileReader,l=n;a.onload=function(){i=JSON.parse(a.result.toString()),l.processResponseJsonData("Fetch",i,e,o)},a.readAsText(i)}},a.send(i.sendData)},o.prototype.processResponseJsonData=function(e,i,o,n){if(this.serverProcess.response++,e&&("ShapeData"===n?o.shapeData="DataManager"===e?Tt(i):i:o.dataSource="DataManager"===e?Tt(i):i),(0,t.isNullOrUndefined)(e)||this.serverProcess.request!==this.serverProcess.response)(0,t.isNullOrUndefined)(e)&&this.renderMap();else{var a=this.layersCollection;this.layersCollection=[];for(var l=0;l<a.length;l++)a[l].isBaseLayer&&this.layersCollection.push(a[l]);for(var r=0;r<a.length;r++)a[r].isBaseLayer||this.layersCollection.push(a[r]);this.renderMap()}},o.prototype.renderMap=function(){this.legendModule&&this.legendSettings.visible&&this.legendModule.renderLegend(),this.createTile(),this.zoomSettings.enable&&this.zoomModule&&this.zoomModule.createZoomingToolbars(),(0,t.isNullOrUndefined)(this.dataLabelModule)||(this.dataLabelModule.dataLabelCollections=[]),this.mapLayerPanel.measureLayerPanel(),(0,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,n=0;n<this.layers[e].initialShapeSelection.length;n++)this.shapeSelection(e,o[n].shapePath,o[n].shapeValue,!0);this.layers[e].selectionSettings.enableMultiSelect=i,e===this.layers.length-1&&(this.checkInitialRender=!1)}if(!this.isResize)for(var a=0;a<this.layers[e].markerSettings.length;a++)if(this.layers[e].markerSettings[a].selectionSettings&&this.layers[e].markerSettings[a].selectionSettings.enable&&this.layers[e].markerSettings[a].initialMarkerSelection.length>0){var l=this.layers[e].markerSettings[a].initialMarkerSelection;for(n=0;n<l.length;n++)this.markerInitialSelection(e,a,this.layers[e].markerSettings[a],l[n].latitude,l[n].longitude)}}if(!(0,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;c=parseFloat(p.style.left);var u=s.bottom-m.bottom-d.offsetTop;r=parseFloat(p.style.top),r=u<=11?r:(0,t.isNullOrUndefined)(this.legendModule)||"Bottom"!==this.legendSettings.position?2*r:this.mapAreaRect.y,c=u<=11?c:(0,t.isNullOrUndefined)(this.legendModule)?2*c:c,p.style.top=r+"px",p.style.left=c+"px",h.style.top=r+"px",h.style.left=c+"px",!(0,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.triggerZoomEvent(),this.isResize=!1},o.prototype.triggerZoomEvent=function(){var e,t=this.getMinMaxLatitudeLongitude();e={maps:this,isResized:this.isResize,minLatitude:t.minLatitude,maxLatitude:t.maxLatitude,minLongitude:t.minLongitude,maxLongitude:t.maxLongitude,cancel:!1,name:"Loaded"},this.trigger("loaded",e)},o.prototype.markerSelection=function(e,t,i,o){var n={color:e.border.color,width:e.border.width/t.scale,opacity:e.border.opacity},a={opacity:e.opacity,fill:e.fill,border:n,target:i.id,cancel:!1,data:o,maps:t};He("MarkerselectionMap")?Ke("MarkerselectionMap","MarkerselectionMapStyle",a):document.body.appendChild(Qe("MarkerselectionMap","MarkerselectionMapStyle",a)),(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)))},o.prototype.markerInitialSelection=function(e,t,i,o,n){var a=i.selectionSettings;if(a.enable)for(var l=0;l<i.dataSource.length;l++){var r=i.dataSource[l];if(r.latitude===o&&r.longitude===n){var s=this.element.id+"_LayerIndex_"+e+"_MarkerIndex_"+t+"_dataIndex_"+l;this.markerSelection(a,this,He(s),r)}}},o.prototype.renderArea=function(){var e=this.mapsArea.border.width,i=this.mapsArea.background;if(e>0||i||this.themeStyle.areaBackgroundColor){var o={opacity:(0,t.isNullOrUndefined)(this.mapsArea.border.opacity)?1:this.mapsArea.border.opacity,color:this.mapsArea.border.color,width:this.mapsArea.border.width},n=new E(this.element.id+"_MapAreaBorder",i||this.themeStyle.areaBackgroundColor,o,1,this.mapAreaRect);this.svgObject.appendChild(this.renderer.drawRectangle(n))}},o.prototype.addTabIndex=function(){this.element.setAttribute("aria-label",this.description||"Maps Element"),this.element.setAttribute("role","region"),this.element.tabIndex=this.tabIndex},o.prototype.setSecondaryElementPosition=function(){var e=Re(this.element.id+"_Secondary_Element"),i=this.element.getBoundingClientRect(),o=Re(this.element.id+"_svg");if(!(0,t.isNullOrUndefined)(o)){var n=o.getBoundingClientRect();e.style.left=Math.max(n.left-i.left,0)+"px",e.style.top=Math.max(n.top-i.top,0)+"px"}},o.prototype.zoomingChange=function(){var e,i;if(Re(this.element.id+"_Layer_Collections")&&this.zoomModule&&(this.zoomModule.layerCollectionEle=Re(this.element.id+"_Layer_Collections")),this.isTileMap&&Re(this.element.id+"_Tile_SVG")&&Re(this.element.id+"_tile_parent")){var o=Re(this.element.id+"_tile_parent"),n=Re(this.element.id+"_Tile_SVG"),a=Re(this.element.id+"_Tile_SVG_Parent"),l=o.getBoundingClientRect(),r=n.getBoundingClientRect();e=l.left-r.left,i=l.top-r.top,a.style.left=e+"px",a.style.top=i+"px",!(0,t.isNullOrUndefined)(this.legendModule)&&this.legendModule.totalPages.length>0&&(o.style.width=n.style.width=this.legendModule.legendTotalRect.width.toString(),o.style.height=n.style.height=this.legendModule.legendTotalRect.height.toString(),a.style.width=this.legendModule.legendTotalRect.width+"px",a.style.height=this.legendModule.legendTotalRect.height+"px");var s=document.getElementsByClassName("template");if(!(0,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(!(0,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||pt(g,c,this.scale,this)}}this.zoomModule&&(this.previousScale!==this.scale||this.zoomNotApplied||this.isZoomByPosition)&&this.zoomModule.applyTransform(this,!1,!0)}},o.prototype.createSecondaryElement=function(){if((0,t.isNullOrUndefined)(document.getElementById(this.element.id+"_Secondary_Element"))){var e=(0,t.createElement)("div",{id:this.element.id+"_Secondary_Element"});e.style.cssText="position: relative;z-index:2;",this.element.appendChild(e)}},o.prototype.getMinMaxLatitudeLongitude=function(){var e=document.getElementById(this.element.id);if((0,t.isNullOrUndefined)(e))return{minLatitude:0,maxLatitude:0,minLongitude:0,maxLongitude:0};var i=e.getBoundingClientRect(),o=De(this.margin.left),n=this.isTileMap?this.pointToLatLong(this.mapAreaRect.x-o,-this.mapAreaRect.y):this.getGeoLocation(0,this.mapAreaRect.x+i.left,this.mapAreaRect.y),a=this.isTileMap?this.pointToLatLong(this.mapAreaRect.width,this.mapAreaRect.height-this.mapAreaRect.y):this.getGeoLocation(0,this.mapAreaRect.x+i.left+this.mapAreaRect.width,this.mapAreaRect.y+this.mapAreaRect.height);return{minLatitude:n.latitude,maxLatitude:a.latitude,minLongitude:n.longitude,maxLongitude:a.longitude}},o.prototype.arrangeTemplate=function(){var e=this;document.getElementById(this.element.id+"_Legend_Border")&&(document.getElementById(this.element.id+"_Legend_Border").style.pointerEvents="none");var i=document.getElementsByClassName(this.element.id+"_template");!(0,t.isNullOrUndefined)(i)&&i.length>0&&Re(this.element.id+"_Layer_Collections")&&!this.isTileMap&&Array.prototype.forEach.call(i,(function(i){var o=0,n=0;if(!(0,t.isNullOrUndefined)(i)&&i.childElementCount>0){var a=Re(e.element.id+"_Layer_Collections").getBoundingClientRect(),l=Re(i.id).getBoundingClientRect();-1===i.id.indexOf("Marker")&&(o=e.isTileMap?0:a.left<l.left?-Math.abs(l.left-a.left):Math.abs(l.left-a.left),n=e.isTileMap?0:a.top<l.top?-Math.abs(l.top-a.top):Math.abs(l.top-a.top)),Array.prototype.forEach.call(i.childNodes,(function(e){-1===e.id.indexOf("Marker")&&(e.style.left=parseFloat(e.style.left)+o+"px",e.style.top=parseFloat(e.style.top)+n+"px",e.style.transform="translate(-50%, -50%)")}))}}))},o.prototype.createTile=function(){var e=this.layersCollection[0];if(e.isBaseLayer&&!(0,t.isNullOrUndefined)(e.urlTemplate)&&""!==e.urlTemplate&&(0,t.isNullOrUndefined)(e.shapeData)){Be(this.element.id+"_tile_parent"),Be(this.element.id+"_tiles"),Be("animated_tiles");var i=(0,t.createElement)("div",{id:this.element.id+"_tile_parent"}),o=De(this.margin.right);i.style.cssText="position: absolute; left: "+this.mapAreaRect.x+"px; right: "+o+"px; top: "+(this.mapAreaRect.y+0)+"px; height: "+this.mapAreaRect.height+"px; width: "+this.mapAreaRect.width+"px; overflow: hidden;";var n=(0,t.createElement)("div",{id:this.element.id+"_tiles"});n.style.cssText="position: absolute; left: "+this.mapAreaRect.x+"px; right: "+o+"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(n)}},o.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 to(this)},o.prototype.findBaseAndSubLayers=function(){var e=this,i=this.baseLayerIndex,o=[],n=[];this.layersCollection=[],Array.prototype.forEach.call(this.layers,(function(e){"Layer"===e.type?o.push(e):n.push(e)}));for(var a=0;a<o.length;a++){var l=o[a];if(l.visible&&i===a){l.isBaseLayer=!0,this.isTileMap=!!(0,t.isNullOrUndefined)(l.shapeData),this.layersCollection.push(l);break}if(a===o.length-1){this.layersCollection.push(o[0]);break}}n.map((function(t){t.visible&&e.layersCollection.push(t)}))},o.prototype.renderBorder=function(){var e=this.border.width,i=this.svgObject.querySelector("#"+this.element.id+"_MapBorder");if((e>0||this.background||this.themeStyle.backgroundColor)&&(0,t.isNullOrUndefined)(i)){var o={opacity:(0,t.isNullOrUndefined)(this.border.opacity)?1:this.border.opacity,color:this.border.color,width:this.border.width},n=new E(this.element.id+"_MapBorder",this.background||this.themeStyle.backgroundColor,o,1,new R(e/2,e/2,this.availableSize.width-e,this.availableSize.height-e));this.svgObject.appendChild(this.renderer.drawRectangle(n))}else i.setAttribute("fill",this.background||this.themeStyle.backgroundColor)},o.prototype.renderTitle=function(e,i,o,n){var a,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=De(this.margin.top),s=De(this.margin.bottom),d=De(this.margin.left),p=De(this.margin.right),h=Math.abs(d+p-this.availableSize.width);if(l.fontFamily=(0,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||St.mapsSubTitleFont.size,e.text){(0,t.isNullOrUndefined)(n)&&(n=this.renderer.createGroup({id:this.element.id+"_Title_Group"}));var m=Ee(h,e.text,l),c=T(m,l),u=ze((0,t.isNullOrUndefined)(o)?new R(d,r,this.availableSize.width,this.availableSize.height):o,(0,t.isNullOrUndefined)(e.alignment)?"Center":e.alignment,c,i),g=new I(this.element.id+"_Map_"+i,u.x,u.y,"start",m),y=new R(u.x,u.y,c.width,c.height),f=V(g,l,l.color||("title"===i?this.themeStyle.titleFontColor:this.themeStyle.subTitleFontColor),n);f.setAttribute("aria-label",e.text),f.setAttribute("role","region"),("title"===i&&!e.subtitleSettings.text||"subtitle"===i)&&(a=Math.abs(y.y+s-this.availableSize.height),this.mapAreaRect=new R(d,y.y+10,h,a-10)),"subtitle"!==i&&e.subtitleSettings.text?this.renderTitle(e.subtitleSettings,"subtitle",y,n):this.svgObject.appendChild(n)}else a=Math.abs(r+s-this.availableSize.height),this.mapAreaRect=new R(d,r,h,a)},o.prototype.createSVG=function(){this.removeSvg(),d(this)},o.prototype.removeSvg=function(){if(Be(this.element.id+"_Secondary_Element"),Be(this.element.id+"_tile_parent"),Be(this.element.id+"_tiles"),this.svgObject){for(;this.svgObject.childNodes.length>0;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&(0,t.remove)(this.svgObject)}this.clearTemplate()},o.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)},o.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)},o.prototype.mouseLeaveOnMap=function(e){document.getElementsByClassName("highlightMapStyle").length>0&&this.legendModule&&(this.legendModule.removeShapeHighlightCollection(),et(document.getElementsByClassName("highlightMapStyle")[0]))},o.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):-1===t.indexOf("_LayerIndex_")&&-1===t.indexOf("shapeIndex")&&Xe("highlightMapStyle").length>0&&(et(Xe("highlightMapStyle")[0]),this.legendSettings.visible&&this.legendModule&&this.legendModule.removeShapeHighlightCollection())},o.prototype.keyboardHighlightSelection=function(e,i){var o=i.type,n=parseInt(e.split("_LayerIndex_")[1].split("_")[0],10),a=parseInt(e.split("_shapeIndex_")[1].split("_")[0],10),l=this.layers[n].shapeData.features.length>a?this.layers[n].shapeData.features[a].properties:null,r=parseInt(e.split("_dataIndex_")[1].split("_")[0],10),s=(0,t.isNullOrUndefined)(r)?null:this.layers[n].dataSource[r];this.layers[n].selectionSettings.enable&&"keydown"===o&&this.selectionModule?(this.selectionModule.selectionsettings=this.layers[n].selectionSettings,this.selectionModule.selectionType="Shape",this.selectionModule.selectElement(i.target,n,s,l)):this.highlightModule&&this.layers[n].highlightSettings.enable&&"keyup"===o&&!i.target.classList.contains("ShapeselectionMapStyle")&&(this.highlightModule.highlightSettings=this.layers[n].highlightSettings,this.highlightModule.handleHighlight(i.target,n,s,l))},o.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 n=document.getElementById(this.element.id+"_animated_tiles");this.isTileMap&&!(0,t.isNullOrUndefined)(n)&&(this.currentTiles=n.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.isPanModeEnabled=!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 a=document.getElementById(this.element.id+"_Paging_Text").textContent.split("/").map(Number);o.indexOf("_Left_Page_Rect")>-1?(1!==a[0]&&e.target.focus(),e.target.style.outlineColor=a[0]-1!==a[1]?"":"transparent"):o.indexOf("_Right_Page_Rect")>-1&&(a[0]!==a[1]&&e.target.focus(),e.target.style.outlineColor=a[0]!==a[1]+1?"":"transparent"),Ye(this.element.id+"_Legend_Border",this.element.id)&&(Ye(this.element.id+"_Legend_Border",this.element.id).style.pointerEvents="none")}o.indexOf("shapeIndex")>-1&&this.keyboardHighlightSelection(o,e)}this.zoomModule&&this.zoomModule.removeToolbarOpacity(this.isTileMap?Math.round(this.tileZoomLevel):this.mapScaleValue,this.mouseMoveId)},o.prototype.SelectedElement=function(e){var t=!1;return"ShapeselectionMapStyle"===e.getAttribute("class")&&(t=!0),t},o.prototype.mapsOnClick=function(e){var i=this,o=e.target,n=o.id,a=null,l=null;if(this.mouseClickEvent={x:e.x,y:e.y},-1===o.id.indexOf("_ToolBar")){var r=this.getClickLocation(n,e.pageX,e.pageY,o,e.layerX,e.layerY);(0,t.isNullOrUndefined)(r)||(a=r.latitude,l=r.longitude);var s={cancel:!1,name:yi,target:n,x:e.clientX,y:e.clientY,latitude:a,longitude:l,isShapeSelected:this.SelectedElement(o)};this.onclick?(s.name=fi,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,n),this.isDevice&&this.zoomModule.removeToolbarClass("","","","",""))},o.prototype.clickHandler=function(e,t,i){i.id.indexOf("shapeIndex")>-1&&(this.mergeCluster(),He(this.element.id+"_mapsTooltip")&&this.mapsTooltipModule.tooltipTargetID.indexOf("_MarkerIndex_")>-1&&Be(this.element.id+"_mapsTooltip")),this.markerModule&&this.markerModule.markerClusterClick(e),t.cancel||this.notify(yi,i),t.cancel||-1===i.id.indexOf("shapeIndex")||this.triggerShapeSelection(i)},o.prototype.triggerShapeSelection=function(e){var i=parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10),o=qe(e.id,this.layers[i].selectionSettings,this,Ci);o.cancel||!this.selectionModule||(0,t.isNullOrUndefined)(this.shapeSelected)?o.cancel&&this.selectionModule&&(0,t.isNullOrUndefined)(o.data)&&(et(e),this.selectionModule.removedSelectionList(e)):Ke(this.selectionModule.selectionType+"selectionMap",this.selectionModule.selectionType+"selectionMapStyle",o)},o.prototype.getMarkerClickLocation=function(e,t,i,o,n,a){document.getElementById(this.element.id+"_svg").style.cursor="grabbing";var l=He(n.targetId),r=this.getClickLocation(n.targetId,e,t,l,i,o),s=this.isTileMap?g(new Z(r.longitude,r.latitude),this.tileZoomLevel,this.tileTranslatePoint,!0):c(r.latitude,r.longitude,this.mapLayerPanel.currentFactor,this.layersCollection[n.layerIndex],this),d=this.translatePoint,p=this.isTileMap?s.x:(s.x+d.x)*this.scale,h=this.isTileMap?s.y:(s.y+d.y)*this.scale;if("Balloon"!==this.markerDragArgument.shape?l.setAttribute("transform","translate( "+p+" "+h+" )"):l.parentElement.setAttribute("transform","translate( "+p+" "+h+" )"),a){var m=this.layers[n.layerIndex].markerSettings[n.markerIndex];r=this.getClickLocation(n.targetId,e-m.offset.x,t-m.offset.y,l,i-m.offset.x,o-m.offset.y)}return r},o.prototype.getClickLocation=function(e,i,o,n,a,l,r){var s,d=0;if(-1===e.indexOf("_LayerIndex_")||this.isTileMap||(0,t.isNullOrUndefined)(r)&&(parseInt(this.mouseDownEvent.x,10)!==parseInt(this.mouseClickEvent.x,10)||parseInt(this.mouseDownEvent.y,10)!==parseInt(this.mouseClickEvent.y,10)))this.isTileMap&&(!(0,t.isNullOrUndefined)(r)||parseInt(this.mouseDownEvent.x,10)===parseInt(this.mouseClickEvent.x,10)&&parseInt(this.mouseDownEvent.y,10)===parseInt(this.mouseClickEvent.y,10))&&(s=this.getTileGeoLocation(a,l));else if(d=parseFloat(e.split("_LayerIndex_")[1].split("_")[0]),"Normal"===this.layers[d].geometryType)if(e.indexOf("_shapeIndex_")>-1){var h=n.parentElement,m=p(i,o,h.id.indexOf("_Point_Group")>-1||h.id.indexOf("_LineString_Group")>-1||h.id.indexOf("_MultiLineString_Group")>-1||h.id.indexOf("_Polygon_Group")>-1?h.parentElement:h),c=this.mapLayerPanel.currentFactor*this.mapScaleValue,u=Math.abs(-this.baseMapBounds.longitude.min*c),g=Math.abs(this.baseMapBounds.latitude.max*c);s={latitude:Math.abs(this.baseMapBounds.latitude.max-m.y/c),longitude:Math.abs(m.x/c+this.baseMapBounds.longitude.min)},this.baseMapBounds.longitude.min<0&&u>m.x&&(s.longitude=-s.longitude),this.baseMapBounds.latitude.min<0&&g>m.y&&(s.latitude=-s.latitude)}else if(e.indexOf("_MarkerIndex_")>-1&&this.markerModule&&!this.markerDragArgument){var y=parseInt(e.split("_MarkerIndex_")[1].split("_")[0],10),f=parseInt(e.split("_dataIndex_")[1].split("_")[0],10);if(isNaN(y)||isNaN(f))s={latitude:null,longitude:null};else{var b=this.layers[d].markerSettings[y].dataSource[f];s={latitude:b.latitude,longitude:b.longitude}}}else if(e.indexOf("_MarkerIndex_")>-1&&this.markerModule&&this.markerDragArgument){var v=document.getElementById(this.element.id+"_LayerIndex_"+this.markerDragArgument.layerIndex).getBoundingClientRect(),S=new Z(i>v.left?Math.abs(v.left-i):0,o>v.top?Math.abs(v.top-o):0);u=Math.abs(-this.baseMapBounds.longitude.min*this.mapLayerPanel.currentFactor),g=Math.abs(this.baseMapBounds.latitude.max*this.mapLayerPanel.currentFactor);s={latitude:Math.abs(this.baseMapBounds.latitude.max-S.y/(this.mapLayerPanel.currentFactor*this.scale)),longitude:Math.abs(S.x/(this.mapLayerPanel.currentFactor*this.scale)+this.baseMapBounds.longitude.min)},this.baseMapBounds.longitude.min<0&&u>S.x&&(s.longitude=-s.longitude),this.baseMapBounds.latitude.min<0&&g>S.y&&(s.latitude=-s.latitude)}else s={latitude:null,longitude:null};else s=this.getGeoLocation(d,i,o);return s},o.prototype.removeTileMap=function(){var e=document.getElementById(this.element.id+"_animated_tiles");if(!(0,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},o.prototype.mouseEndOnMap=function(e){var i,o,n,a=0,l=0;if(-1!==e.type.indexOf("touch")?(this.isTouch=!0,a=i=(n=e).changedTouches[0].pageX,l=(o=n.changedTouches[0].pageY)-(this.isTileMap?10:0),this.mouseClickEvent={x:i,y:o}):(this.isTouch="touch"===e.pointerType,i=e.pageX,o=e.pageY,a=e.layerX,l=e.layerY-(this.isTileMap?10:0)),this.isTileMap&&this.removeTileMap(),this.isTouch&&(this.titleTooltip(e,i,o,!0),(0,t.isNullOrUndefined)(this.legendModule)||this.legendTooltip(e,e.pageX,e.pageY,!0)),this.notify(t.Browser.touchEndEvent,e),e.cancelable&&!this.isTouch&&e.preventDefault(),(0,t.isNullOrUndefined)(this.markerDragArgument))document.getElementById(this.element.id+"_svg").style.cursor="auto";else{var r=this.markerDragArgument;this.mouseClickEvent.x=this.mouseDownEvent.x,this.mouseClickEvent.y=this.mouseDownEvent.y;var s=this.getMarkerClickLocation(i,o,a,l,this.markerDragArgument,!0),d=this.layers[r.layerIndex].markerSettings[r.markerIndex];document.getElementById(this.element.id+"_svg").style.cursor=d.enableDrag?"pointer":"grabbing";var p={name:"markerDragEnd",x:i,y:o,latitude:s.latitude,longitude:s.longitude,layerIndex:r.layerIndex,markerIndex:r.markerIndex,dataIndex:r.dataIndex};if((0,t.isNullOrUndefined)(d.latitudeValuePath)&&(0,t.isNullOrUndefined)(d.longitudeValuePath)){var h=d.dataSource[r.dataIndex];(0,t.isNullOrUndefined)(h.Longitude)||(0,t.isNullOrUndefined)(h.Latitude)?(d.dataSource[r.dataIndex].latitude=p.latitude,d.dataSource[r.dataIndex].longitude=p.longitude):(d.dataSource[r.dataIndex].Latitude=p.latitude,d.dataSource[r.dataIndex].Longitude=p.longitude)}else d.dataSource[r.dataIndex][d.latitudeValuePath]=p.latitude,d.dataSource[r.dataIndex][d.longitudeValuePath]=p.longitude;this.markerDragId="",this.markerDragArgument=null,this.trigger("markerDragEnd",p)}return this.zoomModule&&this.isDevice&&(this.zoomModule.removeToolbarOpacity(this.isTileMap?Math.round(this.tileZoomLevel):this.scale,this.element.id+"_Zooming_"),this.zoomModule.removeToolbarClass("","","","","")),!1},o.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&&!(0,t.isNullOrUndefined)(this.mapsTooltipModule)&&this.mapsTooltipModule.renderTooltip(e);var i=e.target;this.markerDragId=i.id;var o=document.getElementById(this.element.id+"_animated_tiles");if(this.isTileMap&&!(0,t.isNullOrUndefined)(o)&&(this.currentTiles=o.cloneNode(!0)),-1===i.id.indexOf("_ToolBar")){var n=this.markerModule;(i.id.indexOf("shapeIndex")>-1||i.id.indexOf("Tile")>-1)&&this.mergeCluster(),n&&(n.markerClick(e),n.markerClusterClick(e)),this.bubbleModule&&this.bubbleModule.bubbleClick(e)}this.notify(t.Browser.touchStartEvent,e)},o.prototype.mergeCluster=function(){this.markerModule&&this.markerModule.sameMarkerData.length>0&&(!this.zoomModule||this.zoomModule.isSingleClick)&&(ne(this.markerModule.sameMarkerData,this),this.markerModule.sameMarkerData=[])},o.prototype.mapsOnRightClick=function(e){var i=e.target,o=i.id,n=null,a=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);(0,t.isNullOrUndefined)(l)||(n=l.latitude,a=l.longitude);var r={cancel:!1,name:bi,target:o,x:e.clientX,y:e.clientY,latitude:n,longitude:a,isShapeSelected:!1};this.trigger("rightClick",r)}},o.prototype.mapsOnDoubleClick=function(e){this.notify("dblclick",e);var t,i=e.target,o=i.id,n=0,a=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&&(a=(t=this.getTileGeoLocation(e.layerX,e.layerY)).latitude,l=t.longitude):(n=parseFloat(i.id.split("_LayerIndex_")[1].split("_")[0]),a=(t=this.getGeoLocation(n,e.layerX,e.layerY)).latitude,l=t.longitude);var r={cancel:!1,name:vi,x:e.clientX,y:e.clientY,target:o,latitude:a,longitude:l,isShapeSelected:null};this.trigger("doubleClick",r)}},o.prototype.mouseMoveOnMap=function(e){var i;i="touchmove"===e.type?e.target:i=e.target,this.mouseMoveEvent(e),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)},o.prototype.mouseMoveEvent=function(e){var t,i,o=e.target.id;if(this.isTileMap){var n=this.getTileGeoLocation(e.layerX,e.layerY);i={x:e.clientX,y:e.clientY,latitude:n.latitude,longitude:n.longitude,target:e.target}}else{t=o.indexOf("_LayerIndex_")>-1?parseInt(o.split("_LayerIndex_")[1].split("_")[0],10):this.baseLayerIndex;n=this.getGeoLocation(t,e.clientX,e.clientY);i={x:e.clientX,y:e.clientY,latitude:n.latitude,longitude:n.longitude,target:e.target}}this.trigger(Bi,i)},o.prototype.onMouseMove=function(e){var i,o,n=e.target;this.mouseMoveId=n.id;var a=null,l=0,r=0;if(-1===e.type.indexOf("touch")?(i=e.pageX,o=e.pageY,l=e.layerX,r=e.layerY-(this.isTileMap?10:0),this.titleTooltip(e,e.pageX,e.pageY),(0,t.isNullOrUndefined)(this.legendModule)||this.legendTooltip(e,e.pageX,e.pageY,!0)):(l=i=(a=e.touches)[0].clientX,r=o=a[0].clientY-(this.isTileMap?10:0)),!(0,t.isNullOrUndefined)(this.markerDragArgument)){var s=this.markerDragArgument;this.mouseClickEvent.x=this.mouseDownEvent.x,this.mouseClickEvent.y=this.mouseDownEvent.y,this.getMarkerClickLocation(i,o,l,r,s,!1)}return this.zoomModule&&this.zoomModule.removeToolbarOpacity(this.isTileMap?Math.round(this.tileZoomLevel):this.scale,e.target.id),!1},o.prototype.legendTooltip=function(e,t,i,o){var n,a,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++)n=(a=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&&a.idIndex===parseInt(s,10)&&ot(n,this.legendSettings.textStyle.size,t,i,this.element.offsetWidth,this.element.offsetHeight,this.element.id+"_EJ2_Legend_Text_Tooltip",He(this.element.id+"_Secondary_Element"),o);l!==this.element.id+"_Legend_Text_Index_"+s&&Be(this.element.id+"_EJ2_Legend_Text_Tooltip")},o.prototype.titleTooltip=function(e,t,i,o){var n=e.target.id;n===this.element.id+"_LegendTitle"&&e.target.textContent.indexOf("...")>-1?ot(this.legendSettings.title.text,this.legendSettings.titleStyle.size,t,i,this.element.offsetWidth,this.element.offsetHeight,this.element.id+"_EJ2_LegendTitle_Tooltip",He(this.element.id+"_Secondary_Element"),o):Be(this.element.id+"_EJ2_LegendTitle_Tooltip"),n===this.element.id+"_Map_title"&&e.target.textContent.indexOf("...")>-1?ot(this.titleSettings.text,this.titleSettings.textStyle.size||this.themeStyle.titleFontSize,t,i,this.element.offsetWidth,this.element.offsetHeight,this.element.id+"_EJ2_Title_Tooltip",He(this.element.id+"_Secondary_Element"),o):Be(this.element.id+"_EJ2_Title_Tooltip")},o.prototype.mapsOnResize=function(e){var i=this;if(!this.isDestroyed&&!this.isExportInitialTileMap){this.isResize=this.isReset=!0;var o={cancel:!1,name:Si,previousSize:this.availableSize,currentSize:s(this),maps:this};this.trigger(Si,o),o.cancel||(this.resizeTo&&clearTimeout(this.resizeTo),!(0,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},o.prototype.zoomByPosition=function(e,i){if(!this.isDestroyed){this.zoomNotApplied=this.isMarkerZoomCompleted=!1;var o=this.zoomSettings.zoomFactor===i;this.previousProjection=null,!this.isTileMap&&this.zoomModule?(0,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()}},o.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)}},o.prototype.addLayer=function(e){if(!this.isDestroyed){var t=this.layers;t.push(e),this.isAddLayer=!0,this.layers=t}},o.prototype.removeLayer=function(e){if(!this.isDestroyed){var t=this.layers;t.splice(e,1),this.layers=t}},o.prototype.addMarker=function(e,i){if(!this.isDestroyed&&!(0,t.isNullOrUndefined)(this.markerModule))if((0,t.isNullOrUndefined)(e)||(0,t.isNullOrUndefined)(i)){for(var o=0;o<this.layers.length;o++){n=document.getElementById(this.element.id+"_LayerIndex_"+o);this.markerModule.zoomedMarkerCluster[o]=[],this.markerModule.initialMarkerCluster[o]=[],this.markerModule.markerRender(this,n,o,this.isTileMap?this.tileZoomLevel:this.mapLayerPanel.currentFactor,null)}this.arrangeTemplate()}else{var n=document.getElementById(this.element.id+"_LayerIndex_"+e);if(i.length>0&&n){for(var a=0,l=i;a<l.length;a++){var r=l[a];this.layersCollection[e].markerSettings.push(new pi(this,"markerSettings",r))}this.markerModule.markerRender(this,n,e,this.isTileMap?this.tileZoomLevel:this.mapLayerPanel.currentFactor,"AddMarker"),this.arrangeTemplate()}}},o.prototype.shapeSelection=function(e,i,o,n){if(!this.isDestroyed&&!(0,t.isNullOrUndefined)(this.layers[e])){var a=void 0,l=void 0,r=Array.isArray(i)?i:Array(i);(0,t.isNullOrUndefined)(n)&&(n=!0);var s=this.layers[e].selectionSettings;if(!s.enableMultiSelect&&this.legendSelection&&n&&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(!(0,t.isNullOrUndefined)(s)&&s.enable){var p=void 0,h=void 0,m=void 0,c=void 0,u=void 0,g=this.layers[e].shapeData.features;for(d=0;d<g.length;d++)for(var y=0;y<r.length;y++){var f=void 0;if((!(0,t.isNullOrUndefined)(g[d].properties[r[y]])&&isNaN(g[d].properties[r[y]])?g[d].properties[r[y]].toLowerCase():g[d].properties[r[y]])===((0,t.isNullOrUndefined)(o)||"string"!=typeof o?o:o.toLowerCase())){(0,t.isNullOrUndefined)(this.layers[e].shapeSettings.colorValuePath)||(f=we(this.layers[e].dataSource,g[d].properties,this.layers[e].shapeDataPath,this.layers[e].shapePropertyPath,this.layers[e]));var b=this.layers[e];if(this.baseLayerIndex>=0&&b.isBaseLayer?m=0:"SubLayer"===this.layers[e].type&&(m=l),a=He(this.element.id+"_LayerIndex_"+m+"_shapeIndex_"+d+"_dataIndex_"+f),(0,t.isNullOrUndefined)(f)&&(0,t.isNullOrUndefined)(a)&&(a=He(this.element.id+"_LayerIndex_"+e+"_shapeIndex_"+d+"_dataIndex_null")),h=parseInt(a.id.split("_shapeIndex_")[1].split("_")[0],10),c=this.layers[e].shapeData.features.length>h?this.layers[e].shapeData.features[h].properties:null,p=parseInt(a.id.split("_dataIndex_")[1].split("_")[0],10),u=(0,t.isNullOrUndefined)(p)?null:this.layers[e].dataSource[p],n){if($e(s,this,a,c,u),this.shapeSelectionClass=He("ShapeselectionMap"),this.legendSettings.visible&&-1===a.id.indexOf("_MarkerIndex_")&&this.legendModule.shapeHighLightAndSelection(a,u,s,"selection",e),(!this.legendSettings.visible||this.legendModule.shapeToggled)&&(a.setAttribute("class","ShapeselectionMapStyle"),-1===this.selectedElementId.indexOf(a.getAttribute("id"))&&this.selectedElementId.push(a.getAttribute("id")),!s.enableMultiSelect))return}else if(this.legendSelection=!s.enableMultiSelect&&!this.legendSelection||this.legendSelection,this.legendSettings.visible&&-1===a.id.indexOf("_MarkerIndex_")&&"ShapeselectionMapStyle"===a.getAttribute("class")&&this.legendModule.shapeHighLightAndSelection(a,u,s,"selection",e),!this.legendSettings.visible||this.legendModule.shapeToggled){et(a);var v=this.selectedElementId.indexOf(a.getAttribute("id"));-1!==v&&(this.selectedElementId.splice(v,1),!s.enableMultiSelect&&this.legendSelection&&this.selectedElementId.length>0&&this.removeShapeSelection())}}}}}},o.prototype.zoomToCoordinates=function(e,i,o,n){var a,l;if(!this.isDestroyed){this.isMarkerZoomCompleted=!1;var r=void 0,s=void 0,d=!1;this.centerPosition={latitude:null,longitude:null},this.isZoomByPosition=!1,((0,t.isNullOrUndefined)(o)&&(0,t.isNullOrUndefined)(n)||(0,t.isNullOrUndefined)(e)&&(0,t.isNullOrUndefined)(i))&&(e=(0,t.isNullOrUndefined)(e)?0:e,i=(0,t.isNullOrUndefined)(e)?0:i,o=(0,t.isNullOrUndefined)(o)?e:o,n=(0,t.isNullOrUndefined)(n)?i:n,d=!0),e>o&&(e=(a=[o,e])[0],o=a[1]),i>n&&(i=(l=[n,i])[0],n=l[1]),d?(r=e+o,s=i+n):(r=(e+o)/2,s=(i+n)/2),this.centerLatOfGivenLocation=r,this.centerLongOfGivenLocation=s,this.minLatOfGivenLocation=e,this.minLongOfGivenLocation=i,this.maxLatOfGivenLocation=o,this.maxLongOfGivenLocation=n,this.zoomNotApplied=!0,this.scaleOfGivenLocation=wt(e,o,i,n,this.mapAreaRect.width,this.mapAreaRect.height,this,!0);var p=this.getMinMaxLatitudeLongitude(),h={cancel:!1,name:"zoom",type:Ji,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},minLatitude:p.minLatitude,maxLatitude:p.maxLatitude,minLongitude:p.minLongitude,maxLongitude:p.maxLongitude};this.trigger("zoom",h),this.refresh()}},o.prototype.removeShapeSelection=function(){for(var e=this.selectedElementId.length,t=0;t<e;t++)et(Re(this.selectedElementId[0])),this.selectedElementId.splice(0,1);if(this.legendSettings.visible){var i=this.legendSelectionCollection.length;for(t=0;t<i;t++)et(Re(this.legendSelectionCollection[t].legendElement.id)),this.selectedLegendElementId.splice(0,1)}this.shapeSelectionItem=[],this.legendSelectionCollection=[]},o.prototype.setCulture=function(){this.intl=new t.Internationalization,this.setLocaleConstants(),this.localeObject=new t.L10n(this.getModuleName(),this.defaultLocalConstants,this.locale)},o.prototype.setLocaleConstants=function(){this.defaultLocalConstants={ZoomIn:"Zoom in",Zoom:"Zoom",ZoomOut:"Zoom out",Pan:"Pan",Reset:"Reset",ImageNotFound:"Image Not Found"}},o.prototype.destroy=function(){this.unWireEVents(),(0,t.isNullOrUndefined)(this.mapsTooltipModule)||this.mapsTooltipModule.removeEventListener(),(0,t.isNullOrUndefined)(this.bingMap)||this.bingMap.destroy(),e.prototype.destroy.call(this),this.shapeSelectionItem=[],this.toggledElementId=[],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.localeObject=null,this.defaultLocalConstants=null,this.intl=null,this.mapAreaRect=null,this.layersCollection=null,this.themeStyle=null,this.totalRect=null,this.baseSize=null,this.baseMapBounds=null,this.baseMapRectBounds=null,this.baseTranslatePoint=null,this.baseTileTranslatePoint=null,this.markerZoomCenterPoint=null,this.currentTiles=null,this.serverProcess=null,this.toolbarProperties=null,this.zoomLabelPositions=null,this.resizeEvent=null,this.availableSize=null,document.getElementById("mapsmeasuretext")&&document.getElementById("mapsmeasuretext").remove(),this.removeSvg(),this.svgObject=null,this.mapLayerPanel=null,this.renderer=null,this.translatePoint=null,this.tileTranslatePoint=null,this.previousPoint=null,this.dataLabelShape=[],this.zoomShapeCollection=[],this.selectedElementId=[],this.selectedMarkerElementId=[],this.selectedBubbleElementId=[],this.shapeSelectionClass=null,this.markerSelectionClass=null,this.bubbleSelectionClass=null,this.navigationSelectionClass=null,this.selectedNavigationElementId=[],this.polygonSelectionClass=null,this.selectedPolygonElementId=[],this.legendSelectionClass=null,this.previousTranslate=null,this.initialTileTranslate=null,this.markerDragArgument=null},o.prototype.getModuleName=function(){return"maps"},o.prototype.getPersistData=function(){return this.addOnPersist(["translatePoint","zoomSettings","mapScaleValue","tileTranslatePoint","baseTranslatePoint","scale","zoomPersistence","defaultState","markerZoomedState","initialCheck","initialZoomLevel","initialTileTranslate","applyZoomReset","markerZoomFactor"])},o.prototype.onPropertyChanged=function(i,o){if(!this.isDestroyed){for(var n=!1,a=!1,l=!1,r=0,s=Object.keys(i);r<s.length;r++){var d=s[r];switch(d){case"background":this.renderBorder();break;case"height":case"width":case"layers":case"projectionType":case"centerPosition":case"legendSettings":case"baseLayerIndex":if("layers"===d){l=!0;for(var p=Object.keys(i.layers).length,h=0;h<p;h++)if(!(0,t.isNullOrUndefined)(i.layers[h]))for(var m=0,c=Object.keys(i.layers[h]);m<c.length;m++){var u=c[m];(0,t.isNullOrUndefined)(this.layers[h].shapeData)&&!(0,t.isNullOrUndefined)(this.layers[h].urlTemplate)&&""!==this.layers[h].urlTemplate?this.isReset=!0:"markerSettings"===u&&(a=!0)}}n=!0;break;case"zoomSettings":(0,t.isNullOrUndefined)(o.zoomSettings)||(i.zoomSettings.zoomFactor===o.zoomSettings.zoomFactor||l?i.zoomSettings.shouldZoomInitially!==o.zoomSettings.shouldZoomInitially?(this.zoomSettings.zoomFactor=1,this.previousProjection=null,this.scale=this.isMarkerZoomCompleted?null:this.scale,this.isMarkerZoomCompleted=!i.zoomSettings.shouldZoomInitially,n=!0):i.zoomSettings.enable!==o.zoomSettings.enable?(this.zoomSettings.zoomFactor=1,n=!0):n=!0:n=!1);break;case"locale":case"currencyCode":e.prototype.refresh.call(this)}}n&&(i.layers&&a?(Be(this.element.id+"_Markers_Group"),this.isTileMap?this.mapLayerPanel.renderTileLayer(this.mapLayerPanel,this.layers.currentFactor,this.layers.length-1):this.render()):(this.createSVG(),this.renderElements()))}},o.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],name:"Bubble"}),t.highlight&&e.push({member:"Highlight",args:[this],name:"Highlight"}),t.selection&&e.push({member:"Selection",args:[this],name:"Selection"}),this.legendSettings.visible&&e.push({member:"Legend",args:[this],name:"Legend"}),(this.zoomSettings.enable||this.zoomSettings.zoomFactor>this.zoomSettings.minZoom)&&e.push({member:"Zoom",args:[this],name:"Zoom"}),this.isMarkersVisible()&&e.push({member:"Marker",args:[this],name:"Marker"}),this.isDataLabelVisible()&&e.push({member:"DataLabel",args:[this],name:"DataLabel"}),this.isNavigationVisible()&&e.push({member:"NavigationLine",args:[this],name:"NavigationLine"}),this.isPolygonVisible()&&e.push({member:"Polygon",args:[this],name:"Polygon"}),t.tooltip&&e.push({member:"MapsTooltip",args:[this],name:"MapsTooltip"}),i&&e.push({member:"Annotations",args:[this,io],name:"Annotations"}),this.allowPrint&&e.push({member:"Print",args:[this],name:"Print"}),this.allowImageExport&&e.push({member:"ImageExport",args:[this],name:"ImageExport"}),this.allowPdfExport&&e.push({member:"PdfExport",args:[this],name:"PdfExport"}),e},o.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},o.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},o.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},o.prototype.isPolygonVisible=function(){var e=!1;return Array.prototype.forEach.call(this.layers,(function(t){for(var i=0;i<t.polygonSettings.polygons.length;i++)if(t.polygonSettings.polygons.length>0){e=!0;break}})),e},o.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},o.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},o.prototype.print=function(e){this.allowPrint&&this.printModule&&!this.isDestroyed&&this.printModule.print(this,e)},o.prototype.export=function(e,i,o,n){var a=this;if(!this.isDestroyed){if((0,t.isNullOrUndefined)(n)&&(n=!0),"PDF"!==e&&this.allowImageExport&&this.imageExportModule)return new Promise((function(t){t(a.imageExportModule.export(a,e,i,n))}));if(this.allowPdfExport&&this.pdfExportModule)return new Promise((function(t){t(a.pdfExportModule.export(a,e,i,n,o))}))}return null},o.prototype.getBingUrlTemplate=function(e){var i;return this.isDestroyed||(i=new Promise((function(i){var o=new t.Fetch({url:e});o.onSuccess=function(e){var t=e.resourceSets[0].resources[0];i(t.imageUrl)},o.send()}))),i},o.prototype.findVisibleLayers=function(e,i,o,n,a,l){var r,s,d;void 0===i&&(i=!1),void 0===o&&(o=!1),void 0===n&&(n=!1),void 0===a&&(a=!1),void 0===l&&(l=!1);for(var p=0,h=e;p<h.length;p++){var m=h[p];if(i=m.visible||i,m.visible){r=m.bubbleSettings,s=m.markerSettings,d=m.polygonSettings;for(var c=0,u=m.navigationLineSettings;c<u.length;c++){var g=u[c];g.visible&&(a=!(0,t.isNullOrUndefined)(g.highlightSettings)&&g.highlightSettings.enable||a,l=!(0,t.isNullOrUndefined)(g.selectionSettings)&&g.selectionSettings.enable||l)}for(var y=0,f=d.polygons;y<f.length;y++){var b=f[y];!(0,t.isNullOrUndefined)(b.points)&&b.points.length>0&&(a=m.polygonSettings.highlightSettings.enable||a,l=m.polygonSettings.selectionSettings.enable||l,n=m.polygonSettings.tooltipSettings.visible||n)}for(var v=0,S=s;v<S.length;v++){var x=S[v];if(x.visible&&(n=x.tooltipSettings.visible||n,a=x.selectionSettings.enable||a,l=x.highlightSettings.enable||l),n)break}for(var C=0,O=r;C<O.length;C++){var _=O[C];if(_.visible&&(n=_.tooltipSettings.visible||n,a=_.selectionSettings.enable||a,l=_.highlightSettings.enable||l),n)break}n=m.tooltipSettings.visible||n,a=m.selectionSettings.enable||a,l=m.highlightSettings.enable||l}if(i&&o&&n)break}return{layer:i,bubble:o,tooltip:n,selection:a,highlight:l}},o.prototype.getGeoLocation=function(e,t,i){var o=null,n=null;if(!this.isDestroyed&&!this.isTileMap){var a=document.getElementById(this.element.id),l=this.element.getBoundingClientRect(),r=t-a.offsetLeft-(l.left-a.offsetLeft)-window.scrollX,s=i-a.offsetTop-(l.top-a.offsetTop)-window.scrollY,d=Ue(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;o=90-360*Math.atan(Math.exp(2*-u*Math.PI))/Math.PI,n=360*c}return{latitude:o,longitude:n}},o.prototype.clip=function(e,t,i){return Math.min(Math.max(e,t),i)},o.prototype.getTileGeoLocation=function(e,i){var o=null,n=null;if(this.isTileMap){var a=document.getElementById(this.element.id+"_tile_parent");if(!this.isDestroyed&&!(0,t.isNullOrUndefined)(a)){var l=this.pointToLatLong(e+this.mapAreaRect.x-a.offsetLeft,i+this.mapAreaRect.y-a.offsetTop);o=l.latitude,n=l.longitude}}return{latitude:o,longitude:n}},o.prototype.pointToLatLong=function(e,i){var o=0,n=0;if(!this.isDestroyed&&!(0,t.isNullOrUndefined)(this.translatePoint)){i=(0,t.isNullOrUndefined)(this.markerDragArgument)?i:i+10;var a=256*Math.pow(2,this.tileZoomLevel),l=this.clip(e-this.translatePoint.x*this.scale,0,a-1)/a-.5,r=.5-this.clip(i-this.translatePoint.y*this.scale,0,a-1)/a;o=90-360*Math.atan(Math.exp(2*-r*Math.PI))/Math.PI,n=360*l}return{latitude:o,longitude:n}},ao([(0,t.Property)(null)],o.prototype,"background",void 0),ao([(0,t.Property)(!1)],o.prototype,"useGroupingSeparator",void 0),ao([(0,t.Property)(null)],o.prototype,"format",void 0),ao([(0,t.Property)(null)],o.prototype,"width",void 0),ao([(0,t.Property)(null)],o.prototype,"height",void 0),ao([(0,t.Property)("MouseMove")],o.prototype,"tooltipDisplayMode",void 0),ao([(0,t.Property)(!1)],o.prototype,"allowPrint",void 0),ao([(0,t.Property)(!1)],o.prototype,"allowImageExport",void 0),ao([(0,t.Property)(!1)],o.prototype,"allowPdfExport",void 0),ao([(0,t.Complex)({},oi)],o.prototype,"titleSettings",void 0),ao([(0,t.Complex)({},ni)],o.prototype,"zoomSettings",void 0),ao([(0,t.Complex)({},li)],o.prototype,"legendSettings",void 0),ao([(0,t.Collection)([],hi)],o.prototype,"layers",void 0),ao([(0,t.Collection)([],kt)],o.prototype,"annotations",void 0),ao([(0,t.Complex)({},Dt)],o.prototype,"margin",void 0),ao([(0,t.Complex)({color:"#DDDDDD",width:0},Ut)],o.prototype,"border",void 0),ao([(0,t.Property)("Material")],o.prototype,"theme",void 0),ao([(0,t.Property)("Mercator")],o.prototype,"projectionType",void 0),ao([(0,t.Property)(0)],o.prototype,"baseLayerIndex",void 0),ao([(0,t.Property)(null)],o.prototype,"description",void 0),ao([(0,t.Property)(0)],o.prototype,"tabIndex",void 0),ao([(0,t.Complex)({latitude:null,longitude:null},jt)],o.prototype,"centerPosition",void 0),ao([(0,t.Complex)({},ci)],o.prototype,"mapsArea",void 0),ao([(0,t.Event)()],o.prototype,"load",void 0),ao([(0,t.Event)()],o.prototype,"beforePrint",void 0),ao([(0,t.Event)()],o.prototype,"loaded",void 0),ao([(0,t.Event)()],o.prototype,"click",void 0),ao([(0,t.Event)()],o.prototype,"onclick",void 0),ao([(0,t.Event)()],o.prototype,"doubleClick",void 0),ao([(0,t.Event)()],o.prototype,"rightClick",void 0),ao([(0,t.Event)()],o.prototype,"resize",void 0),ao([(0,t.Event)()],o.prototype,"tooltipRender",void 0),ao([(0,t.Event)()],o.prototype,"legendRendering",void 0),ao([(0,t.Event)()],o.prototype,"tooltipRenderComplete",void 0),ao([(0,t.Event)()],o.prototype,"shapeSelected",void 0),ao([(0,t.Event)()],o.prototype,"itemSelection",void 0),ao([(0,t.Event)()],o.prototype,"itemHighlight",void 0),ao([(0,t.Event)()],o.prototype,"shapeHighlight",void 0),ao([(0,t.Event)()],o.prototype,"layerRendering",void 0),ao([(0,t.Event)()],o.prototype,"shapeRendering",void 0),ao([(0,t.Event)()],o.prototype,"markerRendering",void 0),ao([(0,t.Event)()],o.prototype,"markerClusterRendering",void 0),ao([(0,t.Event)()],o.prototype,"markerClick",void 0),ao([(0,t.Event)()],o.prototype,"markerDragStart",void 0),ao([(0,t.Event)()],o.prototype,"markerDragEnd",void 0),ao([(0,t.Event)()],o.prototype,"markerClusterClick",void 0),ao([(0,t.Event)()],o.prototype,"markerClusterMouseMove",void 0),ao([(0,t.Event)()],o.prototype,"markerMouseMove",void 0),ao([(0,t.Event)()],o.prototype,"mouseMove",void 0),ao([(0,t.Event)()],o.prototype,"dataLabelRendering",void 0),ao([(0,t.Event)()],o.prototype,"bubbleRendering",void 0),ao([(0,t.Event)()],o.prototype,"bubbleClick",void 0),ao([(0,t.Event)()],o.prototype,"bubbleMouseMove",void 0),ao([(0,t.Event)()],o.prototype,"animationComplete",void 0),ao([(0,t.Event)()],o.prototype,"annotationRendering",void 0),ao([(0,t.Event)()],o.prototype,"zoom",void 0),ao([(0,t.Event)()],o.prototype,"pan",void 0),ao([(0,t.Event)()],o.prototype,"panComplete",void 0),ao([(0,t.Event)()],o.prototype,"zoomComplete",void 0),o=ao([t.NotifyPropertyChanges],o)}(t.Component),ro=function(){function e(e){this.id="",this.maps=e,this.bubbleCollection=[]}return e.prototype.renderBubble=function(e,i,o,n,a,l,r,s,d,p){var h,m,c=this,u=s.layerData,g=e.colorValuePath,y=(0,t.isNullOrUndefined)(g)?i[g]:g.indexOf(".")>-1?Y(i,e.colorValuePath):i[g],f=(0,t.isNullOrUndefined)(g)?Number(i[g]):g.indexOf(".")>-1?Number(Y(i,e.colorValuePath)):Number(i[g]),b=(0,t.isNullOrUndefined)(e.valuePath)?Number(i[e.valuePath]):e.valuePath.indexOf(".")>-1?Number(Y(i,e.valuePath)):Number(i[e.valuePath]);if(isNaN(b)&&isNaN(f)&&(0,t.isNullOrUndefined)(y))return null;var v=Ie(e.minRadius,e.maxRadius,b,n.min,n.max),S=new eo(this.maps).getColorByValue(e.colorMapping,f,y);m="[object Object]"!==Object.prototype.toString.call(S)||(0,t.isNullOrUndefined)(S.fill)?o:S.fill,h="[object Object]"!==Object.prototype.toString.call(S)||(0,t.isNullOrUndefined)(S.opacity)?e.opacity:S.opacity;var x=[[]];this.maps.translateType="bubble";for(var C=0,O=0,_=0,M=0,L=u.length;M<L;M++){var P=u[M];P=P.property;var w=Te(i[s.shapeDataPath],s.shapePropertyPath,P);if((!(0,t.isNullOrUndefined)(i[s.shapeDataPath])&&isNaN(i[s.shapeDataPath])?i[s.shapeDataPath].toLowerCase():i[s.shapeDataPath])===(!(0,t.isNullOrUndefined)(P[w])&&isNaN(P[w])?P[w].toLowerCase():P[w])&&"LineString"!==u[M].type&&"MultiLineString"!==u[M].type&&"Point"!==u[M].type&&"MultiPoint"!==u[M].type)if(u[M]._isMultiPolygon)for(var T=u[M],F=0;F<T.length;F++)x.push(this.getPoints(T[F],[])),O<(_=x[x.length-1].length)&&(O=_,C=x.length-1);else x.push(this.getPoints(u[M],[])),O<(_=x[x.length-1].length)&&(O=_,C=x.length-1)}var I,k,N=this.maps.projectionType,B={color:e.border.color,opacity:e.border.opacity,width:e.border.width},A=ke(x[C],N,s.geometryType);if(e.visible){if((0,t.isNullOrUndefined)(A)){var U=x.length-1;if(!x[U].x||!x[U].y)return;k={cancel:!1,name:ji,border:B,cx:x[U].x,cy:x[U].y,data:i,fill:m,maps:this.maps,radius:v}}else I="Mercator"===this.maps.projectionType?A.y:-A.y,k={cancel:!1,name:ji,border:B,cx:A.x,cy:I,data:i,fill:m,maps:this.maps,radius:v};this.maps.trigger("bubbleRendering",k,(function(i){if(!k.cancel){var o,n;if(k.border.opacity=(0,t.isNullOrUndefined)(k.border.opacity)?h:k.border.opacity,"Circle"===e.bubbleType){var m=new z(p,k.fill,k.border,h,0,0,k.radius,null);o=me(c.maps,m,d)}else{var u="Mercator"===c.maps.projectionType?k.cy-v:k.cy+v,g=new E(p,k.fill,k.border,h,new R(0,0,2*v,2*v),2,2);k.cx-=v,k.cy=u,o=ce(c.maps,g,d)}se(c.maps.selectedBubbleElementId,c.maps.bubbleSelectionClass,o,"BubbleselectionMapStyle"),c.bubbleCollection.push({LayerIndex:r,BubbleIndex:a,DataIndex:l,element:o,center:{x:k.cx,y:k.cy}});var y=0!==s.animationDuration||"Enable"===t.animationMode||(0,t.isNullOrUndefined)(c.maps.zoomModule);n=c.maps.zoomSettings.zoomFactor>1&&!(0,t.isNullOrUndefined)(c.maps.zoomModule)&&!c.maps.isTileMap?je(c.maps,s,y):Ue(c.maps,s,y);var f=e.dataSource,b=n.scale,S=n.location,x=new Z(c.maps.isTileMap?(k.cx+c.maps.translatePoint.x)*c.maps.tileZoomLevel:(k.cx+S.x)*b,c.maps.isTileMap?(k.cy+c.maps.translatePoint.y)*c.maps.tileZoomLevel:(k.cy+S.y)*b);o.setAttribute("transform","translate( "+x.x+" "+x.y+" )");var C=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)&&tt(o,e.animationDelay,e.animationDuration,x,c.maps,C,v)}}))}},e.prototype.getPoints=function(e,i){return(0,t.isNullOrUndefined)(e.map)?i=e.point:e.map((function(e){i.push(new _(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(!(0,t.isNullOrUndefined)(o)){var n={cancel:!1,name:Zi,data:o,maps:this.maps,target:i,x:e.clientX,y:e.clientY};this.maps.trigger(Zi,n)}}},e.prototype.getbubble=function(e){var t=e.split("_LayerIndex_"),i=parseInt(t[1].split("_")[0],10);if(e.indexOf("_BubbleIndex_")>-1){var o=this.maps.layers[i],n=parseInt(t[1].split("_BubbleIndex_")[1],10),a=parseInt(t[1].split("_BubbleIndex_")[1].split("_dataIndex_")[1],10);if(!isNaN(n))return o.bubbleSettings[n].dataSource[a]}return null},e.prototype.bubbleMove=function(e){var i=e.target.id;if(-1!==i.indexOf("_LayerIndex_")){var o=this.getbubble(i);if(!(0,t.isNullOrUndefined)(o)){var n={cancel:!1,name:Ri,data:o,maps:this.maps,target:i,x:e.clientX,y:e.clientY};this.maps.trigger(Ri,n)}}},e.prototype.getModuleName=function(){return"Bubble"},e.prototype.destroy=function(){this.bubbleCollection=[],this.maps=null},e}(),so=function(){function e(e){this.maps=e,this.sameMarkerData=[],this.initialMarkerCluster=[],this.zoomedMarkerCluster=[]}return e.prototype.getMapsInstance=function(){return this.maps},e.prototype.markerRender=function(e,i,o,n,a){var l=this,r=0,s=0,d=!1,p=0;e.translateType="marker";var h=e.layersCollection[o],m=i.querySelectorAll("#"+e.element.id+"_Markers_Group");m.length>0?(this.markerSVGObject=m[0],this.markerSVGObject.innerHTML="",d=!0):this.markerSVGObject=e.renderer.createGroup({id:e.element.id+"_Markers_Group",class:"GroupElement"}),this.markerSVGObject.style.pointerEvents="auto";var u,y=Re(e.element.id+"_Secondary_Element").querySelectorAll("#"+e.element.id+"_LayerIndex_"+o+"_Markers_Template_Group");y&&y.length>0&&y[0].childElementCount>0?((u=Re(e.element.id+"_LayerIndex_"+o+"_Markers_Template_Group")).innerHTML="",d=!0):(u=(0,t.createElement)("div",{id:e.element.id+"_LayerIndex_"+o+"_Markers_Template_Group",className:e.element.id+"_template"})).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;";var f,b=this.allowInnerClusterSetting(h),v=0!==h.animationDuration||"Enable"===t.animationMode||(0,t.isNullOrUndefined)(e.zoomModule);e.isTileMap||(f=!(0,t.isNullOrUndefined)(e.zoomModule)&&e.zoomSettings.zoomFactor>1?je(e,h,v):Ue(e,h,v)),Array.prototype.forEach.call(h.markerSettings,(function(y,v){var S=y.dataSource;r=0,(0,t.isNullOrUndefined)(y.dataSource)||Array.prototype.forEach.call(S,(function(x,C){e.markerNullCount=v>0&&0===C?0:e.markerNullCount;var O={cancel:!1,name:Ti,fill:y.fill,height:(0,t.isNullOrUndefined)(y.heightValuePath)||(0,t.isNullOrUndefined)(x[y.heightValuePath])?y.height:x[y.heightValuePath],width:(0,t.isNullOrUndefined)(y.widthValuePath)||(0,t.isNullOrUndefined)(x[y.widthValuePath])?y.width:x[y.widthValuePath],imageUrl:y.imageUrl,shape:y.shape,template:y.template,data:x,maps:e,marker:y,border:y.border,colorValuePath:y.colorValuePath,shapeValuePath:y.shapeValuePath,imageUrlValuePath:y.imageUrlValuePath};e.trigger("markerRendering",O,(function(_){O=Q(O=J(O,x),x);var M=(0,t.isNullOrUndefined)(y.longitudeValuePath)?(0,t.isNullOrUndefined)(x.longitude)?(0,t.isNullOrUndefined)(x.Longitude)?null:parseFloat(x.Longitude):parseFloat(x.longitude):Number(Y(x,y.longitudeValuePath)),L=(0,t.isNullOrUndefined)(y.latitudeValuePath)?(0,t.isNullOrUndefined)(x.latitude)?(0,t.isNullOrUndefined)(x.Latitude)?null:parseFloat(x.Latitude):parseFloat(x.latitude):Number(Y(x,y.latitudeValuePath)),P=y.offset;if(!O.cancel&&y.visible&&!(0,t.isNullOrUndefined)(M)&&!(0,t.isNullOrUndefined)(L)){var w=e.element.id+"_LayerIndex_"+o+"_MarkerIndex_"+v+"_dataIndex_"+C,T=e.isTileMap?g(new Z(M,L),n,e.tileTranslatePoint,!0):c(L,M,n,h,e);e.isTileMap&&(f="SubLayer"===h.type&&(0,t.isNullOrUndefined)(e.zoomModule)?T=g(new Z(M,L),e.tileZoomLevel,e.tileTranslatePoint,!0):new Object);var F="AddMarker"===a?e.scale:f.scale,I="AddMarker"===a?e.translatePoint:f.location;!O.template||isNaN(T.x)||isNaN(T.y)?O.template||isNaN(T.x)||isNaN(T.y)||(d=!0,r++,le(O,y,S,C,T,I,w,P,F,e,l.markerSVGObject)):(d=!1,p++,re(O,undefined,w,x,v,u,T,I,F,P,e),e.renderReactTemplates())}s+=isNaN(L)||isNaN(M)?1:0,p+=O.cancel?1:0,r+=O.cancel?1:0,e.markerNullCount=(0,t.isNullOrUndefined)(M)||(0,t.isNullOrUndefined)(L)?e.markerNullCount+1:e.markerNullCount;var k=S.length-e.markerNullCount,N=!1,E=y.clusterSettings.allowClustering||h.markerClusterSettings.allowClustering&&h.markerSettings.length>1?l.markerSVGObject.querySelectorAll("[id*='LayerIndex_"+o+"_MarkerIndex_"+v+"']:not([id*='_Group'])"):l.markerSVGObject.childNodes,z=l.markerSVGObject.childNodes===E?p:0;(E.length===k-z-s&&"Template"!==a&&(0===m.length&&i.appendChild(l.markerSVGObject),(y.clusterSettings.allowClustering||!b&&h.markerClusterSettings.allowClustering)&&(0===m.length&&(e.svgObject.appendChild(l.markerSVGObject),e.element.appendChild(e.svgObject)),-1!==h.urlTemplate.indexOf("openstreetmap")&&(0,t.isNullOrUndefined)(h.shapeData)&&e.zoomSettings.enable?(N=te(h,l.markerSVGObject,e,o,v,l.markerSVGObject,i,!0,!1,null,b),0===m.length&&i.appendChild(l.markerSVGObject)):N=te(h,l.markerSVGObject,e,o,v,l.markerSVGObject,i,!0,!1,f,b),e.renderReactTemplates())),(y.clusterSettings.allowClustering||h.markerClusterSettings.allowClustering&&h.markerSettings.length>1?u.querySelectorAll("[id*='LayerIndex_"+o+"_MarkerIndex_"+v+"']:not([id*='_Group'])"):u.childNodes).length===k-r-s&&Re(e.element.id+"_Secondary_Element"))&&(d||Re(e.element.id+"_Secondary_Element").appendChild(u),e.checkInitialRender&&(y.clusterSettings.allowClustering||!b&&h.markerClusterSettings.allowClustering)&&!N&&(te(h,u,e,o,v,l.markerSVGObject,i,!1,!1,f,b),e.renderReactTemplates()),h.markerClusterSettings.allowClustering&&m.length>0&&Re(e.element.id+"_Layer_Collections").appendChild(i))}))}))}))},e.prototype.calculateIndividualLayerMarkerZoomLevel=function(e,t,i){var o,n,a=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/a)))>i?i:o,n=(n=Math.floor(Math.log(e/l)))>i?i:n;var r=Math.min(o,n),s=Math.min(r,i-1);return this.maps.isTileMap||Pt(s,this.maps),s},e.prototype.calculateZoomCenterPositionAndFactor=function(e){if(!(0,t.isNullOrUndefined)(this.maps))if(this.maps.zoomSettings.shouldZoomInitially&&this.maps.markerModule){var i,o,n,a,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:(0,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;!(0,t.isNullOrUndefined)(l)&&l.length>0&&Array.prototype.forEach.call(l,(function(e,l){var r=(0,t.isNullOrUndefined)(e.latitude)?(0,t.isNullOrUndefined)(e.Latitude)?null:parseFloat(e.Latitude):parseFloat(e.latitude),s=(0,t.isNullOrUndefined)(e.longitude)?(0,t.isNullOrUndefined)(e.Longitude)?null:parseFloat(e.Longitude):parseFloat(e.longitude);(0,t.isNullOrUndefined)(r)||(0,t.isNullOrUndefined)(s)||(i=(0,t.isNullOrUndefined)(i)&&0===l?s:i,o=(0,t.isNullOrUndefined)(o)&&0===l?r:o,n=(0,t.isNullOrUndefined)(n)&&0===l?r:n,a=(0,t.isNullOrUndefined)(a)&&0===l?s:a,i>s&&(i=s),n>r&&(n=r),a<s&&(a=s),o<r&&(o=r))}))}))})),!((0,t.isNullOrUndefined)(n)||(0,t.isNullOrUndefined)(i)||(0,t.isNullOrUndefined)(a)||(0,t.isNullOrUndefined)(o))){r=(n+o)/2,s=(i+a)/2,this.maps.markerCenterLatitude=r,this.maps.markerCenterLongitude=s,((0,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=wt(n,o,i,a,p,h,this.maps,!1),this.maps.isTileMap?m=(0,t.isNullOrUndefined)(this.maps.markerZoomFactor)||(0,t.isNullOrUndefined)(this.maps.mapScaleValue)?l:this.maps.mapScaleValue>1&&1!==this.maps.markerZoomFactor?this.maps.mapScaleValue:l:(m=(0,t.isNullOrUndefined)(this.maps.mapScaleValue)?l:1!==Math.floor(this.maps.scale)&&this.maps.mapScaleValue!==l&&(0,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=(0,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||(0,t.isNullOrUndefined)(this.maps.tileTranslatePoint)||(this.maps.tileTranslatePoint.x=0,this.maps.tileTranslatePoint.y=0))},e.prototype.markerClick=function(e){var i=e.target.id;if(-1===i.indexOf(this.maps.element.id)){var o=e.target.closest("."+this.maps.element.id+"_marker_template_element");!(0,t.isNullOrUndefined)(o)&&o.id.indexOf("_MarkerIndex_")>-1&&(i=o.id)}if(!(-1===i.indexOf("_LayerIndex_")||i.indexOf("_cluster_")>0)){var n=this.getMarker(i);if(!(0,t.isNullOrUndefined)(n)){n.marker.enableDrag&&(document.getElementById(this.maps.element.id+"_svg").style.cursor="grabbing");var a={cancel:!1,name:Ii,data:n.data,maps:this.maps,marker:n.marker,target:i,x:e.clientX,y:e.clientY,latitude:n.data.latitude||n.data.Latitude,longitude:n.data.longitude||n.data.Longitude,value:n.data.name};if(this.maps.trigger(Ii,a),n.marker.enableDrag){var l=!1,r=parseInt(i.split("_LayerIndex_")[1].split("_")[0],10),s=parseInt(i.split("_MarkerIndex_")[1].split("_")[0],10),d=parseInt(i.split("_dataIndex_")[1].split("_")[0],10),p=this.maps.layers[r].markerSettings[s];if(this.sameMarkerData.length>0&&(l=this.sameMarkerData[0].data.filter((function(e){return e.index===d})).length>0&&this.sameMarkerData[0].layerIndex===r&&this.sameMarkerData[0].markerIndex===s),!l){var h={name:ki,x:e.clientX,y:e.clientY,latitude:n.data.latitude||n.data.Latitude,longitude:n.data.longitude||n.data.Longitude,layerIndex:r,markerIndex:s,dataIndex:d};this.maps.trigger(ki,h),this.maps.markerDragArgument={targetId:i,x:e.clientX,y:e.clientY,latitude:n.data.latitude||n.data.Latitude,longitude:n.data.longitude||n.data.Longitude,shape:(0,t.isNullOrUndefined)(p.shapeValuePath)?p.shape:p.dataSource[d][p.shapeValuePath],layerIndex:r,markerIndex:s,dataIndex:d}}}}}},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(!(0,t.isNullOrUndefined)(o)){o.clusterCollection.length>0&&this.maps.markerClusterExpand&&(He(this.maps.element.id+"_mapsTooltip")&&this.maps.mapsTooltipModule.tooltipTargetID.indexOf("_MarkerIndex_")>-1&&Be(this.maps.element.id+"_mapsTooltip"),this.sameMarkerData.length>0&&!this.maps.markerClusterExpandCheck?(this.maps.markerClusterExpandCheck=!0,ne(this.sameMarkerData,this.maps)):(this.sameMarkerData=o.clusterCollection,this.maps.markerClusterExpandCheck=!1,ae(this.sameMarkerData,this.maps,this.markerSVGObject,!0)));var n={cancel:!1,name:Ei,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(Ei,n)}}},e.prototype.getMarker=function(e){var t,i,o=e.split("_LayerIndex_"),n=parseInt(o[1].split("_")[0],10),a=this.maps.layers[n],l=[],r=[];if(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);i=a.markerSettings[s];var p=this.allowInnerClusterSetting(a);if(this.maps.markerClusterExpand=!p&&a.markerClusterSettings.allowClustering?a.markerClusterSettings.allowClusterExpand:i.clusterSettings.allowClusterExpand,!isNaN(s)){t=i.dataSource[d];var h=[];if(!i.template&&e.indexOf("_cluster_")>-1&&this.maps.markerClusterExpand&&Array.prototype.forEach.call(i.dataSource,(function(e,i){e.latitude===t.latitude&&e.longitude===t.longitude&&h.push({data:t,index:i})})),e.indexOf("_cluster_")>-1){var m=!p&&a.markerClusterSettings.allowClustering?a.markerClusterSettings:a.markerSettings[s].clusterSettings,c=document.getElementById(e.indexOf("_datalabel_")>-1?"Balloon"===m.shape?e.split("_datalabel_")[0]+"_Group":e.split("_datalabel_")[0]:"Balloon"===m.shape?e+"_Group":e),u="Balloon"===m.shape?c.children[0].textContent.split(",").map(Number):c.textContent.split(",").map(Number);h=[];for(var g=0,y=u;g<y.length;g++){var f=y[g];h.push({data:i.dataSource[f],index:f}),l.push(i.dataSource[f])}r.push({data:h,layerIndex:n,markerIndex:s,dataIndex:d,targetClusterIndex:+(e.split("_cluster_")[1].indexOf("_datalabel_")>-1?e.split("_cluster_")[1].split("_datalabel_")[0]:e.split("_cluster_")[1]),isClusterSame:false})}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(!(0,t.isNullOrUndefined)(o)){o.marker.enableDrag&&(document.getElementById(this.maps.element.id+"_svg").style.cursor=(0,t.isNullOrUndefined)(this.maps.markerDragArgument)?"pointer":"grabbing");var n={cancel:!1,name:zi,data:o.data,maps:this.maps,target:i,x:e.clientX,y:e.clientY};this.maps.trigger(zi,n)}}},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"),!(0,t.isNullOrUndefined)(o)){var n={cancel:!1,name:Ai,data:o.data,maps:this.maps,target:i,x:e.clientX,y:e.clientY};this.maps.trigger(Ai,n)}}},e.prototype.allowInnerClusterSetting=function(e){for(var t=!1,i=0;i<e.markerSettings.length;i++)if(e.markerSettings[i].clusterSettings.allowClustering){t=!0;break}return t},e.prototype.initializeMarkerClusterList=function(){for(var e=0;e<this.maps.layers.length;e++)this.initialMarkerCluster[e]=[],this.zoomedMarkerCluster[e]=[]},e.prototype.getModuleName=function(){return"Marker"},e.prototype.destroy=function(){this.maps=null,this.markerSVGObject=null,this.sameMarkerData=[],this.initialMarkerCluster=[],this.zoomedMarkerCluster=[]},e}(),po=function(){function e(e){}return e.prototype.polygonRender=function(e,i,o){var n=e.layersCollection[i],a=e.renderer.createGroup({id:e.element.id+"_LayerIndex_"+i+"_Polygons_Group"});return n.polygonSettings.polygons.map((function(l,r){var s=e.renderer.createGroup({id:e.element.id+"_LayerIndex_"+i+"_Polygons_Group_"+r}),d=l.points;if(!(0,t.isNullOrUndefined)(l.points)&&l.points.length>0){var p=u(e,o,n,d),h=new k(e.element.id+"_LayerIndex_"+i+"_PolygonIndex_"+r,l.fill,l.borderWidth/o,l.borderColor,l.opacity,l.borderOpacity,"",p),m=e.renderer.drawPath(h);se(e.selectedPolygonElementId,e.polygonSelectionClass,m,"PolygonselectionMapStyle"),s.appendChild(m),a.appendChild(s)}})),a},e.prototype.getModuleName=function(){return"Polygon"},e.prototype.destroy=function(){},e}(),ho=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,n){for(var a,l=0;l<((0,t.isNullOrUndefined)(e)?0:e.length);l++){var r=e[l],s=!(0,t.isNullOrUndefined)(r[n])&&isNaN(r[n])&&"string"==typeof r[n]?r[n].toLowerCase():r[n];if(o=(0,t.isNullOrUndefined)(o)||"string"!=typeof o?o:o.toString(),s===((0,t.isNullOrUndefined)(o)||"string"!=typeof o?o:o.toLowerCase())){a=r;break}}return a},e.prototype.renderLabel=function(e,i,o,n,a,l,r,s){var d,p,h,m,c,u,g,y,f,b=this,v=e.dataLabelSettings,S=e.dataLabelSettings.textStyle,x=e.dataLabelSettings,C=e.dataLabelSettings.labelPath,O=[[]],M=0,L=0,P=o,w="",T=0,k=!1,N=o.properties,z=this.maps.element.id+"_LayerIndex_"+i+"_shapeIndex_"+r+"_LabelIndex_"+r,B=new _(0,0),A=n[r];S.fontFamily="material"!==this.maps.theme.toLowerCase()?this.maps.themeStyle.labelFontFamily:S.fontFamily,S.fontWeight=S.fontWeight||this.maps.themeStyle.fontWeight,S.size=S.size||this.maps.themeStyle.fontSize,o=(0,t.isNullOrUndefined)(A)?null:A.property;var U,j,Z="[object Array]"===Object.prototype.toString.call(e.shapePropertyPath)?e.shapePropertyPath:[e.shapePropertyPath],D=0!==e.animationDuration||"Enable"===t.animationMode||(0,t.isNullOrUndefined)(this.maps.zoomModule),G=this.maps.isTileMap?new Object:this.maps.zoomSettings.zoomFactor>1&&!(0,t.isNullOrUndefined)(this.maps.zoomModule)?je(this.maps,e,D):Ue(this.maps,e,D),H=this.maps.isTileMap?this.maps.scale:G.scale,W=this.maps.isTileMap?this.maps.translatePoint:G.location,X=this.maps.zoomTranslatePoint,Y=(0,t.isNullOrUndefined)(this.maps.scale)?1:Math.floor(this.maps.scale),J=this.maps.zoomSettings.enable?!(0,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<Z.length&&!(N[Z[Q]]&&(U=Z[Q],c=this.getDataLabel(e.dataSource,e.shapeDataPath,P.properties[U],e.shapeDataPath)));Q++);if(c=this.getDataLabel(e.dataSource,e.shapeDataPath,P.properties[U],e.shapeDataPath),!(0,t.isNullOrUndefined)(A)&&!(0,t.isNullOrUndefined)(A.property))if(O=[[]],n[r]._isMultiPolygon||"Point"===n[r].type||"MultiPoint"===n[r].type){if("Point"!==n[r].type&&"MultiPoint"!==n[r].type){var K=n[r];for(Q=0;Q<K.length;Q++)O.push(this.getPoint(K[Q],[])),L<(T=O[O.length-1].length)&&(L=T,M=O.length-1)}}else O.push(this.getPoint(n[r],[])),L<(T=O[O.length-1].length)&&(L=T,M=O.length-1);if(w=(0,t.isNullOrUndefined)(c)?P.properties[C]:(0,t.isNullOrUndefined)(c[C])?c[e.shapeDataPath]:c[C].toString(),"[object Array]"===Object.prototype.toString.call(e.shapePropertyPath)&&(0,t.isNullOrUndefined)(w)&&!(0,t.isNullOrUndefined)(e.dataSource)&&0===e.dataSource.length)for(var $=0;$<e.shapePropertyPath.length;$++)if(P.properties[e.shapePropertyPath[$]]){w=P.properties[e.shapePropertyPath[$]];break}(0,t.isNullOrUndefined)(w)&&""!==e.dataLabelSettings.template&&0===e.dataSource.length&&(w=P.properties[e.shapePropertyPath]),(0,t.isNullOrUndefined)(w)&&!(0,t.isNullOrUndefined)(e.dataSource)&&e.dataSource.length>0&&(w="");var ee=w,te=this.maps.projectionType,ie=g=ke(O[M],te,e.geometryType);if(!(0,t.isNullOrUndefined)(w)&&!(0,t.isNullOrUndefined)(g)){if(J&&Y>1&&!this.maps.zoomNotApplied&&""===v.template){if(i>0)for(var oe=0;oe<this.maps.zoomLabelPositions.length;oe++)if(this.maps.zoomLabelPositions[oe].dataLabelText===w){u=r,r=oe,k=!0;break}y=g.x,f=g.y,g.x=(g.x+X.x)*H,g.y=(g.y+X.y)*H}g.y="Mercator"===this.maps.projectionType||"Normal"===e.geometryType?g.y:-g.y,(0,t.isNullOrUndefined)(this.maps.format)||isNaN(Number(w))||isNaN(parseFloat(w))||this.maps.useGroupingSeparator&&(w=Ve(this.maps,parseFloat(w)),(0,t.isNullOrUndefined)(c)||(c[C]=w));var ne={name:Ui,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:w,offsetX:0,offsetY:0};this.maps.trigger("dataLabelRendering",ne,(function(o){if(!ne.cancel){var n,v=J&&Y>1&&!b.maps.zoomNotApplied&&b.maps.zoomShapeCollection.length>r?b.maps.dataLabelShape[r]*H:(g.rightMax.x-g.leftMax.x)*H;(0,t.isNullOrUndefined)(b.maps.dataLabelShape)||b.maps.isReset||(j=ie.rightMax.x-ie.leftMax.x,b.maps.dataLabelShape.push(j)),ne.text===w||ne.cancel||(w=ne.text);var C=F(w,S),_=w,L=C,T=g.y-C.height/2,N=g.y+C.height/2,A=(g.y+W.y)*H-C.height/2,U=(g.y+W.y)*H+C.height/2;if((n=Fe(O[M],T,N)).length>5&&"MultiPolygon"!==P.geometry.type&&"MultiPolygon"!==P.type){var Z=ke(n,te,e.geometryType);J&&Y>1&&!b.maps.zoomNotApplied&&""===ne.template&&(Z.x=(b.maps.zoomLabelPositions[r].location.x+X.x)*H,Z.y=(b.maps.zoomLabelPositions[r].location.y+X.y)*H),y=Z.x,g.x=Z.x,v=J&&Y>1&&!b.maps.zoomNotApplied&&b.maps.zoomShapeCollection.length>r?b.maps.dataLabelShape[r]*H:(Z.rightMax.x-Z.leftMax.x)*H>0?(Z.rightMax.x-Z.leftMax.x)*H:v}var D,G=(g.x+W.x)*H+C.width/2,Q=(g.x+W.x)*H-C.width/2;if(b.value[r]={rightWidth:G,leftWidth:Q,heightTop:A,heightBottom:U},""!==ne.template){var K=(d=Ge(ne.template,b.maps))?d((0,t.isNullOrUndefined)(c)?P.properties:c,b.maps,ne.template,b.maps.element.id+"_LabelTemplate",!1):document.createElement("div");K.innerHTML=d?"":ne.template,D=q(K,z,(0,t.isNullOrUndefined)(c)?P.properties:c),b.maps.isTileMap?(D.style.left=(g.x+W.x)*H-C.width/2+"px",D.style.top=(g.y+W.y)*H-C.height+"px"):(D.style.left=Math.abs(b.maps.baseMapRectBounds.min.x-g.x)*H+o.offsetX+"px",D.style.top=Math.abs(b.maps.baseMapRectBounds.min.y-g.y)*H+o.offsetY+"px"),l.appendChild(D)}else{var $=(0,t.isNullOrUndefined)(x.smartLabelMode)?"None":x.smartLabelMode.toString();if("Trim"===$)L=F(_=Ee(v,"number"==typeof w?w.toString():w,S,null,!0),S),p=new I(z,B.x,B.y,"middle",_,"","");"None"===$&&(p=new I(z,B.x,B.y,"middle",w,"","")),"Hide"===$&&(w=v>=C.width?w:"",p=new I(z,B.x,B.y,"middle",w,"","")),(0,t.isNullOrUndefined)(p)||(w=p.text);var oe=(0,t.isNullOrUndefined)(x.intersectionAction)?"None":x.intersectionAction.toString();if("Hide"===oe){for(var ae=0;ae<s.length;ae++)if(!(0,t.isNullOrUndefined)(s[ae])&&!(b.value[r].leftWidth>s[ae].rightWidth||b.value[r].rightWidth<s[ae].leftWidth||b.value[r].heightTop>s[ae].heightBottom||b.value[r].heightBottom<s[ae].heightTop)){w="";break}s.push(b.value[r]),p=new I(z,B.x,B.y,"middle",w,"","")}if("Trim"===oe){for(var le=0;le<s.length;le++)if(!(0,t.isNullOrUndefined)(s[le]))if(s[le].rightWidth<b.value[r].leftWidth||s[le].leftWidth>b.value[r].rightWidth||s[le].heightBottom<b.value[r].heightTop||s[le].heightTop>b.value[r].heightBottom)_=w;else{if(b.value[r].leftWidth>s[le].leftWidth){_=Ee((v=s[le].rightWidth-b.value[r].leftWidth)-(b.value[r].rightWidth-b.value[r].leftWidth),w,S,null,!0);break}if(b.value[r].leftWidth<s[le].leftWidth){v=b.value[r].rightWidth-s[le].leftWidth,_=Ee(Math.abs(v-(b.value[r].rightWidth-b.value[r].leftWidth)),w,S,null,!0);break}}L=F(_,S),s.push(b.value[r]),p=new I(z,B.x,B.y,"middle",_,"","")}if("None"===oe&&(p=new I(z,B.x,B.y,"middle",w,"","")),_.length>1){var re=ne.border;if(re.width>1){var se=ne.fill,de=x.opacity,pe=x.rx,he=x.ry,me=void 0,ce=void 0;J&&Y>1&&!b.maps.zoomNotApplied?(me=g.x-C.width/2,ce=g.y-C.height/2-5):(me=(g.x+W.x)*H-C.width/2,ce=(g.y+W.y)*H-C.height/2),re.opacity=(0,t.isNullOrUndefined)(re.opacity)?de:re.opacity;var ue=new E(b.maps.element.id+"_LayerIndex_"+i+"_shapeIndex_"+r+"_rectIndex_"+r,se,re,de,new R(me+o.offsetX,ce+o.offsetY,C.width,C.height),pe,he);(m=b.maps.renderer.drawRectangle(ue)).setAttribute("visibility",e.dataLabelSettings.animationDuration>0||"Enable"===t.animationMode?"hidden":"visibile"),a.appendChild(m)}}(h=V(p,S,S.color||b.maps.themeStyle.dataLabelFontColor,a)).setAttribute("aria-label",w),h.setAttribute("role","region"),h.setAttribute("visibility",e.dataLabelSettings.animationDuration>0||"Enable"===t.animationMode?"hidden":"visibile"),J&&Y>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+W.x)*H+o.offsetX)+" "+((g.y+W.y)*H+L.height/2+o.offsetY)+" )"),a.appendChild(h)}b.dataLabelCollections.push({location:{x:g.x+o.offsetX,y:g.y+o.offsetY},element:(0,t.isNullOrUndefined)(D)?h:D,layerIndex:i,shapeIndex:k?u:r,labelIndex:k?u:r,dataLabelText:ee}),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)&&((0,t.isNullOrUndefined)(h)||(b.datalabelAnimate(h,x.animationDuration,S.opacity,!1),(0,t.isNullOrUndefined)(m)||b.datalabelAnimate(m,x.animationDuration,x.opacity,!0)))}}))}},e.prototype.datalabelAnimate=function(e,i,o,n){var a=0;new t.Animation({}).animate(e,{duration:0===i&&"Enable"===t.animationMode?1e3:i,delay:0,progress:function(t){t.timeStamp>t.delay&&(a=(t.timeStamp-t.delay)/t.duration,e.setAttribute("style","user-select: none; visibility: visible;"),e.setAttribute(n?"fill-opacity":"opacity",(o*a).toString()))},end:function(){e.style.visibility="visible",e.setAttribute(n?"fill-opacity":"opacity",o.toString())}})},e.prototype.getPoint=function(e,t){return"MultiLineString"===e.type?Array.prototype.forEach.call(e,(function(e){Array.prototype.forEach.call(e,(function(e){t.push(new _(e.point.x,e.point.y))}))})):Array.prototype.forEach.call(e,(function(e){t.push(new _(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}(),mo=function(){function e(e){this.maps=e}return e.prototype.renderNavigation=function(e,i,o){var n;if(!(0,t.isNullOrUndefined)(this.maps)){var a=void 0,l=e.navigationLineSettings,r=void 0,s=[],d=void 0,p=void 0,h=void 0,m=void 0,u=void 0,y=void 0,f=void 0,b=void 0,v=void 0,S=void 0,x=void 0,C=void 0,O=void 0,M=void 0,L=void 0,P=void 0,w=void 0,T=void 0,F=void 0;n=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].latitude,r=l[I].longitude,p=!(0,t.isNullOrUndefined)(l[I].visible)&&l[I].visible,h=(0,t.isNullOrUndefined)(l[I].angle)?0:l[I].angle,m=l[I].width||1,u=l[I].color,y=l[I].dashArray,C=l[I].arrowSettings,v=!(0,t.isNullOrUndefined)(C)&&C.showArrow,!(0,t.isNullOrUndefined)(r)&&!(0,t.isNullOrUndefined)(d)&&r.length===d.length&&p)for(var N=0;N<r.length;N++){var E=this.maps.isTileMap?g(new _(r[N],d[N]),i,this.maps.tileTranslatePoint,!0):c(d[N],r[N],i,e,this.maps);s.push(E)}T=this.maps.renderer.createGroup({id:this.maps.element.id+"_LayerIndex_"+o+"_NavigationGroup"+I});for(var z=0;z<s.length-1;z++){h=1<(h=-1>h?-1:h)?1:h;var B=this.maps.element.id+"_LayerIndex_"+o+"_NavigationIndex_"+I+"_Line"+z,A=this.convertRadius(s[z],s[z+1]);if(h<=1&&h>0&&(b=0,s[z].x>s[z+1].x&&(b=1)),h>=-1&&h<0&&(b=1,s[z].x>s[z+1].x&&(b=0)),v){S=C.color,x=(0,t.isNullOrUndefined)(C.size)?0:C.size,w=(0,t.isNullOrUndefined)(C.offSet)?0:C.offSet;var U=Math.round(x/2);M="Start"===(O=C.position)?"url(#triangle"+I+")":null,L="End"===O?"url(#triangle"+I+")":null,0!==P&&0===h&&(P="Start"===O?w:-w),P=(0,t.isNullOrUndefined)(P)?0:P;var j=this.maps.element.id+"_triangle",Z=this.maps.renderer.createDefs();Z.innerHTML+='<marker id="triangle'+I+'"></marker>';var R=Z.querySelector("#triangle"+I);R.setAttribute("markerWidth",x.toString()),R.setAttribute("markerHeight",x.toString()),R.setAttribute("refX",(U-P).toString()),R.setAttribute("refY",U.toString()),R.setAttribute("orient","auto"),f=new k(j,S,m,u,1,1,y,"M 0,0 L 0,"+x+" L "+U+", "+U+" Z"),a=this.maps.renderer.drawPath(f),R.appendChild(a),Z.appendChild(R),T.appendChild(Z)}if(F=0===(h=Math.abs(h))?"M "+s[z].x+","+s[z].y+"L "+s[z+1].x+","+s[z+1].y+" ":"M "+s[z].x+","+s[z].y+" A "+(A/2+(1-h)*A/(10*h))+" "+(A/2+(1-h)*A/(10*h))+" 0,0,"+b+" , "+s[z+1].x+","+s[z+1].y+" ",f=new k(B,"none",m,u,1,1,y,F),a=this.maps.renderer.drawPath(f),!(0,t.isNullOrUndefined)(O))"Start"===O?a.setAttribute("marker-start",M):a.setAttribute("marker-end",L);se(this.maps.selectedNavigationElementId,this.maps.navigationSelectionClass,a,"navigationlineselectionMapStyle"),T.appendChild(a),n.appendChild(T)}s=[]}}return n},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}(),co=function(){function e(e){this.legendBorderRect=new R(0,0,0,0),this.initialMapAreaRect=new R(0,0,0,0),this.legendTotalRect=new R(0,0,0,0),this.totalPages=[],this.page=0,this.currentPage=0,this.legendItemRect=new R(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,n){if(!(0,t.isNullOrUndefined)(i.shapeData)){var a=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(n,a,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(n,a,p,s,l,d,r))}}"Markers"===o.type&&e.getMarkersLegendCollections(n,i.markerSettings)})),this.legendCollection.length>0)for(var l=0;l<this.legendCollection.length;l++){var r=this.legendCollection[l],s={name:Vi,cancel:!1,fill:r.fill,shape:o.shape,shapeBorder:o.shapeBorder,text:"number"==typeof r.text?r.text.toString():r.text};i.trigger("legendRendering",s),r.fill=s.fill,r.shape=s.shape,r.shapeBorder=s.shapeBorder,r.text=s.text,s.cancel&&(this.legendCollection.splice(l,1),l--)}var d=i.legendSettings.title.text,p=i.legendSettings.titleStyle;if(this.legendCollection.length>0){var h,m,c=o.mode,u=0,g=0,y=0,f=0,b=o.shapePadding,v=o.shapeHeight,S=o.shapeWidth,x=[],C=[],O=o.position,_=o.labelDisplayMode,M="None"===o.orientation?"Top"===O||"Bottom"===O?"Horizontal":"Vertical":o.orientation,L=o.width.length>1?o.width.indexOf("%")>-1?i.availableSize.width/100*parseInt(o.width,10):parseInt(o.width,10):null,P=o.height.length>1?o.height.indexOf("%")>-1?i.availableSize.height/100*parseInt(o.height,10):parseInt(o.height,10):null,w=0,F=0,I=T(d,p);if("Interactive"===c){var k=o.textStyle,N=this.legendCollection.length,E="Horizontal"===M?(0,t.isNullOrUndefined)(L)?i.mapAreaRect.width/N:L/N:(0,t.isNullOrUndefined)(L)?25:L,z="Horizontal"===M?(0,t.isNullOrUndefined)(P)?25:P:(0,t.isNullOrUndefined)(P)?i.mapAreaRect.height/N:P/N;w=0,F=I.height+10;var B=o.labelPosition,A=0,U=0,j=10,Z=0,D=0,V=0,G=0;for(l=0;l<this.legendCollection.length;l++){w="Horizontal"===M?w+E:w,F="Horizontal"===M?F:F+z;var H=this.legendCollection[l].text,W=new n(0,0);if("None"===_?W=T(H,k):"Trim"===_?W=T(H=Ee("Horizontal"===M?E:z,H,k),k):H="","Left"===o.position||"Right"===o.position||"Float"===o.position)for(var q=0;q<this.legendCollection.length;q++){var X=T((r=this.legendCollection[q]).text,o.textStyle);this.textMaxWidth=Math.max(this.textMaxWidth,X.width)}V=Math.max(V,W.height),G=Math.max(G,W.width),W.width>0&&W.height>0&&("Horizontal"===M?(A=w+E/2,U="After"===B?F+z+W.height/2+j:F-j):(A="After"===B?w-this.textMaxWidth/2-j:w+E+this.textMaxWidth/2+j,U=F+z/2+W.height/4)),0===l?(Z="Horizontal"===M?w:"After"===B?A-this.textMaxWidth/2:w,D="Horizontal"===M?"After"===B?F:U-W.height/2:F,1===this.legendCollection.length&&(L="Horizontal"===M?Math.abs(w+E-Z):E+this.textMaxWidth+j,P="Horizontal"===M?z+V/2+j:Math.abs(F+z-D))):l===this.legendCollection.length-1&&(L="Horizontal"===M?Math.abs(w+E-Z):E+this.textMaxWidth+j,P="Horizontal"===M?z+V/2+j:Math.abs(F+z-D)),this.legendRenderingCollections.push({fill:this.legendCollection[l].fill,x:w,y:F,width:E,height:z,text:H,textX:A,textY:U,textWidth:W.width,textHeight:W.height,shapeBorder:this.legendCollection[l].shapeBorder})}1===this.legendCollection.length&&(P=V+j,L=E),this.legendItemRect={x:Z,y:D,width:L,height:P}}else{L=(0,t.isNullOrUndefined)(L)?i.mapAreaRect.width:L,P=(0,t.isNullOrUndefined)(P)?i.mapAreaRect.height:P;var Y=0;this.page=0;for(l=0;l<this.legendCollection.length;l++){r=this.legendCollection[l];(0,t.isNullOrUndefined)(this.totalPages[this.page])&&(this.totalPages[this.page]={Page:this.page+1,Collection:[]});X=T(r.text,o.textStyle);if(this.textMaxWidth=Math.max(this.textMaxWidth,X.width),0===l)w=u=10+S/2,F=g=a+I.height+(v>X.height?v/2:X.height/4);else{var J=X.height>v?X.height:v;if("Horizontal"===M){var Q=C[Y-1].x+C[Y-1].width+10+S;if(Q+b+X.width>L){var K=(C[Y-1].y>x[Y-1].y+v/2?C[Y-1].y:x[Y-1].y+v/2)+a;K+J>P?(this.getPageChanged(),Y=0,x=[],C=[],u=w,g=F):(u=x[0].x,g=K+J/2)}else u=Q-S/2,g=x[Y-1].y}else{var $=C[Y-1].y>x[Y-1].y+v/2?C[Y-1].y:x[Y-1].y+v/2;if($+a+J>P){var ee=C[Y-1].x+this.textMaxWidth+10;ee+b+X.width>L?(u=w,g=F,C=[],x=[],this.getPageChanged(),Y=0):(u=ee+S/2,g=x[0].y)}else{u=x[Y-1].x,g=$+10+v/2}}}y=u+S/2+b,f=g+X.height/4,x.push({x:u,y:g}),C.push({x:y,y:f,width:X.width,height:X.height/2}),this.totalPages[this.page].Collection.push({DisplayText:r.text,ImageSrc:r.imageSrc,Shape:{x:u,y:g},Text:{x:y,y:f},Fill:r.fill,legendShape:r.shape,shapeBorder:r.shapeBorder,idIndex:l,Rect:{x:x[Y].x-S/2,y:x[Y].y-v/2<f-X.height?x[Y].y-v/2:f-X.height,width:Math.abs(x[Y].x-S/2-(y+X.width)),height:v>X.height?v:X.height}}),Y++}var te=this.totalPages[0].Collection;Array.prototype.forEach.call(te,(function(t,i){var o=new R(t.Rect.x,t.Rect.y,t.Rect.width,t.Rect.height);0===i&&(h=o.x,m=o.y),e.widthIncrement=Math.max(e.widthIncrement,Math.abs(h-(o.x+o.width))),e.heightIncrement=Math.max(e.heightIncrement,Math.abs(m-(o.y+o.height)))})),L=this.widthIncrement<L?this.widthIncrement:L,P=this.heightIncrement<P?this.heightIncrement:P,this.legendItemRect={x:te[0].Rect.x,y:te[0].Rect.y,width:L,height:P}}}},e.prototype.getLegends=function(e,t,i,o,n,a,l){this.getRangeLegendCollection(e,t,i,o,n,a,l),this.getEqualLegendCollection(e,t,i,o,n,a,l),this.getDataLegendCollection(e,t,i,o,n,a,l)},e.prototype.getPageChanged=function(){this.page++,(0,t.isNullOrUndefined)(this.totalPages[this.page])&&(this.totalPages[this.page]={Page:this.page+1,Collection:[]})},e.prototype.legendTextTrim=function(e,t,i,o){var n=t,a=T(t,i).width,l=o-a;if(o>e)for(var r=t.length-1;r>=0;--r){if(l+(a=T(n=t.substring(0,r)+"...",i).width)<=e||n.length<4)return n.length<4&&(n=" "),n}return n},e.prototype.drawLegend=function(){var e,i=this.maps,o=i.legendSettings,n=i.renderer,a={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=n.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 R(d.x,d.y,d.width,d.height);0===l&&this.renderLegendBorder();var h=new _(d.textX,d.textY);a.color=null!==a.color?a.color:this.maps.themeStyle.legendTextColor;var m=new E(r,d.fill,d.shapeBorder,o.opacity,p);e=new I(s,h.x,h.y,"middle",d.text,"",""),a.fontFamily=(0,t.isNullOrUndefined)(a.fontFamily)?this.maps.themeStyle.fontFamily:a.fontFamily,a.size=a.size||i.themeStyle.legendFontSize;var c=V(e,a,a.color,this.legendGroup);c.setAttribute("aria-label",d.text),c.setAttribute("role","region");var u=n.drawRectangle(m);this.legendGroup.appendChild(u),!i.legendSettings.toggleLegendSettings.enable||"Layers"!==o.type&&"Markers"!==o.type||this.maintainLegendToggle(l,u,c),this.legendToggle()}else this.drawLegendItem(this.currentPage)},e.prototype.drawLegendItem=function(e){var i=this.maps,o=i.legendSettings,a=10,l=new n(o.shapeWidth,o.shapeHeight),r=i.renderer,s=o.shape;if(e>=0&&e<this.totalPages.length){Ye(this.legendGroup.id,this.maps.element.id)&&(0,t.remove)(Ye(this.legendGroup.id,this.maps.element.id));for(var d=0;d<this.totalPages[e].Collection.length;d++){var p=this.totalPages[e].Collection[d],h=p.shapeBorder,m=r.createGroup({id:i.element.id+"_Legend_Index_"+p.idIndex}),c=p.DisplayText,u="HorizontalLine"===o.shape||"VerticalLine"===o.shape||"Cross"===o.shape?(0,t.isNullOrUndefined)(o.fill)?"#000000":o.fill:h.color,g=("HorizontalLine"===o.shape||"VerticalLine"===o.shape||"Cross"===o.shape)&&0===h.width?1:h.width,y=i.element.id+"_Legend_Shape_Index_"+p.idIndex,f=i.element.id+"_Legend_Text_Index_"+p.idIndex,b=new _(p.Shape.x,p.Shape.y-4),v=new _(p.Text.x,p.Text.y-4),S=new k(y,p.Fill,g,u,o.opacity,(0,t.isNullOrUndefined)(h.opacity)?o.opacity:h.opacity,""),x={fontFamily:o.textStyle.fontFamily,fontStyle:o.textStyle.fontStyle,fontWeight:o.textStyle.fontWeight,size:o.textStyle.size,color:o.textStyle.color,opacity:o.textStyle.opacity};if(x.color=null!==x.color?x.color:this.maps.themeStyle.legendTextColor,x.fontFamily=(0,t.isNullOrUndefined)(x.fontFamily)?this.maps.themeStyle.fontFamily:x.fontFamily,x.size=x.size||i.themeStyle.legendFontSize,x.fontWeight=x.fontWeight||i.themeStyle.fontWeight,0===d&&this.renderLegendBorder(),"Markers"===o.type&&o.useMarkerShape){var C=this.legendCollection[p.idIndex].data[0],O=i.layers[C.layerIndex].markerSettings[C.markerIndex];s=(0,t.isNullOrUndefined)(O.dataSource[C.dataIndex][O.shapeValuePath])||""===O.dataSource[C.dataIndex][O.shapeValuePath]?O.shape:O.dataSource[C.dataIndex][O.shapeValuePath]}"Balloon"===s?m.appendChild(Me(i,S,l,{x:b.x,y:b.y+5},"Legend")):m.appendChild(rt(b,s,l,p.ImageSrc,S));var M=p.Rect.x+p.Rect.width;if(M>this.legendBorderRect.width)c=this.legendTextTrim(this.legendBorderRect.width,c,x,M);var L=V(new I(f,v.x,v.y,"start",c,"",""),x,x.color,m);if(L.setAttribute("aria-label",c),L.setAttribute("role","region"),this.legendGroup.appendChild(m),i.legendSettings.toggleLegendSettings.enable&&("Layers"===o.type||"Markers"===o.type)){var P=m.childNodes[0];this.maintainLegendToggle(p.idIndex,P,L)}if(d===this.totalPages[e].Collection.length-1){var w=void 0,F=a;if(0!==this.page){var N=e+1+"/"+this.totalPages.length,z=o.textStyle,B=T(N,z),A=this.legendItemRect.x+this.legendItemRect.width-B.width-20-20+2,U=this.legendItemRect.x+this.legendItemRect.width,j=U-F-B.width/2-5-4,Z=this.legendItemRect.y+this.legendItemRect.height+2.5+a;w=r.createGroup({id:i.element.id+"_Legend_Paging_Group"});var D=r.createGroup({id:i.element.id+"_Legend_Left_Paging_Group"}),G=r.createGroup({id:i.element.id+"_Legend_Right_Paging_Group"}),H=" M "+U+" "+Z+" L "+(U-F)+" "+(Z-5)+" L "+(U-F)+" "+(Z+5)+" z ",W=" M "+A+" "+Z+" L "+(A+F)+" "+(Z-5)+" L "+(A+F)+" "+(Z+5)+" z ",q=new k(i.element.id+"_Left_Page",this.maps.themeStyle.legendTextColor,0,this.maps.themeStyle.legendTextColor,e+1===1?.5:1,1,"",W);D.appendChild(r.drawPath(q));var X=new E(i.element.id+"_Left_Page_Rect","transparent",{},1,new R(A-5,Z-10,20,20),null,null,"",""),Y=r.drawRectangle(X);Y.setAttribute("aria-label","Navigate to the previous legend items"),Y.setAttribute("role","button"),Y.tabIndex=e+1===1?-1:i.tabIndex,e+1===1?(Y.style.cursor="default",Y.style.setProperty("outline","none")):(Y.style.cursor="pointer",Y.style.removeProperty("outline")),D.appendChild(Y),this.wireEvents(D);var J=new k(i.element.id+"_Right_Page",this.maps.themeStyle.legendTextColor,0,this.maps.themeStyle.legendTextColor,e+1===this.totalPages.length?.5:1,1,"",H);G.appendChild(r.drawPath(J));var Q=new E(i.element.id+"_Right_Page_Rect","transparent",{},1,new R(U-a-5,Z-10,20,20),null,null,"","");(Y=r.drawRectangle(Q)).setAttribute("aria-label","Navigate to the next legend items"),Y.setAttribute("role","button"),Y.tabIndex=e+1===this.totalPages.length?-1:i.tabIndex,e+1===this.totalPages.length?(Y.style.cursor="default",Y.style.setProperty("outline","none")):(Y.style.cursor="pointer",Y.style.removeProperty("outline")),G.appendChild(Y),this.wireEvents(G),w.appendChild(D),w.appendChild(G);var K={id:i.element.id+"_Paging_Text",x:j,y:Z+B.height/4,fill:this.maps.themeStyle.legendTextColor,"font-size":"14px","font-style":z.fontStyle,"font-family":z.fontFamily,"font-weight":z.fontWeight,"text-anchor":"middle",transform:"",opacity:1,"dominant-baseline":""},$=r.createText(K,N);$.style.cssText="user-select: none;",$.setAttribute("aria-label",N),$.setAttribute("role","region"),w.appendChild($),this.legendGroup.appendChild(w)}this.legendToggle()}}}},e.prototype.maintainLegendToggle=function(e,i,o){if(this.maps.legendSettings.toggleLegendSettings.enable&&!(0,t.isNullOrUndefined)(this.maps.toggledLegendId)&&this.maps.toggledLegendId.indexOf(e)>-1&&!(0,t.isNullOrUndefined)(this.maps.toggledElementId)&&this.maps.toggledElementId.length>0){var n=this.legendCollection[e].data;if(this.maps.legendSettings.toggleLegendSettings.applyShapeSettings){var a=n[n.length-1].layerIndex;this.setToggleAttributes(o,i,this.maps.layers[a].shapeSettings.fill,this.maps.layers[a].shapeSettings.opacity,this.maps.layers[a].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor,(0,t.isNullOrUndefined)(this.maps.layers[a].shapeSettings.border.width)?0:this.maps.layers[a].shapeSettings.border.width,(0,t.isNullOrUndefined)(this.maps.layers[a].shapeSettings.border.opacity)?this.maps.layers[a].shapeSettings.opacity:this.maps.layers[a].shapeSettings.border.opacity,this.maps.layers[a].shapeSettings.fill)}else this.setToggleAttributes(o,i,this.maps.legendSettings.toggleLegendSettings.fill,this.maps.legendSettings.toggleLegendSettings.opacity,this.maps.legendSettings.toggleLegendSettings.border.color,this.maps.legendSettings.toggleLegendSettings.border.width,(0,t.isNullOrUndefined)(this.maps.legendSettings.toggleLegendSettings.border.opacity)?this.maps.legendSettings.toggleLegendSettings.opacity:this.maps.legendSettings.toggleLegendSettings.border.opacity,this.maps.legendSettings.toggleLegendSettings.fill);n._isVisible=!1}},e.prototype.legendHighLightAndSelection=function(e,i){var o,n,a,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=!(0,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,C=void 0,O=void 0;if((0,t.isNullOrUndefined)(S)||(x="selection"===i?S.selectionSettings.enable:S.highlightSettings.enable,C=void 0,C="selection"===i?S.selectionSettings:S.highlightSettings,O=d[b].data),x)for(var _=0;_<O.length;_++){var M=void 0;if(o=O[_].shapeIndex,n=O[_].layerIndex,a=O[_].dataIndex,null!==(M=-1===(l=O[_].pointIndex)?document.getElementById(this.maps.element.id+"_LayerIndex_"+n+"_shapeIndex_"+o+"_dataIndex_"+a):document.getElementById(this.maps.element.id+"_LayerIndex_"+n+"_shapeIndex_"+o+"_dataIndex_"+a+"_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,F=M.getAttribute("fill"),I=M.getAttribute("fill-opacity");this.legendHighlightCollection[r-1].shapeOldFillColor.push(F),this.legendHighlightCollection[r-1].shapeOldOpacity=I;var k=this.legendHighlightCollection[r-1].shapeOldFillColor[T],N=this.legendHighlightCollection[r-1].shapeOldOpacity;this.shapePreviousColor=this.legendHighlightCollection[r-1].shapeOldFillColor,this.setColor(M,(0,t.isNullOrUndefined)(C.fill)?k:C.fill,(0,t.isNullOrUndefined)(C.opacity)?N:C.opacity.toString(),C.border.color,C.border.width.toString(),"highlight"),this.setColor(e,(0,t.isNullOrUndefined)(C.fill)?w:C.fill,(0,t.isNullOrUndefined)(C.opacity)?N:C.opacity.toString(),C.border.color,C.border.width.toString(),"highlight")}else if("selection"===i){this.legendHighlightCollection=[],this.maps.legendSelectionClass=C,0===_&&(this.pushCollection(e,this.maps.legendSelectionCollection,d[b],S.shapeSettings),p||0===this.maps.selectedLegendElementId.length||(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,(0,t.isNullOrUndefined)(C.fill)?E:C.fill,C.opacity.toString(),C.border.color,C.border.width.toString(),"selection"),this.setColor(M,(0,t.isNullOrUndefined)(C.fill)?E:C.fill,C.opacity.toString(),C.border.color,C.border.width.toString(),"selection"),-1===this.maps.selectedElementId.indexOf(M.getAttribute("id"))&&this.maps.selectedElementId.push(M.getAttribute("id")),_===O.length-1&&(this.maps.legendSelection=!1,this.removeLegend(this.maps.legendSelectionCollection))}}}}}},e.prototype.setColor=function(e,t,i,o,n,a){var l=e.parentElement.id.indexOf("LineString")>-1;"selection"===a?(pe(l?"LineselectionMap":"ShapeselectionMap",l?"LineselectionMapStyle":"ShapeselectionMapStyle",l?"transparent":t,i,l?t:o,n,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(n)/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||this.maps.themeStyle.shapeBorderColor,shapeOldBorderWidth:o.border.width});var n=t.length;t[n-1].MapShapeCollection={Elements:[]},t[n-1].shapeOldFillColor=[],t[n-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 n=o.MapShapeCollection.Elements.length,a=0;a<n;a++){var l=-1!==o.legendOldFill.indexOf("url")?o.shapeOldFillColor[a]:o.legendOldFill,r=(0,t.isNullOrUndefined)(o.shapeOldOpacity)?o.shapeOpacity:o.shapeOldOpacity;this.setColor(o.MapShapeCollection.Elements[a],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){et(e);for(var t=this.shapesOfLegend(e),i=t.length,o=0;o<i;o++){var n=He(t[o]);if("ShapeselectionMapStyle"===n.getAttribute("class")||"LineselectionMapStyle"===n.getAttribute("class")){et(n);var a=this.maps.selectedElementId.indexOf(n.id);-1!==a&&this.maps.selectedElementId.splice(a,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,n,a){if(void 0!==i){this.updateLegendElement(),this.shapeToggled=!0;var l=this.maps.legendModule.legendCollection,r=this.legendIndexOnShape(i,a),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"!==n||this.maps.layers[a].selectionSettings.enableMultiSelect||"ShapeselectionMapStyle"===e.getAttribute("class")||(this.maps.legendSelection=!1),"selection"!==n||this.maps.layers[a].selectionSettings.enableMultiSelect||this.maps.legendSelection||(this.removeAllSelections(),this.maps.legendSelection=!0),void 0===r.currentIndex){if("selection"===n&&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[a].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"===n&&b){(void 0===(S=this.isTargetSelected(s,this.shapeHighlightCollection))||S&&!S.IsSelected)&&this.pushCollection(y,this.shapeHighlightCollection,l[r.actualIndex],this.maps.layers[a].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,(0,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,(0,t.isNullOrUndefined)(o.fill)?y.getAttribute("fill"):o.fill,(0,t.isNullOrUndefined)(o.opacity)?"1":o.opacity.toString(),o.border.color,o.border.width.toString(),"highlight")}else if("selection"===n){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],C=this.maps.selectedLegendElementId.indexOf(r.actualIndex);this.maps.selectedLegendElementId.splice(C,1),this.maps.legendSelectionCollection.splice(v,1),et(x.legendElement),this.maps.shapeSelections=!0,v=0}if(S&&S.IsSelected&&("ShapeselectionMapStyle"===e.getAttribute("class")||"LineselectionMapStyle"===e.getAttribute("class"))){var O=0;if(o.enableMultiSelect)for(m=0;m<s.Elements.length;m++)e.getAttribute("class")===s.Elements[m].getAttribute("class")&&O++;O<=1&&(o.enableMultiSelect||this.maps.legendSelection)&&(this.maps.selectedLegendElementId.splice(this.maps.selectedLegendElementId.indexOf(r.actualIndex),1),(0,t.isNullOrUndefined)(s.LegendEle)||et(s.LegendEle),this.maps.legendSelectionCollection.splice(S.SelectionIndex,1),this.maps.shapeSelections=!0)}else{if((void 0===S||S&&!S.IsSelected)&&!(0,t.isNullOrUndefined)(y))-1===(M=this.getIndexofLegend(this.maps.legendSelectionCollection,y))&&this.pushCollection(y,this.maps.legendSelectionCollection,l[r.actualIndex],this.maps.layers[a].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),!(0,t.isNullOrUndefined)(y)){this.setColor(y,(0,t.isNullOrUndefined)(o.fill)?y.getAttribute("fill"):o.fill,(0,t.isNullOrUndefined)(o.opacity)?"1":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(),et(document.getElementsByClassName("highlightMapStyle")[0]))}}else this.removeShapeHighlightCollection()},e.prototype.isTargetSelected=function(e,i){for(var o,n=0;n<i.length;n++)(0,t.isNullOrUndefined)(e.LegendEle.getAttribute("id"))||e.LegendEle.getAttribute("id")!==i[n].legendElement.getAttribute("id")||(o={IsSelected:!0,SelectionIndex:n});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++){et(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],n=document.getElementById(o);(0,t.isNullOrUndefined)(n)||et(document.getElementById(o))}this.maps.legendSelectionCollection=[],this.maps.selectedLegendElementId=[],this.maps.selectedElementId=[]},e.prototype.legendIndexOnShape=function(e,i){var o,n,a,l=e[this.maps.layers[i].shapeDataPath],r=this.maps.legendSettings.mode,s=this.maps.legendModule.legendCollection;"Default"===r&&!(0,t.isNullOrUndefined)(this.maps.legendModule.totalPages)&&this.maps.legendModule.totalPages.length>0&&(a=this.maps.legendModule.totalPages[this.maps.legendModule.currentPage].Collection);for(var d="Default"!==r||(0,t.isNullOrUndefined)(a)?1:a.length,p=0;p<s.length;p++){for(var h=s[p].data,m=0;m<d;m++)if("Default"!==r||s[p].text===a[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&&(n=p)}return{currentIndex:o,actualIndex:n}},e.prototype.shapeDataOnLegend=function(e){for(var i,o,n,a,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,n=d[c].dataIndex,e===(u=-1===(a=d[c].pointIndex)?document.getElementById(this.maps.element.id+"_LayerIndex_"+o+"_shapeIndex_"+i+"_dataIndex_"+n):document.getElementById(this.maps.element.id+"_LayerIndex_"+o+"_shapeIndex_"+i+"_dataIndex_"+n+"_multiLine_"+a))&&(p=!0),h.push(u)}if(p)return(0,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,n,a,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,n=r[d].dataIndex,p=-1===(a=r[d].pointIndex)?document.getElementById(this.maps.element.id+"_LayerIndex_"+o+"_shapeIndex_"+i+"_dataIndex_"+n):document.getElementById(this.maps.element.id+"_LayerIndex_"+o+"_shapeIndex_"+i+"_dataIndex_"+n+"_multiLine_"+a),(0,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 n="Interactive"===i.mode?this.maps.element.id+"_Legend_Index_":this.maps.element.id+"_Legend_Shape_Index_",a=e.svgObject.querySelector("#"+n+this.maps.selectedLegendElementId[o]);if(!(0,t.isNullOrUndefined)(a)){var l=(0,t.isNullOrUndefined)(this.maps.legendSelectionClass.fill)?a.getAttribute("fill"):this.maps.legendSelectionClass.fill;this.setColor(a,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===a.id&&(this.maps.legendSelectionCollection[r].legendElement=a);if(-1===this.getIndexofLegend(this.maps.legendSelectionCollection,a)){var s=this.maps.legendModule.legendCollection[this.maps.selectedLegendElementId[o]].data[o].layerIndex;this.pushCollection(a,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);(0,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);(0,t.isNullOrUndefined)(m)||m.setAttribute("fill","#E5E5E5")}},e.prototype.renderLegendBorder=function(){var e=this.maps,i=e.legendSettings,o=i.title.text,n={fontFamily:i.titleStyle.fontFamily,fontStyle:i.titleStyle.fontStyle,fontWeight:i.titleStyle.fontWeight,size:i.titleStyle.size,color:i.titleStyle.color,opacity:i.titleStyle.opacity},a=10,l=Ee(this.legendItemRect.width+20,o,n),r=T(l,n);this.legendBorderRect=new R(this.legendItemRect.x-a,this.legendItemRect.y-a-r.height,this.legendItemRect.width+20,this.legendItemRect.height+20+r.height+("Interactive"===i.mode?0:0!==this.page?a:0));var s={color:i.border.color||this.maps.themeStyle.legendBorderColor,opacity:i.border.opacity,width:i.border.width||this.maps.themeStyle.legendBorderWidth};s.opacity=(0,t.isNullOrUndefined)(s.opacity)?1:s.opacity;var d=new E(e.element.id+"_Legend_Border",i.background,s,1,this.legendBorderRect,null,null,"","");if(this.legendGroup.appendChild(e.renderer.drawRectangle(d)),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){n.color=null!==n.color?n.color:this.maps.themeStyle.legendTitleFontColor,n.fontFamily=(0,t.isNullOrUndefined)(n.fontFamily)?this.maps.themeStyle.fontFamily:n.fontFamily,n.size=(0,t.isNullOrUndefined)(n.size)?this.maps.themeStyle.subTitleFontSize||St.legendTitleFont.size:n.size,n.fontWeight=(0,t.isNullOrUndefined)(n.fontWeight)?this.maps.themeStyle.titleFontWeight||St.legendTitleFont.fontWeight:n.fontWeight;var p=V(new I(e.element.id+"_LegendTitle",this.legendItemRect.x+this.legendItemRect.width/2,this.legendItemRect.y-r.height/2-5,"middle",l,""),n,n.color,this.legendGroup);p.setAttribute("aria-label",o),p.setAttribute("role","region")}},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),(0,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)),Ye(this.maps.element.id+"_Legend_Border",this.maps.element.id)&&(Ye(this.maps.element.id+"_Legend_Border",this.maps.element.id).style.pointerEvents="none")},e.prototype.getLegendAlignment=function(e,i,o,n){var a,l,r,s=10,d=(r=(0,t.extend)({},e.mapAreaRect,r,!0)).x,p=r.y,h=r.height,m=r.width,c=e.availableSize.width,u=e.availableSize.height,g=(0,t.isNullOrUndefined)(n.location.x)?0:"string"==typeof n.location.x&&n.location.x.indexOf("%")>-1?e.availableSize.width/100*parseFloat(n.location.x):"string"==typeof n.location.x?parseFloat(n.location.x):n.location.x,y=(0,t.isNullOrUndefined)(n.location.y)?0:"string"==typeof n.location.y&&n.location.y.indexOf("%")>-1?e.availableSize.height/100*parseFloat(n.location.y):"string"==typeof n.location.y?parseFloat(n.location.y):n.location.y;if("Float"===n.position)this.translate=e.isTileMap?new _(g,y+2.5):new _(g+e.mapAreaRect.x,y+e.mapAreaRect.y),this.legendTotalRect=e.mapAreaRect;else{switch(n.position){case"Top":case"Bottom":r.height="Top"===n.position?h-o:h-o-20,a=c/2-i/2,l="Top"===n.position?p:p+r.height,r.y="Top"===n.position?p+o+(e.isTileMap?5:s):p-5;break;case"Left":case"Right":r.width=m-i-e.mapAreaRect.x,a="Left"===n.position?d+5:d+r.width+s,l=u/2-o/2,r.x="Left"===n.position?d+i+s:d}switch(n.alignment){case"Near":"Top"===n.position||"Bottom"===n.position?a=r.x-("Interactive"===n.mode?s:0):l=r.y-(n.height&&n.width||"Interactive"!==n.mode?0:e.mapAreaRect.x);break;case"Far":"Top"===n.position||"Bottom"===n.position?a=c-i-("Interactive"===n.mode?0:s):l=u-o-("Default"===n.mode?s:0)}(n.height||n.width)&&"Interactive"!==n.mode?this.legendTotalRect=e.mapAreaRect=e.totalRect=r:(e.totalRect=null,(n.height||n.width)&&"Interactive"===n.mode&&(e.totalRect=r),this.legendTotalRect=e.mapAreaRect=r),"Left"===n.position&&(e.mapAreaRect.width=r.width),this.translate=new _(a,l)}},e.prototype.getMarkersLegendCollections=function(e,i){var o=this;Array.prototype.forEach.call(i,(function(i,n){var a=i.dataSource,l=i.legendText;Array.prototype.forEach.call(a,(function(a,r){var s=!!(0,t.isNullOrUndefined)(a[o.maps.legendSettings.showLegendPath])||a[o.maps.legendSettings.showLegendPath];if(i.visible&&s&&!(0,t.isNullOrUndefined)(a.latitude)&&!(0,t.isNullOrUndefined)(a.longitude)){if(i.template){var d=Ge(i.template,o.maps)(o.maps);((0,t.isNullOrUndefined)(d.childElementCount)?d[0]:d).querySelector("img").src}var p=(0,t.isNullOrUndefined)(a[l])?"":a[l],h=(0,t.isNullOrUndefined)(i.colorValuePath)?i.fill:a[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:n,dataIndex:r,value:h,name:p,shape:(0,t.isNullOrUndefined)(i.shapeValuePath)||(0,t.isNullOrUndefined)(a[i.shapeValuePath])||""===a[i.shapeValuePath]?o.maps.legendSettings.useMarkerShape?i.shape:o.maps.legendSettings.shape:a[i.shapeValuePath]}),o.getOverallLegendItemsCollection(p,h,m,s))}}))}))},e.prototype.getMarkerLegendData=function(e,i,o){var n=this,a=[];return this.maps.layers[e].markerSettings.map((function(l,r){var s=l.dataSource;Array.prototype.forEach.call(s,(function(l,s){var d=n.maps.layers[e].markerSettings[r];i!==l[d.legendText]&&""!==i||o!==(l[d.colorValuePath]||d.fill)||a.push({layerIndex:e,markerIndex:r,dataIndex:s,value:o,name:i,shape:(0,t.isNullOrUndefined)(d.shapeValuePath)?d.shape:l[d.shapeValuePath]})}))})),a},e.prototype.getRangeLegendCollection=function(e,i,o,n,a,l,r){for(var s,d=this,p=0,h=this.maps.legendSettings.fill,m=[],c=function(o){if(!(0,t.isNullOrUndefined)(o.from)&&!(0,t.isNullOrUndefined)(o.to)){s=(0,t.isNullOrUndefined)(o.label)?o.from+" - "+o.to:o.label,m=[];var c=!1;!(0,t.isNullOrUndefined)(n)&&n.length>0&&Array.prototype.forEach.call(n,(function(t,n){var s=l.indexOf(".")>-1?Number(Y(t,l)):parseFloat(t[l]);s>=o.from&&s<=o.to&&(c=!0,m.push(d.getLegendData(e,n,t,a,i,r,s)))})),c||m.push({layerIndex:e,shapeIndex:null,dataIndex:null,name:null,value:null});var g=(0,t.isNullOrUndefined)(h)?"[object Array]"===Object.prototype.toString.call(o.color)?(0,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 n=[],a=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++)n.push(r[s]);else n.push(i[l]);n._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(n[0]);else this.legendCollection.push({text:e,fill:t,data:n,opacity:a.opacity,borderColor:a.shapeBorder.color,borderWidth:a.shapeBorder.width})}},e.prototype.removeDuplicates=function(e,t,i){for(var o=!1,n=0;n<e.length;n++)if((e[n].text===t||""===e[n].text)&&e[n].fill===i){o=!0;break}return o},e.prototype.getEqualLegendCollection=function(e,i,o,n,a,l,r){for(var s,d=this,p=this.maps.legendSettings.fill,h=[],m=[],c=[],u=[],g=function(g){if((0,t.isNullOrUndefined)(g.value)){if((0,t.isNullOrUndefined)(g.minOpacity)&&(0,t.isNullOrUndefined)(g.maxOpacity)&&(0,t.isNullOrUndefined)(g.value)&&(0,t.isNullOrUndefined)(g.from)&&(0,t.isNullOrUndefined)(g.to)&&!(0,t.isNullOrUndefined)(g.color)){if(Array.prototype.forEach.call(n,(function(t,o){for(var n=l.indexOf(".")>-1?Y(t,l):t[l],s=0;s<c.length;s++)n===c[s]&&u.push(d.getLegendData(e,o,t,a,i,r,n))})),0===c.length){var f=!1;Array.prototype.forEach.call(n,(function(n,s){f=!1;for(var p=n[l],h=0;h<o.length;h++)(0,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,n,a,i,r,p))}))}s=(0,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=(0,t.isNullOrUndefined)(g.label)?g.value:g.label,m=[];var v=!1;!(0,t.isNullOrUndefined)(n)&&n.length>0&&Array.prototype.forEach.call(n,(function(t,o){var n=l&&l.indexOf(".")>-1?Y(t,l):t[l];n===g.value?(v=!0,-1===h.indexOf(n)&&h.push(n),m.push(d.getLegendData(e,o,t,a,i,r,n))):-1===c.indexOf(n)&&c.push(n)}));for(var S=0;S<h.length;S++)for(var x=0;x<c.length;x++)if(h[S]===c[x]){var C=c.indexOf(h[S]);c.splice(C,1)}v||m.push({layerIndex:e,shapeIndex:null,dataIndex:null,name:null,value:null});var O=(0,t.isNullOrUndefined)(p)?"[object Array]"===Object.prototype.toString.call(g.color)?g.color[0]:g.color:p;y.getOverallLegendItemsCollection(s,O,m,g.showLegend)}},y=this,f=0,b=o;f<b.length;f++){g(b[f])}},e.prototype.getDataLegendCollection=function(e,i,o,n,a,l,r){var s,d=this,p=this.maps.legendSettings.fill,h=this.maps.legendSettings.valuePath;(0,t.isNullOrUndefined)(l)||(0,t.isNullOrUndefined)(n)||Array.prototype.forEach.call(n,(function(n,m){var c=!!(0,t.isNullOrUndefined)(d.maps.legendSettings.showLegendPath)||!(0,t.isNullOrUndefined)(n[d.maps.legendSettings.showLegendPath])&&n[d.maps.legendSettings.showLegendPath],u=l.indexOf(".")>-1?Y(n,l):n[l],g=[],y=(0,t.isNullOrUndefined)(p)?u:p;(0,t.isNullOrUndefined)(u)||0!==o.length||(0,t.isNullOrUndefined)(h)&&(0,t.isNullOrUndefined)(a)||(s=(0,t.isNullOrUndefined)(n[h])?a.indexOf(".")>-1?Y(n,a):n[a]:h.indexOf(".")>-1?Y(n,h):n[h],g.push(d.getLegendData(e,m,n,a,i,r,u))),d.getOverallLegendItemsCollection(s,y,g,c)}))},e.prototype.interactiveHandler=function(e){var i=e.target,o=this.maps.legendSettings,n=this.maps.element.id+"_Interactive_Legend",a="Layers"===o.type?"_shapeIndex_":"Markers"===o.type?"_MarkerIndex_":"_BubbleIndex_";if(i.id.indexOf(a)>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;(0,t.isNullOrUndefined)(Ye(n,this.maps.element.id))||(0,t.remove)(Ye(n,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=Ye(this.maps.element.id+"_Legend_Index_"+u,this.maps.element.id),f=y.getBoundingClientRect(),b=new R(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,!(0,t.isNullOrUndefined)(g.data))for(var v=g.data,S=function(e){if(r===v[e].dataIndex&&l===v[e].layerIndex){x.renderInteractivePointer(o,s,d,n,p,b);var i=Ye(n,x.maps.element.id);return x.maps.isDevice&&!(0,t.isNullOrUndefined)(i)&&(clearTimeout(x.arrowTimer),x.arrowTimer=setTimeout((function(){(0,t.isNullOrUndefined)(i.parentNode)||(0,t.remove)(i)}),2e3)),"break"}},x=this,C=0;C<v.length;C++){if("break"===S(C))break}}}else(0,t.isNullOrUndefined)(Ye(n,this.maps.element.id))||(0,t.remove)(Ye(n,this.maps.element.id))},e.prototype.renderInteractivePointer=function(e,t,i,o,n,a){var l,r,s,d=10,p=10,h="None"===e.orientation?"Top"===e.position||"Bottom"===e.position?"Horizontal":"Vertical":e.orientation;a.y="Float"===e.position&&this.maps.isTileMap?a.y-this.maps.mapAreaRect.y:a.y,l="Horizontal"===h?e.invertedPointer?" M "+(r=a.x+a.width/2-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(s=a.y+a.height)+" L "+(r-p)+" "+(s+d)+" L "+(r+p)+" "+(s+d)+" Z ":" M "+(r=a.x+a.width/2-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(s=a.y)+" L "+(r-p)+" "+(s-d)+" L "+(r+p)+" "+(s-d)+" Z ":e.invertedPointer?" M "+(r=a.x-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(s=a.y+a.height/2)+" L "+(r-p)+" "+(s-d)+" L "+(r-p)+" "+(s+d)+" z ":" M "+(r=a.x+a.width-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(s=a.y+a.height/2)+" L "+(r+p)+" "+(s-d)+" L "+(r+p)+" "+(s+d)+" z ";var m=new k(o,t,n,i,1,1,"",l);"Float"===e.position&&this.maps.isTileMap?this.maps.mapLayerPanel.layerGroup.appendChild(this.maps.renderer.drawPath(m)):this.maps.svgObject.appendChild(this.maps.renderer.drawPath(m))},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(yi,this.legendClick,this))},e.prototype.markerToggleSelection=function(e,i,o,n){e.setAttribute("fill",this.legendCollection[n].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",((0,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());var a=this.maps.toggledElementId.indexOf(e.id);-1!==a&&this.maps.toggledElementId.splice(a,1)},e.prototype.bubbleToggleSelection=function(e,i,o,n){e.setAttribute("fill",this.legendCollection[n].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",((0,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,n=this.maps.legendSettings.toggleLegendSettings.fill,a=this.maps.legendSettings.toggleLegendSettings.opacity,l=this.maps.legendSettings.toggleLegendSettings.border.color,r=this.maps.legendSettings.toggleLegendSettings.border.width,s=(0,t.isNullOrUndefined)(this.maps.legendSettings.toggleLegendSettings.border.opacity)?this.maps.legendSettings.toggleLegendSettings.opacity:this.maps.legendSettings.toggleLegendSettings.border.opacity;if(!(0,t.isNullOrUndefined)(e.parentNode)&&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?Ye(this.maps.element.id+"_LayerIndex_"+m.layerIndex+"_BubbleIndex_"+u+"_dataIndex_"+m.dataIndex,this.maps.element.id):Ye(this.maps.element.id+"_LayerIndex_"+m.layerIndex+"_MarkerIndex_"+m.markerIndex+"_dataIndex_"+m.dataIndex,this.maps.element.id),(0,t.isNullOrUndefined)(m.shape)||"Balloon"!==m.shape||(d=(d="Bubbles"===this.maps.legendSettings.type?Ye(this.maps.element.id+"_LayerIndex_"+m.layerIndex+"_BubbleIndex_"+u+"_dataIndex_"+m.dataIndex+"_Group",this.maps.element.id):Ye(this.maps.element.id+"_LayerIndex_"+m.layerIndex+"_MarkerIndex_"+m.markerIndex+"_dataIndex_"+m.dataIndex+"_Group",this.maps.element.id)).children[0]);var y=this.maps.toggledLegendId.indexOf(p);if(h&&null!==d){if(this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(d.setAttribute("fill",this.maps.layers[c].shapeSettings.fill),d.setAttribute("stroke",this.maps.layers[c].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor),d.setAttribute("fill-opacity",this.maps.layers[c].shapeSettings.opacity.toString()),d.setAttribute("stroke-width",((0,t.isNullOrUndefined)(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width).toString()),d.setAttribute("stroke-opacity",((0,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",n),d.setAttribute("fill-opacity",a.toString()),d.setAttribute("stroke",l),d.setAttribute("stroke-width",r.toString()),d.setAttribute("stroke-opacity",s.toString())),"Markers"===this.maps.legendSettings.type)-1===y&&this.maps.toggledLegendId.push(p),-1===this.maps.toggledElementId.indexOf(d.id)&&this.maps.toggledElementId.push(d.id);null!==e&&(i=Ye(this.maps.element.id+"_Legend_Shape_Index_"+p,this.maps.element.id),o=Ye(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||this.maps.themeStyle.shapeBorderColor,(0,t.isNullOrUndefined)(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width,(0,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,n,a,l,r,s,n))}else"Markers"===this.maps.legendSettings.type?(-1!==y&&0===g&&this.maps.toggledLegendId.splice(y,1),this.markerToggleSelection(d,c,u,p)):this.bubbleToggleSelection(d,c,u,p),null!==e&&(i=Ye(this.maps.element.id+"_Legend_Shape_Index_"+p,this.maps.element.id),o=Ye(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,this.maps.legendSettings.textStyle.color),"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 f=void 0;this.removeCollections(e,p),-1!==(y=this.maps.toggledLegendId.indexOf(p))&&(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!==(f=Ye(this.maps.element.id+"_LayerIndex_"+m.layerIndex+"_shapeIndex_"+m.shapeIndex+"_dataIndex_"+m.dataIndex,this.maps.element.id))){var b=this.maps.toggledElementId.indexOf(f.id);h?(0===g&&this.maps.toggledLegendId.push(p),-1===b&&this.maps.toggledElementId.push(f.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(f.setAttribute("fill",this.maps.layers[u].shapeSettings.fill),f.setAttribute("fill-opacity",this.maps.layers[u].shapeSettings.opacity.toString()),f.setAttribute("stroke",this.maps.layers[u].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor),f.setAttribute("stroke-width",((0,t.isNullOrUndefined)(this.maps.layers[u].shapeSettings.border.width)?0:this.maps.layers[u].shapeSettings.border.width).toString()),f.setAttribute("stroke-opacity",((0,t.isNullOrUndefined)(this.maps.layers[u].shapeSettings.border.opacity)?this.maps.layers[u].shapeSettings.opacity:this.maps.layers[u].shapeSettings.border.opacity).toString())):(f.setAttribute("fill",n),f.setAttribute("fill-opacity",a.toString()),f.setAttribute("stroke",l),f.setAttribute("stroke-width",r.toString()),f.setAttribute("stroke-opacity",s.toString())),null!==e&&(o=Ye(this.maps.element.id+"_Legend_Text_Index_"+p,this.maps.element.id),i=Ye(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||this.maps.themeStyle.shapeBorderColor,(0,t.isNullOrUndefined)(this.maps.layers[u].shapeSettings.border.width)?0:this.maps.layers[u].shapeSettings.border.width,(0,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,n,a,l,r,s,n))):(-1!==y&&0===g&&this.maps.toggledLegendId.splice(y,1),-1!==b&&this.maps.toggledElementId.splice(b,1),f.setAttribute("fill",this.legendCollection[p].fill),f.setAttribute("stroke-opacity",((0,t.isNullOrUndefined)(this.maps.layers[u].shapeSettings.border.opacity)?this.maps.layers[u].shapeSettings.opacity:this.maps.layers[u].shapeSettings.border.opacity).toString()),f.setAttribute("stroke-width",((0,t.isNullOrUndefined)(this.maps.layers[u].shapeSettings.border.width)?0:this.maps.layers[u].shapeSettings.border.width).toString()),f.setAttribute("fill-opacity",this.maps.layers[u].shapeSettings.opacity.toString()),f.setAttribute("stroke",this.maps.layers[u].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor),null!==e&&(o=Ye(this.maps.element.id+"_Legend_Text_Index_"+p,this.maps.element.id),i=Ye(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(!(0,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(y=this.maps.toggledLegendId.indexOf(p),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++)if(x=this.legendCollection[p].data[g],S="Bubbles"===this.maps.legendSettings.type?Ye(this.maps.element.id+"_LayerIndex_"+x.layerIndex+"_BubbleIndex_"+u+"_dataIndex_"+x.dataIndex,this.maps.element.id):Ye(this.maps.element.id+"_LayerIndex_"+x.layerIndex+"_MarkerIndex_"+u+"_dataIndex_"+x.dataIndex,this.maps.element.id),(0,t.isNullOrUndefined)(x.shape)||"Balloon"!==x.shape||(S=(S="Bubbles"===this.maps.legendSettings.type?Ye(this.maps.element.id+"_LayerIndex_"+x.layerIndex+"_BubbleIndex_"+u+"_dataIndex_"+x.dataIndex+"_Group",this.maps.element.id):Ye(this.maps.element.id+"_LayerIndex_"+x.layerIndex+"_MarkerIndex_"+u+"_dataIndex_"+x.dataIndex+"_Group",this.maps.element.id)).children[0]),h&&null!==S){if("Markers"===this.maps.legendSettings.type)-1===y&&this.maps.toggledLegendId.push(p),-1===this.maps.toggledElementId.indexOf(S.id)&&this.maps.toggledElementId.push(S.id);this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(S.setAttribute("fill",this.maps.layers[c].shapeSettings.fill),S.setAttribute("stroke",this.maps.layers[c].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor),S.setAttribute("stroke-width",((0,t.isNullOrUndefined)(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width).toString()),S.setAttribute("stroke-opacity",((0,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",n),S.setAttribute("fill-opacity",a.toString()),S.setAttribute("stroke",l),S.setAttribute("stroke-width",r.toString()),S.setAttribute("stroke-opacity",s.toString())),null!==e&&(o=Ye(this.maps.element.id+"_Legend_Index_"+p+"_Text",this.maps.element.id),i=Ye(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||this.maps.themeStyle.shapeBorderColor,(0,t.isNullOrUndefined)(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width,(0,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,n,a,l,r,s,n))}else"Markers"===this.maps.legendSettings.type?(-1!==y&&0===g&&this.maps.toggledLegendId.splice(y,1),this.markerToggleSelection(S,c,u,p)):this.bubbleToggleSelection(S,c,u,p),null!==e&&((i=Ye(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=Ye(this.maps.element.id+"_Legend_Index_"+p+"_Text",this.maps.element.id)).setAttribute("fill",this.maps.legendSettings.textStyle.color));v._isVisible=!h}if("Layers"===this.maps.legendSettings.type&&this.maps.legendSettings.toggleLegendSettings.enable){var C=void 0;this.removeCollections(e,p);var O=this.maps.toggledLegendId.indexOf(p);-1!==O&&(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!==(C=Ye(this.maps.element.id+"_LayerIndex_"+x.layerIndex+"_shapeIndex_"+x.shapeIndex+"_dataIndex_"+x.dataIndex,this.maps.element.id))){b=this.maps.toggledElementId.indexOf(C.id);h?(0===g&&this.maps.toggledLegendId.push(p),-1===b&&this.maps.toggledElementId.push(C.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(C.setAttribute("fill",this.maps.layers[0].shapeSettings.fill),C.setAttribute("stroke",this.maps.layers[0].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor),C.setAttribute("fill-opacity",this.maps.layers[c].shapeSettings.opacity.toString()),C.setAttribute("stroke-width",((0,t.isNullOrUndefined)(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width).toString()),C.setAttribute("stroke-opacity",((0,t.isNullOrUndefined)(this.maps.layers[c].shapeSettings.border.opacity)?this.maps.layers[c].shapeSettings.opacity:this.maps.layers[c].shapeSettings.border.opacity).toString())):(C.setAttribute("fill",n),C.setAttribute("fill-opacity",a.toString()),C.setAttribute("stroke",l),C.setAttribute("stroke-width",r.toString()),C.setAttribute("stroke-opacity",s.toString())),null!==e&&(i=Ye(this.maps.element.id+"_Legend_Index_"+p,this.maps.element.id),o=Ye(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||this.maps.themeStyle.shapeBorderColor,(0,t.isNullOrUndefined)(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width,(0,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,n,a,l,r,s,n))):(-1!==O&&0===g&&this.maps.toggledLegendId.splice(O,1),-1!==b&&this.maps.toggledElementId.splice(b,1),C.setAttribute("fill-opacity",this.maps.layers[c].shapeSettings.opacity.toString()),C.setAttribute("stroke-width",((0,t.isNullOrUndefined)(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width).toString()),C.setAttribute("stroke",this.maps.layers[0].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor),C.setAttribute("stroke-opacity",((0,t.isNullOrUndefined)(this.maps.layers[c].shapeSettings.border.opacity)?this.maps.layers[c].shapeSettings.opacity:this.maps.layers[c].shapeSettings.border.opacity).toString()),C.setAttribute("fill",this.legendCollection[p].fill),null!==e&&(o=Ye(this.maps.element.id+"_Legend_Index_"+p+"_Text",this.maps.element.id),i=Ye(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 n=this.maps.selectedLegendElementId.indexOf(t);-1!==n&&this.maps.selectedLegendElementId.splice(n,1)},e.prototype.removeEventListener=function(){if(!this.maps.isDestroyed){this.maps.off(t.Browser.touchMoveEvent,this.interactiveHandler),this.maps.off(t.Browser.touchEndEvent,this.interactiveHandler),this.maps.off(yi,this.legendClick);var e=document.getElementById(this.maps.element.id+"_Legend_Paging_Group");if(e)for(var i=0;i<e.childElementCount;i++)t.EventHandler.remove(e.childNodes[i],t.Browser.touchStartEvent,this.changeNextPage)}},e.prototype.getLegendData=function(e,i,o,n,a,l,r){var s=[];if("[object Array]"===Object.prototype.toString.call(a))for(var d=0;d<a.length;d++){var p=a[d],h=n.indexOf(".")>-1?Y(o,n):o[n],m=Te(o[n],l,p.properties),c=(0,t.isNullOrUndefined)(h)||"string"!=typeof h?h:h.toLowerCase();if((!(0,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[n],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[n],value:r,pointIndex:u})}return s},e.prototype.setToggleAttributes=function(e,i,o,n,a,l,r,s){e.setAttribute("fill",s),i.setAttribute("fill",o),i.setAttribute("fill-opacity",n.toString()),i.setAttribute("stroke",a),i.setAttribute("stroke-width",l.toString()),(0,t.isNullOrUndefined)(r)||i.setAttribute("stroke-opacity",r.toString())},e.prototype.legendGradientColor=function(e,i){var o,n="http://www.w3.org/2000/svg";if(!(0,t.isNullOrUndefined)(e.color)&&"object"==typeof e.color){var a=document.createElementNS(n,"linearGradient"),l=this.maps.legendSettings.position,r="Top"===l||"Bottom"===l?"100":"0",s="Top"===l||"Bottom"===l?"0":"100";a.setAttribute("id","linear_"+i+"_"+this.maps.element.id),a.setAttribute("x1","0%"),a.setAttribute("y1","0%"),a.setAttribute("x2",r+"%"),a.setAttribute("y2",s+"%");for(var d=0;d<e.color.length;d++){var p=100/(e.color.length-1),h=document.createElementNS(n,"stop");h.setAttribute("offset",d*p+"%"),h.setAttribute("stop-color",e.color[d]),h.setAttribute("stop-opacity",1..toString()),a.appendChild(h)}this.legendLinearGradient=a;var m="url(#linear_"+i+"_"+this.maps.element.id+")";this.defsElement.appendChild(a),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}(),uo=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=Je(e,t,0,this.maps);i?this.mapHighlight(o,null,null):et(o)},e.prototype.mouseMove=function(e){var i,o=e.target,n="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")&&!n&&"MarkerselectionMapStyle"!==o.getAttribute("class")&&"BubbleselectionMapStyle"!==o.getAttribute("class")&&"navigationlineselectionMapStyle"!==o.getAttribute("class")&&"PolygonselectionMapStyle"!==o.getAttribute("class")&&"LineselectionMapStyle"!==o.getAttribute("class")){i=parseInt(o.id.split("_LayerIndex_")[1].split("_")[0],10);var a=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),a=this.maps.layers[i].shapeData.features&&!(0,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=(0,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 if(o.id.indexOf("_PolygonIndex_")>-1)s=parseInt(o.id.split("_PolygonIndex_")[1].split("_")[0],10),l=this.maps.layers[i].polygonSettings.polygons[s].points,this.highlightSettings=this.maps.layers[i].polygonSettings.highlightSettings;else{var h=parseInt(o.id.split("_NavigationIndex_")[1].split("_")[0],10);i=parseInt(o.id.split("_LayerIndex_")[1].split("_")[0],10),a=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,a);else{var m=document.getElementsByClassName("highlightMapStyle")[0];if(!(0,t.isNullOrUndefined)(m)&&(et(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(Xe("highlightMapStyle").length>0){if((o=Xe("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)}et(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 n=this,a=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[a].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=(0,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")?(0,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:Oi,target:e.id,cancel:!1,shapeData:i,data:o,maps:this.maps};e.id.indexOf("shapeIndex")>-1&&this.maps.trigger(Oi,m,(function(){}));var c={opacity:h.opacity,fill:h.fill,border:{color:s,width:d,opacity:p},name:Xi,target:e.id,cancel:!1,shapeData:i,data:o,maps:this.maps};this.maps.trigger(Xi,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,n.highlightMap(e,c)}))},e.prototype.highlightMap=function(e,t){if("highlightMapStyle"!==e.getAttribute("class")&&!t.cancel){if(Xe("highlightMapStyle").length>0){var i=Xe("highlightMapStyle")[0];if(et(i),i.id.indexOf("NavigationIndex")>-1){var o=parseInt(i.id.split("_NavigationIndex_")[1].split("_")[0],10),n=parseInt(i.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10);i.setAttribute("stroke-width",this.maps.layers[n].navigationLineSettings[o].width.toString()),i.setAttribute("stroke",this.maps.layers[n].navigationLineSettings[o].color)}}He("highlightMap")?Ke("highlightMap","highlightMapStyle",t):document.body.appendChild(Qe("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}(),go=function(){function e(e){this.maps=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.maps.isDestroyed||this.maps.on(yi,this.mouseClick,this)},e.prototype.removeEventListener=function(){this.maps.isDestroyed||this.maps.off(yi,this.mouseClick)},e.prototype.mouseClick=function(e){if(!(0,t.isNullOrUndefined)(e.type)&&-1!==e.type.indexOf("touch")&&(0,t.isNullOrUndefined)(e.id)&&(e=e.target),!(0,t.isNullOrUndefined)(e.id)&&(e.id.indexOf("LayerIndex")>-1||e.id.indexOf("NavigationIndex")>-1)){var i=void 0,o=void 0,n=void 0,a=void 0,l=parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10);if(e.id.indexOf("shapeIndex")>-1)n=parseInt(e.id.split("_shapeIndex_")[1].split("_")[0],10),i=!(0,t.isNullOrUndefined)(this.maps.layers[l].shapeData.features)&&this.maps.layers[l].shapeData.features.length>n?this.maps.layers[l].shapeData.features[n].properties:!(0,t.isNullOrUndefined)(this.maps.layers[l].shapeData.geometries)&&this.maps.layers[l].shapeData.geometries.length>n?this.maps.layers[l].shapeData.geometries[n].properties:null,a=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),o=(0,t.isNullOrUndefined)(a)?null:this.maps.layers[l].dataSource[a],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);a=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),o=this.maps.layers[l].bubbleSettings[r].dataSource[a],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);a=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),o=this.maps.layers[l].markerSettings[s].dataSource[a],this.selectionsettings=this.maps.layers[l].markerSettings[s].selectionSettings,this.selectionType="Marker"}else if(e.id.indexOf("_PolygonIndex_")>-1)a=parseInt(e.id.split("_PolygonIndex_")[1].split("_")[0],10),o=this.maps.layers[l].polygonSettings.polygons[a].points,this.selectionsettings=this.maps.layers[l].polygonSettings.selectionSettings,this.selectionType="Polygon";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"}!(0,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&&!(0,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=Je(e,t,0,this.maps);i?this.selectMap(o,null,null):et(o)},e.prototype.selectMap=function(e,i,o){var n=this,a=e.parentElement.id.indexOf("LineString")>-1,l={color:a&&this.selectionsettings.fill||this.selectionsettings.border.color,width:a?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:a?"transparent":"navigationline"!==this.selectionType?this.selectionsettings.fill:"none",border:l,name:Hi,target:e.id,cancel:!1,shapeData:i,data:o,maps:this.maps};this.maps.trigger("itemSelection",r,(function(i){if(r.border.opacity=(0,t.isNullOrUndefined)(n.selectionsettings.border.opacity)?n.selectionsettings.opacity:n.selectionsettings.border.opacity,!r.cancel)if(e.getAttribute("class")===n.selectionType+"selectionMapStyle"||"LineselectionMapStyle"===e.getAttribute("class")){et(e),n.removedSelectionList(e);for(var o=0;o<n.maps.shapeSelectionItem.length;o++)if(n.maps.shapeSelectionItem[o]===r.shapeData){n.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",n.maps.layers[s].navigationLineSettings[l].width.toString()),e.setAttribute("stroke",n.maps.layers[s].navigationLineSettings[l].color)}}else{var d=Re(n.maps.element.id+"_Layer_Collections");if(!n.selectionsettings.enableMultiSelect&&(d.getElementsByClassName(n.selectionType+"selectionMapStyle").length>0||d.getElementsByClassName("LineselectionMapStyle").length>0)){for(var p=d.getElementsByClassName(n.selectionType+"selectionMapStyle").length,h=void 0,m=0;m<p;m++)et(h=d.getElementsByClassName(n.selectionType+"selectionMapStyle")[0]),n.removedSelectionList(h);if(d.getElementsByClassName("LineselectionMapStyle").length>0){p=d.getElementsByClassName("LineselectionMapStyle").length;for(m=0;m<p;m++)et(h=d.getElementsByClassName("LineselectionMapStyle")[0]),n.removedSelectionList(h)}if("Shape"===n.selectionType){n.maps.shapeSelectionItem=[];for(var c=n.maps.selectedElementId.length,u=0;u<c;u++){et(h=d.getElementsByClassName(n.selectionType+"selectionMapStyle")[0]);var g=n.maps.selectedElementId.indexOf(h.getAttribute("id"));n.maps.selectedElementId.splice(g,1)}}if(h.id.indexOf("NavigationIndex")>-1){l=parseInt(e.id.split("_NavigationIndex_")[1].split("_")[0],10),s=parseInt(e.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10);h.setAttribute("stroke-width",n.maps.layers[s].navigationLineSettings[l].width.toString()),h.setAttribute("stroke",n.maps.layers[s].navigationLineSettings[l].color)}}a?(He("LineselectionMap")?Ke("LineselectionMap","LineselectionMapStyle",r):document.body.appendChild(Qe("LineselectionMap","LineselectionMapStyle",r)),e.setAttribute("class","LineselectionMapStyle")):(He(n.selectionType+"selectionMap")?Ke(n.selectionType+"selectionMap",n.selectionType+"selectionMapStyle",r):document.body.appendChild(Qe(n.selectionType+"selectionMap",n.selectionType+"selectionMapStyle",r)),e.setAttribute("class",n.selectionType+"selectionMapStyle")),"ShapeselectionMapStyle"===e.getAttribute("class")&&(n.maps.shapeSelectionClass=He(n.selectionType+"selectionMap"),n.maps.selectedElementId.push(e.getAttribute("id")),n.maps.shapeSelectionItem.push(r.shapeData)),"MarkerselectionMapStyle"===e.getAttribute("class")&&(n.maps.markerSelectionClass=He(n.selectionType+"selectionMap"),n.maps.selectedMarkerElementId.push(e.getAttribute("id"))),"BubbleselectionMapStyle"===e.getAttribute("class")&&(n.maps.bubbleSelectionClass=He(n.selectionType+"selectionMap"),n.maps.selectedBubbleElementId.push(e.getAttribute("id"))),"navigationlineselectionMapStyle"===e.getAttribute("class")&&(n.maps.navigationSelectionClass=He(n.selectionType+"selectionMap"),n.maps.selectedNavigationElementId.push(e.getAttribute("id"))),"PolygonselectionMapStyle"===e.getAttribute("class")&&(n.maps.polygonSelectionClass=He(n.selectionType+"selectionMap"),n.maps.selectedPolygonElementId.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),"Polygon"===this.selectionType&&this.maps.selectedPolygonElementId.splice(this.maps.selectedPolygonElementId.indexOf(e.getAttribute("id")),1)},e.prototype.getModuleName=function(){return"Selection"},e.prototype.destroy=function(){this.selectionsettings=null,this.removeEventListener(),this.maps=null},e}(),yo=function(){function e(e){this.maps=e,this.tooltipId=this.maps.element.id+"_mapsTooltip",this.addEventListener()}return e.prototype.renderTooltip=function(e){var o,n,a,l,r,s,d,h=this;if(-1!==e.type.indexOf("touch")?(this.isTouch=!0,o=(l=e).changedTouches[0].pageX,n=l.changedTouches[0].pageY,a=l.target):(this.isTouch="touch"===e.pointerType,o=e.pageX,n=e.pageY,a=e.target),-1===a.id.indexOf(this.maps.element.id)){var m=a.closest("."+this.maps.element.id+"_marker_template_element");!(0,t.isNullOrUndefined)(m)&&m.id.indexOf("_MarkerIndex_")>-1&&(a=m)}var c,u,g,y,f,b,v="",S=a.id,x=[],C=S.indexOf("_LayerIndex_")>-1&&parseFloat(S.split("_LayerIndex_")[1].split("_")[0]),O=this.maps.layersCollection[C],_=[],M=p(o,n,this.maps.svgObject);this.tooltipTargetID=S;var L=null,P=null,w=this.maps.getClickLocation(S,e.pageX,e.pageY,a,e.layerX,e.layerY,"tooltip");(0,t.isNullOrUndefined)(w)||(L=w.latitude,P=w.longitude);var T=S.indexOf("_PolygonIndex_")>-1;if((S.indexOf("_shapeIndex_")>-1||S.indexOf("_MarkerIndex_")>-1||S.indexOf("_BubbleIndex_")>-1||S.indexOf("_PolygonIndex_")>-1)&&null===this.maps.markerDragArgument){if(S.indexOf("_PolygonIndex_")>-1){var F=parseInt(S.split("_PolygonIndex_")[1].split("_")[0],10);d=O.polygonSettings.tooltipSettings,b=O.polygonSettings.polygons[F],y=d.textStyle,f=d.fill,_.push(b.tooltipText)}else if(S.indexOf("_shapeIndex_")>-1){s=O.tooltipSettings;var I=parseInt(S.split("_shapeIndex_")[1].split("_")[0],10);if((0,t.isNullOrUndefined)(O.layerData)||(0,t.isNullOrUndefined)(O.layerData[I]))return;var k=O.layerData[I].property,N=!1,E="[object Array]"===Object.prototype.toString.call(O.shapePropertyPath)?O.shapePropertyPath:[O.shapePropertyPath];if(!(0,t.isNullOrUndefined)(E)){for(var z=0;z<E.length;z++)if(!(0,t.isNullOrUndefined)(O.dataSource)&&!(0,t.isNullOrUndefined)(O.shapeDataPath))for(var B=0;B<O.dataSource.length;B++){var A=O.dataSource[B],U=O.shapeDataPath.indexOf(".")>-1?Y(A,O.shapeDataPath):A[O.shapeDataPath];if((!(0,t.isNullOrUndefined)(U)&&isNaN(A[O.shapeDataPath])?U.toLowerCase():U)===(!(0,t.isNullOrUndefined)(k[E[z]])&&isNaN(k[E[z]])?k[E[z]].toLowerCase():k[E[z]])){N=!0,C=B,z=E.length;break}}if(C=N?C:null,O.dataSource&&O.dataSource.length>0){if(!(0,t.isNullOrUndefined)(O.dataSource[C]))for(u in x=JSON.parse(JSON.stringify(O.dataSource[C])),k)x.hasOwnProperty(u)||(x[u]=k[u])}else x=k}if(s.visible&&(!(0,t.isNullOrUndefined)(C)&&!isNaN(C)||!(0,t.isNullOrUndefined)(k)))if(O.tooltipSettings.format)v=this.formatter(O.tooltipSettings.format,x);else{var j=Te(O.shapeDataPath,O.shapePropertyPath,k);v=(0,t.isNullOrUndefined)(O.dataSource)||(0,t.isNullOrUndefined)(C)?k[j]:H(s.valuePath.indexOf(".")>-1?Y(O.dataSource[C],s.valuePath):O.dataSource[C][s.valuePath],this.maps),(0,t.isNullOrUndefined)(v)&&!(0,t.isNullOrUndefined)(s.valuePath)&&(v=s.valuePath.indexOf(".")>-1?Y(k,s.valuePath):k[s.valuePath])}}else if(S.indexOf("_MarkerIndex_")>-1){var Z=parseInt(S.split("_MarkerIndex_")[1].split("_")[0],10),R=parseInt(S.split("_MarkerIndex_")[1].split("_")[2],10),D=O.markerSettings[Z];s=D.tooltipSettings,x=D.dataSource[R],s.visible&&!isNaN(Z)&&(D.tooltipSettings.format?v=this.formatter(D.tooltipSettings.format,D.dataSource[R]):"function"!=typeof D.template&&D.template&&!D.tooltipSettings.valuePath?v=D.template.split(">")[1].split("<")[0]:(0,t.isNullOrUndefined)(D.tooltipSettings.valuePath)||(v=H(D.tooltipSettings.valuePath.indexOf(".")>-1?Y(D.dataSource[R],D.tooltipSettings.valuePath):D.dataSource[R][D.tooltipSettings.valuePath],this.maps)))}else if(S.indexOf("_BubbleIndex_")>-1){var V=parseInt(S.split("_BubbleIndex_")[1].split("_")[0],10),G=(R=parseInt(S.split("_BubbleIndex_")[1].split("_")[2],10),O.bubbleSettings[V]);s=G.tooltipSettings,x=G.dataSource[R],s.visible&&!isNaN(R)&&(G.tooltipSettings.format?v=this.formatter(G.tooltipSettings.format,G.dataSource[R]):(0,t.isNullOrUndefined)(G.tooltipSettings.valuePath)||(v=H(G.tooltipSettings.valuePath.indexOf(".")>-1?Y(G.dataSource[R],G.tooltipSettings.valuePath):G.dataSource[R][G.tooltipSettings.valuePath],this.maps)))}if(T?d.visible:s.visible){document.getElementById(this.tooltipId)?c=document.getElementById(this.tooltipId):(c=(0,t.createElement)("div",{id:this.maps.element.id+"_mapsTooltip",className:"EJ2-maps-Tooltip"}),(0,t.isNullOrUndefined)(T?b.tooltipTemplate:s.template)||(T?""===b.tooltipTemplate:""===s.template)||"MouseMove"===this.maps.tooltipDisplayMode?c.style.cssText="position: absolute;pointer-events:none;":c.style.position="absolute",document.getElementById(this.maps.element.id+"_Secondary_Element").appendChild(c)),T?b.tooltipTemplate:s.template,(T?null!==b.tooltipTemplate:null!==s.template)&&1===Object.keys((T?b.tooltipTemplate:s.template,T?b.tooltipTemplate:s.template)).length&&(T?b.tooltipTemplate=b.tooltipTemplate[Object.keys(b.tooltipTemplate)[0]]:s.template=s.template[Object.keys(s.template)[0]]);var W={location:M,text:_,data:x=this.setTooltipContent(s,x),textStyle:{color:T?y.color:s.textStyle.color,fontFamily:T?y.fontFamily:s.textStyle.fontFamily,fontStyle:T?y.fontStyle:s.textStyle.fontStyle,fontWeight:T?y.fontWeight:s.textStyle.fontWeight,opacity:T?y.opacity:s.textStyle.opacity,size:T?y.size:s.textStyle.size},template:T?b.tooltipTemplate:s.template};""!==(r={cancel:!1,name:xi,options:W,fill:T?f:s.fill,maps:this.maps,latitude:L,longitude:P,element:a,eventArgs:e,content:T?(0,t.isNullOrUndefined)(b.tooltipText)?"":b.tooltipText:(0,t.isNullOrUndefined)(v)?"":v.toString()}).content||""!==r.options.template?this.maps.trigger(xi,r,(function(o){if(r.cancel||(0,t.isNullOrUndefined)(v)||-1!==S.indexOf("_cluster_")||-1!==S.indexOf("_dataLabel_"))h.clearTooltip(e.target);else{h.maps.isProtectedOnChange=!0,r.options.textStyle.size=r.options.textStyle.size||h.maps.themeStyle.fontSize,r.options.textStyle.color=r.options.textStyle.color||h.maps.themeStyle.tooltipFontColor,r.options.textStyle.fontFamily=r.options.textStyle.fontFamily||h.maps.themeStyle.fontFamily,r.options.textStyle.fontWeight=r.options.textStyle.fontWeight||h.maps.themeStyle.fontWeight,r.options.textStyle.opacity=r.options.textStyle.opacity||h.maps.themeStyle.tooltipTextOpacity;var n=T?{color:d.border.color||h.maps.themeStyle.tooltipBorderColor,width:d.border.width,opacity:d.border.opacity}:{color:s.border.color||h.maps.themeStyle.tooltipBorderColor,width:s.border.width,opacity:s.border.opacity};if(r.cancel?h.svgTooltip=new i.Tooltip({theme:h.maps.theme,enable:!0,header:"",data:s.data,template:s.template,content:r.content.toString()!==v.toString()?[r.content.toString()]:[v.toString()],shapes:[],location:s.location,palette:[g],areaBounds:h.maps.mapAreaRect,textStyle:s.textStyle,availableSize:h.maps.availableSize,fill:s.fill||h.maps.themeStyle.tooltipFillColor,enableShadow:!0,border:n}):h.svgTooltip=new i.Tooltip({theme:h.maps.theme,enable:!0,header:"",data:r.options.data,template:r.options.template,content:r.content.toString()!==v.toString()?[r.content.toString()]:[v.toString()],shapes:[],location:r.options.location,palette:[g],areaBounds:h.maps.mapAreaRect,textStyle:r.options.textStyle,availableSize:h.maps.availableSize,fill:r.fill||h.maps.themeStyle.tooltipFillColor,enableShadow:!0,border:n}),(h.maps.isVue||h.maps.isVue3)&&(h.svgTooltip.controlInstance=h.maps),h.svgTooltip.opacity=h.maps.themeStyle.tooltipFillOpacity||h.svgTooltip.opacity,h.svgTooltip.appendTo(c),h.maps.renderReactTemplates(),h.maps.isDevice){var a=S.indexOf("_MarkerIndex_")>-1||S.indexOf("_BubbleIndex_")>-1||S.indexOf("_shapeIndex_")>-1?s.duration:d.duration;null!==(a=!(0,t.isNullOrUndefined)(a)&&a>0?a:a<0?2e3:null)&&(clearTimeout(h.tooltipTimer),h.tooltipTimer=setTimeout(h.removeTooltip.bind(h),a))}}})):this.clearTooltip(e.target),this.svgTooltip&&this.maps.trigger("tooltipRenderComplete",{cancel:!1,name:"tooltipRenderComplete",maps:this.maps,options:W,element:this.svgTooltip.element}),this.svgTooltip?this.maps.trigger("tooltipRenderComplete",{cancel:!1,name:"tooltipRenderComplete",maps:this.maps,options:W,element:this.svgTooltip.element}):this.clearTooltip(e.target)}else this.clearTooltip(e.target)}else{var q=e.target.closest("#"+this.maps.element.id+"_mapsTooltipparent_template");(0,t.isNullOrUndefined)(q)&&this.clearTooltip(e.target)}},e.prototype.setTooltipContent=function(e,i){var o=(0,t.extend)({},i,null,!0);return this.maps.format&&!isNaN(Number(o[e.valuePath]))?o[e.valuePath]=Ve(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 n=o[i];e="object"==typeof t[n]?W("",e,t,this.maps):e.split("${"+n+"}").join(H(t[n],this.maps))}return e},e.prototype.mouseUpHandler=function(e){(0,t.isNullOrUndefined)(this.maps)||(this.renderTooltip(e),"MouseMove"===this.maps.tooltipDisplayMode&&(clearTimeout(this.tooltipTimer),this.tooltipTimer=setTimeout(this.removeTooltip.bind(this),2e3)))},e.prototype.removeTooltip=function(){var e=!1;return document.getElementsByClassName("EJ2-maps-Tooltip").length>0&&((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");(0,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.renderTooltip):"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(){(0,t.isNullOrUndefined)(this.svgTooltip)||(this.svgTooltip.destroy(),this.svgTooltip.controlInstance=null,Be(this.maps.element.id+"_mapsTooltip")),this.svgTooltip=null,this.maps=null},e}(),fo=function(){function e(e){this.isPanModeEnabled=!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.isPanningInProgress=!1,this.isPan=!1,this.isZoomFinal=!1,this.isZoomSelection=!1,this.pinchFactor=1,this.startTouches=[],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=this.maps.zoomSettings.toolbarSettings.buttonSettings.selectionColor,this.fillColor=this.maps.zoomSettings.toolbarSettings.buttonSettings.color,this.addEventListener()}return e.prototype.performZooming=function(e,i,o,n){var a=this;void 0===n&&(n=!1);var l=this.maps;l.previousProjection=i<=1.5?void 0:l.projectionType,l.defaultState=!1,l.initialCheck=!1,l.markerZoomedState=l.isMarkerZoomCompleted=!1,l.zoomPersistence=l.enablePersistence;var r=l.tileZoomLevel,s=l.zoomSettings.maxZoom,d=l.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=l.previousScale=l.scale,m=l.tileTranslatePoint;if(l.isTileMap||!("ZoomIn"===o?i>=d&&i<=s:i>=d)&&!l.isReset){if(l.isTileMap&&i>=d&&i<=s)if(this.getTileTranslatePosition(r,i,e,o),l.tileZoomLevel=i,l.zoomSettings.zoomFactor=i,l.scale=Math.pow(2,i-1),"ZoomOut"===o&&l.zoomSettings.resetToInitial&&l.applyZoomReset&&i<=l.initialZoomLevel&&(l.initialCheck=!0,l.zoomPersistence=!1,l.tileTranslatePoint.x=l.initialTileTranslate.x,l.tileTranslatePoint.y=l.initialTileTranslate.y,i=l.tileZoomLevel=l.mapScaleValue=l.initialZoomLevel,l.scale=Math.pow(2,i-1)),l.mapScaleValue=isNaN(l.mapScaleValue)?1:l.mapScaleValue,l.translatePoint.y=(l.tileTranslatePoint.y-.01*l.mapScaleValue)/l.scale,l.translatePoint.x=(l.tileTranslatePoint.x-.01*l.mapScaleValue)/l.scale,this.triggerZoomEvent(m,r,o))l.translatePoint=l.tileTranslatePoint=new _(0,0),l.scale=l.previousScale,l.tileZoomLevel=r,l.zoomSettings.zoomFactor=l.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(l),l.mapLayerPanel.generateTiles(i,l.tileTranslatePoint,o+"wheel",null,e);var c=0===this.maps.layersCollection[0].animationDuration&&"Enable"===t.animationMode?1e3:this.maps.layersCollection[0].animationDuration;setTimeout((function(){a.applyTransform(a.maps,n),document.getElementById(a.maps.element.id+"_LayerIndex_1")&&(document.getElementById(a.maps.element.id+"_LayerIndex_1").style.display="block")}),c)}}else{var u=l.mapAreaRect,g=l.baseMapRectBounds.min,y=l.baseMapRectBounds.max,f=Math.abs(g.x-y.x),b=Math.abs(g.y-y.y),v=void 0,S=void 0;if(i<1.2&&"Eckert5"!==l.projectionType)0!==f&&0!==b&&f!==b||(f=u.width/2,b=u.height),i=(i=parseFloat(Math.min(u.width/f,u.height/b).toFixed(2)))>1.05?1:i,l.translatePoint=this.calculateInitalZoomTranslatePoint(i,f,b,u,g,l);else{var x=l.translatePoint;v=x.x-(u.width/h-u.width/i)/(u.width/e.x),S=x.y-(u.height/h-u.height/i)/(u.height/e.y);var C=Math.abs(l.baseMapRectBounds.max.y-l.baseMapRectBounds.min.y)*i;v=C<l.mapAreaRect.height?u.x+(-g.x+(u.width/2-f/2)):v,S=C<l.mapAreaRect.height?u.y+(-g.y+(u.height/2-b/2)):S,l.translatePoint=new _(v,S)}l.scale=i,l.zoomTranslatePoint=l.translatePoint,this.triggerZoomEvent(m,r,o)?(l.translatePoint=l.previousPoint,l.scale=l.mapScaleValue=l.previousScale):this.applyTransform(l,n)}this.triggerZoomComplete(l,r,o)}this.maps.zoomNotApplied=!1,this.maps.isDevice&&this.removeToolbarOpacity(l.isTileMap?Math.round(l.tileZoomLevel):l.scale,l.element.id+"_Zooming_")},e.prototype.calculateInitalZoomTranslatePoint=function(e,t,i,o,n,a){t*=e,i*=e;var l=0!==n.x&&"layers"===a.translateType?a.availableSize.width-o.width:0,r=o.x+(-n.x+(o.width/2-t/2))-l,s=o.y+(-n.y+(o.height/2-i/2));return new _(r,s)},e.prototype.triggerZoomEvent=function(e,i,o){var n,a=this.maps;a.isTileMap&&(a.mapScaleValue=(0,t.isNullOrUndefined)(a.mapScaleValue)?1:a.mapScaleValue,a.translatePoint.y=(a.tileTranslatePoint.y-.01*a.mapScaleValue)/a.scale,a.translatePoint.x=(a.tileTranslatePoint.x-.01*a.mapScaleValue)/a.scale);var l=this.maps.getMinMaxLatitudeLongitude();return n=a.isTileMap?{cancel:!1,name:"zoom",type:o,maps:a,tileTranslatePoint:{previous:e,current:a.tileTranslatePoint},translatePoint:{previous:a.previousPoint,current:a.translatePoint},tileZoomLevel:{previous:i,current:a.tileZoomLevel},scale:{previous:a.previousScale,current:a.scale},minLatitude:l.minLatitude,maxLatitude:l.maxLatitude,minLongitude:l.minLongitude,maxLongitude:l.maxLongitude}:{cancel:!1,name:"zoom",type:o,maps:a,tileTranslatePoint:{},translatePoint:{previous:a.previousPoint,current:a.translatePoint},tileZoomLevel:{},scale:{previous:a.previousScale,current:a.scale},minLatitude:l.minLatitude,maxLatitude:l.maxLatitude,minLongitude:l.minLongitude,maxLongitude:l.maxLongitude},a.trigger("zoom",n),n.cancel},e.prototype.getTileTranslatePosition=function(e,t,i,o){var n=this.maps,a="ZoomOut"===o?10:"Reset"===o&&t>1?0:10,l=n.availableSize,r=256*Math.pow(2,e),s=256*Math.pow(2,t),d=(i.x-n.tileTranslatePoint.x)/r*100,p=(i.y-n.tileTranslatePoint.y)/r*100;n.tileTranslatePoint.x=1===t?l.width/2-256:i.x-d*s/100,n.tileTranslatePoint.y=1===t?l.height/2-256+2*a: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,n=e.tileTranslatePoint,a=this.zoomingRect,l=e.zoomSettings.maxZoom,r=e.zoomSettings.minZoom;if(a.height>0&&a.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/a.width+t.height/a.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(n,o,""))?(e.translatePoint=e.tileTranslatePoint=new _(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/a.width+t.height/a.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 _(c,u)}e.scale=p<this.maps.zoomSettings.maxZoom?p:this.maps.zoomSettings.maxZoom,(i=this.triggerZoomEvent(n,o,""))&&(e.translatePoint=e.previousPoint,e.scale=e.previousScale),e.zoomTranslatePoint=e.translatePoint}i||(e.mapScaleValue=p,this.applyTransform(e,!1,!0),this.maps.zoomNotApplied=!1,this.zoomingRect=null)}this.isZoomFinal=this.isZoomSelection&&Math.round(e.scale)===this.maps.zoomSettings.maxZoom,this.triggerZoomComplete(e,o,""),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,o=this.maps,n=o.tileZoomLevel,a=this.pinchFactor,l=o.tileTranslatePoint;if(this.maps.mergeCluster(),o.isTileMap){h=this.getTouchCenterPoint();var r=Math.sqrt(Math.pow(this.touchMoveList[0].pageX-this.touchMoveList[1].pageX,2)+Math.pow(this.touchMoveList[0].pageY-this.touchMoveList[1].pageY,2)),s=o.tileZoomLevel;(0,t.isNullOrUndefined)(this.pinchDistance)||(this.pinchDistance>r?s-=1:this.pinchDistance<r&&(s+=1),(s=Math.min(this.maps.zoomSettings.maxZoom,Math.max(this.maps.zoomSettings.minZoom,s)))!==o.tileZoomLevel&&(this.pinchFactor=s,o.previousScale=o.scale,o.tileZoomLevel=this.pinchFactor,o.scale=Math.pow(2,o.tileZoomLevel-1),this.getTileTranslatePosition(n,this.pinchFactor,{x:h.x,y:h.y},null),o.translatePoint.x=(o.tileTranslatePoint.x-.01*o.scale)/o.scale,o.translatePoint.y=(o.tileTranslatePoint.y-.01*o.scale)/o.scale,(i=this.triggerZoomEvent(l,n,""))?(o.translatePoint=o.tileTranslatePoint=new _(0,0),o.scale=o.previousScale,o.tileZoomLevel=n,o.zoomSettings.zoomFactor=o.previousScale):o.mapLayerPanel.generateTiles(s,o.tileTranslatePoint))),this.pinchDistance=r}else{var d=o.mapAreaRect;o.isMarkerZoomCompleted=!1,o.previousScale=o.scale,o.previousPoint=o.translatePoint,o.previousProjection=o.projectionType;var p=ct(this.touchStartList,this.touchMoveList),h=yt(gt(this.touchMoveList,this.maps)),m=p/this.lastScale;this.lastScale=p,this.pinchFactor*=m,this.pinchFactor=Math.min(this.maps.zoomSettings.maxZoom,Math.max(this.pinchFactor,this.maps.zoomSettings.minZoom));var c=o.baseMapRectBounds.min,u=o.baseMapRectBounds.max,g=Math.abs(c.y-u.y),y=Math.abs(c.x-u.x),f=o.translatePoint,b=void 0,v=void 0;if(a<1.2&&"Eckert5"!==o.projectionType)0!==y&&0!==g&&y!==g||(y=d.width/2,g=d.height),a=(a=parseFloat(Math.min(d.width/y,d.height/g).toFixed(2)))>1.05?1:a,o.translatePoint=this.calculateInitalZoomTranslatePoint(a,y,g,d,c,o);else{var S=Math.abs(o.baseMapRectBounds.max.y-o.baseMapRectBounds.min.y)*a;b=f.x-(d.width/o.scale-d.width/a)/(d.width/h.x),v=f.y-(d.height/o.scale-d.height/a)/(d.height/h.y),b=S<o.mapAreaRect.height?d.x+(-c.x+(d.width/2-y/2)):b,v=S<o.mapAreaRect.height?d.y+(-c.y+(d.height/2-g/2)):v,o.translatePoint=new _(b,v)}o.scale=a,(i=this.triggerZoomEvent(l,n,""))&&(o.translatePoint=o.previousPoint,o.scale=o.previousScale)}o.mapScaleValue=a,i||this.applyTransform(o),this.triggerZoomComplete(o,n,""),t.Browser.isDevice&&this.removeToolbarOpacity(o.isTileMap?Math.round(o.tileZoomLevel):o.scale,o.element.id+"_Zooming_")},e.prototype.getTouchCenterPoint=function(){for(var e=[],t=0;t<this.touchMoveList.length;t++)e.push(this.getMousePosition(this.touchMoveList[t].pageX,this.touchMoveList[t].pageY));return{x:(e[0].x+e[1].x)/2,y:(e[0].y+e[1].y)/2}},e.prototype.triggerZoomComplete=function(e,i,o){if(e.zoomSettings.enable){var n=void 0;e.isTileMap&&(e.mapScaleValue=(0,t.isNullOrUndefined)(e.mapScaleValue)?1:e.mapScaleValue,e.translatePoint.y=(e.tileTranslatePoint.y-.01*e.mapScaleValue)/e.scale,e.translatePoint.x=(e.tileTranslatePoint.x-.01*e.mapScaleValue)/e.scale);var a=this.maps.getMinMaxLatitudeLongitude();n=e.isTileMap?{cancel:!1,name:"zoomComplete",type:o,maps:e,tileTranslatePoint:{previous:e.tileTranslatePoint,current:e.tileTranslatePoint},translatePoint:{previous:e.previousPoint,current:e.translatePoint},tileZoomLevel:{previous:i,current:e.tileZoomLevel},scale:{previous:e.previousScale,current:e.scale},minLatitude:a.minLatitude,maxLatitude:a.maxLatitude,minLongitude:a.minLongitude,maxLongitude:a.maxLongitude}:{cancel:!1,name:"zoomComplete",type:o,maps:e,tileTranslatePoint:{},translatePoint:{previous:e.previousPoint,current:e.translatePoint},tileZoomLevel:{},scale:{previous:e.previousScale,current:e.scale},minLatitude:a.minLatitude,maxLatitude:a.maxLatitude,minLongitude:a.minLongitude,maxLongitude:a.maxLongitude},this.maps.trigger("zoomComplete",n)}},e.prototype.drawZoomRectangle=function(){var e=this.maps,t=this.mouseDownPoints,i=this.mouseMovePoints,o={width:1,color:this.maps.themeStyle.rectangleZoomBorderColor},n=Math.abs(i.x-t.x),a=Math.abs(i.y-t.y),l=i.x>t.x?t.x:t.x-n,r=i.y>t.y?t.y:t.y-a;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 R(l,r,n,a);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 E(e.element.id+"_ZoomRect",this.maps.themeStyle.rectangleZoomFillColor,o,this.maps.themeStyle.rectangleZoomFillOpacity,this.zoomingRect,0,0,"","3");s.appendChild(e.renderer.drawRectangle(d)),Re(e.element.id+"_Secondary_Element").appendChild(s)}},e.prototype.animateTransform=function(e,i,o,n,a){var l=0===this.currentLayer.animationDuration&&"Enable"===t.animationMode?1e3:this.currentLayer.animationDuration;i&&0!==l&&!this.maps.isTileMap?this.maps.isTileMap||bt(e,0,l,new Z(o,n),a,this.maps.mapAreaRect,this.maps):this.maps.isTileMap&&e.id.indexOf("_Polygons_Group")>-1||e.setAttribute("transform","scale("+a+") translate( "+o+" "+n+" )")},e.prototype.applyTransform=function(e,i,o,n){var a,l,r=this;this.templateCount=0;var s=e.scale,d=e.translatePoint.x,p=e.translatePoint.y,h=0;if(e.zoomShapeCollection=[],this.isPanningInProgress=n||!1,document.getElementById(e.element.id+"_mapsTooltip")&&Be(e.element.id+"_mapsTooltip"),e.isTileMap){var m=document.getElementById(e.element.id+"_svg");if(m)for(var c=0;c<e.layers.length;c++){var g=m.querySelector("#"+e.element.id+"_LayerIndex_"+c);g&&m.removeChild(g)}}if(this.layerCollectionEle){for(var y=function(m){var c=f.layerCollectionEle.childNodes[m];if("g"===c.tagName){f.templateCount++,f.index=c.id.indexOf("_LayerIndex_")>-1&&parseFloat(c.id.split("_LayerIndex_")[1].split("_")[0]),f.currentLayer=e.layersCollection[f.index];for(var g=e.mapLayerPanel.calculateFactor(f.currentLayer),y=c.childElementCount,b=document.getElementById(e.element.id+"_LayerIndex_"+f.index+"_Markers_Template_Group"),v=function(m){var y=c.childNodes[m];if(y.id.indexOf("_Markers_Group")>-1||y.id.indexOf("_bubble_Group")>-1||y.id.indexOf("_dataLableIndex_Group")>-1){if(y.id.indexOf("_Markers_Group")>-1){if(!(f.isPanModeEnabled&&n||(0,t.isNullOrUndefined)(y.childNodes[0])&&(0,t.isNullOrUndefined)(b.childNodes[0]))){var v=(0,t.isNullOrUndefined)(y.childNodes[0])?b.childNodes[0]:y.childNodes[0];f.markerTranslates(v,g,d,p,s,"Marker",c)}if(y=c.childNodes[m],!(0,t.isNullOrUndefined)(y)&&-1!==y.id.indexOf("Markers")&&(Array.prototype.forEach.call(y.childNodes,(function(n,a){r.markerTranslate(n,g,d,p,s,"Marker",o);var h=parseInt(n.id.split("_dataIndex_")[1].split("_")[0],10),m=parseInt(n.id.split("_MarkerIndex_")[1].split("_")[0],10);if(r.currentLayer.markerSettings[m].initialMarkerSelection.length>0)for(var c=r.currentLayer.markerSettings[m].dataSource[h],u=0;u<r.currentLayer.markerSettings[m].initialMarkerSelection.length;u++)r.currentLayer.markerSettings[m].initialMarkerSelection[u].latitude!==c.latitude&&r.currentLayer.markerSettings[m].initialMarkerSelection[u].longitude!==c.longitude||e.markerSelection(r.currentLayer.markerSettings[m].selectionSettings,e,y.children[a],r.currentLayer.markerSettings[m].dataSource[h]);(r.currentLayer.animationDuration>0||"Enable"===t.animationMode||(e.layersCollection[0].animationDuration>0||"Enable"===t.animationMode)&&"SubLayer"===r.currentLayer.type)&&!r.isPanModeEnabled&&(e.isTileMap||(l=i?l:"visibility:hidden",(0,t.isNullOrUndefined)(l)||(y.style.cssText=l)))})),f.isPanModeEnabled&&e.markerModule.sameMarkerData.length>0?ae(e.markerModule.sameMarkerData,e,y,!0):e.markerModule.sameMarkerData.length>0&&(e.markerModule.sameMarkerData=[],document.getElementById(e.element.id+"_mapsTooltip")&&Be(e.element.id+"_mapsTooltip")),document.getElementById(e.element.id+"_mapsTooltip")&&e.mapsTooltipModule.tooltipTargetID.indexOf("_MarkerIndex_")&&!f.isPanModeEnabled)){var S=e.mapsTooltipModule,x=y.querySelector("#"+S.tooltipTargetID);if(!(0,t.isNullOrUndefined)(x))if("hidden"===x.style.visibility)Be(e.element.id+"_mapsTooltip");else{var C=parseFloat(x.getAttribute("transform").split("(")[1].split(")")[0].split(" ")[1]),O=parseFloat(x.getAttribute("transform").split("(")[1].split(")")[0].split(" ")[2]);e.isTileMap&&(C+=+He(e.element.id+"_tile_parent").style.left.split("px")[0],O+=+He(e.element.id+"_tile_parent").style.top.split("px")[0]),S.svgTooltip.location.x=C,S.svgTooltip.location.y=O,S.svgTooltip.enableAnimation=!1}}}else if(y.id.indexOf("_bubble_Group")>-1)for(var _=void 0,M=0;M<y.childElementCount;M++){_=y.childNodes[M],a=parseFloat(_.id.split("_LayerIndex_")[1].split("_")[0]);for(var L=parseFloat(_.id.split("_BubbleIndex_")[1].split("_")[0]),P=parseFloat(_.id.split("_BubbleIndex_")[1].split("_")[2]),w=0;w<e.bubbleModule.bubbleCollection.length;w++){var F=e.bubbleModule.bubbleCollection[w];if(F.LayerIndex===a&&F.BubbleIndex===L&&F.DataIndex===P){var I=F.center.x,k=F.center.y,N=(I+d)*s,E=(k+p)*s,z=0===f.currentLayer.animationDuration&&"Enable"===t.animationMode?1e3:f.currentLayer.animationDuration;o&&0!==z?Lt(_,0,z,new Z(N,E)):_.setAttribute("transform","translate( "+N+" "+E+" )");break}}}else if(y.id.indexOf("_dataLableIndex_Group")>-1&&!(0,t.isNullOrUndefined)(e.layers[f.index])){e.zoomLabelPositions=[],e.zoomLabelPositions=e.dataLabelModule.dataLabelCollections;var B=!e.isTileMap&&o,A=[];Array.prototype.forEach.call(y.childNodes,(function(i,o){if(y.childNodes[o].id.indexOf("_LabelIndex_")>-1){var a=parseFloat(y.childNodes[o].id.split("_LabelIndex_")[1].split("_")[0]),l=y.childNodes[o].id;e.zoomShapeCollection.push(l),r.dataLabelTranslate(y.childNodes[o],g,d,p,s,"DataLabel",B,h,n,A),h++;var m=e.layers[r.index].dataLabelSettings.border;if(o>0&&m.width>1&&y.childNodes[o-1].id.indexOf("_rectIndex_")>-1&&!(0,t.isNullOrUndefined)(e.zoomLabelPositions[a])){var c=(e.zoomLabelPositions[a].location.x+d)*s,u=(e.zoomLabelPositions[a].location.y+p)*s,f=T(y.childNodes[o].textContent,e.layers[r.index].dataLabelSettings.textStyle),b=y.childNodes[o-1],v=c-f.width/2,S=u-f.height/2-5;b.setAttribute("x",v),b.setAttribute("y",S)}}}))}}else e.isTileMap&&y.id.indexOf("_line_Group")>-1?(y.remove(),c.children.length>0&&c.children[0]?c.insertBefore(e.navigationLineModule.renderNavigation(f.currentLayer,e.tileZoomLevel,f.index),c.children[1]):c.appendChild(e.navigationLineModule.renderNavigation(f.currentLayer,e.tileZoomLevel,f.index))):e.isTileMap&&y.id.indexOf("_Polygons_Group")>-1?f.currentLayer.polygonSettings.polygons.length>0&&(f.currentLayer.polygonSettings.polygons.map((function(i,o){var n=i.points,a=u(e,e.tileZoomLevel,r.currentLayer,n),l=document.getElementById(e.element.id+"_LayerIndex_"+r.index+"_PolygonIndex_"+o);(0,t.isNullOrUndefined)(l)||l.setAttribute("d",a)})),document.getElementById(e.element.id+"_LayerIndex_"+f.index+"_Polygons_Group").style.visibility=""):-1===y.id.indexOf("Legend")&&(pt(y,f.index,s,e),e.zoomTranslatePoint=e.translatePoint,f.animateTransform(y,o,d,p,s))},S=0;S<y;S++)v(S)}e.arrangeTemplate()},f=this,b=0;b<this.layerCollectionEle.childElementCount;b++)y(b);(0,t.isNullOrUndefined)(this.currentLayer)||o&&0!==this.currentLayer.animationDuration&&!e.isTileMap||this.processTemplate(d,p,s,e)}},e.prototype.markerTranslates=function(e,i,o,n,a,l,r){var s=this,d=0,p=0,h=0,m=parseInt((e||r).id.split("_LayerIndex_")[1].split("_")[0],10),u=this.maps.renderer.createGroup({id:this.maps.element.id+"_Markers_Group",class:"GroupElement"});u.style.pointerEvents="auto",document.getElementById(u.id)&&Be(u.id);var y=this.maps.mapAreaRect,f=(0,t.createElement)("div",{id:this.maps.element.id+"_LayerIndex_"+m+"_Markers_Template_Group",className:"template"});f.style.cssText="overflow: hidden; position: absolute;pointer-events: none;top:"+y.y+"px;left:"+y.x+"px;height:"+y.height+"px;width:"+y.width+"px;",document.getElementById(f.id)&&Be(f.id);var b=this.maps.layersCollection[m],v=this.maps.markerModule.allowInnerClusterSetting(b);Array.prototype.forEach.call(b.markerSettings,(function(e,y){h=0,p=0;var S=e.dataSource;(0,t.isNullOrUndefined)(S)||Array.prototype.forEach.call(S,(function(x,C){s.maps.markerNullCount=y>=0&&0===C?0:s.maps.markerNullCount;var O={template:e.template,data:x,maps:s.maps,marker:e,cancel:!1,name:Ti,fill:e.fill,colorValuePath:e.colorValuePath,shapeValuePath:e.shapeValuePath,height:(0,t.isNullOrUndefined)(e.heightValuePath)||(0,t.isNullOrUndefined)(x[e.heightValuePath])?e.height:x[e.heightValuePath],width:(0,t.isNullOrUndefined)(e.widthValuePath)||(0,t.isNullOrUndefined)(x[e.widthValuePath])?e.width:x[e.widthValuePath],imageUrl:e.imageUrl,imageUrlValuePath:e.imageUrlValuePath,shape:e.shape,border:e.border};O=J(O=Q(O,x),x),s.maps.trigger("markerRendering",O,(function(_){e.shapeValuePath!==O.shapeValuePath&&(O=Q(O,x)),e.colorValuePath!==O.colorValuePath&&(O=J(O,x));var M=(0,t.isNullOrUndefined)(e.latitudeValuePath)?(0,t.isNullOrUndefined)(x.latitude)?(0,t.isNullOrUndefined)(x.Latitude)?null:x.Latitude:parseFloat(x.latitude):Number(Y(x,e.latitudeValuePath)),L=(0,t.isNullOrUndefined)(e.longitudeValuePath)?(0,t.isNullOrUndefined)(x.longitude)?(0,t.isNullOrUndefined)(x.Longitude)?null:x.Longitude:parseFloat(x.longitude):Number(Y(x,e.longitudeValuePath)),P=e.offset;if(!O.cancel&&e.visible&&!(0,t.isNullOrUndefined)(L)&&!(0,t.isNullOrUndefined)(M)){var w=s.maps.element.id+"_LayerIndex_"+m+"_MarkerIndex_"+y+"_dataIndex_"+C,T=s.maps.isTileMap?g(new Z(L,M),s.maps.tileZoomLevel,s.maps.tileTranslatePoint,!0):c(M,L,i,b,s.maps),F={x:o,y:n};!O.template||isNaN(T.x)||isNaN(T.y)?O.template||isNaN(T.x)||isNaN(T.y)||(p++,le(O,e,S,C,T,F,w,P,a,s.maps,u)):(h++,re(O,undefined,w,x,y,f,T,F,a,P,s.maps))}d+=isNaN(M)||isNaN(L)?1:0,h+=O.cancel?1:0,p+=O.cancel?1:0,s.maps.markerNullCount=(0,t.isNullOrUndefined)(M)||(0,t.isNullOrUndefined)(L)?s.maps.markerNullCount+1:s.maps.markerNullCount;var I=S.length-s.maps.markerNullCount,k=!1;if((e.clusterSettings.allowClustering||b.markerClusterSettings.allowClustering&&b.markerSettings.length>1?u.querySelectorAll("[id*='LayerIndex_"+m+"_MarkerIndex_"+y+"']:not([id*='_Group'])"):u.childNodes).length===I-h-d&&"Template"!==l){if(s.maps.isTileMap){var N=document.getElementById(s.maps.element.id+"_LayerIndex_"+m+"_Polygons_Group"),E=document.getElementById(s.maps.element.id+"_LayerIndex_"+m+"_Polygon_Group");(0,t.isNullOrUndefined)(N)?(0,t.isNullOrUndefined)(E)?r.insertBefore(u,r.firstElementChild):E.insertAdjacentElement("afterend",u):N.insertAdjacentElement("afterend",u)}else r.appendChild(u);(b.markerSettings[y].clusterSettings.allowClustering||!v&&b.markerClusterSettings.allowClustering)&&(s.maps.svgObject.appendChild(u),s.maps.element.appendChild(s.maps.svgObject),k=te(b,u,s.maps,m,y,u,r,!0,!0,null,v))}(e.clusterSettings.allowClustering||b.markerClusterSettings.allowClustering&&b.markerSettings.length>1?f.querySelectorAll("[id*='LayerIndex_"+m+"_MarkerIndex_"+y+"']:not([id*='_Group'])"):f.childNodes).length===I-p-d&&Re(s.maps.element.id+"_Secondary_Element")&&(Re(s.maps.element.id+"_Secondary_Element").appendChild(f),a>=1&&(e.clusterSettings.allowClustering||!v&&b.markerClusterSettings.allowClustering)&&!k&&te(b,f,s.maps,m,y,u,r,!1,!0,null,v))}))}))}))},e.prototype.processTemplate=function(e,i,o,n){for(var a=0,l=0;l<this.templateCount;l++){var r=n.mapLayerPanel.calculateFactor(this.currentLayer),s=Re(n.element.id+"_LayerIndex_"+l+"_Markers_Template_Group"),d=Re(n.element.id+"_LayerIndex_"+l+"_Label_Template_Group"),p=Re(n.element.id+"_LayerIndex_"+l+"_Polygons_Group");if(!(0,t.isNullOrUndefined)(s)&&s.childElementCount>0){s.style.visibility="visible";for(var h=0;h<s.childElementCount;h++)this.markerTranslate(s.childNodes[h],r,e,i,o,"Template")}if(!(0,t.isNullOrUndefined)(d)&&d.childElementCount>0)for(h=0;h<d.childElementCount;h++)this.dataLabelTranslate(d.childNodes[h],r,e,i,o,"Template",!1,a),a++;if(!(0,t.isNullOrUndefined)(p))for(h=0;h<p.childElementCount;h++){var m=n.layersCollection[l].polygonSettings.polygons[h].borderWidth;p.childNodes[h].childNodes[0].setAttribute("stroke-width",(m/o).toString())}}},e.prototype.dataLabelTranslate=function(e,i,o,n,a,l,r,s,d,p){void 0===r&&(r=!1);var h,m,c,u,g,y=this.maps.dataLabelModule.dataLabelCollections,f=this.maps.layers[this.index].dataLabelSettings.textStyle,b=parseFloat(e.id.split("_LayerIndex_")[1].split("_")[0]),v=parseFloat(e.id.split("_shapeIndex_")[1].split("_")[0]);e.id.indexOf("_LabelIndex_")>-1&&(g=parseFloat(e.id.split("_LabelIndex_")[1].split("_")[0]));var S=0===this.currentLayer.animationDuration&&"Enable"===t.animationMode?1e3:this.currentLayer.animationDuration,x=y[s],C=s;if(x.layerIndex===b&&x.shapeIndex===v&&x.labelIndex===g){var O=x.location.x,_=x.location.y;if("Template"===l){var M=0,L=0;if(this.maps.isTileMap)M=(O+o)*a-(u=T(c=x.dataLabelText,f)).width/2,L=(_+n)*a-u.height;else{var P=Re(this.maps.element.id+"_Layer_Collections");O=Math.abs(this.maps.baseMapRectBounds.min.x-O)*a,_=Math.abs(this.maps.baseMapRectBounds.min.y-_)*a;var w=P.getBoundingClientRect(),I=e.parentElement.getBoundingClientRect();M=O+(w.left-I.left),L=_+(w.top-I.top)}e.style.left=M+"px",e.style.top=L+"px"}else{if(O=(O+o)*a,_=(_+n)*a,c=x.dataLabelText,r&&0!==S||e.setAttribute("transform","translate( "+O+" "+_+" )"),((0,t.isNullOrUndefined)(d)||!d)&&("None"!==this.maps.layers[this.index].dataLabelSettings.smartLabelMode||"None"!==this.maps.layers[this.index].dataLabelSettings.intersectionAction)){var k=_-(u=F(c,f)).height/2,N=_+u.height/2,E={rightWidth:O+u.width/2,leftWidth:O-u.width/2,heightTop:k,heightBottom:N};"Hide"===this.maps.layers[this.index].dataLabelSettings.smartLabelMode&&(a>1?(h=this.maps.dataLabelShape[C]*a>=u.width?c:"",e.textContent=h):(h=this.maps.dataLabelShape[C]>=u.width?c:"",e.textContent=h));var z=[];if("Trim"===this.maps.layers[this.index].dataLabelSettings.smartLabelMode&&(a>1?(h=Ee(this.maps.dataLabelShape[C]*a,c,f,u.width,!0,z),e.textContent=h):(h=Ee(this.maps.dataLabelShape[C],c,f,u.width,!0,z),e.textContent=h)),"Hide"===this.maps.layers[this.index].dataLabelSettings.intersectionAction){for(var B=0;B<p.length;B++)if(!(0,t.isNullOrUndefined)(p[B])){if(!(E.leftWidth>p[B].rightWidth||E.rightWidth<p[B].leftWidth||E.heightTop>p[B].heightBottom||E.heightBottom<p[B].heightTop)){h="",e.textContent=h;break}h=(0,t.isNullOrUndefined)(h)?c:h,e.textContent=h}p.push(E)}if("Trim"===this.maps.layers[this.index].dataLabelSettings.intersectionAction){for(var A=0;A<p.length;A++)if(!(0,t.isNullOrUndefined)(p[A]))if(E.rightWidth<p[A].leftWidth||E.leftWidth>p[A].rightWidth||E.heightBottom<p[A].heightTop||E.heightTop>p[A].heightBottom){if(m=(0,t.isNullOrUndefined)(h)?c:h,a>1){var U=z.length>0?z[0]:u.width;m=Ee(this.maps.dataLabelShape[C]*a,m,f,U,!0)}e.textContent=m}else{if(E.leftWidth>p[A].leftWidth){m=Ee((j=p[A].rightWidth-E.leftWidth)-(E.rightWidth-E.leftWidth),h=(0,t.isNullOrUndefined)(h)?c:h,f,U=z.length>0?z[0]:u.width,!0),e.textContent=m;break}if(E.leftWidth<p[A].leftWidth){var j=E.rightWidth-p[A].leftWidth;m=Ee(Math.abs(j-(E.rightWidth-E.leftWidth)),h=(0,t.isNullOrUndefined)(h)?c:h,f,U=z.length>0?z[0]:u.width,!0),e.textContent=m;break}}p.push(E),(0,t.isNullOrUndefined)(m)&&(m=Ee(this.maps.dataLabelShape[C]*a,c,f,u.width,!0),e.textContent=m)}}(r||S>0)&&Lt(e,0,S,new Z(O,_))}}},e.prototype.markerTranslate=function(e,i,o,n,a,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),h=this.maps.layersCollection[s],m=h.markerSettings[d];if(!(0,t.isNullOrUndefined)(m)&&!(0,t.isNullOrUndefined)(m.dataSource)&&!(0,t.isNullOrUndefined)(m.dataSource[p])){var u=(0,t.isNullOrUndefined)(m.longitudeValuePath)?(0,t.isNullOrUndefined)(m.dataSource[p].longitude)?(0,t.isNullOrUndefined)(m.dataSource[p].Longitude)?0:parseFloat(m.dataSource[p].Longitude):parseFloat(m.dataSource[p].longitude):Number(Y(m.dataSource[p],m.longitudeValuePath)),y=(0,t.isNullOrUndefined)(m.latitudeValuePath)?(0,t.isNullOrUndefined)(m.dataSource[p].latitude)?(0,t.isNullOrUndefined)(m.dataSource[p].Latitude)?0:parseFloat(m.dataSource[p].Latitude):parseFloat(m.dataSource[p].latitude):Number(Y(m.dataSource[p],m.latitudeValuePath)),f=0===this.currentLayer.animationDuration&&"Enable"===t.animationMode?1e3:this.currentLayer.animationDuration,b=this.maps.isTileMap?g(new _(u,y),this.maps.tileZoomLevel,this.maps.tileTranslatePoint,!0):c(y,u,i,h,this.maps);if(this.maps.isTileMap)"Template"===l?(e.style.left=b.x+m.offset.x+"px",e.style.top=b.y+m.offset.y+"px"):(b.x+=m.offset.x,b.y+=m.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)*a,b.y=Math.abs(this.maps.baseMapRectBounds.min.y-b.y)*a;var v=Re(this.maps.element.id+"_Layer_Collections").getBoundingClientRect(),S=e.parentElement.getBoundingClientRect();e.style.left=b.x+(v.left-S.left)+m.offset.x+"px",e.style.top=b.y+(v.top-S.top)+m.offset.y+"px",e.style.transform="translate(-50%, -50%)"}else e.style.left=(b.x+o)*a+m.offset.x-this.maps.mapAreaRect.x+"px",e.style.top=(b.y+n)*a+m.offset.y-this.maps.mapAreaRect.y+"px";else b.x=(b.x+o)*a+m.offset.x,b.y=(b.y+n)*a+m.offset.y,r&&0!==f?Lt(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=Re(this.maps.element.id+"_LayerIndex_"+i+"_Markers_Template_Group"),n=Re(this.maps.element.id+"_LayerIndex_"+i+"_line_Group"),a=Re(this.maps.element.id+"_LayerIndex_"+i+"_Polygons_Group");(0,t.isNullOrUndefined)(o)||(o.style.visibility="hidden"),(0,t.isNullOrUndefined)(n)||(n.style.visibility="hidden"),(0,t.isNullOrUndefined)(a)||(a.style.visibility="hidden")}},e.prototype.panning=function(e,i,o,n){var a,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;i=(0,t.isNullOrUndefined)(i)?r.x-s.x:i,o=(0,t.isNullOrUndefined)(o)?r.y-s.y:o;var u=n.type.indexOf("mouse")>-1||n.type.indexOf("key")>-1?n.layerX:n.touches[0].pageX,g=n.type.indexOf("mouse")>-1||n.type.indexOf("key")>-1?n.layerY:n.touches[0].pageY;if(this.maps.mergeCluster(),l.isTileMap){if(this.maps.tileZoomLevel>1){p=l.tileTranslatePoint.x-i,h=l.tileTranslatePoint.y-o,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/l.scale,l.translatePoint.y=l.tileTranslatePoint.y/l.scale;var y=this.maps.getTileGeoLocation(u,g);L=this.maps.getMinMaxLatitudeLongitude();a={cancel:!1,name:Ki,maps:l,tileTranslatePoint:{previous:c,current:l.tileTranslatePoint},translatePoint:{previous:m,current:l.translatePoint},scale:l.scale,tileZoomLevel:l.tileZoomLevel,latitude:y.latitude,longitude:y.longitude,minLatitude:L.minLatitude,maxLatitude:L.maxLatitude,minLongitude:L.minLongitude,maxLongitude:L.maxLongitude},l.trigger(Ki,a),l.mapLayerPanel.generateTiles(l.tileZoomLevel,l.tileTranslatePoint,"Pan"),this.applyTransform(l,!1,!1,!0),l.translatePoint.x=(l.tileTranslatePoint.x-i)/l.scale,l.translatePoint.y=(l.tileTranslatePoint.y-o)/l.scale}}else{var f=De(l.margin.top),b=document.getElementById(l.element.id+"_Legend_Group"),v=(0,t.isNullOrUndefined)(b)?0:b.getClientRects()[0].height;p=m.x-i/d,h=m.y-o/d;var S=Re(l.element.id+"_Layer_Collections").getBoundingClientRect(),x=Re(l.element.id+"_svg").getBoundingClientRect(),C=i<0?S.left<=x.left+l.mapAreaRect.x:S.left+S.width+l.mapAreaRect.x>=x.width,O=o<0?S.top<=x.top+l.mapAreaRect.y:S.top+S.height+v+f>=x.top+x.height,M=this.maps.getGeoLocation(this.maps.layersCollection.length-1,u,g),L=this.maps.getMinMaxLatitudeLongitude();a={cancel:!1,name:Ki,maps:l,tileTranslatePoint:{},translatePoint:{previous:m,current:new _(p,h)},scale:l.scale,tileZoomLevel:l.tileZoomLevel,latitude:M.latitude,longitude:M.longitude,minLatitude:L.minLatitude,maxLatitude:L.maxLatitude,minLongitude:L.minLongitude,maxLongitude:L.maxLongitude},l.trigger(Ki,a),a.cancel||(C&&O?(l.translatePoint=new _(p,h),this.applyTransform(l,!1,!1,!0)):C?(l.translatePoint=new _(p,l.translatePoint.y),this.applyTransform(l,!1,!1,!0)):O&&(l.translatePoint=new _(l.translatePoint.x,h),this.applyTransform(l,!1,!1,!0))),this.maps.zoomNotApplied=!1}l.zoomTranslatePoint=l.translatePoint,this.mouseDownPoints=this.mouseMovePoints,this.isSingleClick=!1},e.prototype.toolBarZooming=function(e,i){var o=this,n=this.maps;n.initialCheck=n.isMarkerZoomCompleted=!1,n.defaultState="Reset"===i&&1===e&&!(n.zoomSettings.resetToInitial&&n.applyZoomReset)||"ZoomOut"===i&&1===e;var a=n.tileZoomLevel,l=n.previousScale=n.scale;n.markerZoomedState=!1,n.zoomPersistence=n.enablePersistence,n.mapScaleValue=e;var r=n.zoomSettings.maxZoom,s=n.zoomSettings.minZoom,d=n.mapAreaRect,p=n.previousPoint=n.translatePoint,h=n.tileTranslatePoint;if(this.maps.mergeCluster(),n.previousProjection="Reset"===i?void 0:n.projectionType,e="ZoomOut"===i&&1===Math.round(e)?1:e,e=s>(e="Reset"===i?s:0===Math.round(e)?1:e)&&"ZoomIn"===i?s+1:e,!n.isTileMap&&("ZoomIn"===i?e>=s&&Math.round(e)<=r:e>=s||n.isReset)){var m=n.baseMapRectBounds.min,c=n.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"!==n.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,n.translatePoint=this.calculateInitalZoomTranslatePoint(e,u,g,d,m,n);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(n.baseMapRectBounds.max.y-n.baseMapRectBounds.min.y)*e;y=b<n.mapAreaRect.height?d.x+(-m.x+(d.width/2-u/2)):y,f=b<n.mapAreaRect.height?d.y+(-m.y+(d.height/2-g/2)):f,n.translatePoint=new _(y,f)}n.zoomTranslatePoint=n.translatePoint,n.scale=e,this.triggerZoomEvent(h,a,i)?(n.translatePoint=n.zoomTranslatePoint=n.previousPoint,n.scale=n.previousScale):this.applyTransform(n,!1,!0)}else if(n.isTileMap&&(e>=s&&e<=r||n.isReset)){var v=a<s&&!n.isReset?s:e;if(n.scale=Math.pow(2,v-1),n.tileZoomLevel=v,n.previousScale!==n.scale||n.isReset){n.zoomSettings.zoomFactor=e;var S={x:n.availableSize.width/2,y:n.availableSize.height/2};if(this.getTileTranslatePosition(a,v,S,i),(n.zoomSettings.resetToInitial&&n.applyZoomReset&&"Reset"===i||"ZoomOut"===i&&n.zoomSettings.resetToInitial&&n.applyZoomReset&&v<=n.initialZoomLevel)&&(n.initialCheck=!0,n.zoomPersistence=!1,n.tileTranslatePoint.x=n.initialTileTranslate.x,n.tileTranslatePoint.y=n.initialTileTranslate.y,v=n.tileZoomLevel=n.mapScaleValue=n.initialZoomLevel),this.triggerZoomEvent(h,a,i))n.translatePoint=n.tileTranslatePoint=new _(0,0),n.scale=n.previousScale,n.tileZoomLevel=a,n.zoomSettings.zoomFactor=n.previousScale;else{n.translatePoint.y=(n.tileTranslatePoint.y-.01*n.mapScaleValue)/n.scale,n.translatePoint.x=(n.tileTranslatePoint.x-.01*n.mapScaleValue)/n.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(n),n.mapLayerPanel.generateTiles(v,n.tileTranslatePoint,i);var x=0===this.maps.layersCollection[0].animationDuration&&"Enable"===t.animationMode?1e3:this.maps.layersCollection[0].animationDuration;setTimeout((function(){o.applyTransform(o.maps,!1,!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}this.triggerZoomComplete(n,a,i)},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,n=e.zoomSettings.toolbarSettings,a=e.zoomSettings.toolbarSettings.buttonSettings;this.maps.toolbarProperties={toolBarOrientation:n.orientation,highlightColor:a.highlightColor,selectionColor:a.selectionColor,horizontalAlignment:n.horizontalAlignment,verticalAlignment:n.verticalAlignment,color:a.color,shapeOpacity:a.opacity,borderOpacity:a.borderOpacity};var l=a.radius||e.themeStyle.zoomButtonRadius,r=l/4,s=l/4,d=l/2,p=a.padding,h=this.maps.toolbarProperties.toolBarOrientation,m=e.zoomSettings.toolbarSettings.buttonSettings.toolbarItems.map((function(e){return e}));i=l/4+a.borderWidth/2+p,o=l/4+a.borderWidth/2+p;var c=m.length,u="Horizontal"===h?c*l+c*p+p+c*a.borderWidth:l+a.borderWidth+2*p,g="Horizontal"===h?l+a.borderWidth+2*p:c*l+c*p+p+c*a.borderWidth,y=e.renderer.createDefs();y.innerHTML='<filter id="chart_shadow" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="5"/><feOffset dx="-3" dy="4" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="1"/></feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>',this.toolBarGroup.appendChild(y);var f=e.renderer.drawRectangle(new E(e.element.id+"_Zooming_Rect",n.backgroundColor,{color:n.borderColor,width:n.borderWidth,opacity:n.borderOpacity},n.borderOpacity,new R(n.borderWidth/2,n.borderWidth/2,u-n.borderWidth,g-n.borderWidth),0,0));this.toolBarGroup.appendChild(f);for(var b=(l-a.borderWidth/2)/30,v=0;v<m.length;v++){0!==v&&(i="Horizontal"===e.toolbarProperties.toolBarOrientation?i+(l+p)+a.borderWidth:i,o="Horizontal"===e.toolbarProperties.toolBarOrientation?o:o+(l+p)+a.borderWidth);var S=m[v],x=(0,t.isNullOrUndefined)(this.maps.toolbarProperties.color)?this.maps.themeStyle.zoomFillColor:this.maps.toolbarProperties.color,C=a.borderColor||this.maps.themeStyle.zoomBorderColor||this.maps.themeStyle.zoomFillColor;this.currentToolbarEle=e.renderer.createGroup({id:e.element.id+"_Zooming_ToolBar_"+S+"_Group",transform:"translate( "+i+" "+o+" ) "}),this.currentToolbarEle.setAttribute("class","e-maps-toolbar"),this.currentToolbarEle.appendChild(e.renderer.drawCircle(new z(e.element.id+"_Zooming_ToolBar_"+S+"_Rect",a.fill,{color:C,width:a.borderWidth,opacity:a.borderOpacity},a.opacity,r,s,d,"")));var O="",_=a.fill;switch(this.selectionColor=this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor,S.toLowerCase()){case"zoom":var M=void 0,L=void 0;O="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,",O+="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",O+="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||this.maps.zoomSettings.enablePanning&&this.maps.zoomSettings.enableSelectionZooming?(M=_,L=x):this.maps.zoomSettings.enablePanning||this.maps.zoomSettings.enableSelectionZooming?!this.maps.zoomSettings.enablePanning&&this.maps.zoomSettings.enableSelectionZooming?(M=this.maps.themeStyle.zoomFillColor,L=x):(M=this.selectionColor,L=this.selectionColor):(M=_,L=x);var P=e.renderer.drawPath(new k(e.element.id+"_Zooming_ToolBar_"+S,M,1,L,1,1,null,O+"4.114s-1.828,4.114-4.114,4.114S5.943,8.229,5.943,5.943z"));P.setAttribute("transform","scale( "+b+","+b+" )"),this.currentToolbarEle.appendChild(P),this.zoomElements=this.currentToolbarEle,this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"zoomin":O="M 8, 0 L 8, 16 M 0, 8 L 16, 8";var w=e.renderer.drawPath(new k(e.element.id+"_Zooming_ToolBar_"+S+"_Path",_,3,x,1,1,null,O));w.setAttribute("transform","scale( "+b+","+b+" )"),this.currentToolbarEle.appendChild(w),this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"zoomout":O="M 0, 8 L 16, 8";var T=e.renderer.drawPath(new k(e.element.id+"_Zooming_ToolBar_"+S,_,3,x,1,1,null,O));T.setAttribute("transform","scale( "+b+","+b+" )"),this.currentToolbarEle.appendChild(T),this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"pan":var F=void 0;O="M5,3h2.3L7.275,5.875h1.4L8.65,3H11L8,0L5,3z M3,11V8.7l2.875,0.025v-1.4L3,7.35V5L0,8L3,",O+="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?F=this.selectionColor||this.maps.themeStyle.zoomFillColor:this.maps.zoomSettings.enablePanning?F=_||this.maps.themeStyle.zoomFillColor:(F=this.selectionColor||this.maps.themeStyle.zoomFillColor,this.currentToolbarEle.setAttribute("class",""));var I=e.renderer.drawPath(new k(e.element.id+"_Zooming_ToolBar_"+S,F,1,x,1,1,null,O));I.setAttribute("transform","scale( "+b+","+b+" )"),this.currentToolbarEle.appendChild(I),this.panColor=F,this.panElements=this.currentToolbarEle,this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"reset":O="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,",O+="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,",O+="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 N=e.renderer.drawPath(new k(e.element.id+"_Zooming_ToolBar_"+S,_,null,x,1,1,null,O+"3.575,2.618,6.5,5.818,6.5C9.128,14.5,10.219,14.134,11.091,13.484L11.091,13.484z"));N.setAttribute("transform","scale( "+b+","+b+" )"),this.currentToolbarEle.appendChild(N),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],n=!0;switch(o.toLowerCase()){case"zoomin":n=(this.maps.isTileMap?this.maps.tileZoomLevel:this.maps.scale)+1<=this.maps.zoomSettings.maxZoom;break;case"zoomout":var a=this.maps.isTileMap?this.maps.tileZoomLevel:this.maps.scale;n="Miller"===this.maps.projectionType||"Winkel3"===this.maps.projectionType||"AitOff"===this.maps.projectionType?Math.round(a)-1>=this.maps.zoomSettings.minZoom:a-1>=this.maps.zoomSettings.minZoom;break;case"reset":n=Math.round(this.maps.isTileMap?this.maps.tileZoomLevel:this.maps.scale)!==this.maps.zoomSettings.minZoom}i&&n?(this.handled=!0,this.performZoomingByToolBar(o)):"mousedown"!==e.type&&"pointerdown"!==e.type||this.handled||!n?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<t.zoomSettings.maxZoom&&(t.staticMapZoom+=1),t.isTileMap&&t.tileZoomLevel>=t.zoomSettings.minZoom&&t.tileZoomLevel<t.zoomSettings.maxZoom?this.toolBarZooming(t.tileZoomLevel+1,"ZoomIn"):t.isTileMap||this.toolBarZooming(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=Re(this.maps.element.id+"_svg");"pan"===e||this.isPanModeEnabled&&"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||(at("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(){Re("EJ2_Map_Toolbar_Tip")&&(0,t.remove)(Re("EJ2_Map_Toolbar_Tip"))},e.prototype.alignToolBar=function(){var e=this.maps,i=(0,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),Re(e.element.id+"_Secondary_Element")&&Re(e.element.id+"_Secondary_Element").appendChild(i);var n=this.toolBarGroup.getBoundingClientRect();o.setAttribute("height",(n.height+e.zoomSettings.toolbarSettings.borderWidth).toString()),o.setAttribute("width",(n.width+e.zoomSettings.toolbarSettings.borderWidth).toString());var a=(0,t.isNullOrUndefined)(e.totalRect)?e.mapAreaRect:e.totalRect,l=0,r=0;switch(e.toolbarProperties.verticalAlignment){case"Near":r=a.y;break;case"Center":r=a.height/2-n.height/2;break;case"Far":r=a.height-n.height-10}switch(e.toolbarProperties.horizontalAlignment){case"Near":l=a.x;break;case"Center":l=a.width/2-n.width/2;break;case"Far":l=(0,t.isNullOrUndefined)(e.legendModule)||"Left"!==e.legendSettings.position?a.width-n.width-10:a.width+a.x-n.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,i){if(!(0,t.isNullOrUndefined)(this.maps)&&this.maps.zoomModule&&this.maps.zoomSettings.enable)if(Re(this.maps.element.id+"_Zooming_KitCollection")&&i.indexOf(this.maps.element.id+"_Zooming_")>-1){this.maps.isDevice?(Re(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 o=this.maps.toolbarProperties.shapeOpacity,n=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?o:.3,this.maps.zoomSettings.enableSelectionZooming?n:.3,o,n,.3,.3,this.maps.zoomSettings.enablePanning?o:.3,this.maps.zoomSettings.enablePanning?n:.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?o:.3,this.maps.zoomSettings.enableSelectionZooming?n:.3,o,n,.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?o:.3,this.maps.zoomSettings.enableSelectionZooming?n:.3,o,n,o,n,this.maps.zoomSettings.enablePanning?o:.3,this.maps.zoomSettings.enablePanning?n:.3,o,n),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,o,n,this.maps.zoomSettings.enablePanning?o:.3,this.maps.zoomSettings.enablePanning?n:.3,o,n),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){Re(this.maps.element.id+e)&&(Re(this.maps.element.id+e).setAttribute("stroke-opacity",i.toString()),Re(this.maps.element.id+e).setAttribute("fill-opacity",i.toString()),Re(this.maps.element.id+t).setAttribute("stroke-opacity",o.toString()),Re(this.maps.element.id+t).setAttribute("fill-opacity",o.toString()))},e.prototype.removeZoomOpacity=function(e,t,i,o,n,a,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",a,n),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,n){Re(this.maps.element.id+"_Zooming_KitCollection")&&(document.getElementById(this.maps.element.id+"_Zooming_ToolBar_ZoomIn_Group")&&Re(this.maps.element.id+"_Zooming_ToolBar_ZoomIn_Group").setAttribute("class",t),document.getElementById(this.maps.element.id+"_Zooming_ToolBar_ZoomOut_Group")&&Re(this.maps.element.id+"_Zooming_ToolBar_ZoomOut_Group").setAttribute("class",i),document.getElementById(this.maps.element.id+"_Zooming_ToolBar_Reset_Group")&&Re(this.maps.element.id+"_Zooming_ToolBar_Reset_Group").setAttribute("class",n),document.getElementById(this.maps.element.id+"_Zooming_ToolBar_Zoom_Group")&&this.maps.zoomSettings.enableSelectionZooming&&Re(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&&Re(this.maps.element.id+"_Zooming_ToolBar_Pan_Group").setAttribute("class",o))},e.prototype.removePanColor=function(e){Re(this.maps.element.id+"_Zooming_ToolBar_Pan_Rect")&&this.maps.zoomSettings.enablePanning&&(Re(this.maps.element.id+"_Zooming_ToolBar_Pan").setAttribute("fill",e),Re(this.maps.element.id+"_Zooming_ToolBar_Pan").setAttribute("stroke",e))},e.prototype.removeZoomColor=function(e){Re(this.maps.element.id+"_Zooming_ToolBar_Zoom_Rect")&&this.maps.zoomSettings.enableSelectionZooming&&(Re(this.maps.element.id+"_Zooming_ToolBar_Zoom").setAttribute("fill","transparent"),Re(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.markerZoomedState=!1,i.zoomPersistence=i.enablePersistence;var o=this.getMousePosition(e.pageX,e.pageY),n=i.tileZoomLevel,a=i.scale,l=i.zoomSettings.maxZoom,r=i.isTileMap?n:a;if(this.maps.mergeCluster(),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 s="mozilla"!==this.browserName||this.isPointer?e.wheelDelta/120>0?"ZoomIn":"ZoomOut":-e.detail/3>0?"ZoomIn":"ZoomOut";"ZoomIn"===s?(i.mapScaleValue=r+1,i.isTileMap?(i.staticMapZoom=i.tileZoomLevel,i.staticMapZoom>0&&i.staticMapZoom<l&&(i.staticMapZoom+=1,this.performZooming(o,r+1,s,!0))):this.performZooming(o,r+1,s,!0)):(i.mapScaleValue=r-1,i.isReset=i.mapScaleValue<1,i.staticMapZoom=i.tileZoomLevel,1===i.mapScaleValue&&(i.markerCenterLatitude=null,i.markerCenterLongitude=null),i.staticMapZoom>1&&i.staticMapZoom<l&&(i.staticMapZoom-=1),this.performZooming(o,r-1,s,!0))}this.removeToolbarOpacity(i.mapScaleValue,this.maps.isDevice?this.maps.element.id+"_Zooming_":(0,t.isNullOrUndefined)(e.target)?this.maps.element.id:e.target.id)}},e.prototype.doubleClick=function(e){var i=e.pageX,o=e.pageY,n=e.target.closest("#"+this.maps.element.id+"_mapsTooltipparent_template");if(this.maps.zoomSettings.enable&&this.maps.zoomSettings.doubleClickZoom&&!(e.target.id.indexOf("_Zooming_")>-1)&&(0,t.isNullOrUndefined)(n)){var a=this.getMousePosition(i,o),l=this.maps,r=l.tileZoomLevel,s=l.scale;l.mapScaleValue=l.mapScaleValue+1;var d=l.isTileMap?r:s;a.x>l.mapAreaRect.x&&a.x<l.mapAreaRect.x+l.mapAreaRect.width&&a.y>l.mapAreaRect.y&&a.y<l.mapAreaRect.y+l.mapAreaRect.height&&this.performZooming(a,d+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].pageX,i=o[0].pageY):(t=e.pageX,i=e.pageY,e.target),this.isTouch||e.preventDefault(),this.maps.zoomSettings.enablePanning?this.isPan=this.isPanModeEnabled=!this.isZoomSelection:this.isPan=this.isPanModeEnabled=this.panColor!==this.selectionColor?this.maps.zoomSettings.enablePanning:this.zoomColor===this.selectionColor,this.mouseDownLatLong={x:t,y:i};var n=this.maps.isTileMap?Math.round(this.maps.tileZoomLevel):Math.round(this.maps.mapScaleValue);this.rectZoomingStart=this.isZoomSelection&&n<this.maps.zoomSettings.maxZoom&&this.maps.zoomSettings.enable,this.mouseDownPoints=this.getMousePosition(t,i),this.isTouch&&null!==o&&(this.firstMove=!0,this.pinchFactor=this.maps.scale,this.fingers=o.length),this.isSingleClick=!0},e.prototype.mouseMoveHandler=function(e){var i,o,n,a=this.maps,l=null,r=this.maps.zoomSettings;if("touchmove"===e.type?(this.isTouch=!0,n=e.target,i=(l=e.touches)[0].pageX,o=l[0].pageY):(i=e.pageX,o=e.pageY,n=e.target),Re(a.element.id+"_Zooming_KitCollection")&&(n.id.indexOf("_Zooming_")>-1?Re(a.element.id+"_Zooming_KitCollection").setAttribute("opacity","1"):a.isDevice||Re(a.element.id+"_Zooming_KitCollection").setAttribute("opacity","fluentdark"===a.theme.toLowerCase()?"0.6":"0.3")),this.isTouch&&this.maps.zoomSettings.pinchZooming&&null!==l&&(this.firstMove&&2===l.length?(this.rectZoomingStart=!1,this.updateInteraction(),this.touchStartList=mt(e)):2===l.length&&2===this.touchStartList.length&&(this.touchMoveList=mt(e),e.preventDefault(),this.rectZoomingStart=!1,this.performPinchZooming(e)),this.firstMove=!1),this.mouseMovePoints=this.getMousePosition(i,o),r.enable&&this.isPanModeEnabled&&-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?null!==l&&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){if(this.rectZoomingStart=!1,this.isSingleClick=!!this.isSingleClick,this.isTouch=!1,this.touchStartList=[],this.touchMoveList=[],this.lastScale=1,this.maps.element.style.cursor="auto",this.isPanModeEnabled&&this.maps.zoomSettings.enablePanning&&!(0,t.isNullOrUndefined)(this.maps.previousPoint)&&(this.maps.isTileMap?this.isPanningInProgress:this.maps.translatePoint.x!==this.maps.previousPoint.x&&this.maps.translatePoint.y!==this.maps.previousPoint.y)){var i=void 0,o=void 0,n=0,a=0,l=e.target;if(-1!==e.type.indexOf("touch")){var r=e;n=i=r.changedTouches[0].pageX,a=(o=r.changedTouches[0].pageY)-(this.maps.isTileMap?10:0),r.target,this.maps.mouseClickEvent={x:i,y:o}}else i=e.pageX,o=e.pageY,n=e.layerX,a=e.layerY-(this.maps.isTileMap?10:0),e.target;var s=void 0,d=this.maps.getMinMaxLatitudeLongitude();if(this.maps.isTileMap){var p=this.maps.getTileGeoLocation(n,a);s={cancel:!1,name:"panComplete",maps:this.maps,tileTranslatePoint:{previous:this.maps.tileTranslatePoint,current:this.maps.tileTranslatePoint},translatePoint:{previous:this.maps.previousPoint,current:this.maps.translatePoint},scale:this.maps.scale,tileZoomLevel:this.maps.tileZoomLevel,latitude:p.latitude,longitude:p.longitude,minLatitude:d.minLatitude,maxLatitude:d.maxLatitude,minLongitude:d.minLongitude,maxLongitude:d.maxLongitude}}else{this.maps.mouseClickEvent.x=this.maps.mouseDownEvent.x,this.maps.mouseClickEvent.y=this.maps.mouseDownEvent.y;var h=this.maps.getClickLocation(l.id,i,o,l,i,o);s={cancel:!1,name:"panComplete",maps:this.maps,tileTranslatePoint:{},translatePoint:{previous:this.maps.previousPoint,current:this.maps.translatePoint},scale:this.maps.scale,tileZoomLevel:this.maps.tileZoomLevel,latitude:(0,t.isNullOrUndefined)(h)?0:h.latitude,longitude:(0,t.isNullOrUndefined)(h)?0:h.longitude,minLatitude:d.minLatitude,maxLatitude:d.maxLatitude,minLongitude:d.minLongitude,maxLongitude:d.maxLongitude}}this.maps.trigger("panComplete",s)}this.isPanModeEnabled=!1,this.isPanningInProgress=!1;var m=Re(this.maps.element.id+"_Selection_Rect_Zooming");m&&this.maps.zoomSettings.enable&&this.maps.zoomSettings.enableSelectionZooming&&((0,t.remove)(m),this.performRectZooming()),this.mouseMoveLatLong={x:0,y:0},this.mouseDownLatLong={x:0,y:0},this.pinchDistance=null},e.prototype.mouseCancelHandler=function(e){this.isPanModeEnabled=!1,this.isTouch=!1,this.rectZoomingStart=!1;var i=Re(this.maps.element.id+"_Selection_Rect_Zooming");i&&this.maps.zoomSettings.enable&&((0,t.remove)(i),this.performRectZooming())},e.prototype.click=function(e){var i=this.maps,o=e.target.closest("#"+this.maps.element.id+"_mapsTooltipparent_template");if(i.markerModule&&i.markerModule.sameMarkerData.length>0||e.target.id.indexOf("MarkerIndex")>-1&&-1===e.target.id.indexOf("cluster")||!(0,t.isNullOrUndefined)(o))return null;if(this.isSingleClick&&i.zoomSettings.zoomOnClick&&!(e.target.id.indexOf("_Zooming_")>-1)&&!i.zoomSettings.doubleClickZoom&&this.zoomColor!==this.selectionColor){var n=e.pageX,a=e.pageY,l=this.getMousePosition(n,a),r=i.tileZoomLevel,s=i.scale;i.mapScaleValue=i.mapScaleValue+1;var d=i.isTileMap?r:s;l.x>i.mapAreaRect.x&&l.x<i.mapAreaRect.x+i.mapAreaRect.width&&l.y>i.mapAreaRect.y&&l.y<i.mapAreaRect.y+i.mapAreaRect.height&&this.performZooming(l,d+1,"ZoomIn")}},e.prototype.getMousePosition=function(e,t){var i=this.maps,o=i.element.getBoundingClientRect(),n=i.element.ownerDocument.defaultView.pageXOffset,a=i.element.ownerDocument.defaultView.pageYOffset,l=i.element.ownerDocument.documentElement.clientTop,r=i.element.ownerDocument.documentElement.clientLeft,s=o.left+n-r,d=o.top+a-l;return new _(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(){if(!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),t.EventHandler.remove(this.maps.element,this.cancelEvent,this.mouseCancelHandler);var e=document.getElementById(this.maps.element.id+"_Zooming_KitCollection");if(e)for(var i=0;i<e.childNodes.length;i++)"g"===e.childNodes[i].tagName&&(t.EventHandler.add(e.childNodes[i],t.Browser.touchStartEvent,this.performToolBarAction),t.EventHandler.add(e.childNodes[i],"mouseover",this.showTooltip),t.EventHandler.add(e.childNodes[i],"mouseout",this.removeTooltip))}},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.mouseDownLatLong=null,this.mouseMoveLatLong=null,this.removeEventListener(),this.layerCollectionEle=null,this.currentLayer=null,this.pinchDistance=null},e}(),bo=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 n={cancel:!1,htmlContent:this.getHTMLContent(e,i),name:Yi};e.trigger("beforePrint",n,(function(e){n.cancel||(0,t.print)(n.htmlContent,o)}))},e.prototype.getHTMLContent=function(e,i){var o=(0,t.createElement)("div"),n=e.element.cloneNode(!0),a=e.isTileMap?n.getElementsByTagName("svg")[1]:n.getElementsByTagName("svg")[0];if(!(0,t.isNullOrUndefined)(a)&&(a=a.childNodes[0],!(0,t.isNullOrUndefined)(a))){var l=a.getAttribute("fill");"Tailwind"!==e.theme&&"Tailwind3"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme&&"Fluent2"!==e.theme||"rgba(255,255,255, 0.0)"!==l&&"transparent"!==l?"TailwindDark"!==e.theme&&"Tailwind3Dark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme&&"Fluent2Dark"!==e.theme&&"Fluent2HighContrast"!==e.theme||"rgba(255,255,255, 0.0)"!==l&&"transparent"!==l||a.setAttribute("fill","rgba(0, 0, 0, 1)"):a.setAttribute("fill","rgba(255,255,255, 1)")}if(e.isTileMap)for(var r=0;r<n.childElementCount;r++)if(n.children[r].id===e.element.id+"_tile_parent"){n.children[r].style.removeProperty("height"),n.children[r].style.removeProperty("width"),n.children[r].style.removeProperty("top"),n.children[r].style.removeProperty("left"),n.children[r].style.removeProperty("right"),n.children[r].style.removeProperty("overflow");var s=document.getElementById(e.element.id+"_Tile_SVG_Parent");n.children[r].children[0].style.overflow="hidden",n.children[r].children[0].style.position="absolute",n.children[r].children[0].style.height=s.style.height,n.children[r].children[0].style.width=s.style.width,n.children[r].children[0].style.left=s.style.left,n.children[r].children[0].style.top=s.style.top;break}return i?i instanceof Array?Array.prototype.forEach.call(i,(function(e){o.appendChild(He(e).cloneNode(!0))})):i instanceof Element?o.appendChild(i.cloneNode(!0)):o.appendChild(He(i).cloneNode(!0)):o.appendChild(n),o},e.prototype.getModuleName=function(){return"Print"},e.prototype.destroy=function(){},e}(),vo=function(){function e(e){}return e.prototype.export=function(e,i,o,n){return new Promise((function(a,l){var r,s,d=(0,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=Re(e.element.id+"_svg").cloneNode(!0),c=m.childNodes[0].getAttribute("fill");"Tailwind"!==e.theme&&"Tailwind3"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme&&"Fluent2"!==e.theme||"rgba(255,255,255, 0.0)"!==c&&"transparent"!==c?"TailwindDark"!==e.theme&&"Tailwind3Dark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme&&"Fluent2Dark"!==e.theme&&"Fluent2HighContrast"!==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=Re(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)n?O(o,i,u,p):a(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")),S=new XMLHttpRequest,x=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&&"Tailwind3"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme||"rgba(255,255,255, 0.0)"!==c&&"transparent"!==c?"TailwindDark"!==e.theme&&"Tailwind3Dark"!==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");(0,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===x+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===x+1){localStorage.setItem("local-canvasImage",d.toDataURL("image/png"));var t=localStorage.getItem("local-canvasImage");n?(O(o,i,t,p),localStorage.removeItem("local-canvasImage"),e.isExportInitialTileMap=!1):(e.isExportInitialTileMap=!1,"PNG"===i?a(t):"JPEG"===i&&a(d.toDataURL("image/jpeg")))}},0===l||l===x+1?0===l?m.src=u:setTimeout((function(){m.src=window.URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(s)],{type:"image/svg+xml"}))}),300):(S.open("GET",r.children[0].getAttribute("src"),!0),S.send(),m.src=r.children[0].getAttribute("src"))},_=0;_<=x+1;_++)C(_)}else g.onload=function(){y.drawImage(g,0,0),window.URL.revokeObjectURL(u),n?O(o,i,d.toDataURL("image/png").replace("image/png","image/octet-stream"),p):"PNG"===i?a(d.toDataURL("image/png")):"JPEG"===i&&a(d.toDataURL("image/jpeg"))},g.src=u}}))},e.prototype.getModuleName=function(){return"ImageExport"},e.prototype.destroy=function(){},e}(),So=l(461),xo=function(){function e(){}return e.prototype.export=function(e,i,o,n,a){return new Promise((function(l){e.isTileMap&&(e.isExportInitialTileMap=!0);var r=(0,t.createElement)("canvas",{id:"ej2-canvas",attrs:{width:e.availableSize.width.toString(),height:e.availableSize.height.toString()}});a=(0,t.isNullOrUndefined)(a)?So.PdfPageOrientation.Landscape:a;var s=document.getElementById(e.element.id+"_Tile_SVG_Parent"),d=e.svgObject.cloneNode(!0),p=d.childNodes[0].getAttribute("fill");"Tailwind"!==e.theme&&"Tailwind3"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme&&"Fluent2"!==e.theme||"rgba(255,255,255, 0.0)"!==p&&"transparent"!==p?"TailwindDark"!==e.theme&&"Tailwind3Dark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme&&"Fluent2Dark"!==e.theme&&"Fluent2HighContrast"!==e.theme||"rgba(255,255,255, 0.0)"!==p&&"transparent"!==p||d.childNodes[0].setAttribute("fill","rgba(0, 0, 0, 1)"):d.childNodes[0].setAttribute("fill","rgba(255,255,255, 1)");var h=window.URL.createObjectURL(new Blob("SVG"===i?[undefined]:[(new XMLSerializer).serializeToString(d)],{type:"image/svg+xml"})),m=new So.PdfDocument,c=new Image,u=r.getContext("2d");if(e.isTileMap)for(var g=document.getElementById(e.element.id+"_MapAreaBorder"),y=parseFloat(g.getAttribute("y")),f=parseFloat(g.getAttribute("x")),b=new XMLHttpRequest,v=e.mapLayerPanel.tiles.length,S=function(d){var c=document.getElementById(e.element.id+"_tile_"+(d-1)),g=new Image;g.crossOrigin="Anonymous";var S=e.background?e.background:"Tailwind"!==e.theme&&"Tailwind3"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme||"rgba(255,255,255, 0.0)"!==p&&"transparent"!==p?"TailwindDark"!==e.theme&&"Tailwind3Dark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme||"rgba(255,255,255, 0.0)"!==p&&"transparent"!==p?"#ffffff":"#000000":"#ffffff";u.fillStyle=S,u.fillRect(0,0,e.availableSize.width,e.availableSize.height),u.font=e.titleSettings.textStyle.size+" Arial";var x=document.getElementById(e.element.id+"_Map_title");(0,t.isNullOrUndefined)(x)||(u.fillStyle=x.getAttribute("fill"),u.fillText(e.titleSettings.text,parseFloat(x.getAttribute("x")),parseFloat(x.getAttribute("y")))),g.onload=function(){if(0===d||d===v+1?0===d?(u.setTransform(1,0,0,1,0,0),u.rect(0,y,parseFloat(s.style.width),parseFloat(s.style.height)),u.clip()):u.setTransform(1,0,0,1,f,y):u.setTransform(1,0,0,1,parseFloat(c.style.left)+f,parseFloat(c.style.top)+y),u.drawImage(g,0,0),d===v+1&&"PDF"===i){localStorage.setItem("saved-image-example",r.toDataURL("image/jpeg"));var t=localStorage.getItem("saved-image-example");m.pageSettings.orientation=a,t=t.slice(t.indexOf(",")+1),m.pages.add().graphics.drawImage(new So.PdfBitmap(t),0,0,e.availableSize.width-60,e.availableSize.height),e.isExportInitialTileMap=!1,n?(m.save(o+".pdf"),m.destroy()):l(null)}},0===d||d===v+1?0===d?g.src=h: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):(b.open("GET",c.children[0].getAttribute("src"),!0),b.send(),g.src=c.children[0].getAttribute("src"))},x=0;x<=v+1;x++)S(x);else c.onload=function(){if(u.drawImage(c,0,0),window.URL.revokeObjectURL(h),"PDF"===i){var t=r.toDataURL("image/jpeg").replace("image/jpeg","image/octet-stream");m.pageSettings.orientation=a,t=t.slice(t.indexOf(",")+1),m.pages.add().graphics.drawImage(new So.PdfBitmap(t),0,0,e.availableSize.width-60,e.availableSize.height),n?(m.save(o+".pdf"),m.destroy()):l(null)}},c.src=h}))},e.prototype.getModuleName=function(){return"PdfExport"},e.prototype.destroy=function(){},e}()})(),r})()));
10
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionBase"),require("SyncfusionSvgBase"),require("SyncfusionData"),require("SyncfusionPdfExport")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionSvgBase","SyncfusionData","SyncfusionPdfExport"],t):"object"==typeof exports?exports.SyncfusionMaps=t(require("SyncfusionBase"),require("SyncfusionSvgBase"),require("SyncfusionData"),require("SyncfusionPdfExport")):e.SyncfusionMaps=t(e.SyncfusionBase,e.SyncfusionSvgBase,e.SyncfusionData,e.SyncfusionPdfExport)}(self,((e,t,i,o)=>(()=>{"use strict";var n={766:t=>{t.exports=e},74:e=>{e.exports=i},461:e=>{e.exports=o},727:e=>{e.exports=t}},a={};function l(e){var t=a[e];if(void 0!==t)return t.exports;var i=a[e]={exports:{}};return n[e](i,i.exports,l),i.exports}l.d=(e,t)=>{for(var i in t)l.o(t,i)&&!l.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{l.r(r),l.d(r,{Annotation:()=>kt,Annotations:()=>io,Arrow:()=>Nt,BingMap:()=>$i,Border:()=>Ut,Bubble:()=>ro,BubbleSettings:()=>ei,CenterPosition:()=>jt,CircleOption:()=>z,ColorMapping:()=>eo,ColorMappingSettings:()=>Wt,ColorValue:()=>N,CommonTitleSettings:()=>ti,ConnectorLineSettings:()=>Vt,Coordinate:()=>L,DataLabel:()=>ho,DataLabelSettings:()=>ri,Font:()=>Et,GeoLocation:()=>w,Highlight:()=>uo,HighlightSettings:()=>Jt,ImageExport:()=>vo,InitialMarkerSelectionSettings:()=>qt,InitialShapeSelectionSettings:()=>Xt,Internalize:()=>Ve,LayerPanel:()=>to,LayerSettings:()=>hi,Legend:()=>co,LegendSettings:()=>li,Line:()=>j,LineOption:()=>U,MapAjax:()=>Mt,MapLocation:()=>Z,Maps:()=>lo,MapsAreaSettings:()=>ci,MapsTooltip:()=>yo,Margin:()=>Dt,Marker:()=>so,MarkerBase:()=>di,MarkerClusterData:()=>Ht,MarkerClusterSettings:()=>Gt,MarkerSettings:()=>pi,MinMax:()=>P,NavigationLine:()=>mo,NavigationLineSettings:()=>$t,PathOption:()=>k,PatternOptions:()=>D,PdfExport:()=>xo,Point:()=>_,Polygon:()=>po,PolygonOption:()=>B,PolygonSetting:()=>Qt,PolygonSettings:()=>Kt,PolygonTooltipSettings:()=>Rt,PolylineOption:()=>A,Print:()=>bo,Rect:()=>R,RectOption:()=>E,RelativePoint:()=>M,Selection:()=>go,SelectionSettings:()=>Yt,ShapeSettings:()=>si,Size:()=>n,SubTitleSettings:()=>ii,TextOption:()=>I,Tile:()=>mi,TitleSettings:()=>oi,ToggleLegendSettings:()=>ai,TooltipSettings:()=>Zt,Zoom:()=>fo,ZoomSettings:()=>ni,ZoomToolbarButtonSettings:()=>zt,ZoomToolbarSettings:()=>At,ZoomToolbarTooltipSettings:()=>Bt,acos:()=>x,aitoff:()=>b,animate:()=>vt,animationComplete:()=>Di,annotationRendering:()=>Gi,appendShape:()=>he,beforePrint:()=>Yi,bubbleClick:()=>Zi,bubbleMouseMove:()=>Ri,bubbleRendering:()=>ji,calculateBound:()=>O,calculateCenterFromPixel:()=>Ae,calculatePolygonPath:()=>u,calculateScale:()=>ct,calculateShapes:()=>be,calculateSize:()=>s,calculateZoomLevel:()=>wt,changeBorderWidth:()=>pt,changeNavaigationLineWidth:()=>ht,checkPropertyPath:()=>Te,checkShapeDataFields:()=>we,click:()=>yi,clusterSeparate:()=>ae,clusterTemplate:()=>te,compareZoomFactor:()=>Pt,convertElement:()=>G,convertElementFromLabel:()=>q,convertGeoToPoint:()=>c,convertStringToValue:()=>W,convertTileLatLongToPoint:()=>g,createStyle:()=>Qe,createSvg:()=>d,createTooltip:()=>at,customizeStyle:()=>Ke,dataLabelRendering:()=>Ui,degreesToRadians:()=>h,doubleClick:()=>vi,drawBalloon:()=>Me,drawCircle:()=>me,drawCross:()=>xe,drawDiamond:()=>ve,drawHorizontalLine:()=>Oe,drawLine:()=>fe,drawPath:()=>ue,drawPattern:()=>Le,drawPolygon:()=>ge,drawPolyline:()=>ye,drawRectangle:()=>ce,drawStar:()=>_e,drawSymbol:()=>rt,drawSymbols:()=>X,drawTriangle:()=>Se,drawVerticalLine:()=>Ce,elementAnimate:()=>tt,filter:()=>Fe,findMidPointOfPolygon:()=>ke,findPosition:()=>ze,fixInitialScaleForTile:()=>Ze,formatValue:()=>H,getDistance:()=>ut,getElement:()=>He,getElementByID:()=>Re,getElementOffset:()=>dt,getElementsByClassName:()=>Xe,getFieldData:()=>Pe,getHexColor:()=>lt,getMousePosition:()=>p,getProcessedMarginValue:()=>De,getRatioOfBubble:()=>Ie,getShapeData:()=>We,getTargetElement:()=>Je,getTemplateFunction:()=>Ge,getTouchCenter:()=>yt,getTouches:()=>gt,getTranslate:()=>Ue,getValueFromObject:()=>Y,getZoomTranslate:()=>je,isCustomPath:()=>Ne,itemHighlight:()=>Xi,itemSelection:()=>Hi,layerRendering:()=>Pi,legendRendering:()=>Vi,load:()=>ui,loaded:()=>gi,maintainSelection:()=>se,maintainStyleClass:()=>pe,maintainToggleSelection:()=>de,marker:()=>le,markerBoundsComparer:()=>oe,markerClick:()=>Ii,markerClusterClick:()=>Ei,markerClusterListHandler:()=>ie,markerClusterMouseMove:()=>Ai,markerClusterRendering:()=>Fi,markerColorChoose:()=>J,markerDragEnd:()=>Ni,markerDragStart:()=>ki,markerMouseMove:()=>zi,markerRendering:()=>Ti,markerShapeChoose:()=>Q,markerTemplate:()=>re,measureText:()=>T,measureTextElement:()=>F,mergeSeparateCluster:()=>ne,mouseMove:()=>Bi,mousedown:()=>Li,mousemove:()=>_i,mouseup:()=>Mi,onclick:()=>fi,pan:()=>Ki,panComplete:()=>Wi,processResult:()=>Tt,querySelector:()=>Ye,radiansToDegrees:()=>m,removeClass:()=>et,removeElement:()=>Be,renderLegendShape:()=>st,renderTextElement:()=>V,resize:()=>Si,rightClick:()=>bi,roundTo:()=>v,shapeHighlight:()=>Ci,shapeRendering:()=>wi,shapeSelected:()=>Oi,showTooltip:()=>ot,sinci:()=>S,smoothTranslate:()=>Lt,stringToNumber:()=>a,sum:()=>ft,targetTouches:()=>mt,textTrim:()=>Ee,timeout:()=>it,tooltipRender:()=>xi,triggerDownload:()=>C,triggerItemSelectionEvent:()=>$e,triggerShapeEvent:()=>qe,wordWrap:()=>nt,xToCoordinate:()=>y,yToCoordinate:()=>f,zoomAnimate:()=>bt,zoomComplete:()=>qi,zoomIn:()=>Ji,zoomOut:()=>Qi});var e,t=l(766),i=l(727),o=(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])},e(t,i)},function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}),n=function(e,t){this.width=e,this.height=t};function a(e,i){return"string"!=typeof e?e:(0,t.isNullOrUndefined)(e)?null:-1!==e.indexOf("%")?i/100*parseInt(e,10):parseInt(e,10)}function s(e){e.element.style.height=(0,t.isNullOrUndefined)(e.height)?"auto":e.height,e.element.style.width=(0,t.isNullOrUndefined)(e.width)?"auto":e.width,e.element.style.setProperty("display","block");var i=e.element.clientWidth,o=e.element.clientHeight,l="string"==typeof e.element.style.width?a(e.element.style.width,i):e.element.style.width,r="string"==typeof e.element.style.height?a(e.element.style.height,o):e.element.style.height;new n(0,0);return"0px"===e.width||"0%"===e.width||"0%"===e.height||"0px"===e.height?new n(0,0):new n(a(e.width,i)||i||l||600,a(e.height,o)||o||r||(e.isDevice?Math.min(window.innerWidth,window.innerHeight):450))}function d(e){e.renderer=new i.SvgRenderer(e.element.id),e.availableSize=s(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 p(e,t,i){var o=i.getBoundingClientRect(),n=i.ownerDocument.defaultView.pageXOffset,a=i.ownerDocument.defaultView.pageYOffset,l=i.ownerDocument.documentElement.clientTop,r=i.ownerDocument.documentElement.clientLeft,s=o.left+n-r,d=o.top+a-l;return new Z(e-s,t-d)}function h(e){return e*(Math.PI/180)}function m(e){return e*(180/Math.PI)}function c(e,i,o,a,l){var r,s,d,p,c,u,g=new n(l.mapAreaRect.width,l.mapAreaRect.height),S=l.baseMapBounds.longitude,x=l.baseMapBounds.latitude,C=h(e),M=h(i),L=(0,t.isNullOrUndefined)(l.projectionType)?"Mercator":l.projectionType,P=l.isTileMap?256*Math.pow(2,1):(0,t.isNullOrUndefined)(o)?Math.min(g.width,g.height):Math.min(g.width,g.height)*o;if("Normal"===a.geometryType)r=(0,t.isNullOrUndefined)(o)?i:Math.abs((i-S.min)*o),s=(0,t.isNullOrUndefined)(o)?e:Math.abs((x.max-e)*o);else if("Geographic"===a.geometryType){switch(L){case"Mercator":var w=new _(P/2,P/2);r=w.x+i*(P/360);var T=O(Math.sin(h(e)),-.9999,.9999);s=w.y+.5*Math.log((1+T)/(1-T))*(-P/(2*Math.PI));break;case"Winkel3":c=((d=b(M,C)).x+M/(Math.PI/2))/2,p=(d.y+C)/2;break;case"Miller":c=M,p=1.25*Math.log(Math.tan(Math.PI/4+.4*C));break;case"Eckert3":c=2/(u=Math.sqrt(Math.PI*(4+Math.PI)))*M*(1+Math.sqrt(1-4*C*C/(Math.PI*Math.PI))),p=4/u*C;break;case"AitOff":c=(d=b(M,C)).x,p=d.y;break;case"Eckert5":c=M*(1+Math.cos(C))/Math.sqrt(2+Math.PI),p=2*C/Math.sqrt(2+Math.PI);break;case"Equirectangular":c=M,p=C;break;case"Eckert6":u=(1+Math.PI/2)*Math.sin(C);for(var F=1/0,I=0;I<10&&Math.abs(F)>1e-6;I++)C-=F=(C+Math.sin(C)-u)/(1+Math.cos(C));u=Math.sqrt(2+Math.PI),c=M*(1+Math.cos(C))/u,p=2*C/u}r="Mercator"===L?r:v(y(l,m(c)),3),s="Mercator"===L?s:-v(f(l,m(p)),3)}return new _(r,s)}function u(e,i,o,n){var a="";return!(0,t.isNullOrUndefined)(n)&&n.length>1&&(Array.prototype.forEach.call(n,(function(t,n){var l=t.latitude,r=t.longitude,s=e.isTileMap?g(new Z(r,l),i,e.tileTranslatePoint,!0):c(l,r,i,o,e);a+=0===n?"M "+s.x+" "+s.y:" L "+s.x+" "+s.y})),a+=" z "),a}function g(e,t,i,o){var n=256*Math.pow(2,t),a=(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=a*n+.5+i.x,d=r*n+.5+i.y),{x:s,y:d}}function y(e,i){var o=e.baseMapBounds.longitude,n=(0,t.isNullOrUndefined)(e.baseSize)?e.mapAreaRect.width:e.mapAreaRect.width+Math.abs(e.baseSize.width-e.mapAreaRect.width)/2;return Math.round(n*(i-o.min)/(o.max-o.min)*100)/100}function f(e,t){var i=e.baseMapBounds.latitude;return Math.round(e.mapAreaRect.height*(t-i.min)/(i.max-i.min)*100)/100}function b(e,t){var i=Math.cos(t),o=S(x(i*Math.cos(e/=2)));return new _(2*i*Math.sin(e)*o,Math.sin(t)*o)}function v(e,t){var i=Math.pow(10,t);return Math.round(e*i)/i}function S(e){return e/Math.sin(e)}function x(e){return Math.acos(e)}function O(e,i,o){return(0,t.isNullOrUndefined)(i)||(e=Math.max(e,i)),(0,t.isNullOrUndefined)(o)||(e=Math.min(e,o)),e}function C(e,i,o,n){(0,t.createElement)("a",{attrs:{download:e+"."+i.toLocaleLowerCase(),href:o}}).dispatchEvent(new MouseEvent(n?"click":"move",{view:window,bubbles:!1,cancelable:!0}))}var _=function(e,t){this.x=e,this.y=t},M=function(e,t){this.x=e,this.y=t},L=function(e,t){this.latitude=e,this.longitude=t},P=function(e,t){this.min=e,this.max=t},w=function(e,t){this.latitude=new P(e.min,e.max),this.longitude=new P(t.min,t.max)};function T(e,t){var i=document.getElementById("mapsmeasuretext");return null===i&&((i=document.createElement("text")).id="mapsmeasuretext",document.body.appendChild(i)),i.innerText=e,i.style.cssText="position: absolute; font-size: "+("number"==typeof t.size?t.size+"px":t.size)+"; font-weight: "+t.fontWeight+"; font-style: "+t.fontStyle+"; font-family: "+t.fontFamily+"; visibility: hidden; top: -100; left: 0; whiteSpace: nowrap; lineHeight: normal",new n(i.clientWidth,i.clientHeight)}function F(e,t){var i=document.createElement("canvas"),o=i.getContext("2d");o.font=t.fontStyle+" "+t.fontWeight+" "+("number"==typeof t.size?t.size+"px":t.size)+" "+t.fontFamily;var a=o.measureText(e).width,l=parseFloat(t.size)||16;return i=null,new n(a,l)}var I=function(e,t,i,o,n,a,l){void 0===a&&(a=""),this.transform="",this.baseLine="auto",this.id=e,this.text=n,this.transform=a,this.anchor=o,this.x=t,this.y=i,this.baseLine=l},k=function(e,t,i,o,n,a,l,r){this.id=e,this["fill-opacity"]=n,this["stroke-opacity"]=a,this.fill=t,this.stroke=o,this["stroke-width"]=i,this["stroke-dasharray"]=l,this.d=r},N=function(e,t,i){this.r=e,this.g=t,this.b=i},E=function(e){function t(t,i,o,n,a,l,r,s,d){var p=e.call(this,t,i,o.width,o.color,n,o.opacity)||this;return p.y=a.y,p.x=a.x,p.height=a.height,p.width=a.width,p.rx=l||0,p.ry=r||0,p.transform=s||"",p["stroke-dasharray"]=d,p["fill-opacity"]=n,p["stroke-opacity"]=o.opacity,p}return o(t,e),t}(k),z=function(e){function t(t,i,o,n,a,l,r,s){var d=e.call(this,t,i,o.width,o.color,n,o.opacity,s)||this;return d.cy=l,d.cx=a,d.r=r,d["stroke-dasharray"]=s,d["fill-opacity"]=n,d["stroke-opacity"]=o.opacity,d}return o(t,e),t}(k),B=function(e){function t(t,i,o,n,a,l,r,s){void 0===l&&(l=1),void 0===r&&(r=1),void 0===s&&(s="");var d=e.call(this,t,o,n,a,l,r,s)||this;return d.points=i,d}return o(t,e),t}(k),A=function(e){function t(t,i,o,n,a,l,r,s){return void 0===l&&(l=1),void 0===r&&(r=1),void 0===s&&(s=""),e.call(this,t,i,o,n,a,l,r,s)||this}return o(t,e),t}(B),U=function(e){function t(t,i,o,n,a,l,r,s){void 0===l&&(l=1),void 0===r&&(r=1),void 0===s&&(s="");var d=e.call(this,t,o,n,a,l,r,s)||this;return d.x1=i.x1,d.y1=i.y1,d.x2=i.x2,d.y2=i.y2,d}return o(t,e),t}(k),j=function(e,t,i,o){this.x1=e,this.y1=t,this.x2=i,this.y2=o},Z=function(e,t){this.x=e,this.y=t},R=function(e,t,i,o){this.x=e,this.y=t,this.width=i,this.height=o},D=function(e,t,i,o,n,a,l,r,s){void 0===a&&(a="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=n,this.patternUnits=a,this.patternContentUnits=l,this.patternTransform=r,this.href=s};function V(e,t,o,n,a){void 0===a&&(a=!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:a?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=T(e.text[m],t).height,l=p.createTSpan({x:e.x,id:e.id,y:e.y+(a?-m*r:m*r)},a?e.text[e.text.length-(m+1)]:e.text[m]),h.appendChild(l);return n.appendChild(h),h}function G(e,i,o,n,a,l){var r=(0,t.createElement)("div",{id:i,className:a.element.id+"_marker_template_element"});r.style.cssText="position: absolute;pointer-events: auto;";for(var s=e.length;s>0;)r.appendChild(e[0]),s--;if(!a.isReact||"function"!==l){for(var d=r.innerHTML,p=Object.keys(o),h=RegExp,m=0;m<p.length;m++)"object"==typeof o[p[m]]?d=W(d,"",o,a):"latitude"!==p[m].toLowerCase()&&"longitude"!==p[m].toLowerCase()&&(d=d.replace(new h("{{:"+p[m]+"}}","g"),o[p[m].toString()]));r.innerHTML=d}return r}function H(e,t){return t.format&&!isNaN(Number(e))?t.intl.getNumberFormat({format:t.format,useGrouping:t.useGroupingSeparator})(Number(e)):e}function W(e,t,i,o){for(var n=""===e?t:e,a=""===e?n.split("${"):n.split("{{:"),l=RegExp,r=0;r<a.length;r++)if(a[r].indexOf("}}")>-1&&a[r].indexOf(".")>-1||a[r].indexOf("}")>-1&&a[r].search(".")>-1)for(var s=""===e?a[r].split("}"):a[r].split("}}"),d=0;d<s.length;d++)if(s[d].indexOf(".")>-1){var p=Y(i,s[d]).toString();n=""===e?n.split("${"+s[d]+"}").join(H(p,o)):n.replace(new l("{{:"+s[d]+"}}","g"),p)}return n}function q(e,i,o){for(var n=((0,t.isNullOrUndefined)(e.childElementCount)?e[0]:e).outerHTML,a=Object.keys(o),l=RegExp,r=0;r<a.length;r++)n=n.replace(new l("{{:"+a[r]+"}}","g"),o[a[r].toString()]);var s=(0,t.createElement)("div",{id:i,innerHTML:n});return s.style.position="absolute",s}function X(e,i,o,n,a,l,r){var s,d,p,h,m=a.size,c=a.borderColor,u=parseFloat(a.borderWidth),g=parseFloat(a.borderOpacity),y=a.fill,f=a.dashArray,b={color:c,width:u,opacity:g},v=a.opacity,S=new k(n,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 z(n,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 E(n,y,b,v,new R(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-(n.indexOf("cluster")>-1?m.height/2:m.height),(0,t.merge)(S,{href:i,height:m.height,width:m.width,x:d,y:p}),s=r.renderer.drawImage(S)):s=be(r,e,S,m,o,l);return s}function Y(e,i){if(!(0,t.isNullOrUndefined)(e)&&!(0,t.isNullOrUndefined)(i)){var o=i.replace(/\[/g,".").replace(/\]/g,"").split(".");if(1===o.length)e=e[o[0]];else for(var n=0;n<o.length&&!(0,t.isNullOrUndefined)(e);n++)e=e[o[n]]}return e}function J(e,i){var o=(0,t.isNullOrUndefined)(e.colorValuePath)?i[e.colorValuePath]:e.colorValuePath.indexOf(".")>-1?Y(i,e.colorValuePath).toString():i[e.colorValuePath];return e.fill=(0,t.isNullOrUndefined)(e.colorValuePath)||(0,t.isNullOrUndefined)(o)?e.fill:e.colorValuePath.indexOf(".")>-1?Y(i,e.colorValuePath).toString():i[e.colorValuePath],e}function Q(e,i){return(0,t.isNullOrUndefined)(e.shapeValuePath)||(0,t.isNullOrUndefined)(i[e.shapeValuePath])?($(e,i),ee(e,i)):($(e,i),"Image"===i[e.shapeValuePath]&&ee(e,i)),e}function K(e,t){return e.indexOf(".")>-1?Y(t,e).toString():t[e]}function $(e,i){if(!(0,t.isNullOrUndefined)(e.shapeValuePath)){var o=K(e.shapeValuePath,i);e.shape=(0,t.isNullOrUndefined)(o)||""===o.toString()?e.shape:o}}function ee(e,i){if(!(0,t.isNullOrUndefined)(e.imageUrlValuePath)){var o=K(e.imageUrlValuePath,i);e.imageUrl=(0,t.isNullOrUndefined)(o)?e.imageUrl:o}}function te(e,i,o,a,l,r,s,d,p,h,m){var u,y,f,b,v,S,x,O,C=[],M=[],L=0,P=0,w=e.markerSettings[l],T=0,F=[],k=!m&&e.markerClusterSettings.allowClustering?e.markerClusterSettings:w.clusterSettings,N=k.labelStyle,E=o.renderer.createGroup({id:o.element.id+"_LayerIndex_"+a+"_markerCluster"}),z={cancel:!1,name:Fi,fill:k.fill,height:k.height,width:k.width,imageUrl:k.imageUrl,shape:k.shape,data:undefined,maps:o,cluster:k,border:k.border},B=o.element.getBoundingClientRect();o.isTileMap?new Object:Ue(o,e,!1),o.isTileMap||(O=o.mapLayerPanel.calculateFactor(e));var A=!1,U=o.isTileMap?o.tileZoomLevel:o.mapScaleValue,j=w.clusterSettings.allowClustering||e.markerClusterSettings.allowClustering&&e.markerSettings.length>1?i.querySelectorAll("[id*='LayerIndex_"+a+"_MarkerIndex_"+l+"']:not([id*='_Group'])"):i.childNodes;return o.trigger("markerClusterRendering",z,(function(Z){for(Array.prototype.forEach.call(j,(function(s,d){if(F=[],"hidden"!==s.style.visibility){if(u=(x=s).getBoundingClientRect(),F.push(d),!(0,t.isNullOrUndefined)(u)){var p=o.markerModule.zoomedMarkerCluster.length>0&&o.markerModule.zoomedMarkerCluster[a]&&o.markerModule.zoomedMarkerCluster[a][d]&&o.markerModule.zoomedMarkerCluster[a][d].length>0||o.markerModule.initialMarkerCluster.length>0&&o.markerModule.initialMarkerCluster[a]&&o.markerModule.initialMarkerCluster[a][d]&&o.markerModule.initialMarkerCluster[a][d].length>0?o.previousScale<U?o.markerModule.zoomedMarkerCluster[a][d]:o.markerModule.initialMarkerCluster[a][d]:null;if((0,t.isNullOrUndefined)(p)||0===p.length||w.clusterSettings.allowClustering?Array.prototype.forEach.call(j,(function(e,t){t>=d+1&&"hidden"!==e.style.visibility&&oe(e,u,C,F,t)})):Array.prototype.forEach.call(p,(function(e){if(d!==e){var t=document.getElementById(o.element.id+"_LayerIndex_"+a+"_MarkerIndex_"+l+"_dataIndex_"+e);t&&"hidden"!==t.style.visibility&&oe(t,u,C,F,e)}})),ie(o,U,a,d,F),L=u.left+u.width/2,P=u.top+u.height,C.length>0){F=F.filter((function(e,t,i){return i.indexOf(e)===t})),L-=B.left,P-=o.availableSize.height<=B.height?B.top:B.bottom-B.top;var m,y=parseInt(s.id.split("_dataIndex_")[1].split("_")[0],10),v=parseInt(s.id.split("_MarkerIndex_")[1].split("_")[0],10),M=e.markerSettings[v],Z=M.dataSource[y],R=(0,t.isNullOrUndefined)(M.longitudeValuePath)?(0,t.isNullOrUndefined)(Z.longitude)?(0,t.isNullOrUndefined)(Z.Longitude)?0:parseFloat(Z.Longitude):parseFloat(Z.longitude):Number(Y(Z,M.longitudeValuePath)),D=(0,t.isNullOrUndefined)(M.latitudeValuePath)?(0,t.isNullOrUndefined)(Z.latitude)?(0,t.isNullOrUndefined)(Z.Latitude)?0:parseFloat(Z.Latitude):parseFloat(Z.latitude):Number(Y(Z,M.latitudeValuePath));o.isTileMap?o.isTileMap&&(m=g(new _(R,D),o.tileZoomLevel,o.tileTranslatePoint,!0)):m=c(D,R,O,e,o),s.style.visibility="hidden",z.cancel?(S={size:new n(k.width,k.height),fill:k.fill,borderColor:k.border.color,borderWidth:k.border.width,opacity:k.opacity,dashArray:k.dashArray,imageUrl:k.imageUrl,shape:k.shape}).borderOpacity=(0,t.isNullOrUndefined)(k.border.opacity)?k.opacity:k.border.opacity:(S={size:new n(z.width,z.height),fill:z.fill,borderColor:z.border.color,borderWidth:z.border.width,opacity:k.opacity,dashArray:k.dashArray,imageUrl:z.imageUrl,shape:z.shape}).borderOpacity=(0,t.isNullOrUndefined)(z.border.opacity)?k.opacity:z.border.opacity,L=o.isTileMap||i.id.indexOf("_Markers_Group")>-1?L:L+3.75-z.width/2,P=o.isTileMap||i.id.indexOf("_Markers_Group")>-1?P:P-z.height/2,o.isTileMap?(L=m.x,P=m.y):(L=(m.x+((0,t.isNullOrUndefined)(o.translatePoint)||0===o.translatePoint.x||o.isResize?h.location.x:o.translatePoint.x))*((0,t.isNullOrUndefined)(o.scale)?h.scale:o.scale)+M.offset.x,P=(m.y+((0,t.isNullOrUndefined)(o.translatePoint)||0===o.translatePoint.y||o.isResize?h.location.y:o.translatePoint.y))*((0,t.isNullOrUndefined)(o.scale)?h.scale:o.scale)+M.offset.y);var G=o.element.id+"_LayerIndex_"+a+"_MarkerIndex_"+v+"_dataIndex_"+y+"_cluster_"+T,H=o.element.id+"_LayerIndex_"+a+"_MarkerIndex_"+v+"_dataIndex_"+y+"_cluster_"+T+"_datalabel_"+T;T++;var W=X(S.shape,S.imageUrl,{x:0,y:0},G,S,r,o);W.setAttribute("transform","translate( "+L+" "+P+" )"),"Balloon"===z.shape?W.children[0].textContent=F.toString():W.textContent=F.toString(),f=new I(H,0,3.75,"middle",(C.length+1).toString(),"",""),(b=V(f,N,N.color,r)).setAttribute("transform","translate( "+L+" "+P+" )");var q=parseFloat(W.id.split("_MarkerIndex_")[1]);M.clusterSettings.allowClustering&&q===v||e.markerClusterSettings.allowClustering&&e.markerSettings.length>1&&q===v?(E.appendChild(W),E.appendChild(b)):(E.appendChild(b),E.appendChild(W))}}C=[]}else ie(o,U,a,d,F);A=!0})),s.appendChild(E),o.svgObject.appendChild(s),o.element.appendChild(o.svgObject),k.allowDeepClustering&&!m&&Array.prototype.forEach.call(E.childNodes,(function(i,o){if("hidden"!==i.style.visibility&&(u=(x=i).getBoundingClientRect(),!((0,t.isNullOrUndefined)(u)||x.id.indexOf("_datalabel_")>-1))){for(var n=o+1;n<E.childElementCount;n++)if("hidden"!==E.childNodes[n].style.visibility&&(v=E.childNodes[n],y=v.getBoundingClientRect(),!((0,t.isNullOrUndefined)(y)||v.id.indexOf("_datalabel_")>-1||u.left>y.right||u.right<y.left||u.top>y.bottom||u.bottom<y.top))){M.push(v),M.push(E.childNodes[n-1]),E.childNodes[n].style.visibility="hidden";var a=(0,t.isNullOrUndefined)(E.childNodes[n+1])?null:parseFloat(E.childNodes[n+1].id.split("_MarkerIndex_")[1]);w.clusterSettings.allowClustering&&a===l||e.markerClusterSettings.allowClustering&&e.markerSettings.length>1&&a===l?E.childNodes[n+1].style.visibility="hidden":(a=parseFloat(E.childNodes[n-1].id.split("_MarkerIndex_")[1]),E.childNodes[n-1].style.visibility=a===l?"hidden":E.childNodes[n-1].style.visibility),F.push(n)}if(M.length>0){x=i;for(var r=0;r<M.length;r++){"g"===x.tagName?x.childNodes[0].textContent=x.childNodes[0].textContent+","+M[r].textContent:x.textContent=x.textContent+","+M[r].textContent;a=parseFloat(E.childNodes[o+1].id.split("_MarkerIndex_")[1]);w.clusterSettings.allowClustering&&a===l||e.markerClusterSettings.allowClustering&&e.markerSettings.length>1&&a===l?E.childNodes[o+1].textContent=(+E.childNodes[o+1].textContent+ +M[r+1].textContent).toString():(a=parseFloat(E.childNodes[o-1].id.split("_MarkerIndex_")[1]),E.childNodes[o-1].textContent=a===l?(+E.childNodes[o-1].textContent+ +M[r+1].textContent).toString():E.childNodes[o-1].textContent),r++}}M=[]}}));0<E.childNodes.length;){var R=parseFloat(E.childNodes[0].id.split("_MarkerIndex_")[1]);w.clusterSettings.allowClustering&&R===l||e.markerClusterSettings.allowClustering&&e.markerSettings.length>1&&R===l?r.insertBefore(E.childNodes[0],null):R===l&&r.insertBefore(E.childNodes[0],r.firstChild)}d||Re(o.element.id+"_Secondary_Element").appendChild(r);var D=document.getElementById(o.element.id+"_LayerIndex_"+a+"_Polygon_Group"),G=document.getElementById(o.element.id+"_LayerIndex_"+a+"_Polygons_Group");(0,t.isNullOrUndefined)(D)&&!o.isTileMap?s.insertBefore(r,s.firstChild):o.isTileMap?(0,t.isNullOrUndefined)(G)?(0,t.isNullOrUndefined)(D)?s.insertBefore(r,s.firstChild):D.insertAdjacentElement("afterend",r):G.insertAdjacentElement("afterend",r):s.appendChild(r);var H=document.getElementById(o.element.id+"_LayerIndex_"+a+"_markerCluster");if((0,t.isNullOrUndefined)(H)||H.remove(),p){var W=document.getElementById(o.element.id+"_Layer_Collections"),q=document.getElementById(o.element.id+"_LayerIndex_"+(a+1));(0,t.isNullOrUndefined)(W)||(0,t.isNullOrUndefined)(q)?(0,t.isNullOrUndefined)(W)||W.appendChild(s):W.insertBefore(s,q)}})),A}function ie(e,i,o,n,a){if(1===i){var l=(0,t.isNullOrUndefined)(e.markerModule.initialMarkerCluster[o][n])?[]:a.length>1?a:[];e.markerModule.initialMarkerCluster[o][n]=l;var r=(0,t.isNullOrUndefined)(e.markerModule.zoomedMarkerCluster[o][n])?[]:a.length>1?a:[];e.markerModule.zoomedMarkerCluster[o][n]=r}else i>1&&(e.markerModule.zoomedMarkerCluster[o][n]=a.length>1?a:[])}function oe(e,i,o,n,a){var l=e.getBoundingClientRect();(0,t.isNullOrUndefined)(l)||i.left>l.right||i.right<l.left||i.top>l.bottom||i.bottom<l.top||(o.push(l),e.style.visibility="hidden",n.push(a))}function ne(e,t){var i,o=e[0].layerIndex,n=e[0].targetClusterIndex,a=e[0].markerIndex,l=e[0].dataIndex,r=t.element.id+"_LayerIndex_"+o+"_MarkerIndex_"+a,s=(t.layers[o].markerSettings[a],r+"_dataIndex_"+l+"_cluster_"+n),d="Balloon"===t.layers[o].markerClusterSettings.shape?He(s+"_Group"):He(s),p=He(s+"_datalabel_"+n);d.setAttribute("visibility","visible"),p.setAttribute("visibility","visible");for(var h=e[0].data.length,m=0;m<h;m++){if((i=He(r+"_dataIndex_"+e[0].data[m].index+"_Group")?He(r+"_dataIndex_"+e[0].data[m].index+"_Group"):He(r+"_dataIndex_"+e[0].data[m].index)).style.visibility="hidden",i.id.indexOf("Group")>-1)He(r+"_dataIndex_"+e[0].data[m].index).style.visibility="hidden"}Be(t.element.id+"_LayerIndex_"+o+"_MarkerIndex_"+a+"_markerClusterConnectorLine")}function ae(e,t,i,o){var n=e[0].layerIndex,a=e[0].markerIndex,l=e[0].targetClusterIndex,r=e[0].dataIndex,s=o?He:i.querySelector.bind(i),d=o?"":"#",p=t.element.id+"_LayerIndex_"+n+"_MarkerIndex_"+a,h=t.layers[n],m=!t.markerModule.allowInnerClusterSetting(h)&&h.markerClusterSettings.allowClustering?h.markerClusterSettings:h.markerSettings[a].clusterSettings,c=h.markerSettings[a],u=p+"_dataIndex_"+r+"_cluster_"+l,g="Balloon"===m.shape?s(d+""+u+"_Group"):s(d+""+u),y=s(d+""+u+"_datalabel_"+l);g.setAttribute("visibility","hidden"),y.setAttribute("visibility","hidden");var f=s(d+""+p+"_dataIndex_"+r+"_Group")?s(d+""+p+"_dataIndex_"+r+"_Group"):s(d+""+p+"_dataIndex_"+r),b=f.parentElement.id.indexOf("Template_Group")>-1?f.getBoundingClientRect().height:c.height,v=f.parentElement.id.indexOf("Template_Group")>-1?f.getBoundingClientRect().width:c.width,S=+g.getAttribute("transform").split("translate(")[1].trim().split(" ")[0],x=+g.getAttribute("transform").split("translate(")[1].trim().split(" ")[1].split(")")[0].trim(),O=(v="string"==typeof v?parseFloat(v):v)+5,C=6.28*O,_=0,M=Math.round(C/v);_+=M;for(var L=e[0].data.length,P=Math.round(b/C*100),w=(P=L<M?100/L:P)/100*360,T=L<M?45:0,F=1,I="M "+S+" "+x+" ",k="",N=0;N<L;N++){if(_===N||Math.round(T)>=360){for(T=0,C=6.28*(O=(v+5)*++F),M=Math.round(C/b),P=Math.round(b/C*100);P*M<100;)M++;w=P/100*360,_+=M}var E=S+O*Math.sin(2*Math.PI*T/360),z=x+O*Math.cos(2*Math.PI*T/360);if(k+=I+"L "+E+" "+z+" ",(f=s(d+""+p+"_dataIndex_"+e[0].data[N].index+"_Group")?s(d+""+p+"_dataIndex_"+e[0].data[N].index+"_Group"):s(d+""+p+"_dataIndex_"+e[0].data[N].index)).parentElement.id.indexOf("Template_Group")>-1?(f.style.transform="",f.style.left=t.isTileMap?E-v/2+"px":E-v/2-10+"px",f.style.top=t.isTileMap?z-b/2+"px":z-b/2-10+"px",f.setAttribute("transform","translate( "+E+" "+z+")")):f.setAttribute("transform","translate( "+E+" "+z+")"),f.style.visibility="visible",f.id.indexOf("Group")>-1)s(d+""+p+"_dataIndex_"+e[0].data[N].index).style.visibility="visible";T+=w}var B=m.connectorLineSettings,A={d:k,id:t.element.id+"_LayerIndex_"+n+"_MarkerIndex_"+a+"_dataIndex_"+r+"_markerClusterConnectorLine",stroke:B.color,"fill-opacity":B.opacity,"stroke-opacity":B.opacity,"stroke-width":B.width};i=o?s(t.element.id+"_Markers_Group"):i,i=s(t.element.id+"_LayerIndex_"+n).querySelector("#"+i.id);var U=t.renderer.createGroup({id:t.element.id+"_LayerIndex_"+n+"_MarkerIndex_"+a+"_markerClusterConnectorLine"});U.appendChild(t.renderer.drawPath(A)),"Balloon"===c.shape?i.insertBefore(U,i.querySelector("#"+p+"_dataIndex_0_Group")):i.insertBefore(U,i.querySelector("#"+p+"_dataIndex_0"))}function le(e,i,o,a,l,r,s,d,p,h,m){var c={size:new n(e.width,e.height),fill:e.fill,borderColor:e.border.color,borderWidth:e.border.width,opacity:i.opacity,dashArray:i.dashArray,borderOpacity:(0,t.isNullOrUndefined)(e.border.opacity)?i.opacity:e.border.opacity};Be(s);var u=X(e.shape,e.imageUrl,{x:0,y:0},s,c,m,h),g=(h.isTileMap?l.x:(l.x+r.x)*p)+((0,t.isNullOrUndefined)(d)||(0,t.isNullOrUndefined)(d.x)?0:d.x),y=(h.isTileMap?l.y:(l.y+r.y)*p)+((0,t.isNullOrUndefined)(d)||(0,t.isNullOrUndefined)(d.y)?0:d.y);if(u.setAttribute("transform","translate( "+g+" "+y+" )"),se(h.selectedMarkerElementId,h.markerSelectionClass,u,"MarkerselectionMapStyle"),h.legendSettings.toggleLegendSettings.enable&&"Markers"===h.legendSettings.type){var f=parseInt(u.id.split("_LayerIndex_")[1],10);de(h.toggledElementId,"g"===u.tagName?u.children[0]:u,h.legendSettings.toggleLegendSettings.applyShapeSettings?h.layers[f].shapeSettings:h.legendSettings.toggleLegendSettings)}m.appendChild(u);var b=o.length-1===a?"marker":null,v=new _(g,y);return(i.animationDuration>0||"Enable"===t.animationMode)&&tt(u,i.animationDelay,i.animationDuration,v,h,b),m}function re(e,t,i,o,n,a,l,r,s,d,p){if((t=Ge(e.template,p))&&t(o,p,e.template,p.element.id+"_MarkerTemplate"+n,!1).length){for(var h=G(t(o,p,e.template,p.element.id+"_MarkerTemplate"+n,!1),i,o,0,p,typeof e.template),m=0;m<h.children.length;m++)h.children[m].style.pointerEvents="auto";h.style.left=(p.isTileMap?l.x:(l.x+r.x)*s)+d.x-(p.isTileMap?0:p.mapAreaRect.x)+"px",h.style.top=(p.isTileMap?l.y:(l.y+r.y)*s)+d.y-(p.isTileMap?0:p.mapAreaRect.y)+"px",h.style.transform="translate(-50%, -50%)",a.appendChild(h)}return a}function se(e,i,o,n){if(e)for(var a=0;a<e.length;a++)o.getAttribute("id")===e[a]&&(0!==a&&"g"!==o.tagName||((0,t.isNullOrUndefined)(i)||(0,t.isNullOrUndefined)(i.id)||document.body.appendChild(i),o.id.indexOf("_MarkerIndex_")>-1&&o.childElementCount>0&&o.children[0].setAttribute("class",n)),o.setAttribute("class",n))}function de(e,i,o){if(!(0,t.isNullOrUndefined)(e)&&e.length>0)for(var n=0;n<e.length;n++)e[n]===i.id&&(i.setAttribute("fill",o.fill),i.setAttribute("stroke",o.border.color),i.setAttribute("fill-opacity",o.opacity.toString()),i.setAttribute("stroke-opacity",((0,t.isNullOrUndefined)(o.border.opacity)?o.opacity:o.border.opacity).toString()),i.setAttribute("stroke-width",((0,t.isNullOrUndefined)(o.border.width)?0:o.border.width).toString()))}function pe(e,i,o,n,a,l,r){if(!He(e)){var s=(0,t.createElement)("style",{id:e});s.innerText="."+i+"{fill:"+o+";opacity:"+n+";stroke-width:"+l+";stroke:"+a+";}",r.shapeSelectionClass=s,document.body.appendChild(s)}}function he(e,t){return t&&t.appendChild(e),e}function me(e,t,i){return he(e.renderer.drawCircle(t),i)}function ce(e,t,i){return he(e.renderer.drawRectangle(t),i)}function ue(e,t,i){return he(e.renderer.drawPath(t),i)}function ge(e,t,i){return he(e.renderer.drawPolygon(t),i)}function ye(e,t,i){return he(e.renderer.drawPolyline(t),i)}function fe(e,t,i){return he(e.renderer.drawLine(t),i)}function be(e,t,i,o,n,a){var l;switch(t){case"Balloon":l=Me(e,i,o,n,"Marker",a);break;case"Cross":i.d="M "+n.x+" "+(n.y-o.height/2)+" L "+n.x+" "+(n.y+o.height/2)+" M "+(n.x-o.width/2)+" "+n.y+" L "+(n.x+o.width/2)+" "+n.y;break;case"Diamond":i.d="M "+n.x+" "+(n.y-o.height/2)+" L "+(n.x+o.width/2)+" "+n.y+" L "+n.x+" "+(n.y+o.height/2)+" L "+(n.x-o.width/2)+" "+n.y+" Z";break;case"Star":i.d="M "+(n.x+o.width/3)+" "+(n.y+o.height/2)+" L "+(n.x-o.width/2)+" "+(n.y-o.height/6)+" L "+(n.x+o.width/2)+" "+(n.y-o.height/6)+" L "+(n.x-o.width/3)+" "+(n.y+o.height/2)+" L "+n.x+" "+(n.y-o.height/2)+" L "+(n.x+o.width/3)+" "+(n.y+o.height/2)+" Z";break;case"Triangle":i.d="M "+n.x+" "+(n.y-o.height/2)+" L "+(n.x+o.width/2)+" "+(n.y+o.height/2)+" L "+(n.x-o.width/2)+" "+(n.y+o.height/2)+" Z";break;case"HorizontalLine":i.d=" M "+(n.x-o.width/2)+" "+n.y+" L "+(n.x+o.width/2)+" "+n.y;break;case"VerticalLine":i.d="M "+n.x+" "+(n.y-o.height/2)+" L "+n.x+" "+(n.y+o.height/2);break;case"InvertedTriangle":i.d="M "+(n.x-o.width/2)+" "+(n.y-o.height/2)+" L "+(n.x+o.width/2)+" "+(n.y-o.height/2)+" L "+n.x+" "+(n.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 ")+(n.x+r)+" "+(n.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 ve(e,t,i,o,n){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",he(e.renderer.drawPath(t),n)}function Se(e,t,i,o,n){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",he(e.renderer.drawPath(t),n)}function xe(e,t,i,o,n){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,he(e.renderer.drawPath(t),n)}function Oe(e,t,i,o,n){return t.d=" M "+(o.x-i.width/2)+" "+o.y+" L "+(o.x+i.width/2)+" "+o.y,he(e.renderer.drawPath(t),n)}function Ce(e,t,i,o,n){return t.d="M "+o.x+" "+(o.y-i.height/2)+" L "+o.x+" "+(o.y+i.height/2),he(e.renderer.drawPath(t),n)}function _e(e,t,i,o,n){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",he(e.renderer.drawPath(t),n)}function Me(e,t,i,o,n,a){var l,r=i.width,s=i.height;o.x-=r/2,o.y-=t.id.indexOf("cluster")>-1?s/2:t.id.indexOf("Legend")>-1?s/1.25:s,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"===n){var m=e.renderer.createGroup({id:t.id+"_Group"});he(d,m),l=he(m,a)}else l=d;return l}function Le(e,t,i,o){for(var n=e.renderer.createPattern(t,"pattern"),a=0,l=i;a<l.length;a++){he(l[a],n)}return he(n,o)}function Pe(e,t){for(var i,o=[],n=0,a=e;n<a.length;n++){var l=a[n];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}function we(e,i,o,n,a){if(!(0,t.isNullOrUndefined)(i)&&!(0,t.isNullOrUndefined)(e)&&!(0,t.isNullOrUndefined)(o))for(var l=0;l<e.length;l++){var r=o.indexOf(".")>-1?Y(e[l],o):e[l][o],s=Te(r,n,i);if((!(0,t.isNullOrUndefined)(r)&&isNaN(i[s])&&"string"==typeof r?r.toLowerCase():r)===(!(0,t.isNullOrUndefined)(i[s])&&isNaN(i[s])?i[s].toLowerCase():i[s]))return l}return null}function Te(e,i,o){if(!(0,t.isNullOrUndefined)(e)&&!(0,t.isNullOrUndefined)(o)&&!(0,t.isNullOrUndefined)(i))for(var n="[object Array]"===Object.prototype.toString.call(i)?i:[i],a=0;a<n.length;a++){if(((0,t.isNullOrUndefined)(e)||"string"!=typeof e?e:e.toLowerCase())===(!(0,t.isNullOrUndefined)(o[n[a]])&&isNaN(o[n[a]])?o[n[a]].toLowerCase():o[n[a]]))return n[a]}return null}function Fe(e,t,i){for(var o=[],n=0;n<e.length;n++){var a=e[n];t<=a.y&&i>=a.y&&o.push(a)}return o}function Ie(e,t,i,o,n){var a=(t-e)/100*(100/(n-o)*(i-o))+e;return n===o&&(a=(t-e)/100+e),a}function ke(e,t,i){if(!e.length)return null;for(var o,n,a,l,r=e.length,s=0,d=0,p=0,h=0;h<=r-1;h++)o=e[h].x,n="Mercator"===t||"Normal"===i?e[h].y:-e[h].y,h===r-1?(a=e[0].x,l="Mercator"===t||"Normal"===i?e[0].y:-e[0].y):(a=e[h+1].x,l="Mercator"===t||"Normal"===i?e[h+1].y:-e[h+1].y),s+=Math.abs(o*l-a*n),d+=Math.abs((o+a)*(o*l-a*n)),p+=Math.abs((n+l)*(o*l-a*n));s*=.5;var m=e.some((function(e){return e.x<5&&e.y<5}))&&"Normal"===i?6:4;d=0!==s?1/(m*s)*d:0,p=0!==s?1/(m*s)*p:0;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 Ne(e){var i=!1;return"[object Array]"===Object.prototype.toString.call(e)&&Array.prototype.forEach.call(e,(function(e){(0,t.isNullOrUndefined)(e.geometry)||"Path"!==e.geometry.type||(i=!0)})),i}function Ee(e,i,o,n,a,l){var r=i;if((0,t.isNullOrUndefined)(n)&&(n=a?F(i,o).width:T(i,o).width),n>e)for(var s=i.length-1;s>=0;--s)if(r=i.substring(0,s)+"...",(n=a?F(r,o).width:T(r,o).width)<=e||r.length<4)return r.length<4&&(r=" "),(0,t.isNullOrUndefined)(l)||l.push(n),r;return(0,t.isNullOrUndefined)(l)||l.push(n),r}function ze(e,t,i,o){var n;switch(t){case"Near":n=e.x;break;case"Center":n="title"===o?e.width/2-i.width/2:e.x+e.width/2-i.width/2;break;case"Far":n="title"===o?e.width-e.y-i.width:e.x+e.width-i.width}var a="title"===o?e.y+i.height/2:e.y+e.height/2+i.height/2;return new _(n,a)}function Be(e){var i=document.getElementById(e);return i?(0,t.remove)(i):null}function Ae(e,t){var i=c(e.minLatOfGivenLocation,e.minLongOfGivenLocation,e.mapLayerPanel.calculateFactor(t),t,e),o=c(e.maxLatOfGivenLocation,e.maxLongOfGivenLocation,e.mapLayerPanel.calculateFactor(t),t,e),n=(i.x+o.x)/2,a=(i.y+o.y)/2;return new _(n,a)}function Ue(e,i,o){var n,a=e.zoomSettings.zoomFactor,l=e.centerPosition,r=l.latitude,s=l.longitude,d=!(0,t.isNullOrUndefined)(e.centerLatOfGivenLocation)&&!(0,t.isNullOrUndefined)(e.centerLongOfGivenLocation)&&e.zoomNotApplied;(0,t.isNullOrUndefined)(e.mapScaleValue)&&(e.mapScaleValue=a),e.zoomSettings.shouldZoomInitially&&e.zoomSettings.enable&&(e.mapScaleValue=n=a=(e.zoomSettings.shouldZoomInitially||e.enablePersistence)&&1===e.scale?e.scale:(0,t.isNullOrUndefined)(e.markerZoomFactor)?1:e.markerZoomedState?e.markerZoomFactor:parseInt(e.scale.toString()),e.markerZoomedState&&e.mapScaleValue!==e.markerZoomFactor&&!e.enablePersistence&&(e.mapScaleValue=a=e.markerZoomFactor),!e.markerZoomedState||(0,t.isNullOrUndefined)(e.markerCenterLatitude)||(0,t.isNullOrUndefined)(e.markerCenterLongitude)||(r=e.markerCenterLatitude,s=e.markerCenterLongitude)),d&&(e.mapScaleValue=n=a=e.scaleOfGivenLocation);var p=(0,t.isNullOrUndefined)(e.baseMapRectBounds)?null:e.baseMapRectBounds.min,h=(0,t.isNullOrUndefined)(e.baseMapRectBounds)?null:e.baseMapRectBounds.max,m=o?1:e.mapScaleValue;(0,t.isNullOrUndefined)(e.currentShapeDataLength)&&!(0,t.isNullOrUndefined)(i.shapeData)&&(e.currentShapeDataLength=(0,t.isNullOrUndefined)(i.shapeData.features)?(0,t.isNullOrUndefined)(i.shapeData.geometries)?0: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(!(0,t.isNullOrUndefined)(p)&&!(0,t.isNullOrUndefined)(h)){var b=Math.abs(h.x-p.x),v=Math.abs(p.y-h.y),S=o?1:1===e.markerZoomFactor?e.mapScaleValue:a;if(l=e.zoomSettings.shouldZoomInitially&&e.markerZoomedState&&!e.zoomPersistence?e.markerZoomCenterPoint:e.centerPosition,!(0,t.isNullOrUndefined)(s)&&0!==s&&!(0,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?Ae(e,i):c(r,s,e.mapLayerPanel.calculateFactor(i),i,e);(0,t.isNullOrUndefined)(e.previousProjection)||e.previousProjection!==e.projectionType||e.isMarkerZoomCompleted?(u=-C.x+x,g=-C.y+O,n=m):(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,n=m):(u=e.zoomTranslatePoint.x,g=e.zoomTranslatePoint.y),n=e.mapScaleValue)}else if((0,t.isNullOrUndefined)(e.previousProjection)||e.previousProjection!==e.projectionType){0!==v&&0!==b&&v!==b||(b=y.width/2,v=y.height),b*=n=(n=parseFloat(Math.min(y.width/b,y.height/v).toFixed(2)))>1.05?1:n,v*=n;var M=0!==p.x&&"layers"===e.translateType?f.width-y.width:0;u=y.x+(-p.x+(y.width/2-b/2))-M,g=y.y+(-p.y+(y.height/2-v/2)),e.previousTranslate=new _(u,g)}else if(e.zoomSettings.shouldZoomInitially||1!==e.markerZoomFactor||1!==e.mapScaleValue)if(n=e.mapScaleValue<1?e.mapScaleValue+1:e.mapScaleValue,e.mapScaleValue=e.zoomSettings.enable&&1!==e.mapScaleValue?e.mapScaleValue:1,e.currentShapeDataLength!==((0,t.isNullOrUndefined)(i.shapeData.features)?i.shapeData.geometries.length:i.shapeData.features.length)&&"SubLayer"!==i.type){var L=parseFloat(Math.min(y.height/v,y.width/b).toFixed(2));v*=L,b*=L,g=y.y+(-p.y+(y.height/2-v/2)),n=L,u=y.x+(-p.x+(y.width/2-b/2))}else if(e.availableSize.height===e.heightBeforeRefresh&&e.widthBeforeRefresh===e.availableSize.width||(0,t.isNullOrUndefined)(e.translatePoint)||(0,t.isNullOrUndefined)(e.previousTranslate))(0,t.isNullOrUndefined)(e.previousProjection)||!(1===e.mapScaleValue||e.mapScaleValue<=1.05)||e.zoomModule.isDragZoom?(u=e.zoomTranslatePoint.x,g=e.zoomTranslatePoint.y,n=e.scale):(b*=n=(n=parseFloat(Math.min(y.width/b,y.height/v).toFixed(2)))>1.05?1:n,u=y.x+(-p.x+(y.width/2-b/2)),v*=n,g=y.y+(-p.y+(y.height/2-v/2)));else{var P=parseFloat(Math.min(y.width/b,y.height/v).toFixed(2)),w=b;w*=P;var T=v;T*=P;var F=y.x+(-p.x+(y.width/2-w/2)),I=y.y+(-p.y+(y.height/2-T/2)),k=(e.translatePoint.x-e.previousTranslate.x)/e.widthBeforeRefresh,N=(e.translatePoint.y-e.previousTranslate.y)/e.heightBeforeRefresh;u=F+k*e.availableSize.width,g=I+N*e.availableSize.height,e.previousTranslate=new _(F,I),e.zoomTranslatePoint.x=u,e.zoomTranslatePoint.y=g}else v*=n=parseFloat(Math.min(y.width/b,y.height/v).toFixed(2)),b*=n,g=y.y+(-p.y+(y.height/2-v/2)),u=y.x+(-p.x+(y.width/2-b/2));(0,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 n=e.enablePersistence?e.mapScaleValue>=1?e.mapScaleValue:1:n,e.widthBeforeRefresh=e.availableSize.width,e.heightBeforeRefresh=e.availableSize.height,{scale:n,location:new _(u,g)}}function je(e,i,o){var n,a=e.zoomSettings.zoomFactor,l=e.centerPosition,r=l.latitude,s=l.longitude,d=!(0,t.isNullOrUndefined)(e.centerLongOfGivenLocation)&&!(0,t.isNullOrUndefined)(e.centerLatOfGivenLocation)&&e.zoomNotApplied;(0,t.isNullOrUndefined)(e.previousCenterLatitude)&&(0,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,((0,t.isNullOrUndefined)(e.mapScaleValue)||a>e.mapScaleValue)&&(e.isReset&&1===e.mapScaleValue?e.mapScaleValue=e.mapScaleValue:!(0,t.isNullOrUndefined)(e.mapScaleValue)&&e.mapScaleValue<=e.scale?e.mapScaleValue=e.scale:e.mapScaleValue=a),e.mapScaleValue=1!==e.zoomSettings.zoomFactor&&e.zoomSettings.zoomFactor===e.mapScaleValue||e.zoomSettings.zoomFactor===e.mapScaleValue||e.centerPositionChanged?e.zoomSettings.zoomFactor:e.mapScaleValue,e.zoomSettings.shouldZoomInitially&&!e.isZoomByPosition&&(e.mapScaleValue=a=n=(e.enablePersistence||e.zoomSettings.shouldZoomInitially)&&1===e.scale?e.scale:(0,t.isNullOrUndefined)(e.markerZoomFactor)?e.mapScaleValue:e.markerZoomFactor,a=e.mapScaleValue,(0,t.isNullOrUndefined)(e.markerCenterLatitude)||(0,t.isNullOrUndefined)(e.markerCenterLongitude)||(r=e.markerCenterLatitude,s=e.markerCenterLongitude)),d&&(e.mapScaleValue=n=a=e.scaleOfGivenLocation);var p,h,m=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(!(0,t.isNullOrUndefined)(s)&&0!==s&&!(0,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?Ae(e,i):c(r,s,e.mapLayerPanel.calculateFactor(i),i,e);(0,t.isNullOrUndefined)(e.zoomTranslatePoint)&&(0,t.isNullOrUndefined)(e.previousProjection)||e.zoomNotApplied?(p=-O.x+x+e.mapAreaRect.x/m,h=-O.y+S+e.mapAreaRect.y/m):e.previousProjection!==e.projectionType?(p=-O.x+x,h=-O.y+S):(e.isZoomByPosition&&(e.zoomTranslatePoint.x=-O.x+x,e.zoomTranslatePoint.y=-O.y+S),p=e.zoomTranslatePoint.x,h=e.zoomTranslatePoint.y,a=m),(0,t.isNullOrUndefined)(e.translatePoint)||(h=e.enablePersistence&&0!==e.translatePoint.y&&!e.zoomNotApplied?e.translatePoint.y:h,p=e.enablePersistence&&0!==e.translatePoint.x&&!e.zoomNotApplied?e.translatePoint.x:p),n=0!==a?a:1}else{var C=0===e.zoomSettings.zoomFactor?1:e.zoomSettings.zoomFactor,M=e.zoomSettings.maxZoom;n=C=C>M?M:C;var L=0===e.mapScaleValue?1:e.mapScaleValue>M?M:e.mapScaleValue;x=u.x+(-g.x+(u.width/2-b/2)),S=u.y+(-g.y+(u.height/2-v/2));if(!(0,t.isNullOrUndefined)(e.zoomTranslatePoint)||!(0,t.isNullOrUndefined)(e.previousProjection))if(e.previousProjection!==e.projectionType){var P=[],w={x,y:S};P.push(w);for(var T=1;T<M;T++){w={x:P[T-1].x-(u.width/T-u.width/(T+1))/2,y:P[T-1].y-(u.height/T-u.height/(T+1))/2},P.push(w)}x=P[C-1].x,S=P[C-1].y}else x=e.zoomTranslatePoint.x,S=e.zoomTranslatePoint.y,C!==L&&(n=L);(0,t.isNullOrUndefined)(e.translatePoint)||(p=e.enablePersistence&&0!==e.translatePoint.x&&!e.zoomNotApplied?e.translatePoint.x:x,h=e.enablePersistence&&0!==e.translatePoint.y&&!e.zoomNotApplied?e.translatePoint.y:S)}return n=e.enablePersistence?0===e.mapScaleValue?1:e.mapScaleValue:n,e.widthBeforeRefresh=e.availableSize.width,e.heightBeforeRefresh=e.availableSize.height,{scale:o?1:n,location:new _(p,h)}}function Ze(e){e.tileZoomScale=e.tileZoomLevel=Math.floor(e.availableSize.height/512)+1;var t=256*Math.pow(2,e.tileZoomLevel);e.tileTranslatePoint.x=e.availableSize.width/2-t/2,e.tileTranslatePoint.y=e.availableSize.height/2-t/2+20,e.previousTileWidth=e.availableSize.width,e.previousTileHeight=e.availableSize.height}function Re(e){return document.getElementById(e)}function De(e){return"string"==typeof e?parseFloat(e):e}function Ve(e,t){return e.formatFunction=e.intl.getNumberFormat({format:e.format,useGrouping:e.useGroupingSeparator}),e.formatFunction(t)}function Ge(e,i){var o=null;try{"function"!=typeof e&&document.querySelectorAll(e).length?o=(0,t.compile)(document.querySelector(e).innerHTML.trim()):(i.isVue||i.isVue3||"function"==typeof e)&&(o=(0,t.compile)(e))}catch(i){o=(0,t.compile)(e)}return o}function He(e){return document.getElementById(e)}function We(e,t){var i,o=parseInt(e.split("_LayerIndex_")[1].split("_")[0],10),n=parseInt(e.split("_shapeIndex_")[1].split("_")[0],10),a=t.layersCollection[o],l=a.layerData[n].property;return a.dataSource&&(i=a.dataSource[we(a.dataSource,l,a.shapeDataPath,a.shapePropertyPath)]),{shapeData:l,data:i}}function qe(e,i,o,n){var a=We(e,o),l={color:i.border.color,opacity:i.border.opacity,width:i.border.width},r=i.enableMultiSelect?{cancel:!1,name:n,fill:i.fill,opacity:i.opacity,border:l,shapeData:a.shapeData,data:a.data,target:e,maps:o,shapeDataCollection:o.shapeSelectionItem}:{cancel:!1,name:n,fill:i.fill,opacity:i.opacity,border:l,shapeData:a.shapeData,data:a.data,target:e,maps:o};return o.trigger(n,r,(function(){r.border.opacity=(0,t.isNullOrUndefined)(r.border.opacity)?r.opacity:r.border.opacity})),r}function Xe(e){return document.getElementsByClassName(e)}function Ye(e,t){var i=null;return document.getElementById(t)&&(i=document.getElementById(t).querySelector("#"+e)),i}function Je(e,t,i,o){for(var n,a=o.layers[e].shapeData.features,l=0;l<a.length;l++)if(a[l].properties.name===t){n=o.element.id+"_LayerIndex_"+e+"_shapeIndex_"+l+"_dataIndex_undefined";break}return He(n)}function Qe(e,i,o){var n=(0,t.createElement)("style",{id:e});return n.innerText="."+i+"{fill:"+o.fill+";fill-opacity:"+((0,t.isNullOrUndefined)(o.opacity)?"1":o.opacity.toString())+";stroke-opacity:"+((0,t.isNullOrUndefined)(o.border.opacity)?"1":o.border.opacity.toString())+";stroke-width:"+o.border.width.toString()+";stroke:"+o.border.color+";}",n}function Ke(e,i,o){var n=He(e);(0,t.isNullOrUndefined)(n)||(n.innerText="."+i+"{fill:"+o.fill+";fill-opacity:"+((0,t.isNullOrUndefined)(o.opacity)?"1":o.opacity.toString())+";stroke-width:"+o.border.width.toString()+";stroke-opacity:"+((0,t.isNullOrUndefined)(o.border.opacity)?"1":o.border.opacity.toString())+";stroke:"+o.border.color+"}")}function $e(e,i,o,n,a){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:Hi,target:o.id,cancel:!1,shapeData:n,data:a,maps:i};i.trigger("itemSelection",r,(function(o){r.border.opacity=(0,t.isNullOrUndefined)(e.border.opacity)?e.opacity:e.border.opacity,i.shapeSelectionItem.push(r.shapeData),He("ShapeselectionMap")?Ke("ShapeselectionMap","ShapeselectionMapStyle",r):document.body.appendChild(Qe("ShapeselectionMap","ShapeselectionMapStyle",r))}))}function et(e){e.removeAttribute("class")}function tt(e,i,o,n,a,l,r){void 0===r&&(r=0);var s=n.x,d=n.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&&!a.zoomModule.isPanningInProgress){if(a.isTileMap&&0===p){var o=document.querySelector(".GroupElement");(0,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+")")}else a.zoomModule.isPanningInProgress&&(h=e.getAttribute("transform"))},end:function(t){if(a.zoomModule.isPanningInProgress||e.setAttribute("transform",h),a.zoomModule.isPanningInProgress=!1,l){var i={cancel:!1,name:Di,element:l,maps:a};a.trigger(Di,i)}}})}function it(e){Be(e)}function ot(e,i,o,n,a,l,r,s,d){var h=p(o,n,s);(0,t.isNullOrUndefined)(h)||(o=h.x,n=h.y);for(var m=document.getElementById(r),c=T(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=(0,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<a-c||(o>a-c&&o<a-8*g?c=a-o:o>=a-8*g&&(o>c?o-=c:(c=o,o=0)));var f=i.split("px");nt(m,e,o,n,f,c,a,s),m.clientHeight+2*parseInt(f[0],10)>l&&(c=o,o=0),nt(m,e,o,n,f,c,a,s),d&&setTimeout(it,5e3,r)}function nt(e,t,i,o,n,a,l,r){e.innerText=t,e.style.top=-1!==e.id.indexOf("_Legend")?(parseInt(n[0],10)+o).toString()+"px":(2*parseInt(n[0],10)).toString()+"px",e.style.left=i.toString()+"px",e.style.width=a.toString()+"px",e.style.maxWidth=l.toString()+"px",e.style.wordWrap="break-word",r.appendChild(e)}function at(e,i,o,n,a){var l=He(e),r=lt(a.borderColor),s=lt(a.fontColor),d="top:"+o.toString()+"px;left:"+n.toString()+"px;color:"+(s?"rgba("+s.r+","+s.g+","+s.b+","+a.fontOpacity+")":a.fontColor)+";background:"+a.fill+";z-index: 2;position:absolute;border:"+a.borderWidth+"px solid "+(r?"rgba("+r.r+","+r.g+","+r.b+","+a.borderOpacity+")":a.borderColor)+";font-family:"+a.fontFamily+";font-style:"+a.fontStyle+";font-weight:"+a.fontWeight+";font-size:"+a.fontSize+";border-radius:"+a.borderWidth+"px;";!l&&a.visible?((l=(0,t.createElement)("div",{id:e})).innerHTML=t.SanitizeHtmlHelper.sanitize("&nbsp;"+i+"&nbsp;"),l.style.cssText=d,document.body.appendChild(l)):a.visible&&(l.innerHTML=t.SanitizeHtmlHelper.sanitize("&nbsp;"+i+"&nbsp;"),l.style.cssText=d)}function lt(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 rt(e,t,o,n,a){var l=new i.SvgRenderer(""),r=st(e,o,t,a,n);return l["draw"+r.functionName](r.renderOption)}function st(e,i,o,n,a){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(n.stroke="HorizontalLine"===o||"VerticalLine"===o||"Cross"===o?n.fill:n.stroke,n["stroke-width"]=0!==n["stroke-width"]||"HorizontalLine"!==o&&"VerticalLine"!==o&&"Cross"!==o?n["stroke-width"]:1,o){case"Circle":case"Bubble":r="Ellipse",(0,t.merge)(n,{rx:s/2,ry:d/2,cx:p,cy:h});break;case"VerticalLine":l="M "+p+" "+(h+d/2)+" L "+p+" "+(h+-d/2),(0,t.merge)(n,{d:l});break;case"HorizontalLine":l="M "+p+" "+h+" L "+(p+s/2)+" "+h,(0,t.merge)(n,{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",(0,t.merge)(n,{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",(0,t.merge)(n,{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",(0,t.merge)(n,{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",(0,t.merge)(n,{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"),(0,t.merge)(n,{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",(0,t.merge)(n,{d:l});break;case"Cross":l="M "+m+" "+h+" L "+(p+s/2)+" "+h+" M "+p+" "+(h+d/2)+" L "+p+" "+(h+-d/2),(0,t.merge)(n,{d:l});break;case"Image":r="Image",(0,t.merge)(n,{href:a,height:d,width:s,x:m,y:c})}return{renderOption:n,functionName:r}}function dt(e,t){t.appendChild(e);var i=e.offsetWidth,o=e.offsetHeight;return t.removeChild(e),new n(i,o)}function pt(e,i,o,n){for(var a,l=0;l<e.childElementCount;l++)if((a=e.childNodes[l]).id.indexOf("_NavigationGroup")>-1)ht(a,i,o,n);else if(a.id.indexOf("_Polygons_Group")>-1)for(var r=0;r<a.childElementCount;r++){var s=n.layersCollection[i].polygonSettings.polygons[parseInt(a.children[r].id.split("_PolygonIndex_")[1])].borderWidth;a.children[r].setAttribute("stroke-width",(s/o).toString())}else{var d=void 0,p=0,h=n.layersCollection[i].shapeSettings.borderWidthValuePath,m=n.layersCollection[i].shapeSettings.border.width,c=n.layersCollection[i].shapeSettings.circleRadius;d=n.layersCollection[i].shapeSettings.borderWidthValuePath&&null!==(p=we(n.layersCollection[i].dataSource,n.layersCollection[i].layerData[l].property,n.layersCollection[i].shapeDataPath,n.layersCollection[i].shapePropertyPath,n.layersCollection[i]))&&n.layersCollection[i].dataSource[p][h]?n.layersCollection[i].dataSource[p][h]:(0,t.isNullOrUndefined)(m)?0:m,a.setAttribute("stroke-width",(d/o).toString()),(e.id.indexOf("_Point")>-1||e.id.indexOf("_MultiPoint")>-1)&&a.setAttribute("r",(c/o).toString())}}function ht(e,t,i,o){for(var n,a=0;a<e.childElementCount;a++)if("path"===(n=e.childNodes[a]).tagName){var l=o.layersCollection[t].navigationLineSettings[parseFloat(n.id.split("_NavigationIndex_")[1].split("_")[0])].width;n.setAttribute("stroke-width",(l/i).toString())}}function mt(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 ct(e,t){var i=ut(e[0],e[1]);return ut(t[0],t[1])/i}function ut(e,t){var i=e.pageX-t.pageX,o=e.pageY-t.pageY;return Math.sqrt(i*i+o*o)}function gt(e,t){var i=t.element.getBoundingClientRect(),o=i.top+document.defaultView.pageXOffset,n=i.left+document.defaultView.pageYOffset;return Array.prototype.slice.call(e).map((function(e){return{x:e.pageX-n,y:e.pageY-o}}))}function yt(e){return{x:e.map((function(e){return e.x})).reduce(ft)/e.length,y:e.map((function(e){return e.y})).reduce(ft)/e.length}}function ft(e,t){return e+t}function bt(e,t,i,o,n,a,l){var r=0,s=l.previousPoint,d=l.previousScale,p=n-d,h=new Z(0,0),m=1;if(n!==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;vt(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/n),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=n,e.setAttribute("transform","scale( "+n+" ) translate( "+o.x+" "+o.y+" )"),l.zoomModule.processTemplate(o.x,o.y,n,l)}))}else e.setAttribute("transform","scale( "+n+" ) translate( "+o.x+" "+o.y+" )")}function vt(e,i,o,n,a){var l,r=this,s=null;o="Disable"===t.animationMode?0:o;var d=function(t){s||(s=t);var i=t-s;i<o?(n.call(r,{element:e,delay:0,timeStamp:i,duration:o}),window.requestAnimationFrame(d)):(window.cancelAnimationFrame(l),a.call(r,{element:e}),e.id.indexOf("Marker")>-1&&(Re(e.id.split("_Layer")[0]+"_Markers_Group").style.cssText="visibility:visible"))};l=window.requestAnimationFrame(d)}var St,xt,Ot,Ct,_t,Mt=function(e,t,i,o,n){this.dataOptions=e,this.type=t||"GET",this.async=i||!0,this.contentType=o,this.sendData=n};function Lt(e,t,i,o){var n=0,a=e.getAttribute("transform").split(" ");2===a.length&&(a[2]=a[1].split(")")[0],a[1]=a[0].split("(")[1]);var l=new Z(parseInt(a[1],10),parseInt(a[2],10)),r=o.x-l.x,s=o.y-l.y,d=new Z(0,0);vt(e,0,i,(function(e){e.timeStamp>e.delay&&(n=(e.timeStamp-e.delay)/e.duration,d.x=l.x+n*r,d.y=l.y+n*s,e.element.setAttribute("transform","translate( "+d.x+" "+d.y+" )"))}),(function(){e.setAttribute("transform","translate( "+o.x+" "+o.y+" )")}))}function Pt(e,i){var o=(0,t.isNullOrUndefined)(i.shouldZoomPreviousFactor)?null:i.shouldZoomPreviousFactor,n=(0,t.isNullOrUndefined)(i.shouldZoomCurrentFactor)?null:i.shouldZoomCurrentFactor;(0,t.isNullOrUndefined)(n)?!(0,t.isNullOrUndefined)(o)&&(0,t.isNullOrUndefined)(n)&&i.shouldZoomPreviousFactor!==e?i.shouldZoomCurrentFactor=e:i.shouldZoomPreviousFactor=e:(i.shouldZoomCurrentFactor=null,i.shouldZoomPreviousFactor=null)}function wt(e,t,i,o,n,a,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(a/256/v)/Math.LN2,C=Math.log(n/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||Pt(s,l),s}function Tt(e){var i,o=(0,t.isNullOrUndefined)(e.result)?e.actual:e.result;return(0,t.isNullOrUndefined)(o.length)?(0,t.isNullOrUndefined)(o.Items)||(i=o.Items):i=o,i}!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:null,fontWeight:"Medium",color:"#000000",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"}}(St||(St={})),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"}}(xt||(xt={})),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"}}(Ot||(Ot={})),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:null,fontWeight:"Medium",color:"#000000",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"}}(Ct||(Ct={})),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"}}(_t||(_t={}));var Ft=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])},e(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)}}(),It=function(e,t,i,o){var n,a=arguments.length,l=a<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--)(n=e[r])&&(l=(a<3?n(l):a>3?n(t,i,l):n(t,i))||l);return a>3&&l&&Object.defineProperty(t,i,l),l},kt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)("")],i.prototype,"content",void 0),It([(0,t.Property)("0px")],i.prototype,"x",void 0),It([(0,t.Property)("0px")],i.prototype,"y",void 0),It([(0,t.Property)("None")],i.prototype,"verticalAlignment",void 0),It([(0,t.Property)("None")],i.prototype,"horizontalAlignment",void 0),It([(0,t.Property)("-1")],i.prototype,"zIndex",void 0),i}(t.ChildProperty),Nt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)("Start")],i.prototype,"position",void 0),It([(0,t.Property)("false")],i.prototype,"showArrow",void 0),It([(0,t.Property)(2)],i.prototype,"size",void 0),It([(0,t.Property)("black")],i.prototype,"color",void 0),It([(0,t.Property)(0)],i.prototype,"offSet",void 0),i}(t.ChildProperty),Et=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(null)],i.prototype,"size",void 0),It([(0,t.Property)(null)],i.prototype,"color",void 0),It([(0,t.Property)("Roboto, Noto, Sans-serif")],i.prototype,"fontFamily",void 0),It([(0,t.Property)("Medium")],i.prototype,"fontWeight",void 0),It([(0,t.Property)("Medium")],i.prototype,"fontStyle",void 0),It([(0,t.Property)(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),zt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)("transparent")],i.prototype,"fill",void 0),It([(0,t.Property)(null)],i.prototype,"color",void 0),It([(0,t.Property)(1)],i.prototype,"borderOpacity",void 0),It([(0,t.Property)(1)],i.prototype,"borderWidth",void 0),It([(0,t.Property)(null)],i.prototype,"borderColor",void 0),It([(0,t.Property)(null)],i.prototype,"radius",void 0),It([(0,t.Property)(null)],i.prototype,"selectionColor",void 0),It([(0,t.Property)(null)],i.prototype,"highlightColor",void 0),It([(0,t.Property)(5)],i.prototype,"padding",void 0),It([(0,t.Property)(1)],i.prototype,"opacity",void 0),It([(0,t.Property)(["ZoomIn","ZoomOut","Reset"])],i.prototype,"toolbarItems",void 0),i}(t.ChildProperty),Bt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(!0)],i.prototype,"visible",void 0),It([(0,t.Property)("white")],i.prototype,"fill",void 0),It([(0,t.Property)(1)],i.prototype,"borderOpacity",void 0),It([(0,t.Property)(1)],i.prototype,"borderWidth",void 0),It([(0,t.Property)("#707070")],i.prototype,"borderColor",void 0),It([(0,t.Property)("black")],i.prototype,"fontColor",void 0),It([(0,t.Property)("")],i.prototype,"fontFamily",void 0),It([(0,t.Property)("")],i.prototype,"fontStyle",void 0),It([(0,t.Property)("")],i.prototype,"fontWeight",void 0),It([(0,t.Property)("")],i.prototype,"fontSize",void 0),It([(0,t.Property)(1)],i.prototype,"fontOpacity",void 0),i}(t.ChildProperty),At=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)("transparent")],i.prototype,"backgroundColor",void 0),It([(0,t.Property)(1)],i.prototype,"borderOpacity",void 0),It([(0,t.Property)(1)],i.prototype,"borderWidth",void 0),It([(0,t.Property)("transparent")],i.prototype,"borderColor",void 0),It([(0,t.Property)("Far")],i.prototype,"horizontalAlignment",void 0),It([(0,t.Property)("Near")],i.prototype,"verticalAlignment",void 0),It([(0,t.Property)("Horizontal")],i.prototype,"orientation",void 0),It([(0,t.Complex)({},zt)],i.prototype,"buttonSettings",void 0),It([(0,t.Complex)({},Bt)],i.prototype,"tooltipSettings",void 0),i}(t.ChildProperty),Ut=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)("")],i.prototype,"color",void 0),It([(0,t.Property)(0)],i.prototype,"width",void 0),It([(0,t.Property)(null)],i.prototype,"opacity",void 0),i}(t.ChildProperty),jt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(null)],i.prototype,"latitude",void 0),It([(0,t.Property)(null)],i.prototype,"longitude",void 0),i}(t.ChildProperty),Zt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(!1)],i.prototype,"visible",void 0),It([(0,t.Property)("")],i.prototype,"template",void 0),It([(0,t.Property)("")],i.prototype,"fill",void 0),It([(0,t.Complex)({color:null,width:1},Ut)],i.prototype,"border",void 0),It([(0,t.Complex)({fontFamily:null,size:null,fontWeight:null},Et)],i.prototype,"textStyle",void 0),It([(0,t.Property)(null)],i.prototype,"format",void 0),It([(0,t.Property)(null)],i.prototype,"valuePath",void 0),It([(0,t.Property)(2e3)],i.prototype,"duration",void 0),i}(t.ChildProperty),Rt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(!1)],i.prototype,"visible",void 0),It([(0,t.Property)("")],i.prototype,"fill",void 0),It([(0,t.Complex)({color:null,width:1},Ut)],i.prototype,"border",void 0),It([(0,t.Complex)({fontFamily:null,size:null,fontWeight:null},Et)],i.prototype,"textStyle",void 0),It([(0,t.Property)(2e3)],i.prototype,"duration",void 0),i}(t.ChildProperty),Dt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(10)],i.prototype,"left",void 0),It([(0,t.Property)(10)],i.prototype,"right",void 0),It([(0,t.Property)(10)],i.prototype,"top",void 0),It([(0,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 Ft(i,e),It([(0,t.Property)("#000000")],i.prototype,"color",void 0),It([(0,t.Property)(1)],i.prototype,"width",void 0),It([(0,t.Property)(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),Gt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(!1)],i.prototype,"allowClustering",void 0),It([(0,t.Property)(!0)],i.prototype,"allowDeepClustering",void 0),It([(0,t.Complex)({color:"transparent",width:1},Ut)],i.prototype,"border",void 0),It([(0,t.Property)("#D2691E")],i.prototype,"fill",void 0),It([(0,t.Property)(1)],i.prototype,"opacity",void 0),It([(0,t.Property)("Rectangle")],i.prototype,"shape",void 0),It([(0,t.Property)(12)],i.prototype,"width",void 0),It([(0,t.Property)(12)],i.prototype,"height",void 0),It([(0,t.Property)(new _(0,0))],i.prototype,"offset",void 0),It([(0,t.Property)("")],i.prototype,"imageUrl",void 0),It([(0,t.Property)("")],i.prototype,"dashArray",void 0),It([(0,t.Complex)({},Et)],i.prototype,"labelStyle",void 0),It([(0,t.Property)(!1)],i.prototype,"allowClusterExpand",void 0),It([(0,t.Complex)({},Vt)],i.prototype,"connectorLineSettings",void 0),i}(t.ChildProperty),Ht=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ft(t,e),t}(t.ChildProperty),Wt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(null)],i.prototype,"from",void 0),It([(0,t.Property)(null)],i.prototype,"to",void 0),It([(0,t.Property)(null)],i.prototype,"value",void 0),It([(0,t.Property)(null)],i.prototype,"color",void 0),It([(0,t.Property)(null)],i.prototype,"minOpacity",void 0),It([(0,t.Property)(null)],i.prototype,"maxOpacity",void 0),It([(0,t.Property)(null)],i.prototype,"label",void 0),It([(0,t.Property)(!0)],i.prototype,"showLegend",void 0),i}(t.ChildProperty),qt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(null)],i.prototype,"latitude",void 0),It([(0,t.Property)(null)],i.prototype,"longitude",void 0),i}(t.ChildProperty),Xt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(null)],i.prototype,"shapePath",void 0),It([(0,t.Property)(null)],i.prototype,"shapeValue",void 0),i}(t.ChildProperty),Yt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(!1)],i.prototype,"enable",void 0),It([(0,t.Property)(null)],i.prototype,"fill",void 0),It([(0,t.Property)(1)],i.prototype,"opacity",void 0),It([(0,t.Property)(!1)],i.prototype,"enableMultiSelect",void 0),It([(0,t.Complex)({color:"transparent",width:0},Ut)],i.prototype,"border",void 0),i}(t.ChildProperty),Jt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(null)],i.prototype,"fill",void 0),It([(0,t.Property)(!1)],i.prototype,"enable",void 0),It([(0,t.Property)(1)],i.prototype,"opacity",void 0),It([(0,t.Complex)({color:"transparent",width:0},Ut)],i.prototype,"border",void 0),i}(t.ChildProperty),Qt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(1)],i.prototype,"borderWidth",void 0),It([(0,t.Property)(1)],i.prototype,"borderOpacity",void 0),It([(0,t.Property)(1)],i.prototype,"opacity",void 0),It([(0,t.Property)("#FF471A")],i.prototype,"borderColor",void 0),It([(0,t.Property)("#FF471A")],i.prototype,"fill",void 0),It([(0,t.Property)([])],i.prototype,"points",void 0),It([(0,t.Property)("")],i.prototype,"tooltipText",void 0),It([(0,t.Property)("")],i.prototype,"tooltipTemplate",void 0),i}(t.ChildProperty),Kt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Collection)([],Qt)],i.prototype,"polygons",void 0),It([(0,t.Complex)({},Yt)],i.prototype,"selectionSettings",void 0),It([(0,t.Complex)({},Jt)],i.prototype,"highlightSettings",void 0),It([(0,t.Complex)({},Rt)],i.prototype,"tooltipSettings",void 0),i}(t.ChildProperty),$t=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(!1)],i.prototype,"visible",void 0),It([(0,t.Property)(1)],i.prototype,"width",void 0),It([(0,t.Property)(null)],i.prototype,"longitude",void 0),It([(0,t.Property)(null)],i.prototype,"latitude",void 0),It([(0,t.Property)("")],i.prototype,"dashArray",void 0),It([(0,t.Property)("black")],i.prototype,"color",void 0),It([(0,t.Property)(0)],i.prototype,"angle",void 0),It([(0,t.Complex)({showArrow:!1,position:"Start",size:5,color:"black"},Nt)],i.prototype,"arrowSettings",void 0),It([(0,t.Complex)({},Yt)],i.prototype,"selectionSettings",void 0),It([(0,t.Complex)({},Jt)],i.prototype,"highlightSettings",void 0),i}(t.ChildProperty),ei=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Complex)({},Ut)],i.prototype,"border",void 0),It([(0,t.Property)(!1)],i.prototype,"visible",void 0),It([(0,t.Property)([])],i.prototype,"dataSource",void 0),It([(0,t.Property)()],i.prototype,"query",void 0),It([(0,t.Property)(1e3)],i.prototype,"animationDuration",void 0),It([(0,t.Property)(0)],i.prototype,"animationDelay",void 0),It([(0,t.Property)("")],i.prototype,"fill",void 0),It([(0,t.Property)(10)],i.prototype,"minRadius",void 0),It([(0,t.Property)(20)],i.prototype,"maxRadius",void 0),It([(0,t.Property)(1)],i.prototype,"opacity",void 0),It([(0,t.Property)(null)],i.prototype,"valuePath",void 0),It([(0,t.Property)("Circle")],i.prototype,"bubbleType",void 0),It([(0,t.Property)(null)],i.prototype,"colorValuePath",void 0),It([(0,t.Collection)([],Wt)],i.prototype,"colorMapping",void 0),It([(0,t.Complex)({},Zt)],i.prototype,"tooltipSettings",void 0),It([(0,t.Complex)({},Yt)],i.prototype,"selectionSettings",void 0),It([(0,t.Complex)({},Jt)],i.prototype,"highlightSettings",void 0),i}(t.ChildProperty),ti=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)("")],i.prototype,"text",void 0),It([(0,t.Property)("")],i.prototype,"description",void 0),i}(t.ChildProperty),ii=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Complex)({size:null,fontWeight:null,fontFamily:null},Et)],i.prototype,"textStyle",void 0),It([(0,t.Property)("Center")],i.prototype,"alignment",void 0),i}(ti),oi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Complex)({size:null,fontWeight:null,fontFamily:null},Et)],i.prototype,"textStyle",void 0),It([(0,t.Property)("Center")],i.prototype,"alignment",void 0),It([(0,t.Complex)({},ii)],i.prototype,"subtitleSettings",void 0),i}(ti),ni=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(!1)],i.prototype,"enable",void 0),It([(0,t.Property)(!0)],i.prototype,"enablePanning",void 0),It([(0,t.Property)(!0)],i.prototype,"enableSelectionZooming",void 0),It([(0,t.Property)(!0)],i.prototype,"mouseWheelZoom",void 0),It([(0,t.Property)(!1)],i.prototype,"doubleClickZoom",void 0),It([(0,t.Property)(!0)],i.prototype,"pinchZooming",void 0),It([(0,t.Property)(!1)],i.prototype,"zoomOnClick",void 0),It([(0,t.Property)(1)],i.prototype,"zoomFactor",void 0),It([(0,t.Property)(10)],i.prototype,"maxZoom",void 0),It([(0,t.Property)(1)],i.prototype,"minZoom",void 0),It([(0,t.Property)(!1)],i.prototype,"shouldZoomInitially",void 0),It([(0,t.Property)(!0)],i.prototype,"resetToInitial",void 0),It([(0,t.Complex)({},At)],i.prototype,"toolbarSettings",void 0),i}(t.ChildProperty),ai=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(!1)],i.prototype,"enable",void 0),It([(0,t.Property)(!0)],i.prototype,"applyShapeSettings",void 0),It([(0,t.Property)(1)],i.prototype,"opacity",void 0),It([(0,t.Property)("")],i.prototype,"fill",void 0),It([(0,t.Complex)({color:"",width:0},Ut)],i.prototype,"border",void 0),i}(t.ChildProperty),li=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(!1)],i.prototype,"useMarkerShape",void 0),It([(0,t.Property)(!1)],i.prototype,"toggleVisibility",void 0),It([(0,t.Property)(!1)],i.prototype,"visible",void 0),It([(0,t.Property)("transparent")],i.prototype,"background",void 0),It([(0,t.Property)("Layers")],i.prototype,"type",void 0),It([(0,t.Property)(!1)],i.prototype,"invertedPointer",void 0),It([(0,t.Property)("After")],i.prototype,"labelPosition",void 0),It([(0,t.Property)("None")],i.prototype,"labelDisplayMode",void 0),It([(0,t.Property)("Circle")],i.prototype,"shape",void 0),It([(0,t.Property)("")],i.prototype,"width",void 0),It([(0,t.Property)("")],i.prototype,"height",void 0),It([(0,t.Complex)({fontFamily:null,fontWeight:null},Et)],i.prototype,"textStyle",void 0),It([(0,t.Property)(15)],i.prototype,"shapeWidth",void 0),It([(0,t.Property)(15)],i.prototype,"shapeHeight",void 0),It([(0,t.Property)(10)],i.prototype,"shapePadding",void 0),It([(0,t.Complex)({color:null,width:0},Ut)],i.prototype,"border",void 0),It([(0,t.Complex)({color:"#000000",width:0},Ut)],i.prototype,"shapeBorder",void 0),It([(0,t.Complex)({},ti)],i.prototype,"title",void 0),It([(0,t.Complex)({size:null,color:St.legendTitleFont.color,fontStyle:St.legendTitleFont.fontStyle,fontWeight:null,fontFamily:null},Et)],i.prototype,"titleStyle",void 0),It([(0,t.Property)("Bottom")],i.prototype,"position",void 0),It([(0,t.Property)("Center")],i.prototype,"alignment",void 0),It([(0,t.Property)("None")],i.prototype,"orientation",void 0),It([(0,t.Property)({x:0,y:0})],i.prototype,"location",void 0),It([(0,t.Property)(null)],i.prototype,"fill",void 0),It([(0,t.Property)(1)],i.prototype,"opacity",void 0),It([(0,t.Property)("Default")],i.prototype,"mode",void 0),It([(0,t.Property)(null)],i.prototype,"showLegendPath",void 0),It([(0,t.Property)(null)],i.prototype,"valuePath",void 0),It([(0,t.Property)(!1)],i.prototype,"removeDuplicateLegend",void 0),It([(0,t.Complex)({},ai)],i.prototype,"toggleLegendSettings",void 0),i}(t.ChildProperty),ri=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(!1)],i.prototype,"visible",void 0),It([(0,t.Complex)({width:0,color:"transparent"},Ut)],i.prototype,"border",void 0),It([(0,t.Property)("black")],i.prototype,"fill",void 0),It([(0,t.Property)(1)],i.prototype,"opacity",void 0),It([(0,t.Property)(5)],i.prototype,"rx",void 0),It([(0,t.Property)(5)],i.prototype,"ry",void 0),It([(0,t.Complex)({fontWeight:null},Et)],i.prototype,"textStyle",void 0),It([(0,t.Property)("")],i.prototype,"labelPath",void 0),It([(0,t.Property)("None")],i.prototype,"smartLabelMode",void 0),It([(0,t.Property)("None")],i.prototype,"intersectionAction",void 0),It([(0,t.Property)("")],i.prototype,"template",void 0),It([(0,t.Property)(0)],i.prototype,"animationDuration",void 0),i}(t.ChildProperty),si=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(null)],i.prototype,"fill",void 0),It([(0,t.Property)([])],i.prototype,"palette",void 0),It([(0,t.Property)(5)],i.prototype,"circleRadius",void 0),It([(0,t.Complex)({width:null,color:null},Ut)],i.prototype,"border",void 0),It([(0,t.Property)("")],i.prototype,"dashArray",void 0),It([(0,t.Property)(1)],i.prototype,"opacity",void 0),It([(0,t.Property)(null)],i.prototype,"colorValuePath",void 0),It([(0,t.Property)(null)],i.prototype,"borderColorValuePath",void 0),It([(0,t.Property)(null)],i.prototype,"borderWidthValuePath",void 0),It([(0,t.Property)(null)],i.prototype,"valuePath",void 0),It([(0,t.Collection)([],Wt)],i.prototype,"colorMapping",void 0),It([(0,t.Property)(!1)],i.prototype,"autofill",void 0),i}(t.ChildProperty),di=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Complex)({color:"transparent",width:1},Ut)],i.prototype,"border",void 0),It([(0,t.Property)(null)],i.prototype,"dashArray",void 0),It([(0,t.Property)(!1)],i.prototype,"visible",void 0),It([(0,t.Property)(!1)],i.prototype,"enableDrag",void 0),It([(0,t.Property)("#FF471A")],i.prototype,"fill",void 0),It([(0,t.Property)(null)],i.prototype,"heightValuePath",void 0),It([(0,t.Property)(null)],i.prototype,"widthValuePath",void 0),It([(0,t.Property)(10)],i.prototype,"height",void 0),It([(0,t.Property)(10)],i.prototype,"width",void 0),It([(0,t.Property)(1)],i.prototype,"opacity",void 0),It([(0,t.Property)(null)],i.prototype,"colorValuePath",void 0),It([(0,t.Property)(null)],i.prototype,"shapeValuePath",void 0),It([(0,t.Property)(null)],i.prototype,"imageUrlValuePath",void 0),It([(0,t.Property)("Balloon")],i.prototype,"shape",void 0),It([(0,t.Property)("")],i.prototype,"legendText",void 0),It([(0,t.Property)(new _(0,0))],i.prototype,"offset",void 0),It([(0,t.Property)("")],i.prototype,"imageUrl",void 0),It([(0,t.Property)(null)],i.prototype,"template",void 0),It([(0,t.Property)([])],i.prototype,"dataSource",void 0),It([(0,t.Property)()],i.prototype,"query",void 0),It([(0,t.Complex)({},Zt)],i.prototype,"tooltipSettings",void 0),It([(0,t.Property)(1e3)],i.prototype,"animationDuration",void 0),It([(0,t.Property)(0)],i.prototype,"animationDelay",void 0),It([(0,t.Complex)({},Yt)],i.prototype,"selectionSettings",void 0),It([(0,t.Complex)({},Jt)],i.prototype,"highlightSettings",void 0),It([(0,t.Property)(null)],i.prototype,"latitudeValuePath",void 0),It([(0,t.Property)(null)],i.prototype,"longitudeValuePath",void 0),It([(0,t.Collection)([],qt)],i.prototype,"initialMarkerSelection",void 0),It([(0,t.Complex)({},Gt)],i.prototype,"clusterSettings",void 0),i}(t.ChildProperty),pi=function(e){function t(t,i,o,n){return e.call(this,t,i,o,n)||this}return Ft(t,e),t}(di),hi=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.isBaseLayer=!1,t}return Ft(i,e),It([(0,t.Property)(null)],i.prototype,"shapeData",void 0),It([(0,t.Property)()],i.prototype,"query",void 0),It([(0,t.Complex)({},si)],i.prototype,"shapeSettings",void 0),It([(0,t.Property)([])],i.prototype,"dataSource",void 0),It([(0,t.Property)("Layer")],i.prototype,"type",void 0),It([(0,t.Property)("Geographic")],i.prototype,"geometryType",void 0),It([(0,t.Property)("")],i.prototype,"urlTemplate",void 0),It([(0,t.Property)(!0)],i.prototype,"visible",void 0),It([(0,t.Property)("name")],i.prototype,"shapeDataPath",void 0),It([(0,t.Property)("name")],i.prototype,"shapePropertyPath",void 0),It([(0,t.Property)(0)],i.prototype,"animationDuration",void 0),It([(0,t.Collection)([],pi)],i.prototype,"markerSettings",void 0),It([(0,t.Complex)({},Gt)],i.prototype,"markerClusterSettings",void 0),It([(0,t.Complex)({},ri)],i.prototype,"dataLabelSettings",void 0),It([(0,t.Collection)([],ei)],i.prototype,"bubbleSettings",void 0),It([(0,t.Collection)([],$t)],i.prototype,"navigationLineSettings",void 0),It([(0,t.Complex)({},Kt)],i.prototype,"polygonSettings",void 0),It([(0,t.Complex)({},Zt)],i.prototype,"tooltipSettings",void 0),It([(0,t.Complex)({},Yt)],i.prototype,"selectionSettings",void 0),It([(0,t.Complex)({},Jt)],i.prototype,"highlightSettings",void 0),It([(0,t.Complex)({},ai)],i.prototype,"toggleLegendSettings",void 0),It([(0,t.Collection)([],Xt)],i.prototype,"initialShapeSelection",void 0),i}(t.ChildProperty),mi=function(e,t,i,o,n,a,l){void 0===i&&(i=256),void 0===o&&(o=256),void 0===n&&(n=0),void 0===a&&(a=0),void 0===l&&(l=null),this.x=e,this.y=t,this.top=n,this.left=a,this.height=i,this.width=o,this.src=l},ci=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),It([(0,t.Property)(null)],i.prototype,"background",void 0),It([(0,t.Complex)({color:"transparent",width:1},Ut)],i.prototype,"border",void 0),i}(t.ChildProperty),ui="load",gi="loaded",yi="click",fi="onclick",bi="rightClick",vi="doubleClick",Si="resize",xi="tooltipRender",Oi="shapeSelected",Ci="shapeHighlight",_i="mousemove",Mi="mouseup",Li="mousedown",Pi="layerRendering",wi="shapeRendering",Ti="markerRendering",Fi="markerClusterRendering",Ii="markerClick",ki="markerDragStart",Ni="markerDragEnd",Ei="markerClusterClick",zi="markerMouseMove",Bi="mouseMove",Ai="markerClusterMouseMove",Ui="dataLabelRendering",ji="bubbleRendering",Zi="bubbleClick",Ri="bubbleMouseMove",Di="animationComplete",Vi="legendRendering",Gi="annotationRendering",Hi="itemSelection",Wi="panComplete",qi="zoomComplete",Xi="itemHighlight",Yi="beforePrint",Ji="zoomIn",Qi="zoomOut",Ki="pan",$i=function(){function e(e){this.maps=e}return e.prototype.getBingMap=function(e,i,o,n,a,l){for(var r="",s=Math.min(this.maps.tileZoomLevel,parseInt(this.maxZoom,10));s>0;s--){var d=0,p=1<<s-1;e.x&p&&d++,e.y&p&&(d+=2),r=r+""+d}if((0,t.isNullOrUndefined)(l))return"";var h=l[Math.min(parseInt(r.substr(r.length-1,1),10),l.length)];return(a=a.replace("{quadkey}",r).replace("{subdomain}",h))+"&mkt="+n+"&ur=IN&Key="+i},e.prototype.destroy=function(){this.maps=null,this.subDomains=[]},e}(),eo=function(){function e(e){}return e.prototype.getShapeColorMapping=function(e,i,o){var n=e.colorValuePath?e.colorValuePath:e.valuePath,a=(0,t.isNullOrUndefined)(n)?i[n]:n.indexOf(".")>-1?Y(i,n):i[n],l=Number(a),r=this.getColorByValue(e.colorMapping,l,a);return(0,t.isNullOrUndefined)(r)?o:r},e.prototype.getColorByValue=function(e,i,o){if(isNaN(i)&&(0,t.isNullOrUndefined)(o))return null;for(var n,a="",l=0,r=e;l<r.length;l++){var s=r[l];(!(0,t.isNullOrUndefined)(s.from)&&!(0,t.isNullOrUndefined)(s.to)&&i>=s.from&&i<=s.to||s.value===o)&&(a="[object Array]"===Object.prototype.toString.call(s.color)?(0,t.isNullOrUndefined)(s.value)?this.getColor(s,i):s.color[0]:s.color),(i>=s.from&&i<=s.to||s.value===o)&&!(0,t.isNullOrUndefined)(s.minOpacity)&&!(0,t.isNullOrUndefined)(s.maxOpacity)&&a&&(n=this.deSaturationColor(s,a,i,o)),(""===a||(0,t.isNullOrUndefined)(a))&&(0,t.isNullOrUndefined)(s.from)&&(0,t.isNullOrUndefined)(s.to)&&(0,t.isNullOrUndefined)(s.minOpacity)&&(0,t.isNullOrUndefined)(s.maxOpacity)&&(0,t.isNullOrUndefined)(s.value)&&(a="[object Array]"===Object.prototype.toString.call(s.color)?s.color[0]:s.color)}return{fill:a||(e.length?null:o),opacity:n}},e.prototype.deSaturationColor=function(e,t,i,o){var n=1;(i>=e.from&&i<=e.to||e.value===o)&&(n=(isNaN(i)?e.from/(e.to-e.from):(i-e.from)/(e.to-e.from))*(e.maxOpacity-e.minOpacity)+e.minOpacity);return n},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,o,n=t.from,a=t.to,l=0,r=a-n;if(l=(e-n)/r,t.color.length<=2)i="#"===t.color[0].charAt(0)?t.color[0]:this._colorNameToHex(t.color[0]),o="#"===t.color[t.color.length-1].charAt(0)?t.color[t.color.length-1]:this._colorNameToHex(t.color[t.color.length-1]);else{i="#"===t.color[0].charAt(0)?t.color[0]:this._colorNameToHex(t.color[0]),o="#"===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=r/(t.color.length-1),d=t.color.length-1,p=[],h={},m=1;m<d;m++)h={b:n+m*s,color:t.color[m]},p.push(h);for(var c=0;c<p.length;c++)n<=e&&e<=p[c].b&&0===c?(o="#"===p[c].color.charAt(0)?p[c].color:this._colorNameToHex(p[c].color),l=e<p[c].b?1-Math.abs((e-p[c].b)/s):(e-p[c].b)/s):p[c].b<=e&&e<=a&&c===p.length-1&&(i="#"===p[c].color.charAt(0)?p[c].color:this._colorNameToHex(p[c].color),l=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&&(i="#"===p[c].color.charAt(0)?p[c].color:this._colorNameToHex(p[c].color),o="#"===p[c+1].color.charAt(0)?p[c+1].color:this._colorNameToHex(p[c+1].color),l=Math.abs(e-p[c+1].b)/s)}return this.getPercentageColor(l,i,o)},e.prototype.getPercentageColor=function(e,t,i){var o=i.split("#")[1],n=t.split("#")[1],a=this.getPercentage(e,parseInt(n.substr(0,2),16),parseInt(o.substr(0,2),16)),l=this.getPercentage(e,parseInt(n.substr(2,2),16),parseInt(o.substr(2,2),16)),r=this.getPercentage(e,parseInt(n.substr(4,2),16),parseInt(o.substr(4,2),16));return new N(a,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}(),to=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,n=Re(this.mapObject.element.id+"_Secondary_Element");if(this.mapObject.isTileMap&&n){this.tileSvgObject=this.mapObject.renderer.createSvg({id:this.mapObject.element.id+"_Tile_SVG",width:o.width,height:o.height});var a=(0,t.createElement)("div",{id:this.mapObject.element.id+"_Tile_SVG_Parent"});a.style.cssText="position: absolute; height: "+o.height+"px; width: "+o.width+"px;",a.appendChild(this.tileSvgObject),n.appendChild(a)}this.layerGroup=this.mapObject.renderer.createGroup({id:this.mapObject.element.id+"_Layer_Collections","clip-path":"url(#"+this.mapObject.element.id+"_MapArea_ClipRect)"}),this.clipRectElement=this.mapObject.renderer.drawClipPath(new E(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)})),(0,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,n){e.currentFactor=e.calculateFactor(i),e.mapObject.defaultState=!(1!==e.mapObject.zoomSettings.zoomFactor&&!(0,t.isNullOrUndefined)(e.mapObject.tileZoomLevel)&&1!==e.mapObject.tileZoomLevel),(0,t.isNullOrUndefined)(e.mapObject.previousCenterLatitude)&&(0,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 a=new _(e.mapObject.centerPosition.longitude,e.mapObject.centerPosition.latitude),l=a;this.mapObject.isTileMap&&e.mapObject.markerModule&&e.mapObject.zoomSettings.enable&&(e.mapObject.markerModule.calculateZoomCenterPositionAndFactor(this.mapObject.layersCollection),(0,t.isNullOrUndefined)(this.mapObject.markerCenterLatitude)||(0,t.isNullOrUndefined)(this.mapObject.markerCenterLongitude)||e.mapObject.isZoomByPosition||(l=new _(e.mapObject.markerCenterLongitude,e.mapObject.markerCenterLatitude))),a=!e.mapObject.zoomSettings.shouldZoomInitially&&e.mapObject.centerPosition.longitude&&e.mapObject.centerPosition.latitude&&!e.mapObject.zoomPersistence&&e.mapObject.defaultState?new _(e.mapObject.centerPosition.longitude,e.mapObject.centerPosition.latitude):e.mapObject.zoomSettings.shouldZoomInitially&&e.mapObject.markerZoomedState&&!e.mapObject.zoomPersistence&&!(0,t.isNullOrUndefined)(e.mapObject.markerZoomCenterPoint)?new _(e.mapObject.markerZoomCenterPoint.longitude,e.mapObject.markerZoomCenterPoint.latitude):{x:null,y:null};var r=e.mapObject.zoomSettings.shouldZoomInitially&&!e.mapObject.isZoomByPosition?(0,t.isNullOrUndefined)(e.mapObject.markerZoomFactor)?1:e.mapObject.markerZoomFactor:e.mapObject.zoomSettings.zoomFactor;if(r=e.mapObject.enablePersistence?(0,t.isNullOrUndefined)(e.mapObject.mapScaleValue)?(0,t.isNullOrUndefined)(e.mapObject.markerZoomFactor)?e.mapObject.zoomSettings.zoomFactor:e.mapObject.markerZoomFactor:e.mapObject.mapScaleValue:r,r=(r=e.mapObject.zoomSettings.enable?r:e.mapObject.zoomSettings.zoomFactor)>0?r:1,e.mapObject.defaultState=1===r,!e.mapObject.markerZoomedState&&e.mapObject.zoomSettings.shouldZoomInitially&&1===e.mapObject.zoomSettings.zoomFactor&&(e.mapObject.defaultState=!0),(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,!(0,t.isNullOrUndefined)(e.mapObject.tileTranslatePoint)&&(e.mapObject.markerZoomFactor!==e.mapObject.mapScaleValue||(0,t.isNullOrUndefined)(e.mapObject.markerZoomFactor)&&(0,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,(0,t.isNullOrUndefined)(e.mapObject.tileTranslatePoint)||(e.mapObject.tileTranslatePoint.x=0,e.mapObject.tileTranslatePoint.y=0));if(r<=1&&!(0,t.isNullOrUndefined)(e.mapObject.height)&&!e.mapObject.zoomSettings.shouldZoomInitially&&e.mapObject.tileZoomLevel===e.mapObject.tileZoomScale&&this.mapObject.initialCheck&&Ze(this.mapObject),(0,t.isNullOrUndefined)(e.mapObject.centerLatOfGivenLocation)||(0,t.isNullOrUndefined)(e.mapObject.centerLongOfGivenLocation)||!e.mapObject.zoomNotApplied||((0,t.isNullOrUndefined)(l)||(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&&!(0,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=256*Math.pow(2,this.mapObject.initialZoomLevel);(0,t.isNullOrUndefined)(this.mapObject.initialTileTranslate)||(this.mapObject.initialTileTranslate.x=this.mapObject.availableSize.width/2-d/2,this.mapObject.initialTileTranslate.y=this.mapObject.availableSize.height/2-d/2+20)}if(e.generateTiles(e.mapObject.tileZoomLevel,e.mapObject.tileTranslatePoint,null,n),(0,t.isNullOrUndefined)(e.mapObject.previousZoomFactor)||e.mapObject.previousZoomFactor===e.mapObject.zoomSettings.zoomFactor||(e.mapObject.previousZoomFactor=e.mapObject.zoomSettings.zoomFactor),e.mapObject.polygonModule){var p=e.mapObject.polygonModule.polygonRender(this.mapObject,o,e.mapObject.tileZoomLevel);(0,t.isNullOrUndefined)(p)||e.layerObject.appendChild(p)}if(e.mapObject.navigationLineModule){var h=e.mapObject.navigationLineModule.renderNavigation(e.currentLayer,e.mapObject.tileZoomLevel,o);(0,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),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 n=this.mapObject.getModuleName()+this.mapObject.element.id;if(-1===navigator.userAgent.indexOf("Edge")){var a=void 0;try{a=window.localStorage}catch(e){a=null}!(0,t.isNullOrUndefined)(a)&&window.localStorage.getItem(n)&&window.localStorage.removeItem(n)}}var l={cancel:!1,name:Pi,index:i,layer:e,maps:this.mapObject,visible:e.visible};this.mapObject.trigger("layerRendering",l,(function(n){if(!l.cancel&&l.visible)if((0,t.isNullOrUndefined)(e.shapeData)&&!(0,t.isNullOrUndefined)(e.urlTemplate)&&""!==e.urlTemplate)if(!(0,t.isNullOrUndefined)(e.urlTemplate)&&e.urlTemplate.indexOf("quadkey")>-1){var a=new $i(o.mapObject);o.bingMapCalculation(e,i,o,a)}else o.renderTileLayer(o,e,i);else if(!((0,t.isNullOrUndefined)(e.shapeData)||(0,t.isNullOrUndefined)(e.shapeData.geometries)&&(0,t.isNullOrUndefined)(e.shapeData.features))){var r=!(0,t.isNullOrUndefined)(e.shapeData.geometries)&&e.shapeData.geometries.length>0?e.shapeData.geometries:e.shapeData.features;e.layerData=[];var s=e.shapeData.bbox;!(0,t.isNullOrUndefined)(s)&&e.isBaseLayer?o.mapObject.baseMapBounds=new w({min:s[0][1],max:s[1][1]},{min:s[0][0],max:s[1][0]}):(0,t.isNullOrUndefined)(o.mapObject.baseMapBounds)&&!Ne(r)&&o.calculateRectBounds(r),o.calculatePathCollection(i,r)}})),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,!1,!0)},e.prototype.bubbleCalculation=function(e,i){if(null!=e.dataSource&&null!=e)for(var o=e.dataSource,n=0;n<o.length;n++){var a=(0,t.isNullOrUndefined)(e.valuePath)?parseFloat(e.dataSource[n][e.valuePath]):e.valuePath.indexOf(".")>-1?Number(Y(e.dataSource[n],e.valuePath)):parseFloat(e.dataSource[n][e.valuePath]);isNaN(a)||(0!==n?a>i.max?i.max=a:a<i.min&&(i.min=a):i.max=i.min=a)}},e.prototype.calculatePathCollection=function(e,i){var o=this;this.groupElements=[],Ne(i)||(this.currentFactor=this.calculateFactor(this.currentLayer)),this.rectBounds=null;var n=this.currentLayer.shapeSettings;Array.prototype.forEach.call(i,(function(e){if(!(0,t.isNullOrUndefined)(e.geometry)||!(0,t.isNullOrUndefined)(e.coordinates)){var i=(0,t.isNullOrUndefined)(e.geometry)?e.type:e.geometry.type,n=(0,t.isNullOrUndefined)(e.geometry)?e.coordinates:e.geometry.coordinates,a=e.geometry,l=e.properties;o.generatePoints(i,n,a,l)}})),this.currentLayer.rectBounds=this.rectBounds,(0,t.isNullOrUndefined)(this.mapObject.baseMapRectBounds)&&this.currentLayer.isBaseLayer&&(this.mapObject.baseMapRectBounds=this.rectBounds);var a=!(0,t.isNullOrUndefined)(n.palette)&&n.palette.length>1?n.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"tailwind3":t=["#2F4074","#03B4B4","#0D72DE","#FF5733","#D63384","#F39C12","#EF291F","#91C822"];break;case"tailwind3dark":t=["#8029F1","#1ABC9C","#0D72DE","#FF5733","#D63384","#F39C12","#EF291F","#91C822"];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;case"fluent2":t=["#6200EE","#09AF74","#0076E5","#CB3587","#E7910F","#0364DE","#66CD15","#F3A93C","#107C10","#C19C00"];break;case"fluent2dark":case"fluent2highcontrast":t=["#9BB449","#2A72D5","#43B786","#3F579A","#584EC6","#E85F9C","#6E7A89","#EA6266","#0B6A0B","#C19C00"];break;case"bootstrap5":case"bootstrap5dark":t=["#6610F2","#6f42C1","#D63384","#DC3545","#FD7E14","#FFC107","#198754","#0DCAF0"];break;default:t=["#B5E485","#7BC1E8","#DF819C","#EC9B79","#78D0D3","#D6D572","#9178E3","#A1E5B4","#87A4B4","#E4C16C"]}return t}(this.mapObject.theme),l=(0,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:n.border.color||s.mapObject.themeStyle.shapeBorderColor,width:n.border.width,opacity:n.border.opacity},u=s.currentLayer.layerData[r],g="",y=n.autofill?a[r%a.length]:n.fill||s.mapObject.themeStyle.shapeFill;null===n.colorValuePath||(0,t.isNullOrUndefined)(u.property)||(null!==(m=we(s.currentLayer.dataSource,u.property,s.currentLayer.shapeDataPath,s.currentLayer.shapePropertyPath,s.currentLayer))&&0===n.colorMapping.length?y=s.currentLayer.shapeSettings.colorValuePath.indexOf(".")>-1?Y(s.currentLayer.dataSource[m],n.colorValuePath):s.currentLayer.dataSource[m][n.colorValuePath]:u.property[n.colorValuePath]&&0===s.currentLayer.dataSource.length&&0===n.colorMapping.length&&(y=s.currentLayer.shapeSettings.colorValuePath.indexOf(".")>-1?Y(u.property,n.colorValuePath):u.property[n.colorValuePath]),y=(0,t.isNullOrUndefined)(y)?n.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)||(0,t.isNullOrUndefined)(b.fill)?y:b.fill,(s.currentLayer.shapeSettings.borderColorValuePath||s.currentLayer.shapeSettings.borderWidthValuePath)&&null!==(m=we(s.currentLayer.dataSource,u.property,s.currentLayer.shapeDataPath,s.currentLayer.shapePropertyPath,s.currentLayer))&&(s.currentLayer.dataSource[m][n.borderColorValuePath]&&(c.color=s.currentLayer.dataSource[m][n.borderColorValuePath]),s.currentLayer.dataSource[m][n.borderWidthValuePath]&&(c.width=s.currentLayer.dataSource[m][n.borderWidthValuePath]));var v="[object Object]"!==Object.prototype.toString.call(b)||(0,t.isNullOrUndefined)(b.opacity)?n.opacity:b.opacity,S={cancel:!1,name:wi,index:r,data:s.currentLayer.dataSource?s.currentLayer.dataSource[m]:null,maps:s.mapObject,shape:n,fill:y,border:{width:c.width,color:c.color,opacity:c.opacity}},x=function(s){var m,b=(0,t.isNullOrUndefined)(u._isMultiPolygon)?(0,t.isNullOrUndefined)(u.type)?u[0].type:u.type:"MultiPolygon";if(b="Polygon"===b||"MultiPolygon"===b?"Polygon":b,s.cancel?(s.fill=y,s.border.color=n.border.color||o.mapObject.themeStyle.shapeBorderColor,s.border.width=n.border.width):(s.fill="#A6A6A6"===s.fill?s.shape.fill||o.mapObject.themeStyle.shapeFill:s.fill,s.border.color="transparent"===s.border.color?s.shape.border.color:s.border.color,s.border.width=0===s.border.width?s.shape.border.width:s.border.width,(0,t.isNullOrUndefined)(n.borderColorValuePath)&&(c.color=s.border.color),(0,t.isNullOrUndefined)(n.borderWidthValuePath)&&(c.width=s.border.width)),s.border.opacity=(0,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+"_"+b+"_Group",transform:""}),o.groupElements.push(h);else for(var S=0;S<o.groupElements.length;S++){var x=o.groupElements[S];if(x.id.indexOf(b)>-1){h=x;break}if(S>=o.groupElements.length-1){h=o.mapObject.renderer.createGroup({id:o.mapObject.element.id+"_LayerIndex_"+e+"_"+b+"_Group"}),o.groupElements.push(h);break}}switch(b){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 k(f,s.fill,s.border.width,s.border.color,v,s.border.opacity,n.dashArray,g),m=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 k(f,"transparent",(0,t.isNullOrUndefined)(s.border.width)?1:s.border.width,(0,t.isNullOrUndefined)(s.fill)?s.border.color:s.fill,v,s.border.opacity,n.dashArray,g),m=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 k(f,"transparent",(0,t.isNullOrUndefined)(s.border.width)?1:s.border.width,(0,t.isNullOrUndefined)(s.fill)?s.border.color:s.fill,v,s.border.opacity,n.dashArray,g),m=o.mapObject.renderer.drawPath(d));break;case"Point":var O=u.point,C="SubLayer"!==o.mapObject.layers[e].type?n.circleRadius:n.circleRadius/(o.mapObject.isTileMap?o.mapObject.scale:o.currentFactor);p=new z(f,s.fill,s.border,v,O.x,O.y,C,n.dashArray),m=o.mapObject.renderer.drawCircle(p);break;case"MultiPoint":u.map((function(t,i){var a=t.point,l="SubLayer"!==o.mapObject.layers[e].type?n.circleRadius:n.circleRadius/(o.mapObject.isTileMap?o.mapObject.scale:o.currentFactor);p=new z(f+"_multiLine_"+i,s.fill,s.border,v,a.x,a.y,l,n.dashArray),m=o.mapObject.renderer.drawCircle(p),o.pathAttributeCalculate(h,m,b,u)}));break;case"Path":g=u.point,d=new k(f,s.fill,s.border.width,s.border.color,v,s.border.opacity,n.dashArray,g),m=o.mapObject.renderer.drawPath(d)}(0,t.isNullOrUndefined)(m)||"MultiPoint"===b||o.pathAttributeCalculate(h,m,b,u),r===o.currentLayer.layerData.length-1&&o.layerFeatures(e,a,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,a,i,l)},e.prototype.pathAttributeCalculate=function(e,i,o,n){for(var a,l="[object Array]"===Object.prototype.toString.call(this.currentLayer.shapePropertyPath)?this.currentLayer.shapePropertyPath:[this.currentLayer.shapePropertyPath],r=0;r<l.length;r++)if(!(0,t.isNullOrUndefined)(n.property)){a=l[r];break}i.setAttribute("aria-label",(0,t.isNullOrUndefined)(n.property)?"":n.property[a]),this.currentLayer.selectionSettings.enable||this.currentLayer.highlightSettings.enable?(i.tabIndex=this.mapObject.tabIndex,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"),se(this.mapObject.selectedElementId,this.mapObject.shapeSelectionClass,i,"ShapeselectionMapStyle"),this.mapObject.legendSettings.toggleLegendSettings.enable&&"Layers"===this.mapObject.legendSettings.type&&de(this.mapObject.toggledElementId,i,this.mapObject.legendSettings.toggleLegendSettings.applyShapeSettings?this.currentLayer.shapeSettings:this.mapObject.legendSettings.toggleLegendSettings),e.appendChild(i)},e.prototype.layerFeatures=function(e,i,o,n){var a,l=this;if(this.mapObject.polygonModule&&this.groupElements.push(this.mapObject.polygonModule.polygonRender(this.mapObject,e,this.mapObject.isTileMap?Math.floor(this.currentFactor):this.currentFactor)),this.currentLayer.bubbleSettings.length&&this.mapObject.bubbleModule)for(var r,s=this.currentLayer.bubbleSettings.length,d=function(o){r=p.currentLayer.bubbleSettings[o],a=p.mapObject.renderer.createGroup({id:p.mapObject.element.id+"_LayerIndex_"+e+"_bubble_Group_"+o});var n={min:0,max:0};p.bubbleCalculation(r,n);var s=r.dataSource;p.mapObject.bubbleModule.bubbleCollection=[],!(0,t.isNullOrUndefined)(s)&&s.length>0&&(s.map((function(t,s){l.renderBubble(l.currentLayer,t,i[s%i.length],n,o,s,a,e,r)})),p.groupElements.push(a))},p=this,h=0;h<s;h++)d(h);this.mapObject.markerModule&&!this.mapObject.isTileMap&&this.mapObject.zoomSettings.enable&&this.mapObject.markerModule.calculateZoomCenterPositionAndFactor(this.mapObject.layersCollection);var m=this.mapObject.renderer.createGroup({id:this.mapObject.element.id+"_LayerIndex_"+e+"_dataLableIndex_Group"});if(m.style.pointerEvents="none",this.mapObject.dataLabelModule&&this.currentLayer.dataLabelSettings.visible){var c=[];Array.prototype.forEach.call(o,(function(t,i){l.renderLabel(l.currentLayer,e,t,m,i,n,c)})),this.groupElements.push(m)}this.mapObject.navigationLineModule&&this.groupElements.push(this.mapObject.navigationLineModule.renderNavigation(this.currentLayer,this.currentFactor,e)),(0,t.isNullOrUndefined)(this.groupElements)||(0,t.isNullOrUndefined)(this.layerObject)||this.groupElements.map((function(e){(0,t.isNullOrUndefined)(e)||l.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),this.layerGroup.appendChild(this.layerObject)},e.prototype.renderLabel=function(e,t,i,o,n,a,l){this.mapObject.dataLabelModule.renderLabel(e,t,i,e.layerData,o,a,n,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,n,a,l,r,s,d){if((0,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_"+a+"_dataIndex_"+l,this.mapObject.bubbleModule.renderBubble(d,i,o,n,a,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&&(0,t.isNullOrUndefined)(e.dataSource))return o;var n=we(e.dataSource,i,e.shapeDataPath,e.shapePropertyPath),a=new eo(this.mapObject);return(0,t.isNullOrUndefined)(e.dataSource)||(0,t.isNullOrUndefined)(e.dataSource[n])?o:a.getShapeColorMapping(e.shapeSettings,e.dataSource[n],o)},e.prototype.generatePoints=function(e,i,o,n){var a,l,r=this,s=[];switch(e.toLowerCase()){case"polygon":(s=this.calculatePolygonBox(i[0])).length>0&&(s.property=n,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 h=0;h<i[p].length;h++)(s=this.calculatePolygonBox(i[p][h])).length>0&&d.push(s);d.property=n,d.type=e,d._isMultiPolygon=!0,this.currentLayer.layerData.push(d);break;case"linestring":var m=(0,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){a=e[1],l=e[0];var t=c(a,l,r.currentFactor,r.currentLayer,r.mapObject);r.calculateBox(t,m),s.push({point:t,lat:a,lng:l})})),s.property=n,s.type=e,this.currentLayer.layerData.push(s);break;case"multilinestring":var u=(0,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){a=e[1],l=e[0];var t=c(a,l,r.currentFactor,r.currentLayer,r.mapObject);r.calculateBox(t,u),s.push({point:t,lat:a,lng:l})})),g.push(s)})),g.property=n,g.type=e,this.currentLayer.layerData.push(g);break;case"point":var y=((0,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;a=i[1],l=i[0];var f=c(a,l,this.currentFactor,this.currentLayer,this.mapObject);this.calculateBox(f,y),this.currentLayer.layerData.push({point:f,type:e,lat:a,lng:l,property:n});break;case"multipoint":var b=((0,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){a=e[1],l=e[0];var t=c(a,l,r.currentFactor,r.currentLayer,r.mapObject);r.calculateBox(t,b),s.push({point:t,lat:a,lng:l})})),s.property=n,s.type=e,this.currentLayer.layerData.push(s);break;case"path":this.currentLayer.layerData.push({point:o.d,type:e,property:n})}},e.prototype.calculateBox=function(e,i){(0,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,l=this.mapObject.baseMapBounds,r=new n(this.mapObject.mapAreaRect.width,this.mapObject.mapAreaRect.height-5);if(l){var s=c(l.latitude.min,l.longitude.min,null,e,this.mapObject),d=c(l.latitude.max,l.longitude.max,null,e,this.mapObject);i=d.y-s.y,o=d.x-s.x,0!==i&&0!==o||(o=r.width/2,i=r.height)}else i=o=500;return t=i<r.height?parseFloat(Math.abs(100*Number(r.height/Number(i.toString()+"e+1"))).toString().split(".")[0])/10:r.height/i,a=o<r.width?parseFloat(Math.abs(100*Number(r.width/Number(o.toString()+"e+1"))).toString().split(".")[0])/10:r.width/o,Math.min(a,t)},e.prototype.translateLayerElements=function(e){var i;if(this.mapObject.translateType="layer",(0,t.isNullOrUndefined)(this.mapObject.baseMapRectBounds)){if(this.mapObject.isTileMap&&!(0,t.isNullOrUndefined)(this.mapObject.scale))for(var o=0;o<e.childElementCount;o++)if(!((i=e.childNodes[o]).id.indexOf("_Markers_Group")>-1||i.id.indexOf("_bubble_Group")>-1||i.id.indexOf("_dataLableIndex_Group")>-1||i.id.indexOf("_line_Group")>-1)&&-1===i.id.indexOf("_Polygons_Group")){p="scale( "+this.mapObject.scale+" ) translate( "+this.mapObject.translatePoint.x+" "+this.mapObject.translatePoint.y+" ) ";i.setAttribute("transform",p)}}else{var n="Disable"===t.animationMode?0:0===this.currentLayer.animationDuration&&"Enable"===t.animationMode?1e3:this.currentLayer.animationDuration,a=0!==n||(0,t.isNullOrUndefined)(this.mapObject.zoomModule);this.mapObject.baseTranslatePoint=this.mapObject.zoomTranslatePoint;var l=void 0;l=this.mapObject.zoomSettings.zoomFactor>1&&!(0,t.isNullOrUndefined)(this.mapObject.zoomModule)?je(this.mapObject,this.currentLayer,a):Ue(this.mapObject,this.currentLayer,a);var r=this.mapObject.previousScale=l.scale,s=this.mapObject.previousPoint=l.location;this.mapObject.baseTranslatePoint=this.mapObject.translatePoint=s,this.mapObject.baseScale=this.mapObject.scale=r;for(var d=0;d<e.childElementCount;d++)if(!((i=e.childNodes[d]).id.indexOf("_Markers_Group")>-1||i.id.indexOf("_bubble_Group")>-1||i.id.indexOf("_dataLableIndex_Group")>-1)){var p="scale( "+r+" ) translate( "+s.x+" "+s.y+" ) ";i.setAttribute("transform",p),n>0&&!(0,t.isNullOrUndefined)(this.mapObject.zoomModule)&&(l=this.mapObject.zoomSettings.zoomFactor>1?je(this.mapObject,this.currentLayer):Ue(this.mapObject,this.currentLayer),this.mapObject.scale=l.scale,this.mapObject.zoomTranslatePoint=this.mapObject.translatePoint=l.location)}}},e.prototype.calculateRectBounds=function(e){var i=this;Array.prototype.forEach.call(e,(function(e){if(!(0,t.isNullOrUndefined)(e.geometry)||!(0,t.isNullOrUndefined)(e.coordinates)){var o=(0,t.isNullOrUndefined)(e.geometry)?e.type:e.geometry.type,n=(0,t.isNullOrUndefined)(e.geometry)?e.coordinates:e.geometry.coordinates;switch(o.toLowerCase()){case"polygon":i.calculateRectBox(n[0]);break;case"multipolygon":n.map((function(e){i.calculateRectBox(e[0])}));break;case"multilinestring":n.map((function(e){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){var i=this,o=[],n=this.mapObject.baseMapBounds;return e.map((function(e){var a=e[1],l=e[0];if(l>=n.longitude.min&&l<=n.longitude.max&&a>=n.latitude.min&&a<=n.latitude.max){var r=c(a,l,i.currentFactor,i.currentLayer,i.mapObject);(0,t.isNullOrUndefined)(i.rectBounds)?i.rectBounds={min:{x:r.x,y:r.y},max:{x:r.x,y:r.y}}:(i.rectBounds.min.x=Math.min(i.rectBounds.min.x,r.x),i.rectBounds.min.y=Math.min(i.rectBounds.min.y,r.y),i.rectBounds.max.x=Math.max(i.rectBounds.max.x,r.x),i.rectBounds.max.y=Math.max(i.rectBounds.max.y,r.y)),o.push({point:r,lat:a,lng:l})}})),o},e.prototype.calculateRectBox=function(e,i,o){var n=this;"linestring"!==i&&"multilinestring"!==i&&"point"!==i&&"multipoint"!==i?Array.prototype.forEach.call(e,(function(e){(0,t.isNullOrUndefined)(n.mapObject.baseMapBounds)?n.mapObject.baseMapBounds=new w({min:e[1],max:e[1]},{min:e[0],max:e[0]}):(n.mapObject.baseMapBounds.latitude.min=Math.min(n.mapObject.baseMapBounds.latitude.min,e[1]),n.mapObject.baseMapBounds.latitude.max=Math.max(n.mapObject.baseMapBounds.latitude.max,e[1]),n.mapObject.baseMapBounds.longitude.min=Math.min(n.mapObject.baseMapBounds.longitude.min,e[0]),n.mapObject.baseMapBounds.longitude.max=Math.max(n.mapObject.baseMapBounds.longitude.max,e[0]))})):(o||"point"===i)&&(0,t.isNullOrUndefined)(this.mapObject.baseMapBounds)?this.mapObject.baseMapBounds=new w({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,n,a){var l,r,s=this.mapObject.locale,d=this.mapObject.availableSize;this.tiles=[],l=r=Math.pow(2,e);var p=0,h=0;i.x+256*l<d.width&&(p=i.x>0?Math.ceil(i.x/256):0,h=i.x+256*l<d.width?Math.ceil((d.width-(i.x+256*l))/256):0),l+=p+h,"Pan"===o?(l=this.horizontalPanXCount>=l?this.horizontalPanXCount:l,this.horizontalPan=!1):(this.horizontalPanXCount=l,this.horizontalPan=!0);var m=this.mapObject.layers[this.mapObject.baseLayerIndex];this.urlTemplate=m.urlTemplate;var c=Math.min(r,(-i.y+d.height)/256+1),u=Math.min(l,(-i.x+d.width+256*h)/256+1),g=-(i.x+256*p+256)/256,y=-(i.y+256)/256;n=n||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<=d.width&&S>-256&&S<d.height&&b>=0){var x=f;f<0&&(x=x%r+r);var O=new mi(x%r,b);O.left=Math.round(v),O.top=Math.round(S),n&&!(0,t.isNullOrUndefined)(m.urlTemplate)&&""!==m.urlTemplate&&m.urlTemplate.indexOf("quadkey")>-1?O.src=n.getBingMap(O,"","",s,n.imageUrl,n.subDomains):(n=null,O.src=this.urlTemplate.replace("level",e.toString()).replace("tileX",O.x.toString()).replace("tileY",O.y.toString())),this.tiles.push(O)}}(0,t.isNullOrUndefined)(o)||(o.indexOf("wheel")>1?(this.animateToZoomX=this.mapObject.availableSize.width/2-a.x-10,this.animateToZoomY=-a.y):(this.animateToZoomX=-10,this.animateToZoomY=10-(this.mapObject.availableSize.height/2+11.5)));for(var C=(0,t.extend)([],this.tiles,[],!0),_=0,M=this.mapObject.layers;_<M.length;_++){var L=M[_];if("SubLayer"===L.type&&L.visible&&((0,t.isNullOrUndefined)(L.shapeData)&&!(0,t.isNullOrUndefined)(L.urlTemplate)&&""!==L.urlTemplate))for(var P=0,w=C;P<w.length;P++){var T=w[P],F=(0,t.extend)({},T,{},!0);L.urlTemplate.indexOf("quadkey")?(n=new $i(this.mapObject),F.src=n.getBingMap(F,"","",s,n.imageUrl,n.subDomains)):F.src=L.urlTemplate.replace("level",e.toString()).replace("tileX",T.x.toString()).replace("tileY",T.y.toString()),this.tiles.push(F)}}(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 n,a=this,l=document.getElementById(this.mapObject.element.id+"_tile_parent"),r=document.getElementById(this.mapObject.element.id+"_tiles");(0,t.isNullOrUndefined)(e)||"Pan"===e?n=0:(this.tileAnimation(e,i,o),n="Disable"===t.animationMode?0:0===this.mapObject.layersCollection[0].animationDuration&&"Enable"===t.animationMode?1e3:this.mapObject.layersCollection[0].animationDuration),setTimeout((function(){var i;l&&(l.style.zIndex="1"),r&&(r.style.zIndex="0"),!document.getElementById(a.mapObject.element.id+"_animated_tiles")&&l?(i=(0,t.createElement)("div",{id:a.mapObject.element.id+"_animated_tiles"}),l.appendChild(i)):"Pan"!==e&&r&&l?(r.appendChild(l.children[0]),a.mapObject.isAddLayer||(0,t.isNullOrUndefined)(document.getElementById(a.mapObject.element.id+"_animated_tiles"))||(document.getElementById(a.mapObject.element.id+"_animated_tiles").id=a.mapObject.element.id+"_animated_tiles_old"),i=(0,t.createElement)("div",{id:a.mapObject.element.id+"_animated_tiles"}),l.appendChild(i)):i=l?l.children[0]:null;for(var o=0;o<a.tiles.length;o++){var n=a.tiles[o],s=null,d=a.mapObject.element.id;if("Pan"===e){var p=document.getElementById(d+"_tile_"+o),h=!1;(0,t.isNullOrUndefined)(p)?(h=!0,p=(0,t.createElement)("div",{id:d+"_tile_"+o}),s=(0,t.createElement)("img")):(p.style.removeProperty("display"),s=p.children[0]),!h&&s&&s.src!==n.src&&(s.src=n.src),p.style.position="absolute",p.style.left=n.left+"px",p.style.top=n.top+"px",p.style.height=n.height+"px",p.style.width=n.width+"px",h&&(s.setAttribute("height","256px"),s.setAttribute("width","256px"),s.setAttribute("src",n.src),s.setAttribute("alt",a.mapObject.getLocalizedLabel("ImageNotFound")),s.style.setProperty("user-select","none"),p.appendChild(s),i.appendChild(p))}else{(s=(0,t.createElement)("img")).setAttribute("height","256px"),s.setAttribute("width","256px"),s.setAttribute("src",n.src),s.style.setProperty("user-select","none"),s.setAttribute("alt",a.mapObject.getLocalizedLabel("ImageNotFound")),(p=(0,t.createElement)("div",{id:d+"_tile_"+o})).style.position="absolute",p.style.left=n.left+"px",p.style.top=n.top+"px",p.style.height=n.height+"px",p.style.width=n.width+"px",p.appendChild(s),i&&i.appendChild(p)}o===a.tiles.length-1&&document.getElementById(a.mapObject.element.id+"_animated_tiles_old")&&Be(a.mapObject.element.id+"_animated_tiles_old")}if(!(0,t.isNullOrUndefined)(a.mapObject.currentTiles))for(var m=a.tiles.length;m<i.childElementCount;m++){for(var c=!1,u=0;u<a.mapObject.currentTiles.childElementCount;u++)c||a.mapObject.currentTiles.children[u].id!==i.children[m].id||(c=!0);c?i.children[m].style.display="none":i.removeChild(i.children[m])}}),n)},e.prototype.tileAnimation=function(e,i,o){var n=document.getElementById(this.mapObject.element.id+"_tile_parent"),a=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",n.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"}(0,t.isNullOrUndefined)(a)||(a.style.transition="Disable"===t.animationMode?"0ms":0===this.mapObject.layersCollection[0].animationDuration&&"Enable"===t.animationMode?"1000ms":this.mapObject.layersCollection[0].animationDuration+"ms",a.style.transform="translate("+i+"px, "+o+"px) scale("+r+")")},e.prototype.panTileMap=function(e,i,o){this.mapObject.tileZoomLevel<=this.mapObject.tileZoomScale&&this.mapObject.initialCheck&&(this.mapObject.tileZoomLevel=this.mapObject.tileZoomScale);var n,a,l=this.mapObject.tileZoomLevel,r=20,s=256*Math.pow(2,l),d=g(o,l,{x:n=e/2-s/2,y:a=i/2-s/2},this.isMapCoordinates);if(r=this.mapObject.zoomNotApplied?0:r,n-=d.x-e/2,a=a-(d.y-i/2)+r,this.mapObject.scale=Math.pow(2,l-1),((0,t.isNullOrUndefined)(this.mapObject.tileTranslatePoint)||0===this.mapObject.tileTranslatePoint.y&&0===this.mapObject.tileTranslatePoint.x||(0,t.isNullOrUndefined)(this.mapObject.previousTileWidth)||(0,t.isNullOrUndefined)(this.mapObject.previousTileHeight))&&(this.mapObject.previousTileWidth=e,this.mapObject.previousTileHeight=i),!(0,t.isNullOrUndefined)(this.mapObject.tileTranslatePoint)&&(0,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=n-(this.mapObject.previousTileWidth/2-s/2),h=a-(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(0,t.isNullOrUndefined)(this.mapObject.tileTranslatePoint)||this.mapObject.zoomNotApplied||(0===this.mapObject.tileTranslatePoint.x||this.mapObject.tileTranslatePoint.x===n||this.mapObject.centerPositionChanged||(n=this.mapObject.tileTranslatePoint.x),0===this.mapObject.tileTranslatePoint.y||this.mapObject.tileTranslatePoint.y===a||this.mapObject.centerPositionChanged||(a=this.mapObject.tileTranslatePoint.y)),this.mapObject.translatePoint=new _((n-.01*this.mapObject.zoomSettings.zoomFactor)/this.mapObject.scale,(a-.01*this.mapObject.zoomSettings.zoomFactor)/this.mapObject.scale),this.mapObject.previousTileWidth=e,this.mapObject.previousTileHeight=i,new _(n,a)},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,(0,t.isNullOrUndefined)(this.bing)||this.bing.destroy(),this.bing=null},e}(),io=function(){function e(e){this.map=e}return e.prototype.renderAnnotationElements=function(){var e=this,i=this.map.element.id+"_Secondary_Element",o=(0,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&&!(0,t.isNullOrUndefined)(Re(i))&&Re(i).appendChild(o),this.map.renderReactTemplates()},e.prototype.createAnnotationTemplate=function(e,i,o){var n,a,l,r,s=this,d=this.map,p=d.availableSize,h=(0,t.createElement)("div",{id:d.element.id+"_Annotation_"+o});h.style.cssText="position: absolute; z-index:"+i.zIndex+";";var m={cancel:!1,name:Gi,content:i.content,annotation:i};this.map.trigger(Gi,m,(function(e){if(!m.cancel)if((l=Ge(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,n=0;n<i;n++)h.appendChild(r[n]);else h.appendChild((0,t.createElement)("div",{innerHTML:m.content}))}));var c=dt(h.cloneNode(!0),d.element),u=d.element.getBoundingClientRect(),g=d.svgObject.getBoundingClientRect();n=Math.abs(g.left-u.left),a=Math.abs(g.top-u.top);var y=(0,t.isNullOrUndefined)(i.x)?"0%":i.x,f=(0,t.isNullOrUndefined)(i.y)?"0%":i.y,b=y.indexOf("%")>-1?p.width/100*parseFloat(y):parseFloat(y),v=f.indexOf("%")>-1?p.height/100*parseFloat(f):parseFloat(f);switch(n="None"===i.horizontalAlignment?n+b:n,a="None"===i.verticalAlignment?a+v:a,i.verticalAlignment){case"Near":a+=v;break;case"Center":a=a+v+(g.height/2-c.height/2);break;case"Far":a=a+g.height+v-c.height}switch(i.horizontalAlignment){case"Near":n+=b;break;case"Center":n=n+b+(g.width/2-c.width/2);break;case"Far":n=n+g.width+b-c.width}h.style.left=n+"px",h.style.top=a+"px",e.appendChild(h)},e.prototype.getModuleName=function(){return"Annotations"},e.prototype.destroy=function(){this.map=null},e}(),oo=l(74),no=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])},e(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)}}(),ao=function(e,t,i,o){var n,a=arguments.length,l=a<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--)(n=e[r])&&(l=(a<3?n(l):a>3?n(t,i,l):n(t,i))||l);return a>3&&l&&Object.defineProperty(t,i,l),l},lo=function(e){function o(i,o){var a=e.call(this,i,o)||this;return a.isTileMap=!1,a.isResize=!1,a.isReset=!1,a.baseSize=new n(0,0),a.translatePoint=new _(0,0),a.baseTranslatePoint=new _(0,0),a.zoomTranslatePoint=new _(0,0),a.markerZoomedState=!0,a.zoomPersistence=!1,a.defaultState=!0,a.centerPositionChanged=!1,a.markerNullCount=0,a.tileTranslatePoint=new _(0,0),a.baseTileTranslatePoint=new _(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.selectedPolygonElementId=[],a.selectedLegendElementId=[],a.legendSelectionCollection=[],a.shapeSelections=!0,a.legendSelection=!0,a.toggledLegendId=[],a.toggledElementId=[],a.checkInitialRender=!0,a.initialTileTranslate=new _(0,0),a.isMarkerZoomCompleted=!1,a.markerDragId="",a.initialCheck=!0,a.applyZoomReset=!1,a.markerClusterExpandCheck=!1,a.markerClusterExpand=!1,a.mouseMoveId="",a.shapeSelectionItem=[],a.markerDragArgument=null,(0,t.setValue)("mergePersistData",a.mergePersistMapsData,a),a}return no(o,e),Object.defineProperty(o.prototype,"isShapeSelected",{get:function(){return this.mapSelect},enumerable:!0,configurable:!0}),o.prototype.mergePersistMapsData=function(){var e,i;try{i=window.localStorage}catch(e){i=null}if((0,t.isNullOrUndefined)(i)||(e=window.localStorage.getItem(this.getModuleName()+this.element.id)),!(0,t.isNullOrUndefined)(e)&&""!==e){var o=JSON.parse(e),n=Object.keys(o);this.isProtectedOnChange=!0;for(var a=0,l=n;a<l.length;a++){var r=l[a];"object"!=typeof this[r]||(0,t.isNullOrUndefined)(this[r])?this[r]=o[r]:(0,t.extend)(this[r],o[r])}this.isProtectedOnChange=!1}},o.prototype.getLocalizedLabel=function(e){return this.localeObject.getConstant(e)},o.prototype.preRender=function(){this.isDevice=t.Browser.isDevice,this.initPrivateVariable(),this.allowServerDataBinding=!1,this.unWireEVents(),this.wireEVents(),this.setCulture()},o.prototype.renderElements=function(){this.isDestroyed||(this.trigger(ui,{maps:this}),this.createSVG(),this.findBaseAndSubLayers(),!(0,t.isNullOrUndefined)(this.markerModule)&&this.markerModule.getMapsInstance()&&this.markerModule.initializeMarkerClusterList(),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",legendFontSize:"12px",fontWeight:"Medium",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};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",legendFontSize:"12px",fontWeight:"Medium",labelFontFamily:"Roboto, Noto, Sans-serif",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};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",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};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",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};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",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};break;case"tailwind3":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#111827",subTitleFontColor:"#111827",legendTitleFontColor:"#111827",legendTextColor:"#6B7280",dataLabelFontColor:"#111827",tooltipFontColor:"#F9FAFB",tooltipFillColor:"#111827",zoomFillColor:"#374151",fontFamily:"Inter",fontSize:"12px",fontWeight:"400",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Inter",titleFontWeight:"500",zoomSelectionColor:"#6B7280",shapeFill:"#F3F4F6",shapeBorderColor:"#E5E7EB",rectangleZoomFillColor:"#818CF8",rectangleZoomFillOpacity:.3,rectangleZoomBorderColor:"#4F46E5",legendBorderColor:"#E5E7EB",legendBorderWidth:0,tooltipBorderColor:"#111827",zoomButtonRadius:32};break;case"tailwind3dark":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#FFFFFF",subTitleFontColor:"#FFFFFF",legendTitleFontColor:"#FFFFFF",legendTextColor:"#9CA3AF",dataLabelFontColor:"#FFFFFF",tooltipFontColor:"#1F2937",tooltipFillColor:"#F9FAFB",zoomFillColor:"#D1D5DB",fontFamily:"Inter",fontSize:"12px",fontWeight:"400",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Inter",titleFontWeight:"600",zoomSelectionColor:"#9CA3AF",shapeFill:"#282F3C",shapeBorderColor:"#282F3C",rectangleZoomFillColor:"#3730A3",rectangleZoomFillOpacity:.3,rectangleZoomBorderColor:"#6366F1",legendBorderColor:"#282F3C",legendBorderWidth:0,tooltipBorderColor:"#F9FAFB",zoomButtonRadius:30};break;case"bootstrap5":t={backgroundColor:"transparent",areaBackgroundColor:"transparent",titleFontColor:"#212529",subTitleFontColor:"#212529",legendTitleFontColor:"#212529",legendTextColor:"#212529",dataLabelFontColor:"#212529",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#000000",zoomFillColor:"#6E757D",fontFamily:"Segoe UI",fontSize:"10px",fontWeight:"400",titleFontSize:"14px",subTitleFontSize:"12px",legendFontSize:"10px",tooltipFillOpacity:.9,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"400",zoomSelectionColor:"#212529",zoomBorderColor:"#DEE2E6",shapeFill:"#E9ECEF",shapeBorderColor:"#DEE2E6",zoomButtonRadius:32,rectangleZoomBorderColor:"#0D6EFD",rectangleZoomFillColor:"#86B7FE",rectangleZoomFillOpacity:.3,legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent"};break;case"bootstrap5dark":t={backgroundColor:"transparent",areaBackgroundColor:"transparent",titleFontColor:"#DEE2E6",subTitleFontColor:"#DEE2E6",legendTitleFontColor:"#DEE2E6",legendTextColor:"#DEE2E6",dataLabelFontColor:"#DEE2E6",tooltipFontColor:"#212529",tooltipFillColor:"#FFFFFF",zoomFillColor:"#ADB5BD",fontFamily:"Segoe UI",fontSize:"10px",fontWeight:"400",titleFontSize:"14px",subTitleFontSize:"12px",legendFontSize:"10px",tooltipFillOpacity:.9,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"400",zoomSelectionColor:"#F8F9FA",zoomBorderColor:"#495057",shapeFill:"#343A40",shapeBorderColor:"#495057",zoomButtonRadius:32,rectangleZoomFillColor:"#86B7FE",rectangleZoomBorderColor:"#0D6EFD",rectangleZoomFillOpacity:.3,legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent"};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",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};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",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};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",shapeBorderColor:"#000000",rectangleZoomFillColor:"#6750A4",rectangleZoomFillOpacity:.24,rectangleZoomBorderColor:"#6750A4",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};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",shapeBorderColor:"#000000",rectangleZoomFillColor:"#D0BCFF",rectangleZoomFillOpacity:.24,rectangleZoomBorderColor:"#D0BCFF",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};break;case"fluent2":t={backgroundColor:"transparent",areaBackgroundColor:"transparent",titleFontColor:"#242424",subTitleFontColor:"#242424",legendTitleFontColor:"#242424",legendTextColor:"#242424",dataLabelFontColor:"#242424",tooltipFontColor:"#242424",tooltipFillColor:"#FFFFFF",zoomFillColor:"#D1D1D1",fontFamily:"Segoe UI",fontSize:"10px",fontWeight:"400",titleFontSize:"14px",subTitleFontSize:"12px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"600",zoomSelectionColor:"#242424",shapeFill:"#E6E6E6",shapeBorderColor:"#EBEBEB",rectangleZoomFillColor:"#B4D6FA",rectangleZoomFillOpacity:.25,rectangleZoomBorderColor:"#0F6CBD",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:32};break;case"fluent2dark":t={backgroundColor:"transparent",areaBackgroundColor:"transparent",titleFontColor:"#FFFFFF",subTitleFontColor:"#FFFFFF",legendTitleFontColor:"#FFFFFF",legendTextColor:"#FFFFFF",dataLabelFontColor:"#FFFFFF",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#292929",zoomFillColor:"#666",fontFamily:"Segoe UI",fontSize:"10px",fontWeight:"400",titleFontSize:"14px",subTitleFontSize:"12px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"600",zoomSelectionColor:"#FFFFFF",shapeFill:"#333333",shapeBorderColor:"#000000",rectangleZoomFillColor:"#0E4775",rectangleZoomFillOpacity:.25,rectangleZoomBorderColor:"#0E4775",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:32};break;case"fluent2highcontrast":t={backgroundColor:"transparent",areaBackgroundColor:"transparent",titleFontColor:"#FFFFFF",subTitleFontColor:"#FFFFFF",legendTitleFontColor:"#FFFFFF",legendTextColor:"#FFFFFF",dataLabelFontColor:"#FFFFFF",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#000000",zoomFillColor:"#3FF23F",fontFamily:"Segoe UI",fontSize:"10px",fontWeight:"400",titleFontSize:"14px",subTitleFontSize:"12px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"600",zoomSelectionColor:"#FFFFFF",zoomBorderColor:"#FFFFFF",shapeFill:"#FFFFFF",shapeBorderColor:"#FFFFFF",rectangleZoomFillColor:"#1AEBFF",rectangleZoomFillOpacity:.25,rectangleZoomBorderColor:"#1AEBFF",legendBorderColor:"#FFFFFF",legendBorderWidth:1,tooltipBorderColor:"#FFF",zoomButtonRadius:32};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",legendFontSize:"12px",fontWeight:"Medium",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30}}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)},o.prototype.render=function(){this.renderElements()},o.prototype.processRequestJsonData=function(){var e,i,o=this,n=this.layersCollection.length-1;this.serverProcess={request:0,response:0},Array.prototype.forEach.call(this.layersCollection,(function(a,l){a.shapeData instanceof oo.DataManager?(o.serverProcess.request++,i=a.shapeData,e=a.query instanceof oo.Query?a.query:new oo.Query,i.executeQuery(e).then((function(e){o.processResponseJsonData("DataManager",e,a,"ShapeData")}))):(a.shapeData instanceof Mt||a.shapeData)&&((0,t.isNullOrUndefined)(a.shapeData.dataOptions)||o.processAjaxRequest(a,a.shapeData,"ShapeData"));a.dataSource instanceof oo.DataManager&&(o.serverProcess.request++,i=a.dataSource,e=a.query instanceof oo.Query?a.query:new oo.Query,i.executeQuery(e).then((function(e){a.dataSource=Tt(e)})));if(a.markerSettings.length>0)for(var r=function(t){a.markerSettings[t].dataSource instanceof oo.DataManager&&(o.serverProcess.request++,i=a.markerSettings[t].dataSource,e=a.markerSettings[t].query instanceof oo.Query?a.markerSettings[t].query:new oo.Query,i.executeQuery(e).then((function(e){a.markerSettings[t].dataSource=Tt(e)})))},s=0;s<a.markerSettings.length;s++)r(s);if(a.bubbleSettings.length>0){var d=function(t){a.bubbleSettings[t].dataSource instanceof oo.DataManager&&(o.serverProcess.request++,i=a.bubbleSettings[t].dataSource,e=a.bubbleSettings[t].query instanceof oo.Query?a.bubbleSettings[t].query:new oo.Query,i.executeQuery(e).then((function(e){a.bubbleSettings[t].dataSource=Tt(e)})))};for(s=0;s<a.bubbleSettings.length;s++)d(s)}(a.dataSource instanceof Mt||!(0,t.isNullOrUndefined)(a.dataSource)&&!(0,t.isNullOrUndefined)(a.dataSource.dataOptions))&&o.processAjaxRequest(a,a.dataSource,"DataSource"),o.serverProcess.request===o.serverProcess.response&&n===l&&o.processResponseJsonData(null)}))},o.prototype.processAjaxRequest=function(e,i,o){var n=this;this.serverProcess.request++;var a=new t.Fetch(i.dataOptions,i.type,i.contentType);a.onSuccess=function(i){if((0,t.isNullOrUndefined)(i.type)||"application/octet-stream"!==i.type)n.processResponseJsonData("Fetch",i,e,o);else{var a=new FileReader,l=n;a.onload=function(){i=JSON.parse(a.result.toString()),l.processResponseJsonData("Fetch",i,e,o)},a.readAsText(i)}},a.send(i.sendData)},o.prototype.processResponseJsonData=function(e,i,o,n){if(this.serverProcess.response++,e&&("ShapeData"===n?o.shapeData="DataManager"===e?Tt(i):i:o.dataSource="DataManager"===e?Tt(i):i),(0,t.isNullOrUndefined)(e)||this.serverProcess.request!==this.serverProcess.response)(0,t.isNullOrUndefined)(e)&&this.renderMap();else{var a=this.layersCollection;this.layersCollection=[];for(var l=0;l<a.length;l++)a[l].isBaseLayer&&this.layersCollection.push(a[l]);for(var r=0;r<a.length;r++)a[r].isBaseLayer||this.layersCollection.push(a[r]);this.renderMap()}},o.prototype.renderMap=function(){this.legendModule&&this.legendSettings.visible&&this.legendModule.renderLegend(),this.createTile(),this.zoomSettings.enable&&this.zoomModule&&this.zoomModule.createZoomingToolbars(),(0,t.isNullOrUndefined)(this.dataLabelModule)||(this.dataLabelModule.dataLabelCollections=[]),this.mapLayerPanel.measureLayerPanel(),(0,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,n=0;n<this.layers[e].initialShapeSelection.length;n++)this.shapeSelection(e,o[n].shapePath,o[n].shapeValue,!0);this.layers[e].selectionSettings.enableMultiSelect=i,e===this.layers.length-1&&(this.checkInitialRender=!1)}if(!this.isResize)for(var a=0;a<this.layers[e].markerSettings.length;a++)if(this.layers[e].markerSettings[a].selectionSettings&&this.layers[e].markerSettings[a].selectionSettings.enable&&this.layers[e].markerSettings[a].initialMarkerSelection.length>0){var l=this.layers[e].markerSettings[a].initialMarkerSelection;for(n=0;n<l.length;n++)this.markerInitialSelection(e,a,this.layers[e].markerSettings[a],l[n].latitude,l[n].longitude)}}if(!(0,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;c=parseFloat(p.style.left);var u=s.bottom-m.bottom-d.offsetTop;r=parseFloat(p.style.top),r=u<=11?r:(0,t.isNullOrUndefined)(this.legendModule)||"Bottom"!==this.legendSettings.position?2*r:this.mapAreaRect.y,c=u<=11?c:(0,t.isNullOrUndefined)(this.legendModule)?2*c:c,p.style.top=r+"px",p.style.left=c+"px",h.style.top=r+"px",h.style.left=c+"px",!(0,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.triggerZoomEvent(),this.isResize=!1},o.prototype.triggerZoomEvent=function(){var e,t=this.getMinMaxLatitudeLongitude();e={maps:this,isResized:this.isResize,minLatitude:t.minLatitude,maxLatitude:t.maxLatitude,minLongitude:t.minLongitude,maxLongitude:t.maxLongitude,cancel:!1,name:"Loaded"},this.trigger("loaded",e)},o.prototype.markerSelection=function(e,t,i,o){var n={color:e.border.color,width:e.border.width/t.scale,opacity:e.border.opacity},a={opacity:e.opacity,fill:e.fill,border:n,target:i.id,cancel:!1,data:o,maps:t};He("MarkerselectionMap")?Ke("MarkerselectionMap","MarkerselectionMapStyle",a):document.body.appendChild(Qe("MarkerselectionMap","MarkerselectionMapStyle",a)),(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)))},o.prototype.markerInitialSelection=function(e,t,i,o,n){var a=i.selectionSettings;if(a.enable)for(var l=0;l<i.dataSource.length;l++){var r=i.dataSource[l];if(r.latitude===o&&r.longitude===n){var s=this.element.id+"_LayerIndex_"+e+"_MarkerIndex_"+t+"_dataIndex_"+l;this.markerSelection(a,this,He(s),r)}}},o.prototype.renderArea=function(){var e=this.mapsArea.border.width,i=this.mapsArea.background;if(e>0||i||this.themeStyle.areaBackgroundColor){var o={opacity:(0,t.isNullOrUndefined)(this.mapsArea.border.opacity)?1:this.mapsArea.border.opacity,color:this.mapsArea.border.color,width:this.mapsArea.border.width},n=new E(this.element.id+"_MapAreaBorder",i||this.themeStyle.areaBackgroundColor,o,1,this.mapAreaRect);this.svgObject.appendChild(this.renderer.drawRectangle(n))}},o.prototype.addTabIndex=function(){this.element.setAttribute("aria-label",this.description||"Maps Element"),this.element.setAttribute("role","region"),this.element.tabIndex=this.tabIndex},o.prototype.setSecondaryElementPosition=function(){var e=Re(this.element.id+"_Secondary_Element"),i=this.element.getBoundingClientRect(),o=Re(this.element.id+"_svg");if(!(0,t.isNullOrUndefined)(o)){var n=o.getBoundingClientRect();e.style.left=Math.max(n.left-i.left,0)+"px",e.style.top=Math.max(n.top-i.top,0)+"px"}},o.prototype.zoomingChange=function(){var e,i;if(Re(this.element.id+"_Layer_Collections")&&this.zoomModule&&(this.zoomModule.layerCollectionEle=Re(this.element.id+"_Layer_Collections")),this.isTileMap&&Re(this.element.id+"_Tile_SVG")&&Re(this.element.id+"_tile_parent")){var o=Re(this.element.id+"_tile_parent"),n=Re(this.element.id+"_Tile_SVG"),a=Re(this.element.id+"_Tile_SVG_Parent"),l=o.getBoundingClientRect(),r=n.getBoundingClientRect();e=l.left-r.left,i=l.top-r.top,a.style.left=e+"px",a.style.top=i+"px",!(0,t.isNullOrUndefined)(this.legendModule)&&this.legendModule.totalPages.length>0&&(o.style.width=n.style.width=this.legendModule.legendTotalRect.width.toString(),o.style.height=n.style.height=this.legendModule.legendTotalRect.height.toString(),a.style.width=this.legendModule.legendTotalRect.width+"px",a.style.height=this.legendModule.legendTotalRect.height+"px");var s=document.getElementsByClassName("template");if(!(0,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(!(0,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||pt(g,c,this.scale,this)}}this.zoomModule&&(this.previousScale!==this.scale||this.zoomNotApplied||this.isZoomByPosition)&&this.zoomModule.applyTransform(this,!1,!0)}},o.prototype.createSecondaryElement=function(){if((0,t.isNullOrUndefined)(document.getElementById(this.element.id+"_Secondary_Element"))){var e=(0,t.createElement)("div",{id:this.element.id+"_Secondary_Element"});e.style.cssText="position: relative;z-index:2;",this.element.appendChild(e)}},o.prototype.getMinMaxLatitudeLongitude=function(){var e=document.getElementById(this.element.id);if((0,t.isNullOrUndefined)(e))return{minLatitude:0,maxLatitude:0,minLongitude:0,maxLongitude:0};var i=e.getBoundingClientRect(),o=De(this.margin.left),n=this.isTileMap?this.pointToLatLong(this.mapAreaRect.x-o,-this.mapAreaRect.y):this.getGeoLocation(0,this.mapAreaRect.x+i.left,this.mapAreaRect.y),a=this.isTileMap?this.pointToLatLong(this.mapAreaRect.width,this.mapAreaRect.height-this.mapAreaRect.y):this.getGeoLocation(0,this.mapAreaRect.x+i.left+this.mapAreaRect.width,this.mapAreaRect.y+this.mapAreaRect.height);return{minLatitude:n.latitude,maxLatitude:a.latitude,minLongitude:n.longitude,maxLongitude:a.longitude}},o.prototype.arrangeTemplate=function(){var e=this;document.getElementById(this.element.id+"_Legend_Border")&&(document.getElementById(this.element.id+"_Legend_Border").style.pointerEvents="none");var i=document.getElementsByClassName(this.element.id+"_template");!(0,t.isNullOrUndefined)(i)&&i.length>0&&Re(this.element.id+"_Layer_Collections")&&!this.isTileMap&&Array.prototype.forEach.call(i,(function(i){var o=0,n=0;if(!(0,t.isNullOrUndefined)(i)&&i.childElementCount>0){var a=Re(e.element.id+"_Layer_Collections").getBoundingClientRect(),l=Re(i.id).getBoundingClientRect();-1===i.id.indexOf("Marker")&&(o=e.isTileMap?0:a.left<l.left?-Math.abs(l.left-a.left):Math.abs(l.left-a.left),n=e.isTileMap?0:a.top<l.top?-Math.abs(l.top-a.top):Math.abs(l.top-a.top)),Array.prototype.forEach.call(i.childNodes,(function(e){-1===e.id.indexOf("Marker")&&(e.style.left=parseFloat(e.style.left)+o+"px",e.style.top=parseFloat(e.style.top)+n+"px",e.style.transform="translate(-50%, -50%)")}))}}))},o.prototype.createTile=function(){var e=this.layersCollection[0];if(e.isBaseLayer&&!(0,t.isNullOrUndefined)(e.urlTemplate)&&""!==e.urlTemplate&&(0,t.isNullOrUndefined)(e.shapeData)){Be(this.element.id+"_tile_parent"),Be(this.element.id+"_tiles"),Be("animated_tiles");var i=(0,t.createElement)("div",{id:this.element.id+"_tile_parent"}),o=De(this.margin.right);i.style.cssText="position: absolute; left: "+this.mapAreaRect.x+"px; right: "+o+"px; top: "+(this.mapAreaRect.y+0)+"px; height: "+this.mapAreaRect.height+"px; width: "+this.mapAreaRect.width+"px; overflow: hidden;";var n=(0,t.createElement)("div",{id:this.element.id+"_tiles"});n.style.cssText="position: absolute; left: "+this.mapAreaRect.x+"px; right: "+o+"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(n)}},o.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 to(this)},o.prototype.findBaseAndSubLayers=function(){var e=this,i=this.baseLayerIndex,o=[],n=[];this.layersCollection=[],Array.prototype.forEach.call(this.layers,(function(e){"Layer"===e.type?o.push(e):n.push(e)}));for(var a=0;a<o.length;a++){var l=o[a];if(l.visible&&i===a){l.isBaseLayer=!0,this.isTileMap=!!(0,t.isNullOrUndefined)(l.shapeData),this.layersCollection.push(l);break}if(a===o.length-1){this.layersCollection.push(o[0]);break}}n.map((function(t){t.visible&&e.layersCollection.push(t)}))},o.prototype.renderBorder=function(){var e=this.border.width,i=this.svgObject.querySelector("#"+this.element.id+"_MapBorder");if((e>0||this.background||this.themeStyle.backgroundColor)&&(0,t.isNullOrUndefined)(i)){var o={opacity:(0,t.isNullOrUndefined)(this.border.opacity)?1:this.border.opacity,color:this.border.color,width:this.border.width},n=new E(this.element.id+"_MapBorder",this.background||this.themeStyle.backgroundColor,o,1,new R(e/2,e/2,this.availableSize.width-e,this.availableSize.height-e));this.svgObject.appendChild(this.renderer.drawRectangle(n))}else i.setAttribute("fill",this.background||this.themeStyle.backgroundColor)},o.prototype.renderTitle=function(e,i,o,n){var a,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=De(this.margin.top),s=De(this.margin.bottom),d=De(this.margin.left),p=De(this.margin.right),h=Math.abs(d+p-this.availableSize.width);if(l.fontFamily=(0,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||St.mapsSubTitleFont.size,e.text){(0,t.isNullOrUndefined)(n)&&(n=this.renderer.createGroup({id:this.element.id+"_Title_Group"}));var m=Ee(h,e.text,l),c=T(m,l),u=ze((0,t.isNullOrUndefined)(o)?new R(d,r,this.availableSize.width,this.availableSize.height):o,(0,t.isNullOrUndefined)(e.alignment)?"Center":e.alignment,c,i),g=new I(this.element.id+"_Map_"+i,u.x,u.y,"start",m),y=new R(u.x,u.y,c.width,c.height),f=V(g,l,l.color||("title"===i?this.themeStyle.titleFontColor:this.themeStyle.subTitleFontColor),n);f.setAttribute("aria-label",e.text),f.setAttribute("role","region"),("title"===i&&!e.subtitleSettings.text||"subtitle"===i)&&(a=Math.abs(y.y+s-this.availableSize.height),this.mapAreaRect=new R(d,y.y+10,h,a-10)),"subtitle"!==i&&e.subtitleSettings.text?this.renderTitle(e.subtitleSettings,"subtitle",y,n):this.svgObject.appendChild(n)}else a=Math.abs(r+s-this.availableSize.height),this.mapAreaRect=new R(d,r,h,a)},o.prototype.createSVG=function(){this.removeSvg(),d(this)},o.prototype.removeSvg=function(){if(Be(this.element.id+"_Secondary_Element"),Be(this.element.id+"_tile_parent"),Be(this.element.id+"_tiles"),this.svgObject){for(;this.svgObject.childNodes.length>0;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&(0,t.remove)(this.svgObject)}this.clearTemplate()},o.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)},o.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)},o.prototype.mouseLeaveOnMap=function(e){document.getElementsByClassName("highlightMapStyle").length>0&&this.legendModule&&(this.legendModule.removeShapeHighlightCollection(),et(document.getElementsByClassName("highlightMapStyle")[0]))},o.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):-1===t.indexOf("_LayerIndex_")&&-1===t.indexOf("shapeIndex")&&Xe("highlightMapStyle").length>0&&(et(Xe("highlightMapStyle")[0]),this.legendSettings.visible&&this.legendModule&&this.legendModule.removeShapeHighlightCollection())},o.prototype.keyboardHighlightSelection=function(e,i){var o=i.type,n=parseInt(e.split("_LayerIndex_")[1].split("_")[0],10),a=parseInt(e.split("_shapeIndex_")[1].split("_")[0],10),l=this.layers[n].shapeData.features.length>a?this.layers[n].shapeData.features[a].properties:null,r=parseInt(e.split("_dataIndex_")[1].split("_")[0],10),s=(0,t.isNullOrUndefined)(r)?null:this.layers[n].dataSource[r];this.layers[n].selectionSettings.enable&&"keydown"===o&&this.selectionModule?(this.selectionModule.selectionsettings=this.layers[n].selectionSettings,this.selectionModule.selectionType="Shape",this.selectionModule.selectElement(i.target,n,s,l)):this.highlightModule&&this.layers[n].highlightSettings.enable&&"keyup"===o&&!i.target.classList.contains("ShapeselectionMapStyle")&&(this.highlightModule.highlightSettings=this.layers[n].highlightSettings,this.highlightModule.handleHighlight(i.target,n,s,l))},o.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 n=document.getElementById(this.element.id+"_animated_tiles");this.isTileMap&&!(0,t.isNullOrUndefined)(n)&&(this.currentTiles=n.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.isPanModeEnabled=!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 a=document.getElementById(this.element.id+"_Paging_Text").textContent.split("/").map(Number);o.indexOf("_Left_Page_Rect")>-1?(1!==a[0]&&e.target.focus(),e.target.style.outlineColor=a[0]-1!==a[1]?"":"transparent"):o.indexOf("_Right_Page_Rect")>-1&&(a[0]!==a[1]&&e.target.focus(),e.target.style.outlineColor=a[0]!==a[1]+1?"":"transparent"),Ye(this.element.id+"_Legend_Border",this.element.id)&&(Ye(this.element.id+"_Legend_Border",this.element.id).style.pointerEvents="none")}o.indexOf("shapeIndex")>-1&&this.keyboardHighlightSelection(o,e)}this.zoomModule&&this.zoomModule.removeToolbarOpacity(this.isTileMap?Math.round(this.tileZoomLevel):this.mapScaleValue,this.mouseMoveId)},o.prototype.SelectedElement=function(e){var t=!1;return"ShapeselectionMapStyle"===e.getAttribute("class")&&(t=!0),t},o.prototype.mapsOnClick=function(e){var i=this,o=e.target,n=o.id,a=null,l=null;if(this.mouseClickEvent={x:e.x,y:e.y},-1===o.id.indexOf("_ToolBar")){var r=this.getClickLocation(n,e.pageX,e.pageY,o,e.layerX,e.layerY);(0,t.isNullOrUndefined)(r)||(a=r.latitude,l=r.longitude);var s={cancel:!1,name:yi,target:n,x:e.clientX,y:e.clientY,latitude:a,longitude:l,isShapeSelected:this.SelectedElement(o)};this.onclick?(s.name=fi,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,n),this.isDevice&&this.zoomModule.removeToolbarClass("","","","",""))},o.prototype.clickHandler=function(e,t,i){i.id.indexOf("shapeIndex")>-1&&(this.mergeCluster(),He(this.element.id+"_mapsTooltip")&&this.mapsTooltipModule.tooltipTargetID.indexOf("_MarkerIndex_")>-1&&Be(this.element.id+"_mapsTooltip")),this.markerModule&&this.markerModule.markerClusterClick(e),t.cancel||this.notify(yi,i),t.cancel||-1===i.id.indexOf("shapeIndex")||this.triggerShapeSelection(i)},o.prototype.triggerShapeSelection=function(e){var i=parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10),o=qe(e.id,this.layers[i].selectionSettings,this,Oi);o.cancel||!this.selectionModule||(0,t.isNullOrUndefined)(this.shapeSelected)?o.cancel&&this.selectionModule&&(0,t.isNullOrUndefined)(o.data)&&(et(e),this.selectionModule.removedSelectionList(e)):Ke(this.selectionModule.selectionType+"selectionMap",this.selectionModule.selectionType+"selectionMapStyle",o)},o.prototype.getMarkerClickLocation=function(e,t,i,o,n,a){document.getElementById(this.element.id+"_svg").style.cursor="grabbing";var l=He(n.targetId),r=this.getClickLocation(n.targetId,e,t,l,i,o),s=this.isTileMap?g(new Z(r.longitude,r.latitude),this.tileZoomLevel,this.tileTranslatePoint,!0):c(r.latitude,r.longitude,this.mapLayerPanel.currentFactor,this.layersCollection[n.layerIndex],this),d=this.translatePoint,p=this.isTileMap?s.x:(s.x+d.x)*this.scale,h=this.isTileMap?s.y:(s.y+d.y)*this.scale;if("Balloon"!==this.markerDragArgument.shape?l.setAttribute("transform","translate( "+p+" "+h+" )"):l.parentElement.setAttribute("transform","translate( "+p+" "+h+" )"),a){var m=this.layers[n.layerIndex].markerSettings[n.markerIndex];r=this.getClickLocation(n.targetId,e-m.offset.x,t-m.offset.y,l,i-m.offset.x,o-m.offset.y)}return r},o.prototype.getClickLocation=function(e,i,o,n,a,l,r){var s,d=0;if(-1===e.indexOf("_LayerIndex_")||this.isTileMap||(0,t.isNullOrUndefined)(r)&&(parseInt(this.mouseDownEvent.x,10)!==parseInt(this.mouseClickEvent.x,10)||parseInt(this.mouseDownEvent.y,10)!==parseInt(this.mouseClickEvent.y,10)))this.isTileMap&&(!(0,t.isNullOrUndefined)(r)||parseInt(this.mouseDownEvent.x,10)===parseInt(this.mouseClickEvent.x,10)&&parseInt(this.mouseDownEvent.y,10)===parseInt(this.mouseClickEvent.y,10))&&(s=this.getTileGeoLocation(a,l));else if(d=parseFloat(e.split("_LayerIndex_")[1].split("_")[0]),"Normal"===this.layers[d].geometryType)if(e.indexOf("_shapeIndex_")>-1){var h=n.parentElement,m=p(i,o,h.id.indexOf("_Point_Group")>-1||h.id.indexOf("_LineString_Group")>-1||h.id.indexOf("_MultiLineString_Group")>-1||h.id.indexOf("_Polygon_Group")>-1?h.parentElement:h),c=this.mapLayerPanel.currentFactor*this.mapScaleValue,u=Math.abs(-this.baseMapBounds.longitude.min*c),g=Math.abs(this.baseMapBounds.latitude.max*c);s={latitude:Math.abs(this.baseMapBounds.latitude.max-m.y/c),longitude:Math.abs(m.x/c+this.baseMapBounds.longitude.min)},this.baseMapBounds.longitude.min<0&&u>m.x&&(s.longitude=-s.longitude),this.baseMapBounds.latitude.min<0&&g>m.y&&(s.latitude=-s.latitude)}else if(e.indexOf("_MarkerIndex_")>-1&&this.markerModule&&!this.markerDragArgument){var y=parseInt(e.split("_MarkerIndex_")[1].split("_")[0],10),f=parseInt(e.split("_dataIndex_")[1].split("_")[0],10);if(isNaN(y)||isNaN(f))s={latitude:null,longitude:null};else{var b=this.layers[d].markerSettings[y].dataSource[f];s={latitude:b.latitude,longitude:b.longitude}}}else if(e.indexOf("_MarkerIndex_")>-1&&this.markerModule&&this.markerDragArgument){var v=document.getElementById(this.element.id+"_LayerIndex_"+this.markerDragArgument.layerIndex).getBoundingClientRect(),S=new Z(i>v.left?Math.abs(v.left-i):0,o>v.top?Math.abs(v.top-o):0);u=Math.abs(-this.baseMapBounds.longitude.min*this.mapLayerPanel.currentFactor),g=Math.abs(this.baseMapBounds.latitude.max*this.mapLayerPanel.currentFactor);s={latitude:Math.abs(this.baseMapBounds.latitude.max-S.y/(this.mapLayerPanel.currentFactor*this.scale)),longitude:Math.abs(S.x/(this.mapLayerPanel.currentFactor*this.scale)+this.baseMapBounds.longitude.min)},this.baseMapBounds.longitude.min<0&&u>S.x&&(s.longitude=-s.longitude),this.baseMapBounds.latitude.min<0&&g>S.y&&(s.latitude=-s.latitude)}else s={latitude:null,longitude:null};else s=this.getGeoLocation(d,i,o);return s},o.prototype.removeTileMap=function(){var e=document.getElementById(this.element.id+"_animated_tiles");if(!(0,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},o.prototype.mouseEndOnMap=function(e){var i,o,n,a=0,l=0;if(-1!==e.type.indexOf("touch")?(this.isTouch=!0,a=i=(n=e).changedTouches[0].pageX,l=(o=n.changedTouches[0].pageY)-(this.isTileMap?10:0),this.mouseClickEvent={x:i,y:o}):(this.isTouch="touch"===e.pointerType,i=e.pageX,o=e.pageY,a=e.layerX,l=e.layerY-(this.isTileMap?10:0)),this.isTileMap&&this.removeTileMap(),this.isTouch&&(this.titleTooltip(e,i,o,!0),(0,t.isNullOrUndefined)(this.legendModule)||this.legendTooltip(e,e.pageX,e.pageY,!0)),this.notify(t.Browser.touchEndEvent,e),e.cancelable&&!this.isTouch&&e.preventDefault(),(0,t.isNullOrUndefined)(this.markerDragArgument))document.getElementById(this.element.id+"_svg").style.cursor="auto";else{var r=this.markerDragArgument;this.mouseClickEvent.x=this.mouseDownEvent.x,this.mouseClickEvent.y=this.mouseDownEvent.y;var s=this.getMarkerClickLocation(i,o,a,l,this.markerDragArgument,!0),d=this.layers[r.layerIndex].markerSettings[r.markerIndex];document.getElementById(this.element.id+"_svg").style.cursor=d.enableDrag?"pointer":"grabbing";var p={name:"markerDragEnd",x:i,y:o,latitude:s.latitude,longitude:s.longitude,layerIndex:r.layerIndex,markerIndex:r.markerIndex,dataIndex:r.dataIndex};if((0,t.isNullOrUndefined)(d.latitudeValuePath)&&(0,t.isNullOrUndefined)(d.longitudeValuePath)){var h=d.dataSource[r.dataIndex];(0,t.isNullOrUndefined)(h.Longitude)||(0,t.isNullOrUndefined)(h.Latitude)?(d.dataSource[r.dataIndex].latitude=p.latitude,d.dataSource[r.dataIndex].longitude=p.longitude):(d.dataSource[r.dataIndex].Latitude=p.latitude,d.dataSource[r.dataIndex].Longitude=p.longitude)}else d.dataSource[r.dataIndex][d.latitudeValuePath]=p.latitude,d.dataSource[r.dataIndex][d.longitudeValuePath]=p.longitude;this.markerDragId="",this.markerDragArgument=null,this.trigger("markerDragEnd",p)}return this.zoomModule&&this.isDevice&&(this.zoomModule.removeToolbarOpacity(this.isTileMap?Math.round(this.tileZoomLevel):this.scale,this.element.id+"_Zooming_"),this.zoomModule.removeToolbarClass("","","","","")),!1},o.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&&!(0,t.isNullOrUndefined)(this.mapsTooltipModule)&&this.mapsTooltipModule.renderTooltip(e);var i=e.target;this.markerDragId=i.id;var o=document.getElementById(this.element.id+"_animated_tiles");if(this.isTileMap&&!(0,t.isNullOrUndefined)(o)&&(this.currentTiles=o.cloneNode(!0)),-1===i.id.indexOf("_ToolBar")){var n=this.markerModule;(i.id.indexOf("shapeIndex")>-1||i.id.indexOf("Tile")>-1)&&this.mergeCluster(),n&&(n.markerClick(e),n.markerClusterClick(e)),this.bubbleModule&&this.bubbleModule.bubbleClick(e)}this.notify(t.Browser.touchStartEvent,e)},o.prototype.mergeCluster=function(){this.markerModule&&this.markerModule.sameMarkerData.length>0&&(!this.zoomModule||this.zoomModule.isSingleClick)&&(ne(this.markerModule.sameMarkerData,this),this.markerModule.sameMarkerData=[])},o.prototype.mapsOnRightClick=function(e){var i=e.target,o=i.id,n=null,a=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);(0,t.isNullOrUndefined)(l)||(n=l.latitude,a=l.longitude);var r={cancel:!1,name:bi,target:o,x:e.clientX,y:e.clientY,latitude:n,longitude:a,isShapeSelected:!1};this.trigger("rightClick",r)}},o.prototype.mapsOnDoubleClick=function(e){this.notify("dblclick",e);var t,i=e.target,o=i.id,n=0,a=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&&(a=(t=this.getTileGeoLocation(e.layerX,e.layerY)).latitude,l=t.longitude):(n=parseFloat(i.id.split("_LayerIndex_")[1].split("_")[0]),a=(t=this.getGeoLocation(n,e.layerX,e.layerY)).latitude,l=t.longitude);var r={cancel:!1,name:vi,x:e.clientX,y:e.clientY,target:o,latitude:a,longitude:l,isShapeSelected:null};this.trigger("doubleClick",r)}},o.prototype.mouseMoveOnMap=function(e){var i;i="touchmove"===e.type?e.target:i=e.target,this.mouseMoveEvent(e),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)},o.prototype.mouseMoveEvent=function(e){var t,i,o=e.target.id;if(this.isTileMap){var n=this.getTileGeoLocation(e.layerX,e.layerY);i={x:e.clientX,y:e.clientY,latitude:n.latitude,longitude:n.longitude,target:e.target}}else{t=o.indexOf("_LayerIndex_")>-1?parseInt(o.split("_LayerIndex_")[1].split("_")[0],10):this.baseLayerIndex;n=this.getGeoLocation(t,e.clientX,e.clientY);i={x:e.clientX,y:e.clientY,latitude:n.latitude,longitude:n.longitude,target:e.target}}this.trigger(Bi,i)},o.prototype.onMouseMove=function(e){var i,o,n=e.target;this.mouseMoveId=n.id;var a=null,l=0,r=0;if(-1===e.type.indexOf("touch")?(i=e.pageX,o=e.pageY,l=e.layerX,r=e.layerY-(this.isTileMap?10:0),this.titleTooltip(e,e.pageX,e.pageY),(0,t.isNullOrUndefined)(this.legendModule)||this.legendTooltip(e,e.pageX,e.pageY,!0)):(l=i=(a=e.touches)[0].clientX,r=o=a[0].clientY-(this.isTileMap?10:0)),!(0,t.isNullOrUndefined)(this.markerDragArgument)){var s=this.markerDragArgument;this.mouseClickEvent.x=this.mouseDownEvent.x,this.mouseClickEvent.y=this.mouseDownEvent.y,this.getMarkerClickLocation(i,o,l,r,s,!1)}return this.zoomModule&&this.zoomModule.removeToolbarOpacity(this.isTileMap?Math.round(this.tileZoomLevel):this.scale,e.target.id),!1},o.prototype.legendTooltip=function(e,t,i,o){var n,a,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++)n=(a=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&&a.idIndex===parseInt(s,10)&&ot(n,this.legendSettings.textStyle.size,t,i,this.element.offsetWidth,this.element.offsetHeight,this.element.id+"_EJ2_Legend_Text_Tooltip",He(this.element.id+"_Secondary_Element"),o);l!==this.element.id+"_Legend_Text_Index_"+s&&Be(this.element.id+"_EJ2_Legend_Text_Tooltip")},o.prototype.titleTooltip=function(e,t,i,o){var n=e.target.id;n===this.element.id+"_LegendTitle"&&e.target.textContent.indexOf("...")>-1?ot(this.legendSettings.title.text,this.legendSettings.titleStyle.size,t,i,this.element.offsetWidth,this.element.offsetHeight,this.element.id+"_EJ2_LegendTitle_Tooltip",He(this.element.id+"_Secondary_Element"),o):Be(this.element.id+"_EJ2_LegendTitle_Tooltip"),n===this.element.id+"_Map_title"&&e.target.textContent.indexOf("...")>-1?ot(this.titleSettings.text,this.titleSettings.textStyle.size||this.themeStyle.titleFontSize,t,i,this.element.offsetWidth,this.element.offsetHeight,this.element.id+"_EJ2_Title_Tooltip",He(this.element.id+"_Secondary_Element"),o):Be(this.element.id+"_EJ2_Title_Tooltip")},o.prototype.mapsOnResize=function(e){var i=this;if(!this.isDestroyed&&!this.isExportInitialTileMap){this.isResize=this.isReset=!0;var o={cancel:!1,name:Si,previousSize:this.availableSize,currentSize:s(this),maps:this};this.trigger(Si,o),o.cancel||(this.resizeTo&&clearTimeout(this.resizeTo),!(0,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},o.prototype.zoomByPosition=function(e,i){if(!this.isDestroyed){this.zoomNotApplied=this.isMarkerZoomCompleted=!1;var o=this.zoomSettings.zoomFactor===i;this.previousProjection=null,!this.isTileMap&&this.zoomModule?(0,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()}},o.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)}},o.prototype.addLayer=function(e){if(!this.isDestroyed){var t=this.layers;t.push(e),this.isAddLayer=!0,this.layers=t}},o.prototype.removeLayer=function(e){if(!this.isDestroyed){var t=this.layers;t.splice(e,1),this.layers=t}},o.prototype.addMarker=function(e,i){if(!this.isDestroyed&&!(0,t.isNullOrUndefined)(this.markerModule))if((0,t.isNullOrUndefined)(e)||(0,t.isNullOrUndefined)(i)){for(var o=0;o<this.layers.length;o++){n=document.getElementById(this.element.id+"_LayerIndex_"+o);this.markerModule.zoomedMarkerCluster[o]=[],this.markerModule.initialMarkerCluster[o]=[],this.markerModule.markerRender(this,n,o,this.isTileMap?this.tileZoomLevel:this.mapLayerPanel.currentFactor,null)}this.arrangeTemplate()}else{var n=document.getElementById(this.element.id+"_LayerIndex_"+e);if(i.length>0&&n){for(var a=0,l=i;a<l.length;a++){var r=l[a];this.layersCollection[e].markerSettings.push(new pi(this,"markerSettings",r))}this.markerModule.markerRender(this,n,e,this.isTileMap?this.tileZoomLevel:this.mapLayerPanel.currentFactor,"AddMarker"),this.arrangeTemplate()}}},o.prototype.shapeSelection=function(e,i,o,n){if(!this.isDestroyed&&!(0,t.isNullOrUndefined)(this.layers[e])){var a=void 0,l=void 0,r=Array.isArray(i)?i:Array(i);(0,t.isNullOrUndefined)(n)&&(n=!0);var s=this.layers[e].selectionSettings;if(!s.enableMultiSelect&&this.legendSelection&&n&&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(!(0,t.isNullOrUndefined)(s)&&s.enable){var p=void 0,h=void 0,m=void 0,c=void 0,u=void 0,g=this.layers[e].shapeData.features;for(d=0;d<g.length;d++)for(var y=0;y<r.length;y++){var f=void 0;if((!(0,t.isNullOrUndefined)(g[d].properties[r[y]])&&isNaN(g[d].properties[r[y]])?g[d].properties[r[y]].toLowerCase():g[d].properties[r[y]])===((0,t.isNullOrUndefined)(o)||"string"!=typeof o?o:o.toLowerCase())){(0,t.isNullOrUndefined)(this.layers[e].shapeSettings.colorValuePath)||(f=we(this.layers[e].dataSource,g[d].properties,this.layers[e].shapeDataPath,this.layers[e].shapePropertyPath,this.layers[e]));var b=this.layers[e];if(this.baseLayerIndex>=0&&b.isBaseLayer?m=0:"SubLayer"===this.layers[e].type&&(m=l),a=He(this.element.id+"_LayerIndex_"+m+"_shapeIndex_"+d+"_dataIndex_"+f),(0,t.isNullOrUndefined)(f)&&(0,t.isNullOrUndefined)(a)&&(a=He(this.element.id+"_LayerIndex_"+e+"_shapeIndex_"+d+"_dataIndex_null")),h=parseInt(a.id.split("_shapeIndex_")[1].split("_")[0],10),c=this.layers[e].shapeData.features.length>h?this.layers[e].shapeData.features[h].properties:null,p=parseInt(a.id.split("_dataIndex_")[1].split("_")[0],10),u=(0,t.isNullOrUndefined)(p)?null:this.layers[e].dataSource[p],n){if($e(s,this,a,c,u),this.shapeSelectionClass=He("ShapeselectionMap"),this.legendSettings.visible&&-1===a.id.indexOf("_MarkerIndex_")&&this.legendModule.shapeHighLightAndSelection(a,u,s,"selection",e),(!this.legendSettings.visible||this.legendModule.shapeToggled)&&(a.setAttribute("class","ShapeselectionMapStyle"),-1===this.selectedElementId.indexOf(a.getAttribute("id"))&&this.selectedElementId.push(a.getAttribute("id")),!s.enableMultiSelect))return}else if(this.legendSelection=!s.enableMultiSelect&&!this.legendSelection||this.legendSelection,this.legendSettings.visible&&-1===a.id.indexOf("_MarkerIndex_")&&"ShapeselectionMapStyle"===a.getAttribute("class")&&this.legendModule.shapeHighLightAndSelection(a,u,s,"selection",e),!this.legendSettings.visible||this.legendModule.shapeToggled){et(a);var v=this.selectedElementId.indexOf(a.getAttribute("id"));-1!==v&&(this.selectedElementId.splice(v,1),!s.enableMultiSelect&&this.legendSelection&&this.selectedElementId.length>0&&this.removeShapeSelection())}}}}}},o.prototype.zoomToCoordinates=function(e,i,o,n){var a,l;if(!this.isDestroyed){this.isMarkerZoomCompleted=!1;var r=void 0,s=void 0,d=!1;this.centerPosition={latitude:null,longitude:null},this.isZoomByPosition=!1,((0,t.isNullOrUndefined)(o)&&(0,t.isNullOrUndefined)(n)||(0,t.isNullOrUndefined)(e)&&(0,t.isNullOrUndefined)(i))&&(e=(0,t.isNullOrUndefined)(e)?0:e,i=(0,t.isNullOrUndefined)(e)?0:i,o=(0,t.isNullOrUndefined)(o)?e:o,n=(0,t.isNullOrUndefined)(n)?i:n,d=!0),e>o&&(e=(a=[o,e])[0],o=a[1]),i>n&&(i=(l=[n,i])[0],n=l[1]),d?(r=e+o,s=i+n):(r=(e+o)/2,s=(i+n)/2),this.centerLatOfGivenLocation=r,this.centerLongOfGivenLocation=s,this.minLatOfGivenLocation=e,this.minLongOfGivenLocation=i,this.maxLatOfGivenLocation=o,this.maxLongOfGivenLocation=n,this.zoomNotApplied=!0,this.scaleOfGivenLocation=wt(e,o,i,n,this.mapAreaRect.width,this.mapAreaRect.height,this,!0);var p=this.getMinMaxLatitudeLongitude(),h={cancel:!1,name:"zoom",type:Ji,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},minLatitude:p.minLatitude,maxLatitude:p.maxLatitude,minLongitude:p.minLongitude,maxLongitude:p.maxLongitude};this.trigger("zoom",h),this.refresh()}},o.prototype.removeShapeSelection=function(){for(var e=this.selectedElementId.length,t=0;t<e;t++)et(Re(this.selectedElementId[0])),this.selectedElementId.splice(0,1);if(this.legendSettings.visible){var i=this.legendSelectionCollection.length;for(t=0;t<i;t++)et(Re(this.legendSelectionCollection[t].legendElement.id)),this.selectedLegendElementId.splice(0,1)}this.shapeSelectionItem=[],this.legendSelectionCollection=[]},o.prototype.setCulture=function(){this.intl=new t.Internationalization,this.setLocaleConstants(),this.localeObject=new t.L10n(this.getModuleName(),this.defaultLocalConstants,this.locale)},o.prototype.setLocaleConstants=function(){this.defaultLocalConstants={ZoomIn:"Zoom in",Zoom:"Zoom",ZoomOut:"Zoom out",Pan:"Pan",Reset:"Reset",ImageNotFound:"Image Not Found"}},o.prototype.destroy=function(){this.unWireEVents(),(0,t.isNullOrUndefined)(this.mapsTooltipModule)||this.mapsTooltipModule.removeEventListener(),(0,t.isNullOrUndefined)(this.bingMap)||this.bingMap.destroy(),e.prototype.destroy.call(this),this.shapeSelectionItem=[],this.toggledElementId=[],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.localeObject=null,this.defaultLocalConstants=null,this.intl=null,this.mapAreaRect=null,this.layersCollection=null,this.themeStyle=null,this.totalRect=null,this.baseSize=null,this.baseMapBounds=null,this.baseMapRectBounds=null,this.baseTranslatePoint=null,this.baseTileTranslatePoint=null,this.markerZoomCenterPoint=null,this.currentTiles=null,this.serverProcess=null,this.toolbarProperties=null,this.zoomLabelPositions=null,this.resizeEvent=null,this.availableSize=null,document.getElementById("mapsmeasuretext")&&document.getElementById("mapsmeasuretext").remove(),this.removeSvg(),this.svgObject=null,this.mapLayerPanel=null,this.renderer=null,this.translatePoint=null,this.tileTranslatePoint=null,this.previousPoint=null,this.dataLabelShape=[],this.zoomShapeCollection=[],this.selectedElementId=[],this.selectedMarkerElementId=[],this.selectedBubbleElementId=[],this.shapeSelectionClass=null,this.markerSelectionClass=null,this.bubbleSelectionClass=null,this.navigationSelectionClass=null,this.selectedNavigationElementId=[],this.polygonSelectionClass=null,this.selectedPolygonElementId=[],this.legendSelectionClass=null,this.previousTranslate=null,this.initialTileTranslate=null,this.markerDragArgument=null},o.prototype.getModuleName=function(){return"maps"},o.prototype.getPersistData=function(){return this.addOnPersist(["translatePoint","zoomSettings","mapScaleValue","tileTranslatePoint","baseTranslatePoint","scale","zoomPersistence","defaultState","markerZoomedState","initialCheck","initialZoomLevel","initialTileTranslate","applyZoomReset","markerZoomFactor"])},o.prototype.onPropertyChanged=function(i,o){if(!this.isDestroyed){for(var n=!1,a=!1,l=!1,r=0,s=Object.keys(i);r<s.length;r++){var d=s[r];switch(d){case"background":this.renderBorder();break;case"height":case"width":case"layers":case"projectionType":case"centerPosition":case"legendSettings":case"baseLayerIndex":if("layers"===d){l=!0;for(var p=Object.keys(i.layers).length,h=0;h<p;h++)if(!(0,t.isNullOrUndefined)(i.layers[h]))for(var m=0,c=Object.keys(i.layers[h]);m<c.length;m++){var u=c[m];(0,t.isNullOrUndefined)(this.layers[h].shapeData)&&!(0,t.isNullOrUndefined)(this.layers[h].urlTemplate)&&""!==this.layers[h].urlTemplate?this.isReset=!0:"markerSettings"===u&&(a=!0)}}n=!0;break;case"zoomSettings":(0,t.isNullOrUndefined)(o.zoomSettings)||(i.zoomSettings.zoomFactor===o.zoomSettings.zoomFactor||l?i.zoomSettings.shouldZoomInitially!==o.zoomSettings.shouldZoomInitially?(this.zoomSettings.zoomFactor=1,this.previousProjection=null,this.scale=this.isMarkerZoomCompleted?null:this.scale,this.isMarkerZoomCompleted=!i.zoomSettings.shouldZoomInitially,n=!0):i.zoomSettings.enable!==o.zoomSettings.enable?(this.zoomSettings.zoomFactor=1,n=!0):n=!0:n=!1);break;case"locale":case"currencyCode":e.prototype.refresh.call(this)}}n&&(i.layers&&a?(Be(this.element.id+"_Markers_Group"),this.isTileMap?this.mapLayerPanel.renderTileLayer(this.mapLayerPanel,this.layers.currentFactor,this.layers.length-1):this.render()):(this.createSVG(),this.renderElements()))}},o.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],name:"Bubble"}),t.highlight&&e.push({member:"Highlight",args:[this],name:"Highlight"}),t.selection&&e.push({member:"Selection",args:[this],name:"Selection"}),this.legendSettings.visible&&e.push({member:"Legend",args:[this],name:"Legend"}),(this.zoomSettings.enable||this.zoomSettings.zoomFactor>this.zoomSettings.minZoom)&&e.push({member:"Zoom",args:[this],name:"Zoom"}),this.isMarkersVisible()&&e.push({member:"Marker",args:[this],name:"Marker"}),this.isDataLabelVisible()&&e.push({member:"DataLabel",args:[this],name:"DataLabel"}),this.isNavigationVisible()&&e.push({member:"NavigationLine",args:[this],name:"NavigationLine"}),this.isPolygonVisible()&&e.push({member:"Polygon",args:[this],name:"Polygon"}),t.tooltip&&e.push({member:"MapsTooltip",args:[this],name:"MapsTooltip"}),i&&e.push({member:"Annotations",args:[this,io],name:"Annotations"}),this.allowPrint&&e.push({member:"Print",args:[this],name:"Print"}),this.allowImageExport&&e.push({member:"ImageExport",args:[this],name:"ImageExport"}),this.allowPdfExport&&e.push({member:"PdfExport",args:[this],name:"PdfExport"}),e},o.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},o.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},o.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},o.prototype.isPolygonVisible=function(){var e=!1;return Array.prototype.forEach.call(this.layers,(function(t){for(var i=0;i<t.polygonSettings.polygons.length;i++)if(t.polygonSettings.polygons.length>0){e=!0;break}})),e},o.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},o.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},o.prototype.print=function(e){this.allowPrint&&this.printModule&&!this.isDestroyed&&this.printModule.print(this,e)},o.prototype.export=function(e,i,o,n){var a=this;if(!this.isDestroyed){if((0,t.isNullOrUndefined)(n)&&(n=!0),"PDF"!==e&&this.allowImageExport&&this.imageExportModule)return new Promise((function(t){t(a.imageExportModule.export(a,e,i,n))}));if(this.allowPdfExport&&this.pdfExportModule)return new Promise((function(t){t(a.pdfExportModule.export(a,e,i,n,o))}))}return null},o.prototype.getBingUrlTemplate=function(e){var i;return this.isDestroyed||(i=new Promise((function(i){var o=new t.Fetch({url:e});o.onSuccess=function(e){var t=e.resourceSets[0].resources[0];i(t.imageUrl)},o.send()}))),i},o.prototype.findVisibleLayers=function(e,i,o,n,a,l){var r,s,d;void 0===i&&(i=!1),void 0===o&&(o=!1),void 0===n&&(n=!1),void 0===a&&(a=!1),void 0===l&&(l=!1);for(var p=0,h=e;p<h.length;p++){var m=h[p];if(i=m.visible||i,m.visible){r=m.bubbleSettings,s=m.markerSettings,d=m.polygonSettings;for(var c=0,u=m.navigationLineSettings;c<u.length;c++){var g=u[c];g.visible&&(a=!(0,t.isNullOrUndefined)(g.highlightSettings)&&g.highlightSettings.enable||a,l=!(0,t.isNullOrUndefined)(g.selectionSettings)&&g.selectionSettings.enable||l)}for(var y=0,f=d.polygons;y<f.length;y++){var b=f[y];!(0,t.isNullOrUndefined)(b.points)&&b.points.length>0&&(a=m.polygonSettings.highlightSettings.enable||a,l=m.polygonSettings.selectionSettings.enable||l,n=m.polygonSettings.tooltipSettings.visible||n)}for(var v=0,S=s;v<S.length;v++){var x=S[v];if(x.visible&&(n=x.tooltipSettings.visible||n,a=x.selectionSettings.enable||a,l=x.highlightSettings.enable||l),n)break}for(var O=0,C=r;O<C.length;O++){var _=C[O];if(_.visible&&(n=_.tooltipSettings.visible||n,a=_.selectionSettings.enable||a,l=_.highlightSettings.enable||l),n)break}n=m.tooltipSettings.visible||n,a=m.selectionSettings.enable||a,l=m.highlightSettings.enable||l}if(i&&o&&n)break}return{layer:i,bubble:o,tooltip:n,selection:a,highlight:l}},o.prototype.getGeoLocation=function(e,t,i){var o=null,n=null;if(!this.isDestroyed&&!this.isTileMap){var a=document.getElementById(this.element.id),l=this.element.getBoundingClientRect(),r=t-a.offsetLeft-(l.left-a.offsetLeft)-window.scrollX,s=i-a.offsetTop-(l.top-a.offsetTop)-window.scrollY,d=Ue(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;o=90-360*Math.atan(Math.exp(2*-u*Math.PI))/Math.PI,n=360*c}return{latitude:o,longitude:n}},o.prototype.clip=function(e,t,i){return Math.min(Math.max(e,t),i)},o.prototype.getTileGeoLocation=function(e,i){var o=null,n=null;if(this.isTileMap){var a=document.getElementById(this.element.id+"_tile_parent");if(!this.isDestroyed&&!(0,t.isNullOrUndefined)(a)){var l=this.pointToLatLong(e+this.mapAreaRect.x-a.offsetLeft,i+this.mapAreaRect.y-a.offsetTop);o=l.latitude,n=l.longitude}}return{latitude:o,longitude:n}},o.prototype.pointToLatLong=function(e,i){var o=0,n=0;if(!this.isDestroyed&&!(0,t.isNullOrUndefined)(this.translatePoint)){i=(0,t.isNullOrUndefined)(this.markerDragArgument)?i:i+10;var a=256*Math.pow(2,this.tileZoomLevel),l=this.clip(e-this.translatePoint.x*this.scale,0,a-1)/a-.5,r=.5-this.clip(i-this.translatePoint.y*this.scale,0,a-1)/a;o=90-360*Math.atan(Math.exp(2*-r*Math.PI))/Math.PI,n=360*l}return{latitude:o,longitude:n}},ao([(0,t.Property)(null)],o.prototype,"background",void 0),ao([(0,t.Property)(!1)],o.prototype,"useGroupingSeparator",void 0),ao([(0,t.Property)(null)],o.prototype,"format",void 0),ao([(0,t.Property)(null)],o.prototype,"width",void 0),ao([(0,t.Property)(null)],o.prototype,"height",void 0),ao([(0,t.Property)("MouseMove")],o.prototype,"tooltipDisplayMode",void 0),ao([(0,t.Property)(!1)],o.prototype,"allowPrint",void 0),ao([(0,t.Property)(!1)],o.prototype,"allowImageExport",void 0),ao([(0,t.Property)(!1)],o.prototype,"allowPdfExport",void 0),ao([(0,t.Complex)({},oi)],o.prototype,"titleSettings",void 0),ao([(0,t.Complex)({},ni)],o.prototype,"zoomSettings",void 0),ao([(0,t.Complex)({},li)],o.prototype,"legendSettings",void 0),ao([(0,t.Collection)([],hi)],o.prototype,"layers",void 0),ao([(0,t.Collection)([],kt)],o.prototype,"annotations",void 0),ao([(0,t.Complex)({},Dt)],o.prototype,"margin",void 0),ao([(0,t.Complex)({color:"#DDDDDD",width:0},Ut)],o.prototype,"border",void 0),ao([(0,t.Property)("Material")],o.prototype,"theme",void 0),ao([(0,t.Property)("Mercator")],o.prototype,"projectionType",void 0),ao([(0,t.Property)(0)],o.prototype,"baseLayerIndex",void 0),ao([(0,t.Property)(null)],o.prototype,"description",void 0),ao([(0,t.Property)(0)],o.prototype,"tabIndex",void 0),ao([(0,t.Complex)({latitude:null,longitude:null},jt)],o.prototype,"centerPosition",void 0),ao([(0,t.Complex)({},ci)],o.prototype,"mapsArea",void 0),ao([(0,t.Event)()],o.prototype,"load",void 0),ao([(0,t.Event)()],o.prototype,"beforePrint",void 0),ao([(0,t.Event)()],o.prototype,"loaded",void 0),ao([(0,t.Event)()],o.prototype,"click",void 0),ao([(0,t.Event)()],o.prototype,"onclick",void 0),ao([(0,t.Event)()],o.prototype,"doubleClick",void 0),ao([(0,t.Event)()],o.prototype,"rightClick",void 0),ao([(0,t.Event)()],o.prototype,"resize",void 0),ao([(0,t.Event)()],o.prototype,"tooltipRender",void 0),ao([(0,t.Event)()],o.prototype,"legendRendering",void 0),ao([(0,t.Event)()],o.prototype,"tooltipRenderComplete",void 0),ao([(0,t.Event)()],o.prototype,"shapeSelected",void 0),ao([(0,t.Event)()],o.prototype,"itemSelection",void 0),ao([(0,t.Event)()],o.prototype,"itemHighlight",void 0),ao([(0,t.Event)()],o.prototype,"shapeHighlight",void 0),ao([(0,t.Event)()],o.prototype,"layerRendering",void 0),ao([(0,t.Event)()],o.prototype,"shapeRendering",void 0),ao([(0,t.Event)()],o.prototype,"markerRendering",void 0),ao([(0,t.Event)()],o.prototype,"markerClusterRendering",void 0),ao([(0,t.Event)()],o.prototype,"markerClick",void 0),ao([(0,t.Event)()],o.prototype,"markerDragStart",void 0),ao([(0,t.Event)()],o.prototype,"markerDragEnd",void 0),ao([(0,t.Event)()],o.prototype,"markerClusterClick",void 0),ao([(0,t.Event)()],o.prototype,"markerClusterMouseMove",void 0),ao([(0,t.Event)()],o.prototype,"markerMouseMove",void 0),ao([(0,t.Event)()],o.prototype,"mouseMove",void 0),ao([(0,t.Event)()],o.prototype,"dataLabelRendering",void 0),ao([(0,t.Event)()],o.prototype,"bubbleRendering",void 0),ao([(0,t.Event)()],o.prototype,"bubbleClick",void 0),ao([(0,t.Event)()],o.prototype,"bubbleMouseMove",void 0),ao([(0,t.Event)()],o.prototype,"animationComplete",void 0),ao([(0,t.Event)()],o.prototype,"annotationRendering",void 0),ao([(0,t.Event)()],o.prototype,"zoom",void 0),ao([(0,t.Event)()],o.prototype,"pan",void 0),ao([(0,t.Event)()],o.prototype,"panComplete",void 0),ao([(0,t.Event)()],o.prototype,"zoomComplete",void 0),o=ao([t.NotifyPropertyChanges],o)}(t.Component),ro=function(){function e(e){this.id="",this.maps=e,this.bubbleCollection=[]}return e.prototype.renderBubble=function(e,i,o,n,a,l,r,s,d,p){var h,m,c=this,u=s.layerData,g=e.colorValuePath,y=(0,t.isNullOrUndefined)(g)?i[g]:g.indexOf(".")>-1?Y(i,e.colorValuePath):i[g],f=(0,t.isNullOrUndefined)(g)?Number(i[g]):g.indexOf(".")>-1?Number(Y(i,e.colorValuePath)):Number(i[g]),b=(0,t.isNullOrUndefined)(e.valuePath)?Number(i[e.valuePath]):e.valuePath.indexOf(".")>-1?Number(Y(i,e.valuePath)):Number(i[e.valuePath]);if(isNaN(b)&&isNaN(f)&&(0,t.isNullOrUndefined)(y))return null;var v=Ie(e.minRadius,e.maxRadius,b,n.min,n.max),S=new eo(this.maps).getColorByValue(e.colorMapping,f,y);m="[object Object]"!==Object.prototype.toString.call(S)||(0,t.isNullOrUndefined)(S.fill)?o:S.fill,h="[object Object]"!==Object.prototype.toString.call(S)||(0,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 w=Te(i[s.shapeDataPath],s.shapePropertyPath,P);if((!(0,t.isNullOrUndefined)(i[s.shapeDataPath])&&isNaN(i[s.shapeDataPath])?i[s.shapeDataPath].toLowerCase():i[s.shapeDataPath])===(!(0,t.isNullOrUndefined)(P[w])&&isNaN(P[w])?P[w].toLowerCase():P[w])&&"LineString"!==u[M].type&&"MultiLineString"!==u[M].type&&"Point"!==u[M].type&&"MultiPoint"!==u[M].type)if(u[M]._isMultiPolygon)for(var T=u[M],F=0;F<T.length;F++)x.push(this.getPoints(T[F],[])),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 I,k,N=this.maps.projectionType,B={color:e.border.color,opacity:e.border.opacity,width:e.border.width},A=ke(x[O],N,s.geometryType);if(e.visible){if((0,t.isNullOrUndefined)(A)){var U=x.length-1;if(!x[U].x||!x[U].y)return;k={cancel:!1,name:ji,border:B,cx:x[U].x,cy:x[U].y,data:i,fill:m,maps:this.maps,radius:v}}else I="Mercator"===this.maps.projectionType?A.y:-A.y,k={cancel:!1,name:ji,border:B,cx:A.x,cy:I,data:i,fill:m,maps:this.maps,radius:v};this.maps.trigger("bubbleRendering",k,(function(i){if(!k.cancel){var o,n;if(k.border.opacity=(0,t.isNullOrUndefined)(k.border.opacity)?h:k.border.opacity,"Circle"===e.bubbleType){var m=new z(p,k.fill,k.border,h,0,0,k.radius,null);o=me(c.maps,m,d)}else{var u="Mercator"===c.maps.projectionType?k.cy-v:k.cy+v,g=new E(p,k.fill,k.border,h,new R(0,0,2*v,2*v),2,2);k.cx-=v,k.cy=u,o=ce(c.maps,g,d)}se(c.maps.selectedBubbleElementId,c.maps.bubbleSelectionClass,o,"BubbleselectionMapStyle"),c.bubbleCollection.push({LayerIndex:r,BubbleIndex:a,DataIndex:l,element:o,center:{x:k.cx,y:k.cy}});var y=0!==s.animationDuration||"Enable"===t.animationMode||(0,t.isNullOrUndefined)(c.maps.zoomModule);n=c.maps.zoomSettings.zoomFactor>1&&!(0,t.isNullOrUndefined)(c.maps.zoomModule)&&!c.maps.isTileMap?je(c.maps,s,y):Ue(c.maps,s,y);var f=e.dataSource,b=n.scale,S=n.location,x=new Z(c.maps.isTileMap?(k.cx+c.maps.translatePoint.x)*c.maps.tileZoomLevel:(k.cx+S.x)*b,c.maps.isTileMap?(k.cy+c.maps.translatePoint.y)*c.maps.tileZoomLevel:(k.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)&&tt(o,e.animationDelay,e.animationDuration,x,c.maps,O,v)}}))}},e.prototype.getPoints=function(e,i){return(0,t.isNullOrUndefined)(e.map)?i=e.point:e.map((function(e){i.push(new _(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(!(0,t.isNullOrUndefined)(o)){var n={cancel:!1,name:Zi,data:o,maps:this.maps,target:i,x:e.clientX,y:e.clientY};this.maps.trigger(Zi,n)}}},e.prototype.getbubble=function(e){var t=e.split("_LayerIndex_"),i=parseInt(t[1].split("_")[0],10);if(e.indexOf("_BubbleIndex_")>-1){var o=this.maps.layers[i],n=parseInt(t[1].split("_BubbleIndex_")[1],10),a=parseInt(t[1].split("_BubbleIndex_")[1].split("_dataIndex_")[1],10);if(!isNaN(n))return o.bubbleSettings[n].dataSource[a]}return null},e.prototype.bubbleMove=function(e){var i=e.target.id;if(-1!==i.indexOf("_LayerIndex_")){var o=this.getbubble(i);if(!(0,t.isNullOrUndefined)(o)){var n={cancel:!1,name:Ri,data:o,maps:this.maps,target:i,x:e.clientX,y:e.clientY};this.maps.trigger(Ri,n)}}},e.prototype.getModuleName=function(){return"Bubble"},e.prototype.destroy=function(){this.bubbleCollection=[],this.maps=null},e}(),so=function(){function e(e){this.maps=e,this.sameMarkerData=[],this.initialMarkerCluster=[],this.zoomedMarkerCluster=[]}return e.prototype.getMapsInstance=function(){return this.maps},e.prototype.markerRender=function(e,i,o,n,a){var l=this,r=0,s=0,d=!1,p=0;e.translateType="marker";var h=e.layersCollection[o],m=i.querySelectorAll("#"+e.element.id+"_Markers_Group");m.length>0?(this.markerSVGObject=m[0],this.markerSVGObject.innerHTML="",d=!0):this.markerSVGObject=e.renderer.createGroup({id:e.element.id+"_Markers_Group",class:"GroupElement"}),this.markerSVGObject.style.pointerEvents="auto";var u,y=Re(e.element.id+"_Secondary_Element").querySelectorAll("#"+e.element.id+"_LayerIndex_"+o+"_Markers_Template_Group");y&&y.length>0&&y[0].childElementCount>0?((u=Re(e.element.id+"_LayerIndex_"+o+"_Markers_Template_Group")).innerHTML="",d=!0):(u=(0,t.createElement)("div",{id:e.element.id+"_LayerIndex_"+o+"_Markers_Template_Group",className:e.element.id+"_template"})).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;";var f,b=this.allowInnerClusterSetting(h),v=0!==h.animationDuration||"Enable"===t.animationMode||(0,t.isNullOrUndefined)(e.zoomModule);e.isTileMap||(f=!(0,t.isNullOrUndefined)(e.zoomModule)&&e.zoomSettings.zoomFactor>1?je(e,h,v):Ue(e,h,v)),Array.prototype.forEach.call(h.markerSettings,(function(y,v){var S=y.dataSource;r=0,(0,t.isNullOrUndefined)(y.dataSource)||Array.prototype.forEach.call(S,(function(x,O){e.markerNullCount=v>0&&0===O?0:e.markerNullCount;var C={cancel:!1,name:Ti,fill:y.fill,height:(0,t.isNullOrUndefined)(y.heightValuePath)||(0,t.isNullOrUndefined)(x[y.heightValuePath])?y.height:x[y.heightValuePath],width:(0,t.isNullOrUndefined)(y.widthValuePath)||(0,t.isNullOrUndefined)(x[y.widthValuePath])?y.width:x[y.widthValuePath],imageUrl:y.imageUrl,shape:y.shape,template:y.template,data:x,maps:e,marker:y,border:y.border,colorValuePath:y.colorValuePath,shapeValuePath:y.shapeValuePath,imageUrlValuePath:y.imageUrlValuePath};e.trigger("markerRendering",C,(function(_){C=Q(C=J(C,x),x);var M=(0,t.isNullOrUndefined)(y.longitudeValuePath)?(0,t.isNullOrUndefined)(x.longitude)?(0,t.isNullOrUndefined)(x.Longitude)?null:parseFloat(x.Longitude):parseFloat(x.longitude):Number(Y(x,y.longitudeValuePath)),L=(0,t.isNullOrUndefined)(y.latitudeValuePath)?(0,t.isNullOrUndefined)(x.latitude)?(0,t.isNullOrUndefined)(x.Latitude)?null:parseFloat(x.Latitude):parseFloat(x.latitude):Number(Y(x,y.latitudeValuePath)),P=y.offset;if(!C.cancel&&y.visible&&!(0,t.isNullOrUndefined)(M)&&!(0,t.isNullOrUndefined)(L)){var w=e.element.id+"_LayerIndex_"+o+"_MarkerIndex_"+v+"_dataIndex_"+O,T=e.isTileMap?g(new Z(M,L),n,e.tileTranslatePoint,!0):c(L,M,n,h,e);e.isTileMap&&(f="SubLayer"===h.type&&(0,t.isNullOrUndefined)(e.zoomModule)?T=g(new Z(M,L),e.tileZoomLevel,e.tileTranslatePoint,!0):new Object);var F="AddMarker"===a?e.scale:f.scale,I="AddMarker"===a?e.translatePoint:f.location;!C.template||isNaN(T.x)||isNaN(T.y)?C.template||isNaN(T.x)||isNaN(T.y)||(d=!0,r++,le(C,y,S,O,T,I,w,P,F,e,l.markerSVGObject)):(d=!1,p++,re(C,undefined,w,x,v,u,T,I,F,P,e),e.renderReactTemplates())}s+=isNaN(L)||isNaN(M)?1:0,p+=C.cancel?1:0,r+=C.cancel?1:0,e.markerNullCount=(0,t.isNullOrUndefined)(M)||(0,t.isNullOrUndefined)(L)?e.markerNullCount+1:e.markerNullCount;var k=S.length-e.markerNullCount,N=!1,E=y.clusterSettings.allowClustering||h.markerClusterSettings.allowClustering&&h.markerSettings.length>1?l.markerSVGObject.querySelectorAll("[id*='LayerIndex_"+o+"_MarkerIndex_"+v+"']:not([id*='_Group'])"):l.markerSVGObject.childNodes,z=l.markerSVGObject.childNodes===E?p:0;(E.length===k-z-s&&"Template"!==a&&(0===m.length&&i.appendChild(l.markerSVGObject),(y.clusterSettings.allowClustering||!b&&h.markerClusterSettings.allowClustering)&&(0===m.length&&(e.svgObject.appendChild(l.markerSVGObject),e.element.appendChild(e.svgObject)),-1!==h.urlTemplate.indexOf("openstreetmap")&&(0,t.isNullOrUndefined)(h.shapeData)&&e.zoomSettings.enable?(N=te(h,l.markerSVGObject,e,o,v,l.markerSVGObject,i,!0,!1,null,b),0===m.length&&i.appendChild(l.markerSVGObject)):N=te(h,l.markerSVGObject,e,o,v,l.markerSVGObject,i,!0,!1,f,b),e.renderReactTemplates())),(y.clusterSettings.allowClustering||h.markerClusterSettings.allowClustering&&h.markerSettings.length>1?u.querySelectorAll("[id*='LayerIndex_"+o+"_MarkerIndex_"+v+"']:not([id*='_Group'])"):u.childNodes).length===k-r-s&&Re(e.element.id+"_Secondary_Element"))&&(d||Re(e.element.id+"_Secondary_Element").appendChild(u),e.checkInitialRender&&(y.clusterSettings.allowClustering||!b&&h.markerClusterSettings.allowClustering)&&!N&&(te(h,u,e,o,v,l.markerSVGObject,i,!1,!1,f,b),e.renderReactTemplates()),h.markerClusterSettings.allowClustering&&m.length>0&&Re(e.element.id+"_Layer_Collections").appendChild(i))}))}))}))},e.prototype.calculateIndividualLayerMarkerZoomLevel=function(e,t,i){var o,n,a=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/a)))>i?i:o,n=(n=Math.floor(Math.log(e/l)))>i?i:n;var r=Math.min(o,n),s=Math.min(r,i-1);return this.maps.isTileMap||Pt(s,this.maps),s},e.prototype.calculateZoomCenterPositionAndFactor=function(e){if(!(0,t.isNullOrUndefined)(this.maps))if(this.maps.zoomSettings.shouldZoomInitially&&this.maps.markerModule){var i,o,n,a,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:(0,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;!(0,t.isNullOrUndefined)(l)&&l.length>0&&Array.prototype.forEach.call(l,(function(e,l){var r=(0,t.isNullOrUndefined)(e.latitude)?(0,t.isNullOrUndefined)(e.Latitude)?null:parseFloat(e.Latitude):parseFloat(e.latitude),s=(0,t.isNullOrUndefined)(e.longitude)?(0,t.isNullOrUndefined)(e.Longitude)?null:parseFloat(e.Longitude):parseFloat(e.longitude);(0,t.isNullOrUndefined)(r)||(0,t.isNullOrUndefined)(s)||(i=(0,t.isNullOrUndefined)(i)&&0===l?s:i,o=(0,t.isNullOrUndefined)(o)&&0===l?r:o,n=(0,t.isNullOrUndefined)(n)&&0===l?r:n,a=(0,t.isNullOrUndefined)(a)&&0===l?s:a,i>s&&(i=s),n>r&&(n=r),a<s&&(a=s),o<r&&(o=r))}))}))})),!((0,t.isNullOrUndefined)(n)||(0,t.isNullOrUndefined)(i)||(0,t.isNullOrUndefined)(a)||(0,t.isNullOrUndefined)(o))){r=(n+o)/2,s=(i+a)/2,this.maps.markerCenterLatitude=r,this.maps.markerCenterLongitude=s,((0,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=wt(n,o,i,a,p,h,this.maps,!1),this.maps.isTileMap?m=(0,t.isNullOrUndefined)(this.maps.markerZoomFactor)||(0,t.isNullOrUndefined)(this.maps.mapScaleValue)?l:this.maps.mapScaleValue>1&&1!==this.maps.markerZoomFactor?this.maps.mapScaleValue:l:(m=(0,t.isNullOrUndefined)(this.maps.mapScaleValue)?l:1!==Math.floor(this.maps.scale)&&this.maps.mapScaleValue!==l&&(0,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=(0,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||(0,t.isNullOrUndefined)(this.maps.tileTranslatePoint)||(this.maps.tileTranslatePoint.x=0,this.maps.tileTranslatePoint.y=0))},e.prototype.markerClick=function(e){var i=e.target.id;if(-1===i.indexOf(this.maps.element.id)){var o=e.target.closest("."+this.maps.element.id+"_marker_template_element");!(0,t.isNullOrUndefined)(o)&&o.id.indexOf("_MarkerIndex_")>-1&&(i=o.id)}if(!(-1===i.indexOf("_LayerIndex_")||i.indexOf("_cluster_")>0)){var n=this.getMarker(i);if(!(0,t.isNullOrUndefined)(n)){n.marker.enableDrag&&(document.getElementById(this.maps.element.id+"_svg").style.cursor="grabbing");var a={cancel:!1,name:Ii,data:n.data,maps:this.maps,marker:n.marker,target:i,x:e.clientX,y:e.clientY,latitude:n.data.latitude||n.data.Latitude,longitude:n.data.longitude||n.data.Longitude,value:n.data.name};if(this.maps.trigger(Ii,a),n.marker.enableDrag){var l=!1,r=parseInt(i.split("_LayerIndex_")[1].split("_")[0],10),s=parseInt(i.split("_MarkerIndex_")[1].split("_")[0],10),d=parseInt(i.split("_dataIndex_")[1].split("_")[0],10),p=this.maps.layers[r].markerSettings[s];if(this.sameMarkerData.length>0&&(l=this.sameMarkerData[0].data.filter((function(e){return e.index===d})).length>0&&this.sameMarkerData[0].layerIndex===r&&this.sameMarkerData[0].markerIndex===s),!l){var h={name:ki,x:e.clientX,y:e.clientY,latitude:n.data.latitude||n.data.Latitude,longitude:n.data.longitude||n.data.Longitude,layerIndex:r,markerIndex:s,dataIndex:d};this.maps.trigger(ki,h),this.maps.markerDragArgument={targetId:i,x:e.clientX,y:e.clientY,latitude:n.data.latitude||n.data.Latitude,longitude:n.data.longitude||n.data.Longitude,shape:(0,t.isNullOrUndefined)(p.shapeValuePath)?p.shape:p.dataSource[d][p.shapeValuePath],layerIndex:r,markerIndex:s,dataIndex:d}}}}}},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(!(0,t.isNullOrUndefined)(o)){o.clusterCollection.length>0&&this.maps.markerClusterExpand&&(He(this.maps.element.id+"_mapsTooltip")&&this.maps.mapsTooltipModule.tooltipTargetID.indexOf("_MarkerIndex_")>-1&&Be(this.maps.element.id+"_mapsTooltip"),this.sameMarkerData.length>0&&!this.maps.markerClusterExpandCheck?(this.maps.markerClusterExpandCheck=!0,ne(this.sameMarkerData,this.maps)):(this.sameMarkerData=o.clusterCollection,this.maps.markerClusterExpandCheck=!1,ae(this.sameMarkerData,this.maps,this.markerSVGObject,!0)));var n={cancel:!1,name:Ei,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(Ei,n)}}},e.prototype.getMarker=function(e){var t,i,o=e.split("_LayerIndex_"),n=parseInt(o[1].split("_")[0],10),a=this.maps.layers[n],l=[],r=[];if(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);i=a.markerSettings[s];var p=this.allowInnerClusterSetting(a);if(this.maps.markerClusterExpand=!p&&a.markerClusterSettings.allowClustering?a.markerClusterSettings.allowClusterExpand:i.clusterSettings.allowClusterExpand,!isNaN(s)){t=i.dataSource[d];var h=[];if(!i.template&&e.indexOf("_cluster_")>-1&&this.maps.markerClusterExpand&&Array.prototype.forEach.call(i.dataSource,(function(e,i){e.latitude===t.latitude&&e.longitude===t.longitude&&h.push({data:t,index:i})})),e.indexOf("_cluster_")>-1){var m=!p&&a.markerClusterSettings.allowClustering?a.markerClusterSettings:a.markerSettings[s].clusterSettings,c=document.getElementById(e.indexOf("_datalabel_")>-1?"Balloon"===m.shape?e.split("_datalabel_")[0]+"_Group":e.split("_datalabel_")[0]:"Balloon"===m.shape?e+"_Group":e),u="Balloon"===m.shape?c.children[0].textContent.split(",").map(Number):c.textContent.split(",").map(Number);h=[];for(var g=0,y=u;g<y.length;g++){var f=y[g];h.push({data:i.dataSource[f],index:f}),l.push(i.dataSource[f])}r.push({data:h,layerIndex:n,markerIndex:s,dataIndex:d,targetClusterIndex:+(e.split("_cluster_")[1].indexOf("_datalabel_")>-1?e.split("_cluster_")[1].split("_datalabel_")[0]:e.split("_cluster_")[1]),isClusterSame:false})}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(!(0,t.isNullOrUndefined)(o)){o.marker.enableDrag&&(document.getElementById(this.maps.element.id+"_svg").style.cursor=(0,t.isNullOrUndefined)(this.maps.markerDragArgument)?"pointer":"grabbing");var n={cancel:!1,name:zi,data:o.data,maps:this.maps,target:i,x:e.clientX,y:e.clientY};this.maps.trigger(zi,n)}}},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"),!(0,t.isNullOrUndefined)(o)){var n={cancel:!1,name:Ai,data:o.data,maps:this.maps,target:i,x:e.clientX,y:e.clientY};this.maps.trigger(Ai,n)}}},e.prototype.allowInnerClusterSetting=function(e){for(var t=!1,i=0;i<e.markerSettings.length;i++)if(e.markerSettings[i].clusterSettings.allowClustering){t=!0;break}return t},e.prototype.initializeMarkerClusterList=function(){for(var e=0;e<this.maps.layers.length;e++)this.initialMarkerCluster[e]=[],this.zoomedMarkerCluster[e]=[]},e.prototype.getModuleName=function(){return"Marker"},e.prototype.destroy=function(){this.maps=null,this.markerSVGObject=null,this.sameMarkerData=[],this.initialMarkerCluster=[],this.zoomedMarkerCluster=[]},e}(),po=function(){function e(e){}return e.prototype.polygonRender=function(e,i,o){var n=e.layersCollection[i],a=e.renderer.createGroup({id:e.element.id+"_LayerIndex_"+i+"_Polygons_Group"});return n.polygonSettings.polygons.map((function(l,r){var s=e.renderer.createGroup({id:e.element.id+"_LayerIndex_"+i+"_Polygons_Group_"+r}),d=l.points;if(!(0,t.isNullOrUndefined)(l.points)&&l.points.length>0){var p=u(e,o,n,d),h=new k(e.element.id+"_LayerIndex_"+i+"_PolygonIndex_"+r,l.fill,l.borderWidth/o,l.borderColor,l.opacity,l.borderOpacity,"",p),m=e.renderer.drawPath(h);se(e.selectedPolygonElementId,e.polygonSelectionClass,m,"PolygonselectionMapStyle"),s.appendChild(m),a.appendChild(s)}})),a},e.prototype.getModuleName=function(){return"Polygon"},e.prototype.destroy=function(){},e}(),ho=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,n){for(var a,l=0;l<((0,t.isNullOrUndefined)(e)?0:e.length);l++){var r=e[l],s=!(0,t.isNullOrUndefined)(r[n])&&isNaN(r[n])&&"string"==typeof r[n]?r[n].toLowerCase():r[n];if(o=(0,t.isNullOrUndefined)(o)||"string"!=typeof o?o:o.toString(),s===((0,t.isNullOrUndefined)(o)||"string"!=typeof o?o:o.toLowerCase())){a=r;break}}return a},e.prototype.renderLabel=function(e,i,o,n,a,l,r,s){var d,p,h,m,c,u,g,y,f,b=this,v=e.dataLabelSettings,S=e.dataLabelSettings.textStyle,x=e.dataLabelSettings,O=e.dataLabelSettings.labelPath,C=[[]],M=0,L=0,P=o,w="",T=0,k=!1,N=o.properties,z=this.maps.element.id+"_LayerIndex_"+i+"_shapeIndex_"+r+"_LabelIndex_"+r,B=new _(0,0),A=n[r];S.fontFamily="material"!==this.maps.theme.toLowerCase()?this.maps.themeStyle.labelFontFamily:S.fontFamily,S.fontWeight=S.fontWeight||this.maps.themeStyle.fontWeight,S.size=S.size||this.maps.themeStyle.fontSize,o=(0,t.isNullOrUndefined)(A)?null:A.property;var U,j,Z="[object Array]"===Object.prototype.toString.call(e.shapePropertyPath)?e.shapePropertyPath:[e.shapePropertyPath],D=0!==e.animationDuration||"Enable"===t.animationMode||(0,t.isNullOrUndefined)(this.maps.zoomModule),G=this.maps.isTileMap?new Object:this.maps.zoomSettings.zoomFactor>1&&!(0,t.isNullOrUndefined)(this.maps.zoomModule)?je(this.maps,e,D):Ue(this.maps,e,D),H=this.maps.isTileMap?this.maps.scale:G.scale,W=this.maps.isTileMap?this.maps.translatePoint:G.location,X=this.maps.zoomTranslatePoint,Y=(0,t.isNullOrUndefined)(this.maps.scale)?1:Math.floor(this.maps.scale),J=this.maps.zoomSettings.enable?!(0,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<Z.length&&!(N[Z[Q]]&&(U=Z[Q],c=this.getDataLabel(e.dataSource,e.shapeDataPath,P.properties[U],e.shapeDataPath)));Q++);if(c=this.getDataLabel(e.dataSource,e.shapeDataPath,P.properties[U],e.shapeDataPath),!(0,t.isNullOrUndefined)(A)&&!(0,t.isNullOrUndefined)(A.property))if(C=[[]],n[r]._isMultiPolygon||"Point"===n[r].type||"MultiPoint"===n[r].type){if("Point"!==n[r].type&&"MultiPoint"!==n[r].type){var K=n[r];for(Q=0;Q<K.length;Q++)C.push(this.getPoint(K[Q],[])),L<(T=C[C.length-1].length)&&(L=T,M=C.length-1)}}else C.push(this.getPoint(n[r],[])),L<(T=C[C.length-1].length)&&(L=T,M=C.length-1);if(w=(0,t.isNullOrUndefined)(c)?P.properties[O]:(0,t.isNullOrUndefined)(c[O])?P.properties[O]||c[e.shapeDataPath]:c[O].toString(),"[object Array]"===Object.prototype.toString.call(e.shapePropertyPath)&&(0,t.isNullOrUndefined)(w)&&!(0,t.isNullOrUndefined)(e.dataSource)&&0===e.dataSource.length)for(var $=0;$<e.shapePropertyPath.length;$++)if(P.properties[e.shapePropertyPath[$]]){w=P.properties[e.shapePropertyPath[$]];break}(0,t.isNullOrUndefined)(w)&&""!==e.dataLabelSettings.template&&0===e.dataSource.length&&(w=P.properties[e.shapePropertyPath]),(0,t.isNullOrUndefined)(w)&&!(0,t.isNullOrUndefined)(e.dataSource)&&e.dataSource.length>0&&(w="");var ee=w,te=this.maps.projectionType,ie=g=ke(C[M],te,e.geometryType);if(!(0,t.isNullOrUndefined)(w)&&!(0,t.isNullOrUndefined)(g)){if(J&&Y>1&&!this.maps.zoomNotApplied&&""===v.template){if(i>0)for(var oe=0;oe<this.maps.zoomLabelPositions.length;oe++)if(this.maps.zoomLabelPositions[oe].dataLabelText===w){u=r,r=oe,k=!0;break}y=g.x,f=g.y,g.x=(g.x+X.x)*H,g.y=(g.y+X.y)*H}g.y="Mercator"===this.maps.projectionType||"Normal"===e.geometryType?g.y:-g.y,(0,t.isNullOrUndefined)(this.maps.format)||isNaN(Number(w))||isNaN(parseFloat(w))||this.maps.useGroupingSeparator&&(w=Ve(this.maps,parseFloat(w)),(0,t.isNullOrUndefined)(c)||(c[O]=w));var ne={name:Ui,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:w,offsetX:0,offsetY:0};this.maps.trigger("dataLabelRendering",ne,(function(o){if(!ne.cancel){var n,v=J&&Y>1&&!b.maps.zoomNotApplied&&b.maps.zoomShapeCollection.length>r?b.maps.dataLabelShape[r]*H:(g.rightMax.x-g.leftMax.x)*H;(0,t.isNullOrUndefined)(b.maps.dataLabelShape)||b.maps.isReset||(j=ie.rightMax.x-ie.leftMax.x,b.maps.dataLabelShape.push(j)),ne.text===w||ne.cancel||(w=ne.text);var O=F(w,S),_=w,L=O,T=g.y-O.height/2,N=g.y+O.height/2,A=(g.y+W.y)*H-O.height/2,U=(g.y+W.y)*H+O.height/2;if((n=Fe(C[M],T,N)).length>5&&"MultiPolygon"!==P.geometry.type&&"MultiPolygon"!==P.type){var Z=ke(n,te,e.geometryType);J&&Y>1&&!b.maps.zoomNotApplied&&""===ne.template&&(Z.x=(b.maps.zoomLabelPositions[r].location.x+X.x)*H,Z.y=(b.maps.zoomLabelPositions[r].location.y+X.y)*H),y=Z.x,g.x=Z.x,v=J&&Y>1&&!b.maps.zoomNotApplied&&b.maps.zoomShapeCollection.length>r?b.maps.dataLabelShape[r]*H:(Z.rightMax.x-Z.leftMax.x)*H>0?(Z.rightMax.x-Z.leftMax.x)*H:v}var D,G=(g.x+W.x)*H+O.width/2,Q=(g.x+W.x)*H-O.width/2;if(b.value[r]={rightWidth:G,leftWidth:Q,heightTop:A,heightBottom:U},""!==ne.template){var K=(d=Ge(ne.template,b.maps))?d((0,t.isNullOrUndefined)(c)?P.properties:c,b.maps,ne.template,b.maps.element.id+"_LabelTemplate",!1):document.createElement("div");K.innerHTML=d?"":ne.template,D=q(K,z,(0,t.isNullOrUndefined)(c)?P.properties:c),b.maps.isTileMap?(D.style.left=(g.x+W.x)*H-O.width/2+"px",D.style.top=(g.y+W.y)*H-O.height+"px"):(D.style.left=Math.abs(b.maps.baseMapRectBounds.min.x-g.x)*H+o.offsetX+"px",D.style.top=Math.abs(b.maps.baseMapRectBounds.min.y-g.y)*H+o.offsetY+"px"),l.appendChild(D)}else{var $=(0,t.isNullOrUndefined)(x.smartLabelMode)?"None":x.smartLabelMode.toString();if("Trim"===$)L=F(_=Ee(v,"number"==typeof w?w.toString():w,S,null,!0),S),p=new I(z,B.x,B.y,"middle",_,"","");"None"===$&&(p=new I(z,B.x,B.y,"middle",w,"","")),"Hide"===$&&(w=v>=O.width?w:"",p=new I(z,B.x,B.y,"middle",w,"","")),(0,t.isNullOrUndefined)(p)||(w=p.text);var oe=(0,t.isNullOrUndefined)(x.intersectionAction)?"None":x.intersectionAction.toString();if("Hide"===oe){for(var ae=0;ae<s.length;ae++)if(!(0,t.isNullOrUndefined)(s[ae])&&!(b.value[r].leftWidth>s[ae].rightWidth||b.value[r].rightWidth<s[ae].leftWidth||b.value[r].heightTop>s[ae].heightBottom||b.value[r].heightBottom<s[ae].heightTop)){w="";break}s.push(b.value[r]),p=new I(z,B.x,B.y,"middle",w,"","")}if("Trim"===oe){for(var le=0;le<s.length;le++)if(!(0,t.isNullOrUndefined)(s[le]))if(s[le].rightWidth<b.value[r].leftWidth||s[le].leftWidth>b.value[r].rightWidth||s[le].heightBottom<b.value[r].heightTop||s[le].heightTop>b.value[r].heightBottom)_=w;else{if(b.value[r].leftWidth>s[le].leftWidth){_=Ee((v=s[le].rightWidth-b.value[r].leftWidth)-(b.value[r].rightWidth-b.value[r].leftWidth),w,S,null,!0);break}if(b.value[r].leftWidth<s[le].leftWidth){v=b.value[r].rightWidth-s[le].leftWidth,_=Ee(Math.abs(v-(b.value[r].rightWidth-b.value[r].leftWidth)),w,S,null,!0);break}}L=F(_,S),s.push(b.value[r]),p=new I(z,B.x,B.y,"middle",_,"","")}if("None"===oe&&(p=new I(z,B.x,B.y,"middle",w,"","")),_.length>1){var re=ne.border;if(re.width>1){var se=ne.fill,de=x.opacity,pe=x.rx,he=x.ry,me=void 0,ce=void 0;J&&Y>1&&!b.maps.zoomNotApplied?(me=g.x-O.width/2,ce=g.y-O.height/2-5):(me=(g.x+W.x)*H-O.width/2,ce=(g.y+W.y)*H-O.height/2),re.opacity=(0,t.isNullOrUndefined)(re.opacity)?de:re.opacity;var ue=new E(b.maps.element.id+"_LayerIndex_"+i+"_shapeIndex_"+r+"_rectIndex_"+r,se,re,de,new R(me+o.offsetX,ce+o.offsetY,O.width,O.height),pe,he);(m=b.maps.renderer.drawRectangle(ue)).setAttribute("visibility",e.dataLabelSettings.animationDuration>0||"Enable"===t.animationMode?"hidden":"visibile"),a.appendChild(m)}}(h=V(p,S,S.color||b.maps.themeStyle.dataLabelFontColor,a)).setAttribute("aria-label",w),h.setAttribute("role","region"),h.setAttribute("visibility",e.dataLabelSettings.animationDuration>0||"Enable"===t.animationMode?"hidden":"visibile"),J&&Y>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+W.x)*H+o.offsetX)+" "+((g.y+W.y)*H+L.height/2+o.offsetY)+" )"),a.appendChild(h)}b.dataLabelCollections.push({location:{x:g.x+o.offsetX,y:g.y+o.offsetY},element:(0,t.isNullOrUndefined)(D)?h:D,layerIndex:i,shapeIndex:k?u:r,labelIndex:k?u:r,dataLabelText:ee}),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)&&((0,t.isNullOrUndefined)(h)||(b.datalabelAnimate(h,x.animationDuration,S.opacity,!1),(0,t.isNullOrUndefined)(m)||b.datalabelAnimate(m,x.animationDuration,x.opacity,!0)))}}))}},e.prototype.datalabelAnimate=function(e,i,o,n){var a=0;new t.Animation({}).animate(e,{duration:0===i&&"Enable"===t.animationMode?1e3:i,delay:0,progress:function(t){t.timeStamp>t.delay&&(a=(t.timeStamp-t.delay)/t.duration,e.setAttribute("style","user-select: none; visibility: visible;"),e.setAttribute(n?"fill-opacity":"opacity",(o*a).toString()))},end:function(){e.style.visibility="visible",e.setAttribute(n?"fill-opacity":"opacity",o.toString())}})},e.prototype.getPoint=function(e,t){return"MultiLineString"===e.type?Array.prototype.forEach.call(e,(function(e){Array.prototype.forEach.call(e,(function(e){t.push(new _(e.point.x,e.point.y))}))})):Array.prototype.forEach.call(e,(function(e){t.push(new _(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}(),mo=function(){function e(e){this.maps=e}return e.prototype.renderNavigation=function(e,i,o){var n;if(!(0,t.isNullOrUndefined)(this.maps)){var a=void 0,l=e.navigationLineSettings,r=void 0,s=[],d=void 0,p=void 0,h=void 0,m=void 0,u=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,M=void 0,L=void 0,P=void 0,w=void 0,T=void 0,F=void 0;n=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].latitude,r=l[I].longitude,p=!(0,t.isNullOrUndefined)(l[I].visible)&&l[I].visible,h=(0,t.isNullOrUndefined)(l[I].angle)?0:l[I].angle,m=l[I].width||1,u=l[I].color,y=l[I].dashArray,O=l[I].arrowSettings,v=!(0,t.isNullOrUndefined)(O)&&O.showArrow,!(0,t.isNullOrUndefined)(r)&&!(0,t.isNullOrUndefined)(d)&&r.length===d.length&&p)for(var N=0;N<r.length;N++){var E=this.maps.isTileMap?g(new _(r[N],d[N]),i,this.maps.tileTranslatePoint,!0):c(d[N],r[N],i,e,this.maps);s.push(E)}T=this.maps.renderer.createGroup({id:this.maps.element.id+"_LayerIndex_"+o+"_NavigationGroup"+I});for(var z=0;z<s.length-1;z++){h=1<(h=-1>h?-1:h)?1:h;var B=this.maps.element.id+"_LayerIndex_"+o+"_NavigationIndex_"+I+"_Line"+z,A=this.convertRadius(s[z],s[z+1]);if(h<=1&&h>0&&(b=0,s[z].x>s[z+1].x&&(b=1)),h>=-1&&h<0&&(b=1,s[z].x>s[z+1].x&&(b=0)),v){S=O.color,x=(0,t.isNullOrUndefined)(O.size)?0:O.size,w=(0,t.isNullOrUndefined)(O.offSet)?0:O.offSet;var U=Math.round(x/2);M="Start"===(C=O.position)?"url(#triangle"+I+")":null,L="End"===C?"url(#triangle"+I+")":null,0!==P&&0===h&&(P="Start"===C?w:-w),P=(0,t.isNullOrUndefined)(P)?0:P;var j=this.maps.element.id+"_triangle",Z=this.maps.renderer.createDefs();Z.innerHTML+='<marker id="triangle'+I+'"></marker>';var R=Z.querySelector("#triangle"+I);R.setAttribute("markerWidth",x.toString()),R.setAttribute("markerHeight",x.toString()),R.setAttribute("refX",(U-P).toString()),R.setAttribute("refY",U.toString()),R.setAttribute("orient","auto"),f=new k(j,S,m,u,1,1,y,"M 0,0 L 0,"+x+" L "+U+", "+U+" Z"),a=this.maps.renderer.drawPath(f),R.appendChild(a),Z.appendChild(R),T.appendChild(Z)}if(F=0===(h=Math.abs(h))?"M "+s[z].x+","+s[z].y+"L "+s[z+1].x+","+s[z+1].y+" ":"M "+s[z].x+","+s[z].y+" A "+(A/2+(1-h)*A/(10*h))+" "+(A/2+(1-h)*A/(10*h))+" 0,0,"+b+" , "+s[z+1].x+","+s[z+1].y+" ",f=new k(B,"none",m,u,1,1,y,F),a=this.maps.renderer.drawPath(f),!(0,t.isNullOrUndefined)(C))"Start"===C?a.setAttribute("marker-start",M):a.setAttribute("marker-end",L);se(this.maps.selectedNavigationElementId,this.maps.navigationSelectionClass,a,"navigationlineselectionMapStyle"),T.appendChild(a),n.appendChild(T)}s=[]}}return n},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}(),co=function(){function e(e){this.legendBorderRect=new R(0,0,0,0),this.initialMapAreaRect=new R(0,0,0,0),this.legendTotalRect=new R(0,0,0,0),this.totalPages=[],this.page=0,this.currentPage=0,this.legendItemRect=new R(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,n){if(!(0,t.isNullOrUndefined)(i.shapeData)){var a=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(n,a,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(n,a,p,s,l,d,r))}}"Markers"===o.type&&e.getMarkersLegendCollections(n,i.markerSettings)})),this.legendCollection.length>0)for(var l=0;l<this.legendCollection.length;l++){var r=this.legendCollection[l],s={name:Vi,cancel:!1,fill:r.fill,shape:o.shape,shapeBorder:o.shapeBorder,text:"number"==typeof r.text?r.text.toString():r.text};i.trigger("legendRendering",s),r.fill=s.fill,r.shape=s.shape,r.shapeBorder=s.shapeBorder,r.text=s.text,s.cancel&&(this.legendCollection.splice(l,1),l--)}var d=i.legendSettings.title.text,p=i.legendSettings.titleStyle;if(this.legendCollection.length>0){var h,m,c=o.mode,u=0,g=0,y=0,f=0,b=o.shapePadding,v=o.shapeHeight,S=o.shapeWidth,x=[],O=[],C=o.position,_=o.labelDisplayMode,M="None"===o.orientation?"Top"===C||"Bottom"===C?"Horizontal":"Vertical":o.orientation,L=o.width.length>1?o.width.indexOf("%")>-1?i.availableSize.width/100*parseInt(o.width,10):parseInt(o.width,10):null,P=o.height.length>1?o.height.indexOf("%")>-1?i.availableSize.height/100*parseInt(o.height,10):parseInt(o.height,10):null,w=0,F=0,I=T(d,p);if("Interactive"===c){var k=o.textStyle,N=this.legendCollection.length,E="Horizontal"===M?(0,t.isNullOrUndefined)(L)?i.mapAreaRect.width/N:L/N:(0,t.isNullOrUndefined)(L)?25:L,z="Horizontal"===M?(0,t.isNullOrUndefined)(P)?25:P:(0,t.isNullOrUndefined)(P)?i.mapAreaRect.height/N:P/N;w=0,F=I.height+10;var B=o.labelPosition,A=0,U=0,j=10,Z=0,D=0,V=0,G=0;for(l=0;l<this.legendCollection.length;l++){w="Horizontal"===M?w+E:w,F="Horizontal"===M?F:F+z;var H=this.legendCollection[l].text,W=new n(0,0);if("None"===_?W=T(H,k):"Trim"===_?W=T(H=Ee("Horizontal"===M?E:z,H,k),k):H="","Left"===o.position||"Right"===o.position||"Float"===o.position)for(var q=0;q<this.legendCollection.length;q++){var X=T((r=this.legendCollection[q]).text,o.textStyle);this.textMaxWidth=Math.max(this.textMaxWidth,X.width)}V=Math.max(V,W.height),G=Math.max(G,W.width),W.width>0&&W.height>0&&("Horizontal"===M?(A=w+E/2,U="After"===B?F+z+W.height/2+j:F-j):(A="After"===B?w-this.textMaxWidth/2-j:w+E+this.textMaxWidth/2+j,U=F+z/2+W.height/4)),0===l?(Z="Horizontal"===M?w:"After"===B?A-this.textMaxWidth/2:w,D="Horizontal"===M?"After"===B?F:U-W.height/2:F,1===this.legendCollection.length&&(L="Horizontal"===M?Math.abs(w+E-Z):E+this.textMaxWidth+j,P="Horizontal"===M?z+V/2+j:Math.abs(F+z-D))):l===this.legendCollection.length-1&&(L="Horizontal"===M?Math.abs(w+E-Z):E+this.textMaxWidth+j,P="Horizontal"===M?z+V/2+j:Math.abs(F+z-D)),this.legendRenderingCollections.push({fill:this.legendCollection[l].fill,x:w,y:F,width:E,height:z,text:H,textX:A,textY:U,textWidth:W.width,textHeight:W.height,shapeBorder:this.legendCollection[l].shapeBorder})}1===this.legendCollection.length&&(P=V+j,L=E),this.legendItemRect={x:Z,y:D,width:L,height:P}}else{L=(0,t.isNullOrUndefined)(L)?i.mapAreaRect.width:L,P=(0,t.isNullOrUndefined)(P)?i.mapAreaRect.height:P;var Y=0;this.page=0;for(l=0;l<this.legendCollection.length;l++){r=this.legendCollection[l];(0,t.isNullOrUndefined)(this.totalPages[this.page])&&(this.totalPages[this.page]={Page:this.page+1,Collection:[]});X=T(r.text,o.textStyle);if(this.textMaxWidth=Math.max(this.textMaxWidth,X.width),0===l)w=u=10+S/2,F=g=a+I.height+(v>X.height?v/2:X.height/4);else{var J=X.height>v?X.height:v;if("Horizontal"===M){var Q=O[Y-1].x+O[Y-1].width+10+S;if(Q+b+X.width>L){var K=(O[Y-1].y>x[Y-1].y+v/2?O[Y-1].y:x[Y-1].y+v/2)+a;K+J>P?(this.getPageChanged(),Y=0,x=[],O=[],u=w,g=F):(u=x[0].x,g=K+J/2)}else u=Q-S/2,g=x[Y-1].y}else{var $=O[Y-1].y>x[Y-1].y+v/2?O[Y-1].y:x[Y-1].y+v/2;if($+a+J>P){var ee=O[Y-1].x+this.textMaxWidth+10;ee+b+X.width>L?(u=w,g=F,O=[],x=[],this.getPageChanged(),Y=0):(u=ee+S/2,g=x[0].y)}else{u=x[Y-1].x,g=$+10+v/2}}}y=u+S/2+b,f=g+X.height/4,x.push({x:u,y:g}),O.push({x:y,y:f,width:X.width,height:X.height/2}),this.totalPages[this.page].Collection.push({DisplayText:r.text,ImageSrc:r.imageSrc,Shape:{x:u,y:g},Text:{x:y,y:f},Fill:r.fill,legendShape:r.shape,shapeBorder:r.shapeBorder,idIndex:l,Rect:{x:x[Y].x-S/2,y:x[Y].y-v/2<f-X.height?x[Y].y-v/2:f-X.height,width:Math.abs(x[Y].x-S/2-(y+X.width)),height:v>X.height?v:X.height}}),Y++}var te=this.totalPages[0].Collection;Array.prototype.forEach.call(te,(function(t,i){var o=new R(t.Rect.x,t.Rect.y,t.Rect.width,t.Rect.height);0===i&&(h=o.x,m=o.y),e.widthIncrement=Math.max(e.widthIncrement,Math.abs(h-(o.x+o.width))),e.heightIncrement=Math.max(e.heightIncrement,Math.abs(m-(o.y+o.height)))})),L=this.widthIncrement<L?this.widthIncrement:L,P=this.heightIncrement<P?this.heightIncrement:P,this.legendItemRect={x:te[0].Rect.x,y:te[0].Rect.y,width:L,height:P}}}},e.prototype.getLegends=function(e,t,i,o,n,a,l){this.getRangeLegendCollection(e,t,i,o,n,a,l),this.getEqualLegendCollection(e,t,i,o,n,a,l),this.getDataLegendCollection(e,t,i,o,n,a,l)},e.prototype.getPageChanged=function(){this.page++,(0,t.isNullOrUndefined)(this.totalPages[this.page])&&(this.totalPages[this.page]={Page:this.page+1,Collection:[]})},e.prototype.legendTextTrim=function(e,t,i,o){var n=t,a=T(t,i).width,l=o-a;if(o>e)for(var r=t.length-1;r>=0;--r){if(l+(a=T(n=t.substring(0,r)+"...",i).width)<=e||n.length<4)return n.length<4&&(n=" "),n}return n},e.prototype.drawLegend=function(){var e,i=this.maps,o=i.legendSettings,n=i.renderer,a={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=n.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 R(d.x,d.y,d.width,d.height);0===l&&this.renderLegendBorder();var h=new _(d.textX,d.textY);a.color=null!==a.color?a.color:this.maps.themeStyle.legendTextColor;var m=new E(r,d.fill,d.shapeBorder,o.opacity,p);e=new I(s,h.x,h.y,"middle",d.text,"",""),a.fontFamily=(0,t.isNullOrUndefined)(a.fontFamily)?this.maps.themeStyle.fontFamily:a.fontFamily,a.size=a.size||i.themeStyle.legendFontSize;var c=V(e,a,a.color,this.legendGroup);c.setAttribute("aria-label",d.text),c.setAttribute("role","region");var u=n.drawRectangle(m);this.legendGroup.appendChild(u),!i.legendSettings.toggleLegendSettings.enable||"Layers"!==o.type&&"Markers"!==o.type||this.maintainLegendToggle(l,u,c),this.legendToggle()}else this.drawLegendItem(this.currentPage)},e.prototype.drawLegendItem=function(e){var i=this.maps,o=i.legendSettings,a=10,l=new n(o.shapeWidth,o.shapeHeight),r=i.renderer,s=o.shape;if(e>=0&&e<this.totalPages.length){Ye(this.legendGroup.id,this.maps.element.id)&&(0,t.remove)(Ye(this.legendGroup.id,this.maps.element.id));for(var d=0;d<this.totalPages[e].Collection.length;d++){var p=this.totalPages[e].Collection[d],h=p.shapeBorder,m=r.createGroup({id:i.element.id+"_Legend_Index_"+p.idIndex}),c=p.DisplayText,u="HorizontalLine"===o.shape||"VerticalLine"===o.shape||"Cross"===o.shape?(0,t.isNullOrUndefined)(o.fill)?"#000000":o.fill:h.color,g=("HorizontalLine"===o.shape||"VerticalLine"===o.shape||"Cross"===o.shape)&&0===h.width?1:h.width,y=i.element.id+"_Legend_Shape_Index_"+p.idIndex,f=i.element.id+"_Legend_Text_Index_"+p.idIndex,b=new _(p.Shape.x,p.Shape.y-4),v=new _(p.Text.x,p.Text.y-4),S=new k(y,p.Fill,g,u,o.opacity,(0,t.isNullOrUndefined)(h.opacity)?o.opacity:h.opacity,""),x={fontFamily:o.textStyle.fontFamily,fontStyle:o.textStyle.fontStyle,fontWeight:o.textStyle.fontWeight,size:o.textStyle.size,color:o.textStyle.color,opacity:o.textStyle.opacity};if(x.color=null!==x.color?x.color:this.maps.themeStyle.legendTextColor,x.fontFamily=(0,t.isNullOrUndefined)(x.fontFamily)?this.maps.themeStyle.fontFamily:x.fontFamily,x.size=x.size||i.themeStyle.legendFontSize,x.fontWeight=x.fontWeight||i.themeStyle.fontWeight,0===d&&this.renderLegendBorder(),"Markers"===o.type&&o.useMarkerShape){var O=this.legendCollection[p.idIndex].data[0],C=i.layers[O.layerIndex].markerSettings[O.markerIndex];s=(0,t.isNullOrUndefined)(C.dataSource[O.dataIndex][C.shapeValuePath])||""===C.dataSource[O.dataIndex][C.shapeValuePath]?C.shape:C.dataSource[O.dataIndex][C.shapeValuePath]}"Balloon"===s?m.appendChild(Me(i,S,l,{x:b.x,y:b.y+5},"Legend")):m.appendChild(rt(b,s,l,p.ImageSrc,S));var M=p.Rect.x+p.Rect.width;if(M>this.legendBorderRect.width)c=this.legendTextTrim(this.legendBorderRect.width,c,x,M);var L=V(new I(f,v.x,v.y,"start",c,"",""),x,x.color,m);if(L.setAttribute("aria-label",c),L.setAttribute("role","region"),this.legendGroup.appendChild(m),i.legendSettings.toggleLegendSettings.enable&&("Layers"===o.type||"Markers"===o.type)){var P=m.childNodes[0];this.maintainLegendToggle(p.idIndex,P,L)}if(d===this.totalPages[e].Collection.length-1){var w=void 0,F=a;if(0!==this.page){var N=e+1+"/"+this.totalPages.length,z=o.textStyle,B=T(N,z),A=this.legendItemRect.x+this.legendItemRect.width-B.width-20-20+2,U=this.legendItemRect.x+this.legendItemRect.width,j=U-F-B.width/2-5-4,Z=this.legendItemRect.y+this.legendItemRect.height+2.5+a;w=r.createGroup({id:i.element.id+"_Legend_Paging_Group"});var D=r.createGroup({id:i.element.id+"_Legend_Left_Paging_Group"}),G=r.createGroup({id:i.element.id+"_Legend_Right_Paging_Group"}),H=" M "+U+" "+Z+" L "+(U-F)+" "+(Z-5)+" L "+(U-F)+" "+(Z+5)+" z ",W=" M "+A+" "+Z+" L "+(A+F)+" "+(Z-5)+" L "+(A+F)+" "+(Z+5)+" z ",q=new k(i.element.id+"_Left_Page",this.maps.themeStyle.legendTextColor,0,this.maps.themeStyle.legendTextColor,e+1===1?.5:1,1,"",W);D.appendChild(r.drawPath(q));var X=new E(i.element.id+"_Left_Page_Rect","transparent",{},1,new R(A-5,Z-10,20,20),null,null,"",""),Y=r.drawRectangle(X);Y.setAttribute("aria-label","Navigate to the previous legend items"),Y.setAttribute("role","button"),Y.tabIndex=e+1===1?-1:i.tabIndex,e+1===1?(Y.style.cursor="default",Y.style.setProperty("outline","none")):(Y.style.cursor="pointer",Y.style.removeProperty("outline")),D.appendChild(Y),this.wireEvents(D);var J=new k(i.element.id+"_Right_Page",this.maps.themeStyle.legendTextColor,0,this.maps.themeStyle.legendTextColor,e+1===this.totalPages.length?.5:1,1,"",H);G.appendChild(r.drawPath(J));var Q=new E(i.element.id+"_Right_Page_Rect","transparent",{},1,new R(U-a-5,Z-10,20,20),null,null,"","");(Y=r.drawRectangle(Q)).setAttribute("aria-label","Navigate to the next legend items"),Y.setAttribute("role","button"),Y.tabIndex=e+1===this.totalPages.length?-1:i.tabIndex,e+1===this.totalPages.length?(Y.style.cursor="default",Y.style.setProperty("outline","none")):(Y.style.cursor="pointer",Y.style.removeProperty("outline")),G.appendChild(Y),this.wireEvents(G),w.appendChild(D),w.appendChild(G);var K={id:i.element.id+"_Paging_Text",x:j,y:Z+B.height/4,fill:this.maps.themeStyle.legendTextColor,"font-size":"14px","font-style":z.fontStyle,"font-family":z.fontFamily,"font-weight":z.fontWeight,"text-anchor":"middle",transform:"",opacity:1,"dominant-baseline":""},$=r.createText(K,N);$.style.cssText="user-select: none;",$.setAttribute("aria-label",N),$.setAttribute("role","region"),w.appendChild($),this.legendGroup.appendChild(w)}this.legendToggle()}}}},e.prototype.maintainLegendToggle=function(e,i,o){if(this.maps.legendSettings.toggleLegendSettings.enable&&!(0,t.isNullOrUndefined)(this.maps.toggledLegendId)&&this.maps.toggledLegendId.indexOf(e)>-1&&!(0,t.isNullOrUndefined)(this.maps.toggledElementId)&&this.maps.toggledElementId.length>0){var n=this.legendCollection[e].data;if(this.maps.legendSettings.toggleLegendSettings.applyShapeSettings){var a=n[n.length-1].layerIndex;this.setToggleAttributes(o,i,this.maps.layers[a].shapeSettings.fill,this.maps.layers[a].shapeSettings.opacity,this.maps.layers[a].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor,(0,t.isNullOrUndefined)(this.maps.layers[a].shapeSettings.border.width)?0:this.maps.layers[a].shapeSettings.border.width,(0,t.isNullOrUndefined)(this.maps.layers[a].shapeSettings.border.opacity)?this.maps.layers[a].shapeSettings.opacity:this.maps.layers[a].shapeSettings.border.opacity,this.maps.layers[a].shapeSettings.fill)}else this.setToggleAttributes(o,i,this.maps.legendSettings.toggleLegendSettings.fill,this.maps.legendSettings.toggleLegendSettings.opacity,this.maps.legendSettings.toggleLegendSettings.border.color,this.maps.legendSettings.toggleLegendSettings.border.width,(0,t.isNullOrUndefined)(this.maps.legendSettings.toggleLegendSettings.border.opacity)?this.maps.legendSettings.toggleLegendSettings.opacity:this.maps.legendSettings.toggleLegendSettings.border.opacity,this.maps.legendSettings.toggleLegendSettings.fill);n._isVisible=!1}},e.prototype.legendHighLightAndSelection=function(e,i){var o,n,a,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=!(0,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((0,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,n=C[_].layerIndex,a=C[_].dataIndex,null!==(M=-1===(l=C[_].pointIndex)?document.getElementById(this.maps.element.id+"_LayerIndex_"+n+"_shapeIndex_"+o+"_dataIndex_"+a):document.getElementById(this.maps.element.id+"_LayerIndex_"+n+"_shapeIndex_"+o+"_dataIndex_"+a+"_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,F=M.getAttribute("fill"),I=M.getAttribute("fill-opacity");this.legendHighlightCollection[r-1].shapeOldFillColor.push(F),this.legendHighlightCollection[r-1].shapeOldOpacity=I;var k=this.legendHighlightCollection[r-1].shapeOldFillColor[T],N=this.legendHighlightCollection[r-1].shapeOldOpacity;this.shapePreviousColor=this.legendHighlightCollection[r-1].shapeOldFillColor,this.setColor(M,(0,t.isNullOrUndefined)(O.fill)?k:O.fill,(0,t.isNullOrUndefined)(O.opacity)?N:O.opacity.toString(),O.border.color,O.border.width.toString(),"highlight"),this.setColor(e,(0,t.isNullOrUndefined)(O.fill)?w:O.fill,(0,t.isNullOrUndefined)(O.opacity)?N: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||0===this.maps.selectedLegendElementId.length||(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,(0,t.isNullOrUndefined)(O.fill)?E:O.fill,O.opacity.toString(),O.border.color,O.border.width.toString(),"selection"),this.setColor(M,(0,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,n,a){var l=e.parentElement.id.indexOf("LineString")>-1;"selection"===a?(pe(l?"LineselectionMap":"ShapeselectionMap",l?"LineselectionMapStyle":"ShapeselectionMapStyle",l?"transparent":t,i,l?t:o,n,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(n)/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||this.maps.themeStyle.shapeBorderColor,shapeOldBorderWidth:o.border.width});var n=t.length;t[n-1].MapShapeCollection={Elements:[]},t[n-1].shapeOldFillColor=[],t[n-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 n=o.MapShapeCollection.Elements.length,a=0;a<n;a++){var l=-1!==o.legendOldFill.indexOf("url")?o.shapeOldFillColor[a]:o.legendOldFill,r=(0,t.isNullOrUndefined)(o.shapeOldOpacity)?o.shapeOpacity:o.shapeOldOpacity;this.setColor(o.MapShapeCollection.Elements[a],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){et(e);for(var t=this.shapesOfLegend(e),i=t.length,o=0;o<i;o++){var n=He(t[o]);if("ShapeselectionMapStyle"===n.getAttribute("class")||"LineselectionMapStyle"===n.getAttribute("class")){et(n);var a=this.maps.selectedElementId.indexOf(n.id);-1!==a&&this.maps.selectedElementId.splice(a,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,n,a){if(void 0!==i){this.updateLegendElement(),this.shapeToggled=!0;var l=this.maps.legendModule.legendCollection,r=this.legendIndexOnShape(i,a),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"!==n||this.maps.layers[a].selectionSettings.enableMultiSelect||"ShapeselectionMapStyle"===e.getAttribute("class")||(this.maps.legendSelection=!1),"selection"!==n||this.maps.layers[a].selectionSettings.enableMultiSelect||this.maps.legendSelection||(this.removeAllSelections(),this.maps.legendSelection=!0),void 0===r.currentIndex){if("selection"===n&&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[a].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"===n&&b){(void 0===(S=this.isTargetSelected(s,this.shapeHighlightCollection))||S&&!S.IsSelected)&&this.pushCollection(y,this.shapeHighlightCollection,l[r.actualIndex],this.maps.layers[a].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,(0,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,(0,t.isNullOrUndefined)(o.fill)?y.getAttribute("fill"):o.fill,(0,t.isNullOrUndefined)(o.opacity)?"1":o.opacity.toString(),o.border.color,o.border.width.toString(),"highlight")}else if("selection"===n){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),et(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),(0,t.isNullOrUndefined)(s.LegendEle)||et(s.LegendEle),this.maps.legendSelectionCollection.splice(S.SelectionIndex,1),this.maps.shapeSelections=!0)}else{if((void 0===S||S&&!S.IsSelected)&&!(0,t.isNullOrUndefined)(y))-1===(M=this.getIndexofLegend(this.maps.legendSelectionCollection,y))&&this.pushCollection(y,this.maps.legendSelectionCollection,l[r.actualIndex],this.maps.layers[a].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),!(0,t.isNullOrUndefined)(y)){this.setColor(y,(0,t.isNullOrUndefined)(o.fill)?y.getAttribute("fill"):o.fill,(0,t.isNullOrUndefined)(o.opacity)?"1":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(),et(document.getElementsByClassName("highlightMapStyle")[0]))}}else this.removeShapeHighlightCollection()},e.prototype.isTargetSelected=function(e,i){for(var o,n=0;n<i.length;n++)(0,t.isNullOrUndefined)(e.LegendEle.getAttribute("id"))||e.LegendEle.getAttribute("id")!==i[n].legendElement.getAttribute("id")||(o={IsSelected:!0,SelectionIndex:n});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++){et(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],n=document.getElementById(o);(0,t.isNullOrUndefined)(n)||et(document.getElementById(o))}this.maps.legendSelectionCollection=[],this.maps.selectedLegendElementId=[],this.maps.selectedElementId=[]},e.prototype.legendIndexOnShape=function(e,i){var o,n,a,l=e[this.maps.layers[i].shapeDataPath],r=this.maps.legendSettings.mode,s=this.maps.legendModule.legendCollection;"Default"===r&&!(0,t.isNullOrUndefined)(this.maps.legendModule.totalPages)&&this.maps.legendModule.totalPages.length>0&&(a=this.maps.legendModule.totalPages[this.maps.legendModule.currentPage].Collection);for(var d="Default"!==r||(0,t.isNullOrUndefined)(a)?1:a.length,p=0;p<s.length;p++){for(var h=s[p].data,m=0;m<d;m++)if("Default"!==r||s[p].text===a[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&&(n=p)}return{currentIndex:o,actualIndex:n}},e.prototype.shapeDataOnLegend=function(e){for(var i,o,n,a,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,n=d[c].dataIndex,e===(u=-1===(a=d[c].pointIndex)?document.getElementById(this.maps.element.id+"_LayerIndex_"+o+"_shapeIndex_"+i+"_dataIndex_"+n):document.getElementById(this.maps.element.id+"_LayerIndex_"+o+"_shapeIndex_"+i+"_dataIndex_"+n+"_multiLine_"+a))&&(p=!0),h.push(u)}if(p)return(0,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,n,a,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,n=r[d].dataIndex,p=-1===(a=r[d].pointIndex)?document.getElementById(this.maps.element.id+"_LayerIndex_"+o+"_shapeIndex_"+i+"_dataIndex_"+n):document.getElementById(this.maps.element.id+"_LayerIndex_"+o+"_shapeIndex_"+i+"_dataIndex_"+n+"_multiLine_"+a),(0,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 n="Interactive"===i.mode?this.maps.element.id+"_Legend_Index_":this.maps.element.id+"_Legend_Shape_Index_",a=e.svgObject.querySelector("#"+n+this.maps.selectedLegendElementId[o]);if(!(0,t.isNullOrUndefined)(a)){var l=(0,t.isNullOrUndefined)(this.maps.legendSelectionClass.fill)?a.getAttribute("fill"):this.maps.legendSelectionClass.fill;this.setColor(a,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===a.id&&(this.maps.legendSelectionCollection[r].legendElement=a);if(-1===this.getIndexofLegend(this.maps.legendSelectionCollection,a)){var s=this.maps.legendModule.legendCollection[this.maps.selectedLegendElementId[o]].data[o].layerIndex;this.pushCollection(a,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);(0,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);(0,t.isNullOrUndefined)(m)||m.setAttribute("fill","#E5E5E5")}},e.prototype.renderLegendBorder=function(){var e=this.maps,i=e.legendSettings,o=i.title.text,n={fontFamily:i.titleStyle.fontFamily,fontStyle:i.titleStyle.fontStyle,fontWeight:i.titleStyle.fontWeight,size:i.titleStyle.size,color:i.titleStyle.color,opacity:i.titleStyle.opacity},a=10,l=Ee(this.legendItemRect.width+20,o,n),r=T(l,n);this.legendBorderRect=new R(this.legendItemRect.x-a,this.legendItemRect.y-a-r.height,this.legendItemRect.width+20,this.legendItemRect.height+20+r.height+("Interactive"===i.mode?0:0!==this.page?a:0));var s={color:i.border.color||this.maps.themeStyle.legendBorderColor,opacity:i.border.opacity,width:i.border.width||this.maps.themeStyle.legendBorderWidth};s.opacity=(0,t.isNullOrUndefined)(s.opacity)?1:s.opacity;var d=new E(e.element.id+"_Legend_Border",i.background,s,1,this.legendBorderRect,null,null,"","");if(this.legendGroup.appendChild(e.renderer.drawRectangle(d)),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){n.color=null!==n.color?n.color:this.maps.themeStyle.legendTitleFontColor,n.fontFamily=(0,t.isNullOrUndefined)(n.fontFamily)?this.maps.themeStyle.fontFamily:n.fontFamily,n.size=(0,t.isNullOrUndefined)(n.size)?this.maps.themeStyle.subTitleFontSize||St.legendTitleFont.size:n.size,n.fontWeight=(0,t.isNullOrUndefined)(n.fontWeight)?this.maps.themeStyle.titleFontWeight||St.legendTitleFont.fontWeight:n.fontWeight;var p=V(new I(e.element.id+"_LegendTitle",this.legendItemRect.x+this.legendItemRect.width/2,this.legendItemRect.y-r.height/2-5,"middle",l,""),n,n.color,this.legendGroup);p.setAttribute("aria-label",o),p.setAttribute("role","region")}},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),(0,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)),Ye(this.maps.element.id+"_Legend_Border",this.maps.element.id)&&(Ye(this.maps.element.id+"_Legend_Border",this.maps.element.id).style.pointerEvents="none")},e.prototype.getLegendAlignment=function(e,i,o,n){var a,l,r,s=10,d=(r=(0,t.extend)({},e.mapAreaRect,r,!0)).x,p=r.y,h=r.height,m=r.width,c=e.availableSize.width,u=e.availableSize.height,g=(0,t.isNullOrUndefined)(n.location.x)?0:"string"==typeof n.location.x&&n.location.x.indexOf("%")>-1?e.availableSize.width/100*parseFloat(n.location.x):"string"==typeof n.location.x?parseFloat(n.location.x):n.location.x,y=(0,t.isNullOrUndefined)(n.location.y)?0:"string"==typeof n.location.y&&n.location.y.indexOf("%")>-1?e.availableSize.height/100*parseFloat(n.location.y):"string"==typeof n.location.y?parseFloat(n.location.y):n.location.y;if("Float"===n.position)this.translate=e.isTileMap?new _(g,y+2.5):new _(g+e.mapAreaRect.x,y+e.mapAreaRect.y),this.legendTotalRect=e.mapAreaRect;else{switch(n.position){case"Top":case"Bottom":r.height="Top"===n.position?h-o:h-o-20,a=c/2-i/2,l="Top"===n.position?p:p+r.height,r.y="Top"===n.position?p+o+(e.isTileMap?5:s):p-5;break;case"Left":case"Right":r.width=m-i-e.mapAreaRect.x,a="Left"===n.position?d+5:d+r.width+s,l=u/2-o/2,r.x="Left"===n.position?d+i+s:d}switch(n.alignment){case"Near":"Top"===n.position||"Bottom"===n.position?a=r.x-("Interactive"===n.mode?s:0):l=r.y-(n.height&&n.width||"Interactive"!==n.mode?0:e.mapAreaRect.x);break;case"Far":"Top"===n.position||"Bottom"===n.position?a=c-i-("Interactive"===n.mode?0:s):l=u-o-("Default"===n.mode?s:0)}(n.height||n.width)&&"Interactive"!==n.mode?this.legendTotalRect=e.mapAreaRect=e.totalRect=r:(e.totalRect=null,(n.height||n.width)&&"Interactive"===n.mode&&(e.totalRect=r),this.legendTotalRect=e.mapAreaRect=r),"Left"===n.position&&(e.mapAreaRect.width=r.width),this.translate=new _(a,l)}},e.prototype.getMarkersLegendCollections=function(e,i){var o=this;Array.prototype.forEach.call(i,(function(i,n){var a=i.dataSource,l=i.legendText;Array.prototype.forEach.call(a,(function(a,r){var s=!!(0,t.isNullOrUndefined)(a[o.maps.legendSettings.showLegendPath])||a[o.maps.legendSettings.showLegendPath],d=!(0,t.isNullOrUndefined)(a.latitude)||!(0,t.isNullOrUndefined)(a.Latitude)||!(0,t.isNullOrUndefined)(a[i.latitudeValuePath]),p=!(0,t.isNullOrUndefined)(a.longitude)||!(0,t.isNullOrUndefined)(a.Longitude)||!(0,t.isNullOrUndefined)(a[i.longitudeValuePath]);if(i.visible&&s&&d&&p){if(i.template){var h=Ge(i.template,o.maps)(o.maps);((0,t.isNullOrUndefined)(h.childElementCount)?h[0]:h).querySelector("img").src}var m=(0,t.isNullOrUndefined)(a[l])?"":a[l],c=(0,t.isNullOrUndefined)(i.colorValuePath)?i.fill:a[i.colorValuePath],u=[];o.maps.legendSettings.removeDuplicateLegend?(u.push(o.getMarkerLegendData(e,m,c)),o.getOverallLegendItemsCollection(m,c,u,s)):(u.push({layerIndex:e,markerIndex:n,dataIndex:r,value:c,name:m,shape:(0,t.isNullOrUndefined)(i.shapeValuePath)||(0,t.isNullOrUndefined)(a[i.shapeValuePath])||""===a[i.shapeValuePath]?o.maps.legendSettings.useMarkerShape?i.shape:o.maps.legendSettings.shape:a[i.shapeValuePath]}),o.getOverallLegendItemsCollection(m,c,u,s))}}))}))},e.prototype.getMarkerLegendData=function(e,i,o){var n=this,a=[];return this.maps.layers[e].markerSettings.map((function(l,r){var s=l.dataSource;Array.prototype.forEach.call(s,(function(l,s){var d=n.maps.layers[e].markerSettings[r];i!==l[d.legendText]&&""!==i||o!==(l[d.colorValuePath]||d.fill)||a.push({layerIndex:e,markerIndex:r,dataIndex:s,value:o,name:i,shape:(0,t.isNullOrUndefined)(d.shapeValuePath)?d.shape:l[d.shapeValuePath]})}))})),a},e.prototype.getRangeLegendCollection=function(e,i,o,n,a,l,r){for(var s,d=this,p=0,h=this.maps.legendSettings.fill,m=[],c=function(o){if(!(0,t.isNullOrUndefined)(o.from)&&!(0,t.isNullOrUndefined)(o.to)){s=(0,t.isNullOrUndefined)(o.label)?o.from+" - "+o.to:o.label,m=[];var c=!1;!(0,t.isNullOrUndefined)(n)&&n.length>0&&Array.prototype.forEach.call(n,(function(t,n){var s=l.indexOf(".")>-1?Number(Y(t,l)):parseFloat(t[l]);s>=o.from&&s<=o.to&&(c=!0,m.push(d.getLegendData(e,n,t,a,i,r,s)))})),c||m.push({layerIndex:e,shapeIndex:null,dataIndex:null,name:null,value:null});var g=(0,t.isNullOrUndefined)(h)?"[object Array]"===Object.prototype.toString.call(o.color)?(0,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 n=[],a=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++)n.push(r[s]);else n.push(i[l]);n._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(n[0]);else this.legendCollection.push({text:e,fill:t,data:n,opacity:a.opacity,borderColor:a.shapeBorder.color,borderWidth:a.shapeBorder.width})}},e.prototype.removeDuplicates=function(e,t,i){for(var o=!1,n=0;n<e.length;n++)if((e[n].text===t||""===e[n].text)&&e[n].fill===i){o=!0;break}return o},e.prototype.getEqualLegendCollection=function(e,i,o,n,a,l,r){for(var s,d=this,p=this.maps.legendSettings.fill,h=[],m=[],c=[],u=[],g=function(g){if((0,t.isNullOrUndefined)(g.value)){if((0,t.isNullOrUndefined)(g.minOpacity)&&(0,t.isNullOrUndefined)(g.maxOpacity)&&(0,t.isNullOrUndefined)(g.value)&&(0,t.isNullOrUndefined)(g.from)&&(0,t.isNullOrUndefined)(g.to)&&!(0,t.isNullOrUndefined)(g.color)){if(Array.prototype.forEach.call(n,(function(t,o){for(var n=l.indexOf(".")>-1?Y(t,l):t[l],s=0;s<c.length;s++)n===c[s]&&u.push(d.getLegendData(e,o,t,a,i,r,n))})),0===c.length){var f=!1;Array.prototype.forEach.call(n,(function(n,s){f=!1;for(var p=n[l],h=0;h<o.length;h++)(0,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,n,a,i,r,p))}))}s=(0,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=(0,t.isNullOrUndefined)(g.label)?g.value:g.label,m=[];var v=!1;!(0,t.isNullOrUndefined)(n)&&n.length>0&&Array.prototype.forEach.call(n,(function(t,o){var n=l&&l.indexOf(".")>-1?Y(t,l):t[l];n===g.value?(v=!0,-1===h.indexOf(n)&&h.push(n),m.push(d.getLegendData(e,o,t,a,i,r,n))):-1===c.indexOf(n)&&c.push(n)}));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=(0,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,n,a,l,r){var s,d=this,p=this.maps.legendSettings.fill,h=this.maps.legendSettings.valuePath;(0,t.isNullOrUndefined)(l)||(0,t.isNullOrUndefined)(n)||Array.prototype.forEach.call(n,(function(n,m){var c=!!(0,t.isNullOrUndefined)(d.maps.legendSettings.showLegendPath)||!(0,t.isNullOrUndefined)(n[d.maps.legendSettings.showLegendPath])&&n[d.maps.legendSettings.showLegendPath],u=l.indexOf(".")>-1?Y(n,l):n[l],g=[],y=(0,t.isNullOrUndefined)(p)?u:p;(0,t.isNullOrUndefined)(u)||0!==o.length||(0,t.isNullOrUndefined)(h)&&(0,t.isNullOrUndefined)(a)||(s=(0,t.isNullOrUndefined)(n[h])?a.indexOf(".")>-1?Y(n,a):n[a]:h.indexOf(".")>-1?Y(n,h):n[h],g.push(d.getLegendData(e,m,n,a,i,r,u))),d.getOverallLegendItemsCollection(s,y,g,c)}))},e.prototype.interactiveHandler=function(e){var i=e.target,o=this.maps.legendSettings,n=this.maps.element.id+"_Interactive_Legend",a="Layers"===o.type?"_shapeIndex_":"Markers"===o.type?"_MarkerIndex_":"_BubbleIndex_";if(i.id.indexOf(a)>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;(0,t.isNullOrUndefined)(Ye(n,this.maps.element.id))||(0,t.remove)(Ye(n,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=Ye(this.maps.element.id+"_Legend_Index_"+u,this.maps.element.id),f=y.getBoundingClientRect(),b=new R(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,!(0,t.isNullOrUndefined)(g.data))for(var v=g.data,S=function(e){if(r===v[e].dataIndex&&l===v[e].layerIndex){x.renderInteractivePointer(o,s,d,n,p,b);var i=Ye(n,x.maps.element.id);return x.maps.isDevice&&!(0,t.isNullOrUndefined)(i)&&(clearTimeout(x.arrowTimer),x.arrowTimer=setTimeout((function(){(0,t.isNullOrUndefined)(i.parentNode)||(0,t.remove)(i)}),2e3)),"break"}},x=this,O=0;O<v.length;O++){if("break"===S(O))break}}}else(0,t.isNullOrUndefined)(Ye(n,this.maps.element.id))||(0,t.remove)(Ye(n,this.maps.element.id))},e.prototype.renderInteractivePointer=function(e,t,i,o,n,a){var l,r,s,d=10,p=10,h="None"===e.orientation?"Top"===e.position||"Bottom"===e.position?"Horizontal":"Vertical":e.orientation;a.y="Float"===e.position&&this.maps.isTileMap?a.y-this.maps.mapAreaRect.y:a.y,l="Horizontal"===h?e.invertedPointer?" M "+(r=a.x+a.width/2-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(s=a.y+a.height)+" L "+(r-p)+" "+(s+d)+" L "+(r+p)+" "+(s+d)+" Z ":" M "+(r=a.x+a.width/2-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(s=a.y)+" L "+(r-p)+" "+(s-d)+" L "+(r+p)+" "+(s-d)+" Z ":e.invertedPointer?" M "+(r=a.x-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(s=a.y+a.height/2)+" L "+(r-p)+" "+(s-d)+" L "+(r-p)+" "+(s+d)+" z ":" M "+(r=a.x+a.width-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(s=a.y+a.height/2)+" L "+(r+p)+" "+(s-d)+" L "+(r+p)+" "+(s+d)+" z ";var m=new k(o,t,n,i,1,1,"",l);"Float"===e.position&&this.maps.isTileMap?this.maps.mapLayerPanel.layerGroup.appendChild(this.maps.renderer.drawPath(m)):this.maps.svgObject.appendChild(this.maps.renderer.drawPath(m))},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(yi,this.legendClick,this))},e.prototype.markerToggleSelection=function(e,i,o,n){e.setAttribute("fill",this.legendCollection[n].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",((0,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());var a=this.maps.toggledElementId.indexOf(e.id);-1!==a&&this.maps.toggledElementId.splice(a,1)},e.prototype.bubbleToggleSelection=function(e,i,o,n){e.setAttribute("fill",this.legendCollection[n].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",((0,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,n=this.maps.legendSettings.toggleLegendSettings.fill,a=this.maps.legendSettings.toggleLegendSettings.opacity,l=this.maps.legendSettings.toggleLegendSettings.border.color,r=this.maps.legendSettings.toggleLegendSettings.border.width,s=(0,t.isNullOrUndefined)(this.maps.legendSettings.toggleLegendSettings.border.opacity)?this.maps.legendSettings.toggleLegendSettings.opacity:this.maps.legendSettings.toggleLegendSettings.border.opacity;if(!(0,t.isNullOrUndefined)(e.parentNode)&&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?Ye(this.maps.element.id+"_LayerIndex_"+m.layerIndex+"_BubbleIndex_"+u+"_dataIndex_"+m.dataIndex,this.maps.element.id):Ye(this.maps.element.id+"_LayerIndex_"+m.layerIndex+"_MarkerIndex_"+m.markerIndex+"_dataIndex_"+m.dataIndex,this.maps.element.id),(0,t.isNullOrUndefined)(m.shape)||"Balloon"!==m.shape||(d=(d="Bubbles"===this.maps.legendSettings.type?Ye(this.maps.element.id+"_LayerIndex_"+m.layerIndex+"_BubbleIndex_"+u+"_dataIndex_"+m.dataIndex+"_Group",this.maps.element.id):Ye(this.maps.element.id+"_LayerIndex_"+m.layerIndex+"_MarkerIndex_"+m.markerIndex+"_dataIndex_"+m.dataIndex+"_Group",this.maps.element.id)).children[0]);var y=this.maps.toggledLegendId.indexOf(p);if(h&&null!==d){if(this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(d.setAttribute("fill",this.maps.layers[c].shapeSettings.fill),d.setAttribute("stroke",this.maps.layers[c].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor),d.setAttribute("fill-opacity",this.maps.layers[c].shapeSettings.opacity.toString()),d.setAttribute("stroke-width",((0,t.isNullOrUndefined)(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width).toString()),d.setAttribute("stroke-opacity",((0,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",n),d.setAttribute("fill-opacity",a.toString()),d.setAttribute("stroke",l),d.setAttribute("stroke-width",r.toString()),d.setAttribute("stroke-opacity",s.toString())),"Markers"===this.maps.legendSettings.type)-1===y&&this.maps.toggledLegendId.push(p),-1===this.maps.toggledElementId.indexOf(d.id)&&this.maps.toggledElementId.push(d.id);null!==e&&(i=Ye(this.maps.element.id+"_Legend_Shape_Index_"+p,this.maps.element.id),o=Ye(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||this.maps.themeStyle.shapeBorderColor,(0,t.isNullOrUndefined)(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width,(0,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,n,a,l,r,s,n))}else"Markers"===this.maps.legendSettings.type?(-1!==y&&0===g&&this.maps.toggledLegendId.splice(y,1),this.markerToggleSelection(d,c,u,p)):this.bubbleToggleSelection(d,c,u,p),null!==e&&(i=Ye(this.maps.element.id+"_Legend_Shape_Index_"+p,this.maps.element.id),o=Ye(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,this.maps.legendSettings.textStyle.color),"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 f=void 0;this.removeCollections(e,p),-1!==(y=this.maps.toggledLegendId.indexOf(p))&&(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!==(f=Ye(this.maps.element.id+"_LayerIndex_"+m.layerIndex+"_shapeIndex_"+m.shapeIndex+"_dataIndex_"+m.dataIndex,this.maps.element.id))){var b=this.maps.toggledElementId.indexOf(f.id);h?(0===g&&this.maps.toggledLegendId.push(p),-1===b&&this.maps.toggledElementId.push(f.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(f.setAttribute("fill",this.maps.layers[u].shapeSettings.fill),f.setAttribute("fill-opacity",this.maps.layers[u].shapeSettings.opacity.toString()),f.setAttribute("stroke",this.maps.layers[u].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor),f.setAttribute("stroke-width",((0,t.isNullOrUndefined)(this.maps.layers[u].shapeSettings.border.width)?0:this.maps.layers[u].shapeSettings.border.width).toString()),f.setAttribute("stroke-opacity",((0,t.isNullOrUndefined)(this.maps.layers[u].shapeSettings.border.opacity)?this.maps.layers[u].shapeSettings.opacity:this.maps.layers[u].shapeSettings.border.opacity).toString())):(f.setAttribute("fill",n),f.setAttribute("fill-opacity",a.toString()),f.setAttribute("stroke",l),f.setAttribute("stroke-width",r.toString()),f.setAttribute("stroke-opacity",s.toString())),null!==e&&(o=Ye(this.maps.element.id+"_Legend_Text_Index_"+p,this.maps.element.id),i=Ye(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||this.maps.themeStyle.shapeBorderColor,(0,t.isNullOrUndefined)(this.maps.layers[u].shapeSettings.border.width)?0:this.maps.layers[u].shapeSettings.border.width,(0,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,n,a,l,r,s,n))):(-1!==y&&0===g&&this.maps.toggledLegendId.splice(y,1),-1!==b&&this.maps.toggledElementId.splice(b,1),f.setAttribute("fill",this.legendCollection[p].fill),f.setAttribute("stroke-opacity",((0,t.isNullOrUndefined)(this.maps.layers[u].shapeSettings.border.opacity)?this.maps.layers[u].shapeSettings.opacity:this.maps.layers[u].shapeSettings.border.opacity).toString()),f.setAttribute("stroke-width",((0,t.isNullOrUndefined)(this.maps.layers[u].shapeSettings.border.width)?0:this.maps.layers[u].shapeSettings.border.width).toString()),f.setAttribute("fill-opacity",this.maps.layers[u].shapeSettings.opacity.toString()),f.setAttribute("stroke",this.maps.layers[u].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor),null!==e&&(o=Ye(this.maps.element.id+"_Legend_Text_Index_"+p,this.maps.element.id),i=Ye(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(!(0,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(y=this.maps.toggledLegendId.indexOf(p),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++)if(x=this.legendCollection[p].data[g],S="Bubbles"===this.maps.legendSettings.type?Ye(this.maps.element.id+"_LayerIndex_"+x.layerIndex+"_BubbleIndex_"+u+"_dataIndex_"+x.dataIndex,this.maps.element.id):Ye(this.maps.element.id+"_LayerIndex_"+x.layerIndex+"_MarkerIndex_"+u+"_dataIndex_"+x.dataIndex,this.maps.element.id),(0,t.isNullOrUndefined)(x.shape)||"Balloon"!==x.shape||(S=(S="Bubbles"===this.maps.legendSettings.type?Ye(this.maps.element.id+"_LayerIndex_"+x.layerIndex+"_BubbleIndex_"+u+"_dataIndex_"+x.dataIndex+"_Group",this.maps.element.id):Ye(this.maps.element.id+"_LayerIndex_"+x.layerIndex+"_MarkerIndex_"+u+"_dataIndex_"+x.dataIndex+"_Group",this.maps.element.id)).children[0]),h&&null!==S){if("Markers"===this.maps.legendSettings.type)-1===y&&this.maps.toggledLegendId.push(p),-1===this.maps.toggledElementId.indexOf(S.id)&&this.maps.toggledElementId.push(S.id);this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(S.setAttribute("fill",this.maps.layers[c].shapeSettings.fill),S.setAttribute("stroke",this.maps.layers[c].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor),S.setAttribute("stroke-width",((0,t.isNullOrUndefined)(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width).toString()),S.setAttribute("stroke-opacity",((0,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",n),S.setAttribute("fill-opacity",a.toString()),S.setAttribute("stroke",l),S.setAttribute("stroke-width",r.toString()),S.setAttribute("stroke-opacity",s.toString())),null!==e&&(o=Ye(this.maps.element.id+"_Legend_Index_"+p+"_Text",this.maps.element.id),i=Ye(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||this.maps.themeStyle.shapeBorderColor,(0,t.isNullOrUndefined)(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width,(0,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,n,a,l,r,s,n))}else"Markers"===this.maps.legendSettings.type?(-1!==y&&0===g&&this.maps.toggledLegendId.splice(y,1),this.markerToggleSelection(S,c,u,p)):this.bubbleToggleSelection(S,c,u,p),null!==e&&((i=Ye(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=Ye(this.maps.element.id+"_Legend_Index_"+p+"_Text",this.maps.element.id)).setAttribute("fill",this.maps.legendSettings.textStyle.color));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=Ye(this.maps.element.id+"_LayerIndex_"+x.layerIndex+"_shapeIndex_"+x.shapeIndex+"_dataIndex_"+x.dataIndex,this.maps.element.id))){b=this.maps.toggledElementId.indexOf(O.id);h?(0===g&&this.maps.toggledLegendId.push(p),-1===b&&this.maps.toggledElementId.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||this.maps.themeStyle.shapeBorderColor),O.setAttribute("fill-opacity",this.maps.layers[c].shapeSettings.opacity.toString()),O.setAttribute("stroke-width",((0,t.isNullOrUndefined)(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width).toString()),O.setAttribute("stroke-opacity",((0,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",n),O.setAttribute("fill-opacity",a.toString()),O.setAttribute("stroke",l),O.setAttribute("stroke-width",r.toString()),O.setAttribute("stroke-opacity",s.toString())),null!==e&&(i=Ye(this.maps.element.id+"_Legend_Index_"+p,this.maps.element.id),o=Ye(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||this.maps.themeStyle.shapeBorderColor,(0,t.isNullOrUndefined)(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width,(0,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,n,a,l,r,s,n))):(-1!==C&&0===g&&this.maps.toggledLegendId.splice(C,1),-1!==b&&this.maps.toggledElementId.splice(b,1),O.setAttribute("fill-opacity",this.maps.layers[c].shapeSettings.opacity.toString()),O.setAttribute("stroke-width",((0,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||this.maps.themeStyle.shapeBorderColor),O.setAttribute("stroke-opacity",((0,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=Ye(this.maps.element.id+"_Legend_Index_"+p+"_Text",this.maps.element.id),i=Ye(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 n=this.maps.selectedLegendElementId.indexOf(t);-1!==n&&this.maps.selectedLegendElementId.splice(n,1)},e.prototype.removeEventListener=function(){if(!this.maps.isDestroyed){this.maps.off(t.Browser.touchMoveEvent,this.interactiveHandler),this.maps.off(t.Browser.touchEndEvent,this.interactiveHandler),this.maps.off(yi,this.legendClick);var e=document.getElementById(this.maps.element.id+"_Legend_Paging_Group");if(e)for(var i=0;i<e.childElementCount;i++)t.EventHandler.remove(e.childNodes[i],t.Browser.touchStartEvent,this.changeNextPage)}},e.prototype.getLegendData=function(e,i,o,n,a,l,r){var s=[];if("[object Array]"===Object.prototype.toString.call(a))for(var d=0;d<a.length;d++){var p=a[d],h=n.indexOf(".")>-1?Y(o,n):o[n],m=Te(o[n],l,p.properties),c=(0,t.isNullOrUndefined)(h)||"string"!=typeof h?h:h.toLowerCase();if((!(0,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[n],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[n],value:r,pointIndex:u})}return s},e.prototype.setToggleAttributes=function(e,i,o,n,a,l,r,s){e.setAttribute("fill",s),i.setAttribute("fill",o),i.setAttribute("fill-opacity",n.toString()),i.setAttribute("stroke",a),i.setAttribute("stroke-width",l.toString()),(0,t.isNullOrUndefined)(r)||i.setAttribute("stroke-opacity",r.toString())},e.prototype.legendGradientColor=function(e,i){var o,n="http://www.w3.org/2000/svg";if(!(0,t.isNullOrUndefined)(e.color)&&"object"==typeof e.color){var a=document.createElementNS(n,"linearGradient"),l=this.maps.legendSettings.position,r="Top"===l||"Bottom"===l?"100":"0",s="Top"===l||"Bottom"===l?"0":"100";a.setAttribute("id","linear_"+i+"_"+this.maps.element.id),a.setAttribute("x1","0%"),a.setAttribute("y1","0%"),a.setAttribute("x2",r+"%"),a.setAttribute("y2",s+"%");for(var d=0;d<e.color.length;d++){var p=100/(e.color.length-1),h=document.createElementNS(n,"stop");h.setAttribute("offset",d*p+"%"),h.setAttribute("stop-color",e.color[d]),h.setAttribute("stop-opacity",1..toString()),a.appendChild(h)}this.legendLinearGradient=a;var m="url(#linear_"+i+"_"+this.maps.element.id+")";this.defsElement.appendChild(a),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}(),uo=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=Je(e,t,0,this.maps);i?this.mapHighlight(o,null,null):et(o)},e.prototype.mouseMove=function(e){var i,o=e.target,n="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")&&!n&&"MarkerselectionMapStyle"!==o.getAttribute("class")&&"BubbleselectionMapStyle"!==o.getAttribute("class")&&"navigationlineselectionMapStyle"!==o.getAttribute("class")&&"PolygonselectionMapStyle"!==o.getAttribute("class")&&"LineselectionMapStyle"!==o.getAttribute("class")){i=parseInt(o.id.split("_LayerIndex_")[1].split("_")[0],10);var a=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),a=this.maps.layers[i].shapeData.features&&!(0,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=(0,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 if(o.id.indexOf("_PolygonIndex_")>-1)s=parseInt(o.id.split("_PolygonIndex_")[1].split("_")[0],10),l=this.maps.layers[i].polygonSettings.polygons[s].points,this.highlightSettings=this.maps.layers[i].polygonSettings.highlightSettings;else{var h=parseInt(o.id.split("_NavigationIndex_")[1].split("_")[0],10);i=parseInt(o.id.split("_LayerIndex_")[1].split("_")[0],10),a=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,a);else{var m=document.getElementsByClassName("highlightMapStyle")[0];if(!(0,t.isNullOrUndefined)(m)&&(et(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(Xe("highlightMapStyle").length>0){if((o=Xe("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)}et(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 n=this,a=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[a].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=(0,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")?(0,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:Ci,target:e.id,cancel:!1,shapeData:i,data:o,maps:this.maps};e.id.indexOf("shapeIndex")>-1&&this.maps.trigger(Ci,m,(function(){}));var c={opacity:h.opacity,fill:h.fill,border:{color:s,width:d,opacity:p},name:Xi,target:e.id,cancel:!1,shapeData:i,data:o,maps:this.maps};this.maps.trigger(Xi,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,n.highlightMap(e,c)}))},e.prototype.highlightMap=function(e,t){if("highlightMapStyle"!==e.getAttribute("class")&&!t.cancel){if(Xe("highlightMapStyle").length>0){var i=Xe("highlightMapStyle")[0];if(et(i),i.id.indexOf("NavigationIndex")>-1){var o=parseInt(i.id.split("_NavigationIndex_")[1].split("_")[0],10),n=parseInt(i.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10);i.setAttribute("stroke-width",this.maps.layers[n].navigationLineSettings[o].width.toString()),i.setAttribute("stroke",this.maps.layers[n].navigationLineSettings[o].color)}}He("highlightMap")?Ke("highlightMap","highlightMapStyle",t):document.body.appendChild(Qe("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}(),go=function(){function e(e){this.maps=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.maps.isDestroyed||this.maps.on(yi,this.mouseClick,this)},e.prototype.removeEventListener=function(){this.maps.isDestroyed||this.maps.off(yi,this.mouseClick)},e.prototype.mouseClick=function(e){if(!(0,t.isNullOrUndefined)(e.type)&&-1!==e.type.indexOf("touch")&&(0,t.isNullOrUndefined)(e.id)&&(e=e.target),!(0,t.isNullOrUndefined)(e.id)&&(e.id.indexOf("LayerIndex")>-1||e.id.indexOf("NavigationIndex")>-1)){var i=void 0,o=void 0,n=void 0,a=void 0,l=parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10);if(e.id.indexOf("shapeIndex")>-1)n=parseInt(e.id.split("_shapeIndex_")[1].split("_")[0],10),i=!(0,t.isNullOrUndefined)(this.maps.layers[l].shapeData.features)&&this.maps.layers[l].shapeData.features.length>n?this.maps.layers[l].shapeData.features[n].properties:!(0,t.isNullOrUndefined)(this.maps.layers[l].shapeData.geometries)&&this.maps.layers[l].shapeData.geometries.length>n?this.maps.layers[l].shapeData.geometries[n].properties:null,a=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),o=(0,t.isNullOrUndefined)(a)?null:this.maps.layers[l].dataSource[a],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);a=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),o=this.maps.layers[l].bubbleSettings[r].dataSource[a],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);a=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),o=this.maps.layers[l].markerSettings[s].dataSource[a],this.selectionsettings=this.maps.layers[l].markerSettings[s].selectionSettings,this.selectionType="Marker"}else if(e.id.indexOf("_PolygonIndex_")>-1)a=parseInt(e.id.split("_PolygonIndex_")[1].split("_")[0],10),o=this.maps.layers[l].polygonSettings.polygons[a].points,this.selectionsettings=this.maps.layers[l].polygonSettings.selectionSettings,this.selectionType="Polygon";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"}!(0,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&&!(0,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=Je(e,t,0,this.maps);i?this.selectMap(o,null,null):et(o)},e.prototype.selectMap=function(e,i,o){var n=this,a=e.parentElement.id.indexOf("LineString")>-1,l={color:a&&this.selectionsettings.fill||this.selectionsettings.border.color,width:a?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:a?"transparent":"navigationline"!==this.selectionType?this.selectionsettings.fill:"none",border:l,name:Hi,target:e.id,cancel:!1,shapeData:i,data:o,maps:this.maps};this.maps.trigger("itemSelection",r,(function(i){if(r.border.opacity=(0,t.isNullOrUndefined)(n.selectionsettings.border.opacity)?n.selectionsettings.opacity:n.selectionsettings.border.opacity,!r.cancel)if(e.getAttribute("class")===n.selectionType+"selectionMapStyle"||"LineselectionMapStyle"===e.getAttribute("class")){et(e),n.removedSelectionList(e);for(var o=0;o<n.maps.shapeSelectionItem.length;o++)if(n.maps.shapeSelectionItem[o]===r.shapeData){n.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",n.maps.layers[s].navigationLineSettings[l].width.toString()),e.setAttribute("stroke",n.maps.layers[s].navigationLineSettings[l].color)}}else{var d=Re(n.maps.element.id+"_Layer_Collections");if(!n.selectionsettings.enableMultiSelect&&(d.getElementsByClassName(n.selectionType+"selectionMapStyle").length>0||d.getElementsByClassName("LineselectionMapStyle").length>0)){for(var p=d.getElementsByClassName(n.selectionType+"selectionMapStyle").length,h=void 0,m=0;m<p;m++)et(h=d.getElementsByClassName(n.selectionType+"selectionMapStyle")[0]),n.removedSelectionList(h);if(d.getElementsByClassName("LineselectionMapStyle").length>0){p=d.getElementsByClassName("LineselectionMapStyle").length;for(m=0;m<p;m++)et(h=d.getElementsByClassName("LineselectionMapStyle")[0]),n.removedSelectionList(h)}if("Shape"===n.selectionType){n.maps.shapeSelectionItem=[];for(var c=n.maps.selectedElementId.length,u=0;u<c;u++){et(h=d.getElementsByClassName(n.selectionType+"selectionMapStyle")[0]);var g=n.maps.selectedElementId.indexOf(h.getAttribute("id"));n.maps.selectedElementId.splice(g,1)}}if(h.id.indexOf("NavigationIndex")>-1){l=parseInt(e.id.split("_NavigationIndex_")[1].split("_")[0],10),s=parseInt(e.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10);h.setAttribute("stroke-width",n.maps.layers[s].navigationLineSettings[l].width.toString()),h.setAttribute("stroke",n.maps.layers[s].navigationLineSettings[l].color)}}a?(He("LineselectionMap")?Ke("LineselectionMap","LineselectionMapStyle",r):document.body.appendChild(Qe("LineselectionMap","LineselectionMapStyle",r)),e.setAttribute("class","LineselectionMapStyle")):(He(n.selectionType+"selectionMap")?Ke(n.selectionType+"selectionMap",n.selectionType+"selectionMapStyle",r):document.body.appendChild(Qe(n.selectionType+"selectionMap",n.selectionType+"selectionMapStyle",r)),e.setAttribute("class",n.selectionType+"selectionMapStyle")),"ShapeselectionMapStyle"===e.getAttribute("class")&&(n.maps.shapeSelectionClass=He(n.selectionType+"selectionMap"),n.maps.selectedElementId.push(e.getAttribute("id")),n.maps.shapeSelectionItem.push(r.shapeData)),"MarkerselectionMapStyle"===e.getAttribute("class")&&(n.maps.markerSelectionClass=He(n.selectionType+"selectionMap"),n.maps.selectedMarkerElementId.push(e.getAttribute("id"))),"BubbleselectionMapStyle"===e.getAttribute("class")&&(n.maps.bubbleSelectionClass=He(n.selectionType+"selectionMap"),n.maps.selectedBubbleElementId.push(e.getAttribute("id"))),"navigationlineselectionMapStyle"===e.getAttribute("class")&&(n.maps.navigationSelectionClass=He(n.selectionType+"selectionMap"),n.maps.selectedNavigationElementId.push(e.getAttribute("id"))),"PolygonselectionMapStyle"===e.getAttribute("class")&&(n.maps.polygonSelectionClass=He(n.selectionType+"selectionMap"),n.maps.selectedPolygonElementId.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),"Polygon"===this.selectionType&&this.maps.selectedPolygonElementId.splice(this.maps.selectedPolygonElementId.indexOf(e.getAttribute("id")),1)},e.prototype.getModuleName=function(){return"Selection"},e.prototype.destroy=function(){this.selectionsettings=null,this.removeEventListener(),this.maps=null},e}(),yo=function(){function e(e){this.maps=e,this.tooltipId=this.maps.element.id+"_mapsTooltip",this.addEventListener()}return e.prototype.renderTooltip=function(e){var o,n,a,l,r,s,d,h=this;if(-1!==e.type.indexOf("touch")?(this.isTouch=!0,o=(l=e).changedTouches[0].pageX,n=l.changedTouches[0].pageY,a=l.target):(this.isTouch="touch"===e.pointerType,o=e.pageX,n=e.pageY,a=e.target),-1===a.id.indexOf(this.maps.element.id)){var m=a.closest("."+this.maps.element.id+"_marker_template_element");!(0,t.isNullOrUndefined)(m)&&m.id.indexOf("_MarkerIndex_")>-1&&(a=m)}var c,u,g,y,f,b,v="",S=a.id,x=[],O=S.indexOf("_LayerIndex_")>-1&&parseFloat(S.split("_LayerIndex_")[1].split("_")[0]),C=this.maps.layersCollection[O],_=[],M=p(o,n,this.maps.svgObject);this.tooltipTargetID=S;var L=null,P=null,w=this.maps.getClickLocation(S,e.pageX,e.pageY,a,e.layerX,e.layerY,"tooltip");(0,t.isNullOrUndefined)(w)||(L=w.latitude,P=w.longitude);var T=S.indexOf("_PolygonIndex_")>-1;if((S.indexOf("_shapeIndex_")>-1||S.indexOf("_MarkerIndex_")>-1||S.indexOf("_BubbleIndex_")>-1||S.indexOf("_PolygonIndex_")>-1)&&null===this.maps.markerDragArgument){if(S.indexOf("_PolygonIndex_")>-1){var F=parseInt(S.split("_PolygonIndex_")[1].split("_")[0],10);d=C.polygonSettings.tooltipSettings,b=C.polygonSettings.polygons[F],y=d.textStyle,f=d.fill,_.push(b.tooltipText)}else if(S.indexOf("_shapeIndex_")>-1){s=C.tooltipSettings;var I=parseInt(S.split("_shapeIndex_")[1].split("_")[0],10);if((0,t.isNullOrUndefined)(C.layerData)||(0,t.isNullOrUndefined)(C.layerData[I]))return;var k=C.layerData[I].property,N=!1,E="[object Array]"===Object.prototype.toString.call(C.shapePropertyPath)?C.shapePropertyPath:[C.shapePropertyPath];if(!(0,t.isNullOrUndefined)(E)){for(var z=0;z<E.length;z++)if(!(0,t.isNullOrUndefined)(C.dataSource)&&!(0,t.isNullOrUndefined)(C.shapeDataPath))for(var B=0;B<C.dataSource.length;B++){var A=C.dataSource[B],U=C.shapeDataPath.indexOf(".")>-1?Y(A,C.shapeDataPath):A[C.shapeDataPath];if((!(0,t.isNullOrUndefined)(U)&&isNaN(A[C.shapeDataPath])?U.toLowerCase():U)===(!(0,t.isNullOrUndefined)(k[E[z]])&&isNaN(k[E[z]])?k[E[z]].toLowerCase():k[E[z]])){N=!0,O=B,z=E.length;break}}if(O=N?O:null,C.dataSource&&C.dataSource.length>0){if(!(0,t.isNullOrUndefined)(C.dataSource[O]))for(u in x=JSON.parse(JSON.stringify(C.dataSource[O])),k)x.hasOwnProperty(u)||(x[u]=k[u])}else x=k}if(s.visible&&(!(0,t.isNullOrUndefined)(O)&&!isNaN(O)||!(0,t.isNullOrUndefined)(k)))if(C.tooltipSettings.format)v=this.formatter(C.tooltipSettings.format,x);else{var j=Te(C.shapeDataPath,C.shapePropertyPath,k);v=(0,t.isNullOrUndefined)(C.dataSource)||(0,t.isNullOrUndefined)(O)?k[j]:H(s.valuePath.indexOf(".")>-1?Y(C.dataSource[O],s.valuePath):C.dataSource[O][s.valuePath],this.maps),(0,t.isNullOrUndefined)(v)&&!(0,t.isNullOrUndefined)(s.valuePath)&&(v=s.valuePath.indexOf(".")>-1?Y(k,s.valuePath):k[s.valuePath])}}else if(S.indexOf("_MarkerIndex_")>-1){var Z=parseInt(S.split("_MarkerIndex_")[1].split("_")[0],10),R=parseInt(S.split("_MarkerIndex_")[1].split("_")[2],10),D=C.markerSettings[Z];s=D.tooltipSettings,x=D.dataSource[R],s.visible&&!isNaN(Z)&&(D.tooltipSettings.format?v=this.formatter(D.tooltipSettings.format,D.dataSource[R]):"function"!=typeof D.template&&D.template&&!D.tooltipSettings.valuePath?v=D.template.split(">")[1].split("<")[0]:(0,t.isNullOrUndefined)(D.tooltipSettings.valuePath)||(v=H(D.tooltipSettings.valuePath.indexOf(".")>-1?Y(D.dataSource[R],D.tooltipSettings.valuePath):D.dataSource[R][D.tooltipSettings.valuePath],this.maps)))}else if(S.indexOf("_BubbleIndex_")>-1){var V=parseInt(S.split("_BubbleIndex_")[1].split("_")[0],10),G=(R=parseInt(S.split("_BubbleIndex_")[1].split("_")[2],10),C.bubbleSettings[V]);s=G.tooltipSettings,x=G.dataSource[R],s.visible&&!isNaN(R)&&(G.tooltipSettings.format?v=this.formatter(G.tooltipSettings.format,G.dataSource[R]):(0,t.isNullOrUndefined)(G.tooltipSettings.valuePath)||(v=H(G.tooltipSettings.valuePath.indexOf(".")>-1?Y(G.dataSource[R],G.tooltipSettings.valuePath):G.dataSource[R][G.tooltipSettings.valuePath],this.maps)))}if(T?d.visible:s.visible){document.getElementById(this.tooltipId)?c=document.getElementById(this.tooltipId):(c=(0,t.createElement)("div",{id:this.maps.element.id+"_mapsTooltip",className:"EJ2-maps-Tooltip"}),(0,t.isNullOrUndefined)(T?b.tooltipTemplate:s.template)||(T?""===b.tooltipTemplate:""===s.template)||"MouseMove"===this.maps.tooltipDisplayMode?c.style.cssText="position: absolute;pointer-events:none;":c.style.position="absolute",document.getElementById(this.maps.element.id+"_Secondary_Element").appendChild(c)),T?b.tooltipTemplate:s.template,(T?null!==b.tooltipTemplate:null!==s.template)&&1===Object.keys((T?b.tooltipTemplate:s.template,T?b.tooltipTemplate:s.template)).length&&(T?b.tooltipTemplate=b.tooltipTemplate[Object.keys(b.tooltipTemplate)[0]]:s.template=s.template[Object.keys(s.template)[0]]);var W={location:M,text:_,data:x=this.setTooltipContent(s,x),textStyle:{color:T?y.color:s.textStyle.color,fontFamily:T?y.fontFamily:s.textStyle.fontFamily,fontStyle:T?y.fontStyle:s.textStyle.fontStyle,fontWeight:T?y.fontWeight:s.textStyle.fontWeight,opacity:T?y.opacity:s.textStyle.opacity,size:T?y.size:s.textStyle.size},template:T?b.tooltipTemplate:s.template};""!==(r={cancel:!1,name:xi,options:W,fill:T?f:s.fill,maps:this.maps,latitude:L,longitude:P,element:a,eventArgs:e,content:T?(0,t.isNullOrUndefined)(b.tooltipText)?"":b.tooltipText:(0,t.isNullOrUndefined)(v)?"":v.toString()}).content||""!==r.options.template?this.maps.trigger(xi,r,(function(o){if(r.cancel||(0,t.isNullOrUndefined)(v)||-1!==S.indexOf("_cluster_")||-1!==S.indexOf("_dataLabel_"))h.clearTooltip(e.target);else{h.maps.isProtectedOnChange=!0,r.options.textStyle.size=r.options.textStyle.size||h.maps.themeStyle.fontSize,r.options.textStyle.color=r.options.textStyle.color||h.maps.themeStyle.tooltipFontColor,r.options.textStyle.fontFamily=r.options.textStyle.fontFamily||h.maps.themeStyle.fontFamily,r.options.textStyle.fontWeight=r.options.textStyle.fontWeight||h.maps.themeStyle.fontWeight,r.options.textStyle.opacity=r.options.textStyle.opacity||h.maps.themeStyle.tooltipTextOpacity;var n=T?{color:d.border.color||h.maps.themeStyle.tooltipBorderColor,width:d.border.width,opacity:d.border.opacity}:{color:s.border.color||h.maps.themeStyle.tooltipBorderColor,width:s.border.width,opacity:s.border.opacity};if(r.cancel?h.svgTooltip=new i.Tooltip({theme:h.maps.theme,enable:!0,header:"",data:s.data,template:s.template,content:r.content.toString()!==v.toString()?[r.content.toString()]:[v.toString()],shapes:[],location:s.location,palette:[g],areaBounds:h.maps.mapAreaRect,textStyle:s.textStyle,availableSize:h.maps.availableSize,fill:s.fill||h.maps.themeStyle.tooltipFillColor,enableShadow:!0,border:n}):h.svgTooltip=new i.Tooltip({theme:h.maps.theme,enable:!0,header:"",data:r.options.data,template:r.options.template,content:r.content.toString()!==v.toString()?[r.content.toString()]:[v.toString()],shapes:[],location:r.options.location,palette:[g],areaBounds:h.maps.mapAreaRect,textStyle:r.options.textStyle,availableSize:h.maps.availableSize,fill:r.fill||h.maps.themeStyle.tooltipFillColor,enableShadow:!0,border:n}),(h.maps.isVue||h.maps.isVue3)&&(h.svgTooltip.controlInstance=h.maps),h.svgTooltip.opacity=h.maps.themeStyle.tooltipFillOpacity||h.svgTooltip.opacity,h.svgTooltip.appendTo(c),h.maps.renderReactTemplates(),h.maps.isDevice){var a=S.indexOf("_MarkerIndex_")>-1||S.indexOf("_BubbleIndex_")>-1||S.indexOf("_shapeIndex_")>-1?s.duration:d.duration;null!==(a=!(0,t.isNullOrUndefined)(a)&&a>0?a:a<0?2e3:null)&&(clearTimeout(h.tooltipTimer),h.tooltipTimer=setTimeout(h.removeTooltip.bind(h),a))}}})):this.clearTooltip(e.target),this.svgTooltip&&this.maps.trigger("tooltipRenderComplete",{cancel:!1,name:"tooltipRenderComplete",maps:this.maps,options:W,element:this.svgTooltip.element}),this.svgTooltip?this.maps.trigger("tooltipRenderComplete",{cancel:!1,name:"tooltipRenderComplete",maps:this.maps,options:W,element:this.svgTooltip.element}):this.clearTooltip(e.target)}else this.clearTooltip(e.target)}else{var q=e.target.closest("#"+this.maps.element.id+"_mapsTooltipparent_template");(0,t.isNullOrUndefined)(q)&&this.clearTooltip(e.target)}},e.prototype.setTooltipContent=function(e,i){var o=(0,t.extend)({},i,null,!0);return this.maps.format&&!isNaN(Number(o[e.valuePath]))?o[e.valuePath]=Ve(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 n=o[i];e="object"==typeof t[n]?W("",e,t,this.maps):e.split("${"+n+"}").join(H(t[n],this.maps))}return e},e.prototype.mouseUpHandler=function(e){(0,t.isNullOrUndefined)(this.maps)||(this.renderTooltip(e),"MouseMove"===this.maps.tooltipDisplayMode&&(clearTimeout(this.tooltipTimer),this.tooltipTimer=setTimeout(this.removeTooltip.bind(this),2e3)))},e.prototype.removeTooltip=function(){var e=!1;return document.getElementsByClassName("EJ2-maps-Tooltip").length>0&&((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");(0,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.renderTooltip):"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(){(0,t.isNullOrUndefined)(this.svgTooltip)||(this.svgTooltip.destroy(),this.svgTooltip.controlInstance=null,Be(this.maps.element.id+"_mapsTooltip")),this.svgTooltip=null,this.maps=null},e}(),fo=function(){function e(e){this.isPanModeEnabled=!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.isPanningInProgress=!1,this.isPan=!1,this.isZoomFinal=!1,this.isZoomSelection=!1,this.pinchFactor=1,this.startTouches=[],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=this.maps.zoomSettings.toolbarSettings.buttonSettings.selectionColor,this.fillColor=this.maps.zoomSettings.toolbarSettings.buttonSettings.color,this.addEventListener()}return e.prototype.performZooming=function(e,i,o,n){var a=this;void 0===n&&(n=!1);var l=this.maps;l.previousProjection=i<=1.5?void 0:l.projectionType,l.defaultState=!1,l.initialCheck=!1,l.markerZoomedState=l.isMarkerZoomCompleted=!1,l.zoomPersistence=l.enablePersistence;var r=l.tileZoomLevel,s=l.zoomSettings.maxZoom,d=l.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=l.previousScale=l.scale,m=l.tileTranslatePoint;if(l.isTileMap||!("ZoomIn"===o?i>=d&&i<=s:i>=d)&&!l.isReset){if(l.isTileMap&&i>=d&&i<=s)if(this.getTileTranslatePosition(r,i,e,o),l.tileZoomLevel=i,l.zoomSettings.zoomFactor=i,l.scale=Math.pow(2,i-1),"ZoomOut"===o&&l.zoomSettings.resetToInitial&&l.applyZoomReset&&i<=l.initialZoomLevel&&(l.initialCheck=!0,l.zoomPersistence=!1,l.tileTranslatePoint.x=l.initialTileTranslate.x,l.tileTranslatePoint.y=l.initialTileTranslate.y,i=l.tileZoomLevel=l.mapScaleValue=l.initialZoomLevel,l.scale=Math.pow(2,i-1)),l.mapScaleValue=isNaN(l.mapScaleValue)?1:l.mapScaleValue,l.translatePoint.y=(l.tileTranslatePoint.y-.01*l.mapScaleValue)/l.scale,l.translatePoint.x=(l.tileTranslatePoint.x-.01*l.mapScaleValue)/l.scale,this.triggerZoomEvent(m,r,o))l.translatePoint=l.tileTranslatePoint=new _(0,0),l.scale=l.previousScale,l.tileZoomLevel=r,l.zoomSettings.zoomFactor=l.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(l),l.mapLayerPanel.generateTiles(i,l.tileTranslatePoint,o+"wheel",null,e);var c=0===this.maps.layersCollection[0].animationDuration&&"Enable"===t.animationMode?1e3:this.maps.layersCollection[0].animationDuration;setTimeout((function(){a.applyTransform(a.maps,n),document.getElementById(a.maps.element.id+"_LayerIndex_1")&&(document.getElementById(a.maps.element.id+"_LayerIndex_1").style.display="block")}),c)}}else{var u=l.mapAreaRect,g=l.baseMapRectBounds.min,y=l.baseMapRectBounds.max,f=Math.abs(g.x-y.x),b=Math.abs(g.y-y.y),v=void 0,S=void 0;if(i<1.2&&"Eckert5"!==l.projectionType)0!==f&&0!==b&&f!==b||(f=u.width/2,b=u.height),i=(i=parseFloat(Math.min(u.width/f,u.height/b).toFixed(2)))>1.05?1:i,l.translatePoint=this.calculateInitalZoomTranslatePoint(i,f,b,u,g,l);else{var x=l.translatePoint;v=x.x-(u.width/h-u.width/i)/(u.width/e.x),S=x.y-(u.height/h-u.height/i)/(u.height/e.y);var O=Math.abs(l.baseMapRectBounds.max.y-l.baseMapRectBounds.min.y)*i;v=O<l.mapAreaRect.height?u.x+(-g.x+(u.width/2-f/2)):v,S=O<l.mapAreaRect.height?u.y+(-g.y+(u.height/2-b/2)):S,l.translatePoint=new _(v,S)}l.scale=i,l.zoomTranslatePoint=l.translatePoint,this.triggerZoomEvent(m,r,o)?(l.translatePoint=l.previousPoint,l.scale=l.mapScaleValue=l.previousScale):this.applyTransform(l,n)}this.triggerZoomComplete(l,r,o)}this.maps.zoomNotApplied=!1,this.maps.isDevice&&this.removeToolbarOpacity(l.isTileMap?Math.round(l.tileZoomLevel):l.scale,l.element.id+"_Zooming_")},e.prototype.calculateInitalZoomTranslatePoint=function(e,t,i,o,n,a){t*=e,i*=e;var l=0!==n.x&&"layers"===a.translateType?a.availableSize.width-o.width:0,r=o.x+(-n.x+(o.width/2-t/2))-l,s=o.y+(-n.y+(o.height/2-i/2));return new _(r,s)},e.prototype.triggerZoomEvent=function(e,i,o){var n,a=this.maps;a.isTileMap&&(a.mapScaleValue=(0,t.isNullOrUndefined)(a.mapScaleValue)?1:a.mapScaleValue,a.translatePoint.y=(a.tileTranslatePoint.y-.01*a.mapScaleValue)/a.scale,a.translatePoint.x=(a.tileTranslatePoint.x-.01*a.mapScaleValue)/a.scale);var l=this.maps.getMinMaxLatitudeLongitude();return n=a.isTileMap?{cancel:!1,name:"zoom",type:o,maps:a,tileTranslatePoint:{previous:e,current:a.tileTranslatePoint},translatePoint:{previous:a.previousPoint,current:a.translatePoint},tileZoomLevel:{previous:i,current:a.tileZoomLevel},scale:{previous:a.previousScale,current:a.scale},minLatitude:l.minLatitude,maxLatitude:l.maxLatitude,minLongitude:l.minLongitude,maxLongitude:l.maxLongitude}:{cancel:!1,name:"zoom",type:o,maps:a,tileTranslatePoint:{},translatePoint:{previous:a.previousPoint,current:a.translatePoint},tileZoomLevel:{},scale:{previous:a.previousScale,current:a.scale},minLatitude:l.minLatitude,maxLatitude:l.maxLatitude,minLongitude:l.minLongitude,maxLongitude:l.maxLongitude},a.trigger("zoom",n),n.cancel},e.prototype.getTileTranslatePosition=function(e,t,i,o){var n=this.maps,a="ZoomOut"===o?10:"Reset"===o&&t>1?0:10,l=n.availableSize,r=256*Math.pow(2,e),s=256*Math.pow(2,t),d=(i.x-n.tileTranslatePoint.x)/r*100,p=(i.y-n.tileTranslatePoint.y)/r*100;n.tileTranslatePoint.x=1===t?l.width/2-256:i.x-d*s/100,n.tileTranslatePoint.y=1===t?l.height/2-256+2*a: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,n=e.tileTranslatePoint,a=this.zoomingRect,l=e.zoomSettings.maxZoom,r=e.zoomSettings.minZoom;if(a.height>0&&a.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/a.width+t.height/a.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(n,o,""))?(e.translatePoint=e.tileTranslatePoint=new _(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/a.width+t.height/a.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 _(c,u)}e.scale=p<this.maps.zoomSettings.maxZoom?p:this.maps.zoomSettings.maxZoom,(i=this.triggerZoomEvent(n,o,""))&&(e.translatePoint=e.previousPoint,e.scale=e.previousScale),e.zoomTranslatePoint=e.translatePoint}i||(e.mapScaleValue=p,this.applyTransform(e,!1,!0),this.maps.zoomNotApplied=!1,this.zoomingRect=null)}this.isZoomFinal=this.isZoomSelection&&Math.round(e.scale)===this.maps.zoomSettings.maxZoom,this.triggerZoomComplete(e,o,""),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,o=this.maps,n=o.tileZoomLevel,a=this.pinchFactor,l=o.tileTranslatePoint;if(this.maps.mergeCluster(),o.isTileMap){h=this.getTouchCenterPoint();var r=Math.sqrt(Math.pow(this.touchMoveList[0].pageX-this.touchMoveList[1].pageX,2)+Math.pow(this.touchMoveList[0].pageY-this.touchMoveList[1].pageY,2)),s=o.tileZoomLevel;(0,t.isNullOrUndefined)(this.pinchDistance)||(this.pinchDistance>r?s-=1:this.pinchDistance<r&&(s+=1),(s=Math.min(this.maps.zoomSettings.maxZoom,Math.max(this.maps.zoomSettings.minZoom,s)))!==o.tileZoomLevel&&(this.pinchFactor=s,o.previousScale=o.scale,o.tileZoomLevel=this.pinchFactor,o.scale=Math.pow(2,o.tileZoomLevel-1),this.getTileTranslatePosition(n,this.pinchFactor,{x:h.x,y:h.y},null),o.translatePoint.x=(o.tileTranslatePoint.x-.01*o.scale)/o.scale,o.translatePoint.y=(o.tileTranslatePoint.y-.01*o.scale)/o.scale,(i=this.triggerZoomEvent(l,n,""))?(o.translatePoint=o.tileTranslatePoint=new _(0,0),o.scale=o.previousScale,o.tileZoomLevel=n,o.zoomSettings.zoomFactor=o.previousScale):o.mapLayerPanel.generateTiles(s,o.tileTranslatePoint))),this.pinchDistance=r}else{var d=o.mapAreaRect;o.isMarkerZoomCompleted=!1,o.previousScale=o.scale,o.previousPoint=o.translatePoint,o.previousProjection=o.projectionType;var p=ct(this.touchStartList,this.touchMoveList),h=yt(gt(this.touchMoveList,this.maps)),m=p/this.lastScale;this.lastScale=p,this.pinchFactor*=m,this.pinchFactor=Math.min(this.maps.zoomSettings.maxZoom,Math.max(this.pinchFactor,this.maps.zoomSettings.minZoom));var c=o.baseMapRectBounds.min,u=o.baseMapRectBounds.max,g=Math.abs(c.y-u.y),y=Math.abs(c.x-u.x),f=o.translatePoint,b=void 0,v=void 0;if(a<1.2&&"Eckert5"!==o.projectionType)0!==y&&0!==g&&y!==g||(y=d.width/2,g=d.height),a=(a=parseFloat(Math.min(d.width/y,d.height/g).toFixed(2)))>1.05?1:a,o.translatePoint=this.calculateInitalZoomTranslatePoint(a,y,g,d,c,o);else{var S=Math.abs(o.baseMapRectBounds.max.y-o.baseMapRectBounds.min.y)*a;b=f.x-(d.width/o.scale-d.width/a)/(d.width/h.x),v=f.y-(d.height/o.scale-d.height/a)/(d.height/h.y),b=S<o.mapAreaRect.height?d.x+(-c.x+(d.width/2-y/2)):b,v=S<o.mapAreaRect.height?d.y+(-c.y+(d.height/2-g/2)):v,o.translatePoint=new _(b,v)}o.scale=a,(i=this.triggerZoomEvent(l,n,""))&&(o.translatePoint=o.previousPoint,o.scale=o.previousScale)}o.mapScaleValue=a,i||this.applyTransform(o),this.triggerZoomComplete(o,n,""),t.Browser.isDevice&&this.removeToolbarOpacity(o.isTileMap?Math.round(o.tileZoomLevel):o.scale,o.element.id+"_Zooming_")},e.prototype.getTouchCenterPoint=function(){for(var e=[],t=0;t<this.touchMoveList.length;t++)e.push(this.getMousePosition(this.touchMoveList[t].pageX,this.touchMoveList[t].pageY));return{x:(e[0].x+e[1].x)/2,y:(e[0].y+e[1].y)/2}},e.prototype.triggerZoomComplete=function(e,i,o){if(e.zoomSettings.enable){var n=void 0;e.isTileMap&&(e.mapScaleValue=(0,t.isNullOrUndefined)(e.mapScaleValue)?1:e.mapScaleValue,e.translatePoint.y=(e.tileTranslatePoint.y-.01*e.mapScaleValue)/e.scale,e.translatePoint.x=(e.tileTranslatePoint.x-.01*e.mapScaleValue)/e.scale);var a=this.maps.getMinMaxLatitudeLongitude();n=e.isTileMap?{cancel:!1,name:"zoomComplete",type:o,maps:e,tileTranslatePoint:{previous:e.tileTranslatePoint,current:e.tileTranslatePoint},translatePoint:{previous:e.previousPoint,current:e.translatePoint},tileZoomLevel:{previous:i,current:e.tileZoomLevel},scale:{previous:e.previousScale,current:e.scale},minLatitude:a.minLatitude,maxLatitude:a.maxLatitude,minLongitude:a.minLongitude,maxLongitude:a.maxLongitude}:{cancel:!1,name:"zoomComplete",type:o,maps:e,tileTranslatePoint:{},translatePoint:{previous:e.previousPoint,current:e.translatePoint},tileZoomLevel:{},scale:{previous:e.previousScale,current:e.scale},minLatitude:a.minLatitude,maxLatitude:a.maxLatitude,minLongitude:a.minLongitude,maxLongitude:a.maxLongitude},this.maps.trigger("zoomComplete",n)}},e.prototype.drawZoomRectangle=function(){var e=this.maps,t=this.mouseDownPoints,i=this.mouseMovePoints,o={width:1,color:this.maps.themeStyle.rectangleZoomBorderColor},n=Math.abs(i.x-t.x),a=Math.abs(i.y-t.y),l=i.x>t.x?t.x:t.x-n,r=i.y>t.y?t.y:t.y-a;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 R(l,r,n,a);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 E(e.element.id+"_ZoomRect",this.maps.themeStyle.rectangleZoomFillColor,o,this.maps.themeStyle.rectangleZoomFillOpacity,this.zoomingRect,0,0,"","3");s.appendChild(e.renderer.drawRectangle(d)),Re(e.element.id+"_Secondary_Element").appendChild(s)}},e.prototype.animateTransform=function(e,i,o,n,a){var l=0===this.currentLayer.animationDuration&&"Enable"===t.animationMode?1e3:this.currentLayer.animationDuration;i&&0!==l&&!this.maps.isTileMap?this.maps.isTileMap||bt(e,0,l,new Z(o,n),a,this.maps.mapAreaRect,this.maps):this.maps.isTileMap&&e.id.indexOf("_Polygons_Group")>-1||e.setAttribute("transform","scale("+a+") translate( "+o+" "+n+" )")},e.prototype.applyTransform=function(e,i,o,n){var a,l,r=this;this.templateCount=0;var s=e.scale,d=e.translatePoint.x,p=e.translatePoint.y,h=0;if(e.zoomShapeCollection=[],this.isPanningInProgress=n||!1,document.getElementById(e.element.id+"_mapsTooltip")&&Be(e.element.id+"_mapsTooltip"),e.isTileMap){var m=document.getElementById(e.element.id+"_svg");if(m)for(var c=0;c<e.layers.length;c++){var g=m.querySelector("#"+e.element.id+"_LayerIndex_"+c);g&&m.removeChild(g)}}if(this.layerCollectionEle){for(var y=function(m){var c=f.layerCollectionEle.childNodes[m];if("g"===c.tagName){f.templateCount++,f.index=c.id.indexOf("_LayerIndex_")>-1&&parseFloat(c.id.split("_LayerIndex_")[1].split("_")[0]),f.currentLayer=e.layersCollection[f.index];for(var g=e.mapLayerPanel.calculateFactor(f.currentLayer),y=c.childElementCount,b=document.getElementById(e.element.id+"_LayerIndex_"+f.index+"_Markers_Template_Group"),v=function(m){var y=c.childNodes[m];if(y.id.indexOf("_Markers_Group")>-1||y.id.indexOf("_bubble_Group")>-1||y.id.indexOf("_dataLableIndex_Group")>-1){if(y.id.indexOf("_Markers_Group")>-1){if(!(f.isPanModeEnabled&&n||(0,t.isNullOrUndefined)(y.childNodes[0])&&(0,t.isNullOrUndefined)(b.childNodes[0]))){var v=(0,t.isNullOrUndefined)(y.childNodes[0])?b.childNodes[0]:y.childNodes[0];f.markerTranslates(v,g,d,p,s,"Marker",c)}if(y=c.childNodes[m],!(0,t.isNullOrUndefined)(y)&&-1!==y.id.indexOf("Markers")&&(Array.prototype.forEach.call(y.childNodes,(function(n,a){r.markerTranslate(n,g,d,p,s,"Marker",o);var h=parseInt(n.id.split("_dataIndex_")[1].split("_")[0],10),m=parseInt(n.id.split("_MarkerIndex_")[1].split("_")[0],10);if(r.currentLayer.markerSettings[m].initialMarkerSelection.length>0)for(var c=r.currentLayer.markerSettings[m].dataSource[h],u=0;u<r.currentLayer.markerSettings[m].initialMarkerSelection.length;u++)r.currentLayer.markerSettings[m].initialMarkerSelection[u].latitude!==c.latitude&&r.currentLayer.markerSettings[m].initialMarkerSelection[u].longitude!==c.longitude||e.markerSelection(r.currentLayer.markerSettings[m].selectionSettings,e,y.children[a],r.currentLayer.markerSettings[m].dataSource[h]);(r.currentLayer.animationDuration>0||"Enable"===t.animationMode||(e.layersCollection[0].animationDuration>0||"Enable"===t.animationMode)&&"SubLayer"===r.currentLayer.type)&&!r.isPanModeEnabled&&(e.isTileMap||(l=i?l:"visibility:hidden",(0,t.isNullOrUndefined)(l)||(y.style.cssText=l)))})),f.isPanModeEnabled&&e.markerModule.sameMarkerData.length>0?ae(e.markerModule.sameMarkerData,e,y,!0):e.markerModule.sameMarkerData.length>0&&(e.markerModule.sameMarkerData=[],document.getElementById(e.element.id+"_mapsTooltip")&&Be(e.element.id+"_mapsTooltip")),document.getElementById(e.element.id+"_mapsTooltip")&&e.mapsTooltipModule.tooltipTargetID.indexOf("_MarkerIndex_")&&!f.isPanModeEnabled)){var S=e.mapsTooltipModule,x=y.querySelector("#"+S.tooltipTargetID);if(!(0,t.isNullOrUndefined)(x))if("hidden"===x.style.visibility)Be(e.element.id+"_mapsTooltip");else{var O=parseFloat(x.getAttribute("transform").split("(")[1].split(")")[0].split(" ")[1]),C=parseFloat(x.getAttribute("transform").split("(")[1].split(")")[0].split(" ")[2]);e.isTileMap&&(O+=+He(e.element.id+"_tile_parent").style.left.split("px")[0],C+=+He(e.element.id+"_tile_parent").style.top.split("px")[0]),S.svgTooltip.location.x=O,S.svgTooltip.location.y=C,S.svgTooltip.enableAnimation=!1}}}else if(y.id.indexOf("_bubble_Group")>-1)for(var _=void 0,M=0;M<y.childElementCount;M++){_=y.childNodes[M],a=parseFloat(_.id.split("_LayerIndex_")[1].split("_")[0]);for(var L=parseFloat(_.id.split("_BubbleIndex_")[1].split("_")[0]),P=parseFloat(_.id.split("_BubbleIndex_")[1].split("_")[2]),w=0;w<e.bubbleModule.bubbleCollection.length;w++){var F=e.bubbleModule.bubbleCollection[w];if(F.LayerIndex===a&&F.BubbleIndex===L&&F.DataIndex===P){var I=F.center.x,k=F.center.y,N=(I+d)*s,E=(k+p)*s,z=0===f.currentLayer.animationDuration&&"Enable"===t.animationMode?1e3:f.currentLayer.animationDuration;o&&0!==z?Lt(_,0,z,new Z(N,E)):_.setAttribute("transform","translate( "+N+" "+E+" )");break}}}else if(y.id.indexOf("_dataLableIndex_Group")>-1&&!(0,t.isNullOrUndefined)(e.layers[f.index])){e.zoomLabelPositions=[],e.zoomLabelPositions=e.dataLabelModule.dataLabelCollections;var B=!e.isTileMap&&o,A=[];Array.prototype.forEach.call(y.childNodes,(function(i,o){if(y.childNodes[o].id.indexOf("_LabelIndex_")>-1){var a=parseFloat(y.childNodes[o].id.split("_LabelIndex_")[1].split("_")[0]),l=y.childNodes[o].id;e.zoomShapeCollection.push(l),r.dataLabelTranslate(y.childNodes[o],g,d,p,s,"DataLabel",B,h,n,A),h++;var m=e.layers[r.index].dataLabelSettings.border;if(o>0&&m.width>1&&y.childNodes[o-1].id.indexOf("_rectIndex_")>-1&&!(0,t.isNullOrUndefined)(e.zoomLabelPositions[a])){var c=(e.zoomLabelPositions[a].location.x+d)*s,u=(e.zoomLabelPositions[a].location.y+p)*s,f=T(y.childNodes[o].textContent,e.layers[r.index].dataLabelSettings.textStyle),b=y.childNodes[o-1],v=c-f.width/2,S=u-f.height/2-5;b.setAttribute("x",v),b.setAttribute("y",S)}}}))}}else e.isTileMap&&y.id.indexOf("_line_Group")>-1?(y.remove(),c.children.length>0&&c.children[0]?c.insertBefore(e.navigationLineModule.renderNavigation(f.currentLayer,e.tileZoomLevel,f.index),c.children[1]):c.appendChild(e.navigationLineModule.renderNavigation(f.currentLayer,e.tileZoomLevel,f.index))):e.isTileMap&&y.id.indexOf("_Polygons_Group")>-1?f.currentLayer.polygonSettings.polygons.length>0&&(f.currentLayer.polygonSettings.polygons.map((function(i,o){var n=i.points,a=u(e,e.tileZoomLevel,r.currentLayer,n),l=document.getElementById(e.element.id+"_LayerIndex_"+r.index+"_PolygonIndex_"+o);(0,t.isNullOrUndefined)(l)||l.setAttribute("d",a)})),document.getElementById(e.element.id+"_LayerIndex_"+f.index+"_Polygons_Group").style.visibility=""):-1===y.id.indexOf("Legend")&&(pt(y,f.index,s,e),e.zoomTranslatePoint=e.translatePoint,f.animateTransform(y,o,d,p,s))},S=0;S<y;S++)v(S)}e.arrangeTemplate()},f=this,b=0;b<this.layerCollectionEle.childElementCount;b++)y(b);(0,t.isNullOrUndefined)(this.currentLayer)||o&&0!==this.currentLayer.animationDuration&&!e.isTileMap||this.processTemplate(d,p,s,e)}},e.prototype.markerTranslates=function(e,i,o,n,a,l,r){var s=this,d=0,p=0,h=0,m=parseInt((e||r).id.split("_LayerIndex_")[1].split("_")[0],10),u=this.maps.renderer.createGroup({id:this.maps.element.id+"_Markers_Group",class:"GroupElement"});u.style.pointerEvents="auto",document.getElementById(u.id)&&Be(u.id);var y=this.maps.mapAreaRect,f=(0,t.createElement)("div",{id:this.maps.element.id+"_LayerIndex_"+m+"_Markers_Template_Group",className:"template"});f.style.cssText="overflow: hidden; position: absolute;pointer-events: none;top:"+y.y+"px;left:"+y.x+"px;height:"+y.height+"px;width:"+y.width+"px;",document.getElementById(f.id)&&Be(f.id);var b=this.maps.layersCollection[m],v=this.maps.markerModule.allowInnerClusterSetting(b);Array.prototype.forEach.call(b.markerSettings,(function(e,y){h=0,p=0;var S=e.dataSource;(0,t.isNullOrUndefined)(S)||Array.prototype.forEach.call(S,(function(x,O){s.maps.markerNullCount=y>=0&&0===O?0:s.maps.markerNullCount;var C={template:e.template,data:x,maps:s.maps,marker:e,cancel:!1,name:Ti,fill:e.fill,colorValuePath:e.colorValuePath,shapeValuePath:e.shapeValuePath,height:(0,t.isNullOrUndefined)(e.heightValuePath)||(0,t.isNullOrUndefined)(x[e.heightValuePath])?e.height:x[e.heightValuePath],width:(0,t.isNullOrUndefined)(e.widthValuePath)||(0,t.isNullOrUndefined)(x[e.widthValuePath])?e.width:x[e.widthValuePath],imageUrl:e.imageUrl,imageUrlValuePath:e.imageUrlValuePath,shape:e.shape,border:e.border};C=J(C=Q(C,x),x),s.maps.trigger("markerRendering",C,(function(_){e.shapeValuePath!==C.shapeValuePath&&(C=Q(C,x)),e.colorValuePath!==C.colorValuePath&&(C=J(C,x));var M=(0,t.isNullOrUndefined)(e.latitudeValuePath)?(0,t.isNullOrUndefined)(x.latitude)?(0,t.isNullOrUndefined)(x.Latitude)?null:x.Latitude:parseFloat(x.latitude):Number(Y(x,e.latitudeValuePath)),L=(0,t.isNullOrUndefined)(e.longitudeValuePath)?(0,t.isNullOrUndefined)(x.longitude)?(0,t.isNullOrUndefined)(x.Longitude)?null:x.Longitude:parseFloat(x.longitude):Number(Y(x,e.longitudeValuePath)),P=e.offset;if(!C.cancel&&e.visible&&!(0,t.isNullOrUndefined)(L)&&!(0,t.isNullOrUndefined)(M)){var w=s.maps.element.id+"_LayerIndex_"+m+"_MarkerIndex_"+y+"_dataIndex_"+O,T=s.maps.isTileMap?g(new Z(L,M),s.maps.tileZoomLevel,s.maps.tileTranslatePoint,!0):c(M,L,i,b,s.maps),F={x:o,y:n};!C.template||isNaN(T.x)||isNaN(T.y)?C.template||isNaN(T.x)||isNaN(T.y)||(p++,le(C,e,S,O,T,F,w,P,a,s.maps,u)):(h++,re(C,undefined,w,x,y,f,T,F,a,P,s.maps))}d+=isNaN(M)||isNaN(L)?1:0,h+=C.cancel?1:0,p+=C.cancel?1:0,s.maps.markerNullCount=(0,t.isNullOrUndefined)(M)||(0,t.isNullOrUndefined)(L)?s.maps.markerNullCount+1:s.maps.markerNullCount;var I=S.length-s.maps.markerNullCount,k=!1;if((e.clusterSettings.allowClustering||b.markerClusterSettings.allowClustering&&b.markerSettings.length>1?u.querySelectorAll("[id*='LayerIndex_"+m+"_MarkerIndex_"+y+"']:not([id*='_Group'])"):u.childNodes).length===I-h-d&&"Template"!==l){if(s.maps.isTileMap){var N=document.getElementById(s.maps.element.id+"_LayerIndex_"+m+"_Polygons_Group"),E=document.getElementById(s.maps.element.id+"_LayerIndex_"+m+"_Polygon_Group");(0,t.isNullOrUndefined)(N)?(0,t.isNullOrUndefined)(E)?r.insertBefore(u,r.firstElementChild):E.insertAdjacentElement("afterend",u):N.insertAdjacentElement("afterend",u)}else r.appendChild(u);(b.markerSettings[y].clusterSettings.allowClustering||!v&&b.markerClusterSettings.allowClustering)&&(s.maps.svgObject.appendChild(u),s.maps.element.appendChild(s.maps.svgObject),k=te(b,u,s.maps,m,y,u,r,!0,!0,null,v))}(e.clusterSettings.allowClustering||b.markerClusterSettings.allowClustering&&b.markerSettings.length>1?f.querySelectorAll("[id*='LayerIndex_"+m+"_MarkerIndex_"+y+"']:not([id*='_Group'])"):f.childNodes).length===I-p-d&&Re(s.maps.element.id+"_Secondary_Element")&&(Re(s.maps.element.id+"_Secondary_Element").appendChild(f),a>=1&&(e.clusterSettings.allowClustering||!v&&b.markerClusterSettings.allowClustering)&&!k&&te(b,f,s.maps,m,y,u,r,!1,!0,null,v))}))}))}))},e.prototype.processTemplate=function(e,i,o,n){for(var a=0,l=0;l<this.templateCount;l++){var r=n.mapLayerPanel.calculateFactor(this.currentLayer),s=Re(n.element.id+"_LayerIndex_"+l+"_Markers_Template_Group"),d=Re(n.element.id+"_LayerIndex_"+l+"_Label_Template_Group"),p=Re(n.element.id+"_LayerIndex_"+l+"_Polygons_Group");if(!(0,t.isNullOrUndefined)(s)&&s.childElementCount>0){s.style.visibility="visible";for(var h=0;h<s.childElementCount;h++)this.markerTranslate(s.childNodes[h],r,e,i,o,"Template")}if(!(0,t.isNullOrUndefined)(d)&&d.childElementCount>0)for(h=0;h<d.childElementCount;h++)this.dataLabelTranslate(d.childNodes[h],r,e,i,o,"Template",!1,a),a++;if(!(0,t.isNullOrUndefined)(p))for(h=0;h<p.childElementCount;h++){var m=n.layersCollection[l].polygonSettings.polygons[h].borderWidth;p.childNodes[h].childNodes[0].setAttribute("stroke-width",(m/o).toString())}}},e.prototype.dataLabelTranslate=function(e,i,o,n,a,l,r,s,d,p){void 0===r&&(r=!1);var h,m,c,u,g,y=this.maps.dataLabelModule.dataLabelCollections,f=this.maps.layers[this.index].dataLabelSettings.textStyle,b=parseFloat(e.id.split("_LayerIndex_")[1].split("_")[0]),v=parseFloat(e.id.split("_shapeIndex_")[1].split("_")[0]);e.id.indexOf("_LabelIndex_")>-1&&(g=parseFloat(e.id.split("_LabelIndex_")[1].split("_")[0]));var S=0===this.currentLayer.animationDuration&&"Enable"===t.animationMode?1e3:this.currentLayer.animationDuration,x=y[s],O=s;if(x.layerIndex===b&&x.shapeIndex===v&&x.labelIndex===g){var C=x.location.x,_=x.location.y;if("Template"===l){var M=0,L=0;if(this.maps.isTileMap)M=(C+o)*a-(u=T(c=x.dataLabelText,f)).width/2,L=(_+n)*a-u.height;else{var P=Re(this.maps.element.id+"_Layer_Collections");C=Math.abs(this.maps.baseMapRectBounds.min.x-C)*a,_=Math.abs(this.maps.baseMapRectBounds.min.y-_)*a;var w=P.getBoundingClientRect(),I=e.parentElement.getBoundingClientRect();M=C+(w.left-I.left),L=_+(w.top-I.top)}e.style.left=M+"px",e.style.top=L+"px"}else{if(C=(C+o)*a,_=(_+n)*a,c=x.dataLabelText,r&&0!==S||e.setAttribute("transform","translate( "+C+" "+_+" )"),((0,t.isNullOrUndefined)(d)||!d)&&("None"!==this.maps.layers[this.index].dataLabelSettings.smartLabelMode||"None"!==this.maps.layers[this.index].dataLabelSettings.intersectionAction)){var k=_-(u=F(c,f)).height/2,N=_+u.height/2,E={rightWidth:C+u.width/2,leftWidth:C-u.width/2,heightTop:k,heightBottom:N};"Hide"===this.maps.layers[this.index].dataLabelSettings.smartLabelMode&&(a>1?(h=this.maps.dataLabelShape[O]*a>=u.width?c:"",e.textContent=h):(h=this.maps.dataLabelShape[O]>=u.width?c:"",e.textContent=h));var z=[];if("Trim"===this.maps.layers[this.index].dataLabelSettings.smartLabelMode&&(a>1?(h=Ee(this.maps.dataLabelShape[O]*a,c,f,u.width,!0,z),e.textContent=h):(h=Ee(this.maps.dataLabelShape[O],c,f,u.width,!0,z),e.textContent=h)),"Hide"===this.maps.layers[this.index].dataLabelSettings.intersectionAction){for(var B=0;B<p.length;B++)if(!(0,t.isNullOrUndefined)(p[B])){if(!(E.leftWidth>p[B].rightWidth||E.rightWidth<p[B].leftWidth||E.heightTop>p[B].heightBottom||E.heightBottom<p[B].heightTop)){h="",e.textContent=h;break}h=(0,t.isNullOrUndefined)(h)?c:h,e.textContent=h}p.push(E)}if("Trim"===this.maps.layers[this.index].dataLabelSettings.intersectionAction){for(var A=0;A<p.length;A++)if(!(0,t.isNullOrUndefined)(p[A]))if(E.rightWidth<p[A].leftWidth||E.leftWidth>p[A].rightWidth||E.heightBottom<p[A].heightTop||E.heightTop>p[A].heightBottom){if(m=(0,t.isNullOrUndefined)(h)?c:h,a>1){var U=z.length>0?z[0]:u.width;m=Ee(this.maps.dataLabelShape[O]*a,m,f,U,!0)}e.textContent=m}else{if(E.leftWidth>p[A].leftWidth){m=Ee((j=p[A].rightWidth-E.leftWidth)-(E.rightWidth-E.leftWidth),h=(0,t.isNullOrUndefined)(h)?c:h,f,U=z.length>0?z[0]:u.width,!0),e.textContent=m;break}if(E.leftWidth<p[A].leftWidth){var j=E.rightWidth-p[A].leftWidth;m=Ee(Math.abs(j-(E.rightWidth-E.leftWidth)),h=(0,t.isNullOrUndefined)(h)?c:h,f,U=z.length>0?z[0]:u.width,!0),e.textContent=m;break}}p.push(E),(0,t.isNullOrUndefined)(m)&&(m=Ee(this.maps.dataLabelShape[O]*a,c,f,u.width,!0),e.textContent=m)}}(r||S>0)&&Lt(e,0,S,new Z(C,_))}}},e.prototype.markerTranslate=function(e,i,o,n,a,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),h=this.maps.layersCollection[s],m=h.markerSettings[d];if(!(0,t.isNullOrUndefined)(m)&&!(0,t.isNullOrUndefined)(m.dataSource)&&!(0,t.isNullOrUndefined)(m.dataSource[p])){var u=(0,t.isNullOrUndefined)(m.longitudeValuePath)?(0,t.isNullOrUndefined)(m.dataSource[p].longitude)?(0,t.isNullOrUndefined)(m.dataSource[p].Longitude)?0:parseFloat(m.dataSource[p].Longitude):parseFloat(m.dataSource[p].longitude):Number(Y(m.dataSource[p],m.longitudeValuePath)),y=(0,t.isNullOrUndefined)(m.latitudeValuePath)?(0,t.isNullOrUndefined)(m.dataSource[p].latitude)?(0,t.isNullOrUndefined)(m.dataSource[p].Latitude)?0:parseFloat(m.dataSource[p].Latitude):parseFloat(m.dataSource[p].latitude):Number(Y(m.dataSource[p],m.latitudeValuePath)),f=0===this.currentLayer.animationDuration&&"Enable"===t.animationMode?1e3:this.currentLayer.animationDuration,b=this.maps.isTileMap?g(new _(u,y),this.maps.tileZoomLevel,this.maps.tileTranslatePoint,!0):c(y,u,i,h,this.maps);if(this.maps.isTileMap)"Template"===l?(e.style.left=b.x+m.offset.x+"px",e.style.top=b.y+m.offset.y+"px"):(b.x+=m.offset.x,b.y+=m.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)*a,b.y=Math.abs(this.maps.baseMapRectBounds.min.y-b.y)*a;var v=Re(this.maps.element.id+"_Layer_Collections").getBoundingClientRect(),S=e.parentElement.getBoundingClientRect();e.style.left=b.x+(v.left-S.left)+m.offset.x+"px",e.style.top=b.y+(v.top-S.top)+m.offset.y+"px",e.style.transform="translate(-50%, -50%)"}else e.style.left=(b.x+o)*a+m.offset.x-this.maps.mapAreaRect.x+"px",e.style.top=(b.y+n)*a+m.offset.y-this.maps.mapAreaRect.y+"px";else b.x=(b.x+o)*a+m.offset.x,b.y=(b.y+n)*a+m.offset.y,r&&0!==f?Lt(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=Re(this.maps.element.id+"_LayerIndex_"+i+"_Markers_Template_Group"),n=Re(this.maps.element.id+"_LayerIndex_"+i+"_line_Group"),a=Re(this.maps.element.id+"_LayerIndex_"+i+"_Polygons_Group");(0,t.isNullOrUndefined)(o)||(o.style.visibility="hidden"),(0,t.isNullOrUndefined)(n)||(n.style.visibility="hidden"),(0,t.isNullOrUndefined)(a)||(a.style.visibility="hidden")}},e.prototype.panning=function(e,i,o,n){var a,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;i=(0,t.isNullOrUndefined)(i)?r.x-s.x:i,o=(0,t.isNullOrUndefined)(o)?r.y-s.y:o;var u=n.type.indexOf("mouse")>-1||n.type.indexOf("key")>-1?n.layerX:n.touches[0].pageX,g=n.type.indexOf("mouse")>-1||n.type.indexOf("key")>-1?n.layerY:n.touches[0].pageY;if(this.maps.mergeCluster(),l.isTileMap){if(this.maps.tileZoomLevel>1){p=l.tileTranslatePoint.x-i,h=l.tileTranslatePoint.y-o,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/l.scale,l.translatePoint.y=l.tileTranslatePoint.y/l.scale;var y=this.maps.getTileGeoLocation(u,g);L=this.maps.getMinMaxLatitudeLongitude();a={cancel:!1,name:Ki,maps:l,tileTranslatePoint:{previous:c,current:l.tileTranslatePoint},translatePoint:{previous:m,current:l.translatePoint},scale:l.scale,tileZoomLevel:l.tileZoomLevel,latitude:y.latitude,longitude:y.longitude,minLatitude:L.minLatitude,maxLatitude:L.maxLatitude,minLongitude:L.minLongitude,maxLongitude:L.maxLongitude},l.trigger(Ki,a),l.mapLayerPanel.generateTiles(l.tileZoomLevel,l.tileTranslatePoint,"Pan"),this.applyTransform(l,!1,!1,!0),l.translatePoint.x=(l.tileTranslatePoint.x-i)/l.scale,l.translatePoint.y=(l.tileTranslatePoint.y-o)/l.scale}}else{var f=De(l.margin.top),b=document.getElementById(l.element.id+"_Legend_Group"),v=(0,t.isNullOrUndefined)(b)?0:b.getClientRects()[0].height;p=m.x-i/d,h=m.y-o/d;var S=Re(l.element.id+"_Layer_Collections").getBoundingClientRect(),x=Re(l.element.id+"_svg").getBoundingClientRect(),O=i<0?S.left<=x.left+l.mapAreaRect.x:S.left+S.width+l.mapAreaRect.x>=x.width,C=o<0?S.top<=x.top+l.mapAreaRect.y:S.top+S.height+v+f>=x.top+x.height,M=this.maps.getGeoLocation(this.maps.layersCollection.length-1,u,g),L=this.maps.getMinMaxLatitudeLongitude();a={cancel:!1,name:Ki,maps:l,tileTranslatePoint:{},translatePoint:{previous:m,current:new _(p,h)},scale:l.scale,tileZoomLevel:l.tileZoomLevel,latitude:M.latitude,longitude:M.longitude,minLatitude:L.minLatitude,maxLatitude:L.maxLatitude,minLongitude:L.minLongitude,maxLongitude:L.maxLongitude},l.trigger(Ki,a),a.cancel||(O&&C?(l.translatePoint=new _(p,h),this.applyTransform(l,!1,!1,!0)):O?(l.translatePoint=new _(p,l.translatePoint.y),this.applyTransform(l,!1,!1,!0)):C&&(l.translatePoint=new _(l.translatePoint.x,h),this.applyTransform(l,!1,!1,!0))),this.maps.zoomNotApplied=!1}l.zoomTranslatePoint=l.translatePoint,this.mouseDownPoints=this.mouseMovePoints,this.isSingleClick=!1},e.prototype.toolBarZooming=function(e,i){var o=this,n=this.maps;n.initialCheck=n.isMarkerZoomCompleted=!1,n.defaultState="Reset"===i&&1===e&&!(n.zoomSettings.resetToInitial&&n.applyZoomReset)||"ZoomOut"===i&&1===e;var a=n.tileZoomLevel,l=n.previousScale=n.scale;n.markerZoomedState=!1,n.zoomPersistence=n.enablePersistence,n.mapScaleValue=e;var r=n.zoomSettings.maxZoom,s=n.zoomSettings.minZoom,d=n.mapAreaRect,p=n.previousPoint=n.translatePoint,h=n.tileTranslatePoint;if(this.maps.mergeCluster(),n.previousProjection="Reset"===i?void 0:n.projectionType,e="ZoomOut"===i&&1===Math.round(e)?1:e,e=s>(e="Reset"===i?s:0===Math.round(e)?1:e)&&"ZoomIn"===i?s+1:e,!n.isTileMap&&("ZoomIn"===i?e>=s&&Math.round(e)<=r:e>=s||n.isReset)){var m=n.baseMapRectBounds.min,c=n.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"!==n.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,n.translatePoint=this.calculateInitalZoomTranslatePoint(e,u,g,d,m,n);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(n.baseMapRectBounds.max.y-n.baseMapRectBounds.min.y)*e;y=b<n.mapAreaRect.height?d.x+(-m.x+(d.width/2-u/2)):y,f=b<n.mapAreaRect.height?d.y+(-m.y+(d.height/2-g/2)):f,n.translatePoint=new _(y,f)}n.zoomTranslatePoint=n.translatePoint,n.scale=e,this.triggerZoomEvent(h,a,i)?(n.translatePoint=n.zoomTranslatePoint=n.previousPoint,n.scale=n.previousScale):this.applyTransform(n,!1,!0)}else if(n.isTileMap&&(e>=s&&e<=r||n.isReset)){var v=a<s&&!n.isReset?s:e;if(n.scale=Math.pow(2,v-1),n.tileZoomLevel=v,n.previousScale!==n.scale||n.isReset){n.zoomSettings.zoomFactor=e;var S={x:n.availableSize.width/2,y:n.availableSize.height/2};if(this.getTileTranslatePosition(a,v,S,i),(n.zoomSettings.resetToInitial&&n.applyZoomReset&&"Reset"===i||"ZoomOut"===i&&n.zoomSettings.resetToInitial&&n.applyZoomReset&&v<=n.initialZoomLevel)&&(n.initialCheck=!0,n.zoomPersistence=!1,n.tileTranslatePoint.x=n.initialTileTranslate.x,n.tileTranslatePoint.y=n.initialTileTranslate.y,v=n.tileZoomLevel=n.mapScaleValue=n.initialZoomLevel),this.triggerZoomEvent(h,a,i))n.translatePoint=n.tileTranslatePoint=new _(0,0),n.scale=n.previousScale,n.tileZoomLevel=a,n.zoomSettings.zoomFactor=n.previousScale;else{n.translatePoint.y=(n.tileTranslatePoint.y-.01*n.mapScaleValue)/n.scale,n.translatePoint.x=(n.tileTranslatePoint.x-.01*n.mapScaleValue)/n.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(n),n.mapLayerPanel.generateTiles(v,n.tileTranslatePoint,i);var x=0===this.maps.layersCollection[0].animationDuration&&"Enable"===t.animationMode?1e3:this.maps.layersCollection[0].animationDuration;setTimeout((function(){o.applyTransform(o.maps,!1,!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}this.triggerZoomComplete(n,a,i)},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,n=e.zoomSettings.toolbarSettings,a=e.zoomSettings.toolbarSettings.buttonSettings;this.maps.toolbarProperties={toolBarOrientation:n.orientation,highlightColor:a.highlightColor,selectionColor:a.selectionColor,horizontalAlignment:n.horizontalAlignment,verticalAlignment:n.verticalAlignment,color:a.color,shapeOpacity:a.opacity,borderOpacity:a.borderOpacity};var l=a.radius||e.themeStyle.zoomButtonRadius,r=l/4,s=l/4,d=l/2,p=a.padding,h=this.maps.toolbarProperties.toolBarOrientation,m=e.zoomSettings.toolbarSettings.buttonSettings.toolbarItems.map((function(e){return e}));i=l/4+a.borderWidth/2+p,o=l/4+a.borderWidth/2+p;var c=m.length,u="Horizontal"===h?c*l+c*p+p+c*a.borderWidth:l+a.borderWidth+2*p,g="Horizontal"===h?l+a.borderWidth+2*p:c*l+c*p+p+c*a.borderWidth,y=e.renderer.createDefs();y.innerHTML='<filter id="chart_shadow" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="5"/><feOffset dx="-3" dy="4" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="1"/></feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>',this.toolBarGroup.appendChild(y);var f=e.renderer.drawRectangle(new E(e.element.id+"_Zooming_Rect",n.backgroundColor,{color:n.borderColor,width:n.borderWidth,opacity:n.borderOpacity},n.borderOpacity,new R(n.borderWidth/2,n.borderWidth/2,u-n.borderWidth,g-n.borderWidth),0,0));this.toolBarGroup.appendChild(f);for(var b=(l-a.borderWidth/2)/30,v=0;v<m.length;v++){0!==v&&(i="Horizontal"===e.toolbarProperties.toolBarOrientation?i+(l+p)+a.borderWidth:i,o="Horizontal"===e.toolbarProperties.toolBarOrientation?o:o+(l+p)+a.borderWidth);var S=m[v],x=(0,t.isNullOrUndefined)(this.maps.toolbarProperties.color)?this.maps.themeStyle.zoomFillColor:this.maps.toolbarProperties.color,O=a.borderColor||this.maps.themeStyle.zoomBorderColor||this.maps.themeStyle.zoomFillColor;this.currentToolbarEle=e.renderer.createGroup({id:e.element.id+"_Zooming_ToolBar_"+S+"_Group",transform:"translate( "+i+" "+o+" ) "}),this.currentToolbarEle.setAttribute("class","e-maps-toolbar"),this.currentToolbarEle.appendChild(e.renderer.drawCircle(new z(e.element.id+"_Zooming_ToolBar_"+S+"_Rect",a.fill,{color:O,width:a.borderWidth,opacity:a.borderOpacity},a.opacity,r,s,d,"")));var C="",_=a.fill;switch(this.selectionColor=this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor,S.toLowerCase()){case"zoom":var M=void 0,L=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||this.maps.zoomSettings.enablePanning&&this.maps.zoomSettings.enableSelectionZooming?(M=_,L=x):this.maps.zoomSettings.enablePanning||this.maps.zoomSettings.enableSelectionZooming?!this.maps.zoomSettings.enablePanning&&this.maps.zoomSettings.enableSelectionZooming?(M=this.maps.themeStyle.zoomFillColor,L=x):(M=this.selectionColor,L=this.selectionColor):(M=_,L=x);var P=e.renderer.drawPath(new k(e.element.id+"_Zooming_ToolBar_"+S,M,1,L,1,1,null,C+"4.114s-1.828,4.114-4.114,4.114S5.943,8.229,5.943,5.943z"));P.setAttribute("transform","scale( "+b+","+b+" )"),this.currentToolbarEle.appendChild(P),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 w=e.renderer.drawPath(new k(e.element.id+"_Zooming_ToolBar_"+S+"_Path",_,3,x,1,1,null,C));w.setAttribute("transform","scale( "+b+","+b+" )"),this.currentToolbarEle.appendChild(w),this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"zoomout":C="M 0, 8 L 16, 8";var T=e.renderer.drawPath(new k(e.element.id+"_Zooming_ToolBar_"+S,_,3,x,1,1,null,C));T.setAttribute("transform","scale( "+b+","+b+" )"),this.currentToolbarEle.appendChild(T),this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"pan":var F=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?F=this.selectionColor||this.maps.themeStyle.zoomFillColor:this.maps.zoomSettings.enablePanning?F=_||this.maps.themeStyle.zoomFillColor:(F=this.selectionColor||this.maps.themeStyle.zoomFillColor,this.currentToolbarEle.setAttribute("class",""));var I=e.renderer.drawPath(new k(e.element.id+"_Zooming_ToolBar_"+S,F,1,x,1,1,null,C));I.setAttribute("transform","scale( "+b+","+b+" )"),this.currentToolbarEle.appendChild(I),this.panColor=F,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 N=e.renderer.drawPath(new k(e.element.id+"_Zooming_ToolBar_"+S,_,null,x,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"));N.setAttribute("transform","scale( "+b+","+b+" )"),this.currentToolbarEle.appendChild(N),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],n=!0;switch(o.toLowerCase()){case"zoomin":n=(this.maps.isTileMap?this.maps.tileZoomLevel:this.maps.scale)+1<=this.maps.zoomSettings.maxZoom;break;case"zoomout":var a=this.maps.isTileMap?this.maps.tileZoomLevel:this.maps.scale;n="Miller"===this.maps.projectionType||"Winkel3"===this.maps.projectionType||"AitOff"===this.maps.projectionType?Math.round(a)-1>=this.maps.zoomSettings.minZoom:a-1>=this.maps.zoomSettings.minZoom;break;case"reset":n=Math.round(this.maps.isTileMap?this.maps.tileZoomLevel:this.maps.scale)!==this.maps.zoomSettings.minZoom}i&&n?(this.handled=!0,this.performZoomingByToolBar(o)):"mousedown"!==e.type&&"pointerdown"!==e.type||this.handled||!n?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<t.zoomSettings.maxZoom&&(t.staticMapZoom+=1),t.isTileMap&&t.tileZoomLevel>=t.zoomSettings.minZoom&&t.tileZoomLevel<t.zoomSettings.maxZoom?this.toolBarZooming(t.tileZoomLevel+1,"ZoomIn"):t.isTileMap||this.toolBarZooming(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=Re(this.maps.element.id+"_svg");"pan"===e||this.isPanModeEnabled&&"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||(at("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(){Re("EJ2_Map_Toolbar_Tip")&&(0,t.remove)(Re("EJ2_Map_Toolbar_Tip"))},e.prototype.alignToolBar=function(){var e=this.maps,i=(0,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),Re(e.element.id+"_Secondary_Element")&&Re(e.element.id+"_Secondary_Element").appendChild(i);var n=this.toolBarGroup.getBoundingClientRect();o.setAttribute("height",(n.height+e.zoomSettings.toolbarSettings.borderWidth).toString()),o.setAttribute("width",(n.width+e.zoomSettings.toolbarSettings.borderWidth).toString());var a=(0,t.isNullOrUndefined)(e.totalRect)?e.mapAreaRect:e.totalRect,l=0,r=0;switch(e.toolbarProperties.verticalAlignment){case"Near":r=a.y;break;case"Center":r=a.height/2-n.height/2;break;case"Far":r=a.height-n.height-10}switch(e.toolbarProperties.horizontalAlignment){case"Near":l=a.x;break;case"Center":l=a.width/2-n.width/2;break;case"Far":l=(0,t.isNullOrUndefined)(e.legendModule)||"Left"!==e.legendSettings.position?a.width-n.width-10:a.width+a.x-n.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,i){if(!(0,t.isNullOrUndefined)(this.maps)&&this.maps.zoomModule&&this.maps.zoomSettings.enable)if(Re(this.maps.element.id+"_Zooming_KitCollection")&&i.indexOf(this.maps.element.id+"_Zooming_")>-1){this.maps.isDevice?(Re(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 o=this.maps.toolbarProperties.shapeOpacity,n=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?o:.3,this.maps.zoomSettings.enableSelectionZooming?n:.3,o,n,.3,.3,this.maps.zoomSettings.enablePanning?o:.3,this.maps.zoomSettings.enablePanning?n:.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?o:.3,this.maps.zoomSettings.enableSelectionZooming?n:.3,o,n,.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?o:.3,this.maps.zoomSettings.enableSelectionZooming?n:.3,o,n,o,n,this.maps.zoomSettings.enablePanning?o:.3,this.maps.zoomSettings.enablePanning?n:.3,o,n),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,o,n,this.maps.zoomSettings.enablePanning?o:.3,this.maps.zoomSettings.enablePanning?n:.3,o,n),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){Re(this.maps.element.id+e)&&(Re(this.maps.element.id+e).setAttribute("stroke-opacity",i.toString()),Re(this.maps.element.id+e).setAttribute("fill-opacity",i.toString()),Re(this.maps.element.id+t).setAttribute("stroke-opacity",o.toString()),Re(this.maps.element.id+t).setAttribute("fill-opacity",o.toString()))},e.prototype.removeZoomOpacity=function(e,t,i,o,n,a,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",a,n),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,n){Re(this.maps.element.id+"_Zooming_KitCollection")&&(document.getElementById(this.maps.element.id+"_Zooming_ToolBar_ZoomIn_Group")&&Re(this.maps.element.id+"_Zooming_ToolBar_ZoomIn_Group").setAttribute("class",t),document.getElementById(this.maps.element.id+"_Zooming_ToolBar_ZoomOut_Group")&&Re(this.maps.element.id+"_Zooming_ToolBar_ZoomOut_Group").setAttribute("class",i),document.getElementById(this.maps.element.id+"_Zooming_ToolBar_Reset_Group")&&Re(this.maps.element.id+"_Zooming_ToolBar_Reset_Group").setAttribute("class",n),document.getElementById(this.maps.element.id+"_Zooming_ToolBar_Zoom_Group")&&this.maps.zoomSettings.enableSelectionZooming&&Re(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&&Re(this.maps.element.id+"_Zooming_ToolBar_Pan_Group").setAttribute("class",o))},e.prototype.removePanColor=function(e){Re(this.maps.element.id+"_Zooming_ToolBar_Pan_Rect")&&this.maps.zoomSettings.enablePanning&&(Re(this.maps.element.id+"_Zooming_ToolBar_Pan").setAttribute("fill",e),Re(this.maps.element.id+"_Zooming_ToolBar_Pan").setAttribute("stroke",e))},e.prototype.removeZoomColor=function(e){Re(this.maps.element.id+"_Zooming_ToolBar_Zoom_Rect")&&this.maps.zoomSettings.enableSelectionZooming&&(Re(this.maps.element.id+"_Zooming_ToolBar_Zoom").setAttribute("fill","transparent"),Re(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.markerZoomedState=!1,i.zoomPersistence=i.enablePersistence;var o=this.getMousePosition(e.pageX,e.pageY),n=i.tileZoomLevel,a=i.scale,l=i.zoomSettings.maxZoom,r=i.isTileMap?n:a;if(this.maps.mergeCluster(),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 s="mozilla"!==this.browserName||this.isPointer?e.wheelDelta/120>0?"ZoomIn":"ZoomOut":-e.detail/3>0?"ZoomIn":"ZoomOut";"ZoomIn"===s?(i.mapScaleValue=r+1,i.isTileMap?(i.staticMapZoom=i.tileZoomLevel,i.staticMapZoom>0&&i.staticMapZoom<l&&(i.staticMapZoom+=1,this.performZooming(o,r+1,s,!0))):this.performZooming(o,r+1,s,!0)):(i.mapScaleValue=r-1,i.isReset=i.mapScaleValue<1,i.staticMapZoom=i.tileZoomLevel,1===i.mapScaleValue&&(i.markerCenterLatitude=null,i.markerCenterLongitude=null),i.staticMapZoom>1&&i.staticMapZoom<l&&(i.staticMapZoom-=1),this.performZooming(o,r-1,s,!0))}this.removeToolbarOpacity(i.mapScaleValue,this.maps.isDevice?this.maps.element.id+"_Zooming_":(0,t.isNullOrUndefined)(e.target)?this.maps.element.id:e.target.id)}},e.prototype.doubleClick=function(e){var i=e.pageX,o=e.pageY,n=e.target.closest("#"+this.maps.element.id+"_mapsTooltipparent_template");if(this.maps.zoomSettings.enable&&this.maps.zoomSettings.doubleClickZoom&&!(e.target.id.indexOf("_Zooming_")>-1)&&(0,t.isNullOrUndefined)(n)){var a=this.getMousePosition(i,o),l=this.maps,r=l.tileZoomLevel,s=l.scale;l.mapScaleValue=l.mapScaleValue+1;var d=l.isTileMap?r:s;a.x>l.mapAreaRect.x&&a.x<l.mapAreaRect.x+l.mapAreaRect.width&&a.y>l.mapAreaRect.y&&a.y<l.mapAreaRect.y+l.mapAreaRect.height&&this.performZooming(a,d+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].pageX,i=o[0].pageY):(t=e.pageX,i=e.pageY,e.target),this.isTouch||e.preventDefault(),this.maps.zoomSettings.enablePanning?this.isPan=this.isPanModeEnabled=!this.isZoomSelection:this.isPan=this.isPanModeEnabled=this.panColor!==this.selectionColor?this.maps.zoomSettings.enablePanning:this.zoomColor===this.selectionColor,this.mouseDownLatLong={x:t,y:i};var n=this.maps.isTileMap?Math.round(this.maps.tileZoomLevel):Math.round(this.maps.mapScaleValue);this.rectZoomingStart=this.isZoomSelection&&n<this.maps.zoomSettings.maxZoom&&this.maps.zoomSettings.enable,this.mouseDownPoints=this.getMousePosition(t,i),this.isTouch&&null!==o&&(this.firstMove=!0,this.pinchFactor=this.maps.scale,this.fingers=o.length),this.isSingleClick=!0},e.prototype.mouseMoveHandler=function(e){var i,o,n,a=this.maps,l=null,r=this.maps.zoomSettings;if("touchmove"===e.type?(this.isTouch=!0,n=e.target,i=(l=e.touches)[0].pageX,o=l[0].pageY):(i=e.pageX,o=e.pageY,n=e.target),Re(a.element.id+"_Zooming_KitCollection")&&(n.id.indexOf("_Zooming_")>-1?Re(a.element.id+"_Zooming_KitCollection").setAttribute("opacity","1"):a.isDevice||Re(a.element.id+"_Zooming_KitCollection").setAttribute("opacity","fluentdark"===a.theme.toLowerCase()?"0.6":"0.3")),this.isTouch&&this.maps.zoomSettings.pinchZooming&&null!==l&&(this.firstMove&&2===l.length?(this.rectZoomingStart=!1,this.updateInteraction(),this.touchStartList=mt(e)):2===l.length&&2===this.touchStartList.length&&(this.touchMoveList=mt(e),e.preventDefault(),this.rectZoomingStart=!1,this.performPinchZooming(e)),this.firstMove=!1),this.mouseMovePoints=this.getMousePosition(i,o),r.enable&&this.isPanModeEnabled&&-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?null!==l&&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){if(this.rectZoomingStart=!1,this.isSingleClick=!!this.isSingleClick,this.isTouch=!1,this.touchStartList=[],this.touchMoveList=[],this.lastScale=1,this.maps.element.style.cursor="auto",this.isPanModeEnabled&&this.maps.zoomSettings.enablePanning&&!(0,t.isNullOrUndefined)(this.maps.previousPoint)&&(this.maps.isTileMap?this.isPanningInProgress:this.maps.translatePoint.x!==this.maps.previousPoint.x&&this.maps.translatePoint.y!==this.maps.previousPoint.y)){var i=void 0,o=void 0,n=0,a=0,l=e.target;if(-1!==e.type.indexOf("touch")){var r=e;n=i=r.changedTouches[0].pageX,a=(o=r.changedTouches[0].pageY)-(this.maps.isTileMap?10:0),r.target,this.maps.mouseClickEvent={x:i,y:o}}else i=e.pageX,o=e.pageY,n=e.layerX,a=e.layerY-(this.maps.isTileMap?10:0),e.target;var s=void 0,d=this.maps.getMinMaxLatitudeLongitude();if(this.maps.isTileMap){var p=this.maps.getTileGeoLocation(n,a);s={cancel:!1,name:"panComplete",maps:this.maps,tileTranslatePoint:{previous:this.maps.tileTranslatePoint,current:this.maps.tileTranslatePoint},translatePoint:{previous:this.maps.previousPoint,current:this.maps.translatePoint},scale:this.maps.scale,tileZoomLevel:this.maps.tileZoomLevel,latitude:p.latitude,longitude:p.longitude,minLatitude:d.minLatitude,maxLatitude:d.maxLatitude,minLongitude:d.minLongitude,maxLongitude:d.maxLongitude}}else{this.maps.mouseClickEvent.x=this.maps.mouseDownEvent.x,this.maps.mouseClickEvent.y=this.maps.mouseDownEvent.y;var h=this.maps.getClickLocation(l.id,i,o,l,i,o);s={cancel:!1,name:"panComplete",maps:this.maps,tileTranslatePoint:{},translatePoint:{previous:this.maps.previousPoint,current:this.maps.translatePoint},scale:this.maps.scale,tileZoomLevel:this.maps.tileZoomLevel,latitude:(0,t.isNullOrUndefined)(h)?0:h.latitude,longitude:(0,t.isNullOrUndefined)(h)?0:h.longitude,minLatitude:d.minLatitude,maxLatitude:d.maxLatitude,minLongitude:d.minLongitude,maxLongitude:d.maxLongitude}}this.maps.trigger("panComplete",s)}this.isPanModeEnabled=!1,this.isPanningInProgress=!1;var m=Re(this.maps.element.id+"_Selection_Rect_Zooming");m&&this.maps.zoomSettings.enable&&this.maps.zoomSettings.enableSelectionZooming&&((0,t.remove)(m),this.performRectZooming()),this.mouseMoveLatLong={x:0,y:0},this.mouseDownLatLong={x:0,y:0},this.pinchDistance=null},e.prototype.mouseCancelHandler=function(e){this.isPanModeEnabled=!1,this.isTouch=!1,this.rectZoomingStart=!1;var i=Re(this.maps.element.id+"_Selection_Rect_Zooming");i&&this.maps.zoomSettings.enable&&((0,t.remove)(i),this.performRectZooming())},e.prototype.click=function(e){var i=this.maps,o=e.target.closest("#"+this.maps.element.id+"_mapsTooltipparent_template");if(i.markerModule&&i.markerModule.sameMarkerData.length>0||e.target.id.indexOf("MarkerIndex")>-1&&-1===e.target.id.indexOf("cluster")||!(0,t.isNullOrUndefined)(o))return null;if(this.isSingleClick&&i.zoomSettings.zoomOnClick&&!(e.target.id.indexOf("_Zooming_")>-1)&&!i.zoomSettings.doubleClickZoom&&this.zoomColor!==this.selectionColor){var n=e.pageX,a=e.pageY,l=this.getMousePosition(n,a),r=i.tileZoomLevel,s=i.scale;i.mapScaleValue=i.mapScaleValue+1;var d=i.isTileMap?r:s;l.x>i.mapAreaRect.x&&l.x<i.mapAreaRect.x+i.mapAreaRect.width&&l.y>i.mapAreaRect.y&&l.y<i.mapAreaRect.y+i.mapAreaRect.height&&this.performZooming(l,d+1,"ZoomIn")}},e.prototype.getMousePosition=function(e,t){var i=this.maps,o=i.element.getBoundingClientRect(),n=i.element.ownerDocument.defaultView.pageXOffset,a=i.element.ownerDocument.defaultView.pageYOffset,l=i.element.ownerDocument.documentElement.clientTop,r=i.element.ownerDocument.documentElement.clientLeft,s=o.left+n-r,d=o.top+a-l;return new _(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(){if(!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),t.EventHandler.remove(this.maps.element,this.cancelEvent,this.mouseCancelHandler);var e=document.getElementById(this.maps.element.id+"_Zooming_KitCollection");if(e)for(var i=0;i<e.childNodes.length;i++)"g"===e.childNodes[i].tagName&&(t.EventHandler.add(e.childNodes[i],t.Browser.touchStartEvent,this.performToolBarAction),t.EventHandler.add(e.childNodes[i],"mouseover",this.showTooltip),t.EventHandler.add(e.childNodes[i],"mouseout",this.removeTooltip))}},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.mouseDownLatLong=null,this.mouseMoveLatLong=null,this.removeEventListener(),this.layerCollectionEle=null,this.currentLayer=null,this.pinchDistance=null},e}(),bo=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 n={cancel:!1,htmlContent:this.getHTMLContent(e,i),name:Yi};e.trigger("beforePrint",n,(function(e){n.cancel||(0,t.print)(n.htmlContent,o)}))},e.prototype.getHTMLContent=function(e,i){var o=(0,t.createElement)("div"),n=e.element.cloneNode(!0),a=e.isTileMap?n.getElementsByTagName("svg")[1]:n.getElementsByTagName("svg")[0];if(!(0,t.isNullOrUndefined)(a)&&(a=a.childNodes[0],!(0,t.isNullOrUndefined)(a))){var l=a.getAttribute("fill");"Tailwind"!==e.theme&&"Tailwind3"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme&&"Fluent2"!==e.theme||"rgba(255,255,255, 0.0)"!==l&&"transparent"!==l?"TailwindDark"!==e.theme&&"Tailwind3Dark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme&&"Fluent2Dark"!==e.theme&&"Fluent2HighContrast"!==e.theme||"rgba(255,255,255, 0.0)"!==l&&"transparent"!==l||a.setAttribute("fill","rgba(0, 0, 0, 1)"):a.setAttribute("fill","rgba(255,255,255, 1)")}if(e.isTileMap)for(var r=0;r<n.childElementCount;r++)if(n.children[r].id===e.element.id+"_tile_parent"){n.children[r].style.removeProperty("height"),n.children[r].style.removeProperty("width"),n.children[r].style.removeProperty("top"),n.children[r].style.removeProperty("left"),n.children[r].style.removeProperty("right"),n.children[r].style.removeProperty("overflow");var s=document.getElementById(e.element.id+"_Tile_SVG_Parent");n.children[r].children[0].style.overflow="hidden",n.children[r].children[0].style.position="absolute",n.children[r].children[0].style.height=s.style.height,n.children[r].children[0].style.width=s.style.width,n.children[r].children[0].style.left=s.style.left,n.children[r].children[0].style.top=s.style.top;break}return i?i instanceof Array?Array.prototype.forEach.call(i,(function(e){o.appendChild(He(e).cloneNode(!0))})):i instanceof Element?o.appendChild(i.cloneNode(!0)):o.appendChild(He(i).cloneNode(!0)):o.appendChild(n),o},e.prototype.getModuleName=function(){return"Print"},e.prototype.destroy=function(){},e}(),vo=function(){function e(e){}return e.prototype.export=function(e,i,o,n){return new Promise((function(a,l){var r,s,d=(0,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=Re(e.element.id+"_svg").cloneNode(!0),c=m.childNodes[0].getAttribute("fill");"Tailwind"!==e.theme&&"Tailwind3"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme&&"Fluent2"!==e.theme||"rgba(255,255,255, 0.0)"!==c&&"transparent"!==c?"TailwindDark"!==e.theme&&"Tailwind3Dark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme&&"Fluent2Dark"!==e.theme&&"Fluent2HighContrast"!==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=Re(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)n?C(o,i,u,p):a(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")),S=new XMLHttpRequest,x=e.mapLayerPanel.tiles.length,O=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&&"Tailwind3"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme||"rgba(255,255,255, 0.0)"!==c&&"transparent"!==c?"TailwindDark"!==e.theme&&"Tailwind3Dark"!==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");(0,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===x+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===x+1){localStorage.setItem("local-canvasImage",d.toDataURL("image/png"));var t=localStorage.getItem("local-canvasImage");n?(C(o,i,t,p),localStorage.removeItem("local-canvasImage"),e.isExportInitialTileMap=!1):(e.isExportInitialTileMap=!1,"PNG"===i?a(t):"JPEG"===i&&a(d.toDataURL("image/jpeg")))}},0===l||l===x+1?0===l?m.src=u:setTimeout((function(){m.src=window.URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(s)],{type:"image/svg+xml"}))}),300):(S.open("GET",r.children[0].getAttribute("src"),!0),S.send(),m.src=r.children[0].getAttribute("src"))},_=0;_<=x+1;_++)O(_)}else g.onload=function(){y.drawImage(g,0,0),window.URL.revokeObjectURL(u),n?C(o,i,d.toDataURL("image/png").replace("image/png","image/octet-stream"),p):"PNG"===i?a(d.toDataURL("image/png")):"JPEG"===i&&a(d.toDataURL("image/jpeg"))},g.src=u}}))},e.prototype.getModuleName=function(){return"ImageExport"},e.prototype.destroy=function(){},e}(),So=l(461),xo=function(){function e(){}return e.prototype.export=function(e,i,o,n,a){return new Promise((function(l){e.isTileMap&&(e.isExportInitialTileMap=!0);var r=(0,t.createElement)("canvas",{id:"ej2-canvas",attrs:{width:e.availableSize.width.toString(),height:e.availableSize.height.toString()}});a=(0,t.isNullOrUndefined)(a)?So.PdfPageOrientation.Landscape:a;var s=document.getElementById(e.element.id+"_Tile_SVG_Parent"),d=e.svgObject.cloneNode(!0),p=d.childNodes[0].getAttribute("fill");"Tailwind"!==e.theme&&"Tailwind3"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme&&"Fluent2"!==e.theme||"rgba(255,255,255, 0.0)"!==p&&"transparent"!==p?"TailwindDark"!==e.theme&&"Tailwind3Dark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme&&"Fluent2Dark"!==e.theme&&"Fluent2HighContrast"!==e.theme||"rgba(255,255,255, 0.0)"!==p&&"transparent"!==p||d.childNodes[0].setAttribute("fill","rgba(0, 0, 0, 1)"):d.childNodes[0].setAttribute("fill","rgba(255,255,255, 1)");var h=window.URL.createObjectURL(new Blob("SVG"===i?[undefined]:[(new XMLSerializer).serializeToString(d)],{type:"image/svg+xml"})),m=new So.PdfDocument,c=new Image,u=r.getContext("2d");if(e.isTileMap)for(var g=document.getElementById(e.element.id+"_MapAreaBorder"),y=parseFloat(g.getAttribute("y")),f=parseFloat(g.getAttribute("x")),b=new XMLHttpRequest,v=e.mapLayerPanel.tiles.length,S=function(d){var c=document.getElementById(e.element.id+"_tile_"+(d-1)),g=new Image;g.crossOrigin="Anonymous";var S=e.background?e.background:"Tailwind"!==e.theme&&"Tailwind3"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme||"rgba(255,255,255, 0.0)"!==p&&"transparent"!==p?"TailwindDark"!==e.theme&&"Tailwind3Dark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme||"rgba(255,255,255, 0.0)"!==p&&"transparent"!==p?"#ffffff":"#000000":"#ffffff";u.fillStyle=S,u.fillRect(0,0,e.availableSize.width,e.availableSize.height),u.font=e.titleSettings.textStyle.size+" Arial";var x=document.getElementById(e.element.id+"_Map_title");(0,t.isNullOrUndefined)(x)||(u.fillStyle=x.getAttribute("fill"),u.fillText(e.titleSettings.text,parseFloat(x.getAttribute("x")),parseFloat(x.getAttribute("y")))),g.onload=function(){if(0===d||d===v+1?0===d?(u.setTransform(1,0,0,1,0,0),u.rect(0,y,parseFloat(s.style.width),parseFloat(s.style.height)),u.clip()):u.setTransform(1,0,0,1,f,y):u.setTransform(1,0,0,1,parseFloat(c.style.left)+f,parseFloat(c.style.top)+y),u.drawImage(g,0,0),d===v+1&&"PDF"===i){localStorage.setItem("saved-image-example",r.toDataURL("image/jpeg"));var t=localStorage.getItem("saved-image-example");m.pageSettings.orientation=a,t=t.slice(t.indexOf(",")+1),m.pages.add().graphics.drawImage(new So.PdfBitmap(t),0,0,e.availableSize.width-60,e.availableSize.height),e.isExportInitialTileMap=!1,n?(m.save(o+".pdf"),m.destroy()):l(null)}},0===d||d===v+1?0===d?g.src=h: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):(b.open("GET",c.children[0].getAttribute("src"),!0),b.send(),g.src=c.children[0].getAttribute("src"))},x=0;x<=v+1;x++)S(x);else c.onload=function(){if(u.drawImage(c,0,0),window.URL.revokeObjectURL(h),"PDF"===i){var t=r.toDataURL("image/jpeg").replace("image/jpeg","image/octet-stream");m.pageSettings.orientation=a,t=t.slice(t.indexOf(",")+1),m.pages.add().graphics.drawImage(new So.PdfBitmap(t),0,0,e.availableSize.width-60,e.availableSize.height),n?(m.save(o+".pdf"),m.destroy()):l(null)}},c.src=h}))},e.prototype.getModuleName=function(){return"PdfExport"},e.prototype.destroy=function(){},e}()})(),r})()));