!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,{enumerable:!0,get:o})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return 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="/",n(n.s=1)}([function(e,t,n){},function(e,t,n){"use strict";n.r(t);var o,r,i,_,l,u={},s=[],a=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function c(e,t){for(var n in t)e[n]=t[n];return e}function p(e){var t=e.parentNode;t&&t.removeChild(e)}function f(e,t,n){var o,r,i,_=arguments,l={};for(i in t)"key"==i?o=t[i]:"ref"==i?r=t[i]:l[i]=t[i];if(arguments.length>3)for(n=[n],i=3;i<arguments.length;i++)n.push(_[i]);if(null!=n&&(l.children=n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===l[i]&&(l[i]=e.defaultProps[i]);return d(e,l,o,r,null)}function d(e,t,n,r,i){var _={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++o.__v:i};return null!=o.vnode&&o.vnode(_),_}function h(e){return e.children}function m(e,t){this.props=e,this.context=t}function v(e,t){if(null==t)return e.__?v(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?v(e):null}function y(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return y(e)}}function g(e){(!e.__d&&(e.__d=!0)&&r.push(e)&&!b.__r++||_!==o.debounceRendering)&&((_=o.debounceRendering)||i)(b)}function b(){for(var e;b.__r=r.length;)e=r.sort((function(e,t){return e.__v.__b-t.__v.__b})),r=[],e.some((function(e){var t,n,o,r,i,_;e.__d&&(i=(r=(t=e).__v).__e,(_=t.__P)&&(n=[],(o=c({},r)).__v=r.__v+1,O(_,r,o,t.__n,void 0!==_.ownerSVGElement,null!=r.__h?[i]:null,n,null==i?v(r):i,r.__h),A(n,r),r.__e!=i&&y(r)))}))}function k(e,t,n,o,r,i,_,l,a,c){var p,f,m,y,g,b,k,E=o&&o.__k||s,C=E.length;for(n.__k=[],p=0;p<t.length;p++)if(null!=(y=n.__k[p]=null==(y=t[p])||"boolean"==typeof y?null:"string"==typeof y||"number"==typeof y?d(null,y,null,null,y):Array.isArray(y)?d(h,{children:y},null,null,null):y.__b>0?d(y.type,y.props,y.key,null,y.__v):y)){if(y.__=n,y.__b=n.__b+1,null===(m=E[p])||m&&y.key==m.key&&y.type===m.type)E[p]=void 0;else for(f=0;f<C;f++){if((m=E[f])&&y.key==m.key&&y.type===m.type){E[f]=void 0;break}m=null}O(e,y,m=m||u,r,i,_,l,a,c),g=y.__e,(f=y.ref)&&m.ref!=f&&(k||(k=[]),m.ref&&k.push(m.ref,null,y),k.push(f,y.__c||g,y)),null!=g?(null==b&&(b=g),"function"==typeof y.type&&null!=y.__k&&y.__k===m.__k?y.__d=a=S(y,a,e):a=P(e,y,m,E,g,a),c||"option"!==n.type?"function"==typeof n.type&&(n.__d=a):e.value=""):a&&m.__e==a&&a.parentNode!=e&&(a=v(m))}for(n.__e=b,p=C;p--;)null!=E[p]&&("function"==typeof n.type&&null!=E[p].__e&&E[p].__e==n.__d&&(n.__d=v(o,p+1)),U(E[p],E[p]));if(k)for(p=0;p<k.length;p++)T(k[p],k[++p],k[++p])}function S(e,t,n){var o,r;for(o=0;o<e.__k.length;o++)(r=e.__k[o])&&(r.__=e,t="function"==typeof r.type?S(r,t,n):P(n,r,r,e.__k,r.__e,t));return t}function E(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){E(e,t)})):t.push(e)),t}function P(e,t,n,o,r,i){var _,l,u;if(void 0!==t.__d)_=t.__d,t.__d=void 0;else if(null==n||r!=i||null==r.parentNode)e:if(null==i||i.parentNode!==e)e.appendChild(r),_=null;else{for(l=i,u=0;(l=l.nextSibling)&&u<o.length;u+=2)if(l==r)break e;e.insertBefore(r,i),_=i}return void 0!==_?_:r.nextSibling}function C(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||a.test(t)?n:n+"px"}function w(e,t,n,o,r){var i;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof o&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||C(e.style,t,"");if(n)for(t in n)o&&n[t]===o[t]||C(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?o||e.addEventListener(t,i?N:x,i):e.removeEventListener(t,i?N:x,i);else if("dangerouslySetInnerHTML"!==t){if(r)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null!=n&&(!1!==n||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,n):e.removeAttribute(t))}}function x(e){this.l[e.type+!1](o.event?o.event(e):e)}function N(e){this.l[e.type+!0](o.event?o.event(e):e)}function O(e,t,n,r,i,_,l,u,s){var a,p,f,d,v,y,g,b,S,E,P,C=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(s=n.__h,u=t.__e=n.__e,t.__h=null,_=[u]),(a=o.__b)&&a(t);try{e:if("function"==typeof C){if(b=t.props,S=(a=C.contextType)&&r[a.__c],E=a?S?S.props.value:a.__:r,n.__c?g=(p=t.__c=n.__c).__=p.__E:("prototype"in C&&C.prototype.render?t.__c=p=new C(b,E):(t.__c=p=new m(b,E),p.constructor=C,p.render=$),S&&S.sub(p),p.props=b,p.state||(p.state={}),p.context=E,p.__n=r,f=p.__d=!0,p.__h=[]),null==p.__s&&(p.__s=p.state),null!=C.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=c({},p.__s)),c(p.__s,C.getDerivedStateFromProps(b,p.__s))),d=p.props,v=p.state,f)null==C.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(null==C.getDerivedStateFromProps&&b!==d&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(b,E),!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(b,p.__s,E)||t.__v===n.__v){p.props=b,p.state=p.__s,t.__v!==n.__v&&(p.__d=!1),p.__v=t,t.__e=n.__e,t.__k=n.__k,p.__h.length&&l.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(b,p.__s,E),null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(d,v,y)}))}p.context=E,p.props=b,p.state=p.__s,(a=o.__r)&&a(t),p.__d=!1,p.__v=t,p.__P=e,a=p.render(p.props,p.state,p.context),p.state=p.__s,null!=p.getChildContext&&(r=c(c({},r),p.getChildContext())),f||null==p.getSnapshotBeforeUpdate||(y=p.getSnapshotBeforeUpdate(d,v)),P=null!=a&&a.type===h&&null==a.key?a.props.children:a,k(e,Array.isArray(P)?P:[P],t,n,r,i,_,l,u,s),p.base=t.__e,t.__h=null,p.__h.length&&l.push(p),g&&(p.__E=p.__=null),p.__e=!1}else null==_&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=M(n.__e,t,n,r,i,_,l,s);(a=o.diffed)&&a(t)}catch(e){t.__v=null,(s||null!=_)&&(t.__e=u,t.__h=!!s,_[_.indexOf(u)]=null),o.__e(e,t,n)}}function A(e,t){o.__c&&o.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){o.__e(e,t.__v)}}))}function M(e,t,n,o,r,i,_,l){var a,c,f,d,h=n.props,m=t.props,v=t.type,y=0;if("svg"===v&&(r=!0),null!=i)for(;y<i.length;y++)if((a=i[y])&&(a===e||(v?a.localName==v:3==a.nodeType))){e=a,i[y]=null;break}if(null==e){if(null===v)return document.createTextNode(m);e=r?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,m.is&&m),i=null,l=!1}if(null===v)h===m||l&&e.data===m||(e.data=m);else{if(i=i&&s.slice.call(e.childNodes),c=(h=n.props||u).dangerouslySetInnerHTML,f=m.dangerouslySetInnerHTML,!l){if(null!=i)for(h={},d=0;d<e.attributes.length;d++)h[e.attributes[d].name]=e.attributes[d].value;(f||c)&&(f&&(c&&f.__html==c.__html||f.__html===e.innerHTML)||(e.innerHTML=f&&f.__html||""))}if(function(e,t,n,o,r){var i;for(i in n)"children"===i||"key"===i||i in t||w(e,i,null,n[i],o);for(i in t)r&&"function"!=typeof t[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===t[i]||w(e,i,t[i],n[i],o)}(e,m,h,r,l),f)t.__k=[];else if(y=t.props.children,k(e,Array.isArray(y)?y:[y],t,n,o,r&&"foreignObject"!==v,i,_,e.firstChild,l),null!=i)for(y=i.length;y--;)null!=i[y]&&p(i[y]);l||("value"in m&&void 0!==(y=m.value)&&(y!==e.value||"progress"===v&&!y)&&w(e,"value",y,h.value,!1),"checked"in m&&void 0!==(y=m.checked)&&y!==e.checked&&w(e,"checked",y,h.checked,!1))}return e}function T(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){o.__e(e,n)}}function U(e,t,n){var r,i,_;if(o.unmount&&o.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||T(r,null,t)),n||"function"==typeof e.type||(n=null!=(i=e.__e)),e.__e=e.__d=void 0,null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){o.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(_=0;_<r.length;_++)r[_]&&U(r[_],t,n);null!=i&&p(i)}function $(e,t,n){return this.constructor(e,n)}function H(e,t,n){var r,i,_;o.__&&o.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,_=[],O(t,e=(!r&&n||t).__k=f(h,null,[e]),i||u,u,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?s.slice.call(t.childNodes):null,_,!r&&n?n:i?i.__e:t.firstChild,r),A(_,e)}function D(e,t){H(e,t,D)}function I(e,t,n){var o,r,i,_=arguments,l=c({},e.props);for(i in t)"key"==i?o=t[i]:"ref"==i?r=t[i]:l[i]=t[i];if(arguments.length>3)for(n=[n],i=3;i<arguments.length;i++)n.push(_[i]);return null!=n&&(l.children=n),d(e.type,l,o||e.key,r||e.ref,null)}o={__e:function(e,t){for(var n,o,r;t=t.__;)if((n=t.__c)&&!n.__)try{if((o=n.constructor)&&null!=o.getDerivedStateFromError&&(n.setState(o.getDerivedStateFromError(e)),r=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e),r=n.__d),r)return n.__E=n}catch(t){e=t}throw e},__v:0},m.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=c({},this.state),"function"==typeof e&&(e=e(c({},n),this.props)),e&&c(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),g(this))},m.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),g(this))},m.prototype.render=h,r=[],i="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,b.__r=0,l=0;var W,F,L,R=0,j=[],V=o.__b,B=o.__r,J=o.diffed,q=o.__c,z=o.unmount;function Y(e,t){o.__h&&o.__h(F,e,R||t),R=0;var n=F.__H||(F.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function G(e){return R=1,Z(re,e)}function Z(e,t,n){var o=Y(W++,2);return o.t=e,o.__c||(o.__=[n?n(t):re(void 0,t),function(e){var t=o.t(o.__[0],e);o.__[0]!==t&&(o.__=[t,o.__[1]],o.__c.setState({}))}],o.__c=F),o.__}function K(e,t){var n=Y(W++,4);!o.__s&&oe(n.__H,t)&&(n.__=e,n.__H=t,F.__h.push(n))}function Q(e,t){var n=Y(W++,7);return oe(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function X(){j.forEach((function(e){if(e.__P)try{e.__H.__h.forEach(te),e.__H.__h.forEach(ne),e.__H.__h=[]}catch(t){e.__H.__h=[],o.__e(t,e.__v)}})),j=[]}o.__b=function(e){F=null,V&&V(e)},o.__r=function(e){B&&B(e),W=0;var t=(F=e.__c).__H;t&&(t.__h.forEach(te),t.__h.forEach(ne),t.__h=[])},o.diffed=function(e){J&&J(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==j.push(t)&&L===o.requestAnimationFrame||((L=o.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(o),ee&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(n,100);ee&&(t=requestAnimationFrame(n))})(X)),F=void 0},o.__c=function(e,t){t.some((function(e){try{e.__h.forEach(te),e.__h=e.__h.filter((function(e){return!e.__||ne(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],o.__e(n,e.__v)}})),q&&q(e,t)},o.unmount=function(e){z&&z(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(te)}catch(e){o.__e(e,t.__v)}};var ee="function"==typeof requestAnimationFrame;function te(e){var t=F;"function"==typeof e.__c&&e.__c(),F=t}function ne(e){var t=F;e.__c=e.__(),F=t}function oe(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function re(e,t){return"function"==typeof t?t(e):t}function ie(e,t){for(var n in t)e[n]=t[n];return e}function _e(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var o in t)if("__source"!==o&&e[o]!==t[o])return!0;return!1}function le(e){this.props=e}(le.prototype=new m).isPureReactComponent=!0,le.prototype.shouldComponentUpdate=function(e,t){return _e(this.props,e)||_e(this.state,t)};var ue=o.__b;o.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ue&&ue(e)};var se="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var ae=function(e,t){return null==e?null:E(E(e).map(t))},ce={map:ae,forEach:ae,count:function(e){return e?E(e).length:0},only:function(e){var t=E(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:E},pe=o.__e;function fe(){this.__u=0,this.t=null,this.__b=null}function de(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function he(){this.u=null,this.o=null}o.__e=function(e,t,n){if(e.then)for(var o,r=t;r=r.__;)if((o=r.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);pe(e,t,n)},(fe.prototype=new m).__c=function(e,t){var n=t.__c,o=this;null==o.t&&(o.t=[]),o.t.push(n);var r=de(o.__v),i=!1,_=function(){i||(i=!0,n.componentWillUnmount=n.__c,r?r(l):l())};n.__c=n.componentWillUnmount,n.componentWillUnmount=function(){_(),n.__c&&n.__c()};var l=function(){if(!--o.__u){if(o.state.__e){var e=o.state.__e;o.__v.__k[0]=function e(t,n,o){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return e(t,n,o)})),t.__c&&t.__c.__P===n&&(t.__e&&o.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=o)),t}(e,e.__c.__P,e.__c.__O)}var t;for(o.setState({__e:o.__b=null});t=o.t.pop();)t.forceUpdate()}},u=!0===t.__h;o.__u++||u||o.setState({__e:o.__b=o.__v.__k[0]}),e.then(_,_)},fe.prototype.componentWillUnmount=function(){this.t=[]},fe.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,o){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),t.__c.__H=null),null!=(t=ie({},t)).__c&&(t.__c.__P===o&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return e(t,n,o)}))),t}(this.__b,n,o.__O=o.__P)}this.__b=null}var r=t.__e&&f(h,null,e.fallback);return r&&(r.__h=null),[f(h,null,t.__e?null:e.children),r]};var me=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function ve(e){return this.getChildContext=function(){return e.context},e.children}function ye(e){var t=this,n=e.i;t.componentWillUnmount=function(){H(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),H(f(ve,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}(he.prototype=new m).__e=function(e){var t=this,n=de(t.__v),o=t.o.get(e);return o[0]++,function(r){var i=function(){t.props.revealOrder?(o.push(r),me(t,e,o)):r()};n?n(i):i()}},he.prototype.render=function(e){this.u=null,this.o=new Map;var t=E(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},he.prototype.componentDidUpdate=he.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){me(e,n,t)}))};var ge="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,be=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ke=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};m.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(m.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Se=o.event;function Ee(){}function Pe(){return this.cancelBubble}function Ce(){return this.defaultPrevented}o.event=function(e){return Se&&(e=Se(e)),e.persist=Ee,e.isPropagationStopped=Pe,e.isDefaultPrevented=Ce,e.nativeEvent=e};var we,xe={configurable:!0,get:function(){return this.class}},Ne=o.vnode;o.vnode=function(e){var t=e.type,n=e.props,o=n;if("string"==typeof t){for(var r in o={},n){var i=n[r];"value"===r&&"defaultValue"in n&&null==i||("defaultValue"===r&&"value"in n&&null==n.value?r="value":"download"===r&&!0===i?i="":/ondoubleclick/i.test(r)?r="ondblclick":/^onchange(textarea|input)/i.test(r+t)&&!ke(n.type)?r="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(r)?r=r.toLowerCase():be.test(r)?r=r.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===i&&(i=void 0),o[r]=i)}"select"==t&&o.multiple&&Array.isArray(o.value)&&(o.value=E(n.children).forEach((function(e){e.props.selected=-1!=o.value.indexOf(e.props.value)}))),"select"==t&&null!=o.defaultValue&&(o.value=E(n.children).forEach((function(e){e.props.selected=o.multiple?-1!=o.defaultValue.indexOf(e.props.value):o.defaultValue==e.props.value}))),e.props=o}t&&n.class!=n.className&&(xe.enumerable="className"in n,null!=n.className&&(o.class=n.className),Object.defineProperty(o,"className",xe)),e.$$typeof=ge,Ne&&Ne(e)};var Oe=o.__r;o.__r=function(e){Oe&&Oe(e),we=e.__c};var Ae={ReactCurrentDispatcher:{current:{readContext:function(e){return we.__n[e.__c].props.value}}}};"object"==typeof performance&&"function"==typeof performance.now&&performance.now.bind(performance);function Me(e){return!!e&&e.$$typeof===ge}var Te={useState:G,useReducer:Z,useEffect:function(e,t){var n=Y(W++,3);!o.__s&&oe(n.__H,t)&&(n.__=e,n.__H=t,F.__H.__h.push(n))},useLayoutEffect:K,useRef:function(e){return R=5,Q((function(){return{current:e}}),[])},useImperativeHandle:function(e,t,n){R=6,K((function(){"function"==typeof e?e(t()):e&&(e.current=t())}),null==n?n:n.concat(e))},useMemo:Q,useCallback:function(e,t){return R=8,Q((function(){return e}),t)},useContext:function(e){var t=F.context[e.__c],n=Y(W++,9);return n.__c=e,t?(null==n.__&&(n.__=!0,t.sub(F)),t.props.value):e.__},useDebugValue:function(e,t){o.useDebugValue&&o.useDebugValue(t?t(e):e)},version:"16.8.0",Children:ce,render:function(e,t,n){return null==t.__k&&(t.textContent=""),H(e,t),"function"==typeof n&&n(),e?e.__c:null},hydrate:function(e,t,n){return D(e,t),"function"==typeof n&&n(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&(H(null,e),!0)},createPortal:function(e,t){return f(ye,{__v:e,i:t})},createElement:f,createContext:function(e,t){var n={__c:t="__cC"+l++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,o;return this.getChildContext||(n=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(g)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n},createFactory:function(e){return f.bind(null,e)},cloneElement:function(e){return Me(e)?I.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:h,isValidElement:Me,findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:m,PureComponent:le,memo:function(e,t){function n(e){var n=this.props.ref,o=n==e.ref;return!o&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!o:_e(this.props,e)}function o(t){return this.shouldComponentUpdate=n,f(e,t)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o},forwardRef:function(e){function t(t,n){var o=ie({},t);return delete o.ref,e(o,(n=t.ref||n)&&("object"!=typeof n||"current"in n)?n:null)}return t.$$typeof=se,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t},unstable_batchedUpdates:function(e,t){return e(t)},StrictMode:h,Suspense:fe,SuspenseList:he,lazy:function(e){var t,n,o;function r(r){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){o=e})),o)throw o;if(!n)throw t;return f(n,r)}return r.displayName="Lazy",r.__f=!0,r},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ae};n(0);const Ue=new AbortController,$e={status:{indicator:"none",description:"All Systems Operational"},incidents:[],initialised:!1},He={page:{id:"test-mode-page",name:"Test mode",url:"https://status.example.com"},components:[{id:"test-mode-component",name:"Test mode component",status:"major_outage",description:null,group:!1}],incidents:[{id:"test-mode-incident",name:"Outage: Test mode incident",status:"investigating",created_at:"2019-12-06T10:32:54.869+00:00",updated_at:"2019-12-09T10:52:38.862+00:00",monitoring_at:null,resolved_at:null,impact:"minor",shortlink:"http://status.example.com/test-mode-incident",incident_updates:[{id:"test-mode-incident-update",status:"investigating",body:"This will be shown if an incident or maintenance is posted on your status page.",created_at:"2019-12-06T10:12:21.898+00:00",updated_at:"2019-12-06T10:12:22.448+00:00",display_at:"2019-12-06T10:12:21.898+00:00"}],components:[{id:"test-mode-component",name:"Test mode component",status:"major_outage",description:null,group:!1}]}],scheduled_maintenances:[],status:{indicator:"minor",description:"Partially Degraded Service"}};let De=!0;try{localStorage.setItem("test","test"),localStorage.removeItem("test")}catch(Le){De=!1}class Ie extends m{constructor(...e){super(...e),this.state={...$e},this._isMounted=!1}componentDidMount(){this._isMounted=!0,this.pollIntervalId=setInterval((()=>this.poll()),this.props.pollInterval),this.poll()}async fetchFromServer(){if(this.props.testMode)return await new Promise((e=>setTimeout((()=>e(He)),50)));try{const e=await fetch(`${this.props.apiBase}/v2/summary.json`,{signal:Ue.signal});return await e.json()}catch(e){return window.console&&console.log&&console.log("Failed to fetch current system status from statuspage",e),{page:{url:this.props.apiBase},components:[],incidents:[],scheduled_maintenances:[],status:{indicator:"none",description:"All Systems Operational"}}}}async poll(){try{const e=await this.fetchFromServer(),t=De?JSON.parse(localStorage.getItem(`statuspage_dismissed_${new URL(this.props.apiBase).hostname}`)):[],n=e=>!(t||[]).includes(e.id)&&(!(e.components&&this.props.components&&this.props.components.length)||this.props.components.some((t=>e.components.some((e=>e.id===t))))),o=e=>({...e,created_at:e.started_at});let r;const i=[...e.incidents.filter(n),...e.scheduled_maintenances.filter((e=>"in_progress"===e.status)).filter(n).map(o)];r=i.length?{indicator:i[0].impact,description:i[0].name,url:1===i.length&&i[0].shortlink||e.page.url}:{indicator:"none",description:"All Systems Operational"},this.update({status:r,incidents:i,initialised:!0})}catch(Le){if("AbortError"===Le.name)return void this.update($e);throw Le}}stopPolling(){Ue.abort(),clearInterval(this.pollIntervalId)}componentWillUnmount(){this._isMounted=!1,this.stopPolling()}dismiss(){De?localStorage.setItem(`statuspage_dismissed_${new URL(this.props.apiBase).hostname}`,JSON.stringify(this.state.incidents.map((e=>e.id)))):this.stopPolling(),this.update($e)}update(e){this._isMounted&&this.setState((t=>({...e,previousState:{status:t.status,incidents:t.incidents}})))}render(){const e=this.state.status;let t,n,o,r;if("none"===e.indicator&&this.state.previousState?({status:t,incidents:n}=this.state.previousState):({status:t,incidents:n}=this.state),"maintenance"===t.indicator?o=Te.createElement("i",{className:`${this.props.fontAwesomeVariant} fa-info-circle`,"aria-hidden":"true"}):"none"!==t.indicator&&(o=Te.createElement("i",{className:`${this.props.fontAwesomeVariant} fa-exclamation-triangle`,"aria-hidden":"true"})),n.length>2)r=`+ ${n.length-1} others`;else if(2===n.length)r="+ 1 other";else if(n.length){const e=n[0];if(e.scheduled_for&&e.scheduled_until){const t=new Date(e.scheduled_for),n=new Date(e.scheduled_until),o=e=>e<10?`0${e}`:e.toString(),i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r=`${o(t.getDate())} ${i[t.getMonth()]} ${t.getFullYear()} from ${o(t.getHours())}:${o(t.getMinutes())} to ${o(n.getDate())} ${i[n.getMonth()]} ${n.getFullYear()} ${o(n.getHours())}:${o(n.getMinutes())}`}else e.incident_updates.length&&(r=e.incident_updates[0].body)}return Te.createElement("div",{className:`StatusPageEmbed StatusPageEmbed--${this.props.position} StatusPageEmbed--${e.indicator} ${t.indicator!==e.indicator?`StatusPageEmbed--${t.indicator}`:""} ${this.state.initialised&&"none"!==e.indicator?" StatusPageEmbed--visible":""}`},Te.createElement("div",{className:"StatusPageEmbed__icon"},o),Te.createElement("div",{className:"StatusPageEmbed__content"},Te.createElement("h1",{className:"StatusPageEmbed__content__title"},t.description),Te.createElement("div",{className:"StatusPageEmbed__content__context"},r),t.url&&Te.createElement("div",{className:"StatusPageEmbed__content__link"},Te.createElement("a",{href:t.url,target:"_blank",rel:"noopener noreferrer"},"View latest updates"))),Te.createElement("div",{className:"StatusPageEmbed__close"},Te.createElement("button",{className:"StatusPageEmbed__close__button","aria-label":"Close",onClick:()=>this.dismiss(),tabIndex:this.state.initialised&&"none"!==e.indicator?0:-1},Te.createElement("i",{className:`${this.props.fontAwesomeVariant} fa-times`,"aria-hidden":"true"}))))}}Ie.defaultProps={apiBase:"https://status.warwick.ac.uk/api",components:[],pollInterval:6e4,position:"bl",testMode:!1,fontAwesomeVariant:"fas"};var We=Ie;function Fe(){Array.from(document.querySelectorAll(".statuspage-embed-container")).forEach((e=>{const{apiBase:t,components:n,pollInterval:o,position:r,testMode:i}=e.dataset,_=n&&JSON.parse(n);Te.render(Te.createElement(We,{apiBase:t,components:_,pollInterval:o,position:r,testMode:i}),e)}))}"complete"===document.readyState||"loaded"===document.readyState||"interactive"===document.readyState?Fe():document.addEventListener("DOMContentLoaded",Fe,!1)}]);
//# sourceMappingURL=main.js.map