{"version":3,"sources":["webpack://Msg/webpack/universalModuleDefinition","webpack://Msg/webpack/bootstrap","webpack://Msg/external \"jQuery\"","webpack://Msg/./src/defaults/iconFa.js","webpack://Msg/./src/bootstrap-msg.js","webpack://Msg/./src/defaults/icon.js","webpack://Msg/./src/defaults/timeout.js","webpack://Msg/./src/index.js"],"names":["root","factory","exports","module","require","define","amd","self","this","__WEBPACK_EXTERNAL_MODULE__0__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","iconFa","info","success","warning","danger","bootstrap_msg","ICONS","BOOTSTRAP","FONTAWESOME","icon","timeout","version","timer","init","msg","$","find","on","e","preventDefault","hideMsg","appendTo","document","body","showMsg","type","message","arguments","length","undefined","progress","html","attr","concat","css","clearTimeout","stop","animate","width","setTimeout","error","removeClass"],"mappings":";CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,EAAAG,QAAA,WACA,mBAAAC,eAAAC,IACAD,OAAA,iBAAAJ,GACA,iBAAAC,QACAA,QAAA,IAAAD,EAAAG,QAAA,WAEAJ,EAAA,IAAAC,EAAAD,EAAA,QARA,CASC,oBAAAO,UAAAC,KAAA,SAAAC,GACD,mBCTA,IAAAC,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAV,QAGA,IAAAC,EAAAO,EAAAE,GAAA,CACAC,EAAAD,EACAE,GAAA,EACAZ,QAAA,IAUA,OANAa,EAAAH,GAAAI,KAAAb,EAAAD,QAAAC,IAAAD,QAAAS,GAGAR,EAAAW,GAAA,EAGAX,EAAAD,QA0DA,OArDAS,EAAAM,EAAAF,EAGAJ,EAAAO,EAAAR,EAGAC,EAAAQ,EAAA,SAAAjB,EAAAkB,EAAAC,GACAV,EAAAW,EAAApB,EAAAkB,IACAG,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,KAAM,WACF,IAAMnD,EAAOC,KACPmD,EAAMC,IAAC,kPAiBb,OARAD,EAAIE,KAAK,wBAAwBC,GAAG,QAAS,SAAUC,GACnDA,EAAEC,iBAEFzD,EAAK0D,YAGTN,EAAIO,SAASC,SAASC,MAEf7D,GAGX8D,QAAS,SAAUC,EAAMC,GAAuC,IAA9BhB,EAA8BiB,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAApBhE,KAAK+C,QAAQe,GAC/C/D,EAAOC,KACPmD,EAAMC,IAAE,QACRe,EAAWhB,EAAIE,KAAK,OAE1BF,EAAIE,KAAK,QAAQe,KAAKL,GACtBZ,EAAIE,KAAK,KAAKgB,KAAK,QAAStE,EAAK+C,KAAKgB,IACtCX,EAAIkB,KAAK,QAAT,eAAAC,OAAiCR,EAAjC,YACAK,EAASE,KAAK,QAAd,eAAAC,OAAsCR,EAAtC,kBAA2DS,IAAI,QAAS,GAExEC,aAAaxE,KAAKiD,OACdF,EAAU,IACVoB,EAASM,OAAOC,QAAQ,CACpBC,MAAO,QACR5B,GACH/C,KAAKiD,MAAQ2B,WAAW,WACpB7E,EAAK0D,WACNV,KAIXT,KAAM,SAAUyB,EAAShB,GACrB/C,KAAK6D,QAAQ,OAAQE,EAAShB,IAGlCR,QAAS,SAAUwB,EAAShB,GACxB/C,KAAK6D,QAAQ,UAAWE,EAAShB,IAGrCP,QAAS,SAAUuB,EAAShB,GACxB/C,KAAK6D,QAAQ,UAAWE,EAAShB,IAGrC8B,MAAO,SAAUd,EAAShB,GACtB/C,KAAKyC,OAAOsB,EAAShB,IAGzBN,OAAQ,SAAUsB,EAAShB,GACvB/C,KAAK6D,QAAQ,SAAUE,EAAShB,IAGpCU,QAAS,WACLL,IAAE,QAAQ0B,YAAY,YAE5B5B,OGlFFtD,wCAAQ","file":"js/bootstrap-msg.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"jQuery\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"Msg\", [\"jQuery\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Msg\"] = factory(require(\"jQuery\"));\n\telse\n\t\troot[\"Msg\"] = factory(root[\"jQuery\"]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE__0__) {\nreturn "," \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// 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, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\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\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 2);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__0__;","export default {\r\n info: 'fa fa-info-circle',\r\n success: 'fa fa-check-circle',\r\n warning: 'fa fa-exclamation-circle',\r\n danger: 'fa fa-times-circle'\r\n};\r\n","import $ from 'jquery';\r\n\r\nimport TIMEOUT from './defaults/timeout';\r\nimport iconBs from './defaults/icon';\r\nimport iconFa from './defaults/iconFa';\r\n\r\nexport default {\r\n ICONS: {\r\n BOOTSTRAP: iconBs,\r\n FONTAWESOME: iconFa\r\n },\r\n icon: iconFa,\r\n timeout: TIMEOUT,\r\n version: '1.0.0',\r\n timer: null,\r\n \r\n init: function () {\r\n const self = this;\r\n const msg = $(`\r\n <div id=\"msg\">\r\n <a href=\"#\" data-dismiss=\"msg\" class=\"close\">×</a>\r\n <i></i>\r\n <span></span>\r\n <div class=\"msg-progress\"></div>\r\n </div>\r\n `);\r\n \r\n msg.find('[data-dismiss=\"msg\"]').on('click', function (e) {\r\n e.preventDefault();\r\n \r\n self.hideMsg();\r\n });\r\n \r\n msg.appendTo(document.body);\r\n \r\n return self;\r\n },\r\n \r\n showMsg: function (type, message, timeout = this.timeout[type]) {\r\n const self = this;\r\n const msg = $('#msg');\r\n const progress = msg.find('div');\r\n \r\n msg.find('span').html(message);\r\n msg.find('i').attr('class', self.icon[type]);\r\n msg.attr('class', `alert alert-${type} showed`);\r\n progress.attr('class', `alert alert-${type} msg-progress`).css('width', 0);\r\n \r\n clearTimeout(this.timer);\r\n if (timeout > 0) {\r\n progress.stop().animate({\r\n width: '100%'\r\n }, timeout);\r\n this.timer = setTimeout(function () {\r\n self.hideMsg();\r\n }, timeout);\r\n }\r\n },\r\n \r\n info: function (message, timeout) {\r\n this.showMsg('info', message, timeout);\r\n },\r\n \r\n success: function (message, timeout) {\r\n this.showMsg('success', message, timeout);\r\n },\r\n \r\n warning: function (message, timeout) {\r\n this.showMsg('warning', message, timeout);\r\n },\r\n \r\n error: function (message, timeout) {\r\n this.danger(message, timeout);\r\n },\r\n \r\n danger: function (message, timeout) {\r\n this.showMsg('danger', message, timeout);\r\n },\r\n \r\n hideMsg: function () {\r\n $('#msg').removeClass('showed');\r\n }\r\n}.init();\r\n","export default {\r\n info: 'glyphicon glyphicon-info-sign',\r\n success: 'glyphicon glyphicon-ok-sign',\r\n warning: 'glyphicon glyphicon-exclamation-sign',\r\n danger: 'glyphicon glyphicon-remove-sign'\r\n};\r\n","export default {\r\n info: 5 * 1000,\r\n success: 5 * 1000,\r\n warning: 5 * 1000,\r\n danger: 5 * 1000\r\n}","require('./bootstrap-msg.scss');\r\nexport default from './bootstrap-msg';"],"sourceRoot":""}