{"version":3,"names":[],"mappings":"","sources":["vendor/custom-event-polyfill.js"],"sourcesContent":["// Polyfill for creating CustomEvents on IE9/10/11\r\n\r\n// code pulled from:\r\n// https://github.com/d4tocchini/customevent-polyfill\r\n// https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent#Polyfill\r\n\r\n(function () {\r\n if (typeof window === 'undefined') {\r\n return;\r\n }\r\n\r\n try {\r\n var ce = new window.CustomEvent('test', { cancelable: true });\r\n ce.preventDefault();\r\n if (ce.defaultPrevented !== true) {\r\n // IE has problems with .preventDefault() on custom events\r\n // http://stackoverflow.com/questions/23349191\r\n throw new Error('Could not prevent default');\r\n }\r\n } catch (e) {\r\n var CustomEvent = function (event, params) {\r\n var evt, origPrevent;\r\n params = params || {\r\n bubbles: false,\r\n cancelable: false,\r\n detail: undefined\r\n };\r\n\r\n evt = document.createEvent('CustomEvent');\r\n evt.initCustomEvent(\r\n event,\r\n params.bubbles,\r\n params.cancelable,\r\n params.detail\r\n );\r\n origPrevent = evt.preventDefault;\r\n evt.preventDefault = function () {\r\n origPrevent.call(this);\r\n try {\r\n Object.defineProperty(this, 'defaultPrevented', {\r\n get: function () {\r\n return true;\r\n }\r\n });\r\n } catch (e) {\r\n this.defaultPrevented = true;\r\n }\r\n };\r\n return evt;\r\n };\r\n\r\n CustomEvent.prototype = window.Event.prototype;\r\n window.CustomEvent = CustomEvent; // expose definition to window\r\n }\r\n})();\r\n"],"file":"custom-event-polyfill.js"}