pulse-dashboard
Version:
A Next.js Dashboard application for real-time monitoring and historical analysis of Playwright test executions, based on playwright-pulse-report. This component provides the UI for visualizing Playwright test results and can be run as a standalone CLI too
1 lines • 71 kB
JavaScript
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,19530,(e,t,r)=>{var n=e.r(41015),a=e.r(80957),o=e.r(66305);t.exports=function(e,t){return e&&e.length?n(e,o(t,2),a):void 0}},49673,(e,t,r)=>{var n=e.r(41015),a=e.r(66305),o=e.r(98128);t.exports=function(e,t){return e&&e.length?n(e,a(t,2),o):void 0}},7600,e=>{"use strict";var t=e.i(43476),r=e.i(15288),n=e.i(2747),a=e.i(29592),o=e.i(83966),i=e.i(71645),s=e.i(71223),l=e.i(7670),c=e.i(97865),d=e.i(38279),u=e.i(81977),p=["points","className","baseLinePoints","connectNulls"];function f(){return(f=Object.assign.bind()).apply(this,arguments)}function m(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return h(e,void 0);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return h(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var x=function(e){return e&&e.x===+e.x&&e.y===+e.y},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[[]];return e.forEach(function(e){x(e)?t[t.length-1].push(e):t[t.length-1].length>0&&t.push([])}),x(e[0])&&t[t.length-1].push(e[0]),t[t.length-1].length<=0&&(t=t.slice(0,-1)),t},g=function(e,t){var r=v(e);t&&(r=[r.reduce(function(e,t){return[].concat(m(e),m(t))},[])]);var n=r.map(function(e){return e.reduce(function(e,t,r){return"".concat(e).concat(0===r?"M":"L").concat(t.x,",").concat(t.y)},"")}).join("");return 1===r.length?"".concat(n,"Z"):n},y=function(e,t,r){var n=g(e,r);return"".concat("Z"===n.slice(-1)?n.slice(0,-1):n,"L").concat(g(t.reverse(),r).slice(1))},b=function(e){var t=e.points,r=e.className,n=e.baseLinePoints,a=e.connectNulls,o=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)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}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,p);if(!t||!t.length)return null;var s=(0,l.default)("recharts-polygon",r);if(n&&n.length){var c=o.stroke&&"none"!==o.stroke,d=y(t,n,a);return i.default.createElement("g",{className:s},i.default.createElement("path",f({},(0,u.filterProps)(o,!0),{fill:"Z"===d.slice(-1)?o.fill:"none",stroke:"none",d:d})),c?i.default.createElement("path",f({},(0,u.filterProps)(o,!0),{fill:"none",d:g(t,a)})):null,c?i.default.createElement("path",f({},(0,u.filterProps)(o,!0),{fill:"none",d:g(n,a)})):null)}var m=g(t,a);return i.default.createElement("path",f({},(0,u.filterProps)(o,!0),{fill:"Z"===m.slice(-1)?o.fill:"none",className:s,d:m}))},j=e.i(9516),w=e.i(73393),k=e.i(68970);function N(e){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function C(){return(C=Object.assign.bind()).apply(this,arguments)}function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function A(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?S(Object(r),!0).forEach(function(t){E(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function O(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,D(n.key),n)}}function P(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(P=function(){return!!e})()}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function R(e,t){return(R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function E(e,t,r){return(t=D(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function D(e){var t=function(e,t){if("object"!=N(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=N(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==N(t)?t:t+""}var I=Math.PI/180,M=function(e){var t,r;function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=T(e),function(e,t){if(t&&("object"===N(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");var r=e;if(void 0===r)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(this,P()?Reflect.construct(e,t||[],T(this).constructor):e.apply(this,t))}if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&R(n,e),t=[{key:"getTickLineCoord",value:function(e){var t=this.props,r=t.cx,n=t.cy,a=t.radius,o=t.orientation,i=t.tickSize,s=(0,k.polarToCartesian)(r,n,a,e.coordinate),l=(0,k.polarToCartesian)(r,n,a+("inner"===o?-1:1)*(i||8),e.coordinate);return{x1:s.x,y1:s.y,x2:l.x,y2:l.y}}},{key:"getTickTextAnchor",value:function(e){var t=this.props.orientation,r=Math.cos(-e.coordinate*I);return r>1e-5?"outer"===t?"start":"end":r<-1e-5?"outer"===t?"end":"start":"middle"}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.cx,r=e.cy,n=e.radius,a=e.axisLine,o=e.axisLineType,s=A(A({},(0,u.filterProps)(this.props,!1)),{},{fill:"none"},(0,u.filterProps)(a,!1));if("circle"===o)return i.default.createElement(d.Dot,C({className:"recharts-polar-angle-axis-line"},s,{cx:t,cy:r,r:n}));var l=this.props.ticks.map(function(e){return(0,k.polarToCartesian)(t,r,n,e.coordinate)});return i.default.createElement(b,C({className:"recharts-polar-angle-axis-line"},s,{points:l}))}},{key:"renderTicks",value:function(){var e=this,t=this.props,r=t.ticks,a=t.tick,o=t.tickLine,s=t.tickFormatter,d=t.stroke,p=(0,u.filterProps)(this.props,!1),f=(0,u.filterProps)(a,!1),m=A(A({},p),{},{fill:"none"},(0,u.filterProps)(o,!1)),h=r.map(function(t,r){var u=e.getTickLineCoord(t),h=A(A(A({textAnchor:e.getTickTextAnchor(t)},p),{},{stroke:"none",fill:d},f),{},{index:r,payload:t,x:u.x2,y:u.y2});return i.default.createElement(c.Layer,C({className:(0,l.default)("recharts-polar-angle-axis-tick",(0,k.getTickClassName)(a)),key:"tick-".concat(t.coordinate)},(0,w.adaptEventsOfChild)(e.props,t,r)),o&&i.default.createElement("line",C({className:"recharts-polar-angle-axis-tick-line"},m,u)),a&&n.renderTickItem(a,h,s?s(t.value,r):t.value))});return i.default.createElement(c.Layer,{className:"recharts-polar-angle-axis-ticks"},h)}},{key:"render",value:function(){var e=this.props,t=e.ticks,r=e.radius,n=e.axisLine;return!(r<=0)&&t&&t.length?i.default.createElement(c.Layer,{className:(0,l.default)("recharts-polar-angle-axis",this.props.className)},n&&this.renderAxisLine(),this.renderTicks()):null}}],r=[{key:"renderTickItem",value:function(e,t,r){return i.default.isValidElement(e)?i.default.cloneElement(e,t):(0,s.default)(e)?e(t):i.default.createElement(j.Text,C({},t,{className:"recharts-polar-angle-axis-tick-value"}),r)}}],t&&O(n.prototype,t),r&&O(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n}(i.PureComponent);E(M,"displayName","PolarAngleAxis"),E(M,"axisType","angleAxis"),E(M,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var L=e.i(19530),_=e.i(49673),F=e.i(494),K=["cx","cy","angle","ticks","axisLine"],B=["ticks","tick","angle","tickFormatter","stroke"];function z(e){return(z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function H(){return(H=Object.assign.bind()).apply(this,arguments)}function V(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function G(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?V(Object(r),!0).forEach(function(t){Y(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function U(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)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}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function $(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Z(n.key),n)}}function X(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(X=function(){return!!e})()}function q(e){return(q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function W(e,t){return(W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Y(e,t,r){return(t=Z(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z(e){var t=function(e,t){if("object"!=z(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=z(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==z(t)?t:t+""}var J=function(e){var t,r;function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=q(e),function(e,t){if(t&&("object"===z(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");var r=e;if(void 0===r)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(this,X()?Reflect.construct(e,t||[],q(this).constructor):e.apply(this,t))}if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&W(n,e),t=[{key:"getTickValueCoord",value:function(e){var t=e.coordinate,r=this.props,n=r.angle,a=r.cx,o=r.cy;return(0,k.polarToCartesian)(a,o,t,n)}},{key:"getTickTextAnchor",value:function(){var e;switch(this.props.orientation){case"left":e="end";break;case"right":e="start";break;default:e="middle"}return e}},{key:"getViewBox",value:function(){var e=this.props,t=e.cx,r=e.cy,n=e.angle,a=e.ticks,o=(0,L.default)(a,function(e){return e.coordinate||0});return{cx:t,cy:r,startAngle:n,endAngle:n,innerRadius:(0,_.default)(a,function(e){return e.coordinate||0}).coordinate||0,outerRadius:o.coordinate||0}}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.cx,r=e.cy,n=e.angle,a=e.ticks,o=e.axisLine,s=U(e,K),l=a.reduce(function(e,t){return[Math.min(e[0],t.coordinate),Math.max(e[1],t.coordinate)]},[1/0,-1/0]),c=(0,k.polarToCartesian)(t,r,l[0],n),d=(0,k.polarToCartesian)(t,r,l[1],n),p=G(G(G({},(0,u.filterProps)(s,!1)),{},{fill:"none"},(0,u.filterProps)(o,!1)),{},{x1:c.x,y1:c.y,x2:d.x,y2:d.y});return i.default.createElement("line",H({className:"recharts-polar-radius-axis-line"},p))}},{key:"renderTicks",value:function(){var e=this,t=this.props,r=t.ticks,a=t.tick,o=t.angle,s=t.tickFormatter,d=t.stroke,p=U(t,B),f=this.getTickTextAnchor(),m=(0,u.filterProps)(p,!1),h=(0,u.filterProps)(a,!1),x=r.map(function(t,r){var u=e.getTickValueCoord(t),p=G(G(G(G({textAnchor:f,transform:"rotate(".concat(90-o,", ").concat(u.x,", ").concat(u.y,")")},m),{},{stroke:"none",fill:d},h),{},{index:r},u),{},{payload:t});return i.default.createElement(c.Layer,H({className:(0,l.default)("recharts-polar-radius-axis-tick",(0,k.getTickClassName)(a)),key:"tick-".concat(t.coordinate)},(0,w.adaptEventsOfChild)(e.props,t,r)),n.renderTickItem(a,p,s?s(t.value,r):t.value))});return i.default.createElement(c.Layer,{className:"recharts-polar-radius-axis-ticks"},x)}},{key:"render",value:function(){var e=this.props,t=e.ticks,r=e.axisLine,n=e.tick;return t&&t.length?i.default.createElement(c.Layer,{className:(0,l.default)("recharts-polar-radius-axis",this.props.className)},r&&this.renderAxisLine(),n&&this.renderTicks(),F.Label.renderCallByParent(this.props,this.getViewBox())):null}}],r=[{key:"renderTickItem",value:function(e,t,r){return i.default.isValidElement(e)?i.default.cloneElement(e,t):(0,s.default)(e)?e(t):i.default.createElement(j.Text,H({},t,{className:"recharts-polar-radius-axis-tick-value"}),r)}}],t&&$(n.prototype,t),r&&$(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n}(i.PureComponent);Y(J,"displayName","PolarRadiusAxis"),Y(J,"axisType","radiusAxis"),Y(J,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});var Q=e.i(73050),ee=e.i(82820),et=e.i(98892),er=e.i(29873),en=e.i(72733),ea=e.i(69212),eo=e.i(22787),ei=e.i(62728),es=e.i(94395),el=e.i(98770),ec=e.i(29071),ed=e.i(18519);function eu(e){return(eu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ep(){return(ep=Object.assign.bind()).apply(this,arguments)}function ef(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function em(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ef(Object(r),!0).forEach(function(t){ey(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ef(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function eh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,eb(n.key),n)}}function ex(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ex=function(){return!!e})()}function ev(e){return(ev=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eg(e,t){return(eg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ey(e,t,r){return(t=eb(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eb(e){var t=function(e,t){if("object"!=eu(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=eu(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==eu(t)?t:t+""}var ej=function(e){var t,r;function n(e){var t,r,a;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return r=n,a=[e],r=ev(r),ey(t=function(e,t){if(t&&("object"===eu(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");var r=e;if(void 0===r)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(this,ex()?Reflect.construct(r,a||[],ev(this).constructor):r.apply(this,a)),"pieRef",null),ey(t,"sectorRefs",[]),ey(t,"id",(0,es.uniqueId)("recharts-pie-")),ey(t,"handleAnimationEnd",function(){var e=t.props.onAnimationEnd;t.setState({isAnimationFinished:!0}),(0,s.default)(e)&&e()}),ey(t,"handleAnimationStart",function(){var e=t.props.onAnimationStart;t.setState({isAnimationFinished:!1}),(0,s.default)(e)&&e()}),t.state={isAnimationFinished:!e.isAnimationActive,prevIsAnimationActive:e.isAnimationActive,prevAnimationId:e.animationId,sectorToFocus:0},t}if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&eg(n,e),t=[{key:"isActiveIndex",value:function(e){var t=this.props.activeIndex;return Array.isArray(t)?-1!==t.indexOf(e):e===t}},{key:"hasActiveIndex",value:function(){var e=this.props.activeIndex;return Array.isArray(e)?0!==e.length:e||0===e}},{key:"renderLabels",value:function(e){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var t=this.props,r=t.label,a=t.labelLine,o=t.dataKey,s=t.valueKey,l=(0,u.filterProps)(this.props,!1),d=(0,u.filterProps)(r,!1),p=(0,u.filterProps)(a,!1),f=r&&r.offsetRadius||20,m=e.map(function(e,t){var u=(e.startAngle+e.endAngle)/2,m=(0,k.polarToCartesian)(e.cx,e.cy,e.outerRadius+f,u),h=em(em(em(em({},l),e),{},{stroke:"none"},d),{},{index:t,textAnchor:n.getTextAnchor(m.x,e.cx)},m),x=em(em(em(em({},l),e),{},{fill:"none",stroke:e.fill},p),{},{index:t,points:[(0,k.polarToCartesian)(e.cx,e.cy,e.outerRadius,u),m]}),v=o;return(0,er.default)(o)&&(0,er.default)(s)?v="value":(0,er.default)(o)&&(v=s),i.default.createElement(c.Layer,{key:"label-".concat(e.startAngle,"-").concat(e.endAngle,"-").concat(e.midAngle,"-").concat(t)},a&&n.renderLabelLineItem(a,x,"line"),n.renderLabelItem(r,h,(0,el.getValueByDataKey)(e,v)))});return i.default.createElement(c.Layer,{className:"recharts-pie-labels"},m)}},{key:"renderSectorsStatically",value:function(e){var t=this,r=this.props,n=r.activeShape,a=r.blendStroke,o=r.inactiveShape;return e.map(function(r,s){if((null==r?void 0:r.startAngle)===0&&(null==r?void 0:r.endAngle)===0&&1!==e.length)return null;var l=t.isActiveIndex(s),d=o&&t.hasActiveIndex()?o:null,u=em(em({},r),{},{stroke:a?r.fill:r.stroke,tabIndex:-1});return i.default.createElement(c.Layer,ep({ref:function(e){e&&!t.sectorRefs.includes(e)&&t.sectorRefs.push(e)},tabIndex:-1,className:"recharts-pie-sector"},(0,w.adaptEventsOfChild)(t.props,r,s),{key:"sector-".concat(null==r?void 0:r.startAngle,"-").concat(null==r?void 0:r.endAngle,"-").concat(r.midAngle,"-").concat(s)}),i.default.createElement(ed.Shape,ep({option:l?n:d,isActive:l,shapeType:"sector"},u)))})}},{key:"renderSectorsWithAnimation",value:function(){var e=this,t=this.props,r=t.sectors,n=t.isAnimationActive,a=t.animationBegin,o=t.animationDuration,s=t.animationEasing,l=t.animationId,d=this.state,u=d.prevSectors,p=d.prevIsAnimationActive;return i.default.createElement(Q.default,{begin:a,duration:o,isActive:n,easing:s,from:{t:0},to:{t:1},key:"pie-".concat(l,"-").concat(p),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(t){var n=t.t,a=[],o=(r&&r[0]).startAngle;return r.forEach(function(e,t){var r=u&&u[t],i=t>0?(0,ee.default)(e,"paddingAngle",0):0;if(r){var s=(0,es.interpolateNumber)(r.endAngle-r.startAngle,e.endAngle-e.startAngle),l=em(em({},e),{},{startAngle:o+i,endAngle:o+s(n)+i});a.push(l),o=l.endAngle}else{var c=e.endAngle,d=e.startAngle,p=(0,es.interpolateNumber)(0,c-d)(n),f=em(em({},e),{},{startAngle:o+i,endAngle:o+p+i});a.push(f),o=f.endAngle}}),i.default.createElement(c.Layer,null,e.renderSectorsStatically(a))})}},{key:"attachKeyboardHandlers",value:function(e){var t=this;e.onkeydown=function(e){if(!e.altKey)switch(e.key){case"ArrowLeft":var r=++t.state.sectorToFocus%t.sectorRefs.length;t.sectorRefs[r].focus(),t.setState({sectorToFocus:r});break;case"ArrowRight":var n=--t.state.sectorToFocus<0?t.sectorRefs.length-1:t.state.sectorToFocus%t.sectorRefs.length;t.sectorRefs[n].focus(),t.setState({sectorToFocus:n});break;case"Escape":t.sectorRefs[t.state.sectorToFocus].blur(),t.setState({sectorToFocus:0})}}}},{key:"renderSectors",value:function(){var e=this.props,t=e.sectors,r=e.isAnimationActive,n=this.state.prevSectors;return r&&t&&t.length&&(!n||!(0,et.default)(n,t))?this.renderSectorsWithAnimation():this.renderSectorsStatically(t)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var e=this,t=this.props,r=t.hide,n=t.sectors,a=t.className,o=t.label,s=t.cx,d=t.cy,u=t.innerRadius,p=t.outerRadius,f=t.isAnimationActive,m=this.state.isAnimationFinished;if(r||!n||!n.length||!(0,es.isNumber)(s)||!(0,es.isNumber)(d)||!(0,es.isNumber)(u)||!(0,es.isNumber)(p))return null;var h=(0,l.default)("recharts-pie",a);return i.default.createElement(c.Layer,{tabIndex:this.props.rootTabIndex,className:h,ref:function(t){e.pieRef=t}},this.renderSectors(),o&&this.renderLabels(n),F.Label.renderCallByParent(this.props,null,!1),(!f||m)&&ea.LabelList.renderCallByParent(this.props,n,!1))}}],r=[{key:"getDerivedStateFromProps",value:function(e,t){return t.prevIsAnimationActive!==e.isAnimationActive?{prevIsAnimationActive:e.isAnimationActive,prevAnimationId:e.animationId,curSectors:e.sectors,prevSectors:[],isAnimationFinished:!0}:e.isAnimationActive&&e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curSectors:e.sectors,prevSectors:t.curSectors,isAnimationFinished:!0}:e.sectors!==t.curSectors?{curSectors:e.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(e,t){return e>t?"start":e<t?"end":"middle"}},{key:"renderLabelLineItem",value:function(e,t,r){if(i.default.isValidElement(e))return i.default.cloneElement(e,t);if((0,s.default)(e))return e(t);var n=(0,l.default)("recharts-pie-label-line","boolean"!=typeof e?e.className:"");return i.default.createElement(en.Curve,ep({},t,{key:r,type:"linear",className:n}))}},{key:"renderLabelItem",value:function(e,t,r){if(i.default.isValidElement(e))return i.default.cloneElement(e,t);var n=r;if((0,s.default)(e)&&(n=e(t),i.default.isValidElement(n)))return n;var a=(0,l.default)("recharts-pie-label-text","boolean"==typeof e||(0,s.default)(e)?"":e.className);return i.default.createElement(j.Text,ep({},t,{alignmentBaseline:"middle",className:a}),n)}}],t&&eh(n.prototype,t),r&&eh(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n}(i.PureComponent);ey(ej,"displayName","Pie"),ey(ej,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!ei.Global.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0}),ey(ej,"parseDeltaAngle",function(e,t){return(0,es.mathSign)(t-e)*Math.min(Math.abs(t-e),360)}),ey(ej,"getRealPieData",function(e){var t=e.data,r=e.children,n=(0,u.filterProps)(e,!1),a=(0,u.findAllByType)(r,eo.Cell);return t&&t.length?t.map(function(e,t){return em(em(em({payload:e},n),e),a&&a[t]&&a[t].props)}):a&&a.length?a.map(function(e){return em(em({},n),e.props)}):[]}),ey(ej,"parseCoordinateOfPie",function(e,t){var r=t.top,n=t.left,a=t.width,o=t.height,i=(0,k.getMaxRadius)(a,o);return{cx:n+(0,es.getPercentValue)(e.cx,a,a/2),cy:r+(0,es.getPercentValue)(e.cy,o,o/2),innerRadius:(0,es.getPercentValue)(e.innerRadius,i,0),outerRadius:(0,es.getPercentValue)(e.outerRadius,i,.8*i),maxRadius:e.maxRadius||Math.sqrt(a*a+o*o)/2}}),ey(ej,"getComposedData",function(e){var t,r,n=e.item,a=e.offset,o=void 0!==n.type.defaultProps?em(em({},n.type.defaultProps),n.props):n.props,i=ej.getRealPieData(o);if(!i||!i.length)return null;var s=o.cornerRadius,l=o.startAngle,c=o.endAngle,d=o.paddingAngle,u=o.dataKey,p=o.nameKey,f=o.valueKey,m=o.tooltipType,h=Math.abs(o.minAngle),x=ej.parseCoordinateOfPie(o,a),v=ej.parseDeltaAngle(l,c),g=Math.abs(v),y=u;(0,er.default)(u)&&(0,er.default)(f)?((0,ec.warn)(!1,'Use "dataKey" to specify the value of pie,\n the props "valueKey" will be deprecated in 1.1.0'),y="value"):(0,er.default)(u)&&((0,ec.warn)(!1,'Use "dataKey" to specify the value of pie,\n the props "valueKey" will be deprecated in 1.1.0'),y=f);var b=i.filter(function(e){return 0!==(0,el.getValueByDataKey)(e,y,0)}).length,j=g-b*h-(g>=360?b:b-1)*d,w=i.reduce(function(e,t){var r=(0,el.getValueByDataKey)(t,y,0);return e+((0,es.isNumber)(r)?r:0)},0);return w>0&&(t=i.map(function(e,t){var n,a=(0,el.getValueByDataKey)(e,y,0),o=(0,el.getValueByDataKey)(e,p,t),i=((0,es.isNumber)(a)?a:0)/w,c=(n=t?r.endAngle+(0,es.mathSign)(v)*d*(0!==a):l)+(0,es.mathSign)(v)*((0!==a?h:0)+i*j),u=(n+c)/2,f=(x.innerRadius+x.outerRadius)/2,g=[{name:o,value:a,payload:e,dataKey:y,type:m}],b=(0,k.polarToCartesian)(x.cx,x.cy,f,u);return r=em(em(em({percent:i,cornerRadius:s,name:o,tooltipPayload:g,midAngle:u,middleRadius:f,tooltipPosition:b},e),x),{},{value:(0,el.getValueByDataKey)(e,y),startAngle:n,endAngle:c,payload:e,paddingAngle:(0,es.mathSign)(v)*d})})),em(em({},x),{},{sectors:t,data:i})});var ew=(0,o.generateCategoricalChart)({chartName:"PieChart",GraphicalChild:ej,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:M},{axisType:"radiusAxis",AxisComp:J}],formatAxisMap:k.formatAxisMap,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),ek=e.i(9694),eN=e.i(75225),eC=e.i(85183),eS=e.i(93230),eA=e.i(72526),eO=e.i(34239),eP=e.i(59559),eT=e.i(44098),eR=e.i(39425),eE=e.i(68054),eD=e.i(69638),eI=e.i(52571),eM=e.i(13248),eL=e.i(48256),e_=e.i(94908),eF=e.i(61911),eK=e.i(11641),eB=e.i(75254);let ez=(0,eB.default)("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),eH=(0,eB.default)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);var eV=e.i(75157),eG=e.i(93479),eU=e.i(67489),e$=e.i(19455),eX=e.i(81140),eq=e.i(20783),eW=e.i(30030),eY=e.i(69340),eZ=e.i(48425),eJ=e.i(75830),eQ=e.i(86318),e0=e.i(26330),e1=e.i(3536),e2=e.i(65491),e5=e.i(10772),e3=e.i(53660),e4=e.i(74606),e8=e.i(96626),e6=e.i(42727),e9=e.i(91918),e7=e.i(30207),te=e.i(86312),tt=e.i(85369),tr=["Enter"," "],tn=["ArrowUp","PageDown","End"],ta=["ArrowDown","PageUp","Home",...tn],to={ltr:[...tr,"ArrowRight"],rtl:[...tr,"ArrowLeft"]},ti={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ts="Menu",[tl,tc,td]=(0,eJ.createCollection)(ts),[tu,tp]=(0,eW.createContextScope)(ts,[td,e3.createPopperScope,e6.createRovingFocusGroupScope]),tf=(0,e3.createPopperScope)(),tm=(0,e6.createRovingFocusGroupScope)(),[th,tx]=tu(ts),[tv,tg]=tu(ts),ty=e=>{let{__scopeMenu:r,open:n=!1,children:a,dir:o,onOpenChange:s,modal:l=!0}=e,c=tf(r),[d,u]=i.useState(null),p=i.useRef(!1),f=(0,e7.useCallbackRef)(s),m=(0,eQ.useDirection)(o);return i.useEffect(()=>{let e=()=>{p.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>p.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),(0,t.jsx)(e3.Root,{...c,children:(0,t.jsx)(th,{scope:r,open:n,onOpenChange:f,content:d,onContentChange:u,children:(0,t.jsx)(tv,{scope:r,onClose:i.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:p,dir:m,modal:l,children:a})})})};ty.displayName=ts;var tb=i.forwardRef((e,r)=>{let{__scopeMenu:n,...a}=e,o=tf(n);return(0,t.jsx)(e3.Anchor,{...o,...a,ref:r})});tb.displayName="MenuAnchor";var tj="MenuPortal",[tw,tk]=tu(tj,{forceMount:void 0}),tN=e=>{let{__scopeMenu:r,forceMount:n,children:a,container:o}=e,i=tx(tj,r);return(0,t.jsx)(tw,{scope:r,forceMount:n,children:(0,t.jsx)(e8.Presence,{present:n||i.open,children:(0,t.jsx)(e4.Portal,{asChild:!0,container:o,children:a})})})};tN.displayName=tj;var tC="MenuContent",[tS,tA]=tu(tC),tO=i.forwardRef((e,r)=>{let n=tk(tC,e.__scopeMenu),{forceMount:a=n.forceMount,...o}=e,i=tx(tC,e.__scopeMenu),s=tg(tC,e.__scopeMenu);return(0,t.jsx)(tl.Provider,{scope:e.__scopeMenu,children:(0,t.jsx)(e8.Presence,{present:a||i.open,children:(0,t.jsx)(tl.Slot,{scope:e.__scopeMenu,children:s.modal?(0,t.jsx)(tP,{...o,ref:r}):(0,t.jsx)(tT,{...o,ref:r})})})})}),tP=i.forwardRef((e,r)=>{let n=tx(tC,e.__scopeMenu),a=i.useRef(null),o=(0,eq.useComposedRefs)(r,a);return i.useEffect(()=>{let e=a.current;if(e)return(0,te.hideOthers)(e)},[]),(0,t.jsx)(tR,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:(0,eX.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),tT=i.forwardRef((e,r)=>{let n=tx(tC,e.__scopeMenu);return(0,t.jsx)(tR,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),tR=i.forwardRef((e,r)=>{let{__scopeMenu:n,loop:a=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:d,onEscapeKeyDown:u,onPointerDownOutside:p,onFocusOutside:f,onInteractOutside:m,onDismiss:h,disableOutsideScroll:x,...v}=e,g=tx(tC,n),y=tg(tC,n),b=tf(n),j=tm(n),w=tc(n),[k,N]=i.useState(null),C=i.useRef(null),S=(0,eq.useComposedRefs)(r,C,g.onContentChange),A=i.useRef(0),O=i.useRef(""),P=i.useRef(0),T=i.useRef(null),R=i.useRef("right"),E=i.useRef(0),D=x?tt.RemoveScroll:i.Fragment,I=x?{as:e9.Slot,allowPinchZoom:!0}:void 0;i.useEffect(()=>()=>window.clearTimeout(A.current),[]),(0,e1.useFocusGuards)();let M=i.useCallback(e=>{var t,r;return R.current===T.current?.side&&(t=e,!!(r=T.current?.area)&&function(e,t){let{x:r,y:n}=e,a=!1;for(let e=0,o=t.length-1;e<t.length;o=e++){let i=t[e].x,s=t[e].y,l=t[o].x,c=t[o].y;s>n!=c>n&&r<(l-i)*(n-s)/(c-s)+i&&(a=!a)}return a}({x:t.clientX,y:t.clientY},r))},[]);return(0,t.jsx)(tS,{scope:n,searchRef:O,onItemEnter:i.useCallback(e=>{M(e)&&e.preventDefault()},[M]),onItemLeave:i.useCallback(e=>{M(e)||(C.current?.focus(),N(null))},[M]),onTriggerLeave:i.useCallback(e=>{M(e)&&e.preventDefault()},[M]),pointerGraceTimerRef:P,onPointerGraceIntentChange:i.useCallback(e=>{T.current=e},[]),children:(0,t.jsx)(D,{...I,children:(0,t.jsx)(e2.FocusScope,{asChild:!0,trapped:o,onMountAutoFocus:(0,eX.composeEventHandlers)(s,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:(0,t.jsx)(e0.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:p,onFocusOutside:f,onInteractOutside:m,onDismiss:h,children:(0,t.jsx)(e6.Root,{asChild:!0,...j,dir:y.dir,orientation:"vertical",loop:a,currentTabStopId:k,onCurrentTabStopIdChange:N,onEntryFocus:(0,eX.composeEventHandlers)(d,e=>{y.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,t.jsx)(e3.Content,{role:"menu","aria-orientation":"vertical","data-state":t5(g.open),"data-radix-menu-content":"",dir:y.dir,...b,...v,ref:S,style:{outline:"none",...v.style},onKeyDown:(0,eX.composeEventHandlers)(v.onKeyDown,e=>{let t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,r=e.ctrlKey||e.altKey||e.metaKey,n=1===e.key.length;if(t){var a;let t,o,i,s,l,c;"Tab"===e.key&&e.preventDefault(),!r&&n&&(a=e.key,t=O.current+a,o=w().filter(e=>!e.disabled),i=document.activeElement,s=o.find(e=>e.ref.current===i)?.textValue,l=function(e,t,r){var n;let a=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=r?e.indexOf(r):-1,i=(n=Math.max(o,0),e.map((t,r)=>e[(n+r)%e.length]));1===a.length&&(i=i.filter(e=>e!==r));let s=i.find(e=>e.toLowerCase().startsWith(a.toLowerCase()));return s!==r?s:void 0}(o.map(e=>e.textValue),t,s),c=o.find(e=>e.textValue===l)?.ref.current,function e(t){O.current=t,window.clearTimeout(A.current),""!==t&&(A.current=window.setTimeout(()=>e(""),1e3))}(t),c&&setTimeout(()=>c.focus()))}let o=C.current;if(e.target!==o||!ta.includes(e.key))return;e.preventDefault();let i=w().filter(e=>!e.disabled).map(e=>e.ref.current);tn.includes(e.key)&&i.reverse(),function(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}(i)}),onBlur:(0,eX.composeEventHandlers)(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(A.current),O.current="")}),onPointerMove:(0,eX.composeEventHandlers)(e.onPointerMove,t8(e=>{let t=e.target,r=E.current!==e.clientX;e.currentTarget.contains(t)&&r&&(R.current=e.clientX>E.current?"right":"left",E.current=e.clientX)}))})})})})})})});tO.displayName=tC;var tE=i.forwardRef((e,r)=>{let{__scopeMenu:n,...a}=e;return(0,t.jsx)(eZ.Primitive.div,{role:"group",...a,ref:r})});tE.displayName="MenuGroup";var tD=i.forwardRef((e,r)=>{let{__scopeMenu:n,...a}=e;return(0,t.jsx)(eZ.Primitive.div,{...a,ref:r})});tD.displayName="MenuLabel";var tI="MenuItem",tM="menu.itemSelect",tL=i.forwardRef((e,r)=>{let{disabled:n=!1,onSelect:a,...o}=e,s=i.useRef(null),l=tg(tI,e.__scopeMenu),c=tA(tI,e.__scopeMenu),d=(0,eq.useComposedRefs)(r,s),u=i.useRef(!1);return(0,t.jsx)(t_,{...o,ref:d,disabled:n,onClick:(0,eX.composeEventHandlers)(e.onClick,()=>{let e=s.current;if(!n&&e){let t=new CustomEvent(tM,{bubbles:!0,cancelable:!0});e.addEventListener(tM,e=>a?.(e),{once:!0}),(0,eZ.dispatchDiscreteCustomEvent)(e,t),t.defaultPrevented?u.current=!1:l.onClose()}}),onPointerDown:t=>{e.onPointerDown?.(t),u.current=!0},onPointerUp:(0,eX.composeEventHandlers)(e.onPointerUp,e=>{u.current||e.currentTarget?.click()}),onKeyDown:(0,eX.composeEventHandlers)(e.onKeyDown,e=>{let t=""!==c.searchRef.current;n||t&&" "===e.key||tr.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});tL.displayName=tI;var t_=i.forwardRef((e,r)=>{let{__scopeMenu:n,disabled:a=!1,textValue:o,...s}=e,l=tA(tI,n),c=tm(n),d=i.useRef(null),u=(0,eq.useComposedRefs)(r,d),[p,f]=i.useState(!1),[m,h]=i.useState("");return i.useEffect(()=>{let e=d.current;e&&h((e.textContent??"").trim())},[s.children]),(0,t.jsx)(tl.ItemSlot,{scope:n,disabled:a,textValue:o??m,children:(0,t.jsx)(e6.Item,{asChild:!0,...c,focusable:!a,children:(0,t.jsx)(eZ.Primitive.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...s,ref:u,onPointerMove:(0,eX.composeEventHandlers)(e.onPointerMove,t8(e=>{a?l.onItemLeave(e):(l.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:(0,eX.composeEventHandlers)(e.onPointerLeave,t8(e=>l.onItemLeave(e))),onFocus:(0,eX.composeEventHandlers)(e.onFocus,()=>f(!0)),onBlur:(0,eX.composeEventHandlers)(e.onBlur,()=>f(!1))})})})}),tF=i.forwardRef((e,r)=>{let{checked:n=!1,onCheckedChange:a,...o}=e;return(0,t.jsx)(t$,{scope:e.__scopeMenu,checked:n,children:(0,t.jsx)(tL,{role:"menuitemcheckbox","aria-checked":t3(n)?"mixed":n,...o,ref:r,"data-state":t4(n),onSelect:(0,eX.composeEventHandlers)(o.onSelect,()=>a?.(!!t3(n)||!n),{checkForDefaultPrevented:!1})})})});tF.displayName="MenuCheckboxItem";var tK="MenuRadioGroup",[tB,tz]=tu(tK,{value:void 0,onValueChange:()=>{}}),tH=i.forwardRef((e,r)=>{let{value:n,onValueChange:a,...o}=e,i=(0,e7.useCallbackRef)(a);return(0,t.jsx)(tB,{scope:e.__scopeMenu,value:n,onValueChange:i,children:(0,t.jsx)(tE,{...o,ref:r})})});tH.displayName=tK;var tV="MenuRadioItem",tG=i.forwardRef((e,r)=>{let{value:n,...a}=e,o=tz(tV,e.__scopeMenu),i=n===o.value;return(0,t.jsx)(t$,{scope:e.__scopeMenu,checked:i,children:(0,t.jsx)(tL,{role:"menuitemradio","aria-checked":i,...a,ref:r,"data-state":t4(i),onSelect:(0,eX.composeEventHandlers)(a.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});tG.displayName=tV;var tU="MenuItemIndicator",[t$,tX]=tu(tU,{checked:!1}),tq=i.forwardRef((e,r)=>{let{__scopeMenu:n,forceMount:a,...o}=e,i=tX(tU,n);return(0,t.jsx)(e8.Presence,{present:a||t3(i.checked)||!0===i.checked,children:(0,t.jsx)(eZ.Primitive.span,{...o,ref:r,"data-state":t4(i.checked)})})});tq.displayName=tU;var tW=i.forwardRef((e,r)=>{let{__scopeMenu:n,...a}=e;return(0,t.jsx)(eZ.Primitive.div,{role:"separator","aria-orientation":"horizontal",...a,ref:r})});tW.displayName="MenuSeparator";var tY=i.forwardRef((e,r)=>{let{__scopeMenu:n,...a}=e,o=tf(n);return(0,t.jsx)(e3.Arrow,{...o,...a,ref:r})});tY.displayName="MenuArrow";var[tZ,tJ]=tu("MenuSub"),tQ="MenuSubTrigger",t0=i.forwardRef((e,r)=>{let n=tx(tQ,e.__scopeMenu),a=tg(tQ,e.__scopeMenu),o=tJ(tQ,e.__scopeMenu),s=tA(tQ,e.__scopeMenu),l=i.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:d}=s,u={__scopeMenu:e.__scopeMenu},p=i.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return i.useEffect(()=>p,[p]),i.useEffect(()=>{let e=c.current;return()=>{window.clearTimeout(e),d(null)}},[c,d]),(0,t.jsx)(tb,{asChild:!0,...u,children:(0,t.jsx)(t_,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":t5(n.open),...e,ref:(0,eq.composeRefs)(r,o.onTriggerChange),onClick:t=>{e.onClick?.(t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:(0,eX.composeEventHandlers)(e.onPointerMove,t8(t=>{s.onItemEnter(t),!t.defaultPrevented&&(e.disabled||n.open||l.current||(s.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100)))})),onPointerLeave:(0,eX.composeEventHandlers)(e.onPointerLeave,t8(e=>{p();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,a="right"===r,o=t[a?"left":"right"],i=t[a?"right":"left"];s.onPointerGraceIntentChange({area:[{x:e.clientX+(a?-5:5),y:e.clientY},{x:o,y:t.top},{x:i,y:t.top},{x:i,y:t.bottom},{x:o,y:t.bottom}],side:r}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(e),e.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:(0,eX.composeEventHandlers)(e.onKeyDown,t=>{let r=""!==s.searchRef.current;e.disabled||r&&" "===t.key||to[a.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});t0.displayName=tQ;var t1="MenuSubContent",t2=i.forwardRef((e,r)=>{let n=tk(tC,e.__scopeMenu),{forceMount:a=n.forceMount,...o}=e,s=tx(tC,e.__scopeMenu),l=tg(tC,e.__scopeMenu),c=tJ(t1,e.__scopeMenu),d=i.useRef(null),u=(0,eq.useComposedRefs)(r,d);return(0,t.jsx)(tl.Provider,{scope:e.__scopeMenu,children:(0,t.jsx)(e8.Presence,{present:a||s.open,children:(0,t.jsx)(tl.Slot,{scope:e.__scopeMenu,children:(0,t.jsx)(tR,{id:c.contentId,"aria-labelledby":c.triggerId,...o,ref:u,align:"start",side:"rtl"===l.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{l.isUsingKeyboardRef.current&&d.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:(0,eX.composeEventHandlers)(e.onFocusOutside,e=>{e.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:(0,eX.composeEventHandlers)(e.onEscapeKeyDown,e=>{l.onClose(),e.preventDefault()}),onKeyDown:(0,eX.composeEventHandlers)(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),r=ti[l.dir].includes(e.key);t&&r&&(s.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});function t5(e){return e?"open":"closed"}function t3(e){return"indeterminate"===e}function t4(e){return t3(e)?"indeterminate":e?"checked":"unchecked"}function t8(e){return t=>"mouse"===t.pointerType?e(t):void 0}t2.displayName=t1;var t6="DropdownMenu",[t9,t7]=(0,eW.createContextScope)(t6,[tp]),re=tp(),[rt,rr]=t9(t6),rn=e=>{let{__scopeDropdownMenu:r,children:n,dir:a,open:o,defaultOpen:s,onOpenChange:l,modal:c=!0}=e,d=re(r),u=i.useRef(null),[p=!1,f]=(0,eY.useControllableState)({prop:o,defaultProp:s,onChange:l});return(0,t.jsx)(rt,{scope:r,triggerId:(0,e5.useId)(),triggerRef:u,contentId:(0,e5.useId)(),open:p,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(e=>!e),[f]),modal:c,children:(0,t.jsx)(ty,{...d,open:p,onOpenChange:f,dir:a,modal:c,children:n})})};rn.displayName=t6;var ra="DropdownMenuTrigger",ro=i.forwardRef((e,r)=>{let{__scopeDropdownMenu:n,disabled:a=!1,...o}=e,i=rr(ra,n),s=re(n);return(0,t.jsx)(tb,{asChild:!0,...s,children:(0,t.jsx)(eZ.Primitive.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":a?"":void 0,disabled:a,...o,ref:(0,eq.composeRefs)(r,i.triggerRef),onPointerDown:(0,eX.composeEventHandlers)(e.onPointerDown,e=>{!a&&0===e.button&&!1===e.ctrlKey&&(i.onOpenToggle(),i.open||e.preventDefault())}),onKeyDown:(0,eX.composeEventHandlers)(e.onKeyDown,e=>{!a&&(["Enter"," "].includes(e.key)&&i.onOpenToggle(),"ArrowDown"===e.key&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});ro.displayName=ra;var ri=e=>{let{__scopeDropdownMenu:r,...n}=e,a=re(r);return(0,t.jsx)(tN,{...a,...n})};ri.displayName="DropdownMenuPortal";var rs="DropdownMenuContent",rl=i.forwardRef((e,r)=>{let{__scopeDropdownMenu:n,...a}=e,o=rr(rs,n),s=re(n),l=i.useRef(!1);return(0,t.jsx)(tO,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...a,ref:r,onCloseAutoFocus:(0,eX.composeEventHandlers)(e.onCloseAutoFocus,e=>{l.current||o.triggerRef.current?.focus(),l.current=!1,e.preventDefault()}),onInteractOutside:(0,eX.composeEventHandlers)(e.onInteractOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;(!o.modal||n)&&(l.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});rl.displayName=rs,i.forwardRef((e,r)=>{let{__scopeDropdownMenu:n,...a}=e,o=re(n);return(0,t.jsx)(tE,{...o,...a,ref:r})}).displayName="DropdownMenuGroup";var rc=i.forwardRef((e,r)=>{let{__scopeDropdownMenu:n,...a}=e,o=re(n);return(0,t.jsx)(tD,{...o,...a,ref:r})});rc.displayName="DropdownMenuLabel";var rd=i.forwardRef((e,r)=>{let{__scopeDropdownMenu:n,...a}=e,o=re(n);return(0,t.jsx)(tL,{...o,...a,ref:r})});rd.displayName="DropdownMenuItem";var ru=i.forwardRef((e,r)=>{let{__scopeDropdownMenu:n,...a}=e,o=re(n);return(0,t.jsx)(tF,{...o,...a,ref:r})});ru.displayName="DropdownMenuCheckboxItem",i.forwardRef((e,r)=>{let{__scopeDropdownMenu:n,...a}=e,o=re(n);return(0,t.jsx)(tH,{...o,...a,ref:r})}).displayName="DropdownMenuRadioGroup";var rp=i.forwardRef((e,r)=>{let{__scopeDropdownMenu:n,...a}=e,o=re(n);return(0,t.jsx)(tG,{...o,...a,ref:r})});rp.displayName="DropdownMenuRadioItem";var rf=i.forwardRef((e,r)=>{let{__scopeDropdownMenu:n,...a}=e,o=re(n);return(0,t.jsx)(tq,{...o,...a,ref:r})});rf.displayName="DropdownMenuItemIndicator";var rm=i.forwardRef((e,r)=>{let{__scopeDropdownMenu:n,...a}=e,o=re(n);return(0,t.jsx)(tW,{...o,...a,ref:r})});rm.displayName="DropdownMenuSeparator",i.forwardRef((e,r)=>{let{__scopeDropdownMenu:n,...a}=e,o=re(n);return(0,t.jsx)(tY,{...o,...a,ref:r})}).displayName="DropdownMenuArrow";var rh=i.forwardRef((e,r)=>{let{__scopeDropdownMenu:n,...a}=e,o=re(n);return(0,t.jsx)(t0,{...o,...a,ref:r})});rh.displayName="DropdownMenuSubTrigger";var rx=i.forwardRef((e,r)=>{let{__scopeDropdownMenu:n,...a}=e,o=re(n);return(0,t.jsx)(t2,{...o,...a,ref:r,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});rx.displayName="DropdownMenuSubContent";var rv=e.i(43531),rg=e.i(63059);let ry=(0,eB.default)("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);i.forwardRef(({className:e,inset:r,children:n,...a},o)=>(0,t.jsxs)(rh,{ref:o,className:(0,eV.cn)("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",r&&"pl-8",e),...a,children:[n,(0,t.jsx)(rg.ChevronRight,{className:"ml-auto"})]})).displayName=rh.displayName,i.forwardRef(({className:e,...r},n)=>(0,t.jsx)(rx,{ref:n,className:(0,eV.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})).displayName=rx.displayName;let rb=i.forwardRef(({className:e,sideOffset:r=4,...n},a)=>(0,t.jsx)(ri,{children:(0,t.jsx)(rl,{ref:a,sideOffset:r,className:(0,eV.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));rb.displayName=rl.displayName,i.forwardRef(({className:e,inset:r,...n},a)=>(0,t.jsx)(rd,{ref:a,className:(0,eV.cn)("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",r&&"pl-8",e),...n})).displayName=rd.displayName;let rj=i.forwardRef(({className:e,children:r,checked:n,...a},o)=>(0,t.jsxs)(ru,{ref:o,className:(0,eV.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...a,children:[(0,t.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(rf,{children:(0,t.jsx)(rv.Check,{className:"h-4 w-4"})})}),r]}));rj.displayName=ru.displayName,i.forwardRef(({className:e,children:r,...n},a)=>(0,t.jsxs)(rp,{ref:a,className:(0,eV.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[(0,t.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(rf,{children:(0,t.jsx)(ry,{className:"h-2 w-2 fill-current"})})}),r]})).displayName=rp.displayName;let rw=i.forwardRef(({className:e,inset:r,...n},a)=>(0,t.jsx)(rc,{ref:a,className:(0,eV.cn)("px-2 py-1.5 text-sm font-semibold",r&&"pl-8",e),...n}));rw.displayName=rc.displayName;let rk=i.forwardRef(({className:e,...r},n)=>(0,t.jsx)(rm,{ref:n,className:(0,eV.cn)("-mx-1 my-1 h-px bg-muted",e),...r}));rk.displayName=rm.displayName;var rN=e.i(46798);let rC=({children:e,placeholderHeight:r="300px"})=>{let[a,o]=(0,i.useState)(!1),s=(0,i.useRef)(null);return(0,i.useEffect)(()=>{let e=new IntersectionObserver(([t])=>{t.isIntersecting&&(o(!0),e.disconnect())},{rootMargin:"0px 0px 200px 0px"}),t=s.current;return t&&e.observe(t),()=>{t&&e.unobserve(t)}},[]),(0,t.jsx)("div",{ref:s,style:{minHeight:a?void 0:r},children:a?e:(0,t.jsx)(n.Skeleton,{className:"w-full rounded-lg",style:{height:r}})})},rS={passed:"hsl(var(--chart-3))",failed:"hsl(var(--destructive))",skipped:"hsl(var(--accent))",timedOut:"hsl(var(--destructive))",pending:"hsl(var(--muted-foreground))",default1:"hsl(var(--chart-1))",default2:"hsl(var(--chart-2))",default3:"hsl(var(--chart-4))",default4:"hsl(var(--chart-5))",default5:"hsl(var(--chart-3))"};function rA(e){if(0===e)return"0s";let t=parseFloat((e/1e3).toFixed(1));return`${t}s`}function rO(e){if(!e)return"";let t=e.split(" > ");return t[t.length-1]||e}let rP=({active:e,payload:r,label:n})=>{if(e&&r&&r.length){let e,a=r[0].payload,o=a&&void 0!==a.total&&r.length>0,i=a&&void 0!==a.percentage&&a.name;return"undefined"===(e=i&&a?.name?a.name:a?.fullTestName?rO(a.fullTestName):String(n))&&r[0]?.name!==void 0&&(e=String(r[0].name)),"undefined"===e&&(e="Details"),(0,t.jsxs)("div",{className:"bg-card p-3 border border-border rounded-md shadow-lg",children:[(0,t.jsx)("p",{className:"label text-sm font-semibold text-foreground truncate max-w-xs",title:e,children:e}),r.map((e,r)=>(0,t.jsxs)("p",{style:{color:e.color||e.payload?.fill},className:"text-xs",children:[`${e.name||"Value"}: ${e.value?.toLocaleString()}${e.unit||""}`,i&&a&&e.name===a.name&&` (${a.percentage}%)`]},`item-${r}`)),o&&a&&(0,t.jsxs)("p",{className:"text-xs font-bold mt-1 text-foreground",children:["Total: ",a.total.toLocaleString()]})]})}return null},rT=({browserName:e,className:r})=>{let n=function(e){if(!e)return"Unknown";let t=e.toLowerCase();return(t.includes("chrome")||t.includes("chromium"))&&(t.includes("mobile")||t.includes("android"))?"Chrome Mobile":t.includes("safari")&&t.includes("mobile")?"Mobile Safari":t.includes("chrome")||t.includes("chromium")?"Chrome":t.includes("firefox")?"Firefox":t.includes("msedge")||t.includes("edge")?"Edge":t.includes("safari")||t.includes("webkit")?"Safari":"Unknown"}(e);return"Chrome"===n||"Chrome Mobile"===n?(0,t.jsx)(eM.Chrome,{className:(0,eV.cn)("h-4 w-4",r)}):"Safari"===n||"Mobile Safari"===n?(0,t.jsx)(e_.Compass,{className:(0,eV.cn)("h-4 w-4",r)}):(0,t.jsx)(eL.Globe,{className:(0,eV.cn)("h-4 w-4",r)})},rR=e=>{let r=Math.PI/180,{cx:n,cy:a,midAngle:o,innerRadius:i=0,outerRadius:s=0,startAngle:l=0,endAngle:c=0,fill:d,payload:u,percent:p,value:f=0}=e,m=Math.sin(-r*(o??0)),h=Math.cos(-r*(o??0)),x=(n??0)+(s+10)*h,v=(a??0)+(s+10)*m,g=(n??0)+(s+30)*h,y=(a??0)+(s+30)*m,b=g+(h>=0?1:-1)*22,j=h>=0?"start":"end",w=u?.name==="Passed"?rS.passed:"hsl(var(--foreground))";return(0,t.jsxs)("g",{children:[(0,t.jsx)("text",{x:n,y:a,dy:8,textAnchor:"middle",fill:w,className:"text-lg font-bold",children:u?.name}),(0,t.jsx)(eR.Sector,{cx:n,cy:a,innerRadius:i,outerRadius:s,startAngle:l,endAngle:c,fill:d}),(0,t.jsx)(eR.Sector,{cx:n,cy:a,startAngle:l,endAngle:c,innerRadius:s+6,outerRadius:s+10,fill:d}),(0,t.jsx)("path",{d:`M${x},${v}L${g},${y}L${b},${y}`,stroke:d,fill:"none"}),(0,t.jsx)("circle",{cx:b,cy:y,r:2,fill:d,stroke:"none"}),(0,t.jsx)("text",{x:b+(h>=0?1:-1)*12,y:y,textAnchor:j,fill:"hsl(var(--foreground))",className:"text-xs",children:`${f}`}),(0,t.jsx)("text",{x:b+(h>=0?1:-1)*12,y:y,dy:18,textAnchor:j,fill:"hsl(var(--muted-foreground))",className:"text-xs",children:`(Rate ${((p??0)*100).toFixed(2)}%)`})]})};function rE({currentRun:e,loading:o,error:s}){let[l,c]=(0,i.useState)(""),[d,u]=(0,i.useState)("all"),[p,f]=(0,i.useState)([]),m=(0,i.useMemo)(()=>e?.results?Array.from(new Set(e.results.map(e=>e.suiteName).filter(e=>e))).sort():[],[e?.results]),h=(0,i.useMemo)(()=>e?.results?Array.from(new Set(e.results.map(e=>e.workerId).filter(e=>null!=e&&""!==e&&"-1"!==String(e)).map(e=>String(e)))).sort((e,t)=>e.localeCompare(t,void 0,{numeric:!0})):[],[e?.results]);(0,i.useEffect)(()=>{h.length>0&&f(h)},[h]);let x=(0,i.useMemo)(()=>e?.results?Object.entries(e.results.filter(e=>{let t=null!=e.workerId?String(e.workerId):"";return(!(p.length>0)||!!p.includes(t))&&("all"===d||e.suiteName===d)&&(!l||!!e.name.toLowerCase().includes(l.toLowerCase()))&&"-1"!==t&&""!==t&&e.startTime&&"number"==typeof e.duration}).reduce((e,t)=>{let r=null!=t.workerId?String(t.workerId):"unknown";return e[r]||(e[r]=[]),e[r].push(t),e},{})).map(([e,t])=>({workerId:e,tests:t.sort((e,t)=>new Date(e.startTime).getTime()-new Date(t.startTime).getTime()),totalDuration:t.reduce((e,t)=>e+t.duration,0)})).sort((e,t)=>e.workerId.localeCompare(t.workerId,void 0,{numeric:!0})):[],[e?.results,l,d,p]),[v,g]=(0,i.useState)(0),y=(0,i.useCallback)((e,t)=>{g(t)},[]),b=(0,i.useCallback)(()=>{g(0)},[]),j=(0,i.useMemo)(()=>""!==l||"all"!==d||p.length!==h.length,[l,d,p,h]),w=(0,i.useCallback)(()=>{c(""),u("all"),f(h)},[h]);if(o)return(0,t.jsx)("div",{className:"grid gap-6 md:grid-cols-2 lg:grid-cols-3 mt-6",children:[void 0,void 0,void 0,void 0,void 0].map((e,a)=>(0,t.jsxs)(r.Card,{className:"shadow-md rounded-xl",children:[(0,t.jsxs)(r.CardHeader,{children:[(0,t.jsx)(n.Skeleton,{className:"h-5 w-3/4 rounded-md"}),(0,t.jsx)(n.Skeleton,{className:"h-4 w-1/2 mt-1 rounded-md"})]}),(0,t.jsx)(r.CardContent,{children:(0,t.jsx)(n.Skeleton,{className:"h-48 w-full rounded-lg"})})]},a))});if(s)return(0,t.jsxs)(a.Alert,{variant:"destructive",className:"mt-6 rounded-lg",children:[(0,t.jsx)(eE.Terminal,{className:"h-4 w-4"}),(0,t.jsx)(a.AlertTitle,{children:"Error Loading Chart Data"}),(0,t.jsx)(a.AlertDescription,{children:s})]});if(!e||!e.run||!e.results)return(0,t.jsxs)(a.Alert,{className:"mt-6 rounded-lg",children:[(0,t.jsx)(eI.Info,{className:"h-4 w-4"}),(0,t.jsx)(a.AlertTitle,{children:"No Data for Charts"}),(0,t.jsx)(a.AlertDescription,{children:"Current run data is not available to display charts."})]});let{passed:k,failed:N,skipped:C,timedOut:S=0,pending:A=0}=e.run,O=k+N+C+S+A,P=[{name:"Passed",value:k,fill:rS.passed},{name:"Failed",value:N+S,fill:rS.failed},{name:"Skipped",value:C,fill:rS.skipped},...A>0?[{name:"Pending",value:A,fill:rS.pending}]:[]].filter(e=>e.value>0).map(e=>({...e,name:e.name,value:e.value,fill:e.fill,percentage:O>0?(e.value/O*100).toFixed(1):"0.0"})),T=Object.values(e.results.reduce((e,t)=>{let r=t.browser||"Unknown";return e[r]||(e[r]={name:r,passed:0,failed:0,skipped:0,pending:0,total:0}),"passed"===t.status?e[r].passed++:"failed"===t.status||"timedOut"===t.status?e[r].failed++:"skipped"===t.status?e[r].skipped++:"pending"===t.status&&e[r].pending++,e[r].total++,e},{})).sort((e,t)=>t.total-e.total),R=e.results.filter(e=>"failed"===e.status||"timedOut"===e.status).map(e=>{let t=rO(e.name);return{name:t.length>50?t.substring(0,47)+"...":t,duration:e.duration,durationFormatted:rA(e.duration),fullTestName:e.name}}).sort((e,t)=>t.duration-e.duration).slice(0,10),E=Object.values(e.results.reduce((e,t)=>{let r=t.suiteName||"Unknown Suite";return e[r]||(e[r]={name:r,passed:0,failed:0,skipped:0,pending:0,total:0}),"passed"===t.status?e[r].passed++:"failed"===t.status||"timedOut"===t.status?e[r].failed++:"skipped"===t.status?e[r].skipped++:"pending"===t.status&&e[r].pending++,e[r].total++,e},{})).sort((e,t)=>t.total-e.total),D=[...e.results].sort((e,t)=>t.duration-e.duration).slice(0,5).map(e=>({name:rO(e.name),duration:e.duration,durationFormatted:rA(e.duration),fullTestName:e.name,status:e.status})),I=T.some(e=>e.pending>0),M=E.some(e=>e.pending>0);return(0,t.jsxs)("div",{className:"grid gap-6 md:grid-cols-1 lg:grid-cols-2 mt-6",children:[(0,t.jsxs)(r.Card,{className:"lg:col-span-1 shadow-lg hover:shadow-xl transition-shadow duration-300 rounded-xl",children:[(0,t.jsx)(r.CardHeader,{className:"flex flex-row items-center justify-between",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(r.CardTitle,{className:"text-lg font-semibold text-foreground",children:"Test Distribution"}),(0,t.jsx)(r.CardDescription,{className:"text-xs",children:"Passed, Failed, Skipped for the current run."})]})}),(0,t.jsx)(r.CardContent,{className:"flex justify-center items-center min-h-[280px]",children:(0,t.jsx)("div",{className:"w-full h-[280px]",children:P.length>0?(0,t.jsx)(eT.ResponsiveContainer,{width:"100%",height:"100%",children:(0,t.jsxs)(ew,{margin:{top:0,right:0,bottom:0,left:0},onMouseLeave:b,children:[(0,t.jsx)(ej,{activeIndex:v,activeShape:rR,data:P,cx:"50%",cy:"50%",innerRadius:60,outerRadius:90,dataKey:"value",nameKey:"name",onMouseEnter:y,paddingAngle:2,stroke:"hsl(var(--card))",children:P.map((e,r)=>(0,t.jsx)(eo.Cell,{fill:e.fill},`cell-${r}`))}),(0,t.jsx)(eO.Tooltip,{content:(0,t.jsx)(rP,{})}),(0,t.jsx)(eP.Legend,{iconSize:10,layout:"horizontal",verticalAlign:"bottom",align:"center",wrapperStyle:{fontSize:"12px",paddingTop:"10px"}})]})}):(0,t.jsx)("div",{className:"text-center text-muted-foreground",children:"No test distribution data."})})})]}),(0,t.jsxs)(r.Card,{className:"lg:col-span-1 shadow-lg hover:shadow-xl transition-shadow duration-300 rounded-xl",children:[(0,t.jsx)(r.CardHeader,{className:"flex flex-row items-center justify-between",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(r.CardTitle,{className:"text-lg font-semibold text-foreground",children:"Tests by Browser"}),(0,t.jsx)(r.CardDescription,{className:"text-xs",children:"Breakdown of test outcomes per browser."})]})}),(0,t.jsxs)(r.CardContent,{children:[(0,t.jsx)("div",{className:"w-full h-[250px]",children:T.length>0?(0,t.jsx)(eT.ResponsiveContainer,{width:"100%",height:"100%",children:(0,t.jsxs)(ek.BarChart,{data:T,layout:"vertical",margin:{top:5,right:30,left:20,bottom:5},children:[(0,t.jsx)(eA.CartesianGrid,{strokeDasharray:"3 3",stroke:"hsl(var(--border))"}),(0,t.jsx)(eC.XAxis,{type:"number",stroke:"hsl(var(--muted-foreground))",fontSize:10}),(0,t.jsx)(eS.YAxis,{dataKey:"name",type:"category",stroke:"hsl(var(--muted-foreground))",fontSize:10,width:150,tickFormatter:e=>e.length>20?e.substring(0,17)+"...":e,interval:0}),(0,t.jsx)(eO.Tooltip,{content:(0,t.jsx)(rP,{}),cursor:{fill:"hsl(var(--muted))",fillOpacity:.3}}),(0,t.jsx)(eP.Legend,{wrapperStyle:{fontSize:"12px",paddingTop:"10px"}}),(0,t.jsx)(eN.Bar,{dataKey:"passed",name:"Passed",stackId:"a",fill:rS.passed,barSize:20}),(0,t.jsx)(eN.Bar,{dataKey:"failed",name:"Failed",stackId:"a",fill:rS.failed,barSize:20}),(0,t.jsx)(eN.Bar,{dataKey:"skipped",name:"Skipped",stackId:"a",fill:rS.skipped,barSize:20}),I&&(0,t.jsx)(eN.Bar,{dataKey:"pending",name:"Pending",stackId:"a",fill:rS.pending,barSize:20})]})}):(0,t.jsx)("div",{className:"text-center text-muted-foreground h-[250px] flex items-center justify-center",children:"No browser data."})}),(0,t.jsx)("div",{className:"flex flex-wrap gap-x-4 gap-y-2 mt-3 text-xs text-muted-foreground",children:T.map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-1",title:e.name,children:[(0,t.jsx)(rT,{browserName:e.name,className:"mr-1"}),(0,t.jsx)("span",{className:"truncate max-w-[150px]",children:e.name})]},e.name))}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-2",children:"Note: Icons are representative. Full browser name (including version) is shown in tooltip."})]})]}),(0,t.jsxs)(r.Card,{className:"lg:col-span-1 shadow-lg hover:shadow-xl transition-shadow duration-300 rounded-xl",children:[(0,t.jsx)(r.CardHeader,{className:"flex flex-row items-center justify-between",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(r.CardTitle,{className:"text-lg font-semibold text-foreground",children:"Failed Tests Duration"}),(0,t.jsx)(r.CardDescription,{className:"text-xs",children:"Duration of failed or timed out tests (Top 10)."})]})}),(0,t.jsx)(r.CardContent,{children:(0,t.jsx)("div",{className:"w-full h-[250px]",children:R.length>0?(0,t.jsx)(eT.ResponsiveContainer,{width:"100%",height:"100%",children:(0,t.jsxs)(ek.BarChart,{data:R,margin:{top:5,right:5,left:5,bottom:60},children:[(0,t.jsx)(eA.CartesianGrid,{strokeDasharray:"3 3",stroke:"hsl(var(--border))"}),(0,t.jsx)(eC.XAxis,{dataKey:"name",stroke:"hsl(var(--muted-foreground))",fontSize:10,angle:-40,textAnchor:"end",interval:0}),(0,t.jsx)(eS.YAxis,{stroke:"hsl(var(--muted-foreground))",fontSize:10,tickFormatter:e=>rA(e),domain:[0,e=>e>0?Math.round(1.2*e):100]}),(0,t.jsx)(eO.Tooltip,{content:({active:e,payload:r,label:n})=>{if(e&&r&&r.length){let e=r[0].payload;return(0,t.jsxs)("div",{className:"bg-card p-3 border border-border rounded-md shadow-lg",children:[(0,t.jsx)("p",{className:"label text-sm font-semibold text-foreground truncate max-w-xs",title:e.fullTestName,children:rO(e.fullTestName)}),(0,t.jsxs)("p",{className:"text-xs",style:{color:rS.failed},children:["Duration: ",rA(e.duration)]})]})}return null},cursor:{fill:"hsl(var(--muted))",fillOpacity:.3}}),(0,t.jsx)(eN.Bar,{dataKey:"duration",name:"Duration",fill:rS.failed,barSize:20,children:(0,t.jsx)(ea.LabelList,{dataKey:"durationFormatted",position:"top",style:{fontSize:"10px",fill:"hsl(var(--destructive))"}})})]})}):(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center h-[250px] text-center",children:[(0,t.jsx)(eD.CheckCircle,{className:"h-12 w-12 text-green-500 mb-2"}),(0,t.jsx)("p",{className:"text-muted-foreground",children:"No failed tests in this run!"})]})})})]}),(0,t.jsxs)(r.Card,{className:"lg:col-span-1 shadow-lg hover:shadow-xl transition-shadow duration-300 rounded-xl",children:[(0,t.jsx)(r.CardHeader,{className:"flex flex-row items-center justify-between",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(r.CardTitle,{className:"text-lg font-semibold text-foreground",children:"Slowest Tests (Top 5)"}),(0,t.jsx)(r.CardDescription,{className:"text-xs",children:"Top 5 longest running tests in this run. Full names in tooltip."})]})}),(0,t.jsx)(r.CardContent,{children:(0,t.jsx)("div",{className:"w-full h-[250px]",children:D.length>0?(0,t.jsx)(eT.ResponsiveContainer,{width:"100%",height:"100%",children:(0,t.jsxs)(ek.BarChart,{data:D,margin:{top:5,right:5,left:5,bottom:30},children:[(0,t.jsx)(eA.CartesianGrid,{strokeDasharray:"3 3",stroke:"hsl(var(--border))"}),(0,t.jsx)(eC.XAxis,{dataKey:"name",tickLine:!1,tickFormatter:()=>"",stroke:"hsl(var(--muted-foreground))"}),(0,t.jsx)(eS.YAxis,{stroke:"hsl(var(--muted-foreground))",fontSize:10,tickFormatter:e=>rA(e),domain:[0,e=>e>0?Math.round(1.2*e):100]}),(0,t.jsx)(eO.Tooltip,{content:({active:e,payload:r,label:n})=>{if(e&&r&&r.length){let e=r[0].payload;return(0,t.jsxs)("div",{className:"bg-card p-3 border border-border rounded-md shadow-lg",children:[(0,t.jsx)("p",{className:"label text-sm font-semibold text-foreground truncate max-w-xs",title:e.fullTestName,children:rO(e.fullTestName)}),(0,t.jsxs)("p",{className:"text-xs",style:{color:"passed"===e.status?rS.passed:"failed"===e.status||"timedOut"===e.status?rS.failed:rS.skipped},children:["Duration: ",rA(e.duration)," (Status: ",e.status,")"]})]})}return null},cursor:{fill:"hsl(var(--muted))",fillOpacity:.3}}),(0,t.jsxs)(eN.Bar,{dataKey:"duration",name:"Duration",barSize:20,children:[D.map((e,r)=>(0,t.jsx)(eo.Cell,{fill:"passed"===e.status?rS.passed:"failed"===e.status||"timedOut"===e.status?rS.failed:rS.skipped},`cell-${r}`)),(0,t.jsx)(ea.LabelList,{dataKey:"durationFormatted",position:"top",style:{fontSize:"10px",fill:"hsl(var(--foreground))"}})]})]})}):(0,t.jsx)("p",{className:"text-muted-foreground h-[250px] flex items-center justify-center",children:"No test data to display for slowest tests."})})})]}),(0,t.jsxs)(r.Card,{className:"lg:col-span-2 shadow-lg hover:shadow-xl transition-shadow duration-300 rounded-xl",children:[(0,t.jsx)(r.CardHeader,{className:"flex flex-row items-center justify-between",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(r.CardTitle,{className:"text-lg font-semibold text-foreground",children:"Tests per Suite"}),(0,t.jsx)(r.CardDescription,{className:"text-xs",children:"Breakdown of test outcomes per suite."})]})}),(0,t.jsx)(r.CardContent,{className:"max-h-[400px] overflow-y-auto",children:(0,t.jsx)("div",{className:"w-full",style:{height:Math.max(250,45*E.length+60)},children:E.length>0?(0,t.jsx)(eT.ResponsiveContainer,{width:"100%",height:"100%",children:(0,t.jsxs)(ek.BarChart,{data:E,layout:"vertical",margin:{top:5,right:30,left:20,bottom:5},children:[(0,t.jsx)(eA.CartesianGrid,{strokeDasharray:"3 3",stroke:"hsl(var(--border))"}),(0,t.jsx)(eC.XAxis,{type:"number",stroke:"hsl(var(--muted-foreground))",fontSize:10}),(0,t.jsx)(eS.YAxis,{dataKey:"name",type:"category",stroke:"hsl(var(--muted-foreground))",fontSize:10,width:150,tickFormatter:e=>e.length>20?e.substring(0,17)+"...":e,interval:0}),(0,t.jsx)(eO.Tooltip,{content:(0,t.jsx)(rP,{}),cursor:{fill:"hsl(var(--muted))",fillOpacity:.3}}),(0,t.jsx)(eP.Legend,{wrapperStyle:{fontSize:"12px",paddingTop:"10px"}}),(0,t.jsx)(eN.Bar,{dataKey:"passed",name:"Passed",stackId:"suiteStack",fill:rS.passed,barSize:15}),(0,t.jsx)(eN.Bar,{dataKey:"failed",name:"Failed",stackId:"suiteStack",fill:rS.failed,barSize:15}),(0,t.jsx)(eN.Bar,{dataKey:"skipped",name:"Skipped",stackId:"suiteStack",fill:rS.skipped,barSize:15}),M&&(0,t.jsx)(eN.Bar,{dataKey:"pending",name:"Pending",stackId:"suiteStack",fill:rS.pending,barSize:15})]})}):(0,t.jsx)("div",{className:"text-center text-muted-foreground h-[250px] flex items-center justify-center",children:"No suite data."})})})]}),(0,t.jsxs)(r.Card,{className:"lg:col-span-2 shadow-lg hover:shadow-xl transition-shadow duration-300 rounded-xl",children:[(0,t.jsxs)(r.CardHeader,{children:[(0,t.jsx)("div",{className:"flex flex-row items-center justify-between",children:(0,t.jsxs)(r.CardTitle,{className:"text-lg font-semibold text-primary flex items-center",children:[(0,t.jsx)(eF.Users,{className:"h-5 w-5 mr-2"})," Worker Utilization"]})}),(0,t.jsx)(r.CardDescription,{className:"text-xs",children:"Filter and inspect tests chronologically for each worker. Slice size represents test duration."})]}),(0,t.jsxs)(r.CardContent,{children:[(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-4 mb-6",children:[(0,t.jsxs)("div",{className:"relative w-full sm:max-w-xs",children:[(0,t.jsx)(eH,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),(0,t.jsx)(eG.Input,{placeholder:"Filter by test name...",value:l,onChange:e=>c(e.target.value),className:"pl-8 w-full"})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[(0,t.jsxs)(eU.Select,{value:d,onValueChange:u,children:[(0,t.jsx)(eU.SelectTrigger,{className:"w-full sm:w-[180px]",children:(0,t.jsx)(eU.SelectValue,{placeholder:"Filter by suite"})}),(0,t.jsxs)(eU.SelectContent,{children:[(0,t.jsx)(eU.SelectItem,{value:"all",children:"All Suites"}),m.map(e=>(0,t.jsx)(eU.SelectItem,{value:e,children:e},e))]})]}),(0,t.jsxs)(rn,{children:[(0,t.jsx)(ro,{asChild:!0,children:(0,t.jsxs)(e$.Button,{variant:"outline",className:"w-full sm:w-[180px] justify-between",children:[(0,t.jsxs)("span",{children:["Workers (",p.length,"/",h.length,")"]}),(0,t.jsx)(eK.ListFilter,{className:"h-4 w-4"})]})}),(0,t.jsxs)(rb,{className:"w-56",align:"end",children:[(0,t.jsx)(rw,{children:"Visible Workers"}),(0,t.jsx)(rk,{}),h.length>0?h.map(e=>(0,t.jsxs)(rj,{checked:p.includes(e),onCheckedChange:t=>{f(r=>t?[...r,e]:r.filter(t=>t!==e))},children:["Worker ",e]},e)):(0,t.jsx)(rw,{className:"font-normal text-muted-foreground",children:"No workers found"})]})]}),j&&(0,t.jsx)(rN.TooltipProvider,{children:(0,t.jsxs)(rN.Tooltip,{children:[(0,t.jsx)(rN.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)(e$.Button,{variant:"ghost",size:"icon",onClick:w,children:[(0,t.jsx)(ez,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Reset Filters"})]})}),(0,t.jsx)(rN.TooltipContent,{children:(0,t.jsx)("p",{children:"Reset Filters"})})]})})]})]}),x.length>0?(0,t.jsx)("div",{className:"grid gap-8 md:grid-cols-2 lg:grid-cols-3",children:x.map(({workerId:e,tests:r,totalDuration:n})=>(0,t.jsx)(rC,{children:(0,t.jsxs)("div",{className:"flex flex-col items-center",children:[(0,t.jsxs)("h4",{className:"font-semibold text-center mb-2",children:["Worker ",e]}),(0,t.jsxs)("div",{className:"w-full h-[250px] relative",children:[(0,t.jsx)(eT.ResponsiveContainer,{width:"100%",height:"100%",children:(0,t.jsxs)(ew,{children:[(0,t.jsx)(ej,{data:r,dataKey:"duration",nameKey:"name",cx:"50%",cy:"50%",innerRadius:60,outerRadius:80,paddingAngle:2,stroke:"hsl(var(--card))",children:r.map((e,r)=>(0,t.jsx)(eo.Cell,{fill:rS[e.status]||rS.default1},`cell-${r}`))}),(0,t.jsx)(eO.Tooltip,{content:({active:e,payload:r})=>{if(e&&r&&r.length){let e=r[0].payload;return(0,t.jsxs)("div",{className:"bg-background p-3 border border-border rounded-md shadow-lg max-w-sm",children:[(0,t.jsx)("p",{className:"label text-sm font-semibold text-foreground truncate",title:e.name,children:rO(e.name)}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground mt-1",children:["Suite: ",e.suiteName||"N/A"]}),(0,t.jsxs)("p",{className:"text-xs",style:{color:r[0].color||rS.default1},children:["Status: ",e.status]}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Duration: ",rA(e.duration)]})]})}return null}}),(0,t.jsx)(eP.Legend,{iconSize:10,layout:"horizontal",verticalAlign:"bottom",align:"center",wrapperStyle:{fontSize:"12px",paddingTop:"10px"},payload:[{value:"Passed",type:"square",id:"ID01",color:rS.passed},{value:"Failed",type:"square",id:"ID02",color:rS.failed},{value:"Skipped",type:"square",id:"ID03",color:rS.skipped}]})]})}),(0,t.jsxs)("div",{className:"absolute top-1/2 left-1/2 z-10 -translate-x-1/2 -translate-y-1/2 text-center pointer-events-none",style:{marginTop:"-20px"},children:[(0,t.jsx)("div",{className:"text-xs text-muted-foreground",children:"Total"}),(0,t.jsx)("div",{className:"text-lg font-bold text-foreground",children:rA(n)})]})]})]})},e))}):(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center h-[200px] text-center p-4 rounded-lg bg-muted/60",children:[(0,t.jsx)(eI.Info,{className:"h-8 w-8 text-muted-foreground mb-3"}),(0,t.jsx)("p",{className:"font-semibold text-foreground",children:"No Matching Data"}),(0,t.jsx)("p",{className:"text-muted-foreground text-sm mt-1",children:"Adjust your filters or verify the run data."})]})]})]})]})}e.s(["DashboardOverviewCharts",()=>rE],7600)},78472,e=>{e.n(e.i(7600))}]);