{"version":3,"file":"main.bundle.js","sources":["../../../Static/src/js/polyfill-forEach.js","../../../Static/src/js/polyfill-promise.js","../../../Static/src/js/polyfill-remove.js","../../../Static/src/js/polyfill-classlist.js","../../../Static/src/js/jquery.waypoints.js","../../../Static/src/js/inview.js","../../../Static/src/js/balast-water.js","../../../Static/src/js/nav.js","../../../Static/src/js/map.js","../../../Static/src/js/expanding-contact.js","../../../Static/src/js/course-datepicker.js","../../../Static/src/js/add-links.js","../../../Static/src/js/favourite-list.js","../../../Static/src/js/course-list.js","../../../Static/src/js/scroll-to.js","../../../Static/src/js/set-select.js","../../../Static/src/js/latest-visits.js","../../../Static/src/js/process.js","../../../Static/src/js/easter.js","../../../Static/src/js/filter-js.js","../../../Static/src/js/active-filters-front-page.js","../../../Static/src/js/bg-video.js","../../../Static/src/js/bg-video-stream.js","../../../Static/src/js/captchaToken.js","../../../Static/src/js/helpers.js","../../../Static/src/js/hero-video.js","../../../Static/src/js/sticky-anchor-link.js","../../../Static/src/js/cl-jump-to.js","../../../Static/src/js/tabs.js","../../../Static/src/js/download-list.js","../../../Static/src/js/copy-to-clipboard.js","../../../Static/src/js/obfuscator.js","../../../Static/src/js/articleList__item.js","../../../Static/src/js/ww-expand-block.js","../../../Static/src/js/scroll-animation.js","../../../Static/src/js/teaser-gallery.js","../../../Static/src/js/mega-list.js","../../../Static/src/js/custom-select.js","../../../Static/src/js/catalogue-download.js","../../../Static/src/js/product-page.js","../../../Static/src/js/language-switcher.js","../../../Static/src/js/image-gallery.js","../../../Static/src/js/imo2020.js","../../../Static/src/js/accordion.js","../../../Static/src/js/tabs-block.js","../../../Static/src/js/insurance-block.js","../../../Static/src/js/recaptcha-links.js","../../../Static/src/js/refrigerant-calculator-helpers.js","../../../Static/src/js/refrigerant-calculator.js"],"sourcesContent":["(function() {\r\n if (window.NodeList && !NodeList.prototype.forEach) {\r\n NodeList.prototype.forEach = Array.prototype.forEach;\r\n }\r\n}());","// UMD header\r\n(function (root, factory) {\r\n if (typeof define === 'function' && define.amd) {\r\n define(factory);\r\n } else if (typeof exports === 'object') {\r\n module.exports = factory();\r\n } else {\r\n root.ayepromise = factory();\r\n }\r\n}(this, function () {\r\n 'use strict';\r\n\r\n var ayepromise = {};\r\n\r\n /* Wrap an arbitrary number of functions and allow only one of them to be\r\n executed and only once */\r\n var once = function () {\r\n var wasCalled = false;\r\n\r\n return function wrapper(wrappedFunction) {\r\n return function () {\r\n if (wasCalled) {\r\n return;\r\n }\r\n wasCalled = true;\r\n wrappedFunction.apply(null, arguments);\r\n };\r\n };\r\n };\r\n\r\n var getThenableIfExists = function (obj) {\r\n // Make sure we only access the accessor once as required by the spec\r\n var then = obj && obj.then;\r\n\r\n if (typeof obj === \"object\" && typeof then === \"function\") {\r\n // Bind function back to it's object (so lousy 'this' will work)\r\n return function() { return then.apply(obj, arguments); };\r\n }\r\n };\r\n\r\n var aThenHandler = function (onFulfilled, onRejected) {\r\n var defer = ayepromise.defer();\r\n\r\n var doHandlerCall = function (func, value) {\r\n setTimeout(function () {\r\n var returnValue;\r\n try {\r\n returnValue = func(value);\r\n } catch (e) {\r\n defer.reject(e);\r\n return;\r\n }\r\n\r\n if (returnValue === defer.promise) {\r\n defer.reject(new TypeError('Cannot resolve promise with itself'));\r\n } else {\r\n defer.resolve(returnValue);\r\n }\r\n }, 1);\r\n };\r\n\r\n var callFulfilled = function (value) {\r\n if (onFulfilled && onFulfilled.call) {\r\n doHandlerCall(onFulfilled, value);\r\n } else {\r\n defer.resolve(value);\r\n }\r\n };\r\n\r\n var callRejected = function (value) {\r\n if (onRejected && onRejected.call) {\r\n doHandlerCall(onRejected, value);\r\n } else {\r\n defer.reject(value);\r\n }\r\n };\r\n\r\n return {\r\n promise: defer.promise,\r\n handle: function (state, value) {\r\n if (state === FULFILLED) {\r\n callFulfilled(value);\r\n } else {\r\n callRejected(value);\r\n }\r\n }\r\n };\r\n };\r\n\r\n // States\r\n var PENDING = 0,\r\n FULFILLED = 1,\r\n REJECTED = 2;\r\n\r\n ayepromise.defer = function () {\r\n var state = PENDING,\r\n outcome,\r\n thenHandlers = [];\r\n\r\n var doSettle = function (settledState, value) {\r\n state = settledState;\r\n // Persist for handlers registered after settling\r\n outcome = value;\r\n\r\n thenHandlers.forEach(function (then) {\r\n then.handle(state, outcome);\r\n });\r\n\r\n // Discard all references to handlers to be garbage collected\r\n thenHandlers = null;\r\n };\r\n\r\n var doFulfill = function (value) {\r\n doSettle(FULFILLED, value);\r\n };\r\n\r\n var doReject = function (error) {\r\n doSettle(REJECTED, error);\r\n };\r\n\r\n var registerThenHandler = function (onFulfilled, onRejected) {\r\n var thenHandler = aThenHandler(onFulfilled, onRejected);\r\n\r\n if (state === PENDING) {\r\n thenHandlers.push(thenHandler);\r\n } else {\r\n thenHandler.handle(state, outcome);\r\n }\r\n\r\n // Allow chaining of calls: something().then(...).then(...)\r\n return thenHandler.promise;\r\n };\r\n\r\n var safelyResolveThenable = function (thenable) {\r\n // Either fulfill, reject or reject with error\r\n var onceWrapper = once();\r\n try {\r\n thenable(\r\n onceWrapper(transparentlyResolveThenablesAndSettle),\r\n onceWrapper(doReject)\r\n );\r\n } catch (e) {\r\n onceWrapper(doReject)(e);\r\n }\r\n };\r\n\r\n var transparentlyResolveThenablesAndSettle = function (value) {\r\n var thenable;\r\n\r\n try {\r\n thenable = getThenableIfExists(value);\r\n } catch (e) {\r\n doReject(e);\r\n return;\r\n }\r\n\r\n if (thenable) {\r\n safelyResolveThenable(thenable);\r\n } else {\r\n doFulfill(value);\r\n }\r\n };\r\n\r\n var onceWrapper = once();\r\n return {\r\n resolve: onceWrapper(transparentlyResolveThenablesAndSettle),\r\n reject: onceWrapper(doReject),\r\n promise: {\r\n then: registerThenHandler,\r\n fail: function (onRejected) {\r\n return registerThenHandler(null, onRejected);\r\n }\r\n }\r\n };\r\n };\r\n\r\n return ayepromise;\r\n}));","(function (arr) {\r\n arr.forEach(function (item) {\r\n if (item.hasOwnProperty('remove')) {\r\n return;\r\n }\r\n Object.defineProperty(item, 'remove', {\r\n configurable: true,\r\n enumerable: true,\r\n writable: true,\r\n value: function remove() {\r\n this.parentNode.removeChild(this);\r\n }\r\n });\r\n });\r\n})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);","(function() {\r\n var regExp = function(name) {\r\n return new RegExp('(^| )'+ name +'( |$)');\r\n };\r\n var forEach = function(list, fn, scope) {\r\n for (var i = 0; i < list.length; i++) {\r\n fn.call(scope, list[i]);\r\n }\r\n };\r\n\r\n function ClassList(element) {\r\n this.element = element;\r\n }\r\n\r\n ClassList.prototype = {\r\n add: function() {\r\n forEach(arguments, function(name) {\r\n if (!this.contains(name)) {\r\n this.element.className += this.element.className.length > 0 ? ' ' + name : name;\r\n }\r\n }, this);\r\n },\r\n remove: function() {\r\n forEach(arguments, function(name) {\r\n this.element.className =\r\n this.element.className.replace(regExp(name), '');\r\n }, this);\r\n },\r\n toggle: function(name) {\r\n return this.contains(name)\r\n ? (this.remove(name), false) : (this.add(name), true);\r\n },\r\n contains: function(name) {\r\n return regExp(name).test(this.element.className);\r\n },\r\n replace: function(oldName, newName) {\r\n this.remove(oldName), this.add(newName);\r\n }\r\n };\r\n\r\n if (!('classList' in Element.prototype)) {\r\n Object.defineProperty(Element.prototype, 'classList', {\r\n get: function() {\r\n return new ClassList(this);\r\n }\r\n });\r\n }\r\n\r\n if (window.DOMTokenList && DOMTokenList.prototype.replace == null) {\r\n DOMTokenList.prototype.replace = ClassList.prototype.replace;\r\n }\r\n})();","/*!\r\nWaypoints - 4.0.1\r\nCopyright © 2011-2016 Caleb Troughton\r\nLicensed under the MIT license.\r\nhttps://github.com/imakewebthings/waypoints/blob/master/licenses.txt\r\n*/\r\n(function() {\r\n 'use strict'\r\n\r\n var keyCounter = 0\r\n var allWaypoints = {}\r\n\r\n /* http://imakewebthings.com/waypoints/api/waypoint */\r\n function Waypoint(options) {\r\n if (!options) {\r\n throw new Error('No options passed to Waypoint constructor')\r\n }\r\n if (!options.element) {\r\n throw new Error('No element option passed to Waypoint constructor')\r\n }\r\n if (!options.handler) {\r\n throw new Error('No handler option passed to Waypoint constructor')\r\n }\r\n\r\n this.key = 'waypoint-' + keyCounter\r\n this.options = Waypoint.Adapter.extend({}, Waypoint.defaults, options)\r\n this.element = this.options.element\r\n this.adapter = new Waypoint.Adapter(this.element)\r\n this.callback = options.handler\r\n this.axis = this.options.horizontal ? 'horizontal' : 'vertical'\r\n this.enabled = this.options.enabled\r\n this.triggerPoint = null\r\n this.group = Waypoint.Group.findOrCreate({\r\n name: this.options.group,\r\n axis: this.axis\r\n })\r\n this.context = Waypoint.Context.findOrCreateByElement(this.options.context)\r\n\r\n if (Waypoint.offsetAliases[this.options.offset]) {\r\n this.options.offset = Waypoint.offsetAliases[this.options.offset]\r\n }\r\n this.group.add(this)\r\n this.context.add(this)\r\n allWaypoints[this.key] = this\r\n keyCounter += 1\r\n }\r\n\r\n /* Private */\r\n Waypoint.prototype.queueTrigger = function(direction) {\r\n this.group.queueTrigger(this, direction)\r\n }\r\n\r\n /* Private */\r\n Waypoint.prototype.trigger = function(args) {\r\n if (!this.enabled) {\r\n return\r\n }\r\n if (this.callback) {\r\n this.callback.apply(this, args)\r\n }\r\n }\r\n\r\n /* Public */\r\n /* http://imakewebthings.com/waypoints/api/destroy */\r\n Waypoint.prototype.destroy = function() {\r\n this.context.remove(this)\r\n this.group.remove(this)\r\n delete allWaypoints[this.key]\r\n }\r\n\r\n /* Public */\r\n /* http://imakewebthings.com/waypoints/api/disable */\r\n Waypoint.prototype.disable = function() {\r\n this.enabled = false\r\n return this\r\n }\r\n\r\n /* Public */\r\n /* http://imakewebthings.com/waypoints/api/enable */\r\n Waypoint.prototype.enable = function() {\r\n this.context.refresh()\r\n this.enabled = true\r\n return this\r\n }\r\n\r\n /* Public */\r\n /* http://imakewebthings.com/waypoints/api/next */\r\n Waypoint.prototype.next = function() {\r\n return this.group.next(this)\r\n }\r\n\r\n /* Public */\r\n /* http://imakewebthings.com/waypoints/api/previous */\r\n Waypoint.prototype.previous = function() {\r\n return this.group.previous(this)\r\n }\r\n\r\n /* Private */\r\n Waypoint.invokeAll = function(method) {\r\n var allWaypointsArray = []\r\n for (var waypointKey in allWaypoints) {\r\n allWaypointsArray.push(allWaypoints[waypointKey])\r\n }\r\n for (var i = 0, end = allWaypointsArray.length; i < end; i++) {\r\n allWaypointsArray[i][method]()\r\n }\r\n }\r\n\r\n /* Public */\r\n /* http://imakewebthings.com/waypoints/api/destroy-all */\r\n Waypoint.destroyAll = function() {\r\n Waypoint.invokeAll('destroy')\r\n }\r\n\r\n /* Public */\r\n /* http://imakewebthings.com/waypoints/api/disable-all */\r\n Waypoint.disableAll = function() {\r\n Waypoint.invokeAll('disable')\r\n }\r\n\r\n /* Public */\r\n /* http://imakewebthings.com/waypoints/api/enable-all */\r\n Waypoint.enableAll = function() {\r\n Waypoint.Context.refreshAll()\r\n for (var waypointKey in allWaypoints) {\r\n allWaypoints[waypointKey].enabled = true\r\n }\r\n return this\r\n }\r\n\r\n /* Public */\r\n /* http://imakewebthings.com/waypoints/api/refresh-all */\r\n Waypoint.refreshAll = function() {\r\n Waypoint.Context.refreshAll()\r\n }\r\n\r\n /* Public */\r\n /* http://imakewebthings.com/waypoints/api/viewport-height */\r\n Waypoint.viewportHeight = function() {\r\n return window.innerHeight || document.documentElement.clientHeight\r\n }\r\n\r\n /* Public */\r\n /* http://imakewebthings.com/waypoints/api/viewport-width */\r\n Waypoint.viewportWidth = function() {\r\n return document.documentElement.clientWidth\r\n }\r\n\r\n Waypoint.adapters = []\r\n\r\n Waypoint.defaults = {\r\n context: window,\r\n continuous: true,\r\n enabled: true,\r\n group: 'default',\r\n horizontal: false,\r\n offset: 0\r\n }\r\n\r\n Waypoint.offsetAliases = {\r\n 'bottom-in-view': function() {\r\n return this.context.innerHeight() - this.adapter.outerHeight()\r\n },\r\n 'right-in-view': function() {\r\n return this.context.innerWidth() - this.adapter.outerWidth()\r\n }\r\n }\r\n\r\n window.Waypoint = Waypoint\r\n}())","(function() {\r\n function noop() {}\r\n\r\n var Waypoint = window.Waypoint\r\n\r\n /* http://imakewebthings.com/waypoints/shortcuts/inview */\r\n function Inview(options) {\r\n this.options = Waypoint.Adapter.extend({}, Inview.defaults, options)\r\n this.axis = this.options.horizontal ? 'horizontal' : 'vertical'\r\n this.waypoints = []\r\n this.element = this.options.element\r\n this.createWaypoints()\r\n }\r\n\r\n /* Private */\r\n Inview.prototype.createWaypoints = function() {\r\n var configs = {\r\n vertical: [{\r\n down: 'enter',\r\n up: 'exited',\r\n offset: '100%'\r\n }, {\r\n down: 'entered',\r\n up: 'exit',\r\n offset: 'bottom-in-view'\r\n }, {\r\n down: 'exit',\r\n up: 'entered',\r\n offset: 0\r\n }, {\r\n down: 'exited',\r\n up: 'enter',\r\n offset: function() {\r\n return -this.adapter.outerHeight()\r\n }\r\n }],\r\n horizontal: [{\r\n right: 'enter',\r\n left: 'exited',\r\n offset: '100%'\r\n }, {\r\n right: 'entered',\r\n left: 'exit',\r\n offset: 'right-in-view'\r\n }, {\r\n right: 'exit',\r\n left: 'entered',\r\n offset: 0\r\n }, {\r\n right: 'exited',\r\n left: 'enter',\r\n offset: function() {\r\n return -this.adapter.outerWidth()\r\n }\r\n }]\r\n }\r\n\r\n for (var i = 0, end = configs[this.axis].length; i < end; i++) {\r\n var config = configs[this.axis][i]\r\n this.createWaypoint(config)\r\n }\r\n }\r\n\r\n /* Private */\r\n Inview.prototype.createWaypoint = function(config) {\r\n var self = this\r\n this.waypoints.push(new Waypoint({\r\n context: this.options.context,\r\n element: this.options.element,\r\n enabled: this.options.enabled,\r\n handler: (function(config) {\r\n return function(direction) {\r\n self.options[config[direction]].call(self, direction)\r\n }\r\n }(config)),\r\n offset: config.offset,\r\n horizontal: this.options.horizontal\r\n }))\r\n }\r\n\r\n /* Public */\r\n Inview.prototype.destroy = function() {\r\n for (var i = 0, end = this.waypoints.length; i < end; i++) {\r\n this.waypoints[i].destroy()\r\n }\r\n this.waypoints = []\r\n }\r\n\r\n Inview.prototype.disable = function() {\r\n for (var i = 0, end = this.waypoints.length; i < end; i++) {\r\n this.waypoints[i].disable()\r\n }\r\n }\r\n\r\n Inview.prototype.enable = function() {\r\n for (var i = 0, end = this.waypoints.length; i < end; i++) {\r\n this.waypoints[i].enable()\r\n }\r\n }\r\n\r\n Inview.defaults = {\r\n context: window,\r\n enabled: true,\r\n enter: noop,\r\n entered: noop,\r\n exit: noop,\r\n exited: noop\r\n }\r\n\r\n Waypoint.Inview = Inview\r\n}())\r\n","(function() {\r\n let listElement = document.querySelector(\".balast-water__header-anchor\");\r\n let scrollLinkClass = \"scroll-to\";\r\n let links = [\r\n {\r\n text: \"Clean and Monitor\",\r\n id: \"clean-and-monitor\",\r\n selector: \".steps-block\"\r\n },\r\n {\r\n text: \"Contact us\",\r\n id: \"contact\",\r\n selector: \".one, .editorial\"\r\n },\r\n {\r\n text: \"Expert knowledge\",\r\n id: \"expert-knowledge\",\r\n selector: \".benefits-block ~ .teaser-list\"\r\n },\r\n {\r\n text: \"Related articles\",\r\n id: \"related-articles\",\r\n selector: \".external-links, .preview-block\"\r\n }\r\n ];\r\n\r\n if(listElement) {\r\n links.forEach(link => {\r\n let element = document.querySelector(link.selector);\r\n\r\n if (element) {\r\n let li = document.createElement(\"li\");\r\n let a = document.createElement(\"a\");\r\n\r\n element.id = link.id;\r\n\r\n a.classList.add(scrollLinkClass);\r\n a.href = \"#\" + link.id;\r\n a.innerText = link.text;\r\n\r\n li.classList.add(\"balast-water__header-anchor-item\");\r\n\r\n li.appendChild(a);\r\n listElement.appendChild(li);\r\n }\r\n });\r\n }\r\n}());","(function() {\r\n const form = document.querySelector(\".header__top-column form\");\r\n let isFormActive = false;\r\n let html = document.querySelector('html');\r\n let input = null;\r\n let button = null;\r\n let buttonMobile = null;\r\n\r\n if(form) {\r\n form.setAttribute(\"role\", \"search\");\r\n\r\n input = form.querySelector(\"input\");\r\n button = form.querySelector(\"button\");\r\n buttonMobile = document.querySelector(\".header__top-button--mobile\");\r\n\r\n button.addEventListener(\"click\", handleClick);\r\n buttonMobile ? buttonMobile.addEventListener(\"click\", handleClick) : null;\r\n input.addEventListener(\"blur\", handleBlur);\r\n input.addEventListener(\"focus\", handleFocus);\r\n }\r\n\r\n function handleClick(e) {\r\n e.stopPropagation();\r\n\r\n if(e.target != buttonMobile) {\r\n if(isFormActive) {\r\n form.submit();\r\n } else {\r\n isFormActive = true;\r\n input.setAttribute(\"aria-hidden\", !isFormActive);\r\n form.classList.add(\"active\");\r\n input.focus();\r\n document.querySelector(\".header__bottom-list-item\").classList.remove(\"active\");\r\n }\r\n } else {\r\n form.classList.toggle(\"active\");\r\n html.classList.remove(\"menu_open\");\r\n }\r\n }\r\n\r\n function handleBlur(e) {\r\n if(e.relatedTarget !== button) {\r\n form.classList.remove(\"active\");\r\n form.classList.remove(\"has-focus\");\r\n isFormActive = false;\r\n input.setAttribute(\"aria-hidden\", !isFormActive);\r\n }\r\n }\r\n\r\n function handleFocus(e) {\r\n form.classList.add(\"has-focus\");\r\n }\r\n}());","/*\r\n* Old C&L and event info page\r\n*/\r\nwindow.GoogleMapsApp = (function (window, document, undefined) {\r\n\r\n // Include Google Maps API\r\n function includeGoogleMapsAPI() {\r\n var js,\r\n fjs = document.getElementsByTagName('script')[0];\r\n\r\n if (!document.getElementById('gmap-api')) {\r\n js = document.createElement('script');\r\n js.id = 'gmap-api';\r\n js.setAttribute('async', '');\r\n js.src = \"//maps.googleapis.com/maps/api/js?key=AIzaSyAURrPQGSKNcWhRPaO8UVq4A5EZ3V6QAXw&callback=window.GoogleMapsApp.startMapping\";\r\n fjs.parentNode.insertBefore(js, fjs);\r\n }\r\n };\r\n\r\n var $mapCanvas = $('.wilhelmsen-map');\r\n if ($mapCanvas.length) {\r\n includeGoogleMapsAPI();\r\n }\r\n\r\n var startMapping = function () {\r\n $mapCanvas.each(function (i) {\r\n initMap($mapCanvas[i]);\r\n })\r\n }\r\n\r\n var wilhelmsenMapStyles = {\r\n simple: [\r\n {\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#d1dde0\"\r\n }\r\n ]\r\n },\r\n {\r\n \"elementType\": \"labels\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"off\"\r\n }\r\n ]\r\n },\r\n {\r\n \"elementType\": \"labels.icon\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"off\"\r\n }\r\n ]\r\n },\r\n {\r\n \"elementType\": \"labels.text.fill\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#616161\"\r\n }\r\n ]\r\n },\r\n {\r\n \"elementType\": \"labels.text.stroke\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#f5f5f5\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"administrative\",\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"off\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"administrative.land_parcel\",\r\n \"elementType\": \"labels.text.fill\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#bdbdbd\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"administrative.neighborhood\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"off\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"poi\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"off\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"poi\",\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#eeeeee\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"poi\",\r\n \"elementType\": \"labels.text.fill\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#757575\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"poi.park\",\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#e5e5e5\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"poi.park\",\r\n \"elementType\": \"labels.text.fill\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#9e9e9e\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"road\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"off\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"road\",\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#ffffff\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"road\",\r\n \"elementType\": \"labels.icon\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"off\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"road.arterial\",\r\n \"elementType\": \"labels.text.fill\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#757575\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"road.highway\",\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#dadada\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"road.highway\",\r\n \"elementType\": \"labels.text.fill\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#616161\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"road.local\",\r\n \"elementType\": \"labels.text.fill\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#9e9e9e\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"transit\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"off\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"transit.line\",\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#e5e5e5\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"transit.station\",\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#eeeeee\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"water\",\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#f3f6f7\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"water\",\r\n \"elementType\": \"labels.text.fill\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#9e9e9e\"\r\n }\r\n ]\r\n }\r\n ],\r\n detailed: [\r\n {\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#d1dde0\"\r\n }\r\n ]\r\n },\r\n {\r\n \"elementType\": \"labels.icon\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"on\"\r\n }\r\n ]\r\n },\r\n {\r\n \"elementType\": \"labels.text.fill\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#666666\"\r\n }\r\n ]\r\n },\r\n {\r\n \"elementType\": \"labels.text.stroke\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#ffffff\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"administrative.land_parcel\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"off\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"administrative.land_parcel\",\r\n \"elementType\": \"labels.text.fill\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#bdbdbd\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"administrative.neighborhood\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"off\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"poi\",\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#bbd2d7\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"poi\",\r\n \"elementType\": \"labels.text\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"off\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"poi\",\r\n \"elementType\": \"labels.text.fill\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#757575\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"poi.park\",\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#bbd2d7\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"poi.park\",\r\n \"elementType\": \"labels.text.fill\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#9e9e9e\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"road\",\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#ffffff\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"road\",\r\n \"elementType\": \"labels\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"off\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"road.arterial\",\r\n \"elementType\": \"labels.text.fill\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#34525a\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"road.highway\",\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#abc0c5\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"road.highway\",\r\n \"elementType\": \"labels.text.fill\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#666666\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"road.local\",\r\n \"elementType\": \"labels.text.fill\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#abc0c5\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"transit.line\",\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#abc0c5\"\r\n }\r\n ]\r\n },\r\n\r\n {\r\n \"featureType\": \"transit.station\",\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#bbd2d7\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"water\",\r\n \"elementType\": \"geometry\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#f3f6f7\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"water\",\r\n \"elementType\": \"labels.text\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"off\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"water\",\r\n \"elementType\": \"labels.text.fill\",\r\n \"stylers\": [\r\n {\r\n \"color\": \"#9e9e9e\"\r\n }\r\n ]\r\n }\r\n ]\r\n };\r\n\r\n function initMap(mapCanvas) {\r\n var markers = new Array();\r\n\r\n var dotColor = \"#e15f55\"; // DA3A2F\r\n var dotColorActive = \"#29588C\";\r\n\r\n // get data from the html attr\r\n var mapType = $(mapCanvas).data('maptype');\r\n var mapLocations = $(mapCanvas).data('locations');\r\n var showBoxList = $(mapCanvas).data('show-box-list') || false;\r\n var appendMarkersToID = $(mapCanvas).data('append-markers-to-id') || \"markers\";\r\n var useClustering = $(mapCanvas).data('use-clustering') || false;\r\n\r\n\r\n var map = new google.maps.Map(mapCanvas, {\r\n center: { lat: 0, lng: 0 },\r\n zoom: 2,\r\n mapTypeControl: false,\r\n disableDefaultUI: true,\r\n backgroundColor: 'none',\r\n styles: wilhelmsenMapStyles[mapType]\r\n });\r\n\r\n var bounds = new google.maps.LatLngBounds();\r\n\r\n var infowindow = new google.maps.InfoWindow({\r\n maxWidth: 300\r\n });\r\n\r\n var locations = mapLocations;\r\n\r\n var icon = {\r\n // path: \"M 12, 12 m -9, 0 a 9,9 0 1,0 18,0 a 9,9 0 1,0 -18,0\",\r\n path: \"M13.7,2.3C12.1,0.8,10.3,0,8,0S3.9,0.8,2.3,2.3C0.7,3.8,0,5.7,0,7.9c0,1.3,0.7,3.5,2,6.6s2.7,5.9,4,8.4 s2,3.8,2,3.7c0.2-0.4,0.5-0.9,0.9-1.6s1-1.9,1.9-3.7c0.9-1.8,1.7-3.5,2.4-5c0.7-1.5,1.3-3.1,1.9-4.7S16,8.7,16,7.9 C16,5.7,15.2,3.9,13.7,2.3z M9.7,9.6c-0.5,0.5-1.1,0.7-1.7,0.7s-1.3-0.2-1.7-0.7S5.6,8.5,5.6,7.9s0.2-1.2,0.7-1.7S7.4,5.5,8,5.5 c0.6,0,1.3,0.2,1.7,0.7c0.5,0.5,0.7,1,0.7,1.7S10.2,9.1,9.7,9.6z\",\r\n fillColor: dotColor,\r\n fillOpacity: 1,\r\n scale: 1.25,\r\n strokeColor: '#ffffff',\r\n strokeWeight: 2,\r\n anchor: new google.maps.Point(8, 26.6)\r\n\r\n }\r\n\r\n /*\r\n If show box list is set to true\r\n */\r\n if (showBoxList == true) {\r\n for (var i = 0; i < locations.length; i++) {\r\n // Append a link to the markers DIV for each marker\r\n // The links are now done from EPI, so we dont need this any more.\r\n //$(\"#\" + appendMarkersToID).append('
\" + locations[i][3] + \"
\" +\r\n\r\n \"\" +\r\n \"Go to office\";\r\n infowindow.setContent(infowindowContent);\r\n infowindow.open(map, marker);\r\n\r\n for (var j = 0; j < markers.length; j++) {\r\n var symbol = markers[j].getIcon();\r\n symbol.fillColor = dotColor;\r\n markers[j].setIcon(symbol);\r\n }\r\n\r\n var symbol = this.getIcon();\r\n symbol.fillColor = dotColorActive;\r\n marker.setIcon(symbol);\r\n\r\n }\r\n })(marker, i));\r\n\r\n // Add marker to markers array\r\n markers.push(marker);\r\n }\r\n\r\n for (var i = 0; i < markers.length; i++) {\r\n bounds.extend(markers[i].getPosition());\r\n }\r\n map.setCenter(bounds.getCenter());\r\n map.fitBounds(bounds);\r\n\r\n if (useClustering) {\r\n // https://googlemaps.github.io/js-marker-clusterer/docs/reference.html\r\n\r\n var clusterStyles = [\r\n {\r\n textColor: 'white',\r\n\t\t\t\t\t\turl: '/Static/prod/images/markerclusterer1.png',\r\n height: 50,\r\n width: 50\r\n },\r\n {\r\n textColor: 'white',\r\n\t\t\t\t\t\turl: '/Static/prod/images/markerclusterer2.png',\r\n height: 50,\r\n width: 50\r\n },\r\n {\r\n textColor: 'white',\r\n\t\t\t\t\t\turl: '/Static/prod/images/markerclusterer3.png',\r\n height: 50,\r\n width: 50\r\n }\r\n ];\r\n\r\n var mcOptions = {\r\n styles: clusterStyles\r\n };\r\n\r\n var markerCluster = new MarkerClusterer(map, markers, mcOptions);\r\n }\r\n\r\n // remove one zoom level to ensure no marker is on the edge.\r\n map.setZoom(map.getZoom() - 1);\r\n\r\n // Trigger a click event on each marker when the corresponding marker link is clicked\r\n\r\n if ($(window).width() > 700) {\r\n $('.marker-link').hover(function () {\r\n google.maps.event.trigger(markers[$(this).data('markerid')], 'click');\r\n });\r\n }\r\n\r\n }\r\n\r\n else {\r\n for (var i = 0; i < locations.length; i++) {\r\n var marker = new google.maps.Marker({\r\n position: new google.maps.LatLng(locations[i][0], locations[i][1]),\r\n map: map,\r\n title: locations[i][2],\r\n icon: icon\r\n\r\n });\r\n\r\n google.maps.event.addListener(marker, 'click', (function (marker, i) {\r\n return function () {\r\n\r\n var infowindowContent = \"