(()=>{"use strict";var e,t,n,o,_,r,i,u,l,s,a,c,f={},p=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,h=Array.isArray;function m(e,t){for(var n in t)e[n]=t[n];return e}function v(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function y(t,n,o){var _,r,i,u={};for(i in n)"key"==i?_=n[i]:"ref"==i?r=n[i]:u[i]=n[i];if(arguments.length>2&&(u.children=arguments.length>3?e.call(arguments,2):o),"function"==typeof t&&null!=t.defaultProps)for(i in t.defaultProps)void 0===u[i]&&(u[i]=t.defaultProps[i]);return g(t,u,_,r,null)}function g(e,o,_,r,i){var u={type:e,props:o,key:_,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==i?++n:i,__i:-1,__u:0};return null==i&&null!=t.vnode&&t.vnode(u),u}function b(e){return e.children}function k(e,t){this.props=e,this.context=t}function S(e,t){if(null==t)return e.__?S(e.__,e.__i+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?S(e):null}function w(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 w(e)}}function E(e){(!e.__d&&(e.__d=!0)&&o.push(e)&&!N.__r++||_!=t.debounceRendering)&&((_=t.debounceRendering)||r)(N)}function N(){for(var e,n,_,r,u,l,s,a=1;o.length;)o.length>a&&o.sort(i),e=o.shift(),a=o.length,e.__d&&(_=void 0,u=(r=(n=e).__v).__e,l=[],s=[],n.__P&&((_=m({},r)).__v=r.__v+1,t.vnode&&t.vnode(_),$(n.__P,_,r,n.__n,n.__P.namespaceURI,32&r.__u?[u]:null,l,null==u?S(r):u,!!(32&r.__u),s),_.__v=r.__v,_.__.__k[_.__i]=_,I(l,_,s),_.__e!=u&&w(_)));N.__r=0}function P(e,t,n,o,_,r,i,u,l,s,a){var c,d,h,m,v,y,g,b=o&&o.__k||p,k=t.length;for(l=C(n,t,b,l,k),c=0;c<k;c++)null!=(h=n.__k[c])&&(d=-1==h.__i?f:b[h.__i]||f,h.__i=c,y=$(e,h,d,_,r,i,u,l,s,a),m=h.__e,h.ref&&d.ref!=h.ref&&(d.ref&&F(d.ref,null,h),a.push(h.ref,h.__c||m,h)),null==v&&null!=m&&(v=m),(g=!!(4&h.__u))||d.__k===h.__k?l=x(h,l,e,g):"function"==typeof h.type&&void 0!==y?l=y:m&&(l=m.nextSibling),h.__u&=-7);return n.__e=v,l}function C(e,t,n,o,_){var r,i,u,l,s,a=n.length,c=a,f=0;for(e.__k=new Array(_),r=0;r<_;r++)null!=(i=t[r])&&"boolean"!=typeof i&&"function"!=typeof i?(l=r+f,(i=e.__k[r]="string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?g(null,i,null,null,null):h(i)?g(b,{children:i},null,null,null):null==i.constructor&&i.__b>0?g(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,u=null,-1!=(s=i.__i=T(i,n,l,c))&&(c--,(u=n[s])&&(u.__u|=2)),null==u||null==u.__v?(-1==s&&(_>a?f--:_<a&&f++),"function"!=typeof i.type&&(i.__u|=4)):s!=l&&(s==l-1?f--:s==l+1?f++:(s>l?f--:f++,i.__u|=4))):e.__k[r]=null;if(c)for(r=0;r<a;r++)null!=(u=n[r])&&0==(2&u.__u)&&(u.__e==o&&(o=S(u)),L(u,u));return o}function x(e,t,n,o){var _,r;if("function"==typeof e.type){for(_=e.__k,r=0;_&&r<_.length;r++)_[r]&&(_[r].__=e,t=x(_[r],t,n,o));return t}e.__e!=t&&(o&&(t&&e.type&&!t.parentNode&&(t=S(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function M(e,t){return t=t||[],null==e||"boolean"==typeof e||(h(e)?e.some(function(e){M(e,t)}):t.push(e)),t}function T(e,t,n,o){var _,r,i,u=e.key,l=e.type,s=t[n],a=null!=s&&0==(2&s.__u);if(null===s&&null==e.key||a&&u==s.key&&l==s.type)return n;if(o>(a?1:0))for(_=n-1,r=n+1;_>=0||r<t.length;)if(null!=(s=t[i=_>=0?_--:r++])&&0==(2&s.__u)&&u==s.key&&l==s.type)return i;return-1}function U(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||d.test(t)?n:n+"px"}function A(e,t,n,o,_){var r,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||U(e.style,t,"");if(n)for(t in n)o&&n[t]==o[t]||U(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])r=t!=(t=t.replace(u,"$1")),i=t.toLowerCase(),t=i in e||"onFocusOut"==t||"onFocusIn"==t?i.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=n,n?o?n.u=o.u:(n.u=l,e.addEventListener(t,r?a:s,r)):e.removeEventListener(t,r?a:s,r);else{if("http://www.w3.org/2000/svg"==_)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function H(e){return function(n){if(this.l){var o=this.l[n.type+e];if(null==n.t)n.t=l++;else if(n.t<o.u)return;return o(t.event?t.event(n):n)}}}function $(e,n,o,_,r,i,u,l,s,a){var c,f,p,d,y,g,S,w,E,N,C,x,M,T,U,A,H,$=n.type;if(null!=n.constructor)return null;128&o.__u&&(s=!!(32&o.__u),i=[l=n.__e=o.__e]),(c=t.__b)&&c(n);e:if("function"==typeof $)try{if(w=n.props,E="prototype"in $&&$.prototype.render,N=(c=$.contextType)&&_[c.__c],C=c?N?N.props.value:c.__:_,o.__c?S=(f=n.__c=o.__c).__=f.__E:(E?n.__c=f=new $(w,C):(n.__c=f=new k(w,C),f.constructor=$,f.render=W),N&&N.sub(f),f.props=w,f.state||(f.state={}),f.context=C,f.__n=_,p=f.__d=!0,f.__h=[],f._sb=[]),E&&null==f.__s&&(f.__s=f.state),E&&null!=$.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=m({},f.__s)),m(f.__s,$.getDerivedStateFromProps(w,f.__s))),d=f.props,y=f.state,f.__v=n,p)E&&null==$.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),E&&null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(E&&null==$.getDerivedStateFromProps&&w!==d&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(w,C),!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(w,f.__s,C)||n.__v==o.__v){for(n.__v!=o.__v&&(f.props=w,f.state=f.__s,f.__d=!1),n.__e=o.__e,n.__k=o.__k,n.__k.some(function(e){e&&(e.__=n)}),x=0;x<f._sb.length;x++)f.__h.push(f._sb[x]);f._sb=[],f.__h.length&&u.push(f);break e}null!=f.componentWillUpdate&&f.componentWillUpdate(w,f.__s,C),E&&null!=f.componentDidUpdate&&f.__h.push(function(){f.componentDidUpdate(d,y,g)})}if(f.context=C,f.props=w,f.__P=e,f.__e=!1,M=t.__r,T=0,E){for(f.state=f.__s,f.__d=!1,M&&M(n),c=f.render(f.props,f.state,f.context),U=0;U<f._sb.length;U++)f.__h.push(f._sb[U]);f._sb=[]}else do{f.__d=!1,M&&M(n),c=f.render(f.props,f.state,f.context),f.state=f.__s}while(f.__d&&++T<25);f.state=f.__s,null!=f.getChildContext&&(_=m(m({},_),f.getChildContext())),E&&!p&&null!=f.getSnapshotBeforeUpdate&&(g=f.getSnapshotBeforeUpdate(d,y)),A=c,null!=c&&c.type===b&&null==c.key&&(A=O(c.props.children)),l=P(e,h(A)?A:[A],n,o,_,r,i,u,l,s,a),f.base=n.__e,n.__u&=-161,f.__h.length&&u.push(f),S&&(f.__E=f.__=null)}catch(e){if(n.__v=null,s||null!=i)if(e.then){for(n.__u|=s?160:128;l&&8==l.nodeType&&l.nextSibling;)l=l.nextSibling;i[i.indexOf(l)]=null,n.__e=l}else{for(H=i.length;H--;)v(i[H]);D(n)}else n.__e=o.__e,n.__k=o.__k,e.then||D(n);t.__e(e,n,o)}else null==i&&n.__v==o.__v?(n.__k=o.__k,n.__e=o.__e):l=n.__e=R(o.__e,n,o,_,r,i,u,s,a);return(c=t.diffed)&&c(n),128&n.__u?void 0:l}function D(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(D)}function I(e,n,o){for(var _=0;_<o.length;_++)F(o[_],o[++_],o[++_]);t.__c&&t.__c(n,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(e){e.call(n)})}catch(e){t.__e(e,n.__v)}})}function O(e){return"object"!=typeof e||null==e||e.__b&&e.__b>0?e:h(e)?e.map(O):m({},e)}function R(n,o,_,r,i,u,l,s,a){var c,p,d,m,y,g,b,k=_.props,w=o.props,E=o.type;if("svg"==E?i="http://www.w3.org/2000/svg":"math"==E?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),null!=u)for(c=0;c<u.length;c++)if((y=u[c])&&"setAttribute"in y==!!E&&(E?y.localName==E:3==y.nodeType)){n=y,u[c]=null;break}if(null==n){if(null==E)return document.createTextNode(w);n=document.createElementNS(i,E,w.is&&w),s&&(t.__m&&t.__m(o,u),s=!1),u=null}if(null==E)k===w||s&&n.data==w||(n.data=w);else{if(u=u&&e.call(n.childNodes),k=_.props||f,!s&&null!=u)for(k={},c=0;c<n.attributes.length;c++)k[(y=n.attributes[c]).name]=y.value;for(c in k)if(y=k[c],"children"==c);else if("dangerouslySetInnerHTML"==c)d=y;else if(!(c in w)){if("value"==c&&"defaultValue"in w||"checked"==c&&"defaultChecked"in w)continue;A(n,c,null,y,i)}for(c in w)y=w[c],"children"==c?m=y:"dangerouslySetInnerHTML"==c?p=y:"value"==c?g=y:"checked"==c?b=y:s&&"function"!=typeof y||k[c]===y||A(n,c,y,k[c],i);if(p)s||d&&(p.__html==d.__html||p.__html==n.innerHTML)||(n.innerHTML=p.__html),o.__k=[];else if(d&&(n.innerHTML=""),P("template"==o.type?n.content:n,h(m)?m:[m],o,_,r,"foreignObject"==E?"http://www.w3.org/1999/xhtml":i,u,l,u?u[0]:_.__k&&S(_,0),s,a),null!=u)for(c=u.length;c--;)v(u[c]);s||(c="value","progress"==E&&null==g?n.removeAttribute("value"):null!=g&&(g!==n[c]||"progress"==E&&!g||"option"==E&&g!=k[c])&&A(n,c,g,k[c],i),c="checked",null!=b&&b!=n[c]&&A(n,c,b,k[c],i))}return n}function F(e,n,o){try{if("function"==typeof e){var _="function"==typeof e.__u;_&&e.__u(),_&&null==n||(e.__u=e(n))}else e.current=n}catch(e){t.__e(e,o)}}function L(e,n,o){var _,r;if(t.unmount&&t.unmount(e),(_=e.ref)&&(_.current&&_.current!=e.__e||F(_,null,n)),null!=(_=e.__c)){if(_.componentWillUnmount)try{_.componentWillUnmount()}catch(e){t.__e(e,n)}_.base=_.__P=null}if(_=e.__k)for(r=0;r<_.length;r++)_[r]&&L(_[r],n,o||"function"!=typeof e.type);o||v(e.__e),e.__c=e.__=e.__e=void 0}function W(e,t,n){return this.constructor(e,n)}function V(n,o,_){var r,i,u,l;o==document&&(o=document.documentElement),t.__&&t.__(n,o),i=(r="function"==typeof _)?null:_&&_.__k||o.__k,u=[],l=[],$(o,n=(!r&&_||o).__k=y(b,null,[n]),i||f,f,o.namespaceURI,!r&&_?[_]:i?null:o.firstChild?e.call(o.childNodes):null,u,!r&&_?_:i?i.__e:o.firstChild,r,l),I(u,n,l)}function B(e,t){V(e,t,B)}function j(t,n,o){var _,r,i,u,l=m({},t.props);for(i in t.type&&t.type.defaultProps&&(u=t.type.defaultProps),n)"key"==i?_=n[i]:"ref"==i?r=n[i]:l[i]=void 0===n[i]&&null!=u?u[i]:n[i];return arguments.length>2&&(l.children=arguments.length>3?e.call(arguments,2):o),g(t.type,l,_||t.key,r||t.ref,null)}e=p.slice,t={__e:function(e,t,n,o){for(var _,r,i;t=t.__;)if((_=t.__c)&&!_.__)try{if((r=_.constructor)&&null!=r.getDerivedStateFromError&&(_.setState(r.getDerivedStateFromError(e)),i=_.__d),null!=_.componentDidCatch&&(_.componentDidCatch(e,o||{}),i=_.__d),i)return _.__E=_}catch(t){e=t}throw e}},n=0,k.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=m({},this.state),"function"==typeof e&&(e=e(m({},n),this.props)),e&&m(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),E(this))},k.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),E(this))},k.prototype.render=b,o=[],r="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,i=function(e,t){return e.__v.__b-t.__v.__b},N.__r=0,u=/(PointerCapture)$|Capture$/i,l=0,s=H(!1),a=H(!0),c=0;var J,q,z,Y,Z=0,G=[],K=t,Q=K.__b,X=K.__r,ee=K.diffed,te=K.__c,ne=K.unmount,oe=K.__;function _e(e,t){K.__h&&K.__h(q,e,Z||t),Z=0;var n=q.__H||(q.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function re(e){return Z=1,ie(Se,e)}function ie(e,t,n){var o=_e(J++,2);if(o.t=e,!o.__c&&(o.__=[n?n(t):Se(void 0,t),function(e){var t=o.__N?o.__N[0]:o.__[0],n=o.t(t,e);t!==n&&(o.__N=[n,o.__[1]],o.__c.setState({}))}],o.__c=q,!q.__f)){var _=function(e,t,n){if(!o.__c.__H)return!0;var _=o.__c.__H.__.filter(function(e){return!!e.__c});if(_.every(function(e){return!e.__N}))return!r||r.call(this,e,t,n);var i=o.__c.props!==e;return _.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}}),r&&r.call(this,e,t,n)||i};q.__f=!0;var r=q.shouldComponentUpdate,i=q.componentWillUpdate;q.componentWillUpdate=function(e,t,n){if(this.__e){var o=r;r=void 0,_(e,t,n),r=o}i&&i.call(this,e,t,n)},q.shouldComponentUpdate=_}return o.__N||o.__}function ue(e,t){var n=_e(J++,3);!K.__s&&ke(n.__H,t)&&(n.__=e,n.u=t,q.__H.__h.push(n))}function le(e,t){var n=_e(J++,4);!K.__s&&ke(n.__H,t)&&(n.__=e,n.u=t,q.__h.push(n))}function se(e){return Z=5,ce(function(){return{current:e}},[])}function ae(e,t,n){Z=6,le(function(){if("function"==typeof e){var n=e(t());return function(){e(null),n&&"function"==typeof n&&n()}}if(e)return e.current=t(),function(){return e.current=null}},null==n?n:n.concat(e))}function ce(e,t){var n=_e(J++,7);return ke(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function fe(e,t){return Z=8,ce(function(){return e},t)}function pe(e){var t=q.context[e.__c],n=_e(J++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(q)),t.props.value):e.__}function de(e,t){K.useDebugValue&&K.useDebugValue(t?t(e):e)}function he(){var e=_e(J++,11);if(!e.__){for(var t=q.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function me(){for(var e;e=G.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ge),e.__H.__h.forEach(be),e.__H.__h=[]}catch(t){e.__H.__h=[],K.__e(t,e.__v)}}K.__b=function(e){q=null,Q&&Q(e)},K.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),oe&&oe(e,t)},K.__r=function(e){X&&X(e),J=0;var t=(q=e.__c).__H;t&&(z===q?(t.__h=[],q.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(ge),t.__h.forEach(be),t.__h=[],J=0)),z=q},K.diffed=function(e){ee&&ee(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==G.push(t)&&Y===K.requestAnimationFrame||((Y=K.requestAnimationFrame)||ye)(me)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),z=q=null},K.__c=function(e,t){t.some(function(e){try{e.__h.forEach(ge),e.__h=e.__h.filter(function(e){return!e.__||be(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],K.__e(n,e.__v)}}),te&&te(e,t)},K.unmount=function(e){ne&&ne(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{ge(e)}catch(e){t=e}}),n.__H=void 0,t&&K.__e(t,n.__v))};var ve="function"==typeof requestAnimationFrame;function ye(e){var t,n=function(){clearTimeout(o),ve&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(n,35);ve&&(t=requestAnimationFrame(n))}function ge(e){var t=q,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),q=t}function be(e){var t=q;e.__c=e.__(),q=t}function ke(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function Se(e,t){return"function"==typeof t?t(e):t}function we(e,t){for(var n in t)e[n]=t[n];return e}function Ee(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 Ne(e,t){var n=t(),o=re({t:{__:n,u:t}}),_=o[0].t,r=o[1];return le(function(){_.__=n,_.u=t,Pe(_)&&r({t:_})},[e,n,t]),ue(function(){return Pe(_)&&r({t:_}),e(function(){Pe(_)&&r({t:_})})},[e]),n}function Pe(e){var t,n,o=e.u,_=e.__;try{var r=o();return!((t=_)===(n=r)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(e){return!0}}function Ce(e){e()}function xe(e){return e}function Me(){return[!1,Ce]}var Te=le;function Ue(e,t){this.props=e,this.context=t}(Ue.prototype=new k).isPureReactComponent=!0,Ue.prototype.shouldComponentUpdate=function(e,t){return Ee(this.props,e)||Ee(this.state,t)};var Ae=t.__b;t.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ae&&Ae(e)};var He="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var $e=function(e,t){return null==e?null:M(M(e).map(t))},De={map:$e,forEach:$e,count:function(e){return e?M(e).length:0},only:function(e){var t=M(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:M},Ie=t.__e;t.__e=function(e,t,n,o){if(e.then)for(var _,r=t;r=r.__;)if((_=r.__c)&&_.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),_.__c(e,t);Ie(e,t,n,o)};var Oe=t.unmount;function Re(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=we({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return Re(e,t,n)})),e}function Fe(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return Fe(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Le(){this.__u=0,this.o=null,this.__b=null}function We(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Ve(){this.i=null,this.l=null}t.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Oe&&Oe(e)},(Le.prototype=new k).__c=function(e,t){var n=t.__c,o=this;null==o.o&&(o.o=[]),o.o.push(n);var _=We(o.__v),r=!1,i=function(){r||(r=!0,n.__R=null,_?_(u):u())};n.__R=i;var u=function(){if(! --o.__u){if(o.state.__a){var e=o.state.__a;o.__v.__k[0]=Fe(e,e.__c.__P,e.__c.__O)}var t;for(o.setState({__a:o.__b=null});t=o.o.pop();)t.forceUpdate()}};o.__u++||32&t.__u||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(i,i)},Le.prototype.componentWillUnmount=function(){this.o=[]},Le.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]=Re(this.__b,n,o.__O=o.__P)}this.__b=null}var _=t.__a&&y(b,null,e.fallback);return _&&(_.__u&=-33),[y(b,null,t.__a?null:e.children),_]};var Be=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function je(e){return this.getChildContext=function(){return e.context},e.children}function Je(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){V(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var o=t.__v;null!==o&&!o.__m&&null!==o.__;)o=o.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:o.__m},contains:function(){return!0},insertBefore:function(e,n){this.childNodes.push(e),t.h.insertBefore(e,n)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.h.removeChild(e)}}}V(y(je,{context:t.context},e.__v),t.v)}(Ve.prototype=new k).__a=function(e){var t=this,n=We(t.__v),o=t.l.get(e);return o[0]++,function(_){var r=function(){t.props.revealOrder?(o.push(_),Be(t,e,o)):_()};n?n(r):r()}},Ve.prototype.render=function(e){this.i=null,this.l=new Map;var t=M(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},Ve.prototype.componentDidUpdate=Ve.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Be(e,n,t)})};var qe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ze=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ye=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ze=/[A-Z0-9]/g,Ge="undefined"!=typeof document,Ke=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};k.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(k.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Qe=t.event;function Xe(){}function et(){return this.cancelBubble}function tt(){return this.defaultPrevented}t.event=function(e){return Qe&&(e=Qe(e)),e.persist=Xe,e.isPropagationStopped=et,e.isDefaultPrevented=tt,e.nativeEvent=e};var nt,ot={enumerable:!1,configurable:!0,get:function(){return this.class}},_t=t.vnode;t.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,o={},_=-1===n.indexOf("-");for(var r in t){var i=t[r];if(!("value"===r&&"defaultValue"in t&&null==i||Ge&&"children"===r&&"noscript"===n||"class"===r||"className"===r)){var u=r.toLowerCase();"defaultValue"===r&&"value"in t&&null==t.value?r="value":"download"===r&&!0===i?i="":"translate"===u&&"no"===i?i=!1:"o"===u[0]&&"n"===u[1]?"ondoubleclick"===u?r="ondblclick":"onchange"!==u||"input"!==n&&"textarea"!==n||Ke(t.type)?"onfocus"===u?r="onfocusin":"onblur"===u?r="onfocusout":Ye.test(r)&&(r=u):u=r="oninput":_&&ze.test(r)?r=r.replace(Ze,"-$&").toLowerCase():null===i&&(i=void 0),"oninput"===u&&o[r=u]&&(r="oninputCapture"),o[r]=i}}"select"==n&&o.multiple&&Array.isArray(o.value)&&(o.value=M(t.children).forEach(function(e){e.props.selected=-1!=o.value.indexOf(e.props.value)})),"select"==n&&null!=o.defaultValue&&(o.value=M(t.children).forEach(function(e){e.props.selected=o.multiple?-1!=o.defaultValue.indexOf(e.props.value):o.defaultValue==e.props.value})),t.class&&!t.className?(o.class=t.class,Object.defineProperty(o,"className",ot)):(t.className&&!t.class||t.class&&t.className)&&(o.class=o.className=t.className),e.props=o}(e),e.$$typeof=qe,_t&&_t(e)};var rt=t.__r;t.__r=function(e){rt&&rt(e),nt=e.__c};var it=t.diffed;t.diffed=function(e){it&&it(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),nt=null};var ut={ReactCurrentDispatcher:{current:{readContext:function(e){return nt.__n[e.__c].props.value},useCallback:fe,useContext:pe,useDebugValue:de,useDeferredValue:xe,useEffect:ue,useId:he,useImperativeHandle:ae,useInsertionEffect:Te,useLayoutEffect:le,useMemo:ce,useReducer:ie,useRef:se,useState:re,useSyncExternalStore:Ne,useTransition:Me}}};function lt(e){return!!e&&e.$$typeof===qe}var st={useState:re,useId:he,useReducer:ie,useEffect:ue,useLayoutEffect:le,useInsertionEffect:Te,useTransition:Me,useDeferredValue:xe,useSyncExternalStore:Ne,startTransition:Ce,useRef:se,useImperativeHandle:ae,useMemo:ce,useCallback:fe,useContext:pe,useDebugValue:de,version:"18.3.1",Children:De,render:function(e,t,n){return null==t.__k&&(t.textContent=""),V(e,t),"function"==typeof n&&n(),e?e.__c:null},hydrate:function(e,t,n){return B(e,t),"function"==typeof n&&n(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&(V(null,e),!0)},createPortal:function(e,t){var n=y(Je,{__v:e,h:t});return n.containerInfo=t,n},createElement:y,createContext:function(e){function t(e){var n,o;return this.getChildContext||(n=new Set,(o={})[t.__c]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,E(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+c++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t},createFactory:function(e){return y.bind(null,e)},cloneElement:function(e){return lt(e)?j.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:b,isValidElement:lt,isElement:lt,isFragment:function(e){return lt(e)&&e.type===b},isMemo:function(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")},findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:k,PureComponent:Ue,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:Ee(this.props,e)}function o(t){return this.shouldComponentUpdate=n,y(e,t)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o.type=e,o},forwardRef:function(e){function t(t){var n=we({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=He,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t},flushSync:function(e,t){return e(t)},unstable_batchedUpdates:function(e,t){return e(t)},StrictMode:b,Suspense:Le,SuspenseList:Ve,lazy:function(e){var t,n,o;function _(_){if(t||(t=e()).then(function(e){n=e.default||e},function(e){o=e}),o)throw o;if(!n)throw t;return y(n,_)}return _.displayName="Lazy",_.__f=!0,_},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ut};var at=0;Array.isArray;function ct(e,n,o,_,r,i){n||(n={});var u,l,s=n;if("ref"in s)for(l in s={},n)"ref"==l?u=n[l]:s[l]=n[l];var a={type:e,props:s,key:o,ref:u,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--at,__i:-1,__u:0,__source:r,__self:i};if("function"==typeof e&&(u=e.defaultProps))for(l in u)void 0===s[l]&&(s[l]=u[l]);return t.vnode&&t.vnode(a),a}const ft=new AbortController,pt={status:{indicator:"none",description:"All Systems Operational"},incidents:[],initialised:!1},dt={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 ht=!0;try{localStorage.setItem("test","test"),localStorage.removeItem("test")}catch(gt){ht=!1}class mt extends k{constructor(...e){super(...e),this.state={...pt},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(dt),50));try{const e=await fetch(`${this.props.apiBase}/v2/summary.json`,{signal:ft.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=ht?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 _;const r=[...e.incidents.filter(n),...e.scheduled_maintenances.filter(e=>"in_progress"===e.status).filter(n).map(o)];_=r.length?{indicator:r[0].impact,description:r[0].name,url:1===r.length&&r[0].shortlink||e.page.url}:{indicator:"none",description:"All Systems Operational"},this.update({status:_,incidents:r,initialised:!0})}catch(gt){if("AbortError"===gt.name)return void this.update(pt);throw gt}}stopPolling(){ft.abort(),clearInterval(this.pollIntervalId)}componentWillUnmount(){this._isMounted=!1,this.stopPolling()}dismiss(){ht?localStorage.setItem(`statuspage_dismissed_${new URL(this.props.apiBase).hostname}`,JSON.stringify(this.state.incidents.map(e=>e.id))):this.stopPolling(),this.update(pt)}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,_;if("none"===e.indicator&&this.state.previousState?({status:t,incidents:n}=this.state.previousState):({status:t,incidents:n}=this.state),"maintenance"===t.indicator?o=ct("i",{className:`${this.props.fontAwesomeVariant} fa-info-circle`,"aria-hidden":"true"}):"none"!==t.indicator&&(o=ct("i",{className:`${this.props.fontAwesomeVariant} fa-exclamation-triangle`,"aria-hidden":"true"})),n.length>2)_=`+ ${n.length-1} others`;else if(2===n.length)_="+ 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(),r=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];_=`${o(t.getDate())} ${r[t.getMonth()]} ${t.getFullYear()} from ${o(t.getHours())}:${o(t.getMinutes())} to ${o(n.getDate())} ${r[n.getMonth()]} ${n.getFullYear()} ${o(n.getHours())}:${o(n.getMinutes())}`}else e.incident_updates.length&&(_=e.incident_updates[0].body)}const r=this.state.initialised&&"none"!==e.indicator?0:-1;return ct("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":""}`,children:[ct("div",{className:"StatusPageEmbed__icon",children:o}),ct("div",{className:"StatusPageEmbed__content",children:[ct("h1",{className:"StatusPageEmbed__content__title",children:t.description}),ct("div",{className:"StatusPageEmbed__content__context",children:_}),t.url&&ct("div",{className:"StatusPageEmbed__content__link",children:ct("a",{href:t.url,tabIndex:r,target:"_blank",rel:"noopener noreferrer",children:"View latest updates"})})]}),ct("div",{className:"StatusPageEmbed__close",children:ct("button",{className:"StatusPageEmbed__close__button","aria-label":"Close",onClick:()=>this.dismiss(),tabIndex:r,children:ct("i",{className:`${this.props.fontAwesomeVariant} fa-times`,"aria-hidden":"true"})})})]})}}mt.defaultProps={apiBase:"https://status.warwick.ac.uk/api",components:[],pollInterval:6e4,position:"bl",testMode:!1,fontAwesomeVariant:"fas"};const vt=mt;function yt(){Array.from(document.querySelectorAll(".statuspage-embed-container")).forEach(e=>{const{apiBase:t,components:n,pollInterval:o,position:_,testMode:r}=e.dataset,i=n&&JSON.parse(n);st.render(ct(vt,{apiBase:t,components:i,pollInterval:o,position:_,testMode:r}),e)})}"complete"===document.readyState||"loaded"===document.readyState||"interactive"===document.readyState?yt():document.addEventListener("DOMContentLoaded",yt,!1)})();
//# sourceMappingURL=main.js.map