{"version":3,"file":"pssigroup.com.min.js","sources":["../node_modules/svg-injector/svg-injector.js","../node_modules/cash-dom/dist/cash.esm.js","pssigroup.com/components/header.js","pssigroup.com/components/marquee.js","../node_modules/dialog-polyfill/dist/dialog-polyfill.esm.js","pssigroup.com/components/modals.js","pssigroup.com/components/products.js","pssigroup.com/components/markets.js","pssigroup.com/components/cards.js","pssigroup.com/components/tabs.js","pssigroup.com/components/maps.js","pssigroup.com/components/forms.js"],"sourcesContent":["/**\n * SVGInjector v1.1.3 - Fast, caching, dynamic inline SVG DOM injection library\n * https://github.com/iconic/SVGInjector\n *\n * Copyright (c) 2014-2015 Waybury \n * @license MIT\n */\n\n(function (window, document) {\n\n 'use strict';\n\n // Environment\n var isLocal = window.location.protocol === 'file:';\n var hasSvgSupport = document.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#BasicStructure', '1.1');\n\n function uniqueClasses(list) {\n list = list.split(' ');\n\n var hash = {};\n var i = list.length;\n var out = [];\n\n while (i--) {\n if (!hash.hasOwnProperty(list[i])) {\n hash[list[i]] = 1;\n out.unshift(list[i]);\n }\n }\n\n return out.join(' ');\n }\n\n /**\n * cache (or polyfill for <= IE8) Array.forEach()\n * source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach\n */\n var forEach = Array.prototype.forEach || function (fn, scope) {\n if (this === void 0 || this === null || typeof fn !== 'function') {\n throw new TypeError();\n }\n\n /* jshint bitwise: false */\n var i, len = this.length >>> 0;\n /* jshint bitwise: true */\n\n for (i = 0; i < len; ++i) {\n if (i in this) {\n fn.call(scope, this[i], i, this);\n }\n }\n };\n\n // SVG Cache\n var svgCache = {};\n\n var injectCount = 0;\n var injectedElements = [];\n\n // Request Queue\n var requestQueue = [];\n\n // Script running status\n var ranScripts = {};\n\n var cloneSvg = function (sourceSvg) {\n return sourceSvg.cloneNode(true);\n };\n\n var queueRequest = function (url, callback) {\n requestQueue[url] = requestQueue[url] || [];\n requestQueue[url].push(callback);\n };\n\n var processRequestQueue = function (url) {\n for (var i = 0, len = requestQueue[url].length; i < len; i++) {\n // Make these calls async so we avoid blocking the page/renderer\n /* jshint loopfunc: true */\n (function (index) {\n setTimeout(function () {\n requestQueue[url][index](cloneSvg(svgCache[url]));\n }, 0);\n })(i);\n /* jshint loopfunc: false */\n }\n };\n\n var loadSvg = function (url, callback) {\n if (svgCache[url] !== undefined) {\n if (svgCache[url] instanceof SVGSVGElement) {\n // We already have it in cache, so use it\n callback(cloneSvg(svgCache[url]));\n }\n else {\n // We don't have it in cache yet, but we are loading it, so queue this request\n queueRequest(url, callback);\n }\n }\n else {\n\n if (!window.XMLHttpRequest) {\n callback('Browser does not support XMLHttpRequest');\n return false;\n }\n\n // Seed the cache to indicate we are loading this URL already\n svgCache[url] = {};\n queueRequest(url, callback);\n\n var httpRequest = new XMLHttpRequest();\n\n httpRequest.onreadystatechange = function () {\n // readyState 4 = complete\n if (httpRequest.readyState === 4) {\n\n // Handle status\n if (httpRequest.status === 404 || httpRequest.responseXML === null) {\n callback('Unable to load SVG file: ' + url);\n\n if (isLocal) callback('Note: SVG injection ajax calls do not work locally without adjusting security setting in your browser. Or consider using a local webserver.');\n\n callback();\n return false;\n }\n\n // 200 success from server, or 0 when using file:// protocol locally\n if (httpRequest.status === 200 || (isLocal && httpRequest.status === 0)) {\n\n /* globals Document */\n if (httpRequest.responseXML instanceof Document) {\n // Cache it\n svgCache[url] = httpRequest.responseXML.documentElement;\n }\n /* globals -Document */\n\n // IE9 doesn't create a responseXML Document object from loaded SVG,\n // and throws a \"DOM Exception: HIERARCHY_REQUEST_ERR (3)\" error when injected.\n //\n // So, we'll just create our own manually via the DOMParser using\n // the the raw XML responseText.\n //\n // :NOTE: IE8 and older doesn't have DOMParser, but they can't do SVG either, so...\n else if (DOMParser && (DOMParser instanceof Function)) {\n var xmlDoc;\n try {\n var parser = new DOMParser();\n xmlDoc = parser.parseFromString(httpRequest.responseText, 'text/xml');\n }\n catch (e) {\n xmlDoc = undefined;\n }\n\n if (!xmlDoc || xmlDoc.getElementsByTagName('parsererror').length) {\n callback('Unable to parse SVG file: ' + url);\n return false;\n }\n else {\n // Cache it\n svgCache[url] = xmlDoc.documentElement;\n }\n }\n\n // We've loaded a new asset, so process any requests waiting for it\n processRequestQueue(url);\n }\n else {\n callback('There was a problem injecting the SVG: ' + httpRequest.status + ' ' + httpRequest.statusText);\n return false;\n }\n }\n };\n\n httpRequest.open('GET', url);\n\n // Treat and parse the response as XML, even if the\n // server sends us a different mimetype\n if (httpRequest.overrideMimeType) httpRequest.overrideMimeType('text/xml');\n\n httpRequest.send();\n }\n };\n\n // Inject a single element\n var injectElement = function (el, evalScripts, pngFallback, callback) {\n\n // Grab the src or data-src attribute\n var imgUrl = el.getAttribute('data-src') || el.getAttribute('src');\n\n // We can only inject SVG\n if (!(/\\.svg/i).test(imgUrl)) {\n callback('Attempted to inject a file with a non-svg extension: ' + imgUrl);\n return;\n }\n\n // If we don't have SVG support try to fall back to a png,\n // either defined per-element via data-fallback or data-png,\n // or globally via the pngFallback directory setting\n if (!hasSvgSupport) {\n var perElementFallback = el.getAttribute('data-fallback') || el.getAttribute('data-png');\n\n // Per-element specific PNG fallback defined, so use that\n if (perElementFallback) {\n el.setAttribute('src', perElementFallback);\n callback(null);\n }\n // Global PNG fallback directoriy defined, use the same-named PNG\n else if (pngFallback) {\n el.setAttribute('src', pngFallback + '/' + imgUrl.split('/').pop().replace('.svg', '.png'));\n callback(null);\n }\n // um...\n else {\n callback('This browser does not support SVG and no PNG fallback was defined.');\n }\n\n return;\n }\n\n // Make sure we aren't already in the process of injecting this element to\n // avoid a race condition if multiple injections for the same element are run.\n // :NOTE: Using indexOf() only _after_ we check for SVG support and bail,\n // so no need for IE8 indexOf() polyfill\n if (injectedElements.indexOf(el) !== -1) {\n return;\n }\n\n // Remember the request to inject this element, in case other injection\n // calls are also trying to replace this element before we finish\n injectedElements.push(el);\n\n // Try to avoid loading the orginal image src if possible.\n el.setAttribute('src', '');\n\n // Load it up\n loadSvg(imgUrl, function (svg) {\n\n if (typeof svg === 'undefined' || typeof svg === 'string') {\n callback(svg);\n return false;\n }\n\n var imgId = el.getAttribute('id');\n if (imgId) {\n svg.setAttribute('id', imgId);\n }\n\n var imgTitle = el.getAttribute('title');\n if (imgTitle) {\n svg.setAttribute('title', imgTitle);\n }\n\n // Concat the SVG classes + 'injected-svg' + the img classes\n var classMerge = [].concat(svg.getAttribute('class') || [], 'injected-svg', el.getAttribute('class') || []).join(' ');\n svg.setAttribute('class', uniqueClasses(classMerge));\n\n var imgStyle = el.getAttribute('style');\n if (imgStyle) {\n svg.setAttribute('style', imgStyle);\n }\n\n // Copy all the data elements to the svg\n var imgData = [].filter.call(el.attributes, function (at) {\n return (/^data-\\w[\\w\\-]*$/).test(at.name);\n });\n forEach.call(imgData, function (dataAttr) {\n if (dataAttr.name && dataAttr.value) {\n svg.setAttribute(dataAttr.name, dataAttr.value);\n }\n });\n\n // Make sure any internally referenced clipPath ids and their\n // clip-path references are unique.\n //\n // This addresses the issue of having multiple instances of the\n // same SVG on a page and only the first clipPath id is referenced.\n //\n // Browsers often shortcut the SVG Spec and don't use clipPaths\n // contained in parent elements that are hidden, so if you hide the first\n // SVG instance on the page, then all other instances lose their clipping.\n // Reference: https://bugzilla.mozilla.org/show_bug.cgi?id=376027\n\n // Handle all defs elements that have iri capable attributes as defined by w3c: http://www.w3.org/TR/SVG/linking.html#processingIRI\n // Mapping IRI addressable elements to the properties that can reference them:\n var iriElementsAndProperties = {\n 'clipPath': ['clip-path'],\n 'color-profile': ['color-profile'],\n 'cursor': ['cursor'],\n 'filter': ['filter'],\n 'linearGradient': ['fill', 'stroke'],\n 'marker': ['marker', 'marker-start', 'marker-mid', 'marker-end'],\n 'mask': ['mask'],\n 'pattern': ['fill', 'stroke'],\n 'radialGradient': ['fill', 'stroke']\n };\n\n var element, elementDefs, properties, currentId, newId;\n Object.keys(iriElementsAndProperties).forEach(function (key) {\n element = key;\n properties = iriElementsAndProperties[key];\n\n elementDefs = svg.querySelectorAll('defs ' + element + '[id]');\n for (var i = 0, elementsLen = elementDefs.length; i < elementsLen; i++) {\n currentId = elementDefs[i].id;\n newId = currentId + '-' + injectCount;\n\n // All of the properties that can reference this element type\n var referencingElements;\n forEach.call(properties, function (property) {\n // :NOTE: using a substring match attr selector here to deal with IE \"adding extra quotes in url() attrs\"\n referencingElements = svg.querySelectorAll('[' + property + '*=\"' + currentId + '\"]');\n for (var j = 0, referencingElementLen = referencingElements.length; j < referencingElementLen; j++) {\n referencingElements[j].setAttribute(property, 'url(#' + newId + ')');\n }\n });\n\n elementDefs[i].id = newId;\n }\n });\n\n // Remove any unwanted/invalid namespaces that might have been added by SVG editing tools\n svg.removeAttribute('xmlns:a');\n\n // Post page load injected SVGs don't automatically have their script\n // elements run, so we'll need to make that happen, if requested\n\n // Find then prune the scripts\n var scripts = svg.querySelectorAll('script');\n var scriptsToEval = [];\n var script, scriptType;\n\n for (var k = 0, scriptsLen = scripts.length; k < scriptsLen; k++) {\n scriptType = scripts[k].getAttribute('type');\n\n // Only process javascript types.\n // SVG defaults to 'application/ecmascript' for unset types\n if (!scriptType || scriptType === 'application/ecmascript' || scriptType === 'application/javascript') {\n\n // innerText for IE, textContent for other browsers\n script = scripts[k].innerText || scripts[k].textContent;\n\n // Stash\n scriptsToEval.push(script);\n\n // Tidy up and remove the script element since we don't need it anymore\n svg.removeChild(scripts[k]);\n }\n }\n\n // Run/Eval the scripts if needed\n if (scriptsToEval.length > 0 && (evalScripts === 'always' || (evalScripts === 'once' && !ranScripts[imgUrl]))) {\n for (var l = 0, scriptsToEvalLen = scriptsToEval.length; l < scriptsToEvalLen; l++) {\n\n // :NOTE: Yup, this is a form of eval, but it is being used to eval code\n // the caller has explictely asked to be loaded, and the code is in a caller\n // defined SVG file... not raw user input.\n //\n // Also, the code is evaluated in a closure and not in the global scope.\n // If you need to put something in global scope, use 'window'\n new Function(scriptsToEval[l])(window); // jshint ignore:line\n }\n\n // Remember we already ran scripts for this svg\n ranScripts[imgUrl] = true;\n }\n\n // :WORKAROUND:\n // IE doesn't evaluate