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