diff --git a/.babelrc b/.babelrc index e112f64..a178fba 100644 --- a/.babelrc +++ b/.babelrc @@ -12,6 +12,7 @@ "transform-object-rest-spread", "syntax-class-properties", "transform-class-properties", + "transform-async-to-generator", "react-hot-loader/babel", ["module-resolver", { "root": ["./src"], diff --git a/.gitignore b/.gitignore index c33a3c8..062b759 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,8 @@ logs *.log +dist/* + # Runtime data pids *.pid diff --git a/app.js b/app.js index 2a71934..afba95e 100644 --- a/app.js +++ b/app.js @@ -18,6 +18,8 @@ if (process.env.NODE_ENV !== 'dist') { historyApiFallback: true })) + app.use('/favicon.ico', express.static(path.join(__dirname, 'src/static/favicon.ico'))) + app.use(webpackHotMiddleware(compiler, { log: console.log, path: '/__webpack_hmr', diff --git a/cfg/base.js b/cfg/base.js index ea5a520..5816a18 100644 --- a/cfg/base.js +++ b/cfg/base.js @@ -1,27 +1,32 @@ const path = require('path') const webpack = require('webpack') +const CopyWebpackPlugin = require('copy-webpack-plugin') const env = process.env.REACT_WEBPACK_ENV let constants try { constants = require(`./${env}.const`) -} catch (ex) { // TODO: Catch only file not found. - console.log(`${env}.const not found.`, ex) - constants = require('./defaultConstants') +} catch (ex) { + if (ex.code && ex.code === 'MODULE_NOT_FOUND') { + console.log(`${env}.const not found. Falling back to defaultConstants.`) + constants = require('./defaultConstants') + } else { + throw new Error(`Unknown error while loading ${env}.const. ${ex}`) + } } -const srcPath = path.join(__dirname, '/../src') +const siaRoot = path.join(__dirname, '..') const publicPath = '/assets/' const config = { entry: { app: ['babel-polyfill'], - appInsights: path.join(srcPath, 'appInsights') + appInsights: path.join(siaRoot, 'src/appInsights') }, devtool: 'eval', output: { - path: path.join(__dirname, '/../dist/assets'), + path: path.join(siaRoot, 'dist/assets'), filename: '[name].js', publicPath: publicPath }, @@ -33,15 +38,7 @@ const config = { noInfo: false }, resolve: { - extensions: ['.js'], - alias: { - actions: `${srcPath}/actions/`, - sources: `${srcPath}/sources/`, - stores: `${srcPath}/stores/`, - styles: `${srcPath}/styles/`, - config: `${srcPath}/config/`, - 'react/lib/ReactMount': 'react-dom/lib/ReactMount' - } + extensions: ['.js'] }, module: { rules: [ @@ -85,7 +82,15 @@ const config = { 'process.env.NODE_ENV': `"${env}"`, 'constants': JSON.stringify(constants) }), - new webpack.ContextReplacementPlugin(/moment[/\\]locale$/, /de/) + new webpack.ContextReplacementPlugin(/moment[/\\]locale$/, /de/), + new CopyWebpackPlugin([ + { from: path.join(siaRoot, 'src/extensionHooks/manifest.json'), to: path.join(siaRoot, 'dist') }, + { from: path.join(siaRoot, 'src/static'), to: path.join(siaRoot, 'dist/static') }, + { from: path.join(siaRoot, 'src/static/favicon.ico'), to: path.join(siaRoot, 'dist') }, + { from: path.join(siaRoot, 'src/extensionHooks/extension.html'), to: path.join(siaRoot, 'dist') }, + { from: path.join(siaRoot, 'src/index.html'), to: path.join(siaRoot, 'dist') } + ], + { copyUnmodified: true }) ] } diff --git a/cfg/defaultConstants.js b/cfg/defaultConstants.js index 7c1d8ea..7bfcbee 100644 --- a/cfg/defaultConstants.js +++ b/cfg/defaultConstants.js @@ -4,6 +4,8 @@ module.exports = { baseUrl: 'http://localhost:50000/', + eventUiUrl: 'http://localhost:3000/', + authRedirectUri: 'http://localhost:3000/', retries: 2, @@ -42,6 +44,6 @@ module.exports = { }, instrumentationKey: 'APP INSIGHT GOES HERE', - + useAppInsights: false -} \ No newline at end of file +} diff --git a/dist/README.md b/dist/README.md deleted file mode 100644 index 0d138c2..0000000 --- a/dist/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# About the dist folder -After building the dist version of your project, the generated files are stored in this folder. You should keep it under version control. diff --git a/dist/assets/012cf6a10129e2275d79d6adac7f3b02.woff b/dist/assets/012cf6a10129e2275d79d6adac7f3b02.woff deleted file mode 100644 index b648a3e..0000000 Binary files a/dist/assets/012cf6a10129e2275d79d6adac7f3b02.woff and /dev/null differ diff --git a/dist/assets/570eb83859dc23dd0eec423a49e147fe.woff2 b/dist/assets/570eb83859dc23dd0eec423a49e147fe.woff2 deleted file mode 100644 index 9fa2112..0000000 Binary files a/dist/assets/570eb83859dc23dd0eec423a49e147fe.woff2 and /dev/null differ diff --git a/dist/assets/a37b0c01c0baf1888ca812cc0508f6e2.ttf b/dist/assets/a37b0c01c0baf1888ca812cc0508f6e2.ttf deleted file mode 100644 index 7015564..0000000 Binary files a/dist/assets/a37b0c01c0baf1888ca812cc0508f6e2.ttf and /dev/null differ diff --git a/dist/assets/app.js b/dist/assets/app.js deleted file mode 100644 index 575bfa4..0000000 --- a/dist/assets/app.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/assets/",n(n.s=410)}([function(e,t,n){"use strict";e.exports=n(614)},function(e,t,n){var o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=n(728)(function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},!0)},function(e,t,n){var o=n(13),r=n(45),i=n(31),a=n(32),l=n(40),s=function(e,t,n){var u,c,d,f,p=e&s.F,m=e&s.G,h=e&s.S,y=e&s.P,v=e&s.B,g=m?o:h?o[t]||(o[t]={}):(o[t]||{}).prototype,_=m?r:r[t]||(r[t]={}),b=_.prototype||(_.prototype={});for(u in m&&(n=t),n)d=((c=!p&&g&&void 0!==g[u])?g:n)[u],f=v&&c?l(d,o):y&&"function"==typeof d?l(Function.call,d):d,g&&a(g,u,d,e&s.U),_[u]!=d&&i(_,u,f),y&&b[u]!=d&&(b[u]=d)};o.core=r,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";t.__esModule=!0;var o,r=n(214),i=(o=r)&&o.__esModule?o:{default:o};t.default=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={easeOutFunction:"cubic-bezier(0.23, 1, 0.32, 1)",easeInOutFunction:"cubic-bezier(0.445, 0.05, 0.55, 0.95)",easeOut:function(e,t,n,o){if(o=o||this.easeOutFunction,t&&"[object Array]"===Object.prototype.toString.call(t)){for(var r="",i=0;i2?o-2:0);for(var r=2;r0?r(o(e),9007199254740991):0}},function(e,t,n){var o=n(47);e.exports=function(e){return Object(o(e))}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){var n=e.exports={version:"2.5.3"};"number"==typeof __e&&(__e=n)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,r=n(847),i=(o=r)&&o.__esModule?o:{default:o};t.default=i.default},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var o=n(23),r=n(66);e.exports=n(22)?function(e,t,n){return o.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var o=n(13),r=n(31),i=n(30),a=n(67)("src"),l=Function.toString,s=(""+l).split("toString");n(45).inspectSource=function(e){return l.call(e)},(e.exports=function(e,t,n,l){var u="function"==typeof n;u&&(i(n,"name")||r(n,"name",t)),e[t]!==n&&(u&&(i(n,a)||r(n,a,e[t]?""+e[t]:s.join(String(t)))),e===o?e[t]=n:l?e[t]?e[t]=n:r(e,t,n):(delete e[t],r(e,t,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[a]||l.call(this)})},function(e,t,n){var o=n(2),r=n(15),i=n(47),a=/"/g,l=function(e,t,n,o){var r=String(i(e)),l="<"+t;return""!==n&&(l+=" "+n+'="'+String(o).replace(a,""")+'"'),l+">"+r+""};e.exports=function(e,t){var n={};n[e]=t(l),o(o.P+o.F*r(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}),"String",n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=n(1),i=(o=r)&&o.__esModule?o:{default:o};var a=i.default.oneOf(["left","middle","right"]),l=i.default.oneOf(["top","center","bottom"]);t.default={corners:i.default.oneOf(["bottom-left","bottom-right","top-left","top-right"]),horizontal:a,vertical:l,origin:i.default.shape({horizontal:a,vertical:l}),cornersAndCenter:i.default.oneOf(["bottom-center","bottom-left","bottom-right","top-center","top-left","top-right"]),stringOrNumber:i.default.oneOfType([i.default.string,i.default.number]),zDepth:i.default.oneOf([0,1,2,3,4,5])}},function(e,t,n){var o=n(104),r=n(47);e.exports=function(e){return o(r(e))}},function(e,t,n){var o=n(105),r=n(66),i=n(35),a=n(46),l=n(30),s=n(250),u=Object.getOwnPropertyDescriptor;t.f=n(22)?u:function(e,t){if(e=i(e),t=a(t,!0),s)try{return u(e,t)}catch(e){}if(l(e,t))return r(!o.f.call(e,t),e[t])}},function(e,t,n){var o=n(30),r=n(25),i=n(163)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=r(e),o(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){"use strict";e.exports=function(e,t,n,o,r,i,a,l){if(void 0===t)throw new Error("invariant requires an error message argument");if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,o,r,i,a,l],c=0;(s=new Error(t.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation"}throw s.framesToPop=1,s}}},function(e,t){var n=(t=e.exports=function(e){if(e&&"object"==typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"==typeof e)return i[e];var r,a=String(e);return(r=n[a.toLowerCase()])?r:(r=o[a.toLowerCase()])||(1===a.length?a.charCodeAt(0):void 0)}).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},o=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(r=97;r<123;r++)n[String.fromCharCode(r)]=r-32;for(var r=48;r<58;r++)n[r-48]=r;for(r=1;r<13;r++)n["f"+r]=r+111;for(r=0;r<10;r++)n["numpad "+r]=r+96;var i=t.names=t.title={};for(r in n)i[n[r]]=r;for(var a in o)n[a]=o[a]},function(e,t,n){var o=n(26);e.exports=function(e,t,n){if(o(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,o){return e.call(t,n,o)};case 3:return function(n,o,r){return e.call(t,n,o,r)}}return function(){return e.apply(t,arguments)}}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){"use strict";var o=n(15);e.exports=function(e,t){return!!e&&o(function(){t?e.call(null,function(){},1):e.call(null)})}},function(e,t,n){var o=n(211)("wks"),r=n(148),i=n(62).Symbol,a="function"==typeof i;(e.exports=function(e){return o[e]||(o[e]=a&&i[e]||(a?i:r)("Symbol."+e))}).store=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=g(n(9)),r=g(n(10)),i=g(n(5)),a=g(n(3)),l=g(n(4)),s=g(n(6)),u=g(n(7)),c=g(n(8)),d=n(0),f=g(d),p=g(n(1)),m=g(n(154)),h=g(n(39)),y=g(n(234)),v=g(n(357));function g(e){return e&&e.__esModule?e:{default:e}}var _=!1,b=!1,S=!1;var E=function(e){function t(){var e,n,o,r;(0,a.default)(this,t);for(var l=arguments.length,u=Array(l),c=0;c0?o:n)(e)}},function(e,t,n){var o=n(2),r=n(45),i=n(15);e.exports=function(e,t){var n=(r.Object||{})[e]||Object[e],a={};a[e]=t(n),o(o.S+o.F*i(function(){n(1)}),"Object",a)}},function(e,t,n){var o=n(40),r=n(104),i=n(25),a=n(24),l=n(180);e.exports=function(e,t){var n=1==e,s=2==e,u=3==e,c=4==e,d=6==e,f=5==e||d,p=t||l;return function(t,l,m){for(var h,y,v=i(t),g=r(v),_=o(l,m,3),b=a(g.length),S=0,E=n?p(t,b):s?p(t,0):void 0;b>S;S++)if((f||S in g)&&(y=_(h=g[S],S,v),e))if(n)E[S]=y;else if(y)switch(e){case 3:return!0;case 5:return h;case 6:return S;case 2:E.push(h)}else if(c)return!1;return d?-1:u||c?c:E}}},function(e,t,n){(function(e){var t;t=function(){"use strict";var t,o;function r(){return t.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function l(e){return void 0===e}function s(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function c(e,t){var n,o=[];for(n=0;n>>0,o=0;o0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+o}var H=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,z=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,B={},W={};function q(e,t,n,o){var r=o;"string"==typeof o&&(r=function(){return this[o]()}),e&&(W[e]=r),t&&(W[t[0]]=function(){return F(r.apply(this,arguments),t[1],t[2])}),n&&(W[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function G(e,t){return e.isValid()?(t=Y(t,e.localeData()),B[t]=B[t]||function(e){var t,n,o,r=e.match(H);for(t=0,n=r.length;t=0&&z.test(e);)e=e.replace(z,o),z.lastIndex=0,n-=1;return e}var V=/\d/,K=/\d\d/,X=/\d{3}/,J=/\d{4}/,$=/[+-]?\d{6}/,Q=/\d\d?/,Z=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,ne=/\d{1,4}/,oe=/[+-]?\d{1,6}/,re=/\d+/,ie=/[+-]?\d+/,ae=/Z|[+-]\d\d:?\d\d/gi,le=/Z|[+-]\d\d(?::?\d\d)?/gi,se=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ue={};function ce(e,t,n){ue[e]=x(t)?t:function(e,o){return e&&n?n:t}}function de(e,t){return d(ue,e)?ue[e](t._strict,t._locale):new RegExp(fe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,o,r){return t||n||o||r})))}function fe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var pe={};function me(e,t){var n,o=t;for("string"==typeof e&&(e=[e]),s(t)&&(o=function(e,n){n[t]=T(e)}),n=0;n68?1900:2e3)};var ke,Ae=xe("FullYear",!0);function xe(e,t){return function(n){return null!=n?(Me(this,e,n),r.updateOffset(this,t),this):Re(this,e)}}function Re(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Me(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&Oe(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Pe(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Pe(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,o=(t%(n=12)+n)%n;return e+=(t-o)/12,1===o?Oe(e)?29:28:31-o%7%2}ke=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function We(e,t,n){var o=7+t-n;return-((7+Be(e,0,o).getUTCDay()-t)%7)+o-1}function qe(e,t,n,o,r){var i,a,l=1+7*(t-1)+(7+n-o)%7+We(e,o,r);return l<=0?a=Ie(i=e-1)+l:l>Ie(e)?(i=e+1,a=l-Ie(e)):(i=e,a=l),{year:i,dayOfYear:a}}function Ge(e,t,n){var o,r,i=We(e.year(),t,n),a=Math.floor((e.dayOfYear()-i-1)/7)+1;return a<1?o=a+Ye(r=e.year()-1,t,n):a>Ye(e.year(),t,n)?(o=a-Ye(e.year(),t,n),r=e.year()+1):(r=e.year(),o=a),{week:o,year:r}}function Ye(e,t,n){var o=We(e,t,n),r=We(e+1,t,n);return(Ie(e)-o+r)/7}q("w",["ww",2],"wo","week"),q("W",["WW",2],"Wo","isoWeek"),D("week","w"),D("isoWeek","W"),N("week",5),N("isoWeek",5),ce("w",Q),ce("ww",Q,K),ce("W",Q),ce("WW",Q,K),he(["w","ww","W","WW"],function(e,t,n,o){t[o.substr(0,1)]=T(e)});q("d",0,"do","day"),q("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),q("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),q("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),q("e",0,0,"weekday"),q("E",0,0,"isoWeekday"),D("day","d"),D("weekday","e"),D("isoWeekday","E"),N("day",11),N("weekday",11),N("isoWeekday",11),ce("d",Q),ce("e",Q),ce("E",Q),ce("dd",function(e,t){return t.weekdaysMinRegex(e)}),ce("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ce("dddd",function(e,t){return t.weekdaysRegex(e)}),he(["dd","ddd","dddd"],function(e,t,n,o){var r=n._locale.weekdaysParse(e,o,n._strict);null!=r?t.d=r:m(n).invalidWeekday=e}),he(["d","e","E"],function(e,t,n,o){t[o]=T(e)});var Ve="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Ke="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Xe="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var Je=se;var $e=se;var Qe=se;function Ze(){function e(e,t){return t.length-e.length}var t,n,o,r,i,a=[],l=[],s=[],u=[];for(t=0;t<7;t++)n=p([2e3,1]).day(t),o=this.weekdaysMin(n,""),r=this.weekdaysShort(n,""),i=this.weekdays(n,""),a.push(o),l.push(r),s.push(i),u.push(o),u.push(r),u.push(i);for(a.sort(e),l.sort(e),s.sort(e),u.sort(e),t=0;t<7;t++)l[t]=fe(l[t]),s[t]=fe(s[t]),u[t]=fe(u[t]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function et(){return this.hours()%12||12}function tt(e,t){q(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function nt(e,t){return t._meridiemParse}q("H",["HH",2],0,"hour"),q("h",["hh",2],0,et),q("k",["kk",2],0,function(){return this.hours()||24}),q("hmm",0,0,function(){return""+et.apply(this)+F(this.minutes(),2)}),q("hmmss",0,0,function(){return""+et.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)}),q("Hmm",0,0,function(){return""+this.hours()+F(this.minutes(),2)}),q("Hmmss",0,0,function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)}),tt("a",!0),tt("A",!1),D("hour","h"),N("hour",13),ce("a",nt),ce("A",nt),ce("H",Q),ce("h",Q),ce("k",Q),ce("HH",Q,K),ce("hh",Q,K),ce("kk",Q,K),ce("hmm",Z),ce("hmmss",ee),ce("Hmm",Z),ce("Hmmss",ee),me(["H","HH"],be),me(["k","kk"],function(e,t,n){var o=T(e);t[be]=24===o?0:o}),me(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),me(["h","hh"],function(e,t,n){t[be]=T(e),m(n).bigHour=!0}),me("hmm",function(e,t,n){var o=e.length-2;t[be]=T(e.substr(0,o)),t[Se]=T(e.substr(o)),m(n).bigHour=!0}),me("hmmss",function(e,t,n){var o=e.length-4,r=e.length-2;t[be]=T(e.substr(0,o)),t[Se]=T(e.substr(o,2)),t[Ee]=T(e.substr(r)),m(n).bigHour=!0}),me("Hmm",function(e,t,n){var o=e.length-2;t[be]=T(e.substr(0,o)),t[Se]=T(e.substr(o))}),me("Hmmss",function(e,t,n){var o=e.length-4,r=e.length-2;t[be]=T(e.substr(0,o)),t[Se]=T(e.substr(o,2)),t[Ee]=T(e.substr(r))});var ot,rt=xe("Hours",!0),it={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ue,monthsShort:je,week:{dow:0,doy:6},weekdays:Ve,weekdaysMin:Xe,weekdaysShort:Ke,meridiemParse:/[ap]\.?m?\.?/i},at={},lt={};function st(e){return e?e.toLowerCase().replace("_","-"):e}function ut(t){var o=null;if(!at[t]&&void 0!==e&&e&&e.exports)try{o=ot._abbr;n(675)("./"+t),ct(o)}catch(e){}return at[t]}function ct(e,t){var n;return e&&(n=l(t)?ft(e):dt(e,t))&&(ot=n),ot._abbr}function dt(e,t){if(null!==t){var n=it;if(t.abbr=e,null!=at[e])A("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=at[e]._config;else if(null!=t.parentLocale){if(null==at[t.parentLocale])return lt[t.parentLocale]||(lt[t.parentLocale]=[]),lt[t.parentLocale].push({name:e,config:t}),null;n=at[t.parentLocale]._config}return at[e]=new M(R(n,t)),lt[e]&<[e].forEach(function(e){dt(e.name,e.config)}),ct(e),at[e]}return delete at[e],null}function ft(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ot;if(!i(e)){if(t=ut(e))return t;e=[e]}return function(e){for(var t,n,o,r,i=0;i0;){if(o=ut(r.slice(0,t).join("-")))return o;if(n&&n.length>=t&&C(r,n,!0)>=t-1)break;t--}i++}return null}(e)}function pt(e){var t,n=e._a;return n&&-2===m(e).overflow&&(t=n[ge]<0||n[ge]>11?ge:n[_e]<1||n[_e]>Pe(n[ve],n[ge])?_e:n[be]<0||n[be]>24||24===n[be]&&(0!==n[Se]||0!==n[Ee]||0!==n[Te])?be:n[Se]<0||n[Se]>59?Se:n[Ee]<0||n[Ee]>59?Ee:n[Te]<0||n[Te]>999?Te:-1,m(e)._overflowDayOfYear&&(t_e)&&(t=_e),m(e)._overflowWeeks&&-1===t&&(t=Ce),m(e)._overflowWeekday&&-1===t&&(t=we),m(e).overflow=t),e}function mt(e,t,n){return null!=e?e:null!=t?t:n}function ht(e){var t,n,o,i,a,l=[];if(!e._d){for(o=function(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[_e]&&null==e._a[ge]&&function(e){var t,n,o,r,i,a,l,s;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)i=1,a=4,n=mt(t.GG,e._a[ve],Ge(xt(),1,4).year),o=mt(t.W,1),((r=mt(t.E,1))<1||r>7)&&(s=!0);else{i=e._locale._week.dow,a=e._locale._week.doy;var u=Ge(xt(),i,a);n=mt(t.gg,e._a[ve],u.year),o=mt(t.w,u.week),null!=t.d?((r=t.d)<0||r>6)&&(s=!0):null!=t.e?(r=t.e+i,(t.e<0||t.e>6)&&(s=!0)):r=i}o<1||o>Ye(n,i,a)?m(e)._overflowWeeks=!0:null!=s?m(e)._overflowWeekday=!0:(l=qe(n,o,r,i,a),e._a[ve]=l.year,e._dayOfYear=l.dayOfYear)}(e),null!=e._dayOfYear&&(a=mt(e._a[ve],o[ve]),(e._dayOfYear>Ie(a)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),n=Be(a,0,e._dayOfYear),e._a[ge]=n.getUTCMonth(),e._a[_e]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=l[t]=o[t];for(;t<7;t++)e._a[t]=l[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[be]&&0===e._a[Se]&&0===e._a[Ee]&&0===e._a[Te]&&(e._nextDay=!0,e._a[be]=0),e._d=(e._useUTC?Be:function(e,t,n,o,r,i,a){var l=new Date(e,t,n,o,r,i,a);return e<100&&e>=0&&isFinite(l.getFullYear())&&l.setFullYear(e),l}).apply(null,l),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[be]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(m(e).weekdayMismatch=!0)}}var yt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,vt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gt=/Z|[+-]\d\d(?::?\d\d)?/,_t=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],bt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],St=/^\/?Date\((\-?\d+)/i;function Et(e){var t,n,o,r,i,a,l=e._i,s=yt.exec(l)||vt.exec(l);if(s){for(m(e).iso=!0,t=0,n=_t.length;t0&&m(e).unusedInput.push(a),l=l.slice(l.indexOf(n)+n.length),u+=n.length),W[i]?(n?m(e).empty=!1:m(e).unusedTokens.push(i),ye(i,n,e)):e._strict&&!n&&m(e).unusedTokens.push(i);m(e).charsLeftOver=s-u,l.length>0&&m(e).unusedInput.push(l),e._a[be]<=12&&!0===m(e).bigHour&&e._a[be]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[be]=function(e,t,n){var o;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((o=e.isPM(n))&&t<12&&(t+=12),o||12!==t||(t=0),t):t}(e._locale,e._a[be],e._meridiem),ht(e),pt(e)}else It(e);else Et(e)}function kt(e){var t=e._i,n=e._f;return e._locale=e._locale||ft(e._l),null===t||void 0===n&&""===t?y({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),S(t)?new b(pt(t)):(u(t)?e._d=t:i(n)?function(e){var t,n,o,r,i;if(0===e._f.length)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(r=0;rthis?this:e:y()});function Pt(e,t){var n,o;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return xt();for(n=t[0],o=1;o(i=Ye(e,o,r))&&(t=i),function(e,t,n,o,r){var i=qe(e,t,n,o,r),a=Be(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,o,r))}q(0,["gg",2],0,function(){return this.weekYear()%100}),q(0,["GG",2],0,function(){return this.isoWeekYear()%100}),on("gggg","weekYear"),on("ggggg","weekYear"),on("GGGG","isoWeekYear"),on("GGGGG","isoWeekYear"),D("weekYear","gg"),D("isoWeekYear","GG"),N("weekYear",1),N("isoWeekYear",1),ce("G",ie),ce("g",ie),ce("GG",Q,K),ce("gg",Q,K),ce("GGGG",ne,J),ce("gggg",ne,J),ce("GGGGG",oe,$),ce("ggggg",oe,$),he(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,o){t[o.substr(0,2)]=T(e)}),he(["gg","GG"],function(e,t,n,o){t[o]=r.parseTwoDigitYear(e)}),q("Q",0,"Qo","quarter"),D("quarter","Q"),N("quarter",7),ce("Q",V),me("Q",function(e,t){t[ge]=3*(T(e)-1)}),q("D",["DD",2],"Do","date"),D("date","D"),N("date",9),ce("D",Q),ce("DD",Q,K),ce("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),me(["D","DD"],_e),me("Do",function(e,t){t[_e]=T(e.match(Q)[0])});var an=xe("Date",!0);q("DDD",["DDDD",3],"DDDo","dayOfYear"),D("dayOfYear","DDD"),N("dayOfYear",4),ce("DDD",te),ce("DDDD",X),me(["DDD","DDDD"],function(e,t,n){n._dayOfYear=T(e)}),q("m",["mm",2],0,"minute"),D("minute","m"),N("minute",14),ce("m",Q),ce("mm",Q,K),me(["m","mm"],Se);var ln=xe("Minutes",!1);q("s",["ss",2],0,"second"),D("second","s"),N("second",15),ce("s",Q),ce("ss",Q,K),me(["s","ss"],Ee);var sn,un=xe("Seconds",!1);for(q("S",0,0,function(){return~~(this.millisecond()/100)}),q(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),q(0,["SSS",3],0,"millisecond"),q(0,["SSSS",4],0,function(){return 10*this.millisecond()}),q(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),q(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),q(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),q(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),q(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),D("millisecond","ms"),N("millisecond",16),ce("S",te,V),ce("SS",te,K),ce("SSS",te,X),sn="SSSS";sn.length<=9;sn+="S")ce(sn,re);function cn(e,t){t[Te]=T(1e3*("0."+e))}for(sn="S";sn.length<=9;sn+="S")me(sn,cn);var dn=xe("Milliseconds",!1);q("z",0,0,"zoneAbbr"),q("zz",0,0,"zoneName");var fn=b.prototype;function pn(e){return e}fn.add=$t,fn.calendar=function(e,t){var n=e||xt(),o=zt(n,this).startOf("day"),i=r.calendarFormat(this,o)||"sameElse",a=t&&(x(t[i])?t[i].call(this,n):t[i]);return this.format(a||this.localeData().calendar(i,this,xt(n)))},fn.clone=function(){return new b(this)},fn.diff=function(e,t,n){var o,r,i;if(!this.isValid())return NaN;if(!(o=zt(e,this)).isValid())return NaN;switch(r=6e4*(o.utcOffset()-this.utcOffset()),t=U(t)){case"year":i=Zt(this,o)/12;break;case"month":i=Zt(this,o);break;case"quarter":i=Zt(this,o)/3;break;case"second":i=(this-o)/1e3;break;case"minute":i=(this-o)/6e4;break;case"hour":i=(this-o)/36e5;break;case"day":i=(this-o-r)/864e5;break;case"week":i=(this-o-r)/6048e5;break;default:i=this-o}return n?i:E(i)},fn.endOf=function(e){return void 0===(e=U(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},fn.format=function(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=G(this,e);return this.localeData().postformat(t)},fn.from=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||xt(e).isValid())?Yt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},fn.fromNow=function(e){return this.from(xt(),e)},fn.to=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||xt(e).isValid())?Yt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},fn.toNow=function(e){return this.to(xt(),e)},fn.get=function(e){return x(this[e=U(e)])?this[e]():this},fn.invalidAt=function(){return m(this).overflow},fn.isAfter=function(e,t){var n=S(e)?e:xt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=U(l(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()9999?G(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):x(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this._d.valueOf()).toISOString().replace("Z",G(n,"Z")):G(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},fn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',o=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r=t+'[")]';return this.format(n+o+"-MM-DD[T]HH:mm:ss.SSS"+r)},fn.toJSON=function(){return this.isValid()?this.toISOString():null},fn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},fn.unix=function(){return Math.floor(this.valueOf()/1e3)},fn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},fn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},fn.year=Ae,fn.isLeapYear=function(){return Oe(this.year())},fn.weekYear=function(e){return rn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},fn.isoWeekYear=function(e){return rn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},fn.quarter=fn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},fn.month=Ne,fn.daysInMonth=function(){return Pe(this.year(),this.month())},fn.week=fn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},fn.isoWeek=fn.isoWeeks=function(e){var t=Ge(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},fn.weeksInYear=function(){var e=this.localeData()._week;return Ye(this.year(),e.dow,e.doy)},fn.isoWeeksInYear=function(){return Ye(this.year(),1,4)},fn.date=an,fn.day=fn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},fn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},fn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},fn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},fn.hour=fn.hours=rt,fn.minute=fn.minutes=ln,fn.second=fn.seconds=un,fn.millisecond=fn.milliseconds=dn,fn.utcOffset=function(e,t,n){var o,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Ht(le,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(o=Bt(this)),this._offset=e,this._isUTC=!0,null!=o&&this.add(o,"m"),i!==e&&(!t||this._changeInProgress?Jt(this,Yt(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Bt(this)},fn.utc=function(e){return this.utcOffset(0,e)},fn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Bt(this),"m")),this},fn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Ht(ae,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},fn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?xt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},fn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},fn.isLocal=function(){return!!this.isValid()&&!this._isUTC},fn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},fn.isUtc=Wt,fn.isUTC=Wt,fn.zoneAbbr=function(){return this._isUTC?"UTC":""},fn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},fn.dates=I("dates accessor is deprecated. Use date instead.",an),fn.months=I("months accessor is deprecated. Use month instead",Ne),fn.years=I("years accessor is deprecated. Use year instead",Ae),fn.zone=I("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),fn.isDSTShifted=I("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e={};if(g(e,this),(e=kt(e))._a){var t=e._isUTC?p(e._a):xt(e._a);this._isDSTShifted=this.isValid()&&C(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted});var mn=M.prototype;function hn(e,t,n,o){var r=ft(),i=p().set(o,t);return r[n](i,e)}function yn(e,t,n){if(s(e)&&(t=e,e=void 0),e=e||"",null!=t)return hn(e,t,n,"month");var o,r=[];for(o=0;o<12;o++)r[o]=hn(e,o,n,"month");return r}function vn(e,t,n,o){"boolean"==typeof e?(s(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,s(t)&&(n=t,t=void 0),t=t||"");var r,i=ft(),a=e?i._week.dow:0;if(null!=n)return hn(t,(n+a)%7,o,"day");var l=[];for(r=0;r<7;r++)l[r]=hn(t,(r+a)%7,o,"day");return l}mn.calendar=function(e,t,n){var o=this._calendar[e]||this._calendar.sameElse;return x(o)?o.call(t,n):o},mn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},mn.invalidDate=function(){return this._invalidDate},mn.ordinal=function(e){return this._ordinal.replace("%d",e)},mn.preparse=pn,mn.postformat=pn,mn.relativeTime=function(e,t,n,o){var r=this._relativeTime[n];return x(r)?r(e,t,n,o):r.replace(/%d/i,e)},mn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return x(n)?n(t):n.replace(/%s/i,t)},mn.set=function(e){var t,n;for(n in e)x(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},mn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||De).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},mn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[De.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},mn.monthsParse=function(e,t,n){var o,r,i;if(this._monthsParseExact)return function(e,t,n){var o,r,i,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],o=0;o<12;++o)i=p([2e3,o]),this._shortMonthsParse[o]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[o]=this.months(i,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(r=ke.call(this._shortMonthsParse,a))?r:null:-1!==(r=ke.call(this._longMonthsParse,a))?r:null:"MMM"===t?-1!==(r=ke.call(this._shortMonthsParse,a))?r:-1!==(r=ke.call(this._longMonthsParse,a))?r:null:-1!==(r=ke.call(this._longMonthsParse,a))?r:-1!==(r=ke.call(this._shortMonthsParse,a))?r:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),o=0;o<12;o++){if(r=p([2e3,o]),n&&!this._longMonthsParse[o]&&(this._longMonthsParse[o]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[o]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),n||this._monthsParse[o]||(i="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[o]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[o].test(e))return o;if(n&&"MMM"===t&&this._shortMonthsParse[o].test(e))return o;if(!n&&this._monthsParse[o].test(e))return o}},mn.monthsRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||ze.call(this),e?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=He),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},mn.monthsShortRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||ze.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=Fe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},mn.week=function(e){return Ge(e,this._week.dow,this._week.doy).week},mn.firstDayOfYear=function(){return this._week.doy},mn.firstDayOfWeek=function(){return this._week.dow},mn.weekdays=function(e,t){return e?i(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:i(this._weekdays)?this._weekdays:this._weekdays.standalone},mn.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},mn.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},mn.weekdaysParse=function(e,t,n){var o,r,i;if(this._weekdaysParseExact)return function(e,t,n){var o,r,i,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],o=0;o<7;++o)i=p([2e3,1]).day(o),this._minWeekdaysParse[o]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[o]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[o]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(r=ke.call(this._weekdaysParse,a))?r:null:"ddd"===t?-1!==(r=ke.call(this._shortWeekdaysParse,a))?r:null:-1!==(r=ke.call(this._minWeekdaysParse,a))?r:null:"dddd"===t?-1!==(r=ke.call(this._weekdaysParse,a))?r:-1!==(r=ke.call(this._shortWeekdaysParse,a))?r:-1!==(r=ke.call(this._minWeekdaysParse,a))?r:null:"ddd"===t?-1!==(r=ke.call(this._shortWeekdaysParse,a))?r:-1!==(r=ke.call(this._weekdaysParse,a))?r:-1!==(r=ke.call(this._minWeekdaysParse,a))?r:null:-1!==(r=ke.call(this._minWeekdaysParse,a))?r:-1!==(r=ke.call(this._weekdaysParse,a))?r:-1!==(r=ke.call(this._shortWeekdaysParse,a))?r:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),o=0;o<7;o++){if(r=p([2e3,1]).day(o),n&&!this._fullWeekdaysParse[o]&&(this._fullWeekdaysParse[o]=new RegExp("^"+this.weekdays(r,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[o]=new RegExp("^"+this.weekdaysShort(r,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[o]=new RegExp("^"+this.weekdaysMin(r,"").replace(".",".?")+"$","i")),this._weekdaysParse[o]||(i="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[o]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[o].test(e))return o;if(n&&"ddd"===t&&this._shortWeekdaysParse[o].test(e))return o;if(n&&"dd"===t&&this._minWeekdaysParse[o].test(e))return o;if(!n&&this._weekdaysParse[o].test(e))return o}},mn.weekdaysRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Ze.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=Je),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},mn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Ze.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=$e),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},mn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Ze.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Qe),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},mn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},mn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},ct("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===T(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=I("moment.lang is deprecated. Use moment.locale instead.",ct),r.langData=I("moment.langData is deprecated. Use moment.localeData instead.",ft);var gn=Math.abs;function _n(e,t,n,o){var r=Yt(t,n);return e._milliseconds+=o*r._milliseconds,e._days+=o*r._days,e._months+=o*r._months,e._bubble()}function bn(e){return e<0?Math.floor(e):Math.ceil(e)}function Sn(e){return 4800*e/146097}function En(e){return 146097*e/4800}function Tn(e){return function(){return this.as(e)}}var Cn=Tn("ms"),wn=Tn("s"),In=Tn("m"),On=Tn("h"),kn=Tn("d"),An=Tn("w"),xn=Tn("M"),Rn=Tn("y");function Mn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Pn=Mn("milliseconds"),Dn=Mn("seconds"),Un=Mn("minutes"),jn=Mn("hours"),Ln=Mn("days"),Nn=Mn("months"),Fn=Mn("years");var Hn=Math.round,zn={ss:44,s:45,m:45,h:22,d:26,M:11};var Bn=Math.abs;function Wn(e){return(e>0)-(e<0)||+e}function qn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Bn(this._milliseconds)/1e3,o=Bn(this._days),r=Bn(this._months);t=E((e=E(n/60))/60),n%=60,e%=60;var i=E(r/12),a=r%=12,l=o,s=t,u=e,c=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var f=d<0?"-":"",p=Wn(this._months)!==Wn(d)?"-":"",m=Wn(this._days)!==Wn(d)?"-":"",h=Wn(this._milliseconds)!==Wn(d)?"-":"";return f+"P"+(i?p+i+"Y":"")+(a?p+a+"M":"")+(l?m+l+"D":"")+(s||u||c?"T":"")+(s?h+s+"H":"")+(u?h+u+"M":"")+(c?h+c+"S":"")}var Gn=Ut.prototype;return Gn.isValid=function(){return this._isValid},Gn.abs=function(){var e=this._data;return this._milliseconds=gn(this._milliseconds),this._days=gn(this._days),this._months=gn(this._months),e.milliseconds=gn(e.milliseconds),e.seconds=gn(e.seconds),e.minutes=gn(e.minutes),e.hours=gn(e.hours),e.months=gn(e.months),e.years=gn(e.years),this},Gn.add=function(e,t){return _n(this,e,t,1)},Gn.subtract=function(e,t){return _n(this,e,t,-1)},Gn.as=function(e){if(!this.isValid())return NaN;var t,n,o=this._milliseconds;if("month"===(e=U(e))||"year"===e)return t=this._days+o/864e5,n=this._months+Sn(t),"month"===e?n:n/12;switch(t=this._days+Math.round(En(this._months)),e){case"week":return t/7+o/6048e5;case"day":return t+o/864e5;case"hour":return 24*t+o/36e5;case"minute":return 1440*t+o/6e4;case"second":return 86400*t+o/1e3;case"millisecond":return Math.floor(864e5*t)+o;default:throw new Error("Unknown unit "+e)}},Gn.asMilliseconds=Cn,Gn.asSeconds=wn,Gn.asMinutes=In,Gn.asHours=On,Gn.asDays=kn,Gn.asWeeks=An,Gn.asMonths=xn,Gn.asYears=Rn,Gn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*T(this._months/12):NaN},Gn._bubble=function(){var e,t,n,o,r,i=this._milliseconds,a=this._days,l=this._months,s=this._data;return i>=0&&a>=0&&l>=0||i<=0&&a<=0&&l<=0||(i+=864e5*bn(En(l)+a),a=0,l=0),s.milliseconds=i%1e3,e=E(i/1e3),s.seconds=e%60,t=E(e/60),s.minutes=t%60,n=E(t/60),s.hours=n%24,l+=r=E(Sn(a+=E(n/24))),a-=bn(En(r)),o=E(l/12),l%=12,s.days=a,s.months=l,s.years=o,this},Gn.clone=function(){return Yt(this)},Gn.get=function(e){return e=U(e),this.isValid()?this[e+"s"]():NaN},Gn.milliseconds=Pn,Gn.seconds=Dn,Gn.minutes=Un,Gn.hours=jn,Gn.days=Ln,Gn.weeks=function(){return E(this.days()/7)},Gn.months=Nn,Gn.years=Fn,Gn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var o=Yt(e).abs(),r=Hn(o.as("s")),i=Hn(o.as("m")),a=Hn(o.as("h")),l=Hn(o.as("d")),s=Hn(o.as("M")),u=Hn(o.as("y")),c=r<=zn.ss&&["s",r]||r0,c[4]=n,function(e,t,n,o,r){return r.relativeTime(t||1,!!n,e,o)}.apply(null,c)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},Gn.toISOString=qn,Gn.toString=qn,Gn.toJSON=qn,Gn.locale=en,Gn.localeData=nn,Gn.toIsoString=I("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",qn),Gn.lang=tn,q("X",0,0,"unix"),q("x",0,0,"valueOf"),ce("x",ie),ce("X",/[+-]?\d+(\.\d{1,3})?/),me("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),me("x",function(e,t,n){n._d=new Date(T(e))}),r.version="2.20.1",t=xt,r.fn=fn,r.min=function(){return Pt("isBefore",[].slice.call(arguments,0))},r.max=function(){return Pt("isAfter",[].slice.call(arguments,0))},r.now=function(){return Date.now?Date.now():+new Date},r.utc=p,r.unix=function(e){return xt(1e3*e)},r.months=function(e,t){return yn(e,t,"months")},r.isDate=u,r.locale=ct,r.invalid=y,r.duration=Yt,r.isMoment=S,r.weekdays=function(e,t,n){return vn(e,t,n,"weekdays")},r.parseZone=function(){return xt.apply(null,arguments).parseZone()},r.localeData=ft,r.isDuration=jt,r.monthsShort=function(e,t){return yn(e,t,"monthsShort")},r.weekdaysMin=function(e,t,n){return vn(e,t,n,"weekdaysMin")},r.defineLocale=dt,r.updateLocale=function(e,t){if(null!=t){var n,o,r=it;null!=(o=ut(e))&&(r=o._config),(n=new M(t=R(r,t))).parentLocale=at[e],at[e]=n,ct(e)}else null!=at[e]&&(null!=at[e].parentLocale?at[e]=at[e].parentLocale:null!=at[e]&&delete at[e]);return at[e]},r.locales=function(){return O(at)},r.weekdaysShort=function(e,t,n){return vn(e,t,n,"weekdaysShort")},r.normalizeUnits=U,r.relativeTimeRounding=function(e){return void 0===e?Hn:"function"==typeof e&&(Hn=e,!0)},r.relativeTimeThreshold=function(e,t){return void 0!==zn[e]&&(void 0===t?zn[e]:(zn[e]=t,"s"===e&&(zn.ss=t-1),!0))},r.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},r.prototype=fn,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},r},e.exports=t()}).call(t,n(191)(e))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.compareObjects=function(e,t){return!(!e||!t)&&!(!e.userIdentifier||!t.userIdentifier||e.userIdentifier!==t.userIdentifier)},e.expiresIn=function(e){return e||(e="3599"),this.now()+parseInt(e,10)},e.now=function(){return Math.round((new Date).getTime()/1e3)},e.isEmpty=function(e){return void 0===e||!e||0===e.length},e.extractIdToken=function(e){var t=this.decodeJwt(e);if(!t)return null;try{var n=t.JWSPayload,o=this.base64DecodeStringUrlSafe(n);return o?JSON.parse(o):null}catch(e){}return null},e.base64EncodeStringUrlSafe=function(e){return window.btoa?window.btoa(e):this.encode(e)},e.base64DecodeStringUrlSafe=function(e){return e=e.replace(/-/g,"+").replace(/_/g,"/"),window.atob?decodeURIComponent(window.atob(e)):decodeURIComponent(this.decode(e))},e.encode=function(e){var t,n,o,r,i,a,l,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u="",c=0;for(e=this.utf8Encode(e);c>2,i=(3&t)<<4|(n=e.charCodeAt(c++))>>4,a=(15&n)<<2|(o=e.charCodeAt(c++))>>6,l=63&o,isNaN(n)?a=l=64:isNaN(o)&&(l=64),u=u+s.charAt(r)+s.charAt(i)+s.charAt(a)+s.charAt(l);return u.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},e.utf8Encode=function(e){e=e.replace(/\r\n/g,"\n");for(var t="",n=0;n127&&o<2048?(t+=String.fromCharCode(o>>6|192),t+=String.fromCharCode(63&o|128)):(t+=String.fromCharCode(o>>12|224),t+=String.fromCharCode(o>>6&63|128),t+=String.fromCharCode(63&o|128))}return t},e.decode=function(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n=(e=String(e).replace(/=+$/,"")).length;if(n%4==1)throw new Error("The token to be decoded is not correctly encoded.");for(var o,r,i,a,l,s,u,c,d="",f=0;f>16&255,u=l>>8&255,d+=String.fromCharCode(s,u);break}if(f+1===n-1){s=(l=o<<18|r<<12)>>16&255,d+=String.fromCharCode(s);break}s=(l=o<<18|r<<12|i<<6|a)>>16&255,u=l>>8&255,c=255&l,d+=String.fromCharCode(s,u,c)}return d},e.decodeJwt=function(e){if(this.isEmpty(e))return null;var t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(e);return!t||t.length<4?null:{header:t[1],JWSPayload:t[2],JWSSig:t[3]}},e.deserialize=function(e){var t,n=/\+/g,o=/([^&=]+)=([^&]*)/g,r=function(e){return decodeURIComponent(e.replace(n," "))},i={};for(t=o.exec(e);t;)i[r(t[1])]=r(t[2]),t=o.exec(e);return i},e.isIntersectingScopes=function(e,t){e=this.convertToLowerCase(e);for(var n=0;n-1)return!0;return!1},e.containsScope=function(e,t){return e=this.convertToLowerCase(e),t.every(function(t){return e.indexOf(t.toString().toLowerCase())>=0})},e.convertToLowerCase=function(e){return e.map(function(e){return e.toLowerCase()})},e.removeElement=function(e,t){return e.filter(function(e){return e!==t})},e.decimalToHex=function(e){for(var t=e.toString(16);t.length<2;)t="0"+t;return t},e.getLibraryVersion=function(){return"0.1.3"},e.replaceFirstPath=function(t,n){if(t.match(/^(https?\:)\/\/(([^:\/?#] *)(?:\:([0-9]+))?)([\/]{0,1}[^?#] *)(\?[^#] *|)(#. *|)$/)){var o=e.GetUrlComponents(t),r=o.PathSegments;r.shift(),(r[0]&&"common"===r[0]||"organizations"===r[0])&&(r[0]=n,t=o.Protocol+"//"+o.HostNameAndPort+"/"+r.join("/"))}return t},e.createNewGuid=function(){var t=window.crypto;if(t&&t.getRandomValues){var n=new Uint8Array(16);return t.getRandomValues(n),n[6]|=64,n[6]&=79,n[8]|=128,n[8]&=191,e.decimalToHex(n[0])+e.decimalToHex(n[1])+e.decimalToHex(n[2])+e.decimalToHex(n[3])+"-"+e.decimalToHex(n[4])+e.decimalToHex(n[5])+"-"+e.decimalToHex(n[6])+e.decimalToHex(n[7])+"-"+e.decimalToHex(n[8])+e.decimalToHex(n[9])+"-"+e.decimalToHex(n[10])+e.decimalToHex(n[11])+e.decimalToHex(n[12])+e.decimalToHex(n[13])+e.decimalToHex(n[14])+e.decimalToHex(n[15])}for(var o="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",r="0123456789abcdef",i=0,a="",l=0;l<36;l++)"-"!==o[l]&&"4"!==o[l]&&(i=16*Math.random()|0),"x"===o[l]?a+=r[i]:"y"===o[l]?(i&=3,a+=r[i|=8]):a+=o[l];return a},e.GetUrlComponents=function(e){if(!e)throw"Url required";var t=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),n=e.match(t);if(!n||n.length<6)throw"Valid url required";var o={Protocol:n[1],HostNameAndPort:n[4],AbsolutePath:n[5]},r=o.AbsolutePath.split("/");return r=r.filter(function(e){return e&&e.length>0}),o.PathSegments=r,o},e.CanonicalizeUri=function(t){return t&&(t=t.toLowerCase()),t&&!e.endsWith(t,"/")&&(t+="/"),t},e.endsWith=function(e,t){return!(!e||!t)&&-1!==e.indexOf(t,e.length-t.length)},e}();t.Utils=o},function(e,t,n){"use strict";if(n(22)){var o=n(68),r=n(13),i=n(15),a=n(2),l=n(136),s=n(186),u=n(40),c=n(74),d=n(66),f=n(31),p=n(76),m=n(48),h=n(24),y=n(276),v=n(70),g=n(46),_=n(30),b=n(106),S=n(16),E=n(25),T=n(177),C=n(71),w=n(37),I=n(72).f,O=n(179),k=n(67),A=n(20),x=n(50),R=n(127),M=n(134),P=n(182),D=n(87),U=n(131),j=n(73),L=n(181),N=n(266),F=n(23),H=n(36),z=F.f,B=H.f,W=r.RangeError,q=r.TypeError,G=r.Uint8Array,Y=Array.prototype,V=s.ArrayBuffer,K=s.DataView,X=x(0),J=x(2),$=x(3),Q=x(4),Z=x(5),ee=x(6),te=R(!0),ne=R(!1),oe=P.values,re=P.keys,ie=P.entries,ae=Y.lastIndexOf,le=Y.reduce,se=Y.reduceRight,ue=Y.join,ce=Y.sort,de=Y.slice,fe=Y.toString,pe=Y.toLocaleString,me=A("iterator"),he=A("toStringTag"),ye=k("typed_constructor"),ve=k("def_constructor"),ge=l.CONSTR,_e=l.TYPED,be=l.VIEW,Se=x(1,function(e,t){return Ie(M(e,e[ve]),t)}),Ee=i(function(){return 1===new G(new Uint16Array([1]).buffer)[0]}),Te=!!G&&!!G.prototype.set&&i(function(){new G(1).set({})}),Ce=function(e,t){var n=m(e);if(n<0||n%t)throw W("Wrong offset!");return n},we=function(e){if(S(e)&&_e in e)return e;throw q(e+" is not a typed array!")},Ie=function(e,t){if(!(S(e)&&ye in e))throw q("It is not a typed array constructor!");return new e(t)},Oe=function(e,t){return ke(M(e,e[ve]),t)},ke=function(e,t){for(var n=0,o=t.length,r=Ie(e,o);o>n;)r[n]=t[n++];return r},Ae=function(e,t,n){z(e,t,{get:function(){return this._d[n]}})},xe=function(e){var t,n,o,r,i,a,l=E(e),s=arguments.length,c=s>1?arguments[1]:void 0,d=void 0!==c,f=O(l);if(void 0!=f&&!T(f)){for(a=f.call(l),o=[],t=0;!(i=a.next()).done;t++)o.push(i.value);l=o}for(d&&s>2&&(c=u(c,arguments[2],2)),t=0,n=h(l.length),r=Ie(this,n);n>t;t++)r[t]=d?c(l[t],t):l[t];return r},Re=function(){for(var e=0,t=arguments.length,n=Ie(this,t);t>e;)n[e]=arguments[e++];return n},Me=!!G&&i(function(){pe.call(new G(1))}),Pe=function(){return pe.apply(Me?de.call(we(this)):we(this),arguments)},De={copyWithin:function(e,t){return N.call(we(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return Q(we(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return L.apply(we(this),arguments)},filter:function(e){return Oe(this,J(we(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return Z(we(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(we(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){X(we(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(we(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(we(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return ue.apply(we(this),arguments)},lastIndexOf:function(e){return ae.apply(we(this),arguments)},map:function(e){return Se(we(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return le.apply(we(this),arguments)},reduceRight:function(e){return se.apply(we(this),arguments)},reverse:function(){for(var e,t=we(this).length,n=Math.floor(t/2),o=0;o1?arguments[1]:void 0)},sort:function(e){return ce.call(we(this),e)},subarray:function(e,t){var n=we(this),o=n.length,r=v(e,o);return new(M(n,n[ve]))(n.buffer,n.byteOffset+r*n.BYTES_PER_ELEMENT,h((void 0===t?o:v(t,o))-r))}},Ue=function(e,t){return Oe(this,de.call(we(this),e,t))},je=function(e){we(this);var t=Ce(arguments[1],1),n=this.length,o=E(e),r=h(o.length),i=0;if(r+t>n)throw W("Wrong length!");for(;i255?255:255&o),r.v[p](n*t+r.o,o,Ee)}(this,n,e)},enumerable:!0})};_?(m=n(function(e,n,o,r){c(e,m,u,"_d");var i,a,l,s,d=0,p=0;if(S(n)){if(!(n instanceof V||"ArrayBuffer"==(s=b(n))||"SharedArrayBuffer"==s))return _e in n?ke(m,n):xe.call(m,n);i=n,p=Ce(o,t);var v=n.byteLength;if(void 0===r){if(v%t)throw W("Wrong length!");if((a=v-p)<0)throw W("Wrong length!")}else if((a=h(r)*t)+p>v)throw W("Wrong length!");l=a/t}else l=y(n),i=new V(a=l*t);for(f(e,"_d",{b:i,o:p,l:a,e:l,v:new K(i)});d1&&void 0!==arguments[1]?arguments[1]:(c.b[0][0]++,0),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(c.b[1][0]++,{}),o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:(c.b[2][0]++,(0,f.default)());return c.f[2]++,c.s[18]++,(0,p.reduxBackedPromise)(D(e,t,n,o),N(e),"POST")};c.s[19]++;var R=t.getEventsEndPoint=function(e){return c.f[3]++,c.s[20]++,(e?(c.b[3][0]++,"incidents/"+e+"/"):(c.b[3][1]++,""))+"events/"};c.s[21]++;var M=t.getEventsFetchArgs=function(e){return c.f[4]++,c.s[22]++,[R(e.incidentId)+m.serializeFiltersForUrl(e)]};c.s[23]++;var P=t.getEventFetchArgs=function(e,t){return c.f[5]++,c.s[24]++,[R(e)+t]};c.s[25]++;var D=t.postEventFetchArgs=function(e,t,n,o){return c.f[6]++,c.s[26]++,[R(e),{eventTypeId:t,occurred:o,eventFired:o,data:n}]};c.s[27]++;var U=t.getEventActionSet=function(e,t){return c.f[7]++,c.s[28]++,{try:function(){return c.f[8]++,c.s[29]++,{type:y,incidentId:e,id:t}},succeed:function(e){return c.f[9]++,c.s[30]++,function(n){c.f[10]++,c.s[31]++,n({type:v,event:e,id:t}),c.s[32]++,n((0,p.updatePagination)())}},fail:function(n){return c.f[11]++,c.s[33]++,{type:g,failureReason:n,incidentId:e,id:t}}}};c.s[34]++;var j=t.getEventsActionSet=function e(t){return c.f[12]++,c.s[35]++,{try:function(){return c.f[13]++,c.s[36]++,{type:_,incidentId:t}},succeed:function(n,o){return c.f[14]++,c.s[37]++,function(r){c.f[15]++;var i=void 0;c.s[38]++;var a=!0,l=!1,s=void 0;try{for(var u,d=o.headers[Symbol.iterator]();!(a=(u=d.next()).done);a=!0){var f=u.value;c.s[39]++,f[0]===O?(c.b[4][0]++,c.s[40]++,i=JSON.parse(f[1])):c.b[4][1]++}}catch(e){l=!0,s=e}finally{try{!a&&d.return&&d.return()}finally{if(l)throw s}}c.s[41]++,r({type:b,events:n,incidentId:t,pagination:i}),c.s[42]++,i.NextPageLink?(c.b[5][0]++,c.s[43]++,r((0,p.reduxBackedPromise)([i.NextPageLink],e(t)))):(c.b[5][1]++,c.s[44]++,r((0,p.updatePagination)()))}},fail:function(e){return c.f[16]++,c.s[45]++,{type:S,failureReason:e,incidentId:t}}}};c.s[46]++;var L=t.addEvent=function(e,t){return c.f[17]++,c.s[47]++,{type:w,incidentId:t,event:e}};c.s[48]++;var N=t.postEventActionSet=function(e){return c.f[18]++,c.s[49]++,{try:function(){return c.f[19]++,c.s[50]++,{type:E,incidentId:e}},succeed:function(t){return c.f[20]++,c.s[51]++,function(n){c.f[21]++,c.s[52]++,n({type:T,incidentId:e,event:t}),c.s[53]++,n((0,p.updatePagination)())}},fail:function(t){return c.f[22]++,c.s[54]++,{type:C,incidentId:e,failureReason:t}}}};"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(h,"EVENTS","C:/Users/yizha/source/repos/SIA/sia/Sia-EventUI/src/actions/eventActions.js"),__REACT_HOT_LOADER__.register(y,"REQUEST_EVENT","C:/Users/yizha/source/repos/SIA/sia/Sia-EventUI/src/actions/eventActions.js"),__REACT_HOT_LOADER__.register(v,"RECEIVE_EVENT","C:/Users/yizha/source/repos/SIA/sia/Sia-EventUI/src/actions/eventActions.js"),__REACT_HOT_LOADER__.register(g,"RECEIVE_EVENT_FAILURE","C:/Users/yizha/source/repos/SIA/sia/Sia-EventUI/src/actions/eventActions.js"),__REACT_HOT_LOADER__.register(_,"REQUEST_EVENTS","C:/Users/yizha/source/repos/SIA/sia/Sia-EventUI/src/actions/eventActions.js"),__REACT_HOT_LOADER__.register(b,"RECEIVE_EVENTS","C:/Users/yizha/source/repos/SIA/sia/Sia-EventUI/src/actions/eventActions.js"),__REACT_HOT_LOADER__.register(S,"RECEIVE_EVENTS_FAILURE","C:/Users/yizha/source/repos/SIA/sia/Sia-EventUI/src/actions/eventActions.js"),__REACT_HOT_LOADER__.register(E,"POST_EVENT_TRY","C:/Users/yizha/source/repos/SIA/sia/Sia-EventUI/src/actions/eventActions.js"),__REACT_HOT_LOADER__.register(T,"POST_EVENT_SUCCEED","C:/Users/yizha/source/repos/SIA/sia/Sia-EventUI/src/actions/eventActions.js"),__REACT_HOT_LOADER__.register(C,"POST_EVENT_FAIL","C:/Users/yizha/source/repos/SIA/sia/Sia-EventUI/src/actions/eventActions.js"),__REACT_HOT_LOADER__.register(w,"ADD_EVENT","C:/Users/yizha/source/repos/SIA/sia/Sia-EventUI/src/actions/eventActions.js"),__REACT_HOT_LOADER__.register(I,"pagination","C:/Users/yizha/source/repos/SIA/sia/Sia-EventUI/src/actions/eventActions.js"),__REACT_HOT_LOADER__.register(O,"linksHeaderName","C:/Users/yizha/source/repos/SIA/sia/Sia-EventUI/src/actions/eventActions.js"),__REACT_HOT_LOADER__.register(k,"fetchEvent","C:/Users/yizha/source/repos/SIA/sia/Sia-EventUI/src/actions/eventActions.js"),__REACT_HOT_LOADER__.register(A,"fetchEvents","C:/Users/yizha/source/repos/SIA/sia/Sia-EventUI/src/actions/eventActions.js"),__REACT_HOT_LOADER__.register(x,"postEvent","C:/Users/yizha/source/repos/SIA/sia/Sia-EventUI/src/actions/eventActions.js"),__REACT_HOT_LOADER__.register(R,"getEventsEndPoint","C:/Users/yizha/source/repos/SIA/sia/Sia-EventUI/src/actions/eventActions.js"),__REACT_HOT_LOADER__.register(M,"getEventsFetchArgs","C:/Users/yizha/source/repos/SIA/sia/Sia-EventUI/src/actions/eventActions.js"),__REACT_HOT_LOADER__.register(P,"getEventFetchArgs","C:/Users/yizha/source/repos/SIA/sia/Sia-EventUI/src/actions/eventActions.js"),__REACT_HOT_LOADER__.register(D,"postEventFetchArgs","C:/Users/yizha/source/repos/SIA/sia/Sia-EventUI/src/actions/eventActions.js"),__REACT_HOT_LOADER__.register(U,"getEventActionSet","C:/Users/yizha/source/repos/SIA/sia/Sia-EventUI/src/actions/eventActions.js"),__REACT_HOT_LOADER__.register(j,"getEventsActionSet","C:/Users/yizha/source/repos/SIA/sia/Sia-EventUI/src/actions/eventActions.js"),__REACT_HOT_LOADER__.register(L,"addEvent","C:/Users/yizha/source/repos/SIA/sia/Sia-EventUI/src/actions/eventActions.js"),__REACT_HOT_LOADER__.register(N,"postEventActionSet","C:/Users/yizha/source/repos/SIA/sia/Sia-EventUI/src/actions/eventActions.js"))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r,i,a,l,s,u=(o="C:\\Users\\yizha\\source\\repos\\SIA\\sia\\Sia-EventUI\\src\\config\\index.js",r="c105aba684a66d5484e276dad3d427b2562d69e3",i=new Function("return this")(),l={path:"C:\\Users\\yizha\\source\\repos\\SIA\\sia\\Sia-EventUI\\src\\config\\index.js",statementMap:{0:{start:{line:2,column:0},end:{line:14,column:1}},1:{start:{line:5,column:2},end:{line:5,column:20}},2:{start:{line:7,column:2},end:{line:13,column:3}},3:{start:{line:8,column:26},end:{line:8,column:60}},4:{start:{line:9,column:4},end:{line:9,column:51}},5:{start:{line:11,column:29},end:{line:11,column:66}},6:{start:{line:12,column:4},end:{line:12,column:57}}},fnMap:{},branchMap:{0:{loc:{start:{line:9,column:13},end:{line:9,column:51}},type:"binary-expr",locations:[{start:{line:9,column:13},end:{line:9,column:34}},{start:{line:9,column:38},end:{line:9,column:51}}],line:9},1:{loc:{start:{line:12,column:13},end:{line:12,column:57}},type:"binary-expr",locations:[{start:{line:12,column:13},end:{line:12,column:37}},{start:{line:12,column:41},end:{line:12,column:57}}],line:12}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},f:{},b:{0:[0,0],1:[0,0]},_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},(s=i[a="__coverage__"]||(i[a]={}))[o]&&s[o].hash===r?s[o]:(l.hash=r,s[o]=l)),c=void 0;u.s[0]++;try{u.s[1]++,c={appEnv:"test",baseUrl:"http://localhost:50000/",authRedirectUri:"http://localhost:3000/",retries:2,retryExponentialBackoffFactor:2,retryMinTimeoutInMiliseconds:50,retryMaxTimeoutInMiliseconds:1500,ticketRefreshIntervalInSeconds:300,authVersion:"ADAL",aadInstance:"https://login.microsoftonline.com/",aadTenant:"microsoft.onmicrosoft.com",clientId:"d4c7b0fe-1256-4ba4-921b-8cbb09262dbb",ticketSystems:{1:{id:1,name:"Example1",ticketUriPrefix:"http://example1/ticket/",ticketUriSuffix:""},2:{id:2,name:"Example2",ticketUriPrefix:"http://example2/ticketId=",ticketUriSuffix:"&edit=false"}},instrumentationKey:"025ecaef-af40-45cd-9301-5a2814a342ce"}}catch(e){u.s[2]++;try{var d=(u.s[3]++,n(!function(){var e=new Error('Cannot find module "../../cfg/test.const.js"');throw e.code="MODULE_NOT_FOUND",e}()));u.s[4]++,u.b[0][0]++,c=d.default||(u.b[0][1]++,d)}catch(e){var f=(u.s[5]++,n(199));u.s[6]++,u.b[1][0]++,c=f.default||(u.b[1][1]++,f)}}var p=c;t.default=p;"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(c,"config","C:/Users/yizha/source/repos/SIA/sia/Sia-EventUI/src/config/index.js"),__REACT_HOT_LOADER__.register(p,"default","C:/Users/yizha/source/repos/SIA/sia/Sia-EventUI/src/config/index.js"))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,r=n(836),i=(o=r)&&o.__esModule?o:{default:o};t.default=i.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=v(n(5)),r=v(n(3)),i=v(n(4)),a=v(n(6)),l=v(n(7)),s=v(n(98)),u=v(n(228)),c=v(n(10)),d=v(n(356));t.withOptions=function(e,t){return(0,h.default)(t,"react-event-listener: should be specified options in withOptions."),{handler:e,options:_(t)}};var f=v(n(0)),p=v(n(1)),m=v(n(189)),h=v(n(14)),y=n(851);function v(e){return e&&e.__esModule?e:{default:e}}var g={capture:!1,passive:!1};function _(e){return(0,d.default)({},g,e)}function b(e,t,n){var o=[e,t];return o.push(y.passiveOption?n:n.capture),o}function S(e,t,n,o){e.addEventListener.apply(e,b(t,n,o))}function E(e,t,n,o){e.removeEventListener.apply(e,b(t,n,o))}var T=function(e){function t(){return(0,r.default)(this,t),(0,a.default)(this,(t.__proto__||(0,o.default)(t)).apply(this,arguments))}return(0,l.default)(t,e),(0,i.default)(t,[{key:"componentDidMount",value:function(){this.addListeners()}},{key:"shouldComponentUpdate",value:function(e){return!(0,m.default)(this.props,e)}},{key:"componentWillUpdate",value:function(){this.removeListeners()}},{key:"componentDidUpdate",value:function(){this.addListeners()}},{key:"componentWillUnmount",value:function(){this.removeListeners()}},{key:"addListeners",value:function(){this.applyListeners(S)}},{key:"removeListeners",value:function(){this.applyListeners(E)}},{key:"applyListeners",value:function(e){var t=this.props.target;if(t){var n=t;"string"==typeof t&&(n=window[t]),function(e,t){e.children,e.target;var n=(0,c.default)(e,["children","target"]);(0,u.default)(n).forEach(function(e){if("on"===e.substring(0,2)){var o=n[e],r=void 0===o?"undefined":(0,s.default)(o),i="object"===r;if(i||"function"===r){var a="capture"===e.substr(-7).toLowerCase(),l=e.substring(2).toLowerCase();l=a?l.substring(0,l.length-7):l,i?t(l,o.handler,o.options):t(l,o,_({capture:a}))}}})}(this.props,e.bind(null,n))}}},{key:"render",value:function(){return this.props.children||null}}]),t}(f.default.Component);T.propTypes={children:p.default.node,target:p.default.oneOfType([p.default.object,p.default.string]).isRequired},t.default=T},function(e,t,n){var o=n(67)("meta"),r=n(16),i=n(30),a=n(23).f,l=0,s=Object.isExtensible||function(){return!0},u=!n(15)(function(){return s(Object.preventExtensions({}))}),c=function(e){a(e,o,{value:{i:"O"+ ++l,w:{}}})},d=e.exports={KEY:o,NEED:!1,fastKey:function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,o)){if(!s(e))return"F";if(!t)return"E";c(e)}return e[o].i},getWeak:function(e,t){if(!i(e,o)){if(!s(e))return!0;if(!t)return!1;c(e)}return e[o].w},onFreeze:function(e){return u&&d.NEED&&s(e)&&!i(e,o)&&c(e),e}}},function(e,t,n){var o=n(20)("unscopables"),r=Array.prototype;void 0==r[o]&&n(31)(r,o,{}),e.exports=function(e){r[o][e]=!0}},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var o=n(62),r=n(27),i=n(212),a=n(95),l=function(e,t,n){var s,u,c,d=e&l.F,f=e&l.G,p=e&l.S,m=e&l.P,h=e&l.B,y=e&l.W,v=f?r:r[t]||(r[t]={}),g=v.prototype,_=f?o:p?o[t]:(o[t]||{}).prototype;for(s in f&&(n=t),n)(u=!d&&_&&void 0!==_[s])&&s in v||(c=u?_[s]:n[s],v[s]=f&&"function"!=typeof _[s]?n[s]:h&&u?i(c,o):y&&_[s]==c?function(e){var t=function(t,n,o){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,o)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(c):m&&"function"==typeof c?i(Function.call,c):c,m&&((v.virtual||(v.virtual={}))[s]=c,e&l.R&&g&&!g[s]&&a(g,s,c)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t,n){var o=n(81),r=n(325),i=n(213),a=Object.defineProperty;t.f=n(82)?Object.defineProperty:function(e,t,n){if(o(e),t=i(t,!0),o(n),r)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertColorToString=l,t.convertHexToRGB=s,t.decomposeColor=u,t.getContrastRatio=function(e,t){var n=c(e),o=c(t),r=(Math.max(n,o)+.05)/(Math.min(n,o)+.05);return Number(r.toFixed(2))},t.getLuminance=c,t.emphasize=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return c(e)>.5?d(e,t):f(e,t)},t.fade=function(e,t){e=u(e),t=a(t,0,1),("rgb"===e.type||"hsl"===e.type)&&(e.type+="a");return e.values[3]=t,l(e)},t.darken=d,t.lighten=f;var o,r=n(14),i=(o=r)&&o.__esModule?o:{default:o};function a(e,t,n){return en?n:e}function l(e){var t=e.type,n=e.values;if(t.indexOf("rgb")>-1)for(var o=0;o<3;o++)n[o]=parseInt(n[o]);var r=void 0;return r=t.indexOf("hsl")>-1?e.type+"("+n[0]+", "+n[1]+"%, "+n[2]+"%":e.type+"("+n[0]+", "+n[1]+", "+n[2],4===n.length?r+=", "+e.values[3]+")":r+=")",r}function s(e){if(4===e.length){for(var t="#",n=1;n-1){var t=e.values.map(function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)});return Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}if(e.type.indexOf("hsl")>-1)return e.values[2]/100}function d(e,t){if(e=u(e),t=a(t,0,1),e.type.indexOf("hsl")>-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")>-1)for(var n=0;n<3;n++)e.values[n]*=1-t;return l(e)}function f(e,t){if(e=u(e),t=a(t,0,1),e.type.indexOf("hsl")>-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")>-1)for(var n=0;n<3;n++)e.values[n]+=(255-e.values[n])*t;return l(e)}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=0,o=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+o).toString(36))}},function(e,t){e.exports=!1},function(e,t,n){var o=n(252),r=n(164);e.exports=Object.keys||function(e){return o(e,r)}},function(e,t,n){var o=n(48),r=Math.max,i=Math.min;e.exports=function(e,t){return(e=o(e))<0?r(e+t,0):i(e,t)}},function(e,t,n){var o=n(12),r=n(253),i=n(164),a=n(163)("IE_PROTO"),l=function(){},s=function(){var e,t=n(161)("iframe"),o=i.length;for(t.style.display="none",n(165).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write(" - - - SRE Incident Assistant - - - - - -
APPLICATION CONTENT
- - - - - diff --git a/dist/static/README.md b/dist/static/README.md deleted file mode 100644 index c8eef65..0000000 --- a/dist/static/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# static - -Files and directories that you put in `static` will be copied to the -`dist/static` directory during the build step. Use it to provide -arbitrary static assets that can be referenced by path in your -application. diff --git a/dist/static/favicon.ico b/dist/static/favicon.ico deleted file mode 100644 index 69d0e90..0000000 Binary files a/dist/static/favicon.ico and /dev/null differ diff --git a/package-lock.json b/package-lock.json index 63e865c..9949740 100644 --- a/package-lock.json +++ b/package-lock.json @@ -335,7 +335,7 @@ "anymatch": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", - "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "integrity": "sha1-VT3Lj5HjyImEXf26NMd3IbkLnXo=", "dev": true, "requires": { "micromatch": "2.3.11", @@ -345,7 +345,7 @@ "aproba": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "integrity": "sha1-aALmJk79GMeQobDVF/DyYnvyyUo=", "dev": true }, "are-we-there-yet": { @@ -380,7 +380,7 @@ "arr-flatten": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=", "dev": true }, "array-filter": { @@ -822,7 +822,7 @@ "babel-loader": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-7.1.2.tgz", - "integrity": "sha512-jRwlFbINAeyDStqK6Dd5YuY0k5YuzQUvlz2ZamuXrXmxav3pNqe9vfJ402+2G+OmlJSXxCOpB6Uz0INM7RQe2A==", + "integrity": "sha1-9svhInEPGqKvTYgcbVtUNYyiQSY=", "dev": true, "requires": { "find-cache-dir": "1.0.0", @@ -1336,7 +1336,7 @@ "babel-preset-env": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.6.1.tgz", - "integrity": "sha512-W6VIyA6Ch9ePMI7VptNn2wBM6dbG0eSz25HEiL40nQXCsXGTGZSTZu1Iap+cj3Q0S5a7T9+529l/5Bkvd+afNA==", + "integrity": "sha1-oYtWTMm5r99KrleuPBsNmRiOb0g=", "dev": true, "requires": { "babel-plugin-check-es2015-constants": "6.22.0", @@ -1490,7 +1490,7 @@ "babylon": { "version": "6.18.0", "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "integrity": "sha1-ry87iPpvXB5MY00aD46sT1WzleM=", "dev": true }, "backo2": { @@ -1514,7 +1514,7 @@ "base64-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz", - "integrity": "sha512-dwVUVIXsBZXwTuwnXI9RK8sBmgq09NDHzyR9SAph9eqk76gKK2JSQmZARC2zRC81JC2QTtxD0ARU5qTS25gIGw==", + "integrity": "sha1-qRlH2h9KUW6jjltOwOw3c2deCIY=", "dev": true }, "base64id": { @@ -1586,7 +1586,7 @@ "bn.js": { "version": "4.11.8", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "integrity": "sha1-LN4J617jQfSEdGuwMJsyU7GxRC8=", "dev": true }, "body-parser": { @@ -1710,7 +1710,7 @@ "browserify": { "version": "14.5.0", "resolved": "https://registry.npmjs.org/browserify/-/browserify-14.5.0.tgz", - "integrity": "sha512-gKfOsNQv/toWz+60nSPfYzuwSEdzvV2WdxrVPUbPD/qui44rAkB3t3muNtmmGYHqrG56FGwX9SUEQmzNLAeS7g==", + "integrity": "sha1-C7vOUhrNbk0dVNjpNlAI77hanMU=", "dev": true, "requires": { "JSONStream": "1.3.1", @@ -2131,7 +2131,7 @@ "cipher-base": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "integrity": "sha1-h2Dk7MJy9MNjUy+SbYdKriwTl94=", "dev": true, "requires": { "inherits": "2.0.3", @@ -2141,7 +2141,7 @@ "circular-json": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", - "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", + "integrity": "sha1-gVyZ6oT2gJUp0vRXkb34JxE1LWY=", "dev": true }, "clap": { @@ -2436,7 +2436,7 @@ "copy-concurrently": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", - "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", + "integrity": "sha1-kilzmMrjSTf8r9bsgTnBgFHwteA=", "dev": true, "requires": { "aproba": "1.2.0", @@ -2447,6 +2447,59 @@ "run-queue": "1.0.3" } }, + "copy-webpack-plugin": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.4.1.tgz", + "integrity": "sha512-ojaz8MpS3zoLJT/JbYMusYM+dCEArhW24hGAUPYPydTCS+87NFh2TWr85sywG3So4Q4E68QoerqQ+Ns1g0fhDg==", + "dev": true, + "requires": { + "cacache": "10.0.2", + "find-cache-dir": "1.0.0", + "globby": "7.1.1", + "is-glob": "4.0.0", + "loader-utils": "0.2.17", + "minimatch": "3.0.4", + "p-limit": "1.1.0", + "serialize-javascript": "1.4.0" + }, + "dependencies": { + "globby": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", + "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", + "dev": true, + "requires": { + "array-union": "1.0.2", + "dir-glob": "2.0.0", + "glob": "7.1.2", + "ignore": "3.3.5", + "pify": "3.0.0", + "slash": "1.0.0" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "dev": true, + "requires": { + "is-extglob": "2.1.1" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, "copyfiles": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-1.2.0.tgz", @@ -2510,7 +2563,7 @@ "cross-env": { "version": "5.1.3", "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-5.1.3.tgz", - "integrity": "sha512-UOokgwvDzCT0mqRSLEkJzUhYXB1vK3E5UgDrD41QiXsm9UetcW2rCGHYz/O3p873lMJ1VZbFCF9Izkwh7nYR5A==", + "integrity": "sha1-+K4Y+qyHaSsKi00vcADU7DqF39c=", "dev": true, "requires": { "cross-spawn": "5.1.0", @@ -2975,6 +3028,33 @@ "randombytes": "2.0.5" } }, + "dir-glob": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", + "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", + "dev": true, + "requires": { + "arrify": "1.0.1", + "path-type": "3.0.0" + }, + "dependencies": { + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, "discontinuous-range": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/discontinuous-range/-/discontinuous-range-1.0.0.tgz", @@ -3108,7 +3188,7 @@ "electron-releases": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/electron-releases/-/electron-releases-2.1.0.tgz", - "integrity": "sha512-cyKFD1bTE/UgULXfaueIN1k5EPFzs+FRc/rvCY5tIynefAPqopQEgjr0EzY+U3Dqrk/G4m9tXSPuZ77v6dL/Rw==", + "integrity": "sha1-xWFL+BHxds48g242igYleCNB/U4=", "dev": true }, "electron-to-chromium": { @@ -3515,7 +3595,7 @@ "espree": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.2.tgz", - "integrity": "sha512-sadKeYwaR/aJ3stC2CdvgXu1T16TdYN+qwCpcWbMnGJ8s0zNWemzrvb2GbD4OhmJ/fwpJjudThAlLobGbWZbCQ==", + "integrity": "sha1-dWrai5eenc/NswqtjRqTBKkF4co=", "dev": true, "requires": { "acorn": "5.3.0", @@ -3525,7 +3605,7 @@ "acorn": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.3.0.tgz", - "integrity": "sha512-Yej+zOJ1Dm/IMZzzj78OntP/r3zHEaKcyNoU2lAaxPtrseM6rF0xwqoz5Q5ysAiED9hTjI2hgtvLXitlCN1/Ug==", + "integrity": "sha1-dEbTlFnFT7SagObuZHgUm5QOyCI=", "dev": true } } @@ -3592,7 +3672,7 @@ "evp_bytestokey": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "integrity": "sha1-f8vbGY3HGVlDLv4ThCaE4FJaywI=", "dev": true, "requires": { "md5.js": "1.3.4", @@ -4029,7 +4109,7 @@ "file-loader": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-1.1.6.tgz", - "integrity": "sha512-873ztuL+/hfvXbLDJ262PGO6XjERnybJu2gW1/5j8HUfxSiFJI9Hj/DhZ50ZGRUxBvuNiazb/cM2rh9pqrxP6Q==", + "integrity": "sha1-e5qPLFjwCnf930npQPesl4o+oOg=", "dev": true, "requires": { "loader-utils": "1.1.0", @@ -4108,6 +4188,37 @@ } } }, + "find-cache-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", + "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", + "dev": true, + "requires": { + "commondir": "1.0.1", + "make-dir": "1.0.0", + "pkg-dir": "2.0.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "2.1.0" + } + } + } + }, "find-root": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", @@ -4447,15 +4558,12 @@ "full-icu": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/full-icu/-/full-icu-1.2.0.tgz", - "integrity": "sha512-0B/oH/5WnTM0grN0/F91WN1zdLx+IKH0uOlAqj6DWhRQTGFCj645elI46fKykRSWeafPrIOIRzAL7co1Vku5pQ==", - "requires": { - "icu4c-data": "0.59.2" - } + "integrity": "sha512-0B/oH/5WnTM0grN0/F91WN1zdLx+IKH0uOlAqj6DWhRQTGFCj645elI46fKykRSWeafPrIOIRzAL7co1Vku5pQ==" }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0=", "dev": true }, "function.prototype.name": { @@ -4560,7 +4668,7 @@ "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", "dev": true, "requires": { "fs.realpath": "1.0.0", @@ -4609,7 +4717,7 @@ "globals": { "version": "9.18.0", "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "integrity": "sha1-qjiWs+abSH8X4x7SFD1pqOMMLYo=", "dev": true }, "globby": { @@ -4743,7 +4851,7 @@ "hash.js": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "integrity": "sha1-NA3tvmKQGHFRweodd3o0SJNd+EY=", "dev": true, "requires": { "inherits": "2.0.3", @@ -4792,7 +4900,7 @@ "history": { "version": "4.7.2", "resolved": "https://registry.npmjs.org/history/-/history-4.7.2.tgz", - "integrity": "sha512-1zkBRWW6XweO0NBcjiphtVJVsIQ+SXF29z9DVkceeaSLVMFXHool+fdCZD4spDCfZJCILPILc3bm7Bc+HRi0nA==", + "integrity": "sha1-IrXH8xYzxbgCHH9KipVKwTnujVs=", "requires": { "invariant": "2.2.2", "loose-envify": "1.3.1", @@ -4830,7 +4938,7 @@ "hosted-git-info": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", - "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", + "integrity": "sha1-bWDjSzq7yDEwYsO3mO+NkBoHrzw=", "dev": true }, "html-comment-regex": { @@ -4969,7 +5077,7 @@ "ansi-styles": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "integrity": "sha1-wVm41b4PnlpvNG2rlPFs4CIWG4g=", "dev": true, "requires": { "color-convert": "1.9.0" @@ -4978,7 +5086,7 @@ "chalk": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "integrity": "sha1-tepI78nBeT3MybR2fJORTT8tUro=", "dev": true, "requires": { "ansi-styles": "3.2.0", @@ -5023,7 +5131,7 @@ "supports-color": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.1.0.tgz", - "integrity": "sha512-Ry0AwkoKjDpVKK4sV4h6o3UJmNRbjYm2uXhwfj3J56lMVdvnUNqzQVRztOOMGQ++w1K/TjNDFvpJk0F/LoeBCQ==", + "integrity": "sha1-BYoCHRthn33fOYDXEuo1kM5949U=", "dev": true, "requires": { "has-flag": "2.0.0" @@ -5031,11 +5139,6 @@ } } }, - "icu4c-data": { - "version": "0.59.2", - "resolved": "https://registry.npmjs.org/icu4c-data/-/icu4c-data-0.59.2.tgz", - "integrity": "sha1-Xf97e+4H/fp6ybtgHMe4gEaha+Y=" - }, "ieee754": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", @@ -5529,13 +5632,13 @@ "istanbul-lib-coverage": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz", - "integrity": "sha512-0+1vDkmzxqJIn5rcoEqapSB4DmPxE31EtI2dF2aCkV5esN9EWHxZ0dwgDClivMXJqE7zaYQxq30hj5L0nlTN5Q==", + "integrity": "sha1-c7+5mIhSmUFck9OKPprfeEp3qdo=", "dev": true }, "istanbul-lib-instrument": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.1.tgz", - "integrity": "sha512-RQmXeQ7sphar7k7O1wTNzVczF9igKpaeGQAG9qR2L+BS4DCJNTI9nytRmIVYevwO0bbq+2CXvJmYDuz0gMrywA==", + "integrity": "sha1-JQsws1MeXTJRKZ/dZLCyydtrVY4=", "dev": true, "requires": { "babel-generator": "6.26.0", @@ -5989,7 +6092,7 @@ "karma-babel-preprocessor": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/karma-babel-preprocessor/-/karma-babel-preprocessor-7.0.0.tgz", - "integrity": "sha512-k8YUot8ZAAYhAeUxOsOGUEXW7AlB6SkoIVGfavEBCAdGHzWuraOBoR2wCxxdePUCvcItIxSUyQnOj6DuZdEJYA==", + "integrity": "sha1-GHVtgY+XpeiPkZAmdM2RMBd6jc4=", "dev": true }, "karma-chai": { @@ -6048,7 +6151,7 @@ "ansi-styles": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "integrity": "sha1-wVm41b4PnlpvNG2rlPFs4CIWG4g=", "dev": true, "requires": { "color-convert": "1.9.0" @@ -6057,7 +6160,7 @@ "chalk": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "integrity": "sha1-tepI78nBeT3MybR2fJORTT8tUro=", "dev": true, "requires": { "ansi-styles": "3.2.0", @@ -6122,7 +6225,7 @@ "karma-webpack": { "version": "2.0.9", "resolved": "https://registry.npmjs.org/karma-webpack/-/karma-webpack-2.0.9.tgz", - "integrity": "sha512-F1j3IG/XhiMzcunAXbWXH95uizjzr3WdTzmVWlta8xqxcCtAu9FByCb4sccIMxaVFAefpgnUW9KlCo0oLvIX6A==", + "integrity": "sha1-YciAkffdkQY1E0wDKyZqRlr/tX8=", "dev": true, "requires": { "async": "0.9.2", @@ -6147,13 +6250,13 @@ "mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "integrity": "sha1-Ms2eXGRVO9WNGaVor0Uqz/BJgbE=", "dev": true }, "webpack-dev-middleware": { "version": "1.12.2", "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-1.12.2.tgz", - "integrity": "sha512-FCrqPy1yy/sN6U/SaEZcHKRXGlqU0DUaEBL45jkUYoB8foVb6wCnbIJ1HKIx+qUFTW+3JpVcCJCxZ8VATL4e+A==", + "integrity": "sha1-+PwRIM47T8VoDO7LQ9d3lmshEF4=", "dev": true, "requires": { "memory-fs": "0.4.1", @@ -6564,7 +6667,7 @@ "lru-cache": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", - "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", + "integrity": "sha1-Yi4y6CSItJJ5EUpPns9F581rulU=", "dev": true, "requires": { "pseudomap": "1.0.2", @@ -6674,7 +6777,7 @@ "material-ui": { "version": "0.20.0", "resolved": "https://registry.npmjs.org/material-ui/-/material-ui-0.20.0.tgz", - "integrity": "sha512-wkHkeU1SaGfCrtwIzBOl5vynNNNzVGW27ql0Ue5HZLB4WyRQ3YohJBdKa5lBrH5JD/Cgae7IzrP7cVWDyKpeLQ==", + "integrity": "sha1-hUEbtZyRbJx3A/Kdz/xE46Z9URE=", "requires": { "babel-runtime": "6.26.0", "inline-style-prefixer": "3.0.8", @@ -6925,7 +7028,7 @@ "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", "dev": true, "requires": { "brace-expansion": "1.1.8" @@ -6975,7 +7078,7 @@ "mocha": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/mocha/-/mocha-4.1.0.tgz", - "integrity": "sha512-0RVnjg1HJsXY2YFDoTNzcc1NKhYuXKRrBAG2gDygmJJA136Cs2QlRliZG1mA0ap7cuaT30mw16luAeln+4RiNA==", + "integrity": "sha1-fYbPvPNcuCnidUwy4XNV7AUzh5Q=", "dev": true, "requires": { "browser-stdout": "1.3.0", @@ -6993,7 +7096,7 @@ "commander": { "version": "2.11.0", "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", - "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", + "integrity": "sha1-FXFS/R56bI2YpbcVzzdt+SgARWM=", "dev": true }, "debug": { @@ -7026,7 +7129,7 @@ "supports-color": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", - "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "integrity": "sha1-iD992rwWUUKyphQn8zUt7RldGj4=", "dev": true, "requires": { "has-flag": "2.0.0" @@ -7342,7 +7445,7 @@ "normalize-package-data": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "integrity": "sha1-EvlaMH1YNSB1oEkHuErIvpisAS8=", "dev": true, "requires": { "hosted-git-info": "2.5.0", @@ -7436,7 +7539,7 @@ "nyc": { "version": "11.4.1", "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.4.1.tgz", - "integrity": "sha512-5eCZpvaksFVjP2rt1r60cfXmt3MUtsQDw8bAzNqNEr4WLvUMLgiVENMf/B9bE9YAX0mGVvaGA3v9IS9ekNqB1Q==", + "integrity": "sha1-E/335+8i0CfGHRdHWPaXimj09eU=", "dev": true, "requires": { "archy": "1.0.0", @@ -9842,7 +9945,7 @@ "ansi-styles": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "integrity": "sha1-wVm41b4PnlpvNG2rlPFs4CIWG4g=", "dev": true, "requires": { "color-convert": "1.9.0" @@ -9900,7 +10003,7 @@ "ansi-styles": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "integrity": "sha1-wVm41b4PnlpvNG2rlPFs4CIWG4g=", "dev": true, "requires": { "color-convert": "1.9.0" @@ -9980,7 +10083,7 @@ "ansi-styles": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "integrity": "sha1-wVm41b4PnlpvNG2rlPFs4CIWG4g=", "dev": true, "requires": { "color-convert": "1.9.0" @@ -10060,7 +10163,7 @@ "ansi-styles": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "integrity": "sha1-wVm41b4PnlpvNG2rlPFs4CIWG4g=", "dev": true, "requires": { "color-convert": "1.9.0" @@ -10261,7 +10364,7 @@ "promise": { "version": "7.3.1", "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "integrity": "sha1-BktyYCsY+Q8pGSuLG8QY/9Hr078=", "requires": { "asap": "2.0.6" } @@ -10467,7 +10570,7 @@ "randomatic": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", - "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "integrity": "sha1-x6vpzIuHwLqodrGf3oP9RkeX44w=", "dev": true, "requires": { "is-number": "3.0.0", @@ -10508,7 +10611,7 @@ "randombytes": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.5.tgz", - "integrity": "sha512-8T7Zn1AhMsQ/HI1SjcCfT/t4ii3eAqco3yOcSzS4mozsOz69lHLsoMXmF9nZgnFanYscnSlUSgs8uZyKzpE6kg==", + "integrity": "sha1-3ACaJGuNCaF3tLegrne8Vw9LG3k=", "dev": true, "requires": { "safe-buffer": "5.1.1" @@ -10546,7 +10649,7 @@ "react": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/react/-/react-16.2.0.tgz", - "integrity": "sha512-ZmIomM7EE1DvPEnSFAHZn9Vs9zJl5A9H7el0EGTE6ZbW9FKe/14IYAlPbC8iH25YarEQxZL+E8VW7Mi7kfQrDQ==", + "integrity": "sha1-oxvS2rib/2XUITT6GH8k0FTCc7o=", "requires": { "fbjs": "0.8.16", "loose-envify": "1.3.1", @@ -10583,7 +10686,7 @@ "react-dom": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.2.0.tgz", - "integrity": "sha512-zpGAdwHVn9K0091d+hr+R0qrjoJ84cIBFL2uU60KvWBPfZ7LPSrfqviTxGHWN0sjPZb2hxWzMexwrvJdKePvjg==", + "integrity": "sha1-aQAxeGAcDKGbcJszqDNp/mEkwEQ=", "requires": { "fbjs": "0.8.16", "loose-envify": "1.3.1", @@ -10615,7 +10718,7 @@ "react-hot-loader": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-3.1.3.tgz", - "integrity": "sha512-d7nZf78irxoGN5PY4zd6CSgZiroOhvIWzRast3qwTn4sSnBwlt08kV8WMQ9mitmxEdlCTwZt+5ClrRSjxWguMQ==", + "integrity": "sha1-b5KHcyaVjHywE0tRJHRReGkSYII=", "requires": { "global": "4.3.2", "react-deep-force-update": "2.1.1", @@ -10677,7 +10780,7 @@ "react-redux": { "version": "5.0.6", "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-5.0.6.tgz", - "integrity": "sha512-8taaaGu+J7PMJQDJrk/xiWEYQmdo3mkXw6wPr3K3LxvXis3Fymiq7c13S+Tpls/AyNUAsoONkU81AP0RA6y6Vw==", + "integrity": "sha1-I+06T5hjWdaLUhLqqmgeYNZXSUY=", "requires": { "hoist-non-react-statics": "2.3.1", "invariant": "2.2.2", @@ -10697,7 +10800,7 @@ "react-router": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/react-router/-/react-router-4.2.0.tgz", - "integrity": "sha512-DY6pjwRhdARE4TDw7XjxjZsbx9lKmIcyZoZ+SDO7SBJ1KUeWNxT22Kara2AC7u6/c2SYEHlEDLnzBCcNhLE8Vg==", + "integrity": "sha1-Yfez43cNrrJAYtrj7t7xsFQVWYY=", "requires": { "history": "4.7.2", "hoist-non-react-statics": "2.3.1", @@ -10731,7 +10834,7 @@ "react-router-dom": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-4.2.2.tgz", - "integrity": "sha512-cHMFC1ZoLDfEaMFoKTjN7fry/oczMgRt5BKfMAkTu5zEuJvUiPp1J8d0eXSVTnBh6pxlbdqDhozunOOLtmKfPA==", + "integrity": "sha1-yKgd863Fi7qKdngulGy9Tq5km40=", "requires": { "history": "4.7.2", "invariant": "2.2.2", @@ -10752,7 +10855,7 @@ "react-test-renderer": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-16.2.0.tgz", - "integrity": "sha512-Kd4gJFtpNziR9ElOE/C23LeflKLZPRpNQYWP3nQBY43SJ5a+xyEGSeMrm2zxNKXcnCbBS/q1UpD9gqd5Dv+rew==", + "integrity": "sha1-vd8lmmuPzYVV8BKvyOrMI4hyohE=", "requires": { "fbjs": "0.8.16", "object-assign": "4.1.1", @@ -10813,7 +10916,7 @@ "readable-stream": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "integrity": "sha1-No8lEtefnUb9/HE0mueHi7weuVw=", "requires": { "core-util-is": "1.0.2", "inherits": "2.0.3", @@ -10859,7 +10962,7 @@ "redbox-react": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/redbox-react/-/redbox-react-1.5.0.tgz", - "integrity": "sha512-mdxArOI3sF8K5Nay5NG+lv/VW516TbXjjd4h1wcV1Iy4IMDQPnCayjoQXBAycAFSME4nyXRUXCjHxsw2rYpVRw==", + "integrity": "sha1-BNqxFVfSZlG/NWKmfCKs5WxdOWc=", "requires": { "error-stack-parser": "1.3.6", "object-assign": "4.1.1", @@ -10942,7 +11045,7 @@ "redux": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/redux/-/redux-3.7.2.tgz", - "integrity": "sha512-pNqnf9q1hI5HHZRBkj3bAngGZW/JMCmexDlOxw4XagXY2o1327nHH54LoTjiPJ0gizoqPDRqWyX/00g0hD6w+A==", + "integrity": "sha1-BrcxIyFZAdJdBlvjQusCa8HIU3s=", "requires": { "lodash": "4.17.4", "lodash-es": "4.17.4", @@ -10953,7 +11056,7 @@ "redux-mock-store": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/redux-mock-store/-/redux-mock-store-1.4.0.tgz", - "integrity": "sha512-y+SGh/SONWwqs4DiyHjd0H6NMgz368wXDiUjSHuOnMEr4dN9PmjV6N3bNvxoILaIQ7zeVKclLyxsCQ2TwGZfEw==", + "integrity": "sha1-zch2UPV1nyk1iP7MnKwrBX2VGQ0=", "requires": { "lodash.isplainobject": "4.0.6" } @@ -10961,12 +11064,12 @@ "redux-persist": { "version": "5.4.0", "resolved": "https://registry.npmjs.org/redux-persist/-/redux-persist-5.4.0.tgz", - "integrity": "sha512-Ohp7g5WRx2rDyDk/bKKCgbD3ES6ahGPWxFEp3QPx2opwst0jJEbZKigZtQewUeJZnomN/7Zo3QglPDOZ6EdYEw==" + "integrity": "sha1-oQYjE1RqnUym+ScUZNGPc26Mo5Q=" }, "redux-persist-transform-filter": { "version": "0.0.16", "resolved": "https://registry.npmjs.org/redux-persist-transform-filter/-/redux-persist-transform-filter-0.0.16.tgz", - "integrity": "sha512-P7vBmrhOlGWO6Qtw1VoJ2cPzlb4PdPtJjppcJK0uSmcg5TCYxBVla27mxBZzday4CCy0wsYqDq+UI/1E84Yk9Q==", + "integrity": "sha1-DCHcFmd0wS+z8JD3ovXqkPe6DOo=", "requires": { "lodash.forin": "4.4.0", "lodash.get": "4.4.2", @@ -10995,7 +11098,7 @@ "regenerator-transform": { "version": "0.10.1", "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", - "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==", + "integrity": "sha1-HkmWg3Ix2ot/PPQRTXG1aRoGgN0=", "dev": true, "requires": { "babel-runtime": "6.26.0", @@ -11006,7 +11109,7 @@ "regex-cache": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "integrity": "sha1-db3FiioUls7EihKDW8VMjVYjNt0=", "dev": true, "requires": { "is-equal-shallow": "0.1.3" @@ -11185,7 +11288,7 @@ "resolve-pathname": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-2.2.0.tgz", - "integrity": "sha512-bAFz9ld18RzJfddgrO2e/0S2O81710++chRMUxHjXOYKF6jTAMrUNZrEZ1PvV0zlhfjidm08iRPdTLPno1FuRg==" + "integrity": "sha1-fpriHtgV/WOrGJre7mTcgx7vqHk=" }, "restore-cursor": { "version": "1.0.1", @@ -11220,7 +11323,7 @@ "rimraf": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "integrity": "sha1-LtgVDSShbqhlHm1u8PR8QVjOejY=", "dev": true, "requires": { "glob": "7.1.2" @@ -11279,12 +11382,12 @@ "safe-buffer": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + "integrity": "sha1-iTMSr2myEj3vcfV4iQAWce6yyFM=" }, "sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk=", "dev": true }, "schema-utils": { @@ -11492,7 +11595,7 @@ "source-list-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", - "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==", + "integrity": "sha1-qqR0A/eyRakvvJfqCPJQ1gh+0IU=", "dev": true }, "source-map": { @@ -11513,7 +11616,7 @@ "sourcemapped-stacktrace": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/sourcemapped-stacktrace/-/sourcemapped-stacktrace-1.1.8.tgz", - "integrity": "sha512-OkVoI7GQOLl/laR1qsSo1c87tS8kF2VXhQq2SrQCDdXufBAcm8FgXogWso96ciMYoDtTw1Dn70CVdwYzoYs6Pg==", + "integrity": "sha1-a3o/Gm+xX21A5wHiPOQEVTSA1og=", "requires": { "source-map": "0.5.6" }, @@ -11579,7 +11682,7 @@ "ssri": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.0.0.tgz", - "integrity": "sha512-728D4yoQcQm1ooZvSbywLkV1RjfITZXh0oWrhM/lnsx3nAHx7LsRGJWB/YyvoceAYRq98xqbstiN4JBv1/wNHg==", + "integrity": "sha1-E8GTkLYGyCHyoQ0Cs1HBcpuU2M8=", "dev": true, "requires": { "safe-buffer": "5.1.1" @@ -11753,7 +11856,7 @@ "stream-http": { "version": "2.7.2", "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.7.2.tgz", - "integrity": "sha512-c0yTD2rbQzXtSsFSVhtpvY/vS6u066PcXOX9kBB3mSO76RiUQzL340uJkGBWnlBg4/HZzqiUXtaVA7wcRcJgEw==", + "integrity": "sha1-QKBQ7I3DtTsz2ZCUFcAsC/Gr+60=", "dev": true, "requires": { "builtin-status-codes": "3.0.0", @@ -11821,7 +11924,7 @@ "string_decoder": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=", "requires": { "safe-buffer": "5.1.1" } @@ -11871,7 +11974,7 @@ "style-loader": { "version": "0.19.1", "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.19.1.tgz", - "integrity": "sha512-IRE+ijgojrygQi3rsqT0U4dd+UcPCqcVvauZpCnQrGAlEe+FUIyrK93bUDScamesjP08JlQNsFJU+KmPedP5Og==", + "integrity": "sha1-WR/8gLzv4mi3fF2evAUF13Jhn4U=", "dev": true, "requires": { "loader-utils": "1.1.0", @@ -12013,7 +12116,7 @@ "test-exclude": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-4.1.1.tgz", - "integrity": "sha512-35+Asrsk3XHJDBgf/VRFexPgh3UyETv8IAn/LRTiZjVy6rjPVqdEk8dJcJYBzl1w0XCJM48lvTy8SfEsCWS4nA==", + "integrity": "sha1-TYSWSwlmsAh+zDNKLOAC09k0HiY=", "dev": true, "requires": { "arrify": "1.0.1", @@ -12428,7 +12531,7 @@ "url-loader": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-0.6.2.tgz", - "integrity": "sha512-h3qf9TNn53BpuXTTcpC+UehiRrl0Cv45Yr/xWayApjw6G8Bg2dGke7rIwDQ39piciWCWrC+WiqLjOh3SUp9n0Q==", + "integrity": "sha1-oAenEJYg6dmI0UvOZ3od7Lmpk/c=", "dev": true, "requires": { "loader-utils": "1.1.0", @@ -12510,7 +12613,7 @@ "uuid": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", - "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==", + "integrity": "sha1-PdPT55Crwk17DToDT/q6vijrvAQ=", "dev": true }, "uws": { @@ -12542,7 +12645,7 @@ "value-equal": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-0.4.0.tgz", - "integrity": "sha512-x+cYdNnaA3CxvMaTX0INdTCN8m8aF2uY9BvEqmxuYp8bL09cs/kWVQPVGcA35fMktdOsP69IgU7wFj/61dJHEw==" + "integrity": "sha1-xb3S9U7gk8BIOdcc4uR1imiQq8c=" }, "vendors": { "version": "1.0.1", @@ -12595,7 +12698,7 @@ "webpack": { "version": "3.10.0", "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.10.0.tgz", - "integrity": "sha512-fxxKXoicjdXNUMY7LIdY89tkJJJ0m1Oo8PQutZ5rLgWbV5QVKI15Cn7+/IHnRTd3vfKfiwBx6SBqlorAuNA8LA==", + "integrity": "sha1-UpG4dQeM8qv0K90jr+P4+WwX1yU=", "dev": true, "requires": { "acorn": "5.3.0", @@ -12625,7 +12728,7 @@ "acorn": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.3.0.tgz", - "integrity": "sha512-Yej+zOJ1Dm/IMZzzj78OntP/r3zHEaKcyNoU2lAaxPtrseM6rF0xwqoz5Q5ysAiED9hTjI2hgtvLXitlCN1/Ug==", + "integrity": "sha1-dEbTlFnFT7SagObuZHgUm5QOyCI=", "dev": true }, "ajv": { @@ -12964,7 +13067,7 @@ "webpack-hot-middleware": { "version": "2.21.0", "resolved": "https://registry.npmjs.org/webpack-hot-middleware/-/webpack-hot-middleware-2.21.0.tgz", - "integrity": "sha512-P6xiOLy10QlSVSO7GanU9PLxN6zLLQ7RG16MPTvmFwf2KUG7jMp6m+fmdgsR7xoaVVLA7OlX3YO6JjoZEKjCuA==", + "integrity": "sha1-ezwROnpLMByR4HSVc8eqsotBS1I=", "dev": true, "requires": { "ansi-html": "0.0.7", @@ -12988,7 +13091,7 @@ "ansi-styles": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", - "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "integrity": "sha1-wVm41b4PnlpvNG2rlPFs4CIWG4g=", "dev": true, "requires": { "color-convert": "1.9.0" @@ -12997,7 +13100,7 @@ "chalk": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", - "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "integrity": "sha1-tepI78nBeT3MybR2fJORTT8tUro=", "dev": true, "requires": { "ansi-styles": "3.2.0", @@ -13082,7 +13185,7 @@ "which": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", - "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", + "integrity": "sha1-/wS9/AEO5UfXgL7DjhrBwnd9JTo=", "dev": true, "requires": { "isexe": "2.0.0" diff --git a/package.json b/package.json index cfe253f..babf441 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,7 @@ "main": "", "scripts": { "clean": "rimraf dist/*", - "copy": "copyfiles -f ./src/index.html ./src/favicon.ico ./dist", - "dist": "npm run copy & webpack --env=dist", + "dist": "npm run clean && cross-env NODE_ENV=dist webpack --env=dist --progress --profile --colors --display-error-details --display-reasons --debug", "lint": "standard \"src/**/*.js\"", "lint:fix": "standard --fix \"src/**/*.js\"", "posttest": "npm run lint", @@ -82,6 +81,7 @@ "babel-preset-env": "^1.6.1", "babel-preset-react": "^6.24.1", "chai": "^4.1.2", + "copy-webpack-plugin": "^4.3.1", "copyfiles": "^1.2.0", "cross-env": "^5.1.3", "css-loader": "^0.28.7", diff --git a/src/actions/eventActions.js b/src/actions/eventActions.js index 93804f2..e5c8218 100644 --- a/src/actions/eventActions.js +++ b/src/actions/eventActions.js @@ -1,6 +1,8 @@ import { DateTime } from 'luxon' + import { paginationActions, updatePagination, reduxBackedPromise } from 'actions/actionHelpers' import * as filterActions from 'actions/filterActions' +import * as notificationActions from 'actions/notificationActions' export const EVENTS = 'EVENTS' export const REQUEST_EVENT = 'REQUEST_EVENT' @@ -62,6 +64,11 @@ export const getEventActionSet = (incidentId, eventId) => ({ }), succeed: (event) => (dispatch) => { + dispatch(notificationActions.emitNotification({ + event, + incidentId: event.incidentId + })) + dispatch({ type: RECEIVE_EVENT, event, diff --git a/src/actions/notificationActions.js b/src/actions/notificationActions.js new file mode 100644 index 0000000..9eb30da --- /dev/null +++ b/src/actions/notificationActions.js @@ -0,0 +1,36 @@ +export const NOTIFICATIONS_READ = 'NOTIFICATIONS_READ' +export const EMIT_NOTIFICATION = 'EMIT_NOTIFICATION' +export const NOTIFICATION_EMITTED = 'NOTIFICATION_EMITTED' +export const TOGGLE_RECEIVE_PUSH_NOTIFICATIONS = 'TOGGLE_RECEIVE_PUSH_NOTIFICATIONS' +export const NOTIFICATION_CLICKED = 'NOTIFICATION_CLICKED' +export const NOTIFICATION_REMOVED = 'NOTIFICATION_REMOVED' + +export const notificationClicked = (notificationId, buttonIndex) => ({ + type: NOTIFICATION_CLICKED, + notificationId, + buttonIndex +}) + +export const notificationRemoved = (notificationId) => ({ + type: NOTIFICATION_REMOVED, + notificationId +}) + +export const notificationEmitted = (eventId, notificationId, buttonActions) => ({ + type: NOTIFICATION_EMITTED, + eventId, + notificationId, + buttonActions +}) + +export const emitNotification = (notification) => ({ + type: EMIT_NOTIFICATION, + notification +}) + +export const toggleReceivePushNotifications = (enable) => ({ + type: TOGGLE_RECEIVE_PUSH_NOTIFICATIONS, + enable +}) + +export const notificationsRead = { type: NOTIFICATIONS_READ } diff --git a/src/components/Extension/ExtensionBadge.js b/src/components/Extension/ExtensionBadge.js new file mode 100644 index 0000000..7796edf --- /dev/null +++ b/src/components/Extension/ExtensionBadge.js @@ -0,0 +1,10 @@ +import { Component } from 'react' + +class ExtensionBadge extends Component { + render () { + chrome.browserAction.setBadgeText({ text: this.props.text }) + return null + } +} + +export default ExtensionBadge diff --git a/src/components/Extension/Notification.js b/src/components/Extension/Notification.js new file mode 100644 index 0000000..2260a9f --- /dev/null +++ b/src/components/Extension/Notification.js @@ -0,0 +1,84 @@ +import { Component } from 'react' +import { connect } from 'react-redux' + +import config from 'config' +import { fillTemplate, LoadTextFromEvent } from 'services/playbookService' +import { notificationEmitted } from 'actions/notificationActions' + +export class Notification extends Component { + componentDidMount () { + if (!this.props.isEmitted) { + this.createNotification() + } + } + + render () { + if (this.props.isClicked) { + this.handleClicks() + } + return null + } + + handleClicks () { + const { buttonActions, buttonIndex } = this.props + const buttonAction = buttonIndex != null + ? buttonActions[buttonIndex] + : buttonActions.find(buttonAction => buttonAction.default) + if (buttonAction) { + chrome.tabs.create({ url: buttonAction.url }) + } + } + + createNotification () { + const { notificationEmitted, event } = this.props + const buttonActions = this.createButtonActions() + const notificationBody = this.createNotificationBody(buttonActions) + chrome.notifications.create(notificationBody, (notificationId) => { + notificationEmitted(event.id, notificationId, buttonActions) + }) + } + + createNotificationBody (buttonActions) { + const { event, ticket, eventType, engagement } = this.props + const severity = ticket.data ? ticket.data.severity : null + const title = ticket.data ? ticket.data.title : null + return { + type: 'basic', + iconUrl: `/static/sia-blue-icon-128.png`, + title: `${ticket.originId} | ${ticket.status} ${severity ? '| Sev ' + severity : ''}`, + message: LoadTextFromEvent(event, eventType, ticket, engagement), + contextMessage: title || `SRE Incident Assistant | Event ID: ${event.id}`, + // Only two buttons allowed in chrome notifications + buttons: buttonActions.slice(0, 2).map(buttonAction => ({ + title: buttonAction.title, + iconUrl: '/static/sia-green-icon-128.png' + })) + } + } + + createButtonActions () { + const { actions, event, ticket, eventType, engagement } = this.props + const ticketSystem = config.ticketSystems[ticket.ticketSystemId || 1] + const defaultActions = [{ + title: 'Open in SIA', + url: `${config.eventUiUrl}tickets/${ticket.originId}`, + default: true + }, { + title: `Open in ${ticketSystem.name}`, + url: `${ticketSystem.ticketUriPrefix}${ticket.originId}${ticketSystem.ticketUriSuffix}` + }] + const playbookActions = actions + ? actions.filter(action => action.actionTemplate.isUrl) + .map(action => ({ + title: `${action.name}: ${action.actionTemplate.name}`, + url: fillTemplate(action.actionTemplate, event, ticket, eventType, engagement) + })) : [] + return playbookActions.concat(defaultActions) + } +} + +const mapDispatchToProps = { + notificationEmitted +} + +export default connect(null, mapDispatchToProps)(Notification) diff --git a/src/components/Extension/Notifications.js b/src/components/Extension/Notifications.js new file mode 100644 index 0000000..47cc194 --- /dev/null +++ b/src/components/Extension/Notifications.js @@ -0,0 +1,85 @@ +import React, { Component } from 'react' +import { connect } from 'react-redux' + +import * as incidentActions from 'actions/incidentActions' + +import ExtensionBadge from 'components/Extension/ExtensionBadge' +import Notification from 'components/Extension/Notification' + +class Notifications extends Component { + componentDidUpdate () { + if (!this.props.enabled) { + return + } + + this.fetchIncidentsIfNeeded() + } + + fetchIncidentsIfNeeded () { + const { notifications, incidents, incidentsFetching, fetchIncident } = this.props + const incidentIds = [...new Set(notifications.map(n => n.incidentId))] + incidentIds.forEach(incidentId => { + const incidentIsLoaded = incidents[incidentId] + const incidentIsFetching = incidentsFetching.includes(incidentId) + if (incidentIsLoaded || incidentIsFetching) { + return + } + fetchIncident(incidentId) + }) + } + + render () { + const { enabled, notifications, unreadCount, eventTypes, incidents } = this.props + + if (!enabled || unreadCount === 0) { + return + } + + const notificationsToRender = notifications.filter(n => incidents[n.incidentId]) + .map(notification => { + const eventType = eventTypes[notification.event.eventTypeId] + const actions = eventType ? eventType.actions : null + const ticket = incidents[notification.incidentId].primaryTicket + const engagement = null // TODO + + return + }) + + return ( +
+ 99 ? '99+' : unreadCount.toString()} /> + { notificationsToRender } +
) + } +} + +export const mapStateToProps = (state) => { + const enabled = state.notifications.options.receivePushNotificationsEnabled + + if (!enabled) { + return { enabled } + } + + return { + enabled, + notifications: state.notifications.list, + unreadCount: state.notifications.unreadCount, + eventTypes: state.eventTypes.records, + incidents: state.incidents.map, + engagements: state.engagements.list, + incidentsFetching: state.incidents.fetchingByIncidentId + } +} + +const mapDispatchToProps = { + fetchIncident: incidentActions.fetchIncident +} + +export default connect(mapStateToProps, mapDispatchToProps)(Notifications) diff --git a/src/components/MainComponent.js b/src/components/MainComponent.js index 262e4e9..6d52cfe 100644 --- a/src/components/MainComponent.js +++ b/src/components/MainComponent.js @@ -14,6 +14,8 @@ import incidentRedirect from 'components/Incident/incidentRedirect' import Home from 'components/Home' import TopNav from 'components/TopNav/TopNav' import Debug from 'components/Debug' +import { isChromeExtensionBackground } from 'services/notificationService' +import Notifications from 'components/Extension/Notifications' const history = createBrowserHistory() @@ -27,6 +29,7 @@ export default class MainComponent extends React.Component {
+ { isChromeExtensionBackground() ? : null } diff --git a/src/config/index.js b/src/config/index.js index 6996aca..5670842 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -1,16 +1,12 @@ let config -try { + +if (typeof constants !== 'undefined') { // The global 'constants' is being defined by Webpack in /cfg/[dev|dist|test|localhost].js // eslint-disable-next-line no-undef config = constants -} catch (ex) { // required for Travis and Code Coverage - try { - const testConstants = require('../../cfg/test.const.js') - config = testConstants.default || testConstants - } catch (ex) { - const defaultConstants = require('../../cfg/defaultConstants') - config = defaultConstants.default || defaultConstants - } +} else { + const defaultConstants = require('../../cfg/defaultConstants') + config = defaultConstants.default || defaultConstants } export default config diff --git a/src/configureStore.js b/src/configureStore.js index 6587067..f1d7f46 100644 --- a/src/configureStore.js +++ b/src/configureStore.js @@ -5,6 +5,7 @@ import { ListenForScreenSize } from 'actions/styleActions' import incidentApp from 'reducers' import { persistStore } from 'redux-persist' import { getFilterFromUrl } from 'actions/filterActions' +import { configureNotificationService } from 'services/notificationService' const urlFilter = getFilterFromUrl(window.location.search) const reducer = incidentApp(urlFilter) @@ -15,4 +16,6 @@ export const persistor = persistStore(store) establishSignalRConnection(store.dispatch) +configureNotificationService(store.dispatch) + ListenForScreenSize(window, store) diff --git a/dist/assets/extension.html b/src/extensionHooks/extension.html similarity index 78% rename from dist/assets/extension.html rename to src/extensionHooks/extension.html index 7747273..5fe16b8 100644 --- a/dist/assets/extension.html +++ b/src/extensionHooks/extension.html @@ -6,9 +6,10 @@ +
APPLICATION CONTENT
- + diff --git a/src/extensionHooks/manifest.json b/src/extensionHooks/manifest.json new file mode 100644 index 0000000..60d3fea --- /dev/null +++ b/src/extensionHooks/manifest.json @@ -0,0 +1,33 @@ +{ + "name": "SIA", + "description": "SRE Incident Assistant", + "version": "0.0.0.3", + "icons": { + "128": "/static/sia-blue-icon-128.png", + "24": "/static/sia-blue-icon-24.png", + "19": "/static/sia-blue-icon-19.png", + "16": "/static/sia-blue-icon-16.png" + }, + "manifest_version": 2, + "browser_action": { + "default_icon": { + "128": "/static/sia-blue-icon-128.png", + "24": "/static/sia-blue-icon-24.png", + "19": "/static/sia-blue-icon-19.png", + "16": "/static/sia-blue-icon-16.png" + }, + "default_popup": "/extension.html" + }, + "background": { + "page": "/extension.html" + }, + "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'", + "author": "microsoft", + "permissions": [ + "contextMenus", + "notifications", + "identity", + "tabs", + "https://*/" + ] +} diff --git a/src/favicon.ico b/src/favicon.ico deleted file mode 100644 index d50d918..0000000 Binary files a/src/favicon.ico and /dev/null differ diff --git a/src/index.html b/src/index.html index 4c09631..8494b3d 100644 --- a/src/index.html +++ b/src/index.html @@ -7,10 +7,10 @@ +
APPLICATION CONTENT
- diff --git a/src/reducers/index.js b/src/reducers/index.js index de9e529..9486847 100644 --- a/src/reducers/index.js +++ b/src/reducers/index.js @@ -9,6 +9,7 @@ import signalR from 'reducers/signalRReducer' import forms from 'reducers/formReducer' import eventTypes from 'reducers/eventTypeReducer' import globalActions from 'reducers/globalActionReducer' +import notifications from 'reducers/notificationReducer' const rootReducer = (filters) => combineReducers({ incidents, @@ -20,7 +21,8 @@ const rootReducer = (filters) => combineReducers({ expandSection, signalR, eventTypes, - globalActions + globalActions, + notifications }) export default rootReducer diff --git a/src/reducers/notificationReducer.js b/src/reducers/notificationReducer.js new file mode 100644 index 0000000..63ba6f2 --- /dev/null +++ b/src/reducers/notificationReducer.js @@ -0,0 +1,65 @@ +import { combineReducers } from 'redux' +import * as notificationActions from 'actions/notificationActions' + +const notificationOptionsInitialState = { + receivePushNotificationsEnabled: true +} + +export function notificationOptionsReducer (state = notificationOptionsInitialState, action) { + switch (action.type) { + case notificationActions.TOGGLE_RECEIVE_PUSH_NOTIFICATIONS: + return { + ...state, + receivePushNotificationsEnabled: action.enable + } + default: + return state + } +} + +const unreadNotificationCountInitialState = 0 + +export function unreadNotificationCountReducer (state = unreadNotificationCountInitialState, action) { + switch (action.type) { + case notificationActions.EMIT_NOTIFICATION: + return state + 1 + case notificationActions.NOTIFICATIONS_READ: + return 0 + default: + return state + } +} + +const notificationListInitialState = [] + +export function notificationListReducer (state = notificationListInitialState, action) { + switch (action.type) { + case notificationActions.EMIT_NOTIFICATION: + return state.concat(action.notification) + case notificationActions.NOTIFICATION_EMITTED: + return state.map(notification => + notification.event.id === action.eventId + ? { + ...notification, + notificationId: action.notificationId, + isEmitted: true, + buttonActions: action.buttonActions + } + : notification) + case notificationActions.NOTIFICATION_CLICKED: + return state.map(notification => + notification.notificationId === action.notificationId + ? { ...notification, isClicked: true, buttonIndex: action.buttonIndex } + : notification) + case notificationActions.NOTIFICATION_REMOVED: + return state.filter(notification => notification.notificationId !== action.notificationId) + default: + return state + } +} + +export default combineReducers({ + options: notificationOptionsReducer, + unreadCount: unreadNotificationCountReducer, + list: notificationListReducer +}) diff --git a/src/services/notificationService.js b/src/services/notificationService.js new file mode 100644 index 0000000..82c0fc0 --- /dev/null +++ b/src/services/notificationService.js @@ -0,0 +1,73 @@ +import * as actions from 'actions/notificationActions' + +export const extensionMessages = { + popupOnLoad: 'SIA_EXTENSION_POPUP_ON_LOAD' +} + +export const isChromeExtension = () => typeof chrome !== 'undefined' && + typeof window !== 'undefined' && + chrome.extension != null && + chrome.extension.getBackgroundPage != null + +export const isChromeExtensionBackground = () => isChromeExtension() && + chrome.extension.getBackgroundPage() === window + +export const isChromeExtensionPopup = () => isChromeExtension() && + chrome.extension.getBackgroundPage() !== window + +export const configureNotificationService = (dispatch) => { + if (isChromeExtensionPopup()) { + sendPopupLoadEvent() + } + + if (isChromeExtensionBackground()) { + chrome.browserAction.setBadgeBackgroundColor({ color: '#FFB900' }) + registerExtensionListeners(dispatch) + createContextMenus() + } +} + +export const createContextMenus = () => { + chrome.contextMenus.removeAll() + chrome.contextMenus.create({ + id: actions.TOGGLE_RECEIVE_PUSH_NOTIFICATIONS, + type: 'checkbox', + checked: true, + title: 'Receive Push Notifications', + contexts: ['all'] + }) +} + +export const sendPopupLoadEvent = () => { + chrome.runtime.sendMessage({ messageId: extensionMessages.popupOnLoad }) +} + +export const registerExtensionListeners = (dispatch) => { + chrome.runtime.onMessage.addListener((request, sender) => { + if (request.messageId === extensionMessages.popupOnLoad) { + dispatch(actions.notificationsRead) + } + }) + + chrome.contextMenus.onClicked.addListener((info, tab) => { + switch (info.menuItemId) { + case actions.TOGGLE_RECEIVE_PUSH_NOTIFICATIONS: + dispatch(actions.toggleReceivePushNotifications(info.checked)) + break + default: + break + } + }) + + chrome.notifications.onClicked.addListener((notificationId) => { + dispatch(actions.notificationClicked(notificationId)) + }) + + chrome.notifications.onButtonClicked.addListener((notificationId, buttonIndex) => { + dispatch(actions.notificationClicked(notificationId, buttonIndex)) + }) + + chrome.notifications.onClosed.addListener(notificationId => { + dispatch(actions.notificationRemoved(notificationId)) + }) +} diff --git a/src/static/favicon.ico b/src/static/favicon.ico new file mode 100644 index 0000000..1485bfd Binary files /dev/null and b/src/static/favicon.ico differ diff --git a/src/static/sia-blue-icon-128.png b/src/static/sia-blue-icon-128.png new file mode 100644 index 0000000..4ae9fb4 Binary files /dev/null and b/src/static/sia-blue-icon-128.png differ diff --git a/src/static/sia-blue-icon-16.png b/src/static/sia-blue-icon-16.png new file mode 100644 index 0000000..8af18cb Binary files /dev/null and b/src/static/sia-blue-icon-16.png differ diff --git a/src/static/sia-blue-icon-19.png b/src/static/sia-blue-icon-19.png new file mode 100644 index 0000000..61814e6 Binary files /dev/null and b/src/static/sia-blue-icon-19.png differ diff --git a/src/static/sia-blue-icon-24.png b/src/static/sia-blue-icon-24.png new file mode 100644 index 0000000..b6eb341 Binary files /dev/null and b/src/static/sia-blue-icon-24.png differ diff --git a/src/static/sia-green-icon-128.png b/src/static/sia-green-icon-128.png new file mode 100644 index 0000000..ff0f47e Binary files /dev/null and b/src/static/sia-green-icon-128.png differ diff --git a/src/static/sia-orange-icon-128.png b/src/static/sia-orange-icon-128.png new file mode 100644 index 0000000..12ab824 Binary files /dev/null and b/src/static/sia-orange-icon-128.png differ diff --git a/src/static/sia-yellow-icon-128.png b/src/static/sia-yellow-icon-128.png new file mode 100644 index 0000000..9061311 Binary files /dev/null and b/src/static/sia-yellow-icon-128.png differ diff --git a/test/components/Extension/NotificationTest.js b/test/components/Extension/NotificationTest.js new file mode 100644 index 0000000..d622e86 --- /dev/null +++ b/test/components/Extension/NotificationTest.js @@ -0,0 +1,170 @@ +import { expect } from 'chai' +import React from 'react' +import { shallow } from 'enzyme' +import 'test/helpers/configureEnzyme' +import { Notification } from 'components/Extension/Notification' + +/* eslint-disable no-unused-expressions */ +describe('Notification component', function () { + const originalWindow = global.window + const originalChrome = global.chrome + + after(function () { + // Since we are messing with global objects we need to reset them back to the original + // objects to avoid impacting other test suites. + global.window = originalWindow + global.chrome = originalChrome + }) + + beforeEach(function () { + global.window = {} + global.chrome = {} + }) + + const baseProps = { + event: { id: 'eventId0' }, + actions: [], + engagement: {}, + eventType: {}, + ticket: {} + } + + context('when not emitted yet', function () { + it('should create a notification', function () { + let notificationBodyResult + global.chrome = { + notifications: { + create: notificationBody => { notificationBodyResult = notificationBody } + } + } + shallow() + expect(notificationBodyResult).to.not.be.undefined + }) + + it('should dispatch notificationEmitted', function () { + global.chrome = { + notifications: { + create: (body, afterCreate) => { afterCreate('notificationId0') } + } + } + let eventIdResult + let notificationIdResult + let buttonActionsResult + + const props = { + ...baseProps, + notificationEmitted: (eventId, notificationId, buttonActions) => { + eventIdResult = eventId + notificationIdResult = notificationId + buttonActionsResult = buttonActions + } + } + + shallow() + expect(eventIdResult).to.equal('eventId0') + expect(notificationIdResult).to.equal('notificationId0') + expect(buttonActionsResult).to.not.be.undefined + }) + + describe('createButtonActions', function () { + it('should create two base actions if no playbook actions provided', function () { + let notificationBodyResult + global.chrome = { + notifications: { + create: (notificationBody, afterCreate) => { + notificationBodyResult = notificationBody + afterCreate('notificationId0') + } + } + } + let buttonActionsResult + const props = { + ...baseProps, + notificationEmitted: (eventId, notificationId, buttonActions) => { + buttonActionsResult = buttonActions + } + } + shallow() + const notificationButtonTitles = notificationBodyResult.buttons.map(b => b.title) + const buttonActionTitles = buttonActionsResult.map(b => b.title) + expect(buttonActionsResult).to.have.lengthOf(2) + expect(notificationBodyResult.buttons).to.have.lengthOf(2) + expect(notificationButtonTitles).to.deep.equal(buttonActionTitles) + }) + + it('should create at most two buttons based on the playbook actions provided', function () { + let notificationBodyResult + global.chrome = { + notifications: { + create: (notificationBody, afterCreate) => { + notificationBodyResult = notificationBody + afterCreate('notificationId0') + } + } + } + let buttonActionsResult + const props = { + ...baseProps, + notificationEmitted: (eventId, notificationId, buttonActions) => { + buttonActionsResult = buttonActions + }, + actions: [{ + actionTemplate: { name: 'actionTemplate0', isUrl: true }, + name: 'playbookAction0' + }, { + actionTemplate: { name: 'actionTemplate1', isUrl: true }, + name: 'playbookAction1' + }] + } + shallow() + const notificationButtonTitles = notificationBodyResult.buttons.map(b => b.title) + const buttonActionTitles = buttonActionsResult.slice(0, 2).map(b => b.title) + expect(buttonActionsResult).to.have.lengthOf(4) + expect(notificationBodyResult.buttons).to.have.lengthOf(2) + expect(notificationButtonTitles).to.deep.equal(buttonActionTitles) + expect(notificationButtonTitles[0]).to.contain(props.actions[0].name) + }) + }) + }) + + context('when emitted already', function () { + it('should not create a notification', function () { + let notificationBodyResult + global.chrome = { + notifications: { + create: notificationBody => { notificationBodyResult = notificationBody } + } + } + const props = {...baseProps, isEmitted: true} + const shallowNotification = shallow() + expect(shallowNotification.length).to.equal(1) + expect(notificationBodyResult).to.be.undefined + }) + }) + + context('when notification clicked', function () { + const clickedProps = { + ...baseProps, + isEmitted: true, + isClicked: true, + buttonActions: [{url: 'url0'}, {url: 'url1', default: true}, {url: 'url2'}] + } + + it('should open a new tab pointing to the button action url', function () { + let urlResult + global.chrome.tabs = { create: tab => { urlResult = tab.url } } + shallow() + expect(urlResult).to.equal(clickedProps.buttonActions[0].url) + shallow() + expect(urlResult).to.equal(clickedProps.buttonActions[2].url) + }) + + it('should fallback to the default action url when clicked in body instead of button', function () { + let urlResult + global.chrome.tabs = { create: tab => { urlResult = tab.url } } + shallow() + const defaultActionUrl = clickedProps.buttonActions.find(buttonAction => buttonAction.default).url + expect(urlResult).to.equal(defaultActionUrl) + }) + }) +}) diff --git a/test/reducers/notificationReducerTest.js b/test/reducers/notificationReducerTest.js new file mode 100644 index 0000000..f0c3b54 --- /dev/null +++ b/test/reducers/notificationReducerTest.js @@ -0,0 +1,167 @@ +import { expect } from 'chai' +import * as reducer from 'reducers/notificationReducer' +import * as actions from 'actions/notificationActions' + +/* eslint-disable no-unused-expressions */ +describe('Chrome Extension Push Notifications Reducer', function () { + describe('Notification Options Reducer', function () { + it('should enable and disable the receivePushNotificationsEnabled flag', function () { + const result = reducer.notificationOptionsReducer(undefined, { + type: actions.TOGGLE_RECEIVE_PUSH_NOTIFICATIONS, + enable: true + }) + const result2 = reducer.notificationOptionsReducer(undefined, { + type: actions.TOGGLE_RECEIVE_PUSH_NOTIFICATIONS, + enable: false + }) + + const result3 = reducer.notificationOptionsReducer({ receivePushNotificationsEnabled: true }, { + type: actions.TOGGLE_RECEIVE_PUSH_NOTIFICATIONS, + enable: false + }) + + expect(result.receivePushNotificationsEnabled).to.be.true + expect(result2.receivePushNotificationsEnabled).to.be.false + expect(result3.receivePushNotificationsEnabled).to.be.false + }) + }) + + describe('Unread Notification Count Reducer', function () { + it('should increment unreadNotificationCount by one with every notification emitted', function () { + const action = { type: actions.EMIT_NOTIFICATION } + const result1 = reducer.unreadNotificationCountReducer(undefined, action) + const result2 = reducer.unreadNotificationCountReducer(7, action) + expect(result1).to.equal(1) + expect(result2).to.equal(8) + }) + + it('should reset to zero when notifications are read', function () { + const action = { type: actions.NOTIFICATIONS_READ } + const result1 = reducer.unreadNotificationCountReducer(undefined, action) + const result2 = reducer.unreadNotificationCountReducer(7, action) + expect(result1).to.equal(0) + expect(result2).to.equal(0) + }) + }) + + describe('Notification List Reducer', function () { + context('when emit is invoked', function () { + it('should add the notification to the list', function () { + const notification = {} + const action = { type: actions.EMIT_NOTIFICATION, notification } + const resultList1 = reducer.notificationListReducer(undefined, action) + const resultList2 = reducer.notificationListReducer([{}, {}, {}], action) + expect(resultList1).to.contain(notification) + expect(resultList1).to.have.lengthOf(1) + expect(resultList2).to.contain(notification) + expect(resultList2).to.have.lengthOf(4) + }) + }) + + context('when notification emitted', function () { + it('should add the notification id', function () { + const notification1 = { event: {id: 'Event1'} } + const notification2 = { event: {id: 'Event2'} } + const action = { + type: actions.NOTIFICATION_EMITTED, + eventId: notification1.event.id, + notificationId: 'Notification1' + } + const resultList = reducer.notificationListReducer([notification1, notification2], action) + const resultNotification1 = resultList.find(n => n.event.id === notification1.event.id) + const resultNotification2 = resultList.find(n => n.event.id === notification2.event.id) + expect(resultNotification1.notificationId).to.equal(action.notificationId) + expect(resultNotification2.notificationId).to.be.undefined + }) + + it('should set isEmitted to true', function () { + const notification1 = { event: {id: 'Event1'} } + const notification2 = { event: {id: 'Event2'} } + const action = { + type: actions.NOTIFICATION_EMITTED, + eventId: notification1.event.id + } + const resultList = reducer.notificationListReducer([notification1, notification2], action) + const resultNotification1 = resultList.find(n => n.event.id === notification1.event.id) + const resultNotification2 = resultList.find(n => n.event.id === notification2.event.id) + expect(resultNotification1.isEmitted).to.be.true + expect(resultNotification2.isEmitted).to.not.be.true + }) + + it('should add the action buttons', function () { + const buttonActions = {} + const notification1 = { event: {id: 'Event1'} } + const notification2 = { event: {id: 'Event2'} } + const action = { + type: actions.NOTIFICATION_EMITTED, + eventId: notification1.event.id, + buttonActions + } + const resultList = reducer.notificationListReducer([notification1, notification2], action) + const resultNotification1 = resultList.find(n => n.event.id === notification1.event.id) + const resultNotification2 = resultList.find(n => n.event.id === notification2.event.id) + expect(resultNotification1.buttonActions).to.equal(buttonActions) + expect(resultNotification2.buttonActions).to.not.equal(buttonActions) + }) + }) + + context('when notification clicked', function () { + it('should set isClicked to true', function () { + const notification1 = { notificationId: 'Notification1' } + const notification2 = { notificationId: 'Notification2' } + const action = { + type: actions.NOTIFICATION_CLICKED, + notificationId: notification1.notificationId, + buttonIndex: 0 + } + const resultList = reducer.notificationListReducer([notification1, notification2], action) + const resultNotification1 = resultList.find(n => n.notificationId === notification1.notificationId) + const resultNotification2 = resultList.find(n => n.notificationId === notification2.notificationId) + expect(resultNotification1.isClicked).to.be.true + expect(resultNotification2.isClicked).to.not.be.true + }) + + it('should set the proper button index', function () { + const notification1 = { notificationId: 'Notification1' } + const notification2 = { notificationId: 'Notification2' } + const action1 = { + type: actions.NOTIFICATION_CLICKED, + notificationId: notification1.notificationId, + buttonIndex: 0 + } + const action2 = { + type: actions.NOTIFICATION_CLICKED, + notificationId: notification2.notificationId, + buttonIndex: 1 + } + + const resultList1 = reducer.notificationListReducer([notification1, notification2], action1) + const resultList2 = reducer.notificationListReducer(resultList1, action2) + + const result1Notification1 = resultList1.find(n => n.notificationId === notification1.notificationId) + const result1Notification2 = resultList1.find(n => n.notificationId === notification2.notificationId) + const result2Notification1 = resultList2.find(n => n.notificationId === notification1.notificationId) + const result2Notification2 = resultList2.find(n => n.notificationId === notification2.notificationId) + expect(result1Notification1.buttonIndex).to.equal(action1.buttonIndex) + expect(result1Notification2.buttonIndex).to.be.undefined + expect(result2Notification1.buttonIndex).to.equal(action1.buttonIndex) + expect(result2Notification2.buttonIndex).to.equal(action2.buttonIndex) + }) + }) + + context('when notification removed', function () { + it('should be eliminated from the list', function () { + const notification1 = { notificationId: 'Notification1' } + const notification2 = { notificationId: 'Notification2' } + const action = { + type: actions.NOTIFICATION_REMOVED, + notificationId: notification1.notificationId + } + const resultList = reducer.notificationListReducer([notification1, notification2], action) + expect(resultList).to.not.contain(notification1) + expect(resultList).to.contain(notification2) + expect(resultList).to.have.lengthOf(1) + }) + }) + }) +}) diff --git a/test/services/notificationServiceTest.js b/test/services/notificationServiceTest.js new file mode 100644 index 0000000..fbccdc6 --- /dev/null +++ b/test/services/notificationServiceTest.js @@ -0,0 +1,122 @@ +import { expect } from 'chai' +import * as service from 'services/notificationService' +import * as actions from 'actions/notificationActions' + +/* eslint-disable no-unused-expressions */ +describe('Chrome Extension Push Notifications Service', function () { + const originalWindow = global.window + const originalChrome = global.chrome + + after(function () { + // Since we are messing with global objects we need to reset them back to the original + // objects to avoid impacting other test suites. + global.window = originalWindow + global.chrome = originalChrome + }) + + beforeEach(function () { + global.window = {} + global.chrome = {} + }) + + context('when there is no chrome.extension object', function () { + it('should not be considered a chrome extension', () => { + const isChromeExtensionResult = service.isChromeExtension() + expect(isChromeExtensionResult).to.be.false + }) + }) + + context('when running as a chrome extension', function () { + beforeEach(function () { + global.chrome = { extension: { getBackgroundPage: () => null } } + }) + + it('should be considered a chrome extension', () => { + const isChromeExtensionResult = service.isChromeExtension() + expect(isChromeExtensionResult).to.be.true + }) + + context('when running as a chrome extension background', function () { + beforeEach(function () { + global.chrome = { + extension: { getBackgroundPage: () => global.window }, + browserAction: { setBadgeBackgroundColor: () => null }, + runtime: { onMessage: { addListener: () => null } }, + contextMenus: { + onClicked: { addListener: () => null }, + create: () => null, + removeAll: () => null + }, + notifications: { + onClicked: { addListener: () => null }, + onButtonClicked: { addListener: () => null }, + onClosed: { addListener: () => null } + } + } + }) + + it('should be considered a chrome extension background', () => { + const isChromeExtensionBackgroundResult = service.isChromeExtensionBackground() + expect(isChromeExtensionBackgroundResult).to.be.true + }) + + it('should not be considered a chrome extension popup', () => { + const isChromeExtensionPopupResult = service.isChromeExtensionPopup() + expect(isChromeExtensionPopupResult).to.be.false + }) + + it('should register chrome event listeners', () => { + let runtimeOnMessageListenerAdded = false + let contextMenusOnClickedListenerAdded = false + let notificationsOnClickedListenerAdded = false + let notificationsOnButtonClickedListenerAdded = false + let notificationsOnClosedListenerAdded = false + global.chrome.runtime.onMessage.addListener = () => { runtimeOnMessageListenerAdded = true } + global.chrome.contextMenus.onClicked.addListener = () => { contextMenusOnClickedListenerAdded = true } + global.chrome.notifications = { + onClicked: { addListener: () => { notificationsOnClickedListenerAdded = true } }, + onButtonClicked: { addListener: () => { notificationsOnButtonClickedListenerAdded = true } }, + onClosed: { addListener: () => { notificationsOnClosedListenerAdded = true } } + } + + service.configureNotificationService() + + expect(runtimeOnMessageListenerAdded).to.be.true + expect(contextMenusOnClickedListenerAdded).to.be.true + expect(notificationsOnClickedListenerAdded).to.be.true + expect(notificationsOnButtonClickedListenerAdded).to.be.true + expect(notificationsOnClosedListenerAdded).to.be.true + }) + + it('should create a context menu option to toggle receive push notifications', function () { + const menuIdsResult = [] + global.chrome.contextMenus.create = (options) => { menuIdsResult.push(options.id) } + service.configureNotificationService() + expect(menuIdsResult).to.include(actions.TOGGLE_RECEIVE_PUSH_NOTIFICATIONS) + }) + }) + + context('when running as a chrome extension popup', function () { + beforeEach(function () { + global.chrome = { extension: { getBackgroundPage: () => {} } } + }) + + it('should be considered a chrome extension popup', () => { + const isChromeExtensionPopupResult = service.isChromeExtensionPopup() + expect(isChromeExtensionPopupResult).to.be.true + }) + + it('should not be considered a chrome extension background', () => { + const isChromeExtensionBackgroundResult = service.isChromeExtensionBackground() + expect(isChromeExtensionBackgroundResult).to.be.false + }) + + it('should send a popupOnLoad message', () => { + let msgIdResults = [] + global.chrome.runtime = { sendMessage: msg => { msgIdResults.push(msg.messageId) } } + service.configureNotificationService() + expect(msgIdResults).to.include(service.extensionMessages.popupOnLoad) + }) + }) + }) +})