(function(f,ye){typeof exports=="object"&&typeof module<"u"?ye(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"],ye):(f=typeof globalThis<"u"?globalThis:f||self,ye(f.React,f.mobx,f.mobxReact,f.ReactRouterDOM,f.BuildbotPluginSupport,f.BuildbotDataJs,f.BuildbotUi,f.ReactDOM))})(this,function(f,ye,xt,Et,Ot,z,ce,fe){"use strict";function Xe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ct={exports:{}},Me={};/**
 * @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 Pr=f,Sr=Symbol.for("react.element"),Tr=Symbol.for("react.fragment"),jr=Object.prototype.hasOwnProperty,Mr=Pr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Ar={key:!0,ref:!0,__self:!0,__source:!0};function Pt(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)jr.call(t,n)&&!Ar.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:Sr,type:e,key:i,ref:a,props:o,_owner:Mr.current}}Me.Fragment=Tr,Me.jsx=Pt,Me.jsxs=Pt,Ct.exports=Me;var S=Ct.exports,St={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Tt=f.createContext&&f.createContext(St),Nr=["attr","size","title"];function Dr(e,t){if(e==null)return{};var r=$r(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function $r(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Ae(){return Ae=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},Ae.apply(this,arguments)}function jt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jt(Object(r),!0).forEach(function(n){Lr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lr(e,t,r){return t=Br(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Br(e){var t=kr(e,"string");return typeof t=="symbol"?t:t+""}function kr(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mt(e){return e&&e.map((t,r)=>f.createElement(t.tag,Ne({key:r},t.attr),Mt(t.child)))}function Ye(e){return t=>f.createElement(Ir,Ae({attr:Ne({},e.attr)},t),Mt(e.child))}function Ir(e){var t=r=>{var{attr:n,size:o,title:i}=e,a=Dr(e,Nr),s=o||r.size||"1em",u;return r.className&&(u=r.className),e.className&&(u=(u?u+" ":"")+e.className),f.createElement("svg",Ae({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,a,{className:u,style:Ne(Ne({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 Tt!==void 0?f.createElement(Tt.Consumer,null,r=>t(r)):t(St)}function Rr(e){return Ye({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"},child:[]}]})(e)}function Wr(e){return Ye({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"},child:[]}]})(e)}function Fr(e){return Ye({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"},child:[]}]})(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)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},N.apply(null,arguments)}function K(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r}var At={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 i="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(i=o(i,n(s)))}return i}function n(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return r.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var a="";for(var s in i)t.call(i,s)&&i[s]&&(a=o(a,s));return a}function o(i,a){return a?i?i+" "+a:i+a:i}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(At);var Hr=At.exports;const De=Xe(Hr);function _r(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 Ge(e,t){return Ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Ge(e,t)}function Nt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ge(e,t)}var Qe=f.createContext({});Qe.Consumer,Qe.Provider;function $e(e,t){var r=f.useContext(Qe);return e||r[t]||t}function Ke(e){return e&&e.ownerDocument||document}function qr(e){var t=Ke(e);return t&&t.defaultView||window}function Ur(e,t){return qr(e).getComputedStyle(e,t)}var zr=/([A-Z])/g;function Vr(e){return e.replace(zr,"-$1").toLowerCase()}var Xr=/^ms-/;function Le(e){return Vr(e).replace(Xr,"-ms-")}var Yr=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function Gr(e){return!!(e&&Yr.test(e))}function Dt(e,t){var r="",n="";if(typeof t=="string")return e.style.getPropertyValue(Le(t))||Ur(e).getPropertyValue(Le(t));Object.keys(t).forEach(function(o){var i=t[o];!i&&i!==0?e.style.removeProperty(Le(o)):Gr(o)?n+=o+"("+i+") ":r+=Le(o)+": "+i+";"}),n&&(r+="transform: "+n+";"),e.style.cssText+=";"+r}var $t={exports:{}},Qr="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Kr=Qr,Zr=Kr;function Lt(){}function Bt(){}Bt.resetWarningCache=Lt;var Jr=function(){function e(n,o,i,a,s,u){if(u!==Zr){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:Bt,resetWarningCache:Lt};return r.PropTypes=r,r};$t.exports=Jr();var en=$t.exports;const k=Xe(en),kt={disabled:!1},It=f.createContext(null);var tn=function(t){return t.scrollTop},we="unmounted",oe="exited",ee="entering",ie="entered",Ze="exiting",Z=function(e){Nt(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=oe,i.appearStatus=ee):u=ie:n.unmountOnExit||n.mountOnEnter?u=we:u=oe,i.state={status:u},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===we?{status:oe}: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!==ee&&a!==ie&&(i=ee):(a===ee||a===ie)&&(i=Ze)}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===ee){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:fe.findDOMNode(this);a&&tn(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===oe&&this.setState({status:we})},r.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,u=this.props.nodeRef?[s]:[fe.findDOMNode(this),s],c=u[0],l=u[1],v=this.getTimeouts(),p=s?v.appear:v.enter;if(!o&&!a||kt.disabled){this.safeSetState({status:ie},function(){i.props.onEntered(c)});return}this.props.onEnter(c,l),this.safeSetState({status:ee},function(){i.props.onEntering(c,l),i.onTransitionEnd(p,function(){i.safeSetState({status:ie},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:fe.findDOMNode(this);if(!i||kt.disabled){this.safeSetState({status:oe},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:Ze},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:oe},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:fe.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===we)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 pe(){}Z.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:pe,onEntering:pe,onEntered:pe,onExit:pe,onExiting:pe,onExited:pe},Z.UNMOUNTED=we,Z.EXITED=oe,Z.ENTERING=ee,Z.ENTERED=ie,Z.EXITING=Ze;const rn=!!(typeof window<"u"&&window.document&&window.document.createElement);var Je=!1,et=!1;try{var tt={get passive(){return Je=!0},get once(){return et=Je=!0}};rn&&(window.addEventListener("test",tt,tt),window.removeEventListener("test",tt,!0))}catch{}function nn(e,t,r,n){if(n&&typeof n!="boolean"&&!et){var o=n.once,i=n.capture,a=r;!et&&o&&(a=r.__once||function s(u){this.removeEventListener(t,s,i),r.call(this,u)},r.__once=a),e.addEventListener(t,a,Je?n:i)}e.addEventListener(t,r,n)}function on(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 de(e,t,r,n){return nn(e,t,r,n),function(){on(e,t,r,n)}}function an(e,t,r,n){if(n===void 0&&(n=!0),e){var o=document.createEvent("HTMLEvents");o.initEvent(t,r,n),e.dispatchEvent(o)}}function sn(e){var t=Dt(e,"transitionDuration")||"",r=t.indexOf("ms")===-1?1e3:1;return parseFloat(t)*r}function un(e,t,r){r===void 0&&(r=5);var n=!1,o=setTimeout(function(){n||an(e,"transitionend",!0)},t+r),i=de(e,"transitionend",function(){n=!0},{once:!0});return function(){clearTimeout(o),i()}}function ln(e,t,r,n){r==null&&(r=sn(e)||0);var o=un(e,r,n),i=de(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 cn(e,t){var r=Rt(e,"transitionDuration"),n=Rt(e,"transitionDelay"),o=ln(e,function(i){i.target===e&&(o(),t(i))},r+n)}function fn(e){e.offsetHeight}function pn(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e},[e]),t}function Wt(e){const t=pn(e);return f.useCallback(function(...r){return t.current&&t.current(...r)},[t])}var dn=["className","children"],Be,vn={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1},mn=(Be={},Be[ee]="show",Be[ie]="show",Be),ke=f.forwardRef(function(e,t){var r=e.className,n=e.children,o=K(e,dn),i=f.useCallback(function(a){fn(a),o.onEnter&&o.onEnter(a)},[o]);return f.createElement(Z,N({ref:t,addEndListener:cn},o,{onEnter:i}),function(a,s){return f.cloneElement(n,N({},s,{className:De("fade",r,n.props.className,mn[a])}))})});ke.defaultProps=vn,ke.displayName="Fade";function Ft(){const e=f.useRef(!0),t=f.useRef(()=>e.current);return f.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function hn(e){const t=f.useRef(e);return t.current=e,t}function gn(e){const t=hn(e);f.useEffect(()=>()=>t.current(),[])}const rt=2**31-1;function Ht(e,t,r){const n=r-Date.now();e.current=n<=rt?setTimeout(t,n):setTimeout(()=>Ht(e,t,r),rt)}function bn(){const e=Ft(),t=f.useRef();return gn(()=>clearTimeout(t.current)),f.useMemo(()=>{const r=()=>clearTimeout(t.current);function n(o,i=0){e()&&(r(),i<=rt?t.current=setTimeout(o,i):Ht(t,o,Date.now()+i))}return{set:n,clear:r,handleRef:t}},[])}function _t(){return f.useState(null)}function yn(e){const t=Ft();return[e[0],f.useCallback(r=>{if(t())return e[1](r)},[t,e[1]])]}var _="top",V="bottom",X="right",q="left",nt="auto",xe=[_,V,X,q],ve="start",Ee="end",wn="clippingParents",qt="viewport",Oe="popper",xn="reference",Ut=xe.reduce(function(e,t){return e.concat([t+"-"+ve,t+"-"+Ee])},[]),ot=[].concat(xe,[nt]).reduce(function(e,t){return e.concat([t,t+"-"+ve,t+"-"+Ee])},[]),En="beforeRead",On="read",Cn="afterRead",Pn="beforeMain",Sn="main",Tn="afterMain",jn="beforeWrite",Mn="write",An="afterWrite",Nn=[En,On,Cn,Pn,Sn,Tn,jn,Mn,An];function G(e){return e.split("-")[0]}function U(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ae(e){var t=U(e).Element;return e instanceof t||e instanceof Element}function Q(e){var t=U(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function it(e){if(typeof ShadowRoot>"u")return!1;var t=U(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var se=Math.max,Ie=Math.min,me=Math.round;function at(){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 zt(){return!/^((?!chrome|android).)*safari/i.test(at())}function he(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&&me(n.width)/e.offsetWidth||1,i=e.offsetHeight>0&&me(n.height)/e.offsetHeight||1);var a=ae(e)?U(e):window,s=a.visualViewport,u=!zt()&&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 st(e){var t=he(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 Vt(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&it(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function te(e){return e?(e.nodeName||"").toLowerCase():null}function J(e){return U(e).getComputedStyle(e)}function Dn(e){return["table","td","th"].indexOf(te(e))>=0}function re(e){return((ae(e)?e.ownerDocument:e.document)||window.document).documentElement}function Re(e){return te(e)==="html"?e:e.assignedSlot||e.parentNode||(it(e)?e.host:null)||re(e)}function Xt(e){return!Q(e)||J(e).position==="fixed"?null:e.offsetParent}function $n(e){var t=/firefox/i.test(at()),r=/Trident/i.test(at());if(r&&Q(e)){var n=J(e);if(n.position==="fixed")return null}var o=Re(e);for(it(o)&&(o=o.host);Q(o)&&["html","body"].indexOf(te(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 Ce(e){for(var t=U(e),r=Xt(e);r&&Dn(r)&&J(r).position==="static";)r=Xt(r);return r&&(te(r)==="html"||te(r)==="body"&&J(r).position==="static")?t:r||$n(e)||t}function ut(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Pe(e,t,r){return se(e,Ie(t,r))}function Ln(e,t,r){var n=Pe(e,t,r);return n>r?r:n}function Yt(){return{top:0,right:0,bottom:0,left:0}}function Gt(e){return Object.assign({},Yt(),e)}function Qt(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var Bn=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,Gt(typeof t!="number"?t:Qt(t,xe))};function kn(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=ut(s),c=[q,X].indexOf(s)>=0,l=c?"height":"width";if(!(!i||!a)){var v=Bn(o.padding,r),p=st(i),d=u==="y"?_:q,h=u==="y"?V:X,m=r.rects.reference[l]+r.rects.reference[u]-a[u]-r.rects.popper[l],y=a[u]-r.rects.reference[u],x=Ce(i),w=x?u==="y"?x.clientHeight||0:x.clientWidth||0:0,C=m/2-y/2,g=v[d],E=w-p[l]-v[h],O=w/2-p[l]/2+C,P=Pe(g,O,E),M=u;r.modifiersData[n]=(t={},t[M]=P,t.centerOffset=P-O,t)}}function In(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)||Vt(t.elements.popper,o)&&(t.elements.arrow=o))}const Rn={name:"arrow",enabled:!0,phase:"main",fn:kn,effect:In,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ge(e){return e.split("-")[1]}var Wn={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Fn(e,t){var r=e.x,n=e.y,o=t.devicePixelRatio||1;return{x:me(r*o)/o||0,y:me(n*o)/o||0}}function Kt(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,h=a.y,m=h===void 0?0:h,y=typeof l=="function"?l({x:d,y:m}):{x:d,y:m};d=y.x,m=y.y;var x=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),C=q,g=_,E=window;if(c){var O=Ce(r),P="clientHeight",M="clientWidth";if(O===U(r)&&(O=re(r),J(O).position!=="static"&&s==="absolute"&&(P="scrollHeight",M="scrollWidth")),O=O,o===_||(o===q||o===X)&&i===Ee){g=V;var T=v&&O===E&&E.visualViewport?E.visualViewport.height:O[P];m-=T-n.height,m*=u?1:-1}if(o===q||(o===_||o===V)&&i===Ee){C=X;var D=v&&O===E&&E.visualViewport?E.visualViewport.width:O[M];d-=D-n.width,d*=u?1:-1}}var $=Object.assign({position:s},c&&Wn),B=l===!0?Fn({x:d,y:m},U(r)):{x:d,y:m};if(d=B.x,m=B.y,u){var b;return Object.assign({},$,(b={},b[g]=w?"0":"",b[C]=x?"0":"",b.transform=(E.devicePixelRatio||1)<=1?"translate("+d+"px, "+m+"px)":"translate3d("+d+"px, "+m+"px, 0)",b))}return Object.assign({},$,(t={},t[g]=w?m+"px":"",t[C]=x?d+"px":"",t.transform="",t))}function Hn(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:ge(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,Kt(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,Kt(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 _n={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Hn,data:{}};var We={passive:!0};function qn(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=U(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(l){l.addEventListener("scroll",r.update,We)}),s&&u.addEventListener("resize",r.update,We),function(){i&&c.forEach(function(l){l.removeEventListener("scroll",r.update,We)}),s&&u.removeEventListener("resize",r.update,We)}}const Un={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:qn,data:{}};var zn={left:"right",right:"left",bottom:"top",top:"bottom"};function Fe(e){return e.replace(/left|right|bottom|top/g,function(t){return zn[t]})}var Vn={start:"end",end:"start"};function Zt(e){return e.replace(/start|end/g,function(t){return Vn[t]})}function lt(e){var t=U(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function ct(e){return he(re(e)).left+lt(e).scrollLeft}function Xn(e,t){var r=U(e),n=re(e),o=r.visualViewport,i=n.clientWidth,a=n.clientHeight,s=0,u=0;if(o){i=o.width,a=o.height;var c=zt();(c||!c&&t==="fixed")&&(s=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:s+ct(e),y:u}}function Yn(e){var t,r=re(e),n=lt(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=se(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=se(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-n.scrollLeft+ct(e),u=-n.scrollTop;return J(o||r).direction==="rtl"&&(s+=se(r.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:u}}function ft(e){var t=J(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function Jt(e){return["html","body","#document"].indexOf(te(e))>=0?e.ownerDocument.body:Q(e)&&ft(e)?e:Jt(Re(e))}function Se(e,t){var r;t===void 0&&(t=[]);var n=Jt(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),i=U(n),a=o?[i].concat(i.visualViewport||[],ft(n)?n:[]):n,s=t.concat(a);return o?s:s.concat(Se(Re(a)))}function pt(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Gn(e,t){var r=he(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 er(e,t,r){return t===qt?pt(Xn(e,r)):ae(t)?Gn(t,r):pt(Yn(re(e)))}function Qn(e){var t=Se(Re(e)),r=["absolute","fixed"].indexOf(J(e).position)>=0,n=r&&Q(e)?Ce(e):e;return ae(n)?t.filter(function(o){return ae(o)&&Vt(o,n)&&te(o)!=="body"}):[]}function Kn(e,t,r,n){var o=t==="clippingParents"?Qn(e):[].concat(t),i=[].concat(o,[r]),a=i[0],s=i.reduce(function(u,c){var l=er(e,c,n);return u.top=se(l.top,u.top),u.right=Ie(l.right,u.right),u.bottom=Ie(l.bottom,u.bottom),u.left=se(l.left,u.left),u},er(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 tr(e){var t=e.reference,r=e.element,n=e.placement,o=n?G(n):null,i=n?ge(n):null,a=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,u;switch(o){case _:u={x:a,y:t.y-r.height};break;case V:u={x:a,y:t.y+t.height};break;case X:u={x:t.x+t.width,y:s};break;case q:u={x:t.x-r.width,y:s};break;default:u={x:t.x,y:t.y}}var c=o?ut(o):null;if(c!=null){var l=c==="y"?"height":"width";switch(i){case ve:u[c]=u[c]-(t[l]/2-r[l]/2);break;case Ee:u[c]=u[c]+(t[l]/2-r[l]/2);break}}return u}function Te(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?wn:s,c=r.rootBoundary,l=c===void 0?qt:c,v=r.elementContext,p=v===void 0?Oe:v,d=r.altBoundary,h=d===void 0?!1:d,m=r.padding,y=m===void 0?0:m,x=Gt(typeof y!="number"?y:Qt(y,xe)),w=p===Oe?xn:Oe,C=e.rects.popper,g=e.elements[h?w:p],E=Kn(ae(g)?g:g.contextElement||re(e.elements.popper),u,l,a),O=he(e.elements.reference),P=tr({reference:O,element:C,strategy:"absolute",placement:o}),M=pt(Object.assign({},C,P)),T=p===Oe?M:O,D={top:E.top-T.top+x.top,bottom:T.bottom-E.bottom+x.bottom,left:E.left-T.left+x.left,right:T.right-E.right+x.right},$=e.modifiersData.offset;if(p===Oe&&$){var B=$[o];Object.keys(D).forEach(function(b){var j=[X,V].indexOf(b)>=0?1:-1,I=[_,V].indexOf(b)>=0?"y":"x";D[b]+=B[I]*j})}return D}function Zn(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?ot:u,l=ge(n),v=l?s?Ut:Ut.filter(function(h){return ge(h)===l}):xe,p=v.filter(function(h){return c.indexOf(h)>=0});p.length===0&&(p=v);var d=p.reduce(function(h,m){return h[m]=Te(e,{placement:m,boundary:o,rootBoundary:i,padding:a})[G(m)],h},{});return Object.keys(d).sort(function(h,m){return d[h]-d[m]})}function Jn(e){if(G(e)===nt)return[];var t=Fe(e);return[Zt(e),t,Zt(t)]}function eo(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,h=d===void 0?!0:d,m=r.allowedAutoPlacements,y=t.options.placement,x=G(y),w=x===y,C=u||(w||!h?[Fe(y)]:Jn(y)),g=[y].concat(C).reduce(function(be,ne){return be.concat(G(ne)===nt?Zn(t,{placement:ne,boundary:l,rootBoundary:v,padding:c,flipVariations:h,allowedAutoPlacements:m}):ne)},[]),E=t.rects.reference,O=t.rects.popper,P=new Map,M=!0,T=g[0],D=0;D<g.length;D++){var $=g[D],B=G($),b=ge($)===ve,j=[_,V].indexOf(B)>=0,I=j?"width":"height",A=Te(t,{placement:$,boundary:l,rootBoundary:v,altBoundary:p,padding:c}),R=j?b?X:q:b?V:_;E[I]>O[I]&&(R=Fe(R));var Y=Fe(R),W=[];if(i&&W.push(A[B]<=0),s&&W.push(A[R]<=0,A[Y]<=0),W.every(function(be){return be})){T=$,M=!1;break}P.set($,W)}if(M)for(var F=h?3:1,H=function(ne){var je=g.find(function(ze){var ue=P.get(ze);if(ue)return ue.slice(0,ne).every(function(bt){return bt})});if(je)return T=je,"break"},L=F;L>0;L--){var Ue=H(L);if(Ue==="break")break}t.placement!==T&&(t.modifiersData[n]._skip=!0,t.placement=T,t.reset=!0)}}const to={name:"flip",enabled:!0,phase:"main",fn:eo,requiresIfExists:["offset"],data:{_skip:!1}};function rr(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 nr(e){return[_,X,V,q].some(function(t){return e[t]>=0})}function ro(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=Te(t,{elementContext:"reference"}),s=Te(t,{altBoundary:!0}),u=rr(a,n),c=rr(s,o,i),l=nr(u),v=nr(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 no={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ro};function oo(e,t,r){var n=G(e),o=[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,[q,X].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}function io(e){var t=e.state,r=e.options,n=e.name,o=r.offset,i=o===void 0?[0,0]:o,a=ot.reduce(function(l,v){return l[v]=oo(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 ao={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:io};function so(e){var t=e.state,r=e.name;t.modifiersData[r]=tr({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const uo={name:"popperOffsets",enabled:!0,phase:"read",fn:so,data:{}};function lo(e){return e==="x"?"y":"x"}function co(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,h=r.tetherOffset,m=h===void 0?0:h,y=Te(t,{boundary:u,rootBoundary:c,padding:v,altBoundary:l}),x=G(t.placement),w=ge(t.placement),C=!w,g=ut(x),E=lo(g),O=t.modifiersData.popperOffsets,P=t.rects.reference,M=t.rects.popper,T=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,D=typeof T=="number"?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),$=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,B={x:0,y:0};if(O){if(i){var b,j=g==="y"?_:q,I=g==="y"?V:X,A=g==="y"?"height":"width",R=O[g],Y=R+y[j],W=R-y[I],F=d?-M[A]/2:0,H=w===ve?P[A]:M[A],L=w===ve?-M[A]:-P[A],Ue=t.elements.arrow,be=d&&Ue?st(Ue):{width:0,height:0},ne=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Yt(),je=ne[j],ze=ne[I],ue=Pe(0,P[A],be[A]),bt=C?P[A]/2-F-ue-je-D.mainAxis:H-ue-je-D.mainAxis,ri=C?-P[A]/2+F+ue+ze+D.mainAxis:L+ue+ze+D.mainAxis,yt=t.elements.arrow&&Ce(t.elements.arrow),ni=yt?g==="y"?yt.clientTop||0:yt.clientLeft||0:0,hr=(b=$?.[g])!=null?b:0,oi=R+bt-hr-ni,ii=R+ri-hr,gr=Pe(d?Ie(Y,oi):Y,R,d?se(W,ii):W);O[g]=gr,B[g]=gr-R}if(s){var br,ai=g==="x"?_:q,si=g==="x"?V:X,le=O[E],Ve=E==="y"?"height":"width",yr=le+y[ai],wr=le-y[si],wt=[_,q].indexOf(x)!==-1,xr=(br=$?.[E])!=null?br:0,Er=wt?yr:le-P[Ve]-M[Ve]-xr+D.altAxis,Or=wt?le+P[Ve]+M[Ve]-xr-D.altAxis:wr,Cr=d&&wt?Ln(Er,le,Or):Pe(d?Er:yr,le,d?Or:wr);O[E]=Cr,B[E]=Cr-le}t.modifiersData[n]=B}}const fo={name:"preventOverflow",enabled:!0,phase:"main",fn:co,requiresIfExists:["offset"]};function po(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function vo(e){return e===U(e)||!Q(e)?lt(e):po(e)}function mo(e){var t=e.getBoundingClientRect(),r=me(t.width)/e.offsetWidth||1,n=me(t.height)/e.offsetHeight||1;return r!==1||n!==1}function ho(e,t,r){r===void 0&&(r=!1);var n=Q(t),o=Q(t)&&mo(t),i=re(t),a=he(e,o,r),s={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(n||!n&&!r)&&((te(t)!=="body"||ft(i))&&(s=vo(t)),Q(t)?(u=he(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):i&&(u.x=ct(i))),{x:a.left+s.scrollLeft-u.x,y:a.top+s.scrollTop-u.y,width:a.width,height:a.height}}function go(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 bo(e){var t=go(e);return Nn.reduce(function(r,n){return r.concat(t.filter(function(o){return o.phase===n}))},[])}function yo(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function wo(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 or={placement:"bottom",modifiers:[],strategy:"absolute"};function ir(){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 xo(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,o=t.defaultOptions,i=o===void 0?or:o;return function(s,u,c){c===void 0&&(c=i);var l={placement:"bottom",orderedModifiers:[],options:Object.assign({},or,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;m(),l.options=Object.assign({},i,l.options,w),l.scrollParents={reference:ae(s)?Se(s):s.contextElement?Se(s.contextElement):[],popper:Se(u)};var C=bo(wo([].concat(n,l.options.modifiers)));return l.orderedModifiers=C.filter(function(g){return g.enabled}),h(),d.update()},forceUpdate:function(){if(!p){var x=l.elements,w=x.reference,C=x.popper;if(ir(w,C)){l.rects={reference:ho(w,Ce(C),l.options.strategy==="fixed"),popper:st(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,P=E.options,M=P===void 0?{}:P,T=E.name;typeof O=="function"&&(l=O({state:l,options:M,name:T,instance:d})||l)}}}},update:yo(function(){return new Promise(function(y){d.forceUpdate(),y(l)})}),destroy:function(){m(),p=!0}};if(!ir(s,u))return d;d.setOptions(c).then(function(y){!p&&c.onFirstUpdate&&c.onFirstUpdate(y)});function h(){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 m(){v.forEach(function(y){return y()}),v=[]}return d}}var Eo=xo({defaultModifiers:[no,uo,_n,Un,ao,to,fo,Rn]}),ar=function(t){return{position:t,top:"0",left:"0",opacity:"0",pointerEvents:"none"}},Oo={name:"applyStyles",enabled:!1},Co={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)}}},Po=[];function So(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?Po:l,p=K(n,["enabled","placement","strategy","modifiers"]),d=f.useRef(),h=f.useCallback(function(){var g;(g=d.current)==null||g.update()},[]),m=f.useCallback(function(){var g;(g=d.current)==null||g.forceUpdate()},[]),y=yn(f.useState({placement:s,update:h,forceUpdate:m,attributes:{},styles:{popper:ar(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,P={},M={};Object.keys(O.elements).forEach(function(T){P[T]=O.styles[T],M[T]=O.attributes[T]}),w({state:O,styles:P,attributes:M,update:h,forceUpdate:m,placement:O.placement})}}},[h,m,w]);return f.useEffect(function(){!d.current||!i||d.current.setOptions({placement:s,strategy:c,modifiers:[].concat(v,[C,Oo])})},[c,s,C,i]),f.useEffect(function(){if(!(!i||e==null||t==null))return d.current=Eo(e,t,N({},p,{placement:s,strategy:c,modifiers:[].concat(v,[Co,C])})),function(){d.current!=null&&(d.current.destroy(),d.current=void 0,w(function(g){return N({},g,{attributes:{},styles:{popper:ar(c)}})}))}},[i,e,t]),x}function sr(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}var To=function(){},jo=To;const Mo=Xe(jo);function He(e){return e&&"setState"in e?fe.findDOMNode(e):e??null}const Ao=function(e){return Ke(He(e))};var No=27,ur=function(){};function Do(e){return e.button===0}function $o(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var lr=function(t){return t&&("current"in t?t.current:t)};function Lo(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||ur,c=f.useCallback(function(p){var d,h=lr(e);Mo(!!h,"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=!h||$o(p)||!Do(p)||!!sr(h,(d=p.composedPath==null?void 0:p.composedPath()[0])!=null?d:p.target)},[e]),l=Wt(function(p){s.current||u(p)}),v=Wt(function(p){p.keyCode===No&&u(p)});f.useEffect(function(){if(!(o||e==null)){var p=window.event,d=Ao(lr(e)),h=de(d,a,c,!0),m=de(d,a,function(w){if(w===p){p=void 0;return}l(w)}),y=de(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 de(w,"mousemove",ur)})),function(){h(),m(),y(),x.forEach(function(w){return w()})}}},[e,o,a,c,l,v])}function Bo(e){var t={};return Array.isArray(e)?(e?.forEach(function(r){t[r.name]=r}),t):e||t}function ko(e){return e===void 0&&(e={}),Array.isArray(e)?e:Object.keys(e).map(function(t){return e[t].name=t,e[t]})}function Io(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,h=d===void 0?{}:d,m=Bo(h.modifiers);return N({},h,{placement:s,enabled:i,strategy:l?"fixed":h.strategy,modifiers:ko(N({},m,{eventListeners:{enabled:a},preventOverflow:N({},m.preventOverflow,{options:v?N({padding:v},(t=m.preventOverflow)==null?void 0:t.options):(r=m.preventOverflow)==null?void 0:r.options}),offset:{options:N({offset:c},(n=m.offset)==null?void 0:n.options)},arrow:N({},m.arrow,{enabled:!!p,options:N({},(o=m.arrow)==null?void 0:o.options,{element:p})}),flip:N({enabled:!!u},m.flip)}))})}const cr=e=>!e||typeof e=="function"?e:t=>{e.current=t};function Ro(e,t){const r=cr(e),n=cr(t);return o=>{r&&r(o),n&&n(o)}}function Wo(e,t){return f.useMemo(()=>Ro(e,t),[e,t])}function dt(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function vt(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 Fo(){var e=f.useRef(null),t=f.useRef(null),r=f.useRef(null),n=$e(void 0,"popover"),o=$e(void 0,"dropdown-menu"),i=f.useCallback(function(c){!c||!(dt(c,n)||dt(c,o))||(t.current=vt(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,h=p.left,m=p.bottom,y=p.right;switch(v.split("-")[0]){case"top":return[0,m];case"left":return[0,y];case"bottom":return[0,d];case"right":return[0,h];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||!dt(e.current,n))){if(v.modifiersData["arrow#persistent"]){var p=vt(v.elements.arrow),d=p.top,h=p.right,m=d||h;v.modifiersData["arrow#persistent"].padding={top:m,left:m,right:m,bottom:m}}else r.current=vt(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 fr={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),h=5;h<p;h++)d[h-5]=arguments[h];return n.apply(void 0,[i,a,s,u,c].concat(d))}}e.exports=t.default})(fr,fr.exports);var mt=function(t){var r;return typeof document>"u"?null:t==null?Ke().body:(typeof t=="function"&&(t=t()),t&&"current"in t&&(t=t.current),(r=t)!=null&&r.nodeType&&t||null)};function pr(e,t){var r=f.useState(function(){return mt(e)}),n=r[0],o=r[1];if(!n){var i=mt(e);i&&o(i)}return f.useEffect(function(){},[t,n]),f.useEffect(function(){var a=mt(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=_t(),v=l[0],p=l[1],d=_t(),h=d[0],m=d[1],y=Wo(p,t),x=pr(e.container),w=pr(e.target),C=f.useState(!e.show),g=C[0],E=C[1],O=So(w,v,Io({placement:o,enableEvents:!!e.show,containerPadding:a||5,flip:r,offset:n,arrowElement:h,popperConfig:u})),P=O.styles,M=O.attributes,T=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)},$=e.show||c&&!g;if(Lo(v,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!$)return null;var B=e.children(N({},T,{show:!!e.show,props:N({},M.popper,{style:P.popper,ref:y}),arrowProps:N({},M.arrow,{style:P.arrow,ref:m})}));if(c){var b=e.onExit,j=e.onExiting,I=e.onEnter,A=e.onEntering,R=e.onEntered;B=f.createElement(c,{in:e.show,appear:!0,onExit:b,onExiting:j,onExited:D,onEnter:I,onEntering:A,onEntered:R},B)}return x?fe.createPortal(B,x):null});ht.displayName="Overlay",ht.propTypes={show:k.bool,placement:k.oneOf(ot),target:k.any,container:k.any,flip:k.bool,children:k.func.isRequired,containerPadding:k.number,popperConfig:k.object,rootClose:k.bool,rootCloseEvent:k.oneOf(["click","mousedown"]),rootCloseDisabled:k.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=k.func).isRequired.apply(i,[t].concat(n))}return k.func.apply(k,[t].concat(n))},transition:k.elementType,onEnter:k.func,onEntering:k.func,onEntered:k.func,onExit:k.func,onExiting:k.func,onExited:k.func};var Ho=["children","transition","popperConfig"],_o=["props","arrowProps","show","update","forceUpdate","placement","state"],qo={transition:ke,rootClose:!1,show:!1,placement:"top"};function Uo(e,t){var r=e.ref,n=t.ref;e.ref=r.__wrapped||(r.__wrapped=function(o){return r(He(o))}),t.ref=n.__wrapped||(n.__wrapped=function(o){return n(He(o))})}function dr(e){var t=e.children,r=e.transition,n=e.popperConfig,o=n===void 0?{}:n,i=K(e,Ho),a=f.useRef({}),s=Fo(),u=s[0],c=s[1],l=r===!0?ke:r||null;return f.createElement(ht,N({},i,{ref:u,popperConfig:N({},o,{modifiers:c.concat(o.modifiers||[])}),transition:l}),function(v){var p,d=v.props,h=v.arrowProps,m=v.show,y=v.update;v.forceUpdate;var x=v.placement,w=v.state,C=K(v,_o);Uo(d,h);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:m},!r&&m&&{className:"show"},{popper:g,arrowProps:h})):f.cloneElement(t,N({},C,d,{placement:x,arrowProps:h,popper:g,className:De(t.props.className,!r&&m&&"show"),style:N({},t.props.style,d.style)}))})}dr.defaultProps=qo;var zo=["trigger","overlay","children","popperConfig","show","defaultShow","onToggle","delay","placement","flip"],Vo=function(e){Nt(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 Xo(e){return e&&typeof e=="object"?e:{show:e,hide:e}}function vr(e,t,r){var n=t[0],o=n.currentTarget,i=n.relatedTarget||n.nativeEvent[r];(!i||i!==o)&&!sr(o,i)&&e.apply(void 0,t)}var Yo={defaultShow:!1,trigger:["hover","focus"]};function gt(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,h=K(e,zo),m=f.useRef(null),y=bn(),x=f.useRef(""),w=_r(a,u,c),C=w[0],g=w[1],E=Xo(l),O=typeof n!="function"?f.Children.only(n).props:{},P=O.onFocus,M=O.onBlur,T=O.onClick,D=f.useCallback(function(){return He(m.current)},[]),$=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]),B=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(){$();for(var F=arguments.length,H=new Array(F),L=0;L<F;L++)H[L]=arguments[L];P?.apply(void 0,H)},[$,P]),j=f.useCallback(function(){B();for(var F=arguments.length,H=new Array(F),L=0;L<F;L++)H[L]=arguments[L];M?.apply(void 0,H)},[B,M]),I=f.useCallback(function(){g(!C),T&&T.apply(void 0,arguments)},[T,g,C]),A=f.useCallback(function(){for(var F=arguments.length,H=new Array(F),L=0;L<F;L++)H[L]=arguments[L];vr($,H,"fromElement")},[$]),R=f.useCallback(function(){for(var F=arguments.length,H=new Array(F),L=0;L<F;L++)H[L]=arguments[L];vr(B,H,"toElement")},[B]),Y=t==null?[]:[].concat(t),W={};return Y.indexOf("click")!==-1&&(W.onClick=I),Y.indexOf("focus")!==-1&&(W.onFocus=b,W.onBlur=j),Y.indexOf("hover")!==-1&&(W.onMouseOver=A,W.onMouseOut=R),f.createElement(f.Fragment,null,typeof n=="function"?n(N({},W,{ref:m})):f.createElement(Vo,{ref:m},f.cloneElement(n,W)),f.createElement(dr,N({},h,{show:C,onHide:B,flip:d,placement:v,popperConfig:i,target:D}),r))}gt.defaultProps=Yo;var Go=["bsPrefix","className","striped","bordered","borderless","hover","size","variant","responsive"],Qo=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,Go),p=$e(r,"table"),d=De(n,p,c&&p+"-"+c,u&&p+"-"+u,o&&p+"-striped",i&&p+"-bordered",a&&p+"-borderless",s&&p+"-hover"),h=f.createElement("table",N({},v,{className:d,ref:t}));if(l){var m=p+"-responsive";return typeof l=="string"&&(m=m+"-"+l),f.createElement("div",{className:m},h)}return h}),Ko=["bsPrefix","placement","className","style","children","arrowProps","popper","show"],Zo={placement:"right"},_e=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=$e(r,"tooltip");var c=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))});_e.defaultProps=Zo,_e.displayName="Tooltip";function mr(e){const t=new Map;for(const a of e)if(a.tags!==null)for(const s of a.tags)ce.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=mr(a.builders);return n}function Jo(e){const t=mr(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 qe(e,t,r,n){const o=`${e}-${t}`,i=n.get(o);if(i!==void 0)return i;const a={change:new z.Change(void 0,{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:qe("",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?qe("unknown codebase","",e.started_at,o):qe(u[0],s[u[0]],e.started_at,o)}const i=`unknown revision ${e.builderid}-${e.buildid}`;return qe("unknown codebase",i,e.started_at,o)}const ti=xt.observer(()=>{const e=z.useDataAccessor([]),t=Ot.buildbotGetSettings(),r=t.getIntegerSetting("Console.changeLimit"),n=t.getIntegerSetting("Console.buildLimit"),o=z.useDataApiQuery(()=>z.Buildset.getAll(e,{query:{limit:n,order:"-submitted_at"}})),i=z.useDataApiQuery(()=>z.Change.getAll(e,{query:{limit:r,order:"-changeid"}})),a=z.useDataApiQuery(()=>z.Builder.getAll(e)),s=z.useDataApiQuery(()=>z.Buildrequest.getAll(e,{query:{limit:n,order:"-submitted_at"}})),u=z.useDataApiQuery(()=>z.Build.getAll(e,{query:{limit:n,order:"-started_at",property:["got_revision"]}})),c=ce.useWindowSize(),l=xt.useLocalObservable(()=>new ye.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)),[h,m]=Jo(d),y=new Map,x=new Map,w=new Map;for(const b of i.array){const j={change:b,buildsByBuilderId:new Map};b.revision!==null&&y.set(b.revision,j),x.set(b.sourcestamp.ssid,j)}for(const b of u.array){if(b.buildrequestid===null)continue;const j=s.getByIdOrNull(b.buildrequestid.toString());if(j===null)continue;const I=o.getByIdOrNull(j.buildsetid.toString());if(I===null)continue;const A=ei(b,I,x,y,w);ce.pushIntoMapOfArrays(A.buildsByBuilderId,b.builderid,b)}const C=[...x.values(),...w.values()].filter(b=>b.buildsByBuilderId.size>0).sort((b,j)=>j.change.when_timestamp-b.change.when_timestamp),E=[...l.values()].includes(!0)?400:200,O=()=>{const b=E;return(c.width-b)/h.length<40},P=()=>{let b=0;for(const j of h)b=Math.max(j.name.length,b);return Math.max(100,b*3)},M=()=>{for(const b of C)l.set(b.change.changeid,!0)},T=()=>{for(const b of l.keys())l.set(b,!1)};if(!v)return S.jsx("div",{className:"bb-console-container",children:S.jsx(ce.LoadingIndicator,{})});if(i.array.length===0)return S.jsx("div",{className:"bb-console-container",children:S.jsxs("p",{children:["No changes. Console View needs a changesource to be setup, and ",S.jsx(Et.Link,{to:"/changes",children:"changes"})," to be in the system."]})});const D=h.map(b=>S.jsx("th",{className:"column",children:S.jsx("span",{style:{marginTop:P()},className:"bb-console-table-builder",children:S.jsx(Et.Link,{to:`/builders/${b.builderid}`,children:b.name})})},b.name)),$=m.map((b,j)=>{const I=b.map((A,R)=>S.jsx("td",{colSpan:A.colSpan,children:S.jsx("span",{style:{width:A.colSpan*50},children:A.tag})},R));return S.jsxs("tr",{className:"bb-console-tag-row",children:[S.jsx("td",{className:"row-header"}),I]},`tag-${j}`)}),B=C.map(b=>{const j=b.change,I=h.map(A=>{const Y=(b.buildsByBuilderId.get(A.builderid)??[]).map(W=>S.jsx(ce.BuildLinkWithSummaryTooltip,{build:W},W.buildid));return S.jsx("td",{title:A.name,className:"column",children:Y},A.name)});return S.jsxs("tr",{children:[S.jsx("td",{children:S.jsx(ce.ChangeDetails,{change:j,compact:!0,showDetails:l.get(j.changeid)??!1,setShowDetails:A=>l.set(j.changeid,A)})}),I]},`change-${j.changeid}-${j.codebase}-${j.revision??""}`)});return S.jsx("div",{className:"container bb-console",children:S.jsxs(Qo,{striped:!0,bordered:!0,className:O()?"table-fixedwidth":"",children:[S.jsx("thead",{children:S.jsxs("tr",{className:"bb-console-table-first-row first-row",children:[S.jsxs("th",{className:"row-header",style:{width:E},children:[S.jsx(gt,{trigger:"click",placement:"top",overlay:S.jsx(_e,{id:"bb-console-view-open-all-changes",children:"Open information for all changes"}),rootClose:!0,children:S.jsx(Fr,{onClick:b=>M(),className:"bb-console-changes-expand-icon clickable"})}),S.jsx(gt,{trigger:"click",placement:"top",overlay:S.jsx(_e,{id:"bb-console-view-close-all-changes",children:"Close information for all changes"}),rootClose:!0,children:S.jsx(Wr,{onClick:b=>T(),className:"bb-console-changes-expand-icon clickable"})})]}),D]})}),S.jsxs("tbody",{children:[$,B]})]})})});Ot.buildbotSetupPlugin(e=>{e.registerMenuGroup({name:"console",caption:"Console View",icon:S.jsx(Rr,{}),order:5,route:"/console",parentName:null}),e.registerRoute({route:"/console",group:"console",element:()=>S.jsx(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}]})})});
