{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///noty.min.js","webpack:///webpack/bootstrap d3b233870119224fe21e","webpack:///./src/utils.js","webpack:///./src/api.js","webpack:///./src/button.js","webpack:///./src/push.js","webpack:///./~/es6-promise/dist/es6-promise.js","webpack:///./src/index.js","webpack:///./~/process/browser.js","webpack:///(webpack)/buildin/global.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","i","l","call","m","c","value","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","inArray","needle","haystack","argStrict","key","stopPropagation","evt","window","event","cancelBubble","generateID","prefix","arguments","length","undefined","id","replace","r","Math","random","toString","outerHeight","el","height","offsetHeight","style","getComputedStyle","parseInt","marginTop","marginBottom","addListener","events","cb","useCapture","split","document","addEventListener","attachEvent","hasClass","element","classList","indexOf","addClass","oldList","newList","className","substring","removeClass","remove","parentNode","removeChild","visibilityChangeFlow","onVisibilityChange","API","PageHidden","hidden","handleVisibilityChange","onBlur","onFocus","stopAll","resumeAll","setTimeout","keys","Store","forEach","options","visibilityControl","stop","resume","queueRenderAll","visibilityChange","msHidden","webkitHidden","createAudioElements","ref","hasSound","audioElement","createElement","sounds","sources","source","src","type","getExtension","appendChild","barDom","querySelector","volume","soundPlayed","play","onended","fileName","match","css","deepExtend","animationEndEvents","_typeof","Symbol","iterator","obj","constructor","_api","newObj","default","out","Array","isArray","camelCase","string","letter","toUpperCase","getVendorProp","body","cssPrefixes","capName","charAt","slice","vendorName","getStyleProp","cssProps","applyCss","prop","properties","args","getQueueCounts","queueName","count","max","DefaultMaxVisible","Queues","maxVisible","queue","closed","current","addToQueue","push","removeFromQueue","queueRender","noty","shift","show","ghostFix","ghostID","Utils","ghost","setAttribute","insertAdjacentHTML","outerHTML","getElementById","build","findOrCreateContainer","markup","text","buildButtons","theme","innerHTML","fire","hasButtons","buttons","dom","btn","handleModal","modal","DocModalCount","createModal","handleModalClose","insertBefore","firstChild","container","layoutDom","layoutID","layout","queueClose","timeout","progressBar","progressDom","transition","width","clearTimeout","closeTimer","close","dequeueClose","eventName","listeners","apply","openFlow","closeFlow","closing","querySelectorAll","titleCount","conditions","docTitle","decrement","Defaults","_utils","DocTitleProps","originalTitle","changed","timer","increment","_update","_clear","title","global","closeWith","animation","open","force","killer","callbacks","beforeShow","onShow","afterShow","onClose","afterClose","onClick","onHover","onTemplate","_classCallCheck","instance","Constructor","TypeError","NotyButton","html","classes","_this","attributes","propertyName","_createClass","defineProperties","target","props","descriptor","writable","protoProps","staticProps","Push","workerPath","subData","onPermissionGranted","onPermissionDenied","onSubscriptionSuccess","onSubscriptionCancel","onWorkerError","onWorkerSuccess","onWorkerNotSupported","params","console","log","result","Notification","webkitNotifications","navigator","mozNotification","external","msIsSiteMode","e","perm","permissionLevel","checkPermission","permission","toLowerCase","subscription","endpoint","subscriptionId","serviceWorker","controller","state","self","getRegistrations","then","registrations","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_step","_iterator","next","done","unregister","err","return","_this2","userVisibleOnly","getPermissionStatus","register","ready","serviceWorkerRegistration","pushManager","subscribe","getKey","token","getEndpoint","p256dh","btoa","String","fromCharCode","Uint8Array","auth","catch","unregisterWorker","requestPermission","process","objectOrFunction","x","isFunction","setScheduler","scheduleFn","customSchedulerFn","setAsap","asapFn","asap","useVertxTimer","vertxNext","flush","useSetTimeout","globalSetTimeout","len","callback","onFulfillment","onRejection","_arguments","parent","child","noop","PROMISE_ID","makePromise","_state","invokeCallback","_result","resolve$1","promise","resolve","selfFulfillment","cannotReturnOwn","getThen","error","GET_THEN_ERROR","tryThen","then$$1","fulfillmentHandler","rejectionHandler","handleForeignThenable","thenable","sealed","fulfill","reason","reject","_label","handleOwnThenable","FULFILLED","REJECTED","handleMaybeThenable","maybeThenable","publishRejection","_onerror","publish","PENDING","_subscribers","subscribers","settled","detail","ErrorObject","tryCatch","TRY_CATCH_ERROR","hasCallback","succeeded","failed","initializePromise","resolver","nextId","Enumerator$1","input","_instanceConstructor","_remaining","_enumerate","validationError","Error","all$1","entries","race$1","_","reject$1","needsResolver","needsNew","Promise$2","polyfill$1","local","Function","P","Promise","promiseToString","cast","_isArray","arg","scheduleFlush","browserWindow","browserGlobal","BrowserMutationObserver","MutationObserver","WebKitMutationObserver","isNode","isWorker","Uint8ClampedArray","importScripts","MessageChannel","nextTick","iterations","observer","node","createTextNode","observe","characterData","data","channel","port1","onmessage","port2","postMessage","vertx","runOnLoop","runOnContext","_eachEntry","entry","resolve$$1","_then","_settledAt","_willSettleAt","enumerator","all","race","_setScheduler","_setAsap","_asap","polyfill","_interopRequireWildcard","_es6Promise","_es6Promise2","_button","_push","Noty","showing","shown","killable","promises","on","closeAll","queueCounts","closeButton","bind","_t","_setTimeout","_x","ms","optionsOverride","_this3","_this4","amount","innerHtml","defaultSetTimout","defaultClearTimeout","runTimeout","fun","cachedSetTimeout","runClearTimeout","marker","cachedClearTimeout","cleanUpNextTick","draining","currentQueue","concat","queueIndex","drainQueue","run","Item","array","browser","env","argv","version","versions","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","binding","cwd","chdir","dir","umask","g","eval"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,OAAA,UAAAH,GACA,gBAAAC,SACAA,QAAA,KAAAD,IAEAD,EAAA,KAAAC,KACCK,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD,IACAE,EAAAF,EACAG,GAAA,EACAV,WAUA,OANAK,GAAAE,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAS,GAAA,EAGAT,EAAAD,QAvBA,GAAAQ,KA+DA,OAnCAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAG,EAAA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Ase,EAAAte,QAOAtC,EAAAD,QAAA6gB,GTghGM,SAAU5gB,EAAQD","file":"noty.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"Noty\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Noty\"] = factory();\n\telse\n\t\troot[\"Noty\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"Noty\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Noty\"] = factory();\n\telse\n\t\troot[\"Noty\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 6);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.css = exports.deepExtend = exports.animationEndEvents = undefined;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexports.inArray = inArray;\nexports.stopPropagation = stopPropagation;\nexports.generateID = generateID;\nexports.outerHeight = outerHeight;\nexports.addListener = addListener;\nexports.hasClass = hasClass;\nexports.addClass = addClass;\nexports.removeClass = removeClass;\nexports.remove = remove;\nexports.classList = classList;\nexports.visibilityChangeFlow = visibilityChangeFlow;\nexports.createAudioElements = createAudioElements;\n\nvar _api = __webpack_require__(1);\n\nvar API = _interopRequireWildcard(_api);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nvar animationEndEvents = exports.animationEndEvents = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';\n\nfunction inArray(needle, haystack, argStrict) {\n var key = void 0;\n var strict = !!argStrict;\n\n if (strict) {\n for (key in haystack) {\n if (haystack.hasOwnProperty(key) && haystack[key] === needle) {\n return true;\n }\n }\n } else {\n for (key in haystack) {\n if (haystack.hasOwnProperty(key) && haystack[key] === needle) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction stopPropagation(evt) {\n evt = evt || window.event;\n\n if (typeof evt.stopPropagation !== 'undefined') {\n evt.stopPropagation();\n } else {\n evt.cancelBubble = true;\n }\n}\n\nvar deepExtend = exports.deepExtend = function deepExtend(out) {\n out = out || {};\n\n for (var i = 1; i < arguments.length; i++) {\n var obj = arguments[i];\n\n if (!obj) continue;\n\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n if (Array.isArray(obj[key])) {\n out[key] = obj[key];\n } else if (_typeof(obj[key]) === 'object' && obj[key] !== null) {\n out[key] = deepExtend(out[key], obj[key]);\n } else {\n out[key] = obj[key];\n }\n }\n }\n }\n\n return out;\n};\n\nfunction generateID() {\n var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n\n var id = 'noty_' + prefix + '_';\n\n id += 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n var r = Math.random() * 16 | 0;\n var v = c === 'x' ? r : r & 0x3 | 0x8;\n return v.toString(16);\n });\n\n return id;\n}\n\nfunction outerHeight(el) {\n var height = el.offsetHeight;\n var style = window.getComputedStyle(el);\n\n height += parseInt(style.marginTop) + parseInt(style.marginBottom);\n return height;\n}\n\nvar css = exports.css = function () {\n var cssPrefixes = ['Webkit', 'O', 'Moz', 'ms'];\n var cssProps = {};\n\n function camelCase(string) {\n return string.replace(/^-ms-/, 'ms-').replace(/-([\\da-z])/gi, function (match, letter) {\n return letter.toUpperCase();\n });\n }\n\n function getVendorProp(name) {\n var style = document.body.style;\n if (name in style) return name;\n\n var i = cssPrefixes.length;\n var capName = name.charAt(0).toUpperCase() + name.slice(1);\n var vendorName = void 0;\n\n while (i--) {\n vendorName = cssPrefixes[i] + capName;\n if (vendorName in style) return vendorName;\n }\n\n return name;\n }\n\n function getStyleProp(name) {\n name = camelCase(name);\n return cssProps[name] || (cssProps[name] = getVendorProp(name));\n }\n\n function applyCss(element, prop, value) {\n prop = getStyleProp(prop);\n element.style[prop] = value;\n }\n\n return function (element, properties) {\n var args = arguments;\n var prop = void 0;\n var value = void 0;\n\n if (args.length === 2) {\n for (prop in properties) {\n if (properties.hasOwnProperty(prop)) {\n value = properties[prop];\n if (value !== undefined && properties.hasOwnProperty(prop)) {\n applyCss(element, prop, value);\n }\n }\n }\n } else {\n applyCss(element, args[1], args[2]);\n }\n };\n}();\n\nfunction addListener(el, events, cb) {\n var useCapture = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n events = events.split(' ');\n for (var i = 0; i < events.length; i++) {\n if (document.addEventListener) {\n el.addEventListener(events[i], cb, useCapture);\n } else if (document.attachEvent) {\n el.attachEvent('on' + events[i], cb);\n }\n }\n}\n\nfunction hasClass(element, name) {\n var list = typeof element === 'string' ? element : classList(element);\n return list.indexOf(' ' + name + ' ') >= 0;\n}\n\nfunction addClass(element, name) {\n var oldList = classList(element);\n var newList = oldList + name;\n\n if (hasClass(oldList, name)) return;\n\n // Trim the opening space.\n element.className = newList.substring(1);\n}\n\nfunction removeClass(element, name) {\n var oldList = classList(element);\n var newList = void 0;\n\n if (!hasClass(element, name)) return;\n\n // Replace the class name.\n newList = oldList.replace(' ' + name + ' ', ' ');\n\n // Trim the opening and closing spaces.\n element.className = newList.substring(1, newList.length - 1);\n}\n\nfunction remove(element) {\n if (element.parentNode) {\n element.parentNode.removeChild(element);\n }\n}\n\nfunction classList(element) {\n return (' ' + (element && element.className || '') + ' ').replace(/\\s+/gi, ' ');\n}\n\nfunction visibilityChangeFlow() {\n var hidden = void 0;\n var visibilityChange = void 0;\n if (typeof document.hidden !== 'undefined') {\n // Opera 12.10 and Firefox 18 and later support\n hidden = 'hidden';\n visibilityChange = 'visibilitychange';\n } else if (typeof document.msHidden !== 'undefined') {\n hidden = 'msHidden';\n visibilityChange = 'msvisibilitychange';\n } else if (typeof document.webkitHidden !== 'undefined') {\n hidden = 'webkitHidden';\n visibilityChange = 'webkitvisibilitychange';\n }\n\n function onVisibilityChange() {\n API.PageHidden = document[hidden];\n handleVisibilityChange();\n }\n\n function onBlur() {\n API.PageHidden = true;\n handleVisibilityChange();\n }\n\n function onFocus() {\n API.PageHidden = false;\n handleVisibilityChange();\n }\n\n function handleVisibilityChange() {\n if (API.PageHidden) stopAll();else resumeAll();\n }\n\n function stopAll() {\n setTimeout(function () {\n Object.keys(API.Store).forEach(function (id) {\n if (API.Store.hasOwnProperty(id)) {\n if (API.Store[id].options.visibilityControl) {\n API.Store[id].stop();\n }\n }\n });\n }, 100);\n }\n\n function resumeAll() {\n setTimeout(function () {\n Object.keys(API.Store).forEach(function (id) {\n if (API.Store.hasOwnProperty(id)) {\n if (API.Store[id].options.visibilityControl) {\n API.Store[id].resume();\n }\n }\n });\n API.queueRenderAll();\n }, 100);\n }\n\n if (visibilityChange) {\n addListener(document, visibilityChange, onVisibilityChange);\n }\n\n addListener(window, 'blur', onBlur);\n addListener(window, 'focus', onFocus);\n}\n\nfunction createAudioElements(ref) {\n if (ref.hasSound) {\n var audioElement = document.createElement('audio');\n\n ref.options.sounds.sources.forEach(function (s) {\n var source = document.createElement('source');\n source.src = s;\n source.type = 'audio/' + getExtension(s);\n audioElement.appendChild(source);\n });\n\n if (ref.barDom) {\n ref.barDom.appendChild(audioElement);\n } else {\n document.querySelector('body').appendChild(audioElement);\n }\n\n audioElement.volume = ref.options.sounds.volume;\n\n if (!ref.soundPlayed) {\n audioElement.play();\n ref.soundPlayed = true;\n }\n\n audioElement.onended = function () {\n remove(audioElement);\n };\n }\n}\n\nfunction getExtension(fileName) {\n return fileName.match(/\\.([^.]+)$/)[1];\n}\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Defaults = exports.Store = exports.Queues = exports.DefaultMaxVisible = exports.docTitle = exports.DocModalCount = exports.PageHidden = undefined;\nexports.getQueueCounts = getQueueCounts;\nexports.addToQueue = addToQueue;\nexports.removeFromQueue = removeFromQueue;\nexports.queueRender = queueRender;\nexports.queueRenderAll = queueRenderAll;\nexports.ghostFix = ghostFix;\nexports.build = build;\nexports.hasButtons = hasButtons;\nexports.handleModal = handleModal;\nexports.handleModalClose = handleModalClose;\nexports.queueClose = queueClose;\nexports.dequeueClose = dequeueClose;\nexports.fire = fire;\nexports.openFlow = openFlow;\nexports.closeFlow = closeFlow;\n\nvar _utils = __webpack_require__(0);\n\nvar Utils = _interopRequireWildcard(_utils);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nvar PageHidden = exports.PageHidden = false;\nvar DocModalCount = exports.DocModalCount = 0;\n\nvar DocTitleProps = {\n originalTitle: null,\n count: 0,\n changed: false,\n timer: -1\n};\n\nvar docTitle = exports.docTitle = {\n increment: function increment() {\n DocTitleProps.count++;\n\n docTitle._update();\n },\n\n decrement: function decrement() {\n DocTitleProps.count--;\n\n if (DocTitleProps.count <= 0) {\n docTitle._clear();\n return;\n }\n\n docTitle._update();\n },\n\n _update: function _update() {\n var title = document.title;\n\n if (!DocTitleProps.changed) {\n DocTitleProps.originalTitle = title;\n document.title = '(' + DocTitleProps.count + ') ' + title;\n DocTitleProps.changed = true;\n } else {\n document.title = '(' + DocTitleProps.count + ') ' + DocTitleProps.originalTitle;\n }\n },\n\n _clear: function _clear() {\n if (DocTitleProps.changed) {\n DocTitleProps.count = 0;\n document.title = DocTitleProps.originalTitle;\n DocTitleProps.changed = false;\n }\n }\n};\n\nvar DefaultMaxVisible = exports.DefaultMaxVisible = 5;\n\nvar Queues = exports.Queues = {\n global: {\n maxVisible: DefaultMaxVisible,\n queue: []\n }\n};\n\nvar Store = exports.Store = {};\n\nvar Defaults = exports.Defaults = {\n type: 'alert',\n layout: 'topRight',\n theme: 'mint',\n text: '',\n timeout: false,\n progressBar: true,\n closeWith: ['click'],\n animation: {\n open: 'noty_effects_open',\n close: 'noty_effects_close'\n },\n id: false,\n force: false,\n killer: false,\n queue: 'global',\n container: false,\n buttons: [],\n callbacks: {\n beforeShow: null,\n onShow: null,\n afterShow: null,\n onClose: null,\n afterClose: null,\n onClick: null,\n onHover: null,\n onTemplate: null\n },\n sounds: {\n sources: [],\n volume: 1,\n conditions: []\n },\n titleCount: {\n conditions: []\n },\n modal: false,\n visibilityControl: false\n\n /**\r\n * @param {string} queueName\r\n * @return {object}\r\n */\n};function getQueueCounts() {\n var queueName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'global';\n\n var count = 0;\n var max = DefaultMaxVisible;\n\n if (Queues.hasOwnProperty(queueName)) {\n max = Queues[queueName].maxVisible;\n Object.keys(Store).forEach(function (i) {\n if (Store[i].options.queue === queueName && !Store[i].closed) count++;\n });\n }\n\n return {\n current: count,\n maxVisible: max\n };\n}\n\n/**\r\n * @param {Noty} ref\r\n * @return {void}\r\n */\nfunction addToQueue(ref) {\n if (!Queues.hasOwnProperty(ref.options.queue)) {\n Queues[ref.options.queue] = { maxVisible: DefaultMaxVisible, queue: [] };\n }\n\n Queues[ref.options.queue].queue.push(ref);\n}\n\n/**\r\n * @param {Noty} ref\r\n * @return {void}\r\n */\nfunction removeFromQueue(ref) {\n if (Queues.hasOwnProperty(ref.options.queue)) {\n var queue = [];\n Object.keys(Queues[ref.options.queue].queue).forEach(function (i) {\n if (Queues[ref.options.queue].queue[i].id !== ref.id) {\n queue.push(Queues[ref.options.queue].queue[i]);\n }\n });\n Queues[ref.options.queue].queue = queue;\n }\n}\n\n/**\r\n * @param {string} queueName\r\n * @return {void}\r\n */\nfunction queueRender() {\n var queueName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'global';\n\n if (Queues.hasOwnProperty(queueName)) {\n var noty = Queues[queueName].queue.shift();\n\n if (noty) noty.show();\n }\n}\n\n/**\r\n * @return {void}\r\n */\nfunction queueRenderAll() {\n Object.keys(Queues).forEach(function (queueName) {\n queueRender(queueName);\n });\n}\n\n/**\r\n * @param {Noty} ref\r\n * @return {void}\r\n */\nfunction ghostFix(ref) {\n var ghostID = Utils.generateID('ghost');\n var ghost = document.createElement('div');\n ghost.setAttribute('id', ghostID);\n Utils.css(ghost, {\n height: Utils.outerHeight(ref.barDom) + 'px'\n });\n\n ref.barDom.insertAdjacentHTML('afterend', ghost.outerHTML);\n\n Utils.remove(ref.barDom);\n ghost = document.getElementById(ghostID);\n Utils.addClass(ghost, 'noty_fix_effects_height');\n Utils.addListener(ghost, Utils.animationEndEvents, function () {\n Utils.remove(ghost);\n });\n}\n\n/**\r\n * @param {Noty} ref\r\n * @return {void}\r\n */\nfunction build(ref) {\n findOrCreateContainer(ref);\n\n var markup = '
' + ref.options.text + '
' + buildButtons(ref) + '
';\n\n ref.barDom = document.createElement('div');\n ref.barDom.setAttribute('id', ref.id);\n Utils.addClass(ref.barDom, 'noty_bar noty_type__' + ref.options.type + ' noty_theme__' + ref.options.theme);\n\n ref.barDom.innerHTML = markup;\n\n fire(ref, 'onTemplate');\n}\n\n/**\r\n * @param {Noty} ref\r\n * @return {boolean}\r\n */\nfunction hasButtons(ref) {\n return !!(ref.options.buttons && Object.keys(ref.options.buttons).length);\n}\n\n/**\r\n * @param {Noty} ref\r\n * @return {string}\r\n */\nfunction buildButtons(ref) {\n if (hasButtons(ref)) {\n var buttons = document.createElement('div');\n Utils.addClass(buttons, 'noty_buttons');\n\n Object.keys(ref.options.buttons).forEach(function (key) {\n buttons.appendChild(ref.options.buttons[key].dom);\n });\n\n ref.options.buttons.forEach(function (btn) {\n buttons.appendChild(btn.dom);\n });\n return buttons.outerHTML;\n }\n return '';\n}\n\n/**\r\n * @param {Noty} ref\r\n * @return {void}\r\n */\nfunction handleModal(ref) {\n if (ref.options.modal) {\n if (DocModalCount === 0) {\n createModal(ref);\n }\n\n exports.DocModalCount = DocModalCount += 1;\n }\n}\n\n/**\r\n * @param {Noty} ref\r\n * @return {void}\r\n */\nfunction handleModalClose(ref) {\n if (ref.options.modal && DocModalCount > 0) {\n exports.DocModalCount = DocModalCount -= 1;\n\n if (DocModalCount <= 0) {\n var modal = document.querySelector('.noty_modal');\n\n if (modal) {\n Utils.removeClass(modal, 'noty_modal_open');\n Utils.addClass(modal, 'noty_modal_close');\n Utils.addListener(modal, Utils.animationEndEvents, function () {\n Utils.remove(modal);\n });\n }\n }\n }\n}\n\n/**\r\n * @return {void}\r\n */\nfunction createModal() {\n var body = document.querySelector('body');\n var modal = document.createElement('div');\n Utils.addClass(modal, 'noty_modal');\n body.insertBefore(modal, body.firstChild);\n Utils.addClass(modal, 'noty_modal_open');\n\n Utils.addListener(modal, Utils.animationEndEvents, function () {\n Utils.removeClass(modal, 'noty_modal_open');\n });\n}\n\n/**\r\n * @param {Noty} ref\r\n * @return {void}\r\n */\nfunction findOrCreateContainer(ref) {\n if (ref.options.container) {\n ref.layoutDom = document.querySelector(ref.options.container);\n return;\n }\n\n var layoutID = 'noty_layout__' + ref.options.layout;\n ref.layoutDom = document.querySelector('div#' + layoutID);\n\n if (!ref.layoutDom) {\n ref.layoutDom = document.createElement('div');\n ref.layoutDom.setAttribute('id', layoutID);\n ref.layoutDom.setAttribute('role', 'alert');\n ref.layoutDom.setAttribute('aria-live', 'polite');\n Utils.addClass(ref.layoutDom, 'noty_layout');\n document.querySelector('body').appendChild(ref.layoutDom);\n }\n}\n\n/**\r\n * @param {Noty} ref\r\n * @return {void}\r\n */\nfunction queueClose(ref) {\n if (ref.options.timeout) {\n if (ref.options.progressBar && ref.progressDom) {\n Utils.css(ref.progressDom, {\n transition: 'width ' + ref.options.timeout + 'ms linear',\n width: '0%'\n });\n }\n\n clearTimeout(ref.closeTimer);\n\n ref.closeTimer = setTimeout(function () {\n ref.close();\n }, ref.options.timeout);\n }\n}\n\n/**\r\n * @param {Noty} ref\r\n * @return {void}\r\n */\nfunction dequeueClose(ref) {\n if (ref.options.timeout && ref.closeTimer) {\n clearTimeout(ref.closeTimer);\n ref.closeTimer = -1;\n\n if (ref.options.progressBar && ref.progressDom) {\n Utils.css(ref.progressDom, {\n transition: 'width 0ms linear',\n width: '100%'\n });\n }\n }\n}\n\n/**\r\n * @param {Noty} ref\r\n * @param {string} eventName\r\n * @return {void}\r\n */\nfunction fire(ref, eventName) {\n if (ref.listeners.hasOwnProperty(eventName)) {\n ref.listeners[eventName].forEach(function (cb) {\n if (typeof cb === 'function') {\n cb.apply(ref);\n }\n });\n }\n}\n\n/**\r\n * @param {Noty} ref\r\n * @return {void}\r\n */\nfunction openFlow(ref) {\n fire(ref, 'afterShow');\n queueClose(ref);\n\n Utils.addListener(ref.barDom, 'mouseenter', function () {\n dequeueClose(ref);\n });\n\n Utils.addListener(ref.barDom, 'mouseleave', function () {\n queueClose(ref);\n });\n}\n\n/**\r\n * @param {Noty} ref\r\n * @return {void}\r\n */\nfunction closeFlow(ref) {\n delete Store[ref.id];\n ref.closing = false;\n fire(ref, 'afterClose');\n\n Utils.remove(ref.barDom);\n\n if (ref.layoutDom.querySelectorAll('.noty_bar').length === 0 && !ref.options.container) {\n Utils.remove(ref.layoutDom);\n }\n\n if (Utils.inArray('docVisible', ref.options.titleCount.conditions) || Utils.inArray('docHidden', ref.options.titleCount.conditions)) {\n docTitle.decrement();\n }\n\n queueRender(ref.options.queue);\n}\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.NotyButton = undefined;\n\nvar _utils = __webpack_require__(0);\n\nvar Utils = _interopRequireWildcard(_utils);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar NotyButton = exports.NotyButton = function NotyButton(html, classes, cb) {\n var _this = this;\n\n var attributes = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n _classCallCheck(this, NotyButton);\n\n this.dom = document.createElement('button');\n this.dom.innerHTML = html;\n this.id = attributes.id = attributes.id || Utils.generateID('button');\n this.cb = cb;\n Object.keys(attributes).forEach(function (propertyName) {\n _this.dom.setAttribute(propertyName, attributes[propertyName]);\n });\n Utils.addClass(this.dom, classes || 'noty_btn');\n\n return this;\n};\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Push = exports.Push = function () {\n function Push() {\n var workerPath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '/service-worker.js';\n\n _classCallCheck(this, Push);\n\n this.subData = {};\n this.workerPath = workerPath;\n this.listeners = {\n onPermissionGranted: [],\n onPermissionDenied: [],\n onSubscriptionSuccess: [],\n onSubscriptionCancel: [],\n onWorkerError: [],\n onWorkerSuccess: [],\n onWorkerNotSupported: []\n };\n return this;\n }\n\n /**\r\n * @param {string} eventName\r\n * @param {function} cb\r\n * @return {Push}\r\n */\n\n\n _createClass(Push, [{\n key: 'on',\n value: function on(eventName) {\n var cb = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};\n\n if (typeof cb === 'function' && this.listeners.hasOwnProperty(eventName)) {\n this.listeners[eventName].push(cb);\n }\n\n return this;\n }\n }, {\n key: 'fire',\n value: function fire(eventName) {\n var _this = this;\n\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n if (this.listeners.hasOwnProperty(eventName)) {\n this.listeners[eventName].forEach(function (cb) {\n if (typeof cb === 'function') {\n cb.apply(_this, params);\n }\n });\n }\n }\n }, {\n key: 'create',\n value: function create() {\n console.log('NOT IMPLEMENTED YET');\n }\n\n /**\r\n * @return {boolean}\r\n */\n\n }, {\n key: 'isSupported',\n value: function isSupported() {\n var result = false;\n\n try {\n result = window.Notification || window.webkitNotifications || navigator.mozNotification || window.external && window.external.msIsSiteMode() !== undefined;\n } catch (e) {}\n\n return result;\n }\n\n /**\r\n * @return {string}\r\n */\n\n }, {\n key: 'getPermissionStatus',\n value: function getPermissionStatus() {\n var perm = 'default';\n\n if (window.Notification && window.Notification.permissionLevel) {\n perm = window.Notification.permissionLevel;\n } else if (window.webkitNotifications && window.webkitNotifications.checkPermission) {\n switch (window.webkitNotifications.checkPermission()) {\n case 1:\n perm = 'default';\n break;\n case 0:\n perm = 'granted';\n break;\n default:\n perm = 'denied';\n }\n } else if (window.Notification && window.Notification.permission) {\n perm = window.Notification.permission;\n } else if (navigator.mozNotification) {\n perm = 'granted';\n } else if (window.external && window.external.msIsSiteMode() !== undefined) {\n perm = window.external.msIsSiteMode() ? 'granted' : 'default';\n }\n\n return perm.toString().toLowerCase();\n }\n\n /**\r\n * @return {string}\r\n */\n\n }, {\n key: 'getEndpoint',\n value: function getEndpoint(subscription) {\n var endpoint = subscription.endpoint;\n var subscriptionId = subscription.subscriptionId;\n\n // fix for Chrome < 45\n if (subscriptionId && endpoint.indexOf(subscriptionId) === -1) {\n endpoint += '/' + subscriptionId;\n }\n\n return endpoint;\n }\n\n /**\r\n * @return {boolean}\r\n */\n\n }, {\n key: 'isSWRegistered',\n value: function isSWRegistered() {\n try {\n return navigator.serviceWorker.controller.state === 'activated';\n } catch (e) {\n return false;\n }\n }\n\n /**\r\n * @return {void}\r\n */\n\n }, {\n key: 'unregisterWorker',\n value: function unregisterWorker() {\n var self = this;\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.getRegistrations().then(function (registrations) {\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = registrations[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var registration = _step.value;\n\n registration.unregister();\n self.fire('onSubscriptionCancel');\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n });\n }\n }\n\n /**\r\n * @return {void}\r\n */\n\n }, {\n key: 'requestSubscription',\n value: function requestSubscription() {\n var _this2 = this;\n\n var userVisibleOnly = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n var self = this;\n var current = this.getPermissionStatus();\n var cb = function cb(result) {\n if (result === 'granted') {\n _this2.fire('onPermissionGranted');\n\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.register(_this2.workerPath).then(function () {\n navigator.serviceWorker.ready.then(function (serviceWorkerRegistration) {\n self.fire('onWorkerSuccess');\n serviceWorkerRegistration.pushManager.subscribe({\n userVisibleOnly: userVisibleOnly\n }).then(function (subscription) {\n var key = subscription.getKey('p256dh');\n var token = subscription.getKey('auth');\n\n self.subData = {\n endpoint: self.getEndpoint(subscription),\n p256dh: key ? window.btoa(String.fromCharCode.apply(null, new Uint8Array(key))) : null,\n auth: token ? window.btoa(String.fromCharCode.apply(null, new Uint8Array(token))) : null\n };\n\n self.fire('onSubscriptionSuccess', [self.subData]);\n }).catch(function (err) {\n self.fire('onWorkerError', [err]);\n });\n });\n });\n } else {\n self.fire('onWorkerNotSupported');\n }\n } else if (result === 'denied') {\n _this2.fire('onPermissionDenied');\n _this2.unregisterWorker();\n }\n };\n\n if (current === 'default') {\n if (window.Notification && window.Notification.requestPermission) {\n window.Notification.requestPermission(cb);\n } else if (window.webkitNotifications && window.webkitNotifications.checkPermission) {\n window.webkitNotifications.requestPermission(cb);\n }\n } else {\n cb(current);\n }\n }\n }]);\n\n return Push;\n}();\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(process, global) {var require;/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.1.1\n */\n\n(function (global, factory) {\n\t true ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.ES6Promise = factory());\n}(this, (function () { 'use strict';\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nvar _isArray = undefined;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\n\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = __webpack_require__(9);\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && \"function\" === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}\n\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve$1(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n resolve(promise, object);\n return promise;\n}\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {\n try {\n then$$1.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then$$1) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then$$1, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then$$1) {\n if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then$$1 === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n GET_THEN_ERROR.error = null;\n } else if (then$$1 === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then$$1)) {\n handleForeignThenable(promise, maybeThenable, then$$1);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nfunction Enumerator$1(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n}\n\nEnumerator$1.prototype._enumerate = function (input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n};\n\nEnumerator$1.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve$$1 = c.resolve;\n\n if (resolve$$1 === resolve$1) {\n var _then = getThen(entry);\n\n if (_then === then && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise$2) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve$$1) {\n return resolve$$1(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve$$1(entry), i);\n }\n};\n\nEnumerator$1.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator$1.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all$1(entries) {\n return new Enumerator$1(this, entries).promise;\n}\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race$1(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject$1(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n reject(promise, reason);\n return promise;\n}\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise$2(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise$2 ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise$2.all = all$1;\nPromise$2.race = race$1;\nPromise$2.resolve = resolve$1;\nPromise$2.reject = reject$1;\nPromise$2._setScheduler = setScheduler;\nPromise$2._setAsap = setAsap;\nPromise$2._asap = asap;\n\nPromise$2.prototype = {\n constructor: Promise$2,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};\n\n/*global self*/\nfunction polyfill$1() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise$2;\n}\n\n// Strange compat..\nPromise$2.polyfill = polyfill$1;\nPromise$2.Promise = Promise$2;\n\nreturn Promise$2;\n\n})));\n\n//# sourceMappingURL=es6-promise.map\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7), __webpack_require__(8)))\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /* global VERSION */\n\n__webpack_require__(5);\n\nvar _es6Promise = __webpack_require__(4);\n\nvar _es6Promise2 = _interopRequireDefault(_es6Promise);\n\nvar _utils = __webpack_require__(0);\n\nvar Utils = _interopRequireWildcard(_utils);\n\nvar _api = __webpack_require__(1);\n\nvar API = _interopRequireWildcard(_api);\n\nvar _button = __webpack_require__(2);\n\nvar _push = __webpack_require__(3);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Noty = function () {\n /**\n * @param {object} options\n * @return {Noty}\n */\n function Noty() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, Noty);\n\n this.options = Utils.deepExtend({}, API.Defaults, options);\n\n if (API.Store[this.options.id]) {\n return API.Store[this.options.id];\n }\n\n this.id = this.options.id || Utils.generateID('bar');\n this.closeTimer = -1;\n this.barDom = null;\n this.layoutDom = null;\n this.progressDom = null;\n this.showing = false;\n this.shown = false;\n this.closed = false;\n this.closing = false;\n this.killable = this.options.timeout || this.options.closeWith.length > 0;\n this.hasSound = this.options.sounds.sources.length > 0;\n this.soundPlayed = false;\n this.listeners = {\n beforeShow: [],\n onShow: [],\n afterShow: [],\n onClose: [],\n afterClose: [],\n onClick: [],\n onHover: [],\n onTemplate: []\n };\n this.promises = {\n show: null,\n close: null\n };\n this.on('beforeShow', this.options.callbacks.beforeShow);\n this.on('onShow', this.options.callbacks.onShow);\n this.on('afterShow', this.options.callbacks.afterShow);\n this.on('onClose', this.options.callbacks.onClose);\n this.on('afterClose', this.options.callbacks.afterClose);\n this.on('onClick', this.options.callbacks.onClick);\n this.on('onHover', this.options.callbacks.onHover);\n this.on('onTemplate', this.options.callbacks.onTemplate);\n\n return this;\n }\n\n /**\n * @param {string} eventName\n * @param {function} cb\n * @return {Noty}\n */\n\n\n _createClass(Noty, [{\n key: 'on',\n value: function on(eventName) {\n var cb = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};\n\n if (typeof cb === 'function' && this.listeners.hasOwnProperty(eventName)) {\n this.listeners[eventName].push(cb);\n }\n\n return this;\n }\n\n /**\n * @return {Noty}\n */\n\n }, {\n key: 'show',\n value: function show() {\n var _this = this;\n\n if (this.showing || this.shown) {\n return this; // preventing multiple show\n }\n\n if (this.options.killer === true) {\n Noty.closeAll();\n } else if (typeof this.options.killer === 'string') {\n Noty.closeAll(this.options.killer);\n }\n\n var queueCounts = API.getQueueCounts(this.options.queue);\n\n if (queueCounts.current >= queueCounts.maxVisible || API.PageHidden && this.options.visibilityControl) {\n API.addToQueue(this);\n\n if (API.PageHidden && this.hasSound && Utils.inArray('docHidden', this.options.sounds.conditions)) {\n Utils.createAudioElements(this);\n }\n\n if (API.PageHidden && Utils.inArray('docHidden', this.options.titleCount.conditions)) {\n API.docTitle.increment();\n }\n\n return this;\n }\n\n API.Store[this.id] = this;\n\n API.fire(this, 'beforeShow');\n\n this.showing = true;\n\n if (this.closing) {\n this.showing = false;\n return this;\n }\n\n API.build(this);\n API.handleModal(this);\n\n if (this.options.force) {\n this.layoutDom.insertBefore(this.barDom, this.layoutDom.firstChild);\n } else {\n this.layoutDom.appendChild(this.barDom);\n }\n\n if (this.hasSound && !this.soundPlayed && Utils.inArray('docVisible', this.options.sounds.conditions)) {\n Utils.createAudioElements(this);\n }\n\n if (Utils.inArray('docVisible', this.options.titleCount.conditions)) {\n API.docTitle.increment();\n }\n\n this.shown = true;\n this.closed = false;\n\n // bind button events if any\n if (API.hasButtons(this)) {\n Object.keys(this.options.buttons).forEach(function (key) {\n var btn = _this.barDom.querySelector('#' + _this.options.buttons[key].id);\n Utils.addListener(btn, 'click', function (e) {\n Utils.stopPropagation(e);\n _this.options.buttons[key].cb(_this);\n });\n });\n }\n\n this.progressDom = this.barDom.querySelector('.noty_progressbar');\n\n if (Utils.inArray('click', this.options.closeWith)) {\n Utils.addClass(this.barDom, 'noty_close_with_click');\n Utils.addListener(this.barDom, 'click', function (e) {\n Utils.stopPropagation(e);\n API.fire(_this, 'onClick');\n _this.close();\n }, false);\n }\n\n Utils.addListener(this.barDom, 'mouseenter', function () {\n API.fire(_this, 'onHover');\n }, false);\n\n if (this.options.timeout) Utils.addClass(this.barDom, 'noty_has_timeout');\n if (this.options.progressBar) {\n Utils.addClass(this.barDom, 'noty_has_progressbar');\n }\n\n if (Utils.inArray('button', this.options.closeWith)) {\n Utils.addClass(this.barDom, 'noty_close_with_button');\n\n var closeButton = document.createElement('div');\n Utils.addClass(closeButton, 'noty_close_button');\n closeButton.innerHTML = '×';\n this.barDom.appendChild(closeButton);\n\n Utils.addListener(closeButton, 'click', function (e) {\n Utils.stopPropagation(e);\n _this.close();\n }, false);\n }\n\n API.fire(this, 'onShow');\n\n if (this.options.animation.open === null) {\n this.promises.show = new _es6Promise2.default(function (resolve) {\n resolve();\n });\n } else if (typeof this.options.animation.open === 'function') {\n this.promises.show = new _es6Promise2.default(this.options.animation.open.bind(this));\n } else {\n Utils.addClass(this.barDom, this.options.animation.open);\n this.promises.show = new _es6Promise2.default(function (resolve) {\n Utils.addListener(_this.barDom, Utils.animationEndEvents, function () {\n Utils.removeClass(_this.barDom, _this.options.animation.open);\n resolve();\n });\n });\n }\n\n this.promises.show.then(function () {\n var _t = _this;\n setTimeout(function () {\n API.openFlow(_t);\n }, 100);\n });\n\n return this;\n }\n\n /**\n * @return {Noty}\n */\n\n }, {\n key: 'stop',\n value: function stop() {\n API.dequeueClose(this);\n return this;\n }\n\n /**\n * @return {Noty}\n */\n\n }, {\n key: 'resume',\n value: function resume() {\n API.queueClose(this);\n return this;\n }\n\n /**\n * @param {int|boolean} ms\n * @return {Noty}\n */\n\n }, {\n key: 'setTimeout',\n value: function (_setTimeout) {\n function setTimeout(_x) {\n return _setTimeout.apply(this, arguments);\n }\n\n setTimeout.toString = function () {\n return _setTimeout.toString();\n };\n\n return setTimeout;\n }(function (ms) {\n this.stop();\n this.options.timeout = ms;\n\n if (this.barDom) {\n if (this.options.timeout) {\n Utils.addClass(this.barDom, 'noty_has_timeout');\n } else {\n Utils.removeClass(this.barDom, 'noty_has_timeout');\n }\n\n var _t = this;\n setTimeout(function () {\n // ugly fix for progressbar display bug\n _t.resume();\n }, 100);\n }\n\n return this;\n })\n\n /**\n * @param {string} html\n * @param {boolean} optionsOverride\n * @return {Noty}\n */\n\n }, {\n key: 'setText',\n value: function setText(html) {\n var optionsOverride = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (this.barDom) {\n this.barDom.querySelector('.noty_body').innerHTML = html;\n }\n\n if (optionsOverride) this.options.text = html;\n\n return this;\n }\n\n /**\n * @param {string} type\n * @param {boolean} optionsOverride\n * @return {Noty}\n */\n\n }, {\n key: 'setType',\n value: function setType(type) {\n var _this2 = this;\n\n var optionsOverride = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (this.barDom) {\n var classList = Utils.classList(this.barDom).split(' ');\n\n classList.forEach(function (c) {\n if (c.substring(0, 11) === 'noty_type__') {\n Utils.removeClass(_this2.barDom, c);\n }\n });\n\n Utils.addClass(this.barDom, 'noty_type__' + type);\n }\n\n if (optionsOverride) this.options.type = type;\n\n return this;\n }\n\n /**\n * @param {string} theme\n * @param {boolean} optionsOverride\n * @return {Noty}\n */\n\n }, {\n key: 'setTheme',\n value: function setTheme(theme) {\n var _this3 = this;\n\n var optionsOverride = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (this.barDom) {\n var classList = Utils.classList(this.barDom).split(' ');\n\n classList.forEach(function (c) {\n if (c.substring(0, 12) === 'noty_theme__') {\n Utils.removeClass(_this3.barDom, c);\n }\n });\n\n Utils.addClass(this.barDom, 'noty_theme__' + theme);\n }\n\n if (optionsOverride) this.options.theme = theme;\n\n return this;\n }\n\n /**\n * @return {Noty}\n */\n\n }, {\n key: 'close',\n value: function close() {\n var _this4 = this;\n\n if (this.closed) return this;\n\n if (!this.shown) {\n // it's in the queue\n API.removeFromQueue(this);\n return this;\n }\n\n API.fire(this, 'onClose');\n\n this.closing = true;\n\n if (this.options.animation.close === null || this.options.animation.close === false) {\n this.promises.close = new _es6Promise2.default(function (resolve) {\n resolve();\n });\n } else if (typeof this.options.animation.close === 'function') {\n this.promises.close = new _es6Promise2.default(this.options.animation.close.bind(this));\n } else {\n Utils.addClass(this.barDom, this.options.animation.close);\n this.promises.close = new _es6Promise2.default(function (resolve) {\n Utils.addListener(_this4.barDom, Utils.animationEndEvents, function () {\n if (_this4.options.force) {\n Utils.remove(_this4.barDom);\n } else {\n API.ghostFix(_this4);\n }\n resolve();\n });\n });\n }\n\n this.promises.close.then(function () {\n API.closeFlow(_this4);\n API.handleModalClose(_this4);\n });\n\n this.closed = true;\n\n return this;\n }\n\n // API functions\n\n /**\n * @param {boolean|string} queueName\n * @return {Noty}\n */\n\n }], [{\n key: 'closeAll',\n value: function closeAll() {\n var queueName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n Object.keys(API.Store).forEach(function (id) {\n if (queueName) {\n if (API.Store[id].options.queue === queueName && API.Store[id].killable) {\n API.Store[id].close();\n }\n } else if (API.Store[id].killable) {\n API.Store[id].close();\n }\n });\n return this;\n }\n\n /**\n * @param {string} queueName\n * @return {Noty}\n */\n\n }, {\n key: 'clearQueue',\n value: function clearQueue() {\n var queueName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'global';\n\n if (API.Queues.hasOwnProperty(queueName)) {\n API.Queues[queueName].queue = [];\n }\n return this;\n }\n\n /**\n * @return {API.Queues}\n */\n\n }, {\n key: 'overrideDefaults',\n\n\n /**\n * @param {Object} obj\n * @return {Noty}\n */\n value: function overrideDefaults(obj) {\n API.Defaults = Utils.deepExtend({}, API.Defaults, obj);\n return this;\n }\n\n /**\n * @param {int} amount\n * @param {string} queueName\n * @return {Noty}\n */\n\n }, {\n key: 'setMaxVisible',\n value: function setMaxVisible() {\n var amount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : API.DefaultMaxVisible;\n var queueName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'global';\n\n if (!API.Queues.hasOwnProperty(queueName)) {\n API.Queues[queueName] = { maxVisible: amount, queue: [] };\n }\n\n API.Queues[queueName].maxVisible = amount;\n return this;\n }\n\n /**\n * @param {string} innerHtml\n * @param {String} classes\n * @param {Function} cb\n * @param {Object} attributes\n * @return {NotyButton}\n */\n\n }, {\n key: 'button',\n value: function button(innerHtml) {\n var classes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var cb = arguments[2];\n var attributes = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n return new _button.NotyButton(innerHtml, classes, cb, attributes);\n }\n\n /**\n * @return {string}\n */\n\n }, {\n key: 'version',\n value: function version() {\n return \"3.2.0-beta\";\n }\n\n /**\n * @param {String} workerPath\n * @return {Push}\n */\n\n }, {\n key: 'Push',\n value: function Push(workerPath) {\n return new _push.Push(workerPath);\n }\n }, {\n key: 'Queues',\n get: function get() {\n return API.Queues;\n }\n\n /**\n * @return {API.PageHidden}\n */\n\n }, {\n key: 'PageHidden',\n get: function get() {\n return API.PageHidden;\n }\n }]);\n\n return Noty;\n}();\n\n// Document visibility change controller\n\n\nexports.default = Noty;\nif (typeof window !== 'undefined') {\n Utils.visibilityChangeFlow();\n}\nmodule.exports = exports['default'];\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports) {\n\n// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\nvar g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\n/* (ignored) */\n\n/***/ })\n/******/ ]);\n});\n\n\n// WEBPACK FOOTER //\n// noty.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap d3b233870119224fe21e","import * as API from 'api'\r\n\r\nexport const animationEndEvents = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend'\r\n\r\nexport function inArray (needle, haystack, argStrict) {\r\n let key\r\n let strict = !!argStrict\r\n\r\n if (strict) {\r\n for (key in haystack) {\r\n if (haystack.hasOwnProperty(key) && haystack[key] === needle) {\r\n return true\r\n }\r\n }\r\n } else {\r\n for (key in haystack) {\r\n if (haystack.hasOwnProperty(key) && haystack[key] === needle) {\r\n return true\r\n }\r\n }\r\n }\r\n return false\r\n}\r\n\r\nexport function stopPropagation (evt) {\r\n evt = evt || window.event\r\n\r\n if (typeof evt.stopPropagation !== 'undefined') {\r\n evt.stopPropagation()\r\n } else {\r\n evt.cancelBubble = true\r\n }\r\n}\r\n\r\nexport const deepExtend = function (out) {\r\n out = out || {}\r\n\r\n for (let i = 1; i < arguments.length; i++) {\r\n let obj = arguments[i]\r\n\r\n if (!obj) continue\r\n\r\n for (let key in obj) {\r\n if (obj.hasOwnProperty(key)) {\r\n if (Array.isArray(obj[key])) {\r\n out[key] = obj[key]\r\n } else if (typeof obj[key] === 'object' && obj[key] !== null) {\r\n out[key] = deepExtend(out[key], obj[key])\r\n } else {\r\n out[key] = obj[key]\r\n }\r\n }\r\n }\r\n }\r\n\r\n return out\r\n}\r\n\r\nexport function generateID (prefix = '') {\r\n let id = `noty_${prefix}_`\r\n\r\n id += 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\r\n let r = Math.random() * 16 | 0\r\n let v = c === 'x' ? r : r & 0x3 | 0x8\r\n return v.toString(16)\r\n })\r\n\r\n return id\r\n}\r\n\r\nexport function outerHeight (el) {\r\n let height = el.offsetHeight\r\n let style = window.getComputedStyle(el)\r\n\r\n height += parseInt(style.marginTop) + parseInt(style.marginBottom)\r\n return height\r\n}\r\n\r\nexport let css = (function () {\r\n let cssPrefixes = ['Webkit', 'O', 'Moz', 'ms']\r\n let cssProps = {}\r\n\r\n function camelCase (string) {\r\n return string\r\n .replace(/^-ms-/, 'ms-')\r\n .replace(/-([\\da-z])/gi, function (match, letter) {\r\n return letter.toUpperCase()\r\n })\r\n }\r\n\r\n function getVendorProp (name) {\r\n let style = document.body.style\r\n if (name in style) return name\r\n\r\n let i = cssPrefixes.length\r\n let capName = name.charAt(0).toUpperCase() + name.slice(1)\r\n let vendorName\r\n\r\n while (i--) {\r\n vendorName = cssPrefixes[i] + capName\r\n if (vendorName in style) return vendorName\r\n }\r\n\r\n return name\r\n }\r\n\r\n function getStyleProp (name) {\r\n name = camelCase(name)\r\n return cssProps[name] || (cssProps[name] = getVendorProp(name))\r\n }\r\n\r\n function applyCss (element, prop, value) {\r\n prop = getStyleProp(prop)\r\n element.style[prop] = value\r\n }\r\n\r\n return function (element, properties) {\r\n let args = arguments\r\n let prop\r\n let value\r\n\r\n if (args.length === 2) {\r\n for (prop in properties) {\r\n if (properties.hasOwnProperty(prop)) {\r\n value = properties[prop]\r\n if (value !== undefined && properties.hasOwnProperty(prop)) {\r\n applyCss(element, prop, value)\r\n }\r\n }\r\n }\r\n } else {\r\n applyCss(element, args[1], args[2])\r\n }\r\n }\r\n})()\r\n\r\nexport function addListener (el, events, cb, useCapture = false) {\r\n events = events.split(' ')\r\n for (let i = 0; i < events.length; i++) {\r\n if (document.addEventListener) {\r\n el.addEventListener(events[i], cb, useCapture)\r\n } else if (document.attachEvent) {\r\n el.attachEvent('on' + events[i], cb)\r\n }\r\n }\r\n}\r\n\r\nexport function hasClass (element, name) {\r\n let list = typeof element === 'string' ? element : classList(element)\r\n return list.indexOf(' ' + name + ' ') >= 0\r\n}\r\n\r\nexport function addClass (element, name) {\r\n let oldList = classList(element)\r\n let newList = oldList + name\r\n\r\n if (hasClass(oldList, name)) return\r\n\r\n // Trim the opening space.\r\n element.className = newList.substring(1)\r\n}\r\n\r\nexport function removeClass (element, name) {\r\n let oldList = classList(element)\r\n let newList\r\n\r\n if (!hasClass(element, name)) return\r\n\r\n // Replace the class name.\r\n newList = oldList.replace(' ' + name + ' ', ' ')\r\n\r\n // Trim the opening and closing spaces.\r\n element.className = newList.substring(1, newList.length - 1)\r\n}\r\n\r\nexport function remove (element) {\r\n if (element.parentNode) {\r\n element.parentNode.removeChild(element)\r\n }\r\n}\r\n\r\nexport function classList (element) {\r\n return (' ' + ((element && element.className) || '') + ' ').replace(\r\n /\\s+/gi,\r\n ' '\r\n )\r\n}\r\n\r\nexport function visibilityChangeFlow () {\r\n let hidden\r\n let visibilityChange\r\n if (typeof document.hidden !== 'undefined') {\r\n // Opera 12.10 and Firefox 18 and later support\r\n hidden = 'hidden'\r\n visibilityChange = 'visibilitychange'\r\n } else if (typeof document.msHidden !== 'undefined') {\r\n hidden = 'msHidden'\r\n visibilityChange = 'msvisibilitychange'\r\n } else if (typeof document.webkitHidden !== 'undefined') {\r\n hidden = 'webkitHidden'\r\n visibilityChange = 'webkitvisibilitychange'\r\n }\r\n\r\n function onVisibilityChange () {\r\n API.PageHidden = document[hidden]\r\n handleVisibilityChange()\r\n }\r\n\r\n function onBlur () {\r\n API.PageHidden = true\r\n handleVisibilityChange()\r\n }\r\n\r\n function onFocus () {\r\n API.PageHidden = false\r\n handleVisibilityChange()\r\n }\r\n\r\n function handleVisibilityChange () {\r\n if (API.PageHidden) stopAll()\r\n else resumeAll()\r\n }\r\n\r\n function stopAll () {\r\n setTimeout(\r\n function () {\r\n Object.keys(API.Store).forEach(id => {\r\n if (API.Store.hasOwnProperty(id)) {\r\n if (API.Store[id].options.visibilityControl) {\r\n API.Store[id].stop()\r\n }\r\n }\r\n })\r\n },\r\n 100\r\n )\r\n }\r\n\r\n function resumeAll () {\r\n setTimeout(\r\n function () {\r\n Object.keys(API.Store).forEach(id => {\r\n if (API.Store.hasOwnProperty(id)) {\r\n if (API.Store[id].options.visibilityControl) {\r\n API.Store[id].resume()\r\n }\r\n }\r\n })\r\n API.queueRenderAll()\r\n },\r\n 100\r\n )\r\n }\r\n\r\n if (visibilityChange) {\r\n addListener(document, visibilityChange, onVisibilityChange)\r\n }\r\n\r\n addListener(window, 'blur', onBlur)\r\n addListener(window, 'focus', onFocus)\r\n}\r\n\r\nexport function createAudioElements (ref) {\r\n if (ref.hasSound) {\r\n const audioElement = document.createElement('audio')\r\n\r\n ref.options.sounds.sources.forEach(s => {\r\n const source = document.createElement('source')\r\n source.src = s\r\n source.type = `audio/${getExtension(s)}`\r\n audioElement.appendChild(source)\r\n })\r\n\r\n if (ref.barDom) {\r\n ref.barDom.appendChild(audioElement)\r\n } else {\r\n document.querySelector('body').appendChild(audioElement)\r\n }\r\n\r\n audioElement.volume = ref.options.sounds.volume\r\n\r\n if (!ref.soundPlayed) {\r\n audioElement.play()\r\n ref.soundPlayed = true\r\n }\r\n\r\n audioElement.onended = function () {\r\n remove(audioElement)\r\n }\r\n }\r\n}\r\n\r\nfunction getExtension (fileName) {\r\n return fileName.match(/\\.([^.]+)$/)[1]\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils.js","import * as Utils from 'utils'\r\n\r\nexport let PageHidden = false\r\nexport let DocModalCount = 0\r\n\r\nconst DocTitleProps = {\r\n originalTitle: null,\r\n count: 0,\r\n changed: false,\r\n timer: -1\r\n}\r\n\r\nexport const docTitle = {\r\n increment: () => {\r\n DocTitleProps.count++\r\n\r\n docTitle._update()\r\n },\r\n\r\n decrement: () => {\r\n DocTitleProps.count--\r\n\r\n if (DocTitleProps.count <= 0) {\r\n docTitle._clear()\r\n return\r\n }\r\n\r\n docTitle._update()\r\n },\r\n\r\n _update: () => {\r\n let title = document.title\r\n\r\n if (!DocTitleProps.changed) {\r\n DocTitleProps.originalTitle = title\r\n document.title = `(${DocTitleProps.count}) ${title}`\r\n DocTitleProps.changed = true\r\n } else {\r\n document.title = `(${DocTitleProps.count}) ${DocTitleProps.originalTitle}`\r\n }\r\n },\r\n\r\n _clear: () => {\r\n if (DocTitleProps.changed) {\r\n DocTitleProps.count = 0\r\n document.title = DocTitleProps.originalTitle\r\n DocTitleProps.changed = false\r\n }\r\n }\r\n}\r\n\r\nexport const DefaultMaxVisible = 5\r\n\r\nexport const Queues = {\r\n global: {\r\n maxVisible: DefaultMaxVisible,\r\n queue: []\r\n }\r\n}\r\n\r\nexport const Store = {}\r\n\r\nexport let Defaults = {\r\n type: 'alert',\r\n layout: 'topRight',\r\n theme: 'mint',\r\n text: '',\r\n timeout: false,\r\n progressBar: true,\r\n closeWith: ['click'],\r\n animation: {\r\n open: 'noty_effects_open',\r\n close: 'noty_effects_close'\r\n },\r\n id: false,\r\n force: false,\r\n killer: false,\r\n queue: 'global',\r\n container: false,\r\n buttons: [],\r\n callbacks: {\r\n beforeShow: null,\r\n onShow: null,\r\n afterShow: null,\r\n onClose: null,\r\n afterClose: null,\r\n onClick: null,\r\n onHover: null,\r\n onTemplate: null\r\n },\r\n sounds: {\r\n sources: [],\r\n volume: 1,\r\n conditions: []\r\n },\r\n titleCount: {\r\n conditions: []\r\n },\r\n modal: false,\r\n visibilityControl: false\r\n}\r\n\r\n/**\r\n * @param {string} queueName\r\n * @return {object}\r\n */\r\nexport function getQueueCounts (queueName = 'global') {\r\n let count = 0\r\n let max = DefaultMaxVisible\r\n\r\n if (Queues.hasOwnProperty(queueName)) {\r\n max = Queues[queueName].maxVisible\r\n Object.keys(Store).forEach(i => {\r\n if (Store[i].options.queue === queueName && !Store[i].closed) count++\r\n })\r\n }\r\n\r\n return {\r\n current: count,\r\n maxVisible: max\r\n }\r\n}\r\n\r\n/**\r\n * @param {Noty} ref\r\n * @return {void}\r\n */\r\nexport function addToQueue (ref) {\r\n if (!Queues.hasOwnProperty(ref.options.queue)) {\r\n Queues[ref.options.queue] = {maxVisible: DefaultMaxVisible, queue: []}\r\n }\r\n\r\n Queues[ref.options.queue].queue.push(ref)\r\n}\r\n\r\n/**\r\n * @param {Noty} ref\r\n * @return {void}\r\n */\r\nexport function removeFromQueue (ref) {\r\n if (Queues.hasOwnProperty(ref.options.queue)) {\r\n const queue = []\r\n Object.keys(Queues[ref.options.queue].queue).forEach(i => {\r\n if (Queues[ref.options.queue].queue[i].id !== ref.id) {\r\n queue.push(Queues[ref.options.queue].queue[i])\r\n }\r\n })\r\n Queues[ref.options.queue].queue = queue\r\n }\r\n}\r\n\r\n/**\r\n * @param {string} queueName\r\n * @return {void}\r\n */\r\nexport function queueRender (queueName = 'global') {\r\n if (Queues.hasOwnProperty(queueName)) {\r\n const noty = Queues[queueName].queue.shift()\r\n\r\n if (noty) noty.show()\r\n }\r\n}\r\n\r\n/**\r\n * @return {void}\r\n */\r\nexport function queueRenderAll () {\r\n Object.keys(Queues).forEach(queueName => {\r\n queueRender(queueName)\r\n })\r\n}\r\n\r\n/**\r\n * @param {Noty} ref\r\n * @return {void}\r\n */\r\nexport function ghostFix (ref) {\r\n const ghostID = Utils.generateID('ghost')\r\n let ghost = document.createElement('div')\r\n ghost.setAttribute('id', ghostID)\r\n Utils.css(ghost, {\r\n height: Utils.outerHeight(ref.barDom) + 'px'\r\n })\r\n\r\n ref.barDom.insertAdjacentHTML('afterend', ghost.outerHTML)\r\n\r\n Utils.remove(ref.barDom)\r\n ghost = document.getElementById(ghostID)\r\n Utils.addClass(ghost, 'noty_fix_effects_height')\r\n Utils.addListener(ghost, Utils.animationEndEvents, () => {\r\n Utils.remove(ghost)\r\n })\r\n}\r\n\r\n/**\r\n * @param {Noty} ref\r\n * @return {void}\r\n */\r\nexport function build (ref) {\r\n findOrCreateContainer(ref)\r\n\r\n const markup = `
${ref.options.text}
${buildButtons(ref)}
`\r\n\r\n ref.barDom = document.createElement('div')\r\n ref.barDom.setAttribute('id', ref.id)\r\n Utils.addClass(\r\n ref.barDom,\r\n `noty_bar noty_type__${ref.options.type} noty_theme__${ref.options.theme}`\r\n )\r\n\r\n ref.barDom.innerHTML = markup\r\n\r\n fire(ref, 'onTemplate')\r\n}\r\n\r\n/**\r\n * @param {Noty} ref\r\n * @return {boolean}\r\n */\r\nexport function hasButtons (ref) {\r\n return !!(ref.options.buttons && Object.keys(ref.options.buttons).length)\r\n}\r\n\r\n/**\r\n * @param {Noty} ref\r\n * @return {string}\r\n */\r\nfunction buildButtons (ref) {\r\n if (hasButtons(ref)) {\r\n let buttons = document.createElement('div')\r\n Utils.addClass(buttons, 'noty_buttons')\r\n\r\n Object.keys(ref.options.buttons).forEach(key => {\r\n buttons.appendChild(ref.options.buttons[key].dom)\r\n })\r\n\r\n ref.options.buttons.forEach(btn => {\r\n buttons.appendChild(btn.dom)\r\n })\r\n return buttons.outerHTML\r\n }\r\n return ''\r\n}\r\n\r\n/**\r\n * @param {Noty} ref\r\n * @return {void}\r\n */\r\nexport function handleModal (ref) {\r\n if (ref.options.modal) {\r\n if (DocModalCount === 0) {\r\n createModal(ref)\r\n }\r\n\r\n DocModalCount++\r\n }\r\n}\r\n\r\n/**\r\n * @param {Noty} ref\r\n * @return {void}\r\n */\r\nexport function handleModalClose (ref) {\r\n if (ref.options.modal && DocModalCount > 0) {\r\n DocModalCount--\r\n\r\n if (DocModalCount <= 0) {\r\n const modal = document.querySelector('.noty_modal')\r\n\r\n if (modal) {\r\n Utils.removeClass(modal, 'noty_modal_open')\r\n Utils.addClass(modal, 'noty_modal_close')\r\n Utils.addListener(modal, Utils.animationEndEvents, () => {\r\n Utils.remove(modal)\r\n })\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * @return {void}\r\n */\r\nfunction createModal () {\r\n const body = document.querySelector('body')\r\n const modal = document.createElement('div')\r\n Utils.addClass(modal, 'noty_modal')\r\n body.insertBefore(modal, body.firstChild)\r\n Utils.addClass(modal, 'noty_modal_open')\r\n\r\n Utils.addListener(modal, Utils.animationEndEvents, () => {\r\n Utils.removeClass(modal, 'noty_modal_open')\r\n })\r\n}\r\n\r\n/**\r\n * @param {Noty} ref\r\n * @return {void}\r\n */\r\nfunction findOrCreateContainer (ref) {\r\n if (ref.options.container) {\r\n ref.layoutDom = document.querySelector(ref.options.container)\r\n return\r\n }\r\n\r\n const layoutID = `noty_layout__${ref.options.layout}`\r\n ref.layoutDom = document.querySelector(`div#${layoutID}`)\r\n\r\n if (!ref.layoutDom) {\r\n ref.layoutDom = document.createElement('div')\r\n ref.layoutDom.setAttribute('id', layoutID)\r\n ref.layoutDom.setAttribute('role', 'alert')\r\n ref.layoutDom.setAttribute('aria-live', 'polite')\r\n Utils.addClass(ref.layoutDom, 'noty_layout')\r\n document.querySelector('body').appendChild(ref.layoutDom)\r\n }\r\n}\r\n\r\n/**\r\n * @param {Noty} ref\r\n * @return {void}\r\n */\r\nexport function queueClose (ref) {\r\n if (ref.options.timeout) {\r\n if (ref.options.progressBar && ref.progressDom) {\r\n Utils.css(ref.progressDom, {\r\n transition: `width ${ref.options.timeout}ms linear`,\r\n width: '0%'\r\n })\r\n }\r\n\r\n clearTimeout(ref.closeTimer)\r\n\r\n ref.closeTimer = setTimeout(\r\n () => {\r\n ref.close()\r\n },\r\n ref.options.timeout\r\n )\r\n }\r\n}\r\n\r\n/**\r\n * @param {Noty} ref\r\n * @return {void}\r\n */\r\nexport function dequeueClose (ref) {\r\n if (ref.options.timeout && ref.closeTimer) {\r\n clearTimeout(ref.closeTimer)\r\n ref.closeTimer = -1\r\n\r\n if (ref.options.progressBar && ref.progressDom) {\r\n Utils.css(ref.progressDom, {\r\n transition: 'width 0ms linear',\r\n width: '100%'\r\n })\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * @param {Noty} ref\r\n * @param {string} eventName\r\n * @return {void}\r\n */\r\nexport function fire (ref, eventName) {\r\n if (ref.listeners.hasOwnProperty(eventName)) {\r\n ref.listeners[eventName].forEach(cb => {\r\n if (typeof cb === 'function') {\r\n cb.apply(ref)\r\n }\r\n })\r\n }\r\n}\r\n\r\n/**\r\n * @param {Noty} ref\r\n * @return {void}\r\n */\r\nexport function openFlow (ref) {\r\n fire(ref, 'afterShow')\r\n queueClose(ref)\r\n\r\n Utils.addListener(ref.barDom, 'mouseenter', () => {\r\n dequeueClose(ref)\r\n })\r\n\r\n Utils.addListener(ref.barDom, 'mouseleave', () => {\r\n queueClose(ref)\r\n })\r\n}\r\n\r\n/**\r\n * @param {Noty} ref\r\n * @return {void}\r\n */\r\nexport function closeFlow (ref) {\r\n delete Store[ref.id]\r\n ref.closing = false\r\n fire(ref, 'afterClose')\r\n\r\n Utils.remove(ref.barDom)\r\n\r\n if (\r\n ref.layoutDom.querySelectorAll('.noty_bar').length === 0 &&\r\n !ref.options.container\r\n ) {\r\n Utils.remove(ref.layoutDom)\r\n }\r\n\r\n if (\r\n Utils.inArray('docVisible', ref.options.titleCount.conditions) ||\r\n Utils.inArray('docHidden', ref.options.titleCount.conditions)\r\n ) {\r\n docTitle.decrement()\r\n }\r\n\r\n queueRender(ref.options.queue)\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/api.js","import * as Utils from 'utils'\r\n\r\nexport class NotyButton {\r\n constructor (html, classes, cb, attributes = {}) {\r\n this.dom = document.createElement('button')\r\n this.dom.innerHTML = html\r\n this.id = (attributes.id = attributes.id || Utils.generateID('button'))\r\n this.cb = cb\r\n Object.keys(attributes).forEach(propertyName => {\r\n this.dom.setAttribute(propertyName, attributes[propertyName])\r\n })\r\n Utils.addClass(this.dom, classes || 'noty_btn')\r\n\r\n return this\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/button.js","export class Push {\r\n constructor (workerPath = '/service-worker.js') {\r\n this.subData = {}\r\n this.workerPath = workerPath\r\n this.listeners = {\r\n onPermissionGranted: [],\r\n onPermissionDenied: [],\r\n onSubscriptionSuccess: [],\r\n onSubscriptionCancel: [],\r\n onWorkerError: [],\r\n onWorkerSuccess: [],\r\n onWorkerNotSupported: []\r\n }\r\n return this\r\n }\r\n\r\n /**\r\n * @param {string} eventName\r\n * @param {function} cb\r\n * @return {Push}\r\n */\r\n on (eventName, cb = () => {}) {\r\n if (typeof cb === 'function' && this.listeners.hasOwnProperty(eventName)) {\r\n this.listeners[eventName].push(cb)\r\n }\r\n\r\n return this\r\n }\r\n\r\n fire (eventName, params = []) {\r\n if (this.listeners.hasOwnProperty(eventName)) {\r\n this.listeners[eventName].forEach(cb => {\r\n if (typeof cb === 'function') {\r\n cb.apply(this, params)\r\n }\r\n })\r\n }\r\n }\r\n\r\n create () {\r\n console.log('NOT IMPLEMENTED YET')\r\n }\r\n\r\n /**\r\n * @return {boolean}\r\n */\r\n isSupported () {\r\n let result = false\r\n\r\n try {\r\n result = window.Notification ||\r\n window.webkitNotifications ||\r\n navigator.mozNotification ||\r\n (window.external && window.external.msIsSiteMode() !== undefined)\r\n } catch (e) {}\r\n\r\n return result\r\n }\r\n\r\n /**\r\n * @return {string}\r\n */\r\n getPermissionStatus () {\r\n let perm = 'default'\r\n\r\n if (window.Notification && window.Notification.permissionLevel) {\r\n perm = window.Notification.permissionLevel\r\n } else if (\r\n window.webkitNotifications && window.webkitNotifications.checkPermission\r\n ) {\r\n switch (window.webkitNotifications.checkPermission()) {\r\n case 1:\r\n perm = 'default'\r\n break\r\n case 0:\r\n perm = 'granted'\r\n break\r\n default:\r\n perm = 'denied'\r\n }\r\n } else if (window.Notification && window.Notification.permission) {\r\n perm = window.Notification.permission\r\n } else if (navigator.mozNotification) {\r\n perm = 'granted'\r\n } else if (\r\n window.external && window.external.msIsSiteMode() !== undefined\r\n ) {\r\n perm = window.external.msIsSiteMode() ? 'granted' : 'default'\r\n }\r\n\r\n return perm.toString().toLowerCase()\r\n }\r\n\r\n /**\r\n * @return {string}\r\n */\r\n getEndpoint (subscription) {\r\n let endpoint = subscription.endpoint\r\n const subscriptionId = subscription.subscriptionId\r\n\r\n // fix for Chrome < 45\r\n if (subscriptionId && endpoint.indexOf(subscriptionId) === -1) {\r\n endpoint += '/' + subscriptionId\r\n }\r\n\r\n return endpoint\r\n }\r\n\r\n /**\r\n * @return {boolean}\r\n */\r\n isSWRegistered () {\r\n try {\r\n return navigator.serviceWorker.controller.state === 'activated'\r\n } catch (e) {\r\n return false\r\n }\r\n }\r\n\r\n /**\r\n * @return {void}\r\n */\r\n unregisterWorker () {\r\n const self = this\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.getRegistrations().then(function (registrations) {\r\n for (let registration of registrations) {\r\n registration.unregister()\r\n self.fire('onSubscriptionCancel')\r\n }\r\n })\r\n }\r\n }\r\n\r\n /**\r\n * @return {void}\r\n */\r\n requestSubscription (userVisibleOnly = true) {\r\n const self = this\r\n const current = this.getPermissionStatus()\r\n const cb = result => {\r\n if (result === 'granted') {\r\n this.fire('onPermissionGranted')\r\n\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.register(this.workerPath).then(function () {\r\n navigator.serviceWorker.ready.then(\r\n function (serviceWorkerRegistration) {\r\n self.fire('onWorkerSuccess')\r\n serviceWorkerRegistration.pushManager\r\n .subscribe({\r\n userVisibleOnly: userVisibleOnly\r\n })\r\n .then(function (subscription) {\r\n const key = subscription.getKey('p256dh')\r\n const token = subscription.getKey('auth')\r\n\r\n self.subData = {\r\n endpoint: self.getEndpoint(subscription),\r\n p256dh: key\r\n ? window.btoa(\r\n String.fromCharCode.apply(null, new Uint8Array(key))\r\n )\r\n : null,\r\n auth: token\r\n ? window.btoa(\r\n String.fromCharCode.apply(\r\n null,\r\n new Uint8Array(token)\r\n )\r\n )\r\n : null\r\n }\r\n\r\n self.fire('onSubscriptionSuccess', [self.subData])\r\n })\r\n .catch(function (err) {\r\n self.fire('onWorkerError', [err])\r\n })\r\n }\r\n )\r\n })\r\n } else {\r\n self.fire('onWorkerNotSupported')\r\n }\r\n } else if (result === 'denied') {\r\n this.fire('onPermissionDenied')\r\n this.unregisterWorker()\r\n }\r\n }\r\n\r\n if (current === 'default') {\r\n if (window.Notification && window.Notification.requestPermission) {\r\n window.Notification.requestPermission(cb)\r\n } else if (\r\n window.webkitNotifications && window.webkitNotifications.checkPermission\r\n ) {\r\n window.webkitNotifications.requestPermission(cb)\r\n }\r\n } else {\r\n cb(current)\r\n }\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/push.js","/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.1.1\n */\n\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.ES6Promise = factory());\n}(this, (function () { 'use strict';\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nvar _isArray = undefined;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\n\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}\n\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve$1(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n resolve(promise, object);\n return promise;\n}\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {\n try {\n then$$1.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then$$1) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then$$1, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then$$1) {\n if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then$$1 === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n GET_THEN_ERROR.error = null;\n } else if (then$$1 === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then$$1)) {\n handleForeignThenable(promise, maybeThenable, then$$1);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nfunction Enumerator$1(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n}\n\nEnumerator$1.prototype._enumerate = function (input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n};\n\nEnumerator$1.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve$$1 = c.resolve;\n\n if (resolve$$1 === resolve$1) {\n var _then = getThen(entry);\n\n if (_then === then && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise$2) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve$$1) {\n return resolve$$1(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve$$1(entry), i);\n }\n};\n\nEnumerator$1.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator$1.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all$1(entries) {\n return new Enumerator$1(this, entries).promise;\n}\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race$1(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject$1(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n reject(promise, reason);\n return promise;\n}\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise$2(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise$2 ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise$2.all = all$1;\nPromise$2.race = race$1;\nPromise$2.resolve = resolve$1;\nPromise$2.reject = reject$1;\nPromise$2._setScheduler = setScheduler;\nPromise$2._setAsap = setAsap;\nPromise$2._asap = asap;\n\nPromise$2.prototype = {\n constructor: Promise$2,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};\n\n/*global self*/\nfunction polyfill$1() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise$2;\n}\n\n// Strange compat..\nPromise$2.polyfill = polyfill$1;\nPromise$2.Promise = Promise$2;\n\nreturn Promise$2;\n\n})));\n\n//# sourceMappingURL=es6-promise.map\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/es6-promise/dist/es6-promise.js\n// module id = 4\n// module chunks = 0","/* global VERSION */\n\nimport 'noty.scss'\nimport Promise from 'es6-promise'\nimport * as Utils from 'utils'\nimport * as API from 'api'\nimport { NotyButton } from 'button'\nimport { Push } from 'push'\n\nexport default class Noty {\n /**\n * @param {object} options\n * @return {Noty}\n */\n constructor (options = {}) {\n this.options = Utils.deepExtend({}, API.Defaults, options)\n\n if (API.Store[this.options.id]) {\n return API.Store[this.options.id]\n }\n\n this.id = this.options.id || Utils.generateID('bar')\n this.closeTimer = -1\n this.barDom = null\n this.layoutDom = null\n this.progressDom = null\n this.showing = false\n this.shown = false\n this.closed = false\n this.closing = false\n this.killable = this.options.timeout || this.options.closeWith.length > 0\n this.hasSound = this.options.sounds.sources.length > 0\n this.soundPlayed = false\n this.listeners = {\n beforeShow: [],\n onShow: [],\n afterShow: [],\n onClose: [],\n afterClose: [],\n onClick: [],\n onHover: [],\n onTemplate: []\n }\n this.promises = {\n show: null,\n close: null\n }\n this.on('beforeShow', this.options.callbacks.beforeShow)\n this.on('onShow', this.options.callbacks.onShow)\n this.on('afterShow', this.options.callbacks.afterShow)\n this.on('onClose', this.options.callbacks.onClose)\n this.on('afterClose', this.options.callbacks.afterClose)\n this.on('onClick', this.options.callbacks.onClick)\n this.on('onHover', this.options.callbacks.onHover)\n this.on('onTemplate', this.options.callbacks.onTemplate)\n\n return this\n }\n\n /**\n * @param {string} eventName\n * @param {function} cb\n * @return {Noty}\n */\n on (eventName, cb = () => {}) {\n if (typeof cb === 'function' && this.listeners.hasOwnProperty(eventName)) {\n this.listeners[eventName].push(cb)\n }\n\n return this\n }\n\n /**\n * @return {Noty}\n */\n show () {\n if (this.showing || this.shown) {\n return this // preventing multiple show\n }\n\n if (this.options.killer === true) {\n Noty.closeAll()\n } else if (typeof this.options.killer === 'string') {\n Noty.closeAll(this.options.killer)\n }\n\n let queueCounts = API.getQueueCounts(this.options.queue)\n\n if (\n queueCounts.current >= queueCounts.maxVisible ||\n (API.PageHidden && this.options.visibilityControl)\n ) {\n API.addToQueue(this)\n\n if (\n API.PageHidden &&\n this.hasSound &&\n Utils.inArray('docHidden', this.options.sounds.conditions)\n ) {\n Utils.createAudioElements(this)\n }\n\n if (\n API.PageHidden &&\n Utils.inArray('docHidden', this.options.titleCount.conditions)\n ) {\n API.docTitle.increment()\n }\n\n return this\n }\n\n API.Store[this.id] = this\n\n API.fire(this, 'beforeShow')\n\n this.showing = true\n\n if (this.closing) {\n this.showing = false\n return this\n }\n\n API.build(this)\n API.handleModal(this)\n\n if (this.options.force) {\n this.layoutDom.insertBefore(this.barDom, this.layoutDom.firstChild)\n } else {\n this.layoutDom.appendChild(this.barDom)\n }\n\n if (\n this.hasSound &&\n !this.soundPlayed &&\n Utils.inArray('docVisible', this.options.sounds.conditions)\n ) {\n Utils.createAudioElements(this)\n }\n\n if (Utils.inArray('docVisible', this.options.titleCount.conditions)) {\n API.docTitle.increment()\n }\n\n this.shown = true\n this.closed = false\n\n // bind button events if any\n if (API.hasButtons(this)) {\n Object.keys(this.options.buttons).forEach(key => {\n const btn = this.barDom.querySelector(\n `#${this.options.buttons[key].id}`\n )\n Utils.addListener(btn, 'click', e => {\n Utils.stopPropagation(e)\n this.options.buttons[key].cb(this)\n })\n })\n }\n\n this.progressDom = this.barDom.querySelector('.noty_progressbar')\n\n if (Utils.inArray('click', this.options.closeWith)) {\n Utils.addClass(this.barDom, 'noty_close_with_click')\n Utils.addListener(\n this.barDom,\n 'click',\n e => {\n Utils.stopPropagation(e)\n API.fire(this, 'onClick')\n this.close()\n },\n false\n )\n }\n\n Utils.addListener(\n this.barDom,\n 'mouseenter',\n () => {\n API.fire(this, 'onHover')\n },\n false\n )\n\n if (this.options.timeout) Utils.addClass(this.barDom, 'noty_has_timeout')\n if (this.options.progressBar) {\n Utils.addClass(this.barDom, 'noty_has_progressbar')\n }\n\n if (Utils.inArray('button', this.options.closeWith)) {\n Utils.addClass(this.barDom, 'noty_close_with_button')\n\n const closeButton = document.createElement('div')\n Utils.addClass(closeButton, 'noty_close_button')\n closeButton.innerHTML = '×'\n this.barDom.appendChild(closeButton)\n\n Utils.addListener(\n closeButton,\n 'click',\n e => {\n Utils.stopPropagation(e)\n this.close()\n },\n false\n )\n }\n\n API.fire(this, 'onShow')\n\n if (this.options.animation.open === null) {\n this.promises.show = new Promise(resolve => {\n resolve()\n })\n } else if (typeof this.options.animation.open === 'function') {\n this.promises.show = new Promise(this.options.animation.open.bind(this))\n } else {\n Utils.addClass(this.barDom, this.options.animation.open)\n this.promises.show = new Promise(resolve => {\n Utils.addListener(this.barDom, Utils.animationEndEvents, () => {\n Utils.removeClass(this.barDom, this.options.animation.open)\n resolve()\n })\n })\n }\n\n this.promises.show.then(() => {\n const _t = this\n setTimeout(\n () => {\n API.openFlow(_t)\n },\n 100\n )\n })\n\n return this\n }\n\n /**\n * @return {Noty}\n */\n stop () {\n API.dequeueClose(this)\n return this\n }\n\n /**\n * @return {Noty}\n */\n resume () {\n API.queueClose(this)\n return this\n }\n\n /**\n * @param {int|boolean} ms\n * @return {Noty}\n */\n setTimeout (ms) {\n this.stop()\n this.options.timeout = ms\n\n if (this.barDom) {\n if (this.options.timeout) {\n Utils.addClass(this.barDom, 'noty_has_timeout')\n } else {\n Utils.removeClass(this.barDom, 'noty_has_timeout')\n }\n\n const _t = this\n setTimeout(\n function () {\n // ugly fix for progressbar display bug\n _t.resume()\n },\n 100\n )\n }\n\n return this\n }\n\n /**\n * @param {string} html\n * @param {boolean} optionsOverride\n * @return {Noty}\n */\n setText (html, optionsOverride = false) {\n if (this.barDom) {\n this.barDom.querySelector('.noty_body').innerHTML = html\n }\n\n if (optionsOverride) this.options.text = html\n\n return this\n }\n\n /**\n * @param {string} type\n * @param {boolean} optionsOverride\n * @return {Noty}\n */\n setType (type, optionsOverride = false) {\n if (this.barDom) {\n let classList = Utils.classList(this.barDom).split(' ')\n\n classList.forEach(c => {\n if (c.substring(0, 11) === 'noty_type__') {\n Utils.removeClass(this.barDom, c)\n }\n })\n\n Utils.addClass(this.barDom, `noty_type__${type}`)\n }\n\n if (optionsOverride) this.options.type = type\n\n return this\n }\n\n /**\n * @param {string} theme\n * @param {boolean} optionsOverride\n * @return {Noty}\n */\n setTheme (theme, optionsOverride = false) {\n if (this.barDom) {\n let classList = Utils.classList(this.barDom).split(' ')\n\n classList.forEach(c => {\n if (c.substring(0, 12) === 'noty_theme__') {\n Utils.removeClass(this.barDom, c)\n }\n })\n\n Utils.addClass(this.barDom, `noty_theme__${theme}`)\n }\n\n if (optionsOverride) this.options.theme = theme\n\n return this\n }\n\n /**\n * @return {Noty}\n */\n close () {\n if (this.closed) return this\n\n if (!this.shown) {\n // it's in the queue\n API.removeFromQueue(this)\n return this\n }\n\n API.fire(this, 'onClose')\n\n this.closing = true\n\n if (this.options.animation.close === null || this.options.animation.close === false) {\n this.promises.close = new Promise(resolve => {\n resolve()\n })\n } else if (typeof this.options.animation.close === 'function') {\n this.promises.close = new Promise(\n this.options.animation.close.bind(this)\n )\n } else {\n Utils.addClass(this.barDom, this.options.animation.close)\n this.promises.close = new Promise(resolve => {\n Utils.addListener(this.barDom, Utils.animationEndEvents, () => {\n if (this.options.force) {\n Utils.remove(this.barDom)\n } else {\n API.ghostFix(this)\n }\n resolve()\n })\n })\n }\n\n this.promises.close.then(() => {\n API.closeFlow(this)\n API.handleModalClose(this)\n })\n\n this.closed = true\n\n return this\n }\n\n // API functions\n\n /**\n * @param {boolean|string} queueName\n * @return {Noty}\n */\n static closeAll (queueName = false) {\n Object.keys(API.Store).forEach(id => {\n if (queueName) {\n if (\n API.Store[id].options.queue === queueName && API.Store[id].killable\n ) {\n API.Store[id].close()\n }\n } else if (API.Store[id].killable) {\n API.Store[id].close()\n }\n })\n return this\n }\n\n /**\n * @param {string} queueName\n * @return {Noty}\n */\n static clearQueue (queueName = 'global') {\n if (API.Queues.hasOwnProperty(queueName)) {\n API.Queues[queueName].queue = []\n }\n return this\n }\n\n /**\n * @return {API.Queues}\n */\n static get Queues () {\n return API.Queues\n }\n\n /**\n * @return {API.PageHidden}\n */\n static get PageHidden () {\n return API.PageHidden\n }\n\n /**\n * @param {Object} obj\n * @return {Noty}\n */\n static overrideDefaults (obj) {\n API.Defaults = Utils.deepExtend({}, API.Defaults, obj)\n return this\n }\n\n /**\n * @param {int} amount\n * @param {string} queueName\n * @return {Noty}\n */\n static setMaxVisible (amount = API.DefaultMaxVisible, queueName = 'global') {\n if (!API.Queues.hasOwnProperty(queueName)) {\n API.Queues[queueName] = {maxVisible: amount, queue: []}\n }\n\n API.Queues[queueName].maxVisible = amount\n return this\n }\n\n /**\n * @param {string} innerHtml\n * @param {String} classes\n * @param {Function} cb\n * @param {Object} attributes\n * @return {NotyButton}\n */\n static button (innerHtml, classes = null, cb, attributes = {}) {\n return new NotyButton(innerHtml, classes, cb, attributes)\n }\n\n /**\n * @return {string}\n */\n static version () {\n return VERSION\n }\n\n /**\n * @param {String} workerPath\n * @return {Push}\n */\n static Push (workerPath) {\n return new Push(workerPath)\n }\n}\n\n// Document visibility change controller\nif (typeof window !== 'undefined') {\n Utils.visibilityChangeFlow()\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/process/browser.js\n// module id = 7\n// module chunks = 0","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 8\n// module chunks = 0"],"sourceRoot":""}