Plugin Directory

Changeset 3115635

Timestamp:
07/10/2024 01:30:33 PM (2 weeks ago)
Author:
interactivegeomaps
Message:

Update to version 1.6.19 from GitHub

Location:
interactive-geo-maps
Files:
2 added
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • interactive-geo-maps/tags/1.6.19/assets/public/map-actions/actions.js

    r3115060 r3115635  
    357357  }
    358358
    359   if (!iMapsActions.lightbox) {
    360     iMapsActions.lightbox = GLightbox(opts);
    361   }
     359  iMapsActions.lightbox = GLightbox(opts);
    362360
    363361  // add custom close button
  • interactive-geo-maps/tags/1.6.19/assets/public/map-actions/actions.min.js

    r3115060 r3115635  
    1 function igm_display_below(e, t) { iMapsActions.contentBelow(e, t, !1), window.dispatchEvent(new Event("resize")) } function igm_display_below_scroll(e, t) { iMapsActions.contentBelow(e, t, !0), window.dispatchEvent(new Event("resize")) } function igm_display_above(e, t) { iMapsActions.contentAbove(e, t, !1), window.dispatchEvent(new Event("resize")) } function igm_display_page_below(e, t) { iMapsActions.pageBelow(e, t, !1) } function igm_display_page_below_and_scroll(e, t) { iMapsActions.pageBelow(e, t, !0) } function igm_display_right_1_3(e, t) { iMapsActions.contentRight(e, t, "igm_content_left_2_3", "igm_content_right_1_3"), window.dispatchEvent(new Event("resize")) } function igm_lightbox(e, t) { iMapsActions.lightboxAction(e, t, "inline"), window.dispatchEvent(new Event("resize")) } function igm_lightbox_image(e, t) { iMapsActions.lightboxAction(e, t, "image") } function igm_lightbox_iframe(e, t) { iMapsActions.lightboxAction(e, t, "external") } (iMapsActions = { init: function () { for (var e = document.querySelectorAll(".igm-live-filter"), t = 0; t < e.length; t++)iMapsActions.buildFilter(e[t]); for (var n = document.querySelectorAll(".igm-live-filter-dropdown"), t = 0; t < n.length; t++)iMapsActions.buildDropdownFilter(n[t]); if (0 < (i = document.querySelectorAll(".igm_select_choices")).length) for (t = 0; t < i.length; t++)iMapsActions.buildDropdown(i[t]); else for (var i = document.querySelectorAll(".igm_select"), t = 0; t < i.length; t++)i[t].addEventListener("change", function (e) { var t, e = e.target, n = e.getAttribute("data-map-id"), n = parseInt(n); "undefined" != typeof iMapsManager ? iMapsManager.select(n, e.value, !0) : e.getAttribute("data-url") && ((n = e.getAttribute("data-url").split("#")[1]) ? (t = e.getAttribute("data-url").replace("#" + n, ""), window.open(t + "?mregion=" + e.value + "#" + n, "_self")) : window.open(e.getAttribute("data-url") + "?mregion=" + e.value, "_self")) }); for (var o = document.querySelectorAll(".igm_entries_list"), t = 0; t < o.length; t++)iMapsActions.buildLists(o[t]) }, buildDropdown: function (n) { var e = n.getAttribute("data-noresults"), t = n.getAttribute("data-select"); new Choices(n, { noResultsText: e, position: "bottom", itemSelectText: t, resetScrollPosition: !1, searchChoices: !0, fuseOptions: { threshold: .4, findAllMatches: !0, shouldSort: !0 }, searchFloor: 2, searchResultLimit: 50, searchFields: ["label", "value", "customProperties"] }).passedElement.element.addEventListener("change", function () { var e, t = n.getAttribute("data-map-id"), t = parseInt(t); "undefined" != typeof iMapsManager && iMapsManager.select(t, this.value, !0), n.getAttribute("data-url") && ((t = n.getAttribute("data-url").split("#")[1]) ? (e = n.getAttribute("data-url").replace("#" + t, ""), window.open(e + "?mregion=" + n.value + "#" + t, "_self")) : window.open(n.getAttribute("data-url") + "?mregion=" + n.value, "_self")) }) }, buildLists: function (e) { for (var n = e.getAttribute("data-map-id"), t = e.querySelectorAll("li"), i = 0; i < t.length; i++){ var o = t[i]; o.addEventListener("click", function (e) { var t; "undefined" != typeof iMapsManager ? (t = e.target.getAttribute("data-code"), iMapsManager.select(n, t, !0)) : e.target.getAttribute("data-url") && window.open(e.target.getAttribute("data-url") + "?mregion=" + e.target.getAttribute("data-code"), "_self") }), o.addEventListener("mouseover", function (e) { "undefined" != typeof iMapsManager && (e = e.target.getAttribute("data-code"), iMapsManager.highlight(n, e)) }), o.addEventListener("mouseout", function (e) { "undefined" != typeof iMapsManager && iMapsManager.clearHighlighted(n) }) } }, buildDropdownFilter: function (e) { var i = e.getAttribute("data-base-map-id"), o = void 0 !== (o = e.getAttribute("data-keep-base-map")) && "1" === o, i = parseInt(i); e.addEventListener("change", function (e) { e = e.target.value, e = parseInt(e); if ((iMapsManager.filteredMap = e) === i) iMapsManager.activeMap = i, "undefined" != typeof iMapsManager && (iMapsManager.filteredMap = i, iMapsManager.showAllSeries(e)); else if ("undefined" != typeof iMapsManager) { iMapsManager.hideAllSeries(i, o); var t = iMaps.maps[i].seriesById[e]; if (t && 0 < t.length) for (var n = 0; n < t.length; n++)t[n].show() } void 0 !== iMaps.maps[e] && (iMaps.maps[e].map.goHome(), iMaps.maps[e].map.dispatchImmediately("zoomlevelchanged")) }) }, buildFilter: function (e) { for (var o = e.getAttribute("data-base-map-id"), a = void 0 !== (a = e.getAttribute("data-keep-base-map")) && "1" === a, o = parseInt(o), r = e.querySelectorAll("li"), t = 0; t < r.length; t++)r[t].addEventListener("click", function (e) { for (var t = 0; t < r.length; t++)r[t].classList.remove("igm-live-filter-active"); e.target.classList.add("igm-live-filter-active"); e = e.target.getAttribute("data-map-id"), e = parseInt(e); if ((iMapsManager.filteredMap = e) === o) "undefined" != typeof iMapsManager && (iMapsManager.filteredMap = o, iMapsManager.showAllSeries(e), iMapsManager.resetDrilldown(e)); else if ("undefined" != typeof iMapsManager) { iMapsManager.hideAllSeries(o, a); var n = iMaps.maps[o].seriesById[e]; if (n && 0 < n.length) for (var i = 0; i < n.length; i++)n[i].show() } void 0 !== iMaps.maps[o] && (iMaps.maps[o].map.goHome(), iMaps.maps[o].map.dispatchImmediately("zoomlevelchanged")) }) }, lightbox: !1, lightboxIsRunning: !1, lightboxAction: function (e, t, n) { var i = [], o = iMapsActionOptions.lightboxWidth, a = iMapsActionOptions.lightboxHeight, r = {}; "inline" === n ? (t.content = "#" + iMapsActions.getIDfromData(t), i.push({ href: t.content, type: n, width: o, height: a })) : "external" === n ? ("auto" === a && (a = parseInt(.8 * window.innerHeight)), i.push({ href: t.content, type: n, width: o, height: a })) : "" !== t.content && t.content.includes(",") ? t.content.split(",").forEach(function (e, t) { i.push({ href: e, type: n, width: o, height: a }) }) : i.push({ href: t.content, type: n, width: o, height: a }), r = { touchNavigation: !1, draggable: !1, keyboardNavigation: !1, loopAtEnd: !1, loop: !1, zoomable: !1, elements: i, closeButton: !1, closeOnOutsideClick: !0 }, 768 < window.innerWidth && iMapsActions.isTouchScreenDevice() && (r.closeOnOutsideClick = !1), iMapsActions.lightbox || (iMapsActions.lightbox = GLightbox(r)), iMapsActions.lightbox.on("open", function () { let n = document.querySelector(".ginner-container .gslide-media .igm_close"); n || ((n = document.createElement("span")).classList.add("igm_close"), n.innerHTML = "╳", document.querySelectorAll(".ginner-container .gslide-media").forEach(function (e) { var t = n.cloneNode(!0); t.addEventListener("click", function () { iMapsActions.lightbox.close() }), e.prepend(t) })) }), "" !== t.content && iMapsActions.lightbox && !iMapsActions.lightboxIsRunning ? (iMapsActions.lightbox.open(), iMapsActions.lightboxIsRunning = !0) : console.log("Empty Action Content or Incorrect Request - Lightbox not triggered"), iMapsActions.lightbox.on("close", function () { iMapsManager.clearSelected(e), iMaps.maps[e].map.lastClickedEntry = !1, iMapsActions.lightboxIsRunning = !1 }) }, contentBelow: function (e, t, n) { var e = document.getElementById("map_" + e).parentNode.parentNode.parentNode, i = e.parentNode.querySelector(".igm_content_below"), o = document.getElementById("igm-hidden-footer-content"); t.content = "[id='" + iMapsActions.getIDfromData(t) + "']", null === i && ((i = document.createElement("div")).classList.add("igm_content_below"), e.parentNode.insertBefore(i, e.nextSibling)), (e = i.children) && e.length && o && Array.from(e).forEach(e => { e.style && (e.style.display = "none"), o.appendChild(e) }), (e = document.querySelector(t.content)) && (i.appendChild(e), e.style) && (e.style.display = "block"), n && (t = Math.floor(i.getBoundingClientRect().top - 100), window.scrollBy({ top: t, left: 0, behavior: "smooth" })) }, contentAbove: function (e, t, n) { var e = document.getElementById("map_" + e).parentNode.parentNode.parentNode, i = e.parentNode.querySelector(".igm_content_above"), o = document.getElementById("igm-hidden-footer-content"); t.content = "[id='" + iMapsActions.getIDfromData(t) + "']", null === i && ((i = document.createElement("div")).classList.add("igm_content_above"), e.parentNode.insertBefore(i, e.parentNode.childNodes[0])), (e = i.firstChild) && o && (e.style.display = "none", o.appendChild(e)), (o = document.querySelector(t.content)) && (i.appendChild(o), o.style.display = "block"), n && (originalTop = Math.floor(i.getBoundingClientRect().top - 100), window.scrollBy({ top: originalTop, left: 0, behavior: "smooth" })) }, contentRight: function (e, t, n, i) { var e = document.getElementById("map_" + e).parentNode.parentNode.parentNode, o = e.parentNode.querySelector("." + i), a = e.parentNode.querySelector("." + n), r = document.getElementById("igm-hidden-footer-content"); t.content = "[id='" + iMapsActions.getIDfromData(t) + "']", null === a && (a = e.parentNode.querySelector(".map_box")).classList.add(n), null === o && ((o = document.createElement("div")).classList.add(i), e.parentNode.insertBefore(o, e.nextSibling)), (a = o.firstChild) && r && (a.style.display = "none", r.appendChild(a)), (n = document.querySelector(t.content)) && (o.appendChild(n), n.style.display = "block") }, pageBelow: function (e, t, n) { var i, o, a; "" !== t.content && (t = parseInt(t.content), t = iMapsActionOptions.restURL + "pages/" + t, o = document.getElementById("map_" + e).parentNode.parentNode.parentNode.parentNode.querySelector(".igm_content_below"), (a = new XMLHttpRequest).open("GET", t), a.onload = function () { var e; 200 <= a.status && a.status < 400 ? (e = JSON.parse(a.response), o.innerHTML = e.content.rendered, n && (i = Math.floor(o.getBoundingClientRect().top - 100), window.scrollBy({ top: i, left: 0, behavior: "smooth" }))) : console.log("We connected to the server, but it returned an error.") }, a.onerror = function () { console.log("Connection error") }, a.send()) }, getIDfromData: function (e) { t = (t = (void 0 !== e.originalID ? e.originalID : (Number.isInteger(e.id) && (e.id = e.id.toString()), e.id)).replace(/\s/g, "")).replace(/,/g, "_"); var t = iMapsActions.wpFeSanitizeTitle(t); return e.content = t + "_" + e.mapID, e.content.toLowerCase() } }).wpFeSanitizeTitle = function (e) { return e = e.replace(/\ /g, "").replace(/\,/g, "_"), e = encodeURIComponent(e).replace(/\(/g, "%28").replace(/\)/g, "%29").replace(/%/g, "").toLowerCase() }, iMapsActions.resetContainer = function (e, t) { var n = document.getElementById("map_wrapper_" + e), i = document.getElementById("igm-hidden-footer-content"); null !== n && null !== (n = n.querySelector(t)) && ((t = n.firstChild) && i && (t.style.display = "none", i.appendChild(t)), what2display = document.getElementById("default_" + e)) && (n.appendChild(what2display), what2display.style.display = "block") }, iMapsActions.resetActions = function (e) { iMapsActions.resetContainer(e, ".igm_content_below"), iMapsActions.resetContainer(e, ".igm_content_above"), iMapsActions.resetContainer(e, ".igm_content_right_1_3") }, iMapsActions.isTouchScreenDevice = function () { return "ontouchstart" in window || navigator.maxTouchPoints }, iMapsActions.loadScript = function (e, t) { var n = document.createElement("script"); n.type = "text/javascript", n.src = e, n.onreadystatechange = t, n.onload = t, document.head.appendChild(n) }, iMapsActions.loadScripts = function (e, t) { function n() { ++i >= e.length && t.call(this, arguments) } var i = 0; e.forEach(function (e, t) { iMapsActions.loadScript(e, n) }) }, void 0 !== iMapsActionOptions.async && Array.isArray(iMapsActionOptions.urls) && 0 < iMapsActionOptions.urls.length ? iMapsActions.loadScripts(iMapsActionOptions.urls, function () { iMapsActions.init() }) : iMapsActions.init();
     1function igm_display_below(e,iMapsActions.init();
  • interactive-geo-maps/tags/1.6.19/assets/public/map-service/app.min.js

    r3115060 r3115635  
    1 "use strict"; function _typeof(e) { return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) { return typeof e } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e }, _typeof(e) } function geocluster(e, t, a, o) { return t = parseFloat(t), this instanceof geocluster ? this._cluster(e, t, a, o) : new geocluster(e, t, a, o) } geocluster.prototype._toRad = function (e) { return e * Math.PI / 180 }, geocluster.prototype._dist = function (e, t, a, o) { var i = this._toRad(a - e), r = this._toRad(o - t), n = Math.sin(i / 2) * Math.sin(i / 2) + Math.sin(r / 2) * Math.sin(r / 2) * Math.cos(this._toRad(e)) * Math.cos(this._toRad(a)); return Math.round(2 * Math.atan2(Math.sqrt(n), Math.sqrt(1 - n)) * 6371 * 100) / 100 }, geocluster.prototype._centroid = function (e) { var t = Object.values(e).reduce((function (e, t) { return { latitude: e.latitude + t.latitude, longitude: e.longitude + t.longitude } }), { latitude: 0, longitude: 0 }); return t = Object.values(t).map((function (t) { return t / Object.keys(e).length })) }, geocluster.prototype._clean = function (e) { return e.map((function (e) { return [e.centroid, e.elements] })) }, geocluster.prototype._cluster = function (e, t, a, o) { var i, r = this, n = []; ("number" != typeof t || isNaN(t)) && (t = 1); for (var l, s = 0, d = [], p = 1; p < e.length; p++)s += l = r._dist(e[p].latitude, e[p].longitude, e[p - 1].latitude, e[p - 1].longitude), d.push(l); var u = s / d.length, c = 0; d.forEach((function (e) { c += Math.pow(e - u, 2) })); Math.sqrt(c / d.length); var m = 1e4 * t, g = []; g.push({ centroid: e[Math.floor(.5 * e.length)], elements: [], fill: a.fill, hover: a.hover, radius: a.radius }); for (var h = !0; !0 === h;){ var M = !1, v = !1; e.forEach((function (e, t) { var a = 1 / 0, o = null; g.forEach((function (t, i) { var n = r._dist(e.latitude, e.longitude, g[i].centroid.latitude, g[i].centroid.longitude); n < a && (a = n, o = i) })), a < m || 0 === a ? g[o].elements.push(e) : (g.push({ centroid: e, elements: [e] }), M = !0) })), (g = g.filter((function (e) { return e.elements.length > 0 }))).forEach((function (e, t) { var a = r._centroid(e.elements); h = !1, a.latitude === e.centroid.latitude && a.longitude === e.centroid.longitude || (g[t].centroid = a, v = !0) })), v || M ? h && (g = g.map((function (e) { return e.elements = [], e }))) : h = !1 } return g = g.map((function (e) { 1 === e.elements.length ? n.push(e.elements[0]) : (i = { id: "", label: e.elements.length, name: "", value: e.elements.length, cluster: !0, latitude: e.centroid[0], longitude: e.centroid[1], elements: e.elements, content: "", fill: a.fill, hover: a.hover, radius: a.radius, action: "" }, o && (i.tooltipTemplate = o), n.push(i)) })), n }; var iMapsRouter = { getGeoFiles: function (e) { var t, a, o = e.id.toString(), i = e.name, r = {}; return ["southAmerica", "northAmerica", "europe", "middleEast", "asia", "oceania", "africa", "antarctica"].includes(o) ? (t = "region/world/", a = "_region_world_") : o.includes("US-") ? (t = "region/usa/", a = "_region_usa_", o = o.substr(-2).toLowerCase()) : (t = "", a = "_", o = i.toLowerCase().replace("united states", "usa")), r.src = "https://cdn.amcharts.com/lib/4/geodata/" + t + o + "Low.js", r.map = "am4geodata" + a + o + "Low", r.title = i, r }, getAllSrc: function () { var e = {}, t = { main: "../../vendor/geodata", usa: "../../vendor/geodata/region/usa", world: "../../vendor/geodata/region/world" }, a = require("fs"); return Object.keys(t).forEach((function (o) { e[o] = [], a.readdir(t[o], (function (t, a) { a.forEach((function (t) { e[o].push(t) })) })) })), e }, getVarByName: function (e) { return void 0 === e ? "am4geodata_worldLow" : e.includes("custom") ? e : "am4geodata_" + (e = e.replace(/\//g, "_")) }, getCleanMapName: function (e, t) { return void 0 !== e && ("custom" === (e = (e = e.replace("Low", "")).replace("High", "")) && (e += t), e) }, iso2cleanName: function (e, t) { var a, o = iMapsRouter.getCountries(), i = iMapsManager.maps[t].seriesIndex, r = !1; if (console.log("ISO: " + e), "VA" === e) return "vatican"; if ("US" === e) return "usa"; if (e.includes("CA-")) return "region/canada/" + e.replace("CA-", "").toLowerCase(); if (e.includes("MX-")) return "region/mexico/" + e.replace("MX-", "").toLowerCase(); if (["africa", "antarctiva", "asia", "europe", "middleEast", "northAmerica", "oceania", "southAmerica", "centralAmerica"].includes(e)) return "region/world/" + e; if (e.includes("US-") ? a = ["region/usa/" + e.replace("US-", "").toLowerCase(), "region/usa/congressional/" + e.replace("US-", "").toLowerCase(), "region/usa/congressional2022/" + e.replace("US-", "").toLowerCase()] : "GB" === e ? a = ["uk", "ukCountries", "ukCounties"] : "BA" === e ? a = ["bosniaHerzegovinaCantons", "bosniaHerzegovina"] : "IL" === e ? a = ["israel", "israelPalestine"] : "SI" === e ? a = ["sloveniaRegions", "slovenia"] : "IN" === e ? a = ["india2019", "india", "india2020"] : "AE" === e ? a = ["unitedArabEmirates", "uae"] : "FR" === e ? a = ["franceDepartments", "france"] : "MG" === e ? a = ["madagascarProvince", "madagascarRegion"] : "PT" === e ? a = ["portugal", "portugalRegions"] : "RS" === e ? a = ["serbia", "serbiaNoKosovo"] : "CD" === e ? a = ["congoDR"] : "CG" === e ? a = ["congo"] : "CZ" === e ? a = ["czechRepublic", "czechia"] : "MM" === e && (a = ["myanmar"]), Array.isArray(a)) { if (a.forEach((function (e, t) { i.hasOwnProperty(e) && (r = e) })), r) return r; if (o.hasOwnProperty(e)) return iMapsRouter.camelize(o[e]) } else if (o.hasOwnProperty(e)) return iMapsRouter.camelize(o[e]); return !1 }, getCountries: function () { return JSON.parse('{"AF":"Afghanistan","AX":"Åland Islands","AL":"Albania","DZ":"Algeria","AS":"American Samoa","AD":"Andorra","AO":"Angola","AI":"Anguilla","AQ":"Antarctica","AG":"Antigua & Barbuda","AR":"Argentina","AM":"Armenia","AW":"Aruba","AC":"Ascension Island","AU":"Australia","AT":"Austria","AZ":"Azerbaijan","BS":"Bahamas","BH":"Bahrain","BD":"Bangladesh","BB":"Barbados","BY":"Belarus","BE":"Belgium","BZ":"Belize","BJ":"Benin","BM":"Bermuda","BT":"Bhutan","BO":"Bolivia","BA":"Bosnia & Herzegovina","BW":"Botswana","BR":"Brazil","IO":"British Indian Ocean Territory","VG":"British Virgin Islands","BN":"Brunei","BG":"Bulgaria","BF":"Burkina Faso","BI":"Burundi","KH":"Cambodia","CM":"Cameroon","CA":"Canada","IC":"Canary Islands","CV":"Cape Verde","BQ":"Caribbean Netherlands","KY":"Cayman Islands","CF":"Central African Republic","EA":"Ceuta & Melilla","TD":"Chad","CL":"Chile","CN":"China","CX":"Christmas Island","CC":"Cocos (Keeling) Islands","CO":"Colombia","KM":"Comoros","CG":"Congo - Brazzaville","CD":"Congo - Kinshasa","CK":"Cook Islands","CR":"Costa Rica","CI":"Côte d’Ivoire","HR":"Croatia","CU":"Cuba","CW":"Curaçao","CY":"Cyprus","CZ":"Czechia","DK":"Denmark","DG":"Diego Garcia","DJ":"Djibouti","DM":"Dominica","DO":"Dominican Republic","EC":"Ecuador","EG":"Egypt","SV":"El Salvador","GQ":"Equatorial Guinea","ER":"Eritrea","EE":"Estonia","SZ":"Eswatini","ET":"Ethiopia","FK":"Falkland Islands","FO":"Faroe Islands","FJ":"Fiji","FI":"Finland","FR":"France","GF":"French Guiana","PF":"French Polynesia","TF":"French Southern Territories","GA":"Gabon","GM":"Gambia","GE":"Georgia","DE":"Germany","GH":"Ghana","GI":"Gibraltar","GR":"Greece","GL":"Greenland","GD":"Grenada","GP":"Guadeloupe","GU":"Guam","GT":"Guatemala","GG":"Guernsey","GN":"Guinea","GW":"Guinea-Bissau","GY":"Guyana","HT":"Haiti","HN":"Honduras","HK":"Hong Kong SAR China","HU":"Hungary","IS":"Iceland","IN":"India","ID":"Indonesia","IR":"Iran","IQ":"Iraq","IE":"Ireland","IM":"Isle of Man","IL":"Israel","IT":"Italy","JM":"Jamaica","JP":"Japan","JE":"Jersey","JO":"Jordan","KZ":"Kazakhstan","KE":"Kenya","KI":"Kiribati","XK":"Kosovo","KW":"Kuwait","KG":"Kyrgyzstan","LA":"Laos","LV":"Latvia","LB":"Lebanon","LS":"Lesotho","LR":"Liberia","LY":"Libya","LI":"Liechtenstein","LT":"Lithuania","LU":"Luxembourg","MO":"Macao SAR China","MG":"Madagascar","MW":"Malawi","MY":"Malaysia","MV":"Maldives","ML":"Mali","MT":"Malta","MH":"Marshall Islands","MQ":"Martinique","MR":"Mauritania","MU":"Mauritius","YT":"Mayotte","MX":"Mexico","FM":"Micronesia","MD":"Moldova","MC":"Monaco","MN":"Mongolia","ME":"Montenegro","MS":"Montserrat","MA":"Morocco","MZ":"Mozambique","MM":"Myanmar (Burma)","NA":"Namibia","NR":"Nauru","NP":"Nepal","NL":"Netherlands","NC":"New Caledonia","NZ":"New Zealand","NI":"Nicaragua","NE":"Niger","NG":"Nigeria","NU":"Niue","NF":"Norfolk Island","KP":"North Korea","MK":"North Macedonia","MP":"Northern Mariana Islands","NO":"Norway","OM":"Oman","PK":"Pakistan","PW":"Palau","PS":"Palestinian Territories","PA":"Panama","PG":"Papua New Guinea","PY":"Paraguay","PE":"Peru","PH":"Philippines","PN":"Pitcairn Islands","PL":"Poland","PT":"Portugal","XA":"Pseudo-Accents","XB":"Pseudo-Bidi","PR":"Puerto Rico","QA":"Qatar","RE":"Réunion","RO":"Romania","RU":"Russia","RW":"Rwanda","WS":"Samoa","SM":"San Marino","ST":"São Tomé & Príncipe","SA":"Saudi Arabia","SN":"Senegal","RS":"Serbia","SC":"Seychelles","SL":"Sierra Leone","SG":"Singapore","SX":"Sint Maarten","SK":"Slovakia","SI":"Slovenia","SB":"Solomon Islands","SO":"Somalia","ZA":"South Africa","GS":"South Georgia & South Sandwich Islands","KR":"South Korea","SS":"South Sudan","ES":"Spain","LK":"Sri Lanka","BL":"St Barthélemy","SH":"St Helena","KN":"St Kitts & Nevis","LC":"St Lucia","MF":"St Martin","PM":"St Pierre & Miquelon","VC":"St Vincent & Grenadines","SD":"Sudan","SR":"Suriname","SJ":"Svalbard & Jan Mayen","SE":"Sweden","CH":"Switzerland","SY":"Syria","TW":"Taiwan","TJ":"Tajikistan","TZ":"Tanzania","TH":"Thailand","TL":"Timor-Leste","TG":"Togo","TK":"Tokelau","TO":"Tonga","TT":"Trinidad & Tobago","TA":"Tristan da Cunha","TN":"Tunisia","TR":"Turkey","TM":"Turkmenistan","TC":"Turks & Caicos Islands","TV":"Tuvalu","UG":"Uganda","UA":"Ukraine","AE":"United Arab Emirates","GB":"United Kingdom","US":"United States","UY":"Uruguay","UM":"US Outlying Islands","VI":"US Virgin Islands","UZ":"Uzbekistan","VU":"Vanuatu","VA":"Vatican City","VE":"Venezuela","VN":"Vietnam","WF":"Wallis & Futuna","EH":"Western Sahara","YE":"Yemen","ZM":"Zambia","ZW":"Zimbabwe"}') }, camelize: function (e) { return e.replace(/(?:^\w|[A-Z]|\b\w)/g, (function (e, t) { return 0 == t ? e.toLowerCase() : e.toUpperCase() })).replace(/\s+/g, "") } }, iMapsModel = { prepareData: function (e) { return e && Array.isArray(e) ? (e.forEach((function (t, a) { e[a] = iMapsModel.iterateData(t), Array.isArray(e[a].overlay) && e[a].overlay.length > 0 && e[a].overlay.forEach((function (t, o) { e[a].overlay[o].map !== e[a].map || iMapsManager.bool(e[a].allowEmpty) || (e[a].overlay[o].include = iMapsModel.prepareOverlayInclude(t)), e[a].overlay[o] = iMapsModel.iterateData(t) })) })), e) : e }, prepareOverlayInclude: function (e) { var t = e.includes || ""; return e.regions && e.regions.forEach((function (e, a) { t += "," + e.id })), t }, iterateData: function (e) { "function" == typeof igm_custom_filter && (e = igm_custom_filter(e)); var t = "igm_custom_filter_" + e.id; return "function" == typeof window[t] && (e = window[t](e)), e = iMapsModel.prepareColor(e), e = iMapsModel.prepareExcludeIncludes(e), e = iMapsModel.coordinatesToInt(e), e = iMapsModel.prepareEntriesData(e), e = iMapsModel.prepareGroupedRegions(e), e = iMapsModel.prepareImageFields(e), e = iMapsModel.prepareMultiGeoLine(e) }, prepareMultiGeoLine: function (e) { return Array.isArray(e.lines) && e.lines.length && (e.lines = e.lines.filter((function (e) { if (Array.isArray(e.multiGeoLine) && e.multiGeoLine.length) return e })), e.lines.map((function (e) { e.arrow = void 0 !== e.arrow && iMapsManager.bool(e.arrow), e.arrowDisabled = !e.arrow, e.multiGeoLine.map((function (e) { Object.assign(e, e.coordinates), delete e.coordinates })) }))), e }, prepareImageFields: function (e) { return Array.isArray(e.imageMarkers) && Array.isArray(e.imageMarkers) && e.imageMarkers.map((function (e) { return void 0 === e.href && e.image && (Array.isArray(e.image) || "object" == typeof e.image) && (e.href = e.image.url), e })), e }, prepareGroupedRegions: function (e) { var t, a, o, i, r; if (Array.isArray(e.regions) && e.regions.length) { if (void 0 === e.regionGroups && (e.regionGroups = []), iMapsManager.bool(e.regionsGroupHover)) return e.regionGroups.push(e.regions), e; e.regions.map((function (n, l) { if (!n.id || !String(n.id).includes(",")) return n; o = [], i = [], t = n.id.split(","), r = n.name, t.forEach((function (e, t) { (a = Object.assign({}, n)).id = e.trim(), a.originalID = n.id, a.groupName = r, delete a.name, delete n.name, isNaN(a.id), i.includes(a.id) || (i.push(a.id), o.push(a)) })), e.regionGroups.push(o), e.regions.splice(l, -1) })) } return e }, prepareTooltip: function (e, t) { var a, o, i, r, n, l; return void 0 === t || void 0 === e ? e : (a = void 0 !== t.maxWidth && "" !== t.maxWidth && parseInt(t.maxWidth), (o = iMapsModel.isMSIE()) ? iMapsModel.removeHTMLtags(e) : (e && e.includes("<img") && ((n = document.createRange()).selectNode(document.getElementsByTagName("div").item(0)), (i = (r = n.createContextualFragment(e)).querySelectorAll("img")).length > 0 && (i.forEach((function (e) { 0 !== e.width && "" === e.style.width && (e.style.width = e.width + "px"), 0 !== e.height && "" === e.style.height && (e.style.height = e.height + "px") })), (l = document.createElement("div")).appendChild(r.cloneNode(!0)), e = l.innerHTML)), a && "" !== e && !o && (e = '<div class="imapsInnerTooltip" style="max-width:' + a + 'px">' + e + "</div>"), e)) }, isMSIE: function () { return window.navigator.userAgent.match(/(MSIE|Trident)/) }, removeHTMLtags: function (e) { return null === e || "" === e ? "" : (e = e.toString()).replace(/<[^>]*>/g, "") }, prepareEntriesData: function (e) { e.heatMapMarkers && "1" === e.heatMapMarkers.enabled && (e.heatMapMarkers.minRadius = parseInt(e.heatMapMarkers.minRadius), e.heatMapMarkers.maxRadius = parseInt(e.heatMapMarkers.maxRadius)); var t = e.id; return Array.isArray(e.regions) && e.regions.length && (e.regions.map((function (a) { return void 0 !== a.useDefaults && "1" !== a.useDefaults || Object.assign(a, e.regionDefaults), void 0 !== a.action && "default" === a.action && (a.action = e.regionDefaults.action), void 0 !== e.regionDefaults.triggerClickOnHover && "1" === e.regionDefaults.triggerClickOnHover && (a.triggerClickOnHover = !0), void 0 !== e.regionActiveState && "1" === e.regionActiveState.enabled && (a.activeState = !0), e.regionLabels && "custom" === e.regionLabels.source && void 0 !== e.regionLabels.customSource && (e.regionLabels.customSource.includes(".") ? a.autoLabel = e.regionLabels.customSource.split(".").reduce((function (e, t) { return e[t] ? e[t] : 0 }), a) : a.autoLabel = a[e.regionLabels.customSource]), e.heatMapRegions && "1" === e.heatMapRegions.enabled && (e.heatMapRegions.source.includes(".") && (a.heatMapRegionRef = e.heatMapRegions.source.split(".").reduce((function (e, t) { return e[t] ? e[t] : 0 }), a)), delete a.fill), void 0 !== e.visual.borderColorHover && e.visual.borderColorHover !== e.visual.borderColor && (a.borderColorHover = e.visual.borderColorHover), void 0 !== e.visual.borderWidthHover && e.visual.borderWidthHover !== e.visual.borderWidth && (a.borderWidthHover = e.visual.borderWidthHover), a.tooltipContent = iMapsModel.prepareTooltip(a.tooltipContent, e.tooltip), a.mapID = t, a.value && void 0 !== _typeof(a.value) && "" !== a.value && (a.val = a.value, a.value = parseFloat(a.value)), a })), e.heatMapRegions && e.heatMapRegions.source.includes(".") && (e.heatMapRegions.source = "heatMapRegionRef")), Array.isArray(e.roundMarkers) && e.roundMarkers.length && (e.roundMarkers.map((function (a) { return void 0 !== a.useDefaults && "1" !== a.useDefaults || Object.assign(a, e.markerDefaults), a.coordinates && (a.latitude = a.coordinates.latitude, a.longitude = a.coordinates.longitude), "string" == typeof a.latitude && (a.latitude = parseFloat(a.latitude)), "string" == typeof a.longitude && (a.longitude = parseFloat(a.latitude)), void 0 === a.name && (a.name = a.id), e.roundMarkersMobileSize && 100 !== parseInt(e.roundMarkersMobileSize) && window.innerWidth <= 780 && (a.radius = parseFloat(a.radius) * parseFloat(e.roundMarkersMobileSize) / 100), e.heatMapMarkers && "1" === e.heatMapMarkers.enabled && (isNaN(a.value) || (a.value = parseFloat(a.value)), e.heatMapMarkers.source.includes(".") && (a.heatMapMarkerRef = e.heatMapMarkers.source.split(".").reduce((function (e, t) { return e[t] ? e[t] : 0 }), a)), delete a.fill, delete a.radius), a.value && void 0 !== _typeof(a.value) && "" !== a.value && (a.val = a.value, a.value = parseFloat(a.value)), "default" === a.action && (a.action = e.markerDefaults.action), void 0 !== e.markerDefaults.triggerClickOnHover && "1" === e.markerDefaults.triggerClickOnHover && (a.triggerClickOnHover = !0), void 0 !== e.triggerRegionHover && "1" === e.triggerRegionHover.enabled && (a.triggerRegionHover = !0), a.tooltipContent = iMapsModel.prepareTooltip(a.tooltipContent, e.tooltip), a.mapID = t, a })), e.roundMarkers = e.roundMarkers.filter((function (e) { return void 0 !== e.latitude && "" !== e.latitude && "" !== e.name })), e.heatMapMarkers && e.heatMapMarkers.source.includes(".") && (e.heatMapMarkers.source = "heatMapMarkerRef")), Array.isArray(e.iconMarkers) && e.iconMarkers.length && e.iconMarkers.map((function (a) { return void 0 !== a.useDefaults && "1" !== a.useDefaults || Object.assign(a, e.iconMarkerDefaults), a.coordinates && (a.latitude = a.coordinates.latitude, a.longitude = a.coordinates.longitude), void 0 === a.name && (a.name = a.id), "default" === a.action && (a.action = e.iconMarkerDefaults.action), void 0 !== e.iconMarkerDefaults.triggerClickOnHover && "1" === e.iconMarkerDefaults.triggerClickOnHover && (a.triggerClickOnHover = !0), e.iconMarkersMobileSize && 100 !== parseInt(e.iconMarkersMobileSize) && window.innerWidth <= 780 && (a.scale = parseFloat(a.scale) * parseFloat(e.iconMarkersMobileSize) / 100), a.val = a.value, a.value = parseFloat(a.value), a.tooltipContent = iMapsModel.prepareTooltip(a.tooltipContent, e.tooltip), a.mapID = t, a })), Array.isArray(e.imageMarkers) && e.imageMarkers.length && e.imageMarkers.map((function (a) { return void 0 !== a.useDefaults && "1" !== a.useDefaults || Object.assign(a, e.imageMarkerDefaults), a.coordinates && (a.latitude = a.coordinates.latitude, a.longitude = a.coordinates.longitude), void 0 !== a.nonScaling && (a.nonScaling = iMapsManager.bool(a.nonScaling)), void 0 === a.size && (a.size = e.imageMarkerDefaults.size), void 0 === a.horizontalCenter && (a.horizontalCenter = e.imageMarkerDefaults.horizontalCenter), void 0 === a.verticalCenter && (a.verticalCenter = e.imageMarkerDefaults.verticalCenter), void 0 === a.name && (a.name = a.id), "default" !== a.action && void 0 !== a.action || (a.action = e.imageMarkerDefaults.action), void 0 !== e.imageMarkerDefaults.triggerClickOnHover && "1" === e.imageMarkerDefaults.triggerClickOnHover && (a.triggerClickOnHover = !0), e.imageMarkersMobileSize && 100 !== parseInt(e.imageMarkersMobileSize) && window.innerWidth <= 780 && (a.size = parseFloat(a.size) * parseFloat(e.imageMarkersMobileSize) / 100), a.val = a.value, a.value = parseFloat(a.value), a.tooltipContent = iMapsModel.prepareTooltip(a.tooltipContent, e.tooltip), a.mapID = t, a })), Array.isArray(e.labels) && e.labels.length && e.labels.map((function (a) { return void 0 !== a.useDefaults && "1" !== a.useDefaults || (Object.assign(a, e.labelDefaults), Object.assign(a, e.labelPosition)), a.coordinates && (Object.assign(a, a.coordinates), delete a.coordinates), "default" === a.action && (a.action = e.labelDefaults.action), void 0 !== e.labelDefaults.triggerClickOnHover && "1" === e.labelDefaults.triggerClickOnHover && (a.triggerClickOnHover = !0), void 0 !== a.size && (a.fontSize = a.size), e.labelsMobileSize && 100 !== parseInt(e.labelsMobileSize) && window.innerWidth <= 780 && (a.fontSize = parseInt(a.fontSize) * parseInt(e.labelsMobileSize) / 100, a.size = a.fontSize), a.tooltipContent = iMapsModel.prepareTooltip(a.tooltipContent, e.tooltip), a.mapID = t, a })), Array.isArray(e.lines) && e.lines.length && e.lines.map((function (t) { return void 0 !== t.useDefaults && "1" !== t.useDefaults || Object.assign(t, e.lineDefaults), t.curvature = parseFloat(t.curvature), t })), e }, prepareExcludeIncludes: function (e) { return void 0 !== e.onlyIncludeActive && 1 === parseInt(e.onlyIncludeActive) ? (e.include = [], e.exclude = [], e.regions && e.regions.forEach((function (t, a) { e.include.push(t.id), isNaN(t.id) || e.include.push(parseInt(t.id)) })), e) : (e.exclude && "string" == typeof e.exclude && e.exclude.trim().length && (e.exclude = e.exclude.split(",").map((function (e) { return e.trim() }))), e.include && e.include.trim().length && (e.include = e.include.split(",").map((function (e) { return e.trim() })), e.include.map((function (t) { isNaN(t) || e.include.push(parseInt(t)) }))), e) } }; iMapsModel.coordinatesToInt = function (e) { return function e(t) { "object" === _typeof(t) && null !== t && Object.keys(t).map((function (a, o) { if ("object" === _typeof(t[a])) if ("coordinates" === a || "homeGeoPoint" === a) !function (e, t) { t[e].latitude = Number(t[e].latitude), t[e].longitude = Number(t[e].longitude) }(a, t); else { if (void 0 !== t.className) return; e(t[a]) } })) }(e), e }, iMapsModel.prepareColor = function (e) { var t = ["inactiveColor", "activeColor", "hoverColor", "hover", "inactiveHoverColor", "backgroundColor", "color", "minColor", "maxColor", "fill", "projectionBackgroundColor", "borderColor", "borderColorHover"], a = function (e, a) { t.includes(e) && (a[e].includes("|") ? a[e] = function (e) { var t, a, o, i = e.split("|"); return a = "undefined" != typeof igmGradientType ? igmGradientType : "LinearGradient", o = "undefined" != typeof igmGradientOffset && Array.isArray(igmGradientOffset) ? igmGradientOffset : [], t = new am4core[a], i.forEach((function (e, a) { t.addColor(am4core.color(e), 1, o[a]) })), t.rotation = "undefined" != typeof igmGradientRotation ? igmGradientRotation : 0, t }(a[e]) : a[e].startsWith("http") ? a[e] = function (e) { var t = e, a = new am4core.Pattern; a.width = 150, a.height = 150, a.strokeWidth = 0, a.stroke = am4core.color("#6699cc"); var o = new am4core.Image; return o.href = t, o.width = 150, o.height = 150, o.x = 0, o.y = 0, o.verticalCenter = "middle", o.valign = "middle", a.addElement(o.element), a.addElement(o.element), a.addElement(o.element), a }(a[e]) : "hover" !== e || "transparent" !== a[e] && !a[e].endsWith(",0)") ? "transparent" === a[e] ? a[e] = am4core.color("rgba(0,0,0,0)") : a[e] = am4core.color(a[e]) : a[e] = am4core.color("rgba(0,0,0,0.001)")) }; return function e(t) { "object" === _typeof(t) && null !== t && Object.keys(t).map((function (o, i) { if ("object" === _typeof(t[o])) e(t[o]); else { if (void 0 !== t.className) return; a(o, t) } })) }(e), e }, iMapsModel.extractCodes = function (e) { for (var t = {}, a = 0; a < e.features.length; a++)t[e.features[a].properties.id] = e.features[a].properties.name; return t }; var iMapsManager = { maps: {}, init: function (e) { this.addMap(e) }, addMap: function (e) { var t, a, o, i, r, n, l, s, d, p, u, c, m, g, h = this, M = iMapsData.data[e], v = M.id, f = document.getElementById(M.container); if (!M.disabled && null !== f) { if (g = f.closest(".map_aspect_ratio"), void 0 !== h.maps[v] && h.maps[v].map.dispose(), window.innerWidth <= 780 && void 0 !== M.visual.paddingTop && "" !== M.visual.paddingTop ? g.style.paddingTop = String(M.visual.paddingTopMobile) + "%" : g.style.paddingTop = String(M.visual.paddingTop) + "%", window.addEventListener("resize", (function () { window.innerWidth <= 780 && void 0 !== M.visual.paddingTop && "" !== M.visual.paddingTop ? g.style.paddingTop = String(M.visual.paddingTopMobile) + "%" : g.style.paddingTop = String(M.visual.paddingTop) + "%" })), M.visual.maxWidth, "" !== M.visual.fontFamily && "inherit" !== M.visual.fontFamily && (f.closest(".map_box").style.fontFamily = M.visual.fontFamily), h.maps[v] = { map: am4core.create(M.container, am4maps.MapChart), series: [], clusterSeries: {}, seriesIndex: {}, seriesById: {}, data: M, allBaseSeries: [], labelSeries: [], baseRegionSeries: {}, groupedBaseRegionSeries: [], backgroundSeries: {} }, (t = h.maps[v].map).readerTitle = "Interactive Map", p = h.maps[v].clusterSeries, t.events.on("ready", (function (e) { var t = new Event("mapready"); f.dispatchEvent(t), h.triggerOnReady(v, M) })), t.events.on("appeared", (function (e) { var t = new Event("mapappeared"); f.dispatchEvent(t), h.triggerOnAppeared(v, M), f.classList.remove("map_loading") })), void 0 !== iMapsData.options && void 0 !== iMapsData.options.locale && iMapsData.options.locale && void 0 !== window["am4lang_" + iMapsData.options.locale] && (t.language.locale = window["am4lang_" + iMapsData.options.locale]), M.zoom && M.zoom.smallMap && h.bool(M.zoom.smallMap) && (t.smallMap = new am4maps.SmallMap), "custom" === M.map || h.bool(M.useGeojson) ? t.geodataSource.url = M.mapURL : (u = iMapsRouter.getVarByName(M.map), t.geodata = window[u]), void 0 !== iMapsData.options && void 0 !== iMapsData.options.lang && iMapsData.options.lang && void 0 !== window["am4geodata_lang_" + iMapsData.options.lang] && (t.geodataNames = window["am4geodata_lang_" + iMapsData.options.lang]), t.projection = new am4maps.projections[M.projection], M.map.startsWith("usaTerritories") && t.events.on("ready", (function (e) { t.projection = new am4maps.projections[M.projection] })), t.fontFamily = M.visual.fontFamily, M.exportMenu && h.bool(M.exportMenu.enable) && (t.exporting.menu = new am4core.ExportMenu, t.exporting.menu.items[0].icon = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiA8Zz4KICA8dGl0bGU+YmFja2dyb3VuZDwvdGl0bGU+CiAgPHJlY3QgeD0iLTEiIHk9Ii0xIiB3aWR0aD0iNS45NDQ3NzMiIGhlaWdodD0iNS45NDQ3NzMiIGlkPSJjYW52YXNfYmFja2dyb3VuZCIgZmlsbD0ibm9uZSIvPgogPC9nPgoKIDxnPgogIDx0aXRsZT5MYXllciAxPC90aXRsZT4KICA8cGF0aCBzdHJva2U9Im51bGwiIGQ9Im0xNC40MjcwMzEsMTUuNzQwNDAxcTAsLTAuMjU3NjQzIC0wLjE4ODI3NCwtMC40NDU5MTd0LTAuNDQ1OTE3LC0wLjE4ODI3NHQtMC40NDU5MTcsMC4xODgyNzR0LTAuMTg4Mjc0LDAuNDQ1OTE3dDAuMTg4Mjc0LDAuNDQ1OTE3dDAuNDQ1OTE3LDAuMTg4Mjc0dDAuNDQ1OTE3LC0wLjE4ODI3NHQwLjE4ODI3NCwtMC40NDU5MTd6bTIuNTM2NzgsMHEwLC0wLjI1NzY0MyAtMC4xODgyNzQsLTAuNDQ1OTE3dC0wLjQ0NTkxNywtMC4xODgyNzR0LTAuNDQ1OTE3LDAuMTg4Mjc0dC0wLjE4ODI3NCwwLjQ0NTkxN3QwLjE4ODI3NCwwLjQ0NTkxN3QwLjQ0NTkxNywwLjE4ODI3NHQwLjQ0NTkxNywtMC4xODgyNzR0MC4xODgyNzQsLTAuNDQ1OTE3em0xLjI2ODM5LC0yLjIxOTY4NWwwLDMuMTcwOTdxMCwwLjM5NjM3NCAtMC4yNzc0NjEsMC42NzM4MzR0LTAuNjczODM0LDAuMjc3NDYxbC0xNC41ODY0NywwcS0wLjM5NjM3NCwwIC0wLjY3MzgzNCwtMC4yNzc0NjF0LTAuMjc3NDYxLC0wLjY3MzgzNGwwLC0zLjE3MDk3cTAsLTAuMzk2Mzc0IDAuMjc3NDYxLC0wLjY3MzgzNHQwLjY3MzgzNCwtMC4yNzc0NjFsNC42MDc4MTYsMGwxLjMzNzc1MSwxLjM0NzY1OXEwLjU3NDczOCwwLjU1NDkyMSAxLjM0NzY1OSwwLjU1NDkyMXQxLjM0NzY1OSwtMC41NTQ5MjFsMS4zNDc2NTksLTEuMzQ3NjU5bDQuNTk3OTA4LDBxMC4zOTYzNzQsMCAwLjY3MzgzNCwwLjI3NzQ2MXQwLjI3NzQ2MSwwLjY3MzgzNGwwLjAwMDAxOCwwem0tMy4yMjA1MjMsLTUuNjM4MzlxMC4xNjg0NTYsMC40MDYyODIgLTAuMTM4NzMsMC42OTM2NTFsLTQuNDM5MzYsNC40MzkzNnEtMC4xNzgzNjUsMC4xODgyNzQgLTAuNDQ1OTE3LDAuMTg4Mjc0dC0wLjQ0NTkxNywtMC4xODgyNzRsLTQuNDM5MzYsLTQuNDM5MzZxLTAuMzA3MTg3LC0wLjI4NzM2OSAtMC4xMzg3MywtMC42OTM2NTFxMC4xNjg0NTYsLTAuMzg2NDY1IDAuNTg0NjQ3LC0wLjM4NjQ2NWwyLjUzNjc4LDBsMCwtNC40MzkzNnEwLC0wLjI1NzY0MyAwLjE4ODI3NCwtMC40NDU5MTd0MC40NDU5MTcsLTAuMTg4Mjc0bDIuNTM2NzgsMHEwLjI1NzY0MywwIDAuNDQ1OTE3LDAuMTg4Mjc0dDAuMTg4Mjc0LDAuNDQ1OTE3bDAsNC40MzkzNmwyLjUzNjc4LDBxMC40MTYxOTEsMCAwLjU4NDY0NywwLjM4NjQ2NXoiIGlkPSJzdmdfMSIvPgogPC9nPgo8L3N2Zz4=", t.exporting.menu.align = M.exportMenu.align ? M.exportMenu.align : "right", t.exporting.menu.verticalAlign = M.exportMenu.verticalAlign ? M.exportMenu.verticalAlign : "top"), M.touchInterface && (h.bool(M.touchInterface.tapToActivate) && (t.tapToActivate = !0, t.tapTimeout = M.touchInterface.tapTimeout), h.bool(M.touchInterface.dragGrip) && (t.dragGrip.disabled = !1, t.dragGrip.autoHideDelay = M.touchInterface.dragGripAutoHideDelay)), t.background.fill = M.visual.backgroundColor, t.background.fillOpacity = M.visual.backgroundOpacity, t.backgroundSeries.mapPolygons.template.focusable = !1, t.background.focusable = !1, t.backgroundSeries.focusable = !1, void 0 !== M.visual.bgImage && void 0 !== M.visual.bgImage.url && "" !== M.visual.bgImage.url && ((c = t.series.push(new am4maps.MapImageSeries)).toBack(), (m = c.mapImages.template.createChild(am4core.Image)).propertyFields.href = "src", m.width = t.width, m.height = t.height, c.data = [{ src: M.visual.bgImage.url }], h.maps[v].backgroundSeries = c), t.exporting.backgroundColor = M.visual.backgroundColor, t.exporting.filePrefix = "interactive_map", t.exporting.useWebFonts = !1, "Orthographic" === M.projection && M.grid && ((d = t.series.push(new am4maps.GraticuleSeries)).mapLines.template.line.stroke = M.grid.color, d.mapLines.template.line.strokeOpacity = 1, d.fitExtent = !1, t.backgroundSeries.mapPolygons.template.polygon.fillOpacity = 1, t.backgroundSeries.mapPolygons.template.polygon.fill = M.grid.projectionBackgroundColor), h.handleZoom(v), M.legend && h.bool(M.legend.enabled) && (t.legend = new am4maps.Legend, "top" === M.legend.position || "bottom" === M.legend.position ? (t.legend.contentAlign = M.legend.align, t.legend.valign = M.legend.position) : (t.legend.position = M.legend.position, t.legend.align = M.legend.position, t.legend.valign = M.legend.valign), void 0 !== M.legend.style && "default" !== M.legend.style && h.setLegendStyle(v, t.legend, M.legend.style), void 0 !== _typeof(M.legend.fill) && (t.legend.labels.template.fill = M.legend.fill), "false" === M.legend.clickable && (t.legend.itemContainers.template.interactionsEnabled = !1), "toggle" === M.legend.clickable && t.legend.itemContainers.template.events.on("hit", (function (e) { iMapsManager.clearSelected(v) })), "select" === M.legend.clickable && (t.legend.itemContainers.template.togglable = !1, t.legend.itemContainers.template.events.on("hit", (function (e) { iMapsManager.clearSelected(v); var t = []; "MapPolygonSeries" === h.getTargetSeriesType(e.target.dataItem.dataContext) && (e.target.dataItem.dataContext.mapPolygons.each((function (e) { e.dataItem.dataContext.madeFromGeoData || (e.setState("active"), e.isActive = !0, e.isHover = !1, t.push(e)) })), h.maps[v].selected = t) })), t.legend.itemContainers.template.events.on("over", (function (e) { var t = h.getTargetSeriesType(e.target.dataItem.dataContext); if (e.target.dataItem.dataContext.zIndex = Number.MAX_VALUE, e.target.dataItem.dataContext.toFront(), "MapImageSeries" === t) e.target.dataItem.dataContext.mapImages.each((function (e) { e.setState("highlight") })); else { if ("MapPolygonSeries" !== t) return; e.target.dataItem.dataContext.mapPolygons.each((function (e) { e.dataItem.dataContext.madeFromGeoData || e.setState("highlight") })) } })), t.legend.itemContainers.template.events.on("out", (function (e) { var t = h.getTargetSeriesType(e.target.dataItem.dataContext); if ("MapImageSeries" === t) e.target.dataItem.dataContext.mapImages.each((function (e) { e.setState("default") })); else { if ("MapPolygonSeries" !== t) return; e.target.dataItem.dataContext.mapPolygons.each((function (e) { e.dataItem.dataContext.madeFromGeoData || e.setState("default") })) } })))), M.customLegend && h.bool(M.customLegend.enabled)) { var b = void 0 !== M.customLegend.type ? M.customLegend.type : "internal"; M.customLegend.data && Array.isArray(M.customLegend.data) && "internal" === b && ((n = new am4maps.Legend).parent = t.chartContainer, n.data = M.customLegend.data, void 0 !== M.customLegend.style && "default" !== M.customLegend.style && h.setLegendStyle(v, n, M.customLegend.style), n.itemContainers.template.clickable = !1, n.itemContainers.template.focusable = !1, n.itemContainers.template.hoverable = !1, n.itemContainers.template.cursorOverStyle = am4core.MouseCursorStyle.default, n.labels.template.truncate = !1, n.labels.template.wrap = !0, "top" === M.customLegend.position || "bottom" === M.customLegend.position ? (n.contentAlign = M.customLegend.align, n.valign = M.customLegend.position) : (n.position = M.customLegend.position, n.align = M.customLegend.position, n.valign = M.customLegend.valign), void 0 !== _typeof(M.customLegend.fill) && (n.labels.template.fill = M.customLegend.fill)) } a = h.pushRegionSeries(v, M), h.maps[v].baseRegionSeries = a, Array.isArray(M.regionGroups) && M.regionGroups.length && (o = h.pushGroupSeries(v, M), h.maps[v].groupedBaseRegionSeries = o), Array.isArray(M.overlay) && M.overlay.length && M.overlay.forEach((function (e) { h.pushSeries(v, e) })), Array.isArray(M.lines) && M.lines.length && h.pushLineSeries(v, M), Array.isArray(M.roundMarkers) && M.roundMarkers.length && (i = h.pushRoundMarkerSeries(v, M), M.clusterMarkers && h.bool(M.clusterMarkers.enabled) && (i.hidden = !0, h.setupClusters(M, v), p[v].zoomLevels[M.clusterMarkers.zoomLevel] = i, p[v].zoomLevels[1] && (p[v].zoomLevels[1].hidden = !1, h.maps[v].allBaseSeries.push(p[v].zoomLevels[1])))), Array.isArray(M.imageMarkers) && M.imageMarkers.length && (l = h.pushImageMarkerSeries(v, M), h.maps[v].allBaseSeries.push(l)), Array.isArray(M.iconMarkers) && M.iconMarkers.length && (s = h.pushIconMarkerSeries(v, M), h.maps[v].allBaseSeries.push(s)), Array.isArray(M.labels) && M.labels.length && (r = h.pushLabelSeries(v, M), h.maps[v].allBaseSeries.push(r)), h.handleInfoBox(v) } }, setLegendStyle: function (e, t, a) { var o = { xsmall: 10, small: 13, regular: 16, large: 19, larger: 23 }[a], i = t.markers.template; t.labels.template.fontSize = o, t.useDefaultMarker = !0, i.width = o, i.height = o }, handleZoom: function (e) { var t = this, a = t.maps[e].map, o = t.maps[e].data, i = (t.maps[e].series, t.maps[e].allBaseSeries, !0), r = !0; if (void 0 !== o.viewport && parseFloat(o.viewport.zoomLevel) >= 1 && (a.homeZoomLevel = parseFloat(o.viewport.zoomLevel), r = !1, a.seriesContainer.resizable = !1, a.seriesContainer.draggable = !1, a.chartContainer.wheelable = !1), void 0 !== o.viewport && o.viewport.homeGeoPoint && 0 !== o.viewport.homeGeoPoint.latitude && 0 !== o.viewport.homeGeoPoint.longitude && (a.homeGeoPoint = o.viewport.homeGeoPoint), void 0 !== o.viewport && o.viewport.offset && ("" !== o.viewport.offset.longitude && "0" !== o.viewport.offset.longitude && (i = !1, a.deltaLongitude = o.viewport.offset.longitude), "" !== o.viewport.offset.latitude && "0" !== o.viewport.offset.latitude && (i = !1, a.deltaLatitude = o.viewport.offset.latitude), i && iMapsManager.latLongOffsetFix(o, a, r)), void 0 === o.viewport && iMapsManager.latLongOffsetFix(o, a, r), void 0 === o.zoom) return void 0 !== o.zoomMaster && t.bool(o.zoomMaster) ? (a.seriesContainer.draggable = !0, a.seriesContainer.resizable = !0, a.zoomControl = new am4maps.ZoomControl, a.zoomControl.focusable = !1, a.zoomControl.exportable = !1, a.zoomControl.children && a.zoomControl.children.values && a.zoomControl.children.values.forEach((function (e) { e.focusable = !1 })), a.zoomControl.align = "right", a.zoomControl.valign = "bottom") : (a.seriesContainer.resizable = !1, a.seriesContainer.draggable = !1), a.seriesContainer.events.disableType("doublehit"), a.chartContainer.background.events.disableType("doublehit"), void (a.chartContainer.wheelable = !1); if ("Orthographic" !== o.projection ? (a.seriesContainer.draggable = !!o.zoom && t.bool(o.zoom.draggable), a.seriesContainer.resizable = !!o.zoom && t.bool(o.zoom.draggable), t.bool(o.zoom.draggable) && (a.seriesContainer.cursorDownStyle = am4core.MouseCursorStyle.grabbing), a.centerMapOnZoomOut = !1, a.maxPanOut = 0, t.bool(o.zoom.enabled) && !t.bool(o.zoom.draggable) && t.bool(o.zoom.mobileResizable) && /Mobi|Android/i.test(navigator.userAgent) && (a.seriesContainer.draggable = !0, a.seriesContainer.resizable = !0)) : (a.seriesContainer.draggable = !1, a.seriesContainer.resizable = !1, a.panBehavior = "rotateLongLat"), t.bool(o.zoom.enabled)) { if (a.chartContainer.wheelable = t.bool(o.zoom.wheelable), t.bool(o.zoom.doubleHitZoom) || (a.seriesContainer.events.disableType("doublehit"), a.chartContainer.background.events.disableType("doublehit")), void 0 !== o.zoom.maxZoomLevel && (a.maxZoomLevel = parseInt(o.zoom.maxZoomLevel)), t.bool(o.zoom.controls) && (a.zoomControl = new am4maps.ZoomControl, a.zoomControl.exportable = !1, a.zoomControl.children && a.zoomControl.children.values && a.zoomControl.children.values.forEach((function (e) { e.focusable = !1 })), a.zoomControl.exportable = !1, a.zoomControl.align = o.zoom.controlsPositions ? o.zoom.controlsPositions.align : "right", a.zoomControl.valign = o.zoom.controlsPositions ? o.zoom.controlsPositions.valign : "bottom", void 0 === o.zoom.homeButton || t.bool(o.zoom.homeButton))) { var n = new am4core.Button; n.focusable = !1, n.events.on("hit", (function () { a.goHome(), iMapsManager.resetDrilldown(e), "undefined" != typeof iMapsActions && void 0 !== iMapsActions.resetActions && iMapsActions.resetActions(e) })), n.icon = new am4core.Sprite, n.padding(7, 5, 7, 5), n.width = 30, n.icon.path = "M16,8 L14,8 L14,16 L10,16 L10,10 L6,10 L6,16 L2,16 L2,8 L0,8 L8,0 L16,8 Z M16,8", n.marginBottom = 3, n.parent = a.zoomControl, n.insertBefore(a.zoomControl.plusButton), a.events.on("inited", (function () { n.deepInvalidate() })) } t.bool(o.zoom.externalControls) && iMapsManager.handleExternalZoom(o.id) } else a.maxZoomLevel = parseFloat(o.viewport.zoomLevel), a.seriesContainer.events.disableType("doublehit"), a.chartContainer.background.events.disableType("doublehit"), a.seriesContainer.draggable = !1, a.seriesContainer.resizable = !1, a.chartContainer.wheelable = !1; if (void 0 !== o.fullScreen && t.bool(o.fullScreen.enabled)) { var l = a.chartContainer.createChild(am4core.Button); l.events.on("hit", (function (e) { var t = document.querySelector("#map_" + e.target.icon.mapID).closest(".map_wrapper"); iMapsManager.toggleFullscreen(t), iMapsManager.isFullScreen = e.target })), l.align = o.fullScreen.align, l.valign = o.fullScreen.valign, l.margin(5, 5, 5, 5), l.padding(5, 0, 5, 0), l.width = 30, l.icon = new am4core.Sprite, l.icon.path = iMapsManager.library.icons.goFullIconPath, l.icon.isFullScreen = !1, l.icon.mapID = e, t.bool(o.fullScreen.mobileOnly) ? l.id = "_fullscreen_button_only_mobile" : l.id = "_fullscreen_button", a.events.on("inited", (function () { l.deepInvalidate() })) } a.events.on("mappositionchanged", (function (e) { })), a.events.on("zoomlevelchanged", (function (a) { var i, r = t.maps[e].clusterSeries, n = a.target.zoomLevel, l = t.bool(o.drillDownOnClick), s = t.maps[e].isDrilling, d = t.maps[e].drilledTo, p = t.filteredMap, u = !1, c = !1; if (void 0 !== o.liveFilter) c = t.bool(o.liveFilter.enabled); l && void 0 !== o.alwaysKeepBase && t.bool(o.alwaysKeepBase) && (u = !0), c && o.liveFilter && t.bool(o.liveFilter.keepBase) && (u = !0), r && Object.keys(r).length && Object.keys(r).forEach((function (a) { l || c ? c && parseInt(p) === parseInt(r[a].overlay) || c && parseInt(p) === parseInt(e) || c && u && !t.bool(r[a].overlay) || s && d && parseInt(d) === parseInt(r[a].overlay) || l && !t.bool(r[a].overlay) && !u && !d || l && !t.bool(r[a].overlay) && u ? (i = t.getClosest(r[a].zoomLevels, n), Object.keys(r[a].zoomLevels).forEach((function (e) { r[a].zoomLevels[e].hide(), parseFloat(e) === i ? r[a].zoomLevels[e].show() : r[a].zoomLevels[e].hide() }))) : Object.keys(r[a].zoomLevels).forEach((function (e) { r[a].zoomLevels[e].hide() })) : (i = t.getClosest(r[a].zoomLevels, n), Object.keys(r[a].zoomLevels).forEach((function (e) { r[a].zoomLevels[e].hide(), parseFloat(e) === i ? r[a].zoomLevels[e].show() : r[a].zoomLevels[e].hide() }))) })) })) }, getClosest: function (e, t) { return Object.keys(e).reduce((function (e, a) { return e = parseInt(e), a = parseInt(a), Math.abs(a - t) < Math.abs(e - t) ? a : e })) }, resetDrilldown: function (e) { var t = this, a = t.maps[e].data, o = t.maps[e].series, i = t.maps[e].allBaseSeries, r = t.maps[e].backgroundSeries; if (t.bool(a.drillDownOnClick)) { for (var n = 0, l = o.length; n < l; n++)o[n].hide(); for (var s = 0, d = i.length; s < d; s++)i[s].show(), r.mapPolygons && r.show(); iMapsManager.maps[e].drilledTo = !1, iMapsManager.maps[e].isDrilling = !1 } }, latLongOffsetFix: function (e, t, a) { var o = e.map;["russiaLow", "russiaHigh", "russiaCrimeaLow", "russiaCrimeaHigh", "region/world/asiaLow", "region/world/asiaHigh", "region/world/asiaUltra", "region/world/asiaIndiaLow", "region/world/asiaIndiaHigh", "region/world/asiaIndiaUltra"].includes(o) && e.exclude && !e.exclude.includes("RU") && (t.deltaLongitude = -100, a && (t.homeZoomLevel = 1.5)), "newZealandLow" !== o && "newZealandHigh" != o || (t.deltaLongitude = 20) }, pushGroupSeries: function (e, t) { var a, o = []; return t.regionGroups.forEach((function (i) { var r = {}, n = i.map((function (e) { return e.id })); (r = Object.assign({}, t)).regionsGroupHover = !0, r.regions = i, r.include = n, a = iMapsManager.pushRegionSeries(e, r, !0), o.push(a) })), o }, pushSeries: function (e, t) { var a, o, i, r, n, l, s = this, d = s.maps[e].clusterSeries, p = s.maps[e].data, u = s.maps[e].seriesIndex, c = s.maps[e].seriesById, m = s.bool(s.maps[e].data.drillDownOnClick), g = iMapsRouter.getCleanMapName(t.map, t.id), h = !1; !1 !== g && void 0 !== t.id && (c[t.id] = [], void 0 !== p.liveFilter && parseInt(p.liveFilter.default) !== p.id && (h = parseInt(p.liveFilter.default), s.filteredMap = h), Array.isArray(s.maps[e].seriesIndex[t.map]) || (s.maps[e].seriesIndex[g] = []), Array.isArray(t.regions) || (t.regions = []), void 0 === p.allowEmpty && (p.allowEmpty = 0), (t.regions.length || s.bool(p.allowEmpty)) && (s.bool(p.allowEmpty) || (t.include = [], t.regions.forEach((function (e, a) { t.include.push(e.id), isNaN(e.id) || t.include.push(parseInt(e.id)) }))), a = iMapsManager.pushRegionSeries(e, t), u[g].push(a), c[t.id].push(a), m && (a.hidden = !0, a.mapID = t.id), p.liveFilter && s.bool(p.liveFilter.enabled) && h && h !== t.id && (a.hidden = !0)), Array.isArray(t.regionGroups) && t.regionGroups.length && s.pushGroupSeries(e, t).forEach((function (e) { u[g].push(e), c[t.id].push(e), m && (e.hidden = !0, e.mapID = t.id), p.liveFilter && s.bool(p.liveFilter.enabled) && h && h !== t.id && (e.hidden = !0) })), Array.isArray(t.lines) && t.lines.length && (r = iMapsManager.pushLineSeries(e, t), u[g].push(r), c[t.id].push(r), m && (r.hidden = !0), p.liveFilter && s.bool(p.liveFilter.enabled) && h && h !== t.id && (r.hidden = !0)), Array.isArray(t.roundMarkers) && t.roundMarkers.length && (o = iMapsManager.pushRoundMarkerSeries(e, t), u[g].push(o), c[t.id].push(o), m && (o.hidden = !0, o.mapID = t.id), t.clusterMarkers && s.bool(t.clusterMarkers.enabled) && (o.hidden = !0, s.setupClusters(t, e, t.id), d[t.id].zoomLevels[t.clusterMarkers.zoomLevel] = o, !m && d[t.id].zoomLevels[1] && (d[t.id].zoomLevels[1].hidden = !1, p.liveFilter && s.bool(p.liveFilter.enabled) && h && h !== t.id && (d[t.id].zoomLevels[1].hidden = !0))), p.liveFilter && s.bool(p.liveFilter.enabled) && h && h !== t.id && (o.hidden = !0)), Array.isArray(t.iconMarkers) && t.iconMarkers.length && (n = iMapsManager.pushIconMarkerSeries(e, t), u[g].push(n), c[t.id].push(n), m && (n.hidden = !0), p.liveFilter && s.bool(p.liveFilter.enabled) && h && h !== t.id && (n.hidden = !0)), Array.isArray(t.imageMarkers) && t.imageMarkers.length && (l = iMapsManager.pushImageMarkerSeries(e, t), u[g].push(l), c[t.id].push(l), m && (l.hidden = !0), p.liveFilter && s.bool(p.liveFilter.enabled) && h && h !== t.id && (l.hidden = !0)), Array.isArray(t.labels) && t.labels.length && (i = iMapsManager.pushLabelSeries(e, t), u[g].push(i), c[t.id].push(i), m && (i.hidden = !0), p.liveFilter && s.bool(p.liveFilter.enabled) && h && h !== t.id && (i.hidden = !0))) }, pushRegionSeries: function (e, t, a) { var o, i, r, n, l = this, s = l.maps[e].map, d = t.tooltip || {}; a = a || !1; if (t = t || {}, o = s.series.push(new am4maps.MapPolygonSeries), "custom" === t.map || l.bool(t.useGeojson) ? o.geodataSource.url = t.mapURL : (n = iMapsRouter.getVarByName(t.map), o.geodata = window[n]), o.name = t.regionLegend && "" !== t.regionLegend.title ? t.regionLegend.title : t.title, o.hiddenInLegend = !t.regionLegend || !l.bool(t.regionLegend.enabled), t.regionLegend && "onlyGroups" === t.regionLegend.enabled && a && (o.hiddenInLegend = !1), t.regionLegend && "onlyGroups" === t.regionLegend.enabled && !a && (o.hiddenInLegend = !0), t.regionLegend && "ignoreGroups" === t.regionLegend.enabled && a && (o.hiddenInLegend = !0), t.regionLegend && "ignoreGroups" === t.regionLegend.enabled && !a && (o.hiddenInLegend = !1), e === t.id && (void 0 === l.maps[e].baseSeries && (l.maps[e].baseSeries = []), l.maps[e].baseSeries.push(o), l.maps[e].allBaseSeries.push(o)), o.useGeodata = !0, Array.isArray(t.exclude) && t.exclude.length && (o.exclude = t.exclude), Array.isArray(t.include) && t.include.length && (o.include = t.include), t.heatMapRegions && l.bool(t.heatMapRegions.enabled) && l.setupHeatMap(o, e, t), o.data = t.regions, a && (o.groupHover = !0), i = o.mapPolygons.template, l.setupTooltip(e, o, t), void 0 !== t.regionsTooltipTemplate && "" !== t.regionsTooltipTemplate.trim() ? (i.tooltipText = t.regionsTooltipTemplate, i.tooltipHTML = t.regionsTooltipTemplate) : (i.tooltipText = d.template ? d.template : "{tooltipContent}", i.tooltipHTML = d.template ? d.template : "{tooltipContent}"), i.adapter.add("tooltipHTML", (function (e, t, a) { return "object" === _typeof(t.dataItem.dataContext) && void 0 !== d.onlyWithData && l.bool(d.onlyWithData) && !0 === t.dataItem.dataContext.madeFromGeoData ? (t.tooltip.tooltipText = void 0, t.tooltip.tooltipHTML = void 0, "") : "" === e ? e : e.replace(/\\/g, "") })), i.adapter.add("tooltipText", (function (e, t, a) { return "object" === _typeof(t.dataItem.dataContext) && void 0 !== d.onlyWithData && l.bool(d.onlyWithData) && !0 === t.dataItem.dataContext.madeFromGeoData ? (t.tooltip.tooltipText = void 0, t.tooltip.tooltipHTML = void 0, "") : "" === e ? e : e.replace(/\\/g, "") })), o.fill = t.regionDefaults.fill, i.fill = t.regionDefaults.inactiveColor, i.stroke = t.visual.borderColor, i.strokeWidth = t.visual.borderWidth, i.propertyFields.fill = "fill", a || void 0 !== t.heatMapRegions && l.bool(t.heatMapRegions.enabled) && l.bool(t.heatMapRegions.noHover) || (i.states.create("hover").propertyFields.fill = "hover"), t.regionActiveState && l.bool(t.regionActiveState.enabled) && (r = i.states.create("active"), "custom" === t.regionActiveState.source ? r.properties.fill = t.regionActiveState.fill : r.propertyFields.fill = "hover"), i.states.create("highlight").propertyFields.fill = "hover", a ? (i.events.on("out", (function (t) { l.groupHoverOut(e, t) })), i.events.on("over", (function (t) { l.groupHover(e, t), o.toFront(), void 0 !== o.autoLabelSeries && o.autoLabelSeries.toFront() })), i.events.on("hit", (function (t) { l.groupHit(e, t) }))) : (i.events.on("hit", (function (t) { l.singleHit(e, t) })), i.events.on("over", (function (t) { l.setupHoverEvents(e, t) }))), i.focusable = !1, i.events.on("hit", (function (t) { l.setupHitEvents(e, t) })), l.bool(t.smallMap) && s.smallMap.series.push(o), t.regionLabels && l.bool(t.regionLabels.source)) { o.calculateVisualCenter = !0; var p = s.series.push(new am4maps.MapImageSeries), u = p.mapImages.template.createChild(am4core.Label), c = "undefined" != typeof igmLabelsBackground && igmLabelsBackground; "object" == typeof c && (u.background = new am4core.RoundedRectangle, u.background.cornerRadius(...c.cornerRadius), u.background.fill = am4core.color(c.color), u.padding(...c.padding), u.background.stroke = am4core.color(c.stroke)), l.maps[e].labelSeries.push(p), o.autoLabelSeries = p, u.horizontalCenter = t.regionLabels.horizontalCenter, u.verticalCenter = t.regionLabels.verticalCenter, u.fontSize = t.regionLabels.fontSize, u.fill = t.regionLabels.fill, u.fontFamily = t.regionLabels.fontFamily ? t.regionLabels.fontFamily : "inherit", u.fontWeight = t.regionLabels.fontWeight ? t.regionLabels.fontWeight : "normal", t.regionLabels.mobileFontSize && 100 !== parseInt(t.regionLabels.mobileFontSize) && window.innerWidth <= 780 && (u.fontSize = parseInt(u.fontSize) * parseInt(t.regionLabels.mobileFontSize) / 100, u.size = u.fontSize), o.events.on("hidden", (function (e) { p.hide() })), o.events.on("shown", (function (e) { p.show() })), u.events.on("hit", (function (e) { o.getPolygonById(e.target.parent.LabelForRegion).dispatchImmediately("hit") })), u.events.on("over", (function (t) { iMapsManager.hover(e, t.target.parent.LabelForRegion, !1) })), u.events.on("out", (function (t) { iMapsManager.clearHovered(e, t.target.parent.LabelForRegion) })), l.setupTooltip(e, p, t, u), u.interactionsEnabled = !0, u.nonScaling = l.bool(t.regionLabels.nonScaling), p.hiddenInLegend = !0, o.events.on("inited", (function () { o.hidden && (p.hide(), p.hidden = !0) })), l.bool(t.admin) && (u.draggable = !0, u.cursorOverStyle = am4core.MouseCursorStyle.grab, u.events.on("dragstop", (function (e) { var a = am4core.utils.spritePointToSvg({ x: 0, y: 0 }, e.target); a = am4core.utils.spritePointToSvg({ x: 0 - e.target.maxLeft, y: 0 - e.target.maxTop }, e.target); var o, i = s.svgPointToGeo(a), r = document.querySelector("[data-depend-id=" + t.regionLabelCustomCoordinates + "]"); r && ((o = iMapsManager.isJSON(r.value) ? JSON.parse(r.value) : {})[e.target.parent.LabelForRegion] = { latitude: i.latitude, longitude: i.longitude }, r.value = JSON.stringify(o)); s.seriesContainer.draggable = l.bool(t.zoom.draggable), e.target.cursorOverStyle = am4core.MouseCursorStyle.grab })), u.events.on("down", (function (e) { s.seriesContainer.draggable = !1, e.target.cursorOverStyle = am4core.MouseCursorStyle.grabbing }))); var m = !!l.isJSON(t.regionLabels.regionLabelCustomCoordinates) && JSON.parse(t.regionLabels.regionLabelCustomCoordinates); let a = "inited"; "custom" === t.map && (a = "datavalidated"), o.events.on(a, (function () { o.mapPolygons.each((function (e) { if ("custom" === t.map || void 0 !== e.visualLatitude) { var a, o = p.mapImages.create(); l.bool(t.regionLabels.activeOnly) && e.dataItem.dataContext && void 0 === e.dataItem.dataContext.tooltipContent || e.dataItem.dataContext.id.includes(",") || ("code" === t.regionLabels.source && (a = e.dataItem.dataContext.id.split("-").pop()), "{name}" === t.regionLabels.source && (a = e.dataItem.dataContext.name), "{id}" === t.regionLabels.source && (a = e.dataItem.dataContext.id), "custom" === t.regionLabels.source && void 0 !== t.regionLabels.customSource && (a = e.dataItem.dataContext.autoLabel), o.LabelForRegion = e.dataItem.dataContext.id, void 0 !== e.dataItem.dataContext.originalID && (o.groupRegion = e.dataItem.dataContext.originalID), o.tooltipDataItem = e.tooltipDataItem, o.tooltip = e.tooltip, o.tooltipHTML = e.tooltipHTML, o.tooltipPosition = l.bool(t.tooltip.fixed) ? "fixed" : "pointer", e.dataItem.dataContext.action && "none" !== e.dataItem.dataContext.action && (o.cursorOverStyle = am4core.MouseCursorStyle.pointer), m && m.hasOwnProperty(e.dataItem.dataContext.id) ? (o.latitude = m[e.dataItem.dataContext.id].latitude, o.longitude = m[e.dataItem.dataContext.id].longitude) : e.visualLatitude && (o.latitude = e.visualLatitude, o.longitude = e.visualLongitude), o.children.getIndex(0) && (o.children.getIndex(0).text = a)) } })) })) } return void 0 !== t.externalDropdown && l.bool(t.externalDropdown.enabled) && (o.calculateVisualCenter = !0), l.maps[e].series.push(o), o }, pushRoundMarkerSeries: function (e, t) { var a, o, i, r, n, l, s, d = this, p = d.maps[e].map; if (Array.isArray(t.roundMarkers) && t.roundMarkers.length) { if ((a = p.series.push(new am4maps.MapImageSeries)).name = t.roundMarkersLegend && "" !== t.roundMarkersLegend.title ? t.roundMarkersLegend.title : t.title, a.hiddenInLegend = !!t.roundMarkersLegend && !d.bool(t.roundMarkersLegend.enabled), i = (o = a.mapImages.template).createChild(am4core.Circle), d.setupTooltip(e, a, t, i), o.focusable = !1, i.radius = t.markerDefaults.radius, i.fill = t.markerDefaults.fill, i.stroke = am4core.color("#FFFFFF"), i.strokeWidth = 1, i.nonScaling = "undefined" == typeof igmRoundMarkersNonScaling || igmRoundMarkersNonScaling, (r = o.createChild(am4core.Label)).text = "{label}", r.fill = am4core.color("#fff"), r.verticalCenter = "middle", r.horizontalCenter = "middle", r.nonScaling = "undefined" == typeof igmRoundMarkersNonScaling || igmRoundMarkersNonScaling, r.fontSize = "undefined" != typeof igmClusterMarkerFontSize ? igmClusterMarkerFontSize : t.markerDefaults.radius, r.clickable = !1, r.focusable = !1, r.hoverable = !1, void 0 !== t.roundMarkersTooltipTemplate && "" !== t.roundMarkersTooltipTemplate.trim() ? (o.tooltipText = t.roundMarkersTooltipTemplate, o.tooltipHTML = t.roundMarkersTooltipTemplate) : (o.tooltipText = t.tooltip && t.tooltip.template ? t.tooltip.template : "{tooltipContent}", o.tooltipHTML = t.tooltip && t.tooltip.template ? t.tooltip.template : "{tooltipContent}"), o.propertyFields.tooltipText = "tooltipTemplate", o.propertyFields.tooltipHTML = "tooltipTemplate", t.heatMapMarkers && d.bool(t.heatMapMarkers.enabled) ? (d.setupHeatMap(a, e, t), void 0 !== t.heatMapMarkers.type && "range" === t.heatMapMarkers.type && (i.propertyFields.radius = "radius", i.propertyFields.fill = "fill")) : (i.propertyFields.radius = "radius", i.propertyFields.fill = "fill"), i.propertyFields.userClassName = "customClass", o.propertyFields.radius = "radius", o.propertyFields.latitude = "latitude", o.propertyFields.longitude = "longitude", o.setStateOnChildren = !0, (s = i.states.create("hover")).properties.fill = t.hover, s.propertyFields.fill = "hover", (n = i.states.create("active")).properties.fill = t.hover, n.propertyFields.fill = "hover", (l = i.states.create("highlight")).properties.fill = t.hover, l.propertyFields.fill = "hover", t.roundMarkerLabels && d.bool(t.roundMarkerLabels.enabled)) { o.states.create("hover"); var u = o.createChild(am4core.Label), c = void 0 !== t.roundMarkerLabels.position && "" !== t.roundMarkerLabels.position ? t.roundMarkerLabels.position : "bottom"; u.text = void 0 !== t.roundMarkerLabels.source && "" !== t.roundMarkerLabels.source ? t.roundMarkerLabels.source : "{name}", u.fontSize = t.roundMarkerLabels.fontSize, u.setStateOnChildren = !0, t.roundMarkerLabels.mobileSize && 100 !== parseInt(t.roundMarkerLabels.mobileSize) && window.innerWidth <= 780 && (u.fontSize = parseInt(t.roundMarkerLabels.fontSize) * parseInt(t.roundMarkerLabels.mobileSize) / 100), u.nonScaling = "undefined" == typeof igmRoundMarkersNonScaling || igmRoundMarkersNonScaling, u.fill = t.roundMarkerLabels.fill, u.clickable = !1, u.focusable = !1, u.hoverable = !1, u.padding(0, 0, 0, 0), "bottom" === c && (u.horizontalCenter = "middle", u.verticalCenter = "top", u.propertyFields.paddingTop = "radius"), "top" === c && (u.horizontalCenter = "middle", u.verticalCenter = "bottom", u.propertyFields.paddingBottom = "radius"), "right" === c && (u.horizontalCenter = "left", u.verticalCenter = "middle", u.propertyFields.paddingLeft = "radius"), "left" === c && (u.horizontalCenter = "right", u.verticalCenter = "middle", u.propertyFields.paddingRight = "radius") } a.zIndex = Number.MAX_VALUE, a.toFront(), a.data = t.roundMarkers, a.fill = t.markerDefaults.fill, o.events.on("hit", (function (t) { d.singleHit(e, t), d.setupHitEvents(e, t) })), o.events.on("over", (function (t) { d.setupHoverEvents(e, t) })) } return t.zoom && t.zoom.smallMap && d.bool(t.zoom.smallMap) && p.smallMap.series.push(a), d.maps[e].series.push(a), e === t.id && (t.clusterMarkers && !d.bool(t.clusterMarkers.enabled) ? d.maps[e].allBaseSeries.push(a) : t.clusterMarkers && d.bool(t.clusterMarkers.enabled)), a }, pushImageMarkerSeries: function (e, t) { var a, o, i, r = this, n = r.maps[e].map; return Array.isArray(t.imageMarkers) && t.imageMarkers.length && ((a = n.series.push(new am4maps.MapImageSeries)).name = t.imageMarkersLegend && "" !== t.imageMarkersLegend.title ? t.imageMarkersLegend.title : t.title, a.hiddenInLegend = !!t.imageMarkersLegend && !r.bool(t.imageMarkersLegend.enabled), (o = a.mapImages.template).focusable = !1, (i = o.createChild(am4core.Image)).propertyFields.href = "href", i.propertyFields.width = "size", i.propertyFields.height = "size", i.propertyFields.userClassName = "customClass", i.propertyFields.horizontalCenter = "horizontalCenter", i.propertyFields.verticalCenter = "verticalCenter", i.nonScaling = !0, i.propertyFields.nonScaling = "nonScaling", r.setupTooltip(e, a, t, i), void 0 !== t.imageMarkersTooltipTemplate && "" !== t.imageMarkersTooltipTemplate.trim() ? (i.tooltipText = t.imageMarkersTooltipTemplate, i.tooltipHTML = t.imageMarkersTooltipTemplate) : (i.tooltipText = t.tooltip.template ? t.tooltip.template : "{tooltipContent}", i.tooltipHTML = t.tooltip.template ? t.tooltip.template : "{tooltipContent}"), o.propertyFields.latitude = "latitude", o.propertyFields.longitude = "longitude", a.zIndex = Number.MAX_VALUE, a.toFront(), a.data = t.imageMarkers, o.events.on("hit", (function (t) { r.singleHit(e, t), r.setupHitEvents(e, t) })), o.events.on("over", (function (t) { r.setupHoverEvents(e, t) }))), t.zoom && t.zoom.smallMap && r.bool(t.zoom.smallMap) && n.smallMap.series.push(a), r.maps[e].series.push(a), a }, pushIconMarkerSeries: function (e, t) { var a, o, i, r, n, l = this, s = l.maps[e].map; if (Array.isArray(t.iconMarkers) && t.iconMarkers.length) { if ((a = s.series.push(new am4maps.MapImageSeries)).hiddenInLegend = !!t.iconMarkersLegend && !l.bool(t.iconMarkersLegend.enabled), a.name = t.iconMarkersLegend && "" !== t.iconMarkersLegend.title ? t.iconMarkersLegend.title : t.title, (o = a.mapImages.template).nonScaling = !0, o.setStateOnChildren = !0, o.focusable = !1, o.states.create("hover"), (i = o.createChild(am4core.Sprite)).propertyFields.scale = "scale", i.propertyFields.path = "path", i.propertyFields.rotation = "rotation", i.propertyFields.horizontalCenter = "horizontalCenter", i.propertyFields.verticalCenter = "verticalCenter", i.propertyFields.fill = "fill", a.fill = t.iconMarkerDefaults.fill, (n = o.createChild(am4core.Sprite)).propertyFields.scale = "scale", n.path = "M-10,0a10,10 0 1,0 20,0a10,10 0 1,0 -20,0", n.opacity = 0, n.propertyFields.horizontalCenter = "horizontalCenter", n.propertyFields.verticalCenter = "verticalCenter", o.tooltipText = t.tooltip.template ? t.tooltip.template : "{tooltipContent}", o.tooltipHTML = t.tooltip.template ? t.tooltip.template : "{tooltipContent}", l.setupTooltip(e, a, t, n), t.iconMarkerLabels && l.bool(t.iconMarkerLabels.enabled)) { var d = o.createChild(am4core.Label); d.text = void 0 !== t.iconMarkerLabels.source && "" !== t.iconMarkerLabels.source ? t.iconMarkerLabels.source : "{name}", d.horizontalCenter = "middle", d.verticalCenter = "top", d.fontSize = t.iconMarkerLabels.fontSize, d.nonScaling = !1, d.fill = t.iconMarkerLabels.fill, d.clickable = !1, d.focusable = !1, d.hoverable = !1, d.padding(0, 0, 0, 0), d.adapter.add("dy", (function (e, t) { var a, o = t.parent.children.getIndex(0), i = o.scale; return "middle" === o.verticalCenter && (a = 10 * i), "bottom" === o.verticalCenter && (a = 0), "top" === o.verticalCenter && (a = 20 * i + 5), a })) } i.states.create("hover").propertyFields.fill = "hover", i.states.create("active").propertyFields.fill = "hover", (r = i.states.create("highlight")).properties.fill = t.hover, r.propertyFields.fill = "hover", o.propertyFields.latitude = "latitude", o.propertyFields.longitude = "longitude", a.zIndex = Number.MAX_VALUE, a.toFront(), a.data = t.iconMarkers, o.events.on("hit", (function (t) { l.singleHit(e, t), l.setupHitEvents(e, t) })), o.events.on("over", (function (t) { l.setupHoverEvents(e, t) })) } return t.zoom && t.zoom.smallMap && l.bool(t.zoom.smallMap) && s.smallMap.series.push(a), l.maps[e].series.push(a), a }, pushLineSeries: function (e, t) { var a = this, o = a.maps[e].map, i = {}, r = []; return Array.isArray(t.lines) && t.lines.length && ("Orthographic" === t.projection ? (i = o.series.push(new am4maps.MapLineSeries)).mapLines.template.propertyFields.shortestDistance = !0 : ((i = o.series.push(new am4maps.MapArcSeries)).mapLines.template.line.propertyFields.controlPointDistance = "curvature", i.mapLines.template.line.controlPointPosition = .5), i.name = t.linesLegend && "" !== t.linesLegend.title ? t.linesLegend.title : t.title, i.hiddenInLegend = !!t.linesLegend && !a.bool(t.linesLegend.enabled), i.mapLines.template.nonScalingStroke = !0, i.mapLines.template.propertyFields.strokeWidth = "strokeWidth", i.mapLines.template.propertyFields.strokeDasharray = "strokeDash", i.mapLines.template.propertyFields.stroke = "stroke", i.mapLines.template.arrow.position = 1, i.mapLines.template.arrow.nonScaling = !0, i.mapLines.template.arrow.propertyFields.fill = "stroke", i.mapLines.template.arrow.horizontalCenter = "middle", i.mapLines.template.arrow.propertyFields.disabled = "arrowDisabled", t.lines.forEach((function (e, t) { e.multiGeoLine = [e.multiGeoLine], r.push(e) })), i.mapLines.template.events.on("hit", (function (t) { a.singleHit(e, t), a.setupHitEvents(e, t) })), i.mapLines.template.events.on("over", (function (t) { a.setupHoverEvents(e, t) })), i.data = r, i.zIndex = Number.MAX_VALUE - 1, i.toFront(), t.zoom && t.zoom.smallMap && a.bool(t.zoom.smallMap) && o.smallMap.series.push(i), a.maps[e].series.push(i), i.fill = t.lineDefaults.stroke, e === t.id && a.maps[e].allBaseSeries.push(i)), i }, pushLabelSeries: function (e, t) { var a, o, i, r, n, l, s = this, d = s.maps[e].map, p = !1; return Array.isArray(t.labels) && t.labels.length && ((a = d.series.push(new am4maps.MapImageSeries)).name = t.labelsLegend && "" !== t.labelsLegend.title ? t.labelsLegend.title : t.title, a.hiddenInLegend = !!t.labelsLegend && !s.bool(t.labelsLegend.enabled), (o = a.mapImages.template).setStateOnChildren = !0, (i = o.createChild(am4core.Label)).text = "{id}", i.nonScaling = "undefined" == typeof igmLabelsNonScaling || igmLabelsNonScaling, t.labelStyle && (i.fontFamily = t.labelStyle.fontFamily, i.fontWeight = t.labelStyle.fontWeight), i.horizontalCenter = t.labelPosition.horizontalCenter, i.verticalCenter = t.labelPosition.verticalCenter, i.propertyFields.fill = "fill", i.propertyFields.fontSize = "fontSize", s.setupTooltip(e, a, t, i), void 0 !== t.labelsTooltipTemplate && "" !== t.labelsTooltipTemplate.trim() ? (i.tooltipText = t.labelsTooltipTemplate, i.tooltipHTML = t.labelsTooltipTemplate) : (i.tooltipText = t.tooltip && t.tooltip.template ? t.tooltip.template : "{tooltipContent}", i.tooltipHTML = t.tooltip && t.tooltip.template ? t.tooltip.template : "{tooltipContent}"), o.propertyFields.latitude = "latitude", o.propertyFields.longitude = "longitude", o.propertyFields.fill = "fill", o.propertyFields.fontSize = "fontSize", i.propertyFields.verticalCenter = "verticalCenter", i.propertyFields.horizontalCenter = "horizontalCenter", "object" == typeof (p = "undefined" != typeof igmLabelsBackground && igmLabelsBackground) && (i.background = new am4core.RoundedRectangle, i.background.cornerRadius(...p.cornerRadius), i.background.fill = am4core.color(p.color), i.padding(...p.padding), i.background.stroke = am4core.color(p.stroke)), (l = i.states.create("hover")).properties.fill = t.hover, l.propertyFields.fill = "hover", (r = i.states.create("active")).properties.fill = t.hover, r.propertyFields.fill = "hover", (n = i.states.create("highlight")).properties.fill = t.hover, n.propertyFields.fill = "hover", a.zIndex = Number.MAX_VALUE, a.toFront(), a.data = t.labels, a.fill = t.labelDefaults.fill, o.events.on("hit", (function (t) { s.singleHit(e, t), s.setupHitEvents(e, t) })), o.events.on("over", (function (t) { s.setupHoverEvents(e, t) }))), t.zoom && t.zoom.smallMap && s.bool(t.zoom.smallMap) && d.smallMap.series.push(a), s.maps[e].labelSeries.push(a), s.maps[e].series.push(a), e === t.id && s.maps[e].allBaseSeries.push(a), a }, setupTooltip: function (e, t, a, o) { var i, r = this, n = a.tooltip, l = r.maps[e].map; return o = o || !1, void 0 === a.tooltip ? (t.tooltip.disabled = !1, t.tooltip.getFillFromObject = !1, t.tooltip.getStrokeFromObject = !1, t.tooltip.label.fill = am4core.color("#000000"), void (t.tooltip.background.fill = am4core.color("#FFFFFF"))) : r.bool(a.tooltip.enabled) ? void 0 !== _typeof(a.tooltip.disableMobile) && r.bool(a.tooltip.disableMobile) && window.innerWidth <= 780 ? (t.tooltip.disabled = !0, t) : (t.tooltip.label.interactionsEnabled = r.bool(n.fixed), t.tooltip.background.cornerRadius = n.cornerRadius, n.pointerLength && (t.tooltip.background.pointerLength = parseInt(n.pointerLength)), t.tooltip.getFillFromObject = !1, t.tooltip.getStrokeFromObject = !1, t.tooltip.label.fill = n.color, t.tooltip.background.fill = n.backgroundColor, t.tooltip.fontFamily = n.fontFamily, t.tooltip.fontSize = n.fontSize, t.tooltip.fontWeight = n.fontWeight, t.tooltip.animationDuration = 0, "undefined" !== n.borderColor && (t.tooltip.background.stroke = n.borderColor, t.tooltip.background.strokeWidth = n.borderWidth), void 0 !== n.maxWidth && "" !== n.maxWidth && (t.tooltip.maxWidth = parseInt(n.maxWidth), t.tooltip.contentWidth = parseInt(n.maxWidth)), t.tooltip.label.wrap = !0, void 0 !== n.customShadow && r.bool(n.customShadow) && ((i = t.tooltip.background.filters.getIndex(0)).dx = n.customShadowOpts.dx, i.dy = n.customShadowOpts.dy, i.blur = n.customShadowOpts.blur, i.opacity = n.customShadowOpts.opacity, i.color = n.customShadowOpts.color), r.bool(n.fixed) && ("always" === n.showTooltipOn && (t.tooltip.ignoreBounds = !0, t.tooltip.pointerOrientation = function (e) { switch (e) { case "horizontal": return "horizontal"; case "below": return "up"; case "above": return "down"; case "right": return "left"; case "left": return "right"; default: return "vertical" } }(n.toolTipPosition)), t.mapPolygons ? (t.calculateVisualCenter = !0, t.mapPolygons.template.tooltipPosition = "fixed", t.groupHover && (t.tooltip.getFillFromObject = !1, t.tooltip.events.on("over", (function (e) { e.target.dataItem.component.mapPolygons.each((function (e) { e.setState("highlight") })) })), t.tooltip.events.on("out", (function (e) { e.target.dataItem.component.mapPolygons.each((function (e) { e.setState("default") })) }))), t.tooltip.keepTargetHover = !0, n.showTooltipOn && (t.mapPolygons.template.showTooltipOn = n.showTooltipOn, "hit" === n.showTooltipOn && (t.tooltip.keepTargetHover = !1))) : (t.mapImages.template.tooltipPosition = "fixed", t.tooltip.keepTargetHover = !0, n.showTooltipOn && o && (t.mapImages.template.showTooltipOn = n.showTooltipOn, o.showTooltipOn = n.showTooltipOn, "hit" === n.showTooltipOn && (t.tooltip.keepTargetHover = !1), "always" === n.showTooltipOn && (l.events.on("appeared", (function () { o.clones.each((function (e) { e.showTooltip() })) })), l.events.on("mappositionchanged", (function (e) { o.clones.each((function (e) { e.showTooltip() })) })))))), t) : (t.tooltip.disabled = !0, t) }, prepareURL: function (e) { if ("string" != typeof e) return e; var t; (e = e.replace(/&amp;/gi, "&")).replace(/&#(\d+);/g, (function (e, t) { return String.fromCharCode(t) })); try { t = new URL(e) } catch (e) { t = !1 } return t && ![null, "http:", "https:", "mailto:", "tel:"].includes(t.protocol) ? (console.log("URL protocol not allowed"), "") : e }, setupHitEvents: function (e, t) { var a, o, i, r, n = this, l = n.maps[e].data, s = n.maps[e].map, d = n.getTargetSeriesType(t.target), p = n.maps[e].clicked || !1, u = l.clusterMarkers ? parseFloat(l.clusterMarkers.zoomLevel) : 1, c = document.getElementById(l.container), m = new Event("mapEntryClicked"); if (a = t.target.isLabels ? t.target.dataItems.first.dataContext : t.target.dataItem.dataContext, s.lastClickedEntry === t.target && !n.maps[e].clicked) return n.maps[e].clicked = a, void setTimeout((function () { s.lastClickedEntry = null, n.maps[e].clicked = null }), 1e3); if (n.maps[e].clicked = null, s.lastClickedEntry = t.target, c.dispatchEvent(m), "MapImage" === d && a.cluster && (u - parseInt(s.zoomLevel) > 5 && (u = parseInt(s.zoomLevel) + u / 2), t.target.series.chart.zoomToMapObject(t.target, u)), console.log(a), l.zoom && n.bool(l.zoom.enabled) && n.bool(l.zoom.zoomOnClick) && (t.zooming = !0, n.zoomToRegion(t, e)), "MapPolygon" === d && n.bool(l.drillDownOnClick) && n.drillDown(e, t), a.madeFromGeoData) return r = "igm_inactive_" + l.id, void ("function" == typeof window[r] && (l = window[r](l))); if ("MapImage" === d && void 0 !== _typeof(a.action) && "igm_display_map" === a.action && Array.isArray(iMapsManager.maps[e].seriesById[parseInt(a.content)]) && (i = iMapsManager.maps[e].seriesById[parseInt(a.content)], n.drillTo(e, t, i, !0)), !n.bool(l.admin)) { if (l.tooltip && void 0 !== _typeof(l.tooltip.enabled) && n.bool(l.tooltip.enabled) && void 0 !== _typeof(l.tooltip.disableMobile) && !n.bool(l.tooltip.disableMobile) && void 0 !== _typeof(l.tooltip.holdAction) && n.bool(l.tooltip.holdAction) && window.innerWidth <= 780) { if (!p || p !== a) return console.log("Holding action for second tap."), void (n.maps[e].clicked = a); n.maps[e].clicked = p !== a && a } "none" !== a.action && ("open_url" !== a.action && "open_url_new" !== a.action || (a.content = iMapsManager.prepareURL(a.content)), "open_url" === a.action && "" !== a.content ? document.location = a.content : "open_url_new" === a.action && "" !== a.content ? window.open(a.content) : a.action && a.action.includes("custom") ? (o = a.action + "_" + a.mapID, void 0 !== window[o] && window[o](a)) : void 0 !== window[a.action] && window[a.action](e, a)) } }, zoomToMap: function (e, t, a) { var o = this, i = !1; if (t.forEach((function (e) { "MapPolygonSeries" != o.getTargetSeriesType(e) || (i = e) })), i) return e.target.series.chart.zoomToRectangle(i.north, i.east, i.south, i.west, 1, !0), void console.log("zoomed to specific map"); console.log("failed to zoom to specific map") }, zoomToRegion: function (e, t) { var a, o, i = this, r = i.getTargetSeriesType(e.target), n = i.maps[t].data; i.maps[t].map; e.target.isLabels || (o = e.target.dataItem.dataContext, "MapImage" == r ? o.cluster || (a = "undefined" != typeof igmMarkerZoomLevelOnClick ? igmMarkerZoomLevelOnClick : 2 * e.target.parent.chart.zoomLevel, e.target.series.chart.zoomToMapObject(e.target, a, !0)) : "asia" !== o.id || n.map.startsWith("continents") ? "asia" === o.id && n.map.startsWith("continents") ? e.target.series.chart.zoomToGeoPoint({ latitude: 34.076842, longitude: 100.693068 }, 2.2, !0) : "northAmerica" === o.id && n.map.startsWith("region/world/worldRegion") ? e.target.series.chart.zoomToGeoPoint({ latitude: 55.5, longitude: -105.5 }, 3, !0) : "northAmerica" === o.id && n.map.startsWith("continents") ? e.target.series.chart.zoomToGeoPoint({ latitude: 55.5, longitude: -105.5 }, 2.3, !0) : "ZA" === o.id && n.map.startsWith("world") ? e.target.series.chart.zoomToGeoPoint({ latitude: -28.6, longitude: 24.7 }, 12.2, !0) : "US" === o.id && n.map.startsWith("world") ? e.target.series.chart.zoomToGeoPoint({ latitude: 49, longitude: -119 }, 2.6, !0) : "RU" === o.id && n.map.startsWith("world") ? e.target.series.chart.zoomToGeoPoint({ latitude: 64.5, longitude: 105 }, 2.1, !0) : (void 0 !== e.target.series.chart.deltaLongitudeOriginal && (e.target.series.chart.deltaLongitude = e.target.series.chart.deltaLongitude), e.target.series.chart.zoomToMapObject(e.target, 2 * e.target.zoomLevel)) : (e.target.series.chart.deltaLongitudeOriginal = e.target.series.chart.deltaLongitude, e.target.series.chart.deltaLongitude = -10, e.target.series.chart.zoomToGeoPoint({ latitude: 34.076842, longitude: 100.693068 }, 1.7, !0))) }, setupHoverEvents: function (e, t) { var a, o = this, i = o.maps[e].selected || !1; a = t.target.isLabels ? t.target.dataItems.first.dataContext : t.target.dataItem.dataContext, "MapImage" !== t.target.className && "fixed" === t.target.tooltipPosition && (Array.isArray(o.tempHover) && o.tempHover.length >= 0 && (o.tempHover[0].setState("default"), o.tempHover = []), o.tempHover = [t.target]), a.action && "none" !== a.action && (t.target.cursorOverStyle = am4core.MouseCursorStyle.pointer), Array.isArray(i) && !i.includes(t.target) && t.target.dataItem && void 0 === t.target.dataItem.dataContext.madeFromGeoData && i.forEach((function (e, t) { "object" == typeof e && void 0 !== e.isHover && (e.isHover = !1) })), !o.bool(a.triggerClickOnHover) || iMapsManager.isTouchScreenDevice() && "over" !== t.type || void 0 !== iMaps.maps[e].mapClicked && !1 !== iMaps.maps[e].mapClicked || iMapsManager.select(e, a.id, !1, !0, a.mapID, !1), o.bool(a.triggerRegionHover) && a.val && "" !== a.val && (iMapsManager.hover(e, a.val), t.target.events.on("out", (function (t) { iMapsManager.clearHovered(e) }))) }, singleHit: function (e, t) { var a, o = this.maps[e].data; if ((a = t.target.isLabels ? t.target.dataItems.first.dataContext : t.target.dataItem.dataContext).madeFromGeoData) return; !0 === iMaps.maps[e].activeStateControl && a.activeState && (iMaps.maps[e].mapClicked = !0); let i = !0; o.tooltip && "hit" === o.tooltip.showTooltipOn && (i = !1), iMapsManager.clearSelected(e, i, !0), t.target.isActive = !0, t.target.isHover = !0, t.target.setState("active"), this.maps[e].selected = [t.target] }, groupHit: function (e, t) { var a = this.maps[e].selected || !1; t.target.dataItem.dataContext.madeFromGeoData || (!0 === iMaps.maps[e].activeStateControl && t.target.dataItem.dataContext.activeState && (iMaps.maps[e].mapClicked = !0), iMapsManager.clearSelected(e), a = [], t.target.parent.mapPolygons.each((function (e) { e.dataItem.dataContext.madeFromGeoData || (e.setState("active"), t.target === e && (e.isHover = !0), e.isActive = !0, e.isGroupActive = !0, a.push(e)) })), this.maps[e].selected = a) }, groupHover: function (e, t) { var a; a = t.target.isLabels ? t.target.dataItems.first.dataContext : t.target.dataItem.dataContext, t.target.dataItem.dataContext.madeFromGeoData || (!this.bool(a.triggerClickOnHover) || void 0 !== iMaps.maps[e].mapClicked && !1 !== iMaps.maps[e].mapClicked || iMapsManager.select(e, a.id, !1, !0, a.mapID, !1), t.target.dataItem.dataContext.action && "none" != t.target.dataItem.dataContext.action && (t.target.cursorOverStyle = am4core.MouseCursorStyle.pointer), t.target.parent.mapPolygons.each((function (e) { e.dataItem.dataContext.madeFromGeoData || e.isActive || e.setState("highlight") }))) }, groupHoverOut: function (e, t) { t.target.dataItem.dataContext.madeFromGeoData || t.target.parent.mapPolygons.each((function (e) { e.isGroupActive || (e.setState("default"), e.isActive = !1, e.isHover = !1) })) }, getRegionsByValue: function (e, t, a) { var o, i = this, r = i.maps[e].series, n = []; return t = t || "*", a = a || "val", r.forEach((function (e) { "MapPolygonSeries" === i.getTargetSeriesType(e) && (o = e.mapPolygons.values.filter((function (e) { if (e.dataItem.dataContext[a] === t || "*" === t) return !0 })), n = n.concat(o)) })), n }, getMarkersByValue: function (e, t, a) { var o, i = this, r = i.maps[e].series, n = []; return t = t || "*", a = a || "val", r.forEach((function (e) { "MapImageSeries" === i.getTargetSeriesType(e) && (o = e.mapImages.values.filter((function (e) { if (e.dataItem.dataContext[a] === t || "*" === t) return !0 })), n = n.concat(o)) })), n }, select: function (e, t, a, o, i, r) { var n, l, s, d = this, p = d.maps[e], u = d.maps[e].data, c = p.series.slice().reverse(), m = [], g = iMaps.maps[e].seriesById, h = !1, M = !0, v = !1, f = !0; if (Number.isInteger(t) && (t = t.toString()), t, void 0 === a && (a = !0), void 0 === o && (o = !0), void 0 === i && (i = e), g.hasOwnProperty(i) && (h = g[i]), r = void 0 === r, u.tooltip && "hit" === u.tooltip.showTooltipOn && (f = !1), iMapsManager.clearSelected(e, f, !r), iMaps.maps[e].activeStateControl = !!r, h && (c = h), Array.isArray(c)) for (var b = 0, y = c.length; b < y && !v; b++)if (void 0 === c[b].isCluster || !c[b].isCluster) { if (c[b].mapPolygons) if ((n = c[b].getPolygonById(t)) && void 0 !== n.dataItem.dataContext.originalID && n.dataItem.dataContext.originalID.includes(",") && (t = n.dataItem.dataContext.originalID), n && c[b].show(), t.includes(",")) void 0 !== n && n && (n.tooltip = !1, n.dispatchImmediately("hit"), n.hideTooltip(), M = !1, iMaps.maps[e].activeStateControl = !0), t.split(",").forEach((function (i, r) { if (void 0 !== (n = c[b].getPolygonById(i.trim())) && n) { if (n.dataItem.dataContext.madeFromGeoData) return; if (n.dataItem.dataContext.originalID !== t && !M) return; 0 === r && o && (v = !0, a ? (l = void 0 !== n && void 0 !== n.tooltipPosition ? n.tooltipPosition : "hover", n.tooltipPosition = "fixed", s = n.showTooltipOn, n.showTooltipOn = "always", iMaps.maps[e].activeStateControl = !0, n.tooltipPosition = l, n.showTooltipOn = s, n.selectedFromGroup = !0) : n.isHover = !0), u.regionActiveState && d.bool(u.regionActiveState.enabled) ? n.setState("active") : n.setState("highlight"), m.push(n) } })); else if (void 0 !== (n = c[b].getPolygonById(t)) && n) { let t = 0; if ("Orthographic" === u.projection) { let a = iMaps.maps[e].map; a.animate({ property: "deltaLongitude", to: -n.longitude }, 500, am4core.ease.linear), a.animate({ property: "deltaLatitude", to: -n.latitude }, 550, am4core.ease.linear), t = 550 } setTimeout((function (e) { console.log(e.dataItem.dataContext), a && e.dataItem.dataContext && "igm_display_map" !== e.dataItem.dataContext.action ? (l = void 0 !== e && void 0 !== e.tooltipPosition ? e.tooltipPosition : "hover", e.tooltipPosition = "fixed", s = e.showTooltipOn, e.showTooltipOn = "always", e.dispatchImmediately("hit"), v = !0, e.tooltipPosition = l, e.showTooltipOn = s, m.push(e)) : e.dataItem.dataContext && "igm_display_map" === e.dataItem.dataContext.action ? (e.dispatchImmediately("hit"), e.hideTooltip(), v = !0, m.push(e)) : (e.dispatchImmediately("hit"), v = !0, m.push(e)) }), t, n) } if (c[b].mapImages) if (t.includes(",")) t.split(",").forEach((function (e, t) { void 0 !== (n = c[b].getImageById(e)) && n && (c[b].show(), a ? (s = n.showTooltipOn, n.showTooltipOn = "always", l = void 0 !== n.tooltipPosition ? n.tooltipPosition : "hover", n.tooltipPosition = "fixed", n.dispatchImmediately("hit"), v = !0, n.tooltipPosition = l, n.showTooltipOn = s, m.push(n)) : (n.dispatchImmediately("hit"), v = !0, m.push(n))) })); else { let o = c[b].getImageById(t); if (o) { c[b].show(); let t = 0; if ("Orthographic" === u.projection) { let a = iMaps.maps[e].map; a.animate({ property: "deltaLongitude", to: -o.longitude }, 500, am4core.ease.linear), a.animate({ property: "deltaLatitude", to: -o.latitude }, 550, am4core.ease.linear), t = 550 } setTimeout((function () { a ? (l = o.tooltipPosition, s = o.showTooltipOn, o.tooltipPosition = "fixed", o.showTooltipOn = "always", o.isHover = !0, o.isActive = !0, o.dispatchImmediately("hit"), o.setState("active"), o.children.each((function (e) { e.showTooltip(0) })), v = !0, o.tooltipPosition = l, o.showTooltipOn = s, m.push(o)) : (o.dispatchImmediately("hit"), v = !0, m.push(o)) }), t) } } } return d.maps[e].selected = m, n }, setupRangeHeatMap: function (e, t, a) { var o, i = a.regions, r = a.roundMarkers, n = this.getTargetSeriesType(e); if ("MapImageSeries" === n) { if (!Array.isArray(a.heatMapMarkers.range) || 0 === a.heatMapMarkers.range.length) return; (o = a.heatMapMarkers.range.slice(0)).sort((function (e, t) { if (isNaN(e.rule)) { var a = e.rule.toLowerCase(), o = t.rule.toLowerCase(); return a < o ? -1 : a > o ? 1 : 0 } return parseFloat(e.rule) - parseFloat(t.rule) })), Array.isArray(r) && r.length > 0 && r.forEach((function (e, t) { if (void 0 !== e[a.heatMapMarkers.source]) { "value" === a.heatMapMarkers.source && (a.heatMapMarkers.source = "val"); var i, r = e[a.heatMapMarkers.source]; isNaN(r) || (r = parseFloat(r)), o.forEach((function (t, a) { isNaN(t.rule) ? (i = t.rule.trim(), r == i && (e.fill = t.fill, e.radius = parseFloat(t.radius))) : (i = parseFloat(t.rule), r >= i && (e.fill = t.fill, e.radius = parseFloat(t.radius))) })) } })) } else if ("MapPolygonSeries" === n) { if (!Array.isArray(a.heatMapRegions.range) || 0 === a.heatMapRegions.range.length) return; (o = a.heatMapRegions.range.slice(0)).sort((function (e, t) { if (isNaN(e.rule)) { var a = e.rule.toLowerCase(), o = t.rule.toLowerCase(); return a < o ? -1 : a > o ? 1 : 0 } return parseFloat(e.rule) - parseFloat(t.rule) })), Array.isArray(i) && i.length > 0 && (isNaN(a.heatMapRegions.source) || (a.heatMapRegions.source = parseInt(a.heatMapRegions.source)), i.forEach((function (e, t) { if (void 0 !== e[a.heatMapRegions.source]) { "value" === a.heatMapRegions.source && (a.heatMapRegions.source = "val"); var i, r = e[a.heatMapRegions.source]; isNaN(r) || (r = parseFloat(r)), o.forEach((function (t, a) { isNaN(t.rule) ? (i = t.rule.trim(), r == i && (e.fill = t.fill)) : (i = parseFloat(t.rule), r >= i && (e.fill = t.fill)) })) } }))) } }, setupHeatMap: function (e, t, a) { var o, i, r, n, l, s, d, p, u, c, m = this, g = m.maps[t].map, h = m.getTargetSeriesType(e); if ("MapImageSeries" === h) { if (void 0 !== a.heatMapMarkers.type && "range" === a.heatMapMarkers.type) return void m.setupRangeHeatMap(e, a.id, a); s = e.mapImages.template.children.values[0], u = ["fill", "radius"], c = a.heatMapMarkers } else { if ("MapPolygonSeries" !== h) return; if (void 0 !== a.heatMapRegions.type && "range" === a.heatMapRegions.type) return void m.setupRangeHeatMap(e, a.id, a); s = e.mapPolygons.template, u = ["fill"], c = a.heatMapRegions } e.dataFields.value = c.source, Array.isArray(u) || (u = [u]), u.map((function (t) { "fill" === t ? (d = c.minColor, p = c.maxColor) : "radius" === t && (d = c.minRadius, p = c.maxRadius), e.heatRules.push({ property: t, target: s, min: d, max: p }) })), m.bool(c.legend) && ((r = g.createChild(am4core.Container)).align = void 0 !== c.legendAlign ? c.legendAlign : "right", r.valign = void 0 !== c.legendValign ? c.legendValign : "bottom", r.userClassName = "mapLegendContainer", r.marginRight = am4core.percent(4), window.innerWidth <= 780 ? r.width = am4core.percent(40) : r.width = am4core.percent(25), void 0 !== c.label && "" !== c.label && ((i = r.createChild(am4core.Label)).text = c.label, i.horizontalCenter = "left", i.verticalCenter = "top", i.fontSize = 12, i.paddingBottom = 40, window.innerWidth <= 780 ? (i.fontSize = 10, i.paddingBottom = 48) : (i.fontSize = 12, i.paddingBottom = 48), i.nonScaling = !1, i.clickable = !1, i.focusable = !1, i.hoverable = !1), (o = r.createChild(am4maps.HeatLegend)).series = e, o.align = "right", o.valign = "bottom", o.width = am4core.percent(100), o.minValue = 0, o.maxValue = 99999999999999, (n = o.valueAxis.axisRanges.create()).value = o.minValue, n.label.text = c.minLabel, (l = o.valueAxis.axisRanges.create()).value = o.maxValue, l.label.text = c.maxLabel, n.label.fontSize = 12, l.label.fontSize = 12, window.innerWidth <= 780 ? (n.label.fontSize = 10, l.label.fontSize = 10) : (n.label.fontSize = 12, l.label.fontSize = 12), o.valueAxis.renderer.labels.template.adapter.add("text", (function () { return "" }))) }, drillTo: function (e, t, a, o) { var i, r, n, l = iMapsManager, s = (l.maps[e].map, l.maps[e].data), d = iMapsManager.maps[e].series, p = iMapsManager.maps[e].baseSeries, u = iMapsManager.maps[e].allBaseSeries, c = l.maps[e].backgroundSeries; for (i = "undefined" != typeof igmDrilldownBaseMapOpacity ? igmDrilldownBaseMapOpacity : .3, o = o || !1, r = 0, n = d.length; r < n; r++)p.includes(d[r]) ? void 0 !== s.alwaysKeepBase && l.bool(s.alwaysKeepBase) || (d[r].opacity = i, c.opacity = i) : u.includes(d[r]) && void 0 !== s.alwaysKeepBase && l.bool(s.alwaysKeepBase) || d[r].hide(); for (r = 0, n = a.length; r < n; r++)a[r].show(); if (iMapsManager.maps[e].isDrilling = !0, !t.zooming) { if (o) return console.log("drill to specific map"), void l.zoomToMap(t, a); l.zoomToRegion(t, e) } }, drillDown: function (e, t) { var a, o, i, r = iMapsRouter.iso2cleanName(t.target.dataItem.dataContext.id, e), n = t.target.dataItem.dataContext.id, l = iMapsManager.maps[e].series, s = t.target.dataItem.dataContext, d = !1, p = iMapsManager.maps[e].baseSeries, u = iMapsManager.maps[e].allBaseSeries, c = [], m = !1; if (console.log("Map Name:", r), console.log("Available Series:", iMapsManager.maps[e].seriesIndex), console.log("Available Series by ID: ", iMapsManager.maps[e].seriesById), !(r && isNaN(n) || void 0 !== _typeof(s) && "igm_display_map" === s.action)) return !1; if (t.target.polygon) if (c.push(r), c.forEach((function (t) { void 0 !== _typeof(s) && "igm_display_map" == s.action ? (console.log("Display custom map " + s.content), Array.isArray(iMapsManager.maps[e].seriesById[parseInt(s.content)]) && (m = !0, a = iMapsManager.maps[e].seriesById[parseInt(s.content)], d = !0)) : Array.isArray(iMapsManager.maps[e].seriesIndex[t]) && (m = !0, a = iMapsManager.maps[e].seriesIndex[t]) })), m) iMapsManager.drillTo(e, t, a, d), iMapsManager.maps[e].drilledTo = a[0].mapID; else { if (a === t.target.series) return void (iMapsManager.maps[e].isDrilling = !1); if (p.includes(t.target.series)) for (iMapsManager.maps[e].isDrilling = !1, iMapsManager.maps[e].drilledTo = !1, o = 0, i = l.length; o < i; o++)u.includes(l[o]) ? l[o].show() : l[o].hide() } }, getSelected: function (e) { var t = this.maps[e].selected || !1, a = []; return !!t && (Array.isArray(t) ? (t.forEach((function (e) { a.push(e.dataItem.dataContext) })), a) : t.dataItem.dataContext) }, getHovered: function (e) { var t = this.maps[e].hovered || !1, a = []; return !!t && (Array.isArray(t) ? (t.forEach((function (e) { a.push(e.dataItem.dataContext) })), a) : void 0) }, getHighlighted: function (e) { var t = this.maps[e].highlighted || !1, a = []; return !!t && (Array.isArray(t) ? (t.forEach((function (e) { a.push(e.dataItem.dataContext) })), a) : t.dataItem.dataContext) }, clearSelected: function (e, t, a) { var o = this.maps[e], i = o.selected || []; return t = t || !1, a = a || !1, Array.isArray(i) && i.length > 0 && (i.forEach((function (e, a) { e !== t && "object" == typeof e && void 0 !== e.isHover && (e.isHover = !1, e.isActive = !1, e.isGroupActive = !1, t || e.hideTooltip(0), e.selectedFromGroup && (e.hideTooltip(0), e.selectedFromGroup = !1), e.setState("default")) })), i = []), t || "undefined" == typeof iMapsActions ? o.selected = [t] : o.selected = [], o.selected }, clearHighlighted: function (e) { var t = this.maps[e].highlighted || []; return Array.isArray(t) && t.length > 0 && (t.forEach((function (e, t) { e.isHover = !1, e.isActive = !1, e.setState("default") })), t = []), t }, hover: function (e, t, a) { var o, i, r, n = this.maps[e], l = (n.data, n.series), s = n.hovered || []; if (Number.isInteger(t) && (t = t.toString()), void 0 === a && (a = !0), iMapsManager.clearHovered(e), s = [], Array.isArray(l)) for (var d = 0, p = l.length; d < p; d++)l[d].mapPolygons && (t.includes(",") ? t.split(",").forEach((function (e, t) { (o = l[d].getPolygonById(e.trim())) && (a ? (r = void 0 !== o.tooltipPosition ? o.tooltipPosition : "fixed", i = void 0 !== o.showTooltipOn ? o.showTooltipOn : "hover", o.tooltipPosition = "fixed", o.showTooltipOn = "always", s.push(o), o.dispatchImmediately("over"), o.isHover = !0, o.tooltipPosition = r, o.showTooltipOn = i) : (s.push(o), o.dispatchImmediately("over"), o.isHover = !0)) })) : (o = l[d].getPolygonById(t)) && (a ? (r = o.tooltipPosition, o.tooltipPosition = "fixed", s = [o], o.dispatchImmediately("over"), o.isHover = !0, o.tooltipPosition = r) : (s = [o], o.dispatchImmediately("over"), o.isHover = !0))), l[d].mapImages && (t.includes(",") ? t.split(",").forEach((function (e, t) { (o = l[d].getImageById(e)) && (a ? (r = o.tooltipPosition, i = o.showTooltipOn, o.tooltipPosition = "fixed", o.showTooltipOn = "always", s = [o], o.dispatchImmediately("over"), o.isHover = !0, o.setState("hover"), o.children.each((function (e) { "Circle" === e.className && e.showTooltip(0) })), o.tooltipPosition = r, o.showTooltipOn = i) : (s = [o], o.dispatchImmediately("over"), o.isHover = !0, o.setState("hover"))) })) : (o = l[d].getImageById(t)) && (a ? (r = o.tooltipPosition, o.tooltipPosition = "fixed", s = [o], o.dispatchImmediately("over"), o.isHover = !0, o.setState("hover"), o.children.each((function (e) { "Circle" === e.className && e.showTooltip(0) })), o.tooltipPosition = r) : (s = [o], o.dispatchImmediately("over"), o.isHover = !0, o.setState("hover")))); return n.hovered = s, o }, clearHovered: function (e, t) { var a, o = this.maps[e], i = o.hovered || !1, r = o.series; if (t = t || !1) { if (Array.isArray(r)) for (var n = 0, l = r.length; n < l; n++)r[n].mapPolygons && (a = r[n].getPolygonById(t)) && (a.dispatchImmediately("out"), a.isHover = !1), r[n].mapImages && (a = r[n].getImageById(t)) && (a.isHover = !1, a.setState("default"), a.dispatchImmediately("out")) } else if (i) return i.forEach((function (e) { e.dispatchImmediately("out"), void 0 !== e.isGroupActive && e.isGroupActive || (e.setState("default"), e.isHover = !1), void 0 !== e.children && e.children.each((function (e) { "Circle" === e.className && e.hideTooltip(0) })) })), o.hovered = [], !0; return !1 }, highlight: function (e, t) { var a, o = this.maps[e], i = o.series, r = o.highlighted || []; if (Number.isInteger(t) && (t = t.toString()), Array.isArray(i)) for (var n = 0, l = i.length; n < l; n++)i[n].mapPolygons && (t.includes(",") ? t.split(",").forEach((function (e, t) { if (void 0 !== (a = i[n].getPolygonById(e.trim())) && a) { if (a.dataItem.dataContext.madeFromGeoData) return; a.setState("highlight"), r.push(a) } })) : void 0 !== (a = i[n].getPolygonById(t)) && a && (a.setState("highlight"), r.push(a))), i[n].mapImages && (t.includes(",") ? t.split(",").forEach((function (e, t) { void 0 !== (a = i[n].getImageById(e)) && a && (a.setStateOnChildren = !0, a.setState("highlight"), r.push(a)) })) : void 0 !== (a = i[n].getImageById(t)) && a && (a.setStateOnChildren = !0, a.setState("highlight"), r.push(a))); return o.highlighted = r, a }, getTargetSeriesType: function (e) { return e.className }, setupClusters: function (e, t, a) { for (var o, i = this, r = i.maps[t], n = [], l = {}, s = [], d = [], p = 0, u = parseFloat(e.clusterMarkers.maxBias), c = parseFloat(e.clusterMarkers.zoomLevel) || 20, m = void 0 !== e.clusterMarkers.tooltipTemplate && e.clusterMarkers.tooltipTemplate, g = (a = a || !1) || t; p <= 4;)s.push(u), u /= 2, d.push(c), c = 3 == p ? 1 : Math.ceil(c / 2), p++; return d.reverse().pop(), s.pop(), void 0 === r.clusterSeries[g] && (r.clusterSeries[g] = { zoomLevels: {}, overlay: a }), Array.isArray(e.roundMarkers) && s.forEach((function (a, s) { n = geocluster(e.roundMarkers, a, e.markerDefaults, m), (l = Object.assign({}, e)).roundMarkers = n, (o = i.pushRoundMarkerSeries(t, l)).name = l.title || "Map", o.hiddenInLegend = !0, o.isCluster = !0, r.clusterSeries[g].zoomLevels[d[s]] = o, o.hidden = !0 })), !0 }, triggerOnReady: function (e, t) { let a = "custom" == t.map, o = new URLSearchParams(window.location.search).get("mregion"); o && (a || iMapsManager.select(e, o, !0, !0)) }, triggerOnAppeared: function (e, t) { let a = "custom" == t.map, o = new URLSearchParams(window.location.search).get("mregion"); o && a && setTimeout((function () { iMapsManager.select(e, o, !0, !0) }), 500) }, addGeoFileSeries: function (e, t, a) { var o, i = iMapsRouter.getGeoFiles(t); return new Promise((function (e, t) { var a = document.createElement("script"); document.body.appendChild(a), a.onload = e, a.onerror = t, a.async = !0, a.src = i.src })).then((function () { var t = { title: i.title, map: i.map, regions: [], config: t }; return iMapsManager.maps[e].seriesIndex[i.map] = [], o = iMapsManager.pushRegionSeries(e, t), iMapsManager.maps[e].seriesIndex[i.map].push(o), o })), !1 }, handleInfoBox: function (e) { var t = this.maps[e].map, a = document.getElementById("map_visual_info"), o = document.getElementById("map_click_events_coordinates"); this.maps[e].series; a && (iMapsManager.populateInfo(e, a), ["ready", "mappositionchanged", "zoomlevelchanged"].forEach((function (o) { t.events.on(o, (function (t) { iMapsManager.populateInfo(e, a) }), this) }))), o && t.events.on("hit", (function (e) { var a = t.svgPointToGeo(e.svgPoint), i = Number(a.latitude).toFixed(6), r = Number(a.longitude).toFixed(6), n = document.createElement("div"), l = document.createElement("span"), s = document.createElement("span"); l.classList.add("info--unselectable"), s.classList.add("map_clicked_lat"), l.innerHTML = "LAT: ", s.innerHTML = i, n.appendChild(l), n.appendChild(s); var d = document.createElement("div"), p = document.createElement("span"), u = document.createElement("span"); p.classList.add("info--unselectable"), u.classList.add("map_clicked_long"), p.innerHTML = "LON: ", u.innerHTML = r, d.appendChild(p), d.appendChild(u), o.innerHTML = "", o.appendChild(n), o.appendChild(d), o.parentElement.style.display = "block"; var c = new CustomEvent("mapPointClicked", { detail: { latitude: i, longitude: r } }); document.dispatchEvent(c) }), this) }, populateInfo: function (e, t) { var a = this.maps[e].map, o = ""; o += "Zoom Level: " + parseFloat(Number(a.zoomLevel).toFixed(2)) + "<br>", o += "Center Coordinates: <br><span class='info--unselectable'>LAT </span><span>" + Number(a.zoomGeoPoint.latitude).toFixed(6) + "</span>", o += "<br><span class='info--unselectable'>LONG </span><span>" + Number(a.zoomGeoPoint.longitude).toFixed(6) + "</span><br>", t.innerHTML = o; let i = { zoom: parseFloat(Number(a.zoomLevel).toFixed(2)), lat: Number(a.zoomGeoPoint.latitude).toFixed(6), long: Number(a.zoomGeoPoint.longitude).toFixed(6) }; t.setAttribute("data-visual", JSON.stringify(i)) }, hideAllSeries: function (e, t) { if (e = parseInt(e)) { t = t || !1; for (var a = iMaps.maps[e], o = (a.baseRegionSeries, a.groupedBaseRegionSeries), i = a.allBaseSeries, r = 0; r < a.series.length; r++){ var n = a.series[r]; o.includes(n) || (!t || t && !i.includes(n)) && n.hide() } } }, showAllSeries: function (e) { if (e = parseInt(e)) for (var t = iMaps.maps[e], a = 0; a < t.series.length; a++){ var o = t.series[a]; void 0 !== o.isCluster && !1 !== o.isCluster || o.show() } }, bool: function (e) { return 0 !== Number(e) && "false" !== e && void 0 !== e }, isJSON: function (e) { try { JSON.parse(e) } catch (e) { return !1 } return !0 } }; Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector), Element.prototype.closest || (Element.prototype.closest = function (e) { var t = this; do { if (t.matches(e)) return t; t = t.parentElement || t.parentNode } while (null !== t && 1 === t.nodeType); return null }), iMapsManager.library = { icons: { goFullIconPath: "m15.78742,5.93715l-3.95414,3.95414l3.95414,3.95414l1.60393,-1.60393q0.32301,-0.34529 0.77969,-0.15594q0.4344,0.18935 0.4344,0.65717l0,4.99002q0,0.2896 -0.21163,0.50123t-0.50123,0.21163l-4.99002,0q-0.46781,0 -0.65717,-0.44554q-0.18935,-0.4344 0.15594,-0.76855l1.60393,-1.60393l-3.95414,-3.95414l-3.95414,3.95414l1.60393,1.60393q0.34529,0.33415 0.15594,0.76855q-0.18935,0.44554 -0.65717,0.44554l-4.99002,0q-0.2896,0 -0.50123,-0.21163t-0.21163,-0.50123l0,-4.99002q0,-0.46781 0.44554,-0.65717q0.4344,-0.18935 0.76855,0.15594l1.60393,1.60393l3.95414,-3.95414l-3.95414,-3.95414l-1.60393,1.60393q-0.21163,0.21163 -0.50123,0.21163q-0.13366,0 -0.26732,-0.05569q-0.44554,-0.18935 -0.44554,-0.65717l0,-4.99002q0,-0.2896 0.21163,-0.50123t0.50123,-0.21163l4.99002,0q0.46781,0 0.65717,0.44554q0.18935,0.4344 -0.15594,0.76855l-1.60393,1.60393l3.95414,3.95414l3.95414,-3.95414l-1.60393,-1.60393q-0.34529,-0.33415 -0.15594,-0.76855q0.18935,-0.44554 0.65717,-0.44554l4.99002,0q0.2896,0 0.50123,0.21163t0.21163,0.50123l0,4.99002q0,0.46781 -0.4344,0.65717q-0.1448,0.05569 -0.27846,0.05569q-0.2896,0 -0.50123,-0.21163l-1.60393,-1.60393z", exitFullIconPath: "m10.04411,10.81638l0,5.40556q0,0.31372 -0.22925,0.54297t-0.54297,0.22925t-0.54297,-0.22925l-1.7375,-1.7375l-4.00591,4.00591q-0.12066,0.12066 -0.27752,0.12066t-0.27752,-0.12066l-1.37552,-1.37552q-0.12066,-0.12066 -0.12066,-0.27752t0.12066,-0.27752l4.00591,-4.00591l-1.7375,-1.7375q-0.22925,-0.22925 -0.22925,-0.54297t0.22925,-0.54297t0.54297,-0.22925l5.40556,0q0.31372,0 0.54297,0.22925t0.22925,0.54297zm9.10982,-8.10834q0,0.15686 -0.12066,0.27752l-4.00591,4.00591l1.7375,1.7375q0.22925,0.22925 0.22925,0.54297t-0.22925,0.54297t-0.54297,0.22925l-5.40556,0q-0.31372,0 -0.54297,-0.22925t-0.22925,-0.54297l0,-5.40556q0,-0.31372 0.22925,-0.54297t0.54297,-0.22925t0.54297,0.22925l1.7375,1.7375l4.00591,-4.00591q0.12066,-0.12066 0.27752,-0.12066t0.27752,0.12066l1.37552,1.37552q0.12066,0.12066 0.12066,0.27752z" } }, iMapsManager.handleExternalZoom = function (e) { var t, a, o, i, r, n; t = document.getElementById("map_wrapper_" + e); var l = this, s = l.maps[e].data, d = l.maps[e].series, p = l.maps[e].allBaseSeries; t && (a = t.querySelector(".map_box"), t.classList.add("map_has_external_controls"), (i = document.createElement("div")).setAttribute("id", "map_home_buttom_" + e), i.setAttribute("data-map-id", e), i.classList.add("map_home_button"), i.innerHTML = '<svg height="20" width="20"><path d="M16,8 L14,8 L14,16 L10,16 L10,10 L6,10 L6,16 L2,16 L2,8 L0,8 L8,0 L16,8 Z M16,8" /></svg>', i.addEventListener("click", (function (e) { var t = this.getAttribute("data-map-id"); if (iMaps.maps[t].map.goHome(), l.bool(s.drillDownOnClick)) { for (var a = 0, o = d.length; a < o; a++)d[a].hide(); for (var i = 0, r = p.length; i < r; i++)p[i].show(); iMapsManager.maps[t].drilledTo = !1, iMapsManager.maps[t].isDrilling = !1 } "undefined" != typeof iMapsActions && void 0 !== iMapsActions.resetActions && iMapsActions.resetActions(t) })), (r = document.createElement("div")).setAttribute("id", "map_zoomin_buttom_" + e), r.setAttribute("data-map-id", e), r.classList.add("map_zoomin_button"), r.innerHTML = "+", r.addEventListener("click", (function (e) { var t = this.getAttribute("data-map-id"); iMaps.maps[t].map.zoomIn() })), (n = document.createElement("div")).setAttribute("id", "map_zoomout_buttom_" + e), n.setAttribute("data-map-id", e), n.classList.add("map_zoomout_button"), n.innerHTML = "-", n.addEventListener("click", (function (e) { var t = this.getAttribute("data-map-id"); iMaps.maps[t].map.zoomOut() })), (o = document.createElement("div")).setAttribute("id", "map_controls_" + e), o.classList.add("map_controls"), o.appendChild(i), o.appendChild(r), o.appendChild(n), a.parentNode.insertBefore(o, a.nextSibling)) }, iMapsManager.toggleFullscreen = function (e) { document.fullscreen || document.webkitIsFullScreen ? (document.exitFullscreen ? document.exitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitExitFullscreen ? document.webkitExitFullscreen() : document.msExitFullscreen && document.msExitFullscreen(), iMapsManager.isFullScreen = !1) : e.requestFullscreen ? e.requestFullscreen() : e.mozRequestFullScreen ? e.mozRequestFullScreen() : e.webkitRequestFullscreen ? e.webkitRequestFullscreen() : e.msRequestFullscreen && e.msRequestFullscreen() }, iMapsManager.isTouchScreenDevice = function () { return "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0 }, iMapsManager.nl2br = function (e) { return (e + "").replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, "HI<br>HI") }, iMapsManager.isFullScreen = !1; var iMaps = { originalData: JSON.parse(JSON.stringify(iMapsData)), reset: function () { iMaps.maps && Object.keys(iMaps.maps).forEach((function (e) { iMaps.maps[e].map.dispose() })), iMapsData = iMaps.originalData, iMaps.init() }, init: function (e) { if (void 0 === e && void 0 !== iMapsData.options && void 0 !== iMapsData.options.hold && "1" === iMapsData.options.hold && (e = !0), !e) if ("undefined" != typeof am4core) am4core.ready((function () { am4core.options.autoSetClassName = !0, am4core.options.classNamePrefix = "imaps", am4core.options.commercialLicense = !0, am4core.options.queue = !0, void 0 !== iMapsData.options && void 0 !== iMapsData.options.lazyLoad && "1" === iMapsData.options.lazyLoad && (am4core.options.onlyShowOnViewport = !0), void 0 === iMapsData.options || void 0 === iMapsData.options.animations || "1" !== iMapsData.options.animations && !0 !== iMapsData.options.animations || am4core.useTheme(am4themes_animated), iMapsModel.prepareData(iMapsData.data).forEach((function (e, t) { t.disabled || iMapsManager.init(t) })), iMaps.maps = iMapsManager.maps })); else { console.log("Map files not loaded properly."); let e = document.querySelector(".oxygen-body .map_wrapper .map_render"); e && (e.innerHTML = 'Map Container. <br> Map will not render in Oxygen preview, but will render in live page.<br>Consider enabling the "Async Loading" option in the Settings > Performance page.') } }, loadScript: function (e, t) { var a = document.createElement("script"); a.type = "text/javascript", a.src = e, a.onreadystatechange = t, a.onload = t, document.head.appendChild(a) }, loadScripts: function (e, t) { var a = 0, o = function () { ++a >= e.length && t.call(this, arguments) }; e.forEach((function (e, t) { iMaps.loadScript(e, o) })) } }; void 0 !== iMapsData.async && Array.isArray(iMapsData.async) && iMapsData.async.length > 0 ? iMaps.loadScript(iMapsData.async[0], (function () { iMapsData.async.shift(), iMaps.loadScripts(iMapsData.async, (function () { iMaps.init() })) })) : iMaps.init();
     1"use strict";iMaps.init();
  • interactive-geo-maps/tags/1.6.19/interactive-geo-maps.php

    r3115060 r3115635  
    11<?php
     2
    23/**
    34 * Interactive Geo Maps
     
    78 * Plugin URI:        https://interactivegeomaps.com/
    89 * Description:       Create interactive geographic vector maps of the world, continents or any country in the world. Color full regions or create markers on specific locations that will have information on hover and can also have actions on click. This plugin uses the online amcharts library to generate the maps.
    9  * Version:           1.6.18
     10 * Version:           1.6.1
    1011 * Requires PHP:      7.0
    1112 * Author:            MapGeo
     
    1415 * Domain Path:       /languages
    1516 *
    16  * @fs_premium_only /src/Plugin/Pro
    1717 */
    18 
    1918namespace Saltus\WP\Plugin\Saltus\InteractiveMaps;
    2019
    2120// If this file is called directly, quit.
    22 if ( ! defined( 'WPINC' ) ) {
    23     exit;
     21if ( !defined( 'WPINC' ) ) {
     22exit;
    2423}
    25 
    2624// Only run plugin code if PHP version bigger than 7.0 for now
    2725if ( version_compare( PHP_VERSION, '7.0', '<' ) ) {
    28     return;
     26return;
    2927}
     28
     29
     30
     31
     32
     33
     34
     35
     36
     37
     38
     39
     40
     41
     42
     43
     44
     45
     46
     47
     48
     49
     50
     51
     52
     53
     54
     55
     56
     57
     58
     59
     60
     61
     62
    3063
    31 // Freemius logic
    32 if ( function_exists( __NAMESPACE__ . '\igmfreemiusinit' ) ) {
    33     igmfreemiusinit()->set_basename( true, __FILE__ );
    34 } else {
    35     if ( ! function_exists( __NAMESPACE__ . '\igmfreemiusinit' ) ) {
    36         // Create a helper function for easy SDK access.
    37         function igmfreemiusinit() {
    38 
    39             global $igmfreemiusinit;
    40 
    41             if ( ! isset( $igmfreemiusinit ) ) {
    42                 // Include Freemius SDK.
    43                 if ( file_exists( dirname( __FILE__ ) . '/vendor/freemius/wordpress-sdk/start.php' ) ) {
    44                     require_once dirname( __FILE__ ) . '/vendor/freemius/wordpress-sdk/start.php';
    45                 }
    46 
    47                 $igmfreemiusinit = fs_dynamic_init(
    48                     array(
    49                         'id'                  => '5114',
    50                         'slug'                => 'interactive-geo-maps',
    51                         'type'                => 'plugin',
    52                         'public_key'          => 'pk_81cc828e3f6fa811c70bab7631a4f',
    53                         'is_premium'          => true,
    54                         'premium_suffix'      => 'PRO',
    55                         // If your plugin is a serviceware, set this option to false.
    56                         'has_premium_version' => true,
    57                         'has_addons'          => true,
    58                         'has_paid_plans'      => true,
    59                         'trial'               => array(
    60                             'days'               => 7,
    61                             'is_require_payment' => true,
    62                         ),
    63                         'menu'                => array(
    64                             'slug'    => 'edit.php?post_type=igmap',
    65                             'support' => false,
    66                         ),
    67                         // Set the SDK to work in a sandbox mode (for development & testing).
    68                         // IMPORTANT: MAKE SURE TO REMOVE SECRET KEY BEFORE DEPLOYMENT.
    69                         'secret_key'          => 'sk_#*ncIu!5g.noRn=qM1##FFh;6+.r@',
    70                     )
    71                 );
    72             }
    73 
    74             return $igmfreemiusinit;
    75         }
    76 
    77         // Init Freemius.
    78         igmfreemiusinit();
    79         // Signal that SDK was initiated.
    80         do_action( 'igmfreemiusinit_loaded' );
    81 
    82         /**
    83          * Prevent trial notice from displaying
    84          *
    85          * @param bool  $show
    86          * @param array $msg
    87          * @return bool
    88          */
    89         function igm_remove_trial_notice( $show, $msg ) {
    90 
    91             if ( 'trial_promotion' === $msg['id'] ) {
    92                 // Don't show the trial promotional admin notice.
    93                 return false;
    94             }
    95 
    96             return $show;
    97         }
     64        // Init Freemius.
     65        igmfreemiusinit();
     66        // Signal that SDK was initiated.
     67        do_action( 'igmfreemiusinit_loaded' );
     68        /**
     69         * Prevent trial notice from displaying
     70         *
     71         * @param bool  $show
     72         * @param array $msg
     73         * @return bool
     74         */
     75        function igm_remove_trial_notice(  $show, $msg  ) {
     76            if ( 'trial_promotion' === $msg['id'] ) {
     77                // Don't show the trial promotional admin notice.
     78                return false;
     79            }
     80            return $show;
     81        }
    9882
    9983        /**
     
    10387         */
    10488        function igm_plugin_icon() {
    105             return dirname( __FILE__) . '/assets/imgs/icon-256x256.png' ;
     89            return dirname( __FILE__;
    10690        }
    10791
    108         igmfreemiusinit()->add_filter( 'show_admin_notice', 'Saltus\WP\Plugin\Saltus\InteractiveMaps\igm_remove_trial_notice', 10, 2 );
    109 
     92        igmfreemiusinit()->add_filter(
     93            'show_admin_notice',
     94            'Saltus\\WP\\Plugin\\Saltus\\InteractiveMaps\\igm_remove_trial_notice',
     95            10,
     96            2
     97        );
    11098        // set plugin icon for freemius
    111         igmfreemiusinit()->add_filter('plugin_icon', 'Saltus\WP\Plugin\Saltus\InteractiveMaps\igm_plugin_icon' );
    112 
    113         igmfreemiusinit()->override_i18n(
    114             array(
    115                 'start-trial' => __('Free 7 Day Pro Trial','interactive-geo-maps'),
    116                 'upgrade' => __('Get Pro Features','interactive-geo-maps'),
    117                 )
    118         );
    119     }
    120 
    121     if ( file_exists( dirname( __FILE__ ) . '/vendor/autoload.php' ) ) {
    122         require_once dirname( __FILE__ ) . '/vendor/autoload.php';
    123     }
    124 
    125     if ( class_exists( \Saltus\WP\Framework\Core::class ) ) {
    126 
    127         /*
    128         * The path to the plugin root directory is mandatory,
    129         * so it loads the models from a subdirectory.
    130         */
    131         $framework = new \Saltus\WP\Framework\Core( dirname( __FILE__ ) );
    132         $framework->register();
    133         /**
    134          * Initialize plugin
    135          */
    136         add_action(
    137             'plugins_loaded',
    138             function () use ( $framework ) {
    139                 $plugin = new Core( 'interactive-geo-maps', '1.6.18', __FILE__, $framework );
    140                 $plugin->init();
    141             }
    142         );
    143     }
     99        igmfreemiusinit()->add_filter( 'plugin_icon', 'Saltus\\WP\\Plugin\\Saltus\\InteractiveMaps\\igm_plugin_icon' );
     100        igmfreemiusinit()->override_i18n( array(
     101            'start-trial' => __( 'Free 7 Day Pro Trial', 'interactive-geo-maps' ),
     102            'upgrade'     => __( 'Get Pro Features', 'interactive-geo-maps' ),
     103        ) );
     104    }
     105    if ( file_exists( dirname( __FILE__ ) . '/vendor/autoload.php' ) ) {
     106        require_once dirname( __FILE__ ) . '/vendor/autoload.php';
     107    }
     108    if ( class_exists( \Saltus\WP\Framework\Core::class ) ) {
     109        /*
     110         * The path to the plugin root directory is mandatory,
     111         * so it loads the models from a subdirectory.
     112         */
     113        $framework = new \Saltus\WP\Framework\Core(dirname( __FILE__ ));
     114        $framework->register();
     115        /**
     116         * Initialize plugin
     117         */
     118        add_action( 'plugins_loaded', function () use($framework) {
     119            $plugin = new Core(
     120                'interactive-geo-maps',
     121                '1.6.19',
     122                __FILE__,
     123                $framework
     124            );
     125            $plugin->init();
     126        } );
     127    }
    144128}
  • interactive-geo-maps/tags/1.6.19/readme.txt

    r3115088 r3115635  
    55Tested up to: 6.5
    66Requires PHP: 7.0
    7 Stable tag: 1.6.18.1
     7Stable tag: 1.6.1
    88Donate link: https://interactivegeomaps.com
    99License: GPLv2 or later
     
    100100== Changelog ==
    101101
     102
     103
     104
    102105= 1.6.18 =
    103106Small code improvements and bug fixes.
  • interactive-geo-maps/tags/1.6.19/vendor/composer/installed.php

    r3115088 r3115635  
    22    'root' => array(
    33        'name' => 'carmoreira/interactive-geo-maps',
    4         'pretty_version' => '1.6.18.2',
    5         'version' => '1.6.18.2',
    6         'reference' => '4a8197f553b6d3bb6d17c83534b60efe56558caf',
     4        'pretty_version' => '1.6.1',
     5        'version' => '1.6.1',
     6        'reference' => '',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../build',
     
    1212    'versions' => array(
    1313        'carmoreira/interactive-geo-maps' => array(
    14             'pretty_version' => '1.6.18.2',
    15             'version' => '1.6.18.2',
    16             'reference' => '4a8197f553b6d3bb6d17c83534b60efe56558caf',
     14            'pretty_version' => '1.6.1',
     15            'version' => '1.6.1',
     16            'reference' => '',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../build',
  • interactive-geo-maps/trunk/assets/public/map-actions/actions.js

    r3115060 r3115635  
    357357  }
    358358
    359   if (!iMapsActions.lightbox) {
    360     iMapsActions.lightbox = GLightbox(opts);
    361   }
     359  iMapsActions.lightbox = GLightbox(opts);
    362360
    363361  // add custom close button
  • interactive-geo-maps/trunk/assets/public/map-actions/actions.min.js

    r3115060 r3115635  
    1 function igm_display_below(e, t) { iMapsActions.contentBelow(e, t, !1), window.dispatchEvent(new Event("resize")) } function igm_display_below_scroll(e, t) { iMapsActions.contentBelow(e, t, !0), window.dispatchEvent(new Event("resize")) } function igm_display_above(e, t) { iMapsActions.contentAbove(e, t, !1), window.dispatchEvent(new Event("resize")) } function igm_display_page_below(e, t) { iMapsActions.pageBelow(e, t, !1) } function igm_display_page_below_and_scroll(e, t) { iMapsActions.pageBelow(e, t, !0) } function igm_display_right_1_3(e, t) { iMapsActions.contentRight(e, t, "igm_content_left_2_3", "igm_content_right_1_3"), window.dispatchEvent(new Event("resize")) } function igm_lightbox(e, t) { iMapsActions.lightboxAction(e, t, "inline"), window.dispatchEvent(new Event("resize")) } function igm_lightbox_image(e, t) { iMapsActions.lightboxAction(e, t, "image") } function igm_lightbox_iframe(e, t) { iMapsActions.lightboxAction(e, t, "external") } (iMapsActions = { init: function () { for (var e = document.querySelectorAll(".igm-live-filter"), t = 0; t < e.length; t++)iMapsActions.buildFilter(e[t]); for (var n = document.querySelectorAll(".igm-live-filter-dropdown"), t = 0; t < n.length; t++)iMapsActions.buildDropdownFilter(n[t]); if (0 < (i = document.querySelectorAll(".igm_select_choices")).length) for (t = 0; t < i.length; t++)iMapsActions.buildDropdown(i[t]); else for (var i = document.querySelectorAll(".igm_select"), t = 0; t < i.length; t++)i[t].addEventListener("change", function (e) { var t, e = e.target, n = e.getAttribute("data-map-id"), n = parseInt(n); "undefined" != typeof iMapsManager ? iMapsManager.select(n, e.value, !0) : e.getAttribute("data-url") && ((n = e.getAttribute("data-url").split("#")[1]) ? (t = e.getAttribute("data-url").replace("#" + n, ""), window.open(t + "?mregion=" + e.value + "#" + n, "_self")) : window.open(e.getAttribute("data-url") + "?mregion=" + e.value, "_self")) }); for (var o = document.querySelectorAll(".igm_entries_list"), t = 0; t < o.length; t++)iMapsActions.buildLists(o[t]) }, buildDropdown: function (n) { var e = n.getAttribute("data-noresults"), t = n.getAttribute("data-select"); new Choices(n, { noResultsText: e, position: "bottom", itemSelectText: t, resetScrollPosition: !1, searchChoices: !0, fuseOptions: { threshold: .4, findAllMatches: !0, shouldSort: !0 }, searchFloor: 2, searchResultLimit: 50, searchFields: ["label", "value", "customProperties"] }).passedElement.element.addEventListener("change", function () { var e, t = n.getAttribute("data-map-id"), t = parseInt(t); "undefined" != typeof iMapsManager && iMapsManager.select(t, this.value, !0), n.getAttribute("data-url") && ((t = n.getAttribute("data-url").split("#")[1]) ? (e = n.getAttribute("data-url").replace("#" + t, ""), window.open(e + "?mregion=" + n.value + "#" + t, "_self")) : window.open(n.getAttribute("data-url") + "?mregion=" + n.value, "_self")) }) }, buildLists: function (e) { for (var n = e.getAttribute("data-map-id"), t = e.querySelectorAll("li"), i = 0; i < t.length; i++){ var o = t[i]; o.addEventListener("click", function (e) { var t; "undefined" != typeof iMapsManager ? (t = e.target.getAttribute("data-code"), iMapsManager.select(n, t, !0)) : e.target.getAttribute("data-url") && window.open(e.target.getAttribute("data-url") + "?mregion=" + e.target.getAttribute("data-code"), "_self") }), o.addEventListener("mouseover", function (e) { "undefined" != typeof iMapsManager && (e = e.target.getAttribute("data-code"), iMapsManager.highlight(n, e)) }), o.addEventListener("mouseout", function (e) { "undefined" != typeof iMapsManager && iMapsManager.clearHighlighted(n) }) } }, buildDropdownFilter: function (e) { var i = e.getAttribute("data-base-map-id"), o = void 0 !== (o = e.getAttribute("data-keep-base-map")) && "1" === o, i = parseInt(i); e.addEventListener("change", function (e) { e = e.target.value, e = parseInt(e); if ((iMapsManager.filteredMap = e) === i) iMapsManager.activeMap = i, "undefined" != typeof iMapsManager && (iMapsManager.filteredMap = i, iMapsManager.showAllSeries(e)); else if ("undefined" != typeof iMapsManager) { iMapsManager.hideAllSeries(i, o); var t = iMaps.maps[i].seriesById[e]; if (t && 0 < t.length) for (var n = 0; n < t.length; n++)t[n].show() } void 0 !== iMaps.maps[e] && (iMaps.maps[e].map.goHome(), iMaps.maps[e].map.dispatchImmediately("zoomlevelchanged")) }) }, buildFilter: function (e) { for (var o = e.getAttribute("data-base-map-id"), a = void 0 !== (a = e.getAttribute("data-keep-base-map")) && "1" === a, o = parseInt(o), r = e.querySelectorAll("li"), t = 0; t < r.length; t++)r[t].addEventListener("click", function (e) { for (var t = 0; t < r.length; t++)r[t].classList.remove("igm-live-filter-active"); e.target.classList.add("igm-live-filter-active"); e = e.target.getAttribute("data-map-id"), e = parseInt(e); if ((iMapsManager.filteredMap = e) === o) "undefined" != typeof iMapsManager && (iMapsManager.filteredMap = o, iMapsManager.showAllSeries(e), iMapsManager.resetDrilldown(e)); else if ("undefined" != typeof iMapsManager) { iMapsManager.hideAllSeries(o, a); var n = iMaps.maps[o].seriesById[e]; if (n && 0 < n.length) for (var i = 0; i < n.length; i++)n[i].show() } void 0 !== iMaps.maps[o] && (iMaps.maps[o].map.goHome(), iMaps.maps[o].map.dispatchImmediately("zoomlevelchanged")) }) }, lightbox: !1, lightboxIsRunning: !1, lightboxAction: function (e, t, n) { var i = [], o = iMapsActionOptions.lightboxWidth, a = iMapsActionOptions.lightboxHeight, r = {}; "inline" === n ? (t.content = "#" + iMapsActions.getIDfromData(t), i.push({ href: t.content, type: n, width: o, height: a })) : "external" === n ? ("auto" === a && (a = parseInt(.8 * window.innerHeight)), i.push({ href: t.content, type: n, width: o, height: a })) : "" !== t.content && t.content.includes(",") ? t.content.split(",").forEach(function (e, t) { i.push({ href: e, type: n, width: o, height: a }) }) : i.push({ href: t.content, type: n, width: o, height: a }), r = { touchNavigation: !1, draggable: !1, keyboardNavigation: !1, loopAtEnd: !1, loop: !1, zoomable: !1, elements: i, closeButton: !1, closeOnOutsideClick: !0 }, 768 < window.innerWidth && iMapsActions.isTouchScreenDevice() && (r.closeOnOutsideClick = !1), iMapsActions.lightbox || (iMapsActions.lightbox = GLightbox(r)), iMapsActions.lightbox.on("open", function () { let n = document.querySelector(".ginner-container .gslide-media .igm_close"); n || ((n = document.createElement("span")).classList.add("igm_close"), n.innerHTML = "╳", document.querySelectorAll(".ginner-container .gslide-media").forEach(function (e) { var t = n.cloneNode(!0); t.addEventListener("click", function () { iMapsActions.lightbox.close() }), e.prepend(t) })) }), "" !== t.content && iMapsActions.lightbox && !iMapsActions.lightboxIsRunning ? (iMapsActions.lightbox.open(), iMapsActions.lightboxIsRunning = !0) : console.log("Empty Action Content or Incorrect Request - Lightbox not triggered"), iMapsActions.lightbox.on("close", function () { iMapsManager.clearSelected(e), iMaps.maps[e].map.lastClickedEntry = !1, iMapsActions.lightboxIsRunning = !1 }) }, contentBelow: function (e, t, n) { var e = document.getElementById("map_" + e).parentNode.parentNode.parentNode, i = e.parentNode.querySelector(".igm_content_below"), o = document.getElementById("igm-hidden-footer-content"); t.content = "[id='" + iMapsActions.getIDfromData(t) + "']", null === i && ((i = document.createElement("div")).classList.add("igm_content_below"), e.parentNode.insertBefore(i, e.nextSibling)), (e = i.children) && e.length && o && Array.from(e).forEach(e => { e.style && (e.style.display = "none"), o.appendChild(e) }), (e = document.querySelector(t.content)) && (i.appendChild(e), e.style) && (e.style.display = "block"), n && (t = Math.floor(i.getBoundingClientRect().top - 100), window.scrollBy({ top: t, left: 0, behavior: "smooth" })) }, contentAbove: function (e, t, n) { var e = document.getElementById("map_" + e).parentNode.parentNode.parentNode, i = e.parentNode.querySelector(".igm_content_above"), o = document.getElementById("igm-hidden-footer-content"); t.content = "[id='" + iMapsActions.getIDfromData(t) + "']", null === i && ((i = document.createElement("div")).classList.add("igm_content_above"), e.parentNode.insertBefore(i, e.parentNode.childNodes[0])), (e = i.firstChild) && o && (e.style.display = "none", o.appendChild(e)), (o = document.querySelector(t.content)) && (i.appendChild(o), o.style.display = "block"), n && (originalTop = Math.floor(i.getBoundingClientRect().top - 100), window.scrollBy({ top: originalTop, left: 0, behavior: "smooth" })) }, contentRight: function (e, t, n, i) { var e = document.getElementById("map_" + e).parentNode.parentNode.parentNode, o = e.parentNode.querySelector("." + i), a = e.parentNode.querySelector("." + n), r = document.getElementById("igm-hidden-footer-content"); t.content = "[id='" + iMapsActions.getIDfromData(t) + "']", null === a && (a = e.parentNode.querySelector(".map_box")).classList.add(n), null === o && ((o = document.createElement("div")).classList.add(i), e.parentNode.insertBefore(o, e.nextSibling)), (a = o.firstChild) && r && (a.style.display = "none", r.appendChild(a)), (n = document.querySelector(t.content)) && (o.appendChild(n), n.style.display = "block") }, pageBelow: function (e, t, n) { var i, o, a; "" !== t.content && (t = parseInt(t.content), t = iMapsActionOptions.restURL + "pages/" + t, o = document.getElementById("map_" + e).parentNode.parentNode.parentNode.parentNode.querySelector(".igm_content_below"), (a = new XMLHttpRequest).open("GET", t), a.onload = function () { var e; 200 <= a.status && a.status < 400 ? (e = JSON.parse(a.response), o.innerHTML = e.content.rendered, n && (i = Math.floor(o.getBoundingClientRect().top - 100), window.scrollBy({ top: i, left: 0, behavior: "smooth" }))) : console.log("We connected to the server, but it returned an error.") }, a.onerror = function () { console.log("Connection error") }, a.send()) }, getIDfromData: function (e) { t = (t = (void 0 !== e.originalID ? e.originalID : (Number.isInteger(e.id) && (e.id = e.id.toString()), e.id)).replace(/\s/g, "")).replace(/,/g, "_"); var t = iMapsActions.wpFeSanitizeTitle(t); return e.content = t + "_" + e.mapID, e.content.toLowerCase() } }).wpFeSanitizeTitle = function (e) { return e = e.replace(/\ /g, "").replace(/\,/g, "_"), e = encodeURIComponent(e).replace(/\(/g, "%28").replace(/\)/g, "%29").replace(/%/g, "").toLowerCase() }, iMapsActions.resetContainer = function (e, t) { var n = document.getElementById("map_wrapper_" + e), i = document.getElementById("igm-hidden-footer-content"); null !== n && null !== (n = n.querySelector(t)) && ((t = n.firstChild) && i && (t.style.display = "none", i.appendChild(t)), what2display = document.getElementById("default_" + e)) && (n.appendChild(what2display), what2display.style.display = "block") }, iMapsActions.resetActions = function (e) { iMapsActions.resetContainer(e, ".igm_content_below"), iMapsActions.resetContainer(e, ".igm_content_above"), iMapsActions.resetContainer(e, ".igm_content_right_1_3") }, iMapsActions.isTouchScreenDevice = function () { return "ontouchstart" in window || navigator.maxTouchPoints }, iMapsActions.loadScript = function (e, t) { var n = document.createElement("script"); n.type = "text/javascript", n.src = e, n.onreadystatechange = t, n.onload = t, document.head.appendChild(n) }, iMapsActions.loadScripts = function (e, t) { function n() { ++i >= e.length && t.call(this, arguments) } var i = 0; e.forEach(function (e, t) { iMapsActions.loadScript(e, n) }) }, void 0 !== iMapsActionOptions.async && Array.isArray(iMapsActionOptions.urls) && 0 < iMapsActionOptions.urls.length ? iMapsActions.loadScripts(iMapsActionOptions.urls, function () { iMapsActions.init() }) : iMapsActions.init();
     1function igm_display_below(e,iMapsActions.init();
  • interactive-geo-maps/trunk/assets/public/map-service/app.min.js

    r3115060 r3115635  
    1 "use strict"; function _typeof(e) { return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) { return typeof e } : function (e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e }, _typeof(e) } function geocluster(e, t, a, o) { return t = parseFloat(t), this instanceof geocluster ? this._cluster(e, t, a, o) : new geocluster(e, t, a, o) } geocluster.prototype._toRad = function (e) { return e * Math.PI / 180 }, geocluster.prototype._dist = function (e, t, a, o) { var i = this._toRad(a - e), r = this._toRad(o - t), n = Math.sin(i / 2) * Math.sin(i / 2) + Math.sin(r / 2) * Math.sin(r / 2) * Math.cos(this._toRad(e)) * Math.cos(this._toRad(a)); return Math.round(2 * Math.atan2(Math.sqrt(n), Math.sqrt(1 - n)) * 6371 * 100) / 100 }, geocluster.prototype._centroid = function (e) { var t = Object.values(e).reduce((function (e, t) { return { latitude: e.latitude + t.latitude, longitude: e.longitude + t.longitude } }), { latitude: 0, longitude: 0 }); return t = Object.values(t).map((function (t) { return t / Object.keys(e).length })) }, geocluster.prototype._clean = function (e) { return e.map((function (e) { return [e.centroid, e.elements] })) }, geocluster.prototype._cluster = function (e, t, a, o) { var i, r = this, n = []; ("number" != typeof t || isNaN(t)) && (t = 1); for (var l, s = 0, d = [], p = 1; p < e.length; p++)s += l = r._dist(e[p].latitude, e[p].longitude, e[p - 1].latitude, e[p - 1].longitude), d.push(l); var u = s / d.length, c = 0; d.forEach((function (e) { c += Math.pow(e - u, 2) })); Math.sqrt(c / d.length); var m = 1e4 * t, g = []; g.push({ centroid: e[Math.floor(.5 * e.length)], elements: [], fill: a.fill, hover: a.hover, radius: a.radius }); for (var h = !0; !0 === h;){ var M = !1, v = !1; e.forEach((function (e, t) { var a = 1 / 0, o = null; g.forEach((function (t, i) { var n = r._dist(e.latitude, e.longitude, g[i].centroid.latitude, g[i].centroid.longitude); n < a && (a = n, o = i) })), a < m || 0 === a ? g[o].elements.push(e) : (g.push({ centroid: e, elements: [e] }), M = !0) })), (g = g.filter((function (e) { return e.elements.length > 0 }))).forEach((function (e, t) { var a = r._centroid(e.elements); h = !1, a.latitude === e.centroid.latitude && a.longitude === e.centroid.longitude || (g[t].centroid = a, v = !0) })), v || M ? h && (g = g.map((function (e) { return e.elements = [], e }))) : h = !1 } return g = g.map((function (e) { 1 === e.elements.length ? n.push(e.elements[0]) : (i = { id: "", label: e.elements.length, name: "", value: e.elements.length, cluster: !0, latitude: e.centroid[0], longitude: e.centroid[1], elements: e.elements, content: "", fill: a.fill, hover: a.hover, radius: a.radius, action: "" }, o && (i.tooltipTemplate = o), n.push(i)) })), n }; var iMapsRouter = { getGeoFiles: function (e) { var t, a, o = e.id.toString(), i = e.name, r = {}; return ["southAmerica", "northAmerica", "europe", "middleEast", "asia", "oceania", "africa", "antarctica"].includes(o) ? (t = "region/world/", a = "_region_world_") : o.includes("US-") ? (t = "region/usa/", a = "_region_usa_", o = o.substr(-2).toLowerCase()) : (t = "", a = "_", o = i.toLowerCase().replace("united states", "usa")), r.src = "https://cdn.amcharts.com/lib/4/geodata/" + t + o + "Low.js", r.map = "am4geodata" + a + o + "Low", r.title = i, r }, getAllSrc: function () { var e = {}, t = { main: "../../vendor/geodata", usa: "../../vendor/geodata/region/usa", world: "../../vendor/geodata/region/world" }, a = require("fs"); return Object.keys(t).forEach((function (o) { e[o] = [], a.readdir(t[o], (function (t, a) { a.forEach((function (t) { e[o].push(t) })) })) })), e }, getVarByName: function (e) { return void 0 === e ? "am4geodata_worldLow" : e.includes("custom") ? e : "am4geodata_" + (e = e.replace(/\//g, "_")) }, getCleanMapName: function (e, t) { return void 0 !== e && ("custom" === (e = (e = e.replace("Low", "")).replace("High", "")) && (e += t), e) }, iso2cleanName: function (e, t) { var a, o = iMapsRouter.getCountries(), i = iMapsManager.maps[t].seriesIndex, r = !1; if (console.log("ISO: " + e), "VA" === e) return "vatican"; if ("US" === e) return "usa"; if (e.includes("CA-")) return "region/canada/" + e.replace("CA-", "").toLowerCase(); if (e.includes("MX-")) return "region/mexico/" + e.replace("MX-", "").toLowerCase(); if (["africa", "antarctiva", "asia", "europe", "middleEast", "northAmerica", "oceania", "southAmerica", "centralAmerica"].includes(e)) return "region/world/" + e; if (e.includes("US-") ? a = ["region/usa/" + e.replace("US-", "").toLowerCase(), "region/usa/congressional/" + e.replace("US-", "").toLowerCase(), "region/usa/congressional2022/" + e.replace("US-", "").toLowerCase()] : "GB" === e ? a = ["uk", "ukCountries", "ukCounties"] : "BA" === e ? a = ["bosniaHerzegovinaCantons", "bosniaHerzegovina"] : "IL" === e ? a = ["israel", "israelPalestine"] : "SI" === e ? a = ["sloveniaRegions", "slovenia"] : "IN" === e ? a = ["india2019", "india", "india2020"] : "AE" === e ? a = ["unitedArabEmirates", "uae"] : "FR" === e ? a = ["franceDepartments", "france"] : "MG" === e ? a = ["madagascarProvince", "madagascarRegion"] : "PT" === e ? a = ["portugal", "portugalRegions"] : "RS" === e ? a = ["serbia", "serbiaNoKosovo"] : "CD" === e ? a = ["congoDR"] : "CG" === e ? a = ["congo"] : "CZ" === e ? a = ["czechRepublic", "czechia"] : "MM" === e && (a = ["myanmar"]), Array.isArray(a)) { if (a.forEach((function (e, t) { i.hasOwnProperty(e) && (r = e) })), r) return r; if (o.hasOwnProperty(e)) return iMapsRouter.camelize(o[e]) } else if (o.hasOwnProperty(e)) return iMapsRouter.camelize(o[e]); return !1 }, getCountries: function () { return JSON.parse('{"AF":"Afghanistan","AX":"Åland Islands","AL":"Albania","DZ":"Algeria","AS":"American Samoa","AD":"Andorra","AO":"Angola","AI":"Anguilla","AQ":"Antarctica","AG":"Antigua & Barbuda","AR":"Argentina","AM":"Armenia","AW":"Aruba","AC":"Ascension Island","AU":"Australia","AT":"Austria","AZ":"Azerbaijan","BS":"Bahamas","BH":"Bahrain","BD":"Bangladesh","BB":"Barbados","BY":"Belarus","BE":"Belgium","BZ":"Belize","BJ":"Benin","BM":"Bermuda","BT":"Bhutan","BO":"Bolivia","BA":"Bosnia & Herzegovina","BW":"Botswana","BR":"Brazil","IO":"British Indian Ocean Territory","VG":"British Virgin Islands","BN":"Brunei","BG":"Bulgaria","BF":"Burkina Faso","BI":"Burundi","KH":"Cambodia","CM":"Cameroon","CA":"Canada","IC":"Canary Islands","CV":"Cape Verde","BQ":"Caribbean Netherlands","KY":"Cayman Islands","CF":"Central African Republic","EA":"Ceuta & Melilla","TD":"Chad","CL":"Chile","CN":"China","CX":"Christmas Island","CC":"Cocos (Keeling) Islands","CO":"Colombia","KM":"Comoros","CG":"Congo - Brazzaville","CD":"Congo - Kinshasa","CK":"Cook Islands","CR":"Costa Rica","CI":"Côte d’Ivoire","HR":"Croatia","CU":"Cuba","CW":"Curaçao","CY":"Cyprus","CZ":"Czechia","DK":"Denmark","DG":"Diego Garcia","DJ":"Djibouti","DM":"Dominica","DO":"Dominican Republic","EC":"Ecuador","EG":"Egypt","SV":"El Salvador","GQ":"Equatorial Guinea","ER":"Eritrea","EE":"Estonia","SZ":"Eswatini","ET":"Ethiopia","FK":"Falkland Islands","FO":"Faroe Islands","FJ":"Fiji","FI":"Finland","FR":"France","GF":"French Guiana","PF":"French Polynesia","TF":"French Southern Territories","GA":"Gabon","GM":"Gambia","GE":"Georgia","DE":"Germany","GH":"Ghana","GI":"Gibraltar","GR":"Greece","GL":"Greenland","GD":"Grenada","GP":"Guadeloupe","GU":"Guam","GT":"Guatemala","GG":"Guernsey","GN":"Guinea","GW":"Guinea-Bissau","GY":"Guyana","HT":"Haiti","HN":"Honduras","HK":"Hong Kong SAR China","HU":"Hungary","IS":"Iceland","IN":"India","ID":"Indonesia","IR":"Iran","IQ":"Iraq","IE":"Ireland","IM":"Isle of Man","IL":"Israel","IT":"Italy","JM":"Jamaica","JP":"Japan","JE":"Jersey","JO":"Jordan","KZ":"Kazakhstan","KE":"Kenya","KI":"Kiribati","XK":"Kosovo","KW":"Kuwait","KG":"Kyrgyzstan","LA":"Laos","LV":"Latvia","LB":"Lebanon","LS":"Lesotho","LR":"Liberia","LY":"Libya","LI":"Liechtenstein","LT":"Lithuania","LU":"Luxembourg","MO":"Macao SAR China","MG":"Madagascar","MW":"Malawi","MY":"Malaysia","MV":"Maldives","ML":"Mali","MT":"Malta","MH":"Marshall Islands","MQ":"Martinique","MR":"Mauritania","MU":"Mauritius","YT":"Mayotte","MX":"Mexico","FM":"Micronesia","MD":"Moldova","MC":"Monaco","MN":"Mongolia","ME":"Montenegro","MS":"Montserrat","MA":"Morocco","MZ":"Mozambique","MM":"Myanmar (Burma)","NA":"Namibia","NR":"Nauru","NP":"Nepal","NL":"Netherlands","NC":"New Caledonia","NZ":"New Zealand","NI":"Nicaragua","NE":"Niger","NG":"Nigeria","NU":"Niue","NF":"Norfolk Island","KP":"North Korea","MK":"North Macedonia","MP":"Northern Mariana Islands","NO":"Norway","OM":"Oman","PK":"Pakistan","PW":"Palau","PS":"Palestinian Territories","PA":"Panama","PG":"Papua New Guinea","PY":"Paraguay","PE":"Peru","PH":"Philippines","PN":"Pitcairn Islands","PL":"Poland","PT":"Portugal","XA":"Pseudo-Accents","XB":"Pseudo-Bidi","PR":"Puerto Rico","QA":"Qatar","RE":"Réunion","RO":"Romania","RU":"Russia","RW":"Rwanda","WS":"Samoa","SM":"San Marino","ST":"São Tomé & Príncipe","SA":"Saudi Arabia","SN":"Senegal","RS":"Serbia","SC":"Seychelles","SL":"Sierra Leone","SG":"Singapore","SX":"Sint Maarten","SK":"Slovakia","SI":"Slovenia","SB":"Solomon Islands","SO":"Somalia","ZA":"South Africa","GS":"South Georgia & South Sandwich Islands","KR":"South Korea","SS":"South Sudan","ES":"Spain","LK":"Sri Lanka","BL":"St Barthélemy","SH":"St Helena","KN":"St Kitts & Nevis","LC":"St Lucia","MF":"St Martin","PM":"St Pierre & Miquelon","VC":"St Vincent & Grenadines","SD":"Sudan","SR":"Suriname","SJ":"Svalbard & Jan Mayen","SE":"Sweden","CH":"Switzerland","SY":"Syria","TW":"Taiwan","TJ":"Tajikistan","TZ":"Tanzania","TH":"Thailand","TL":"Timor-Leste","TG":"Togo","TK":"Tokelau","TO":"Tonga","TT":"Trinidad & Tobago","TA":"Tristan da Cunha","TN":"Tunisia","TR":"Turkey","TM":"Turkmenistan","TC":"Turks & Caicos Islands","TV":"Tuvalu","UG":"Uganda","UA":"Ukraine","AE":"United Arab Emirates","GB":"United Kingdom","US":"United States","UY":"Uruguay","UM":"US Outlying Islands","VI":"US Virgin Islands","UZ":"Uzbekistan","VU":"Vanuatu","VA":"Vatican City","VE":"Venezuela","VN":"Vietnam","WF":"Wallis & Futuna","EH":"Western Sahara","YE":"Yemen","ZM":"Zambia","ZW":"Zimbabwe"}') }, camelize: function (e) { return e.replace(/(?:^\w|[A-Z]|\b\w)/g, (function (e, t) { return 0 == t ? e.toLowerCase() : e.toUpperCase() })).replace(/\s+/g, "") } }, iMapsModel = { prepareData: function (e) { return e && Array.isArray(e) ? (e.forEach((function (t, a) { e[a] = iMapsModel.iterateData(t), Array.isArray(e[a].overlay) && e[a].overlay.length > 0 && e[a].overlay.forEach((function (t, o) { e[a].overlay[o].map !== e[a].map || iMapsManager.bool(e[a].allowEmpty) || (e[a].overlay[o].include = iMapsModel.prepareOverlayInclude(t)), e[a].overlay[o] = iMapsModel.iterateData(t) })) })), e) : e }, prepareOverlayInclude: function (e) { var t = e.includes || ""; return e.regions && e.regions.forEach((function (e, a) { t += "," + e.id })), t }, iterateData: function (e) { "function" == typeof igm_custom_filter && (e = igm_custom_filter(e)); var t = "igm_custom_filter_" + e.id; return "function" == typeof window[t] && (e = window[t](e)), e = iMapsModel.prepareColor(e), e = iMapsModel.prepareExcludeIncludes(e), e = iMapsModel.coordinatesToInt(e), e = iMapsModel.prepareEntriesData(e), e = iMapsModel.prepareGroupedRegions(e), e = iMapsModel.prepareImageFields(e), e = iMapsModel.prepareMultiGeoLine(e) }, prepareMultiGeoLine: function (e) { return Array.isArray(e.lines) && e.lines.length && (e.lines = e.lines.filter((function (e) { if (Array.isArray(e.multiGeoLine) && e.multiGeoLine.length) return e })), e.lines.map((function (e) { e.arrow = void 0 !== e.arrow && iMapsManager.bool(e.arrow), e.arrowDisabled = !e.arrow, e.multiGeoLine.map((function (e) { Object.assign(e, e.coordinates), delete e.coordinates })) }))), e }, prepareImageFields: function (e) { return Array.isArray(e.imageMarkers) && Array.isArray(e.imageMarkers) && e.imageMarkers.map((function (e) { return void 0 === e.href && e.image && (Array.isArray(e.image) || "object" == typeof e.image) && (e.href = e.image.url), e })), e }, prepareGroupedRegions: function (e) { var t, a, o, i, r; if (Array.isArray(e.regions) && e.regions.length) { if (void 0 === e.regionGroups && (e.regionGroups = []), iMapsManager.bool(e.regionsGroupHover)) return e.regionGroups.push(e.regions), e; e.regions.map((function (n, l) { if (!n.id || !String(n.id).includes(",")) return n; o = [], i = [], t = n.id.split(","), r = n.name, t.forEach((function (e, t) { (a = Object.assign({}, n)).id = e.trim(), a.originalID = n.id, a.groupName = r, delete a.name, delete n.name, isNaN(a.id), i.includes(a.id) || (i.push(a.id), o.push(a)) })), e.regionGroups.push(o), e.regions.splice(l, -1) })) } return e }, prepareTooltip: function (e, t) { var a, o, i, r, n, l; return void 0 === t || void 0 === e ? e : (a = void 0 !== t.maxWidth && "" !== t.maxWidth && parseInt(t.maxWidth), (o = iMapsModel.isMSIE()) ? iMapsModel.removeHTMLtags(e) : (e && e.includes("<img") && ((n = document.createRange()).selectNode(document.getElementsByTagName("div").item(0)), (i = (r = n.createContextualFragment(e)).querySelectorAll("img")).length > 0 && (i.forEach((function (e) { 0 !== e.width && "" === e.style.width && (e.style.width = e.width + "px"), 0 !== e.height && "" === e.style.height && (e.style.height = e.height + "px") })), (l = document.createElement("div")).appendChild(r.cloneNode(!0)), e = l.innerHTML)), a && "" !== e && !o && (e = '<div class="imapsInnerTooltip" style="max-width:' + a + 'px">' + e + "</div>"), e)) }, isMSIE: function () { return window.navigator.userAgent.match(/(MSIE|Trident)/) }, removeHTMLtags: function (e) { return null === e || "" === e ? "" : (e = e.toString()).replace(/<[^>]*>/g, "") }, prepareEntriesData: function (e) { e.heatMapMarkers && "1" === e.heatMapMarkers.enabled && (e.heatMapMarkers.minRadius = parseInt(e.heatMapMarkers.minRadius), e.heatMapMarkers.maxRadius = parseInt(e.heatMapMarkers.maxRadius)); var t = e.id; return Array.isArray(e.regions) && e.regions.length && (e.regions.map((function (a) { return void 0 !== a.useDefaults && "1" !== a.useDefaults || Object.assign(a, e.regionDefaults), void 0 !== a.action && "default" === a.action && (a.action = e.regionDefaults.action), void 0 !== e.regionDefaults.triggerClickOnHover && "1" === e.regionDefaults.triggerClickOnHover && (a.triggerClickOnHover = !0), void 0 !== e.regionActiveState && "1" === e.regionActiveState.enabled && (a.activeState = !0), e.regionLabels && "custom" === e.regionLabels.source && void 0 !== e.regionLabels.customSource && (e.regionLabels.customSource.includes(".") ? a.autoLabel = e.regionLabels.customSource.split(".").reduce((function (e, t) { return e[t] ? e[t] : 0 }), a) : a.autoLabel = a[e.regionLabels.customSource]), e.heatMapRegions && "1" === e.heatMapRegions.enabled && (e.heatMapRegions.source.includes(".") && (a.heatMapRegionRef = e.heatMapRegions.source.split(".").reduce((function (e, t) { return e[t] ? e[t] : 0 }), a)), delete a.fill), void 0 !== e.visual.borderColorHover && e.visual.borderColorHover !== e.visual.borderColor && (a.borderColorHover = e.visual.borderColorHover), void 0 !== e.visual.borderWidthHover && e.visual.borderWidthHover !== e.visual.borderWidth && (a.borderWidthHover = e.visual.borderWidthHover), a.tooltipContent = iMapsModel.prepareTooltip(a.tooltipContent, e.tooltip), a.mapID = t, a.value && void 0 !== _typeof(a.value) && "" !== a.value && (a.val = a.value, a.value = parseFloat(a.value)), a })), e.heatMapRegions && e.heatMapRegions.source.includes(".") && (e.heatMapRegions.source = "heatMapRegionRef")), Array.isArray(e.roundMarkers) && e.roundMarkers.length && (e.roundMarkers.map((function (a) { return void 0 !== a.useDefaults && "1" !== a.useDefaults || Object.assign(a, e.markerDefaults), a.coordinates && (a.latitude = a.coordinates.latitude, a.longitude = a.coordinates.longitude), "string" == typeof a.latitude && (a.latitude = parseFloat(a.latitude)), "string" == typeof a.longitude && (a.longitude = parseFloat(a.latitude)), void 0 === a.name && (a.name = a.id), e.roundMarkersMobileSize && 100 !== parseInt(e.roundMarkersMobileSize) && window.innerWidth <= 780 && (a.radius = parseFloat(a.radius) * parseFloat(e.roundMarkersMobileSize) / 100), e.heatMapMarkers && "1" === e.heatMapMarkers.enabled && (isNaN(a.value) || (a.value = parseFloat(a.value)), e.heatMapMarkers.source.includes(".") && (a.heatMapMarkerRef = e.heatMapMarkers.source.split(".").reduce((function (e, t) { return e[t] ? e[t] : 0 }), a)), delete a.fill, delete a.radius), a.value && void 0 !== _typeof(a.value) && "" !== a.value && (a.val = a.value, a.value = parseFloat(a.value)), "default" === a.action && (a.action = e.markerDefaults.action), void 0 !== e.markerDefaults.triggerClickOnHover && "1" === e.markerDefaults.triggerClickOnHover && (a.triggerClickOnHover = !0), void 0 !== e.triggerRegionHover && "1" === e.triggerRegionHover.enabled && (a.triggerRegionHover = !0), a.tooltipContent = iMapsModel.prepareTooltip(a.tooltipContent, e.tooltip), a.mapID = t, a })), e.roundMarkers = e.roundMarkers.filter((function (e) { return void 0 !== e.latitude && "" !== e.latitude && "" !== e.name })), e.heatMapMarkers && e.heatMapMarkers.source.includes(".") && (e.heatMapMarkers.source = "heatMapMarkerRef")), Array.isArray(e.iconMarkers) && e.iconMarkers.length && e.iconMarkers.map((function (a) { return void 0 !== a.useDefaults && "1" !== a.useDefaults || Object.assign(a, e.iconMarkerDefaults), a.coordinates && (a.latitude = a.coordinates.latitude, a.longitude = a.coordinates.longitude), void 0 === a.name && (a.name = a.id), "default" === a.action && (a.action = e.iconMarkerDefaults.action), void 0 !== e.iconMarkerDefaults.triggerClickOnHover && "1" === e.iconMarkerDefaults.triggerClickOnHover && (a.triggerClickOnHover = !0), e.iconMarkersMobileSize && 100 !== parseInt(e.iconMarkersMobileSize) && window.innerWidth <= 780 && (a.scale = parseFloat(a.scale) * parseFloat(e.iconMarkersMobileSize) / 100), a.val = a.value, a.value = parseFloat(a.value), a.tooltipContent = iMapsModel.prepareTooltip(a.tooltipContent, e.tooltip), a.mapID = t, a })), Array.isArray(e.imageMarkers) && e.imageMarkers.length && e.imageMarkers.map((function (a) { return void 0 !== a.useDefaults && "1" !== a.useDefaults || Object.assign(a, e.imageMarkerDefaults), a.coordinates && (a.latitude = a.coordinates.latitude, a.longitude = a.coordinates.longitude), void 0 !== a.nonScaling && (a.nonScaling = iMapsManager.bool(a.nonScaling)), void 0 === a.size && (a.size = e.imageMarkerDefaults.size), void 0 === a.horizontalCenter && (a.horizontalCenter = e.imageMarkerDefaults.horizontalCenter), void 0 === a.verticalCenter && (a.verticalCenter = e.imageMarkerDefaults.verticalCenter), void 0 === a.name && (a.name = a.id), "default" !== a.action && void 0 !== a.action || (a.action = e.imageMarkerDefaults.action), void 0 !== e.imageMarkerDefaults.triggerClickOnHover && "1" === e.imageMarkerDefaults.triggerClickOnHover && (a.triggerClickOnHover = !0), e.imageMarkersMobileSize && 100 !== parseInt(e.imageMarkersMobileSize) && window.innerWidth <= 780 && (a.size = parseFloat(a.size) * parseFloat(e.imageMarkersMobileSize) / 100), a.val = a.value, a.value = parseFloat(a.value), a.tooltipContent = iMapsModel.prepareTooltip(a.tooltipContent, e.tooltip), a.mapID = t, a })), Array.isArray(e.labels) && e.labels.length && e.labels.map((function (a) { return void 0 !== a.useDefaults && "1" !== a.useDefaults || (Object.assign(a, e.labelDefaults), Object.assign(a, e.labelPosition)), a.coordinates && (Object.assign(a, a.coordinates), delete a.coordinates), "default" === a.action && (a.action = e.labelDefaults.action), void 0 !== e.labelDefaults.triggerClickOnHover && "1" === e.labelDefaults.triggerClickOnHover && (a.triggerClickOnHover = !0), void 0 !== a.size && (a.fontSize = a.size), e.labelsMobileSize && 100 !== parseInt(e.labelsMobileSize) && window.innerWidth <= 780 && (a.fontSize = parseInt(a.fontSize) * parseInt(e.labelsMobileSize) / 100, a.size = a.fontSize), a.tooltipContent = iMapsModel.prepareTooltip(a.tooltipContent, e.tooltip), a.mapID = t, a })), Array.isArray(e.lines) && e.lines.length && e.lines.map((function (t) { return void 0 !== t.useDefaults && "1" !== t.useDefaults || Object.assign(t, e.lineDefaults), t.curvature = parseFloat(t.curvature), t })), e }, prepareExcludeIncludes: function (e) { return void 0 !== e.onlyIncludeActive && 1 === parseInt(e.onlyIncludeActive) ? (e.include = [], e.exclude = [], e.regions && e.regions.forEach((function (t, a) { e.include.push(t.id), isNaN(t.id) || e.include.push(parseInt(t.id)) })), e) : (e.exclude && "string" == typeof e.exclude && e.exclude.trim().length && (e.exclude = e.exclude.split(",").map((function (e) { return e.trim() }))), e.include && e.include.trim().length && (e.include = e.include.split(",").map((function (e) { return e.trim() })), e.include.map((function (t) { isNaN(t) || e.include.push(parseInt(t)) }))), e) } }; iMapsModel.coordinatesToInt = function (e) { return function e(t) { "object" === _typeof(t) && null !== t && Object.keys(t).map((function (a, o) { if ("object" === _typeof(t[a])) if ("coordinates" === a || "homeGeoPoint" === a) !function (e, t) { t[e].latitude = Number(t[e].latitude), t[e].longitude = Number(t[e].longitude) }(a, t); else { if (void 0 !== t.className) return; e(t[a]) } })) }(e), e }, iMapsModel.prepareColor = function (e) { var t = ["inactiveColor", "activeColor", "hoverColor", "hover", "inactiveHoverColor", "backgroundColor", "color", "minColor", "maxColor", "fill", "projectionBackgroundColor", "borderColor", "borderColorHover"], a = function (e, a) { t.includes(e) && (a[e].includes("|") ? a[e] = function (e) { var t, a, o, i = e.split("|"); return a = "undefined" != typeof igmGradientType ? igmGradientType : "LinearGradient", o = "undefined" != typeof igmGradientOffset && Array.isArray(igmGradientOffset) ? igmGradientOffset : [], t = new am4core[a], i.forEach((function (e, a) { t.addColor(am4core.color(e), 1, o[a]) })), t.rotation = "undefined" != typeof igmGradientRotation ? igmGradientRotation : 0, t }(a[e]) : a[e].startsWith("http") ? a[e] = function (e) { var t = e, a = new am4core.Pattern; a.width = 150, a.height = 150, a.strokeWidth = 0, a.stroke = am4core.color("#6699cc"); var o = new am4core.Image; return o.href = t, o.width = 150, o.height = 150, o.x = 0, o.y = 0, o.verticalCenter = "middle", o.valign = "middle", a.addElement(o.element), a.addElement(o.element), a.addElement(o.element), a }(a[e]) : "hover" !== e || "transparent" !== a[e] && !a[e].endsWith(",0)") ? "transparent" === a[e] ? a[e] = am4core.color("rgba(0,0,0,0)") : a[e] = am4core.color(a[e]) : a[e] = am4core.color("rgba(0,0,0,0.001)")) }; return function e(t) { "object" === _typeof(t) && null !== t && Object.keys(t).map((function (o, i) { if ("object" === _typeof(t[o])) e(t[o]); else { if (void 0 !== t.className) return; a(o, t) } })) }(e), e }, iMapsModel.extractCodes = function (e) { for (var t = {}, a = 0; a < e.features.length; a++)t[e.features[a].properties.id] = e.features[a].properties.name; return t }; var iMapsManager = { maps: {}, init: function (e) { this.addMap(e) }, addMap: function (e) { var t, a, o, i, r, n, l, s, d, p, u, c, m, g, h = this, M = iMapsData.data[e], v = M.id, f = document.getElementById(M.container); if (!M.disabled && null !== f) { if (g = f.closest(".map_aspect_ratio"), void 0 !== h.maps[v] && h.maps[v].map.dispose(), window.innerWidth <= 780 && void 0 !== M.visual.paddingTop && "" !== M.visual.paddingTop ? g.style.paddingTop = String(M.visual.paddingTopMobile) + "%" : g.style.paddingTop = String(M.visual.paddingTop) + "%", window.addEventListener("resize", (function () { window.innerWidth <= 780 && void 0 !== M.visual.paddingTop && "" !== M.visual.paddingTop ? g.style.paddingTop = String(M.visual.paddingTopMobile) + "%" : g.style.paddingTop = String(M.visual.paddingTop) + "%" })), M.visual.maxWidth, "" !== M.visual.fontFamily && "inherit" !== M.visual.fontFamily && (f.closest(".map_box").style.fontFamily = M.visual.fontFamily), h.maps[v] = { map: am4core.create(M.container, am4maps.MapChart), series: [], clusterSeries: {}, seriesIndex: {}, seriesById: {}, data: M, allBaseSeries: [], labelSeries: [], baseRegionSeries: {}, groupedBaseRegionSeries: [], backgroundSeries: {} }, (t = h.maps[v].map).readerTitle = "Interactive Map", p = h.maps[v].clusterSeries, t.events.on("ready", (function (e) { var t = new Event("mapready"); f.dispatchEvent(t), h.triggerOnReady(v, M) })), t.events.on("appeared", (function (e) { var t = new Event("mapappeared"); f.dispatchEvent(t), h.triggerOnAppeared(v, M), f.classList.remove("map_loading") })), void 0 !== iMapsData.options && void 0 !== iMapsData.options.locale && iMapsData.options.locale && void 0 !== window["am4lang_" + iMapsData.options.locale] && (t.language.locale = window["am4lang_" + iMapsData.options.locale]), M.zoom && M.zoom.smallMap && h.bool(M.zoom.smallMap) && (t.smallMap = new am4maps.SmallMap), "custom" === M.map || h.bool(M.useGeojson) ? t.geodataSource.url = M.mapURL : (u = iMapsRouter.getVarByName(M.map), t.geodata = window[u]), void 0 !== iMapsData.options && void 0 !== iMapsData.options.lang && iMapsData.options.lang && void 0 !== window["am4geodata_lang_" + iMapsData.options.lang] && (t.geodataNames = window["am4geodata_lang_" + iMapsData.options.lang]), t.projection = new am4maps.projections[M.projection], M.map.startsWith("usaTerritories") && t.events.on("ready", (function (e) { t.projection = new am4maps.projections[M.projection] })), t.fontFamily = M.visual.fontFamily, M.exportMenu && h.bool(M.exportMenu.enable) && (t.exporting.menu = new am4core.ExportMenu, t.exporting.menu.items[0].icon = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiA8Zz4KICA8dGl0bGU+YmFja2dyb3VuZDwvdGl0bGU+CiAgPHJlY3QgeD0iLTEiIHk9Ii0xIiB3aWR0aD0iNS45NDQ3NzMiIGhlaWdodD0iNS45NDQ3NzMiIGlkPSJjYW52YXNfYmFja2dyb3VuZCIgZmlsbD0ibm9uZSIvPgogPC9nPgoKIDxnPgogIDx0aXRsZT5MYXllciAxPC90aXRsZT4KICA8cGF0aCBzdHJva2U9Im51bGwiIGQ9Im0xNC40MjcwMzEsMTUuNzQwNDAxcTAsLTAuMjU3NjQzIC0wLjE4ODI3NCwtMC40NDU5MTd0LTAuNDQ1OTE3LC0wLjE4ODI3NHQtMC40NDU5MTcsMC4xODgyNzR0LTAuMTg4Mjc0LDAuNDQ1OTE3dDAuMTg4Mjc0LDAuNDQ1OTE3dDAuNDQ1OTE3LDAuMTg4Mjc0dDAuNDQ1OTE3LC0wLjE4ODI3NHQwLjE4ODI3NCwtMC40NDU5MTd6bTIuNTM2NzgsMHEwLC0wLjI1NzY0MyAtMC4xODgyNzQsLTAuNDQ1OTE3dC0wLjQ0NTkxNywtMC4xODgyNzR0LTAuNDQ1OTE3LDAuMTg4Mjc0dC0wLjE4ODI3NCwwLjQ0NTkxN3QwLjE4ODI3NCwwLjQ0NTkxN3QwLjQ0NTkxNywwLjE4ODI3NHQwLjQ0NTkxNywtMC4xODgyNzR0MC4xODgyNzQsLTAuNDQ1OTE3em0xLjI2ODM5LC0yLjIxOTY4NWwwLDMuMTcwOTdxMCwwLjM5NjM3NCAtMC4yNzc0NjEsMC42NzM4MzR0LTAuNjczODM0LDAuMjc3NDYxbC0xNC41ODY0NywwcS0wLjM5NjM3NCwwIC0wLjY3MzgzNCwtMC4yNzc0NjF0LTAuMjc3NDYxLC0wLjY3MzgzNGwwLC0zLjE3MDk3cTAsLTAuMzk2Mzc0IDAuMjc3NDYxLC0wLjY3MzgzNHQwLjY3MzgzNCwtMC4yNzc0NjFsNC42MDc4MTYsMGwxLjMzNzc1MSwxLjM0NzY1OXEwLjU3NDczOCwwLjU1NDkyMSAxLjM0NzY1OSwwLjU1NDkyMXQxLjM0NzY1OSwtMC41NTQ5MjFsMS4zNDc2NTksLTEuMzQ3NjU5bDQuNTk3OTA4LDBxMC4zOTYzNzQsMCAwLjY3MzgzNCwwLjI3NzQ2MXQwLjI3NzQ2MSwwLjY3MzgzNGwwLjAwMDAxOCwwem0tMy4yMjA1MjMsLTUuNjM4MzlxMC4xNjg0NTYsMC40MDYyODIgLTAuMTM4NzMsMC42OTM2NTFsLTQuNDM5MzYsNC40MzkzNnEtMC4xNzgzNjUsMC4xODgyNzQgLTAuNDQ1OTE3LDAuMTg4Mjc0dC0wLjQ0NTkxNywtMC4xODgyNzRsLTQuNDM5MzYsLTQuNDM5MzZxLTAuMzA3MTg3LC0wLjI4NzM2OSAtMC4xMzg3MywtMC42OTM2NTFxMC4xNjg0NTYsLTAuMzg2NDY1IDAuNTg0NjQ3LC0wLjM4NjQ2NWwyLjUzNjc4LDBsMCwtNC40MzkzNnEwLC0wLjI1NzY0MyAwLjE4ODI3NCwtMC40NDU5MTd0MC40NDU5MTcsLTAuMTg4Mjc0bDIuNTM2NzgsMHEwLjI1NzY0MywwIDAuNDQ1OTE3LDAuMTg4Mjc0dDAuMTg4Mjc0LDAuNDQ1OTE3bDAsNC40MzkzNmwyLjUzNjc4LDBxMC40MTYxOTEsMCAwLjU4NDY0NywwLjM4NjQ2NXoiIGlkPSJzdmdfMSIvPgogPC9nPgo8L3N2Zz4=", t.exporting.menu.align = M.exportMenu.align ? M.exportMenu.align : "right", t.exporting.menu.verticalAlign = M.exportMenu.verticalAlign ? M.exportMenu.verticalAlign : "top"), M.touchInterface && (h.bool(M.touchInterface.tapToActivate) && (t.tapToActivate = !0, t.tapTimeout = M.touchInterface.tapTimeout), h.bool(M.touchInterface.dragGrip) && (t.dragGrip.disabled = !1, t.dragGrip.autoHideDelay = M.touchInterface.dragGripAutoHideDelay)), t.background.fill = M.visual.backgroundColor, t.background.fillOpacity = M.visual.backgroundOpacity, t.backgroundSeries.mapPolygons.template.focusable = !1, t.background.focusable = !1, t.backgroundSeries.focusable = !1, void 0 !== M.visual.bgImage && void 0 !== M.visual.bgImage.url && "" !== M.visual.bgImage.url && ((c = t.series.push(new am4maps.MapImageSeries)).toBack(), (m = c.mapImages.template.createChild(am4core.Image)).propertyFields.href = "src", m.width = t.width, m.height = t.height, c.data = [{ src: M.visual.bgImage.url }], h.maps[v].backgroundSeries = c), t.exporting.backgroundColor = M.visual.backgroundColor, t.exporting.filePrefix = "interactive_map", t.exporting.useWebFonts = !1, "Orthographic" === M.projection && M.grid && ((d = t.series.push(new am4maps.GraticuleSeries)).mapLines.template.line.stroke = M.grid.color, d.mapLines.template.line.strokeOpacity = 1, d.fitExtent = !1, t.backgroundSeries.mapPolygons.template.polygon.fillOpacity = 1, t.backgroundSeries.mapPolygons.template.polygon.fill = M.grid.projectionBackgroundColor), h.handleZoom(v), M.legend && h.bool(M.legend.enabled) && (t.legend = new am4maps.Legend, "top" === M.legend.position || "bottom" === M.legend.position ? (t.legend.contentAlign = M.legend.align, t.legend.valign = M.legend.position) : (t.legend.position = M.legend.position, t.legend.align = M.legend.position, t.legend.valign = M.legend.valign), void 0 !== M.legend.style && "default" !== M.legend.style && h.setLegendStyle(v, t.legend, M.legend.style), void 0 !== _typeof(M.legend.fill) && (t.legend.labels.template.fill = M.legend.fill), "false" === M.legend.clickable && (t.legend.itemContainers.template.interactionsEnabled = !1), "toggle" === M.legend.clickable && t.legend.itemContainers.template.events.on("hit", (function (e) { iMapsManager.clearSelected(v) })), "select" === M.legend.clickable && (t.legend.itemContainers.template.togglable = !1, t.legend.itemContainers.template.events.on("hit", (function (e) { iMapsManager.clearSelected(v); var t = []; "MapPolygonSeries" === h.getTargetSeriesType(e.target.dataItem.dataContext) && (e.target.dataItem.dataContext.mapPolygons.each((function (e) { e.dataItem.dataContext.madeFromGeoData || (e.setState("active"), e.isActive = !0, e.isHover = !1, t.push(e)) })), h.maps[v].selected = t) })), t.legend.itemContainers.template.events.on("over", (function (e) { var t = h.getTargetSeriesType(e.target.dataItem.dataContext); if (e.target.dataItem.dataContext.zIndex = Number.MAX_VALUE, e.target.dataItem.dataContext.toFront(), "MapImageSeries" === t) e.target.dataItem.dataContext.mapImages.each((function (e) { e.setState("highlight") })); else { if ("MapPolygonSeries" !== t) return; e.target.dataItem.dataContext.mapPolygons.each((function (e) { e.dataItem.dataContext.madeFromGeoData || e.setState("highlight") })) } })), t.legend.itemContainers.template.events.on("out", (function (e) { var t = h.getTargetSeriesType(e.target.dataItem.dataContext); if ("MapImageSeries" === t) e.target.dataItem.dataContext.mapImages.each((function (e) { e.setState("default") })); else { if ("MapPolygonSeries" !== t) return; e.target.dataItem.dataContext.mapPolygons.each((function (e) { e.dataItem.dataContext.madeFromGeoData || e.setState("default") })) } })))), M.customLegend && h.bool(M.customLegend.enabled)) { var b = void 0 !== M.customLegend.type ? M.customLegend.type : "internal"; M.customLegend.data && Array.isArray(M.customLegend.data) && "internal" === b && ((n = new am4maps.Legend).parent = t.chartContainer, n.data = M.customLegend.data, void 0 !== M.customLegend.style && "default" !== M.customLegend.style && h.setLegendStyle(v, n, M.customLegend.style), n.itemContainers.template.clickable = !1, n.itemContainers.template.focusable = !1, n.itemContainers.template.hoverable = !1, n.itemContainers.template.cursorOverStyle = am4core.MouseCursorStyle.default, n.labels.template.truncate = !1, n.labels.template.wrap = !0, "top" === M.customLegend.position || "bottom" === M.customLegend.position ? (n.contentAlign = M.customLegend.align, n.valign = M.customLegend.position) : (n.position = M.customLegend.position, n.align = M.customLegend.position, n.valign = M.customLegend.valign), void 0 !== _typeof(M.customLegend.fill) && (n.labels.template.fill = M.customLegend.fill)) } a = h.pushRegionSeries(v, M), h.maps[v].baseRegionSeries = a, Array.isArray(M.regionGroups) && M.regionGroups.length && (o = h.pushGroupSeries(v, M), h.maps[v].groupedBaseRegionSeries = o), Array.isArray(M.overlay) && M.overlay.length && M.overlay.forEach((function (e) { h.pushSeries(v, e) })), Array.isArray(M.lines) && M.lines.length && h.pushLineSeries(v, M), Array.isArray(M.roundMarkers) && M.roundMarkers.length && (i = h.pushRoundMarkerSeries(v, M), M.clusterMarkers && h.bool(M.clusterMarkers.enabled) && (i.hidden = !0, h.setupClusters(M, v), p[v].zoomLevels[M.clusterMarkers.zoomLevel] = i, p[v].zoomLevels[1] && (p[v].zoomLevels[1].hidden = !1, h.maps[v].allBaseSeries.push(p[v].zoomLevels[1])))), Array.isArray(M.imageMarkers) && M.imageMarkers.length && (l = h.pushImageMarkerSeries(v, M), h.maps[v].allBaseSeries.push(l)), Array.isArray(M.iconMarkers) && M.iconMarkers.length && (s = h.pushIconMarkerSeries(v, M), h.maps[v].allBaseSeries.push(s)), Array.isArray(M.labels) && M.labels.length && (r = h.pushLabelSeries(v, M), h.maps[v].allBaseSeries.push(r)), h.handleInfoBox(v) } }, setLegendStyle: function (e, t, a) { var o = { xsmall: 10, small: 13, regular: 16, large: 19, larger: 23 }[a], i = t.markers.template; t.labels.template.fontSize = o, t.useDefaultMarker = !0, i.width = o, i.height = o }, handleZoom: function (e) { var t = this, a = t.maps[e].map, o = t.maps[e].data, i = (t.maps[e].series, t.maps[e].allBaseSeries, !0), r = !0; if (void 0 !== o.viewport && parseFloat(o.viewport.zoomLevel) >= 1 && (a.homeZoomLevel = parseFloat(o.viewport.zoomLevel), r = !1, a.seriesContainer.resizable = !1, a.seriesContainer.draggable = !1, a.chartContainer.wheelable = !1), void 0 !== o.viewport && o.viewport.homeGeoPoint && 0 !== o.viewport.homeGeoPoint.latitude && 0 !== o.viewport.homeGeoPoint.longitude && (a.homeGeoPoint = o.viewport.homeGeoPoint), void 0 !== o.viewport && o.viewport.offset && ("" !== o.viewport.offset.longitude && "0" !== o.viewport.offset.longitude && (i = !1, a.deltaLongitude = o.viewport.offset.longitude), "" !== o.viewport.offset.latitude && "0" !== o.viewport.offset.latitude && (i = !1, a.deltaLatitude = o.viewport.offset.latitude), i && iMapsManager.latLongOffsetFix(o, a, r)), void 0 === o.viewport && iMapsManager.latLongOffsetFix(o, a, r), void 0 === o.zoom) return void 0 !== o.zoomMaster && t.bool(o.zoomMaster) ? (a.seriesContainer.draggable = !0, a.seriesContainer.resizable = !0, a.zoomControl = new am4maps.ZoomControl, a.zoomControl.focusable = !1, a.zoomControl.exportable = !1, a.zoomControl.children && a.zoomControl.children.values && a.zoomControl.children.values.forEach((function (e) { e.focusable = !1 })), a.zoomControl.align = "right", a.zoomControl.valign = "bottom") : (a.seriesContainer.resizable = !1, a.seriesContainer.draggable = !1), a.seriesContainer.events.disableType("doublehit"), a.chartContainer.background.events.disableType("doublehit"), void (a.chartContainer.wheelable = !1); if ("Orthographic" !== o.projection ? (a.seriesContainer.draggable = !!o.zoom && t.bool(o.zoom.draggable), a.seriesContainer.resizable = !!o.zoom && t.bool(o.zoom.draggable), t.bool(o.zoom.draggable) && (a.seriesContainer.cursorDownStyle = am4core.MouseCursorStyle.grabbing), a.centerMapOnZoomOut = !1, a.maxPanOut = 0, t.bool(o.zoom.enabled) && !t.bool(o.zoom.draggable) && t.bool(o.zoom.mobileResizable) && /Mobi|Android/i.test(navigator.userAgent) && (a.seriesContainer.draggable = !0, a.seriesContainer.resizable = !0)) : (a.seriesContainer.draggable = !1, a.seriesContainer.resizable = !1, a.panBehavior = "rotateLongLat"), t.bool(o.zoom.enabled)) { if (a.chartContainer.wheelable = t.bool(o.zoom.wheelable), t.bool(o.zoom.doubleHitZoom) || (a.seriesContainer.events.disableType("doublehit"), a.chartContainer.background.events.disableType("doublehit")), void 0 !== o.zoom.maxZoomLevel && (a.maxZoomLevel = parseInt(o.zoom.maxZoomLevel)), t.bool(o.zoom.controls) && (a.zoomControl = new am4maps.ZoomControl, a.zoomControl.exportable = !1, a.zoomControl.children && a.zoomControl.children.values && a.zoomControl.children.values.forEach((function (e) { e.focusable = !1 })), a.zoomControl.exportable = !1, a.zoomControl.align = o.zoom.controlsPositions ? o.zoom.controlsPositions.align : "right", a.zoomControl.valign = o.zoom.controlsPositions ? o.zoom.controlsPositions.valign : "bottom", void 0 === o.zoom.homeButton || t.bool(o.zoom.homeButton))) { var n = new am4core.Button; n.focusable = !1, n.events.on("hit", (function () { a.goHome(), iMapsManager.resetDrilldown(e), "undefined" != typeof iMapsActions && void 0 !== iMapsActions.resetActions && iMapsActions.resetActions(e) })), n.icon = new am4core.Sprite, n.padding(7, 5, 7, 5), n.width = 30, n.icon.path = "M16,8 L14,8 L14,16 L10,16 L10,10 L6,10 L6,16 L2,16 L2,8 L0,8 L8,0 L16,8 Z M16,8", n.marginBottom = 3, n.parent = a.zoomControl, n.insertBefore(a.zoomControl.plusButton), a.events.on("inited", (function () { n.deepInvalidate() })) } t.bool(o.zoom.externalControls) && iMapsManager.handleExternalZoom(o.id) } else a.maxZoomLevel = parseFloat(o.viewport.zoomLevel), a.seriesContainer.events.disableType("doublehit"), a.chartContainer.background.events.disableType("doublehit"), a.seriesContainer.draggable = !1, a.seriesContainer.resizable = !1, a.chartContainer.wheelable = !1; if (void 0 !== o.fullScreen && t.bool(o.fullScreen.enabled)) { var l = a.chartContainer.createChild(am4core.Button); l.events.on("hit", (function (e) { var t = document.querySelector("#map_" + e.target.icon.mapID).closest(".map_wrapper"); iMapsManager.toggleFullscreen(t), iMapsManager.isFullScreen = e.target })), l.align = o.fullScreen.align, l.valign = o.fullScreen.valign, l.margin(5, 5, 5, 5), l.padding(5, 0, 5, 0), l.width = 30, l.icon = new am4core.Sprite, l.icon.path = iMapsManager.library.icons.goFullIconPath, l.icon.isFullScreen = !1, l.icon.mapID = e, t.bool(o.fullScreen.mobileOnly) ? l.id = "_fullscreen_button_only_mobile" : l.id = "_fullscreen_button", a.events.on("inited", (function () { l.deepInvalidate() })) } a.events.on("mappositionchanged", (function (e) { })), a.events.on("zoomlevelchanged", (function (a) { var i, r = t.maps[e].clusterSeries, n = a.target.zoomLevel, l = t.bool(o.drillDownOnClick), s = t.maps[e].isDrilling, d = t.maps[e].drilledTo, p = t.filteredMap, u = !1, c = !1; if (void 0 !== o.liveFilter) c = t.bool(o.liveFilter.enabled); l && void 0 !== o.alwaysKeepBase && t.bool(o.alwaysKeepBase) && (u = !0), c && o.liveFilter && t.bool(o.liveFilter.keepBase) && (u = !0), r && Object.keys(r).length && Object.keys(r).forEach((function (a) { l || c ? c && parseInt(p) === parseInt(r[a].overlay) || c && parseInt(p) === parseInt(e) || c && u && !t.bool(r[a].overlay) || s && d && parseInt(d) === parseInt(r[a].overlay) || l && !t.bool(r[a].overlay) && !u && !d || l && !t.bool(r[a].overlay) && u ? (i = t.getClosest(r[a].zoomLevels, n), Object.keys(r[a].zoomLevels).forEach((function (e) { r[a].zoomLevels[e].hide(), parseFloat(e) === i ? r[a].zoomLevels[e].show() : r[a].zoomLevels[e].hide() }))) : Object.keys(r[a].zoomLevels).forEach((function (e) { r[a].zoomLevels[e].hide() })) : (i = t.getClosest(r[a].zoomLevels, n), Object.keys(r[a].zoomLevels).forEach((function (e) { r[a].zoomLevels[e].hide(), parseFloat(e) === i ? r[a].zoomLevels[e].show() : r[a].zoomLevels[e].hide() }))) })) })) }, getClosest: function (e, t) { return Object.keys(e).reduce((function (e, a) { return e = parseInt(e), a = parseInt(a), Math.abs(a - t) < Math.abs(e - t) ? a : e })) }, resetDrilldown: function (e) { var t = this, a = t.maps[e].data, o = t.maps[e].series, i = t.maps[e].allBaseSeries, r = t.maps[e].backgroundSeries; if (t.bool(a.drillDownOnClick)) { for (var n = 0, l = o.length; n < l; n++)o[n].hide(); for (var s = 0, d = i.length; s < d; s++)i[s].show(), r.mapPolygons && r.show(); iMapsManager.maps[e].drilledTo = !1, iMapsManager.maps[e].isDrilling = !1 } }, latLongOffsetFix: function (e, t, a) { var o = e.map;["russiaLow", "russiaHigh", "russiaCrimeaLow", "russiaCrimeaHigh", "region/world/asiaLow", "region/world/asiaHigh", "region/world/asiaUltra", "region/world/asiaIndiaLow", "region/world/asiaIndiaHigh", "region/world/asiaIndiaUltra"].includes(o) && e.exclude && !e.exclude.includes("RU") && (t.deltaLongitude = -100, a && (t.homeZoomLevel = 1.5)), "newZealandLow" !== o && "newZealandHigh" != o || (t.deltaLongitude = 20) }, pushGroupSeries: function (e, t) { var a, o = []; return t.regionGroups.forEach((function (i) { var r = {}, n = i.map((function (e) { return e.id })); (r = Object.assign({}, t)).regionsGroupHover = !0, r.regions = i, r.include = n, a = iMapsManager.pushRegionSeries(e, r, !0), o.push(a) })), o }, pushSeries: function (e, t) { var a, o, i, r, n, l, s = this, d = s.maps[e].clusterSeries, p = s.maps[e].data, u = s.maps[e].seriesIndex, c = s.maps[e].seriesById, m = s.bool(s.maps[e].data.drillDownOnClick), g = iMapsRouter.getCleanMapName(t.map, t.id), h = !1; !1 !== g && void 0 !== t.id && (c[t.id] = [], void 0 !== p.liveFilter && parseInt(p.liveFilter.default) !== p.id && (h = parseInt(p.liveFilter.default), s.filteredMap = h), Array.isArray(s.maps[e].seriesIndex[t.map]) || (s.maps[e].seriesIndex[g] = []), Array.isArray(t.regions) || (t.regions = []), void 0 === p.allowEmpty && (p.allowEmpty = 0), (t.regions.length || s.bool(p.allowEmpty)) && (s.bool(p.allowEmpty) || (t.include = [], t.regions.forEach((function (e, a) { t.include.push(e.id), isNaN(e.id) || t.include.push(parseInt(e.id)) }))), a = iMapsManager.pushRegionSeries(e, t), u[g].push(a), c[t.id].push(a), m && (a.hidden = !0, a.mapID = t.id), p.liveFilter && s.bool(p.liveFilter.enabled) && h && h !== t.id && (a.hidden = !0)), Array.isArray(t.regionGroups) && t.regionGroups.length && s.pushGroupSeries(e, t).forEach((function (e) { u[g].push(e), c[t.id].push(e), m && (e.hidden = !0, e.mapID = t.id), p.liveFilter && s.bool(p.liveFilter.enabled) && h && h !== t.id && (e.hidden = !0) })), Array.isArray(t.lines) && t.lines.length && (r = iMapsManager.pushLineSeries(e, t), u[g].push(r), c[t.id].push(r), m && (r.hidden = !0), p.liveFilter && s.bool(p.liveFilter.enabled) && h && h !== t.id && (r.hidden = !0)), Array.isArray(t.roundMarkers) && t.roundMarkers.length && (o = iMapsManager.pushRoundMarkerSeries(e, t), u[g].push(o), c[t.id].push(o), m && (o.hidden = !0, o.mapID = t.id), t.clusterMarkers && s.bool(t.clusterMarkers.enabled) && (o.hidden = !0, s.setupClusters(t, e, t.id), d[t.id].zoomLevels[t.clusterMarkers.zoomLevel] = o, !m && d[t.id].zoomLevels[1] && (d[t.id].zoomLevels[1].hidden = !1, p.liveFilter && s.bool(p.liveFilter.enabled) && h && h !== t.id && (d[t.id].zoomLevels[1].hidden = !0))), p.liveFilter && s.bool(p.liveFilter.enabled) && h && h !== t.id && (o.hidden = !0)), Array.isArray(t.iconMarkers) && t.iconMarkers.length && (n = iMapsManager.pushIconMarkerSeries(e, t), u[g].push(n), c[t.id].push(n), m && (n.hidden = !0), p.liveFilter && s.bool(p.liveFilter.enabled) && h && h !== t.id && (n.hidden = !0)), Array.isArray(t.imageMarkers) && t.imageMarkers.length && (l = iMapsManager.pushImageMarkerSeries(e, t), u[g].push(l), c[t.id].push(l), m && (l.hidden = !0), p.liveFilter && s.bool(p.liveFilter.enabled) && h && h !== t.id && (l.hidden = !0)), Array.isArray(t.labels) && t.labels.length && (i = iMapsManager.pushLabelSeries(e, t), u[g].push(i), c[t.id].push(i), m && (i.hidden = !0), p.liveFilter && s.bool(p.liveFilter.enabled) && h && h !== t.id && (i.hidden = !0))) }, pushRegionSeries: function (e, t, a) { var o, i, r, n, l = this, s = l.maps[e].map, d = t.tooltip || {}; a = a || !1; if (t = t || {}, o = s.series.push(new am4maps.MapPolygonSeries), "custom" === t.map || l.bool(t.useGeojson) ? o.geodataSource.url = t.mapURL : (n = iMapsRouter.getVarByName(t.map), o.geodata = window[n]), o.name = t.regionLegend && "" !== t.regionLegend.title ? t.regionLegend.title : t.title, o.hiddenInLegend = !t.regionLegend || !l.bool(t.regionLegend.enabled), t.regionLegend && "onlyGroups" === t.regionLegend.enabled && a && (o.hiddenInLegend = !1), t.regionLegend && "onlyGroups" === t.regionLegend.enabled && !a && (o.hiddenInLegend = !0), t.regionLegend && "ignoreGroups" === t.regionLegend.enabled && a && (o.hiddenInLegend = !0), t.regionLegend && "ignoreGroups" === t.regionLegend.enabled && !a && (o.hiddenInLegend = !1), e === t.id && (void 0 === l.maps[e].baseSeries && (l.maps[e].baseSeries = []), l.maps[e].baseSeries.push(o), l.maps[e].allBaseSeries.push(o)), o.useGeodata = !0, Array.isArray(t.exclude) && t.exclude.length && (o.exclude = t.exclude), Array.isArray(t.include) && t.include.length && (o.include = t.include), t.heatMapRegions && l.bool(t.heatMapRegions.enabled) && l.setupHeatMap(o, e, t), o.data = t.regions, a && (o.groupHover = !0), i = o.mapPolygons.template, l.setupTooltip(e, o, t), void 0 !== t.regionsTooltipTemplate && "" !== t.regionsTooltipTemplate.trim() ? (i.tooltipText = t.regionsTooltipTemplate, i.tooltipHTML = t.regionsTooltipTemplate) : (i.tooltipText = d.template ? d.template : "{tooltipContent}", i.tooltipHTML = d.template ? d.template : "{tooltipContent}"), i.adapter.add("tooltipHTML", (function (e, t, a) { return "object" === _typeof(t.dataItem.dataContext) && void 0 !== d.onlyWithData && l.bool(d.onlyWithData) && !0 === t.dataItem.dataContext.madeFromGeoData ? (t.tooltip.tooltipText = void 0, t.tooltip.tooltipHTML = void 0, "") : "" === e ? e : e.replace(/\\/g, "") })), i.adapter.add("tooltipText", (function (e, t, a) { return "object" === _typeof(t.dataItem.dataContext) && void 0 !== d.onlyWithData && l.bool(d.onlyWithData) && !0 === t.dataItem.dataContext.madeFromGeoData ? (t.tooltip.tooltipText = void 0, t.tooltip.tooltipHTML = void 0, "") : "" === e ? e : e.replace(/\\/g, "") })), o.fill = t.regionDefaults.fill, i.fill = t.regionDefaults.inactiveColor, i.stroke = t.visual.borderColor, i.strokeWidth = t.visual.borderWidth, i.propertyFields.fill = "fill", a || void 0 !== t.heatMapRegions && l.bool(t.heatMapRegions.enabled) && l.bool(t.heatMapRegions.noHover) || (i.states.create("hover").propertyFields.fill = "hover"), t.regionActiveState && l.bool(t.regionActiveState.enabled) && (r = i.states.create("active"), "custom" === t.regionActiveState.source ? r.properties.fill = t.regionActiveState.fill : r.propertyFields.fill = "hover"), i.states.create("highlight").propertyFields.fill = "hover", a ? (i.events.on("out", (function (t) { l.groupHoverOut(e, t) })), i.events.on("over", (function (t) { l.groupHover(e, t), o.toFront(), void 0 !== o.autoLabelSeries && o.autoLabelSeries.toFront() })), i.events.on("hit", (function (t) { l.groupHit(e, t) }))) : (i.events.on("hit", (function (t) { l.singleHit(e, t) })), i.events.on("over", (function (t) { l.setupHoverEvents(e, t) }))), i.focusable = !1, i.events.on("hit", (function (t) { l.setupHitEvents(e, t) })), l.bool(t.smallMap) && s.smallMap.series.push(o), t.regionLabels && l.bool(t.regionLabels.source)) { o.calculateVisualCenter = !0; var p = s.series.push(new am4maps.MapImageSeries), u = p.mapImages.template.createChild(am4core.Label), c = "undefined" != typeof igmLabelsBackground && igmLabelsBackground; "object" == typeof c && (u.background = new am4core.RoundedRectangle, u.background.cornerRadius(...c.cornerRadius), u.background.fill = am4core.color(c.color), u.padding(...c.padding), u.background.stroke = am4core.color(c.stroke)), l.maps[e].labelSeries.push(p), o.autoLabelSeries = p, u.horizontalCenter = t.regionLabels.horizontalCenter, u.verticalCenter = t.regionLabels.verticalCenter, u.fontSize = t.regionLabels.fontSize, u.fill = t.regionLabels.fill, u.fontFamily = t.regionLabels.fontFamily ? t.regionLabels.fontFamily : "inherit", u.fontWeight = t.regionLabels.fontWeight ? t.regionLabels.fontWeight : "normal", t.regionLabels.mobileFontSize && 100 !== parseInt(t.regionLabels.mobileFontSize) && window.innerWidth <= 780 && (u.fontSize = parseInt(u.fontSize) * parseInt(t.regionLabels.mobileFontSize) / 100, u.size = u.fontSize), o.events.on("hidden", (function (e) { p.hide() })), o.events.on("shown", (function (e) { p.show() })), u.events.on("hit", (function (e) { o.getPolygonById(e.target.parent.LabelForRegion).dispatchImmediately("hit") })), u.events.on("over", (function (t) { iMapsManager.hover(e, t.target.parent.LabelForRegion, !1) })), u.events.on("out", (function (t) { iMapsManager.clearHovered(e, t.target.parent.LabelForRegion) })), l.setupTooltip(e, p, t, u), u.interactionsEnabled = !0, u.nonScaling = l.bool(t.regionLabels.nonScaling), p.hiddenInLegend = !0, o.events.on("inited", (function () { o.hidden && (p.hide(), p.hidden = !0) })), l.bool(t.admin) && (u.draggable = !0, u.cursorOverStyle = am4core.MouseCursorStyle.grab, u.events.on("dragstop", (function (e) { var a = am4core.utils.spritePointToSvg({ x: 0, y: 0 }, e.target); a = am4core.utils.spritePointToSvg({ x: 0 - e.target.maxLeft, y: 0 - e.target.maxTop }, e.target); var o, i = s.svgPointToGeo(a), r = document.querySelector("[data-depend-id=" + t.regionLabelCustomCoordinates + "]"); r && ((o = iMapsManager.isJSON(r.value) ? JSON.parse(r.value) : {})[e.target.parent.LabelForRegion] = { latitude: i.latitude, longitude: i.longitude }, r.value = JSON.stringify(o)); s.seriesContainer.draggable = l.bool(t.zoom.draggable), e.target.cursorOverStyle = am4core.MouseCursorStyle.grab })), u.events.on("down", (function (e) { s.seriesContainer.draggable = !1, e.target.cursorOverStyle = am4core.MouseCursorStyle.grabbing }))); var m = !!l.isJSON(t.regionLabels.regionLabelCustomCoordinates) && JSON.parse(t.regionLabels.regionLabelCustomCoordinates); let a = "inited"; "custom" === t.map && (a = "datavalidated"), o.events.on(a, (function () { o.mapPolygons.each((function (e) { if ("custom" === t.map || void 0 !== e.visualLatitude) { var a, o = p.mapImages.create(); l.bool(t.regionLabels.activeOnly) && e.dataItem.dataContext && void 0 === e.dataItem.dataContext.tooltipContent || e.dataItem.dataContext.id.includes(",") || ("code" === t.regionLabels.source && (a = e.dataItem.dataContext.id.split("-").pop()), "{name}" === t.regionLabels.source && (a = e.dataItem.dataContext.name), "{id}" === t.regionLabels.source && (a = e.dataItem.dataContext.id), "custom" === t.regionLabels.source && void 0 !== t.regionLabels.customSource && (a = e.dataItem.dataContext.autoLabel), o.LabelForRegion = e.dataItem.dataContext.id, void 0 !== e.dataItem.dataContext.originalID && (o.groupRegion = e.dataItem.dataContext.originalID), o.tooltipDataItem = e.tooltipDataItem, o.tooltip = e.tooltip, o.tooltipHTML = e.tooltipHTML, o.tooltipPosition = l.bool(t.tooltip.fixed) ? "fixed" : "pointer", e.dataItem.dataContext.action && "none" !== e.dataItem.dataContext.action && (o.cursorOverStyle = am4core.MouseCursorStyle.pointer), m && m.hasOwnProperty(e.dataItem.dataContext.id) ? (o.latitude = m[e.dataItem.dataContext.id].latitude, o.longitude = m[e.dataItem.dataContext.id].longitude) : e.visualLatitude && (o.latitude = e.visualLatitude, o.longitude = e.visualLongitude), o.children.getIndex(0) && (o.children.getIndex(0).text = a)) } })) })) } return void 0 !== t.externalDropdown && l.bool(t.externalDropdown.enabled) && (o.calculateVisualCenter = !0), l.maps[e].series.push(o), o }, pushRoundMarkerSeries: function (e, t) { var a, o, i, r, n, l, s, d = this, p = d.maps[e].map; if (Array.isArray(t.roundMarkers) && t.roundMarkers.length) { if ((a = p.series.push(new am4maps.MapImageSeries)).name = t.roundMarkersLegend && "" !== t.roundMarkersLegend.title ? t.roundMarkersLegend.title : t.title, a.hiddenInLegend = !!t.roundMarkersLegend && !d.bool(t.roundMarkersLegend.enabled), i = (o = a.mapImages.template).createChild(am4core.Circle), d.setupTooltip(e, a, t, i), o.focusable = !1, i.radius = t.markerDefaults.radius, i.fill = t.markerDefaults.fill, i.stroke = am4core.color("#FFFFFF"), i.strokeWidth = 1, i.nonScaling = "undefined" == typeof igmRoundMarkersNonScaling || igmRoundMarkersNonScaling, (r = o.createChild(am4core.Label)).text = "{label}", r.fill = am4core.color("#fff"), r.verticalCenter = "middle", r.horizontalCenter = "middle", r.nonScaling = "undefined" == typeof igmRoundMarkersNonScaling || igmRoundMarkersNonScaling, r.fontSize = "undefined" != typeof igmClusterMarkerFontSize ? igmClusterMarkerFontSize : t.markerDefaults.radius, r.clickable = !1, r.focusable = !1, r.hoverable = !1, void 0 !== t.roundMarkersTooltipTemplate && "" !== t.roundMarkersTooltipTemplate.trim() ? (o.tooltipText = t.roundMarkersTooltipTemplate, o.tooltipHTML = t.roundMarkersTooltipTemplate) : (o.tooltipText = t.tooltip && t.tooltip.template ? t.tooltip.template : "{tooltipContent}", o.tooltipHTML = t.tooltip && t.tooltip.template ? t.tooltip.template : "{tooltipContent}"), o.propertyFields.tooltipText = "tooltipTemplate", o.propertyFields.tooltipHTML = "tooltipTemplate", t.heatMapMarkers && d.bool(t.heatMapMarkers.enabled) ? (d.setupHeatMap(a, e, t), void 0 !== t.heatMapMarkers.type && "range" === t.heatMapMarkers.type && (i.propertyFields.radius = "radius", i.propertyFields.fill = "fill")) : (i.propertyFields.radius = "radius", i.propertyFields.fill = "fill"), i.propertyFields.userClassName = "customClass", o.propertyFields.radius = "radius", o.propertyFields.latitude = "latitude", o.propertyFields.longitude = "longitude", o.setStateOnChildren = !0, (s = i.states.create("hover")).properties.fill = t.hover, s.propertyFields.fill = "hover", (n = i.states.create("active")).properties.fill = t.hover, n.propertyFields.fill = "hover", (l = i.states.create("highlight")).properties.fill = t.hover, l.propertyFields.fill = "hover", t.roundMarkerLabels && d.bool(t.roundMarkerLabels.enabled)) { o.states.create("hover"); var u = o.createChild(am4core.Label), c = void 0 !== t.roundMarkerLabels.position && "" !== t.roundMarkerLabels.position ? t.roundMarkerLabels.position : "bottom"; u.text = void 0 !== t.roundMarkerLabels.source && "" !== t.roundMarkerLabels.source ? t.roundMarkerLabels.source : "{name}", u.fontSize = t.roundMarkerLabels.fontSize, u.setStateOnChildren = !0, t.roundMarkerLabels.mobileSize && 100 !== parseInt(t.roundMarkerLabels.mobileSize) && window.innerWidth <= 780 && (u.fontSize = parseInt(t.roundMarkerLabels.fontSize) * parseInt(t.roundMarkerLabels.mobileSize) / 100), u.nonScaling = "undefined" == typeof igmRoundMarkersNonScaling || igmRoundMarkersNonScaling, u.fill = t.roundMarkerLabels.fill, u.clickable = !1, u.focusable = !1, u.hoverable = !1, u.padding(0, 0, 0, 0), "bottom" === c && (u.horizontalCenter = "middle", u.verticalCenter = "top", u.propertyFields.paddingTop = "radius"), "top" === c && (u.horizontalCenter = "middle", u.verticalCenter = "bottom", u.propertyFields.paddingBottom = "radius"), "right" === c && (u.horizontalCenter = "left", u.verticalCenter = "middle", u.propertyFields.paddingLeft = "radius"), "left" === c && (u.horizontalCenter = "right", u.verticalCenter = "middle", u.propertyFields.paddingRight = "radius") } a.zIndex = Number.MAX_VALUE, a.toFront(), a.data = t.roundMarkers, a.fill = t.markerDefaults.fill, o.events.on("hit", (function (t) { d.singleHit(e, t), d.setupHitEvents(e, t) })), o.events.on("over", (function (t) { d.setupHoverEvents(e, t) })) } return t.zoom && t.zoom.smallMap && d.bool(t.zoom.smallMap) && p.smallMap.series.push(a), d.maps[e].series.push(a), e === t.id && (t.clusterMarkers && !d.bool(t.clusterMarkers.enabled) ? d.maps[e].allBaseSeries.push(a) : t.clusterMarkers && d.bool(t.clusterMarkers.enabled)), a }, pushImageMarkerSeries: function (e, t) { var a, o, i, r = this, n = r.maps[e].map; return Array.isArray(t.imageMarkers) && t.imageMarkers.length && ((a = n.series.push(new am4maps.MapImageSeries)).name = t.imageMarkersLegend && "" !== t.imageMarkersLegend.title ? t.imageMarkersLegend.title : t.title, a.hiddenInLegend = !!t.imageMarkersLegend && !r.bool(t.imageMarkersLegend.enabled), (o = a.mapImages.template).focusable = !1, (i = o.createChild(am4core.Image)).propertyFields.href = "href", i.propertyFields.width = "size", i.propertyFields.height = "size", i.propertyFields.userClassName = "customClass", i.propertyFields.horizontalCenter = "horizontalCenter", i.propertyFields.verticalCenter = "verticalCenter", i.nonScaling = !0, i.propertyFields.nonScaling = "nonScaling", r.setupTooltip(e, a, t, i), void 0 !== t.imageMarkersTooltipTemplate && "" !== t.imageMarkersTooltipTemplate.trim() ? (i.tooltipText = t.imageMarkersTooltipTemplate, i.tooltipHTML = t.imageMarkersTooltipTemplate) : (i.tooltipText = t.tooltip.template ? t.tooltip.template : "{tooltipContent}", i.tooltipHTML = t.tooltip.template ? t.tooltip.template : "{tooltipContent}"), o.propertyFields.latitude = "latitude", o.propertyFields.longitude = "longitude", a.zIndex = Number.MAX_VALUE, a.toFront(), a.data = t.imageMarkers, o.events.on("hit", (function (t) { r.singleHit(e, t), r.setupHitEvents(e, t) })), o.events.on("over", (function (t) { r.setupHoverEvents(e, t) }))), t.zoom && t.zoom.smallMap && r.bool(t.zoom.smallMap) && n.smallMap.series.push(a), r.maps[e].series.push(a), a }, pushIconMarkerSeries: function (e, t) { var a, o, i, r, n, l = this, s = l.maps[e].map; if (Array.isArray(t.iconMarkers) && t.iconMarkers.length) { if ((a = s.series.push(new am4maps.MapImageSeries)).hiddenInLegend = !!t.iconMarkersLegend && !l.bool(t.iconMarkersLegend.enabled), a.name = t.iconMarkersLegend && "" !== t.iconMarkersLegend.title ? t.iconMarkersLegend.title : t.title, (o = a.mapImages.template).nonScaling = !0, o.setStateOnChildren = !0, o.focusable = !1, o.states.create("hover"), (i = o.createChild(am4core.Sprite)).propertyFields.scale = "scale", i.propertyFields.path = "path", i.propertyFields.rotation = "rotation", i.propertyFields.horizontalCenter = "horizontalCenter", i.propertyFields.verticalCenter = "verticalCenter", i.propertyFields.fill = "fill", a.fill = t.iconMarkerDefaults.fill, (n = o.createChild(am4core.Sprite)).propertyFields.scale = "scale", n.path = "M-10,0a10,10 0 1,0 20,0a10,10 0 1,0 -20,0", n.opacity = 0, n.propertyFields.horizontalCenter = "horizontalCenter", n.propertyFields.verticalCenter = "verticalCenter", o.tooltipText = t.tooltip.template ? t.tooltip.template : "{tooltipContent}", o.tooltipHTML = t.tooltip.template ? t.tooltip.template : "{tooltipContent}", l.setupTooltip(e, a, t, n), t.iconMarkerLabels && l.bool(t.iconMarkerLabels.enabled)) { var d = o.createChild(am4core.Label); d.text = void 0 !== t.iconMarkerLabels.source && "" !== t.iconMarkerLabels.source ? t.iconMarkerLabels.source : "{name}", d.horizontalCenter = "middle", d.verticalCenter = "top", d.fontSize = t.iconMarkerLabels.fontSize, d.nonScaling = !1, d.fill = t.iconMarkerLabels.fill, d.clickable = !1, d.focusable = !1, d.hoverable = !1, d.padding(0, 0, 0, 0), d.adapter.add("dy", (function (e, t) { var a, o = t.parent.children.getIndex(0), i = o.scale; return "middle" === o.verticalCenter && (a = 10 * i), "bottom" === o.verticalCenter && (a = 0), "top" === o.verticalCenter && (a = 20 * i + 5), a })) } i.states.create("hover").propertyFields.fill = "hover", i.states.create("active").propertyFields.fill = "hover", (r = i.states.create("highlight")).properties.fill = t.hover, r.propertyFields.fill = "hover", o.propertyFields.latitude = "latitude", o.propertyFields.longitude = "longitude", a.zIndex = Number.MAX_VALUE, a.toFront(), a.data = t.iconMarkers, o.events.on("hit", (function (t) { l.singleHit(e, t), l.setupHitEvents(e, t) })), o.events.on("over", (function (t) { l.setupHoverEvents(e, t) })) } return t.zoom && t.zoom.smallMap && l.bool(t.zoom.smallMap) && s.smallMap.series.push(a), l.maps[e].series.push(a), a }, pushLineSeries: function (e, t) { var a = this, o = a.maps[e].map, i = {}, r = []; return Array.isArray(t.lines) && t.lines.length && ("Orthographic" === t.projection ? (i = o.series.push(new am4maps.MapLineSeries)).mapLines.template.propertyFields.shortestDistance = !0 : ((i = o.series.push(new am4maps.MapArcSeries)).mapLines.template.line.propertyFields.controlPointDistance = "curvature", i.mapLines.template.line.controlPointPosition = .5), i.name = t.linesLegend && "" !== t.linesLegend.title ? t.linesLegend.title : t.title, i.hiddenInLegend = !!t.linesLegend && !a.bool(t.linesLegend.enabled), i.mapLines.template.nonScalingStroke = !0, i.mapLines.template.propertyFields.strokeWidth = "strokeWidth", i.mapLines.template.propertyFields.strokeDasharray = "strokeDash", i.mapLines.template.propertyFields.stroke = "stroke", i.mapLines.template.arrow.position = 1, i.mapLines.template.arrow.nonScaling = !0, i.mapLines.template.arrow.propertyFields.fill = "stroke", i.mapLines.template.arrow.horizontalCenter = "middle", i.mapLines.template.arrow.propertyFields.disabled = "arrowDisabled", t.lines.forEach((function (e, t) { e.multiGeoLine = [e.multiGeoLine], r.push(e) })), i.mapLines.template.events.on("hit", (function (t) { a.singleHit(e, t), a.setupHitEvents(e, t) })), i.mapLines.template.events.on("over", (function (t) { a.setupHoverEvents(e, t) })), i.data = r, i.zIndex = Number.MAX_VALUE - 1, i.toFront(), t.zoom && t.zoom.smallMap && a.bool(t.zoom.smallMap) && o.smallMap.series.push(i), a.maps[e].series.push(i), i.fill = t.lineDefaults.stroke, e === t.id && a.maps[e].allBaseSeries.push(i)), i }, pushLabelSeries: function (e, t) { var a, o, i, r, n, l, s = this, d = s.maps[e].map, p = !1; return Array.isArray(t.labels) && t.labels.length && ((a = d.series.push(new am4maps.MapImageSeries)).name = t.labelsLegend && "" !== t.labelsLegend.title ? t.labelsLegend.title : t.title, a.hiddenInLegend = !!t.labelsLegend && !s.bool(t.labelsLegend.enabled), (o = a.mapImages.template).setStateOnChildren = !0, (i = o.createChild(am4core.Label)).text = "{id}", i.nonScaling = "undefined" == typeof igmLabelsNonScaling || igmLabelsNonScaling, t.labelStyle && (i.fontFamily = t.labelStyle.fontFamily, i.fontWeight = t.labelStyle.fontWeight), i.horizontalCenter = t.labelPosition.horizontalCenter, i.verticalCenter = t.labelPosition.verticalCenter, i.propertyFields.fill = "fill", i.propertyFields.fontSize = "fontSize", s.setupTooltip(e, a, t, i), void 0 !== t.labelsTooltipTemplate && "" !== t.labelsTooltipTemplate.trim() ? (i.tooltipText = t.labelsTooltipTemplate, i.tooltipHTML = t.labelsTooltipTemplate) : (i.tooltipText = t.tooltip && t.tooltip.template ? t.tooltip.template : "{tooltipContent}", i.tooltipHTML = t.tooltip && t.tooltip.template ? t.tooltip.template : "{tooltipContent}"), o.propertyFields.latitude = "latitude", o.propertyFields.longitude = "longitude", o.propertyFields.fill = "fill", o.propertyFields.fontSize = "fontSize", i.propertyFields.verticalCenter = "verticalCenter", i.propertyFields.horizontalCenter = "horizontalCenter", "object" == typeof (p = "undefined" != typeof igmLabelsBackground && igmLabelsBackground) && (i.background = new am4core.RoundedRectangle, i.background.cornerRadius(...p.cornerRadius), i.background.fill = am4core.color(p.color), i.padding(...p.padding), i.background.stroke = am4core.color(p.stroke)), (l = i.states.create("hover")).properties.fill = t.hover, l.propertyFields.fill = "hover", (r = i.states.create("active")).properties.fill = t.hover, r.propertyFields.fill = "hover", (n = i.states.create("highlight")).properties.fill = t.hover, n.propertyFields.fill = "hover", a.zIndex = Number.MAX_VALUE, a.toFront(), a.data = t.labels, a.fill = t.labelDefaults.fill, o.events.on("hit", (function (t) { s.singleHit(e, t), s.setupHitEvents(e, t) })), o.events.on("over", (function (t) { s.setupHoverEvents(e, t) }))), t.zoom && t.zoom.smallMap && s.bool(t.zoom.smallMap) && d.smallMap.series.push(a), s.maps[e].labelSeries.push(a), s.maps[e].series.push(a), e === t.id && s.maps[e].allBaseSeries.push(a), a }, setupTooltip: function (e, t, a, o) { var i, r = this, n = a.tooltip, l = r.maps[e].map; return o = o || !1, void 0 === a.tooltip ? (t.tooltip.disabled = !1, t.tooltip.getFillFromObject = !1, t.tooltip.getStrokeFromObject = !1, t.tooltip.label.fill = am4core.color("#000000"), void (t.tooltip.background.fill = am4core.color("#FFFFFF"))) : r.bool(a.tooltip.enabled) ? void 0 !== _typeof(a.tooltip.disableMobile) && r.bool(a.tooltip.disableMobile) && window.innerWidth <= 780 ? (t.tooltip.disabled = !0, t) : (t.tooltip.label.interactionsEnabled = r.bool(n.fixed), t.tooltip.background.cornerRadius = n.cornerRadius, n.pointerLength && (t.tooltip.background.pointerLength = parseInt(n.pointerLength)), t.tooltip.getFillFromObject = !1, t.tooltip.getStrokeFromObject = !1, t.tooltip.label.fill = n.color, t.tooltip.background.fill = n.backgroundColor, t.tooltip.fontFamily = n.fontFamily, t.tooltip.fontSize = n.fontSize, t.tooltip.fontWeight = n.fontWeight, t.tooltip.animationDuration = 0, "undefined" !== n.borderColor && (t.tooltip.background.stroke = n.borderColor, t.tooltip.background.strokeWidth = n.borderWidth), void 0 !== n.maxWidth && "" !== n.maxWidth && (t.tooltip.maxWidth = parseInt(n.maxWidth), t.tooltip.contentWidth = parseInt(n.maxWidth)), t.tooltip.label.wrap = !0, void 0 !== n.customShadow && r.bool(n.customShadow) && ((i = t.tooltip.background.filters.getIndex(0)).dx = n.customShadowOpts.dx, i.dy = n.customShadowOpts.dy, i.blur = n.customShadowOpts.blur, i.opacity = n.customShadowOpts.opacity, i.color = n.customShadowOpts.color), r.bool(n.fixed) && ("always" === n.showTooltipOn && (t.tooltip.ignoreBounds = !0, t.tooltip.pointerOrientation = function (e) { switch (e) { case "horizontal": return "horizontal"; case "below": return "up"; case "above": return "down"; case "right": return "left"; case "left": return "right"; default: return "vertical" } }(n.toolTipPosition)), t.mapPolygons ? (t.calculateVisualCenter = !0, t.mapPolygons.template.tooltipPosition = "fixed", t.groupHover && (t.tooltip.getFillFromObject = !1, t.tooltip.events.on("over", (function (e) { e.target.dataItem.component.mapPolygons.each((function (e) { e.setState("highlight") })) })), t.tooltip.events.on("out", (function (e) { e.target.dataItem.component.mapPolygons.each((function (e) { e.setState("default") })) }))), t.tooltip.keepTargetHover = !0, n.showTooltipOn && (t.mapPolygons.template.showTooltipOn = n.showTooltipOn, "hit" === n.showTooltipOn && (t.tooltip.keepTargetHover = !1))) : (t.mapImages.template.tooltipPosition = "fixed", t.tooltip.keepTargetHover = !0, n.showTooltipOn && o && (t.mapImages.template.showTooltipOn = n.showTooltipOn, o.showTooltipOn = n.showTooltipOn, "hit" === n.showTooltipOn && (t.tooltip.keepTargetHover = !1), "always" === n.showTooltipOn && (l.events.on("appeared", (function () { o.clones.each((function (e) { e.showTooltip() })) })), l.events.on("mappositionchanged", (function (e) { o.clones.each((function (e) { e.showTooltip() })) })))))), t) : (t.tooltip.disabled = !0, t) }, prepareURL: function (e) { if ("string" != typeof e) return e; var t; (e = e.replace(/&amp;/gi, "&")).replace(/&#(\d+);/g, (function (e, t) { return String.fromCharCode(t) })); try { t = new URL(e) } catch (e) { t = !1 } return t && ![null, "http:", "https:", "mailto:", "tel:"].includes(t.protocol) ? (console.log("URL protocol not allowed"), "") : e }, setupHitEvents: function (e, t) { var a, o, i, r, n = this, l = n.maps[e].data, s = n.maps[e].map, d = n.getTargetSeriesType(t.target), p = n.maps[e].clicked || !1, u = l.clusterMarkers ? parseFloat(l.clusterMarkers.zoomLevel) : 1, c = document.getElementById(l.container), m = new Event("mapEntryClicked"); if (a = t.target.isLabels ? t.target.dataItems.first.dataContext : t.target.dataItem.dataContext, s.lastClickedEntry === t.target && !n.maps[e].clicked) return n.maps[e].clicked = a, void setTimeout((function () { s.lastClickedEntry = null, n.maps[e].clicked = null }), 1e3); if (n.maps[e].clicked = null, s.lastClickedEntry = t.target, c.dispatchEvent(m), "MapImage" === d && a.cluster && (u - parseInt(s.zoomLevel) > 5 && (u = parseInt(s.zoomLevel) + u / 2), t.target.series.chart.zoomToMapObject(t.target, u)), console.log(a), l.zoom && n.bool(l.zoom.enabled) && n.bool(l.zoom.zoomOnClick) && (t.zooming = !0, n.zoomToRegion(t, e)), "MapPolygon" === d && n.bool(l.drillDownOnClick) && n.drillDown(e, t), a.madeFromGeoData) return r = "igm_inactive_" + l.id, void ("function" == typeof window[r] && (l = window[r](l))); if ("MapImage" === d && void 0 !== _typeof(a.action) && "igm_display_map" === a.action && Array.isArray(iMapsManager.maps[e].seriesById[parseInt(a.content)]) && (i = iMapsManager.maps[e].seriesById[parseInt(a.content)], n.drillTo(e, t, i, !0)), !n.bool(l.admin)) { if (l.tooltip && void 0 !== _typeof(l.tooltip.enabled) && n.bool(l.tooltip.enabled) && void 0 !== _typeof(l.tooltip.disableMobile) && !n.bool(l.tooltip.disableMobile) && void 0 !== _typeof(l.tooltip.holdAction) && n.bool(l.tooltip.holdAction) && window.innerWidth <= 780) { if (!p || p !== a) return console.log("Holding action for second tap."), void (n.maps[e].clicked = a); n.maps[e].clicked = p !== a && a } "none" !== a.action && ("open_url" !== a.action && "open_url_new" !== a.action || (a.content = iMapsManager.prepareURL(a.content)), "open_url" === a.action && "" !== a.content ? document.location = a.content : "open_url_new" === a.action && "" !== a.content ? window.open(a.content) : a.action && a.action.includes("custom") ? (o = a.action + "_" + a.mapID, void 0 !== window[o] && window[o](a)) : void 0 !== window[a.action] && window[a.action](e, a)) } }, zoomToMap: function (e, t, a) { var o = this, i = !1; if (t.forEach((function (e) { "MapPolygonSeries" != o.getTargetSeriesType(e) || (i = e) })), i) return e.target.series.chart.zoomToRectangle(i.north, i.east, i.south, i.west, 1, !0), void console.log("zoomed to specific map"); console.log("failed to zoom to specific map") }, zoomToRegion: function (e, t) { var a, o, i = this, r = i.getTargetSeriesType(e.target), n = i.maps[t].data; i.maps[t].map; e.target.isLabels || (o = e.target.dataItem.dataContext, "MapImage" == r ? o.cluster || (a = "undefined" != typeof igmMarkerZoomLevelOnClick ? igmMarkerZoomLevelOnClick : 2 * e.target.parent.chart.zoomLevel, e.target.series.chart.zoomToMapObject(e.target, a, !0)) : "asia" !== o.id || n.map.startsWith("continents") ? "asia" === o.id && n.map.startsWith("continents") ? e.target.series.chart.zoomToGeoPoint({ latitude: 34.076842, longitude: 100.693068 }, 2.2, !0) : "northAmerica" === o.id && n.map.startsWith("region/world/worldRegion") ? e.target.series.chart.zoomToGeoPoint({ latitude: 55.5, longitude: -105.5 }, 3, !0) : "northAmerica" === o.id && n.map.startsWith("continents") ? e.target.series.chart.zoomToGeoPoint({ latitude: 55.5, longitude: -105.5 }, 2.3, !0) : "ZA" === o.id && n.map.startsWith("world") ? e.target.series.chart.zoomToGeoPoint({ latitude: -28.6, longitude: 24.7 }, 12.2, !0) : "US" === o.id && n.map.startsWith("world") ? e.target.series.chart.zoomToGeoPoint({ latitude: 49, longitude: -119 }, 2.6, !0) : "RU" === o.id && n.map.startsWith("world") ? e.target.series.chart.zoomToGeoPoint({ latitude: 64.5, longitude: 105 }, 2.1, !0) : (void 0 !== e.target.series.chart.deltaLongitudeOriginal && (e.target.series.chart.deltaLongitude = e.target.series.chart.deltaLongitude), e.target.series.chart.zoomToMapObject(e.target, 2 * e.target.zoomLevel)) : (e.target.series.chart.deltaLongitudeOriginal = e.target.series.chart.deltaLongitude, e.target.series.chart.deltaLongitude = -10, e.target.series.chart.zoomToGeoPoint({ latitude: 34.076842, longitude: 100.693068 }, 1.7, !0))) }, setupHoverEvents: function (e, t) { var a, o = this, i = o.maps[e].selected || !1; a = t.target.isLabels ? t.target.dataItems.first.dataContext : t.target.dataItem.dataContext, "MapImage" !== t.target.className && "fixed" === t.target.tooltipPosition && (Array.isArray(o.tempHover) && o.tempHover.length >= 0 && (o.tempHover[0].setState("default"), o.tempHover = []), o.tempHover = [t.target]), a.action && "none" !== a.action && (t.target.cursorOverStyle = am4core.MouseCursorStyle.pointer), Array.isArray(i) && !i.includes(t.target) && t.target.dataItem && void 0 === t.target.dataItem.dataContext.madeFromGeoData && i.forEach((function (e, t) { "object" == typeof e && void 0 !== e.isHover && (e.isHover = !1) })), !o.bool(a.triggerClickOnHover) || iMapsManager.isTouchScreenDevice() && "over" !== t.type || void 0 !== iMaps.maps[e].mapClicked && !1 !== iMaps.maps[e].mapClicked || iMapsManager.select(e, a.id, !1, !0, a.mapID, !1), o.bool(a.triggerRegionHover) && a.val && "" !== a.val && (iMapsManager.hover(e, a.val), t.target.events.on("out", (function (t) { iMapsManager.clearHovered(e) }))) }, singleHit: function (e, t) { var a, o = this.maps[e].data; if ((a = t.target.isLabels ? t.target.dataItems.first.dataContext : t.target.dataItem.dataContext).madeFromGeoData) return; !0 === iMaps.maps[e].activeStateControl && a.activeState && (iMaps.maps[e].mapClicked = !0); let i = !0; o.tooltip && "hit" === o.tooltip.showTooltipOn && (i = !1), iMapsManager.clearSelected(e, i, !0), t.target.isActive = !0, t.target.isHover = !0, t.target.setState("active"), this.maps[e].selected = [t.target] }, groupHit: function (e, t) { var a = this.maps[e].selected || !1; t.target.dataItem.dataContext.madeFromGeoData || (!0 === iMaps.maps[e].activeStateControl && t.target.dataItem.dataContext.activeState && (iMaps.maps[e].mapClicked = !0), iMapsManager.clearSelected(e), a = [], t.target.parent.mapPolygons.each((function (e) { e.dataItem.dataContext.madeFromGeoData || (e.setState("active"), t.target === e && (e.isHover = !0), e.isActive = !0, e.isGroupActive = !0, a.push(e)) })), this.maps[e].selected = a) }, groupHover: function (e, t) { var a; a = t.target.isLabels ? t.target.dataItems.first.dataContext : t.target.dataItem.dataContext, t.target.dataItem.dataContext.madeFromGeoData || (!this.bool(a.triggerClickOnHover) || void 0 !== iMaps.maps[e].mapClicked && !1 !== iMaps.maps[e].mapClicked || iMapsManager.select(e, a.id, !1, !0, a.mapID, !1), t.target.dataItem.dataContext.action && "none" != t.target.dataItem.dataContext.action && (t.target.cursorOverStyle = am4core.MouseCursorStyle.pointer), t.target.parent.mapPolygons.each((function (e) { e.dataItem.dataContext.madeFromGeoData || e.isActive || e.setState("highlight") }))) }, groupHoverOut: function (e, t) { t.target.dataItem.dataContext.madeFromGeoData || t.target.parent.mapPolygons.each((function (e) { e.isGroupActive || (e.setState("default"), e.isActive = !1, e.isHover = !1) })) }, getRegionsByValue: function (e, t, a) { var o, i = this, r = i.maps[e].series, n = []; return t = t || "*", a = a || "val", r.forEach((function (e) { "MapPolygonSeries" === i.getTargetSeriesType(e) && (o = e.mapPolygons.values.filter((function (e) { if (e.dataItem.dataContext[a] === t || "*" === t) return !0 })), n = n.concat(o)) })), n }, getMarkersByValue: function (e, t, a) { var o, i = this, r = i.maps[e].series, n = []; return t = t || "*", a = a || "val", r.forEach((function (e) { "MapImageSeries" === i.getTargetSeriesType(e) && (o = e.mapImages.values.filter((function (e) { if (e.dataItem.dataContext[a] === t || "*" === t) return !0 })), n = n.concat(o)) })), n }, select: function (e, t, a, o, i, r) { var n, l, s, d = this, p = d.maps[e], u = d.maps[e].data, c = p.series.slice().reverse(), m = [], g = iMaps.maps[e].seriesById, h = !1, M = !0, v = !1, f = !0; if (Number.isInteger(t) && (t = t.toString()), t, void 0 === a && (a = !0), void 0 === o && (o = !0), void 0 === i && (i = e), g.hasOwnProperty(i) && (h = g[i]), r = void 0 === r, u.tooltip && "hit" === u.tooltip.showTooltipOn && (f = !1), iMapsManager.clearSelected(e, f, !r), iMaps.maps[e].activeStateControl = !!r, h && (c = h), Array.isArray(c)) for (var b = 0, y = c.length; b < y && !v; b++)if (void 0 === c[b].isCluster || !c[b].isCluster) { if (c[b].mapPolygons) if ((n = c[b].getPolygonById(t)) && void 0 !== n.dataItem.dataContext.originalID && n.dataItem.dataContext.originalID.includes(",") && (t = n.dataItem.dataContext.originalID), n && c[b].show(), t.includes(",")) void 0 !== n && n && (n.tooltip = !1, n.dispatchImmediately("hit"), n.hideTooltip(), M = !1, iMaps.maps[e].activeStateControl = !0), t.split(",").forEach((function (i, r) { if (void 0 !== (n = c[b].getPolygonById(i.trim())) && n) { if (n.dataItem.dataContext.madeFromGeoData) return; if (n.dataItem.dataContext.originalID !== t && !M) return; 0 === r && o && (v = !0, a ? (l = void 0 !== n && void 0 !== n.tooltipPosition ? n.tooltipPosition : "hover", n.tooltipPosition = "fixed", s = n.showTooltipOn, n.showTooltipOn = "always", iMaps.maps[e].activeStateControl = !0, n.tooltipPosition = l, n.showTooltipOn = s, n.selectedFromGroup = !0) : n.isHover = !0), u.regionActiveState && d.bool(u.regionActiveState.enabled) ? n.setState("active") : n.setState("highlight"), m.push(n) } })); else if (void 0 !== (n = c[b].getPolygonById(t)) && n) { let t = 0; if ("Orthographic" === u.projection) { let a = iMaps.maps[e].map; a.animate({ property: "deltaLongitude", to: -n.longitude }, 500, am4core.ease.linear), a.animate({ property: "deltaLatitude", to: -n.latitude }, 550, am4core.ease.linear), t = 550 } setTimeout((function (e) { console.log(e.dataItem.dataContext), a && e.dataItem.dataContext && "igm_display_map" !== e.dataItem.dataContext.action ? (l = void 0 !== e && void 0 !== e.tooltipPosition ? e.tooltipPosition : "hover", e.tooltipPosition = "fixed", s = e.showTooltipOn, e.showTooltipOn = "always", e.dispatchImmediately("hit"), v = !0, e.tooltipPosition = l, e.showTooltipOn = s, m.push(e)) : e.dataItem.dataContext && "igm_display_map" === e.dataItem.dataContext.action ? (e.dispatchImmediately("hit"), e.hideTooltip(), v = !0, m.push(e)) : (e.dispatchImmediately("hit"), v = !0, m.push(e)) }), t, n) } if (c[b].mapImages) if (t.includes(",")) t.split(",").forEach((function (e, t) { void 0 !== (n = c[b].getImageById(e)) && n && (c[b].show(), a ? (s = n.showTooltipOn, n.showTooltipOn = "always", l = void 0 !== n.tooltipPosition ? n.tooltipPosition : "hover", n.tooltipPosition = "fixed", n.dispatchImmediately("hit"), v = !0, n.tooltipPosition = l, n.showTooltipOn = s, m.push(n)) : (n.dispatchImmediately("hit"), v = !0, m.push(n))) })); else { let o = c[b].getImageById(t); if (o) { c[b].show(); let t = 0; if ("Orthographic" === u.projection) { let a = iMaps.maps[e].map; a.animate({ property: "deltaLongitude", to: -o.longitude }, 500, am4core.ease.linear), a.animate({ property: "deltaLatitude", to: -o.latitude }, 550, am4core.ease.linear), t = 550 } setTimeout((function () { a ? (l = o.tooltipPosition, s = o.showTooltipOn, o.tooltipPosition = "fixed", o.showTooltipOn = "always", o.isHover = !0, o.isActive = !0, o.dispatchImmediately("hit"), o.setState("active"), o.children.each((function (e) { e.showTooltip(0) })), v = !0, o.tooltipPosition = l, o.showTooltipOn = s, m.push(o)) : (o.dispatchImmediately("hit"), v = !0, m.push(o)) }), t) } } } return d.maps[e].selected = m, n }, setupRangeHeatMap: function (e, t, a) { var o, i = a.regions, r = a.roundMarkers, n = this.getTargetSeriesType(e); if ("MapImageSeries" === n) { if (!Array.isArray(a.heatMapMarkers.range) || 0 === a.heatMapMarkers.range.length) return; (o = a.heatMapMarkers.range.slice(0)).sort((function (e, t) { if (isNaN(e.rule)) { var a = e.rule.toLowerCase(), o = t.rule.toLowerCase(); return a < o ? -1 : a > o ? 1 : 0 } return parseFloat(e.rule) - parseFloat(t.rule) })), Array.isArray(r) && r.length > 0 && r.forEach((function (e, t) { if (void 0 !== e[a.heatMapMarkers.source]) { "value" === a.heatMapMarkers.source && (a.heatMapMarkers.source = "val"); var i, r = e[a.heatMapMarkers.source]; isNaN(r) || (r = parseFloat(r)), o.forEach((function (t, a) { isNaN(t.rule) ? (i = t.rule.trim(), r == i && (e.fill = t.fill, e.radius = parseFloat(t.radius))) : (i = parseFloat(t.rule), r >= i && (e.fill = t.fill, e.radius = parseFloat(t.radius))) })) } })) } else if ("MapPolygonSeries" === n) { if (!Array.isArray(a.heatMapRegions.range) || 0 === a.heatMapRegions.range.length) return; (o = a.heatMapRegions.range.slice(0)).sort((function (e, t) { if (isNaN(e.rule)) { var a = e.rule.toLowerCase(), o = t.rule.toLowerCase(); return a < o ? -1 : a > o ? 1 : 0 } return parseFloat(e.rule) - parseFloat(t.rule) })), Array.isArray(i) && i.length > 0 && (isNaN(a.heatMapRegions.source) || (a.heatMapRegions.source = parseInt(a.heatMapRegions.source)), i.forEach((function (e, t) { if (void 0 !== e[a.heatMapRegions.source]) { "value" === a.heatMapRegions.source && (a.heatMapRegions.source = "val"); var i, r = e[a.heatMapRegions.source]; isNaN(r) || (r = parseFloat(r)), o.forEach((function (t, a) { isNaN(t.rule) ? (i = t.rule.trim(), r == i && (e.fill = t.fill)) : (i = parseFloat(t.rule), r >= i && (e.fill = t.fill)) })) } }))) } }, setupHeatMap: function (e, t, a) { var o, i, r, n, l, s, d, p, u, c, m = this, g = m.maps[t].map, h = m.getTargetSeriesType(e); if ("MapImageSeries" === h) { if (void 0 !== a.heatMapMarkers.type && "range" === a.heatMapMarkers.type) return void m.setupRangeHeatMap(e, a.id, a); s = e.mapImages.template.children.values[0], u = ["fill", "radius"], c = a.heatMapMarkers } else { if ("MapPolygonSeries" !== h) return; if (void 0 !== a.heatMapRegions.type && "range" === a.heatMapRegions.type) return void m.setupRangeHeatMap(e, a.id, a); s = e.mapPolygons.template, u = ["fill"], c = a.heatMapRegions } e.dataFields.value = c.source, Array.isArray(u) || (u = [u]), u.map((function (t) { "fill" === t ? (d = c.minColor, p = c.maxColor) : "radius" === t && (d = c.minRadius, p = c.maxRadius), e.heatRules.push({ property: t, target: s, min: d, max: p }) })), m.bool(c.legend) && ((r = g.createChild(am4core.Container)).align = void 0 !== c.legendAlign ? c.legendAlign : "right", r.valign = void 0 !== c.legendValign ? c.legendValign : "bottom", r.userClassName = "mapLegendContainer", r.marginRight = am4core.percent(4), window.innerWidth <= 780 ? r.width = am4core.percent(40) : r.width = am4core.percent(25), void 0 !== c.label && "" !== c.label && ((i = r.createChild(am4core.Label)).text = c.label, i.horizontalCenter = "left", i.verticalCenter = "top", i.fontSize = 12, i.paddingBottom = 40, window.innerWidth <= 780 ? (i.fontSize = 10, i.paddingBottom = 48) : (i.fontSize = 12, i.paddingBottom = 48), i.nonScaling = !1, i.clickable = !1, i.focusable = !1, i.hoverable = !1), (o = r.createChild(am4maps.HeatLegend)).series = e, o.align = "right", o.valign = "bottom", o.width = am4core.percent(100), o.minValue = 0, o.maxValue = 99999999999999, (n = o.valueAxis.axisRanges.create()).value = o.minValue, n.label.text = c.minLabel, (l = o.valueAxis.axisRanges.create()).value = o.maxValue, l.label.text = c.maxLabel, n.label.fontSize = 12, l.label.fontSize = 12, window.innerWidth <= 780 ? (n.label.fontSize = 10, l.label.fontSize = 10) : (n.label.fontSize = 12, l.label.fontSize = 12), o.valueAxis.renderer.labels.template.adapter.add("text", (function () { return "" }))) }, drillTo: function (e, t, a, o) { var i, r, n, l = iMapsManager, s = (l.maps[e].map, l.maps[e].data), d = iMapsManager.maps[e].series, p = iMapsManager.maps[e].baseSeries, u = iMapsManager.maps[e].allBaseSeries, c = l.maps[e].backgroundSeries; for (i = "undefined" != typeof igmDrilldownBaseMapOpacity ? igmDrilldownBaseMapOpacity : .3, o = o || !1, r = 0, n = d.length; r < n; r++)p.includes(d[r]) ? void 0 !== s.alwaysKeepBase && l.bool(s.alwaysKeepBase) || (d[r].opacity = i, c.opacity = i) : u.includes(d[r]) && void 0 !== s.alwaysKeepBase && l.bool(s.alwaysKeepBase) || d[r].hide(); for (r = 0, n = a.length; r < n; r++)a[r].show(); if (iMapsManager.maps[e].isDrilling = !0, !t.zooming) { if (o) return console.log("drill to specific map"), void l.zoomToMap(t, a); l.zoomToRegion(t, e) } }, drillDown: function (e, t) { var a, o, i, r = iMapsRouter.iso2cleanName(t.target.dataItem.dataContext.id, e), n = t.target.dataItem.dataContext.id, l = iMapsManager.maps[e].series, s = t.target.dataItem.dataContext, d = !1, p = iMapsManager.maps[e].baseSeries, u = iMapsManager.maps[e].allBaseSeries, c = [], m = !1; if (console.log("Map Name:", r), console.log("Available Series:", iMapsManager.maps[e].seriesIndex), console.log("Available Series by ID: ", iMapsManager.maps[e].seriesById), !(r && isNaN(n) || void 0 !== _typeof(s) && "igm_display_map" === s.action)) return !1; if (t.target.polygon) if (c.push(r), c.forEach((function (t) { void 0 !== _typeof(s) && "igm_display_map" == s.action ? (console.log("Display custom map " + s.content), Array.isArray(iMapsManager.maps[e].seriesById[parseInt(s.content)]) && (m = !0, a = iMapsManager.maps[e].seriesById[parseInt(s.content)], d = !0)) : Array.isArray(iMapsManager.maps[e].seriesIndex[t]) && (m = !0, a = iMapsManager.maps[e].seriesIndex[t]) })), m) iMapsManager.drillTo(e, t, a, d), iMapsManager.maps[e].drilledTo = a[0].mapID; else { if (a === t.target.series) return void (iMapsManager.maps[e].isDrilling = !1); if (p.includes(t.target.series)) for (iMapsManager.maps[e].isDrilling = !1, iMapsManager.maps[e].drilledTo = !1, o = 0, i = l.length; o < i; o++)u.includes(l[o]) ? l[o].show() : l[o].hide() } }, getSelected: function (e) { var t = this.maps[e].selected || !1, a = []; return !!t && (Array.isArray(t) ? (t.forEach((function (e) { a.push(e.dataItem.dataContext) })), a) : t.dataItem.dataContext) }, getHovered: function (e) { var t = this.maps[e].hovered || !1, a = []; return !!t && (Array.isArray(t) ? (t.forEach((function (e) { a.push(e.dataItem.dataContext) })), a) : void 0) }, getHighlighted: function (e) { var t = this.maps[e].highlighted || !1, a = []; return !!t && (Array.isArray(t) ? (t.forEach((function (e) { a.push(e.dataItem.dataContext) })), a) : t.dataItem.dataContext) }, clearSelected: function (e, t, a) { var o = this.maps[e], i = o.selected || []; return t = t || !1, a = a || !1, Array.isArray(i) && i.length > 0 && (i.forEach((function (e, a) { e !== t && "object" == typeof e && void 0 !== e.isHover && (e.isHover = !1, e.isActive = !1, e.isGroupActive = !1, t || e.hideTooltip(0), e.selectedFromGroup && (e.hideTooltip(0), e.selectedFromGroup = !1), e.setState("default")) })), i = []), t || "undefined" == typeof iMapsActions ? o.selected = [t] : o.selected = [], o.selected }, clearHighlighted: function (e) { var t = this.maps[e].highlighted || []; return Array.isArray(t) && t.length > 0 && (t.forEach((function (e, t) { e.isHover = !1, e.isActive = !1, e.setState("default") })), t = []), t }, hover: function (e, t, a) { var o, i, r, n = this.maps[e], l = (n.data, n.series), s = n.hovered || []; if (Number.isInteger(t) && (t = t.toString()), void 0 === a && (a = !0), iMapsManager.clearHovered(e), s = [], Array.isArray(l)) for (var d = 0, p = l.length; d < p; d++)l[d].mapPolygons && (t.includes(",") ? t.split(",").forEach((function (e, t) { (o = l[d].getPolygonById(e.trim())) && (a ? (r = void 0 !== o.tooltipPosition ? o.tooltipPosition : "fixed", i = void 0 !== o.showTooltipOn ? o.showTooltipOn : "hover", o.tooltipPosition = "fixed", o.showTooltipOn = "always", s.push(o), o.dispatchImmediately("over"), o.isHover = !0, o.tooltipPosition = r, o.showTooltipOn = i) : (s.push(o), o.dispatchImmediately("over"), o.isHover = !0)) })) : (o = l[d].getPolygonById(t)) && (a ? (r = o.tooltipPosition, o.tooltipPosition = "fixed", s = [o], o.dispatchImmediately("over"), o.isHover = !0, o.tooltipPosition = r) : (s = [o], o.dispatchImmediately("over"), o.isHover = !0))), l[d].mapImages && (t.includes(",") ? t.split(",").forEach((function (e, t) { (o = l[d].getImageById(e)) && (a ? (r = o.tooltipPosition, i = o.showTooltipOn, o.tooltipPosition = "fixed", o.showTooltipOn = "always", s = [o], o.dispatchImmediately("over"), o.isHover = !0, o.setState("hover"), o.children.each((function (e) { "Circle" === e.className && e.showTooltip(0) })), o.tooltipPosition = r, o.showTooltipOn = i) : (s = [o], o.dispatchImmediately("over"), o.isHover = !0, o.setState("hover"))) })) : (o = l[d].getImageById(t)) && (a ? (r = o.tooltipPosition, o.tooltipPosition = "fixed", s = [o], o.dispatchImmediately("over"), o.isHover = !0, o.setState("hover"), o.children.each((function (e) { "Circle" === e.className && e.showTooltip(0) })), o.tooltipPosition = r) : (s = [o], o.dispatchImmediately("over"), o.isHover = !0, o.setState("hover")))); return n.hovered = s, o }, clearHovered: function (e, t) { var a, o = this.maps[e], i = o.hovered || !1, r = o.series; if (t = t || !1) { if (Array.isArray(r)) for (var n = 0, l = r.length; n < l; n++)r[n].mapPolygons && (a = r[n].getPolygonById(t)) && (a.dispatchImmediately("out"), a.isHover = !1), r[n].mapImages && (a = r[n].getImageById(t)) && (a.isHover = !1, a.setState("default"), a.dispatchImmediately("out")) } else if (i) return i.forEach((function (e) { e.dispatchImmediately("out"), void 0 !== e.isGroupActive && e.isGroupActive || (e.setState("default"), e.isHover = !1), void 0 !== e.children && e.children.each((function (e) { "Circle" === e.className && e.hideTooltip(0) })) })), o.hovered = [], !0; return !1 }, highlight: function (e, t) { var a, o = this.maps[e], i = o.series, r = o.highlighted || []; if (Number.isInteger(t) && (t = t.toString()), Array.isArray(i)) for (var n = 0, l = i.length; n < l; n++)i[n].mapPolygons && (t.includes(",") ? t.split(",").forEach((function (e, t) { if (void 0 !== (a = i[n].getPolygonById(e.trim())) && a) { if (a.dataItem.dataContext.madeFromGeoData) return; a.setState("highlight"), r.push(a) } })) : void 0 !== (a = i[n].getPolygonById(t)) && a && (a.setState("highlight"), r.push(a))), i[n].mapImages && (t.includes(",") ? t.split(",").forEach((function (e, t) { void 0 !== (a = i[n].getImageById(e)) && a && (a.setStateOnChildren = !0, a.setState("highlight"), r.push(a)) })) : void 0 !== (a = i[n].getImageById(t)) && a && (a.setStateOnChildren = !0, a.setState("highlight"), r.push(a))); return o.highlighted = r, a }, getTargetSeriesType: function (e) { return e.className }, setupClusters: function (e, t, a) { for (var o, i = this, r = i.maps[t], n = [], l = {}, s = [], d = [], p = 0, u = parseFloat(e.clusterMarkers.maxBias), c = parseFloat(e.clusterMarkers.zoomLevel) || 20, m = void 0 !== e.clusterMarkers.tooltipTemplate && e.clusterMarkers.tooltipTemplate, g = (a = a || !1) || t; p <= 4;)s.push(u), u /= 2, d.push(c), c = 3 == p ? 1 : Math.ceil(c / 2), p++; return d.reverse().pop(), s.pop(), void 0 === r.clusterSeries[g] && (r.clusterSeries[g] = { zoomLevels: {}, overlay: a }), Array.isArray(e.roundMarkers) && s.forEach((function (a, s) { n = geocluster(e.roundMarkers, a, e.markerDefaults, m), (l = Object.assign({}, e)).roundMarkers = n, (o = i.pushRoundMarkerSeries(t, l)).name = l.title || "Map", o.hiddenInLegend = !0, o.isCluster = !0, r.clusterSeries[g].zoomLevels[d[s]] = o, o.hidden = !0 })), !0 }, triggerOnReady: function (e, t) { let a = "custom" == t.map, o = new URLSearchParams(window.location.search).get("mregion"); o && (a || iMapsManager.select(e, o, !0, !0)) }, triggerOnAppeared: function (e, t) { let a = "custom" == t.map, o = new URLSearchParams(window.location.search).get("mregion"); o && a && setTimeout((function () { iMapsManager.select(e, o, !0, !0) }), 500) }, addGeoFileSeries: function (e, t, a) { var o, i = iMapsRouter.getGeoFiles(t); return new Promise((function (e, t) { var a = document.createElement("script"); document.body.appendChild(a), a.onload = e, a.onerror = t, a.async = !0, a.src = i.src })).then((function () { var t = { title: i.title, map: i.map, regions: [], config: t }; return iMapsManager.maps[e].seriesIndex[i.map] = [], o = iMapsManager.pushRegionSeries(e, t), iMapsManager.maps[e].seriesIndex[i.map].push(o), o })), !1 }, handleInfoBox: function (e) { var t = this.maps[e].map, a = document.getElementById("map_visual_info"), o = document.getElementById("map_click_events_coordinates"); this.maps[e].series; a && (iMapsManager.populateInfo(e, a), ["ready", "mappositionchanged", "zoomlevelchanged"].forEach((function (o) { t.events.on(o, (function (t) { iMapsManager.populateInfo(e, a) }), this) }))), o && t.events.on("hit", (function (e) { var a = t.svgPointToGeo(e.svgPoint), i = Number(a.latitude).toFixed(6), r = Number(a.longitude).toFixed(6), n = document.createElement("div"), l = document.createElement("span"), s = document.createElement("span"); l.classList.add("info--unselectable"), s.classList.add("map_clicked_lat"), l.innerHTML = "LAT: ", s.innerHTML = i, n.appendChild(l), n.appendChild(s); var d = document.createElement("div"), p = document.createElement("span"), u = document.createElement("span"); p.classList.add("info--unselectable"), u.classList.add("map_clicked_long"), p.innerHTML = "LON: ", u.innerHTML = r, d.appendChild(p), d.appendChild(u), o.innerHTML = "", o.appendChild(n), o.appendChild(d), o.parentElement.style.display = "block"; var c = new CustomEvent("mapPointClicked", { detail: { latitude: i, longitude: r } }); document.dispatchEvent(c) }), this) }, populateInfo: function (e, t) { var a = this.maps[e].map, o = ""; o += "Zoom Level: " + parseFloat(Number(a.zoomLevel).toFixed(2)) + "<br>", o += "Center Coordinates: <br><span class='info--unselectable'>LAT </span><span>" + Number(a.zoomGeoPoint.latitude).toFixed(6) + "</span>", o += "<br><span class='info--unselectable'>LONG </span><span>" + Number(a.zoomGeoPoint.longitude).toFixed(6) + "</span><br>", t.innerHTML = o; let i = { zoom: parseFloat(Number(a.zoomLevel).toFixed(2)), lat: Number(a.zoomGeoPoint.latitude).toFixed(6), long: Number(a.zoomGeoPoint.longitude).toFixed(6) }; t.setAttribute("data-visual", JSON.stringify(i)) }, hideAllSeries: function (e, t) { if (e = parseInt(e)) { t = t || !1; for (var a = iMaps.maps[e], o = (a.baseRegionSeries, a.groupedBaseRegionSeries), i = a.allBaseSeries, r = 0; r < a.series.length; r++){ var n = a.series[r]; o.includes(n) || (!t || t && !i.includes(n)) && n.hide() } } }, showAllSeries: function (e) { if (e = parseInt(e)) for (var t = iMaps.maps[e], a = 0; a < t.series.length; a++){ var o = t.series[a]; void 0 !== o.isCluster && !1 !== o.isCluster || o.show() } }, bool: function (e) { return 0 !== Number(e) && "false" !== e && void 0 !== e }, isJSON: function (e) { try { JSON.parse(e) } catch (e) { return !1 } return !0 } }; Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector), Element.prototype.closest || (Element.prototype.closest = function (e) { var t = this; do { if (t.matches(e)) return t; t = t.parentElement || t.parentNode } while (null !== t && 1 === t.nodeType); return null }), iMapsManager.library = { icons: { goFullIconPath: "m15.78742,5.93715l-3.95414,3.95414l3.95414,3.95414l1.60393,-1.60393q0.32301,-0.34529 0.77969,-0.15594q0.4344,0.18935 0.4344,0.65717l0,4.99002q0,0.2896 -0.21163,0.50123t-0.50123,0.21163l-4.99002,0q-0.46781,0 -0.65717,-0.44554q-0.18935,-0.4344 0.15594,-0.76855l1.60393,-1.60393l-3.95414,-3.95414l-3.95414,3.95414l1.60393,1.60393q0.34529,0.33415 0.15594,0.76855q-0.18935,0.44554 -0.65717,0.44554l-4.99002,0q-0.2896,0 -0.50123,-0.21163t-0.21163,-0.50123l0,-4.99002q0,-0.46781 0.44554,-0.65717q0.4344,-0.18935 0.76855,0.15594l1.60393,1.60393l3.95414,-3.95414l-3.95414,-3.95414l-1.60393,1.60393q-0.21163,0.21163 -0.50123,0.21163q-0.13366,0 -0.26732,-0.05569q-0.44554,-0.18935 -0.44554,-0.65717l0,-4.99002q0,-0.2896 0.21163,-0.50123t0.50123,-0.21163l4.99002,0q0.46781,0 0.65717,0.44554q0.18935,0.4344 -0.15594,0.76855l-1.60393,1.60393l3.95414,3.95414l3.95414,-3.95414l-1.60393,-1.60393q-0.34529,-0.33415 -0.15594,-0.76855q0.18935,-0.44554 0.65717,-0.44554l4.99002,0q0.2896,0 0.50123,0.21163t0.21163,0.50123l0,4.99002q0,0.46781 -0.4344,0.65717q-0.1448,0.05569 -0.27846,0.05569q-0.2896,0 -0.50123,-0.21163l-1.60393,-1.60393z", exitFullIconPath: "m10.04411,10.81638l0,5.40556q0,0.31372 -0.22925,0.54297t-0.54297,0.22925t-0.54297,-0.22925l-1.7375,-1.7375l-4.00591,4.00591q-0.12066,0.12066 -0.27752,0.12066t-0.27752,-0.12066l-1.37552,-1.37552q-0.12066,-0.12066 -0.12066,-0.27752t0.12066,-0.27752l4.00591,-4.00591l-1.7375,-1.7375q-0.22925,-0.22925 -0.22925,-0.54297t0.22925,-0.54297t0.54297,-0.22925l5.40556,0q0.31372,0 0.54297,0.22925t0.22925,0.54297zm9.10982,-8.10834q0,0.15686 -0.12066,0.27752l-4.00591,4.00591l1.7375,1.7375q0.22925,0.22925 0.22925,0.54297t-0.22925,0.54297t-0.54297,0.22925l-5.40556,0q-0.31372,0 -0.54297,-0.22925t-0.22925,-0.54297l0,-5.40556q0,-0.31372 0.22925,-0.54297t0.54297,-0.22925t0.54297,0.22925l1.7375,1.7375l4.00591,-4.00591q0.12066,-0.12066 0.27752,-0.12066t0.27752,0.12066l1.37552,1.37552q0.12066,0.12066 0.12066,0.27752z" } }, iMapsManager.handleExternalZoom = function (e) { var t, a, o, i, r, n; t = document.getElementById("map_wrapper_" + e); var l = this, s = l.maps[e].data, d = l.maps[e].series, p = l.maps[e].allBaseSeries; t && (a = t.querySelector(".map_box"), t.classList.add("map_has_external_controls"), (i = document.createElement("div")).setAttribute("id", "map_home_buttom_" + e), i.setAttribute("data-map-id", e), i.classList.add("map_home_button"), i.innerHTML = '<svg height="20" width="20"><path d="M16,8 L14,8 L14,16 L10,16 L10,10 L6,10 L6,16 L2,16 L2,8 L0,8 L8,0 L16,8 Z M16,8" /></svg>', i.addEventListener("click", (function (e) { var t = this.getAttribute("data-map-id"); if (iMaps.maps[t].map.goHome(), l.bool(s.drillDownOnClick)) { for (var a = 0, o = d.length; a < o; a++)d[a].hide(); for (var i = 0, r = p.length; i < r; i++)p[i].show(); iMapsManager.maps[t].drilledTo = !1, iMapsManager.maps[t].isDrilling = !1 } "undefined" != typeof iMapsActions && void 0 !== iMapsActions.resetActions && iMapsActions.resetActions(t) })), (r = document.createElement("div")).setAttribute("id", "map_zoomin_buttom_" + e), r.setAttribute("data-map-id", e), r.classList.add("map_zoomin_button"), r.innerHTML = "+", r.addEventListener("click", (function (e) { var t = this.getAttribute("data-map-id"); iMaps.maps[t].map.zoomIn() })), (n = document.createElement("div")).setAttribute("id", "map_zoomout_buttom_" + e), n.setAttribute("data-map-id", e), n.classList.add("map_zoomout_button"), n.innerHTML = "-", n.addEventListener("click", (function (e) { var t = this.getAttribute("data-map-id"); iMaps.maps[t].map.zoomOut() })), (o = document.createElement("div")).setAttribute("id", "map_controls_" + e), o.classList.add("map_controls"), o.appendChild(i), o.appendChild(r), o.appendChild(n), a.parentNode.insertBefore(o, a.nextSibling)) }, iMapsManager.toggleFullscreen = function (e) { document.fullscreen || document.webkitIsFullScreen ? (document.exitFullscreen ? document.exitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitExitFullscreen ? document.webkitExitFullscreen() : document.msExitFullscreen && document.msExitFullscreen(), iMapsManager.isFullScreen = !1) : e.requestFullscreen ? e.requestFullscreen() : e.mozRequestFullScreen ? e.mozRequestFullScreen() : e.webkitRequestFullscreen ? e.webkitRequestFullscreen() : e.msRequestFullscreen && e.msRequestFullscreen() }, iMapsManager.isTouchScreenDevice = function () { return "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0 }, iMapsManager.nl2br = function (e) { return (e + "").replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, "HI<br>HI") }, iMapsManager.isFullScreen = !1; var iMaps = { originalData: JSON.parse(JSON.stringify(iMapsData)), reset: function () { iMaps.maps && Object.keys(iMaps.maps).forEach((function (e) { iMaps.maps[e].map.dispose() })), iMapsData = iMaps.originalData, iMaps.init() }, init: function (e) { if (void 0 === e && void 0 !== iMapsData.options && void 0 !== iMapsData.options.hold && "1" === iMapsData.options.hold && (e = !0), !e) if ("undefined" != typeof am4core) am4core.ready((function () { am4core.options.autoSetClassName = !0, am4core.options.classNamePrefix = "imaps", am4core.options.commercialLicense = !0, am4core.options.queue = !0, void 0 !== iMapsData.options && void 0 !== iMapsData.options.lazyLoad && "1" === iMapsData.options.lazyLoad && (am4core.options.onlyShowOnViewport = !0), void 0 === iMapsData.options || void 0 === iMapsData.options.animations || "1" !== iMapsData.options.animations && !0 !== iMapsData.options.animations || am4core.useTheme(am4themes_animated), iMapsModel.prepareData(iMapsData.data).forEach((function (e, t) { t.disabled || iMapsManager.init(t) })), iMaps.maps = iMapsManager.maps })); else { console.log("Map files not loaded properly."); let e = document.querySelector(".oxygen-body .map_wrapper .map_render"); e && (e.innerHTML = 'Map Container. <br> Map will not render in Oxygen preview, but will render in live page.<br>Consider enabling the "Async Loading" option in the Settings > Performance page.') } }, loadScript: function (e, t) { var a = document.createElement("script"); a.type = "text/javascript", a.src = e, a.onreadystatechange = t, a.onload = t, document.head.appendChild(a) }, loadScripts: function (e, t) { var a = 0, o = function () { ++a >= e.length && t.call(this, arguments) }; e.forEach((function (e, t) { iMaps.loadScript(e, o) })) } }; void 0 !== iMapsData.async && Array.isArray(iMapsData.async) && iMapsData.async.length > 0 ? iMaps.loadScript(iMapsData.async[0], (function () { iMapsData.async.shift(), iMaps.loadScripts(iMapsData.async, (function () { iMaps.init() })) })) : iMaps.init();
     1"use strict";iMaps.init();
  • interactive-geo-maps/trunk/interactive-geo-maps.php

    r3115060 r3115635  
    11<?php
     2
    23/**
    34 * Interactive Geo Maps
     
    78 * Plugin URI:        https://interactivegeomaps.com/
    89 * Description:       Create interactive geographic vector maps of the world, continents or any country in the world. Color full regions or create markers on specific locations that will have information on hover and can also have actions on click. This plugin uses the online amcharts library to generate the maps.
    9  * Version:           1.6.18
     10 * Version:           1.6.1
    1011 * Requires PHP:      7.0
    1112 * Author:            MapGeo
     
    1415 * Domain Path:       /languages
    1516 *
    16  * @fs_premium_only /src/Plugin/Pro
    1717 */
    18 
    1918namespace Saltus\WP\Plugin\Saltus\InteractiveMaps;
    2019
    2120// If this file is called directly, quit.
    22 if ( ! defined( 'WPINC' ) ) {
    23     exit;
     21if ( !defined( 'WPINC' ) ) {
     22exit;
    2423}
    25 
    2624// Only run plugin code if PHP version bigger than 7.0 for now
    2725if ( version_compare( PHP_VERSION, '7.0', '<' ) ) {
    28     return;
     26return;
    2927}
     28
     29
     30
     31
     32
     33
     34
     35
     36
     37
     38
     39
     40
     41
     42
     43
     44
     45
     46
     47
     48
     49
     50
     51
     52
     53
     54
     55
     56
     57
     58
     59
     60
     61
     62
    3063
    31 // Freemius logic
    32 if ( function_exists( __NAMESPACE__ . '\igmfreemiusinit' ) ) {
    33     igmfreemiusinit()->set_basename( true, __FILE__ );
    34 } else {
    35     if ( ! function_exists( __NAMESPACE__ . '\igmfreemiusinit' ) ) {
    36         // Create a helper function for easy SDK access.
    37         function igmfreemiusinit() {
    38 
    39             global $igmfreemiusinit;
    40 
    41             if ( ! isset( $igmfreemiusinit ) ) {
    42                 // Include Freemius SDK.
    43                 if ( file_exists( dirname( __FILE__ ) . '/vendor/freemius/wordpress-sdk/start.php' ) ) {
    44                     require_once dirname( __FILE__ ) . '/vendor/freemius/wordpress-sdk/start.php';
    45                 }
    46 
    47                 $igmfreemiusinit = fs_dynamic_init(
    48                     array(
    49                         'id'                  => '5114',
    50                         'slug'                => 'interactive-geo-maps',
    51                         'type'                => 'plugin',
    52                         'public_key'          => 'pk_81cc828e3f6fa811c70bab7631a4f',
    53                         'is_premium'          => true,
    54                         'premium_suffix'      => 'PRO',
    55                         // If your plugin is a serviceware, set this option to false.
    56                         'has_premium_version' => true,
    57                         'has_addons'          => true,
    58                         'has_paid_plans'      => true,
    59                         'trial'               => array(
    60                             'days'               => 7,
    61                             'is_require_payment' => true,
    62                         ),
    63                         'menu'                => array(
    64                             'slug'    => 'edit.php?post_type=igmap',
    65                             'support' => false,
    66                         ),
    67                         // Set the SDK to work in a sandbox mode (for development & testing).
    68                         // IMPORTANT: MAKE SURE TO REMOVE SECRET KEY BEFORE DEPLOYMENT.
    69                         'secret_key'          => 'sk_#*ncIu!5g.noRn=qM1##FFh;6+.r@',
    70                     )
    71                 );
    72             }
    73 
    74             return $igmfreemiusinit;
    75         }
    76 
    77         // Init Freemius.
    78         igmfreemiusinit();
    79         // Signal that SDK was initiated.
    80         do_action( 'igmfreemiusinit_loaded' );
    81 
    82         /**
    83          * Prevent trial notice from displaying
    84          *
    85          * @param bool  $show
    86          * @param array $msg
    87          * @return bool
    88          */
    89         function igm_remove_trial_notice( $show, $msg ) {
    90 
    91             if ( 'trial_promotion' === $msg['id'] ) {
    92                 // Don't show the trial promotional admin notice.
    93                 return false;
    94             }
    95 
    96             return $show;
    97         }
     64        // Init Freemius.
     65        igmfreemiusinit();
     66        // Signal that SDK was initiated.
     67        do_action( 'igmfreemiusinit_loaded' );
     68        /**
     69         * Prevent trial notice from displaying
     70         *
     71         * @param bool  $show
     72         * @param array $msg
     73         * @return bool
     74         */
     75        function igm_remove_trial_notice(  $show, $msg  ) {
     76            if ( 'trial_promotion' === $msg['id'] ) {
     77                // Don't show the trial promotional admin notice.
     78                return false;
     79            }
     80            return $show;
     81        }
    9882
    9983        /**
     
    10387         */
    10488        function igm_plugin_icon() {
    105             return dirname( __FILE__) . '/assets/imgs/icon-256x256.png' ;
     89            return dirname( __FILE__;
    10690        }
    10791
    108         igmfreemiusinit()->add_filter( 'show_admin_notice', 'Saltus\WP\Plugin\Saltus\InteractiveMaps\igm_remove_trial_notice', 10, 2 );
    109 
     92        igmfreemiusinit()->add_filter(
     93            'show_admin_notice',
     94            'Saltus\\WP\\Plugin\\Saltus\\InteractiveMaps\\igm_remove_trial_notice',
     95            10,
     96            2
     97        );
    11098        // set plugin icon for freemius
    111         igmfreemiusinit()->add_filter('plugin_icon', 'Saltus\WP\Plugin\Saltus\InteractiveMaps\igm_plugin_icon' );
    112 
    113         igmfreemiusinit()->override_i18n(
    114             array(
    115                 'start-trial' => __('Free 7 Day Pro Trial','interactive-geo-maps'),
    116                 'upgrade' => __('Get Pro Features','interactive-geo-maps'),
    117                 )
    118         );
    119     }
    120 
    121     if ( file_exists( dirname( __FILE__ ) . '/vendor/autoload.php' ) ) {
    122         require_once dirname( __FILE__ ) . '/vendor/autoload.php';
    123     }
    124 
    125     if ( class_exists( \Saltus\WP\Framework\Core::class ) ) {
    126 
    127         /*
    128         * The path to the plugin root directory is mandatory,
    129         * so it loads the models from a subdirectory.
    130         */
    131         $framework = new \Saltus\WP\Framework\Core( dirname( __FILE__ ) );
    132         $framework->register();
    133         /**
    134          * Initialize plugin
    135          */
    136         add_action(
    137             'plugins_loaded',
    138             function () use ( $framework ) {
    139                 $plugin = new Core( 'interactive-geo-maps', '1.6.18', __FILE__, $framework );
    140                 $plugin->init();
    141             }
    142         );
    143     }
     99        igmfreemiusinit()->add_filter( 'plugin_icon', 'Saltus\\WP\\Plugin\\Saltus\\InteractiveMaps\\igm_plugin_icon' );
     100        igmfreemiusinit()->override_i18n( array(
     101            'start-trial' => __( 'Free 7 Day Pro Trial', 'interactive-geo-maps' ),
     102            'upgrade'     => __( 'Get Pro Features', 'interactive-geo-maps' ),
     103        ) );
     104    }
     105    if ( file_exists( dirname( __FILE__ ) . '/vendor/autoload.php' ) ) {
     106        require_once dirname( __FILE__ ) . '/vendor/autoload.php';
     107    }
     108    if ( class_exists( \Saltus\WP\Framework\Core::class ) ) {
     109        /*
     110         * The path to the plugin root directory is mandatory,
     111         * so it loads the models from a subdirectory.
     112         */
     113        $framework = new \Saltus\WP\Framework\Core(dirname( __FILE__ ));
     114        $framework->register();
     115        /**
     116         * Initialize plugin
     117         */
     118        add_action( 'plugins_loaded', function () use($framework) {
     119            $plugin = new Core(
     120                'interactive-geo-maps',
     121                '1.6.19',
     122                __FILE__,
     123                $framework
     124            );
     125            $plugin->init();
     126        } );
     127    }
    144128}
  • interactive-geo-maps/trunk/readme.txt

    r3115088 r3115635  
    55Tested up to: 6.5
    66Requires PHP: 7.0
    7 Stable tag: 1.6.18.1
     7Stable tag: 1.6.1
    88Donate link: https://interactivegeomaps.com
    99License: GPLv2 or later
     
    100100== Changelog ==
    101101
     102
     103
     104
    102105= 1.6.18 =
    103106Small code improvements and bug fixes.
  • interactive-geo-maps/trunk/vendor/composer/installed.php

    r3115088 r3115635  
    22    'root' => array(
    33        'name' => 'carmoreira/interactive-geo-maps',
    4         'pretty_version' => '1.6.18.2',
    5         'version' => '1.6.18.2',
    6         'reference' => '4a8197f553b6d3bb6d17c83534b60efe56558caf',
     4        'pretty_version' => '1.6.1',
     5        'version' => '1.6.1',
     6        'reference' => '',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../build',
     
    1212    'versions' => array(
    1313        'carmoreira/interactive-geo-maps' => array(
    14             'pretty_version' => '1.6.18.2',
    15             'version' => '1.6.18.2',
    16             'reference' => '4a8197f553b6d3bb6d17c83534b60efe56558caf',
     14            'pretty_version' => '1.6.1',
     15            'version' => '1.6.1',
     16            'reference' => '',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../build',
Note: See TracChangeset for help on using the changeset viewer.