From 28e41dd3883ca7926682085e9d7783c43f5cdbb0 Mon Sep 17 00:00:00 2001 From: techfg Date: Fri, 27 Dec 2024 14:05:40 -0800 Subject: [PATCH] Release v1.9.1 --- CHANGELOG.md | 6 ++++++ bower.json | 2 +- dist/jquery.imagemapster.js | 12 ++++++------ dist/jquery.imagemapster.min.js | 4 ++-- dist/jquery.imagemapster.min.mjs | 4 ++-- dist/jquery.imagemapster.mjs | 12 ++++++------ dist/jquery.imagemapster.zepto.js | 12 ++++++------ dist/jquery.imagemapster.zepto.min.js | 4 ++-- package-lock.json | 4 ++-- package.json | 2 +- 10 files changed, 34 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ade967..89048d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,12 @@ - Zoom to Area - Make callback data structures consistent +## Version 1.9.1 - 2024.12.27 + +- chore: improve eslint config & fix issues +- chore: fix broken links in docs +- chore: update dependencies + ## Version 1.9.0 - 2024.12.24 - chore: update dependencies diff --git a/bower.json b/bower.json index f882fae..a1df46b 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "ImageMapster", - "version": "1.9.0", + "version": "1.9.1", "homepage": "https://jamietre.github.io/ImageMapster", "description": "jQuery plugin that activates areas in HTML image maps with support for highlighting, selecting, tooltips, resizing and more", "main": "dist/jquery.imagemapster.min.js", diff --git a/dist/jquery.imagemapster.js b/dist/jquery.imagemapster.js index c548c13..1d8a359 100644 --- a/dist/jquery.imagemapster.js +++ b/dist/jquery.imagemapster.js @@ -1,5 +1,5 @@ /*! -* imagemapster - v1.9.0 - 2024-12-24 +* imagemapster - v1.9.1 - 2024-12-27 * https://jamietre.github.io/ImageMapster * Copyright (c) 2011 - 2024 James Treworgy * License: MIT @@ -51,7 +51,7 @@ }); window.addEventListener('testPassive.mapster', function () {}, opts); window.removeEventListener('testPassive.mapster', function () {}, opts); - // eslint-disable-next-line no-unused-vars + // eslint-disable-next-line no-unused-vars -- intentionally ignoring } catch (e) { // intentionally ignored } @@ -114,7 +114,7 @@ * * Requires: jQuery >= 1.2.3 */ -/* eslint-disable one-var */ +/* eslint-disable one-var -- code directly from jquery source */ (function ($) { 'use strict'; @@ -223,7 +223,7 @@ (function ($) { 'use strict'; - var mapster_version = '1.9.0'; + var mapster_version = '1.9.1'; // all public functions in $.mapster.impl are methods $.fn.mapster = function (method) { @@ -323,7 +323,7 @@ when: { all: function (deferredArray) { // TODO: Promise breaks ES5 support - // eslint-disable-next-line no-undef + // eslint-disable-next-line no-undef -- requires polyfill per imagemapster docs return Promise.all(deferredArray); }, defer: function () { @@ -333,7 +333,7 @@ // polyfill via native promise var Deferred = function () { // TODO: Promise breaks ES5 support - // eslint-disable-next-line no-undef + // eslint-disable-next-line no-undef -- requires polyfill per imagemapster docs this.promise = new Promise( function (resolve, reject) { this.resolve = resolve; diff --git a/dist/jquery.imagemapster.min.js b/dist/jquery.imagemapster.min.js index 345ec31..a24e4f7 100644 --- a/dist/jquery.imagemapster.min.js +++ b/dist/jquery.imagemapster.min.js @@ -1,8 +1,8 @@ /*! -* imagemapster - v1.9.0 - 2024-12-24 +* imagemapster - v1.9.1 - 2024-12-27 * https://jamietre.github.io/ImageMapster * Copyright (c) 2011 - 2024 James Treworgy * License: MIT */ -(a=>{"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),a(t),t}:a(jQuery)})(function(jQuery){(e=>{if(e.event&&e.event.special){var i,t=!1;try{var a=Object.defineProperty({},"passive",{get:function(){return t=!0}});window.addEventListener("testPassive.mapster",function(){},a),window.removeEventListener("testPassive.mapster",function(){},a)}catch(e){}t&&(i=function(e,t,a){if(!e.includes("mapster")||!e.includes("noPreventDefault"))return!1;this.addEventListener(t,a,{passive:!0})},e.event.special.touchstart={setup:function(e,t,a){return i.call(this,t,"touchstart",a)}},e.event.special.touchend={setup:function(e,t,a){return i.call(this,t,"touchend",a)}})}})(jQuery),(c=>{c.fn.addBack=c.fn.addBack||c.fn.andSelf,c.fn.extend({actual:function(e,t){var a,i,n,o,s,r;if(this[e])return a=c.extend({absolute:!1,clone:!1,includeMargin:!1,display:"block"},t),i=this.eq(0),t=!0===a.clone?(r=function(){i=i.clone().attr("style","position: absolute !important; top: -1000 !important; ").appendTo("body")},function(){i.remove()}):(n=[],o="",r=function(){s=i.parents().addBack().filter(":hidden"),o+="visibility: hidden !important; display: "+a.display+" !important; ",!0===a.absolute&&(o+="position: absolute !important; "),s.each(function(){var e=c(this),t=e.attr("style");n.push(t),e.attr("style",t?t+";"+o:o)})},function(){s.each(function(e){var t=c(this),e=n[e];void 0===e?t.removeAttr("style"):t.attr("style",e)})}),r(),r=/(outer)/.test(e)?i[e](a.includeMargin):i[e](),t(),r;throw'$.actual => The jQuery method "'+e+'" you called does not exist'}})})(jQuery),!function($){var mapster_version="1.9.0",m=($.fn.mapster=function(e){var t=$.mapster.impl;return $.mapster.utils.isFunction(t[e])?t[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void $.error("Method "+e+" does not exist on jQuery.mapster"):t.bind.apply(this,arguments)},$.mapster={version:mapster_version,render_defaults:{isSelectable:!0,isDeselectable:!0,fade:!1,fadeDuration:150,fill:!0,fillColor:"000000",fillColorMask:"FFFFFF",fillOpacity:.7,highlight:!0,stroke:!1,strokeColor:"ff0000",strokeOpacity:1,strokeWidth:1,includeKeys:"",altImage:null,altImageId:null,altImages:{},altImageOpacity:null},defaults:{clickNavigate:!1,navigateMode:"location",wrapClass:null,wrapCss:null,onGetList:null,sortList:!1,mapKey:"",mapValue:"",singleSelect:!1,listKey:"value",listSelectedAttribute:"selected",listSelectedClass:null,onClick:null,onMouseover:null,onMouseout:null,mouseoutDelay:0,onStateChange:null,boundList:null,onConfigured:null,configTimeout:3e4,noHrefIsMask:!0,scaleMap:!0,scaleMapBounds:{below:.98,above:1.02},enableAutoResizeSupport:!1,autoResize:!1,autoResizeDelay:0,autoResizeDuration:0,onAutoResize:null,areas:[]},shared_defaults:{render_highlight:{fade:!0},render_select:{fade:!1},staticState:null,selected:null},area_defaults:{includeKeys:"",isMask:!1},canvas_style:{position:"absolute",left:0,top:0,padding:0,border:0},hasCanvas:null,map_cache:[],hooks:{},addHook:function(e,t){this.hooks[e]=(this.hooks[e]||[]).push(t)},callHooks:function(e,a){$.each(this.hooks[e]||[],function(e,t){t.apply(a)})},utils:{when:{all:function(e){return Promise.all(e)},defer:function(){return new function(){this.promise=new Promise(function(e,t){this.resolve=e,this.reject=t}.bind(this)),this.then=this.promise.then.bind(this.promise),this.catch=this.promise.catch.bind(this.promise)}}},defer:function(){return this.when.defer()},subclass:function(a,i){function e(){var e=this,t=Array.prototype.slice.call(arguments,0);e.base=a.prototype,e.base.init=function(){a.prototype.constructor.apply(e,t)},i.apply(e,t)}return(e.prototype=new a).constructor=e},asArray:function(e){return e.constructor===Array?e:this.split(e)},split:function(e,t){for(var a,i=e.split(","),n=0;n{function c(e,t,a,i){var n,o,s=i/15,r=$.mapster.utils;if("number"==typeof e){if(!(o=l[e]))return}else(n=r.indexOfProp(l,null,e))&&delete l[n],l[++u]=o=e,e=u;t=(a=a||1)-.01=e.index;t--)m.map_cache[t].index--};function hasVml(){var e=$("
").appendTo("body"),t=(e.html(''),e[0].firstChild),t=(t.style.behavior="url(#default#VML)",!t||"object"==typeof t.adj);return e.remove(),t}function namespaces(){return"object"==typeof document.namespaces?document.namespaces:null}function hasCanvas(){var e=namespaces();return!(e&&e.g_vml_||!$("")[0].getContext)}function merge_areas(a,e){var i,n=a.options.areas;e&&$.each(e,function(e,t){t&&t.key&&(0<=(i=u.indexOfProp(n,"key",t.key))?$.extend(n[i],t):n.push(t),i=a.getDataForKey(t.key))&&$.extend(i.options,t)})}function merge_options(e,t){var a=u.updateProps({},t);delete a.areas,u.updateProps(e.options,a),merge_areas(e,t.areas),u.updateProps(e.area_options,e.options)}return me.get=function(e){var t=m.getMapData(this);if(t&&t.complete)return new m.Method(this,function(){return this.getSelected()},function(){return this.isSelected()},{name:"get",args:arguments,key:e,first:!0,allowAsync:!0,defaultReturn:""}).go();throw"Can't access data until binding complete."},me.data=function(e){return new m.Method(this,null,function(){return this},{name:"data",args:arguments,key:e}).go()},me.highlight=function(t){return new m.Method(this,function(){var e;if(!1!==t)return 0<=(e=this.highlightId)?this.data[e].key:null;this.ensureNoHighlight()},function(){this.highlight()},{name:"highlight",args:arguments,key:t,first:!0}).go()},me.keys=function(e,i){var n=[],a=m.getMapData(this);if(a&&a.complete)return a&&a.complete?("string"==typeof e?i?o(a.getDataForKey(e)):n=[a.getKeysForGroup(e)]:(i=e,this.each(function(e,t){"AREA"===t.nodeName&&o(a.getDataForArea(t))})),n.join(",")):"";throw"Can't access data until binding complete.";function o(e){var t,a=[];i?(t=e.areas(),$.each(t,function(e,t){a=a.concat(t.keys)})):a.push(e.key),$.each(a,function(e,t){$.inArray(t,n)<0&&n.push(t)})}},me.select=function(){me.set.call(this,!0)},me.deselect=function(){me.set.call(this,!1)},me.set=function(i,n,e){var o,s,r,c,l=e;function h(e){e&&$.inArray(e,c)<0&&(c.push(e),r+=(""===r?"":",")+e.key)}function p(e){$.each(c,function(e,t){var a=t;if(a)switch(i){case!0:a.select(l);break;case!1:a.deselect(!0);break;default:a.toggle(l)}}),i||e.removeSelectionFinish()}return this.filter("img,area").each(function(e,t){var a;(s=m.getMapData(t))!==o&&(o&&p(o),c=[],r=""),s&&(a="","IMG"===t.nodeName.toUpperCase()?m.queueCommand(s,$(t),"set",[i,n,l])||(n instanceof Array?n.length&&(a=n.join(",")):a=n,a&&$.each(u.split(a),function(e,t){h(s.getDataForKey(t.toString())),o=s})):(l=n,m.queueCommand(s,$(t),"set",[i,l])||(h(s.getDataForArea(t)),o=s)))}),s&&p(s),this},me.unbind=function(e){return new m.Method(this,function(){this.clearEvents(),this.clearMapData(e),removeMap(this)},null,{name:"unbind",args:arguments}).go()},me.rebind=function(t){return new m.Method(this,function(){var e=this;e.complete=!1,e.configureOptions(t),e.bindImages().then(function(){e.buildDataset(!0),e.complete=!0,e.onConfigured()})},null,{name:"rebind",args:arguments}).go()},me.get_options=function(e,t){var a=u.isBool(e)?e:t;return new m.Method(this,function(){var e=$.extend({},this.options);return a&&(e.render_select=u.updateProps({},m.render_defaults,e,e.render_select),e.render_highlight=u.updateProps({},m.render_defaults,e,e.render_highlight)),e},function(){return a?this.effectiveOptions():this.options},{name:"get_options",args:arguments,first:!0,allowAsync:!0,key:e}).go()},me.set_options=function(e){return new m.Method(this,function(){merge_options(this,e)},null,{name:"set_options",args:arguments}).go()},me.unload=function(){for(var e=m.map_cache.length-1;0<=e;e--)m.map_cache[e]&&me.unbind.call($(m.map_cache[e].image));me.graphics=null},me.snapshot=function(){return new m.Method(this,function(){$.each(this.data,function(e,t){t.selected=!1}),this.base_canvas=this.graphics.createVisibleCanvas(this),$(this.image).before(this.base_canvas)},null,{name:"snapshot"}).go()},me.state=function(){var a,i=null;return $(this).each(function(e,t){if("IMG"===t.nodeName)return(a=m.getMapData(t))&&(i=a.state()),!1}),i},me.bind=function(o){return this.each(function(e,t){var a,i=$(t),n=m.getMapData(t);if(n){if(me.unbind.apply(i),!n.complete)return!0;n=null}if(a=(t=this.getAttribute("usemap"))&&$('map[name="'+t.substr(1)+'"]'),!(i.is("img")&&t&&0{var i,n,o,r=h.mapster,c=r.utils;function l(e,t,a){var i=e,n=i.map_data,o=a.isMask;h.each(t.areas(),function(e,t){a.isMask=o||t.nohref&&n.options.noHrefIsMask,i.addShape(t,a)}),a.isMask=o}function a(e){return Math.max(0,Math.min(parseInt(e,16),255))}function u(e,t){return"rgba("+a(e.substr(0,2))+","+a(e.substr(2,2))+","+a(e.substr(4,2))+","+t+")"}function s(){}r.Graphics=function(e){var t=this;t.active=!1,t.canvas=null,t.width=0,t.height=0,t.shapes=[],t.masks=[],t.map_data=e},i=r.Graphics.prototype={constructor:r.Graphics,begin:function(e,t){var a=h(e);this.elementName=t,this.canvas=e,this.width=a.width(),this.height=a.height(),this.shapes=[],this.masks=[],this.active=!0},addShape:function(e,t){(t.isMask?this.masks:this.shapes).push({mapArea:e,options:t})},createVisibleCanvas:function(e){return h(this.createCanvasFor(e)).addClass("mapster_el").css(r.canvas_style)[0]},addShapeGroup:function(e,a,t){var i,n=this,o=this.map_data,s=e.effectiveRenderOptions(a);t&&h.extend(s,t),t="select"===a?(i="static_"+e.areaId.toString(),o.base_canvas):o.overlay_canvas,n.begin(t,i),s.includeKeys&&(i=c.split(s.includeKeys),h.each(i,function(e,t){t=o.getDataForKey(t.toString());l(n,t,t.effectiveRenderOptions(a))})),l(n,e,s),n.render(),s.fade&&c.fader(r.hasCanvas()?t:h(t).find("._fill").not(".mapster_mask"),0,r.hasCanvas()?1:s.fillOpacity,s.fadeDuration)}},n={renderShape:function(e,t,a){var i,n=t.coords(null,a);switch(t.shape){case"rect":case"rectangle":e.rect(n[0],n[1],n[2]-n[0],n[3]-n[1]);break;case"poly":case"polygon":for(e.moveTo(n[0],n[1]),i=2;i')[0]},clearHighlight:function(){var e=this.map_data.overlay_canvas;e.getContext("2d").clearRect(0,0,e.width,e.height)},refreshSelections:function(){var e=this.map_data,t=e.base_canvas;e.base_canvas=this.createVisibleCanvas(e),h(e.base_canvas).hide(),h(t).before(e.base_canvas),e.redrawSelections(),h(e.base_canvas).show(),h(t).remove()}},o={renderShape:function(e,t,a){var i,n=this,o=e.coords(),s=n.elementName?'name="'+n.elementName+'" ':"",r=a?'class="'+a+'" ':"",c='',l=t.stroke?" strokeweight="+t.strokeWidth+' stroked="t" strokecolor="#'+t.strokeColor+'"':' stroked="f"',u=t.fill?' filled="t"':' filled="f"';switch(e.shape){case"rect":case"rectangle":i="'+c+"";break;case"poly":case"polygon":i="'+c+"";break;case"circ":case"circle":i="'+c+""}return a=h(i),h(n.canvas).append(a),a},render:function(){var a,i=this;return h.each(this.shapes,function(e,t){i.renderShape(t.mapArea,t.options)}),this.masks.length&&h.each(this.masks,function(e,t){a=c.updateProps({},t.options,{fillOpacity:1,fillColor:t.options.fillColorMask}),i.renderShape(t.mapArea,a,"mapster_mask")}),this.active=!1,this.canvas},createCanvasFor:function(e){var t=e.scaleInfo.width,e=e.scaleInfo.height;return h('')[0]},clearHighlight:function(){h(this.map_data.overlay_canvas).children().remove()},removeSelections:function(e){(0<=e?h(this.map_data.base_canvas).find('[name="static_'+e.toString()+'"]'):h(this.map_data.base_canvas).children()).remove()}},h.each(["renderShape","addAltImage","render","createCanvasFor","clearHighlight","removeSelections","refreshSelections"],function(e,t){var a;i[t]=(a=t,function(){return i[a]=(r.hasCanvas()?n:o)[a]||s,i[a].apply(this,arguments)})})})(jQuery),(o=>{var e=o.mapster,n=e.utils,t=[];e.MapImages=function(e){this.owner=e,this.clear()},e.MapImages.prototype={constructor:e.MapImages,slice:function(){return t.slice.apply(this,arguments)},splice:function(){return t.slice.apply(this.status,arguments),t.slice.apply(this,arguments)},complete:function(){return o.inArray(!1,this.status)<0},_add:function(e){e=t.push.call(this,e)-1;return this.status[e]=!1,e},indexOf:function(e){return n.indexOf(this,e)},clear:function(){var a=this;a.ids&&0").addClass("mapster_el").hide(),a=n._add(e[0]),e.on("load.mapster",function(e){n.imageLoaded.call(n,e)}).on("error.mapster",function(e){n.imageLoadError.call(n,e)}),e.attr("src",i)}else a=n._add(o(e)[0]);if(t){if(this[t])throw t+" is already used or is not available as an altImage alias.";n.ids.push(t),n[t]=n[a]}return a}},bind:function(){var t=this,a=t.owner.options.configTimeout/50,i=function(){for(var e=t.length;0{var w=y.mapster,d=w.utils;function n(e,t,a,i){return i=i||d.when.defer(),e.activeAreaEvent&&(window.clearTimeout(e.activeAreaEvent),e.activeAreaEvent=0),t<0?i.resolve({completeAction:!1}):a.owner.currentAction||t?e.activeAreaEvent=window.setTimeout(function(){n(e,0,a,i)},t||100):(t=a.areaId,e.currentAreaId!==t&&0<=e.highlightId&&i.resolve({completeAction:!0})),i}function b(e){return!!e&&"#"!==e}function f(e){w.hasCanvas()||this.blur(),e.preventDefault()}w.MapData=function(e,t){var a=this;a.image=e,a.images=new w.MapImages(a),a.graphics=new w.Graphics(a),a.imgCssText=e.style.cssText||null,y.extend(a,{complete:!1,map:null,base_canvas:null,overlay_canvas:null,commands:[],data:[],mapAreas:[],_xref:{},highlightId:-1,currentAreaId:-1,_tooltip_events:[],scaleInfo:null,index:-1,activeAreaEvent:null,autoResizeTimer:null}),a.configureOptions(t),a.mouseover=function(e){!function(e,t){var a=e.getAllDataForArea(this),i=a.length?a[0]:null;!i||i.isNotRendered()||i.owner.currentAction||e.currentAreaId!==i.areaId&&(e.highlightId!==i.areaId&&(e.clearEffects(),i.highlight(),e.options.showToolTip)&&y.each(a,function(e,t){t.effectiveOptions().toolTip&&t.showToolTip()}),e.currentAreaId=i.areaId,d.isFunction(e.options.onMouseover))&&e.options.onMouseover.call(this,{e:t,options:i.effectiveOptions(),key:i.key,selected:i.isSelected()})}.call(this,a,e)},a.mouseout=function(e){!function(t,e){var a=t.getDataForArea(this),i=t.options;t.currentAreaId<0||!a||t.getDataForArea(e.relatedTarget)!==a&&(t.currentAreaId=-1,a.area=null,n(t,i.mouseoutDelay,a).then(function(e){e.completeAction&&t.clearEffects()}),d.isFunction(i.onMouseout))&&i.onMouseout.call(this,{e:e,options:i,key:a.key,selected:a.isSelected()})}.call(this,a,e)},a.click=function(e){!function(a,i){var n,o,s,r,e,c=this,t=a.getDataForArea(this),l=a.options;function u(e,t,a){"open"===e?window.open(t,a||"_self"):window.location.href=t}function h(e,t,a){var i;return"open"===t?{href:(i=b(t=y(e.area).attr("href")))?t:e.href,target:i?y(e.area).attr("target"):e.hrefTarget}:{href:a}}function p(e){var t;if(s=e.isSelectable()&&(e.isDeselectable()||!e.isSelected()),o=s?!e.isSelected():e.isSelected(),n=w.getBoundList(l,e.key),d.isFunction(l.onClick)&&(r=l.onClick.call(c,{e:i,listTarget:n,key:e.key,selected:o}),d.isBool(r))){if(!r)return;if(b((t=h(e,l.navigateMode,y(e.area).attr("href"))).href))return void u(l.navigateMode,t.href,t.target)}s&&e.toggle()}f.call(this,i),e=h(t,l.navigateMode,t.href),l.clickNavigate&&b(e.href)?u(l.navigateMode,e.href,e.target):t&&!t.owner.currentAction&&(l=a.options,p(t),(e=t.effectiveOptions()).includeKeys)&&(t=d.split(e.includeKeys),y.each(t,function(e,t){t=a.getDataForKey(t.toString());t.options.isMask||p(t)}))}.call(this,a,e)},a.clearEffects=function(e){!function(e){var t=e.options;e.ensureNoHighlight(),t.toolTipClose&&0<=y.inArray("area-mouseout",t.toolTipClose)&&e.activeToolTip&&e.clearToolTip()}.call(this,a,e)},a.mousedown=function(e){f.call(this,e)}},w.MapData.prototype={constructor:w.MapData,configureOptions:function(e){this.options=d.updateProps({},w.defaults,e)},bindImages:function(){var e,a,t=this,i=t.images;return 2
'),l.wrapClass&&(!0===l.wrapClass?a.addClass(s[0].className):a.addClass(l.wrapClass))),c.wrapper=a,c.scaleInfo=r=d.scaleMap(c.images[0],c.images[1],l.scaleMap,l.scaleMapBounds),c.base_canvas=e=c.graphics.createVisibleCanvas(c),c.overlay_canvas=t=c.graphics.createVisibleCanvas(c),i=y(c.images[1]).addClass("mapster_el "+c.images[0].className).attr({id:null,usemap:null}),(o=d.size(c.images[0])).complete&&i.css({width:o.width,height:o.height}),c.buildDataset(),i=y.extend({display:"block",position:"relative",padding:0},!0===l.enableAutoResizeSupport?{}:{width:r.width,height:r.height}),l.wrapCss&&y.extend(i,l.wrapCss),s.parent()[0]!==c.wrapper[0]&&s.before(c.wrapper),a.css(i),y(c.images.slice(2)).hide(),n=1;n{var a=o.mapster,n=a.utils;function s(e){e=o(e);return n.hasAttribute(e,"nohref")||!n.hasAttribute(e,"href")}a.AreaData=function(e,t,a){o.extend(this,{owner:e,key:t||"",isPrimary:!0,areaId:-1,href:"",hrefTarget:null,value:a||"",options:{},selected:null,staticStateOverridden:!1,areasXref:[],area:null,optsCache:null})},a.AreaData.prototype={constuctor:a.AreaData,select:function(e){var t=this,a=t.owner,e=(i=!o.isEmptyObject(e))?o.extend(t.effectiveRenderOptions("select"),e,{altImageId:a.images.add(e.altImage)}):null,i=i&&!(t.optsCache===e),n=t.isSelectedOrStatic();a.options.singleSelect&&(a.clearSelections(),n=t.isSelectedOrStatic()),i&&(t.optsCache=e),e=t.updateSelected(!0),n&&i?(a.graphics.removeSelections(t.areaId),a.graphics.refreshSelections()):n||t.drawSelection(),e&&t.changeState("select",!0)},deselect:function(e){var t=this,a=t.updateSelected(!1);t.optsCache=null,t.owner.graphics.removeSelections(t.areaId),e||t.owner.removeSelectionFinish(),a&&t.changeState("select",!1)},toggle:function(e){return this.isSelected()?this.deselect():this.select(e),this.isSelected()},updateSelected:function(e){var t=this.selected;return this.selected=e,this.staticStateOverridden=!!n.isBool(this.effectiveOptions().staticState),t!==e},areas:function(){for(var e=[],t=0;t{var M=x.mapster.utils;M.areaCorners=function(e,t,a,i,n){var o,s,r,c,l,u,h,p,d,f,m,g,v,y,w,b,k,S,A,T,_=0,C=0,I=[];for(e=e.length?e:[e],o=(a=x(a||document.body)).offset(),w=o.left,b=o.top,t&&(_=(o=x(t).offset()).left,C=o.top),y=0;yw&&t[1]>b)return v=t,!(s=!0)}),s||(v=[l,u])),v}})(jQuery),(d=>{var f=d.mapster,m=f.utils,e=f.MapArea.prototype;f.utils.getScaleInfo=function(e,t,a){var i;return t?(i=e.width/t.width||e.height/t.height,a&&i>a.below&&i{var e=c.mapster,l=e.utils;function u(e,t,a){var i;return t?(i="string"==typeof t?c(t):c(t).clone()).append(e):i=c(e),i.css(c.extend(a||{},{display:"block",position:"absolute"})).hide(),c("body").append(i),i.attr("data-opacity",i.css("opacity")).css("opacity",0),i.show()}function h(e,t,a,i,n,o){var s=".mapster.tooltip",a=a+s;0<=c.inArray(t,e)&&i.off(a).on(a,function(e){n&&!n.call(this,e)||(i.off(s),o&&o.call(this))})}function p(e,t,a,i,n){var o={};return n=n||{},t?(t=l.areaCorners(t,a,i,e.outerWidth(!0),e.outerHeight(!0)),o.left=t[0],o.top=t[1]):(o.left=n.left,o.top=n.top),o.left+=n.offsetx||0,o.top+=n.offsety||0,o.css=n.css,o.fadeDuration=n.fadeDuration,i={left:(a=o).left+"px",top:a.top+"px"},n=(t=e).attr("data-opacity")||0,o=t.css("z-index"),0!==parseInt(o,10)&&"auto"!==o||(i["z-index"]=9999),t.css(i).addClass("mapster_tooltip"),a.fadeDuration&&0',showToolTip:!1,toolTip:null,toolTipFade:!0,toolTipClose:["area-mouseout","image-mouseout","generic-mouseout"],onShowToolTip:null,onHideToolTip:null}),c.extend(e.area_defaults,{toolTip:null,toolTipClose:null}),e.MapData.prototype.clearToolTip=function(){this.activeToolTip&&(this.activeToolTip.stop().remove(),this.activeToolTip=null,this.activeToolTipID=null,l.ifFunction(this.options.onHideToolTip,this))},e.AreaData.prototype.showToolTip=function(e,t){var a,i,n,o=this,s=o.owner,r=o.effectiveOptions();if(t=t?c.extend({},t):{},e=e||r.toolTip,a=t.closeEvents||r.toolTipClose||s.options.toolTipClose||"tooltip-click",n=void 0!==t.template?t.template:s.options.toolTipContainer,t.closeEvents="string"==typeof a?a=l.split(a):a,t.fadeDuration=t.fadeDuration||(s.options.toolTipFade?(l.isNumeric(r.fadeDuration)?r:s.options).fadeDuration:0),i=o.area||c.map(o.areas(),function(e){return e.area}),s.activeToolTipID!==o.areaId){s.clearToolTip();var e=l.isFunction(e)?e({key:this.key,target:i}):e;if(e)return s.activeToolTip=e=u(e,n,t.css),s.activeToolTipID=o.areaId,n=function(){s.clearToolTip()},h(a,"area-click","click",c(s.map),null,n),h(a,"tooltip-click","click",e,null,n),h(a,"image-mouseout","mouseout",c(s.image),function(e){return e.relatedTarget&&"AREA"!==e.relatedTarget.nodeName&&e.relatedTarget!==o.area},n),h(a,"image-click","click",c(s.image),null,n),p(e,i,s.image,t.container,t),l.ifFunction(s.options.onShowToolTip,o.area,{toolTip:e,options:{},areaOptions:r,key:o.key,selected:o.isSelected()}),e}},e.impl.tooltip=function(s,r){return new e.Method(this,function(){var e,t,a,i,n,o=this;s?(n=(e=c(s))&&0{"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),a(t),t}:a(jQuery)})(function(jQuery){(e=>{if(e.event&&e.event.special){var i,t=!1;try{var a=Object.defineProperty({},"passive",{get:function(){return t=!0}});window.addEventListener("testPassive.mapster",function(){},a),window.removeEventListener("testPassive.mapster",function(){},a)}catch(e){}t&&(i=function(e,t,a){if(!e.includes("mapster")||!e.includes("noPreventDefault"))return!1;this.addEventListener(t,a,{passive:!0})},e.event.special.touchstart={setup:function(e,t,a){return i.call(this,t,"touchstart",a)}},e.event.special.touchend={setup:function(e,t,a){return i.call(this,t,"touchend",a)}})}})(jQuery),(c=>{c.fn.addBack=c.fn.addBack||c.fn.andSelf,c.fn.extend({actual:function(e,t){var a,i,n,o,s,r;if(this[e])return a=c.extend({absolute:!1,clone:!1,includeMargin:!1,display:"block"},t),i=this.eq(0),t=!0===a.clone?(r=function(){i=i.clone().attr("style","position: absolute !important; top: -1000 !important; ").appendTo("body")},function(){i.remove()}):(n=[],o="",r=function(){s=i.parents().addBack().filter(":hidden"),o+="visibility: hidden !important; display: "+a.display+" !important; ",!0===a.absolute&&(o+="position: absolute !important; "),s.each(function(){var e=c(this),t=e.attr("style");n.push(t),e.attr("style",t?t+";"+o:o)})},function(){s.each(function(e){var t=c(this),e=n[e];void 0===e?t.removeAttr("style"):t.attr("style",e)})}),r(),r=/(outer)/.test(e)?i[e](a.includeMargin):i[e](),t(),r;throw'$.actual => The jQuery method "'+e+'" you called does not exist'}})})(jQuery),!function($){var mapster_version="1.9.1",m=($.fn.mapster=function(e){var t=$.mapster.impl;return $.mapster.utils.isFunction(t[e])?t[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void $.error("Method "+e+" does not exist on jQuery.mapster"):t.bind.apply(this,arguments)},$.mapster={version:mapster_version,render_defaults:{isSelectable:!0,isDeselectable:!0,fade:!1,fadeDuration:150,fill:!0,fillColor:"000000",fillColorMask:"FFFFFF",fillOpacity:.7,highlight:!0,stroke:!1,strokeColor:"ff0000",strokeOpacity:1,strokeWidth:1,includeKeys:"",altImage:null,altImageId:null,altImages:{},altImageOpacity:null},defaults:{clickNavigate:!1,navigateMode:"location",wrapClass:null,wrapCss:null,onGetList:null,sortList:!1,mapKey:"",mapValue:"",singleSelect:!1,listKey:"value",listSelectedAttribute:"selected",listSelectedClass:null,onClick:null,onMouseover:null,onMouseout:null,mouseoutDelay:0,onStateChange:null,boundList:null,onConfigured:null,configTimeout:3e4,noHrefIsMask:!0,scaleMap:!0,scaleMapBounds:{below:.98,above:1.02},enableAutoResizeSupport:!1,autoResize:!1,autoResizeDelay:0,autoResizeDuration:0,onAutoResize:null,areas:[]},shared_defaults:{render_highlight:{fade:!0},render_select:{fade:!1},staticState:null,selected:null},area_defaults:{includeKeys:"",isMask:!1},canvas_style:{position:"absolute",left:0,top:0,padding:0,border:0},hasCanvas:null,map_cache:[],hooks:{},addHook:function(e,t){this.hooks[e]=(this.hooks[e]||[]).push(t)},callHooks:function(e,a){$.each(this.hooks[e]||[],function(e,t){t.apply(a)})},utils:{when:{all:function(e){return Promise.all(e)},defer:function(){return new function(){this.promise=new Promise(function(e,t){this.resolve=e,this.reject=t}.bind(this)),this.then=this.promise.then.bind(this.promise),this.catch=this.promise.catch.bind(this.promise)}}},defer:function(){return this.when.defer()},subclass:function(a,i){function e(){var e=this,t=Array.prototype.slice.call(arguments,0);e.base=a.prototype,e.base.init=function(){a.prototype.constructor.apply(e,t)},i.apply(e,t)}return(e.prototype=new a).constructor=e},asArray:function(e){return e.constructor===Array?e:this.split(e)},split:function(e,t){for(var a,i=e.split(","),n=0;n{function c(e,t,a,i){var n,o,s=i/15,r=$.mapster.utils;if("number"==typeof e){if(!(o=l[e]))return}else(n=r.indexOfProp(l,null,e))&&delete l[n],l[++u]=o=e,e=u;t=(a=a||1)-.01=e.index;t--)m.map_cache[t].index--};function hasVml(){var e=$("
").appendTo("body"),t=(e.html(''),e[0].firstChild),t=(t.style.behavior="url(#default#VML)",!t||"object"==typeof t.adj);return e.remove(),t}function namespaces(){return"object"==typeof document.namespaces?document.namespaces:null}function hasCanvas(){var e=namespaces();return!(e&&e.g_vml_||!$("")[0].getContext)}function merge_areas(a,e){var i,n=a.options.areas;e&&$.each(e,function(e,t){t&&t.key&&(0<=(i=u.indexOfProp(n,"key",t.key))?$.extend(n[i],t):n.push(t),i=a.getDataForKey(t.key))&&$.extend(i.options,t)})}function merge_options(e,t){var a=u.updateProps({},t);delete a.areas,u.updateProps(e.options,a),merge_areas(e,t.areas),u.updateProps(e.area_options,e.options)}return me.get=function(e){var t=m.getMapData(this);if(t&&t.complete)return new m.Method(this,function(){return this.getSelected()},function(){return this.isSelected()},{name:"get",args:arguments,key:e,first:!0,allowAsync:!0,defaultReturn:""}).go();throw"Can't access data until binding complete."},me.data=function(e){return new m.Method(this,null,function(){return this},{name:"data",args:arguments,key:e}).go()},me.highlight=function(t){return new m.Method(this,function(){var e;if(!1!==t)return 0<=(e=this.highlightId)?this.data[e].key:null;this.ensureNoHighlight()},function(){this.highlight()},{name:"highlight",args:arguments,key:t,first:!0}).go()},me.keys=function(e,i){var n=[],a=m.getMapData(this);if(a&&a.complete)return a&&a.complete?("string"==typeof e?i?o(a.getDataForKey(e)):n=[a.getKeysForGroup(e)]:(i=e,this.each(function(e,t){"AREA"===t.nodeName&&o(a.getDataForArea(t))})),n.join(",")):"";throw"Can't access data until binding complete.";function o(e){var t,a=[];i?(t=e.areas(),$.each(t,function(e,t){a=a.concat(t.keys)})):a.push(e.key),$.each(a,function(e,t){$.inArray(t,n)<0&&n.push(t)})}},me.select=function(){me.set.call(this,!0)},me.deselect=function(){me.set.call(this,!1)},me.set=function(i,n,e){var o,s,r,c,l=e;function h(e){e&&$.inArray(e,c)<0&&(c.push(e),r+=(""===r?"":",")+e.key)}function p(e){$.each(c,function(e,t){var a=t;if(a)switch(i){case!0:a.select(l);break;case!1:a.deselect(!0);break;default:a.toggle(l)}}),i||e.removeSelectionFinish()}return this.filter("img,area").each(function(e,t){var a;(s=m.getMapData(t))!==o&&(o&&p(o),c=[],r=""),s&&(a="","IMG"===t.nodeName.toUpperCase()?m.queueCommand(s,$(t),"set",[i,n,l])||(n instanceof Array?n.length&&(a=n.join(",")):a=n,a&&$.each(u.split(a),function(e,t){h(s.getDataForKey(t.toString())),o=s})):(l=n,m.queueCommand(s,$(t),"set",[i,l])||(h(s.getDataForArea(t)),o=s)))}),s&&p(s),this},me.unbind=function(e){return new m.Method(this,function(){this.clearEvents(),this.clearMapData(e),removeMap(this)},null,{name:"unbind",args:arguments}).go()},me.rebind=function(t){return new m.Method(this,function(){var e=this;e.complete=!1,e.configureOptions(t),e.bindImages().then(function(){e.buildDataset(!0),e.complete=!0,e.onConfigured()})},null,{name:"rebind",args:arguments}).go()},me.get_options=function(e,t){var a=u.isBool(e)?e:t;return new m.Method(this,function(){var e=$.extend({},this.options);return a&&(e.render_select=u.updateProps({},m.render_defaults,e,e.render_select),e.render_highlight=u.updateProps({},m.render_defaults,e,e.render_highlight)),e},function(){return a?this.effectiveOptions():this.options},{name:"get_options",args:arguments,first:!0,allowAsync:!0,key:e}).go()},me.set_options=function(e){return new m.Method(this,function(){merge_options(this,e)},null,{name:"set_options",args:arguments}).go()},me.unload=function(){for(var e=m.map_cache.length-1;0<=e;e--)m.map_cache[e]&&me.unbind.call($(m.map_cache[e].image));me.graphics=null},me.snapshot=function(){return new m.Method(this,function(){$.each(this.data,function(e,t){t.selected=!1}),this.base_canvas=this.graphics.createVisibleCanvas(this),$(this.image).before(this.base_canvas)},null,{name:"snapshot"}).go()},me.state=function(){var a,i=null;return $(this).each(function(e,t){if("IMG"===t.nodeName)return(a=m.getMapData(t))&&(i=a.state()),!1}),i},me.bind=function(o){return this.each(function(e,t){var a,i=$(t),n=m.getMapData(t);if(n){if(me.unbind.apply(i),!n.complete)return!0;n=null}if(a=(t=this.getAttribute("usemap"))&&$('map[name="'+t.substr(1)+'"]'),!(i.is("img")&&t&&0{var i,n,o,r=h.mapster,c=r.utils;function l(e,t,a){var i=e,n=i.map_data,o=a.isMask;h.each(t.areas(),function(e,t){a.isMask=o||t.nohref&&n.options.noHrefIsMask,i.addShape(t,a)}),a.isMask=o}function a(e){return Math.max(0,Math.min(parseInt(e,16),255))}function u(e,t){return"rgba("+a(e.substr(0,2))+","+a(e.substr(2,2))+","+a(e.substr(4,2))+","+t+")"}function s(){}r.Graphics=function(e){var t=this;t.active=!1,t.canvas=null,t.width=0,t.height=0,t.shapes=[],t.masks=[],t.map_data=e},i=r.Graphics.prototype={constructor:r.Graphics,begin:function(e,t){var a=h(e);this.elementName=t,this.canvas=e,this.width=a.width(),this.height=a.height(),this.shapes=[],this.masks=[],this.active=!0},addShape:function(e,t){(t.isMask?this.masks:this.shapes).push({mapArea:e,options:t})},createVisibleCanvas:function(e){return h(this.createCanvasFor(e)).addClass("mapster_el").css(r.canvas_style)[0]},addShapeGroup:function(e,a,t){var i,n=this,o=this.map_data,s=e.effectiveRenderOptions(a);t&&h.extend(s,t),t="select"===a?(i="static_"+e.areaId.toString(),o.base_canvas):o.overlay_canvas,n.begin(t,i),s.includeKeys&&(i=c.split(s.includeKeys),h.each(i,function(e,t){t=o.getDataForKey(t.toString());l(n,t,t.effectiveRenderOptions(a))})),l(n,e,s),n.render(),s.fade&&c.fader(r.hasCanvas()?t:h(t).find("._fill").not(".mapster_mask"),0,r.hasCanvas()?1:s.fillOpacity,s.fadeDuration)}},n={renderShape:function(e,t,a){var i,n=t.coords(null,a);switch(t.shape){case"rect":case"rectangle":e.rect(n[0],n[1],n[2]-n[0],n[3]-n[1]);break;case"poly":case"polygon":for(e.moveTo(n[0],n[1]),i=2;i')[0]},clearHighlight:function(){var e=this.map_data.overlay_canvas;e.getContext("2d").clearRect(0,0,e.width,e.height)},refreshSelections:function(){var e=this.map_data,t=e.base_canvas;e.base_canvas=this.createVisibleCanvas(e),h(e.base_canvas).hide(),h(t).before(e.base_canvas),e.redrawSelections(),h(e.base_canvas).show(),h(t).remove()}},o={renderShape:function(e,t,a){var i,n=this,o=e.coords(),s=n.elementName?'name="'+n.elementName+'" ':"",r=a?'class="'+a+'" ':"",c='',l=t.stroke?" strokeweight="+t.strokeWidth+' stroked="t" strokecolor="#'+t.strokeColor+'"':' stroked="f"',u=t.fill?' filled="t"':' filled="f"';switch(e.shape){case"rect":case"rectangle":i="'+c+"";break;case"poly":case"polygon":i="'+c+"";break;case"circ":case"circle":i="'+c+""}return a=h(i),h(n.canvas).append(a),a},render:function(){var a,i=this;return h.each(this.shapes,function(e,t){i.renderShape(t.mapArea,t.options)}),this.masks.length&&h.each(this.masks,function(e,t){a=c.updateProps({},t.options,{fillOpacity:1,fillColor:t.options.fillColorMask}),i.renderShape(t.mapArea,a,"mapster_mask")}),this.active=!1,this.canvas},createCanvasFor:function(e){var t=e.scaleInfo.width,e=e.scaleInfo.height;return h('')[0]},clearHighlight:function(){h(this.map_data.overlay_canvas).children().remove()},removeSelections:function(e){(0<=e?h(this.map_data.base_canvas).find('[name="static_'+e.toString()+'"]'):h(this.map_data.base_canvas).children()).remove()}},h.each(["renderShape","addAltImage","render","createCanvasFor","clearHighlight","removeSelections","refreshSelections"],function(e,t){var a;i[t]=(a=t,function(){return i[a]=(r.hasCanvas()?n:o)[a]||s,i[a].apply(this,arguments)})})})(jQuery),(o=>{var e=o.mapster,n=e.utils,t=[];e.MapImages=function(e){this.owner=e,this.clear()},e.MapImages.prototype={constructor:e.MapImages,slice:function(){return t.slice.apply(this,arguments)},splice:function(){return t.slice.apply(this.status,arguments),t.slice.apply(this,arguments)},complete:function(){return o.inArray(!1,this.status)<0},_add:function(e){e=t.push.call(this,e)-1;return this.status[e]=!1,e},indexOf:function(e){return n.indexOf(this,e)},clear:function(){var a=this;a.ids&&0").addClass("mapster_el").hide(),a=n._add(e[0]),e.on("load.mapster",function(e){n.imageLoaded.call(n,e)}).on("error.mapster",function(e){n.imageLoadError.call(n,e)}),e.attr("src",i)}else a=n._add(o(e)[0]);if(t){if(this[t])throw t+" is already used or is not available as an altImage alias.";n.ids.push(t),n[t]=n[a]}return a}},bind:function(){var t=this,a=t.owner.options.configTimeout/50,i=function(){for(var e=t.length;0{var w=y.mapster,d=w.utils;function n(e,t,a,i){return i=i||d.when.defer(),e.activeAreaEvent&&(window.clearTimeout(e.activeAreaEvent),e.activeAreaEvent=0),t<0?i.resolve({completeAction:!1}):a.owner.currentAction||t?e.activeAreaEvent=window.setTimeout(function(){n(e,0,a,i)},t||100):(t=a.areaId,e.currentAreaId!==t&&0<=e.highlightId&&i.resolve({completeAction:!0})),i}function b(e){return!!e&&"#"!==e}function f(e){w.hasCanvas()||this.blur(),e.preventDefault()}w.MapData=function(e,t){var a=this;a.image=e,a.images=new w.MapImages(a),a.graphics=new w.Graphics(a),a.imgCssText=e.style.cssText||null,y.extend(a,{complete:!1,map:null,base_canvas:null,overlay_canvas:null,commands:[],data:[],mapAreas:[],_xref:{},highlightId:-1,currentAreaId:-1,_tooltip_events:[],scaleInfo:null,index:-1,activeAreaEvent:null,autoResizeTimer:null}),a.configureOptions(t),a.mouseover=function(e){!function(e,t){var a=e.getAllDataForArea(this),i=a.length?a[0]:null;!i||i.isNotRendered()||i.owner.currentAction||e.currentAreaId!==i.areaId&&(e.highlightId!==i.areaId&&(e.clearEffects(),i.highlight(),e.options.showToolTip)&&y.each(a,function(e,t){t.effectiveOptions().toolTip&&t.showToolTip()}),e.currentAreaId=i.areaId,d.isFunction(e.options.onMouseover))&&e.options.onMouseover.call(this,{e:t,options:i.effectiveOptions(),key:i.key,selected:i.isSelected()})}.call(this,a,e)},a.mouseout=function(e){!function(t,e){var a=t.getDataForArea(this),i=t.options;t.currentAreaId<0||!a||t.getDataForArea(e.relatedTarget)!==a&&(t.currentAreaId=-1,a.area=null,n(t,i.mouseoutDelay,a).then(function(e){e.completeAction&&t.clearEffects()}),d.isFunction(i.onMouseout))&&i.onMouseout.call(this,{e:e,options:i,key:a.key,selected:a.isSelected()})}.call(this,a,e)},a.click=function(e){!function(a,i){var n,o,s,r,e,c=this,t=a.getDataForArea(this),l=a.options;function u(e,t,a){"open"===e?window.open(t,a||"_self"):window.location.href=t}function h(e,t,a){var i;return"open"===t?{href:(i=b(t=y(e.area).attr("href")))?t:e.href,target:i?y(e.area).attr("target"):e.hrefTarget}:{href:a}}function p(e){var t;if(s=e.isSelectable()&&(e.isDeselectable()||!e.isSelected()),o=s?!e.isSelected():e.isSelected(),n=w.getBoundList(l,e.key),d.isFunction(l.onClick)&&(r=l.onClick.call(c,{e:i,listTarget:n,key:e.key,selected:o}),d.isBool(r))){if(!r)return;if(b((t=h(e,l.navigateMode,y(e.area).attr("href"))).href))return void u(l.navigateMode,t.href,t.target)}s&&e.toggle()}f.call(this,i),e=h(t,l.navigateMode,t.href),l.clickNavigate&&b(e.href)?u(l.navigateMode,e.href,e.target):t&&!t.owner.currentAction&&(l=a.options,p(t),(e=t.effectiveOptions()).includeKeys)&&(t=d.split(e.includeKeys),y.each(t,function(e,t){t=a.getDataForKey(t.toString());t.options.isMask||p(t)}))}.call(this,a,e)},a.clearEffects=function(e){!function(e){var t=e.options;e.ensureNoHighlight(),t.toolTipClose&&0<=y.inArray("area-mouseout",t.toolTipClose)&&e.activeToolTip&&e.clearToolTip()}.call(this,a,e)},a.mousedown=function(e){f.call(this,e)}},w.MapData.prototype={constructor:w.MapData,configureOptions:function(e){this.options=d.updateProps({},w.defaults,e)},bindImages:function(){var e,a,t=this,i=t.images;return 2
'),l.wrapClass&&(!0===l.wrapClass?a.addClass(s[0].className):a.addClass(l.wrapClass))),c.wrapper=a,c.scaleInfo=r=d.scaleMap(c.images[0],c.images[1],l.scaleMap,l.scaleMapBounds),c.base_canvas=e=c.graphics.createVisibleCanvas(c),c.overlay_canvas=t=c.graphics.createVisibleCanvas(c),i=y(c.images[1]).addClass("mapster_el "+c.images[0].className).attr({id:null,usemap:null}),(o=d.size(c.images[0])).complete&&i.css({width:o.width,height:o.height}),c.buildDataset(),i=y.extend({display:"block",position:"relative",padding:0},!0===l.enableAutoResizeSupport?{}:{width:r.width,height:r.height}),l.wrapCss&&y.extend(i,l.wrapCss),s.parent()[0]!==c.wrapper[0]&&s.before(c.wrapper),a.css(i),y(c.images.slice(2)).hide(),n=1;n{var a=o.mapster,n=a.utils;function s(e){e=o(e);return n.hasAttribute(e,"nohref")||!n.hasAttribute(e,"href")}a.AreaData=function(e,t,a){o.extend(this,{owner:e,key:t||"",isPrimary:!0,areaId:-1,href:"",hrefTarget:null,value:a||"",options:{},selected:null,staticStateOverridden:!1,areasXref:[],area:null,optsCache:null})},a.AreaData.prototype={constuctor:a.AreaData,select:function(e){var t=this,a=t.owner,e=(i=!o.isEmptyObject(e))?o.extend(t.effectiveRenderOptions("select"),e,{altImageId:a.images.add(e.altImage)}):null,i=i&&!(t.optsCache===e),n=t.isSelectedOrStatic();a.options.singleSelect&&(a.clearSelections(),n=t.isSelectedOrStatic()),i&&(t.optsCache=e),e=t.updateSelected(!0),n&&i?(a.graphics.removeSelections(t.areaId),a.graphics.refreshSelections()):n||t.drawSelection(),e&&t.changeState("select",!0)},deselect:function(e){var t=this,a=t.updateSelected(!1);t.optsCache=null,t.owner.graphics.removeSelections(t.areaId),e||t.owner.removeSelectionFinish(),a&&t.changeState("select",!1)},toggle:function(e){return this.isSelected()?this.deselect():this.select(e),this.isSelected()},updateSelected:function(e){var t=this.selected;return this.selected=e,this.staticStateOverridden=!!n.isBool(this.effectiveOptions().staticState),t!==e},areas:function(){for(var e=[],t=0;t{var M=x.mapster.utils;M.areaCorners=function(e,t,a,i,n){var o,s,r,c,l,u,h,p,d,f,m,g,v,y,w,b,k,S,A,T,_=0,C=0,I=[];for(e=e.length?e:[e],o=(a=x(a||document.body)).offset(),w=o.left,b=o.top,t&&(_=(o=x(t).offset()).left,C=o.top),y=0;yw&&t[1]>b)return v=t,!(s=!0)}),s||(v=[l,u])),v}})(jQuery),(d=>{var f=d.mapster,m=f.utils,e=f.MapArea.prototype;f.utils.getScaleInfo=function(e,t,a){var i;return t?(i=e.width/t.width||e.height/t.height,a&&i>a.below&&i{var e=c.mapster,l=e.utils;function u(e,t,a){var i;return t?(i="string"==typeof t?c(t):c(t).clone()).append(e):i=c(e),i.css(c.extend(a||{},{display:"block",position:"absolute"})).hide(),c("body").append(i),i.attr("data-opacity",i.css("opacity")).css("opacity",0),i.show()}function h(e,t,a,i,n,o){var s=".mapster.tooltip",a=a+s;0<=c.inArray(t,e)&&i.off(a).on(a,function(e){n&&!n.call(this,e)||(i.off(s),o&&o.call(this))})}function p(e,t,a,i,n){var o={};return n=n||{},t?(t=l.areaCorners(t,a,i,e.outerWidth(!0),e.outerHeight(!0)),o.left=t[0],o.top=t[1]):(o.left=n.left,o.top=n.top),o.left+=n.offsetx||0,o.top+=n.offsety||0,o.css=n.css,o.fadeDuration=n.fadeDuration,i={left:(a=o).left+"px",top:a.top+"px"},n=(t=e).attr("data-opacity")||0,o=t.css("z-index"),0!==parseInt(o,10)&&"auto"!==o||(i["z-index"]=9999),t.css(i).addClass("mapster_tooltip"),a.fadeDuration&&0',showToolTip:!1,toolTip:null,toolTipFade:!0,toolTipClose:["area-mouseout","image-mouseout","generic-mouseout"],onShowToolTip:null,onHideToolTip:null}),c.extend(e.area_defaults,{toolTip:null,toolTipClose:null}),e.MapData.prototype.clearToolTip=function(){this.activeToolTip&&(this.activeToolTip.stop().remove(),this.activeToolTip=null,this.activeToolTipID=null,l.ifFunction(this.options.onHideToolTip,this))},e.AreaData.prototype.showToolTip=function(e,t){var a,i,n,o=this,s=o.owner,r=o.effectiveOptions();if(t=t?c.extend({},t):{},e=e||r.toolTip,a=t.closeEvents||r.toolTipClose||s.options.toolTipClose||"tooltip-click",n=void 0!==t.template?t.template:s.options.toolTipContainer,t.closeEvents="string"==typeof a?a=l.split(a):a,t.fadeDuration=t.fadeDuration||(s.options.toolTipFade?(l.isNumeric(r.fadeDuration)?r:s.options).fadeDuration:0),i=o.area||c.map(o.areas(),function(e){return e.area}),s.activeToolTipID!==o.areaId){s.clearToolTip();var e=l.isFunction(e)?e({key:this.key,target:i}):e;if(e)return s.activeToolTip=e=u(e,n,t.css),s.activeToolTipID=o.areaId,n=function(){s.clearToolTip()},h(a,"area-click","click",c(s.map),null,n),h(a,"tooltip-click","click",e,null,n),h(a,"image-mouseout","mouseout",c(s.image),function(e){return e.relatedTarget&&"AREA"!==e.relatedTarget.nodeName&&e.relatedTarget!==o.area},n),h(a,"image-click","click",c(s.image),null,n),p(e,i,s.image,t.container,t),l.ifFunction(s.options.onShowToolTip,o.area,{toolTip:e,options:{},areaOptions:r,key:o.key,selected:o.isSelected()}),e}},e.impl.tooltip=function(s,r){return new e.Method(this,function(){var e,t,a,i,n,o=this;s?(n=(e=c(s))&&0{if(e.event&&e.event.special){var i,t=!1;try{var a=Object.defineProperty({},"passive",{get:function(){return t=!0}});window.addEventListener("testPassive.mapster",function(){},a),window.removeEventListener("testPassive.mapster",function(){},a)}catch(e){}t&&(i=function(e,t,a){if(!e.includes("mapster")||!e.includes("noPreventDefault"))return!1;this.addEventListener(t,a,{passive:!0})},e.event.special.touchstart={setup:function(e,t,a){return i.call(this,t,"touchstart",a)}},e.event.special.touchend={setup:function(e,t,a){return i.call(this,t,"touchend",a)}})}})(jQuery),(c=>{c.fn.addBack=c.fn.addBack||c.fn.andSelf,c.fn.extend({actual:function(e,t){var a,i,n,o,s,r;if(this[e])return a=c.extend({absolute:!1,clone:!1,includeMargin:!1,display:"block"},t),i=this.eq(0),t=!0===a.clone?(r=function(){i=i.clone().attr("style","position: absolute !important; top: -1000 !important; ").appendTo("body")},function(){i.remove()}):(n=[],o="",r=function(){s=i.parents().addBack().filter(":hidden"),o+="visibility: hidden !important; display: "+a.display+" !important; ",!0===a.absolute&&(o+="position: absolute !important; "),s.each(function(){var e=c(this),t=e.attr("style");n.push(t),e.attr("style",t?t+";"+o:o)})},function(){s.each(function(e){var t=c(this),e=n[e];void 0===e?t.removeAttr("style"):t.attr("style",e)})}),r(),r=/(outer)/.test(e)?i[e](a.includeMargin):i[e](),t(),r;throw'$.actual => The jQuery method "'+e+'" you called does not exist'}})})(jQuery),!function($){var mapster_version="1.9.0",m=($.fn.mapster=function(e){var t=$.mapster.impl;return $.mapster.utils.isFunction(t[e])?t[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void $.error("Method "+e+" does not exist on jQuery.mapster"):t.bind.apply(this,arguments)},$.mapster={version:mapster_version,render_defaults:{isSelectable:!0,isDeselectable:!0,fade:!1,fadeDuration:150,fill:!0,fillColor:"000000",fillColorMask:"FFFFFF",fillOpacity:.7,highlight:!0,stroke:!1,strokeColor:"ff0000",strokeOpacity:1,strokeWidth:1,includeKeys:"",altImage:null,altImageId:null,altImages:{},altImageOpacity:null},defaults:{clickNavigate:!1,navigateMode:"location",wrapClass:null,wrapCss:null,onGetList:null,sortList:!1,mapKey:"",mapValue:"",singleSelect:!1,listKey:"value",listSelectedAttribute:"selected",listSelectedClass:null,onClick:null,onMouseover:null,onMouseout:null,mouseoutDelay:0,onStateChange:null,boundList:null,onConfigured:null,configTimeout:3e4,noHrefIsMask:!0,scaleMap:!0,scaleMapBounds:{below:.98,above:1.02},enableAutoResizeSupport:!1,autoResize:!1,autoResizeDelay:0,autoResizeDuration:0,onAutoResize:null,areas:[]},shared_defaults:{render_highlight:{fade:!0},render_select:{fade:!1},staticState:null,selected:null},area_defaults:{includeKeys:"",isMask:!1},canvas_style:{position:"absolute",left:0,top:0,padding:0,border:0},hasCanvas:null,map_cache:[],hooks:{},addHook:function(e,t){this.hooks[e]=(this.hooks[e]||[]).push(t)},callHooks:function(e,a){$.each(this.hooks[e]||[],function(e,t){t.apply(a)})},utils:{when:{all:function(e){return Promise.all(e)},defer:function(){return new function(){this.promise=new Promise(function(e,t){this.resolve=e,this.reject=t}.bind(this)),this.then=this.promise.then.bind(this.promise),this.catch=this.promise.catch.bind(this.promise)}}},defer:function(){return this.when.defer()},subclass:function(a,i){function e(){var e=this,t=Array.prototype.slice.call(arguments,0);e.base=a.prototype,e.base.init=function(){a.prototype.constructor.apply(e,t)},i.apply(e,t)}return(e.prototype=new a).constructor=e},asArray:function(e){return e.constructor===Array?e:this.split(e)},split:function(e,t){for(var a,i=e.split(","),n=0;n{var c={},l=0,u=function(e,t,a,i){var n,o,s=i/15,r=$.mapster.utils;if("number"==typeof e){if(!(o=c[e]))return}else(n=r.indexOfProp(c,null,e))&&delete c[n],c[++l]=o=e,e=l;t=(a=a||1)-.01=e.index;t--)m.map_cache[t].index--};function hasVml(){var e=$("
").appendTo("body"),t=(e.html(''),e[0].firstChild),t=(t.style.behavior="url(#default#VML)",!t||"object"==typeof t.adj);return e.remove(),t}function namespaces(){return"object"==typeof document.namespaces?document.namespaces:null}function hasCanvas(){var e=namespaces();return!(e&&e.g_vml_||!$("")[0].getContext)}function merge_areas(a,e){var i,n=a.options.areas;e&&$.each(e,function(e,t){t&&t.key&&(0<=(i=u.indexOfProp(n,"key",t.key))?$.extend(n[i],t):n.push(t),i=a.getDataForKey(t.key))&&$.extend(i.options,t)})}function merge_options(e,t){var a=u.updateProps({},t);delete a.areas,u.updateProps(e.options,a),merge_areas(e,t.areas),u.updateProps(e.area_options,e.options)}return me.get=function(e){var t=m.getMapData(this);if(t&&t.complete)return new m.Method(this,function(){return this.getSelected()},function(){return this.isSelected()},{name:"get",args:arguments,key:e,first:!0,allowAsync:!0,defaultReturn:""}).go();throw"Can't access data until binding complete."},me.data=function(e){return new m.Method(this,null,function(){return this},{name:"data",args:arguments,key:e}).go()},me.highlight=function(t){return new m.Method(this,function(){var e;if(!1!==t)return 0<=(e=this.highlightId)?this.data[e].key:null;this.ensureNoHighlight()},function(){this.highlight()},{name:"highlight",args:arguments,key:t,first:!0}).go()},me.keys=function(e,i){var n=[],a=m.getMapData(this);if(a&&a.complete)return a&&a.complete?("string"==typeof e?i?o(a.getDataForKey(e)):n=[a.getKeysForGroup(e)]:(i=e,this.each(function(e,t){"AREA"===t.nodeName&&o(a.getDataForArea(t))})),n.join(",")):"";throw"Can't access data until binding complete.";function o(e){var t,a=[];i?(t=e.areas(),$.each(t,function(e,t){a=a.concat(t.keys)})):a.push(e.key),$.each(a,function(e,t){$.inArray(t,n)<0&&n.push(t)})}},me.select=function(){me.set.call(this,!0)},me.deselect=function(){me.set.call(this,!1)},me.set=function(i,n,e){var o,s,r,c,l=e;function h(e){e&&$.inArray(e,c)<0&&(c.push(e),r+=(""===r?"":",")+e.key)}function p(e){$.each(c,function(e,t){var a=t;if(a)switch(i){case!0:a.select(l);break;case!1:a.deselect(!0);break;default:a.toggle(l)}}),i||e.removeSelectionFinish()}return this.filter("img,area").each(function(e,t){var a;(s=m.getMapData(t))!==o&&(o&&p(o),c=[],r=""),s&&(a="","IMG"===t.nodeName.toUpperCase()?m.queueCommand(s,$(t),"set",[i,n,l])||(n instanceof Array?n.length&&(a=n.join(",")):a=n,a&&$.each(u.split(a),function(e,t){h(s.getDataForKey(t.toString())),o=s})):(l=n,m.queueCommand(s,$(t),"set",[i,l])||(h(s.getDataForArea(t)),o=s)))}),s&&p(s),this},me.unbind=function(e){return new m.Method(this,function(){this.clearEvents(),this.clearMapData(e),removeMap(this)},null,{name:"unbind",args:arguments}).go()},me.rebind=function(t){return new m.Method(this,function(){var e=this;e.complete=!1,e.configureOptions(t),e.bindImages().then(function(){e.buildDataset(!0),e.complete=!0,e.onConfigured()})},null,{name:"rebind",args:arguments}).go()},me.get_options=function(e,t){var a=u.isBool(e)?e:t;return new m.Method(this,function(){var e=$.extend({},this.options);return a&&(e.render_select=u.updateProps({},m.render_defaults,e,e.render_select),e.render_highlight=u.updateProps({},m.render_defaults,e,e.render_highlight)),e},function(){return a?this.effectiveOptions():this.options},{name:"get_options",args:arguments,first:!0,allowAsync:!0,key:e}).go()},me.set_options=function(e){return new m.Method(this,function(){merge_options(this,e)},null,{name:"set_options",args:arguments}).go()},me.unload=function(){for(var e=m.map_cache.length-1;0<=e;e--)m.map_cache[e]&&me.unbind.call($(m.map_cache[e].image));me.graphics=null},me.snapshot=function(){return new m.Method(this,function(){$.each(this.data,function(e,t){t.selected=!1}),this.base_canvas=this.graphics.createVisibleCanvas(this),$(this.image).before(this.base_canvas)},null,{name:"snapshot"}).go()},me.state=function(){var a,i=null;return $(this).each(function(e,t){if("IMG"===t.nodeName)return(a=m.getMapData(t))&&(i=a.state()),!1}),i},me.bind=function(o){return this.each(function(e,t){var a,i=$(t),n=m.getMapData(t);if(n){if(me.unbind.apply(i),!n.complete)return!0;n=null}if(a=(t=this.getAttribute("usemap"))&&$('map[name="'+t.substr(1)+'"]'),!(i.is("img")&&t&&0{var i,n,o,r=h.mapster,c=r.utils;function l(e,t,a){var i=e,n=i.map_data,o=a.isMask;h.each(t.areas(),function(e,t){a.isMask=o||t.nohref&&n.options.noHrefIsMask,i.addShape(t,a)}),a.isMask=o}function a(e){return Math.max(0,Math.min(parseInt(e,16),255))}function u(e,t){return"rgba("+a(e.substr(0,2))+","+a(e.substr(2,2))+","+a(e.substr(4,2))+","+t+")"}function s(){}r.Graphics=function(e){var t=this;t.active=!1,t.canvas=null,t.width=0,t.height=0,t.shapes=[],t.masks=[],t.map_data=e},i=r.Graphics.prototype={constructor:r.Graphics,begin:function(e,t){var a=h(e);this.elementName=t,this.canvas=e,this.width=a.width(),this.height=a.height(),this.shapes=[],this.masks=[],this.active=!0},addShape:function(e,t){(t.isMask?this.masks:this.shapes).push({mapArea:e,options:t})},createVisibleCanvas:function(e){return h(this.createCanvasFor(e)).addClass("mapster_el").css(r.canvas_style)[0]},addShapeGroup:function(e,a,t){var i,n=this,o=this.map_data,s=e.effectiveRenderOptions(a);t&&h.extend(s,t),t="select"===a?(i="static_"+e.areaId.toString(),o.base_canvas):o.overlay_canvas,n.begin(t,i),s.includeKeys&&(i=c.split(s.includeKeys),h.each(i,function(e,t){t=o.getDataForKey(t.toString());l(n,t,t.effectiveRenderOptions(a))})),l(n,e,s),n.render(),s.fade&&c.fader(r.hasCanvas()?t:h(t).find("._fill").not(".mapster_mask"),0,r.hasCanvas()?1:s.fillOpacity,s.fadeDuration)}},n={renderShape:function(e,t,a){var i,n=t.coords(null,a);switch(t.shape){case"rect":case"rectangle":e.rect(n[0],n[1],n[2]-n[0],n[3]-n[1]);break;case"poly":case"polygon":for(e.moveTo(n[0],n[1]),i=2;i')[0]},clearHighlight:function(){var e=this.map_data.overlay_canvas;e.getContext("2d").clearRect(0,0,e.width,e.height)},refreshSelections:function(){var e=this.map_data,t=e.base_canvas;e.base_canvas=this.createVisibleCanvas(e),h(e.base_canvas).hide(),h(t).before(e.base_canvas),e.redrawSelections(),h(e.base_canvas).show(),h(t).remove()}},o={renderShape:function(e,t,a){var i,n=this,o=e.coords(),s=n.elementName?'name="'+n.elementName+'" ':"",r=a?'class="'+a+'" ':"",c='',l=t.stroke?" strokeweight="+t.strokeWidth+' stroked="t" strokecolor="#'+t.strokeColor+'"':' stroked="f"',u=t.fill?' filled="t"':' filled="f"';switch(e.shape){case"rect":case"rectangle":i="'+c+"";break;case"poly":case"polygon":i="'+c+"";break;case"circ":case"circle":i="'+c+""}return a=h(i),h(n.canvas).append(a),a},render:function(){var a,i=this;return h.each(this.shapes,function(e,t){i.renderShape(t.mapArea,t.options)}),this.masks.length&&h.each(this.masks,function(e,t){a=c.updateProps({},t.options,{fillOpacity:1,fillColor:t.options.fillColorMask}),i.renderShape(t.mapArea,a,"mapster_mask")}),this.active=!1,this.canvas},createCanvasFor:function(e){var t=e.scaleInfo.width,e=e.scaleInfo.height;return h('')[0]},clearHighlight:function(){h(this.map_data.overlay_canvas).children().remove()},removeSelections:function(e){(0<=e?h(this.map_data.base_canvas).find('[name="static_'+e.toString()+'"]'):h(this.map_data.base_canvas).children()).remove()}},h.each(["renderShape","addAltImage","render","createCanvasFor","clearHighlight","removeSelections","refreshSelections"],function(e,t){var a;i[t]=(a=t,function(){return i[a]=(r.hasCanvas()?n:o)[a]||s,i[a].apply(this,arguments)})})})(jQuery),(o=>{var e=o.mapster,n=e.utils,t=[];e.MapImages=function(e){this.owner=e,this.clear()},e.MapImages.prototype={constructor:e.MapImages,slice:function(){return t.slice.apply(this,arguments)},splice:function(){return t.slice.apply(this.status,arguments),t.slice.apply(this,arguments)},complete:function(){return o.inArray(!1,this.status)<0},_add:function(e){e=t.push.call(this,e)-1;return this.status[e]=!1,e},indexOf:function(e){return n.indexOf(this,e)},clear:function(){var a=this;a.ids&&0").addClass("mapster_el").hide(),a=n._add(e[0]),e.on("load.mapster",function(e){n.imageLoaded.call(n,e)}).on("error.mapster",function(e){n.imageLoadError.call(n,e)}),e.attr("src",i)}else a=n._add(o(e)[0]);if(t){if(this[t])throw t+" is already used or is not available as an altImage alias.";n.ids.push(t),n[t]=n[a]}return a}},bind:function(){var t=this,a=t.owner.options.configTimeout/50,i=function(){for(var e=t.length;0{var w=y.mapster,d=w.utils;function n(e,t,a,i){return i=i||d.when.defer(),e.activeAreaEvent&&(window.clearTimeout(e.activeAreaEvent),e.activeAreaEvent=0),t<0?i.resolve({completeAction:!1}):a.owner.currentAction||t?e.activeAreaEvent=window.setTimeout(function(){n(e,0,a,i)},t||100):(t=a.areaId,e.currentAreaId!==t&&0<=e.highlightId&&i.resolve({completeAction:!0})),i}function b(e){return!!e&&"#"!==e}function f(e){w.hasCanvas()||this.blur(),e.preventDefault()}w.MapData=function(e,t){var a=this;a.image=e,a.images=new w.MapImages(a),a.graphics=new w.Graphics(a),a.imgCssText=e.style.cssText||null,y.extend(a,{complete:!1,map:null,base_canvas:null,overlay_canvas:null,commands:[],data:[],mapAreas:[],_xref:{},highlightId:-1,currentAreaId:-1,_tooltip_events:[],scaleInfo:null,index:-1,activeAreaEvent:null,autoResizeTimer:null}),a.configureOptions(t),a.mouseover=function(e){!function(e,t){var a=e.getAllDataForArea(this),i=a.length?a[0]:null;!i||i.isNotRendered()||i.owner.currentAction||e.currentAreaId!==i.areaId&&(e.highlightId!==i.areaId&&(e.clearEffects(),i.highlight(),e.options.showToolTip)&&y.each(a,function(e,t){t.effectiveOptions().toolTip&&t.showToolTip()}),e.currentAreaId=i.areaId,d.isFunction(e.options.onMouseover))&&e.options.onMouseover.call(this,{e:t,options:i.effectiveOptions(),key:i.key,selected:i.isSelected()})}.call(this,a,e)},a.mouseout=function(e){!function(t,e){var a=t.getDataForArea(this),i=t.options;t.currentAreaId<0||!a||t.getDataForArea(e.relatedTarget)!==a&&(t.currentAreaId=-1,a.area=null,n(t,i.mouseoutDelay,a).then(function(e){e.completeAction&&t.clearEffects()}),d.isFunction(i.onMouseout))&&i.onMouseout.call(this,{e:e,options:i,key:a.key,selected:a.isSelected()})}.call(this,a,e)},a.click=function(e){!function(a,i){var n,o,s,r,e,c=this,t=a.getDataForArea(this),l=a.options;function u(e,t,a){"open"===e?window.open(t,a||"_self"):window.location.href=t}function h(e,t,a){var i;return"open"===t?{href:(i=b(t=y(e.area).attr("href")))?t:e.href,target:i?y(e.area).attr("target"):e.hrefTarget}:{href:a}}function p(e){var t;if(s=e.isSelectable()&&(e.isDeselectable()||!e.isSelected()),o=s?!e.isSelected():e.isSelected(),n=w.getBoundList(l,e.key),d.isFunction(l.onClick)&&(r=l.onClick.call(c,{e:i,listTarget:n,key:e.key,selected:o}),d.isBool(r))){if(!r)return;if(b((t=h(e,l.navigateMode,y(e.area).attr("href"))).href))return void u(l.navigateMode,t.href,t.target)}s&&e.toggle()}f.call(this,i),e=h(t,l.navigateMode,t.href),l.clickNavigate&&b(e.href)?u(l.navigateMode,e.href,e.target):t&&!t.owner.currentAction&&(l=a.options,p(t),(e=t.effectiveOptions()).includeKeys)&&(t=d.split(e.includeKeys),y.each(t,function(e,t){t=a.getDataForKey(t.toString());t.options.isMask||p(t)}))}.call(this,a,e)},a.clearEffects=function(e){!function(e){var t=e.options;e.ensureNoHighlight(),t.toolTipClose&&0<=y.inArray("area-mouseout",t.toolTipClose)&&e.activeToolTip&&e.clearToolTip()}.call(this,a,e)},a.mousedown=function(e){f.call(this,e)}},w.MapData.prototype={constructor:w.MapData,configureOptions:function(e){this.options=d.updateProps({},w.defaults,e)},bindImages:function(){var e,a,t=this,i=t.images;return 2
'),l.wrapClass&&(!0===l.wrapClass?a.addClass(s[0].className):a.addClass(l.wrapClass))),c.wrapper=a,c.scaleInfo=r=d.scaleMap(c.images[0],c.images[1],l.scaleMap,l.scaleMapBounds),c.base_canvas=e=c.graphics.createVisibleCanvas(c),c.overlay_canvas=t=c.graphics.createVisibleCanvas(c),i=y(c.images[1]).addClass("mapster_el "+c.images[0].className).attr({id:null,usemap:null}),(o=d.size(c.images[0])).complete&&i.css({width:o.width,height:o.height}),c.buildDataset(),i=y.extend({display:"block",position:"relative",padding:0},!0===l.enableAutoResizeSupport?{}:{width:r.width,height:r.height}),l.wrapCss&&y.extend(i,l.wrapCss),s.parent()[0]!==c.wrapper[0]&&s.before(c.wrapper),a.css(i),y(c.images.slice(2)).hide(),n=1;n{var a=o.mapster,n=a.utils;function s(e){e=o(e);return n.hasAttribute(e,"nohref")||!n.hasAttribute(e,"href")}a.AreaData=function(e,t,a){o.extend(this,{owner:e,key:t||"",isPrimary:!0,areaId:-1,href:"",hrefTarget:null,value:a||"",options:{},selected:null,staticStateOverridden:!1,areasXref:[],area:null,optsCache:null})},a.AreaData.prototype={constuctor:a.AreaData,select:function(e){var t=this,a=t.owner,e=(i=!o.isEmptyObject(e))?o.extend(t.effectiveRenderOptions("select"),e,{altImageId:a.images.add(e.altImage)}):null,i=i&&!(t.optsCache===e),n=t.isSelectedOrStatic();a.options.singleSelect&&(a.clearSelections(),n=t.isSelectedOrStatic()),i&&(t.optsCache=e),e=t.updateSelected(!0),n&&i?(a.graphics.removeSelections(t.areaId),a.graphics.refreshSelections()):n||t.drawSelection(),e&&t.changeState("select",!0)},deselect:function(e){var t=this,a=t.updateSelected(!1);t.optsCache=null,t.owner.graphics.removeSelections(t.areaId),e||t.owner.removeSelectionFinish(),a&&t.changeState("select",!1)},toggle:function(e){return this.isSelected()?this.deselect():this.select(e),this.isSelected()},updateSelected:function(e){var t=this.selected;return this.selected=e,this.staticStateOverridden=!!n.isBool(this.effectiveOptions().staticState),t!==e},areas:function(){for(var e=[],t=0;t{var M=x.mapster.utils;M.areaCorners=function(e,t,a,i,n){var o,s,r,c,l,u,h,p,d,f,m,g,v,y,w,b,k,S,A,T,_=0,C=0,I=[];for(e=e.length?e:[e],o=(a=x(a||document.body)).offset(),w=o.left,b=o.top,t&&(_=(o=x(t).offset()).left,C=o.top),y=0;yw&&t[1]>b)return v=t,!(s=!0)}),s||(v=[l,u])),v}})(jQuery),(d=>{var f=d.mapster,m=f.utils,e=f.MapArea.prototype;f.utils.getScaleInfo=function(e,t,a){var i;return t?(i=e.width/t.width||e.height/t.height,a&&i>a.below&&i{var e=c.mapster,l=e.utils;function u(e,t,a){var i;return t?(i="string"==typeof t?c(t):c(t).clone()).append(e):i=c(e),i.css(c.extend(a||{},{display:"block",position:"absolute"})).hide(),c("body").append(i),i.attr("data-opacity",i.css("opacity")).css("opacity",0),i.show()}function h(e,t,a,i,n,o){var s=".mapster.tooltip",a=a+s;0<=c.inArray(t,e)&&i.off(a).on(a,function(e){n&&!n.call(this,e)||(i.off(s),o&&o.call(this))})}function p(e,t,a,i,n){var o={};return n=n||{},t?(t=l.areaCorners(t,a,i,e.outerWidth(!0),e.outerHeight(!0)),o.left=t[0],o.top=t[1]):(o.left=n.left,o.top=n.top),o.left+=n.offsetx||0,o.top+=n.offsety||0,o.css=n.css,o.fadeDuration=n.fadeDuration,i={left:(a=o).left+"px",top:a.top+"px"},n=(t=e).attr("data-opacity")||0,o=t.css("z-index"),0!==parseInt(o,10)&&"auto"!==o||(i["z-index"]=9999),t.css(i).addClass("mapster_tooltip"),a.fadeDuration&&0',showToolTip:!1,toolTip:null,toolTipFade:!0,toolTipClose:["area-mouseout","image-mouseout","generic-mouseout"],onShowToolTip:null,onHideToolTip:null}),c.extend(e.area_defaults,{toolTip:null,toolTipClose:null}),e.MapData.prototype.clearToolTip=function(){this.activeToolTip&&(this.activeToolTip.stop().remove(),this.activeToolTip=null,this.activeToolTipID=null,l.ifFunction(this.options.onHideToolTip,this))},e.AreaData.prototype.showToolTip=function(e,t){var a,i,n,o=this,s=o.owner,r=o.effectiveOptions();if(t=t?c.extend({},t):{},e=e||r.toolTip,a=t.closeEvents||r.toolTipClose||s.options.toolTipClose||"tooltip-click",n=void 0!==t.template?t.template:s.options.toolTipContainer,t.closeEvents="string"==typeof a?a=l.split(a):a,t.fadeDuration=t.fadeDuration||(s.options.toolTipFade?(l.isNumeric(r.fadeDuration)?r:s.options).fadeDuration:0),i=o.area||c.map(o.areas(),function(e){return e.area}),s.activeToolTipID!==o.areaId){s.clearToolTip();var e=l.isFunction(e)?e({key:this.key,target:i}):e;if(e)return s.activeToolTip=e=u(e,n,t.css),s.activeToolTipID=o.areaId,n=function(){s.clearToolTip()},h(a,"area-click","click",c(s.map),null,n),h(a,"tooltip-click","click",e,null,n),h(a,"image-mouseout","mouseout",c(s.image),function(e){return e.relatedTarget&&"AREA"!==e.relatedTarget.nodeName&&e.relatedTarget!==o.area},n),h(a,"image-click","click",c(s.image),null,n),p(e,i,s.image,t.container,t),l.ifFunction(s.options.onShowToolTip,o.area,{toolTip:e,options:{},areaOptions:r,key:o.key,selected:o.isSelected()}),e}},e.impl.tooltip=function(s,r){return new e.Method(this,function(){var e,t,a,i,n,o=this;s?(n=(e=c(s))&&0{if(e.event&&e.event.special){var i,t=!1;try{var a=Object.defineProperty({},"passive",{get:function(){return t=!0}});window.addEventListener("testPassive.mapster",function(){},a),window.removeEventListener("testPassive.mapster",function(){},a)}catch(e){}t&&(i=function(e,t,a){if(!e.includes("mapster")||!e.includes("noPreventDefault"))return!1;this.addEventListener(t,a,{passive:!0})},e.event.special.touchstart={setup:function(e,t,a){return i.call(this,t,"touchstart",a)}},e.event.special.touchend={setup:function(e,t,a){return i.call(this,t,"touchend",a)}})}})(jQuery),(c=>{c.fn.addBack=c.fn.addBack||c.fn.andSelf,c.fn.extend({actual:function(e,t){var a,i,n,o,s,r;if(this[e])return a=c.extend({absolute:!1,clone:!1,includeMargin:!1,display:"block"},t),i=this.eq(0),t=!0===a.clone?(r=function(){i=i.clone().attr("style","position: absolute !important; top: -1000 !important; ").appendTo("body")},function(){i.remove()}):(n=[],o="",r=function(){s=i.parents().addBack().filter(":hidden"),o+="visibility: hidden !important; display: "+a.display+" !important; ",!0===a.absolute&&(o+="position: absolute !important; "),s.each(function(){var e=c(this),t=e.attr("style");n.push(t),e.attr("style",t?t+";"+o:o)})},function(){s.each(function(e){var t=c(this),e=n[e];void 0===e?t.removeAttr("style"):t.attr("style",e)})}),r(),r=/(outer)/.test(e)?i[e](a.includeMargin):i[e](),t(),r;throw'$.actual => The jQuery method "'+e+'" you called does not exist'}})})(jQuery),!function($){var mapster_version="1.9.1",m=($.fn.mapster=function(e){var t=$.mapster.impl;return $.mapster.utils.isFunction(t[e])?t[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void $.error("Method "+e+" does not exist on jQuery.mapster"):t.bind.apply(this,arguments)},$.mapster={version:mapster_version,render_defaults:{isSelectable:!0,isDeselectable:!0,fade:!1,fadeDuration:150,fill:!0,fillColor:"000000",fillColorMask:"FFFFFF",fillOpacity:.7,highlight:!0,stroke:!1,strokeColor:"ff0000",strokeOpacity:1,strokeWidth:1,includeKeys:"",altImage:null,altImageId:null,altImages:{},altImageOpacity:null},defaults:{clickNavigate:!1,navigateMode:"location",wrapClass:null,wrapCss:null,onGetList:null,sortList:!1,mapKey:"",mapValue:"",singleSelect:!1,listKey:"value",listSelectedAttribute:"selected",listSelectedClass:null,onClick:null,onMouseover:null,onMouseout:null,mouseoutDelay:0,onStateChange:null,boundList:null,onConfigured:null,configTimeout:3e4,noHrefIsMask:!0,scaleMap:!0,scaleMapBounds:{below:.98,above:1.02},enableAutoResizeSupport:!1,autoResize:!1,autoResizeDelay:0,autoResizeDuration:0,onAutoResize:null,areas:[]},shared_defaults:{render_highlight:{fade:!0},render_select:{fade:!1},staticState:null,selected:null},area_defaults:{includeKeys:"",isMask:!1},canvas_style:{position:"absolute",left:0,top:0,padding:0,border:0},hasCanvas:null,map_cache:[],hooks:{},addHook:function(e,t){this.hooks[e]=(this.hooks[e]||[]).push(t)},callHooks:function(e,a){$.each(this.hooks[e]||[],function(e,t){t.apply(a)})},utils:{when:{all:function(e){return Promise.all(e)},defer:function(){return new function(){this.promise=new Promise(function(e,t){this.resolve=e,this.reject=t}.bind(this)),this.then=this.promise.then.bind(this.promise),this.catch=this.promise.catch.bind(this.promise)}}},defer:function(){return this.when.defer()},subclass:function(a,i){function e(){var e=this,t=Array.prototype.slice.call(arguments,0);e.base=a.prototype,e.base.init=function(){a.prototype.constructor.apply(e,t)},i.apply(e,t)}return(e.prototype=new a).constructor=e},asArray:function(e){return e.constructor===Array?e:this.split(e)},split:function(e,t){for(var a,i=e.split(","),n=0;n{var c={},l=0,u=function(e,t,a,i){var n,o,s=i/15,r=$.mapster.utils;if("number"==typeof e){if(!(o=c[e]))return}else(n=r.indexOfProp(c,null,e))&&delete c[n],c[++l]=o=e,e=l;t=(a=a||1)-.01=e.index;t--)m.map_cache[t].index--};function hasVml(){var e=$("
").appendTo("body"),t=(e.html(''),e[0].firstChild),t=(t.style.behavior="url(#default#VML)",!t||"object"==typeof t.adj);return e.remove(),t}function namespaces(){return"object"==typeof document.namespaces?document.namespaces:null}function hasCanvas(){var e=namespaces();return!(e&&e.g_vml_||!$("")[0].getContext)}function merge_areas(a,e){var i,n=a.options.areas;e&&$.each(e,function(e,t){t&&t.key&&(0<=(i=u.indexOfProp(n,"key",t.key))?$.extend(n[i],t):n.push(t),i=a.getDataForKey(t.key))&&$.extend(i.options,t)})}function merge_options(e,t){var a=u.updateProps({},t);delete a.areas,u.updateProps(e.options,a),merge_areas(e,t.areas),u.updateProps(e.area_options,e.options)}return me.get=function(e){var t=m.getMapData(this);if(t&&t.complete)return new m.Method(this,function(){return this.getSelected()},function(){return this.isSelected()},{name:"get",args:arguments,key:e,first:!0,allowAsync:!0,defaultReturn:""}).go();throw"Can't access data until binding complete."},me.data=function(e){return new m.Method(this,null,function(){return this},{name:"data",args:arguments,key:e}).go()},me.highlight=function(t){return new m.Method(this,function(){var e;if(!1!==t)return 0<=(e=this.highlightId)?this.data[e].key:null;this.ensureNoHighlight()},function(){this.highlight()},{name:"highlight",args:arguments,key:t,first:!0}).go()},me.keys=function(e,i){var n=[],a=m.getMapData(this);if(a&&a.complete)return a&&a.complete?("string"==typeof e?i?o(a.getDataForKey(e)):n=[a.getKeysForGroup(e)]:(i=e,this.each(function(e,t){"AREA"===t.nodeName&&o(a.getDataForArea(t))})),n.join(",")):"";throw"Can't access data until binding complete.";function o(e){var t,a=[];i?(t=e.areas(),$.each(t,function(e,t){a=a.concat(t.keys)})):a.push(e.key),$.each(a,function(e,t){$.inArray(t,n)<0&&n.push(t)})}},me.select=function(){me.set.call(this,!0)},me.deselect=function(){me.set.call(this,!1)},me.set=function(i,n,e){var o,s,r,c,l=e;function h(e){e&&$.inArray(e,c)<0&&(c.push(e),r+=(""===r?"":",")+e.key)}function p(e){$.each(c,function(e,t){var a=t;if(a)switch(i){case!0:a.select(l);break;case!1:a.deselect(!0);break;default:a.toggle(l)}}),i||e.removeSelectionFinish()}return this.filter("img,area").each(function(e,t){var a;(s=m.getMapData(t))!==o&&(o&&p(o),c=[],r=""),s&&(a="","IMG"===t.nodeName.toUpperCase()?m.queueCommand(s,$(t),"set",[i,n,l])||(n instanceof Array?n.length&&(a=n.join(",")):a=n,a&&$.each(u.split(a),function(e,t){h(s.getDataForKey(t.toString())),o=s})):(l=n,m.queueCommand(s,$(t),"set",[i,l])||(h(s.getDataForArea(t)),o=s)))}),s&&p(s),this},me.unbind=function(e){return new m.Method(this,function(){this.clearEvents(),this.clearMapData(e),removeMap(this)},null,{name:"unbind",args:arguments}).go()},me.rebind=function(t){return new m.Method(this,function(){var e=this;e.complete=!1,e.configureOptions(t),e.bindImages().then(function(){e.buildDataset(!0),e.complete=!0,e.onConfigured()})},null,{name:"rebind",args:arguments}).go()},me.get_options=function(e,t){var a=u.isBool(e)?e:t;return new m.Method(this,function(){var e=$.extend({},this.options);return a&&(e.render_select=u.updateProps({},m.render_defaults,e,e.render_select),e.render_highlight=u.updateProps({},m.render_defaults,e,e.render_highlight)),e},function(){return a?this.effectiveOptions():this.options},{name:"get_options",args:arguments,first:!0,allowAsync:!0,key:e}).go()},me.set_options=function(e){return new m.Method(this,function(){merge_options(this,e)},null,{name:"set_options",args:arguments}).go()},me.unload=function(){for(var e=m.map_cache.length-1;0<=e;e--)m.map_cache[e]&&me.unbind.call($(m.map_cache[e].image));me.graphics=null},me.snapshot=function(){return new m.Method(this,function(){$.each(this.data,function(e,t){t.selected=!1}),this.base_canvas=this.graphics.createVisibleCanvas(this),$(this.image).before(this.base_canvas)},null,{name:"snapshot"}).go()},me.state=function(){var a,i=null;return $(this).each(function(e,t){if("IMG"===t.nodeName)return(a=m.getMapData(t))&&(i=a.state()),!1}),i},me.bind=function(o){return this.each(function(e,t){var a,i=$(t),n=m.getMapData(t);if(n){if(me.unbind.apply(i),!n.complete)return!0;n=null}if(a=(t=this.getAttribute("usemap"))&&$('map[name="'+t.substr(1)+'"]'),!(i.is("img")&&t&&0{var i,n,o,r=h.mapster,c=r.utils;function l(e,t,a){var i=e,n=i.map_data,o=a.isMask;h.each(t.areas(),function(e,t){a.isMask=o||t.nohref&&n.options.noHrefIsMask,i.addShape(t,a)}),a.isMask=o}function a(e){return Math.max(0,Math.min(parseInt(e,16),255))}function u(e,t){return"rgba("+a(e.substr(0,2))+","+a(e.substr(2,2))+","+a(e.substr(4,2))+","+t+")"}function s(){}r.Graphics=function(e){var t=this;t.active=!1,t.canvas=null,t.width=0,t.height=0,t.shapes=[],t.masks=[],t.map_data=e},i=r.Graphics.prototype={constructor:r.Graphics,begin:function(e,t){var a=h(e);this.elementName=t,this.canvas=e,this.width=a.width(),this.height=a.height(),this.shapes=[],this.masks=[],this.active=!0},addShape:function(e,t){(t.isMask?this.masks:this.shapes).push({mapArea:e,options:t})},createVisibleCanvas:function(e){return h(this.createCanvasFor(e)).addClass("mapster_el").css(r.canvas_style)[0]},addShapeGroup:function(e,a,t){var i,n=this,o=this.map_data,s=e.effectiveRenderOptions(a);t&&h.extend(s,t),t="select"===a?(i="static_"+e.areaId.toString(),o.base_canvas):o.overlay_canvas,n.begin(t,i),s.includeKeys&&(i=c.split(s.includeKeys),h.each(i,function(e,t){t=o.getDataForKey(t.toString());l(n,t,t.effectiveRenderOptions(a))})),l(n,e,s),n.render(),s.fade&&c.fader(r.hasCanvas()?t:h(t).find("._fill").not(".mapster_mask"),0,r.hasCanvas()?1:s.fillOpacity,s.fadeDuration)}},n={renderShape:function(e,t,a){var i,n=t.coords(null,a);switch(t.shape){case"rect":case"rectangle":e.rect(n[0],n[1],n[2]-n[0],n[3]-n[1]);break;case"poly":case"polygon":for(e.moveTo(n[0],n[1]),i=2;i')[0]},clearHighlight:function(){var e=this.map_data.overlay_canvas;e.getContext("2d").clearRect(0,0,e.width,e.height)},refreshSelections:function(){var e=this.map_data,t=e.base_canvas;e.base_canvas=this.createVisibleCanvas(e),h(e.base_canvas).hide(),h(t).before(e.base_canvas),e.redrawSelections(),h(e.base_canvas).show(),h(t).remove()}},o={renderShape:function(e,t,a){var i,n=this,o=e.coords(),s=n.elementName?'name="'+n.elementName+'" ':"",r=a?'class="'+a+'" ':"",c='',l=t.stroke?" strokeweight="+t.strokeWidth+' stroked="t" strokecolor="#'+t.strokeColor+'"':' stroked="f"',u=t.fill?' filled="t"':' filled="f"';switch(e.shape){case"rect":case"rectangle":i="'+c+"";break;case"poly":case"polygon":i="'+c+"";break;case"circ":case"circle":i="'+c+""}return a=h(i),h(n.canvas).append(a),a},render:function(){var a,i=this;return h.each(this.shapes,function(e,t){i.renderShape(t.mapArea,t.options)}),this.masks.length&&h.each(this.masks,function(e,t){a=c.updateProps({},t.options,{fillOpacity:1,fillColor:t.options.fillColorMask}),i.renderShape(t.mapArea,a,"mapster_mask")}),this.active=!1,this.canvas},createCanvasFor:function(e){var t=e.scaleInfo.width,e=e.scaleInfo.height;return h('')[0]},clearHighlight:function(){h(this.map_data.overlay_canvas).children().remove()},removeSelections:function(e){(0<=e?h(this.map_data.base_canvas).find('[name="static_'+e.toString()+'"]'):h(this.map_data.base_canvas).children()).remove()}},h.each(["renderShape","addAltImage","render","createCanvasFor","clearHighlight","removeSelections","refreshSelections"],function(e,t){var a;i[t]=(a=t,function(){return i[a]=(r.hasCanvas()?n:o)[a]||s,i[a].apply(this,arguments)})})})(jQuery),(o=>{var e=o.mapster,n=e.utils,t=[];e.MapImages=function(e){this.owner=e,this.clear()},e.MapImages.prototype={constructor:e.MapImages,slice:function(){return t.slice.apply(this,arguments)},splice:function(){return t.slice.apply(this.status,arguments),t.slice.apply(this,arguments)},complete:function(){return o.inArray(!1,this.status)<0},_add:function(e){e=t.push.call(this,e)-1;return this.status[e]=!1,e},indexOf:function(e){return n.indexOf(this,e)},clear:function(){var a=this;a.ids&&0").addClass("mapster_el").hide(),a=n._add(e[0]),e.on("load.mapster",function(e){n.imageLoaded.call(n,e)}).on("error.mapster",function(e){n.imageLoadError.call(n,e)}),e.attr("src",i)}else a=n._add(o(e)[0]);if(t){if(this[t])throw t+" is already used or is not available as an altImage alias.";n.ids.push(t),n[t]=n[a]}return a}},bind:function(){var t=this,a=t.owner.options.configTimeout/50,i=function(){for(var e=t.length;0{var w=y.mapster,d=w.utils;function n(e,t,a,i){return i=i||d.when.defer(),e.activeAreaEvent&&(window.clearTimeout(e.activeAreaEvent),e.activeAreaEvent=0),t<0?i.resolve({completeAction:!1}):a.owner.currentAction||t?e.activeAreaEvent=window.setTimeout(function(){n(e,0,a,i)},t||100):(t=a.areaId,e.currentAreaId!==t&&0<=e.highlightId&&i.resolve({completeAction:!0})),i}function b(e){return!!e&&"#"!==e}function f(e){w.hasCanvas()||this.blur(),e.preventDefault()}w.MapData=function(e,t){var a=this;a.image=e,a.images=new w.MapImages(a),a.graphics=new w.Graphics(a),a.imgCssText=e.style.cssText||null,y.extend(a,{complete:!1,map:null,base_canvas:null,overlay_canvas:null,commands:[],data:[],mapAreas:[],_xref:{},highlightId:-1,currentAreaId:-1,_tooltip_events:[],scaleInfo:null,index:-1,activeAreaEvent:null,autoResizeTimer:null}),a.configureOptions(t),a.mouseover=function(e){!function(e,t){var a=e.getAllDataForArea(this),i=a.length?a[0]:null;!i||i.isNotRendered()||i.owner.currentAction||e.currentAreaId!==i.areaId&&(e.highlightId!==i.areaId&&(e.clearEffects(),i.highlight(),e.options.showToolTip)&&y.each(a,function(e,t){t.effectiveOptions().toolTip&&t.showToolTip()}),e.currentAreaId=i.areaId,d.isFunction(e.options.onMouseover))&&e.options.onMouseover.call(this,{e:t,options:i.effectiveOptions(),key:i.key,selected:i.isSelected()})}.call(this,a,e)},a.mouseout=function(e){!function(t,e){var a=t.getDataForArea(this),i=t.options;t.currentAreaId<0||!a||t.getDataForArea(e.relatedTarget)!==a&&(t.currentAreaId=-1,a.area=null,n(t,i.mouseoutDelay,a).then(function(e){e.completeAction&&t.clearEffects()}),d.isFunction(i.onMouseout))&&i.onMouseout.call(this,{e:e,options:i,key:a.key,selected:a.isSelected()})}.call(this,a,e)},a.click=function(e){!function(a,i){var n,o,s,r,e,c=this,t=a.getDataForArea(this),l=a.options;function u(e,t,a){"open"===e?window.open(t,a||"_self"):window.location.href=t}function h(e,t,a){var i;return"open"===t?{href:(i=b(t=y(e.area).attr("href")))?t:e.href,target:i?y(e.area).attr("target"):e.hrefTarget}:{href:a}}function p(e){var t;if(s=e.isSelectable()&&(e.isDeselectable()||!e.isSelected()),o=s?!e.isSelected():e.isSelected(),n=w.getBoundList(l,e.key),d.isFunction(l.onClick)&&(r=l.onClick.call(c,{e:i,listTarget:n,key:e.key,selected:o}),d.isBool(r))){if(!r)return;if(b((t=h(e,l.navigateMode,y(e.area).attr("href"))).href))return void u(l.navigateMode,t.href,t.target)}s&&e.toggle()}f.call(this,i),e=h(t,l.navigateMode,t.href),l.clickNavigate&&b(e.href)?u(l.navigateMode,e.href,e.target):t&&!t.owner.currentAction&&(l=a.options,p(t),(e=t.effectiveOptions()).includeKeys)&&(t=d.split(e.includeKeys),y.each(t,function(e,t){t=a.getDataForKey(t.toString());t.options.isMask||p(t)}))}.call(this,a,e)},a.clearEffects=function(e){!function(e){var t=e.options;e.ensureNoHighlight(),t.toolTipClose&&0<=y.inArray("area-mouseout",t.toolTipClose)&&e.activeToolTip&&e.clearToolTip()}.call(this,a,e)},a.mousedown=function(e){f.call(this,e)}},w.MapData.prototype={constructor:w.MapData,configureOptions:function(e){this.options=d.updateProps({},w.defaults,e)},bindImages:function(){var e,a,t=this,i=t.images;return 2
'),l.wrapClass&&(!0===l.wrapClass?a.addClass(s[0].className):a.addClass(l.wrapClass))),c.wrapper=a,c.scaleInfo=r=d.scaleMap(c.images[0],c.images[1],l.scaleMap,l.scaleMapBounds),c.base_canvas=e=c.graphics.createVisibleCanvas(c),c.overlay_canvas=t=c.graphics.createVisibleCanvas(c),i=y(c.images[1]).addClass("mapster_el "+c.images[0].className).attr({id:null,usemap:null}),(o=d.size(c.images[0])).complete&&i.css({width:o.width,height:o.height}),c.buildDataset(),i=y.extend({display:"block",position:"relative",padding:0},!0===l.enableAutoResizeSupport?{}:{width:r.width,height:r.height}),l.wrapCss&&y.extend(i,l.wrapCss),s.parent()[0]!==c.wrapper[0]&&s.before(c.wrapper),a.css(i),y(c.images.slice(2)).hide(),n=1;n{var a=o.mapster,n=a.utils;function s(e){e=o(e);return n.hasAttribute(e,"nohref")||!n.hasAttribute(e,"href")}a.AreaData=function(e,t,a){o.extend(this,{owner:e,key:t||"",isPrimary:!0,areaId:-1,href:"",hrefTarget:null,value:a||"",options:{},selected:null,staticStateOverridden:!1,areasXref:[],area:null,optsCache:null})},a.AreaData.prototype={constuctor:a.AreaData,select:function(e){var t=this,a=t.owner,e=(i=!o.isEmptyObject(e))?o.extend(t.effectiveRenderOptions("select"),e,{altImageId:a.images.add(e.altImage)}):null,i=i&&!(t.optsCache===e),n=t.isSelectedOrStatic();a.options.singleSelect&&(a.clearSelections(),n=t.isSelectedOrStatic()),i&&(t.optsCache=e),e=t.updateSelected(!0),n&&i?(a.graphics.removeSelections(t.areaId),a.graphics.refreshSelections()):n||t.drawSelection(),e&&t.changeState("select",!0)},deselect:function(e){var t=this,a=t.updateSelected(!1);t.optsCache=null,t.owner.graphics.removeSelections(t.areaId),e||t.owner.removeSelectionFinish(),a&&t.changeState("select",!1)},toggle:function(e){return this.isSelected()?this.deselect():this.select(e),this.isSelected()},updateSelected:function(e){var t=this.selected;return this.selected=e,this.staticStateOverridden=!!n.isBool(this.effectiveOptions().staticState),t!==e},areas:function(){for(var e=[],t=0;t{var M=x.mapster.utils;M.areaCorners=function(e,t,a,i,n){var o,s,r,c,l,u,h,p,d,f,m,g,v,y,w,b,k,S,A,T,_=0,C=0,I=[];for(e=e.length?e:[e],o=(a=x(a||document.body)).offset(),w=o.left,b=o.top,t&&(_=(o=x(t).offset()).left,C=o.top),y=0;yw&&t[1]>b)return v=t,!(s=!0)}),s||(v=[l,u])),v}})(jQuery),(d=>{var f=d.mapster,m=f.utils,e=f.MapArea.prototype;f.utils.getScaleInfo=function(e,t,a){var i;return t?(i=e.width/t.width||e.height/t.height,a&&i>a.below&&i{var e=c.mapster,l=e.utils;function u(e,t,a){var i;return t?(i="string"==typeof t?c(t):c(t).clone()).append(e):i=c(e),i.css(c.extend(a||{},{display:"block",position:"absolute"})).hide(),c("body").append(i),i.attr("data-opacity",i.css("opacity")).css("opacity",0),i.show()}function h(e,t,a,i,n,o){var s=".mapster.tooltip",a=a+s;0<=c.inArray(t,e)&&i.off(a).on(a,function(e){n&&!n.call(this,e)||(i.off(s),o&&o.call(this))})}function p(e,t,a,i,n){var o={};return n=n||{},t?(t=l.areaCorners(t,a,i,e.outerWidth(!0),e.outerHeight(!0)),o.left=t[0],o.top=t[1]):(o.left=n.left,o.top=n.top),o.left+=n.offsetx||0,o.top+=n.offsety||0,o.css=n.css,o.fadeDuration=n.fadeDuration,i={left:(a=o).left+"px",top:a.top+"px"},n=(t=e).attr("data-opacity")||0,o=t.css("z-index"),0!==parseInt(o,10)&&"auto"!==o||(i["z-index"]=9999),t.css(i).addClass("mapster_tooltip"),a.fadeDuration&&0',showToolTip:!1,toolTip:null,toolTipFade:!0,toolTipClose:["area-mouseout","image-mouseout","generic-mouseout"],onShowToolTip:null,onHideToolTip:null}),c.extend(e.area_defaults,{toolTip:null,toolTipClose:null}),e.MapData.prototype.clearToolTip=function(){this.activeToolTip&&(this.activeToolTip.stop().remove(),this.activeToolTip=null,this.activeToolTipID=null,l.ifFunction(this.options.onHideToolTip,this))},e.AreaData.prototype.showToolTip=function(e,t){var a,i,n,o=this,s=o.owner,r=o.effectiveOptions();if(t=t?c.extend({},t):{},e=e||r.toolTip,a=t.closeEvents||r.toolTipClose||s.options.toolTipClose||"tooltip-click",n=void 0!==t.template?t.template:s.options.toolTipContainer,t.closeEvents="string"==typeof a?a=l.split(a):a,t.fadeDuration=t.fadeDuration||(s.options.toolTipFade?(l.isNumeric(r.fadeDuration)?r:s.options).fadeDuration:0),i=o.area||c.map(o.areas(),function(e){return e.area}),s.activeToolTipID!==o.areaId){s.clearToolTip();var e=l.isFunction(e)?e({key:this.key,target:i}):e;if(e)return s.activeToolTip=e=u(e,n,t.css),s.activeToolTipID=o.areaId,n=function(){s.clearToolTip()},h(a,"area-click","click",c(s.map),null,n),h(a,"tooltip-click","click",e,null,n),h(a,"image-mouseout","mouseout",c(s.image),function(e){return e.relatedTarget&&"AREA"!==e.relatedTarget.nodeName&&e.relatedTarget!==o.area},n),h(a,"image-click","click",c(s.image),null,n),p(e,i,s.image,t.container,t),l.ifFunction(s.options.onShowToolTip,o.area,{toolTip:e,options:{},areaOptions:r,key:o.key,selected:o.isSelected()}),e}},e.impl.tooltip=function(s,r){return new e.Method(this,function(){var e,t,a,i,n,o=this;s?(n=(e=c(s))&&0= 1.2.3 */ -/* eslint-disable one-var */ +/* eslint-disable one-var -- code directly from jquery source */ (function ($) { 'use strict'; @@ -199,7 +199,7 @@ function imagemapsterFactory(jQuery) { (function ($) { 'use strict'; - var mapster_version = '1.9.0'; + var mapster_version = '1.9.1'; // all public functions in $.mapster.impl are methods $.fn.mapster = function (method) { @@ -299,7 +299,7 @@ function imagemapsterFactory(jQuery) { when: { all: function (deferredArray) { // TODO: Promise breaks ES5 support - // eslint-disable-next-line no-undef + // eslint-disable-next-line no-undef -- requires polyfill per imagemapster docs return Promise.all(deferredArray); }, defer: function () { @@ -309,7 +309,7 @@ function imagemapsterFactory(jQuery) { // polyfill via native promise var Deferred = function () { // TODO: Promise breaks ES5 support - // eslint-disable-next-line no-undef + // eslint-disable-next-line no-undef -- requires polyfill per imagemapster docs this.promise = new Promise( function (resolve, reject) { this.resolve = resolve; diff --git a/dist/jquery.imagemapster.zepto.js b/dist/jquery.imagemapster.zepto.js index a042f70..6cce7e9 100644 --- a/dist/jquery.imagemapster.zepto.js +++ b/dist/jquery.imagemapster.zepto.js @@ -1,5 +1,5 @@ /*! -* imagemapster - v1.9.0 - 2024-12-24 +* imagemapster - v1.9.1 - 2024-12-27 * https://jamietre.github.io/ImageMapster * Copyright (c) 2011 - 2024 James Treworgy * License: MIT @@ -118,7 +118,7 @@ }); window.addEventListener('testPassive.mapster', function () {}, opts); window.removeEventListener('testPassive.mapster', function () {}, opts); - // eslint-disable-next-line no-unused-vars + // eslint-disable-next-line no-unused-vars -- intentionally ignoring } catch (e) { // intentionally ignored } @@ -181,7 +181,7 @@ * * Requires: jQuery >= 1.2.3 */ -/* eslint-disable one-var */ +/* eslint-disable one-var -- code directly from jquery source */ (function ($) { 'use strict'; @@ -290,7 +290,7 @@ (function ($) { 'use strict'; - var mapster_version = '1.9.0'; + var mapster_version = '1.9.1'; // all public functions in $.mapster.impl are methods $.fn.mapster = function (method) { @@ -390,7 +390,7 @@ when: { all: function (deferredArray) { // TODO: Promise breaks ES5 support - // eslint-disable-next-line no-undef + // eslint-disable-next-line no-undef -- requires polyfill per imagemapster docs return Promise.all(deferredArray); }, defer: function () { @@ -400,7 +400,7 @@ // polyfill via native promise var Deferred = function () { // TODO: Promise breaks ES5 support - // eslint-disable-next-line no-undef + // eslint-disable-next-line no-undef -- requires polyfill per imagemapster docs this.promise = new Promise( function (resolve, reject) { this.resolve = resolve; diff --git a/dist/jquery.imagemapster.zepto.min.js b/dist/jquery.imagemapster.zepto.min.js index 27f0c40..ca13421 100644 --- a/dist/jquery.imagemapster.zepto.min.js +++ b/dist/jquery.imagemapster.zepto.min.js @@ -1,8 +1,8 @@ /*! -* imagemapster - v1.9.0 - 2024-12-24 +* imagemapster - v1.9.1 - 2024-12-27 * https://jamietre.github.io/ImageMapster * Copyright (c) 2011 - 2024 James Treworgy * License: MIT */ -((e,a)=>{"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),a(t),t}:a(e.jQuery||e.Zepto)})("undefined"!=typeof self?self:this,function(jQuery){(i=>{i.fn.stop||(i.fn.stop=function(){return this}),i.each(["Height","Width"],function(e,t){var a="outer"+t;i.fn[a]||(i.fn[a]=function(){return this[t.toLowerCase()]()})}),i.fn.extend||(i.fn.extend=function(e){i.extend(i.fn,e)}),i.fn.addSelf||(i.fn.end=function(){return this.prevObject||i()},i.fn.andSelf=function(){return this.add(this.prevObject||i())},"filter,add,not,eq,first,last,find,closest,parents,parent,children,siblings".split(",").forEach(function(e){var t=i.fn[e];i.fn[e]=function(){var e=t.apply(this,arguments);return e.prevObject=this,e}}))})(jQuery),(e=>{if(e.event&&e.event.special){var i,t=!1;try{var a=Object.defineProperty({},"passive",{get:function(){return t=!0}});window.addEventListener("testPassive.mapster",function(){},a),window.removeEventListener("testPassive.mapster",function(){},a)}catch(e){}t&&(i=function(e,t,a){if(!e.includes("mapster")||!e.includes("noPreventDefault"))return!1;this.addEventListener(t,a,{passive:!0})},e.event.special.touchstart={setup:function(e,t,a){return i.call(this,t,"touchstart",a)}},e.event.special.touchend={setup:function(e,t,a){return i.call(this,t,"touchend",a)}})}})(jQuery),(c=>{c.fn.addBack=c.fn.addBack||c.fn.andSelf,c.fn.extend({actual:function(e,t){var a,i,n,o,s,r;if(this[e])return a=c.extend({absolute:!1,clone:!1,includeMargin:!1,display:"block"},t),i=this.eq(0),t=!0===a.clone?(r=function(){i=i.clone().attr("style","position: absolute !important; top: -1000 !important; ").appendTo("body")},function(){i.remove()}):(n=[],o="",r=function(){s=i.parents().addBack().filter(":hidden"),o+="visibility: hidden !important; display: "+a.display+" !important; ",!0===a.absolute&&(o+="position: absolute !important; "),s.each(function(){var e=c(this),t=e.attr("style");n.push(t),e.attr("style",t?t+";"+o:o)})},function(){s.each(function(e){var t=c(this),e=n[e];void 0===e?t.removeAttr("style"):t.attr("style",e)})}),r(),r=/(outer)/.test(e)?i[e](a.includeMargin):i[e](),t(),r;throw'$.actual => The jQuery method "'+e+'" you called does not exist'}})})(jQuery),!function($){var mapster_version="1.9.0",m=($.fn.mapster=function(e){var t=$.mapster.impl;return $.mapster.utils.isFunction(t[e])?t[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void $.error("Method "+e+" does not exist on jQuery.mapster"):t.bind.apply(this,arguments)},$.mapster={version:mapster_version,render_defaults:{isSelectable:!0,isDeselectable:!0,fade:!1,fadeDuration:150,fill:!0,fillColor:"000000",fillColorMask:"FFFFFF",fillOpacity:.7,highlight:!0,stroke:!1,strokeColor:"ff0000",strokeOpacity:1,strokeWidth:1,includeKeys:"",altImage:null,altImageId:null,altImages:{},altImageOpacity:null},defaults:{clickNavigate:!1,navigateMode:"location",wrapClass:null,wrapCss:null,onGetList:null,sortList:!1,mapKey:"",mapValue:"",singleSelect:!1,listKey:"value",listSelectedAttribute:"selected",listSelectedClass:null,onClick:null,onMouseover:null,onMouseout:null,mouseoutDelay:0,onStateChange:null,boundList:null,onConfigured:null,configTimeout:3e4,noHrefIsMask:!0,scaleMap:!0,scaleMapBounds:{below:.98,above:1.02},enableAutoResizeSupport:!1,autoResize:!1,autoResizeDelay:0,autoResizeDuration:0,onAutoResize:null,areas:[]},shared_defaults:{render_highlight:{fade:!0},render_select:{fade:!1},staticState:null,selected:null},area_defaults:{includeKeys:"",isMask:!1},canvas_style:{position:"absolute",left:0,top:0,padding:0,border:0},hasCanvas:null,map_cache:[],hooks:{},addHook:function(e,t){this.hooks[e]=(this.hooks[e]||[]).push(t)},callHooks:function(e,a){$.each(this.hooks[e]||[],function(e,t){t.apply(a)})},utils:{when:{all:function(e){return Promise.all(e)},defer:function(){return new function(){this.promise=new Promise(function(e,t){this.resolve=e,this.reject=t}.bind(this)),this.then=this.promise.then.bind(this.promise),this.catch=this.promise.catch.bind(this.promise)}}},defer:function(){return this.when.defer()},subclass:function(a,i){function e(){var e=this,t=Array.prototype.slice.call(arguments,0);e.base=a.prototype,e.base.init=function(){a.prototype.constructor.apply(e,t)},i.apply(e,t)}return(e.prototype=new a).constructor=e},asArray:function(e){return e.constructor===Array?e:this.split(e)},split:function(e,t){for(var a,i=e.split(","),n=0;n{function c(e,t,a,i){var n,o,s=i/15,r=$.mapster.utils;if("number"==typeof e){if(!(o=l[e]))return}else(n=r.indexOfProp(l,null,e))&&delete l[n],l[++u]=o=e,e=u;t=(a=a||1)-.01=e.index;t--)m.map_cache[t].index--};function hasVml(){var e=$("
").appendTo("body"),t=(e.html(''),e[0].firstChild),t=(t.style.behavior="url(#default#VML)",!t||"object"==typeof t.adj);return e.remove(),t}function namespaces(){return"object"==typeof document.namespaces?document.namespaces:null}function hasCanvas(){var e=namespaces();return!(e&&e.g_vml_||!$("")[0].getContext)}function merge_areas(a,e){var i,n=a.options.areas;e&&$.each(e,function(e,t){t&&t.key&&(0<=(i=u.indexOfProp(n,"key",t.key))?$.extend(n[i],t):n.push(t),i=a.getDataForKey(t.key))&&$.extend(i.options,t)})}function merge_options(e,t){var a=u.updateProps({},t);delete a.areas,u.updateProps(e.options,a),merge_areas(e,t.areas),u.updateProps(e.area_options,e.options)}return me.get=function(e){var t=m.getMapData(this);if(t&&t.complete)return new m.Method(this,function(){return this.getSelected()},function(){return this.isSelected()},{name:"get",args:arguments,key:e,first:!0,allowAsync:!0,defaultReturn:""}).go();throw"Can't access data until binding complete."},me.data=function(e){return new m.Method(this,null,function(){return this},{name:"data",args:arguments,key:e}).go()},me.highlight=function(t){return new m.Method(this,function(){var e;if(!1!==t)return 0<=(e=this.highlightId)?this.data[e].key:null;this.ensureNoHighlight()},function(){this.highlight()},{name:"highlight",args:arguments,key:t,first:!0}).go()},me.keys=function(e,i){var n=[],a=m.getMapData(this);if(a&&a.complete)return a&&a.complete?("string"==typeof e?i?o(a.getDataForKey(e)):n=[a.getKeysForGroup(e)]:(i=e,this.each(function(e,t){"AREA"===t.nodeName&&o(a.getDataForArea(t))})),n.join(",")):"";throw"Can't access data until binding complete.";function o(e){var t,a=[];i?(t=e.areas(),$.each(t,function(e,t){a=a.concat(t.keys)})):a.push(e.key),$.each(a,function(e,t){$.inArray(t,n)<0&&n.push(t)})}},me.select=function(){me.set.call(this,!0)},me.deselect=function(){me.set.call(this,!1)},me.set=function(i,n,e){var o,s,r,c,l=e;function h(e){e&&$.inArray(e,c)<0&&(c.push(e),r+=(""===r?"":",")+e.key)}function p(e){$.each(c,function(e,t){var a=t;if(a)switch(i){case!0:a.select(l);break;case!1:a.deselect(!0);break;default:a.toggle(l)}}),i||e.removeSelectionFinish()}return this.filter("img,area").each(function(e,t){var a;(s=m.getMapData(t))!==o&&(o&&p(o),c=[],r=""),s&&(a="","IMG"===t.nodeName.toUpperCase()?m.queueCommand(s,$(t),"set",[i,n,l])||(n instanceof Array?n.length&&(a=n.join(",")):a=n,a&&$.each(u.split(a),function(e,t){h(s.getDataForKey(t.toString())),o=s})):(l=n,m.queueCommand(s,$(t),"set",[i,l])||(h(s.getDataForArea(t)),o=s)))}),s&&p(s),this},me.unbind=function(e){return new m.Method(this,function(){this.clearEvents(),this.clearMapData(e),removeMap(this)},null,{name:"unbind",args:arguments}).go()},me.rebind=function(t){return new m.Method(this,function(){var e=this;e.complete=!1,e.configureOptions(t),e.bindImages().then(function(){e.buildDataset(!0),e.complete=!0,e.onConfigured()})},null,{name:"rebind",args:arguments}).go()},me.get_options=function(e,t){var a=u.isBool(e)?e:t;return new m.Method(this,function(){var e=$.extend({},this.options);return a&&(e.render_select=u.updateProps({},m.render_defaults,e,e.render_select),e.render_highlight=u.updateProps({},m.render_defaults,e,e.render_highlight)),e},function(){return a?this.effectiveOptions():this.options},{name:"get_options",args:arguments,first:!0,allowAsync:!0,key:e}).go()},me.set_options=function(e){return new m.Method(this,function(){merge_options(this,e)},null,{name:"set_options",args:arguments}).go()},me.unload=function(){for(var e=m.map_cache.length-1;0<=e;e--)m.map_cache[e]&&me.unbind.call($(m.map_cache[e].image));me.graphics=null},me.snapshot=function(){return new m.Method(this,function(){$.each(this.data,function(e,t){t.selected=!1}),this.base_canvas=this.graphics.createVisibleCanvas(this),$(this.image).before(this.base_canvas)},null,{name:"snapshot"}).go()},me.state=function(){var a,i=null;return $(this).each(function(e,t){if("IMG"===t.nodeName)return(a=m.getMapData(t))&&(i=a.state()),!1}),i},me.bind=function(o){return this.each(function(e,t){var a,i=$(t),n=m.getMapData(t);if(n){if(me.unbind.apply(i),!n.complete)return!0;n=null}if(a=(t=this.getAttribute("usemap"))&&$('map[name="'+t.substr(1)+'"]'),!(i.is("img")&&t&&0{var i,n,o,r=h.mapster,c=r.utils;function l(e,t,a){var i=e,n=i.map_data,o=a.isMask;h.each(t.areas(),function(e,t){a.isMask=o||t.nohref&&n.options.noHrefIsMask,i.addShape(t,a)}),a.isMask=o}function a(e){return Math.max(0,Math.min(parseInt(e,16),255))}function u(e,t){return"rgba("+a(e.substr(0,2))+","+a(e.substr(2,2))+","+a(e.substr(4,2))+","+t+")"}function s(){}r.Graphics=function(e){var t=this;t.active=!1,t.canvas=null,t.width=0,t.height=0,t.shapes=[],t.masks=[],t.map_data=e},i=r.Graphics.prototype={constructor:r.Graphics,begin:function(e,t){var a=h(e);this.elementName=t,this.canvas=e,this.width=a.width(),this.height=a.height(),this.shapes=[],this.masks=[],this.active=!0},addShape:function(e,t){(t.isMask?this.masks:this.shapes).push({mapArea:e,options:t})},createVisibleCanvas:function(e){return h(this.createCanvasFor(e)).addClass("mapster_el").css(r.canvas_style)[0]},addShapeGroup:function(e,a,t){var i,n=this,o=this.map_data,s=e.effectiveRenderOptions(a);t&&h.extend(s,t),t="select"===a?(i="static_"+e.areaId.toString(),o.base_canvas):o.overlay_canvas,n.begin(t,i),s.includeKeys&&(i=c.split(s.includeKeys),h.each(i,function(e,t){t=o.getDataForKey(t.toString());l(n,t,t.effectiveRenderOptions(a))})),l(n,e,s),n.render(),s.fade&&c.fader(r.hasCanvas()?t:h(t).find("._fill").not(".mapster_mask"),0,r.hasCanvas()?1:s.fillOpacity,s.fadeDuration)}},n={renderShape:function(e,t,a){var i,n=t.coords(null,a);switch(t.shape){case"rect":case"rectangle":e.rect(n[0],n[1],n[2]-n[0],n[3]-n[1]);break;case"poly":case"polygon":for(e.moveTo(n[0],n[1]),i=2;i')[0]},clearHighlight:function(){var e=this.map_data.overlay_canvas;e.getContext("2d").clearRect(0,0,e.width,e.height)},refreshSelections:function(){var e=this.map_data,t=e.base_canvas;e.base_canvas=this.createVisibleCanvas(e),h(e.base_canvas).hide(),h(t).before(e.base_canvas),e.redrawSelections(),h(e.base_canvas).show(),h(t).remove()}},o={renderShape:function(e,t,a){var i,n=this,o=e.coords(),s=n.elementName?'name="'+n.elementName+'" ':"",r=a?'class="'+a+'" ':"",c='',l=t.stroke?" strokeweight="+t.strokeWidth+' stroked="t" strokecolor="#'+t.strokeColor+'"':' stroked="f"',u=t.fill?' filled="t"':' filled="f"';switch(e.shape){case"rect":case"rectangle":i="'+c+"";break;case"poly":case"polygon":i="'+c+"";break;case"circ":case"circle":i="'+c+""}return a=h(i),h(n.canvas).append(a),a},render:function(){var a,i=this;return h.each(this.shapes,function(e,t){i.renderShape(t.mapArea,t.options)}),this.masks.length&&h.each(this.masks,function(e,t){a=c.updateProps({},t.options,{fillOpacity:1,fillColor:t.options.fillColorMask}),i.renderShape(t.mapArea,a,"mapster_mask")}),this.active=!1,this.canvas},createCanvasFor:function(e){var t=e.scaleInfo.width,e=e.scaleInfo.height;return h('')[0]},clearHighlight:function(){h(this.map_data.overlay_canvas).children().remove()},removeSelections:function(e){(0<=e?h(this.map_data.base_canvas).find('[name="static_'+e.toString()+'"]'):h(this.map_data.base_canvas).children()).remove()}},h.each(["renderShape","addAltImage","render","createCanvasFor","clearHighlight","removeSelections","refreshSelections"],function(e,t){var a;i[t]=(a=t,function(){return i[a]=(r.hasCanvas()?n:o)[a]||s,i[a].apply(this,arguments)})})})(jQuery),(o=>{var e=o.mapster,n=e.utils,t=[];e.MapImages=function(e){this.owner=e,this.clear()},e.MapImages.prototype={constructor:e.MapImages,slice:function(){return t.slice.apply(this,arguments)},splice:function(){return t.slice.apply(this.status,arguments),t.slice.apply(this,arguments)},complete:function(){return o.inArray(!1,this.status)<0},_add:function(e){e=t.push.call(this,e)-1;return this.status[e]=!1,e},indexOf:function(e){return n.indexOf(this,e)},clear:function(){var a=this;a.ids&&0").addClass("mapster_el").hide(),a=n._add(e[0]),e.on("load.mapster",function(e){n.imageLoaded.call(n,e)}).on("error.mapster",function(e){n.imageLoadError.call(n,e)}),e.attr("src",i)}else a=n._add(o(e)[0]);if(t){if(this[t])throw t+" is already used or is not available as an altImage alias.";n.ids.push(t),n[t]=n[a]}return a}},bind:function(){var t=this,a=t.owner.options.configTimeout/50,i=function(){for(var e=t.length;0{var w=y.mapster,d=w.utils;function n(e,t,a,i){return i=i||d.when.defer(),e.activeAreaEvent&&(window.clearTimeout(e.activeAreaEvent),e.activeAreaEvent=0),t<0?i.resolve({completeAction:!1}):a.owner.currentAction||t?e.activeAreaEvent=window.setTimeout(function(){n(e,0,a,i)},t||100):(t=a.areaId,e.currentAreaId!==t&&0<=e.highlightId&&i.resolve({completeAction:!0})),i}function b(e){return!!e&&"#"!==e}function f(e){w.hasCanvas()||this.blur(),e.preventDefault()}w.MapData=function(e,t){var a=this;a.image=e,a.images=new w.MapImages(a),a.graphics=new w.Graphics(a),a.imgCssText=e.style.cssText||null,y.extend(a,{complete:!1,map:null,base_canvas:null,overlay_canvas:null,commands:[],data:[],mapAreas:[],_xref:{},highlightId:-1,currentAreaId:-1,_tooltip_events:[],scaleInfo:null,index:-1,activeAreaEvent:null,autoResizeTimer:null}),a.configureOptions(t),a.mouseover=function(e){!function(e,t){var a=e.getAllDataForArea(this),i=a.length?a[0]:null;!i||i.isNotRendered()||i.owner.currentAction||e.currentAreaId!==i.areaId&&(e.highlightId!==i.areaId&&(e.clearEffects(),i.highlight(),e.options.showToolTip)&&y.each(a,function(e,t){t.effectiveOptions().toolTip&&t.showToolTip()}),e.currentAreaId=i.areaId,d.isFunction(e.options.onMouseover))&&e.options.onMouseover.call(this,{e:t,options:i.effectiveOptions(),key:i.key,selected:i.isSelected()})}.call(this,a,e)},a.mouseout=function(e){!function(t,e){var a=t.getDataForArea(this),i=t.options;t.currentAreaId<0||!a||t.getDataForArea(e.relatedTarget)!==a&&(t.currentAreaId=-1,a.area=null,n(t,i.mouseoutDelay,a).then(function(e){e.completeAction&&t.clearEffects()}),d.isFunction(i.onMouseout))&&i.onMouseout.call(this,{e:e,options:i,key:a.key,selected:a.isSelected()})}.call(this,a,e)},a.click=function(e){!function(a,i){var n,o,s,r,e,c=this,t=a.getDataForArea(this),l=a.options;function u(e,t,a){"open"===e?window.open(t,a||"_self"):window.location.href=t}function h(e,t,a){var i;return"open"===t?{href:(i=b(t=y(e.area).attr("href")))?t:e.href,target:i?y(e.area).attr("target"):e.hrefTarget}:{href:a}}function p(e){var t;if(s=e.isSelectable()&&(e.isDeselectable()||!e.isSelected()),o=s?!e.isSelected():e.isSelected(),n=w.getBoundList(l,e.key),d.isFunction(l.onClick)&&(r=l.onClick.call(c,{e:i,listTarget:n,key:e.key,selected:o}),d.isBool(r))){if(!r)return;if(b((t=h(e,l.navigateMode,y(e.area).attr("href"))).href))return void u(l.navigateMode,t.href,t.target)}s&&e.toggle()}f.call(this,i),e=h(t,l.navigateMode,t.href),l.clickNavigate&&b(e.href)?u(l.navigateMode,e.href,e.target):t&&!t.owner.currentAction&&(l=a.options,p(t),(e=t.effectiveOptions()).includeKeys)&&(t=d.split(e.includeKeys),y.each(t,function(e,t){t=a.getDataForKey(t.toString());t.options.isMask||p(t)}))}.call(this,a,e)},a.clearEffects=function(e){!function(e){var t=e.options;e.ensureNoHighlight(),t.toolTipClose&&0<=y.inArray("area-mouseout",t.toolTipClose)&&e.activeToolTip&&e.clearToolTip()}.call(this,a,e)},a.mousedown=function(e){f.call(this,e)}},w.MapData.prototype={constructor:w.MapData,configureOptions:function(e){this.options=d.updateProps({},w.defaults,e)},bindImages:function(){var e,a,t=this,i=t.images;return 2
'),l.wrapClass&&(!0===l.wrapClass?a.addClass(s[0].className):a.addClass(l.wrapClass))),c.wrapper=a,c.scaleInfo=r=d.scaleMap(c.images[0],c.images[1],l.scaleMap,l.scaleMapBounds),c.base_canvas=e=c.graphics.createVisibleCanvas(c),c.overlay_canvas=t=c.graphics.createVisibleCanvas(c),i=y(c.images[1]).addClass("mapster_el "+c.images[0].className).attr({id:null,usemap:null}),(o=d.size(c.images[0])).complete&&i.css({width:o.width,height:o.height}),c.buildDataset(),i=y.extend({display:"block",position:"relative",padding:0},!0===l.enableAutoResizeSupport?{}:{width:r.width,height:r.height}),l.wrapCss&&y.extend(i,l.wrapCss),s.parent()[0]!==c.wrapper[0]&&s.before(c.wrapper),a.css(i),y(c.images.slice(2)).hide(),n=1;n{var a=o.mapster,n=a.utils;function s(e){e=o(e);return n.hasAttribute(e,"nohref")||!n.hasAttribute(e,"href")}a.AreaData=function(e,t,a){o.extend(this,{owner:e,key:t||"",isPrimary:!0,areaId:-1,href:"",hrefTarget:null,value:a||"",options:{},selected:null,staticStateOverridden:!1,areasXref:[],area:null,optsCache:null})},a.AreaData.prototype={constuctor:a.AreaData,select:function(e){var t=this,a=t.owner,e=(i=!o.isEmptyObject(e))?o.extend(t.effectiveRenderOptions("select"),e,{altImageId:a.images.add(e.altImage)}):null,i=i&&!(t.optsCache===e),n=t.isSelectedOrStatic();a.options.singleSelect&&(a.clearSelections(),n=t.isSelectedOrStatic()),i&&(t.optsCache=e),e=t.updateSelected(!0),n&&i?(a.graphics.removeSelections(t.areaId),a.graphics.refreshSelections()):n||t.drawSelection(),e&&t.changeState("select",!0)},deselect:function(e){var t=this,a=t.updateSelected(!1);t.optsCache=null,t.owner.graphics.removeSelections(t.areaId),e||t.owner.removeSelectionFinish(),a&&t.changeState("select",!1)},toggle:function(e){return this.isSelected()?this.deselect():this.select(e),this.isSelected()},updateSelected:function(e){var t=this.selected;return this.selected=e,this.staticStateOverridden=!!n.isBool(this.effectiveOptions().staticState),t!==e},areas:function(){for(var e=[],t=0;t{var M=I.mapster.utils;M.areaCorners=function(e,t,a,i,n){var o,s,r,c,l,u,h,p,d,f,m,g,v,y,w,b,k,S,A,T,_=0,C=0,x=[];for(e=e.length?e:[e],o=(a=I(a||document.body)).offset(),w=o.left,b=o.top,t&&(_=(o=I(t).offset()).left,C=o.top),y=0;yw&&t[1]>b)return v=t,!(s=!0)}),s||(v=[l,u])),v}})(jQuery),(d=>{var f=d.mapster,m=f.utils,e=f.MapArea.prototype;f.utils.getScaleInfo=function(e,t,a){var i;return t?(i=e.width/t.width||e.height/t.height,a&&i>a.below&&i{var e=c.mapster,l=e.utils;function u(e,t,a){var i;return t?(i="string"==typeof t?c(t):c(t).clone()).append(e):i=c(e),i.css(c.extend(a||{},{display:"block",position:"absolute"})).hide(),c("body").append(i),i.attr("data-opacity",i.css("opacity")).css("opacity",0),i.show()}function h(e,t,a,i,n,o){var s=".mapster.tooltip",a=a+s;0<=c.inArray(t,e)&&i.off(a).on(a,function(e){n&&!n.call(this,e)||(i.off(s),o&&o.call(this))})}function p(e,t,a,i,n){var o={};return n=n||{},t?(t=l.areaCorners(t,a,i,e.outerWidth(!0),e.outerHeight(!0)),o.left=t[0],o.top=t[1]):(o.left=n.left,o.top=n.top),o.left+=n.offsetx||0,o.top+=n.offsety||0,o.css=n.css,o.fadeDuration=n.fadeDuration,i={left:(a=o).left+"px",top:a.top+"px"},n=(t=e).attr("data-opacity")||0,o=t.css("z-index"),0!==parseInt(o,10)&&"auto"!==o||(i["z-index"]=9999),t.css(i).addClass("mapster_tooltip"),a.fadeDuration&&0',showToolTip:!1,toolTip:null,toolTipFade:!0,toolTipClose:["area-mouseout","image-mouseout","generic-mouseout"],onShowToolTip:null,onHideToolTip:null}),c.extend(e.area_defaults,{toolTip:null,toolTipClose:null}),e.MapData.prototype.clearToolTip=function(){this.activeToolTip&&(this.activeToolTip.stop().remove(),this.activeToolTip=null,this.activeToolTipID=null,l.ifFunction(this.options.onHideToolTip,this))},e.AreaData.prototype.showToolTip=function(e,t){var a,i,n,o=this,s=o.owner,r=o.effectiveOptions();if(t=t?c.extend({},t):{},e=e||r.toolTip,a=t.closeEvents||r.toolTipClose||s.options.toolTipClose||"tooltip-click",n=void 0!==t.template?t.template:s.options.toolTipContainer,t.closeEvents="string"==typeof a?a=l.split(a):a,t.fadeDuration=t.fadeDuration||(s.options.toolTipFade?(l.isNumeric(r.fadeDuration)?r:s.options).fadeDuration:0),i=o.area||c.map(o.areas(),function(e){return e.area}),s.activeToolTipID!==o.areaId){s.clearToolTip();var e=l.isFunction(e)?e({key:this.key,target:i}):e;if(e)return s.activeToolTip=e=u(e,n,t.css),s.activeToolTipID=o.areaId,n=function(){s.clearToolTip()},h(a,"area-click","click",c(s.map),null,n),h(a,"tooltip-click","click",e,null,n),h(a,"image-mouseout","mouseout",c(s.image),function(e){return e.relatedTarget&&"AREA"!==e.relatedTarget.nodeName&&e.relatedTarget!==o.area},n),h(a,"image-click","click",c(s.image),null,n),p(e,i,s.image,t.container,t),l.ifFunction(s.options.onShowToolTip,o.area,{toolTip:e,options:{},areaOptions:r,key:o.key,selected:o.isSelected()}),e}},e.impl.tooltip=function(s,r){return new e.Method(this,function(){var e,t,a,i,n,o=this;s?(n=(e=c(s))&&0{"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),a(t),t}:a(e.jQuery||e.Zepto)})("undefined"!=typeof self?self:this,function(jQuery){(i=>{i.fn.stop||(i.fn.stop=function(){return this}),i.each(["Height","Width"],function(e,t){var a="outer"+t;i.fn[a]||(i.fn[a]=function(){return this[t.toLowerCase()]()})}),i.fn.extend||(i.fn.extend=function(e){i.extend(i.fn,e)}),i.fn.addSelf||(i.fn.end=function(){return this.prevObject||i()},i.fn.andSelf=function(){return this.add(this.prevObject||i())},"filter,add,not,eq,first,last,find,closest,parents,parent,children,siblings".split(",").forEach(function(e){var t=i.fn[e];i.fn[e]=function(){var e=t.apply(this,arguments);return e.prevObject=this,e}}))})(jQuery),(e=>{if(e.event&&e.event.special){var i,t=!1;try{var a=Object.defineProperty({},"passive",{get:function(){return t=!0}});window.addEventListener("testPassive.mapster",function(){},a),window.removeEventListener("testPassive.mapster",function(){},a)}catch(e){}t&&(i=function(e,t,a){if(!e.includes("mapster")||!e.includes("noPreventDefault"))return!1;this.addEventListener(t,a,{passive:!0})},e.event.special.touchstart={setup:function(e,t,a){return i.call(this,t,"touchstart",a)}},e.event.special.touchend={setup:function(e,t,a){return i.call(this,t,"touchend",a)}})}})(jQuery),(c=>{c.fn.addBack=c.fn.addBack||c.fn.andSelf,c.fn.extend({actual:function(e,t){var a,i,n,o,s,r;if(this[e])return a=c.extend({absolute:!1,clone:!1,includeMargin:!1,display:"block"},t),i=this.eq(0),t=!0===a.clone?(r=function(){i=i.clone().attr("style","position: absolute !important; top: -1000 !important; ").appendTo("body")},function(){i.remove()}):(n=[],o="",r=function(){s=i.parents().addBack().filter(":hidden"),o+="visibility: hidden !important; display: "+a.display+" !important; ",!0===a.absolute&&(o+="position: absolute !important; "),s.each(function(){var e=c(this),t=e.attr("style");n.push(t),e.attr("style",t?t+";"+o:o)})},function(){s.each(function(e){var t=c(this),e=n[e];void 0===e?t.removeAttr("style"):t.attr("style",e)})}),r(),r=/(outer)/.test(e)?i[e](a.includeMargin):i[e](),t(),r;throw'$.actual => The jQuery method "'+e+'" you called does not exist'}})})(jQuery),!function($){var mapster_version="1.9.1",m=($.fn.mapster=function(e){var t=$.mapster.impl;return $.mapster.utils.isFunction(t[e])?t[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void $.error("Method "+e+" does not exist on jQuery.mapster"):t.bind.apply(this,arguments)},$.mapster={version:mapster_version,render_defaults:{isSelectable:!0,isDeselectable:!0,fade:!1,fadeDuration:150,fill:!0,fillColor:"000000",fillColorMask:"FFFFFF",fillOpacity:.7,highlight:!0,stroke:!1,strokeColor:"ff0000",strokeOpacity:1,strokeWidth:1,includeKeys:"",altImage:null,altImageId:null,altImages:{},altImageOpacity:null},defaults:{clickNavigate:!1,navigateMode:"location",wrapClass:null,wrapCss:null,onGetList:null,sortList:!1,mapKey:"",mapValue:"",singleSelect:!1,listKey:"value",listSelectedAttribute:"selected",listSelectedClass:null,onClick:null,onMouseover:null,onMouseout:null,mouseoutDelay:0,onStateChange:null,boundList:null,onConfigured:null,configTimeout:3e4,noHrefIsMask:!0,scaleMap:!0,scaleMapBounds:{below:.98,above:1.02},enableAutoResizeSupport:!1,autoResize:!1,autoResizeDelay:0,autoResizeDuration:0,onAutoResize:null,areas:[]},shared_defaults:{render_highlight:{fade:!0},render_select:{fade:!1},staticState:null,selected:null},area_defaults:{includeKeys:"",isMask:!1},canvas_style:{position:"absolute",left:0,top:0,padding:0,border:0},hasCanvas:null,map_cache:[],hooks:{},addHook:function(e,t){this.hooks[e]=(this.hooks[e]||[]).push(t)},callHooks:function(e,a){$.each(this.hooks[e]||[],function(e,t){t.apply(a)})},utils:{when:{all:function(e){return Promise.all(e)},defer:function(){return new function(){this.promise=new Promise(function(e,t){this.resolve=e,this.reject=t}.bind(this)),this.then=this.promise.then.bind(this.promise),this.catch=this.promise.catch.bind(this.promise)}}},defer:function(){return this.when.defer()},subclass:function(a,i){function e(){var e=this,t=Array.prototype.slice.call(arguments,0);e.base=a.prototype,e.base.init=function(){a.prototype.constructor.apply(e,t)},i.apply(e,t)}return(e.prototype=new a).constructor=e},asArray:function(e){return e.constructor===Array?e:this.split(e)},split:function(e,t){for(var a,i=e.split(","),n=0;n{function c(e,t,a,i){var n,o,s=i/15,r=$.mapster.utils;if("number"==typeof e){if(!(o=l[e]))return}else(n=r.indexOfProp(l,null,e))&&delete l[n],l[++u]=o=e,e=u;t=(a=a||1)-.01=e.index;t--)m.map_cache[t].index--};function hasVml(){var e=$("
").appendTo("body"),t=(e.html(''),e[0].firstChild),t=(t.style.behavior="url(#default#VML)",!t||"object"==typeof t.adj);return e.remove(),t}function namespaces(){return"object"==typeof document.namespaces?document.namespaces:null}function hasCanvas(){var e=namespaces();return!(e&&e.g_vml_||!$("")[0].getContext)}function merge_areas(a,e){var i,n=a.options.areas;e&&$.each(e,function(e,t){t&&t.key&&(0<=(i=u.indexOfProp(n,"key",t.key))?$.extend(n[i],t):n.push(t),i=a.getDataForKey(t.key))&&$.extend(i.options,t)})}function merge_options(e,t){var a=u.updateProps({},t);delete a.areas,u.updateProps(e.options,a),merge_areas(e,t.areas),u.updateProps(e.area_options,e.options)}return me.get=function(e){var t=m.getMapData(this);if(t&&t.complete)return new m.Method(this,function(){return this.getSelected()},function(){return this.isSelected()},{name:"get",args:arguments,key:e,first:!0,allowAsync:!0,defaultReturn:""}).go();throw"Can't access data until binding complete."},me.data=function(e){return new m.Method(this,null,function(){return this},{name:"data",args:arguments,key:e}).go()},me.highlight=function(t){return new m.Method(this,function(){var e;if(!1!==t)return 0<=(e=this.highlightId)?this.data[e].key:null;this.ensureNoHighlight()},function(){this.highlight()},{name:"highlight",args:arguments,key:t,first:!0}).go()},me.keys=function(e,i){var n=[],a=m.getMapData(this);if(a&&a.complete)return a&&a.complete?("string"==typeof e?i?o(a.getDataForKey(e)):n=[a.getKeysForGroup(e)]:(i=e,this.each(function(e,t){"AREA"===t.nodeName&&o(a.getDataForArea(t))})),n.join(",")):"";throw"Can't access data until binding complete.";function o(e){var t,a=[];i?(t=e.areas(),$.each(t,function(e,t){a=a.concat(t.keys)})):a.push(e.key),$.each(a,function(e,t){$.inArray(t,n)<0&&n.push(t)})}},me.select=function(){me.set.call(this,!0)},me.deselect=function(){me.set.call(this,!1)},me.set=function(i,n,e){var o,s,r,c,l=e;function h(e){e&&$.inArray(e,c)<0&&(c.push(e),r+=(""===r?"":",")+e.key)}function p(e){$.each(c,function(e,t){var a=t;if(a)switch(i){case!0:a.select(l);break;case!1:a.deselect(!0);break;default:a.toggle(l)}}),i||e.removeSelectionFinish()}return this.filter("img,area").each(function(e,t){var a;(s=m.getMapData(t))!==o&&(o&&p(o),c=[],r=""),s&&(a="","IMG"===t.nodeName.toUpperCase()?m.queueCommand(s,$(t),"set",[i,n,l])||(n instanceof Array?n.length&&(a=n.join(",")):a=n,a&&$.each(u.split(a),function(e,t){h(s.getDataForKey(t.toString())),o=s})):(l=n,m.queueCommand(s,$(t),"set",[i,l])||(h(s.getDataForArea(t)),o=s)))}),s&&p(s),this},me.unbind=function(e){return new m.Method(this,function(){this.clearEvents(),this.clearMapData(e),removeMap(this)},null,{name:"unbind",args:arguments}).go()},me.rebind=function(t){return new m.Method(this,function(){var e=this;e.complete=!1,e.configureOptions(t),e.bindImages().then(function(){e.buildDataset(!0),e.complete=!0,e.onConfigured()})},null,{name:"rebind",args:arguments}).go()},me.get_options=function(e,t){var a=u.isBool(e)?e:t;return new m.Method(this,function(){var e=$.extend({},this.options);return a&&(e.render_select=u.updateProps({},m.render_defaults,e,e.render_select),e.render_highlight=u.updateProps({},m.render_defaults,e,e.render_highlight)),e},function(){return a?this.effectiveOptions():this.options},{name:"get_options",args:arguments,first:!0,allowAsync:!0,key:e}).go()},me.set_options=function(e){return new m.Method(this,function(){merge_options(this,e)},null,{name:"set_options",args:arguments}).go()},me.unload=function(){for(var e=m.map_cache.length-1;0<=e;e--)m.map_cache[e]&&me.unbind.call($(m.map_cache[e].image));me.graphics=null},me.snapshot=function(){return new m.Method(this,function(){$.each(this.data,function(e,t){t.selected=!1}),this.base_canvas=this.graphics.createVisibleCanvas(this),$(this.image).before(this.base_canvas)},null,{name:"snapshot"}).go()},me.state=function(){var a,i=null;return $(this).each(function(e,t){if("IMG"===t.nodeName)return(a=m.getMapData(t))&&(i=a.state()),!1}),i},me.bind=function(o){return this.each(function(e,t){var a,i=$(t),n=m.getMapData(t);if(n){if(me.unbind.apply(i),!n.complete)return!0;n=null}if(a=(t=this.getAttribute("usemap"))&&$('map[name="'+t.substr(1)+'"]'),!(i.is("img")&&t&&0{var i,n,o,r=h.mapster,c=r.utils;function l(e,t,a){var i=e,n=i.map_data,o=a.isMask;h.each(t.areas(),function(e,t){a.isMask=o||t.nohref&&n.options.noHrefIsMask,i.addShape(t,a)}),a.isMask=o}function a(e){return Math.max(0,Math.min(parseInt(e,16),255))}function u(e,t){return"rgba("+a(e.substr(0,2))+","+a(e.substr(2,2))+","+a(e.substr(4,2))+","+t+")"}function s(){}r.Graphics=function(e){var t=this;t.active=!1,t.canvas=null,t.width=0,t.height=0,t.shapes=[],t.masks=[],t.map_data=e},i=r.Graphics.prototype={constructor:r.Graphics,begin:function(e,t){var a=h(e);this.elementName=t,this.canvas=e,this.width=a.width(),this.height=a.height(),this.shapes=[],this.masks=[],this.active=!0},addShape:function(e,t){(t.isMask?this.masks:this.shapes).push({mapArea:e,options:t})},createVisibleCanvas:function(e){return h(this.createCanvasFor(e)).addClass("mapster_el").css(r.canvas_style)[0]},addShapeGroup:function(e,a,t){var i,n=this,o=this.map_data,s=e.effectiveRenderOptions(a);t&&h.extend(s,t),t="select"===a?(i="static_"+e.areaId.toString(),o.base_canvas):o.overlay_canvas,n.begin(t,i),s.includeKeys&&(i=c.split(s.includeKeys),h.each(i,function(e,t){t=o.getDataForKey(t.toString());l(n,t,t.effectiveRenderOptions(a))})),l(n,e,s),n.render(),s.fade&&c.fader(r.hasCanvas()?t:h(t).find("._fill").not(".mapster_mask"),0,r.hasCanvas()?1:s.fillOpacity,s.fadeDuration)}},n={renderShape:function(e,t,a){var i,n=t.coords(null,a);switch(t.shape){case"rect":case"rectangle":e.rect(n[0],n[1],n[2]-n[0],n[3]-n[1]);break;case"poly":case"polygon":for(e.moveTo(n[0],n[1]),i=2;i')[0]},clearHighlight:function(){var e=this.map_data.overlay_canvas;e.getContext("2d").clearRect(0,0,e.width,e.height)},refreshSelections:function(){var e=this.map_data,t=e.base_canvas;e.base_canvas=this.createVisibleCanvas(e),h(e.base_canvas).hide(),h(t).before(e.base_canvas),e.redrawSelections(),h(e.base_canvas).show(),h(t).remove()}},o={renderShape:function(e,t,a){var i,n=this,o=e.coords(),s=n.elementName?'name="'+n.elementName+'" ':"",r=a?'class="'+a+'" ':"",c='',l=t.stroke?" strokeweight="+t.strokeWidth+' stroked="t" strokecolor="#'+t.strokeColor+'"':' stroked="f"',u=t.fill?' filled="t"':' filled="f"';switch(e.shape){case"rect":case"rectangle":i="'+c+"";break;case"poly":case"polygon":i="'+c+"";break;case"circ":case"circle":i="'+c+""}return a=h(i),h(n.canvas).append(a),a},render:function(){var a,i=this;return h.each(this.shapes,function(e,t){i.renderShape(t.mapArea,t.options)}),this.masks.length&&h.each(this.masks,function(e,t){a=c.updateProps({},t.options,{fillOpacity:1,fillColor:t.options.fillColorMask}),i.renderShape(t.mapArea,a,"mapster_mask")}),this.active=!1,this.canvas},createCanvasFor:function(e){var t=e.scaleInfo.width,e=e.scaleInfo.height;return h('')[0]},clearHighlight:function(){h(this.map_data.overlay_canvas).children().remove()},removeSelections:function(e){(0<=e?h(this.map_data.base_canvas).find('[name="static_'+e.toString()+'"]'):h(this.map_data.base_canvas).children()).remove()}},h.each(["renderShape","addAltImage","render","createCanvasFor","clearHighlight","removeSelections","refreshSelections"],function(e,t){var a;i[t]=(a=t,function(){return i[a]=(r.hasCanvas()?n:o)[a]||s,i[a].apply(this,arguments)})})})(jQuery),(o=>{var e=o.mapster,n=e.utils,t=[];e.MapImages=function(e){this.owner=e,this.clear()},e.MapImages.prototype={constructor:e.MapImages,slice:function(){return t.slice.apply(this,arguments)},splice:function(){return t.slice.apply(this.status,arguments),t.slice.apply(this,arguments)},complete:function(){return o.inArray(!1,this.status)<0},_add:function(e){e=t.push.call(this,e)-1;return this.status[e]=!1,e},indexOf:function(e){return n.indexOf(this,e)},clear:function(){var a=this;a.ids&&0").addClass("mapster_el").hide(),a=n._add(e[0]),e.on("load.mapster",function(e){n.imageLoaded.call(n,e)}).on("error.mapster",function(e){n.imageLoadError.call(n,e)}),e.attr("src",i)}else a=n._add(o(e)[0]);if(t){if(this[t])throw t+" is already used or is not available as an altImage alias.";n.ids.push(t),n[t]=n[a]}return a}},bind:function(){var t=this,a=t.owner.options.configTimeout/50,i=function(){for(var e=t.length;0{var w=y.mapster,d=w.utils;function n(e,t,a,i){return i=i||d.when.defer(),e.activeAreaEvent&&(window.clearTimeout(e.activeAreaEvent),e.activeAreaEvent=0),t<0?i.resolve({completeAction:!1}):a.owner.currentAction||t?e.activeAreaEvent=window.setTimeout(function(){n(e,0,a,i)},t||100):(t=a.areaId,e.currentAreaId!==t&&0<=e.highlightId&&i.resolve({completeAction:!0})),i}function b(e){return!!e&&"#"!==e}function f(e){w.hasCanvas()||this.blur(),e.preventDefault()}w.MapData=function(e,t){var a=this;a.image=e,a.images=new w.MapImages(a),a.graphics=new w.Graphics(a),a.imgCssText=e.style.cssText||null,y.extend(a,{complete:!1,map:null,base_canvas:null,overlay_canvas:null,commands:[],data:[],mapAreas:[],_xref:{},highlightId:-1,currentAreaId:-1,_tooltip_events:[],scaleInfo:null,index:-1,activeAreaEvent:null,autoResizeTimer:null}),a.configureOptions(t),a.mouseover=function(e){!function(e,t){var a=e.getAllDataForArea(this),i=a.length?a[0]:null;!i||i.isNotRendered()||i.owner.currentAction||e.currentAreaId!==i.areaId&&(e.highlightId!==i.areaId&&(e.clearEffects(),i.highlight(),e.options.showToolTip)&&y.each(a,function(e,t){t.effectiveOptions().toolTip&&t.showToolTip()}),e.currentAreaId=i.areaId,d.isFunction(e.options.onMouseover))&&e.options.onMouseover.call(this,{e:t,options:i.effectiveOptions(),key:i.key,selected:i.isSelected()})}.call(this,a,e)},a.mouseout=function(e){!function(t,e){var a=t.getDataForArea(this),i=t.options;t.currentAreaId<0||!a||t.getDataForArea(e.relatedTarget)!==a&&(t.currentAreaId=-1,a.area=null,n(t,i.mouseoutDelay,a).then(function(e){e.completeAction&&t.clearEffects()}),d.isFunction(i.onMouseout))&&i.onMouseout.call(this,{e:e,options:i,key:a.key,selected:a.isSelected()})}.call(this,a,e)},a.click=function(e){!function(a,i){var n,o,s,r,e,c=this,t=a.getDataForArea(this),l=a.options;function u(e,t,a){"open"===e?window.open(t,a||"_self"):window.location.href=t}function h(e,t,a){var i;return"open"===t?{href:(i=b(t=y(e.area).attr("href")))?t:e.href,target:i?y(e.area).attr("target"):e.hrefTarget}:{href:a}}function p(e){var t;if(s=e.isSelectable()&&(e.isDeselectable()||!e.isSelected()),o=s?!e.isSelected():e.isSelected(),n=w.getBoundList(l,e.key),d.isFunction(l.onClick)&&(r=l.onClick.call(c,{e:i,listTarget:n,key:e.key,selected:o}),d.isBool(r))){if(!r)return;if(b((t=h(e,l.navigateMode,y(e.area).attr("href"))).href))return void u(l.navigateMode,t.href,t.target)}s&&e.toggle()}f.call(this,i),e=h(t,l.navigateMode,t.href),l.clickNavigate&&b(e.href)?u(l.navigateMode,e.href,e.target):t&&!t.owner.currentAction&&(l=a.options,p(t),(e=t.effectiveOptions()).includeKeys)&&(t=d.split(e.includeKeys),y.each(t,function(e,t){t=a.getDataForKey(t.toString());t.options.isMask||p(t)}))}.call(this,a,e)},a.clearEffects=function(e){!function(e){var t=e.options;e.ensureNoHighlight(),t.toolTipClose&&0<=y.inArray("area-mouseout",t.toolTipClose)&&e.activeToolTip&&e.clearToolTip()}.call(this,a,e)},a.mousedown=function(e){f.call(this,e)}},w.MapData.prototype={constructor:w.MapData,configureOptions:function(e){this.options=d.updateProps({},w.defaults,e)},bindImages:function(){var e,a,t=this,i=t.images;return 2
'),l.wrapClass&&(!0===l.wrapClass?a.addClass(s[0].className):a.addClass(l.wrapClass))),c.wrapper=a,c.scaleInfo=r=d.scaleMap(c.images[0],c.images[1],l.scaleMap,l.scaleMapBounds),c.base_canvas=e=c.graphics.createVisibleCanvas(c),c.overlay_canvas=t=c.graphics.createVisibleCanvas(c),i=y(c.images[1]).addClass("mapster_el "+c.images[0].className).attr({id:null,usemap:null}),(o=d.size(c.images[0])).complete&&i.css({width:o.width,height:o.height}),c.buildDataset(),i=y.extend({display:"block",position:"relative",padding:0},!0===l.enableAutoResizeSupport?{}:{width:r.width,height:r.height}),l.wrapCss&&y.extend(i,l.wrapCss),s.parent()[0]!==c.wrapper[0]&&s.before(c.wrapper),a.css(i),y(c.images.slice(2)).hide(),n=1;n{var a=o.mapster,n=a.utils;function s(e){e=o(e);return n.hasAttribute(e,"nohref")||!n.hasAttribute(e,"href")}a.AreaData=function(e,t,a){o.extend(this,{owner:e,key:t||"",isPrimary:!0,areaId:-1,href:"",hrefTarget:null,value:a||"",options:{},selected:null,staticStateOverridden:!1,areasXref:[],area:null,optsCache:null})},a.AreaData.prototype={constuctor:a.AreaData,select:function(e){var t=this,a=t.owner,e=(i=!o.isEmptyObject(e))?o.extend(t.effectiveRenderOptions("select"),e,{altImageId:a.images.add(e.altImage)}):null,i=i&&!(t.optsCache===e),n=t.isSelectedOrStatic();a.options.singleSelect&&(a.clearSelections(),n=t.isSelectedOrStatic()),i&&(t.optsCache=e),e=t.updateSelected(!0),n&&i?(a.graphics.removeSelections(t.areaId),a.graphics.refreshSelections()):n||t.drawSelection(),e&&t.changeState("select",!0)},deselect:function(e){var t=this,a=t.updateSelected(!1);t.optsCache=null,t.owner.graphics.removeSelections(t.areaId),e||t.owner.removeSelectionFinish(),a&&t.changeState("select",!1)},toggle:function(e){return this.isSelected()?this.deselect():this.select(e),this.isSelected()},updateSelected:function(e){var t=this.selected;return this.selected=e,this.staticStateOverridden=!!n.isBool(this.effectiveOptions().staticState),t!==e},areas:function(){for(var e=[],t=0;t{var M=I.mapster.utils;M.areaCorners=function(e,t,a,i,n){var o,s,r,c,l,u,h,p,d,f,m,g,v,y,w,b,k,S,A,T,_=0,C=0,x=[];for(e=e.length?e:[e],o=(a=I(a||document.body)).offset(),w=o.left,b=o.top,t&&(_=(o=I(t).offset()).left,C=o.top),y=0;yw&&t[1]>b)return v=t,!(s=!0)}),s||(v=[l,u])),v}})(jQuery),(d=>{var f=d.mapster,m=f.utils,e=f.MapArea.prototype;f.utils.getScaleInfo=function(e,t,a){var i;return t?(i=e.width/t.width||e.height/t.height,a&&i>a.below&&i{var e=c.mapster,l=e.utils;function u(e,t,a){var i;return t?(i="string"==typeof t?c(t):c(t).clone()).append(e):i=c(e),i.css(c.extend(a||{},{display:"block",position:"absolute"})).hide(),c("body").append(i),i.attr("data-opacity",i.css("opacity")).css("opacity",0),i.show()}function h(e,t,a,i,n,o){var s=".mapster.tooltip",a=a+s;0<=c.inArray(t,e)&&i.off(a).on(a,function(e){n&&!n.call(this,e)||(i.off(s),o&&o.call(this))})}function p(e,t,a,i,n){var o={};return n=n||{},t?(t=l.areaCorners(t,a,i,e.outerWidth(!0),e.outerHeight(!0)),o.left=t[0],o.top=t[1]):(o.left=n.left,o.top=n.top),o.left+=n.offsetx||0,o.top+=n.offsety||0,o.css=n.css,o.fadeDuration=n.fadeDuration,i={left:(a=o).left+"px",top:a.top+"px"},n=(t=e).attr("data-opacity")||0,o=t.css("z-index"),0!==parseInt(o,10)&&"auto"!==o||(i["z-index"]=9999),t.css(i).addClass("mapster_tooltip"),a.fadeDuration&&0',showToolTip:!1,toolTip:null,toolTipFade:!0,toolTipClose:["area-mouseout","image-mouseout","generic-mouseout"],onShowToolTip:null,onHideToolTip:null}),c.extend(e.area_defaults,{toolTip:null,toolTipClose:null}),e.MapData.prototype.clearToolTip=function(){this.activeToolTip&&(this.activeToolTip.stop().remove(),this.activeToolTip=null,this.activeToolTipID=null,l.ifFunction(this.options.onHideToolTip,this))},e.AreaData.prototype.showToolTip=function(e,t){var a,i,n,o=this,s=o.owner,r=o.effectiveOptions();if(t=t?c.extend({},t):{},e=e||r.toolTip,a=t.closeEvents||r.toolTipClose||s.options.toolTipClose||"tooltip-click",n=void 0!==t.template?t.template:s.options.toolTipContainer,t.closeEvents="string"==typeof a?a=l.split(a):a,t.fadeDuration=t.fadeDuration||(s.options.toolTipFade?(l.isNumeric(r.fadeDuration)?r:s.options).fadeDuration:0),i=o.area||c.map(o.areas(),function(e){return e.area}),s.activeToolTipID!==o.areaId){s.clearToolTip();var e=l.isFunction(e)?e({key:this.key,target:i}):e;if(e)return s.activeToolTip=e=u(e,n,t.css),s.activeToolTipID=o.areaId,n=function(){s.clearToolTip()},h(a,"area-click","click",c(s.map),null,n),h(a,"tooltip-click","click",e,null,n),h(a,"image-mouseout","mouseout",c(s.image),function(e){return e.relatedTarget&&"AREA"!==e.relatedTarget.nodeName&&e.relatedTarget!==o.area},n),h(a,"image-click","click",c(s.image),null,n),p(e,i,s.image,t.container,t),l.ifFunction(s.options.onShowToolTip,o.area,{toolTip:e,options:{},areaOptions:r,key:o.key,selected:o.isSelected()}),e}},e.impl.tooltip=function(s,r){return new e.Method(this,function(){var e,t,a,i,n,o=this;s?(n=(e=c(s))&&0