text: (function(t){function e(e){for(var r,i,s=e[0],u=e[1],c=e[2],l=0,f=[];l<s.length;l++)i=s[l],Object.prototype.hasOwnProperty.call(a,i)&&a[i]&&f.push(a[i][0]),a[i]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(t[r]=u[r]);d&&d(e);while(f.length)f.shift()();return o.push.apply(o,c||[]),n()}function n(){for(var t,e=0;e<o.length;e++){for(var n=o[e],r=!0,i=1;i<n.length;i++){var s=n[i];0!==a[s]&&(r=!1)}r&&(o.splice(e--,1),t=u(u.s=n[0]))}return t}var r={},i={app:0},a={app:0},o=[];function s(t){return u.p+"js/"+({}[t]||t)+"."+{"chunk-2b280eaa":"caa68250","chunk-594d6d48":"92b6657f","chunk-073bf657":"fa8815df","chunk-6b5460af":"c961fd42","chunk-d01f6c98":"09ca9727","chunk-c0b933ac":"6369d1a6","chunk-a98a3a5e":"325d3e15"}[t]+".js"}function u(e){if(r[e])return r[e].exports;var n=r[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,u),n.l=!0,n.exports}u.e=function(t){var e=[],n={"chunk-2b280eaa":1,"chunk-073bf657":1,"chunk-6b5460af":1,"chunk-d01f6c98":1,"chunk-c0b933ac":1,"chunk-a98a3a5e":1};i[t]?e.push(i[t]):0!==i[t]&&n[t]&&e.push(i[t]=new Promise((function(e,n){for(var r="css/"+({}[t]||t)+"."+{"chunk-2b280eaa":"6539624b","chunk-594d6d48":"31d6cfe0","chunk-073bf657":"92647ec0","chunk-6b5460af":"c5ac3915","chunk-d01f6c98":"f7f9318b","chunk-c0b933ac":"0f19b9da","chunk-a98a3a5e":"09ea4c13"}[t]+".css",a=u.p+r,o=document.getElementsByTagName("link"),s=0;s<o.length;s++){var c=o[s],l=c.getAttribute("data-href")||c.getAttribute("href");if("stylesheet"===c.rel&&(l===r||l===a))return e()}var f=document.getElementsByTagName("style");for(s=0;s<f.length;s++){c=f[s],l=c.getAttribute("data-href");if(l===r||l===a)return e()}var d=document.createElement("link");d.rel="stylesheet",d.type="text/css",d.onload=e,d.onerror=function(e){var r=e&&e.target&&e.target.src||a,o=new Error("Loading CSS chunk "+t+" failed.\n("+r+")");o.code="CSS_CHUNK_LOAD_FAILED",o.request=r,delete i[t],d.parentNode.removeChild(d),n(o)},d.href=a;var p=document.getElementsByTagName("head")[0];p.appendChild(d)})).then((function(){i[t]=0})));var r=a[t];if(0!==r)if(r)e.push(r[2]);else{var o=new Promise((function(e,n){r=a[t]=[e,n]}));e.push(r[2]=o);var c,l=document.createElement("script");l.charset="utf-8",l.timeout=120,u.nc&&l.setAttribute("nonce",u.nc),l.src=s(t);var f=new Error;c=function(e){l.onerror=l.onload=null,clearTimeout(d);var n=a[t];if(0!==n){if(n){var r=e&&("load"===e.type?"missing":e.type),i=e&&e.target&&e.target.src;f.message="Loading chunk "+t+" failed.\n("+r+": "+i+")",f.name="ChunkLoadError",f.type=r,f.request=i,n[1](f)}a[t]=void 0}};var d=setTimeout((function(){c({type:"timeout",target:l})}),12e4);l.onerror=l.onload=c,document.head.appendChild(l)}return Promise.all(e)},u.m=t,u.c=r,u.d=function(t,e,n){u.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},u.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},u.t=function(t,e){if(1&e&&(t=u(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(u.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)u.d(n,r,function(e){return t[e]}.bind(null,r));return n},u.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return u.d(e,"a",e),e},u.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},u.p="/",u.oe=function(t){throw console.error(t),t};var c=window["webpackJsonp"]=window["webpackJsonp"]||[],l=c.push.bind(c);c.push=e,c=c.slice();for(var f=0;f<c.length;f++)e(c[f]);var d=l;o.push([0,"chunk-vendors"]),n()})({0:function(t,e,n){t.exports=n("56d7")},"0efd":function(t,e,n){"use strict";var r=n("cd1f"),i=n.n(r);i.a},1597:function(t,e,n){},"4ba2":function(t,e,n){},"56d7":function(t,e,n){"use strict";n.r(e);n("e260"),n("e6cf"),n("cca6"),n("a79d");var r=n("2b0e"),i=n("8c4f"),a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("router-view")},o=[],s={},u=s,c=n("2877"),l=Object(c["a"])(u,a,o,!1,null,null,null),f=l.exports,d=(n("d3b7"),n("96cf"),n("1da1")),p=n("2f62"),m=n("bc3a"),h=n.n(m),g="http://localhost:7000",b={token:localStorage.getItem("token")||"",user:{},user_groups:[],files:[],status:"",error:null},v={isLoggedIn:function(t){return!!t.token},authState:function(t){return t.status},user:function(t){return t.user},user_groups:function(t){return t.user_groups},files:function(t){return t.files},error:function(t){return t.error}},k={login:function(t,e){return Object(d["a"])(regeneratorRuntime.mark((function n(){var r,i,a,o;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return r=t.commit,r("auth_request"),n.prev=2,n.next=5,h.a.post("".concat(g,"/api/login"),e);case 5:return i=n.sent,i.data.success&&(a=i.data.token,o=i.data.user,localStorage.setItem("token",a),h.a.defaults.headers.common["Authorization"]=a,r("auth_success",a,o)),n.abrupt("return",i);case 10:n.prev=10,n.t0=n["catch"](2),r("auth_error",n.t0);case 13:case"end":return n.stop()}}),n,null,[[2,10]])})))()},loginAmazon:function(t){return Object(d["a"])(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.commit,n("auth_request"),e.prev=2,e.next=5,h.a.get("".concat(g,"/api/login/amazon"));case 5:return r=e.sent,e.abrupt("return",r);case 9:e.prev=9,e.t0=e["catch"](2),n("auth_error",e.t0);case 12:case"end":return e.stop()}}),e,null,[[2,9]])})))()},register:function(t,e){return Object(d["a"])(regeneratorRuntime.mark((function n(){var r,i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return r=t.commit,n.prev=1,r("register_request"),n.next=5,h.a.post("".concat(g,"/api/register"),e);case 5:return i=n.sent,void 0!==i.data.success&&r("register_success"),n.abrupt("return",i);case 10:n.prev=10,n.t0=n["catch"](1),r("register_error",n.t0);case 13:case"end":return n.stop()}}),n,null,[[1,10]])})))()},getProfile:function(t){return Object(d["a"])(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.commit,n("profile_request"),e.next=4,h.a.get("".concat(g,"/api/profile"));case 4:return r=e.sent,n("user_profile",r.data.user),e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})))()},getUserGroups:function(t){return Object(d["a"])(regeneratorRuntime.mark((function e(){var n,r,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.commit,r=t.state,n("group_request"),e.next=4,h.a.post("".concat(g,"/api/groups"),{id:r.user._id});case 4:return i=e.sent,n("user_groups",i.data),e.abrupt("return",i);case 7:case"end":return e.stop()}}),e)})))()},getFiles:function(t){return Object(d["a"])(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.commit,t.state,n("file_request"),e.next=4,h.a.get("".concat(g,"/api/files"));case 4:return r=e.sent,localStorage.setItem("files",JSON.stringify(r.data)),n("files",r.data),e.abrupt("return",r);case 8:case"end":return e.stop()}}),e)})))()},getLocalFiles:function(t){return Object(d["a"])(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.commit,t.state,n("file_request"),e.next=4,JSON.parse(localStorage.getItem("files"));case 4:return r=e.sent,n("files",r),e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})))()},setFiles:function(t,e){return Object(d["a"])(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return r=t.commit,t.state,r("file_request"),localStorage.setItem("files",JSON.stringify(e)),r("files",e),n.abrupt("return",e);case 5:case"end":return n.stop()}}),n)})))()},logout:function(t){return Object(d["a"])(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.commit,e.next=3,localStorage.removeItem("token");case 3:return n("logout"),delete h.a.defaults.headers.common["Authorization"],router.push("/login"),e.abrupt("return");case 7:case"end":return e.stop()}}),e)})))()}},y={auth_request:function(t){t.error=null,t.status="loading"},auth_success:function(t,e,n){t.token=e,t.user=n,t.status="success",t.error=null},auth_error:function(t,e){t.error=e.response.data.msg},register_request:function(t){t.error=null,t.status="loading"},register_success:function(t){t.error=null,t.status="success"},register_error:function(t,e){t.error=e.response.data.msg},logout:function(t){t.error=null,t.status="",t.token="",t.user=""},profile_request:function(t){t.status="loading"},group_request:function(t){t.status="loading"},file_request:function(t){t.status="loading"},user_profile:function(t,e){t.user=e},user_groups:function(t,e){t.user_groups=e},files:function(t,e){t.files=e}},_={state:b,actions:k,mutations:y,getters:v};r["default"].use(p["a"]);var w=new p["a"].Store({modules:{Auth:_},state:{},mutations:{},actions:{}}),S=[{path:"/",name:"login",component:function(){return Promise.all([n.e("chunk-2b280eaa"),n.e("chunk-6b5460af")]).then(n.bind(null,"013f"))},meta:{requiresGuest:!0}},{path:"/dashboard",name:"Dashboard",component:function(){return Promise.all([n.e("chunk-2b280eaa"),n.e("chunk-594d6d48"),n.e("chunk-073bf657")]).then(n.bind(null,"ec95"))},meta:{requiresAuth:!0}},{path:"/new-snippet",name:"New Snippet",component:function(){return Promise.all([n.e("chunk-d01f6c98"),n.e("chunk-594d6d48"),n.e("chunk-c0b933ac")]).then(n.bind(null,"c9e6"))},meta:{requiresAuth:!0}},{path:"/existing-snippet",name:"Existing Snippets",component:function(){return Promise.all([n.e("chunk-d01f6c98"),n.e("chunk-a98a3a5e")]).then(n.bind(null,"56bb"))},meta:{requiresAuth:!0}}],x=S,O=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.closeDropDown,expression:"closeDropDown"}],staticClass:"dropdown",class:{open:t.isOpen},on:{click:t.toggleDropDown}},[t._t("title",[n("a",{staticClass:"dropdown-toggle",attrs:{"data-toggle":"dropdown",href:"javascript:void(0)"}},[n("i",{class:t.icon}),n("p",{staticClass:"notification"},[t._v(" "+t._s(t.title)+" "),n("b",{staticClass:"caret"})])])]),t._t("default")],2)},j=[],C={name:"drop-down",props:{title:String,icon:String},data:function(){return{isOpen:!1}},methods:{toggleDropDown:function(){this.isOpen=!this.isOpen},closeDropDown:function(){this.isOpen=!1}}},A=C,$=Object(c["a"])(A,O,j,!1,null,null,null),P=$.exports,N={install:function(t){t.component("drop-down",P)}},q=N,E=n("c7db"),R={install:function(t){t.directive("click-outside",E["directive"])}},D=R,I=n("43f9"),L=n.n(I),T=(n("43f4"),n("1597"),n("54ba"),{install:function(t){t.use(L.a)}}),z=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"sidebar",style:t.sidebarStyle,attrs:{"data-color":t.sidebarItemColor,"data-image":t.sidebarBackgroundImage}},[n("div",{staticClass:"logo"},[n("a",{staticClass:"simple-text logo-mini",attrs:{href:"#"}},[n("div",{staticClass:"logo-img"},[n("img",{attrs:{src:t.imgLogo,alt:""}})])]),n("a",{staticClass:"simple-text logo-normal",attrs:{href:"https://www.creative-tim.com/product/vue-material-dashboard",target:"_blank"}},[t._v(" "+t._s(t.title)+" ")])]),n("div",{staticClass:"sidebar-wrapper"},[t._t("content"),n("md-list",{staticClass:"nav"},[t._t("default",t._l(t.sidebarLinks,(function(t,e){return n("sidebar-link",{key:t.name+e,attrs:{to:t.path,link:t}})})))],2)],2)])},M=[],B=(n("c975"),function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("li",{staticClass:"md-list-item"},[n("router-link",t._b({staticClass:"md-list-item-router md-list-item-container md-button-clean",on:{click:t.hideSidebar}},"router-link",t.$attrs,!1),[n("div",{staticClass:"md-list-item-content md-ripple"},[t._t("default",[n("md-icon",[t._v(t._s(t.link.icon))]),n("p",[t._v(t._s(t.link.name))])])],2)])],1)}),H=[],J={inject:{autoClose:{default:!0}},props:{link:{type:[String,Object],default:function(){return{name:"",path:"",icon:""}}},tag:{type:String,default:"router-link"}},methods:{hideSidebar:function(){this.autoClose&&this.$sidebar&&!0===this.$sidebar.showSidebar&&this.$sidebar.displaySidebar(!1)}}},F=J,G=Object(c["a"])(F,B,H,!1,null,null,null),U=G.exports,K={components:{SidebarLink:U},props:{title:{type:String,default:"Vue MD"},sidebarBackgroundImage:{type:String,default:n("9524")},imgLogo:{type:String,default:n("fdbc")},sidebarItemColor:{type:String,default:"dodger-blue",validator:function(t){var e=["","dodger-blue","purple","blue","green","orange","red"];return-1!==e.indexOf(t)}},sidebarLinks:{type:Array,default:function(){return[]}},autoClose:{type:Boolean,default:!0}},provide:function(){return{autoClose:this.autoClose}},computed:{sidebarStyle:function(){return{backgroundImage:"url(".concat(this.sidebarBackgroundImage,")")}}}},V=K,Q=(n("0efd"),Object(c["a"])(V,z,M,!1,null,null,null)),W=Q.exports,X={showSidebar:!1,displaySidebar:function(t){this.showSidebar=t}},Y={install:function(t){t.mixin({data:function(){return{sidebarStore:X}}}),Object.defineProperty(t.prototype,"$sidebar",{get:function(){return this.$root.sidebarStore}}),t.component("side-bar",W),t.component("sidebar-link",U)}},Z=Y,tt=(n("c740"),n("4160"),n("a434"),n("159b"),function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"notifications"},[n("transition-group",{attrs:{name:"list"}},t._l(t.notifications,(function(e){return n("notification",{key:e.timestamp.getTime(),attrs:{message:e.message,icon:e.icon,type:e.type,timestamp:e.timestamp,"vertical-align":e.verticalAlign,"horizontal-align":e.horizontalAlign},on:{"on-close":t.removeNotification}})})),1)],1)}),et=[],nt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"alert open alert-with-icon",class:[t.verticalAlign,t.horizontalAlign,t.alertType],style:t.customPosition,attrs:{"data-notify":"container",role:"alert","data-notify-position":"top-center"},on:{click:function(e){return t.close()}}},[n("button",{staticClass:"close",attrs:{type:"button","aria-hidden":"true","data-notify":"dismiss"},on:{click:t.close}},[t._v(" × ")]),n("i",{staticClass:"material-icons",attrs:{"data-notify":"icon"}},[t._v(t._s(t.icon))]),n("span",{attrs:{"data-notify":"message"},domProps:{innerHTML:t._s(t.message)}})])},rt=[],it=(n("4de4"),n("a9e3"),{name:"notification",props:{message:String,icon:String,verticalAlign:{type:String,default:"top"},horizontalAlign:{type:String,default:"center"},type:{type:String,default:"info"},timeout:{type:Number,default:2500},timestamp:{type:Date,default:function(){return new Date}}},data:function(){return{elmHeight:0}},computed:{hasIcon:function(){return this.icon&&this.icon.length>0},alertType:function(){return"alert-".concat(this.type)},customPosition:function(){var t=this,e=20,n=this.elmHeight+10,r=this.$notifications.state.filter((function(e){return e.horizontalAlign===t.horizontalAlign&&e.verticalAlign===t.verticalAlign&&e.timestamp<=t.timestamp})).length,i=(r-1)*n+e,a={};return"top"===this.verticalAlign?a.top="".concat(i,"px"):a.bottom="".concat(i,"px"),a}},methods:{close:function(){this.$emit("on-close",this.timestamp)}},mounted:function(){this.elmHeight=this.$el.clientHeight,this.timeout&&setTimeout(this.close,this.timeout)}}),at=it,ot=(n("7b35"),Object(c["a"])(at,nt,rt,!1,null,"3b98be06",null)),st=ot.exports,ut={components:{Notification:st},data:function(){return{notifications:this.$notifications.state}},methods:{removeNotification:function(t){this.$notifications.removeNotification(t)}}},ct=ut,lt=(n("6ae5"),Object(c["a"])(ct,tt,et,!1,null,null,null)),ft=lt.exports,dt={state:[],removeNotification:function(t){var e=this.state.findIndex((function(e){return e.timestamp===t}));-1!==e&&this.state.splice(e,1)},addNotification:function(t){t.timestamp=new Date,t.timestamp.setMilliseconds(t.timestamp.getMilliseconds()+this.state.length),this.state.push(t)},notify:function(t){var e=this;Array.isArray(t)?t.forEach((function(t){e.addNotification(t)})):this.addNotification(t)}},pt={install:function(t){t.mixin({data:function(){return{notificationStore:dt}},methods:{notify:function(t){this.notificationStore.notify(t)}}}),Object.defineProperty(t.prototype,"$notify",{get:function(){return this.$root.notify}}),Object.defineProperty(t.prototype,"$notifications",{get:function(){return this.$root.notificationStore}}),t.component("Notifications",ft)}},mt=pt;r["default"].config.productionTip=!1,r["default"].prototype.$http=h.a;var ht=localStorage.getItem("token");ht&&(r["default"].prototype.$http.defaults.headers.common["Authorization"]=ht);var gt=new i["a"]({routes:x,linkExactActiveClass:"nav-item active"});r["default"].use(i["a"]),r["default"].use(q),r["default"].use(D),r["default"].use(T),r["default"].use(Z),r["default"].use(mt),new r["default"]({el:"#app",router:gt,store:w,render:function(t){return t(f)},data:{}})},"6ae5":function(t,e,n){"use strict";var r=n("b5b2"),i=n.n(r);i.a},"7b35":function(t,e,n){"use strict";var r=n("4ba2"),i=n.n(r);i.a},9524:function(t,e,n){t.exports=n.p+"img/sidebar-2.32103624.jpg"},b5b2:function(t,e,n){},cd1f:function(t,e,n){},fdbc:function(t,e,n){t.exports=n.p+"img/vue-logo.c2a605fb.png"}});
  //# sourceMappingURL=app.21f6279c.js.map