text: (function(t){function e(e){for(var s,r,a=e[0],l=e[1],c=e[2],f=0,m=[];f<a.length;f++)r=a[f],i[r]&&m.push(i[r][0]),i[r]=0;for(s in l)Object.prototype.hasOwnProperty.call(l,s)&&(t[s]=l[s]);u&&u(e);while(m.length)m.shift()();return o.push.apply(o,c||[]),n()}function n(){for(var t,e=0;e<o.length;e++){for(var n=o[e],s=!0,a=1;a<n.length;a++){var l=n[a];0!==i[l]&&(s=!1)}s&&(o.splice(e--,1),t=r(r.s=n[0]))}return t}var s={},i={app:0},o=[];function r(e){if(s[e])return s[e].exports;var n=s[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=t,r.c=s,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)r.d(n,s,function(e){return t[e]}.bind(null,s));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/vuejs-notify/";var a=window["webpackJsonp"]=window["webpackJsonp"]||[],l=a.push.bind(a);a.push=e,a=a.slice();for(var c=0;c<a.length;c++)e(a[c]);var u=l;o.push([0,"chunk-vendors"]),n()})({0:function(t,e,n){t.exports=n("56d7")},"034f":function(t,e,n){"use strict";var s=n("64a9"),i=n.n(s);i.a},"0981":function(t,e,n){},"0a36":function(t,e){t.exports=["// Overwrite presets with an object\nthis.$notify.success({\n  position: 'bottom right',\n  timeout: 0,\n  title: 'Success!',\n  msg: 'You did something right. Swipe to close',\n})","// Set states after notified\nthis.$notify.default({\n  msg: 'Hey watch as this changes in a second',\n}).then( notify => {\n  setTimeout(()=>{\n    notify.msg = 'Hah see?'\n  }, 1000)\n})","// Set event\nthis.$notify.default({\n  msg: 'Cant close this',\n  timeout: 0,\n  events: {\n    'before-close' : [\n      // you can set events here\n      // function(notify){notify.preventClose=true}\n    ] \n  },\n  buttons: [\n    { text: 'except with this', click(notify){ notify.close(true) }}\n  ]\n\n}).then( notify => {\n  // but lets set it here instead\n  notify.on('before-close', function(notify){\n    notify.preventClose = true\n  })\n  notify.on('destroyed', function(notify){\n    alert('A must-have annoying demo alert')\n  })\n})","// Custom notifier\nlet myNotifier = this.$notifySetPreset('myNotifier', {\n  title: 'It has title',\n  msg: 'And a message'\n})\n\nmyNotifier()\n\n// Of course this works too\nthis.$notify.myNotifier('Works too')\n"]},"1edd":function(t,e,n){},"24af":function(t,e,n){"use strict";var s=n("6594"),i=n.n(s);i.a},"56d7":function(t,e,n){"use strict";n.r(e);var s=n("2b0e"),i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"app"}},[n("demo")],1)},o=[],r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"demo"},[n("div",{staticClass:"first-block"},[n("div",{staticClass:"container"},[n("div",{staticClass:"d-flex flex-column justify-content-between",staticStyle:{height:"80vh"}},[n("div",{staticClass:"d-flex justify-content-between"},[n("button",{staticClass:"btn btn-sm btn-outline-primary mt-2",on:{click:function(e){return t.notify1("top left")}}},[t._v("Notify")]),n("button",{staticClass:"btn btn-sm btn-outline-primary mt-2",on:{click:function(e){return t.notify1("top center")}}},[t._v("Notify")]),n("button",{staticClass:"btn btn-sm btn-outline-primary mt-2",on:{click:function(e){return t.notify1("top right")}}},[t._v("Notify")])]),t._m(0),n("div",{staticClass:"d-flex justify-content-between"},[n("button",{staticClass:"btn btn-sm btn-outline-primary mt-2",on:{click:function(e){return t.notify1("bottom left")}}},[t._v("Notify ")]),n("button",{staticClass:"btn btn-sm btn-outline-primary mt-2",on:{click:function(e){return t.notify1("bottom center")}}},[t._v("Notify ")]),n("button",{staticClass:"btn btn-sm btn-outline-primary mt-2",on:{click:function(e){return t.notify1("bottom right")}}},[t._v("Notify ")])])])])]),n("div",{staticClass:"demos"},[n("div",{staticClass:"container"},[n("div",{staticClass:"playground py-4"},[n("h3",{attrs:{id:"usage"}},[t._v("Playground")]),t._m(1),n("select",{directives:[{name:"model",rawName:"v-model",value:t.currentPlayground,expression:"currentPlayground"}],staticClass:"form-control form-control-sm",attrs:{name:"playgroundSelect",id:"playgroundSelect"},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){var e="_value"in t?t._value:t.value;return e});t.currentPlayground=e.target.multiple?n:n[0]}}},[n("option",{domProps:{value:0}},[t._v("Using objects")]),n("option",{domProps:{value:1}},[t._v("Set states after notified")]),n("option",{domProps:{value:2}},[t._v("Set event")]),n("option",{domProps:{value:3}},[t._v("Custom notifier")])]),n("codemirror",{model:{value:t.codes.playground[t.currentPlayground],callback:function(e){t.$set(t.codes.playground,t.currentPlayground,e)},expression:"codes.playground[currentPlayground]"}}),n("div",{staticClass:"my-3"},[n("button",{staticClass:"mr-1 btn btn-sm btn-outline-primary",on:{click:t.runPlayground}},[t._v("Run!")])])],1),n("div",{staticClass:"installation py-4"},[n("h3",{attrs:{id:"installation"}},[t._v("Installation")]),n("div",{staticClass:"mt-4"},[n("h6",[t._v("Out of box")]),n("codemirror",{attrs:{value:t.codes.installation[0]}})],1),n("div",{staticClass:"mt-4"},[n("h6",[t._v("Configurations")]),n("codemirror",{attrs:{value:t.codes.installation[1]}})],1)]),n("div",{staticClass:"usage py-4"},[n("h3",{attrs:{id:"usage"}},[t._v("Usage")]),n("div",{staticClass:"mt-4"},[n("codemirror",{attrs:{value:t.codes.usage[0]}})],1),n("div",{staticClass:"my-3"},[n("button",{staticClass:"mr-1 btn btn-sm btn-outline-primary",on:{click:function(e){return t.$notify.default("My default message")}}},[t._v("Default")]),n("button",{staticClass:"mr-1 btn btn-sm btn-outline-primary",on:{click:function(e){return t.$notify.error("My error message")}}},[t._v("Error")]),n("button",{staticClass:"mr-1 btn btn-sm btn-outline-primary",on:{click:function(e){return t.$notify.warning("My warning message")}}},[t._v("Warning")]),n("button",{staticClass:"mr-1 btn btn-sm btn-outline-primary",on:{click:function(e){return t.$notify.success("My success message")}}},[t._v("Success")]),n("button",{staticClass:"mr-1 btn btn-sm btn-outline-primary",on:{click:function(e){return t.$notify.info("My info message")}}},[t._v("Info")])]),n("div",{staticClass:"mt-4"},[n("h6",[t._v("Other functions")]),n("codemirror",{attrs:{value:t.codes.usage[1]}})],1)])])]),t._m(2)])},a=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("h2",[t._v("vuejs-notify")]),n("div",[n("small",[n("p",[t._v("Simple Vue notifications plugin")]),n("a",{staticClass:"mr-2",attrs:{href:"https://github.com/noxludio/vuejs-notify",target:"_blank"}},[t._v("Github")]),n("a",{attrs:{href:"https://www.npmjs.com/package/vuejs-notify",target:"_blank"}},[t._v("NPM")])])]),n("div",{staticClass:"p-3"},[n("code",[t._v("npm i vuejs-notify --save")])])])},function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("p",[n("small",[t._v("Select demo below, edit and hit run")])])},function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"credits py-5"},[n("small",[n("div",{staticClass:"mb-2"},[n("i",{staticClass:"material-icons",staticStyle:{"font-size":"12px"}},[t._v("copyright")]),t._v(" 2019 "),n("a",{attrs:{target:"_blank",href:"https://github.com/noxludio"}},[t._v("noxludio")]),t._v(" with MIT license")]),n("div",[t._v("Cookie icon by "),n("a",{attrs:{target:"_blank",href:"https://www.freepik.com/?__hstc=57440181.8d436ee45cc9b85e0c662eaeddf68eeb.1563388904905.1563388904905.1563388904905.1&__hssc=57440181.1.1563388904906&__hsfp=131469153",title:"Freepik"}},[t._v("Freepik")]),t._v(" from "),n("a",{attrs:{target:"_blank",href:"https://www.flaticon.com/",title:"Flaticon"}},[t._v("www.flaticon.com")]),t._v(" is licensed by "),n("a",{attrs:{href:"http://creativecommons.org/licenses/by/3.0/",title:"Creative Commons BY 3.0",target:"_blank"}},[t._v("CC 3.0 BY")])])])])}],l={name:"Demo",data(){return{currentPlayground:0,codes:{installation:n("dbd2"),usage:n("af89"),playground:n("0a36")}}},methods:{runPlayground(){let t=new Function(this.codes.playground[this.currentPlayground]);t.apply(this)},notify1(t){let e={position:t,title:"Title goes here",msg:"Your message goes here. Swipe to close.",marginY:10,opacity:.95,styles:{minWidth:null,maxWidth:"calc(100% - 40px)",width:250},buttons:[]};this.$notify.default(e)}},mounted(){console.log(this)}},c=l,u=(n("dd78"),n("2877")),f=Object(u["a"])(c,r,a,!1,null,null,null),m=f.exports,p=n("efdf"),y=n.n(p),h={name:"app",components:{Demo:m},mounted(){null===y.a.get("cookiesAccepted")&&this.$notify.cookie()}},d=h,g=(n("034f"),Object(u["a"])(d,i,o,!1,null,null,null)),v=g.exports,b=n("c84c"),_=n.n(b),C=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.mounted?n("v-touch",{ref:"notification",staticClass:"vue-notification",class:t.classes,style:t.c_styles,attrs:{"pan-options":{direction:"horizontal",treshold:10}},on:{pan:t.pan}},[n("div",{on:{click:t.notifyClicked}},[t.title?n("div",{staticClass:"vue-notification-title",style:"transition: border "+t.transition+"ms ease",domProps:{innerHTML:t._s(t.title)}}):t._e(),t.msg?n("div",{staticClass:"vue-notification-msg",domProps:{innerHTML:t._s(t.msg)}}):t._e(),t.component?n("div",{staticClass:"vue-notification-component"},[n(t.component,t._b({tag:"component"},"component",t.componentProps,!1))],1):t._e(),t.c_buttons&&t.c_buttons.length>0?n("div",{staticClass:"vue-notification-buttons"},t._l(t.c_buttons,function(e){return n("button",{key:e.uid,class:e.classes,on:{click:function(n){(e[t._uid+"_click"]||t.noop)()}}},[e.html?n("span",{staticClass:"button-custom-element",domProps:{innerHTML:t._s(e.html)}}):t._e(),e.text?n("span",[t._v(t._s(e.text))]):t._e()])}),0):t._e()])]):t._e()},w=[],k={data(){return{title:null,msg:null,classes:null,timeout:6e3,position:"bottom center",transition:330,marginY:10,marginX:20,opacity:1,buttons:[],touch:!0,closeOnClick:!1,notifications:[],mounted:!1,componentProps:{},component:null,preventClose:!1,treshold:90,holding:!1,temp_transition:null,timeout_ended:!1,close_running:!1,styles:{minWidth:250,maxWidth:300,width:null,transition:null,opacity:null,left:null,right:null,top:null,bottom:null,transform:null,animation:null,pointerEvents:null},appear:{"top left":"NotifyFromLeft","top right":"NotifyFromRight","top center":"NotifyFromTop","bottom left":"NotifyFromLeft","bottom right":"NotifyFromRight","bottom center":"NotifyFromBottom"},events:{"before-close":[],mounted:[],destroyed:[],click:[]}}},computed:{ypos(){return this.position.split(" ")[0]},c_buttons(){return Array.isArray(this.buttons)?(this.buttons.forEach((t,e)=>{t.uid=t.uid||Date.now()+e,t[this._uid+"_click"]=e=>{(t.click||function(){}).apply(this,[this,e,t])}}),this.buttons):[]},c_styles(){let t=Object.assign({},this.styles);for(const e in t)t.hasOwnProperty(e)&&"opacity"!=e&&"number"==typeof t[e]&&(t[e]=t[e]+"px");return t},center(){return`calc(50vw - ${this.$el.clientWidth/2}px)`},isOffScreen(){return this.styles[this.ypos]>window.innerHeight}},methods:{notifyClicked(t){this.holding||(this.fire("click",[this,t]),this.closeOnClick&&this.close())},fire(t,e){e=Array.isArray(e)?e:[e],this.events[t].filter(t=>"function"==typeof t).forEach(t=>t.apply(this,e))},on(t,e){this.events[t].push(e)},noop(){},pan(t){if(!this.touch)return;null===this.temp_transition&&(this.temp_transition=this.styles.transition),this.styles.transition=`transform 55ms ease, ${this.ypos} ${this.transition}ms ease, opacity 400ms ease`,this.styles.transform=`translateX(${t.deltaX}px)`;let e=Math.abs(t.deltaX)>this.treshold;if(this.styles.opacity=e?.5:this.opacity,this.holding=!0,t.isFinal)if(this.holding=!1,this.styles.transition=this.temp_transition,this.temp_transition=null,this.timeout_ended&&this.close(),e){let e=t.deltaX+(t.deltaX>0?100:-100);this.styles.transform=`translateX(${this.close()?e:0}px)`}else this.styles.transform=null},startingPos(){let t={},e=this.position.split(" "),n="center"===e[1]?"left":e[1],s=e[0];return t[s]=this.marginY,t[n]="center"===e[1]?this.center:this.marginX,t},close(t){if(this.close_running)return!1;if(this.close_running=!0,this.fire("before-close",this),!t&&this.preventClose)return this.preventClose=this.close_running=!1,!1;this.styles.opacity=0,this.styles.pointerEvents="none";let e=this.notifications.findIndex(t=>t._uid==this._uid);return this.notifications.slice(e).filter(t=>t._uid!==this._uid&&t.position==this.position).forEach(t=>{t.styles[this.ypos]-=this.$el.clientHeight+this.marginY}),setTimeout(()=>{this.$destroy(),this.$el.remove(),this.fire("destroyed",this)},this.transition),!0}},mounted(){this.styles.transition=`all ${this.transition}ms ease, left 0s`,this.styles.opacity=0,this.mounted=!0,console.log(this,this._uid),this.$nextTick(()=>{this.fire("mounted",this),this.styles.opacity=this.opacity,this.styles.animation=`${this.appear[this.position]} ${this.transition}ms forwards`,setTimeout(()=>this.styles.animation=null,this.transition),Object.assign(this.styles,this.startingPos()),this.notifications.filter(t=>t.position==this.position).forEach(t=>{t.styles[this.ypos]+=this.$el.clientHeight+this.marginY}),this.notifications.unshift(this)}),this.timeout&&this.timeout>0&&setTimeout(()=>{this.timeout_ended=!0,this.holding||this.close()},this.timeout)},watch:{opacity(t){this.styles.opacity=t},transition(t){this.styles.transition=`all ${t}ms ease, left 0s`}}},$=k,x=(n("24af"),Object(u["a"])($,C,w,!1,null,null,null)),P=x.exports,j=n("8639");let O=null,N={},S=[],M={},A={default:{},warning:{classes:["warning"]},error:{classes:["error"]},success:{classes:["success"]},info:{classes:["info"]}},F=function(){};function T(t){if(!O)return console.warn("vuejs-notify was not installed properly. Container was not set.");let e=j(Object.assign(t,N));e.notifications=S;const n=new F({data:e}).$mount();if(n.on("destroyed",function(){S=S.filter(t=>t._uid!=n._uid)}),O.appendChild(n.$el),S.length>(N.max||60)){let t=S.pop();t.$destroy(),t.$el&&t.$el.remove()}return n}function E(t,e={}){return A[t]=Object.assign(A[t]||{},e),M[t]=function(e){let n=Object.assign({},N);Object.assign(n,A[t]);const s=T(Object.assign(n,"string"===typeof e?{msg:e}:e));return new Promise((t,e)=>{s.on("mounted",t)})},M[t]}function D(t){return new Promise(e=>{0===S.length?e(S):S.forEach((n,s)=>{s==S.length-1&&n.on("destroyed",()=>e(S)),n.close(t)})})}function Y(){return S}function W(t){return A[t]}var L={install(t,e={}){if(t.use(_.a),e.presets){for(const t in e.presets)e.presets.hasOwnProperty(t)&&(A[t]=Object.assign(A[t]||{},e.presets[t]));delete e.presets}O=document.createElement("div"),O.classList.add("vuejs-notify-container"),document.body.appendChild(O),Object.assign(N,e||{}||{}),F=t.extend(P),t.prototype.$notify=M,t.prototype.$notifySetPreset=E,t.prototype.$notifyGetPreset=W;for(const n in A)A.hasOwnProperty(n)&&E(n);t.prototype.$notifyGetAll=Y,t.prototype.$notifyCloseAll=D}},X=n("8f94"),H=n.n(X),V=(n("a7be"),n("1b85"),n("cc10"),n("31c5"),n("f9d4"),function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"d-flex p-3 align-items-center"},[n("img",{staticClass:"cookie",attrs:{src:"/vuejs-notify/pictures/cookie.svg",alt:""}}),n("small",{staticClass:"px-3"},[t._v(t._s(t.msg))])])}),G=[],I={props:["msg"]},U=I,R=(n("b292"),Object(u["a"])(U,V,G,!1,null,"7fdc217a",null)),B=R.exports;s["a"].use(H.a,{options:{line:!0,theme:"base16-light",tabSize:2,lineNumbers:!0,lineWrapping:!1,styleActiveLine:!0}}),s["a"].config.productionTip=!1,s["a"].use(L,{presets:{cookie:{title:"Take my cookies",styles:{width:"100%"},component:B,componentProps:{msg:"This page uses cookies. Yummy!"},buttons:[{text:"Accept & Dismiss",click(t){y.a.set("cookiesAccepted","true",{expires:365}),t.title="Cookies accepted",t.componentProps.msg="Thank you!",t.buttons[0].classes="hide-cookie-button",setTimeout(()=>{t.close(!0)},1400)}}],events:{"before-close":[t=>t.preventClose=!0]}}}}),new s["a"]({render:function(t){return t(v)}}).$mount("#app")},"64a9":function(t,e,n){},6594:function(t,e,n){},af89:function(t,e){t.exports=["// Use string, replaces msg\nthis.$notify.default('My default message')\nthis.$notify.error('My error message')\nthis.$notify.warning('My warning message')\nthis.$notify.success('My success message')\nthis.$notify.info('My info message')\n\n// Or add options\nthis.$notify.default({position: 'bottom right', msg:'My default message'})\n\n// Custom presets work exactly the same\nthis.$notify.myCustomPreset('My custom preset message')\nthis.$notify['im-being-fancy']('My fancy message')\n\n// Use elsewhere\nimport { notify } from 'vuejs-notify'\nnotify.default('Yayy')","// Other functions\nthis.$notifyGetAll() // returns array of all notifications\nthis.$notifyCloseAll() // close all\nthis.$notifyCloseAll(true) // force close all\nthis.$notifySetPreset('myPreset', { timeout: 10000 } ) // add or overwrite preset configuration\nthis.$notifyGetPreset('myPreset') // get preset configuration object\n\n// Also available as imports\nimport { notify, notifyGetAll, notifyCloseAll, notifySetPreset, notifyGetPresets } from 'vuejs-notify'\n\n// notifySetPreset returns the notifier function\nlet myNotifier = notifySetPreset('myPresetAgain', { classes: ['im-boring'] } ) \nmyNotifier('Yay')"]},b292:function(t,e,n){"use strict";var s=n("1edd"),i=n.n(s);i.a},dbd2:function(t,e){t.exports=["import Vue from 'vue'\nimport VueNotify from 'vuejs-notify'\nVue.use(VueNotify)","// All configurations are optional\nVue.use(VueNotify, {\n  max: 100, // Default 60\n  timeout: 0, // In milliseconds, 0 for never. Default is 6000,\n  position: 'bottom center', // 'bottom left', 'bottom right', 'top left', 'top center', 'top right',\n  transition: 450, // Animation speed. Default 330\n  marginY: 10, // Spacing between notifications \n  marginX: 20, // Margin on x axis. Used only on left/right alignments\n  opacity: 0.95, // Default 1 \n  title: 'Title', // Default null \n  msg: 'Message', // Default null\n  closeOnClick: true, // Default false\n  touch: false, // Default true\n  treshold: 60, // Swipe treshold to close notification. Default 50\n  component: MyVueComponent, // Your component will be placed after message and before buttons\n  componentProps: {}, // Your component props\n  classes: ['my-class'], // Classes for Default preset, gets overwritten by presets\n  styles: { // these are binded to vue notification\n    // Number values get 'px' postfix (except opacity)\n    minWidth: null, // default 250\n    maxWidth: 'calc(100% - 40px)', // default 350\n    width: 250 // default null\n  },\n  appear: { // Appear animations\n    'top left':'NotifyFromLeft',\n    'top right':'NotifyFromRight',\n    'top center':'NotifyFromTop',\n    'bottom left':'NotifyFromLeft',\n    'bottom right':'NotifyFromRight',\n    'bottom center':'NotifyFromBottom',\n  },\n  buttons: [\n    {\n      html: '<i class=\"material-icons\">face</i>', // Use for icons or what ever\n      text: 'Ok',\n      click(notify){ notify.close(true) }, // close(true) forces close function to finish even when prevented on event\n      classes: 'my-button-class' // Array, object or string\n    }\n  ],\n  // pre-configure presets\n  presets: {\n    // presets use default configurations as their base\n    error: { // default presets are 'error', 'warning', 'success', 'info'\n      title: 'Error!',\n      classes: ['my-error'] // default ['error']\n    }\n  },\n  events: {\n    // Array of functions\n    // First argument is always the notification component\n    'before-close': [\n      function(notify) { \n        // preventClose is checked on close function and reset to false after prevented\n        // it can only be used synchronoushly\n        notify.preventClose = true\n        // to force close use 'close(true)'\n      }\n    ],\n    'destroyed': [], // Fired after destroyed\n    'mounted': [], // Fired after mount\n    'click': [] // Fired when notify is clicked. Second argument is click event\n  }\n})"]},dd78:function(t,e,n){"use strict";var s=n("0981"),i=n.n(s);i.a}});
  //# sourceMappingURL=app.08e025b5.js.map