(function(f,xe){typeof exports=="object"&&typeof module!="undefined"?xe(require("react"),require("mobx"),require("mobx-react"),require("react-router-dom"),require("buildbot-plugin-support"),require("buildbot-data-js"),require("buildbot-ui"),require("react-dom")):typeof define=="function"&&define.amd?define(["react","mobx","mobx-react","react-router-dom","buildbot-plugin-support","buildbot-data-js","buildbot-ui","react-dom"],xe):(f=typeof globalThis!="undefined"?globalThis:f||self,xe(f.React,f.mobx,f.mobxReact,f.ReactRouterDOM,f.BuildbotPluginSupport,f.BuildbotDataJs,f.BuildbotUi,f.ReactDOM))})(this,function(f,xe,xt,Et,Ot,V,pe,de){"use strict";function ze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ct={exports:{}},$e={};/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Sr=f,Ar=Symbol.for("react.element"),Mr=Symbol.for("react.fragment"),Nr=Object.prototype.hasOwnProperty,$r=Sr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Dr={key:!0,ref:!0,__self:!0,__source:!0};function Tt(e,t,r){var n,o={},i=null,a=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(n in t)Nr.call(t,n)&&!Dr.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:Ar,type:e,key:i,ref:a,props:o,_owner:$r.current}}$e.Fragment=Mr,$e.jsx=Tt,$e.jsxs=Tt,Ct.exports=$e;var Pt=Ct.exports;const B=Pt.jsx,ie=Pt.jsxs,ui="";var St={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},At=f.createContext&&f.createContext(St),ee=globalThis&&globalThis.__assign||function(){return ee=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},ee.apply(this,arguments)},kr=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};function Mt(e){return e&&e.map(function(t,r){return f.createElement(t.tag,ee({key:r},t.attr),Mt(t.child))})}function Ve(e){return function(t){return f.createElement(Br,ee({attr:ee({},e.attr)},t),Mt(e.child))}}function Br(e){var t=function(r){var n=e.attr,o=e.size,i=e.title,a=kr(e,["attr","size","title"]),s=o||r.size||"1em",u;return r.className&&(u=r.className),e.className&&(u=(u?u+" ":"")+e.className),f.createElement("svg",ee({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,a,{className:u,style:ee(ee({color:e.color||r.color},r.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),i&&f.createElement("title",null,i),e.children)};return At!==void 0?f.createElement(At.Consumer,null,function(r){return t(r)}):t(St)}function Lr(e){return Ve({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"}}]})(e)}function jr(e){return Ve({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zM124 296c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h264c6.6 0 12 5.4 12 12v56c0 6.6-5.4 12-12 12H124z"}}]})(e)}function Ir(e){return Ve({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm144 276c0 6.6-5.4 12-12 12h-92v92c0 6.6-5.4 12-12 12h-56c-6.6 0-12-5.4-12-12v-92h-92c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h92v-92c0-6.6 5.4-12 12-12h56c6.6 0 12 5.4 12 12v92h92c6.6 0 12 5.4 12 12v56z"}}]})(e)}function N(){return N=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},N.apply(this,arguments)}function K(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}var Nt={exports:{}};/*!
	Copyright (c) 2018 Jed Watson.
	Licensed under the MIT License (MIT), see
	http://jedwatson.github.io/classnames
*/(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var a=typeof i;if(a==="string"||a==="number")n.push(i);else if(Array.isArray(i)){if(i.length){var s=r.apply(null,i);s&&n.push(s)}}else if(a==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){n.push(i.toString());continue}for(var u in i)t.call(i,u)&&i[u]&&n.push(u)}}}return n.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Nt);var Rr=Nt.exports;const De=ze(Rr);function Fr(e,t,r){var n=f.useRef(e!==void 0),o=f.useState(t),i=o[0],a=o[1],s=e!==void 0,u=n.current;return n.current=s,!s&&u&&i!==t&&a(t),[s?e:i,f.useCallback(function(c){for(var l=arguments.length,v=new Array(l>1?l-1:0),p=1;p<l;p++)v[p-1]=arguments[p];r&&r.apply(void 0,[c].concat(v)),a(c)},[r])]}function Xe(e,t){return Xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Xe(e,t)}function $t(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Xe(e,t)}var Ye=f.createContext({});Ye.Consumer,Ye.Provider;function ke(e,t){var r=f.useContext(Ye);return e||r[t]||t}function Ge(e){return e&&e.ownerDocument||document}function Wr(e){var t=Ge(e);return t&&t.defaultView||window}function Hr(e,t){return Wr(e).getComputedStyle(e,t)}var _r=/([A-Z])/g;function qr(e){return e.replace(_r,"-$1").toLowerCase()}var Ur=/^ms-/;function Be(e){return qr(e).replace(Ur,"-ms-")}var zr=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function Vr(e){return!!(e&&zr.test(e))}function Dt(e,t){var r="",n="";if(typeof t=="string")return e.style.getPropertyValue(Be(t))||Hr(e).getPropertyValue(Be(t));Object.keys(t).forEach(function(o){var i=t[o];!i&&i!==0?e.style.removeProperty(Be(o)):Vr(o)?n+=o+"("+i+") ":r+=Be(o)+": "+i+";"}),n&&(r+="transform: "+n+";"),e.style.cssText+=";"+r}var kt={exports:{}},Xr="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Yr=Xr,Gr=Yr;function Bt(){}function Lt(){}Lt.resetWarningCache=Bt;var Qr=function(){function e(n,o,i,a,s,u){if(u!==Gr){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Lt,resetWarningCache:Bt};return r.PropTypes=r,r};kt.exports=Qr();var Kr=kt.exports;const j=ze(Kr),jt={disabled:!1},It=f.createContext(null);var Zr=function(t){return t.scrollTop},Ee="unmounted",ae="exited",te="entering",se="entered",Qe="exiting",Z=function(e){$t(t,e);function t(n,o){var i;i=e.call(this,n,o)||this;var a=o,s=a&&!a.isMounting?n.enter:n.appear,u;return i.appearStatus=null,n.in?s?(u=ae,i.appearStatus=te):u=se:n.unmountOnExit||n.mountOnEnter?u=Ee:u=ae,i.state={status:u},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===Ee?{status:ae}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==te&&a!==se&&(i=te):(a===te||a===se)&&(i=Qe)}this.updateStatus(!1,i)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},r.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===te){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:de.findDOMNode(this);a&&Zr(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ae&&this.setState({status:Ee})},r.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,u=this.props.nodeRef?[s]:[de.findDOMNode(this),s],c=u[0],l=u[1],v=this.getTimeouts(),p=s?v.appear:v.enter;if(!o&&!a||jt.disabled){this.safeSetState({status:se},function(){i.props.onEntered(c)});return}this.props.onEnter(c,l),this.safeSetState({status:te},function(){i.props.onEntering(c,l),i.onTransitionEnd(p,function(){i.safeSetState({status:se},function(){i.props.onEntered(c,l)})})})},r.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:de.findDOMNode(this);if(!i||jt.disabled){this.safeSetState({status:ae},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:Qe},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:ae},function(){o.props.onExited(s)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},r.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},r.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:de.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=u[0],l=u[1];this.props.addEndListener(c,l)}o!=null&&setTimeout(this.nextCallback,o)},r.render=function(){var o=this.state.status;if(o===Ee)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=K(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return f.createElement(It.Provider,{value:null},typeof a=="function"?a(o,s):f.cloneElement(f.Children.only(a),s))},t}(f.Component);Z.contextType=It,Z.propTypes={};function ve(){}Z.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ve,onEntering:ve,onEntered:ve,onExit:ve,onExiting:ve,onExited:ve},Z.UNMOUNTED=Ee,Z.EXITED=ae,Z.ENTERING=te,Z.ENTERED=se,Z.EXITING=Qe;const Jr=Z,en=!!(typeof window!="undefined"&&window.document&&window.document.createElement);var Ke=!1,Ze=!1;try{var Je={get passive(){return Ke=!0},get once(){return Ze=Ke=!0}};en&&(window.addEventListener("test",Je,Je),window.removeEventListener("test",Je,!0))}catch(e){}function tn(e,t,r,n){if(n&&typeof n!="boolean"&&!Ze){var o=n.once,i=n.capture,a=r;!Ze&&o&&(a=r.__once||function s(u){this.removeEventListener(t,s,i),r.call(this,u)},r.__once=a),e.addEventListener(t,a,Ke?n:i)}e.addEventListener(t,r,n)}function rn(e,t,r,n){var o=n&&typeof n!="boolean"?n.capture:n;e.removeEventListener(t,r,o),r.__once&&e.removeEventListener(t,r.__once,o)}function he(e,t,r,n){return tn(e,t,r,n),function(){rn(e,t,r,n)}}function nn(e,t,r,n){if(r===void 0&&(r=!1),n===void 0&&(n=!0),e){var o=document.createEvent("HTMLEvents");o.initEvent(t,r,n),e.dispatchEvent(o)}}function on(e){var t=Dt(e,"transitionDuration")||"",r=t.indexOf("ms")===-1?1e3:1;return parseFloat(t)*r}function an(e,t,r){r===void 0&&(r=5);var n=!1,o=setTimeout(function(){n||nn(e,"transitionend",!0)},t+r),i=he(e,"transitionend",function(){n=!0},{once:!0});return function(){clearTimeout(o),i()}}function sn(e,t,r,n){r==null&&(r=on(e)||0);var o=an(e,r,n),i=he(e,"transitionend",t);return function(){o(),i()}}function Rt(e,t){var r=Dt(e,t)||"",n=r.indexOf("ms")===-1?1e3:1;return parseFloat(r)*n}function un(e,t){var r=Rt(e,"transitionDuration"),n=Rt(e,"transitionDelay"),o=sn(e,function(i){i.target===e&&(o(),t(i))},r+n)}function ln(e){e.offsetHeight}function cn(e){var t=f.useRef(e);return f.useEffect(function(){t.current=e},[e]),t}function Ft(e){var t=cn(e);return f.useCallback(function(){return t.current&&t.current.apply(t,arguments)},[t])}var fn=["className","children"],Le,pn={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1},dn=(Le={},Le[te]="show",Le[se]="show",Le),et=f.forwardRef(function(e,t){var r=e.className,n=e.children,o=K(e,fn),i=f.useCallback(function(a){ln(a),o.onEnter&&o.onEnter(a)},[o]);return f.createElement(Jr,N({ref:t,addEndListener:un},o,{onEnter:i}),function(a,s){return f.cloneElement(n,N({},s,{className:De("fade",r,n.props.className,dn[a])}))})});et.defaultProps=pn,et.displayName="Fade";const Wt=et;function Ht(){var e=f.useRef(!0),t=f.useRef(function(){return e.current});return f.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),t.current}function vn(e){var t=f.useRef(e);return t.current=e,t}function hn(e){var t=vn(e);f.useEffect(function(){return function(){return t.current()}},[])}var tt=Math.pow(2,31)-1;function _t(e,t,r){var n=r-Date.now();e.current=n<=tt?setTimeout(t,n):setTimeout(function(){return _t(e,t,r)},tt)}function mn(){var e=Ht(),t=f.useRef();return hn(function(){return clearTimeout(t.current)}),f.useMemo(function(){var r=function(){return clearTimeout(t.current)};function n(o,i){i===void 0&&(i=0),e()&&(r(),i<=tt?t.current=setTimeout(o,i):_t(t,o,Date.now()+i))}return{set:n,clear:r}},[])}function qt(){return f.useState(null)}function gn(e){var t=Ht();return[e[0],f.useCallback(function(r){if(t())return e[1](r)},[t,e[1]])]}var q="top",X="bottom",Y="right",U="left",rt="auto",Oe=[q,X,Y,U],me="start",Ce="end",bn="clippingParents",Ut="viewport",Te="popper",yn="reference",zt=Oe.reduce(function(e,t){return e.concat([t+"-"+me,t+"-"+Ce])},[]),nt=[].concat(Oe,[rt]).reduce(function(e,t){return e.concat([t,t+"-"+me,t+"-"+Ce])},[]),wn="beforeRead",xn="read",En="afterRead",On="beforeMain",Cn="main",Tn="afterMain",Pn="beforeWrite",Sn="write",An="afterWrite",Mn=[wn,xn,En,On,Cn,Tn,Pn,Sn,An];function G(e){return e.split("-")[0]}function z(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ue(e){var t=z(e).Element;return e instanceof t||e instanceof Element}function Q(e){var t=z(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function ot(e){if(typeof ShadowRoot=="undefined")return!1;var t=z(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var le=Math.max,je=Math.min,ge=Math.round;function it(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Vt(){return!/^((?!chrome|android).)*safari/i.test(it())}function be(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),o=1,i=1;t&&Q(e)&&(o=e.offsetWidth>0&&ge(n.width)/e.offsetWidth||1,i=e.offsetHeight>0&&ge(n.height)/e.offsetHeight||1);var a=ue(e)?z(e):window,s=a.visualViewport,u=!Vt()&&r,c=(n.left+(u&&s?s.offsetLeft:0))/o,l=(n.top+(u&&s?s.offsetTop:0))/i,v=n.width/o,p=n.height/i;return{width:v,height:p,top:l,right:c+v,bottom:l+p,left:c,x:c,y:l}}function at(e){var t=be(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function Xt(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&ot(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function re(e){return e?(e.nodeName||"").toLowerCase():null}function J(e){return z(e).getComputedStyle(e)}function Nn(e){return["table","td","th"].indexOf(re(e))>=0}function ne(e){return((ue(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ie(e){return re(e)==="html"?e:e.assignedSlot||e.parentNode||(ot(e)?e.host:null)||ne(e)}function Yt(e){return!Q(e)||J(e).position==="fixed"?null:e.offsetParent}function $n(e){var t=/firefox/i.test(it()),r=/Trident/i.test(it());if(r&&Q(e)){var n=J(e);if(n.position==="fixed")return null}var o=Ie(e);for(ot(o)&&(o=o.host);Q(o)&&["html","body"].indexOf(re(o))<0;){var i=J(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function Pe(e){for(var t=z(e),r=Yt(e);r&&Nn(r)&&J(r).position==="static";)r=Yt(r);return r&&(re(r)==="html"||re(r)==="body"&&J(r).position==="static")?t:r||$n(e)||t}function st(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Se(e,t,r){return le(e,je(t,r))}function Dn(e,t,r){var n=Se(e,t,r);return n>r?r:n}function Gt(){return{top:0,right:0,bottom:0,left:0}}function Qt(e){return Object.assign({},Gt(),e)}function Kt(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var kn=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,Qt(typeof t!="number"?t:Kt(t,Oe))};function Bn(e){var t,r=e.state,n=e.name,o=e.options,i=r.elements.arrow,a=r.modifiersData.popperOffsets,s=G(r.placement),u=st(s),c=[U,Y].indexOf(s)>=0,l=c?"height":"width";if(!(!i||!a)){var v=kn(o.padding,r),p=at(i),d=u==="y"?q:U,m=u==="y"?X:Y,h=r.rects.reference[l]+r.rects.reference[u]-a[u]-r.rects.popper[l],y=a[u]-r.rects.reference[u],x=Pe(i),w=x?u==="y"?x.clientHeight||0:x.clientWidth||0:0,C=h/2-y/2,g=v[d],E=w-p[l]-v[m],O=w/2-p[l]/2+C,T=Se(g,O,E),A=u;r.modifiersData[n]=(t={},t[A]=T,t.centerOffset=T-O,t)}}function Ln(e){var t=e.state,r=e.options,n=r.element,o=n===void 0?"[data-popper-arrow]":n;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||Xt(t.elements.popper,o)&&(t.elements.arrow=o))}const jn={name:"arrow",enabled:!0,phase:"main",fn:Bn,effect:Ln,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ye(e){return e.split("-")[1]}var In={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Rn(e,t){var r=e.x,n=e.y,o=t.devicePixelRatio||1;return{x:ge(r*o)/o||0,y:ge(n*o)/o||0}}function Zt(e){var t,r=e.popper,n=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,u=e.gpuAcceleration,c=e.adaptive,l=e.roundOffsets,v=e.isFixed,p=a.x,d=p===void 0?0:p,m=a.y,h=m===void 0?0:m,y=typeof l=="function"?l({x:d,y:h}):{x:d,y:h};d=y.x,h=y.y;var x=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),C=U,g=q,E=window;if(c){var O=Pe(r),T="clientHeight",A="clientWidth";if(O===z(r)&&(O=ne(r),J(O).position!=="static"&&s==="absolute"&&(T="scrollHeight",A="scrollWidth")),O=O,o===q||(o===U||o===Y)&&i===Ce){g=X;var P=v&&O===E&&E.visualViewport?E.visualViewport.height:O[T];h-=P-n.height,h*=u?1:-1}if(o===U||(o===q||o===X)&&i===Ce){C=Y;var D=v&&O===E&&E.visualViewport?E.visualViewport.width:O[A];d-=D-n.width,d*=u?1:-1}}var k=Object.assign({position:s},c&&In),L=l===!0?Rn({x:d,y:h},z(r)):{x:d,y:h};if(d=L.x,h=L.y,u){var b;return Object.assign({},k,(b={},b[g]=w?"0":"",b[C]=x?"0":"",b.transform=(E.devicePixelRatio||1)<=1?"translate("+d+"px, "+h+"px)":"translate3d("+d+"px, "+h+"px, 0)",b))}return Object.assign({},k,(t={},t[g]=w?h+"px":"",t[C]=x?d+"px":"",t.transform="",t))}function Fn(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=n===void 0?!0:n,i=r.adaptive,a=i===void 0?!0:i,s=r.roundOffsets,u=s===void 0?!0:s,c={placement:G(t.placement),variation:ye(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Zt(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Zt(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Wn={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Fn,data:{}};var Re={passive:!0};function Hn(e){var t=e.state,r=e.instance,n=e.options,o=n.scroll,i=o===void 0?!0:o,a=n.resize,s=a===void 0?!0:a,u=z(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(l){l.addEventListener("scroll",r.update,Re)}),s&&u.addEventListener("resize",r.update,Re),function(){i&&c.forEach(function(l){l.removeEventListener("scroll",r.update,Re)}),s&&u.removeEventListener("resize",r.update,Re)}}const _n={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Hn,data:{}};var qn={left:"right",right:"left",bottom:"top",top:"bottom"};function Fe(e){return e.replace(/left|right|bottom|top/g,function(t){return qn[t]})}var Un={start:"end",end:"start"};function Jt(e){return e.replace(/start|end/g,function(t){return Un[t]})}function ut(e){var t=z(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function lt(e){return be(ne(e)).left+ut(e).scrollLeft}function zn(e,t){var r=z(e),n=ne(e),o=r.visualViewport,i=n.clientWidth,a=n.clientHeight,s=0,u=0;if(o){i=o.width,a=o.height;var c=Vt();(c||!c&&t==="fixed")&&(s=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:s+lt(e),y:u}}function Vn(e){var t,r=ne(e),n=ut(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=le(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=le(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-n.scrollLeft+lt(e),u=-n.scrollTop;return J(o||r).direction==="rtl"&&(s+=le(r.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:u}}function ct(e){var t=J(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function er(e){return["html","body","#document"].indexOf(re(e))>=0?e.ownerDocument.body:Q(e)&&ct(e)?e:er(Ie(e))}function Ae(e,t){var r;t===void 0&&(t=[]);var n=er(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),i=z(n),a=o?[i].concat(i.visualViewport||[],ct(n)?n:[]):n,s=t.concat(a);return o?s:s.concat(Ae(Ie(a)))}function ft(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Xn(e,t){var r=be(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function tr(e,t,r){return t===Ut?ft(zn(e,r)):ue(t)?Xn(t,r):ft(Vn(ne(e)))}function Yn(e){var t=Ae(Ie(e)),r=["absolute","fixed"].indexOf(J(e).position)>=0,n=r&&Q(e)?Pe(e):e;return ue(n)?t.filter(function(o){return ue(o)&&Xt(o,n)&&re(o)!=="body"}):[]}function Gn(e,t,r,n){var o=t==="clippingParents"?Yn(e):[].concat(t),i=[].concat(o,[r]),a=i[0],s=i.reduce(function(u,c){var l=tr(e,c,n);return u.top=le(l.top,u.top),u.right=je(l.right,u.right),u.bottom=je(l.bottom,u.bottom),u.left=le(l.left,u.left),u},tr(e,a,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function rr(e){var t=e.reference,r=e.element,n=e.placement,o=n?G(n):null,i=n?ye(n):null,a=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,u;switch(o){case q:u={x:a,y:t.y-r.height};break;case X:u={x:a,y:t.y+t.height};break;case Y:u={x:t.x+t.width,y:s};break;case U:u={x:t.x-r.width,y:s};break;default:u={x:t.x,y:t.y}}var c=o?st(o):null;if(c!=null){var l=c==="y"?"height":"width";switch(i){case me:u[c]=u[c]-(t[l]/2-r[l]/2);break;case Ce:u[c]=u[c]+(t[l]/2-r[l]/2);break}}return u}function Me(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=n===void 0?e.placement:n,i=r.strategy,a=i===void 0?e.strategy:i,s=r.boundary,u=s===void 0?bn:s,c=r.rootBoundary,l=c===void 0?Ut:c,v=r.elementContext,p=v===void 0?Te:v,d=r.altBoundary,m=d===void 0?!1:d,h=r.padding,y=h===void 0?0:h,x=Qt(typeof y!="number"?y:Kt(y,Oe)),w=p===Te?yn:Te,C=e.rects.popper,g=e.elements[m?w:p],E=Gn(ue(g)?g:g.contextElement||ne(e.elements.popper),u,l,a),O=be(e.elements.reference),T=rr({reference:O,element:C,strategy:"absolute",placement:o}),A=ft(Object.assign({},C,T)),P=p===Te?A:O,D={top:E.top-P.top+x.top,bottom:P.bottom-E.bottom+x.bottom,left:E.left-P.left+x.left,right:P.right-E.right+x.right},k=e.modifiersData.offset;if(p===Te&&k){var L=k[o];Object.keys(D).forEach(function(b){var S=[Y,X].indexOf(b)>=0?1:-1,R=[q,X].indexOf(b)>=0?"y":"x";D[b]+=L[R]*S})}return D}function Qn(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=r.boundary,i=r.rootBoundary,a=r.padding,s=r.flipVariations,u=r.allowedAutoPlacements,c=u===void 0?nt:u,l=ye(n),v=l?s?zt:zt.filter(function(m){return ye(m)===l}):Oe,p=v.filter(function(m){return c.indexOf(m)>=0});p.length===0&&(p=v);var d=p.reduce(function(m,h){return m[h]=Me(e,{placement:h,boundary:o,rootBoundary:i,padding:a})[G(h)],m},{});return Object.keys(d).sort(function(m,h){return d[m]-d[h]})}function Kn(e){if(G(e)===rt)return[];var t=Fe(e);return[Jt(e),t,Jt(t)]}function Zn(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,i=o===void 0?!0:o,a=r.altAxis,s=a===void 0?!0:a,u=r.fallbackPlacements,c=r.padding,l=r.boundary,v=r.rootBoundary,p=r.altBoundary,d=r.flipVariations,m=d===void 0?!0:d,h=r.allowedAutoPlacements,y=t.options.placement,x=G(y),w=x===y,C=u||(w||!m?[Fe(y)]:Kn(y)),g=[y].concat(C).reduce(function(we,oe){return we.concat(G(oe)===rt?Qn(t,{placement:oe,boundary:l,rootBoundary:v,padding:c,flipVariations:m,allowedAutoPlacements:h}):oe)},[]),E=t.rects.reference,O=t.rects.popper,T=new Map,A=!0,P=g[0],D=0;D<g.length;D++){var k=g[D],L=G(k),b=ye(k)===me,S=[q,X].indexOf(L)>=0,R=S?"width":"height",$=Me(t,{placement:k,boundary:l,rootBoundary:v,altBoundary:p,padding:c}),I=S?b?Y:U:b?X:q;E[R]>O[R]&&(I=Fe(I));var _=Fe(I),H=[];if(i&&H.push($[L]<=0),s&&H.push($[I]<=0,$[_]<=0),H.every(function(we){return we})){P=k,A=!1;break}T.set(k,H)}if(A)for(var F=m?3:1,W=function(oe){var Ne=g.find(function(qe){var ce=T.get(qe);if(ce)return ce.slice(0,oe).every(function(bt){return bt})});if(Ne)return P=Ne,"break"},M=F;M>0;M--){var _e=W(M);if(_e==="break")break}t.placement!==P&&(t.modifiersData[n]._skip=!0,t.placement=P,t.reset=!0)}}const Jn={name:"flip",enabled:!0,phase:"main",fn:Zn,requiresIfExists:["offset"],data:{_skip:!1}};function nr(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function or(e){return[q,Y,X,U].some(function(t){return e[t]>=0})}function eo(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=Me(t,{elementContext:"reference"}),s=Me(t,{altBoundary:!0}),u=nr(a,n),c=nr(s,o,i),l=or(u),v=or(c);t.modifiersData[r]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:l,hasPopperEscaped:v},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":v})}const to={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:eo};function ro(e,t,r){var n=G(e),o=[U,q].indexOf(n)>=0?-1:1,i=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[U,Y].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}function no(e){var t=e.state,r=e.options,n=e.name,o=r.offset,i=o===void 0?[0,0]:o,a=nt.reduce(function(l,v){return l[v]=ro(v,t.rects,i),l},{}),s=a[t.placement],u=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=a}const oo={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:no};function io(e){var t=e.state,r=e.name;t.modifiersData[r]=rr({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const ao={name:"popperOffsets",enabled:!0,phase:"read",fn:io,data:{}};function so(e){return e==="x"?"y":"x"}function uo(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,i=o===void 0?!0:o,a=r.altAxis,s=a===void 0?!1:a,u=r.boundary,c=r.rootBoundary,l=r.altBoundary,v=r.padding,p=r.tether,d=p===void 0?!0:p,m=r.tetherOffset,h=m===void 0?0:m,y=Me(t,{boundary:u,rootBoundary:c,padding:v,altBoundary:l}),x=G(t.placement),w=ye(t.placement),C=!w,g=st(x),E=so(g),O=t.modifiersData.popperOffsets,T=t.rects.reference,A=t.rects.popper,P=typeof h=="function"?h(Object.assign({},t.rects,{placement:t.placement})):h,D=typeof P=="number"?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),k=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,L={x:0,y:0};if(O){if(i){var b,S=g==="y"?q:U,R=g==="y"?X:Y,$=g==="y"?"height":"width",I=O[g],_=I+y[S],H=I-y[R],F=d?-A[$]/2:0,W=w===me?T[$]:A[$],M=w===me?-A[$]:-T[$],_e=t.elements.arrow,we=d&&_e?at(_e):{width:0,height:0},oe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Gt(),Ne=oe[S],qe=oe[R],ce=Se(0,T[$],we[$]),bt=C?T[$]/2-F-ce-Ne-D.mainAxis:W-ce-Ne-D.mainAxis,ri=C?-T[$]/2+F+ce+qe+D.mainAxis:M+ce+qe+D.mainAxis,yt=t.elements.arrow&&Pe(t.elements.arrow),ni=yt?g==="y"?yt.clientTop||0:yt.clientLeft||0:0,br=(b=k==null?void 0:k[g])!=null?b:0,oi=I+bt-br-ni,ii=I+ri-br,yr=Se(d?je(_,oi):_,I,d?le(H,ii):H);O[g]=yr,L[g]=yr-I}if(s){var wr,ai=g==="x"?q:U,si=g==="x"?X:Y,fe=O[E],Ue=E==="y"?"height":"width",xr=fe+y[ai],Er=fe-y[si],wt=[q,U].indexOf(x)!==-1,Or=(wr=k==null?void 0:k[E])!=null?wr:0,Cr=wt?xr:fe-T[Ue]-A[Ue]-Or+D.altAxis,Tr=wt?fe+T[Ue]+A[Ue]-Or-D.altAxis:Er,Pr=d&&wt?Dn(Cr,fe,Tr):Se(d?Cr:xr,fe,d?Tr:Er);O[E]=Pr,L[E]=Pr-fe}t.modifiersData[n]=L}}const lo={name:"preventOverflow",enabled:!0,phase:"main",fn:uo,requiresIfExists:["offset"]};function co(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function fo(e){return e===z(e)||!Q(e)?ut(e):co(e)}function po(e){var t=e.getBoundingClientRect(),r=ge(t.width)/e.offsetWidth||1,n=ge(t.height)/e.offsetHeight||1;return r!==1||n!==1}function vo(e,t,r){r===void 0&&(r=!1);var n=Q(t),o=Q(t)&&po(t),i=ne(t),a=be(e,o,r),s={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(n||!n&&!r)&&((re(t)!=="body"||ct(i))&&(s=fo(t)),Q(t)?(u=be(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):i&&(u.x=lt(i))),{x:a.left+s.scrollLeft-u.x,y:a.top+s.scrollTop-u.y,width:a.width,height:a.height}}function ho(e){var t=new Map,r=new Set,n=[];e.forEach(function(i){t.set(i.name,i)});function o(i){r.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!r.has(s)){var u=t.get(s);u&&o(u)}}),n.push(i)}return e.forEach(function(i){r.has(i.name)||o(i)}),n}function mo(e){var t=ho(e);return Mn.reduce(function(r,n){return r.concat(t.filter(function(o){return o.phase===n}))},[])}function go(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function bo(e){var t=e.reduce(function(r,n){var o=r[n.name];return r[n.name]=o?Object.assign({},o,n,{options:Object.assign({},o.options,n.options),data:Object.assign({},o.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var ir={placement:"bottom",modifiers:[],strategy:"absolute"};function ar(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function yo(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,o=t.defaultOptions,i=o===void 0?ir:o;return function(s,u,c){c===void 0&&(c=i);var l={placement:"bottom",orderedModifiers:[],options:Object.assign({},ir,i),modifiersData:{},elements:{reference:s,popper:u},attributes:{},styles:{}},v=[],p=!1,d={state:l,setOptions:function(x){var w=typeof x=="function"?x(l.options):x;h(),l.options=Object.assign({},i,l.options,w),l.scrollParents={reference:ue(s)?Ae(s):s.contextElement?Ae(s.contextElement):[],popper:Ae(u)};var C=mo(bo([].concat(n,l.options.modifiers)));return l.orderedModifiers=C.filter(function(g){return g.enabled}),m(),d.update()},forceUpdate:function(){if(!p){var x=l.elements,w=x.reference,C=x.popper;if(ar(w,C)){l.rects={reference:vo(w,Pe(C),l.options.strategy==="fixed"),popper:at(C)},l.reset=!1,l.placement=l.options.placement,l.orderedModifiers.forEach(function(D){return l.modifiersData[D.name]=Object.assign({},D.data)});for(var g=0;g<l.orderedModifiers.length;g++){if(l.reset===!0){l.reset=!1,g=-1;continue}var E=l.orderedModifiers[g],O=E.fn,T=E.options,A=T===void 0?{}:T,P=E.name;typeof O=="function"&&(l=O({state:l,options:A,name:P,instance:d})||l)}}}},update:go(function(){return new Promise(function(y){d.forceUpdate(),y(l)})}),destroy:function(){h(),p=!0}};if(!ar(s,u))return d;d.setOptions(c).then(function(y){!p&&c.onFirstUpdate&&c.onFirstUpdate(y)});function m(){l.orderedModifiers.forEach(function(y){var x=y.name,w=y.options,C=w===void 0?{}:w,g=y.effect;if(typeof g=="function"){var E=g({state:l,name:x,instance:d,options:C}),O=function(){};v.push(E||O)}})}function h(){v.forEach(function(y){return y()}),v=[]}return d}}var wo=yo({defaultModifiers:[to,ao,Wn,_n,oo,Jn,lo,jn]}),sr=function(t){return{position:t,top:"0",left:"0",opacity:"0",pointerEvents:"none"}},xo={name:"applyStyles",enabled:!1},Eo={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:function(t){var r=t.state;return function(){var n=r.elements,o=n.reference,i=n.popper;if("removeAttribute"in o){var a=(o.getAttribute("aria-describedby")||"").split(",").filter(function(s){return s.trim()!==i.id});a.length?o.setAttribute("aria-describedby",a.join(",")):o.removeAttribute("aria-describedby")}}},fn:function(t){var r,n=t.state,o=n.elements,i=o.popper,a=o.reference,s=(r=i.getAttribute("role"))==null?void 0:r.toLowerCase();if(i.id&&s==="tooltip"&&"setAttribute"in a){var u=a.getAttribute("aria-describedby");if(u&&u.split(",").indexOf(i.id)!==-1)return;a.setAttribute("aria-describedby",u?u+","+i.id:i.id)}}},Oo=[];function Co(e,t,r){var n=r===void 0?{}:r,o=n.enabled,i=o===void 0?!0:o,a=n.placement,s=a===void 0?"bottom":a,u=n.strategy,c=u===void 0?"absolute":u,l=n.modifiers,v=l===void 0?Oo:l,p=K(n,["enabled","placement","strategy","modifiers"]),d=f.useRef(),m=f.useCallback(function(){var g;(g=d.current)==null||g.update()},[]),h=f.useCallback(function(){var g;(g=d.current)==null||g.forceUpdate()},[]),y=gn(f.useState({placement:s,update:m,forceUpdate:h,attributes:{},styles:{popper:sr(c),arrow:{}}})),x=y[0],w=y[1],C=f.useMemo(function(){return{name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:function(E){var O=E.state,T={},A={};Object.keys(O.elements).forEach(function(P){T[P]=O.styles[P],A[P]=O.attributes[P]}),w({state:O,styles:T,attributes:A,update:m,forceUpdate:h,placement:O.placement})}}},[m,h,w]);return f.useEffect(function(){!d.current||!i||d.current.setOptions({placement:s,strategy:c,modifiers:[].concat(v,[C,xo])})},[c,s,C,i]),f.useEffect(function(){if(!(!i||e==null||t==null))return d.current=wo(e,t,N({},p,{placement:s,strategy:c,modifiers:[].concat(v,[Eo,C])})),function(){d.current!=null&&(d.current.destroy(),d.current=void 0,w(function(g){return N({},g,{attributes:{},styles:{popper:sr(c)}})}))}},[i,e,t]),x}function ur(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}var To=function(){},Po=To;const So=ze(Po);function We(e){return e&&"setState"in e?de.findDOMNode(e):e!=null?e:null}const Ao=function(e){return Ge(We(e))};var Mo=27,lr=function(){};function No(e){return e.button===0}function $o(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var cr=function(t){return t&&("current"in t?t.current:t)};function Do(e,t,r){var n=r===void 0?{}:r,o=n.disabled,i=n.clickTrigger,a=i===void 0?"click":i,s=f.useRef(!1),u=t||lr,c=f.useCallback(function(p){var d,m=cr(e);So(!!m,"RootClose captured a close event but does not have a ref to compare it to. useRootClose(), should be passed a ref that resolves to a DOM node"),s.current=!m||$o(p)||!No(p)||!!ur(m,(d=p.composedPath==null?void 0:p.composedPath()[0])!=null?d:p.target)},[e]),l=Ft(function(p){s.current||u(p)}),v=Ft(function(p){p.keyCode===Mo&&u(p)});f.useEffect(function(){if(!(o||e==null)){var p=window.event,d=Ao(cr(e)),m=he(d,a,c,!0),h=he(d,a,function(w){if(w===p){p=void 0;return}l(w)}),y=he(d,"keyup",function(w){if(w===p){p=void 0;return}v(w)}),x=[];return"ontouchstart"in d.documentElement&&(x=[].slice.call(d.body.children).map(function(w){return he(w,"mousemove",lr)})),function(){m(),h(),y(),x.forEach(function(w){return w()})}}},[e,o,a,c,l,v])}function ko(e){var t={};return Array.isArray(e)?(e==null||e.forEach(function(r){t[r.name]=r}),t):e||t}function Bo(e){return e===void 0&&(e={}),Array.isArray(e)?e:Object.keys(e).map(function(t){return e[t].name=t,e[t]})}function Lo(e){var t,r,n,o,i=e.enabled,a=e.enableEvents,s=e.placement,u=e.flip,c=e.offset,l=e.fixed,v=e.containerPadding,p=e.arrowElement,d=e.popperConfig,m=d===void 0?{}:d,h=ko(m.modifiers);return N({},m,{placement:s,enabled:i,strategy:l?"fixed":m.strategy,modifiers:Bo(N({},h,{eventListeners:{enabled:a},preventOverflow:N({},h.preventOverflow,{options:v?N({padding:v},(t=h.preventOverflow)==null?void 0:t.options):(r=h.preventOverflow)==null?void 0:r.options}),offset:{options:N({offset:c},(n=h.offset)==null?void 0:n.options)},arrow:N({},h.arrow,{enabled:!!p,options:N({},(o=h.arrow)==null?void 0:o.options,{element:p})}),flip:N({enabled:!!u},h.flip)}))})}var fr=function(t){return!t||typeof t=="function"?t:function(r){t.current=r}};function jo(e,t){var r=fr(e),n=fr(t);return function(o){r&&r(o),n&&n(o)}}function Io(e,t){return f.useMemo(function(){return jo(e,t)},[e,t])}function pt(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function dt(e){var t=window.getComputedStyle(e),r=parseFloat(t.marginTop)||0,n=parseFloat(t.marginRight)||0,o=parseFloat(t.marginBottom)||0,i=parseFloat(t.marginLeft)||0;return{top:r,right:n,bottom:o,left:i}}function Ro(){var e=f.useRef(null),t=f.useRef(null),r=f.useRef(null),n=ke(void 0,"popover"),o=ke(void 0,"dropdown-menu"),i=f.useCallback(function(c){!c||!(pt(c,n)||pt(c,o))||(t.current=dt(c),c.style.margin="0",e.current=c)},[n,o]),a=f.useMemo(function(){return{name:"offset",options:{offset:function(l){var v=l.placement;if(!t.current)return[0,0];var p=t.current,d=p.top,m=p.left,h=p.bottom,y=p.right;switch(v.split("-")[0]){case"top":return[0,h];case"left":return[0,y];case"bottom":return[0,d];case"right":return[0,m];default:return[0,0]}}}}},[t]),s=f.useMemo(function(){return{name:"arrow",options:{padding:function(){if(!r.current)return 0;var l=r.current,v=l.top,p=l.right,d=v||p;return{top:d,left:d,right:d,bottom:d}}}}},[r]),u=f.useMemo(function(){return{name:"popoverArrowMargins",enabled:!0,phase:"main",fn:function(){},requiresIfExists:["arrow"],effect:function(l){var v=l.state;if(!(!e.current||!v.elements.arrow||!pt(e.current,n))){if(v.modifiersData["arrow#persistent"]){var p=dt(v.elements.arrow),d=p.top,m=p.right,h=d||m;v.modifiersData["arrow#persistent"].padding={top:h,left:h,right:h,bottom:h}}else r.current=dt(v.elements.arrow);return v.elements.arrow.style.margin="0",function(){v.elements.arrow&&(v.elements.arrow.style.margin="")}}}}},[n]);return[i,[a,s,u]]}var pr={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;function r(n){return function(i,a,s,u,c){var l=s||"<<anonymous>>",v=c||a;if(i[a]==null)return new Error("The "+u+" `"+v+"` is required to make "+("`"+l+"` accessible for users of assistive ")+"technologies such as screen readers.");for(var p=arguments.length,d=Array(p>5?p-5:0),m=5;m<p;m++)d[m-5]=arguments[m];return n.apply(void 0,[i,a,s,u,c].concat(d))}}e.exports=t.default})(pr,pr.exports);var vt=function(t){var r;return typeof document=="undefined"?null:t==null?Ge().body:(typeof t=="function"&&(t=t()),t&&"current"in t&&(t=t.current),(r=t)!=null&&r.nodeType&&t||null)};function dr(e,t){var r=f.useState(function(){return vt(e)}),n=r[0],o=r[1];if(!n){var i=vt(e);i&&o(i)}return f.useEffect(function(){t&&n&&t(n)},[t,n]),f.useEffect(function(){var a=vt(e);a!==n&&o(a)},[e,n]),n}var ht=f.forwardRef(function(e,t){var r=e.flip,n=e.offset,o=e.placement,i=e.containerPadding,a=i===void 0?5:i,s=e.popperConfig,u=s===void 0?{}:s,c=e.transition,l=qt(),v=l[0],p=l[1],d=qt(),m=d[0],h=d[1],y=Io(p,t),x=dr(e.container),w=dr(e.target),C=f.useState(!e.show),g=C[0],E=C[1],O=Co(w,v,Lo({placement:o,enableEvents:!!e.show,containerPadding:a||5,flip:r,offset:n,arrowElement:m,popperConfig:u})),T=O.styles,A=O.attributes,P=K(O,["styles","attributes"]);e.show?g&&E(!1):!e.transition&&!g&&E(!0);var D=function(){E(!0),e.onExited&&e.onExited.apply(e,arguments)},k=e.show||c&&!g;if(Do(v,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!k)return null;var L=e.children(N({},P,{show:!!e.show,props:N({},A.popper,{style:T.popper,ref:y}),arrowProps:N({},A.arrow,{style:T.arrow,ref:h})}));if(c){var b=e.onExit,S=e.onExiting,R=e.onEnter,$=e.onEntering,I=e.onEntered;L=f.createElement(c,{in:e.show,appear:!0,onExit:b,onExiting:S,onExited:D,onEnter:R,onEntering:$,onEntered:I},L)}return x?de.createPortal(L,x):null});ht.displayName="Overlay",ht.propTypes={show:j.bool,placement:j.oneOf(nt),target:j.any,container:j.any,flip:j.bool,children:j.func.isRequired,containerPadding:j.number,popperConfig:j.object,rootClose:j.bool,rootCloseEvent:j.oneOf(["click","mousedown"]),rootCloseDisabled:j.bool,onHide:function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];if(t.rootClose){var i;return(i=j.func).isRequired.apply(i,[t].concat(n))}return j.func.apply(j,[t].concat(n))},transition:j.elementType,onEnter:j.func,onEntering:j.func,onEntered:j.func,onExit:j.func,onExiting:j.func,onExited:j.func};const Fo=ht;var Wo=["children","transition","popperConfig"],Ho=["props","arrowProps","show","update","forceUpdate","placement","state"],_o={transition:Wt,rootClose:!1,show:!1,placement:"top"};function qo(e,t){var r=e.ref,n=t.ref;e.ref=r.__wrapped||(r.__wrapped=function(o){return r(We(o))}),t.ref=n.__wrapped||(n.__wrapped=function(o){return n(We(o))})}function vr(e){var t=e.children,r=e.transition,n=e.popperConfig,o=n===void 0?{}:n,i=K(e,Wo),a=f.useRef({}),s=Ro(),u=s[0],c=s[1],l=r===!0?Wt:r||null;return f.createElement(Fo,N({},i,{ref:u,popperConfig:N({},o,{modifiers:c.concat(o.modifiers||[])}),transition:l}),function(v){var p,d=v.props,m=v.arrowProps,h=v.show,y=v.update;v.forceUpdate;var x=v.placement,w=v.state,C=K(v,Ho);qo(d,m);var g=Object.assign(a.current,{state:w,scheduleUpdate:y,placement:x,outOfBoundaries:(w==null||(p=w.modifiersData.hide)==null?void 0:p.isReferenceHidden)||!1});return typeof t=="function"?t(N({},C,d,{placement:x,show:h},!r&&h&&{className:"show"},{popper:g,arrowProps:m})):f.cloneElement(t,N({},C,d,{placement:x,arrowProps:m,popper:g,className:De(t.props.className,!r&&h&&"show"),style:N({},t.props.style,d.style)}))})}vr.defaultProps=_o;var Uo=["trigger","overlay","children","popperConfig","show","defaultShow","onToggle","delay","placement","flip"],zo=function(e){$t(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;return r.render=function(){return this.props.children},t}(f.Component);function Vo(e){return e&&typeof e=="object"?e:{show:e,hide:e}}function hr(e,t,r){var n=t[0],o=n.currentTarget,i=n.relatedTarget||n.nativeEvent[r];(!i||i!==o)&&!ur(o,i)&&e.apply(void 0,t)}var Xo={defaultShow:!1,trigger:["hover","focus"]};function mt(e){var t=e.trigger,r=e.overlay,n=e.children,o=e.popperConfig,i=o===void 0?{}:o,a=e.show,s=e.defaultShow,u=s===void 0?!1:s,c=e.onToggle,l=e.delay,v=e.placement,p=e.flip,d=p===void 0?v&&v.indexOf("auto")!==-1:p,m=K(e,Uo),h=f.useRef(null),y=mn(),x=f.useRef(""),w=Fr(a,u,c),C=w[0],g=w[1],E=Vo(l),O=typeof n!="function"?f.Children.only(n).props:{},T=O.onFocus,A=O.onBlur,P=O.onClick,D=f.useCallback(function(){return We(h.current)},[]),k=f.useCallback(function(){if(y.clear(),x.current="show",!E.show){g(!0);return}y.set(function(){x.current==="show"&&g(!0)},E.show)},[E.show,g,y]),L=f.useCallback(function(){if(y.clear(),x.current="hide",!E.hide){g(!1);return}y.set(function(){x.current==="hide"&&g(!1)},E.hide)},[E.hide,g,y]),b=f.useCallback(function(){k();for(var F=arguments.length,W=new Array(F),M=0;M<F;M++)W[M]=arguments[M];T==null||T.apply(void 0,W)},[k,T]),S=f.useCallback(function(){L();for(var F=arguments.length,W=new Array(F),M=0;M<F;M++)W[M]=arguments[M];A==null||A.apply(void 0,W)},[L,A]),R=f.useCallback(function(){g(!C),P&&P.apply(void 0,arguments)},[P,g,C]),$=f.useCallback(function(){for(var F=arguments.length,W=new Array(F),M=0;M<F;M++)W[M]=arguments[M];hr(k,W,"fromElement")},[k]),I=f.useCallback(function(){for(var F=arguments.length,W=new Array(F),M=0;M<F;M++)W[M]=arguments[M];hr(L,W,"toElement")},[L]),_=t==null?[]:[].concat(t),H={};return _.indexOf("click")!==-1&&(H.onClick=R),_.indexOf("focus")!==-1&&(H.onFocus=b,H.onBlur=S),_.indexOf("hover")!==-1&&(H.onMouseOver=$,H.onMouseOut=I),f.createElement(f.Fragment,null,typeof n=="function"?n(N({},H,{ref:h})):f.createElement(zo,{ref:h},f.cloneElement(n,H)),f.createElement(vr,N({},m,{show:C,onHide:L,flip:d,placement:v,popperConfig:i,target:D}),r))}mt.defaultProps=Xo;var Yo=["bsPrefix","className","striped","bordered","borderless","hover","size","variant","responsive"],Go=f.forwardRef(function(e,t){var r=e.bsPrefix,n=e.className,o=e.striped,i=e.bordered,a=e.borderless,s=e.hover,u=e.size,c=e.variant,l=e.responsive,v=K(e,Yo),p=ke(r,"table"),d=De(n,p,c&&p+"-"+c,u&&p+"-"+u,o&&p+"-striped",i&&p+"-bordered",a&&p+"-borderless",s&&p+"-hover"),m=f.createElement("table",N({},v,{className:d,ref:t}));if(l){var h=p+"-responsive";return typeof l=="string"&&(h=h+"-"+l),f.createElement("div",{className:h},m)}return m});const Qo=Go;var Ko=["bsPrefix","placement","className","style","children","arrowProps","popper","show"],Zo={placement:"right"},gt=f.forwardRef(function(e,t){var r=e.bsPrefix,n=e.placement,o=e.className,i=e.style,a=e.children,s=e.arrowProps;e.popper,e.show;var u=K(e,Ko);r=ke(r,"tooltip");var c=(n==null?void 0:n.split("-"))||[],l=c[0];return f.createElement("div",N({ref:t,style:i,role:"tooltip","x-placement":l,className:De(o,r,"bs-tooltip-"+l)},u),f.createElement("div",N({className:"arrow"},s)),f.createElement("div",{className:r+"-inner"},a))});gt.defaultProps=Zo,gt.displayName="Tooltip";const mr=gt;function gr(e){const t=new Map;for(const a of e)if(a.tags!==null)for(const s of a.tags)pe.pushIntoMapOfArrays(t,s,a);const r=[];for(const[a,s]of t)s.length<e.length&&r.push({tag:a,builders:s});r.sort((a,s)=>s.builders.length-a.builders.length);const n=[],o=new Map;for(const a of r){let s=!1;for(const u of a.builders)if(o.has(u.builderid)){s=!0;break}if(!s){for(const u of a.builders)o.set(u.builderid,a.tag);n.push({tag:a.tag,builders:a.builders,childItems:[]})}}const i=[];for(const a of e)o.has(a.builderid)||i.push(a);if(i.length&&n.push({tag:"",builders:i,childItems:[]}),n.length>1)for(const a of n)a.childItems=gr(a.builders);return n}function Jo(e){const t=gr(e),r=new Map,n=[],o=(s,u,c)=>{const l=r.get(s);if(l===void 0){r.set(s,[{tag:u,colSpan:c}]);return}const v=l[l.length-1];if(v.tag===u){v.colSpan+=c;return}l.push({tag:u,colSpan:c})},i=(s,u)=>{if(o(u,s.tag,s.builders.length),s.childItems.length===0){s.builders.sort((c,l)=>c.name.localeCompare(l.name)),n.push(...s.builders);for(let c=1;c<=100;c++)o(u+c,"",s.builders.length);return}s.childItems.map(c=>i(c,u+1))};for(const s of t)i(s,0);const a=[];for(const s of r.values())s.length===1&&s[0].tag===""||a.push(s);return[n,a]}function He(e,t,r,n){const o=`${e}-${t}`,i=n.get(o);if(i!==void 0)return i;const a={change:new V.Change(void 0,"a/1",{changeid:0,author:"",branch:"",codebase:e,comments:`Unknown revision ${t}`,files:[],parent_changeids:[],project:"",properties:{},repository:"",revision:t,revlink:null,when_timestamp:r}),buildsByBuilderId:new Map};return n.set(o,a),a}function ei(e,t,r,n,o){if(t.sourcestamps!==null)for(const a of t.sourcestamps){const s=r.get(a.ssid);if(s!==void 0)return s}if(e.properties!==null&&"got_revision"in e.properties){const a=e.properties.got_revision[0];if(typeof a=="string"){const c=n.get(a);return c!==void 0?c:He("",a,e.started_at,o)}const s=a;for(const c in s){const l=s[c],v=n.get(l);if(v!==void 0)return v}const u=Object.keys(s);return u.length===0?He("unknown codebase","",e.started_at,o):He(u[0],s[u[0]],e.started_at,o)}const i=`unknown revision ${e.builderid}-${e.buildid}`;return He("unknown codebase",i,e.started_at,o)}const ti=xt.observer(()=>{const e=V.useDataAccessor([]),t=Ot.buildbotGetSettings(),r=t.getIntegerSetting("Console.changeLimit"),n=t.getIntegerSetting("Console.buildLimit"),o=V.useDataApiQuery(()=>V.Buildset.getAll(e,{query:{limit:n,order:"-submitted_at"}})),i=V.useDataApiQuery(()=>V.Change.getAll(e,{query:{limit:r,order:"-changeid"}})),a=V.useDataApiQuery(()=>V.Builder.getAll(e)),s=V.useDataApiQuery(()=>V.Buildrequest.getAll(e,{query:{limit:n,order:"-submitted_at"}})),u=V.useDataApiQuery(()=>V.Build.getAll(e,{query:{limit:n,order:"-started_at",property:["got_revision"]}})),c=pe.useWindowSize(),l=xt.useLocalObservable(()=>new xe.ObservableMap),v=o.resolved&&i.resolved&&a.resolved&&s.resolved&&u.resolved,p=new Set;for(const b of u.array)p.add(b.builderid);const d=a.array.filter(b=>p.has(b.builderid)),[m,h]=Jo(d),y=new Map,x=new Map,w=new Map;for(const b of i.array){const S={change:b,buildsByBuilderId:new Map};b.revision!==null&&y.set(b.revision,S),x.set(b.sourcestamp.ssid,S)}for(const b of u.array){if(b.buildrequestid===null)continue;const S=s.getByIdOrNull(b.buildrequestid.toString());if(S===null)continue;const R=o.getByIdOrNull(S.buildsetid.toString());if(R===null)continue;const $=ei(b,R,x,y,w);pe.pushIntoMapOfArrays($.buildsByBuilderId,b.builderid,b)}const C=[...x.values(),...w.values()].filter(b=>b.buildsByBuilderId.size>0).sort((b,S)=>S.change.when_timestamp-b.change.when_timestamp),E=[...l.values()].includes(!0)?400:200,O=()=>{const b=E;return(c.width-b)/m.length<40},T=()=>{let b=0;for(const S of m)b=Math.max(S.name.length,b);return Math.max(100,b*3)},A=()=>{for(const b of C)l.set(b.change.changeid,!0)},P=()=>{for(const b of l.keys())l.set(b,!1)};if(!v)return B("div",{className:"bb-console-container",children:B(pe.LoadingIndicator,{})});if(i.array.length===0)return B("div",{className:"bb-console-container",children:ie("p",{children:["No changes. Console View needs a changesource to be setup, and ",B(Et.Link,{to:"/changes",children:"changes"})," to be in the system."]})});const D=m.map(b=>B("th",{className:"column",children:B("span",{style:{marginTop:T()},className:"bb-console-table-builder",children:B(Et.Link,{to:`/builders/${b.builderid}`,children:b.name})})},b.name)),k=h.map((b,S)=>{const R=b.map(($,I)=>B("td",{colSpan:$.colSpan,children:B("span",{style:{width:$.colSpan*50},children:$.tag})},I));return ie("tr",{className:"bb-console-tag-row",children:[B("td",{className:"row-header"}),R]},`tag-${S}`)}),L=C.map(b=>{var $,I;const S=b.change,R=m.map(_=>{var W;const F=((W=b.buildsByBuilderId.get(_.builderid))!=null?W:[]).map(M=>B(pe.BuildLinkWithSummaryTooltip,{build:M},M.buildid));return B("td",{title:_.name,className:"column",children:F},_.name)});return ie("tr",{children:[B("td",{children:B(pe.ChangeDetails,{change:S,compact:!0,showDetails:($=l.get(S.changeid))!=null?$:!1,setShowDetails:_=>l.set(S.changeid,_)})}),R]},`change-${S.changeid}-${S.codebase}-${(I=S.revision)!=null?I:""}`)});return B("div",{className:"container bb-console",children:ie(Qo,{striped:!0,bordered:!0,className:O()?"table-fixedwidth":"",children:[B("thead",{children:ie("tr",{className:"bb-console-table-first-row first-row",children:[ie("th",{className:"row-header",style:{width:E},children:[B(mt,{trigger:"click",placement:"top",overlay:B(mr,{id:"bb-console-view-open-all-changes",children:"Open information for all changes"}),rootClose:!0,children:B(Ir,{onClick:b=>A(),className:"bb-console-changes-expand-icon clickable"})}),B(mt,{trigger:"click",placement:"top",overlay:B(mr,{id:"bb-console-view-close-all-changes",children:"Close information for all changes"}),rootClose:!0,children:B(jr,{onClick:b=>P(),className:"bb-console-changes-expand-icon clickable"})})]}),D]})}),ie("tbody",{children:[k,L]})]})})});Ot.buildbotSetupPlugin(e=>{e.registerMenuGroup({name:"console",caption:"Console View",icon:B(Lr,{}),order:5,route:"/console",parentName:null}),e.registerRoute({route:"/console",group:"console",element:()=>B(ti,{})}),e.registerSettingGroup({name:"Console",caption:"Console related settings",items:[{type:"integer",name:"changeLimit",caption:"Maximum number of changes to fetch",defaultValue:30},{type:"integer",name:"buildLimit",caption:"Maximum number of builds to fetch",defaultValue:200}]})})});
