@obzerver/server 0.18.2 → 0.18.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,118 +0,0 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function ee(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function te(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ne(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ne(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ee(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),ne(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ee(a,u),c+=ne(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ee(a,u++),c+=ne(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ne(te(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function re(e,t,n){if(e==null)return e;var r=[],i=0;return ne(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ie(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var ae=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function oe(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,ae)}catch(e){ae(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function se(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else oe(se.bind(null,e))}var ce={map:re,forEach:function(e,t,n){re(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return re(e,function(){t++}),t},toArray:function(e){return re(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ce,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=se,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ie}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=oe,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),h=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}function m(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&m(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function g(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function _(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=g(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var x=null,S=null;function C(e,t,n){return e===n||e===t&&(x=e,!0)}function w(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function T(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function E(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var D=Object.assign,O=Symbol.for(`react.element`),k=Symbol.for(`react.transitional.element`),A=Symbol.for(`react.portal`),j=Symbol.for(`react.fragment`),ee=Symbol.for(`react.strict_mode`),te=Symbol.for(`react.profiler`),ne=Symbol.for(`react.consumer`),re=Symbol.for(`react.context`),ie=Symbol.for(`react.forward_ref`),ae=Symbol.for(`react.suspense`),oe=Symbol.for(`react.suspense_list`),se=Symbol.for(`react.memo`),ce=Symbol.for(`react.lazy`),le=Symbol.for(`react.activity`),ue=Symbol.for(`react.legacy_hidden`),de=Symbol.for(`react.memo_cache_sentinel`),fe=Symbol.for(`react.view_transition`),pe=Symbol.for(`react.recoverable`),me=Symbol.iterator;function he(e){return typeof e!=`object`||!e?null:(e=me&&e[me]||e[`@@iterator`],typeof e==`function`?e:null)}var ge=Symbol.for(`react.client.reference`);function _e(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ge?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case j:return`Fragment`;case te:return`Profiler`;case ee:return`StrictMode`;case ae:return`Suspense`;case oe:return`SuspenseList`;case le:return`Activity`;case fe:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case A:return`Portal`;case re:return e.displayName||`Context`;case ne:return(e._context.displayName||`Context`)+`.Consumer`;case ie:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case se:return t=e.displayName||null,t===null?_e(e.type)||`Memo`:t;case ce:t=e._payload,e=e._init;try{return _e(e(t))}catch{}}return null}var ve=Array.isArray,M=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ye=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,be={pending:!1,data:null,method:null,action:null},xe=[],Se=-1;function Ce(e){return{current:e}}function we(e){0>Se||(e.current=xe[Se],xe[Se]=null,Se--)}function Te(e,t){Se++,xe[Se]=e.current,e.current=t}var Ee=Ce(null),De=Ce(null),Oe=Ce(null),ke=Ce(null);function Ae(e,t){switch(Te(Oe,t),Te(De,e),Te(Ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?fp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=fp(t),e=pp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}we(Ee),Te(Ee,e)}function je(){we(Ee),we(De),we(Oe)}function Me(e){var t=e.memoizedState;t!==null&&(lh._currentValue=t.memoizedState,Te(ke,e)),t=Ee.current;var n=pp(t,e.type);t!==n&&(Te(De,e),Te(Ee,n))}function Ne(e){De.current===e&&(we(Ee),we(De)),ke.current===e&&(we(ke),lh._currentValue=be)}var Pe,Fe;function Ie(e){if(Pe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Pe=t&&t[1]||``,Fe=-1<e.stack.indexOf(`
2
- at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
- `+Pe+e+Fe}var Le=!1;function Re(e,t){if(!e||Le)return``;Le=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
- `),l=s.split(`
5
- `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6
- `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Le=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ie(n):``}function ze(e,t){switch(e.tag){case 26:case 27:case 5:return Ie(e.type);case 16:return Ie(`Lazy`);case 13:return e.child!==t&&t!==null?Ie(`Suspense Fallback`):Ie(`Suspense`);case 19:return Ie(`SuspenseList`);case 0:case 15:return Re(e.type,!1);case 11:return Re(e.type.render,!1);case 1:return Re(e.type,!0);case 31:return Ie(`Activity`);case 30:return Ie(`ViewTransition`);default:return``}}function Be(e){try{var t=``,n=null;do t+=ze(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
- Error generating stack: `+e.message+`
8
- `+e.stack}}var Ve=Object.prototype.hasOwnProperty,He=t.unstable_scheduleCallback,Ue=t.unstable_cancelCallback,We=t.unstable_shouldYield,Ge=t.unstable_requestPaint,Ke=t.unstable_now,qe=t.unstable_getCurrentPriorityLevel,Je=t.unstable_ImmediatePriority,Ye=t.unstable_UserBlockingPriority,Xe=t.unstable_NormalPriority,Ze=t.unstable_LowPriority,Qe=t.unstable_IdlePriority,$e=t.log,et=t.unstable_setDisableYieldValue,tt=null,nt=null;function rt(e){if(typeof $e==`function`&&et(e),nt&&typeof nt.setStrictMode==`function`)try{nt.setStrictMode(tt,e)}catch{}}var it=Math.clz32?Math.clz32:st,at=Math.log,ot=Math.LN2;function st(e){return e>>>=0,e===0?32:31-(at(e)/ot|0)|0}var ct=256,lt=262144,ut=4194304;function dt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ft(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=dt(n))):i=dt(o):i=dt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=dt(n))):i=dt(o)):i=dt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function pt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function mt(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-it(n),i=1<<r;t|=e[r],n&=~i}return t}function ht(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function gt(){var e=ut;return ut<<=1,!(ut&62914560)&&(ut=4194304),e}function _t(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function yt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-it(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&bt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function bt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-it(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function xt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-it(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function St(e,t){var n=t&-t;return n=n&42?1:Ct(n),(n&(e.suspendedLanes|t))===0?n:0}function Ct(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function wt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Tt(){var e=ye.p;return e===0?(e=window.event,e===void 0?32:Th(e.type)):e}function Et(e,t){var n=ye.p;try{return ye.p=e,t()}finally{ye.p=n}}var Dt=Math.random().toString(36).slice(2),Ot=`__reactFiber$`+Dt,kt=`__reactProps$`+Dt,At=`__reactContainer$`+Dt,jt=`__reactEvents$`+Dt,Mt=`__reactListeners$`+Dt,Nt=`__reactHandles$`+Dt,Pt=`__reactResources$`+Dt,Ft=`__reactMarker$`+Dt,It=`__reactLoad$`+Dt;function Lt(e){delete e[Ot],delete e[kt],delete e[Mt],delete e[Nt]}function Rt(e){var t;if(t=e[Ot])return t;for(var n=e.parentNode;n;){if(t=n[At]||n[Ot]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=mm(e);e!==null;){if(n=e[Ot])return n;e=mm(e)}return t}e=n,n=e.parentNode}return null}function zt(e){if(e=e[Ot]||e[At]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Bt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Vt(e){var t=e[Pt];return t||=e[Pt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Ht(e){e[Ft]=!0}function Ut(e){e[It]=void 0}var Wt=new Set,Gt={};function Kt(e,t){qt(e,t),qt(e+`Capture`,t)}function qt(e,t){for(Gt[e]=t,e=0;e<t.length;e++)Wt.add(t[e])}var Jt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Yt={},Xt={};function Zt(e){return Ve.call(Xt,e)?!0:Ve.call(Yt,e)?!1:Jt.test(e)?Xt[e]=!0:(Yt[e]=!0,!1)}var Qt=!1;function $t(){var e=Qt;return Qt=!1,e}function en(e,t,n){if(Zt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function tn(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function nn(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function rn(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function an(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function on(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function sn(e){if(!e._valueTracker){var t=an(e)?`checked`:`value`;e._valueTracker=on(e,t,``+e[t])}}function cn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=an(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var ln=/[\n"\\]/g;function un(e){return e.replace(ln,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function dn(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+rn(t)):e.value!==``+rn(t)&&(e.value=``+rn(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):pn(e,rn(n)):o===`number`&&e.value==t?pn(e,rn(e.value)):pn(e,rn(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+rn(s):e.removeAttribute(`name`)}function fn(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){sn(e);return}n=n==null?``:``+rn(n),t=t==null?n:``+rn(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),sn(e)}function pn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function mn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+rn(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function hn(e,t,n){t!=null&&(t=``+rn(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+rn(n)}function gn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ve(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=rn(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),sn(e)}function _n(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var vn=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function yn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||vn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function bn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,Qt=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(yn(e,a,r),Qt=!0)}else for(var o in t)t.hasOwnProperty(o)&&yn(e,o,t[o])}function xn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Sn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Cn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function wn(e){return Cn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Tn(){}var En=null;function Dn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var On=null,kn=null;function An(e){var t=zt(e);if(t&&(e=t.stateNode)){var n=e[kt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(dn(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+un(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[kt]||null;if(!a)throw Error(i(90));dn(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&cn(r)}break a;case`textarea`:hn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&mn(e,!!n.multiple,t,!1)}}}var jn=!1;function Mn(e,t,n){if(jn)return e(t,n);jn=!0;try{return e(t)}finally{if(jn=!1,(On!==null||kn!==null)&&(Rd(),On&&(t=On,e=kn,kn=On=null,An(t),e)))for(t=0;t<e.length;t++)An(e[t])}}function Nn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[kt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var Pn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Fn=!1;if(Pn)try{var In={};Object.defineProperty(In,"passive",{get:function(){Fn=!0}}),window.addEventListener(`test`,In,In),window.removeEventListener(`test`,In,In)}catch{Fn=!1}var Ln=null,Rn=null,zn=null;function Bn(){if(zn)return zn;var e,t=Rn,n=t.length,r,i=`value`in Ln?Ln.value:Ln.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return zn=i.slice(e,1<r?1-r:void 0)}function Vn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Hn(){return!0}function Un(){return!1}function Wn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Hn:Un,this.isPropagationStopped=Un,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Hn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Hn)},persist:function(){},isPersistent:Hn}),t}var Gn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Kn=Wn(Gn),qn=D({},Gn,{view:0,detail:0}),N=Wn(qn),P,Jn,F,Yn=D({},qn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ir,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==F&&(F&&e.type===`mousemove`?(P=e.screenX-F.screenX,Jn=e.screenY-F.screenY):Jn=P=0,F=e),P)},movementY:function(e){return`movementY`in e?e.movementY:Jn}}),Xn=Wn(Yn),Zn=Wn(D({},Yn,{dataTransfer:0})),I=Wn(D({},qn,{relatedTarget:0})),L=Wn(D({},Gn,{animationName:0,elapsedTime:0,pseudoElement:0})),Qn=Wn(D({},Gn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),$n=Wn(D({},Gn,{data:0})),er={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},tr={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},nr={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function rr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=nr[e])?!!t[e]:!1}function ir(){return rr}var ar=Wn(D({},qn,{key:function(e){if(e.key){var t=er[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Vn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?tr[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ir,charCode:function(e){return e.type===`keypress`?Vn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Vn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),or=Wn(D({},Yn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),sr=Wn(D({},Gn,{submitter:0})),cr=Wn(D({},qn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ir})),R=Wn(D({},Gn,{propertyName:0,elapsedTime:0,pseudoElement:0})),lr=Wn(D({},Yn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),ur=Wn(D({},Gn,{newState:0,oldState:0,source:0})),dr=[9,13,27,32],fr=Pn&&`CompositionEvent`in window,pr=null;Pn&&`documentMode`in document&&(pr=document.documentMode);var mr=Pn&&`TextEvent`in window&&!pr,hr=Pn&&(!fr||pr&&8<pr&&11>=pr),gr=` `,_r=!1;function vr(e,t){switch(e){case`keyup`:return dr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function yr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var br=!1;function xr(e,t){switch(e){case`compositionend`:return yr(t);case`keypress`:return t.which===32?(_r=!0,gr):null;case`textInput`:return e=t.data,e===gr&&_r?null:e;default:return null}}function Sr(e,t){if(br)return e===`compositionend`||!fr&&vr(e,t)?(e=Bn(),zn=Rn=Ln=null,br=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return hr&&t.locale!==`ko`?null:t.data;default:return null}}var Cr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function wr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Cr[e.type]:t===`textarea`}function Tr(e,t,n,r){On?kn?kn.push(r):kn=[r]:On=r,t=Yf(t,`onChange`),0<t.length&&(n=new Kn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Er=null,Dr=null;function Or(e){Vf(e,0)}function kr(e){if(cn(Bt(e)))return e}function Ar(e,t){if(e===`change`)return t}var jr=!1;if(Pn){var Mr;if(Pn){var Nr=`oninput`in document;if(!Nr){var Pr=document.createElement(`div`);Pr.setAttribute(`oninput`,`return;`),Nr=typeof Pr.oninput==`function`}Mr=Nr}else Mr=!1;jr=Mr&&(!document.documentMode||9<document.documentMode)}function Fr(){Er&&(Er.detachEvent(`onpropertychange`,Ir),Dr=Er=null)}function Ir(e){if(e.propertyName===`value`&&kr(Dr)){var t=[];Tr(t,Dr,e,Dn(e)),Mn(Or,t)}}function Lr(e,t,n){e===`focusin`?(Fr(),Er=t,Dr=n,Er.attachEvent(`onpropertychange`,Ir)):e===`focusout`&&Fr()}function Rr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return kr(Dr)}function zr(e,t){if(e===`click`)return kr(t)}function Br(e,t){if(e===`input`||e===`change`)return kr(t)}function Vr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Hr=typeof Object.is==`function`?Object.is:Vr;function Ur(e,t){if(Hr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Ve.call(t,i)||!Hr(e[i],t[i]))return!1}return!0}function Wr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Gr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Kr(e,t){var n=Gr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Gr(n)}}function qr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?qr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Jr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Wr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Wr(e.document)}return t}function Yr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Xr=Pn&&`documentMode`in document&&11>=document.documentMode,Zr=null,Qr=null,$r=null,ei=!1;function ti(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ei||Zr==null||Zr!==Wr(r)||(r=Zr,`selectionStart`in r&&Yr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),$r&&Ur($r,r)||($r=r,r=Yf(Qr,`onSelect`),0<r.length&&(t=new Kn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Zr)))}function ni(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ri={animationend:ni(`Animation`,`AnimationEnd`),animationiteration:ni(`Animation`,`AnimationIteration`),animationstart:ni(`Animation`,`AnimationStart`),transitionrun:ni(`Transition`,`TransitionRun`),transitionstart:ni(`Transition`,`TransitionStart`),transitioncancel:ni(`Transition`,`TransitionCancel`),transitionend:ni(`Transition`,`TransitionEnd`)},ii={},ai={};Pn&&(ai=document.createElement(`div`).style,`AnimationEvent`in window||(delete ri.animationend.animation,delete ri.animationiteration.animation,delete ri.animationstart.animation),`TransitionEvent`in window||delete ri.transitionend.transition);function oi(e){if(ii[e])return ii[e];if(!ri[e])return e;var t=ri[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ai)return ii[e]=t[n];return e}var si=oi(`animationend`),ci=oi(`animationiteration`),li=oi(`animationstart`),ui=oi(`transitionrun`),di=oi(`transitionstart`),fi=oi(`transitioncancel`),pi=oi(`transitionend`),mi=new Map,hi=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);hi.push(`scrollEnd`);function gi(e,t){mi.set(e,t),Kt(t,[e])}var _i=0;function vi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=yd.identifierPrefix;var n=_i++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function yi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Dd;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function bi(e,t){return e=yi(e),t=yi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var xi=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Si=[],Ci=0,wi=0;function Ti(){for(var e=Ci,t=wi=Ci=0;t<e;){var n=Si[t];Si[t++]=null;var r=Si[t];Si[t++]=null;var i=Si[t];Si[t++]=null;var a=Si[t];if(Si[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ki(n,i,a)}}function Ei(e,t,n,r){Si[Ci++]=e,Si[Ci++]=t,Si[Ci++]=n,Si[Ci++]=r,wi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Di(e,t,n,r){return Ei(e,t,n,r),Ai(e)}function Oi(e,t){return Ei(e,null,null,t),Ai(e)}function ki(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-it(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Ai(e){if(50<Od)throw Od=0,kd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ji={};function Mi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ni(e,t,n,r){return new Mi(e,t,n,r)}function Pi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Fi(e,t){var n=e.alternate;return n===null?(n=Ni(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Ii(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Li(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Pi(r)&&(s=1);else if(typeof r==`string`)s=Ym(e,n,Ee.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case le:return e=Ni(31,n,t,a),e.elementType=le,e.lanes=o,e;case j:return Ri(n.children,a,o,t);case ee:s=8,a|=24;break;case te:return e=Ni(12,n,t,a|2),e.elementType=te,e.lanes=o,e;case ae:return e=Ni(13,n,t,a),e.elementType=ae,e.lanes=o,e;case oe:return e=Ni(19,n,t,a),e.elementType=oe,e.lanes=o,e;case ue:case fe:return e=a|32,e=Ni(30,n,t,e),e.elementType=fe,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case re:s=10;break a;case ne:s=9;break a;case ie:s=11;break a;case se:s=14;break a;case ce:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Ni(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Ri(e,t,n,r){return e=Ni(7,e,r,t),e.lanes=n,e}function zi(e,t,n){return e=Ni(6,e,null,t),e.lanes=n,e}function Bi(e){var t=Ni(18,null,null,0);return t.stateNode=e,t}function Vi(e,t,n){return t=Ni(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Hi=new WeakMap;function Ui(e,t){if(typeof e==`object`&&e){var n=Hi.get(e);return n===void 0?(t={value:e,source:t,stack:Be(t)},Hi.set(e,t),t):n}return{value:e,source:t,stack:Be(t)}}var Wi=[],Gi=0,Ki=null,qi=0,Ji=[],Yi=0,Xi=null,Zi=1,Qi=``;function $i(e,t){Wi[Gi++]=qi,Wi[Gi++]=Ki,Ki=e,qi=t}function ea(e,t,n){Ji[Yi++]=Zi,Ji[Yi++]=Qi,Ji[Yi++]=Xi,Xi=e;var r=Zi;e=Qi;var i=32-it(r)-1;r&=~(1<<i),n+=1;var a=32-it(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Zi=1<<32-it(t)+i|n<<i|r,Qi=a+e}else Zi=1<<a|n<<i|r,Qi=e}function ta(e){e.return!==null&&($i(e,1),ea(e,1,0))}function na(e){for(;e===Ki;)Ki=Wi[--Gi],Wi[Gi]=null,qi=Wi[--Gi],Wi[Gi]=null;for(;e===Xi;)Xi=Ji[--Yi],Ji[Yi]=null,Qi=Ji[--Yi],Ji[Yi]=null,Zi=Ji[--Yi],Ji[Yi]=null}function ra(e,t){Ji[Yi++]=Zi,Ji[Yi++]=Qi,Ji[Yi++]=Xi,Zi=t.id,Qi=t.overflow,Xi=e}var ia=null,aa=null,oa=!1,sa=null,ca=!1,la=Error(i(519));function ua(e){throw ga(Ui(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),la}function da(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Ot]=e,t[kt]=r,n){case`dialog`:Hf(`cancel`,t),Hf(`close`,t);break;case`iframe`:case`object`:case`embed`:Hf(`load`,t);break;case`video`:case`audio`:for(n=0;n<zf.length;n++)Hf(zf[n],t);break;case`source`:Hf(`error`,t);break;case`img`:case`image`:case`link`:Hf(`error`,t),Hf(`load`,t);break;case`details`:Hf(`toggle`,t);break;case`input`:Hf(`invalid`,t),fn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Hf(`invalid`,t);break;case`textarea`:Hf(`invalid`,t),gn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||tp(t.textContent,n)?(r.popover!=null&&(Hf(`beforetoggle`,t),Hf(`toggle`,t)),r.onScroll!=null&&Hf(`scroll`,t),r.onScrollEnd!=null&&Hf(`scrollend`,t),r.onClick!=null&&(t.onclick=Tn),t=!0):t=!1,t||ua(e,!0)}function fa(e){for(ia=e.return;ia;)switch(ia.tag){case 5:case 31:case 13:ca=!1;return;case 27:case 3:ca=!0;return;default:ia=ia.return}}function pa(e){if(e!==ia)return!1;if(!oa)return fa(e),oa=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||hp(e.type,e.memoizedProps)),n=!n),n&&aa&&ua(e),fa(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));aa=pm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));aa=pm(e)}else t===27?(t=aa,wp(e.type)?(e=fm,fm=null,aa=e):aa=t):aa=ia?dm(e.stateNode.nextSibling):null;return!0}function ma(){aa=ia=null,oa=!1}function ha(){var e=sa;return e!==null&&(dd===null?dd=e:dd.push.apply(dd,e),sa=null),e}function ga(e){sa===null?sa=[e]:sa.push(e)}var _a=Ce(null),va=null,ya=null;function ba(e,t,n){Te(_a,t._currentValue),t._currentValue=n}function xa(e){e._currentValue=_a.current,we(_a)}function z(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function B(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),z(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),z(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),z(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Sa(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Hr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ke.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[lh]:e.push(lh))}a=a.return}return e!==null&&B(t,e,n,r),t.flags|=262144,e!==null}function Ca(e){for(e=e.firstContext;e!==null;){if(!Hr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function wa(e){va=e,ya=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ta(e){return Da(va,e)}function Ea(e,t){return va===null&&wa(e),Da(e,t)}function Da(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ya===null){if(e===null)throw Error(i(308));ya=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ya=ya.next=t;return n}var Oa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ka=t.unstable_scheduleCallback,Aa=t.unstable_NormalPriority,ja={$$typeof:re,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ma(){return{controller:new Oa,data:new Map,refCount:0}}function Na(e){e.refCount--,e.refCount===0&&ka(Aa,function(){e.controller.abort()})}function Pa(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Fa=null;function V(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Ia=null,H=0,U=0,La=null;function Ra(e,t){if(Ia===null){var n=Ia=[];H=0,U=Pf(),La={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return H++,t.then(za,za),t}function za(){if(--H===0&&(Fa=null,Ia!==null)){La!==null&&(La.status=`fulfilled`);var e=Ia;Ia=null,U=0,La=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ba(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Va=M.S;M.S=function(e,t){if(md=Ke(),typeof t==`object`&&t&&typeof t.then==`function`&&Ra(e,t),Fa!==null)for(var n=bf;n!==null;)Pa(n,Fa),n=n.next;if(n=e.types,n!==null){for(var r=bf;r!==null;)Pa(r,n),r=r.next;if(U!==0){r=Fa,r===null&&(r=Fa=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Va!==null&&Va(e,t)};var Ha=Ce(null);function Ua(){var e=Ha.current;return e===null?Yu.pooledCache:e}function W(e,t){t===null?Te(Ha,Ha.current):Te(Ha,t.pool)}function Wa(){var e=Ua();return e===null?null:{parent:ja._currentValue,pool:e}}var Ga=Error(i(460)),Ka=Error(i(474)),qa=Error(i(542)),Ja={then:function(){}};function Ya(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Xa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Tn,Tn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,G(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(Tn,Tn);else{if(e=Yu,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,G(e),e}throw Qa=t,Ga}}function Za(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Qa=e,Ga):e}}var Qa=null;function $a(){if(Qa===null)throw Error(i(459));var e=Qa;return Qa=null,e}function G(e){if(e===Ga||e===qa)throw Error(i(483))}var eo=null,to=0;function no(e){var t=to;return to+=1,eo===null&&(eo=[]),Xa(eo,e,t)}function ro(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function io(e,t){throw t.$$typeof===O?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function ao(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Fi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=zi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===j?(e=d(e,t,n.props.children,r,n.key),ro(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ce&&Za(i)===t.type)?(t=a(t,n.props),ro(t,n),t.return=e,t):(t=Li(n.type,n.key,n.props,null,e.mode,r),ro(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Vi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Ri(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=zi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case k:return n=Li(t.type,t.key,t.props,null,e.mode,n),ro(n,t),n.return=e,n;case A:return t=Vi(t,e.mode,n),t.return=e,t;case ce:return t=Za(t),f(e,t,n)}if(ve(t)||he(t))return t=Ri(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,no(t),n);if(t.$$typeof===re)return f(e,Ea(e,t),n);io(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case k:return n.key===i?l(e,t,n,r):null;case A:return n.key===i?u(e,t,n,r):null;case ce:return n=Za(n),p(e,t,n,r)}if(ve(n)||he(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,no(n),r);if(n.$$typeof===re)return p(e,t,Ea(e,n),r);io(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case k:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case A:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ce:return r=Za(r),m(e,t,n,r,i)}if(ve(r)||he(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,no(r),i);if(r.$$typeof===re)return m(e,t,n,Ea(t,r),i);io(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),oa&&$i(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return oa&&$i(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),oa&&$i(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),oa&&$i(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return oa&&$i(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),oa&&$i(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===j&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case k:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===j){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),ro(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ce&&Za(l)===r.type){n(e,r.sibling),c=a(r,o.props),ro(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===j?(c=Ri(o.props.children,e.mode,c,o.key),ro(c,o),c.return=e,e=c):(c=Li(o.type,o.key,o.props,null,e.mode,c),ro(c,o),c.return=e,e=c)}return s(e);case A:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Vi(o,e.mode,c),c.return=e,e=c}return s(e);case ce:return o=Za(o),_(e,r,o,c)}if(ve(o))return h(e,r,o,c);if(he(o)){if(l=he(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,no(o),c);if(o.$$typeof===re)return _(e,r,Ea(e,o),c);io(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=zi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{to=0;var i=_(e,t,n,r);return eo=null,i}catch(t){if(t===Ga||t===qa)throw t;var a=Ni(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var oo=ao(!0),so=ao(!1),co=!1;function lo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function uo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function fo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function po(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ju&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Ai(e),ki(e,null,n),t}return Ei(e,r,t,n),Ai(e)}function mo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xt(e,n)}}function ho(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var go=!1;function _o(){if(go){var e=La;if(e!==null)throw e}}function vo(e,t,n,r){go=!1;var i=e.updateQueue;co=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Zu&f)===f:(r&f)===f){f!==0&&f===U&&(go=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:co=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ad|=o,e.lanes=o,e.memoizedState=d}}function yo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function bo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)yo(n[e],t)}var xo=Ce(null),So=Ce(0);function Co(e,t){e=rd,Te(So,e),Te(xo,t),rd=e|t.baseLanes}function wo(){Te(So,rd),Te(xo,xo.current)}function To(){rd=So.current,we(xo),we(So)}var Eo=Ce(null),Do=null;function Oo(e){var t=e.alternate;Te(Mo,Mo.current&1),Te(Eo,e),Do===null&&(t===null||xo.current!==null||t.memoizedState!==null)&&(Do=e)}function ko(e){Te(Mo,Mo.current),Te(Eo,e),Do===null&&(Do=e)}function Ao(e){e.tag===22?(Te(Mo,Mo.current),Te(Eo,e),Do===null&&(Do=e)):K()}function K(){Te(Mo,Mo.current),Te(Eo,Eo.current)}function jo(e){we(Eo),Do===e&&(Do=null),we(Mo)}var Mo=Ce(0);function No(e,t){Te(Eo,Eo.current),Te(Mo,t)}function Po(e){we(Mo),we(Eo),Do===e&&(Do=null)}function Fo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||cm(n)||lm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Io=0,q=null,Lo=null,Ro=null,zo=!1,Bo=!1,Vo=!1,Ho=0,Uo=0,Wo=null,Go=0;function Ko(){throw Error(i(321))}function qo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Hr(e[n],t[n]))return!1;return!0}function Jo(e,t,n,r,i,a){return Io=a,q=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?cc:lc,Vo=!1,a=n(r,i),Vo=!1,Bo&&(a=Xo(t,n,r,i)),Yo(e),a}function Yo(e){M.H=X;var t=Lo!==null&&Lo.next!==null;if(Io=0,Ro=Lo=q=null,zo=!1,Uo=0,Wo=null,t)throw Error(i(300));e===null||Z||(e=e.dependencies,e!==null&&Ca(e)&&(Z=!0))}function Xo(e,t,n,r){q=e;var a=0;do{if(Bo&&(Wo=null),Uo=0,Bo=!1,25<=a)throw Error(i(301));if(a+=1,Ro=Lo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}M.H=uc,o=t(n,r)}while(Bo);return o}function Zo(){var e=M.H,t=e.useState()[0];return t=typeof t.then==`function`?is(t):t,e=e.useState()[0],(Lo===null?null:Lo.memoizedState)!==e&&(q.flags|=1024),t}function Qo(){var e=Ho!==0;return Ho=0,e}function $o(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function es(e){if(zo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}zo=!1}Io=0,Ro=Lo=q=null,Bo=!1,Uo=Ho=0,Wo=null}function ts(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ro===null?q.memoizedState=Ro=e:Ro=Ro.next=e,Ro}function ns(){if(Lo===null){var e=q.alternate;e=e===null?null:e.memoizedState}else e=Lo.next;var t=Ro===null?q.memoizedState:Ro.next;if(t!==null)Ro=t,Lo=e;else{if(e===null)throw q.alternate===null?Error(i(467)):Error(i(310));Lo=e,e={memoizedState:Lo.memoizedState,baseState:Lo.baseState,baseQueue:Lo.baseQueue,queue:Lo.queue,next:null},Ro===null?q.memoizedState=Ro=e:Ro=Ro.next=e}return Ro}function rs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function is(e){var t=Uo;return Uo+=1,Wo===null&&(Wo=[]),e=Xa(Wo,e,t),t=q,(Ro===null?t.memoizedState:Ro.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?cc:lc),e}function as(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return is(e);if(e.$$typeof===pe)return;if(e.$$typeof===re)return Ta(e)}throw Error(i(438,String(e)))}function os(e){var t=null,n=q.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=q.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=rs(),q.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=de;return t.index++,n}function ss(e,t){return typeof t==`function`?t(e):t}function cs(e){return ls(ns(),Lo,e)}function ls(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Io&f)===f:(Zu&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===U&&(d=!0);else if((Io&p)===p){u=u.next,p===U&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,q.lanes|=p,ad|=p;f=u.action,Vo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,q.lanes|=f,ad|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Hr(o,e.memoizedState)&&(Z=!0,d&&(n=La,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function us(e){var t=ns(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Hr(o,t.memoizedState)||(Z=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ds(e,t,n){var r=q,a=ns(),o=oa;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Hr((Lo||a).memoizedState,n);if(s&&(a.memoizedState=n,Z=!0),a=a.queue,Is(ms.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Ro!==null&&!!(Ro.memoizedState.tag&1),js(e?9:8,{destroy:void 0},ps.bind(null,r,a,n,t),null),e){if(r.flags|=2048,Yu===null)throw Error(i(349));o||Io&127||fs(r,t,n)}return n}function fs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=q.updateQueue,t===null?(t=rs(),q.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ps(e,t,n,r){t.value=n,t.getSnapshot=r,hs(t)&&gs(e)}function ms(e,t,n){return n(function(){hs(t)&&gs(e)})}function hs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Hr(e,n)}catch{return!0}}function gs(e){var t=Oi(e,2);t!==null&&Nd(t,e,2)}function _s(e){var t=ts();if(typeof e==`function`){var n=e;if(e=n(),Vo){rt(!0);try{n()}finally{rt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:e},t}function vs(e,t,n,r){return e.baseState=n,ls(e,Lo,typeof r==`function`?r:ss)}function ys(e,t,n,r,a){if(ac(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};M.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,bs(t,o)):(o.next=n.next,t.pending=n.next=o)}}function bs(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=M.T,o={};o.types=a===null?null:a.types,M.T=o;try{var s=n(i,r),c=M.S;c!==null&&c(o,s),xs(e,t,s)}catch(n){Cs(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),M.T=a}}else try{a=n(i,r),xs(e,t,a)}catch(n){Cs(e,t,n)}}function xs(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Ss(e,t,n)},function(n){return Cs(e,t,n)}):Ss(e,t,n)}function Ss(e,t,n){t.status=`fulfilled`,t.value=n,ws(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,bs(e,n)))}function Cs(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ws(t),t=t.next;while(t!==r)}e.action=null}function ws(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ts(e,t){return t}function Es(e,t){if(oa){var n=Yu.formState;if(n!==null){a:{var r=q;if(oa){if(aa){b:{for(var i=aa,a=ca;i.nodeType!==8;)if(!a||(i=dm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){aa=dm(i.nextSibling),r=i.data===`F!`;break a}}ua(r)}r=!1}r&&(t=n[0])}}return n=ts(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ts,lastRenderedState:t},n.queue=r,n=nc.bind(null,q,r),r.dispatch=n,r=_s(!1),a=ic.bind(null,q,!1,r.queue),r=ts(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=ys.bind(null,q,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Ds(e){return Os(ns(),Lo,e)}function Os(e,t,n){if(t=ls(e,t,Ts)[0],e=cs(ss)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=is(t)}catch(e){throw e===Ga?qa:e}else r=t;t=ns();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(q.flags|=2048,js(9,{destroy:void 0},ks.bind(null,i,n),null)),[r,a,e]}function ks(e,t){e.action=t}function As(e){var t=ns(),n=Lo;if(n!==null)return Os(t,n,e);ns(),t=t.memoizedState,n=ns();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function js(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=q.updateQueue,t===null&&(t=rs(),q.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ms(){return ns().memoizedState}function Ns(e,t,n,r){var i=ts();q.flags|=e,i.memoizedState=js(1|t,{destroy:void 0},n,r===void 0?null:r)}function Ps(e,t,n,r){var i=ns();r=r===void 0?null:r;var a=i.memoizedState.inst;Lo!==null&&r!==null&&qo(r,Lo.memoizedState.deps)?i.memoizedState=js(t,a,n,r):(q.flags|=e,i.memoizedState=js(1|t,a,n,r))}function Fs(e,t){Ns(8390656,8,e,t)}function Is(e,t){Ps(2048,8,e,t)}function Ls(e){q.flags|=4;var t=q.updateQueue;if(t===null)t=rs(),q.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function J(e){var t=ns().memoizedState;return Ls({ref:t,nextImpl:e}),function(){if(Ju&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Rs(e,t){return Ps(4,2,e,t)}function zs(e,t){return Ps(4,4,e,t)}function Y(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Bs(e,t,n){n=n==null?null:n.concat([e]),Ps(4,4,Y.bind(null,t,e),n)}function Vs(){}function Hs(e,t){var n=ns();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&qo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Us(e,t){var n=ns();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&qo(t,r[1]))return r[0];if(r=e(),Vo){rt(!0);try{e()}finally{rt(!1)}}return n.memoizedState=[r,t],r}function Ws(e,t,n){return n===void 0||Io&1073741824&&!(Zu&261930)?e.memoizedState=t:(e.memoizedState=n,e=jd(),q.lanes|=e,ad|=e,n)}function Gs(e,t,n,r){return Hr(n,t)?n:xo.current===null?!(Io&106)||Io&1073741824&&!(Zu&261930)?(Z=!0,e.memoizedState=n):(e=jd(),q.lanes|=e,ad|=e,t):(e=Ws(e,n,r),Hr(e,t)||(Z=!0),e)}function Ks(e,t,n,r,i){var a=ye.p;ye.p=a!==0&&8>a?a:8;var o=M.T,s={};s.types=o===null?null:o.types,M.T=s,ic(e,!1,t,n);try{var c=i(),l=M.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?rc(e,t,Ba(c,r),Ad(e)):rc(e,t,r,Ad(e))}catch(n){rc(e,t,{then:function(){},status:`rejected`,reason:n},Ad())}finally{ye.p=a,o!==null&&s.types!==null&&(o.types=s.types),M.T=o}}function qs(){}function Js(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ys(e).queue;Ks(e,a,t,be,n===null?qs:function(){return Xs(e),n(r)})}function Ys(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:be,baseState:be,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:be},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Xs(e){var t=Ys(e);t.next===null&&(t=e.alternate.memoizedState),rc(e,t.next.queue,{},Ad())}function Zs(){return Ta(lh)}function Qs(){return ns().memoizedState}function $s(){return ns().memoizedState}function ec(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Ad();e=fo(n);var r=po(t,e,n);r!==null&&(Nd(r,t,n),mo(r,t,n)),t={cache:Ma()},e.payload=t;return}t=t.return}}function tc(e,t,n){var r=Ad();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ac(e)?oc(t,n):(n=Di(e,t,n,r),n!==null&&(Nd(n,e,r),sc(n,t,r)))}function nc(e,t,n){rc(e,t,n,Ad())}function rc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ac(e))oc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Hr(s,o))return Ei(e,t,i,0),Yu===null&&Ti(),!1}catch{}if(n=Di(e,t,i,r),n!==null)return Nd(n,e,r),sc(n,t,r),!0}return!1}function ic(e,t,n,r){if(r={lane:2,revertLane:Pf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ac(e)){if(t)throw Error(i(479))}else t=Di(e,n,r,2),t!==null&&Nd(t,e,2)}function ac(e){var t=e.alternate;return e===q||t!==null&&t===q}function oc(e,t){Bo=zo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function sc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xt(e,n)}}var X={readContext:Ta,use:as,useCallback:Ko,useContext:Ko,useEffect:Ko,useImperativeHandle:Ko,useLayoutEffect:Ko,useInsertionEffect:Ko,useMemo:Ko,useReducer:Ko,useRef:Ko,useState:Ko,useDebugValue:Ko,useDeferredValue:Ko,useTransition:Ko,useSyncExternalStore:Ko,useId:Ko,useHostTransitionStatus:Ko,useFormState:Ko,useActionState:Ko,useOptimistic:Ko,useMemoCache:Ko,useCacheRefresh:Ko,useEffectEvent:Ko},cc={readContext:Ta,use:as,useCallback:function(e,t){return ts().memoizedState=[e,t===void 0?null:t],e},useContext:Ta,useEffect:Fs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Ns(4194308,4,Y.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ns(4194308,4,e,t)},useInsertionEffect:function(e,t){Ns(4,2,e,t)},useMemo:function(e,t){var n=ts();t=t===void 0?null:t;var r=e();if(Vo){rt(!0);try{e()}finally{rt(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ts();if(n!==void 0){var i=n(t);if(Vo){rt(!0);try{n(t)}finally{rt(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=tc.bind(null,q,e),[r.memoizedState,e]},useRef:function(e){var t=ts();return e={current:e},t.memoizedState=e},useState:function(e){e=_s(e);var t=e.queue,n=nc.bind(null,q,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Vs,useDeferredValue:function(e,t){return Ws(ts(),e,t)},useTransition:function(){var e=_s(!1);return e=Ks.bind(null,q,e.queue,!0,!1),ts().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=q,a=ts();if(oa){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Yu===null)throw Error(i(349));Zu&127||fs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Fs(ms.bind(null,r,o,e),[e]),r.flags|=2048,js(9,{destroy:void 0},ps.bind(null,r,o,n,t),null),n},useId:function(){var e=ts(),t=Yu.identifierPrefix;if(oa){var n=Qi,r=Zi;n=(r&~(1<<32-it(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Ho++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Go++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Zs,useFormState:Es,useActionState:Es,useOptimistic:function(e){var t=ts();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ic.bind(null,q,!0,n),n.dispatch=t,[e,t]},useMemoCache:os,useCacheRefresh:function(){return ts().memoizedState=ec.bind(null,q)},useEffectEvent:function(e){var t=ts(),n={impl:e};return t.memoizedState=n,function(){if(Ju&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},lc={readContext:Ta,use:as,useCallback:Hs,useContext:Ta,useEffect:Is,useImperativeHandle:Bs,useInsertionEffect:Rs,useLayoutEffect:zs,useMemo:Us,useReducer:cs,useRef:Ms,useState:function(){return cs(ss)},useDebugValue:Vs,useDeferredValue:function(e,t){return Gs(ns(),Lo.memoizedState,e,t)},useTransition:function(){var e=cs(ss)[0],t=ns().memoizedState;return[typeof e==`boolean`?e:is(e),t]},useSyncExternalStore:ds,useId:Qs,useHostTransitionStatus:Zs,useFormState:Ds,useActionState:Ds,useOptimistic:function(e,t){return vs(ns(),Lo,e,t)},useMemoCache:os,useCacheRefresh:$s,useEffectEvent:J},uc={readContext:Ta,use:as,useCallback:Hs,useContext:Ta,useEffect:Is,useImperativeHandle:Bs,useInsertionEffect:Rs,useLayoutEffect:zs,useMemo:Us,useReducer:us,useRef:Ms,useState:function(){return us(ss)},useDebugValue:Vs,useDeferredValue:function(e,t){var n=ns();return Lo===null?Ws(n,e,t):Gs(n,Lo.memoizedState,e,t)},useTransition:function(){var e=us(ss)[0],t=ns().memoizedState;return[typeof e==`boolean`?e:is(e),t]},useSyncExternalStore:ds,useId:Qs,useHostTransitionStatus:Zs,useFormState:As,useActionState:As,useOptimistic:function(e,t){var n=ns();return Lo===null?(n.baseState=e,[e,n.queue.dispatch]):vs(n,Lo,e,t)},useMemoCache:os,useCacheRefresh:$s,useEffectEvent:J};function dc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:D({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var fc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ad(),i=fo(r);i.payload=t,n!=null&&(i.callback=n),t=po(e,i,r),t!==null&&(Nd(t,e,r),mo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ad(),i=fo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=po(e,i,r),t!==null&&(Nd(t,e,r),mo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ad(),r=fo(n);r.tag=2,t!=null&&(r.callback=t),t=po(e,r,n),t!==null&&(Nd(t,e,n),mo(t,e,n))}};function pc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Ur(n,r)||!Ur(i,a):!0}function mc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&fc.enqueueReplaceState(t,t.state,null)}function hc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=D({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function gc(e){xi(e)}function _c(e){console.error(e)}function vc(e){xi(e)}function yc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function bc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function xc(e,t,n){return n=fo(n),n.tag=3,n.payload={element:null},n.callback=function(){yc(e,t)},n}function Sc(e){return e=fo(e),e.tag=3,e}function Cc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){bc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){bc(t,n,r),typeof i!=`function`&&(_d===null?_d=new Set([this]):_d.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function wc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Sa(t,n,a,!0),n=Eo.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Do===null?Gd():n.alternate===null&&id===0&&(id=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ja?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),mf(e,r,a)),!1;case 22:return n.flags|=65536,r===Ja?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),mf(e,r,a)),!1}throw Error(i(435,n.tag))}return mf(e,r,a),Gd(),!1}if(oa)return t=Eo.current,t===null?(r!==la&&(t=Error(i(423),{cause:r}),ga(Ui(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Ui(r,n),a=xc(e.stateNode,r,a),ho(e,a),id!==4&&(id=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==la&&(e=Error(i(422),{cause:r}),ga(Ui(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Ui(o,n),ud===null?ud=[o]:ud.push(o),id!==4&&(id=2),t===null)return!0;r=Ui(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=xc(n.stateNode,r,e),ho(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(_d===null||!_d.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Sc(a),Cc(a,e,n,r),ho(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Tc=Error(i(461)),Z=!1;function Ec(e,t,n,r){t.child=e===null?so(t,null,n,r):oo(t,e.child,n,r)}function Dc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return wa(t),r=Jo(e,t,n,o,a,i),s=Qo(),e!==null&&!Z?($o(e,t,i),tl(e,t,i)):(oa&&s&&ta(t),t.flags|=1,Ec(e,t,r,i),t.child)}function Oc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Pi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,kc(e,t,a,r,i)):(e=Li(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!nl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Ur:n,n(o,r)&&e.ref===t.ref)return tl(e,t,i)}return t.flags|=1,e=Fi(a,r),e.ref=t.ref,e.return=t,t.child=e}function kc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Ur(a,r)&&e.ref===t.ref){if(Z=!1,t.pendingProps=r=a,nl(e,i))e.flags&131072&&(Z=!0);else return t.lanes=e.lanes,tl(e,t,i)}}return Lc(e,t,n,r,i)}function Ac(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Mc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&W(t,a===null?null:a.cachePool),a===null?wo():Co(t,a),Ao(t);else return r=t.lanes=536870912,Mc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&W(t,null),wo(),K()):(W(t,a.cachePool),Co(t,a),K(),t.memoizedState=null);return Ec(e,t,i,n),t.child}function jc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Mc(e,t,n,r,i){var a=Ua();return a=a===null?null:{parent:ja._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&W(t,null),wo(),Ao(t),e!==null&&Sa(e,t,r,!0),t.childLanes=i,null}function Nc(e,t){return t=Kc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Pc(e,t,n){return oo(t,e.child,null,n),e=Nc(t,t.pendingProps),e.flags|=2,jo(t),t.memoizedState=null,e}function Fc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(oa){if(r.mode===`hidden`)return e=Nc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},jc(null,e);if(ko(t),(e=aa)?(e=sm(e,ca),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xi===null?null:{id:Zi,overflow:Qi},retryLane:536870912,hydrationErrors:null},n=Bi(e),n.return=t,t.child=n,ia=t,aa=null)):e=null,e===null)throw ua(t);return t.lanes=536870912,null}return Nc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ko(t),a){if(t.flags&256)t.flags&=-257,t=Pc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Z||Sa(e,t,n,!1),a=(n&e.childLanes)!==0,Z||a){if(xo.current===null){if(r=Yu,r!==null&&(s=St(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Oi(e,s),Nd(r,e,s),Tc;Gd()}t=Pc(e,t,n)}else e=o.treeContext,aa=dm(s.nextSibling),ia=t,oa=!0,sa=null,ca=!1,e!==null&&ra(t,e),t=Nc(t,r),t.flags|=134221824;return t}return e=Fi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ic(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Lc(e,t,n,r,i){return wa(t),n=Jo(e,t,n,r,void 0,i),r=Qo(),e!==null&&!Z?($o(e,t,i),tl(e,t,i)):(oa&&r&&ta(t),t.flags|=1,Ec(e,t,n,i),t.child)}function Rc(e,t,n,r,i,a){return wa(t),t.updateQueue=null,n=Xo(t,r,n,i),Yo(e),r=Qo(),e!==null&&!Z?($o(e,t,a),tl(e,t,a)):(oa&&r&&ta(t),t.flags|=1,Ec(e,t,n,a),t.child)}function zc(e,t,n,r,i){if(wa(t),t.stateNode===null){var a=ji,o=n.contextType;typeof o==`object`&&o&&(a=Ta(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=fc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},lo(t),o=n.contextType,a.context=typeof o==`object`&&o?Ta(o):ji,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(dc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&fc.enqueueReplaceState(a,a.state,null),vo(t,r,a,i),_o(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=hc(n,s);a.props=c;var l=a.context,u=n.contextType;o=ji,typeof u==`object`&&u&&(o=Ta(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&mc(t,a,r,o),co=!1;var f=t.memoizedState;a.state=f,vo(t,r,a,i),_o(),l=t.memoizedState,s||f!==l||co?(typeof d==`function`&&(dc(t,n,d,r),l=t.memoizedState),(c=co||pc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,uo(e,t),o=t.memoizedProps,u=hc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ji,typeof l==`object`&&l&&(c=Ta(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&mc(t,a,r,c),co=!1,f=t.memoizedState,a.state=f,vo(t,r,a,i),_o();var p=t.memoizedState;o!==d||f!==p||co||e!==null&&e.dependencies!==null&&Ca(e.dependencies)?(typeof s==`function`&&(dc(t,n,s,r),p=t.memoizedState),(u=co||pc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Ca(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Ic(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=oo(t,e.child,null,i),t.child=oo(t,null,n,i)):Ec(e,t,n,i),t.memoizedState=a.state,e=t.child):e=tl(e,t,i),e}function Bc(e,t,n,r){return ma(),t.flags|=256,Ec(e,t,n,r),t.child}var Vc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Hc(e){return{baseLanes:e,cachePool:Wa()}}function Uc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=cd),e}function Wc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Mo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(oa){if(i?Oo(t):K(),(e=aa)?(e=sm(e,ca),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xi===null?null:{id:Zi,overflow:Qi},retryLane:536870912,hydrationErrors:null},n=Bi(e),n.return=t,t.child=n,ia=t,aa=null)):e=null,e===null)throw ua(t);return t.lanes=lm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(K(),i=t.mode,a=Kc({mode:`hidden`,children:a},i),r=Ri(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Hc(n),r.childLanes=Uc(e,o,n),t.memoizedState=Vc,jc(null,r)):(Oo(t),Gc(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return Jc(e,t,a,o,r,c,s,n)}return i?(K(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Fi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Ri(i,a,n,null),i.flags|=2):i=Fi(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,jc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Hc(n):(a=i.cachePool,a===null?a=Wa():(s=ja._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Uc(e,o,n),t.memoizedState=Vc,jc(e.child,r)):(Oo(t),n=e.child,e=n.sibling,n=Fi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Gc(e,t){return t=Kc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Kc(e,t){return e=Ni(22,e,null,t),e.lanes=0,e}function qc(e,t,n){return oo(t,e.child,null,n),e=Gc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Jc(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Oo(t),t.flags&=-257,qc(e,t,c)):t.memoizedState===null?(K(),o=a.fallback,s=t.mode,a=Kc({mode:`visible`,children:a.children},s),o=Ri(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,oo(t,e.child,null,c),a=t.child,a.memoizedState=Hc(c),a.childLanes=Uc(e,r,c),t.memoizedState=Vc,jc(null,a)):(K(),t.child=e.child,t.flags|=128,null);if(Oo(t),lm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,ga({value:a,source:null,stack:null})),qc(e,t,c)}if(Z||Sa(e,t,c,!1),r=(c&e.childLanes)!==0,Z||r){if(xo.current!==null)return qc(e,t,c);if(r=Yu,r!==null&&(a=St(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Oi(e,a),Nd(r,e,a),Tc;return cm(o)||Gd(),qc(e,t,c)}return cm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,aa=dm(o.nextSibling),ia=t,oa=!0,sa=null,ca=!1,e!==null&&ra(t,e),t=Gc(t,a.children),t.flags|=134221824,t)}function Yc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),z(e.return,t,n)}function Xc(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Fo(n)===null&&(t=e),e=e.sibling}return t}function Zc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Qc(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function $c(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Mo.current;if(t.flags&128)return No(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,No(t,o),i===`backwards`&&e!==null?(Qc(e),Ec(e,t,r,n),Qc(e)):Ec(e,t,r,n),r=oa?qi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Yc(e,n,t);else if(e.tag===19)Yc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=Xc(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,Qc(t)),Zc(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Fo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Zc(t,!0,n,null,a,r);break;case`together`:Zc(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=Xc(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Zc(t,!1,i,n,a,r)}return t.child}function el(e,t,n){var r=t.pendingProps;return ba(t,t.type,r.value),Ec(e,t,r.children,n),t.child}function tl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ad|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Sa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Fi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Fi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function nl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Ca(e)))}function rl(e,t,n){switch(t.tag){case 3:Ae(t,t.stateNode.containerInfo),ba(t,ja,e.memoizedState.cache),ma();break;case 27:case 5:Me(t);break;case 4:Ae(t,t.stateNode.containerInfo);break;case 10:ba(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ko(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Oo(t),t.flags|=128,null;r=Sa(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Wc(e,t,n):(Oo(t),e=tl(e,t,n),e===null?null:e.sibling)}Oo(t);break;case 19:if(t.flags&128)return $c(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(Sa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return $c(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),No(t,Mo.current),r)break;return null;case 22:return t.lanes=0,Ac(e,t,n,t.pendingProps);case 24:ba(t,ja,e.memoizedState.cache)}return tl(e,t,n)}function il(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Z=!0;else{if(!nl(e,n)&&!(t.flags&128))return Z=!1,rl(e,t,n);Z=!!(e.flags&131072)}}else Z=!1,oa&&t.flags&1048576&&ea(t,qi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Za(t.elementType),t.type=e,typeof e==`function`)Pi(e)?(r=hc(e,r),t.tag=1,t=zc(null,t,e,r,n)):(t.tag=0,t=Lc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===ie){t.tag=11,t=Dc(null,t,e,r,n);break a}if(a===se){t.tag=14,t=Oc(null,t,e,r,n);break a}if(a===re){t.tag=10,t.type=e,t=el(null,t,n);break a}}throw t=_e(e)||e,Error(i(306,t,``))}}return t;case 0:return Lc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=hc(r,t.pendingProps),zc(e,t,r,a,n);case 3:a:{if(Ae(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,uo(e,t),vo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ba(t,ja,r),r!==o.cache&&B(t,[ja],n,!0),_o(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Bc(e,t,r,n);break a}if(r!==a){a=Ui(Error(i(424)),t),ga(a),t=Bc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(aa=dm(e.firstChild),ia=t,oa=!0,sa=null,ca=!0,n=so(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ma(),r===a){t=tl(e,t,n);break a}Ec(e,t,r,n)}t=t.child}return t;case 26:return Ic(e,t),e===null?(n=Fm(t.type,null,t.pendingProps,null))?t.memoizedState=n:oa||(t.stateNode=mp(t.type,t.pendingProps,Oe.current,t)):t.memoizedState=Fm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Me(t),e===null&&oa&&(r=t.stateNode=_m(t.type,t.pendingProps,Oe.current),ia=t,ca=!0,a=aa,wp(t.type)?(fm=a,aa=dm(r.firstChild)):aa=a),Ec(e,t,t.pendingProps.children,n),Ic(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&oa&&((a=r=aa)&&(r=am(r,t.type,t.pendingProps,ca),r===null?a=!1:(t.stateNode=r,ia=t,aa=dm(r.firstChild),ca=!1,a=!0)),a||ua(t)),Me(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,hp(a,o)?r=null:s!==null&&hp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Jo(e,t,Zo,null,null,n),lh._currentValue=a),Ic(e,t),Ec(e,t,r,n),t.child;case 6:return e===null&&oa&&((e=n=aa)&&(n=om(n,t.pendingProps,ca),n===null?e=!1:(t.stateNode=n,ia=t,aa=null,e=!0)),e||ua(t)),null;case 13:return Wc(e,t,n);case 4:return Ae(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=oo(t,null,r,n):Ec(e,t,r,n),t.child;case 11:return Dc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Ic(e,t),Ec(e,t,r,n),t.child;case 8:return Ec(e,t,t.pendingProps.children,n),t.child;case 12:return Ec(e,t,t.pendingProps.children,n),t.child;case 10:return el(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,wa(t),a=Ta(a),r=r(a),t.flags|=1,Ec(e,t,r,n),t.child;case 14:return Oc(e,t,t.type,t.pendingProps,n);case 15:return kc(e,t,t.type,t.pendingProps,n);case 19:return $c(e,t,n);case 31:return Fc(e,t,n);case 22:return Ac(e,t,n,t.pendingProps);case 24:return wa(t),r=Ta(ja),e===null?(a=Ua(),a===null&&(a=Yu,o=Ma(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},lo(t),ba(t,ja,a)):((e.lanes&n)!==0&&(uo(e,t),vo(t,null,null,n),_o()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ba(t,ja,r),r!==a.cache&&B(t,[ja],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ba(t,ja,r))),Ec(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:oa&&ta(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Ic(e,t),Ec(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function al(e){e.flags|=4}function ol(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Xm(t,r):Xm(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Hd())e.flags|=8192;else throw Qa=Ja,Ka}}else e.flags&=-16777217}function sl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Zm(t)){if(Hd())e.flags|=8192;else throw Qa=Ja,Ka}}function cl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:gt(),e.lanes|=t,ld|=t)}function ll(e,t){if(!oa)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function ul(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function dl(e,t,n){var r=t.pendingProps;switch(na(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ul(t),null;case 1:return ul(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),xa(ja),je(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(pa(t)?al(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ha())),ul(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(al(t),o===null?(ul(t),ol(t,a,null,r,n)):(ul(t),sl(t,o))):o?o===e.memoizedState?(ul(t),t.flags&=-16777217):(al(t),ul(t),sl(t,o)):(e=e.memoizedProps,e!==r&&al(t),ul(t),ol(t,a,e,r,n)),null;case 27:if(Ne(t),n=Oe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&al(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return ul(t),t.subtreeFlags&=-33554433,null}e=Ee.current,pa(t)?da(t,e):(e=_m(a,r,n),t.stateNode=e,al(t))}return ul(t),t.subtreeFlags&=-33554433,null;case 5:if(Ne(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&al(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return ul(t),t.subtreeFlags&=-33554433,null}if(o=Ee.current,pa(t))da(t,o);else{var s=dp(Oe.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[Ot]=t,o[kt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(ip(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&al(t)}}return ul(t),t.subtreeFlags&=-33554433,ol(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&al(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Oe.current,pa(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ia,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Ot]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||tp(e.nodeValue,n)),e||ua(t,!0)}else e=dp(e).createTextNode(r),e[Ot]=t,t.stateNode=e}return ul(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=pa(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[Ot]=t}else ma(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ul(t),e=!1}else n=ha(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(jo(t),t):(jo(t),null);if(t.flags&128)throw Error(i(558))}return ul(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=pa(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[Ot]=t}else ma(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ul(t),a=!1}else a=ha(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(jo(t),t):(jo(t),null)}return jo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),cl(t,t.updateQueue),ul(t),null);case 4:return je(),e===null&&Gf(t.stateNode.containerInfo),t.flags|=67108864,ul(t),null;case 10:return xa(t.type),ul(t),null;case 19:if(Po(t),r=t.memoizedState,r===null)return ul(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)ll(r,!1);else{if(id!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Fo(e),o!==null){for(t.flags|=128,ll(r,!1),e=o.updateQueue,t.updateQueue=e,cl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ii(n,e),n=n.sibling;return No(t,Mo.current&1|2),oa&&$i(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ke()>hd&&(t.flags|=128,a=!0,ll(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Fo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,cl(t,e),ll(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!oa)return ul(t),null}else 2*Ke()-r.renderingStartTime>hd&&n!==536870912&&(t.flags|=128,a=!0,ll(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ke(),e.sibling=null,o=Mo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||oa?No(t,o):(n=o,Te(Eo,t),Te(Mo,n),Do===null&&(Do=t)),oa&&$i(t,r.treeForkCount),e}return ul(t),null;case 22:case 23:return jo(t),To(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(ul(t),t.subtreeFlags&6&&(t.flags|=8192)):ul(t),n=t.updateQueue,n!==null&&cl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&we(Ha),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),xa(ja),ul(t),null;case 25:return null;case 30:return t.flags|=33554432,ul(t),null}throw Error(i(156,t.tag))}function fl(e,t){switch(na(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xa(ja),je(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ne(t),null;case 31:if(t.memoizedState!==null){if(jo(t),t.alternate===null)throw Error(i(340));ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(jo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Po(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return je(),null;case 10:return xa(t.type),null;case 22:case 23:return jo(t),To(),e!==null&&we(Ha),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return xa(ja),null;case 25:return null;default:return null}}function pl(e,t){switch(na(t),t.tag){case 3:xa(ja),je();break;case 26:case 27:case 5:Ne(t);break;case 4:je();break;case 31:t.memoizedState!==null&&jo(t);break;case 13:jo(t);break;case 19:Po(t);break;case 10:xa(t.type);break;case 22:case 23:jo(t),To(),e!==null&&we(Ha);break;case 24:xa(ja)}}function ml(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){pf(t,t.return,e)}}function hl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){pf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){pf(t,t.return,e)}}function gl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{bo(t,n)}catch(t){pf(e,e.return,t)}}}function _l(e,t,n){n.props=hc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){pf(e,t,n)}}function vl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=vi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Ip(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Lp(e);m(e.child,!1,em,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){pf(e,t,n)}}function yl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){pf(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){pf(e,t,n)}else n.current=null}}function bl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)nm(e.stateNode,t[n])}function xl(e){for(var t=e.return;t!==null&&(wl(t)&&nm(e.stateNode,t.stateNode),!Cl(t));)t=t.return}function Sl(e){for(var t=e.return;t!==null&&(wl(t)&&rm(e.stateNode,t.stateNode),!Cl(t));)t=t.return}function Cl(e){return e.tag===5||e.tag===3||e.tag===27}function wl(e){return e&&e.tag===7&&e.stateNode!==null}function Tl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){pf(e,e.return,t)}}function El(e,t,n){try{var r=e.stateNode;op(r,e.type,n,t),r[kt]=t}catch(t){pf(e,e.return,t)}}function Dl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&wp(e.type)||e.tag===4}function Ol(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Dl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&wp(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function kl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Tn)),bl(e,r),Qt=!0;else if(i!==4&&(i===27&&(bl(e,r),r=null,wp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(kl(e,t,n,r),e=e.sibling;e!==null;)kl(e,t,n,r),e=e.sibling}function Al(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),bl(e,r),Qt=!0;else if(i!==4&&(i===27&&(bl(e,r),r=null,wp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Al(e,t,n,r),e=e.sibling;e!==null;)Al(e,t,n,r),e=e.sibling}function jl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);ip(t,r,n),t[Ot]=e,t[kt]=n}catch(t){pf(e,e.return,t)}}var Ml=!1,Nl=null;function Pl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Ml=!0)}var Fl=null;function Il(){var e=Fl;return Fl=null,e}var Ll=0;function Rl(e,t,n,r,i){return Ll=0,zl(e.child,t,n,r,i)}function zl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Ap(o);r.push(s),s.view&&(a=!0)}else a||Ap(o).view&&(a=!0);Ml=!0,Dp(o,Ll===0?t:t+`_`+Ll,n),Ll++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||zl(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function Bl(e,t){for(;e!==null;)e.tag===5?Op(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||Bl(e.child,t),e=e.sibling}function Vl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Vl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=bi(t.default,t.share),t!==`none`&&(Rl(e,n,t,null,!1)||Bl(e.child,!1))}e=e.sibling}}function Hl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=vi(r,n),a=bi(r.default,n.paired?r.share:r.enter);a===`none`?Vl(e):Rl(e,i,a,null,!1)?(Vl(e),n.paired||t||Md(e,r.onEnter)):Bl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Hl(e,t),e=e.sibling;else Vl(e)}function Ul(e){if(Nl!==null&&Nl.size!==0){var t=Nl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=bi(n.default,n.share);if(a!==`none`&&(Rl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Md(e,n.onShare)):Bl(e.child,!1)),t.delete(r),t.size===0)break}}}Ul(e)}e=e.sibling}}}function Wl(e){if(e.tag===30){var t=e.memoizedProps,n=vi(t,e.stateNode),r=Nl===null?void 0:Nl.get(n),i=bi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Rl(e,n,i,null,!1)?r===void 0?Md(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Nl.delete(n),Md(e,t.onShare)):Bl(e.child,!1)),Nl!==null&&Ul(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Wl(e),e=e.sibling;else Nl!==null&&Ul(e)}function Gl(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=vi(t,e.stateNode);t=bi(t.default,t.update),e.flags&=-5,t!==`none`&&Rl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Gl(e);e=e.sibling}}function Kl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Bl(e.child,!1))}Kl(e)}e=e.sibling}}function ql(e){if(e.tag===30)e.stateNode.paired=null,Bl(e.child,!1),Kl(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)ql(e),e=e.sibling;else Kl(e)}function Jl(e){for(e=e.child;e!==null;)e.tag===30?Bl(e.child,!1):e.subtreeFlags&33554432&&Jl(e),e=e.sibling}function Yl(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Ll<a.length){var l=a[Ll],u=Ap(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Dp(c,Ll===0?n:n+`_`+Ll,i),s&&e.flags&4||(Fl===null&&(Fl=[]),Fl.push(c,Ll===0?r:r+`_`+Ll,t.memoizedProps)),Ll++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:Yl(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function Xl(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=vi(n,r),a=bi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(jp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Ll=0,i=Yl(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Md(e,n.onUpdate))}else e.subtreeFlags&33554432&&Xl(e,t);e=e.sibling}}var Zl=!1,Ql=!1,$l=!1,eu=!1,tu=typeof WeakSet==`function`?WeakSet:Set,nu=null,ru=!1,iu=!1,au=!1,ou=!1;function su(e,t,n){if(e=e.containerInfo,lp=vh,e=Jr(e),Yr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(up={focusedElem:e,selectionRange:r},vh=!1,n=(n&335544064)===n,nu=t,t=n?9270:1024;nu!==null;){if(e=nu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Wl(r[a]);if(e.alternate===null&&e.flags&2)n&&Pl(e),cu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Wl(r),cu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Pl(e),cu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,nu=r):(n&&Gl(e),cu(n))}}Nl=null}function cu(e){for(;nu!==null;){var t=nu,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=hc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){pf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)im(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:im(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=vi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=bi(a.default,a.update),a!==`none`&&Rl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,nu=r;break}nu=t.return}}function lu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:ku(e,n),r&4&&ml(5,n);break;case 1:if(ku(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){pf(n,n.return,e)}else{var i=hc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){pf(n,n.return,e)}}}r&64&&gl(n),r&512&&vl(n,n.return);break;case 3:if(ku(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{bo(e,t)}catch(e){pf(n,n.return,e)}}break;case 27:t===null&&r&4&&jl(n);case 26:case 5:ku(e,n),t===null&&r&4&&Tl(n),r&512&&vl(n,n.return);break;case 12:ku(e,n);break;case 31:ku(e,n),r&4&&vu(e,n);break;case 13:ku(e,n),r&4&&yu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=_f.bind(null,n),um(e,n))));break;case 22:if(r=n.memoizedState!==null||Zl,!r){var a=t!==null&&t.memoizedState!==null||Ql;t=Zl,i=Ql,Zl=r,(Ql=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),ju(e,n,r)):ku(e,n),Zl=t,Ql=i}break;case 30:ku(e,n),r&512&&vl(n,n.return);break;case 7:r&512&&vl(n,n.return);default:ku(e,n)}}function uu(e,t){for(e=e.child;e!==null;)du(e,t),e=e.sibling}function du(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){pf(e,e.return,t)}fu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Qt=!0}catch(t){pf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Ep(s,!0):Ep(e.stateNode,!1)}catch(t){pf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&uu(e,t);break;default:uu(e,t)}}function fu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:du(n,r);break a;case 22:n.memoizedState===null&&fu(n,r);break a;default:fu(n,r)}}e=e.sibling}}function pu(e){var t=e.alternate;t!==null&&(e.alternate=null,pu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Lt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var mu=null,hu=!1;function gu(e,t,n){for(n=n.child;n!==null;)_u(e,t,n),n=n.sibling}function _u(e,t,n){if(nt&&typeof nt.onCommitFiberUnmount==`function`)try{nt.onCommitFiberUnmount(tt,n)}catch{}switch(n.tag){case 26:Ql||yl(n,t),gu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!Ql&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Ql||yl(n,t),Sl(n);var r=mu,i=hu;wp(n.type)&&(mu=n.stateNode,hu=!1),gu(e,t,n),vm(n.stateNode,n.type,n.memoizedProps),mu=r,hu=i;break;case 5:Ql||yl(n,t),Sl(n);case 6:if(n.tag===6&&Sl(n),r=mu,i=hu,mu=null,gu(e,t,n),mu=r,hu=i,mu!==null){if(hu)try{(mu.nodeType===9?mu.body:mu.nodeName===`HTML`?mu.ownerDocument.body:mu).removeChild(n.stateNode),Qt=!0}catch(e){pf(n,t,e)}else try{mu.removeChild(n.stateNode),Qt=!0}catch(e){pf(n,t,e)}}break;case 18:mu!==null&&(hu?(e=mu,Tp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Wh(e)):Tp(mu,n.stateNode));break;case 4:r=mu,i=hu,mu=n.stateNode.containerInfo,hu=!0,gu(e,t,n),mu=r,hu=i;break;case 0:case 11:case 14:case 15:hl(2,n,t),Ql||hl(4,n,t),gu(e,t,n);break;case 1:Ql||(yl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&_l(n,t,r)),gu(e,t,n);break;case 21:gu(e,t,n);break;case 22:Ql=(r=Ql)||n.memoizedState!==null,gu(e,t,n),Ql=r;break;case 30:yl(n,t),gu(e,t,n);break;case 7:Ql||yl(n,t),gu(e,t,n);break;default:gu(e,t,n)}}function vu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Wh(e)}catch(e){pf(t,t.return,e)}}}function yu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Wh(e)}catch(e){pf(t,t.return,e)}}function bu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new tu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new tu),t;default:throw Error(i(435,e.tag))}}function xu(e,t){var n=bu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=vf.bind(null,e,t);t.then(r,r)}})}function Su(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(wp(l.type)){mu=l.stateNode,hu=!1;break a}break;case 5:mu=l.stateNode,hu=!1;break a;case 3:case 4:mu=l.stateNode.containerInfo,hu=!0;break a}l=l.return}if(mu===null)throw Error(i(160));_u(s,c,o),mu=null,hu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)wu(t,e,n),t=t.sibling}var Cu=null;function wu(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Su(t,e,n),Tu(e),a&4&&(hl(3,e,e.return),ml(3,e),hl(5,e,e.return));break;case 1:Su(t,e,n),Tu(e),a&512&&(Ql||r===null||yl(r,r.return)),a&64&&Zl&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Cu,Su(t,e,n),Tu(e),a&512&&(Ql||r===null||yl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(Zl)e.stateNode=mp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[Ft]||r[Ot]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),ip(r,t,n),r[Ot]=e,Ht(r),t=r;break a;case`link`:if(o=qm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),ip(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=qm(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),ip(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[Ot]=e,Ht(r),t=r}e.stateNode=t}}else Zl||Jm(o,e.type,e.stateNode)}else e.stateNode=Hm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&El(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||Ql||t.parentNode.removeChild(t)):a.count--,n===null?Zl||Jm(o,e.type,e.stateNode):Hm(o,n,e.memoizedProps))}break;case 27:Su(t,e,n),Tu(e),a&512&&(Ql||r===null||yl(r,r.return)),r!==null&&a&4&&El(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=$l,$l=!1,Su(t,e,n),$l=o,Tu(e),a&512&&(Ql||r===null||yl(r,r.return)),e.flags&32){t=e.stateNode;try{_n(t,``),Qt=!0}catch(t){pf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,El(e,t,r===null?t:r.memoizedProps)),a&1024&&(eu=!0);break;case 6:if(Su(t,e,n),Tu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Qt=!0}catch(t){pf(e,e.return,t)}}break;case 3:if(Qt=!1,Km=null,o=Cu,Cu=Sm(t.containerInfo),Su(t,e,n),Cu=o,Tu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Wh(t.containerInfo)}catch(t){pf(e,e.return,t)}eu&&(eu=!1,Eu(e)),Qt=!1;break;case 4:a=$l,$l=Zl,r=$t(),o=Cu,Cu=Sm(e.stateNode.containerInfo),Su(t,e,n),Tu(e),Cu=o,Qt&&iu&&(au=!0),Qt=r,$l=a;break;case 12:Su(t,e,n),Tu(e);break;case 31:Su(t,e,n),Tu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,xu(e,t)));break;case 13:Su(t,e,n),Tu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(pd=Ke()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,xu(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=Zl,l=Ql,u=$l;Zl=c||o,$l=u||o,Ql=l||s,Su(t,e,n),Ql=l,$l=u,Zl=c,Tu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||Zl||Ql||(t=s||Ql,n=Zl,r=Ql,Zl=o||Zl,Ql=t,Au(e,2),Zl=n,Ql=r),!o&&$l||uu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,xu(e,n))));break;case 19:Su(t,e,n),Tu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,xu(e,t)));break;case 30:a&512&&(Ql||r===null||yl(r,r.return)),a=$t(),o=iu,s=(n&335544064)===n,c=e.memoizedProps,iu=s&&bi(c.default,c.update)!==`none`,Su(t,e,n),Tu(e),s&&r!==null&&Qt&&(e.flags|=4),iu=o,Qt=a;break;case 21:break;case 7:a&512&&(Ql||r===null||yl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Su(t,e,n),Tu(e)}}function Tu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Dl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(wl(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Cl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Al(e,Ol(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(_n(l,``),n.flags&=-33),Al(e,Ol(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;kl(e,Ol(e),u,s);break;default:throw Error(i(161))}}catch(t){pf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Eu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Eu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,vh=!0,t.reset(),vh=!1),e=e.sibling}}function Du(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Ou(t,e),t=t.sibling;else Xl(t,!1)}function Ou(e,t){var n=e.alternate;if(n===null)Hl(e,!1);else switch(e.tag){case 3:if(ou=ru=!1,Il(),Du(t,e),!ru&&!au){if(e=Fl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Op(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),ou=!0}Fl=null;break;case 5:Du(t,e);break;case 4:r=ru,ru=!1,Du(t,e),ru&&(au=!0),ru=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Du(t,e):Hl(e,!1));break;case 30:r=ru,i=Il(),ru=!1,Du(t,e),ru&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=vi(a,o),o=vi(n.memoizedProps,o);var s=bi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Ll=0,t=Yl(e,n,t,o,s,a,!0),Ll!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Md(e,e.memoizedProps.onUpdate),Fl=i):i!==null&&(i.push.apply(i,Fl),Fl=i),ru=e.flags&32?!0:r;break;default:Du(t,e)}}function ku(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)lu(e,t.alternate,t),t=t.sibling}function Au(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:hl(4,n,n.return),Au(n,r);break;case 1:yl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&_l(n,n.return,i),Au(n,r);break;case 27:r&2&&vm(n.stateNode,n.type,n.memoizedProps);case 5:yl(n,n.return),n.tag!==5&&n.tag!==27||Sl(n),Au(n,r);break;case 6:Sl(n);break;case 26:yl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||Ql||i.parentNode.removeChild(i),Au(n,r);break;case 22:n.memoizedState===null&&Au(n,r);break;case 30:yl(n,n.return),Au(n,r);break;case 7:yl(n,n.return);default:Au(n,r)}e=e.sibling}}function ju(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:ju(i,a,n),ml(4,a);break;case 1:if(ju(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){pf(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)yo(l[i],c)}catch(e){pf(r,r.return,e)}}s&&o&64&&gl(a),vl(a,a.return);break;case 27:n&2&&jl(a);case 5:a.tag!==5&&a.tag!==27||xl(a),ju(i,a,n),s&&r===null&&o&4&&Tl(a),vl(a,a.return);break;case 6:xl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||Zl||Jm(Sm(c.ownerDocument),a.type,c),ju(i,a,n),s&&r===null&&o&4&&Tl(a),vl(a,a.return);break;case 12:ju(i,a,n);break;case 31:ju(i,a,n),s&&o&4&&vu(i,a);break;case 13:ju(i,a,n),s&&o&4&&yu(i,a);break;case 22:a.memoizedState===null&&ju(i,a,n),vl(a,a.return);break;case 30:ju(i,a,n),vl(a,a.return);break;case 7:vl(a,a.return);default:ju(i,a,n)}t=t.sibling}}function Mu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Na(n))}function Nu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Na(e))}function Pu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Fu(e,t,n,r),t=t.sibling;else i&&Jl(t)}function Fu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&ql(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Pu(e,t,n,r),a&2048&&ml(9,t);break;case 1:Pu(e,t,n,r);break;case 3:Pu(e,t,n,r),i&&ou&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Na(a)));break;case 12:if(a&2048){Pu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){pf(t,t.return,e)}}else Pu(e,t,n,r);break;case 31:Pu(e,t,n,r);break;case 13:Pu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&ql(t),o._visibility&2?Pu(e,t,n,r):(o._visibility|=2,Iu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&ql(s),o._visibility&2?Pu(e,t,n,r):Lu(e,t)),a&2048&&Mu(s,t);break;case 24:Pu(e,t,n,r),a&2048&&Nu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Bl(a.child,!0),Bl(t.child,!0))),Pu(e,t,n,r);break;default:Pu(e,t,n,r)}}function Iu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Iu(a,o,s,c,i),ml(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Iu(a,o,s,c,i)):u._visibility&2?Iu(a,o,s,c,i):Lu(a,o),i&&l&2048&&Mu(o.alternate,o);break;case 24:Iu(a,o,s,c,i),i&&l&2048&&Nu(o.alternate,o);break;default:Iu(a,o,s,c,i)}t=t.sibling}}function Lu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Lu(n,r),i&2048&&Mu(r.alternate,r);break;case 24:Lu(n,r),i&2048&&Nu(r.alternate,r);break;default:Lu(n,r)}t=t.sibling}}var Ru=8192;function zu(e,t,n){if(e.subtreeFlags&Ru)for(e=e.child;e!==null;)Bu(e,t,n),e=e.sibling}function Bu(e,t,n){switch(e.tag){case 26:zu(e,t,n),e.flags&Ru&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&$m(n,e)):eh(n,Cu,e.memoizedState,e.memoizedProps));break;case 5:zu(e,t,n),e.flags&Ru&&(e=e.stateNode,(t&335544128)===t&&$m(n,e));break;case 3:case 4:var r=Cu;Cu=Sm(e.stateNode.containerInfo),zu(e,t,n),Cu=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ru,Ru=16777216,zu(e,t,n),Ru=r):zu(e,t,n));break;case 30:if((e.flags&Ru)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Nl===null&&(Nl=new Map),Nl.set(r,i)}zu(e,t,n);break;default:zu(e,t,n)}}function Vu(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Hu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];nu=r,Gu(r,e)}Vu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Uu(e),e=e.sibling}function Uu(e){switch(e.tag){case 0:case 11:case 15:Hu(e),e.flags&2048&&hl(9,e,e.return);break;case 3:Hu(e);break;case 12:Hu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Wu(e)):Hu(e);break;default:Hu(e)}}function Wu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];nu=r,Gu(r,e)}Vu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:hl(8,t,t.return),Wu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Wu(t));break;default:Wu(t)}e=e.sibling}}function Gu(e,t){for(;nu!==null;){var n=nu;switch(n.tag){case 0:case 11:case 15:hl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Na(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,nu=r;else a:for(n=e;nu!==null;){r=nu;var i=r.sibling,a=r.return;if(pu(r),r===n){nu=null;break a}if(i!==null){i.return=a,nu=i;break a}nu=a}}}var Ku={getCacheForType:function(e){var t=Ta(ja),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ta(ja).controller.signal}},qu=typeof WeakMap==`function`?WeakMap:Map,Ju=0,Yu=null,Xu=null,Zu=0,Qu=0,$u=null,ed=!1,td=!1,nd=!1,rd=0,id=0,ad=0,od=0,sd=0,cd=0,ld=0,ud=null,dd=null,fd=!1,pd=0,md=0,hd=1/0,gd=null,_d=null,vd=0,yd=null,bd=null,xd=0,Sd=0,Cd=null,wd=null,Td=null,Ed=null,Dd=null,Od=0,kd=null;function Ad(){return Ju&2&&Zu!==0?Zu&-Zu:M.T===null?Tt():Pf()}function jd(){if(cd===0){if(!(Zu&536870912)||oa){var e=lt;lt<<=1,!(lt&3932160)&&(lt=262144),cd=e}else cd=536870912}return e=Eo.current,e!==null&&(e.flags|=32),cd}function Md(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Ip(vi(e.memoizedProps,n))),Ed===null&&(Ed=[]),Ed.push(t.bind(null,r))}}function Nd(e,t,n){(e===Yu&&(Qu===2||Qu===9)||e.cancelPendingCommit!==null)&&(Bd(e,0),Ld(e,Zu,cd,!1)),vt(e,n),Ju&2&&e===Yu||(e===Yu&&(!(Ju&2)&&(od|=n),id===4&&Ld(e,Zu,cd,!1)),Ef(e))}function Pd(e,t,n){if(Ju&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||pt(e,t),a=r?Jd(e,t):Kd(e,t,!0),o=r;do{if(a===0){td&&!r&&Ld(e,t,0,!1);break}if(n=e.current.alternate,o&&!Id(n))a=Kd(e,t,!1),o=!1;else{if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=ud;var l=c.current.memoizedState.isDehydrated;if(l&&(Bd(c,s).flags|=256),s=Kd(c,s,!1),s!==2&&s!==6){if(nd&&!l){c.errorRecoveryDisabledLanes|=o,od|=o,a=4;break a}o=dd,dd=a,o!==null&&(dd===null?dd=o:dd.push.apply(dd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Bd(e,0),Ld(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Ld(r,t,cd,!ed);break a;case 2:dd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=pd+300-Ke(),10<a)){if(Ld(r,t,cd,!ed),ft(r,0,!0)!==0)break a;xd=t,r.timeoutHandle=vp(Fd.bind(null,r,n,dd,gd,fd,t,cd,od,ld,ed,o,`Throttled`,-0,0),a);break a}Fd(r,n,dd,gd,fd,t,cd,od,ld,ed,o,null,-0,0)}break}}while(1);Ef(e)}function Fd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Tn},Nl=null,Bu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=ih.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?pd-Ke():(a&4194048)===a?md-Ke():0,m=nh(d,m),m!==null)?(xd=a,e.cancelPendingCommit=m(tf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Ld(e,a,o,!l)):tf(e,t,a,n,r,i,o,s,c,l,u,d)}function Id(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Hr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ld(e,t,n,r){t=mt(e,t),t&=~sd,t&=~od,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-it(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&bt(e,n,t)}function Rd(){return Ju&6?!0:(Df(0,!1),!1)}function zd(){if(Xu!==null){if(Qu===0)var e=Xu.return;else e=Xu,ya=va=null,es(e),eo=null,to=0,e=Xu;for(;e!==null;)pl(e.alternate,e),e=e.return;Xu=null}}function Bd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,yp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),xd=0,zd(),Yu=e,Xu=n=Fi(e.current,null),Zu=t,Qu=0,$u=null,ed=!1,td=pt(e,t),nd=!1,ld=cd=sd=od=ad=id=0,dd=ud=null,fd=!1,rd=mt(e,t),Ti(),n}function Vd(e,t){q=null,M.H=X,t===Ga||t===qa?(t=$a(),Qu=3):t===Ka?(t=$a(),Qu=4):Qu=t===Tc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,$u=t,Xu===null&&(id=1,yc(e,Ui(t,e.current)))}function Hd(){var e=Eo.current;return e===null?!0:(Zu&4194048)===Zu?Do===null:(Zu&62914560)===Zu||Zu&536870912?e===Do:!1}function Ud(){var e=M.H;return M.H=X,e===null?X:e}function Wd(){var e=M.A;return M.A=Ku,e}function Gd(){id=4,ed||(Zu&4194048)!==Zu&&Eo.current!==null||(td=!0),!(ad&134217727)&&!(od&134217727)||Yu===null||Ld(Yu,Zu,cd,!1)}function Kd(e,t,n){var r=Ju;Ju|=2;var i=Ud(),a=Wd();(Yu!==e||Zu!==t)&&(gd=null,Bd(e,t)),t=!1;var o=id;a:do try{if(Qu!==0&&Xu!==null){var s=Xu,c=$u;switch(Qu){case 8:zd(),o=6;break a;case 3:case 2:case 9:case 6:Eo.current===null&&(t=!0);var l=Qu;if(Qu=0,$u=null,Qd(e,s,c,l),n&&td){o=0;break a}break;default:l=Qu,Qu=0,$u=null,Qd(e,s,c,l)}}qd(),o=id;break}catch(t){Vd(e,t)}while(1);return t&&e.shellSuspendCounter++,ya=va=null,Ju=r,M.H=i,M.A=a,Xu===null&&(Yu=null,Zu=0,Ti()),o}function qd(){for(;Xu!==null;)Xd(Xu)}function Jd(e,t){var n=Ju;Ju|=2;var r=Ud(),a=Wd();Yu!==e||Zu!==t?(gd=null,hd=Ke()+500,Bd(e,t)):td=pt(e,t);a:do try{if(Qu!==0&&Xu!==null){t=Xu;var o=$u;b:switch(Qu){case 1:Qu=0,$u=null,Qd(e,t,o,1);break;case 2:case 9:if(Ya(o)){Qu=0,$u=null,Zd(t);break}t=function(){Qu!==2&&Qu!==9||Yu!==e||(Qu=7),Ef(e)},o.then(t,t);break a;case 3:Qu=7;break a;case 4:Qu=5;break a;case 7:Ya(o)?(Qu=0,$u=null,Zd(t)):(Qu=0,$u=null,Qd(e,t,o,7));break;case 5:var s=null;switch(Xu.tag){case 26:s=Xu.memoizedState;case 5:case 27:var c=Xu;if(s?Zm(s):c.stateNode.complete){Qu=0,$u=null;var l=c.sibling;if(l!==null)Xu=l;else{var u=c.return;u===null?Xu=null:(Xu=u,$d(u))}break b}}Qu=0,$u=null,Qd(e,t,o,5);break;case 6:Qu=0,$u=null,Qd(e,t,o,6);break;case 8:zd(),id=6;break a;default:throw Error(i(462))}}Yd();break}catch(t){Vd(e,t)}while(1);return ya=va=null,M.H=r,M.A=a,Ju=n,Xu===null?(Yu=null,Zu=0,Ti(),id):0}function Yd(){for(;Xu!==null&&!We();)Xd(Xu)}function Xd(e){var t=il(e.alternate,e,rd);e.memoizedProps=e.pendingProps,t===null?$d(e):Xu=t}function Zd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Rc(n,t,t.pendingProps,t.type,void 0,Zu);break;case 11:t=Rc(n,t,t.pendingProps,t.type.render,t.ref,Zu);break;case 5:es(t);var r=t;r===ia&&(oa?(fa(r),r.tag===5&&r.stateNode!=null&&(aa=r.stateNode)):(fa(r),oa=!0));default:pl(n,t),t=Xu=Ii(t,rd),t=il(n,t,rd)}e.memoizedProps=e.pendingProps,t===null?$d(e):Xu=t}function Qd(e,t,n,r){ya=va=null,es(t),eo=null,to=0;var i=t.return;try{if(wc(e,i,t,n,Zu)){id=1,yc(e,Ui(n,e.current)),Xu=null;return}}catch(t){if(i!==null)throw Xu=i,t;id=1,yc(e,Ui(n,e.current)),Xu=null;return}t.flags&32768?(oa||r===1?e=!0:td||Zu&536870912?e=!1:(ed=e=!0,(r===2||r===9||r===3||r===6)&&(r=Eo.current,r!==null&&r.tag===13&&(r.flags|=16384))),ef(t,e)):$d(t)}function $d(e){var t=e;do{if(t.flags&32768){ef(t,ed);return}e=t.return;var n=dl(t.alternate,t,rd);if(n!==null){Xu=n;return}if(t=t.sibling,t!==null){Xu=t;return}Xu=t=e}while(t!==null);id===0&&(id=5)}function ef(e,t){do{var n=fl(e.alternate,e);if(n!==null){n.flags&=32767,Xu=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Xu=e;return}Xu=e=n}while(e!==null);id=6,Xu=null}function tf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do uf();while(vd!==0);if(Ju&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===Yu&&(Xu=Yu=null,Zu=0),bd=t,yd=e,xd=n,Cd=a,wd=r,nf(e,t,n,s,c,l,f)}}function nf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Sd=s,s|=wi,yt(e,n,s,r,i,a),Ed=null,(n&335544064)===n?(Dd=V(e),r=10262):(Dd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,yf(Xe,function(){return df(),null})):(e.callbackNode=null,e.callbackPriority=0),Ml=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=M.T,M.T=null,i=ye.p,ye.p=2,a=Ju,Ju|=4;try{su(e,t,n)}finally{Ju=a,ye.p=i,M.T=r}}vd=1,Ml?Td=Pp(o,e.containerInfo,Dd,of,sf,af,cf,df,rf,null,null):(of(),sf(),cf())}function rf(e){if(vd!==0){var t=yd.onRecoverableError;t(e,{componentStack:null})}}function af(){vd===3&&(vd=0,Ou(bd,yd),vd=4)}function of(){if(vd===1){vd=0;var e=yd,t=bd,n=xd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=M.T,M.T=null;var i=ye.p;ye.p=2;var a=Ju;Ju|=4;try{iu=au=!1,wu(t,e,n),n=up;var o=Jr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&qr(s.ownerDocument.documentElement,s)){if(c!==null&&Yr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Kr(s,h),v=Kr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}vh=!!lp,up=lp=null}finally{Ju=a,ye.p=i,M.T=r}}e.current=t,vd=2}}function sf(){if(vd===2){vd=0;var e=yd,t=bd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=M.T,M.T=null;var r=ye.p;ye.p=2;var i=Ju;Ju|=4;try{lu(e,t.alternate,t)}finally{Ju=i,ye.p=r,M.T=n}}vd=3}}function cf(){if(vd===4||vd===3){vd=0;var e=Td;Td=null,Ge();var t=yd,n=bd,r=xd,i=wd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?vd=5:(vd=0,bd=yd=null,lf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(_d=null),wt(r),n=n.stateNode,nt&&typeof nt.onCommitFiberRoot==`function`)try{nt.onCommitFiberRoot(tt,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=M.T,a=ye.p,ye.p=2,M.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{M.T=n,ye.p=a}}if(i=Ed,o=Dd,Dd=null,i!==null&&(Ed=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);xd&3&&uf(),Ef(t),a=t.pendingLanes,r&261930&&a&42?t===kd?Od++:(Od=0,kd=t):(Od=0,kd=null),Df(0,!1)}}function lf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Na(t)))}function uf(){return Td!==null&&(Td.skipTransition(),Td=null),of(),sf(),cf(),df()}function df(){if(vd!==5)return!1;var e=yd,t=Sd;Sd=0;var n=wt(xd),r=M.T,a=ye.p;try{ye.p=32>n?32:n,M.T=null,n=Cd,Cd=null;var o=yd,s=xd;if(vd=0,bd=yd=null,xd=0,Ju&6)throw Error(i(331));var c=Ju;if(Ju|=4,Uu(o.current),Fu(o,o.current,s,n),Ju=c,Df(0,!1),nt&&typeof nt.onPostCommitFiberRoot==`function`)try{nt.onPostCommitFiberRoot(tt,o)}catch{}return!0}finally{ye.p=a,M.T=r,lf(e,t)}}function ff(e,t,n){t=Ui(n,t),t=xc(e.stateNode,t,2),e=po(e,t,2),e!==null&&(vt(e,2),Ef(e))}function pf(e,t,n){if(e.tag===3)ff(e,e,n);else for(;t!==null;){if(t.tag===3){ff(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(_d===null||!_d.has(r))){e=Ui(n,e),n=Sc(2),r=po(t,n,2),r!==null&&(Cc(n,r,t,e),vt(r,2),Ef(r));break}}t=t.return}}function mf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new qu;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(nd=!0,i.add(n),e=hf.bind(null,e,t,n),t.then(e,e))}function hf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Yu===e&&(Zu&n)===n&&(id===4||id===3&&(Zu&62914560)===Zu&&300>Ke()-pd?Ju&2?sd|=n:Bd(e,0):sd|=n,ld===Zu&&(ld=0)),Ef(e)}function gf(e,t){t===0&&(t=gt()),e=Oi(e,t),e!==null&&(vt(e,t),Ef(e))}function _f(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),gf(e,n)}function vf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),gf(e,n)}function yf(e,t){return He(e,t)}var bf=null,xf=null,Sf=!1,Cf=!1,wf=!1,Tf=0;function Ef(e){e!==xf&&e.next===null&&(xf===null?bf=xf=e:xf=xf.next=e),Cf=!0,Sf||(Sf=!0,Nf())}function Df(e,t){if(!wf&&Cf){wf=!0;do for(var n=!1,r=bf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-it(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Mf(r,a))}else a=Zu,a=ft(r,r===Yu?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||pt(r,a)||(n=!0,Mf(r,a))}r=r.next}while(n);wf=!1}}function Of(){kf()}function kf(){Cf=Sf=!1;var e=0;Tf!==0&&_p()&&(e=Tf);for(var t=Ke(),n=null,r=bf;r!==null;){var i=r.next,a=Af(r,t);a===0?(r.next=null,n===null?bf=i:n.next=i,i===null&&(xf=n)):(n=r,(e!==0||a&3)&&(Cf=!0)),r=i}vd!==0&&vd!==5||Df(e,!1),Tf!==0&&(Tf=0)}function Af(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-it(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ht(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Yu,n=Zu,n=ft(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Qu===2||Qu===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ue(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||pt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ue(r),wt(n)){case 2:case 8:n=Ye;break;case 32:n=Xe;break;case 268435456:n=Qe;break;default:n=Xe}return r=jf.bind(null,e),n=He(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ue(r),e.callbackPriority=2,e.callbackNode=null,2}function jf(e,t){if(vd!==0&&vd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(uf()&&e.callbackNode!==n)return null;var r=Zu;return r=ft(e,e===Yu?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Pd(e,r,t),Af(e,Ke()),e.callbackNode!=null&&e.callbackNode===n?jf.bind(null,e):null)}function Mf(e,t){if(uf())return null;Pd(e,t,!0)}function Nf(){Sp(function(){Ju&6?He(Je,Of):kf()})}function Pf(){if(Tf===0){var e=U;e===0&&(e=ct,ct<<=1,!(ct&261888)&&(ct=256)),Tf=e}return Tf}function Ff(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:wn(e)}function If(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Ff((i[kt]||null).action),o=r.submitter;o&&(t=(t=o[kt]||null)?Ff(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Kn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Tf!==0){var e=new FormData(i,o);Js(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),Js(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Lf=0;Lf<hi.length;Lf++){var Rf=hi[Lf];gi(Rf.toLowerCase(),`on`+(Rf[0].toUpperCase()+Rf.slice(1)))}gi(si,`onAnimationEnd`),gi(ci,`onAnimationIteration`),gi(li,`onAnimationStart`),gi(`dblclick`,`onDoubleClick`),gi(`focusin`,`onFocus`),gi(`focusout`,`onBlur`),gi(ui,`onTransitionRun`),gi(di,`onTransitionStart`),gi(fi,`onTransitionCancel`),gi(pi,`onTransitionEnd`),qt(`onMouseEnter`,[`mouseout`,`mouseover`]),qt(`onMouseLeave`,[`mouseout`,`mouseover`]),qt(`onPointerEnter`,[`pointerout`,`pointerover`]),qt(`onPointerLeave`,[`pointerout`,`pointerover`]),Kt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Kt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Kt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Kt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Kt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Kt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var zf=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Bf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(zf));function Vf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){xi(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){xi(e)}i.currentTarget=null,a=c}}}}function Hf(e,t){var n=t[jt];n===void 0&&(n=t[jt]=new Set);var r=e+`__bubble`;n.has(r)||(Kf(t,e,2,!1),n.add(r))}function Uf(e,t,n){var r=0;t&&(r|=4),Kf(n,e,r,t)}var Wf=`_reactListening`+Math.random().toString(36).slice(2);function Gf(e){if(!e[Wf]){e[Wf]=!0,Wt.forEach(function(t){t!==`selectionchange`&&(Bf.has(t)||Uf(t,!1,e),Uf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Wf]||(t[Wf]=!0,Uf(`selectionchange`,!1,t))}}function Kf(e,t,n,r){switch(Th(t)){case 2:var i=yh;break;case 8:i=bh;break;default:i=xh}n=i.bind(null,t,n,e),i=void 0,!Fn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function qf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=Rt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}Mn(function(){var r=a,i=Dn(n),s=[];a:{var c=mi.get(e);if(c!==void 0){var l=Kn,u=e;switch(e){case`keypress`:if(Vn(n)===0)break a;case`keydown`:case`keyup`:l=ar;break;case`focusin`:u=`focus`,l=I;break;case`focusout`:u=`blur`,l=I;break;case`beforeblur`:case`afterblur`:l=I;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Xn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Zn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=cr;break;case si:case ci:case li:l=L;break;case pi:l=R;break;case`scroll`:case`scrollend`:l=N;break;case`wheel`:l=lr;break;case`copy`:case`cut`:case`paste`:l=Qn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=or;break;case`submit`:l=sr;break;case`toggle`:case`beforetoggle`:l=ur}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=Nn(m,p),g!=null&&d.push(Jf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==En&&(u=n.relatedTarget||n.fromElement)&&(Rt(u)||u[At]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Rt(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Xn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=or,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Bt(c),h=l==null?u:Bt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Rt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?E(c,l,Xf):null,c!==null&&Zf(s,u,c,d,!1),l!==null&&f!==null&&Zf(s,f,l,d,!0)))}a:{if(c=r?Bt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Ar;else if(wr(c)){if(jr)_=Br;else{_=Rr;var v=Lr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&xn(r.elementType)&&(_=Ar):_=zr;if(_&&=_(e,r)){Tr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Bt(r):window,e){case`focusin`:(wr(v)||v.contentEditable===`true`)&&(Zr=v,Qr=r,$r=null);break;case`focusout`:$r=Qr=Zr=null;break;case`mousedown`:ei=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:ei=!1,ti(s,n,i);break;case`selectionchange`:if(Xr)break;case`keydown`:case`keyup`:ti(s,n,i)}var y;if(fr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else br?vr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(hr&&n.locale!==`ko`&&(br||b!==`onCompositionStart`?b===`onCompositionEnd`&&br&&(y=Bn()):(Ln=i,Rn=`value`in Ln?Ln.value:Ln.textContent,br=!0)),v=Yf(r,b),0<v.length&&(b=new $n(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=yr(n),y!==null&&(b.data=y)))),(y=mr?xr(e,n):Sr(e,n))&&(b=Yf(r,`onBeforeInput`),0<b.length&&(v=new $n(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),If(s,e,r,n,i)}Vf(s,t)})}function Jf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Yf(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Nn(e,n),i!=null&&r.unshift(Jf(e,i,a)),i=Nn(e,t),i!=null&&r.push(Jf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Xf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Zf(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=Nn(n,a),l!=null&&o.unshift(Jf(n,l,c))):i||(l=Nn(n,a),l!=null&&o.push(Jf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Qf=/\r\n?/g,$f=/\u0000|\uFFFD/g;function ep(e){return(typeof e==`string`?e:``+e).replace(Qf,`
9
- `).replace($f,``)}function tp(e,t){return t=ep(t),ep(e)===t}function np(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||_n(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&_n(e,``+r);else return;break;case`className`:tn(e,`class`,r);break;case`tabIndex`:tn(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:tn(e,n,r);break;case`style`:bn(e,r,o);return;case`data`:if(t!==`object`){tn(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=wn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&np(e,t,`name`,a.name,a,null),np(e,t,`formEncType`,a.formEncType,a,null),np(e,t,`formMethod`,a.formMethod,a,null),np(e,t,`formTarget`,a.formTarget,a,null)):(np(e,t,`encType`,a.encType,a,null),np(e,t,`method`,a.method,a,null),np(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=wn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Tn);return;case`onScroll`:r!=null&&Hf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Hf(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=wn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Hf(`beforetoggle`,e),Hf(`toggle`,e),en(e,`popover`,r);break;case`xlinkActuate`:nn(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:nn(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:nn(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:nn(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:nn(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:nn(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:nn(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:nn(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:nn(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:en(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=Sn.get(n)||n,en(e,n,r);else return}Qt=!0}function rp(e,t,n,r,a,o){switch(n){case`style`:bn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)_n(e,r);else if(typeof r==`number`||typeof r==`bigint`)_n(e,``+r);else return;break;case`onScroll`:r!=null&&Hf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Hf(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=Tn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Gt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[kt]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Qt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):en(e,n,r)}return}Qt=!0}function ip(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Hf(`error`,e),Hf(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:np(e,t,o,s,n,null)}}a&&np(e,t,`srcSet`,n.srcSet,n,null),r&&np(e,t,`src`,n.src,n,null);return;case`input`:Hf(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:np(e,t,r,d,n,null)}}fn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Hf(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:np(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&mn(e,!!r,n,!0):mn(e,!!r,t,!1);return;case`textarea`:for(s in Hf(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:np(e,t,s,c,n,null)}gn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:np(e,t,l,r,n,null)}return;case`dialog`:Hf(`beforetoggle`,e),Hf(`toggle`,e),Hf(`cancel`,e),Hf(`close`,e);break;case`iframe`:case`object`:Hf(`load`,e);break;case`video`:case`audio`:for(r=0;r<zf.length;r++)Hf(zf[r],e);break;case`image`:Hf(`error`,e),Hf(`load`,e);break;case`details`:Hf(`toggle`,e);break;case`embed`:case`source`:case`link`:Hf(`error`,e),Hf(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:np(e,t,u,r,n,null)}return;default:if(xn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&rp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&np(e,t,c,r,n,null))}var ap={};function op(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||np(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(Qt=!0),o=m;break;case`name`:m!==f&&(Qt=!0),a=m;break;case`checked`:m!==f&&(Qt=!0),u=m;break;case`defaultChecked`:m!==f&&(Qt=!0),d=m;break;case`value`:m!==f&&(Qt=!0),s=m;break;case`defaultValue`:m!==f&&(Qt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&np(e,t,p,m,r,f)}}dn(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||np(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(Qt=!0),p=o;break;case`defaultValue`:o!==l&&(Qt=!0),c=o;break;case`multiple`:o!==l&&(Qt=!0),s=o;default:o!==l&&np(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?mn(e,!!n,n?[]:``,!1):mn(e,!!n,t,!0)):mn(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:np(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(Qt=!0),p=a;break;case`defaultValue`:a!==o&&(Qt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&np(e,t,s,a,r,o)}hn(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:np(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(Qt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:np(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&np(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:np(e,t,u,p,r,m)}return;default:if(xn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&rp(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||rp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&np(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||np(e,t,f,p,r,m)}function sp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function cp(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&sp(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&sp(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var lp=null,up=null;function dp(e){return e.nodeType===9?e:e.ownerDocument}function fp(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function pp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function mp(e,t,n,r){return n=dp(n).createElement(e),n[Ot]=r,n[kt]=t,ip(n,e,t),Ht(n),n}function hp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var gp=null;function _p(){var e=window.event;return e&&e.type===`popstate`?e!==gp&&(gp=e,!0):(gp=null,!1)}var vp=typeof setTimeout==`function`?setTimeout:void 0,yp=typeof clearTimeout==`function`?clearTimeout:void 0,bp=typeof Promise==`function`?Promise:void 0,xp=typeof requestAnimationFrame==`function`?requestAnimationFrame:vp,Sp=typeof queueMicrotask==`function`?queueMicrotask:bp===void 0?vp:function(e){return bp.resolve(null).then(e).catch(Cp)};function Cp(e){setTimeout(function(){throw e})}function wp(e){return e===`head`}function Tp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Wh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)ym(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,ym(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Ft]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&ym(e.ownerDocument.body)}n=i}while(n);Wh(t)}function Ep(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Dp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Op(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function kp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Ap(e){return kp(e.getBoundingClientRect(),getComputedStyle(e),e)}function jp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return kp(t,n,e)}function Mp(e){return e.documentElement.clientHeight}function Np(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Pp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Mp(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=Qm(f),u>th){s.length=o;break}f=new Promise(Np.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Fp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Fp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Fp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Fp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Ip(e){return{name:e,group:new Fp(`group`,e),imagePair:new Fp(`image-pair`,e),old:new Fp(`old`,e),new:new Fp(`new`,e)}}function Lp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Lp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Hp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Bp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),m(this._fragmentFiber.child,!1,Rp,e,s,r)}this._eventListeners=a}};function Rp(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Lp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Hp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Bp(i.optionsOrUseCapture),m(this._fragmentFiber.child,!1,zp,e,n,i),r.splice(t,1),a!==null&&a()}};function zp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Bp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Vp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Hp(e,t,n,r){if(e.length===0)return-1;r=Vp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Vp(a.optionsOrUseCapture)===r)return i}return-1}Lp.prototype.dispatchEvent=function(e){var t=g(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Bp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Bp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Lp.prototype.focus=function(e){m(this._fragmentFiber.child,!0,Up,e,void 0,void 0)};function Up(e,t){return e.tag!==6&&(e=b(e),hm(e,t))}Lp.prototype.focusLast=function(e){var t=[];m(this._fragmentFiber.child,!0,Wp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Up(t[n],e);n--);};function Wp(e,t){return t.push(e),!1}Lp.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=dp(e).activeElement,e!==null&&m(this._fragmentFiber.child,!1,Gp,e,void 0,void 0))};function Gp(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Lp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),m(this._fragmentFiber.child,!1,Kp,e,void 0,void 0)};function Kp(e,t){return e.tag===6||(e=b(e),t.observe(e)),!1}Lp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),m(this._fragmentFiber.child,!1,qp,e,void 0,void 0);for(var n=t=0;n<Jp.length;n++){var r=Jp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Jp[t++]=r}Jp.length=t}};function qp(e,t){return e.tag===6||(e=b(e),t.unobserve(e)),!1}var Jp=[],Yp=!1;function Xp(e,t,n){Jp.push({fragmentInstance:e,observer:t,instance:n}),Yp||(Yp=!0,gm(function(){Yp=!1;var e=Jp;Jp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Lp.prototype.getClientRects=function(){var e=[];return m(this._fragmentFiber.child,!1,Zp,e,void 0,void 0),e};function Zp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Lp.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Lp.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];m(this._fragmentFiber.child,!1,Wp,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Qp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Qp(e,t,n,r,i){var a=Rt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(m(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(m(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function $p(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Lp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];m(this._fragmentFiber.child,!1,Wp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||g(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),$p(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),$p(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function em(e,t){return e=b(e),tm(e,t),!1}function tm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function nm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Bp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Jp.length;i++){var a=Jp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Jp[r++]=a)}Jp.length=r,n.observe(e)}),tm(e,t))}function rm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Bp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Xp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function im(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:im(n),Lt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function am(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[Ft])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=dm(e.nextSibling),e===null)break}return null}function om(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=dm(e.nextSibling),e===null))return null;return e}function sm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=dm(e.nextSibling),e===null))return null;return e}function cm(e){return e.data===`$?`||e.data===`$~`}function lm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function um(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function dm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var fm=null;function pm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return dm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function mm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function hm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function gm(e){xp(function(){xp(function(t){return e(t)})})}function _m(e,t,n){switch(t=dp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function vm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&np(e,t,r,null,ap,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===Tn&&(e.onclick=null),Lt(e)}function ym(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Lt(e)}var bm=new Map,xm=new Set;function Sm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Cm=ye.d;ye.d={f:wm,r:Tm,D:Om,C:km,L:Am,m:jm,X:Nm,S:Mm,M:Pm};function wm(){var e=Cm.f(),t=Rd();return e||t}function Tm(e){var t=zt(e);t!==null&&t.tag===5&&t.type===`form`?Xs(t):Cm.r(e)}var Em=typeof document>`u`?null:document;function Dm(e,t,n){var r=Em;if(r&&typeof t==`string`&&t){var i=un(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),xm.has(i)||(xm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),ip(t,`link`,e),Ht(t),r.head.appendChild(t)))}}function Om(e){Cm.D(e),Dm(`dns-prefetch`,e,null)}function km(e,t){Cm.C(e,t),Dm(`preconnect`,e,t)}function Am(e,t,n){Cm.L(e,t,n);var r=Em;if(r&&e&&t){var i=`link[rel="preload"][as="`+un(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+un(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+un(n.imageSizes)+`"]`)):i+=`[href="`+un(e)+`"]`;var a=i;switch(t){case`style`:a=Im(e);break;case`script`:a=Bm(e)}if(!(bm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),bm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Lm(a))||t===`script`&&r.querySelector(Vm(a))))){var o=r.createElement(`link`);ip(o,`link`,e),t===`style`&&(o[It]=!0,o.onload=o.onerror=function(){Ut(o)}),Ht(o),r.head.appendChild(o)}}}function jm(e,t){Cm.m(e,t);var n=Em;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+un(r)+`"][href="`+un(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Bm(e)}if(!bm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),bm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Vm(a)))return}r=n.createElement(`link`),ip(r,`link`,e),Ht(r),n.head.appendChild(r)}}}function Mm(e,t,n){Cm.S(e,t,n);var r=Em;if(r&&e){var i=Vt(r).hoistableStyles,a=Im(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Lm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=bm.get(a))&&Wm(e,n);var c=o=r.createElement(`link`);Ht(c),ip(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Um(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Nm(e,t){Cm.X(e,t);var n=Em;if(n&&e){var r=Vt(n).hoistableScripts,i=Bm(e),a=r.get(i);a||(a=n.querySelector(Vm(i)),a||(e=D({src:e,async:!0},t),(t=bm.get(i))&&Gm(e,t),a=n.createElement(`script`),Ht(a),ip(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pm(e,t){Cm.M(e,t);var n=Em;if(n&&e){var r=Vt(n).hoistableScripts,i=Bm(e),a=r.get(i);a||(a=n.querySelector(Vm(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=bm.get(i))&&Gm(e,t),a=n.createElement(`script`),Ht(a),ip(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Fm(e,t,n,r){var a=(a=Oe.current)?Sm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Im(n.href),t=Vt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Im(n.href);var o=Vt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Lm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=bm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},bm.set(e,o)),zm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Bm(n),t=Vt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Im(e){return`href="`+un(e)+`"`}function Lm(e){return`link[rel="stylesheet"][`+e+`]`}function Rm(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function zm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[It]){r.loading=1;return}}else t=e.createElement(`link`),t[It]=!0,t.onload=t.onerror=Ut.bind(null,t),ip(t,`link`,n),Ht(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Bm(e){return`[src="`+un(e)+`"]`}function Vm(e){return`script[async]`+e}function Hm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+un(n.href)+`"]`);if(r)return t.instance=r,Ht(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Ht(r),ip(r,`style`,a),Um(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Im(n.href);var o=e.querySelector(Lm(a));if(o)return t.state.loading|=4,t.instance=o,Ht(o),o;r=Rm(n),(a=bm.get(a))&&Wm(r,a),o=(e.ownerDocument||e).createElement(`link`),Ht(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),ip(o,`link`,r),t.state.loading|=4,Um(o,n.precedence,e),t.instance=o;case`script`:return o=Bm(n.src),(a=e.querySelector(Vm(o)))?(t.instance=a,Ht(a),a):(r=n,(a=bm.get(o))&&(r=D({},n),Gm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Ht(a),ip(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Um(r,n.precedence,e));return t.instance}function Um(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Wm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Gm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Km=null;function qm(e,t,n){if(Km===null){var r=new Map,i=Km=new Map;i.set(n,r)}else i=Km,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Ft]||a[Ot]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Jm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Ym(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Xm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Zm(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Qm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function $m(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Qm(t),e.suspenseyImages.push(t)),e=ah.bind(e),t.decode().then(e,e))}function eh(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Im(r.href),a=t.querySelector(Lm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ih.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ht(a);return}a=t.ownerDocument||t,r=Rm(r),(i=bm.get(i))&&Wm(r,i),a=a.createElement(`link`),Ht(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),ip(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ih.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var th=0;function nh(e,t){return e.stylesheets&&e.count===0&&sh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&sh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&th===0&&(th=62500*cp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&sh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>th?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function rh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)sh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function ih(){this.count--,rh(this)}function ah(){this.imgCount--,rh(this)}var oh=null;function sh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,oh=new Map,t.forEach(ch,e),oh=null,ih.call(e))}function ch(e,t){if(!(t.state.loading&4)){var n=oh.get(e);if(n)var r=n.get(null);else{n=new Map,oh.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=ih.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var lh={$$typeof:re,Provider:null,Consumer:null,_currentValue:be,_currentValue2:be,_threadCount:0};function uh(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=_t(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_t(0),this.hiddenUpdates=_t(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function dh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new uh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Ni(3,null,null,t),e.current=a,a.stateNode=e,t=Ma(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},lo(a),e}function fh(e){return e?(e=ji,e):ji}function ph(e,t,n,r,i,a){i=fh(i),r.context===null?r.context=i:r.pendingContext=i,r=fo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=po(e,r,t),n!==null&&(Nd(n,e,t),mo(n,e,t))}function mh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function hh(e,t){mh(e,t),(e=e.alternate)&&mh(e,t)}function gh(e){if(e.tag===13||e.tag===31){var t=Oi(e,67108864);t!==null&&Nd(t,e,67108864),hh(e,67108864)}}function _h(e){if(e.tag===13||e.tag===31){var t=Ad();t=Ct(t);var n=Oi(e,t);n!==null&&Nd(n,e,t),hh(e,t)}}var vh=!0;function yh(e,t,n,r){var i=M.T;M.T=null;var a=ye.p;try{ye.p=2,xh(e,t,n,r)}finally{ye.p=a,M.T=i}}function bh(e,t,n,r){var i=M.T;M.T=null;var a=ye.p;try{ye.p=8,xh(e,t,n,r)}finally{ye.p=a,M.T=i}}function xh(e,t,n,r){if(vh){var i=Sh(r);if(i===null)qf(e,t,r,Ch,n),Ph(e,r);else if(Ih(i,e,t,n,r))r.stopPropagation();else if(Ph(e,r),t&4&&-1<Nh.indexOf(e)){for(;i!==null;){var a=zt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=dt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-it(o);s.entanglements[1]|=c,o&=~c}Ef(a),!(Ju&6)&&(hd=Ke()+500,Df(0,!1))}}break;case 31:case 13:s=Oi(a,2),s!==null&&Nd(s,a,2),Rd(),hh(a,2)}if(a=Sh(r),a===null&&qf(e,t,r,Ch,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else qf(e,t,r,null,n)}}function Sh(e){return e=Dn(e),wh(e)}var Ch=null;function wh(e){if(Ch=null,e=Rt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ch=e,null}function Th(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(qe()){case Je:return 2;case Ye:return 8;case Xe:case Ze:return 32;case Qe:return 268435456;default:return 32}default:return 32}}var Eh=!1,Dh=null,Oh=null,kh=null,Ah=new Map,jh=new Map,Mh=[],Nh=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Ph(e,t){switch(e){case`focusin`:case`focusout`:Dh=null;break;case`dragenter`:case`dragleave`:Oh=null;break;case`mouseover`:case`mouseout`:kh=null;break;case`pointerover`:case`pointerout`:Ah.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:jh.delete(t.pointerId)}}function Fh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=zt(t),t!==null&&gh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ih(e,t,n,r,i){switch(t){case`focusin`:return Dh=Fh(Dh,e,t,n,r,i),!0;case`dragenter`:return Oh=Fh(Oh,e,t,n,r,i),!0;case`mouseover`:return kh=Fh(kh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Ah.set(a,Fh(Ah.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,jh.set(a,Fh(jh.get(a)||null,e,t,n,r,i)),!0}return!1}function Lh(e){var t=Rt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,Et(e.priority,function(){_h(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Et(e.priority,function(){_h(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Rh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Sh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);En=r,n.target.dispatchEvent(r),En=null}else return t=zt(n),t!==null&&gh(t),e.blockedOn=n,!1;t.shift()}return!0}function zh(e,t,n){Rh(e)&&n.delete(t)}function Bh(){Eh=!1,Dh!==null&&Rh(Dh)&&(Dh=null),Oh!==null&&Rh(Oh)&&(Oh=null),kh!==null&&Rh(kh)&&(kh=null),Ah.forEach(zh),jh.forEach(zh)}function Vh(e,n){e.blockedOn===n&&(e.blockedOn=null,Eh||(Eh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Bh)))}var Hh=null;function Uh(e){Hh!==e&&(Hh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Hh===e&&(Hh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(wh(r||n)===null)continue;break}var a=zt(n);a!==null&&(e.splice(t,3),t-=3,Js(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Wh(e){function t(t){return Vh(t,e)}Dh!==null&&Vh(Dh,e),Oh!==null&&Vh(Oh,e),kh!==null&&Vh(kh,e),Ah.forEach(t),jh.forEach(t);for(var n=0;n<Mh.length;n++){var r=Mh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Mh.length&&(n=Mh[0],n.blockedOn===null);)Lh(n),n.blockedOn===null&&Mh.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[kt]||null;if(typeof a==`function`)o||Uh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[kt]||null)s=o.formAction;else if(wh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Uh(n)}}}function Gh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Kh(e){this._internalRoot=e}qh.prototype.render=Kh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ph(n,Ad(),e,t,null,null)},qh.prototype.unmount=Kh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ph(e.current,2,null,e,null,null),Rd(),t[At]=null}};function qh(e){this._internalRoot=e}qh.prototype.unstable_scheduleHydration=function(e){if(e){var t=Tt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mh.length&&t!==0&&t<Mh[n].priority;n++);Mh.splice(n,0,e),n===0&&Lh(e)}};var Jh=n.version;if(Jh!==`19.3.1`)throw Error(i(527,Jh,`19.3.1`));ye.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Yh={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:M,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Xh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xh.isDisabled&&Xh.supportsFiber)try{tt=Xh.inject(Yh),nt=Xh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=gc,s=_c,c=vc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=dh(e,1,!1,null,null,n,r,null,o,s,c,Gh),e[At]=t.current,Gf(e),new Kh(t)}})),_=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=l(d(),1),y=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,b=/^[\\/]{2}/;function x(e,t){return t+e.replace(/\\/g,`/`)}var S=`popstate`;function C(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function w(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return k(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:A(t)}return ee(t,n,null,e)}function T(e,t){if(e===!1||e==null)throw Error(t)}function E(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function D(){return Math.random().toString(36).substring(2,10)}function O(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function k(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?j(t):t,state:n,key:t&&t.key||r||D(),mask:i}}function A({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function j(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function ee(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=C(e)?e:k(h.location,e,t);n&&n(r,e),l=u()+1;let d=O(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=C(e)?e:k(h.location,e,t);n&&n(r,e),l=u();let i=O(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return te(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(S,d),c=e,()=>{i.removeEventListener(S,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function te(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),T(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:A(t);return i=i.replace(/ $/,`%20`),!n&&b.test(i)&&(i=r+i),new URL(i,r)}function ne(e,t,n=`/`){return re(e,t,n,!1)}function re(e,t,n,r,i){let a=xe((typeof t==`string`?j(t):t).pathname||`/`,n);if(a==null)return null;let o=i??ie(e),s=null,c=be(a);for(let e=0;s==null&&e<o.length;++e)s=_e(o[e],c,r);return s}function ie(e){let t=ae(e);return se(t),t}function ae(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;T(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=ke([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(T(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),ae(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:he(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=ye(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of oe(e.path))a(e,t,!0,n)}),t}function oe(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=oe(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function se(e){e.sort((e,t)=>e.score===t.score?ge(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var ce=/^:[\w-]+$/,le=3,ue=2,de=1,fe=10,pe=-2,me=e=>e===`*`;function he(e,t){let n=e.split(`/`),r=n.length;return n.some(me)&&(r+=pe),t&&(r+=ue),n.filter(e=>!me(e)).reduce((e,t)=>e+(ce.test(t)?le:t===``?de:fe),r)}function ge(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function _e(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?M(u,l,s.matcher,s.compiledParams):ve(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=ve({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:ke([a,d.pathname]),pathnameBase:je(ke([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=ke([a,d.pathnameBase]))}return o}function ve(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=ye(e.path,e.caseSensitive,e.end);return M(e,t,n,r)}function M(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=Ae(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=Ae(a.slice(0,a.length-e.length),1)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function ye(e,t=!1,n=!0){E(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function be(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return E(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function xe(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function Se(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?j(e):e,a;return n?(n=Oe(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?Ce(n.substring(1),`/`):Ce(n,t)):a=t,{pathname:a,search:Me(r),hash:Ne(i)}}function Ce(e,t){let n=Ae(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function we(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Te(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Ee(e){let t=Te(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function De(e,t,n,r=!1){let i;typeof e==`string`?i=j(e):(i={...e},T(!i.pathname||!i.pathname.includes(`?`),we(`?`,`pathname`,`search`,i)),T(!i.pathname||!i.pathname.includes(`#`),we(`#`,`pathname`,`hash`,i)),T(!i.search||!i.search.includes(`#`),we(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Se(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Oe=e=>e.replace(/[\\/]{2,}/g,`/`),ke=e=>Oe(e.join(`/`));function Ae(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var je=e=>Ae(e).replace(/^\/*/,`/`),Me=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Ne=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Pe=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Fe(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Ie(e){return ke(e.map(e=>e.route.path).filter(Boolean))||`/`}var Le=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Re(e,t){let n=e;if(typeof n!=`string`||!y.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Le)try{let e=new URL(window.location.href),r=b.test(n)?new URL(x(n,e.protocol)):new URL(n),a=xe(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{E(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var ze=new URL(`http://localhost`);function Be(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),ze)}catch{return ze}}function Ve(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function He(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function Ue(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!Ve(i,n),s=!Ve(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!He(e,i)||!Ve(i,a)))throw Error(`External navigation is not allowed`)}var We=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(We);var Ge=[`GET`,...We];new Set(Ge);var Ke=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function qe(e){try{return Ke.includes(new URL(e).protocol)}catch{return!1}}var Je=v.createContext(null);Je.displayName=`DataRouter`;var Ye=v.createContext(null);Ye.displayName=`DataRouterState`;var Xe=v.createContext(!1);function Ze(){return v.useContext(Xe)}var Qe=v.createContext({isTransitioning:!1});Qe.displayName=`ViewTransition`;var $e=v.createContext(new Map);$e.displayName=`Fetchers`;var et=v.createContext(null);et.displayName=`Await`;var tt=v.createContext(null);tt.displayName=`Navigation`;var nt=v.createContext(null);nt.displayName=`Location`;var rt=v.createContext({outlet:null,matches:[],isDataRoute:!1});rt.displayName=`Route`;var it=v.createContext(null);it.displayName=`RouteError`;var at=`REACT_ROUTER_ERROR`,ot=`REDIRECT`,st=`ROUTE_ERROR_RESPONSE`;function ct(e){if(e.startsWith(`${at}:${ot}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function lt(e){if(e.startsWith(`${at}:${st}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Pe(t.status,t.statusText,t.data)}catch{}}function ut(e,{relative:t}={}){T(dt(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=v.useContext(tt),{hash:i,pathname:a,search:o}=bt(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:ke([n,a])),r.createHref({pathname:s,search:o,hash:i})}function dt(){return v.useContext(nt)!=null}function ft(){return T(dt(),`useLocation() may be used only in the context of a <Router> component.`),v.useContext(nt).location}var pt=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function mt(e){v.useContext(tt).static||v.useLayoutEffect(e)}function ht(){let{isDataRoute:e}=v.useContext(rt);return e?Lt():gt()}function gt(){T(dt(),`useNavigate() may be used only in the context of a <Router> component.`);let e=v.useContext(Je),{basename:t,navigator:n}=v.useContext(tt),{matches:r}=v.useContext(rt),{pathname:i}=ft(),a=JSON.stringify(Ee(r)),o=v.useRef(!1);return mt(()=>{o.current=!0}),v.useCallback((r,s={})=>{if(E(o.current,pt),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=De(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:ke([t,c.pathname])),Ue(typeof r==`string`?r:A(r),n.createHref(c),Be(n),`reject`),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var _t=v.createContext(null);function vt(e){let t=v.useContext(rt).outlet;return v.useMemo(()=>t&&v.createElement(_t.Provider,{value:e},t),[t,e])}function yt(){let{matches:e}=v.useContext(rt);return e[e.length-1]?.params??{}}function bt(e,{relative:t}={}){let{matches:n}=v.useContext(rt),{pathname:r}=ft(),i=JSON.stringify(Ee(n));return v.useMemo(()=>De(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function xt(e,t){return St(e,t)}function St(e,t,n){T(dt(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=v.useContext(tt),{matches:i}=v.useContext(rt),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;zt(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
10
-
11
- Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=ft(),d;if(t){let e=typeof t==`string`?j(t):t;T(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):ne(e,{pathname:p});E(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),E(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let h=kt(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:ke([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:ke([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?v.createElement(nt.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},h):h}function Ct(){let e=It(),t=Fe(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=v.createElement(v.Fragment,null,v.createElement(`p`,null,`💿 Hey developer 👋`),v.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,v.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,v.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),v.createElement(v.Fragment,null,v.createElement(`h2`,null,`Unexpected Application Error!`),v.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?v.createElement(`pre`,{style:i},n):null,o)}var wt=v.createElement(Ct,null),Tt=class extends v.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=lt(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:v.createElement(rt.Provider,{value:this.props.routeContext},v.createElement(it.Provider,{value:e,children:this.props.component}));return this.context?v.createElement(Dt,{error:e},t):t}};Tt.contextType=Xe;var Et=new WeakMap;function Dt({children:e,error:t}){let{basename:n,navigator:r}=v.useContext(tt);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=ct(t.digest);if(e){let i=Et.get(t);if(i)throw i;let a=Re(e.location,n),o=a.absoluteURL||a.to;if(Ue(e.location,o,Be(r),`allow-explicit`),qe(o))throw Error(`Invalid redirect location`);if(Le&&!Et.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw Et.set(t,n),n}}return v.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function Ot({routeContext:e,match:t,children:n}){let r=v.useContext(Je);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),v.createElement(rt.Provider,{value:e},n)}function kt(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);T(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Ie(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||wt,o&&(s<0&&c===0?(zt(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?v.createElement(n.route.Component,null):n.route.element?n.route.element:e,v.createElement(Ot,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?v.createElement(Tt,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function At(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jt(e){let t=v.useContext(Je);return T(t,At(e)),t}function Mt(e){let t=v.useContext(Ye);return T(t,At(e)),t}function Nt(e){let t=v.useContext(rt);return T(t,At(e)),t}function Pt(e){let t=Nt(e),n=t.matches[t.matches.length-1];return T(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Ft(){return Pt(`useRouteId`)}function It(){let e=v.useContext(it),t=Mt(`useRouteError`),n=Pt(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Lt(){let{router:e}=jt(`useNavigate`),t=Pt(`useNavigate`),n=v.useRef(!1);return mt(()=>{n.current=!0}),v.useCallback(async(r,i={})=>{E(n.current,pt),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Rt={};function zt(e,t,n){!t&&!Rt[e]&&(Rt[e]=!0,E(!1,n))}v.memo(Bt);function Bt({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return St(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Vt({to:e,replace:t,state:n,relative:r}){T(dt(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i,navigator:a}=v.useContext(tt);E(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:o}=v.useContext(rt),{pathname:s}=ft(),c=ht(),l=De(e,Ee(o),s,r===`path`);Ue(typeof e==`string`?e:A(e),a.createHref(l),Be(a),`reject`);let u=JSON.stringify(l);return v.useEffect(()=>{c(JSON.parse(u),{replace:t,state:n,relative:r})},[c,u,r,t,n]),null}function Ht(e){return vt(e.context)}function Ut(e){T(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function Wt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){T(!dt(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=v.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=j(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=v.useMemo(()=>{let e=xe(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return E(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:v.createElement(tt.Provider,{value:c},v.createElement(nt.Provider,{children:t,value:h}))}function Gt({children:e,location:t}){return xt(Kt(e),t)}v.Component;function Kt(e,t=[]){let n=[];return v.Children.forEach(e,(e,r)=>{if(!v.isValidElement(e))return;let i=[...t,r];if(e.type===v.Fragment){n.push.apply(n,Kt(e.props.children,i));return}T(e.type===Ut,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),T(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Kt(e.props.children,i)),n.push(a)}),n}var qt=`get`,Jt=`application/x-www-form-urlencoded`;function Yt(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Xt(e){return Yt(e)&&e.tagName.toLowerCase()===`button`}function Zt(e){return Yt(e)&&e.tagName.toLowerCase()===`form`}function Qt(e){return Yt(e)&&e.tagName.toLowerCase()===`input`}function $t(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function en(e,t){return e.button===0&&(!t||t===`_self`)&&!$t(e)}function tn(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function nn(e,t){let n=tn(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var rn=null;function an(){if(rn===null)try{new FormData(document.createElement(`form`),0),rn=!1}catch{rn=!0}return rn}var on=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function sn(e){return e!=null&&!on.has(e)?(E(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Jt}"`),null):e}function cn(e,t){let n,r,i,a,o;if(Zt(e)){let o=e.getAttribute(`action`);r=o?xe(o,t):null,n=e.getAttribute(`method`)||qt,i=sn(e.getAttribute(`enctype`))||Jt,a=new FormData(e)}else if(Xt(e)||Qt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?xe(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||qt,i=sn(e.getAttribute(`formenctype`))||sn(o.getAttribute(`enctype`))||Jt,a=new FormData(o,e),!an()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Yt(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=qt,r=null,i=Jt,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function ln(e,t){if(e===!1||e==null)throw Error(t)}function un(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return i.pathname=n?i.pathname.endsWith(`/`)?`${i.pathname}_.${r}`:`${i.pathname}.${r}`:i.pathname===`/`?`_root.${r}`:t&&xe(i.pathname,t)===`/`?`${Ae(t)}/_root.${r}`:`${Ae(i.pathname)}.${r}`,i}async function dn(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function fn(e){return e!=null&&typeof e.page==`string`}function pn(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function mn(e,t,n){return yn((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await dn(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(pn).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function hn(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function gn(e,t,{includeHydrateFallback:n}={}){return _n(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function _n(e){return[...new Set(e)]}function vn(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function yn(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!fn(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(vn(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function bn(){let e=v.useContext(Je);return ln(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function xn(){let e=v.useContext(Ye);return ln(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Sn=v.createContext(void 0);Sn.displayName=`FrameworkContext`;function Cn(){let e=v.useContext(Sn);return ln(e,`You must render this element inside a <HydratedRouter> element`),e}function wn(e,t){let n=v.useContext(Sn),[r,i]=v.useState(!1),[a,o]=v.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=v.useRef(null);v.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),v.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Tn(s,p),onBlur:Tn(c,m),onMouseEnter:Tn(l,p),onMouseLeave:Tn(u,m),onTouchStart:Tn(d,p)}]:[a,f,{}]:[!1,f,{}]}function Tn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function En({page:e,...t}){let n=Ze(),{nonce:r}=Cn(),{router:i}=bn(),a=v.useMemo(()=>ne(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?v.createElement(On,{page:e,matches:a,...t}):v.createElement(kn,{page:e,matches:a,...t})):null}function Dn(e){let{manifest:t,routeModules:n}=Cn(),[r,i]=v.useState([]);return v.useEffect(()=>{let r=!1;return mn(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function On({page:e,matches:t,...n}){let r=ft(),{future:i}=Cn(),{basename:a}=bn(),o=v.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=un(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return v.createElement(v.Fragment,null,o.map(e=>v.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function kn({page:e,matches:t,...n}){let r=ft(),{future:i,manifest:a,routeModules:o}=Cn(),{basename:s}=bn(),{loaderData:c,matches:l}=xn(),u=v.useMemo(()=>hn(e,t,l,a,r,`data`),[e,t,l,a,r]),d=v.useMemo(()=>hn(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=v.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];t&&t.hasLoader&&(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=un(e,s,i.v8_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.v8_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=v.useMemo(()=>gn(d,a),[d,a]),m=Dn(d);return v.createElement(v.Fragment,null,f.map(e=>v.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>v.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>v.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function An(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}v.Component;var jn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{jn&&(window.__reactRouterVersion=`7.18.5`)}catch{}function Mn({basename:e,children:t,useTransitions:n,window:r}){let i=v.useRef();i.current??=w({window:r,v5Compat:!0});let a=i.current,[o,s]=v.useState({action:a.action,location:a.location}),c=v.useCallback(e=>{n===!1?s(e):v.startTransition(()=>s(e))},[n]);return v.useLayoutEffect(()=>a.listen(c),[a,c]),v.createElement(Wt,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}var Nn=v.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:_}=v.useContext(tt),b=typeof l==`string`&&y.test(l),x=Re(l,h);l=x.to;let S=ut(l,{relative:r}),C=ft(),w=null;if(o){let e=De(o,[],C.mask?C.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:ke([h,e.pathname])),w=g.createHref(e)}let[T,E,D]=wn(n,p),O=Rn(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:_});function k(t){e&&e(t),t.defaultPrevented||O(t)}let A=!(x.isExternal||i),j=v.createElement(`a`,{...p,...D,href:(A?w:void 0)||x.absoluteURL||S,onClick:A?k:e,ref:An(m,E),target:c,"data-discover":!b&&t===`render`?`true`:void 0});return T&&!b?v.createElement(v.Fragment,null,j,v.createElement(En,{page:S})):j});Nn.displayName=`Link`;var Pn=v.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=bt(a,{relative:c.relative}),d=ft(),f=v.useContext(Ye),{navigator:p,basename:m}=v.useContext(tt),h=f!=null&&Wn(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,y=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),y=y?y.toLowerCase():null,g=g.toLowerCase()),y&&m&&(y=xe(y,m)||y);let b=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,x=_===g||!r&&_.startsWith(g)&&_.charAt(b)===`/`,S=y!=null&&(y===g||!r&&y.startsWith(g)&&y.charAt(g.length)===`/`),C={isActive:x,isPending:S,isTransitioning:h},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return v.createElement(Nn,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});Pn.displayName=`NavLink`;var Fn=v.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=qt,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=v.useContext(tt),g=Hn(),_=Un(s,{relative:l}),b=o.toLowerCase()===`get`?`get`:`post`,x=typeof s==`string`&&y.test(s);return v.createElement(`form`,{ref:m,method:b,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?v.startTransition(()=>p()):p()},...p,"data-discover":!x&&e===`render`?`true`:void 0})});Fn.displayName=`Form`;function In(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ln(e){let t=v.useContext(Je);return T(t,In(e)),t}function Rn(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=ht(),d=ft(),f=bt(e,{relative:o});return v.useCallback(p=>{if(en(p,t)){p.preventDefault();let t=n===void 0?A(d)===A(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?v.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function zn(e){E(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=v.useRef(tn(e)),n=v.useRef(!1),r=ft(),i=v.useMemo(()=>nn(r.search,n.current?null:t.current),[r.search]),a=ht();return[i,v.useCallback((e,t)=>{let r=tn(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var Bn=0,Vn=()=>`__${String(++Bn)}__`;function Hn(){let{router:e}=Ln(`useSubmit`),{basename:t}=v.useContext(tt),n=Ft(),r=e.fetch,i=e.navigate;return v.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=cn(e,t);if(a.navigate===!1){let e=a.fetcherKey||Vn();await r(e,n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync})}else await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Un(e,{relative:t}={}){let{basename:n}=v.useContext(tt),r=v.useContext(rt);T(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...bt(e||`.`,{relative:t})},o=ft();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:ke([n,a.pathname])),A(a)}function Wn(e,{relative:t}={}){let n=v.useContext(Qe);T(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ln(`useViewTransitionState`),i=bt(e,{relative:t});if(!n.isTransitioning)return!1;let a=xe(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=xe(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ve(i.pathname,o)!=null||ve(i.pathname,a)!=null}var Gn=_(),Kn=class extends Error{status;constructor(e,t){super(t),this.status=e}};function qn(){return new URLSearchParams(window.location.search).get(`project`)||`default`}async function N(e,t){let{json:n,...r}=t||{},i=await fetch(e,{...r,headers:{...n===void 0?{}:{"content-type":`application/json`},"x-obzerver-project":qn(),...r.headers||{}},body:n===void 0?r.body:JSON.stringify(n),credentials:`same-origin`});if(i.status===401&&!e.startsWith(`/api/auth`)&&window.dispatchEvent(new Event(`obz:unauthorized`)),!i.ok){let e=i.statusText||`The server answered ${i.status}`;try{let t=await i.json();e=t.error||t.message||e}catch{}throw new Kn(i.status,e)}if(i.status!==204&&i.status!==202)return i.json()}function P(e,t=[]){let[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(!1),c=(0,v.useRef)(0),l=(0,v.useCallback)(async()=>{if(!e)return;let t=++c.current;s(!0);try{let n=await N(e);t===c.current&&(r(n),a(null))}catch(e){t===c.current&&a(e)}finally{t===c.current&&s(!1)}},[e]);return(0,v.useEffect)(()=>{l()},[l,...t]),(0,v.useEffect)(()=>{let e=()=>{l()};return window.addEventListener(`obz:refresh`,e),()=>window.removeEventListener(`obz:refresh`,e)},[l]),{data:n,error:i,loading:o,reload:l,setData:r}}var Jn=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),F=o(((e,t)=>{t.exports=Jn()}))(),Yn=[{id:`15m`,label:`15m`,ms:9e5},{id:`1h`,label:`1h`,ms:36e5},{id:`6h`,label:`6h`,ms:216e5},{id:`24h`,label:`24h`,ms:864e5},{id:`7d`,label:`7d`,ms:6048e5},{id:`30d`,label:`30d`,ms:2592e6}],Xn=(0,v.createContext)(null);function Zn({children:e}){let[t,n]=zn(),r=t.get(`range`)||`1h`,i=t.get(`service`)||``,a=t.get(`env`)||``,o=Number(t.get(`from`))||0,s=Number(t.get(`to`))||0,[c,l]=(0,v.useState)(0);(0,v.useEffect)(()=>{let e=()=>l(e=>e+1);return window.addEventListener(`obz:refresh`,e),()=>window.removeEventListener(`obz:refresh`,e)},[]);let[u,d]=(0,v.useState)(!0),[f,p]=(0,v.useState)(null),m=Yn.find(e=>e.id===r)?.ms??36e5;(0,v.useEffect)(()=>{if(!u||o)return;let e=setInterval(()=>l(e=>e+1),3e4);return()=>clearInterval(e)},[u,o]),(0,v.useEffect)(()=>{N(`/api/meta`).then(p).catch(()=>{})},[c]);let{from:h,to:g}=(0,v.useMemo)(()=>{if(o&&s)return{from:o,to:s};let e=Date.now();return{from:e-m,to:e}},[m,c,o,s]),_=e=>{let r=new URLSearchParams(t);for(let[t,n]of Object.entries(e))n===null||n===``?r.delete(t):r.set(t,n);n(r,{replace:!0})},y={range:o?`custom`:r,rangeMs:g-h,from:h,to:g,service:i,env:a,tick:c,live:u,meta:f,setRange:e=>_({range:e,from:null,to:null}),setService:e=>_({service:e}),setEnv:e=>_({env:e,...i&&e&&!f?.environments?.find(t=>t.id===e)?.services.includes(i)?{service:null}:{}}),setLive:d,setCustom:(e,t)=>_({from:String(Math.round(e)),to:String(Math.round(t))}),refresh:()=>l(e=>e+1),reloadMeta:()=>{N(`/api/meta`).then(p).catch(()=>{})},q:(e={})=>{let t=new URLSearchParams({from:String(h),to:String(g)});i&&t.set(`service`,i),a&&t.set(`env`,a);for(let[n,r]of Object.entries(e))r!=null&&r!==``&&t.set(n,String(r));return`?${t}`}};return(0,F.jsx)(Xn.Provider,{value:y,children:e})}var I=()=>(0,v.useContext)(Xn);function L(){let[e]=zn();return t=>{let n=new URLSearchParams(t.split(`?`)[1]||``),r=new URLSearchParams;for(let t of[`project`,`range`,`service`,`env`,`from`,`to`]){let i=e.get(t);i&&!n.has(t)&&r.set(t,i)}let i=r.toString();return i?t.includes(`?`)?`${t}&${i}`:`${t}?${i}`:t}}var Qn=`obz.mode`,$n=()=>{let e=new URLSearchParams(window.location.search).get(`mode`);if(e===`simple`||e===`advanced`){try{localStorage.setItem(Qn,e)}catch{}return e}try{let e=localStorage.getItem(Qn);return e===`simple`||e===`advanced`?e:null}catch{return null}},er=(0,v.createContext)({mode:`advanced`,setMode:()=>{}});function tr({children:e}){let t=I(),[n,r]=(0,v.useState)($n),i=n??t.meta?.defaultMode??(t.meta?`simple`:null);return(0,v.useEffect)(()=>{i&&(document.documentElement.dataset.mode=i)},[i]),(0,F.jsx)(er.Provider,{value:{mode:i,setMode:e=>{r(e);try{localStorage.setItem(Qn,e)}catch{}}},children:e})}var nr=()=>(0,v.useContext)(er);function rr(){let{setMode:e}=nr(),t=ht(),n=L();return r=>{e(`advanced`),t(n(r))}}function ir(e){window.dispatchEvent(new CustomEvent(`obz:ask`,{detail:{question:e}}))}var ar=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),or=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),sr={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},cr=(0,v.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,v.createElement)(`svg`,{ref:c,...sr,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:or(`lucide`,i),...s},[...o.map(([e,t])=>(0,v.createElement)(e,t)),...Array.isArray(a)?a:[a]])),R=(e,t)=>{let n=(0,v.forwardRef)(({className:n,...r},i)=>(0,v.createElement)(cr,{ref:i,iconNode:t,className:or(`lucide-${ar(e)}`,n),...r}));return n.displayName=`${e}`,n},lr=R(`Activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),ur=R(`ArrowDown`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),dr=R(`ArrowLeft`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),fr=R(`ArrowRight`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),pr=R(`ArrowUp`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),mr=R(`BellRing`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M22 8c0-2.3-.8-4.3-2-6`,key:`5bb3ad`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}],[`path`,{d:`M4 2C2.8 3.7 2 5.7 2 8`,key:`tap9e0`}]]),hr=R(`Bell`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),gr=R(`Bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),_r=R(`Box`,[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`,key:`hh9hay`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`,key:`g66t2b`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}]]),vr=R(`Boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),yr=R(`Braces`,[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]]),br=R(`Bug`,[[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M9 7.13v-1a3.003 3.003 0 1 1 6 0v1`,key:`d7y7pr`}],[`path`,{d:`M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6`,key:`xs1cw7`}],[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M6.53 9C4.6 8.8 3 7.1 3 5`,key:`32zzws`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`M3 21c0-2.1 1.7-3.9 3.8-4`,key:`4p0ekp`}],[`path`,{d:`M20.97 5c0 2.1-1.6 3.8-3.5 4`,key:`18gb23`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M17.2 17c2.1.1 3.8 1.9 3.8 4`,key:`k3fwyw`}]]),xr=R(`Building2`,[[`path`,{d:`M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z`,key:`1b4qmf`}],[`path`,{d:`M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2`,key:`i71pzd`}],[`path`,{d:`M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2`,key:`10jefs`}],[`path`,{d:`M10 6h4`,key:`1itunk`}],[`path`,{d:`M10 10h4`,key:`tcdvrf`}],[`path`,{d:`M10 14h4`,key:`kelpxr`}],[`path`,{d:`M10 18h4`,key:`1ulq68`}]]),Sr=R(`CalendarRange`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`path`,{d:`M3 10h18`,key:`8toen8`}],[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M17 14h-6`,key:`bkmgh3`}],[`path`,{d:`M13 18H7`,key:`bb0bb7`}],[`path`,{d:`M7 14h.01`,key:`1qa3f1`}],[`path`,{d:`M17 18h.01`,key:`1bdyru`}]]),Cr=R(`ChartColumn`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]]),wr=R(`ChartLine`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`m19 9-5 5-4-4-3 3`,key:`2osh9i`}]]),Tr=R(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Er=R(`ChevronDown`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Dr=R(`ChevronLeft`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),Or=R(`ChevronRight`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),kr=R(`ChevronUp`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Ar=R(`ChevronsUpDown`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),jr=R(`CircleAlert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),Mr=R(`CircleCheck`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Nr=R(`CircleDot`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}]]),Pr=R(`ClipboardList`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),Fr=R(`ClipboardPlus`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M9 14h6`,key:`159ibu`}],[`path`,{d:`M12 17v-6`,key:`1y8rbf`}]]),Ir=R(`Clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`polyline`,{points:`12 6 12 12 16 14`,key:`68esgv`}]]),Lr=R(`CodeXml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),Rr=R(`Copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),zr=R(`Cpu`,[[`rect`,{width:`16`,height:`16`,x:`4`,y:`4`,rx:`2`,key:`14l7u7`}],[`rect`,{width:`6`,height:`6`,x:`9`,y:`9`,rx:`1`,key:`5aljv4`}],[`path`,{d:`M15 2v2`,key:`13l42r`}],[`path`,{d:`M15 20v2`,key:`15mkzm`}],[`path`,{d:`M2 15h2`,key:`1gxd5l`}],[`path`,{d:`M2 9h2`,key:`1bbxkp`}],[`path`,{d:`M20 15h2`,key:`19e6y8`}],[`path`,{d:`M20 9h2`,key:`19tzq7`}],[`path`,{d:`M9 2v2`,key:`165o2o`}],[`path`,{d:`M9 20v2`,key:`i2bqo8`}]]),Br=R(`Database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),Vr=R(`ExternalLink`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),Hr=R(`EyeOff`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Ur=R(`FolderKanban`,[[`path`,{d:`M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z`,key:`1fr9dc`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M12 10v2`,key:`hh53o1`}],[`path`,{d:`M16 10v6`,key:`1d6xys`}]]),Wr=R(`Gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),Gr=R(`GitBranch`,[[`line`,{x1:`6`,x2:`6`,y1:`3`,y2:`15`,key:`17qcm7`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`path`,{d:`M18 9a9 9 0 0 1-9 9`,key:`n2h4wq`}]]),Kr=R(`Globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),qr=R(`HeartPulse`,[[`path`,{d:`M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z`,key:`c3ymky`}],[`path`,{d:`M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27`,key:`1uw2ng`}]]),Jr=R(`History`,[[`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`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),Yr=R(`Inbox`,[[`polyline`,{points:`22 12 16 12 14 15 10 15 8 12 2 12`,key:`o97t9d`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}]]),Xr=R(`Info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),Zr=R(`KeyRound`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),Qr=R(`Layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),$r=R(`LayoutDashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),ei=R(`LifeBuoy`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m4.93 4.93 4.24 4.24`,key:`1ymg45`}],[`path`,{d:`m14.83 9.17 4.24-4.24`,key:`1cb5xl`}],[`path`,{d:`m14.83 14.83 4.24 4.24`,key:`q42g0n`}],[`path`,{d:`m9.17 14.83-4.24 4.24`,key:`bqpfvv`}],[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}]]),ti=R(`Link2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),ni=R(`ListTodo`,[[`rect`,{x:`3`,y:`5`,width:`6`,height:`6`,rx:`1`,key:`1defrl`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`M13 6h8`,key:`15sg57`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 18h8`,key:`oe0vm4`}]]),ri=R(`LoaderCircle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ii=R(`Lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),ai=R(`Mail`,[[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}],[`path`,{d:`m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7`,key:`1ocrg3`}]]),oi=R(`Megaphone`,[[`path`,{d:`m3 11 18-5v12L3 14v-3z`,key:`n962bs`}],[`path`,{d:`M11.6 16.8a3 3 0 1 1-5.8-1.6`,key:`1yl0tm`}]]),si=R(`Minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),ci=R(`MonitorSmartphone`,[[`path`,{d:`M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8`,key:`10dyio`}],[`path`,{d:`M10 19v-3.96 3.15`,key:`1irgej`}],[`path`,{d:`M7 19h5`,key:`qswx4l`}],[`rect`,{width:`6`,height:`10`,x:`16`,y:`12`,rx:`2`,key:`1egngj`}]]),li=R(`Moon`,[[`path`,{d:`M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z`,key:`a7tn18`}]]),ui=R(`Network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),di=R(`OctagonAlert`,[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z`,key:`1fd625`}]]),fi=R(`Pause`,[[`rect`,{x:`14`,y:`4`,width:`4`,height:`16`,rx:`1`,key:`zuxfzm`}],[`rect`,{x:`6`,y:`4`,width:`4`,height:`16`,rx:`1`,key:`1okwgv`}]]),pi=R(`Pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),mi=R(`Play`,[[`polygon`,{points:`6 3 20 12 6 21 6 3`,key:`1oa8hb`}]]),hi=R(`PlugZap`,[[`path`,{d:`M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z`,key:`goz73y`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`path`,{d:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m18 3-4 4h6l-4 4`,key:`16psg9`}]]),gi=R(`Plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M9 8V2`,key:`14iosj`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z`,key:`osxo6l`}]]),_i=R(`Plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),vi=R(`PowerOff`,[[`path`,{d:`M18.36 6.64A9 9 0 0 1 20.77 15`,key:`dxknvb`}],[`path`,{d:`M6.16 6.16a9 9 0 1 0 12.68 12.68`,key:`1x7qb5`}],[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),yi=R(`Radio`,[[`path`,{d:`M4.9 19.1C1 15.2 1 8.8 4.9 4.9`,key:`1vaf9d`}],[`path`,{d:`M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5`,key:`u1ii0m`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}],[`path`,{d:`M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5`,key:`1j5fej`}],[`path`,{d:`M19.1 4.9C23 8.8 23 15.1 19.1 19`,key:`10b0cb`}]]),bi=R(`RefreshCw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),xi=R(`Rocket`,[[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z`,key:`m3kijz`}],[`path`,{d:`m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z`,key:`1fmvmk`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0`,key:`1f8sc4`}],[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}]]),Si=R(`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`}]]),Ci=R(`RotateCw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),wi=R(`Route`,[[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}],[`path`,{d:`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`,key:`1d8sl`}],[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}]]),Ti=R(`ScrollText`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),Ei=R(`Search`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`path`,{d:`m21 21-4.3-4.3`,key:`1qie3q`}]]),Di=R(`Send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),Oi=R(`Server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),ki=R(`Settings`,[[`path`,{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`,key:`1qme2f`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Ai=R(`ShieldAlert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),ji=R(`ShieldCheck`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Mi=R(`Slack`,[[`rect`,{width:`3`,height:`8`,x:`13`,y:`2`,rx:`1.5`,key:`diqz80`}],[`path`,{d:`M19 8.5V10h1.5A1.5 1.5 0 1 0 19 8.5`,key:`183iwg`}],[`rect`,{width:`3`,height:`8`,x:`8`,y:`14`,rx:`1.5`,key:`hqg7r1`}],[`path`,{d:`M5 15.5V14H3.5A1.5 1.5 0 1 0 5 15.5`,key:`76g71w`}],[`rect`,{width:`8`,height:`3`,x:`14`,y:`13`,rx:`1.5`,key:`1kmz0a`}],[`path`,{d:`M15.5 19H14v1.5a1.5 1.5 0 1 0 1.5-1.5`,key:`jc4sz0`}],[`rect`,{width:`8`,height:`3`,x:`2`,y:`8`,rx:`1.5`,key:`1omvl4`}],[`path`,{d:`M8.5 5H10V3.5A1.5 1.5 0 1 0 8.5 5`,key:`16f3cl`}]]),Ni=R(`SlidersHorizontal`,[[`line`,{x1:`21`,x2:`14`,y1:`4`,y2:`4`,key:`obuewd`}],[`line`,{x1:`10`,x2:`3`,y1:`4`,y2:`4`,key:`1q6298`}],[`line`,{x1:`21`,x2:`12`,y1:`12`,y2:`12`,key:`1iu8h1`}],[`line`,{x1:`8`,x2:`3`,y1:`12`,y2:`12`,key:`ntss68`}],[`line`,{x1:`21`,x2:`16`,y1:`20`,y2:`20`,key:`14d8ph`}],[`line`,{x1:`12`,x2:`3`,y1:`20`,y2:`20`,key:`m0wm8r`}],[`line`,{x1:`14`,x2:`14`,y1:`2`,y2:`6`,key:`14e1ph`}],[`line`,{x1:`8`,x2:`8`,y1:`10`,y2:`14`,key:`1i6ji0`}],[`line`,{x1:`16`,x2:`16`,y1:`18`,y2:`22`,key:`1lctlv`}]]),Pi=R(`Smile`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 14s1.5 2 4 2 4-2 4-2`,key:`1y1vjs`}],[`line`,{x1:`9`,x2:`9.01`,y1:`9`,y2:`9`,key:`yxxnd0`}],[`line`,{x1:`15`,x2:`15.01`,y1:`9`,y2:`9`,key:`1p4y9e`}]]),Fi=R(`Sparkles`,[[`path`,{d:`M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z`,key:`4pj2yx`}],[`path`,{d:`M20 3v4`,key:`1olli1`}],[`path`,{d:`M22 5h-4`,key:`1gvqau`}],[`path`,{d:`M4 17v2`,key:`vumght`}],[`path`,{d:`M5 18H3`,key:`zchphs`}]]),Ii=R(`Square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),Li=R(`Target`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),Ri=R(`Trash2`,[[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6`,key:`4alrt4`}],[`path`,{d:`M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2`,key:`v07s0e`}],[`line`,{x1:`10`,x2:`10`,y1:`11`,y2:`17`,key:`1uufr5`}],[`line`,{x1:`14`,x2:`14`,y1:`11`,y2:`17`,key:`xtxkd`}]]),zi=R(`TrendingDown`,[[`polyline`,{points:`22 17 13.5 8.5 8.5 13.5 2 7`,key:`1r2t7k`}],[`polyline`,{points:`16 17 22 17 22 11`,key:`11uiuu`}]]),Bi=R(`TrendingUp`,[[`polyline`,{points:`22 7 13.5 15.5 8.5 10.5 2 17`,key:`126l90`}],[`polyline`,{points:`16 7 22 7 22 13`,key:`kwv8wd`}]]),Vi=R(`TriangleAlert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Hi=R(`Unlink`,[[`path`,{d:`m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71`,key:`yqzxt4`}],[`path`,{d:`m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71`,key:`4qinb0`}],[`line`,{x1:`8`,x2:`8`,y1:`2`,y2:`5`,key:`1041cp`}],[`line`,{x1:`2`,x2:`5`,y1:`8`,y2:`8`,key:`14m1p5`}],[`line`,{x1:`16`,x2:`16`,y1:`19`,y2:`22`,key:`rzdirn`}],[`line`,{x1:`19`,x2:`22`,y1:`16`,y2:`16`,key:`ox905f`}]]),Ui=R(`Users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`path`,{d:`M16 3.13a4 4 0 0 1 0 7.75`,key:`1da9ce`}]]),Wi=R(`WandSparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),Gi=R(`Workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),Ki=R(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),qi=R(`Zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),Ji={logs:{label:`Logs`,from:`Pro`,what:`Every log line your apps write, searchable and linked to the request that wrote it.`},alerts:{label:`Alerts`,from:`Pro`,what:`Rules that watch error rates, latency, silence and more, and tell you by email, Slack or webhook.`},slos:{label:`SLOs`,from:`Scale`,what:`Service level objectives with error budgets and burn-rate alerts.`}};function Yi(e){if(e==null)return`—`;let t=(e,t)=>`${+e.toFixed(e<10&&e%1||e<100&&e%1?1:0)}${t}`;return e>=1e9?t(e/1e9,`B`):e>=1e6?t(e/1e6,`M`):e>=1e3?t(e/1e3,`k`):String(Math.round(e))}var Xi=e=>e==null?`—`:e>0&&e<1?`<1%`:`${Math.floor(e)}%`;function Zi({feature:e,children:t}){let{meta:n}=I(),r=L();if(!n?.usage||n.usage.features[e])return(0,F.jsx)(F.Fragment,{children:t});let i=Ji[e];return(0,F.jsxs)(`div`,{className:`max-w-[560px] mx-auto mt-16 card p-7 flex flex-col items-center text-center gap-3`,children:[(0,F.jsx)(`span`,{className:`w-11 h-11 rounded-xl grid place-items-center bg-[#1d1d27]`,children:(0,F.jsx)(ii,{size:20,className:`text-mute`})}),(0,F.jsxs)(`h1`,{className:`text-[19px] font-semibold tracking-tight`,children:[i.label,` aren't in the `,n.usage.name,` plan`]}),(0,F.jsxs)(`p`,{className:`text-ink2 text-[13.5px] leading-relaxed`,children:[i.what,` They come with `,(0,F.jsx)(`b`,{className:`text-ink`,children:i.from}),` and up.`]}),(0,F.jsxs)(Nn,{to:r(`/usage`),className:`btn btn-primary h-9 mt-1`,children:[`See plans `,(0,F.jsx)(fr,{size:14})]})]})}var Qi={unlimited:{label:`No limit`,tone:`neutral`},ok:{label:`Within allowance`,tone:`good`},paced:{label:`Paced today`,tone:`warn`},reduced:{label:`Reduced detail`,tone:`serious`},refused:{label:`Refusing new data`,tone:`crit`},overage:{label:`In overage`,tone:`warn`},paused:{label:`Overage paused`,tone:`serious`}};function $i(){let{meta:e}=I(),t=L(),n=e?.usage;if(!n||![`paced`,`reduced`,`refused`,`paused`].includes(n.state))return null;let r=n.state===`refused`;return(0,F.jsxs)(Nn,{to:t(`/usage`),className:`flex items-center gap-2 px-5 h-9 text-[12.5px] border-b border-line ${r?`bg-[rgba(208,59,59,.14)]`:`bg-[rgba(250,178,25,.09)]`} hover:brightness-125`,children:[(0,F.jsx)(Vi,{size:14,style:{color:r?`#f07070`:`#fab219`}}),(0,F.jsx)(`b`,{className:`font-medium`,children:Qi[n.state].label}),(0,F.jsx)(`span`,{className:`text-ink2 truncate`,children:n.reason}),(0,F.jsxs)(`span`,{className:`ml-auto flex items-center gap-1 text-ink2 shrink-0`,children:[(0,F.jsx)(Wr,{size:13}),`Usage`]})]})}function ea({used:e,included:t,thresholds:n=[],height:r=10}){if(!t)return null;let i=e/t*100,a=Math.max(100,Math.ceil(i/50)*50),o=i>=100?`#ec835a`:i>=80?`#fab219`:`#3ccf7a`;return(0,F.jsxs)(`div`,{className:`relative w-full rounded-full bg-[#1d1d27]`,style:{height:r},role:`meter`,"aria-valuenow":Math.round(i),"aria-valuemin":0,"aria-valuemax":100,"aria-label":`Events used this month`,children:[(0,F.jsx)(`div`,{className:`absolute inset-y-0 left-0 rounded-full`,style:{width:`${Math.min(100,i/a*100)}%`,background:o}}),a>100&&(0,F.jsx)(`div`,{className:`absolute -inset-y-1 w-[2px] bg-ink`,style:{left:`${100/a*100}%`},title:`Allowance`}),n.filter(e=>e<=a).map(e=>(0,F.jsx)(`div`,{className:`absolute -bottom-1 w-[2px] h-[4px] bg-mute`,style:{left:`calc(${e/a*100}% - 1px)`},title:`Notify at ${e}%`},e))]})}function ta(e,t){let n=[],r=/(`[^`]+`)|(\*\*[^*]+\*\*)|(\*[^*\s][^*]*\*)|(\[[^\]]+\]\([^)\s]+\))/g,i=0,a,o=0;for(;a=r.exec(e);){a.index>i&&n.push(e.slice(i,a.index));let r=a[0],s=`${t}-${o++}`;if(a[1])n.push((0,F.jsx)(`code`,{className:`mono text-[12px] px-1 py-px rounded bg-[#1d1d27] text-ink`,children:r.slice(1,-1)},s));else if(a[2])n.push((0,F.jsx)(`strong`,{className:`font-semibold text-ink`,children:ta(r.slice(2,-2),s)},s));else if(a[3])n.push((0,F.jsx)(`em`,{children:r.slice(1,-1)},s));else{let e=/^\[([^\]]+)\]\(([^)\s]+)\)$/.exec(r),t=e[2],i=/^(https?:\/\/|\/(?!\/))/.test(t);n.push(i?(0,F.jsx)(`a`,{className:`link`,href:t,target:t.startsWith(`/`)?void 0:`_blank`,rel:`noreferrer`,children:e[1]},s):e[1])}i=a.index+r.length}return i<e.length&&n.push(e.slice(i)),n}function na({text:e}){let t=e.replace(/\r/g,``).split(`
12
- `),n=[],r=0,i=0;for(;r<t.length;){let e=t[r],a=`b${i++}`;if(/^```/.test(e)){let e=[];for(r++;r<t.length&&!/^```/.test(t[r]);)e.push(t[r++]);r++,n.push((0,F.jsx)(`pre`,{className:`code !my-0 whitespace-pre-wrap`,dir:`ltr`,children:e.join(`
13
- `)},a));continue}let o=/^(#{1,4})\s+(.*)$/.exec(e);if(o){n.push((0,F.jsx)(`div`,{className:`font-semibold text-ink text-[13.5px] mt-1`,children:ta(o[2],a)},a)),r++;continue}if(/^\s*([-*]|\d+[.)])\s+/.test(e)){let i=/^\s*\d/.test(e),o=[];for(;r<t.length&&/^\s*([-*]|\d+[.)])\s+/.test(t[r]);)o.push(t[r++].replace(/^\s*([-*]|\d+[.)])\s+/,``));let s=i?`ol`:`ul`;n.push((0,F.jsx)(s,{className:`${i?`list-decimal`:`list-disc`} ps-5 flex flex-col gap-1`,children:o.map((e,t)=>(0,F.jsx)(`li`,{children:ta(e,`${a}-${t}`)},t))},a));continue}if(!e.trim()){r++;continue}let s=[];for(;r<t.length&&t[r].trim()&&!/^(```|#{1,4}\s|\s*([-*]|\d+[.)])\s+)/.test(t[r]);)s.push(t[r++]);n.push((0,F.jsx)(`p`,{children:s.map((e,t)=>(0,F.jsxs)(v.Fragment,{children:[t>0&&(0,F.jsx)(`br`,{}),ta(e,`${a}-${t}`)]},t))},a))}return(0,F.jsx)(`div`,{className:`flex flex-col gap-2 leading-relaxed`,dir:`auto`,children:n})}var ra=[`What changed since yesterday?`,`Why is the API slower this week?`,`Which endpoint spends the most time in the database?`,`Are Redis timeouts related to checkout errors?`,`Which release was the most stable this month?`,`Find problems I haven't noticed yet`],ia=[`Is my app healthy right now?`,`What broke today?`,`What changed since yesterday?`,`What should I fix first?`,`Is my latest deploy OK?`,`Which page is the slowest for my users?`],aa={list_services:`Listed applications`,get_overview:`Read the overview`,list_operations:`Ranked operations`,get_operation:`Opened an operation`,list_slow_executions:`Found the slowest executions`,list_failed_executions:`Found failed executions`,get_execution:`Opened an execution`,get_trace:`Opened a trace`,get_agent_prompt:`Built an investigation brief`,list_error_groups:`Listed error groups`,get_error_details:`Opened an error group`,get_error_trend:`Checked an error trend`,search_logs:`Searched logs`,list_functions:`Read the Services view`,list_queries:`Ranked database queries`,get_runtime:`Read runtime metrics`,list_releases:`Listed releases`,get_release_verdict:`Compared a release`,list_alerts:`Read alerts`,list_issues:`Read issues`,verify_fix:`Checked a fix`,list_slos:`Read SLOs`,get_status_pages:`Read status pages`,get_service_map:`Read the service map`,get_health:`Checked overall health`,get_baseline:`Checked what is normal`,list_secret_leaks:`Checked for leaked secrets`,get_history:`Read long-term history`},oa=e=>e>=43200?`Last ${Math.round(e/1440)} days`:e>=1440?e===1440?`Last 24 hours`:`Last ${Math.round(e/1440)} days`:e>=60?`Last ${Math.round(e/60)} hour${e>=120?`s`:``}`:`Last ${e} min`,sa=e=>Object.entries(e).filter(([,e])=>e!=null&&e!==``).map(([e,t])=>`${e}: ${typeof t==`string`?t:JSON.stringify(t)}`).join(` · `),ca=()=>`obz.ask.${qn()}`,la=()=>{try{return JSON.parse(sessionStorage.getItem(ca())||`[]`).map(e=>({...e,running:!1}))}catch{return[]}},ua=e=>{try{sessionStorage.setItem(ca(),JSON.stringify(e.slice(-20)))}catch{}};function da({open:e,onClose:t,pending:n,onPending:r,simple:i}){let a=P(e?`/api/settings/ai`:null,[e]),[o,s]=(0,v.useState)(la),c=I(),[l,u]=(0,v.useState)(``),d=(0,v.useRef)(null),f=(0,v.useRef)(null),p=(0,v.useRef)(null),m=o.some(e=>e.running);(0,v.useEffect)(()=>{ua(o)},[o]),(0,v.useEffect)(()=>{e&&setTimeout(()=>p.current?.focus(),50)},[e]),(0,v.useEffect)(()=>{f.current?.scrollTo({top:f.current.scrollHeight,behavior:`smooth`})},[o]),(0,v.useEffect)(()=>{e&&n&&a.data&&!m&&(a.data.configured&&g(n),r?.())},[e,n,a.data,m]);let h=e=>s(t=>t.map((n,r)=>r===t.length-1?e(n):n));async function g(e){let t=e.trim();if(!t||m)return;u(``);let n=o.filter(e=>e.answer).slice(-4).flatMap(e=>[{role:`user`,text:e.question},{role:`assistant`,text:e.answer.summary}]);s(e=>[...e,{question:t,steps:[],notes:[],running:!0,started:Date.now()}]);let r=new AbortController;d.current=r;try{let e=await fetch(`/api/ai/ask`,{method:`POST`,credentials:`same-origin`,signal:r.signal,headers:{"content-type":`application/json`,"x-obzerver-project":qn()},body:JSON.stringify({question:t,history:n,mode:i?`simple`:`advanced`})});if(!e.ok||!e.body){let t=e.statusText;try{t=(await e.json()).error||t}catch{}throw Error(t)}let a=e.body.getReader(),o=new TextDecoder,s=``;for(;;){let{value:e,done:t}=await a.read();if(t)break;s+=o.decode(e,{stream:!0});let n;for(;(n=s.indexOf(`
14
-
15
- `))>=0;){let e=s.slice(0,n);if(s=s.slice(n+2),!e.startsWith(`data: `))continue;let t=JSON.parse(e.slice(6));t.type===`step`?h(e=>({...e,steps:[...e.steps,{id:t.id,tool:t.tool,input:t.input}]})):t.type===`step_done`?h(e=>({...e,steps:e.steps.map(e=>e.id===t.id?{...e,done:{ok:t.ok,summary:t.summary,ms:t.ms}}:e)})):t.type===`note`?h(e=>({...e,notes:[...e.notes,t.text]})):t.type===`answer`?h(e=>({...e,answer:t.answer})):t.type===`error`?h(e=>({...e,error:t.message})):t.type===`usage`&&h(e=>({...e,usage:{tokens:t.tokens,steps:t.steps,capped:t.capped,cost:t.cost??null}}))}}}catch(e){r.signal.aborted?h(e=>({...e,error:e.answer?void 0:`Stopped.`})):h(t=>({...t,error:e.message}))}finally{h(e=>({...e,running:!1,ended:Date.now()})),d.current=null,c.reloadMeta()}}if(!e)return null;let _=a.data?.configured,y=c.meta?.aiBlocked??null;return(0,F.jsxs)(`aside`,{className:`fixed top-0 right-0 bottom-0 w-[480px] max-w-[100vw] z-40 flex flex-col bg-[#0f0f15] border-l border-line2 shadow-2xl`,"aria-label":`Ask Obzeri`,children:[(0,F.jsxs)(`div`,{className:`h-[52px] shrink-0 flex items-center gap-2 px-4 border-b border-line`,children:[(0,F.jsx)(Fi,{size:16,className:`text-brand`}),(0,F.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,F.jsx)(`div`,{className:`font-semibold text-[14px] leading-tight`,children:`Ask Obzeri`}),(0,F.jsx)(`div`,{className:`text-[11px] text-mute truncate`,children:_?`Answers from this project's telemetry · ${a.data?.model}`:`Not set up`})]}),o.length>0&&(0,F.jsx)(`button`,{className:`btn btn-ghost h-7 px-2`,title:`New chat`,onClick:()=>{d.current?.abort(),s([])},children:(0,F.jsx)(_i,{size:14})}),(0,F.jsx)(`button`,{className:`btn btn-ghost h-7 px-2`,title:`Close (Esc)`,onClick:t,children:(0,F.jsx)(Ki,{size:15})})]}),(0,F.jsxs)(`div`,{ref:f,className:`flex-1 overflow-y-auto px-4 py-4 flex flex-col gap-5`,children:[a.data&&!_&&(0,F.jsx)(fa,{onClose:t}),_&&o.length===0&&(0,F.jsxs)(`div`,{className:`flex flex-col gap-4 mt-2`,children:[(0,F.jsx)(`div`,{className:`text-ink2 text-[13px] leading-relaxed`,children:i?`Ask anything about your app, in your own words and any language. Obzeri reads your app's data to answer, and shows where every answer comes from.`:`Ask about your apps in plain language, in any language. Obzeri answers only by reading this project's data with the same tools as the MCP server, and shows where every answer comes from.`}),(0,F.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:(i?ia:ra).map(e=>(0,F.jsxs)(`button`,{className:`text-left rounded-lg border border-line hover:border-line2 hover:bg-panel2 px-3 py-2 text-[12.8px] text-ink2 hover:text-ink flex items-center gap-2`,onClick:()=>g(e),children:[(0,F.jsx)(Fi,{size:12,className:`text-mute shrink-0`}),e]},e))})]}),o.map((e,t)=>(0,F.jsx)(pa,{turn:e,onAsk:g,last:t===o.length-1},t))]}),_&&(0,F.jsxs)(`div`,{className:`shrink-0 border-t border-line p-3`,children:[y&&(0,F.jsx)(`div`,{className:`mb-2 rounded-lg border border-[#5a4320] bg-[#1d1810] px-3 py-2 text-[12px] text-[#f5c04e]`,children:y}),(0,F.jsxs)(`form`,{className:`relative`,onSubmit:e=>{e.preventDefault(),g(l)},children:[(0,F.jsx)(`textarea`,{ref:p,dir:`auto`,rows:Math.min(6,Math.max(2,l.split(`
16
- `).length)),className:`input w-full resize-none !h-auto py-2 pe-11 leading-snug`,placeholder:y?`Paused: budget used`:`Ask about errors, latency, releases, jobs…`,disabled:!!y,value:l,onChange:e=>u(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),g(l))}}),m?(0,F.jsx)(`button`,{type:`button`,className:`absolute right-2 bottom-2 btn h-7 w-7 !p-0 justify-center`,title:`Stop`,onClick:()=>d.current?.abort(),children:(0,F.jsx)(Ii,{size:12,fill:`currentColor`})}):(0,F.jsx)(`button`,{className:`absolute right-2 bottom-2 btn btn-primary h-7 w-7 !p-0 justify-center`,title:`Send (Enter)`,disabled:!l.trim(),children:(0,F.jsx)(pr,{size:14})})]}),(0,F.jsxs)(`div`,{className:`text-[10.5px] text-mute mt-1.5 leading-snug`,children:[`Your question and the data the tools return are sent to `,a.data?.provider===`openai`?`your OpenAI-compatible endpoint`:`Anthropic`,`. Enter to send, Shift+Enter for a new line.`]})]})]})}function fa({onClose:e}){let t=ht(),n=L();return(0,F.jsxs)(`div`,{className:`flex flex-col gap-3 mt-2 text-[13px]`,children:[(0,F.jsx)(`div`,{className:`text-ink2 leading-relaxed`,children:`Ask Obzeri needs a language model. Connect Anthropic (Claude) or any OpenAI-compatible endpoint, including a local model through Ollama, and it will answer questions from this project's telemetry.`}),(0,F.jsx)(`div`,{children:(0,F.jsxs)(`button`,{className:`btn btn-primary`,onClick:()=>{e(),t(n(`/integrations/ai`))},children:[`Set up Ask Obzeri`,(0,F.jsx)(Or,{size:13})]})})]})}function pa({turn:e,onAsk:t,last:n}){let[r,i]=(0,v.useState)(!1),a=((e.ended??Date.now())-e.started)/1e3,o=r||e.running&&!e.answer;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-2.5`,children:[(0,F.jsx)(`div`,{className:`self-end max-w-[88%] rounded-xl rounded-br-sm bg-[#22222e] px-3 py-2 text-[13px] whitespace-pre-wrap`,dir:`auto`,children:e.question}),(e.steps.length>0||e.running)&&(0,F.jsxs)(`div`,{className:`rounded-lg border border-line bg-[#121219]`,children:[(0,F.jsxs)(`button`,{className:`w-full flex items-center gap-2 px-3 py-2 text-[12px] text-ink2 hover:text-ink`,onClick:()=>i(e=>!e),children:[e.running&&!e.answer?(0,F.jsx)(`span`,{className:`w-3 h-3 rounded-full border-2 border-brand border-t-transparent animate-spin`}):(0,F.jsx)(Tr,{size:13,className:`text-[#5fd38a]`}),(0,F.jsx)(`span`,{className:`flex-1 text-left`,children:e.running&&!e.answer?e.steps.length?(aa[e.steps.at(-1).tool]||e.steps.at(-1).tool)+`…`:`Thinking…`:`Read ${e.steps.length} source${e.steps.length===1?``:`s`} · ${a.toFixed(1)}s${e.usage?` · ${ma(e.usage)}`:``}`}),(0,F.jsx)(Or,{size:13,className:`transition-transform ${o?`rotate-90`:``}`})]}),o&&(0,F.jsxs)(`div`,{className:`px-3 pb-2.5 flex flex-col gap-1.5 border-t border-line pt-2`,children:[e.notes.map((e,t)=>(0,F.jsx)(`div`,{className:`text-[12px] text-mute italic`,dir:`auto`,children:e},`n${t}`)),e.steps.map(e=>(0,F.jsxs)(`div`,{className:`flex items-start gap-2 text-[12px]`,children:[(0,F.jsx)(`span`,{className:`mt-[3px] shrink-0`,children:e.done?e.done.ok?(0,F.jsx)(Tr,{size:11,className:`text-[#5fd38a]`}):(0,F.jsx)(Vi,{size:11,className:`text-[#ffb547]`}):(0,F.jsx)(`span`,{className:`block w-2.5 h-2.5 rounded-full border-2 border-mute border-t-transparent animate-spin`})}),(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,F.jsxs)(`div`,{className:`text-ink2`,children:[aa[e.tool]||e.tool,` `,(0,F.jsx)(`span`,{className:`mono text-mute text-[11px]`,children:e.tool})]}),sa(e.input)&&(0,F.jsx)(`div`,{className:`mono text-[11px] text-mute break-all`,children:sa(e.input)})]}),e.done&&(0,F.jsxs)(`span`,{className:`text-mute text-[11px] shrink-0`,children:[e.done.summary,` · `,e.done.ms,`ms`]})]},e.id))]})]}),e.answer&&(0,F.jsx)(ya,{a:e.answer,onAsk:t,showFollowUps:n&&!e.running}),e.error&&!e.answer&&(0,F.jsx)(`div`,{className:`rounded-lg border border-[#5a2a2a] bg-[#1d1214] px-3 py-2 text-[12.5px] text-[#ff9c9c]`,dir:`auto`,children:e.error})]})}function ma(e){return`${Yi(e.tokens.input+e.tokens.output)} tokens${e.cost==null?``:` · $${e.cost<.01?e.cost.toFixed(4):e.cost.toFixed(2)}`}${e.capped?` · stopped at the limit`:``}`}var ha={high:{label:`High confidence`,color:`#5fd38a`},medium:{label:`Medium confidence`,color:`#ffb547`},low:{label:`Low confidence`,color:`#ff8a8a`}},ga={execution:lr,trace:Gr,error:br,operation:lr,release:xi,issue:ni};function _a(e){let t=encodeURIComponent;switch(e.kind){case`execution`:return`/executions/${t(e.ref)}`;case`trace`:return`/traces/${t(e.ref)}`;case`error`:return`/errors/${t(e.ref)}`;case`operation`:return`/operations/${e.opKind||`http`}/${t(e.service||``)}/${t(e.ref)}`;case`release`:return`/releases?service=${t(e.service||``)}&version=${t(e.ref)}`;case`issue`:return`/issues/${t(e.ref)}`}}function va({title:e,icon:t,children:n}){return(0,F.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[10.5px] uppercase tracking-wider text-mute font-medium`,children:[t,e]}),n]})}function ya({a:e,onAsk:t,showFollowUps:n}){let r=ht(),i=L(),a=ha[e.confidence];return(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)(`div`,{className:`text-[13.3px] text-ink`,children:(0,F.jsx)(na,{text:e.summary})}),(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,F.jsxs)(`span`,{className:`pill !text-[11px] inline-flex items-center gap-1.5`,title:e.confidenceReason,style:{borderColor:`${a.color}55`,color:a.color},children:[(0,F.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full`,style:{background:a.color}}),a.label]}),e.timeRange&&(0,F.jsxs)(`span`,{className:`pill !text-[11px] inline-flex items-center gap-1`,title:`${new Date(e.timeRange.from).toLocaleString()} → ${new Date(e.timeRange.to).toLocaleString()}`,children:[(0,F.jsx)(Ir,{size:11}),oa(e.timeRange.minutes)]})]}),(0,F.jsx)(`div`,{className:`text-[11.5px] text-mute -mt-1.5`,dir:`auto`,children:e.confidenceReason}),e.evidence.length>0&&(0,F.jsx)(va,{title:`Evidence`,icon:(0,F.jsx)(ji,{size:11}),children:(0,F.jsx)(`div`,{className:`rounded-lg border border-line divide-y divide-[#22222c]`,children:e.evidence.map((e,t)=>(0,F.jsxs)(`div`,{className:`px-3 py-1.5 flex items-baseline gap-3 text-[12.3px]`,children:[(0,F.jsx)(`span`,{className:`flex-1 text-ink2`,dir:`auto`,children:e.claim}),(0,F.jsx)(`span`,{className:`mono text-ink text-[12px] text-right`,dir:`auto`,children:e.value})]},t))})}),e.links.length>0&&(0,F.jsx)(va,{title:`Open in Obzerver`,icon:(0,F.jsx)(ti,{size:11}),children:(0,F.jsx)(`div`,{className:`flex flex-col gap-1`,children:e.links.map((e,t)=>{let n=ga[e.kind];return(0,F.jsxs)(`button`,{onClick:()=>r(i(_a(e))),className:`flex items-center gap-2 rounded-md border border-line hover:border-line2 hover:bg-panel2 px-2.5 py-1.5 text-left text-[12.3px]`,children:[(0,F.jsx)(n,{size:13,className:`text-mute shrink-0`}),(0,F.jsx)(`span`,{className:`text-mute text-[11px] w-[62px] shrink-0`,children:e.kind}),(0,F.jsx)(`span`,{className:`flex-1 truncate`,dir:`auto`,children:e.label}),(0,F.jsx)(Or,{size:12,className:`text-mute`})]},t)})})}),(0,F.jsx)(va,{title:`Data sources`,icon:(0,F.jsx)(lr,{size:11}),children:(0,F.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:e.sources.length?e.sources.map(e=>(0,F.jsxs)(`span`,{className:`pill mono !text-[10.5px]`,title:aa[e.tool],children:[e.tool,e.calls>1?` ×${e.calls}`:``]},e.tool)):(0,F.jsx)(`span`,{className:`text-mute text-[12px]`,children:`none: this answer did not read any data`})})}),e.checks.length>0&&(0,F.jsxs)(`div`,{className:`text-[11.5px] text-[#ffb547] flex items-start gap-1.5`,children:[(0,F.jsx)(Vi,{size:12,className:`mt-0.5 shrink-0`}),(0,F.jsxs)(`span`,{children:[`Checked by Obzerver: `,e.checks.join(` `)]})]}),n&&e.followUps.length>0&&(0,F.jsx)(`div`,{className:`flex flex-wrap gap-1.5 pt-1`,children:e.followUps.map(e=>(0,F.jsx)(`button`,{className:`rounded-full border border-line hover:border-line2 hover:bg-panel2 px-2.5 py-1 text-[12px] text-ink2 hover:text-ink`,dir:`auto`,onClick:()=>t(e),children:e},e))})]})}function ba(e,t=`/`,n){let r=new URLSearchParams;e!=="default"&&r.set(`project`,e);let i=n?.get(`range`);i&&r.set(`range`,i);let a=r.toString();return a?`${t}?${a}`:t}function xa(){let[e]=zn(),t=ht(),n=e.get(`project`)||`default`,{data:r}=P(`/api/projects`,[n]),[i,a]=(0,v.useState)(!1),o=(0,v.useRef)(null);(0,v.useEffect)(()=>{let e=e=>{o.current&&!o.current.contains(e.target)&&a(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let s=r?.find(e=>e.slug===n),c=e=>{a(!1),t(e)};return(0,F.jsxs)(`div`,{ref:o,className:`relative px-2 pt-2`,children:[(0,F.jsxs)(`button`,{className:`w-full flex items-center gap-2 h-[34px] px-2 rounded-md border border-line hover:border-line2 bg-[#121219] text-left`,onClick:()=>a(e=>!e),"aria-haspopup":`listbox`,"aria-expanded":i,children:[(0,F.jsx)(Ur,{size:14,className:`text-mute shrink-0`}),(0,F.jsxs)(`span`,{className:`flex-1 min-w-0`,children:[(0,F.jsx)(`span`,{className:`block text-[10px] uppercase tracking-wider text-mute leading-none mb-0.5`,children:`Project`}),(0,F.jsx)(`span`,{className:`block truncate text-[12.8px] leading-tight`,children:s?.name??(r?n:`…`)})]}),(0,F.jsx)(Ar,{size:13,className:`text-mute shrink-0`})]}),i&&(0,F.jsxs)(`div`,{className:`absolute left-2 right-2 top-[calc(100%+4px)] z-30 rounded-lg border border-line2 bg-[#15151d] shadow-xl py-1`,role:`listbox`,children:[r?.map(t=>(0,F.jsxs)(`button`,{role:`option`,"aria-selected":t.slug===n,onClick:()=>c(ba(t.slug,`/`,e)),className:`w-full flex items-center gap-2 px-2.5 py-1.5 text-left hover:bg-[#1d1d27]`,children:[(0,F.jsx)(`span`,{className:`w-3.5 shrink-0`,children:t.slug===n&&(0,F.jsx)(Tr,{size:13,className:`text-brand`})}),(0,F.jsxs)(`span`,{className:`flex-1 min-w-0`,children:[(0,F.jsx)(`span`,{className:`block truncate text-[12.8px]`,children:t.name}),(0,F.jsxs)(`span`,{className:`block text-mute text-[11px]`,children:[t.apps,` app`,t.apps===1?``:`s`]})]})]},t.slug)),(0,F.jsx)(`div`,{className:`border-t border-line my-1`}),(0,F.jsxs)(`button`,{onClick:()=>c(`${ba(n,`/projects`,e)}${n==="default"&&!e.get(`range`)?`?`:`&`}new=1`),className:`w-full flex items-center gap-2 px-2.5 py-1.5 text-left hover:bg-[#1d1d27] text-[12.8px]`,children:[(0,F.jsx)(_i,{size:13,className:`ml-0.5`}),`New project`]}),(0,F.jsxs)(`button`,{onClick:()=>c(ba(n,`/projects`,e)),className:`w-full flex items-center gap-2 px-2.5 py-1.5 text-left hover:bg-[#1d1d27] text-[12.8px] text-ink2`,children:[(0,F.jsx)(`span`,{className:`w-3.5`}),`Manage projects`]})]})]})}function z(e,t){return e==null||!Number.isFinite(e)?`—`:e>=6e4?`${(e/6e4).toFixed(1)}m`:e>=1e3?`${(e/1e3).toFixed(e>=1e4?1:2)}s`:e>=100?`${e.toFixed(t??0)}ms`:e>=10?`${e.toFixed(t??1)}ms`:`${e.toFixed(t??2)}ms`}function B(e){return e==null||!Number.isFinite(e)?`—`:Math.abs(e)>=1e6?`${(e/1e6).toFixed(1)}M`:Math.abs(e)>=1e4?`${(e/1e3).toFixed(1)}k`:Number.isInteger(e)?e.toLocaleString():e.toLocaleString(void 0,{maximumFractionDigits:2})}function Sa(e,t=2){return e==null||!Number.isFinite(e)?`—`:e===0?`0%`:e<.01?`<0.01%`:`${e.toFixed(e>=10?1:t)}%`}function Ca(e){return e==null?`—`:e>=1073741824?`${(e/1073741824).toFixed(2)} GB`:e>=1048576?`${(e/1048576).toFixed(0)} MB`:`${(e/1024).toFixed(0)} KB`}function wa(e){if(!e)return`—`;let t=Date.now()-e;return t<0?`just now`:t<6e4?`${Math.max(1,Math.round(t/1e3))}s ago`:t<36e5?`${Math.round(t/6e4)}m ago`:t<864e5?`${Math.round(t/36e5)}h ago`:`${Math.round(t/864e5)}d ago`}function Ta(e){return new Date(e).toLocaleString(void 0,{weekday:`short`,year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1,timeZoneName:`short`})}function Ea(e,t=!1){let n=new Date(e),r=n.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1});return t?`${n.toLocaleDateString([],{month:`short`,day:`numeric`})} ${r}`:r}function Da(e,t){let n=new Date(e);return t>1728e5?n.toLocaleDateString([],{month:`short`,day:`numeric`}):n.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,hour12:!1})}function Oa(e,t){if(e==null||t==null||!Number.isFinite(e)||!Number.isFinite(t)||t===0)return null;let n=(e-t)/t*100;return Math.abs(n)<1?{text:`±0%`,dir:`flat`}:{text:`${n>0?`+`:``}${n.toFixed(0)}%`,dir:n>0?`up`:`down`}}var ka=encodeURIComponent,Aa=(e,t)=>`/tenants/${ka(e)}${t?`?guessed=1`:``}`,ja=864e5,Ma=e=>new Date(e-new Date(e).getTimezoneOffset()*6e4).toISOString().slice(0,16),Na=e=>e?new Date(e).getTime():NaN,Pa=e=>{let t=new Date(e);return t.setHours(0,0,0,0),t.getTime()};function Fa(){let e=I(),[t,n]=(0,v.useState)(!1),[r,i]=(0,v.useState)(``),[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(``),l=(0,v.useRef)(null);(0,v.useEffect)(()=>{if(!t)return;i(Ma(e.from)),o(Ma(e.to)),c(``);let r=e=>{l.current&&!l.current.contains(e.target)&&n(!1)},a=e=>{e.key===`Escape`&&n(!1)};return window.addEventListener(`mousedown`,r),window.addEventListener(`keydown`,a),()=>{window.removeEventListener(`mousedown`,r),window.removeEventListener(`keydown`,a)}},[t]);let u=(t,r)=>{if(!Number.isFinite(t)||!Number.isFinite(r))return c(`Pick both dates`);if(r<=t)return c(`"To" must be after "From"`);e.setCustom(t,Math.min(r,Date.now())),n(!1)},d=Date.now(),f=Pa(d),p=[[`Today`,f,d],[`Yesterday`,f-ja,f],[`Same day last week`,f-7*ja,f-6*ja],[`Last 14 days`,d-14*ja,d],[`Last 30 days`,d-30*ja,d],[`Last 90 days`,d-90*ja,d]],m=e.range===`custom`;return(0,F.jsxs)(`div`,{className:`relative`,ref:l,children:[m?(0,F.jsxs)(`div`,{className:`flex items-center gap-1 pill !h-[30px] !px-2.5 !text-[12px] cursor-pointer`,style:{borderColor:`#5a2340`,color:`#ff9cc0`},onClick:()=>n(e=>!e),title:`Change the custom window`,children:[(0,F.jsx)(Sr,{size:12}),Ea(e.from,!0),` → `,Ea(e.to,!0),(0,F.jsx)(`button`,{className:`ml-1 hover:text-white`,onClick:t=>{t.stopPropagation(),e.setRange(`1h`)},title:`Back to live window`,children:(0,F.jsx)(Ki,{size:12})})]}):(0,F.jsx)(`button`,{className:`btn px-2`,onClick:()=>n(e=>!e),title:`Custom time window`,"aria-label":`Custom time window`,children:(0,F.jsx)(Sr,{size:13})}),t&&(0,F.jsxs)(`div`,{className:`absolute right-0 top-[36px] z-50 w-[340px] rounded-lg border border-line2 p-3 shadow-2xl flex flex-col gap-3`,style:{background:`rgba(20,20,27,.99)`},children:[(0,F.jsx)(`div`,{className:`text-[12px] font-medium`,children:`Custom window`}),(0,F.jsx)(`div`,{className:`grid grid-cols-2 gap-1.5`,children:p.map(([e,t,n])=>(0,F.jsx)(`button`,{className:`btn h-7 justify-start text-[12px]`,onClick:()=>u(t,n),children:e},e))}),(0,F.jsxs)(`div`,{className:`grid grid-cols-[40px_1fr] items-center gap-x-2 gap-y-1.5 text-[12px]`,children:[(0,F.jsx)(`label`,{className:`text-mute`,htmlFor:`rp-from`,children:`From`}),(0,F.jsx)(`input`,{id:`rp-from`,className:`input h-8 mono text-[12px]`,type:`datetime-local`,value:r,max:Ma(d),onChange:e=>i(e.target.value)}),(0,F.jsx)(`label`,{className:`text-mute`,htmlFor:`rp-to`,children:`To`}),(0,F.jsx)(`input`,{id:`rp-to`,className:`input h-8 mono text-[12px]`,type:`datetime-local`,value:a,max:Ma(d),onChange:e=>o(e.target.value)})]}),s&&(0,F.jsx)(`div`,{className:`text-[12px]`,style:{color:`#ff8a8a`},children:s}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,F.jsx)(`span`,{className:`text-mute text-[11px] leading-snug`,children:`Older than raw data, Requests, Jobs and the Overview use hourly summaries.`}),(0,F.jsx)(`button`,{className:`btn btn-primary h-7 shrink-0`,onClick:()=>u(Na(r),Na(a)),children:`Apply`})]})]})]})}function V({title:e,sub:t,right:n,children:r,className:i=``,pad:a=!0}){return(0,F.jsxs)(`section`,{className:`card ${i}`,children:[(e||n)&&(0,F.jsxs)(`div`,{className:`card-h`,children:[(0,F.jsxs)(`div`,{className:`flex items-baseline gap-2 min-w-0`,children:[(0,F.jsx)(`span`,{className:`truncate`,children:e}),t&&(0,F.jsx)(`span`,{className:`card-sub truncate`,children:t})]}),n]}),(0,F.jsx)(`div`,{className:a?`p-3.5`:``,children:r})]})}function Ia({title:e,sub:t,right:n,icon:r}){return(0,F.jsxs)(`div`,{className:`flex items-end justify-between gap-4 mb-4`,children:[(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsxs)(`h1`,{className:`text-[19px] font-semibold tracking-tight flex items-center gap-2 min-w-0`,children:[r,(0,F.jsx)(`span`,{className:`truncate`,children:e})]}),t&&(0,F.jsx)(`div`,{className:`text-ink2 mt-1 text-[12.5px]`,children:t})]}),n&&(0,F.jsx)(`div`,{className:`flex items-center gap-2 shrink-0`,children:n})]})}function H({label:e}){return(0,F.jsxs)(`div`,{className:`flex items-center justify-center gap-2 text-mute py-10`,children:[(0,F.jsx)(ri,{size:16,className:`animate-spin`}),e||`Loading…`]})}function U({title:e,children:t,icon:n}){return(0,F.jsxs)(`div`,{className:`flex flex-col items-center justify-center text-center py-10 px-6 gap-2`,children:[(0,F.jsx)(`div`,{className:`text-mute`,children:n||(0,F.jsx)(Yr,{size:22})}),(0,F.jsx)(`div`,{className:`font-medium`,children:e}),t&&(0,F.jsx)(`div`,{className:`text-mute max-w-md text-[12.5px]`,children:t})]})}var La=()=>window.dispatchEvent(new Event(`obz:refresh`));function Ra({error:e,onRetry:t}){return e?(0,F.jsxs)(`div`,{className:`card px-4 py-10 text-[12.5px] flex flex-col items-center justify-center gap-3 text-center`,role:`alert`,style:{borderColor:`#5a2328`,color:`#ff9b9b`},children:[(0,F.jsx)(Vi,{size:20}),(0,F.jsx)(`div`,{className:`max-w-[560px]`,children:e.message||`Something went wrong loading this.`}),(0,F.jsxs)(`button`,{type:`button`,className:`btn mt-1`,onClick:t??La,children:[(0,F.jsx)(bi,{size:13}),`Refresh stats`]})]}):null}function za({label:e,value:t,sub:n,deltaText:r,deltaDir:i,deltaTitle:a,badWhen:o=`up`,spark:s,color:c,onClick:l}){return(0,F.jsxs)(`div`,{className:`card px-3.5 py-3 flex flex-col gap-1 min-w-0 transition-colors ${l?`card-click`:``}`,onClick:l,role:l?`button`:void 0,tabIndex:l?0:void 0,onKeyDown:l?e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),l())}:void 0,children:[(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px] font-medium flex items-center justify-between gap-2`,children:[(0,F.jsx)(`span`,{className:`truncate`,children:e}),r&&(0,F.jsxs)(`span`,{className:`flex items-center gap-0.5 text-[11px]`,title:a,style:{color:i===`flat`||o===`none`?`var(--color-mute)`:i&&i!==`flat`&&o!==`none`&&i===o?`#ff8a8a`:`#5fd38a`},children:[i===`up`?(0,F.jsx)(pr,{size:11}):i===`down`?(0,F.jsx)(ur,{size:11}):null,r]})]}),(0,F.jsxs)(`div`,{className:`flex items-end justify-between gap-2`,children:[(0,F.jsx)(`div`,{className:`text-[22px] font-semibold tracking-tight tabular-nums leading-none`,style:c?{color:c}:void 0,children:t}),s&&s.length>1&&(0,F.jsx)(Ba,{data:s,color:c})]}),n&&(0,F.jsx)(`div`,{className:`text-mute text-[11px] truncate`,children:n})]})}function Ba({data:e,color:t=`var(--color-s1)`,w:n=72,h:r=22}){let i=Math.max(1,...e),a=n/e.length;return(0,F.jsx)(`svg`,{width:n,height:r,className:`shrink-0`,"aria-hidden":!0,children:e.map((e,n)=>{let o=e?Math.max(1.5,e/i*r):0;return(0,F.jsx)(`rect`,{x:n*a+.5,y:r-o,width:Math.max(1,a-1),height:o,rx:1,fill:t,opacity:.85},n)})})}function Va({status:e}){if(e==null)return(0,F.jsx)(`span`,{className:`text-mute`,children:`—`});let t=e>=500?`var(--color-crit)`:e>=400?`var(--color-warn)`:`var(--color-good)`;return(0,F.jsx)(`span`,{className:`mono text-[11.5px] px-1.5 py-[1px] rounded`,style:{color:t,background:`color-mix(in srgb, ${t} 14%, transparent)`},children:e})}function Ha({m:e}){if(!e)return null;let t=eo;return(0,F.jsx)(`span`,{className:`mono text-[10.5px] font-semibold inline-block shrink-0 ${to.includes(e)?`min-w-[44px] pr-2`:`w-[44px]`}`,style:{color:t[e]||`var(--color-ink2)`},children:e})}function Ua({name:e,render:t}){let n=/^(GET|POST|PUT|PATCH|DELETE|HEAD|OPTIONS|ALL|QUERY|MUTATION|SUBSCRIPTION)\s+(.*)$/.exec(e),r=t??(e=>e);return n?(0,F.jsxs)(`span`,{className:`inline-flex items-center min-w-0`,children:[(0,F.jsx)(Ha,{m:n[1]}),(0,F.jsx)(`span`,{className:`mono truncate`,children:r(n[2])})]}):(0,F.jsx)(`span`,{className:`mono`,children:r(e)})}function W({kind:e,children:t}){let[n,r]={good:[`var(--color-good)`,Mr],warn:[`var(--color-warn)`,jr],serious:[`var(--color-serious)`,jr],crit:[`var(--color-crit)`,jr],neutral:[`var(--color-mute)`,Nr]}[e];return(0,F.jsxs)(`span`,{className:`pill`,style:{color:n,borderColor:`color-mix(in srgb, ${n} 40%, transparent)`,background:`color-mix(in srgb, ${n} 10%, transparent)`},children:[(0,F.jsx)(r,{size:11}),t]})}function Wa({text:e,label:t=`Copy`,className:n=`btn`}){let[r,i]=(0,v.useState)(!1);return(0,F.jsxs)(`button`,{className:n,onClick:async()=>{let t=typeof e==`function`?await e():e;try{await navigator.clipboard.writeText(t)}catch{let e=document.createElement(`textarea`);e.value=t,document.body.appendChild(e),e.select(),document.execCommand(`copy`),e.remove()}i(!0),setTimeout(()=>i(!1),1400)},children:[r?(0,F.jsx)(Tr,{size:13}):(0,F.jsx)(Rr,{size:13}),r?`Copied`:t]})}function Ga({value:e,options:t,onChange:n}){return(0,F.jsx)(`div`,{className:`seg`,children:t.map(t=>(0,F.jsx)(`button`,{className:e===t.id?`on`:``,onClick:()=>n(t.id),children:t.label},t.id))})}function Ka({rows:e,cols:t,onRow:n,initialSort:r,initialDir:i=`desc`,empty:a,maxHeight:o,rowKey:s,paged:c,resetKey:l,noun:u=`rows`}){let[d,f]=(0,v.useState)(r),[p,m]=(0,v.useState)(i),[h,g]=Ja(),[_,y]=(0,v.useState)(0),[b,x]=(0,v.useState)(l);b!==l&&(x(l),y(0));let S=(0,v.useRef)(null),C=(0,v.useRef)(null);(0,v.useLayoutEffect)(()=>{let t=S.current;if(!c||!t||t.style.tableLayout===`fixed`)return;let n=[...t.querySelectorAll(`thead th`)];t.querySelectorAll(`tbody tr:not(.filler)`).length>=Math.min(h,e.length)&&e.length>0&&n.length&&(C.current=n.map(e=>e.getBoundingClientRect().width))});let[w,T]=(0,v.useState)(41),E=e=>{if(e){let t=e.getBoundingClientRect().height;t>0&&Math.abs(t-w)>.5&&T(t)}},D=e=>{g(e),y(0)},O=(0,v.useMemo)(()=>{let n=t.find(e=>e.key===d);if(!n||!n.sort)return e;let r=n.sort;return[...e].sort((e,t)=>{let n=r(e),i=r(t),a=typeof n==`number`&&typeof i==`number`?n-i:String(n).localeCompare(String(i));return p===`asc`?a:-a})},[e,t,d,p]);if(!e.length&&a&&!c)return(0,F.jsx)(F.Fragment,{children:a});let k=c?Math.max(1,Math.ceil(O.length/h)):1,A=Math.min(_,k-1),j=c?O.slice(A*h,A*h+h):O,ee=c?k>1?h:Math.min(h,qa.find(e=>e>=j.length)??h):0,te=Math.max(0,ee-j.length),ne=c&&te>0&&C.current&&C.current.length===t.length?C.current:null;return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`overflow-auto`,style:o?{maxHeight:o}:void 0,children:(0,F.jsxs)(`table`,{className:`tbl`,ref:S,style:ne?{tableLayout:`fixed`,width:ne.reduce((e,t)=>e+t,0)}:void 0,children:[ne&&(0,F.jsx)(`colgroup`,{children:ne.map((e,t)=>(0,F.jsx)(`col`,{style:{width:e}},t))}),(0,F.jsx)(`thead`,{children:(0,F.jsx)(`tr`,{children:t.map(e=>(0,F.jsx)(`th`,{style:{width:e.width},className:`${e.num?`num`:``} ${e.sort?`cursor-pointer select-none hover:text-ink`:``}`,onClick:()=>{e.sort&&(y(0),d===e.key?m(p===`asc`?`desc`:`asc`):(f(e.key),m(`desc`)))},children:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-0.5`,children:[e.label,d===e.key&&(p===`asc`?(0,F.jsx)(kr,{size:11}):(0,F.jsx)(Er,{size:11}))]})},e.key))})}),(0,F.jsxs)(`tbody`,{children:[j.map((e,r)=>(0,F.jsx)(`tr`,{ref:r===0?E:void 0,className:n?`clickable`:``,onClick:n?()=>n(e):void 0,children:t.map(t=>(0,F.jsx)(`td`,{className:`${t.num?`num`:``} ${t.className||``}`,children:t.render(e)},t.key))},s?s(e,r):r)),te>0&&(0,F.jsx)(`tr`,{"aria-hidden":j.length>0,className:`filler`,children:(0,F.jsx)(`td`,{colSpan:t.length,style:{height:te*w,padding:0,borderBottom:`none`},children:!j.length&&(0,F.jsx)(`div`,{className:`h-full flex items-center justify-center`,children:a??(0,F.jsx)(U,{title:`No ${u}`})})})})]})]})}),c&&(0,F.jsx)(Ya,{total:O.length,page:A,size:h,onPage:y,onSize:D,noun:u})]})}var qa=[10,20,50];function Ja(){let[e,t]=(0,v.useState)(()=>{try{let e=Number(localStorage.getItem(`obz.pageSize`));return qa.includes(e)?e:20}catch{return 20}});return[e,e=>{t(e);try{localStorage.setItem(`obz.pageSize`,String(e))}catch{}}]}function Ya({total:e,page:t,size:n,onPage:r,onSize:i,noun:a=`rows`}){let o=Math.max(1,Math.ceil(e/n));return(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-3 pt-3 pb-1 text-[12px] text-mute`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`span`,{children:`Rows per page`}),(0,F.jsx)(`div`,{className:`seg`,role:`group`,"aria-label":`Rows per page`,children:qa.map(e=>(0,F.jsx)(`button`,{type:`button`,className:e===n?`on`:``,"aria-pressed":e===n,onClick:()=>i(e),children:e},e))})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,F.jsx)(`span`,{className:`tabular-nums`,children:e?`${Xa(t*n+1)}–${Xa(Math.min(e,(t+1)*n))} of ${Xa(e)}`:`0 ${a}`}),(0,F.jsx)(`button`,{type:`button`,className:`btn h-7`,disabled:t===0,onClick:()=>r(t-1),children:`Prev`}),(0,F.jsx)(`button`,{type:`button`,className:`btn h-7`,disabled:t>=o-1,onClick:()=>r(t+1),children:`Next`})]})]})}var Xa=e=>e.toLocaleString(`en-US`);function Za({value:e,max:t,color:n=`var(--color-s1)`,w:r=80}){return(0,F.jsx)(`span`,{className:`inline-block align-middle rounded-full overflow-hidden`,style:{width:r,height:5,background:`#22222c`},children:(0,F.jsx)(`span`,{className:`block h-full rounded-full`,style:{width:`${Math.min(100,e/Math.max(t,1e-9)*100)}%`,background:n}})})}function Qa({items:e}){return(0,F.jsx)(`dl`,{className:`grid grid-cols-[max-content_1fr] gap-x-4 gap-y-1.5 text-[12.5px]`,children:e.map(([e,t],n)=>(0,F.jsxs)(v.Fragment,{children:[(0,F.jsx)(`dt`,{className:`text-mute`,children:e}),(0,F.jsx)(`dd`,{className:`min-w-0 truncate`,children:t})]},n))})}function $a({open:e,onClose:t,title:n,children:r,wide:i}){return e?(0,F.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center pt-[8vh] px-4`,style:{background:`rgba(5,5,8,.7)`},onMouseDown:t,children:(0,F.jsxs)(`div`,{className:`card w-full ${i?`max-w-3xl`:`max-w-lg`} shadow-2xl`,onMouseDown:e=>e.stopPropagation(),children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-3 border-b border-line`,children:[(0,F.jsx)(`div`,{className:`font-semibold`,children:n}),(0,F.jsx)(`button`,{className:`btn btn-ghost h-7 px-2`,onClick:t,children:`✕`})]}),(0,F.jsx)(`div`,{className:`p-4 max-h-[75vh] overflow-auto`,children:r})]})}):null}function G({label:e,children:t,hint:n}){return(0,F.jsxs)(`label`,{className:`flex flex-col gap-1 text-[12px]`,children:[(0,F.jsx)(`span`,{className:`text-ink2 font-medium`,children:e}),t,n&&(0,F.jsx)(`span`,{className:`text-mute text-[11px]`,children:n})]})}var eo={GET:`#5aa2f0`,POST:`#3fbf8f`,PUT:`#e0a33a`,PATCH:`#c99af0`,DELETE:`#f07070`,QUERY:`#e86fc4`,MUTATION:`#f0a35a`,SUBSCRIPTION:`#6fc8e8`},to=[`QUERY`,`MUTATION`,`SUBSCRIPTION`];function no({tip:e,children:t,className:n=``,underline:r=`always`}){let[i,a]=(0,v.useState)(null),o=(0,v.useRef)(null);return(0,v.useLayoutEffect)(()=>{let e=o.current;if(!e||!i)return;let t=e.offsetWidth,n=Math.min(Math.max(i.x-t/2,8),window.innerWidth-t-8);e.style.left=`${n}px`,e.style.visibility=`visible`},[i]),(0,F.jsxs)(`span`,{className:`cursor-help decoration-dotted underline-offset-4 ${r===`always`?`underline decoration-[#55556a]`:`hover:underline decoration-[#8a8aa0]`} ${n}`,onMouseEnter:e=>{let t=e.currentTarget.getBoundingClientRect();a({x:t.left+t.width/2,y:t.top})},onMouseLeave:()=>a(null),children:[t,i&&(0,F.jsx)(`span`,{ref:o,role:`tooltip`,className:`mono fixed z-[100] -translate-y-full rounded-md border border-[#2c2c36] px-2.5 py-1.5 text-[11.5px] text-ink whitespace-nowrap shadow-2xl pointer-events-none`,style:{left:i.x,top:i.y-6,background:`rgba(17,17,22,.97)`,visibility:`hidden`},children:e})]})}function ro({ts:e,className:t=``,empty:n=`—`}){return e?(0,F.jsx)(no,{tip:Ta(e),underline:`hover`,className:t,children:wa(e)}):(0,F.jsx)(F.Fragment,{children:n})}function io(e){let t=e.toLowerCase();return/^(prod|production|live|prd)$/.test(t)?`#3ccf7a`:/^(stag|staging|stage|preprod|pre-prod|uat|qa|test|testing)$/.test(t)?`#f5c04e`:/^(dev|development|local|sandbox|preview)$/.test(t)?`#7fb2f0`:`#a3a3b8`}function ao({className:e=``,tall:t,short:n}){let r=I(),i=r.meta?.environments??[];return i.length<2&&!r.env?null:(0,F.jsxs)(`div`,{className:`relative shrink-0 ${e}`,children:[(0,F.jsx)(`span`,{className:`absolute left-2.5 top-1/2 -translate-y-1/2 w-2 h-2 rounded-full pointer-events-none`,style:{background:r.env?io(r.env):`transparent`,border:r.env?`none`:`1.5px solid #5c5c70`}}),(0,F.jsxs)(`select`,{className:`select !pl-6 ${t?`h-8`:``}`,value:r.env,onChange:e=>r.setEnv(e.target.value),"aria-label":`Environment`,title:`Environment`,children:[(0,F.jsx)(`option`,{value:``,children:n?`All envs`:`All environments`}),i.map(e=>(0,F.jsx)(`option`,{value:e.id,children:e.id},e.id)),r.env&&!i.some(e=>e.id===r.env)&&(0,F.jsx)(`option`,{value:r.env,children:r.env})]})]})}function oo(){let e=I(),t=e.meta?.services??[];if(!e.env)return t;let n=new Set(e.meta?.environments?.find(t=>t.id===e.env)?.services??[]);return t.filter(e=>n.has(e.id))}var so={pg:`PostgreSQL`,mysql2:`MySQL`,ioredis:`Redis`,bullmq:`BullMQ`,"node-cron":`cron`,cron:`cron`},co={express:{label:`Express`,color:`#f4f4f8`,bg:`rgba(244, 244, 248, .1)`},fastify:{label:`Fastify`,color:`#8fd3ff`,bg:`rgba(143, 211, 255, .12)`}};function lo(e){let[t,n]=e.split(`@`);return co[t]?{label:`${co[t].label}${n&&n!==`?`?` ${n}`:``}`,web:!0}:{label:so[t]??t,web:!1}}function uo(e){return e.filter(e=>co[e.split(`@`)[0]]).map(e=>lo(e).label).join(`, `)}function fo({frameworks:e,web:t=!1,className:n=``}){let r=new Set,i=e.map(e=>({f:e,...lo(e)})).filter(e=>(!t||e.web)&&!r.has(e.label)&&(r.add(e.label),!0)).sort((e,t)=>Number(t.web)-Number(e.web));return i.length?(0,F.jsx)(`span`,{className:`inline-flex flex-wrap items-center gap-1 ${n}`,children:i.map(e=>{let t=co[e.f.split(`@`)[0]];return(0,F.jsx)(`span`,{className:`text-[10.5px] font-semibold leading-none px-1.5 py-[3px] rounded whitespace-nowrap`,style:t?{color:t.color,background:t.bg}:{color:`#9a9ab0`,background:`rgba(154, 154, 176, .1)`,fontWeight:500},title:`Detected by the SDK: ${e.f}`,children:e.label},e.label)})}):null}function po({app:e,web:t,className:n}){let r=I().meta?.services.find(t=>t.id===e);return r?(0,F.jsx)(fo,{frameworks:r.frameworks,web:t,className:n}):null}var mo=[{items:[{to:`/`,label:`Overview`,Icon:$r,end:!0}]},{title:`Activity`,items:[{to:`/requests`,label:`Requests`,Icon:lr},{to:`/jobs`,label:`Jobs`,Icon:Gi},{to:`/traces`,label:`Traces`,Icon:Gr},{to:`/map`,label:`Service map`,Icon:ui}]},{title:`Diagnose`,items:[{to:`/errors`,label:`Errors`,Icon:br},{to:`/secrets`,label:`Secrets in logs`,Icon:Ai,badge:`secrets`},{to:`/logs`,label:`Logs`,Icon:Ti},{to:`/services`,label:`Services`,Icon:vr},{to:`/queries`,label:`Queries`,Icon:Br},{to:`/users`,label:`Users`,Icon:Ui}]},{title:`Runtime`,items:[{to:`/profiler`,label:`Profiler`,Icon:zr},{to:`/metrics`,label:`Custom metrics`,Icon:Wr},{to:`/releases`,label:`Releases`,Icon:xi}]},{title:`Respond`,items:[{to:`/alerts`,label:`Alerts`,Icon:hr,badge:`alerts`},{to:`/slos`,label:`SLOs`,Icon:Li},{to:`/status-pages`,label:`Status pages`,Icon:yi},{to:`/issues`,label:`Issues`,Icon:Pr,badge:`issues`}]}],ho={"/logs":`logs`,"/alerts":`alerts`,"/slos":`slos`};function go(e){let{meta:t}=I(),n=ho[e];return!!(n&&t?.usage&&!t.usage.features[n])}function _o({to:e}){return go(e)?(0,F.jsx)(ii,{size:12,className:`text-mute`,"aria-label":`Not in your plan`}):null}function vo({to:e,n:t,red:n}){return go(e)||!(t>0)?null:(0,F.jsx)(`span`,{className:`text-[10px] font-semibold px-1.5 rounded-full`,style:{background:n?`#d03b3b`:`#2a2a36`,color:`#fff`},children:t})}var yo=[{to:`/`,label:`Home`,hint:`Is my app healthy?`,Icon:qr,end:!0},{to:`/alerts`,label:`Alerts`,hint:`What broke, and who gets told`,Icon:hr,badge:`simpleAlerts`},{to:`/releases`,label:`Releases`,hint:`Did my last deploy make things better or worse?`,Icon:xi},{to:`/metrics`,label:`Metrics`,hint:`Traffic, speed, errors, server`,Icon:wr},{to:`/logs`,label:`Logs`,hint:`What your app printed`,Icon:Ti},{to:`/settings`,label:`Settings`,hint:`Connect your app`,Icon:ki}],bo=[{id:`1h`,label:`Last hour`},{id:`24h`,label:`Today`},{id:`7d`,label:`7 days`}];function xo({compact:e}){let{mode:t,setMode:n}=nr(),r=(r,i,a,o)=>(0,F.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":t===r,className:t===r?`on`:``,onClick:()=>n(r),title:o,children:[(0,F.jsx)(a,{size:13}),!e&&i]});return(0,F.jsxs)(`div`,{className:`mode-toggle`,role:`radiogroup`,"aria-label":`Dashboard mode`,children:[r(`simple`,`Simple`,Pi,`Simple mode: is my app healthy, what broke, what changed, what to do`),r(`advanced`,`Advanced`,Ni,`Advanced mode: every request, trace, query and runtime detail`)]})}function So({size:e=22}){let t=`obz-tile-${(0,v.useId)().replace(/:/g,``)}`;return(0,F.jsxs)(`svg`,{width:e,height:e,viewBox:`0 0 64 64`,"aria-hidden":!0,className:`shrink-0`,children:[(0,F.jsx)(`defs`,{children:(0,F.jsxs)(`linearGradient`,{id:t,x1:`0`,y1:`0`,x2:`64`,y2:`64`,gradientUnits:`userSpaceOnUse`,children:[(0,F.jsx)(`stop`,{offset:`0`,stopColor:`#ff3d7f`}),(0,F.jsx)(`stop`,{offset:`1`,stopColor:`#a855f7`})]})}),(0,F.jsx)(`rect`,{width:`64`,height:`64`,rx:`16`,fill:`url(#${t})`}),(0,F.jsx)(`path`,{d:`M7 32 H14 L20 20 H44 L20 44 H44 L50 32 H57`,fill:`none`,stroke:`#fff`,strokeWidth:e<24?5.6:4.6,strokeLinecap:`round`,strokeLinejoin:`round`})]})}var Co={ob:`M30.7 1.4L30.7 1.4Q23.3 1.4 17.4-1.7Q11.6-4.7 8.3-10.4Q4.9-16 4.9-23.9L4.9-23.9L4.9-25.5Q4.9-33.4 8.3-39.1Q11.6-44.8 17.4-47.8Q23.3-50.8 30.7-50.8L30.7-50.8Q38.1-50.8 43.9-47.8Q49.7-44.8 53.1-39.1Q56.4-33.4 56.4-25.5L56.4-25.5L56.4-23.9Q56.4-16 53.1-10.4Q49.7-4.7 43.9-1.7Q38.1 1.4 30.7 1.4ZM30.7-8.8L30.7-8.8Q37-8.8 41-12.9Q45-16.9 45-24.2L45-24.2L45-25.2Q45-32.5 41-36.6Q37-40.6 30.7-40.6L30.7-40.6Q24.4-40.6 20.4-36.6Q16.4-32.5 16.4-25.2L16.4-25.2L16.4-24.2Q16.4-16.9 20.4-12.9Q24.4-8.8 30.7-8.8ZM93.8 1.4L93.8 1.4Q86.8 1.4 83.0-1.1Q79.3-3.5 77.6-6.5L77.6-6.5L75.9-6.5L75.9 0L64.6 0L64.6-70L76.1-70L76.1-43.2L77.8-43.2Q78.9-45.2 80.8-46.9Q82.8-48.6 86.0-49.7Q89.1-50.8 93.8-50.8L93.8-50.8Q99.9-50.8 105-47.9Q110.1-44.9 113.2-39.2Q116.3-33.5 116.3-25.5L116.3-25.5L116.3-23.9Q116.3-15.9 113.2-10.2Q110.1-4.5 105.0-1.6Q99.8 1.4 93.8 1.4ZM90.4-8.6L90.4-8.6Q96.6-8.6 100.7-12.7Q104.8-16.7 104.8-24.2L104.8-24.2L104.8-25.2Q104.8-32.8 100.8-36.8Q96.7-40.8 90.4-40.8L90.4-40.8Q84.2-40.8 80.0-36.8Q75.9-32.8 75.9-25.2L75.9-25.2L75.9-24.2Q75.9-16.7 80.0-12.7Q84.2-8.6 90.4-8.6Z`,z:`M163 0L121.6 0L121.6-13.8L149.8-38.4L149.8-39.9L122.6-39.9L122.6-49.4L162.2-49.4L162.2-35.6L134-11L134-9.5L163-9.5L163 0Z`,erver:`M192.9 1.4L192.9 1.4Q185.5 1.4 179.8-1.8Q174.2-4.9 171.1-10.7Q167.9-16.4 167.9-24.1L167.9-24.1L167.9-25.3Q167.9-33.1 171-38.8Q174.1-44.5 179.7-47.7Q185.3-50.8 192.6-50.8L192.6-50.8Q199.8-50.8 205.2-47.7Q210.6-44.5 213.6-38.8Q216.6-33.1 216.6-25.5L216.6-25.5L216.6-21.4L179.5-21.4Q179.7-15.6 183.6-12.1Q187.5-8.6 193.2-8.6L193.2-8.6Q198.8-8.6 201.5-11.1Q204.2-13.5 205.6-16.6L205.6-16.6L215.1-11.7Q213.7-9 211.1-6.0Q208.4-2.9 204-0.8Q199.6 1.4 192.9 1.4ZM179.6-30.1L179.6-30.1L204.9-30.1Q204.5-35 201.2-37.9Q197.8-40.8 192.5-40.8L192.5-40.8Q187-40.8 183.7-37.9Q180.4-35 179.6-30.1ZM235.9 0L224.4 0L224.4-49.4L235.7-49.4L235.7-43.7L237.4-43.7Q238.5-46.8 241.1-48.2Q243.7-49.6 247.3-49.6L247.3-49.6L253.3-49.6L253.3-39.4L247.1-39.4Q242.1-39.4 239-36.8Q235.9-34.1 235.9-28.6L235.9-28.6L235.9 0ZM288.6 0L270.4 0L254.2-49.4L266.4-49.4L278.6-8.4L280.3-8.4L292.6-49.4L304.8-49.4L288.6 0ZM331.1 1.4L331.1 1.4Q323.7 1.4 318.1-1.8Q312.4-4.9 309.3-10.7Q306.1-16.4 306.1-24.1L306.1-24.1L306.1-25.3Q306.1-33.1 309.2-38.8Q312.3-44.5 317.9-47.7Q323.5-50.8 330.8-50.8L330.8-50.8Q338-50.8 343.4-47.7Q348.8-44.5 351.8-38.8Q354.8-33.1 354.8-25.5L354.8-25.5L354.8-21.4L317.7-21.4Q317.9-15.6 321.8-12.1Q325.7-8.6 331.4-8.6L331.4-8.6Q337-8.6 339.7-11.1Q342.4-13.5 343.8-16.6L343.8-16.6L353.3-11.7Q351.9-9 349.3-6.0Q346.6-2.9 342.2-0.8Q337.8 1.4 331.1 1.4ZM317.8-30.1L317.8-30.1L343.1-30.1Q342.7-35 339.3-37.9Q336-40.8 330.7-40.8L330.7-40.8Q325.2-40.8 321.9-37.9Q318.6-35 317.8-30.1ZM374.1 0L362.6 0L362.6-49.4L373.9-49.4L373.9-43.7L375.6-43.7Q376.7-46.8 379.3-48.2Q381.9-49.6 385.5-49.6L385.5-49.6L391.5-49.6L391.5-39.4L385.3-39.4Q380.3-39.4 377.2-36.8Q374.1-34.1 374.1-28.6L374.1-28.6L374.1 0Z`};function wo({size:e=15}){let t=Math.max(1,Math.round(e*.73*49.4/73))/49.4,n=Math.ceil(71*t),r=n+Math.ceil(1.5*t),i=Math.ceil(397*t),a=e<32?`#ff5c93`:`#ff3d7f`;return(0,F.jsxs)(`svg`,{height:r,width:i,viewBox:`-1 ${-n/t} ${i/t} ${r/t}`,role:`img`,"aria-label":`Obzerver`,className:`shrink-0 block`,children:[(0,F.jsx)(`path`,{d:Co.ob,fill:`#f4f4f8`}),(0,F.jsx)(`path`,{d:Co.z,fill:a}),(0,F.jsx)(`path`,{d:Co.erver,fill:`#f4f4f8`})]})}function To(){let{mode:e}=nr();return e?e===`simple`?(0,F.jsx)(Do,{}):(0,F.jsx)(Oo,{}):(0,F.jsx)(`div`,{className:`h-full flex items-center justify-center`,children:(0,F.jsx)(H,{})})}function Eo(){let[e,t]=(0,v.useState)(()=>{try{return sessionStorage.getItem(`obz.ask.open`)===`1`}catch{return!1}}),[n,r]=(0,v.useState)(null);return(0,v.useEffect)(()=>{try{sessionStorage.setItem(`obz.ask.open`,e?`1`:`0`)}catch{}},[e]),(0,v.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`i`?(e.preventDefault(),t(e=>!e)):e.key===`Escape`&&t(!1)},n=e=>{let n=e.detail?.question;t(!0),n&&r(n)};return window.addEventListener(`keydown`,e),window.addEventListener(`obz:ask`,n),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`obz:ask`,n)}},[]),{askOpen:e,setAskOpen:t,pending:n,clearPending:()=>r(null)}}function Do(){let e=I(),t=oo(),n=L(),{setMode:r}=nr(),{askOpen:i,setAskOpen:a,pending:o,clearPending:s}=Eo(),c=(e.meta?.unreadAlerts||0)+(e.meta?.openSecrets||0);return(0,F.jsxs)(`div`,{className:`flex h-full simple`,children:[(0,F.jsxs)(`aside`,{className:`w-[220px] shrink-0 border-r border-line flex flex-col bg-[#0e0e14]`,children:[(0,F.jsxs)(`div`,{className:`h-[56px] flex items-center gap-1.5 px-4 border-b border-line`,children:[(0,F.jsx)(So,{size:28}),(0,F.jsx)(`span`,{className:`mt-px`,children:(0,F.jsx)(wo,{size:20})})]}),(0,F.jsx)(xa,{}),(0,F.jsxs)(`nav`,{className:`flex-1 overflow-y-auto px-2.5 py-3 flex flex-col gap-1`,children:[yo.map(e=>(0,F.jsx)(Pn,{to:n(e.to),end:e.end,title:e.hint,className:({isActive:e})=>`flex items-center gap-3 h-[40px] px-3 rounded-lg text-[14px] ${e?`bg-[#1f1f2a] text-ink font-medium`:`text-ink2 hover:bg-[#16161e] hover:text-ink`}`,children:({isActive:t})=>(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(e.Icon,{size:17,style:{color:t?`#ff3d7f`:void 0}}),(0,F.jsx)(`span`,{className:`flex-1`,children:e.label}),(0,F.jsx)(_o,{to:e.to}),e.badge&&(0,F.jsx)(vo,{to:e.to,n:c,red:!0})]})},e.to)),(0,F.jsxs)(`button`,{className:`mt-2 flex items-center gap-3 h-[40px] px-3 rounded-lg text-[14px] text-ink2 hover:text-ink ask-nav`,onClick:()=>a(!0),children:[(0,F.jsx)(Fi,{size:17,className:`text-brand`}),(0,F.jsx)(`span`,{className:`flex-1 text-left`,children:`Ask Obzeri`}),(0,F.jsx)(`span`,{className:`kbd`,children:`⌘I`})]})]}),(0,F.jsx)(`div`,{className:`p-3 border-t border-line`,children:(0,F.jsxs)(`button`,{className:`w-full text-left rounded-lg border border-line hover:border-line2 bg-[#121219] px-3 py-2.5 group`,onClick:()=>r(`advanced`),children:[(0,F.jsxs)(`div`,{className:`text-[12.5px] font-medium flex items-center gap-1.5`,children:[`Need every detail? `,(0,F.jsx)(fr,{size:13,className:`text-mute group-hover:text-ink transition-transform group-hover:translate-x-0.5`})]}),(0,F.jsx)(`div`,{className:`text-[11.5px] text-mute mt-0.5 leading-snug`,children:`Advanced mode has traces, queries, the profiler, releases and more.`})]})})]}),(0,F.jsxs)(`div`,{className:`flex-1 min-w-0 flex flex-col transition-[margin] duration-150`,style:{marginRight:i?480:0},children:[(0,F.jsxs)(`header`,{className:`h-[56px] shrink-0 border-b border-line flex items-center gap-3 px-5 bg-[#0e0e14]`,children:[(0,F.jsx)(xo,{}),(0,F.jsx)(`div`,{className:`flex-1`}),(0,F.jsx)(ao,{tall:!0}),(t.length>1||e.service)&&(0,F.jsxs)(`select`,{className:`select h-8`,value:e.service,onChange:t=>e.setService(t.target.value),"aria-label":`App`,children:[(0,F.jsx)(`option`,{value:``,children:`All apps`}),t.map(e=>(0,F.jsxs)(`option`,{value:e.id,children:[e.id,uo(e.frameworks)?` · ${uo(e.frameworks)}`:``]},e.id))]}),e.service&&(0,F.jsx)(po,{app:e.service,web:!0}),i?(0,F.jsxs)(`select`,{className:`select h-8`,value:bo.some(t=>t.id===e.range)?e.range:``,onChange:t=>t.target.value&&e.setRange(t.target.value),"aria-label":`Time range`,children:[!bo.some(t=>t.id===e.range)&&(0,F.jsx)(`option`,{value:``,children:e.range===`custom`?`Custom`:e.range}),bo.map(e=>(0,F.jsx)(`option`,{value:e.id,children:e.label},e.id))]}):(0,F.jsx)(`div`,{className:`seg seg-lg`,children:bo.map(t=>(0,F.jsx)(`button`,{className:e.range===t.id?`on`:``,onClick:()=>e.setRange(t.id),children:t.label},t.id))}),(0,F.jsxs)(`button`,{className:`btn ask-btn h-8 ${i?`on px-2`:``}`,onClick:()=>a(e=>!e),title:`Ask Obzeri (⌘I / Ctrl+I)`,"aria-label":`Ask Obzeri`,"aria-pressed":i,children:[(0,F.jsx)(Fi,{size:14,className:`text-brand`}),!i&&`Ask Obzeri`]}),(0,F.jsx)(`button`,{className:`btn btn-ghost h-8 px-2`,onClick:e.refresh,title:`Refresh`,children:(0,F.jsx)(bi,{size:14})})]}),(0,F.jsx)($i,{}),(0,F.jsx)(`main`,{className:`flex-1 overflow-y-auto @container`,children:(0,F.jsx)(`div`,{className:`max-w-[1240px] mx-auto px-6 py-6`,children:(0,F.jsx)(Ht,{})})}),(0,F.jsx)(da,{open:i,onClose:()=>a(!1),pending:o,onPending:s,simple:!0})]})]})}function Oo(){let e=I(),t=oo(),n=L(),r=ht(),[i,a]=(0,v.useState)(``),{askOpen:o,setAskOpen:s,pending:c,clearPending:l}=Eo(),u={alerts:e.meta?.unreadAlerts||0,issues:e.meta?.openIssues||0,secrets:e.meta?.openSecrets||0};return(0,v.useEffect)(()=>{let e=e=>{e.key===`/`&&!(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)&&(e.preventDefault(),document.getElementById(`global-search`)?.focus())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,F.jsxs)(`div`,{className:`flex h-full`,children:[(0,F.jsxs)(`aside`,{className:`w-[214px] shrink-0 border-r border-line flex flex-col bg-[#0e0e14]`,children:[(0,F.jsxs)(`div`,{className:`h-[52px] flex items-center gap-2 px-4 border-b border-line`,children:[(0,F.jsx)(So,{size:28}),(0,F.jsxs)(`div`,{className:`flex flex-col gap-[5px]`,children:[(0,F.jsx)(wo,{size:18}),(0,F.jsx)(`div`,{className:`text-[10.5px] leading-[14px] text-mute whitespace-nowrap`,children:e.meta?.version?.includes(`-`)?`v${e.meta.version}`:`Express · Fastify${e.meta?.version?` · v${e.meta.version}`:``}`})]})]}),(0,F.jsx)(xa,{}),(0,F.jsx)(`nav`,{className:`flex-1 overflow-y-auto px-2 py-3 flex flex-col gap-4`,children:mo.map((e,t)=>(0,F.jsxs)(`div`,{children:[e.title&&(0,F.jsx)(`div`,{className:`px-2 pb-1 text-[10.5px] uppercase tracking-wider text-mute font-medium`,children:e.title}),e.items.map(e=>(0,F.jsx)(Pn,{to:n(e.to),end:e.end,className:({isActive:e})=>`flex items-center gap-2.5 h-[30px] px-2 rounded-md text-[12.8px] ${e?`bg-[#1d1d27] text-ink`:`text-ink2 hover:bg-[#16161e] hover:text-ink`}`,children:({isActive:t})=>(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(e.Icon,{size:15,style:{color:t?`#ff3d7f`:void 0}}),(0,F.jsx)(`span`,{className:`flex-1`,children:e.label}),(0,F.jsx)(_o,{to:e.to}),e.badge&&(0,F.jsx)(vo,{to:e.to,n:u[e.badge],red:e.badge===`alerts`||e.badge===`secrets`})]})},e.to))]},t))}),(0,F.jsxs)(`div`,{className:`px-2 py-2 border-t border-line flex flex-col gap-0.5`,children:[(0,F.jsxs)(Pn,{to:n(`/integrations`),className:({isActive:e})=>`flex items-center gap-2.5 h-[30px] px-2 rounded-md text-[12.8px] ${e?`bg-[#1d1d27] text-ink`:`text-ink2 hover:bg-[#16161e]`}`,children:[(0,F.jsx)(gi,{size:15}),` Integrations`]}),(0,F.jsxs)(Pn,{to:n(`/usage`),className:({isActive:e})=>`flex items-center gap-2.5 h-[30px] px-2 rounded-md text-[12.8px] ${e?`bg-[#1d1d27] text-ink`:`text-ink2 hover:bg-[#16161e]`}`,children:[(0,F.jsx)(Cr,{size:15}),` `,(0,F.jsx)(`span`,{className:`flex-1`,children:`Usage`}),(0,F.jsx)(ko,{})]}),(0,F.jsxs)(Pn,{to:n(`/settings`),className:({isActive:e})=>`flex items-center gap-2.5 h-[30px] px-2 rounded-md text-[12.8px] ${e?`bg-[#1d1d27] text-ink`:`text-ink2 hover:bg-[#16161e]`}`,children:[(0,F.jsx)(ki,{size:15}),` Setup & settings`]})]})]}),(0,F.jsxs)(`div`,{className:`flex-1 min-w-0 flex flex-col transition-[margin] duration-150`,style:{marginRight:o?480:0},children:[(0,F.jsxs)(`header`,{className:`shrink-0 border-b border-line bg-[#0e0e14]`,children:[(0,F.jsxs)(`div`,{className:`h-[52px] flex items-center gap-3 px-5`,children:[(0,F.jsx)(xo,{}),(0,F.jsxs)(`form`,{className:`relative flex-1 min-w-[200px] max-w-[560px]`,onSubmit:e=>{e.preventDefault();let t=i.trim();t&&(r(n(/^[0-9a-f]{32}$/i.test(t)?`/traces/${t.toLowerCase()}`:`/traces?q=${encodeURIComponent(t)}`)),a(``))},children:[(0,F.jsx)(Ei,{size:13,className:`absolute left-2.5 top-1/2 -translate-y-1/2 text-mute`}),(0,F.jsx)(`input`,{id:`global-search`,className:`input pl-8 pr-7 w-full`,placeholder:`Trace id, path, user, error…`,value:i,onChange:e=>a(e.target.value)}),(0,F.jsx)(`span`,{className:`kbd absolute right-2 top-1/2 -translate-y-1/2`,children:`/`})]}),(0,F.jsx)(`div`,{className:`flex-1`}),(0,F.jsxs)(`button`,{className:`btn ask-btn ${o?`on px-2`:``}`,onClick:()=>s(e=>!e),title:`Ask Obzeri (⌘I / Ctrl+I)`,"aria-label":`Ask Obzeri`,"aria-pressed":o,children:[(0,F.jsx)(Fi,{size:13,className:`text-brand`}),!o&&`Ask Obzeri`]}),(0,F.jsxs)(`button`,{className:`btn`,onClick:()=>e.setLive(!e.live),title:`Auto-refresh every 30s`,children:[(0,F.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full ${e.live&&e.range!==`custom`?`live-dot`:``}`,style:{background:e.live&&e.range!==`custom`?`#0ca30c`:`#55556a`}}),e.live&&e.range!==`custom`?`Live`:`Paused`]}),(0,F.jsx)(`button`,{className:`btn px-2`,onClick:e.refresh,title:`Refresh`,children:(0,F.jsx)(bi,{size:13})})]}),(0,F.jsxs)(`div`,{className:`h-[42px] flex items-center gap-2.5 px-5 border-t border-[#1b1b24] bg-[#0c0c11]`,children:[(0,F.jsx)(`span`,{className:`text-[11px] uppercase tracking-wider text-mute font-semibold mr-1`,children:`Showing`}),(0,F.jsx)(ao,{}),(0,F.jsxs)(`select`,{className:`select`,value:e.service,onChange:t=>e.setService(t.target.value),"aria-label":`Application`,children:[(0,F.jsx)(`option`,{value:``,children:`All applications`}),t.map(e=>(0,F.jsxs)(`option`,{value:e.id,children:[e.id,uo(e.frameworks)?` · ${uo(e.frameworks)}`:``]},e.id))]}),e.service&&(0,F.jsx)(po,{app:e.service}),(0,F.jsx)(`div`,{className:`flex-1`}),o?(0,F.jsxs)(`select`,{className:`select w-[74px]`,value:e.range===`custom`?``:e.range,onChange:t=>t.target.value&&e.setRange(t.target.value),"aria-label":`Time range`,children:[e.range===`custom`&&(0,F.jsx)(`option`,{value:``,children:`custom`}),Yn.map(e=>(0,F.jsx)(`option`,{value:e.id,children:e.label},e.id))]}):(0,F.jsx)(`div`,{className:`seg`,children:Yn.map(t=>(0,F.jsx)(`button`,{className:e.range===t.id?`on`:``,onClick:()=>e.setRange(t.id),children:t.label},t.id))}),(0,F.jsx)(Fa,{})]})]}),(0,F.jsx)($i,{}),(0,F.jsx)(`main`,{className:`flex-1 overflow-y-auto @container`,children:(0,F.jsx)(`div`,{className:`max-w-[1500px] mx-auto px-5 py-5`,children:(0,F.jsx)(Ht,{})})}),(0,F.jsx)(da,{open:o,onClose:()=>s(!1),pending:c,onPending:l})]})]})}function ko(){let{meta:e}=I(),t=e?.usage;if(!t||t.pct==null)return null;let n=t.pct>=100?`#ec835a`:t.pct>=80?`#fab219`:void 0;return(0,F.jsx)(`span`,{className:`text-[10.5px] tabular-nums text-mute`,style:n?{color:n}:void 0,children:Xi(t.pct)})}function Ao(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ao(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function K(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ao(e))&&(r&&(r+=` `),r+=t);return r}var jo=o(((e,t)=>{t.exports=Array.isArray})),Mo=o(((e,t)=>{t.exports=typeof global==`object`&&global&&global.Object===Object&&global})),No=o(((e,t)=>{var n=Mo(),r=typeof self==`object`&&self&&self.Object===Object&&self;t.exports=n||r||Function(`return this`)()})),Po=o(((e,t)=>{t.exports=No().Symbol})),Fo=o(((e,t)=>{var n=Po(),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,o=n?n.toStringTag:void 0;function s(e){var t=i.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch{}var s=a.call(e);return r&&(t?e[o]=n:delete e[o]),s}t.exports=s})),Io=o(((e,t)=>{var n=Object.prototype.toString;function r(e){return n.call(e)}t.exports=r})),q=o(((e,t)=>{var n=Po(),r=Fo(),i=Io(),a=`[object Null]`,o=`[object Undefined]`,s=n?n.toStringTag:void 0;function c(e){return e==null?e===void 0?o:a:s&&s in Object(e)?r(e):i(e)}t.exports=c})),Lo=o(((e,t)=>{function n(e){return typeof e==`object`&&!!e}t.exports=n})),Ro=o(((e,t)=>{var n=q(),r=Lo(),i=`[object Symbol]`;function a(e){return typeof e==`symbol`||r(e)&&n(e)==i}t.exports=a})),zo=o(((e,t)=>{var n=jo(),r=Ro(),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function o(e,t){if(n(e))return!1;var o=typeof e;return o==`number`||o==`symbol`||o==`boolean`||e==null||r(e)?!0:a.test(e)||!i.test(e)||t!=null&&e in Object(t)}t.exports=o})),Bo=o(((e,t)=>{function n(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=n})),Vo=o(((e,t)=>{var n=q(),r=Bo(),i=`[object AsyncFunction]`,a=`[object Function]`,o=`[object GeneratorFunction]`,s=`[object Proxy]`;function c(e){if(!r(e))return!1;var t=n(e);return t==a||t==o||t==i||t==s}t.exports=c})),Ho=o(((e,t)=>{t.exports=No()[`__core-js_shared__`]})),Uo=o(((e,t)=>{var n=Ho(),r=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function i(e){return!!r&&r in e}t.exports=i})),Wo=o(((e,t)=>{var n=Function.prototype.toString;function r(e){if(e!=null){try{return n.call(e)}catch{}try{return e+``}catch{}}return``}t.exports=r})),Go=o(((e,t)=>{var n=Vo(),r=Uo(),i=Bo(),a=Wo(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,f=RegExp(`^`+u.call(d).replace(o,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function p(e){return!i(e)||r(e)?!1:(n(e)?f:s).test(a(e))}t.exports=p})),Ko=o(((e,t)=>{function n(e,t){return e?.[t]}t.exports=n})),qo=o(((e,t)=>{var n=Go(),r=Ko();function i(e,t){var i=r(e,t);return n(i)?i:void 0}t.exports=i})),Jo=o(((e,t)=>{t.exports=qo()(Object,`create`)})),Yo=o(((e,t)=>{var n=Jo();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r})),Xo=o(((e,t)=>{function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}t.exports=n})),Zo=o(((e,t)=>{var n=Jo(),r=`__lodash_hash_undefined__`,i=Object.prototype.hasOwnProperty;function a(e){var t=this.__data__;if(n){var a=t[e];return a===r?void 0:a}return i.call(t,e)?t[e]:void 0}t.exports=a})),Qo=o(((e,t)=>{var n=Jo(),r=Object.prototype.hasOwnProperty;function i(e){var t=this.__data__;return n?t[e]!==void 0:r.call(t,e)}t.exports=i})),$o=o(((e,t)=>{var n=Jo(),r=`__lodash_hash_undefined__`;function i(e,t){var i=this.__data__;return this.size+=+!this.has(e),i[e]=n&&t===void 0?r:t,this}t.exports=i})),es=o(((e,t)=>{var n=Yo(),r=Xo(),i=Zo(),a=Qo(),o=$o();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),ts=o(((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n})),ns=o(((e,t)=>{function n(e,t){return e===t||e!==e&&t!==t}t.exports=n})),rs=o(((e,t)=>{var n=ns();function r(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}t.exports=r})),is=o(((e,t)=>{var n=rs(),r=Array.prototype.splice;function i(e){var t=this.__data__,i=n(t,e);return i<0?!1:(i==t.length-1?t.pop():r.call(t,i,1),--this.size,!0)}t.exports=i})),as=o(((e,t)=>{var n=rs();function r(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}t.exports=r})),os=o(((e,t)=>{var n=rs();function r(e){return n(this.__data__,e)>-1}t.exports=r})),ss=o(((e,t)=>{var n=rs();function r(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}t.exports=r})),cs=o(((e,t)=>{var n=ts(),r=is(),i=as(),a=os(),o=ss();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),ls=o(((e,t)=>{t.exports=qo()(No(),`Map`)})),us=o(((e,t)=>{var n=es(),r=cs(),i=ls();function a(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=a})),ds=o(((e,t)=>{function n(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}t.exports=n})),fs=o(((e,t)=>{var n=ds();function r(e,t){var r=e.__data__;return n(t)?r[typeof t==`string`?`string`:`hash`]:r.map}t.exports=r})),ps=o(((e,t)=>{var n=fs();function r(e){var t=n(this,e).delete(e);return this.size-=+!!t,t}t.exports=r})),ms=o(((e,t)=>{var n=fs();function r(e){return n(this,e).get(e)}t.exports=r})),hs=o(((e,t)=>{var n=fs();function r(e){return n(this,e).has(e)}t.exports=r})),gs=o(((e,t)=>{var n=fs();function r(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}t.exports=r})),_s=o(((e,t)=>{var n=us(),r=ps(),i=ms(),a=hs(),o=gs();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),vs=o(((e,t)=>{var n=_s(),r=`Expected a function`;function i(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(r);var a=function(){var n=arguments,r=t?t.apply(this,n):n[0],i=a.cache;if(i.has(r))return i.get(r);var o=e.apply(this,n);return a.cache=i.set(r,o)||i,o};return a.cache=new(i.Cache||n),a}i.Cache=n,t.exports=i})),ys=o(((e,t)=>{var n=vs(),r=500;function i(e){var t=n(e,function(e){return i.size===r&&i.clear(),e}),i=t.cache;return t}t.exports=i})),bs=o(((e,t)=>{var n=ys(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g;t.exports=n(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(r,function(e,n,r,a){t.push(r?a.replace(i,`$1`):n||e)}),t})})),xs=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}t.exports=n})),Ss=o(((e,t)=>{var n=Po(),r=xs(),i=jo(),a=Ro(),o=1/0,s=n?n.prototype:void 0,c=s?s.toString:void 0;function l(e){if(typeof e==`string`)return e;if(i(e))return r(e,l)+``;if(a(e))return c?c.call(e):``;var t=e+``;return t==`0`&&1/e==-o?`-0`:t}t.exports=l})),Cs=o(((e,t)=>{var n=Ss();function r(e){return e==null?``:n(e)}t.exports=r})),ws=o(((e,t)=>{var n=jo(),r=zo(),i=bs(),a=Cs();function o(e,t){return n(e)?e:r(e,t)?[e]:i(a(e))}t.exports=o})),Ts=o(((e,t)=>{var n=Ro(),r=1/0;function i(e){if(typeof e==`string`||n(e))return e;var t=e+``;return t==`0`&&1/e==-r?`-0`:t}t.exports=i})),Es=o(((e,t)=>{var n=ws(),r=Ts();function i(e,t){t=n(t,e);for(var i=0,a=t.length;e!=null&&i<a;)e=e[r(t[i++])];return i&&i==a?e:void 0}t.exports=i})),Ds=o(((e,t)=>{var n=Es();function r(e,t,r){var i=e==null?void 0:n(e,t);return i===void 0?r:i}t.exports=r})),Os=o(((e,t)=>{function n(e){return e==null}t.exports=n})),ks=o(((e,t)=>{var n=q(),r=jo(),i=Lo(),a=`[object String]`;function o(e){return typeof e==`string`||!r(e)&&i(e)&&n(e)==a}t.exports=o})),As=o((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.server_context`),l=Symbol.for(`react.forward_ref`),u=Symbol.for(`react.suspense`),d=Symbol.for(`react.suspense_list`),f=Symbol.for(`react.memo`),p=Symbol.for(`react.lazy`);function m(e){if(typeof e==`object`&&e){var m=e.$$typeof;switch(m){case t:switch(e=e.type,e){case r:case a:case i:case u:case d:return e;default:switch(e&&=e.$$typeof,e){case c:case s:case l:case p:case f:case o:return e;default:return m}}case n:return m}}}e.isFragment=function(e){return m(e)===r}})),js=o(((e,t)=>{t.exports=As()})),Ms=o(((e,t)=>{var n=q(),r=Lo(),i=`[object Number]`;function a(e){return typeof e==`number`||r(e)&&n(e)==i}t.exports=a})),Ns=o(((e,t)=>{var n=Ms();function r(e){return n(e)&&e!=+e}t.exports=r})),Ps=l(ks()),Fs=l(Ns()),Is=l(Ds()),Ls=l(Ms()),J=l(Os()),Rs=function(e){return e===0?0:e>0?1:-1},zs=function(e){return(0,Ps.default)(e)&&e.indexOf(`%`)===e.length-1},Y=function(e){return(0,Ls.default)(e)&&!(0,Fs.default)(e)},Bs=function(e){return(0,J.default)(e)},Vs=function(e){return Y(e)||(0,Ps.default)(e)},Hs=0,Us=function(e){var t=++Hs;return`${e||``}${t}`},Ws=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(!Y(e)&&!(0,Ps.default)(e))return n;var i;if(zs(e)){var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return(0,Fs.default)(i)&&(i=n),r&&i>t&&(i=t),i},Gs=function(e){if(!e)return null;var t=Object.keys(e);return t&&t.length?e[t[0]]:null},Ks=function(e){if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[e[r]])n[e[r]]=!0;else return!0;return!1},qs=function(e,t){return Y(e)&&Y(t)?function(n){return e+n*(t-e)}:function(){return t}};function Js(e,t,n){return!e||!e.length?null:e.find(function(e){return e&&(typeof t==`function`?t(e):(0,Is.default)(e,t))===n})}var Ys=function(e){if(!e||!e.length)return null;for(var t=e.length,n=0,r=0,i=0,a=0,o=1/0,s=-1/0,c=0,l=0,u=0;u<t;u++)c=e[u].cx||0,l=e[u].cy||0,n+=c,r+=l,i+=c*l,a+=c*c,o=Math.min(o,c),s=Math.max(s,c);var d=t*a===n*n?0:(t*i-n*r)/(t*a-n*n);return{xmin:o,xmax:s,a:d,b:(r-d*n)/t}},Xs=function(e,t){return Y(e)&&Y(t)?e-t:(0,Ps.default)(e)&&(0,Ps.default)(t)?e.localeCompare(t):e instanceof Date&&t instanceof Date?e.getTime()-t.getTime():String(e).localeCompare(String(t))};function Zs(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}var Qs=l(Bo());function $s(e){"@babel/helpers - typeof";return $s=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},$s(e)}var ec=[`viewBox`,`children`],tc=`aria-activedescendant.aria-atomic.aria-autocomplete.aria-busy.aria-checked.aria-colcount.aria-colindex.aria-colspan.aria-controls.aria-current.aria-describedby.aria-details.aria-disabled.aria-errormessage.aria-expanded.aria-flowto.aria-haspopup.aria-hidden.aria-invalid.aria-keyshortcuts.aria-label.aria-labelledby.aria-level.aria-live.aria-modal.aria-multiline.aria-multiselectable.aria-orientation.aria-owns.aria-placeholder.aria-posinset.aria-pressed.aria-readonly.aria-relevant.aria-required.aria-roledescription.aria-rowcount.aria-rowindex.aria-rowspan.aria-selected.aria-setsize.aria-sort.aria-valuemax.aria-valuemin.aria-valuenow.aria-valuetext.className.color.height.id.lang.max.media.method.min.name.style.target.width.role.tabIndex.accentHeight.accumulate.additive.alignmentBaseline.allowReorder.alphabetic.amplitude.arabicForm.ascent.attributeName.attributeType.autoReverse.azimuth.baseFrequency.baselineShift.baseProfile.bbox.begin.bias.by.calcMode.capHeight.clip.clipPath.clipPathUnits.clipRule.colorInterpolation.colorInterpolationFilters.colorProfile.colorRendering.contentScriptType.contentStyleType.cursor.cx.cy.d.decelerate.descent.diffuseConstant.direction.display.divisor.dominantBaseline.dur.dx.dy.edgeMode.elevation.enableBackground.end.exponent.externalResourcesRequired.fill.fillOpacity.fillRule.filter.filterRes.filterUnits.floodColor.floodOpacity.focusable.fontFamily.fontSize.fontSizeAdjust.fontStretch.fontStyle.fontVariant.fontWeight.format.from.fx.fy.g1.g2.glyphName.glyphOrientationHorizontal.glyphOrientationVertical.glyphRef.gradientTransform.gradientUnits.hanging.horizAdvX.horizOriginX.href.ideographic.imageRendering.in2.in.intercept.k1.k2.k3.k4.k.kernelMatrix.kernelUnitLength.kerning.keyPoints.keySplines.keyTimes.lengthAdjust.letterSpacing.lightingColor.limitingConeAngle.local.markerEnd.markerHeight.markerMid.markerStart.markerUnits.markerWidth.mask.maskContentUnits.maskUnits.mathematical.mode.numOctaves.offset.opacity.operator.order.orient.orientation.origin.overflow.overlinePosition.overlineThickness.paintOrder.panose1.pathLength.patternContentUnits.patternTransform.patternUnits.pointerEvents.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.r.radius.refX.refY.renderingIntent.repeatCount.repeatDur.requiredExtensions.requiredFeatures.restart.result.rotate.rx.ry.seed.shapeRendering.slope.spacing.specularConstant.specularExponent.speed.spreadMethod.startOffset.stdDeviation.stemh.stemv.stitchTiles.stopColor.stopOpacity.strikethroughPosition.strikethroughThickness.string.stroke.strokeDasharray.strokeDashoffset.strokeLinecap.strokeLinejoin.strokeMiterlimit.strokeOpacity.strokeWidth.surfaceScale.systemLanguage.tableValues.targetX.targetY.textAnchor.textDecoration.textLength.textRendering.to.transform.u1.u2.underlinePosition.underlineThickness.unicode.unicodeBidi.unicodeRange.unitsPerEm.vAlphabetic.values.vectorEffect.version.vertAdvY.vertOriginX.vertOriginY.vHanging.vIdeographic.viewTarget.visibility.vMathematical.widths.wordSpacing.writingMode.x1.x2.x.xChannelSelector.xHeight.xlinkActuate.xlinkArcrole.xlinkHref.xlinkRole.xlinkShow.xlinkTitle.xlinkType.xmlBase.xmlLang.xmlns.xmlnsXlink.xmlSpace.y1.y2.y.yChannelSelector.z.zoomAndPan.ref.key.angle`.split(`.`),nc=[`points`,`pathLength`],rc={svg:ec,polygon:nc,polyline:nc},ic=`dangerouslySetInnerHTML.onCopy.onCopyCapture.onCut.onCutCapture.onPaste.onPasteCapture.onCompositionEnd.onCompositionEndCapture.onCompositionStart.onCompositionStartCapture.onCompositionUpdate.onCompositionUpdateCapture.onFocus.onFocusCapture.onBlur.onBlurCapture.onChange.onChangeCapture.onBeforeInput.onBeforeInputCapture.onInput.onInputCapture.onReset.onResetCapture.onSubmit.onSubmitCapture.onInvalid.onInvalidCapture.onLoad.onLoadCapture.onError.onErrorCapture.onKeyDown.onKeyDownCapture.onKeyPress.onKeyPressCapture.onKeyUp.onKeyUpCapture.onAbort.onAbortCapture.onCanPlay.onCanPlayCapture.onCanPlayThrough.onCanPlayThroughCapture.onDurationChange.onDurationChangeCapture.onEmptied.onEmptiedCapture.onEncrypted.onEncryptedCapture.onEnded.onEndedCapture.onLoadedData.onLoadedDataCapture.onLoadedMetadata.onLoadedMetadataCapture.onLoadStart.onLoadStartCapture.onPause.onPauseCapture.onPlay.onPlayCapture.onPlaying.onPlayingCapture.onProgress.onProgressCapture.onRateChange.onRateChangeCapture.onSeeked.onSeekedCapture.onSeeking.onSeekingCapture.onStalled.onStalledCapture.onSuspend.onSuspendCapture.onTimeUpdate.onTimeUpdateCapture.onVolumeChange.onVolumeChangeCapture.onWaiting.onWaitingCapture.onAuxClick.onAuxClickCapture.onClick.onClickCapture.onContextMenu.onContextMenuCapture.onDoubleClick.onDoubleClickCapture.onDrag.onDragCapture.onDragEnd.onDragEndCapture.onDragEnter.onDragEnterCapture.onDragExit.onDragExitCapture.onDragLeave.onDragLeaveCapture.onDragOver.onDragOverCapture.onDragStart.onDragStartCapture.onDrop.onDropCapture.onMouseDown.onMouseDownCapture.onMouseEnter.onMouseLeave.onMouseMove.onMouseMoveCapture.onMouseOut.onMouseOutCapture.onMouseOver.onMouseOverCapture.onMouseUp.onMouseUpCapture.onSelect.onSelectCapture.onTouchCancel.onTouchCancelCapture.onTouchEnd.onTouchEndCapture.onTouchMove.onTouchMoveCapture.onTouchStart.onTouchStartCapture.onPointerDown.onPointerDownCapture.onPointerMove.onPointerMoveCapture.onPointerUp.onPointerUpCapture.onPointerCancel.onPointerCancelCapture.onPointerEnter.onPointerEnterCapture.onPointerLeave.onPointerLeaveCapture.onPointerOver.onPointerOverCapture.onPointerOut.onPointerOutCapture.onGotPointerCapture.onGotPointerCaptureCapture.onLostPointerCapture.onLostPointerCaptureCapture.onScroll.onScrollCapture.onWheel.onWheelCapture.onAnimationStart.onAnimationStartCapture.onAnimationEnd.onAnimationEndCapture.onAnimationIteration.onAnimationIterationCapture.onTransitionEnd.onTransitionEndCapture`.split(`.`),ac=function(e,t){if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if((0,v.isValidElement)(e)&&(n=e.props),!(0,Qs.default)(n))return null;var r={};return Object.keys(n).forEach(function(e){ic.includes(e)&&(r[e]=t||function(t){return n[e](n,t)})}),r},oc=function(e,t,n){return function(r){return e(t,n,r),null}},sc=function(e,t,n){if(!(0,Qs.default)(e)||$s(e)!==`object`)return null;var r=null;return Object.keys(e).forEach(function(i){var a=e[i];ic.includes(i)&&typeof a==`function`&&(r||={},r[i]=oc(a,t,n))}),r},X=l(Vo()),cc=js(),lc=[`children`],uc=[`children`];function dc(e,t){if(e==null)return{};var n=fc(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function fc(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function pc(e){"@babel/helpers - typeof";return pc=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},pc(e)}var mc={click:`onClick`,mousedown:`onMouseDown`,mouseup:`onMouseUp`,mouseover:`onMouseOver`,mousemove:`onMouseMove`,mouseout:`onMouseOut`,mouseenter:`onMouseEnter`,mouseleave:`onMouseLeave`,touchcancel:`onTouchCancel`,touchend:`onTouchEnd`,touchmove:`onTouchMove`,touchstart:`onTouchStart`,contextmenu:`onContextMenu`,dblclick:`onDoubleClick`},hc=function(e){return typeof e==`string`?e:e?e.displayName||e.name||`Component`:``},gc=null,_c=null,vc=function e(t){if(t===gc&&Array.isArray(_c))return _c;var n=[];return v.Children.forEach(t,function(t){(0,J.default)(t)||((0,cc.isFragment)(t)?n=n.concat(e(t.props.children)):n.push(t))}),_c=n,gc=t,n};function yc(e,t){var n=[],r=[];return r=Array.isArray(t)?t.map(function(e){return hc(e)}):[hc(t)],vc(e).forEach(function(e){var t=(0,Is.default)(e,`type.displayName`)||(0,Is.default)(e,`type.name`);r.indexOf(t)!==-1&&n.push(e)}),n}function bc(e,t){var n=yc(e,t);return n&&n[0]}var xc=function(e){if(!e||!e.props)return!1;var t=e.props,n=t.width,r=t.height;return!(!Y(n)||n<=0||!Y(r)||r<=0)},Sc=`a.altGlyph.altGlyphDef.altGlyphItem.animate.animateColor.animateMotion.animateTransform.circle.clipPath.color-profile.cursor.defs.desc.ellipse.feBlend.feColormatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.font.font-face.font-face-format.font-face-name.font-face-url.foreignObject.g.glyph.glyphRef.hkern.image.line.lineGradient.marker.mask.metadata.missing-glyph.mpath.path.pattern.polygon.polyline.radialGradient.rect.script.set.stop.style.svg.switch.symbol.text.textPath.title.tref.tspan.use.view.vkern`.split(`.`),Cc=function(e){return e&&e.type&&(0,Ps.default)(e.type)&&Sc.indexOf(e.type)>=0},wc=function(e){return e&&pc(e)===`object`&&`clipDot`in e},Tc=function(e,t,n,r){var i=rc?.[r]??[];return t.startsWith(`data-`)||!(0,X.default)(e)&&(r&&i.includes(t)||tc.includes(t))||n&&ic.includes(t)},Z=function(e,t,n){if(!e||typeof e==`function`||typeof e==`boolean`)return null;var r=e;if((0,v.isValidElement)(e)&&(r=e.props),!(0,Qs.default)(r))return null;var i={};return Object.keys(r).forEach(function(e){Tc(r?.[e],e,t,n)&&(i[e]=r[e])}),i},Ec=function e(t,n){if(t===n)return!0;var r=v.Children.count(t);if(r!==v.Children.count(n))return!1;if(r===0)return!0;if(r===1)return Dc(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var a=t[i],o=n[i];if(Array.isArray(a)||Array.isArray(o)){if(!e(a,o))return!1}else if(!Dc(a,o))return!1}return!0},Dc=function(e,t){if((0,J.default)(e)&&(0,J.default)(t))return!0;if(!(0,J.default)(e)&&!(0,J.default)(t)){var n=e.props||{},r=n.children,i=dc(n,lc),a=t.props||{},o=a.children,s=dc(a,uc);return r&&o?Zs(i,s)&&Ec(r,o):!r&&!o&&Zs(i,s)}return!1},Oc=function(e,t){var n=[],r={};return vc(e).forEach(function(e,i){if(Cc(e))n.push(e);else if(e){var a=hc(e.type),o=t[a]||{},s=o.handler,c=o.once;if(s&&(!c||!r[a])){var l=s(e,a,i);n.push(l),r[a]=!0}}}),n},kc=function(e){var t=e&&e.type;return t&&mc[t]?mc[t]:null},Ac=function(e,t){return vc(t).indexOf(e)},jc=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function Mc(){return Mc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mc.apply(this,arguments)}function Nc(e,t){if(e==null)return{};var n=Pc(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pc(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Fc(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,c=e.desc,l=Nc(e,jc),u=i||{width:n,height:r,x:0,y:0},d=K(`recharts-surface`,a);return v.createElement(`svg`,Mc({},Z(l,!0,`svg`),{className:d,width:n,height:r,style:o,viewBox:`${u.x} ${u.y} ${u.width} ${u.height}`}),v.createElement(`title`,null,s),v.createElement(`desc`,null,c),t)}var Ic=[`children`,`className`];function Lc(){return Lc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lc.apply(this,arguments)}function Rc(e,t){if(e==null)return{};var n=zc(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zc(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Bc=v.forwardRef(function(e,t){var n=e.children,r=e.className,i=Rc(e,Ic),a=K(`recharts-layer`,r);return v.createElement(`g`,Lc({className:a},Z(i,!0),{ref:t}),n)}),Vc=o(((e,t)=>{function n(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}t.exports=n})),Hc=o(((e,t)=>{var n=Vc();function r(e,t,r){var i=e.length;return r=r===void 0?i:r,!t&&r>=i?e:n(e,t,r)}t.exports=r})),Uc=o(((e,t)=>{var n=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`);function r(e){return n.test(e)}t.exports=r})),Wc=o(((e,t)=>{function n(e){return e.split(``)}t.exports=n})),Gc=o(((e,t)=>{var n=`\\ud800-\\udfff`,r=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,i=`\\ufe0e\\ufe0f`,a=`[`+n+`]`,o=`[`+r+`]`,s=`\\ud83c[\\udffb-\\udfff]`,c=`(?:`+o+`|`+s+`)`,l=`[^`+n+`]`,u=`(?:\\ud83c[\\udde6-\\uddff]){2}`,d=`[\\ud800-\\udbff][\\udc00-\\udfff]`,f=`\\u200d`,p=c+`?`,m=`[`+i+`]?`,h=`(?:`+f+`(?:`+[l,u,d].join(`|`)+`)`+m+p+`)*`,g=m+p+h,_=`(?:`+[l+o+`?`,o,u,d,a].join(`|`)+`)`,v=RegExp(s+`(?=`+s+`)|`+_+g,`g`);function y(e){return e.match(v)||[]}t.exports=y})),Kc=o(((e,t)=>{var n=Wc(),r=Uc(),i=Gc();function a(e){return r(e)?i(e):n(e)}t.exports=a})),qc=o(((e,t)=>{var n=Hc(),r=Uc(),i=Kc(),a=Cs();function o(e){return function(t){t=a(t);var o=r(t)?i(t):void 0,s=o?o[0]:t.charAt(0),c=o?n(o,1).join(``):t.slice(1);return s[e]()+c}}t.exports=o})),Jc=o(((e,t)=>{t.exports=qc()(`toUpperCase`)})),Yc=Math.PI,Xc=2*Yc,Zc=1e-6,Qc=Xc-Zc;function $c(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function el(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return $c;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}function tl(e,t,n,r){return e===n&&t===r}function nl(e){let t=Math.floor(e);if(!(t<=15))return tl;let n=10**t,r=function(e){return Math.round(e*n)};return function(e,t,n,i){return r(e)===r(n)&&r(t)===r(i)}}var rl=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?$c:el(e),this._equal=e==null?tl:nl(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Zc){if(!(Math.abs(u*s-c*l)>Zc)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((Yc-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>Zc&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;if(this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Zc||Math.abs(this._y1-l)>Zc)&&this._append`L${c},${l}`,n){if(d<0&&(d=d%Xc+Xc),d>Qc)this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`;else if(d>Zc){let a=e+n*Math.cos(i),o=t+n*Math.sin(i);if(d>=Yc&&this._equal(c,l,a,o)){d/=2;let i=r+d;this._append`A${n},${n},0,${+(d>=Yc)},${u},${e+n*Math.cos(i)},${t+n*Math.sin(i)}`}this._append`A${n},${n},0,${+(d>=Yc)},${u},${this._x1=a},${this._y1=o}`}}}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};rl.prototype;function il(e){return function(){return e}}var al=Math.cos,ol=Math.sin,sl=Math.sqrt,cl=1e-12,ll=Math.PI;ll/2;var ul=2*ll;function dl(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new rl(t)}Array.prototype.slice;function fl(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function pl(e){this._context=e}pl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};function ml(e){return new pl(e)}function hl(e){return e[0]}function gl(e){return e[1]}function _l(e,t){var n=il(!0),r=null,i=ml,a=null,o=dl(s);e=typeof e==`function`?e:e===void 0?hl:il(e),t=typeof t==`function`?t:t===void 0?gl:il(t);function s(s){var c,l=(s=fl(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:il(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:il(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:il(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function vl(e,t,n){var r=null,i=il(!0),a=null,o=ml,s=null,c=dl(l);e=typeof e==`function`?e:e===void 0?hl:il(+e),t=typeof t==`function`?t:il(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?gl:il(+n);function l(l){var u,d,f,p=(l=fl(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h){if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return _l().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:il(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:il(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:il(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:il(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:il(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:il(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:il(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}bl(ml);function yl(e){this._curve=e}yl.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function bl(e){function t(t){return new yl(e(t))}return t._curve=e,t}var xl=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}};function Sl(e){return new xl(e,!0)}function Cl(e){return new xl(e,!1)}sl(3);var wl={draw(e,t){let n=sl(t/ll);e.moveTo(n,0),e.arc(0,0,n,0,ul)}},Tl={draw(e,t){let n=sl(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},El=sl(1/3),Dl=El*2,Ol={draw(e,t){let n=sl(t/Dl),r=n*El;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},kl={draw(e,t){let n=sl(t),r=-n/2;e.rect(r,r,n,n)}},Al=.8908130915292852,jl=ol(ll/10)/ol(7*ll/10),Ml=ol(ul/10)*jl,Nl=-al(ul/10)*jl,Pl={draw(e,t){let n=sl(t*Al),r=Ml*n,i=Nl*n;e.moveTo(0,-n),e.lineTo(r,i);for(let t=1;t<5;++t){let a=ul*t/5,o=al(a),s=ol(a);e.lineTo(s*n,-o*n),e.lineTo(o*r-s*i,s*r+o*i)}e.closePath()}},Fl=sl(3),Il={draw(e,t){let n=-sl(t/(Fl*3));e.moveTo(0,n*2),e.lineTo(-Fl*n,-n),e.lineTo(Fl*n,-n),e.closePath()}};sl(3);var Ll=-.5,Rl=sl(3)/2,zl=1/sl(12),Bl=(zl/2+1)*3,Vl={draw(e,t){let n=sl(t/Bl),r=n/2,i=n*zl,a=r,o=n*zl+n,s=-a,c=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,c),e.lineTo(Ll*r-Rl*i,Rl*r+Ll*i),e.lineTo(Ll*a-Rl*o,Rl*a+Ll*o),e.lineTo(Ll*s-Rl*c,Rl*s+Ll*c),e.lineTo(Ll*r+Rl*i,Ll*i-Rl*r),e.lineTo(Ll*a+Rl*o,Ll*o-Rl*a),e.lineTo(Ll*s+Rl*c,Ll*c-Rl*s),e.closePath()}};function Hl(e,t){let n=null,r=dl(i);e=typeof e==`function`?e:il(e||wl),t=typeof t==`function`?t:il(t===void 0?64:+t);function i(){let i;if(n||=i=r(),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+``||null}return i.type=function(t){return arguments.length?(e=typeof t==`function`?t:il(t),i):e},i.size=function(e){return arguments.length?(t=typeof e==`function`?e:il(+e),i):t},i.context=function(e){return arguments.length?(n=e??null,i):n},i}function Ul(){}function Wl(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Gl(e){this._context=e}Gl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Wl(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Wl(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Kl(e){return new Gl(e)}function ql(e){this._context=e}ql.prototype={areaStart:Ul,areaEnd:Ul,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Wl(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Jl(e){return new ql(e)}function Yl(e){this._context=e}Yl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Wl(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Xl(e){return new Yl(e)}function Zl(e,t){this._basis=new Gl(e),this._beta=t}Zl.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}},(function e(t){function n(e){return t===1?new Gl(e):new Zl(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function Ql(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function $l(e,t){this._context=e,this._k=(1-t)/6}$l.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ql(this,this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Ql(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},(function e(t){function n(e){return new $l(e,t)}return n.tension=function(t){return e(+t)},n})(0);function eu(e,t){this._context=e,this._k=(1-t)/6}eu.prototype={areaStart:Ul,areaEnd:Ul,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ql(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},(function e(t){function n(e){return new eu(e,t)}return n.tension=function(t){return e(+t)},n})(0);function tu(e,t){this._context=e,this._k=(1-t)/6}tu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ql(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},(function e(t){function n(e){return new tu(e,t)}return n.tension=function(t){return e(+t)},n})(0);function nu(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>cl){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>cl){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function ru(e,t){this._context=e,this._alpha=t}ru.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:nu(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},(function e(t){function n(e){return t?new ru(e,t):new $l(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function iu(e,t){this._context=e,this._alpha=t}iu.prototype={areaStart:Ul,areaEnd:Ul,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:nu(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},(function e(t){function n(e){return t?new iu(e,t):new eu(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function au(e,t){this._context=e,this._alpha=t}au.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:nu(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},(function e(t){function n(e){return t?new au(e,t):new tu(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function ou(e){this._context=e}ou.prototype={areaStart:Ul,areaEnd:Ul,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function su(e){return new ou(e)}function cu(e){return e<0?-1:1}function lu(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(cu(a)+cu(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function uu(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function du(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function fu(e){this._context=e}fu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:du(this,this._t0,uu(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,du(this,uu(this,n=lu(this,e,t)),n);break;default:du(this,this._t0,n=lu(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function pu(e){this._context=new mu(e)}(pu.prototype=Object.create(fu.prototype)).point=function(e,t){fu.prototype.point.call(this,t,e)};function mu(e){this._context=e}mu.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function hu(e){return new fu(e)}function gu(e){return new pu(e)}function _u(e){this._context=e}_u.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n){if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=vu(e),i=vu(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o])}(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function vu(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function yu(e){return new _u(e)}function bu(e,t){this._context=e,this._t=t}bu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};function xu(e){return new bu(e,.5)}function Su(e){return new bu(e,0)}function Cu(e){return new bu(e,1)}function wu(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Tu(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function Eu(e,t){return e[t]}function Du(e){let t=[];return t.key=e,t}function Ou(){var e=il([]),t=Tu,n=wu,r=Eu;function i(i){var a=Array.from(e.apply(this,arguments),Du),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=fl(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:il(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:il(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?Tu:typeof e==`function`?e:il(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??wu,i):n},i}function ku(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}wu(e,t)}}function Au(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}wu(e,t)}}function ju(e,t){if((o=e.length)>0&&(a=(i=e[t[0]]).length)>0){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=(d-(u[r-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]],h=m[r][1]||0,g=m[r-1][1]||0;f+=h-g}c+=d,l+=f*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,wu(e,t)}}var Mu=l(Jc());function Nu(e){"@babel/helpers - typeof";return Nu=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Nu(e)}var Pu=[`type`,`size`,`sizeType`];function Fu(){return Fu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fu.apply(this,arguments)}function Iu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Lu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Iu(Object(n),!0).forEach(function(t){Ru(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Iu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ru(e,t,n){return t=zu(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zu(e){var t=Bu(e,`string`);return Nu(t)==`symbol`?t:t+``}function Bu(e,t){if(Nu(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Nu(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Vu(e,t){if(e==null)return{};var n=Hu(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Hu(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Uu={symbolCircle:wl,symbolCross:Tl,symbolDiamond:Ol,symbolSquare:kl,symbolStar:Pl,symbolTriangle:Il,symbolWye:Vl},Wu=Math.PI/180,Gu=function(e){return Uu[`symbol${(0,Mu.default)(e)}`]||wl},Ku=function(e,t,n){if(t===`area`)return e;switch(n){case`cross`:return 5*e*e/9;case`diamond`:return .5*e*e/Math.sqrt(3);case`square`:return e*e;case`star`:var r=18*Wu;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**2);case`triangle`:return Math.sqrt(3)*e*e/4;case`wye`:return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},qu=function(e,t){Uu[`symbol${(0,Mu.default)(e)}`]=t},Ju=function(e){var t=e.type,n=t===void 0?`circle`:t,r=e.size,i=r===void 0?64:r,a=e.sizeType,o=a===void 0?`area`:a,s=Lu(Lu({},Vu(e,Pu)),{},{type:n,size:i,sizeType:o}),c=function(){var e=Gu(n);return Hl().type(e).size(Ku(i,o,n))()},l=s.className,u=s.cx,d=s.cy,f=Z(s,!0);return u===+u&&d===+d&&i===+i?v.createElement(`path`,Fu({},f,{className:K(`recharts-symbols`,l),transform:`translate(${u}, ${d})`,d:c()})):null};Ju.registerSymbol=qu;function Yu(e){"@babel/helpers - typeof";return Yu=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Yu(e)}function Xu(){return Xu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xu.apply(this,arguments)}function Zu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Zu(Object(n),!0).forEach(function(t){ld(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $u(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function ed(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,ud(r.key),r)}}function td(e,t,n){return t&&ed(e.prototype,t),n&&ed(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function nd(e,t,n){return t=od(t),rd(e,ad()?Reflect.construct(t,n||[],od(e).constructor):t.apply(e,n))}function rd(e,t){if(t&&(Yu(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return id(e)}function id(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function ad(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ad=function(){return!!e})()}function od(e){return od=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},od(e)}function sd(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cd(e,t)}function cd(e,t){return cd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cd(e,t)}function ld(e,t,n){return t=ud(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ud(e){var t=dd(e,`string`);return Yu(t)==`symbol`?t:t+``}function dd(e,t){if(Yu(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Yu(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var fd=32,pd=function(e){function t(){return $u(this,t),nd(this,t,arguments)}return sd(t,e),td(t,[{key:`renderIcon`,value:function(e){var t=this.props.inactiveColor,n=fd/2,r=fd/6,i=fd/3,a=e.inactive?t:e.color;if(e.type===`plainline`)return v.createElement(`line`,{strokeWidth:4,fill:`none`,stroke:a,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:n,x2:fd,y2:n,className:`recharts-legend-icon`});if(e.type===`line`)return v.createElement(`path`,{strokeWidth:4,fill:`none`,stroke:a,d:`M0,${n}h${i}
17
- A${r},${r},0,1,1,${2*i},${n}
18
- H${fd}M${2*i},${n}
19
- A${r},${r},0,1,1,${i},${n}`,className:`recharts-legend-icon`});if(e.type===`rect`)return v.createElement(`path`,{stroke:`none`,fill:a,d:`M0,${fd/8}h${fd}v${fd*3/4}h${-fd}z`,className:`recharts-legend-icon`});if(v.isValidElement(e.legendIcon)){var o=Qu({},e);return delete o.legendIcon,v.cloneElement(e.legendIcon,o)}return v.createElement(Ju,{fill:a,cx:n,cy:n,size:fd,sizeType:`diameter`,type:e.type})}},{key:`renderItems`,value:function(){var e=this,t=this.props,n=t.payload,r=t.iconSize,i=t.layout,a=t.formatter,o=t.inactiveColor,s={x:0,y:0,width:fd,height:fd},c={display:i===`horizontal`?`inline-block`:`block`,marginRight:10},l={display:`inline-block`,verticalAlign:`middle`,marginRight:4};return n.map(function(t,n){var i=t.formatter||a,u=K(ld(ld({"recharts-legend-item":!0},`legend-item-${n}`,!0),`inactive`,t.inactive));if(t.type===`none`)return null;var d=(0,X.default)(t.value)?null:t.value;(0,X.default)(t.value);var f=t.inactive?o:t.color;return v.createElement(`li`,Xu({className:u,style:c,key:`legend-item-${n}`},sc(e.props,t,n)),v.createElement(Fc,{width:r,height:r,viewBox:s,style:l},e.renderIcon(t)),v.createElement(`span`,{className:`recharts-legend-item-text`,style:{color:f}},i?i(d,t,n):d))})}},{key:`render`,value:function(){var e=this.props,t=e.payload,n=e.layout,r=e.align;if(!t||!t.length)return null;var i={padding:0,margin:0,textAlign:n===`horizontal`?r:`left`};return v.createElement(`ul`,{className:`recharts-default-legend`,style:i},this.renderItems())}}])}(v.PureComponent);ld(pd,`displayName`,`Legend`),ld(pd,`defaultProps`,{iconSize:14,layout:`horizontal`,align:`center`,verticalAlign:`middle`,inactiveColor:`#ccc`});var md=o(((e,t)=>{var n=cs();function r(){this.__data__=new n,this.size=0}t.exports=r})),hd=o(((e,t)=>{function n(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}t.exports=n})),gd=o(((e,t)=>{function n(e){return this.__data__.get(e)}t.exports=n})),_d=o(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),vd=o(((e,t)=>{var n=cs(),r=ls(),i=_s(),a=200;function o(e,t){var o=this.__data__;if(o instanceof n){var s=o.__data__;if(!r||s.length<a-1)return s.push([e,t]),this.size=++o.size,this;o=this.__data__=new i(s)}return o.set(e,t),this.size=o.size,this}t.exports=o})),yd=o(((e,t)=>{var n=cs(),r=md(),i=hd(),a=gd(),o=_d(),s=vd();function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c})),bd=o(((e,t)=>{function n(e){return this.__data__.set(e,`__lodash_hash_undefined__`),this}t.exports=n})),xd=o(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),Sd=o(((e,t)=>{var n=_s(),r=bd(),i=xd();function a(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}a.prototype.add=a.prototype.push=r,a.prototype.has=i,t.exports=a})),Cd=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}t.exports=n})),wd=o(((e,t)=>{function n(e,t){return e.has(t)}t.exports=n})),Td=o(((e,t)=>{var n=Sd(),r=Cd(),i=wd(),a=1,o=2;function s(e,t,s,c,l,u){var d=s&a,f=e.length,p=t.length;if(f!=p&&!(d&&p>f))return!1;var m=u.get(e),h=u.get(t);if(m&&h)return m==t&&h==e;var g=-1,_=!0,v=s&o?new n:void 0;for(u.set(e,t),u.set(t,e);++g<f;){var y=e[g],b=t[g];if(c)var x=d?c(b,y,g,t,e,u):c(y,b,g,e,t,u);if(x!==void 0){if(x)continue;_=!1;break}if(v){if(!r(t,function(e,t){if(!i(v,t)&&(y===e||l(y,e,s,c,u)))return v.push(t)})){_=!1;break}}else if(!(y===b||l(y,b,s,c,u))){_=!1;break}}return u.delete(e),u.delete(t),_}t.exports=s})),Ed=o(((e,t)=>{t.exports=No().Uint8Array})),Dd=o(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}t.exports=n})),Od=o(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}t.exports=n})),kd=o(((e,t)=>{var n=Po(),r=Ed(),i=ns(),a=Td(),o=Dd(),s=Od(),c=1,l=2,u=`[object Boolean]`,d=`[object Date]`,f=`[object Error]`,p=`[object Map]`,m=`[object Number]`,h=`[object RegExp]`,g=`[object Set]`,_=`[object String]`,v=`[object Symbol]`,y=`[object ArrayBuffer]`,b=`[object DataView]`,x=n?n.prototype:void 0,S=x?x.valueOf:void 0;function C(e,t,n,x,C,w,T){switch(n){case b:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case y:return!(e.byteLength!=t.byteLength||!w(new r(e),new r(t)));case u:case d:case m:return i(+e,+t);case f:return e.name==t.name&&e.message==t.message;case h:case _:return e==t+``;case p:var E=o;case g:var D=x&c;if(E||=s,e.size!=t.size&&!D)return!1;var O=T.get(e);if(O)return O==t;x|=l,T.set(e,t);var k=a(E(e),E(t),x,C,w,T);return T.delete(e),k;case v:if(S)return S.call(e)==S.call(t)}return!1}t.exports=C})),Ad=o(((e,t)=>{function n(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}t.exports=n})),jd=o(((e,t)=>{var n=Ad(),r=jo();function i(e,t,i){var a=t(e);return r(e)?a:n(a,i(e))}t.exports=i})),Md=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}t.exports=n})),Nd=o(((e,t)=>{function n(){return[]}t.exports=n})),Pd=o(((e,t)=>{var n=Md(),r=Nd(),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;t.exports=a?function(e){return e==null?[]:(e=Object(e),n(a(e),function(t){return i.call(e,t)}))}:r})),Fd=o(((e,t)=>{function n(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}t.exports=n})),Id=o(((e,t)=>{var n=q(),r=Lo(),i=`[object Arguments]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),Ld=o(((e,t)=>{var n=Id(),r=Lo(),i=Object.prototype,a=i.hasOwnProperty,o=i.propertyIsEnumerable;t.exports=n(function(){return arguments}())?n:function(e){return r(e)&&a.call(e,`callee`)&&!o.call(e,`callee`)}})),Rd=o(((e,t)=>{function n(){return!1}t.exports=n})),zd=o(((e,t)=>{var n=No(),r=Rd(),i=typeof e==`object`&&e&&!e.nodeType&&e,a=i&&typeof t==`object`&&t&&!t.nodeType&&t,o=a&&a.exports===i?n.Buffer:void 0;t.exports=(o?o.isBuffer:void 0)||r})),Bd=o(((e,t)=>{var n=/^(?:0|[1-9]\d*)$/;function r(e,t){var r=typeof e;return t??=9007199254740991,!!t&&(r==`number`||r!=`symbol`&&n.test(e))&&e>-1&&e%1==0&&e<t}t.exports=r})),Vd=o(((e,t)=>{function n(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=9007199254740991}t.exports=n})),Hd=o(((e,t)=>{var n=q(),r=Vd(),i=Lo(),a=`[object Arguments]`,o=`[object Array]`,s=`[object Boolean]`,c=`[object Date]`,l=`[object Error]`,u=`[object Function]`,d=`[object Map]`,f=`[object Number]`,p=`[object Object]`,m=`[object RegExp]`,h=`[object Set]`,g=`[object String]`,_=`[object WeakMap]`,v=`[object ArrayBuffer]`,y=`[object DataView]`,b=`[object Float32Array]`,x=`[object Float64Array]`,S=`[object Int8Array]`,C=`[object Int16Array]`,w=`[object Int32Array]`,T=`[object Uint8Array]`,E=`[object Uint8ClampedArray]`,D=`[object Uint16Array]`,O=`[object Uint32Array]`,k={};k[b]=k[x]=k[S]=k[C]=k[w]=k[T]=k[E]=k[D]=k[O]=!0,k[a]=k[o]=k[v]=k[s]=k[y]=k[c]=k[l]=k[u]=k[d]=k[f]=k[p]=k[m]=k[h]=k[g]=k[_]=!1;function A(e){return i(e)&&r(e.length)&&!!k[n(e)]}t.exports=A})),Ud=o(((e,t)=>{function n(e){return function(t){return e(t)}}t.exports=n})),Wd=o(((e,t)=>{var n=Mo(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r&&n.process;t.exports=function(){try{return i&&i.require&&i.require(`util`).types||a&&a.binding&&a.binding(`util`)}catch{}}()})),Gd=o(((e,t)=>{var n=Hd(),r=Ud(),i=Wd(),a=i&&i.isTypedArray;t.exports=a?r(a):n})),Kd=o(((e,t)=>{var n=Fd(),r=Ld(),i=jo(),a=zd(),o=Bd(),s=Gd(),c=Object.prototype.hasOwnProperty;function l(e,t){var l=i(e),u=!l&&r(e),d=!l&&!u&&a(e),f=!l&&!u&&!d&&s(e),p=l||u||d||f,m=p?n(e.length,String):[],h=m.length;for(var g in e)(t||c.call(e,g))&&!(p&&(g==`length`||d&&(g==`offset`||g==`parent`)||f&&(g==`buffer`||g==`byteLength`||g==`byteOffset`)||o(g,h)))&&m.push(g);return m}t.exports=l})),qd=o(((e,t)=>{var n=Object.prototype;function r(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||n)}t.exports=r})),Jd=o(((e,t)=>{function n(e,t){return function(n){return e(t(n))}}t.exports=n})),Yd=o(((e,t)=>{t.exports=Jd()(Object.keys,Object)})),Xd=o(((e,t)=>{var n=qd(),r=Yd(),i=Object.prototype.hasOwnProperty;function a(e){if(!n(e))return r(e);var t=[];for(var a in Object(e))i.call(e,a)&&a!=`constructor`&&t.push(a);return t}t.exports=a})),Zd=o(((e,t)=>{var n=Vo(),r=Vd();function i(e){return e!=null&&r(e.length)&&!n(e)}t.exports=i})),Qd=o(((e,t)=>{var n=Kd(),r=Xd(),i=Zd();function a(e){return i(e)?n(e):r(e)}t.exports=a})),$d=o(((e,t)=>{var n=jd(),r=Pd(),i=Qd();function a(e){return n(e,i,r)}t.exports=a})),ef=o(((e,t)=>{var n=$d(),r=1,i=Object.prototype.hasOwnProperty;function a(e,t,a,o,s,c){var l=a&r,u=n(e),d=u.length;if(d!=n(t).length&&!l)return!1;for(var f=d;f--;){var p=u[f];if(!(l?p in t:i.call(t,p)))return!1}var m=c.get(e),h=c.get(t);if(m&&h)return m==t&&h==e;var g=!0;c.set(e,t),c.set(t,e);for(var _=l;++f<d;){p=u[f];var v=e[p],y=t[p];if(o)var b=l?o(y,v,p,t,e,c):o(v,y,p,e,t,c);if(!(b===void 0?v===y||s(v,y,a,o,c):b)){g=!1;break}_||=p==`constructor`}if(g&&!_){var x=e.constructor,S=t.constructor;x!=S&&`constructor`in e&&`constructor`in t&&!(typeof x==`function`&&x instanceof x&&typeof S==`function`&&S instanceof S)&&(g=!1)}return c.delete(e),c.delete(t),g}t.exports=a})),tf=o(((e,t)=>{t.exports=qo()(No(),`DataView`)})),nf=o(((e,t)=>{t.exports=qo()(No(),`Promise`)})),rf=o(((e,t)=>{t.exports=qo()(No(),`Set`)})),af=o(((e,t)=>{t.exports=qo()(No(),`WeakMap`)})),of=o(((e,t)=>{var n=tf(),r=ls(),i=nf(),a=rf(),o=af(),s=q(),c=Wo(),l=`[object Map]`,u=`[object Object]`,d=`[object Promise]`,f=`[object Set]`,p=`[object WeakMap]`,m=`[object DataView]`,h=c(n),g=c(r),_=c(i),v=c(a),y=c(o),b=s;(n&&b(new n(new ArrayBuffer(1)))!=m||r&&b(new r)!=l||i&&b(i.resolve())!=d||a&&b(new a)!=f||o&&b(new o)!=p)&&(b=function(e){var t=s(e),n=t==u?e.constructor:void 0,r=n?c(n):``;if(r)switch(r){case h:return m;case g:return l;case _:return d;case v:return f;case y:return p}return t}),t.exports=b})),sf=o(((e,t)=>{var n=yd(),r=Td(),i=kd(),a=ef(),o=of(),s=jo(),c=zd(),l=Gd(),u=1,d=`[object Arguments]`,f=`[object Array]`,p=`[object Object]`,m=Object.prototype.hasOwnProperty;function h(e,t,h,g,_,v){var y=s(e),b=s(t),x=y?f:o(e),S=b?f:o(t);x=x==d?p:x,S=S==d?p:S;var C=x==p,w=S==p,T=x==S;if(T&&c(e)){if(!c(t))return!1;y=!0,C=!1}if(T&&!C)return v||=new n,y||l(e)?r(e,t,h,g,_,v):i(e,t,x,h,g,_,v);if(!(h&u)){var E=C&&m.call(e,`__wrapped__`),D=w&&m.call(t,`__wrapped__`);if(E||D){var O=E?e.value():e,k=D?t.value():t;return v||=new n,_(O,k,h,g,v)}}return T?(v||=new n,a(e,t,h,g,_,v)):!1}t.exports=h})),cf=o(((e,t)=>{var n=sf(),r=Lo();function i(e,t,a,o,s){return e===t?!0:e==null||t==null||!r(e)&&!r(t)?e!==e&&t!==t:n(e,t,a,o,i,s)}t.exports=i})),lf=o(((e,t)=>{var n=yd(),r=cf(),i=1,a=2;function o(e,t,o,s){var c=o.length,l=c,u=!s;if(e==null)return!l;for(e=Object(e);c--;){var d=o[c];if(u&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++c<l;){d=o[c];var f=d[0],p=e[f],m=d[1];if(u&&d[2]){if(p===void 0&&!(f in e))return!1}else{var h=new n;if(s)var g=s(p,m,f,e,t,h);if(!(g===void 0?r(m,p,i|a,s,h):g))return!1}}return!0}t.exports=o})),uf=o(((e,t)=>{var n=Bo();function r(e){return e===e&&!n(e)}t.exports=r})),df=o(((e,t)=>{var n=uf(),r=Qd();function i(e){for(var t=r(e),i=t.length;i--;){var a=t[i],o=e[a];t[i]=[a,o,n(o)]}return t}t.exports=i})),ff=o(((e,t)=>{function n(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}t.exports=n})),pf=o(((e,t)=>{var n=lf(),r=df(),i=ff();function a(e){var t=r(e);return t.length==1&&t[0][2]?i(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}t.exports=a})),mf=o(((e,t)=>{function n(e,t){return e!=null&&t in Object(e)}t.exports=n})),hf=o(((e,t)=>{var n=ws(),r=Ld(),i=jo(),a=Bd(),o=Vd(),s=Ts();function c(e,t,c){t=n(t,e);for(var l=-1,u=t.length,d=!1;++l<u;){var f=s(t[l]);if(!(d=e!=null&&c(e,f)))break;e=e[f]}return d||++l!=u?d:(u=e==null?0:e.length,!!u&&o(u)&&a(f,u)&&(i(e)||r(e)))}t.exports=c})),gf=o(((e,t)=>{var n=mf(),r=hf();function i(e,t){return e!=null&&r(e,t,n)}t.exports=i})),_f=o(((e,t)=>{var n=cf(),r=Ds(),i=gf(),a=zo(),o=uf(),s=ff(),c=Ts(),l=1,u=2;function d(e,t){return a(e)&&o(t)?s(c(e),t):function(a){var o=r(a,e);return o===void 0&&o===t?i(a,e):n(t,o,l|u)}}t.exports=d})),vf=o(((e,t)=>{function n(e){return e}t.exports=n})),yf=o(((e,t)=>{function n(e){return function(t){return t?.[e]}}t.exports=n})),bf=o(((e,t)=>{var n=Es();function r(e){return function(t){return n(t,e)}}t.exports=r})),xf=o(((e,t)=>{var n=yf(),r=bf(),i=zo(),a=Ts();function o(e){return i(e)?n(a(e)):r(e)}t.exports=o})),Sf=o(((e,t)=>{var n=pf(),r=_f(),i=vf(),a=jo(),o=xf();function s(e){return typeof e==`function`?e:e==null?i:typeof e==`object`?a(e)?r(e[0],e[1]):n(e):o(e)}t.exports=s})),Cf=o(((e,t)=>{function n(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}t.exports=n})),wf=o(((e,t)=>{function n(e){return e!==e}t.exports=n})),Tf=o(((e,t)=>{function n(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}t.exports=n})),Ef=o(((e,t)=>{var n=Cf(),r=wf(),i=Tf();function a(e,t,a){return t===t?i(e,t,a):n(e,r,a)}t.exports=a})),Df=o(((e,t)=>{var n=Ef();function r(e,t){return!!(e!=null&&e.length)&&n(e,t,0)>-1}t.exports=r})),Of=o(((e,t)=>{function n(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}t.exports=n})),kf=o(((e,t)=>{function n(){}t.exports=n})),Af=o(((e,t)=>{var n=rf(),r=kf(),i=Od();t.exports=n&&1/i(new n([,-0]))[1]==1/0?function(e){return new n(e)}:r})),jf=o(((e,t)=>{var n=Sd(),r=Df(),i=Of(),a=wd(),o=Af(),s=Od(),c=200;function l(e,t,l){var u=-1,d=r,f=e.length,p=!0,m=[],h=m;if(l)p=!1,d=i;else if(f>=c){var g=t?null:o(e);if(g)return s(g);p=!1,d=a,h=new n}else h=t?[]:m;outer:for(;++u<f;){var _=e[u],v=t?t(_):_;if(_=l||_!==0?_:0,p&&v===v){for(var y=h.length;y--;)if(h[y]===v)continue outer;t&&h.push(v),m.push(_)}else d(h,v,l)||(h!==m&&h.push(v),m.push(_))}return m}t.exports=l})),Mf=l(o(((e,t)=>{var n=Sf(),r=jf();function i(e,t){return e&&e.length?r(e,n(t,2)):[]}t.exports=i}))());function Nf(e,t,n){return t===!0?(0,Mf.default)(e,n):(0,X.default)(t)?(0,Mf.default)(e,t):e}function Pf(e){"@babel/helpers - typeof";return Pf=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Pf(e)}var Ff=[`ref`];function If(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Lf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?If(Object(n),!0).forEach(function(t){Jf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):If(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Rf(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function zf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,Yf(r.key),r)}}function Bf(e,t,n){return t&&zf(e.prototype,t),n&&zf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Vf(e,t,n){return t=Gf(t),Hf(e,Wf()?Reflect.construct(t,n||[],Gf(e).constructor):t.apply(e,n))}function Hf(e,t){if(t&&(Pf(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Uf(e)}function Uf(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function Wf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Wf=function(){return!!e})()}function Gf(e){return Gf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Gf(e)}function Kf(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qf(e,t)}function qf(e,t){return qf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},qf(e,t)}function Jf(e,t,n){return t=Yf(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yf(e){var t=Xf(e,`string`);return Pf(t)==`symbol`?t:t+``}function Xf(e,t){if(Pf(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Pf(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Zf(e,t){if(e==null)return{};var n=Qf(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Qf(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function $f(e){return e.value}function ep(e,t){if(v.isValidElement(e))return v.cloneElement(e,t);if(typeof e==`function`)return v.createElement(e,t);t.ref;var n=Zf(t,Ff);return v.createElement(pd,n)}var tp=1,np=function(e){function t(){var e;Rf(this,t);var n=[...arguments];return e=Vf(this,t,[].concat(n)),Jf(e,`lastBoundingBox`,{width:-1,height:-1}),e}return Kf(t,e),Bf(t,[{key:`componentDidMount`,value:function(){this.updateBBox()}},{key:`componentDidUpdate`,value:function(){this.updateBBox()}},{key:`getBBox`,value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();return e.height=this.wrapperNode.offsetHeight,e.width=this.wrapperNode.offsetWidth,e}return null}},{key:`updateBBox`,value:function(){var e=this.props.onBBoxUpdate,t=this.getBBox();t?(Math.abs(t.width-this.lastBoundingBox.width)>tp||Math.abs(t.height-this.lastBoundingBox.height)>tp)&&(this.lastBoundingBox.width=t.width,this.lastBoundingBox.height=t.height,e&&e(t)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,e&&e(null))}},{key:`getBBoxSnapshot`,value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Lf({},this.lastBoundingBox):{width:0,height:0}}},{key:`getDefaultPosition`,value:function(e){var t=this.props,n=t.layout,r=t.align,i=t.verticalAlign,a=t.margin,o=t.chartWidth,s=t.chartHeight,c,l;if(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null)){if(r===`center`&&n===`vertical`){var u=this.getBBoxSnapshot();c={left:((o||0)-u.width)/2}}else c=r===`right`?{right:a&&a.right||0}:{left:a&&a.left||0}}if(!e||(e.top===void 0||e.top===null)&&(e.bottom===void 0||e.bottom===null)){if(i===`middle`){var d=this.getBBoxSnapshot();l={top:((s||0)-d.height)/2}}else l=i===`bottom`?{bottom:a&&a.bottom||0}:{top:a&&a.top||0}}return Lf(Lf({},c),l)}},{key:`render`,value:function(){var e=this,t=this.props,n=t.content,r=t.width,i=t.height,a=t.wrapperStyle,o=t.payloadUniqBy,s=t.payload,c=Lf(Lf({position:`absolute`,width:r||`auto`,height:i||`auto`},this.getDefaultPosition(a)),a);return v.createElement(`div`,{className:`recharts-legend-wrapper`,style:c,ref:function(t){e.wrapperNode=t}},ep(n,Lf(Lf({},this.props),{},{payload:Nf(s,o,$f)})))}}],[{key:`getWithHeight`,value:function(e,t){var n=Lf(Lf({},this.defaultProps),e.props).layout;return n===`vertical`&&Y(e.props.height)?{height:e.props.height}:n===`horizontal`?{width:e.props.width||t}:null}}])}(v.PureComponent);Jf(np,`displayName`,`Legend`),Jf(np,`defaultProps`,{iconSize:14,layout:`horizontal`,align:`center`,verticalAlign:`bottom`});var rp=o(((e,t)=>{var n=Po(),r=Ld(),i=jo(),a=n?n.isConcatSpreadable:void 0;function o(e){return i(e)||r(e)||!!(a&&e&&e[a])}t.exports=o})),ip=o(((e,t)=>{var n=Ad(),r=rp();function i(e,t,a,o,s){var c=-1,l=e.length;for(a||=r,s||=[];++c<l;){var u=e[c];t>0&&a(u)?t>1?i(u,t-1,a,o,s):n(s,u):o||(s[s.length]=u)}return s}t.exports=i})),ap=o(((e,t)=>{function n(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}t.exports=n})),op=o(((e,t)=>{t.exports=ap()()})),sp=o(((e,t)=>{var n=op(),r=Qd();function i(e,t){return e&&n(e,t,r)}t.exports=i})),cp=o(((e,t)=>{var n=Zd();function r(e,t){return function(r,i){if(r==null)return r;if(!n(r))return e(r,i);for(var a=r.length,o=t?a:-1,s=Object(r);(t?o--:++o<a)&&i(s[o],o,s)!==!1;);return r}}t.exports=r})),lp=o(((e,t)=>{var n=sp();t.exports=cp()(n)})),up=o(((e,t)=>{var n=lp(),r=Zd();function i(e,t){var i=-1,a=r(e)?Array(e.length):[];return n(e,function(e,n,r){a[++i]=t(e,n,r)}),a}t.exports=i})),dp=o(((e,t)=>{function n(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}t.exports=n})),fp=o(((e,t)=>{var n=Ro();function r(e,t){if(e!==t){var r=e!==void 0,i=e===null,a=e===e,o=n(e),s=t!==void 0,c=t===null,l=t===t,u=n(t);if(!c&&!u&&!o&&e>t||o&&s&&l&&!c&&!u||i&&s&&l||!r&&l||!a)return 1;if(!i&&!o&&!u&&e<t||u&&r&&a&&!i&&!o||c&&r&&a||!s&&a||!l)return-1}return 0}t.exports=r})),pp=o(((e,t)=>{var n=fp();function r(e,t,r){for(var i=-1,a=e.criteria,o=t.criteria,s=a.length,c=r.length;++i<s;){var l=n(a[i],o[i]);if(l)return i>=c?l:l*(r[i]==`desc`?-1:1)}return e.index-t.index}t.exports=r})),mp=o(((e,t)=>{var n=xs(),r=Es(),i=Sf(),a=up(),o=dp(),s=Ud(),c=pp(),l=vf(),u=jo();function d(e,t,d){t=t.length?n(t,function(e){return u(e)?function(t){return r(t,e.length===1?e[0]:e)}:e}):[l];var f=-1;return t=n(t,s(i)),o(a(e,function(e,r,i){return{criteria:n(t,function(t){return t(e)}),index:++f,value:e}}),function(e,t){return c(e,t,d)})}t.exports=d})),hp=o(((e,t)=>{function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}t.exports=n})),gp=o(((e,t)=>{var n=hp(),r=Math.max;function i(e,t,i){return t=r(t===void 0?e.length-1:t,0),function(){for(var a=arguments,o=-1,s=r(a.length-t,0),c=Array(s);++o<s;)c[o]=a[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=a[o];return l[t]=i(c),n(e,this,l)}}t.exports=i})),_p=o(((e,t)=>{function n(e){return function(){return e}}t.exports=n})),vp=o(((e,t)=>{var n=qo();t.exports=function(){try{var e=n(Object,`defineProperty`);return e({},``,{}),e}catch{}}()})),yp=o(((e,t)=>{var n=_p(),r=vp(),i=vf();t.exports=r?function(e,t){return r(e,`toString`,{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i})),bp=o(((e,t)=>{var n=Date.now;function r(e){var t=0,r=0;return function(){var i=n(),a=16-(i-r);if(r=i,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}t.exports=r})),xp=o(((e,t)=>{var n=yp();t.exports=bp()(n)})),Sp=o(((e,t)=>{var n=vf(),r=gp(),i=xp();function a(e,t){return i(r(e,t,n),e+``)}t.exports=a})),Cp=o(((e,t)=>{var n=ns(),r=Zd(),i=Bd(),a=Bo();function o(e,t,o){if(!a(o))return!1;var s=typeof t;return(s==`number`?r(o)&&i(t,o.length):s==`string`&&t in o)?n(o[t],e):!1}t.exports=o})),wp=l(o(((e,t)=>{var n=ip(),r=mp(),i=Sp(),a=Cp();t.exports=i(function(e,t){if(e==null)return[];var i=t.length;return i>1&&a(e,t[0],t[1])?t=[]:i>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),r(e,n(t,1),[])})}))());function Tp(e){"@babel/helpers - typeof";return Tp=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Tp(e)}function Ep(){return Ep=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ep.apply(this,arguments)}function Dp(e,t){return Mp(e)||jp(e,t)||kp(e,t)||Op()}function Op(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
20
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kp(e,t){if(e){if(typeof e==`string`)return Ap(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ap(e,t)}}function Ap(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function jp(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Mp(e){if(Array.isArray(e))return e}function Np(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Pp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Np(Object(n),!0).forEach(function(t){Fp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Np(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Fp(e,t,n){return t=Ip(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ip(e){var t=Lp(e,`string`);return Tp(t)==`symbol`?t:t+``}function Lp(e,t){if(Tp(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Tp(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Rp(e){return Array.isArray(e)&&Vs(e[0])&&Vs(e[1])?e.join(` ~ `):e}var zp=function(e){var t=e.separator,n=t===void 0?` : `:t,r=e.contentStyle,i=r===void 0?{}:r,a=e.itemStyle,o=a===void 0?{}:a,s=e.labelStyle,c=s===void 0?{}:s,l=e.payload,u=e.formatter,d=e.itemSorter,f=e.wrapperClassName,p=e.labelClassName,m=e.label,h=e.labelFormatter,g=e.accessibilityLayer,_=g!==void 0&&g,y=function(){if(l&&l.length){var e={padding:0,margin:0},t=(d?(0,wp.default)(l,d):l).map(function(e,t){if(e.type===`none`)return null;var r=Pp({display:`block`,paddingTop:4,paddingBottom:4,color:e.color||`#000`},o),i=e.formatter||u||Rp,a=e.value,s=e.name,c=a,d=s;if(i&&c!=null&&d!=null){var f=i(a,s,e,t,l);if(Array.isArray(f)){var p=Dp(f,2);c=p[0],d=p[1]}else c=f}return v.createElement(`li`,{className:`recharts-tooltip-item`,key:`tooltip-item-${t}`,style:r},Vs(d)?v.createElement(`span`,{className:`recharts-tooltip-item-name`},d):null,Vs(d)?v.createElement(`span`,{className:`recharts-tooltip-item-separator`},n):null,v.createElement(`span`,{className:`recharts-tooltip-item-value`},c),v.createElement(`span`,{className:`recharts-tooltip-item-unit`},e.unit||``))});return v.createElement(`ul`,{className:`recharts-tooltip-item-list`,style:e},t)}return null},b=Pp({margin:0,padding:10,backgroundColor:`#fff`,border:`1px solid #ccc`,whiteSpace:`nowrap`},i),x=Pp({margin:0},c),S=!(0,J.default)(m),C=S?m:``,w=K(`recharts-default-tooltip`,f),T=K(`recharts-tooltip-label`,p);S&&h&&l!=null&&(C=h(m,l));var E=_?{role:`status`,"aria-live":`assertive`}:{};return v.createElement(`div`,Ep({className:w,style:b},E),v.createElement(`p`,{className:T,style:x},v.isValidElement(C)?C:`${C}`),y())};function Bp(e){"@babel/helpers - typeof";return Bp=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Bp(e)}function Vp(e,t,n){return t=Hp(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hp(e){var t=Up(e,`string`);return Bp(t)==`symbol`?t:t+``}function Up(e,t){if(Bp(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Bp(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Wp=`recharts-tooltip-wrapper`,Gp={visibility:`hidden`};function Kp(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return K(Wp,Vp(Vp(Vp(Vp({},`${Wp}-right`,Y(n)&&t&&Y(t.x)&&n>=t.x),`${Wp}-left`,Y(n)&&t&&Y(t.x)&&n<t.x),`${Wp}-bottom`,Y(r)&&t&&Y(t.y)&&r>=t.y),`${Wp}-top`,Y(r)&&t&&Y(t.y)&&r<t.y))}function qp(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,a=e.position,o=e.reverseDirection,s=e.tooltipDimension,c=e.viewBox,l=e.viewBoxDimension;if(a&&Y(a[r]))return a[r];var u=n[r]-s-i,d=n[r]+i;return t[r]?o[r]?u:d:o[r]?u<c[r]?Math.max(d,c[r]):Math.max(u,c[r]):d+s>c[r]+l?Math.max(u,c[r]):Math.max(d,c[r])}function Jp(e){var t=e.translateX,n=e.translateY;return{transform:e.useTranslate3d?`translate3d(${t}px, ${n}px, 0)`:`translate(${t}px, ${n}px)`}}function Yp(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,c=e.viewBox,l,u,d;return o.height>0&&o.width>0&&n?(u=qp({allowEscapeViewBox:t,coordinate:n,key:`x`,offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),d=qp({allowEscapeViewBox:t,coordinate:n,key:`y`,offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),l=Jp({translateX:u,translateY:d,useTranslate3d:s})):l=Gp,{cssProperties:l,cssClasses:Kp({translateX:u,translateY:d,coordinate:n})}}function Xp(e){"@babel/helpers - typeof";return Xp=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Xp(e)}function Zp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Zp(Object(n),!0).forEach(function(t){lm(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zp(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $p(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function em(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,um(r.key),r)}}function tm(e,t,n){return t&&em(e.prototype,t),n&&em(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function nm(e,t,n){return t=om(t),rm(e,am()?Reflect.construct(t,n||[],om(e).constructor):t.apply(e,n))}function rm(e,t){if(t&&(Xp(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return im(e)}function im(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function am(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(am=function(){return!!e})()}function om(e){return om=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},om(e)}function sm(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cm(e,t)}function cm(e,t){return cm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cm(e,t)}function lm(e,t,n){return t=um(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function um(e){var t=dm(e,`string`);return Xp(t)==`symbol`?t:t+``}function dm(e,t){if(Xp(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Xp(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var fm=1,pm=function(e){function t(){var e;$p(this,t);var n=[...arguments];return e=nm(this,t,[].concat(n)),lm(e,`state`,{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),lm(e,`handleKeyDown`,function(t){t.key===`Escape`&&e.setState({dismissed:!0,dismissedAtCoordinate:{x:e.props.coordinate?.x??0,y:e.props.coordinate?.y??0}})}),e}return sm(t,e),tm(t,[{key:`updateBBox`,value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.state.lastBoundingBox.width)>fm||Math.abs(e.height-this.state.lastBoundingBox.height)>fm)&&this.setState({lastBoundingBox:{width:e.width,height:e.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:`componentDidMount`,value:function(){document.addEventListener(`keydown`,this.handleKeyDown),this.updateBBox()}},{key:`componentWillUnmount`,value:function(){document.removeEventListener(`keydown`,this.handleKeyDown)}},{key:`componentDidUpdate`,value:function(){this.props.active&&this.updateBBox(),this.state.dismissed&&(this.props.coordinate?.x!==this.state.dismissedAtCoordinate.x||this.props.coordinate?.y!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:`render`,value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,i=t.animationDuration,a=t.animationEasing,o=t.children,s=t.coordinate,c=t.hasPayload,l=t.isAnimationActive,u=t.offset,d=t.position,f=t.reverseDirection,p=t.useTranslate3d,m=t.viewBox,h=t.wrapperStyle,g=Yp({allowEscapeViewBox:r,coordinate:s,offsetTopLeft:u,position:d,reverseDirection:f,tooltipBox:this.state.lastBoundingBox,useTranslate3d:p,viewBox:m}),_=g.cssClasses,y=g.cssProperties,b=Qp(Qp({transition:l&&n?`transform ${i}ms ${a}`:void 0},y),{},{pointerEvents:`none`,visibility:!this.state.dismissed&&n&&c?`visible`:`hidden`,position:`absolute`,top:0,left:0},h);return v.createElement(`div`,{tabIndex:-1,className:_,style:b,ref:function(t){e.wrapperNode=t}},o)}}])}(v.PureComponent),mm={isSsr:function(){return!(typeof window<`u`&&window.document&&window.document.createElement&&window.setTimeout)}(),get:function(e){return mm[e]},set:function(e,t){if(typeof e==`string`)mm[e]=t;else{var n=Object.keys(e);n&&n.length&&n.forEach(function(t){mm[t]=e[t]})}}};function hm(e){"@babel/helpers - typeof";return hm=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},hm(e)}function gm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _m(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?gm(Object(n),!0).forEach(function(t){Om(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function vm(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function ym(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,km(r.key),r)}}function bm(e,t,n){return t&&ym(e.prototype,t),n&&ym(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function xm(e,t,n){return t=Tm(t),Sm(e,wm()?Reflect.construct(t,n||[],Tm(e).constructor):t.apply(e,n))}function Sm(e,t){if(t&&(hm(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Cm(e)}function Cm(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function wm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wm=function(){return!!e})()}function Tm(e){return Tm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Tm(e)}function Em(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dm(e,t)}function Dm(e,t){return Dm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Dm(e,t)}function Om(e,t,n){return t=km(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function km(e){var t=Am(e,`string`);return hm(t)==`symbol`?t:t+``}function Am(e,t){if(hm(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(hm(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function jm(e){return e.dataKey}function Mm(e,t){return v.isValidElement(e)?v.cloneElement(e,t):typeof e==`function`?v.createElement(e,t):v.createElement(zp,t)}var Nm=function(e){function t(){return vm(this,t),xm(this,t,arguments)}return Em(t,e),bm(t,[{key:`render`,value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,i=t.animationDuration,a=t.animationEasing,o=t.content,s=t.coordinate,c=t.filterNull,l=t.isAnimationActive,u=t.offset,d=t.payload,f=t.payloadUniqBy,p=t.position,m=t.reverseDirection,h=t.useTranslate3d,g=t.viewBox,_=t.wrapperStyle,y=d??[];c&&y.length&&(y=Nf(d.filter(function(t){return t.value!=null&&(t.hide!==!0||e.props.includeHidden)}),f,jm));var b=y.length>0;return v.createElement(pm,{allowEscapeViewBox:r,animationDuration:i,animationEasing:a,isAnimationActive:l,active:n,coordinate:s,hasPayload:b,offset:u,position:p,reverseDirection:m,useTranslate3d:h,viewBox:g,wrapperStyle:_},Mm(o,_m(_m({},this.props),{},{payload:y})))}}])}(v.PureComponent);Om(Nm,`displayName`,`Tooltip`),Om(Nm,`defaultProps`,{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:`ease`,contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!mm.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:` : `,trigger:`hover`,useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var Pm=o(((e,t)=>{var n=No();t.exports=function(){return n.Date.now()}})),Fm=o(((e,t)=>{var n=/\s/;function r(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}t.exports=r})),Im=o(((e,t)=>{var n=Fm(),r=/^\s+/;function i(e){return e&&e.slice(0,n(e)+1).replace(r,``)}t.exports=i})),Lm=o(((e,t)=>{var n=Im(),r=Bo(),i=Ro(),a=NaN,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;function u(e){if(typeof e==`number`)return e;if(i(e))return a;if(r(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=r(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=n(e);var u=s.test(e);return u||c.test(e)?l(e.slice(2),u?2:8):o.test(e)?a:+e}t.exports=u})),Rm=o(((e,t)=>{var n=Bo(),r=Pm(),i=Lm(),a=`Expected a function`,o=Math.max,s=Math.min;function c(e,t,c){var l,u,d,f,p,m,h=0,g=!1,_=!1,v=!0;if(typeof e!=`function`)throw TypeError(a);t=i(t)||0,n(c)&&(g=!!c.leading,_=`maxWait`in c,d=_?o(i(c.maxWait)||0,t):d,v=`trailing`in c?!!c.trailing:v);function y(t){var n=l,r=u;return l=u=void 0,h=t,f=e.apply(r,n),f}function b(e){return h=e,p=setTimeout(C,t),g?y(e):f}function x(e){var n=e-m,r=e-h,i=t-n;return _?s(i,d-r):i}function S(e){var n=e-m,r=e-h;return m===void 0||n>=t||n<0||_&&r>=d}function C(){var e=r();if(S(e))return w(e);p=setTimeout(C,x(e))}function w(e){return p=void 0,v&&l?y(e):(l=u=void 0,f)}function T(){p!==void 0&&clearTimeout(p),h=0,l=m=u=p=void 0}function E(){return p===void 0?f:w(r())}function D(){var e=r(),n=S(e);if(l=arguments,u=this,m=e,n){if(p===void 0)return b(m);if(_)return clearTimeout(p),p=setTimeout(C,t),y(m)}return p===void 0&&(p=setTimeout(C,t)),f}return D.cancel=T,D.flush=E,D}t.exports=c})),zm=l(o(((e,t)=>{var n=Rm(),r=Bo(),i=`Expected a function`;function a(e,t,a){var o=!0,s=!0;if(typeof e!=`function`)throw TypeError(i);return r(a)&&(o=`leading`in a?!!a.leading:o,s=`trailing`in a?!!a.trailing:s),n(e,t,{leading:o,maxWait:t,trailing:s})}t.exports=a}))());function Bm(e){"@babel/helpers - typeof";return Bm=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Bm(e)}function Vm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Hm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Vm(Object(n),!0).forEach(function(t){Um(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Um(e,t,n){return t=Wm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wm(e){var t=Gm(e,`string`);return Bm(t)==`symbol`?t:t+``}function Gm(e,t){if(Bm(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Bm(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Km(e,t){return Zm(e)||Xm(e,t)||Jm(e,t)||qm()}function qm(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
21
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jm(e,t){if(e){if(typeof e==`string`)return Ym(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ym(e,t)}}function Ym(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Xm(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Zm(e){if(Array.isArray(e))return e}var Qm=(0,v.forwardRef)(function(e,t){var n=e.aspect,r=e.initialDimension,i=r===void 0?{width:-1,height:-1}:r,a=e.width,o=a===void 0?`100%`:a,s=e.height,c=s===void 0?`100%`:s,l=e.minWidth,u=l===void 0?0:l,d=e.minHeight,f=e.maxHeight,p=e.children,m=e.debounce,h=m===void 0?0:m,g=e.id,_=e.className,y=e.onResize,b=e.style,x=b===void 0?{}:b,S=(0,v.useRef)(null),C=(0,v.useRef)();C.current=y,(0,v.useImperativeHandle)(t,function(){return Object.defineProperty(S.current,"current",{get:function(){return console.warn(`The usage of ref.current.current is deprecated and will no longer be supported.`),S.current},configurable:!0})});var w=Km((0,v.useState)({containerWidth:i.width,containerHeight:i.height}),2),T=w[0],E=w[1],D=(0,v.useCallback)(function(e,t){E(function(n){var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);(0,v.useEffect)(function(){var e=function(e){var t,n=e[0].contentRect,r=n.width,i=n.height;D(r,i),(t=C.current)==null||t.call(C,r,i)};h>0&&(e=(0,zm.default)(e,h,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=S.current.getBoundingClientRect(),r=n.width,i=n.height;return D(r,i),t.observe(S.current),function(){t.disconnect()}},[D,h]);var O=(0,v.useMemo)(function(){var e=T.containerWidth,t=T.containerHeight;if(e<0||t<0)return null;zs(o)||zs(c);var r=zs(o)?e:o,i=zs(c)?t:c;n&&n>0&&(r?i=r/n:i&&(r=i*n),f&&i>f&&(i=f));var a=!Array.isArray(p)&&hc(p.type).endsWith(`Chart`);return v.Children.map(p,function(e){return v.isValidElement(e)?(0,v.cloneElement)(e,Hm({width:r,height:i},a?{style:Hm({height:`100%`,width:`100%`,maxHeight:i,maxWidth:r},e.props.style)}:{})):e})},[n,p,c,f,d,u,T,o]);return v.createElement(`div`,{id:g?`${g}`:void 0,className:K(`recharts-responsive-container`,_),style:Hm(Hm({},x),{},{width:o,height:c,minWidth:u,minHeight:d,maxHeight:f}),ref:S},O)}),$m=function(e){return null};$m.displayName=`Cell`;function eh(e){"@babel/helpers - typeof";return eh=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},eh(e)}function th(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?th(Object(n),!0).forEach(function(t){rh(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):th(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function rh(e,t,n){return t=ih(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ih(e){var t=ah(e,`string`);return eh(t)==`symbol`?t:t+``}function ah(e,t){if(eh(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(eh(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var oh={widthCache:{},cacheCount:0},sh=2e3,ch={position:`absolute`,top:`-20000px`,left:0,padding:0,margin:0,border:`none`,whiteSpace:`pre`},lh=`recharts_measurement_span`;function uh(e){var t=nh({},e);return Object.keys(t).forEach(function(e){t[e]||delete t[e]}),t}var dh=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e==null||mm.isSsr)return{width:0,height:0};var n=uh(t),r=JSON.stringify({text:e,copyStyle:n});if(oh.widthCache[r])return oh.widthCache[r];try{var i=document.getElementById(lh);i||(i=document.createElement(`span`),i.setAttribute(`id`,lh),i.setAttribute(`aria-hidden`,`true`),document.body.appendChild(i));var a=nh(nh({},ch),n);Object.assign(i.style,a),i.textContent=`${e}`;var o=i.getBoundingClientRect(),s={width:o.width,height:o.height};return oh.widthCache[r]=s,++oh.cacheCount>sh&&(oh.cacheCount=0,oh.widthCache={}),s}catch{return{width:0,height:0}}},fh=function(e){return{top:e.top+window.scrollY-document.documentElement.clientTop,left:e.left+window.scrollX-document.documentElement.clientLeft}};function ph(e){"@babel/helpers - typeof";return ph=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},ph(e)}function mh(e,t){return yh(e)||vh(e,t)||gh(e,t)||hh()}function hh(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
22
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gh(e,t){if(e){if(typeof e==`string`)return _h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _h(e,t)}}function _h(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function vh(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function yh(e){if(Array.isArray(e))return e}function bh(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function xh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,Ch(r.key),r)}}function Sh(e,t,n){return t&&xh(e.prototype,t),n&&xh(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ch(e){var t=wh(e,`string`);return ph(t)==`symbol`?t:t+``}function wh(e,t){if(ph(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(ph(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Th=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Eh=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Dh=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Oh=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,kh={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},Ah=Object.keys(kh),jh=`NaN`;function Mh(e,t){return e*kh[t]}var Nh=function(){function e(t,n){bh(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=``),n!==``&&!Dh.test(n)&&(this.num=NaN,this.unit=``),Ah.includes(n)&&(this.num=Mh(t,n),this.unit=`px`)}return Sh(e,[{key:`add`,value:function(t){return this.unit===t.unit?new e(this.num+t.num,this.unit):new e(NaN,``)}},{key:`subtract`,value:function(t){return this.unit===t.unit?new e(this.num-t.num,this.unit):new e(NaN,``)}},{key:`multiply`,value:function(t){return this.unit!==``&&t.unit!==``&&this.unit!==t.unit?new e(NaN,``):new e(this.num*t.num,this.unit||t.unit)}},{key:`divide`,value:function(t){return this.unit!==``&&t.unit!==``&&this.unit!==t.unit?new e(NaN,``):new e(this.num/t.num,this.unit||t.unit)}},{key:`toString`,value:function(){return`${this.num}${this.unit}`}},{key:`isNaN`,value:function(){return Number.isNaN(this.num)}}],[{key:`parse`,value:function(t){var n=mh(Oh.exec(t)??[],3),r=n[1],i=n[2];return new e(parseFloat(r),i??``)}}])}();function Ph(e){if(e.includes(jh))return jh;for(var t=e;t.includes(`*`)||t.includes(`/`);){var n=mh(Th.exec(t)??[],4),r=n[1],i=n[2],a=n[3],o=Nh.parse(r??``),s=Nh.parse(a??``),c=i===`*`?o.multiply(s):o.divide(s);if(c.isNaN())return jh;t=t.replace(Th,c.toString())}for(;t.includes(`+`)||/.-\d+(?:\.\d+)?/.test(t);){var l=mh(Eh.exec(t)??[],4),u=l[1],d=l[2],f=l[3],p=Nh.parse(u??``),m=Nh.parse(f??``),h=d===`+`?p.add(m):p.subtract(m);if(h.isNaN())return jh;t=t.replace(Eh,h.toString())}return t}var Fh=/\(([^()]*)\)/;function Ih(e){for(var t=e;t.includes(`(`);){var n=mh(Fh.exec(t),2)[1];t=t.replace(Fh,Ph(n))}return t}function Lh(e){var t=e.replace(/\s+/g,``);return t=Ih(t),t=Ph(t),t}function Rh(e){try{return Lh(e)}catch{return jh}}function zh(e){var t=Rh(e.slice(5,-1));return t===jh?``:t}var Bh=[`x`,`y`,`lineHeight`,`capHeight`,`scaleToFit`,`textAnchor`,`verticalAnchor`,`fill`],Vh=[`dx`,`dy`,`angle`,`className`,`breakAll`];function Hh(){return Hh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hh.apply(this,arguments)}function Uh(e,t){if(e==null)return{};var n=Wh(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Wh(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Gh(e,t){return Xh(e)||Yh(e,t)||qh(e,t)||Kh()}function Kh(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
23
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qh(e,t){if(e){if(typeof e==`string`)return Jh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jh(e,t)}}function Jh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Yh(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Xh(e){if(Array.isArray(e))return e}var Zh=/[ \f\n\r\t\v\u2028\u2029]+/,Qh=function(e){var t=e.children,n=e.breakAll,r=e.style;try{var i=[];return(0,J.default)(t)||(i=n?t.toString().split(``):t.toString().split(Zh)),{wordsWithComputedWidth:i.map(function(e){return{word:e,width:dh(e,r).width}}),spaceWidth:n?0:dh(`\xA0`,r).width}}catch{return null}},$h=function(e,t,n,r,i){var a=e.maxLines,o=e.children,s=e.style,c=e.breakAll,l=Y(a),u=o,d=function(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).reduce(function(e,t){var a=t.word,o=t.width,s=e[e.length-1];if(s&&(r==null||i||s.width+o+n<Number(r)))s.words.push(a),s.width+=o+n;else{var c={words:[a],width:o};e.push(c)}return e},[])},f=d(t),p=function(e){return e.reduce(function(e,t){return e.width>t.width?e:t})};if(!l)return f;for(var m=`…`,h=function(e){var t=Qh({breakAll:c,style:s,children:u.slice(0,e)+m}).wordsWithComputedWidth,n=d(t);return[n.length>a||p(n).width>Number(r),n]},g=0,_=u.length-1,v=0,y;g<=_&&v<=u.length-1;){var b=Math.floor((g+_)/2),x=Gh(h(b-1),2),S=x[0],C=x[1],w=Gh(h(b),1)[0];if(!S&&!w&&(g=b+1),S&&w&&(_=b-1),!S&&w){y=C;break}v++}return y||f},eg=function(e){return[{words:(0,J.default)(e)?[]:e.toString().split(Zh)}]},tg=function(e){var t=e.width,n=e.scaleToFit,r=e.children,i=e.style,a=e.breakAll,o=e.maxLines;if((t||n)&&!mm.isSsr){var s,c,l=Qh({breakAll:a,children:r,style:i});if(l){var u=l.wordsWithComputedWidth,d=l.spaceWidth;s=u,c=d}else return eg(r);return $h({breakAll:a,children:r,maxLines:o,style:i},s,c,t,n)}return eg(r)},ng=`#808080`,rg=function(e){var t=e.x,n=t===void 0?0:t,r=e.y,i=r===void 0?0:r,a=e.lineHeight,o=a===void 0?`1em`:a,s=e.capHeight,c=s===void 0?`0.71em`:s,l=e.scaleToFit,u=l!==void 0&&l,d=e.textAnchor,f=d===void 0?`start`:d,p=e.verticalAnchor,m=p===void 0?`end`:p,h=e.fill,g=h===void 0?ng:h,_=Uh(e,Bh),y=(0,v.useMemo)(function(){return tg({breakAll:_.breakAll,children:_.children,maxLines:_.maxLines,scaleToFit:u,style:_.style,width:_.width})},[_.breakAll,_.children,_.maxLines,u,_.style,_.width]),b=_.dx,x=_.dy,S=_.angle,C=_.className,w=_.breakAll,T=Uh(_,Vh);if(!Vs(n)||!Vs(i))return null;var E=n+(Y(b)?b:0),D=i+(Y(x)?x:0),O;switch(m){case`start`:O=zh(`calc(${c})`);break;case`middle`:O=zh(`calc(${(y.length-1)/2} * -${o} + (${c} / 2))`);break;default:O=zh(`calc(${y.length-1} * -${o})`)}var k=[];if(u){var A=y[0].width,j=_.width;k.push(`scale(${(Y(j)?j/A:1)/A})`)}return S&&k.push(`rotate(${S}, ${E}, ${D})`),k.length&&(T.transform=k.join(` `)),v.createElement(`text`,Hh({},Z(T,!0),{x:E,y:D,className:K(`recharts-text`,C),textAnchor:f,fill:g.includes(`url`)?ng:g}),y.map(function(e,t){var n=e.words.join(w?``:` `);return v.createElement(`tspan`,{x:E,dy:t===0?O:o,key:`${n}-${t}`},n)}))};function ig(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ag(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function og(e){let t,n,r;e.length===2?(t=e===ig||e===ag?e:sg,n=e,r=e):(t=ig,n=(t,n)=>ig(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function sg(){return 0}function cg(e){return e===null?NaN:+e}function*lg(e,t){if(t===void 0)for(let t of e)t!=null&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}var ug=og(ig),dg=ug.right;ug.left,og(cg).center;var fg=class extends Map{constructor(e,t=gg){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(pg(this,e))}has(e){return super.has(pg(this,e))}set(e,t){return super.set(mg(this,e),t)}delete(e){return super.delete(hg(this,e))}};function pg({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function mg({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function hg({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function gg(e){return typeof e==`object`&&e?e.valueOf():e}function _g(e=ig){if(e===ig)return vg;if(typeof e!=`function`)throw TypeError(`compare is not a function`);return(t,n)=>{let r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function vg(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:+(e>t))}Array.prototype.slice;var yg=Math.sqrt(50),bg=Math.sqrt(10),xg=Math.sqrt(2);function Sg(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=yg?10:a>=bg?5:a>=xg?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?Sg(e,t,n*2):[s,c,l]}function Cg(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?Sg(t,e,n):Sg(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r){if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o}else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function wg(e,t,n){return t=+t,e=+e,n=+n,Sg(e,t,n)[2]}function Tg(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?wg(t,e,n):wg(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function Eg(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Dg(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Og(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?vg:_g(i);r>n;){if(r-n>600){let a=r-n+1,o=t-n+1,s=Math.log(a),c=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*c*(a-c)/a)*(o-a/2<0?-1:1),u=Math.max(n,Math.floor(t-o*c/a+l)),d=Math.min(r,Math.floor(t+(a-o)*c/a+l));Og(e,t,u,d,i)}let a=e[t],o=n,s=r;for(kg(e,n,t),i(e[r],a)>0&&kg(e,n,r);o<s;){for(kg(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[n],a)===0?kg(e,n,s):(++s,kg(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function kg(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}function Ag(e,t,n){if(e=Float64Array.from(lg(e,n)),(r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return Dg(e);if(t>=1)return Eg(e);var r,i=(r-1)*t,a=Math.floor(i),o=Eg(Og(e,a).subarray(0,a+1));return o+(Dg(e.subarray(a+1))-o)*(i-a)}}function jg(e,t,n=cg){if((r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e);return o+(+n(e[a+1],a+1,e)-o)*(i-a)}}function Mg(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}function Ng(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Pg(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Fg(){}var Ig=.7,Lg=1/Ig,Rg=`\\s*([+-]?\\d+)\\s*`,zg=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,Bg=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,Vg=/^#([0-9a-f]{3,8})$/,Hg=RegExp(`^rgb\\(${Rg},${Rg},${Rg}\\)$`),Ug=RegExp(`^rgb\\(${Bg},${Bg},${Bg}\\)$`),Wg=RegExp(`^rgba\\(${Rg},${Rg},${Rg},${zg}\\)$`),Gg=RegExp(`^rgba\\(${Bg},${Bg},${Bg},${zg}\\)$`),Kg=RegExp(`^hsl\\(${zg},${Bg},${Bg}\\)$`),qg=RegExp(`^hsla\\(${zg},${Bg},${Bg},${zg}\\)$`),Jg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ng(Fg,$g,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Yg,formatHex:Yg,formatHex8:Xg,formatHsl:Zg,formatRgb:Qg,toString:Qg});function Yg(){return this.rgb().formatHex()}function Xg(){return this.rgb().formatHex8()}function Zg(){return f_(this).formatHsl()}function Qg(){return this.rgb().formatRgb()}function $g(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=Vg.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?e_(t):n===3?new i_(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?t_(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?t_(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Hg.exec(e))?new i_(t[1],t[2],t[3],1):(t=Ug.exec(e))?new i_(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Wg.exec(e))?t_(t[1],t[2],t[3],t[4]):(t=Gg.exec(e))?t_(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Kg.exec(e))?d_(t[1],t[2]/100,t[3]/100,1):(t=qg.exec(e))?d_(t[1],t[2]/100,t[3]/100,t[4]):Jg.hasOwnProperty(e)?e_(Jg[e]):e===`transparent`?new i_(NaN,NaN,NaN,0):null}function e_(e){return new i_(e>>16&255,e>>8&255,e&255,1)}function t_(e,t,n,r){return r<=0&&(e=t=n=NaN),new i_(e,t,n,r)}function n_(e){return e instanceof Fg||(e=$g(e)),e?(e=e.rgb(),new i_(e.r,e.g,e.b,e.opacity)):new i_}function r_(e,t,n,r){return arguments.length===1?n_(e):new i_(e,t,n,r??1)}function i_(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Ng(i_,r_,Pg(Fg,{brighter(e){return e=e==null?Lg:Lg**+e,new i_(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ig:Ig**+e,new i_(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new i_(l_(this.r),l_(this.g),l_(this.b),c_(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:a_,formatHex:a_,formatHex8:o_,formatRgb:s_,toString:s_}));function a_(){return`#${u_(this.r)}${u_(this.g)}${u_(this.b)}`}function o_(){return`#${u_(this.r)}${u_(this.g)}${u_(this.b)}${u_((isNaN(this.opacity)?1:this.opacity)*255)}`}function s_(){let e=c_(this.opacity);return`${e===1?`rgb(`:`rgba(`}${l_(this.r)}, ${l_(this.g)}, ${l_(this.b)}${e===1?`)`:`, ${e})`}`}function c_(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function l_(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function u_(e){return e=l_(e),(e<16?`0`:``)+e.toString(16)}function d_(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new m_(e,t,n,r)}function f_(e){if(e instanceof m_)return new m_(e.h,e.s,e.l,e.opacity);if(e instanceof Fg||(e=$g(e)),!e)return new m_;if(e instanceof m_)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new m_(o,s,c,e.opacity)}function p_(e,t,n,r){return arguments.length===1?f_(e):new m_(e,t,n,r??1)}function m_(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Ng(m_,p_,Pg(Fg,{brighter(e){return e=e==null?Lg:Lg**+e,new m_(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ig:Ig**+e,new m_(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new i_(__(e>=240?e-240:e+120,i,r),__(e,i,r),__(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new m_(h_(this.h),g_(this.s),g_(this.l),c_(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=c_(this.opacity);return`${e===1?`hsl(`:`hsla(`}${h_(this.h)}, ${g_(this.s)*100}%, ${g_(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function h_(e){return e=(e||0)%360,e<0?e+360:e}function g_(e){return Math.max(0,Math.min(1,e||0))}function __(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var v_=Math.PI/180,y_=180/Math.PI,b_=18,x_=.96422,S_=1,C_=.82521,w_=4/29,T_=6/29,E_=3*T_*T_,D_=T_*T_*T_;function O_(e){if(e instanceof A_)return new A_(e.l,e.a,e.b,e.opacity);if(e instanceof L_)return R_(e);e instanceof i_||(e=n_(e));var t=P_(e.r),n=P_(e.g),r=P_(e.b),i=j_((.2225045*t+.7168786*n+.0606169*r)/S_),a,o;return t===n&&n===r?a=o=i:(a=j_((.4360747*t+.3850649*n+.1430804*r)/x_),o=j_((.0139322*t+.0971045*n+.7141733*r)/C_)),new A_(116*i-16,500*(a-i),200*(i-o),e.opacity)}function k_(e,t,n,r){return arguments.length===1?O_(e):new A_(e,t,n,r??1)}function A_(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}Ng(A_,k_,Pg(Fg,{brighter(e){return new A_(this.l+b_*(e??1),this.a,this.b,this.opacity)},darker(e){return new A_(this.l-b_*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=x_*M_(t),e=S_*M_(e),n=C_*M_(n),new i_(N_(3.1338561*t-1.6168667*e-.4906146*n),N_(-.9787684*t+1.9161415*e+.033454*n),N_(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function j_(e){return e>D_?e**(1/3):e/E_+w_}function M_(e){return e>T_?e*e*e:E_*(e-w_)}function N_(e){return 255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055)}function P_(e){return(e/=255)<=.04045?e/12.92:((e+.055)/1.055)**2.4}function F_(e){if(e instanceof L_)return new L_(e.h,e.c,e.l,e.opacity);if(e instanceof A_||(e=O_(e)),e.a===0&&e.b===0)return new L_(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*y_;return new L_(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function I_(e,t,n,r){return arguments.length===1?F_(e):new L_(e,t,n,r??1)}function L_(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function R_(e){if(isNaN(e.h))return new A_(e.l,0,0,e.opacity);var t=e.h*v_;return new A_(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Ng(L_,I_,Pg(Fg,{brighter(e){return new L_(this.h,this.c,this.l+b_*(e??1),this.opacity)},darker(e){return new L_(this.h,this.c,this.l-b_*(e??1),this.opacity)},rgb(){return R_(this).rgb()}}));var z_=-.14861,B_=1.78277,V_=-.29227,H_=-.90649,U_=1.97294,W_=U_*H_,G_=U_*B_,K_=B_*V_-H_*z_;function q_(e){if(e instanceof Y_)return new Y_(e.h,e.s,e.l,e.opacity);e instanceof i_||(e=n_(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(K_*r+W_*t-G_*n)/(K_+W_-G_),a=r-i,o=(U_*(n-i)-V_*a)/H_,s=Math.sqrt(o*o+a*a)/(U_*i*(1-i)),c=s?Math.atan2(o,a)*y_-120:NaN;return new Y_(c<0?c+360:c,s,i,e.opacity)}function J_(e,t,n,r){return arguments.length===1?q_(e):new Y_(e,t,n,r??1)}function Y_(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Ng(Y_,J_,Pg(Fg,{brighter(e){return e=e==null?Lg:Lg**+e,new Y_(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ig:Ig**+e,new Y_(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*v_,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new i_(255*(t+n*(z_*r+B_*i)),255*(t+n*(V_*r+H_*i)),255*(t+U_*r*n),this.opacity)}}));var X_=e=>()=>e;function Z_(e,t){return function(n){return e+n*t}}function Q_(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function $_(e,t){var n=t-e;return n?Z_(e,n>180||n<-180?n-360*Math.round(n/360):n):X_(isNaN(e)?t:e)}function ev(e){return(e=+e)==1?tv:function(t,n){return n-t?Q_(t,n,e):X_(isNaN(t)?n:t)}}function tv(e,t){var n=t-e;return n?Z_(e,n):X_(isNaN(e)?t:e)}var nv=(function e(t){var n=ev(t);function r(e,t){var r=n((e=r_(e)).r,(t=r_(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=tv(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function rv(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function iv(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function av(e,t){for(var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o=0;o<r;++o)i[o]=mv(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function ov(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function sv(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function cv(e,t){var n={},r={},i;for(i in typeof e==`object`&&e||(e={}),typeof t==`object`&&t||(t={}),t)i in e?n[i]=mv(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var lv=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,uv=new RegExp(lv.source,`g`);function dv(e){return function(){return e}}function fv(e){return function(t){return e(t)+``}}function pv(e,t){var n=lv.lastIndex=uv.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=lv.exec(e))&&(i=uv.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:sv(r,i)})),n=uv.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?fv(c[0].x):dv(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function mv(e,t){var n=typeof t,r;return t==null||n===`boolean`?X_(t):(n===`number`?sv:n===`string`?(r=$g(t))?(t=r,nv):pv:t instanceof $g?nv:t instanceof Date?ov:iv(t)?rv:Array.isArray(t)?av:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?cv:sv)(e,t)}function hv(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var gv=1e-12;function _v(e){return((e=Math.exp(e))+1/e)/2}function vv(e){return((e=Math.exp(e))-1/e)/2}function yv(e){return((e=Math.exp(2*e))-1)/(e+1)}(function e(t,n,r){function i(e,i){var a=e[0],o=e[1],s=e[2],c=i[0],l=i[1],u=i[2],d=c-a,f=l-o,p=d*d+f*f,m,h;if(p<gv)h=Math.log(u/s)/t,m=function(e){return[a+e*d,o+e*f,s*Math.exp(t*e*h)]};else{var g=Math.sqrt(p),_=(u*u-s*s+r*p)/(2*s*n*g),v=(u*u-s*s-r*p)/(2*u*n*g),y=Math.log(Math.sqrt(_*_+1)-_);h=(Math.log(Math.sqrt(v*v+1)-v)-y)/t,m=function(e){var r=e*h,i=_v(y),c=s/(n*g)*(i*yv(t*r+y)-vv(y));return[a+c*d,o+c*f,s*i/_v(t*r+y)]}}return m.duration=Math.abs(h)*1e3*t/Math.SQRT2,m}return i.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},i})(Math.SQRT2,2,4);function bv(e){return(function t(n){n=+n;function r(t,r){var i=e((t=J_(t)).h,(r=J_(r)).h),a=tv(t.s,r.s),o=tv(t.l,r.l),s=tv(t.opacity,r.opacity);return function(e){return t.h=i(e),t.s=a(e),t.l=o(e**+n),t.opacity=s(e),t+``}}return r.gamma=t,r})(1)}bv($_),bv(tv);function xv(e,t){t===void 0&&(t=e,e=mv);for(var n=0,r=t.length-1,i=t[0],a=Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return a[t](e-t)}}function Sv(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function Cv(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function wv(e){return e=Cv(Math.abs(e)),e?e[1]:NaN}function Tv(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function Ev(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var Dv=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ov(e){if(!(t=Dv.exec(e)))throw Error(`invalid format: `+e);var t;return new kv({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Ov.prototype=kv.prototype;function kv(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}kv.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function Av(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(i+1):e}var jv;function Mv(e,t){var n=Cv(e,t);if(!n)return jv=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(jv=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+Cv(e,Math.max(0,t+a-1))[0]}function Nv(e,t){var n=Cv(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var Pv={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:Sv,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Nv(e*100,t),r:Nv,s:Mv,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Fv(e){return e}var Iv=Array.prototype.map,Lv=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function Rv(e){var t=e.grouping===void 0||e.thousands===void 0?Fv:Tv(Iv.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?Fv:Ev(Iv.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e,l){e=Ov(e);var u=e.fill,d=e.align,f=e.sign,p=e.symbol,m=e.zero,h=e.width,g=e.comma,_=e.precision,v=e.trim,y=e.type;y===`n`?(g=!0,y=`g`):Pv[y]||(_===void 0&&(_=12),v=!0,y=`g`),(m||u===`0`&&d===`=`)&&(m=!0,u=`0`,d=`=`);var b=(l&&l.prefix!==void 0?l.prefix:``)+(p===`$`?n:p===`#`&&/[boxX]/.test(y)?`0`+y.toLowerCase():``),x=(p===`$`?r:/[%p]/.test(y)?o:``)+(l&&l.suffix!==void 0?l.suffix:``),S=Pv[y],C=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function w(e){var n=b,r=x,o,l,p;if(y===`c`)r=S(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:S(Math.abs(e),_),v&&(e=Av(e)),w&&+e==0&&f!==`+`&&(w=!1),n=(w?f===`(`?f:s:f===`-`||f===`(`?``:f)+n,r=(y===`s`&&!isNaN(e)&&jv!==void 0?Lv[8+jv/3]:``)+r+(w&&f===`(`?`)`:``),C){for(o=-1,l=e.length;++o<l;)if(p=e.charCodeAt(o),48>p||p>57){r=(p===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}g&&!m&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<h?Array(h-T+1).join(u):``;switch(g&&m&&(e=t(E+e,E.length?h-r.length:1/0),E=``),d){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r}return a(e)}return w.toString=function(){return e+``},w}function u(e,t){var n=Math.max(-8,Math.min(8,Math.floor(wv(t)/3)))*3,r=10**-n,i=l((e=Ov(e),e.type=`f`,e),{suffix:Lv[8+n/3]});return function(e){return i(r*e)}}return{format:l,formatPrefix:u}}var zv,Bv,Vv;Hv({thousands:`,`,grouping:[3],currency:[`$`,``]});function Hv(e){return zv=Rv(e),Bv=zv.format,Vv=zv.formatPrefix,zv}function Uv(e){return Math.max(0,-wv(Math.abs(e)))}function Wv(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(wv(t)/3)))*3-wv(Math.abs(e)))}function Gv(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,wv(t)-wv(e))+1}var Kv=new Date,qv=new Date;function Jv(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>Jv(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e){if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}}),n&&(i.count=(t,r)=>(Kv.setTime(+t),qv.setTime(+r),e(Kv),e(qv),Math.floor(n(Kv,qv))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var Yv=Jv(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Yv.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Jv(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Yv),Yv.range;var Xv=1e3,Zv=Xv*60,Qv=Zv*60,$v=Qv*24,ey=$v*7,ty=$v*30,ny=$v*365,ry=Jv(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Xv)},(e,t)=>(t-e)/Xv,e=>e.getUTCSeconds());ry.range;var iy=Jv(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Xv)},(e,t)=>{e.setTime(+e+t*Zv)},(e,t)=>(t-e)/Zv,e=>e.getMinutes());iy.range;var ay=Jv(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Zv)},(e,t)=>(t-e)/Zv,e=>e.getUTCMinutes());ay.range;var oy=Jv(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Xv-e.getMinutes()*Zv)},(e,t)=>{e.setTime(+e+t*Qv)},(e,t)=>(t-e)/Qv,e=>e.getHours());oy.range;var sy=Jv(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Qv)},(e,t)=>(t-e)/Qv,e=>e.getUTCHours());sy.range;var cy=Jv(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Zv)/$v,e=>e.getDate()-1);cy.range;var ly=Jv(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/$v,e=>e.getUTCDate()-1);ly.range;var uy=Jv(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/$v,e=>Math.floor(e/$v));uy.range;function dy(e){return Jv(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Zv)/ey)}var fy=dy(0),py=dy(1),my=dy(2),hy=dy(3),gy=dy(4),_y=dy(5),vy=dy(6);fy.range,py.range,my.range,hy.range,gy.range,_y.range,vy.range;function yy(e){return Jv(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/ey)}var by=yy(0),xy=yy(1),Sy=yy(2),Cy=yy(3),wy=yy(4),Ty=yy(5),Ey=yy(6);by.range,xy.range,Sy.range,Cy.range,wy.range,Ty.range,Ey.range;var Dy=Jv(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Dy.range;var Oy=Jv(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Oy.range;var ky=Jv(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());ky.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Jv(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),ky.range;var Ay=Jv(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Ay.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Jv(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),Ay.range;function jy(e,t,n,r,i,a){let o=[[ry,1,Xv],[ry,5,5*Xv],[ry,15,15*Xv],[ry,30,30*Xv],[a,1,Zv],[a,5,5*Zv],[a,15,15*Zv],[a,30,30*Zv],[i,1,Qv],[i,3,3*Qv],[i,6,6*Qv],[i,12,12*Qv],[r,1,$v],[r,2,2*$v],[n,1,ey],[t,1,ty],[t,3,3*ty],[e,1,ny]];function s(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let i=n&&typeof n.range==`function`?n:c(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a}function c(t,n,r){let i=Math.abs(n-t)/r,a=og(([,,e])=>e).right(o,i);if(a===o.length)return e.every(Tg(t/ny,n/ny,r));if(a===0)return Yv.every(Math.max(Tg(t,n,r),1));let[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[s,c]}var[My,Ny]=jy(Ay,Oy,by,uy,sy,ay),[Py,Fy]=jy(ky,Dy,fy,cy,oy,iy);function Iy(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Ly(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Ry(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function zy(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=Ky(i),u=qy(i),d=Ky(a),f=qy(a),p=Ky(o),m=qy(o),h=Ky(s),g=qy(s),_=Ky(c),v=qy(c),y={a:te,A:ne,b:re,B:ie,c:null,d:mb,e:mb,f:yb,g:Ab,G:Mb,H:hb,I:gb,j:_b,L:vb,m:bb,M:xb,p:ae,q:oe,Q:tx,s:nx,S:Sb,u:Cb,U:wb,V:Eb,w:Db,W:Ob,x:null,X:null,y:kb,Y:jb,Z:Nb,"%":ex},b={a:se,A:ce,b:le,B:ue,c:null,d:Pb,e:Pb,f:zb,g:Xb,G:Qb,H:Fb,I:Ib,j:Lb,L:Rb,m:Bb,M:Vb,p:de,q:fe,Q:tx,s:nx,S:Hb,u:Ub,U:Wb,V:Kb,w:qb,W:Jb,x:null,X:null,y:Yb,Y:Zb,Z:$b,"%":ex},x={a:E,A:D,b:O,B:k,c:A,d:ib,e:ib,f:ub,g:eb,G:$y,H:ob,I:ob,j:ab,L:lb,m:rb,M:sb,p:T,q:nb,Q:fb,s:pb,S:cb,u:Yy,U:Xy,V:Zy,w:Jy,W:Qy,x:j,X:ee,y:eb,Y:$y,Z:tb,"%":db};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=By[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=Ry(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=Ly(Ry(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?xy.ceil(a):xy(a),a=ly.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=Iy(Ry(r.y,0,1)),o=a.getDay(),a=o>4||o===0?py.ceil(a):py(a),a=cy.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else(`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?Ly(Ry(r.y,0,1)).getUTCDay():Iy(Ry(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,Ly(r)):Iy(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in By?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function A(e,n,r){return w(e,t,n,r)}function j(e,t,r){return w(e,n,t,r)}function ee(e,t,n){return w(e,r,t,n)}function te(e){return o[e.getDay()]}function ne(e){return a[e.getDay()]}function re(e){return c[e.getMonth()]}function ie(e){return s[e.getMonth()]}function ae(e){return i[+(e.getHours()>=12)]}function oe(e){return 1+~~(e.getMonth()/3)}function se(e){return o[e.getUTCDay()]}function ce(e){return a[e.getUTCDay()]}function le(e){return c[e.getUTCMonth()]}function ue(e){return s[e.getUTCMonth()]}function de(e){return i[+(e.getUTCHours()>=12)]}function fe(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var By={"-":``,_:` `,0:`0`},Vy=/^\s*\d+/,Hy=/^%/,Uy=/[\\^$*+?|[\]().{}]/g;function Wy(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function Gy(e){return e.replace(Uy,`\\$&`)}function Ky(e){return RegExp(`^(?:`+e.map(Gy).join(`|`)+`)`,`i`)}function qy(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function Jy(e,t,n){var r=Vy.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Yy(e,t,n){var r=Vy.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Xy(e,t,n){var r=Vy.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Zy(e,t,n){var r=Vy.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Qy(e,t,n){var r=Vy.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function $y(e,t,n){var r=Vy.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function eb(e,t,n){var r=Vy.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function tb(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function nb(e,t,n){var r=Vy.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function rb(e,t,n){var r=Vy.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ib(e,t,n){var r=Vy.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function ab(e,t,n){var r=Vy.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function ob(e,t,n){var r=Vy.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function sb(e,t,n){var r=Vy.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function cb(e,t,n){var r=Vy.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function lb(e,t,n){var r=Vy.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function ub(e,t,n){var r=Vy.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function db(e,t,n){var r=Hy.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function fb(e,t,n){var r=Vy.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function pb(e,t,n){var r=Vy.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function mb(e,t){return Wy(e.getDate(),t,2)}function hb(e,t){return Wy(e.getHours(),t,2)}function gb(e,t){return Wy(e.getHours()%12||12,t,2)}function _b(e,t){return Wy(1+cy.count(ky(e),e),t,3)}function vb(e,t){return Wy(e.getMilliseconds(),t,3)}function yb(e,t){return vb(e,t)+`000`}function bb(e,t){return Wy(e.getMonth()+1,t,2)}function xb(e,t){return Wy(e.getMinutes(),t,2)}function Sb(e,t){return Wy(e.getSeconds(),t,2)}function Cb(e){var t=e.getDay();return t===0?7:t}function wb(e,t){return Wy(fy.count(ky(e)-1,e),t,2)}function Tb(e){var t=e.getDay();return t>=4||t===0?gy(e):gy.ceil(e)}function Eb(e,t){return e=Tb(e),Wy(gy.count(ky(e),e)+(ky(e).getDay()===4),t,2)}function Db(e){return e.getDay()}function Ob(e,t){return Wy(py.count(ky(e)-1,e),t,2)}function kb(e,t){return Wy(e.getFullYear()%100,t,2)}function Ab(e,t){return e=Tb(e),Wy(e.getFullYear()%100,t,2)}function jb(e,t){return Wy(e.getFullYear()%1e4,t,4)}function Mb(e,t){var n=e.getDay();return e=n>=4||n===0?gy(e):gy.ceil(e),Wy(e.getFullYear()%1e4,t,4)}function Nb(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+Wy(t/60|0,`0`,2)+Wy(t%60,`0`,2)}function Pb(e,t){return Wy(e.getUTCDate(),t,2)}function Fb(e,t){return Wy(e.getUTCHours(),t,2)}function Ib(e,t){return Wy(e.getUTCHours()%12||12,t,2)}function Lb(e,t){return Wy(1+ly.count(Ay(e),e),t,3)}function Rb(e,t){return Wy(e.getUTCMilliseconds(),t,3)}function zb(e,t){return Rb(e,t)+`000`}function Bb(e,t){return Wy(e.getUTCMonth()+1,t,2)}function Vb(e,t){return Wy(e.getUTCMinutes(),t,2)}function Hb(e,t){return Wy(e.getUTCSeconds(),t,2)}function Ub(e){var t=e.getUTCDay();return t===0?7:t}function Wb(e,t){return Wy(by.count(Ay(e)-1,e),t,2)}function Gb(e){var t=e.getUTCDay();return t>=4||t===0?wy(e):wy.ceil(e)}function Kb(e,t){return e=Gb(e),Wy(wy.count(Ay(e),e)+(Ay(e).getUTCDay()===4),t,2)}function qb(e){return e.getUTCDay()}function Jb(e,t){return Wy(xy.count(Ay(e)-1,e),t,2)}function Yb(e,t){return Wy(e.getUTCFullYear()%100,t,2)}function Xb(e,t){return e=Gb(e),Wy(e.getUTCFullYear()%100,t,2)}function Zb(e,t){return Wy(e.getUTCFullYear()%1e4,t,4)}function Qb(e,t){var n=e.getUTCDay();return e=n>=4||n===0?wy(e):wy.ceil(e),Wy(e.getUTCFullYear()%1e4,t,4)}function $b(){return`+0000`}function ex(){return`%`}function tx(e){return+e}function nx(e){return Math.floor(e/1e3)}var rx,ix,ax,ox;sx({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function sx(e){return rx=zy(e),ix=rx.format,rx.parse,ax=rx.utcFormat,ox=rx.utcParse,rx}var cx=`%Y-%m-%dT%H:%M:%S.%LZ`;Date.prototype.toISOString||ax(cx),+new Date(`2000-01-01T00:00:00.000Z`)||ox(cx);function lx(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function ux(e,t){switch(arguments.length){case 0:break;case 1:typeof e==`function`?this.interpolator(e):this.range(e);break;default:this.domain(e),typeof t==`function`?this.interpolator(t):this.range(t)}return this}var dx=Symbol(`implicit`);function fx(){var e=new fg,t=[],n=[],r=dx;function i(i){let a=e.get(i);if(a===void 0){if(r!==dx)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new fg;for(let r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return fx(t,n).unknown(r)},lx.apply(i,arguments),i}function px(){var e=fx().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var e=t().length,d=i<r,f=d?i:r,p=d?r:i;a=(p-f)/Math.max(1,e-c+l*2),s&&(a=Math.floor(a)),f+=(p-f-a*(e-c))*u,o=a*(1-c),s&&(f=Math.round(f),o=Math.round(o));var m=Mg(e).map(function(e){return f+a*e});return n(d?m.reverse():m)}return e.domain=function(e){return arguments.length?(t(e),d()):t()},e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(e){return arguments.length?(s=!!e,d()):s},e.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},e.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},e.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},e.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},e.copy=function(){return px(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},lx.apply(d(),arguments)}function mx(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return mx(t())},e}function hx(){return mx(px.apply(null,arguments).paddingInner(1))}function gx(e){return function(){return e}}function _x(e){return+e}var vx=[0,1];function yx(e){return e}function bx(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:gx(isNaN(t)?NaN:.5)}function xx(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function Sx(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=bx(i,r),a=n(o,a)):(r=bx(r,i),a=n(a,o)),function(e){return a(r(e))}}function Cx(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=bx(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=dg(e,t,1,r)-1;return a[n](i[n](t))}}function wx(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Tx(){var e=vx,t=vx,n=mv,r,i,a,o=yx,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==yx&&(o=xx(e[0],e[n-1])),s=n>2?Cx:Sx,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||=s(e.map(r),t,n))(r(o(i)))}return d.invert=function(n){return o(i((l||=s(t,e.map(r),sv))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,_x),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=hv,u()},d.clamp=function(e){return arguments.length?(o=e?!0:yx,u()):o!==yx},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function Ex(){return Tx()(yx,yx)}function Dx(e,t,n,r){var i=Tg(e,t,n),a;switch(r=Ov(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=Wv(i,o))&&(r.precision=a),Vv(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=Gv(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=Uv(i))&&(r.precision=a-(r.type===`%`)*2)}return Bv(r)}function Ox(e){var t=e.domain;return e.ticks=function(e){var n=t();return Cg(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return Dx(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-->0;){if(l=wg(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function kx(){var e=Ex();return e.copy=function(){return wx(e,kx())},lx.apply(e,arguments),Ox(e)}function Ax(e){var t;function n(e){return e==null||isNaN(e=+e)?t:e}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Array.from(t,_x),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return Ax(e).unknown(t)},e=arguments.length?Array.from(e,_x):[0,1],Ox(n)}function jx(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function Mx(e){return Math.log(e)}function Nx(e){return Math.exp(e)}function Px(e){return-Math.log(-e)}function Fx(e){return-Math.exp(-e)}function Ix(e){return isFinite(e)?+(`1e`+e):e<0?0:e}function Lx(e){return e===10?Ix:e===Math.E?Math.exp:t=>e**+t}function Rx(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function zx(e){return(t,n)=>-e(-t,n)}function Bx(e){let t=e(Mx,Nx),n=t.domain,r=10,i,a;function o(){return i=Rx(r),a=Lx(r),n()[0]<0?(i=zx(i),a=zx(a),e(Px,Fx)):e(Mx,Nx),t}return t.base=function(e){return arguments.length?(r=+e,o()):r},t.domain=function(e){return arguments.length?(n(e),o()):n()},t.ticks=e=>{let t=n(),o=t[0],s=t[t.length-1],c=s<o;c&&([o,s]=[s,o]);let l=i(o),u=i(s),d,f,p=e==null?10:+e,m=[];if(!(r%1)&&u-l<p){if(l=Math.floor(l),u=Math.ceil(u),o>0){for(;l<=u;++l)for(d=1;d<r;++d)if(f=l<0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}}else for(;l<=u;++l)for(d=r-1;d>=1;--d)if(f=l>0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}m.length*2<p&&(m=Cg(o,s,p))}else m=Cg(l,u,Math.min(u-l,p)).map(a);return c?m.reverse():m},t.tickFormat=(e,n)=>{if(e??=10,n??=r===10?`s`:`,`,typeof n!=`function`&&(!(r%1)&&(n=Ov(n)).precision==null&&(n.trim=!0),n=Bv(n)),e===1/0)return n;let o=Math.max(1,r*e/t.ticks().length);return e=>{let t=e/a(Math.round(i(e)));return t*r<r-.5&&(t*=r),t<=o?n(e):``}},t.nice=()=>n(jx(n(),{floor:e=>a(Math.floor(i(e))),ceil:e=>a(Math.ceil(i(e)))})),t}function Vx(){let e=Bx(Tx()).domain([1,10]);return e.copy=()=>wx(e,Vx()).base(e.base()),lx.apply(e,arguments),e}function Hx(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Ux(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Wx(e){var t=1,n=e(Hx(t),Ux(t));return n.constant=function(n){return arguments.length?e(Hx(t=+n),Ux(t)):t},Ox(n)}function Gx(){var e=Wx(Tx());return e.copy=function(){return wx(e,Gx()).constant(e.constant())},lx.apply(e,arguments)}function Kx(e){return function(t){return t<0?-((-t)**+e):t**+e}}function qx(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Jx(e){return e<0?-e*e:e*e}function Yx(e){var t=e(yx,yx),n=1;function r(){return n===1?e(yx,yx):n===.5?e(qx,Jx):e(Kx(n),Kx(1/n))}return t.exponent=function(e){return arguments.length?(n=+e,r()):n},Ox(t)}function Xx(){var e=Yx(Tx());return e.copy=function(){return wx(e,Xx()).exponent(e.exponent())},lx.apply(e,arguments),e}function Zx(){return Xx.apply(null,arguments).exponent(.5)}function Qx(e){return Math.sign(e)*e*e}function $x(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function eS(){var e=Ex(),t=[0,1],n=!1,r;function i(t){var i=$x(e(t));return isNaN(i)?r:n?Math.round(i):i}return i.invert=function(t){return e.invert(Qx(t))},i.domain=function(t){return arguments.length?(e.domain(t),i):e.domain()},i.range=function(n){return arguments.length?(e.range((t=Array.from(n,_x)).map(Qx)),i):t.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(n=!!e,i):n},i.clamp=function(t){return arguments.length?(e.clamp(t),i):e.clamp()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return eS(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},lx.apply(i,arguments),Ox(i)}function tS(){var e=[],t=[],n=[],r;function i(){var r=0,i=Math.max(1,t.length);for(n=Array(i-1);++r<i;)n[r-1]=jg(e,r/i);return a}function a(e){return e==null||isNaN(e=+e)?r:t[dg(n,e)]}return a.invertExtent=function(r){var i=t.indexOf(r);return i<0?[NaN,NaN]:[i>0?n[i-1]:e[0],i<n.length?n[i]:e[e.length-1]]},a.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort(ig),i()},a.range=function(e){return arguments.length?(t=Array.from(e),i()):t.slice()},a.unknown=function(e){return arguments.length?(r=e,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return tS().domain(e).range(t).unknown(r)},lx.apply(a,arguments)}function nS(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(e){return e!=null&&e<=e?i[dg(r,e,0,n)]:a}function s(){var i=-1;for(r=Array(n);++i<n;)r[i]=((i+1)*t-(i-n)*e)/(n+1);return o}return o.domain=function(n){return arguments.length?([e,t]=n,e=+e,t=+t,s()):[e,t]},o.range=function(e){return arguments.length?(n=(i=Array.from(e)).length-1,s()):i.slice()},o.invertExtent=function(a){var o=i.indexOf(a);return o<0?[NaN,NaN]:o<1?[e,r[0]]:o>=n?[r[n-1],t]:[r[o-1],r[o]]},o.unknown=function(e){return arguments.length&&(a=e),o},o.thresholds=function(){return r.slice()},o.copy=function(){return nS().domain([e,t]).range(i).unknown(a)},lx.apply(Ox(o),arguments)}function rS(){var e=[.5],t=[0,1],n,r=1;function i(i){return i!=null&&i<=i?t[dg(e,i,0,r)]:n}return i.domain=function(n){return arguments.length?(e=Array.from(n),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(n){return arguments.length?(t=Array.from(n),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(n){var r=t.indexOf(n);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(n=e,i):n},i.copy=function(){return rS().domain(e).range(t).unknown(n)},lx.apply(i,arguments)}function iS(e){return new Date(e)}function aS(e){return e instanceof Date?+e:Math.round(e)}function oS(e,t,n,r,i,a,o,s,c,l){var u=Ex(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e)<e?p:s(e)<e?m:o(e)<e?h:a(e)<e?g:r(e)<e?i(e)<e?_:v:n(e)<e?y:b)(e)}return u.invert=function(e){return new Date(Math.round(d(e)))},u.domain=function(e){return arguments.length?f(Array.from(e,aS)):f().map(iS)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return t==null?x:l(t)},u.nice=function(e){var n=f();return e&&typeof e.range==`function`||(e=t(n[0],n[n.length-1],e??10)),e?f(jx(n,e)):u},u.copy=function(){return wx(u,oS(e,t,n,r,i,a,o,s,c,l))},u}function sS(){return lx.apply(oS(Py,Fy,ky,Dy,fy,cy,oy,iy,ry,ix).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function cS(){return lx.apply(oS(My,Ny,Ay,Oy,by,ly,sy,ay,ry,ax).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function lS(){var e=0,t=1,n,r,i,a,o=yx,s=!1,c;function l(e){return e==null||isNaN(e=+e)?c:o(i===0?.5:(e=(a(e)-n)*i,s?Math.max(0,Math.min(1,e)):e))}l.domain=function(o){return arguments.length?([e,t]=o,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),l):[e,t]},l.clamp=function(e){return arguments.length?(s=!!e,l):s},l.interpolator=function(e){return arguments.length?(o=e,l):o};function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,o=e(n,r),l):[o(0),o(1)]}}return l.range=u(mv),l.rangeRound=u(hv),l.unknown=function(e){return arguments.length?(c=e,l):c},function(o){return a=o,n=o(e),r=o(t),i=n===r?0:1/(r-n),l}}function uS(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function dS(){var e=Ox(lS()(yx));return e.copy=function(){return uS(e,dS())},ux.apply(e,arguments)}function fS(){var e=Bx(lS()).domain([1,10]);return e.copy=function(){return uS(e,fS()).base(e.base())},ux.apply(e,arguments)}function pS(){var e=Wx(lS());return e.copy=function(){return uS(e,pS()).constant(e.constant())},ux.apply(e,arguments)}function mS(){var e=Yx(lS());return e.copy=function(){return uS(e,mS()).exponent(e.exponent())},ux.apply(e,arguments)}function hS(){return mS.apply(null,arguments).exponent(.5)}function gS(){var e=[],t=yx;function n(n){if(n!=null&&!isNaN(n=+n))return t((dg(e,n,1)-1)/(e.length-1))}return n.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort(ig),n},n.interpolator=function(e){return arguments.length?(t=e,n):t},n.range=function(){return e.map((n,r)=>t(r/(e.length-1)))},n.quantiles=function(t){return Array.from({length:t+1},(n,r)=>Ag(e,r/t))},n.copy=function(){return gS(t).domain(e)},ux.apply(n,arguments)}function _S(){var e=0,t=.5,n=1,r=1,i,a,o,s,c,l=yx,u,d=!1,f;function p(e){return e==null||isNaN(e=+e)?f:(e=.5+((e=+u(e))-a)*(r*e<r*a?s:c),l(d?Math.max(0,Math.min(1,e)):e))}p.domain=function(l){return arguments.length?([e,t,n]=l,i=u(e=+e),a=u(t=+t),o=u(n=+n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p):[e,t,n]},p.clamp=function(e){return arguments.length?(d=!!e,p):d},p.interpolator=function(e){return arguments.length?(l=e,p):l};function m(e){return function(t){var n,r,i;return arguments.length?([n,r,i]=t,l=xv(e,[n,r,i]),p):[l(0),l(.5),l(1)]}}return p.range=m(mv),p.rangeRound=m(hv),p.unknown=function(e){return arguments.length?(f=e,p):f},function(l){return u=l,i=l(e),a=l(t),o=l(n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p}}function vS(){var e=Ox(_S()(yx));return e.copy=function(){return uS(e,vS())},ux.apply(e,arguments)}function yS(){var e=Bx(_S()).domain([.1,1,10]);return e.copy=function(){return uS(e,yS()).base(e.base())},ux.apply(e,arguments)}function bS(){var e=Wx(_S());return e.copy=function(){return uS(e,bS()).constant(e.constant())},ux.apply(e,arguments)}function xS(){var e=Yx(_S());return e.copy=function(){return uS(e,xS()).exponent(e.exponent())},ux.apply(e,arguments)}function SS(){return xS.apply(null,arguments).exponent(.5)}var CS=s({scaleBand:()=>px,scaleDiverging:()=>vS,scaleDivergingLog:()=>yS,scaleDivergingPow:()=>xS,scaleDivergingSqrt:()=>SS,scaleDivergingSymlog:()=>bS,scaleIdentity:()=>Ax,scaleImplicit:()=>dx,scaleLinear:()=>kx,scaleLog:()=>Vx,scaleOrdinal:()=>fx,scalePoint:()=>hx,scalePow:()=>Xx,scaleQuantile:()=>tS,scaleQuantize:()=>nS,scaleRadial:()=>eS,scaleSequential:()=>dS,scaleSequentialLog:()=>fS,scaleSequentialPow:()=>mS,scaleSequentialQuantile:()=>gS,scaleSequentialSqrt:()=>hS,scaleSequentialSymlog:()=>pS,scaleSqrt:()=>Zx,scaleSymlog:()=>Gx,scaleThreshold:()=>rS,scaleTime:()=>sS,scaleUtc:()=>cS,tickFormat:()=>Dx}),wS=o(((e,t)=>{var n=Ro();function r(e,t,r){for(var i=-1,a=e.length;++i<a;){var o=e[i],s=t(o);if(s!=null&&(c===void 0?s===s&&!n(s):r(s,c)))var c=s,l=o}return l}t.exports=r})),TS=o(((e,t)=>{function n(e,t){return e>t}t.exports=n})),ES=o(((e,t)=>{var n=wS(),r=TS(),i=vf();function a(e){return e&&e.length?n(e,i,r):void 0}t.exports=a})),DS=o(((e,t)=>{function n(e,t){return e<t}t.exports=n})),OS=o(((e,t)=>{var n=wS(),r=DS(),i=vf();function a(e){return e&&e.length?n(e,i,r):void 0}t.exports=a})),kS=o(((e,t)=>{var n=xs(),r=Sf(),i=up(),a=jo();function o(e,t){return(a(e)?n:i)(e,r(t,3))}t.exports=o})),AS=o(((e,t)=>{var n=ip(),r=kS();function i(e,t){return n(r(e,t),1)}t.exports=i})),jS=o(((e,t)=>{var n=cf();function r(e,t){return n(e,t)}t.exports=r})),MS=o(((e,t,n)=>{(function(e){var n=1e9,r={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:`2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286`},i=!0,a=`[DecimalError] `,o=a+`Invalid argument: `,s=a+`Exponent out of range: `,c=Math.floor,l=Math.pow,u=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,d,f=1e7,p=7,m=9007199254740991,h=c(m/p),g={};g.absoluteValue=g.abs=function(){var e=new this.constructor(this);return e.s&&=1,e},g.comparedTo=g.cmp=function(e){var t,n,r,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1},g.decimalPlaces=g.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*p;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n},g.dividedBy=g.div=function(e){return b(this,new this.constructor(e))},g.dividedToIntegerBy=g.idiv=function(e){var t=this,n=t.constructor;return D(b(t,new n(e),0,1),n.precision)},g.equals=g.eq=function(e){return!this.cmp(e)},g.exponent=function(){return S(this)},g.greaterThan=g.gt=function(e){return this.cmp(e)>0},g.greaterThanOrEqualTo=g.gte=function(e){return this.cmp(e)>=0},g.isInteger=g.isint=function(){return this.e>this.d.length-2},g.isNegative=g.isneg=function(){return this.s<0},g.isPositive=g.ispos=function(){return this.s>0},g.isZero=function(){return this.s===0},g.lessThan=g.lt=function(e){return this.cmp(e)<0},g.lessThanOrEqualTo=g.lte=function(e){return this.cmp(e)<1},g.logarithm=g.log=function(e){var t,n=this,r=n.constructor,o=r.precision,s=o+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(d))throw Error(a+`NaN`);if(n.s<1)throw Error(a+(n.s?`NaN`:`-Infinity`));return n.eq(d)?new r(0):(i=!1,t=b(T(n,s),T(e,s),s),i=!0,D(t,o))},g.minus=g.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?O(t,e):_(t,(e.s=-e.s,e))},g.modulo=g.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(e=new r(e),!e.s)throw Error(a+`NaN`);return n.s?(i=!1,t=b(n,e,0,1).times(e),i=!0,n.minus(t)):D(new r(n),o)},g.naturalExponential=g.exp=function(){return x(this)},g.naturalLogarithm=g.ln=function(){return T(this)},g.negated=g.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},g.plus=g.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?_(t,e):O(t,(e.s=-e.s,e))},g.precision=g.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(o+e);if(t=S(i)+1,r=i.d.length-1,n=r*p+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},g.squareRoot=g.sqrt=function(){var e,t,n,r,o,s,l,u=this,d=u.constructor;if(u.s<1){if(!u.s)return new d(0);throw Error(a+`NaN`)}for(e=S(u),i=!1,o=Math.sqrt(+u),o==0||o==1/0?(t=y(u.d),(t.length+e)%2==0&&(t+=`0`),o=Math.sqrt(t),e=c((e+1)/2)-(e<0||e%2),o==1/0?t=`5e`+e:(t=o.toExponential(),t=t.slice(0,t.indexOf(`e`)+1)+e),r=new d(t)):r=new d(o.toString()),n=d.precision,o=l=n+3;;)if(s=r,r=s.plus(b(u,s,l+2)).times(.5),y(s.d).slice(0,l)===(t=y(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),o==l&&t==`4999`){if(D(s,n+1,0),s.times(s).eq(u)){r=s;break}}else if(t!=`9999`)break;l+=4}return i=!0,D(r,n)},g.times=g.mul=function(e){var t,n,r,a,o,s,c,l,u,d=this,p=d.constructor,m=d.d,h=(e=new p(e)).d;if(!d.s||!e.s)return new p(0);for(e.s*=d.s,n=d.e+e.e,l=m.length,u=h.length,l<u&&(o=m,m=h,h=o,s=l,l=u,u=s),o=[],s=l+u,r=s;r--;)o.push(0);for(r=u;--r>=0;){for(t=0,a=l+r;a>r;)c=o[a]+h[r]*m[a-r-1]+t,o[a--]=c%f|0,t=c/f|0;o[a]=(o[a]+t)%f|0}for(;!o[--s];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,i?D(e,p.precision):e},g.toDecimalPlaces=g.todp=function(e,t){var r=this,i=r.constructor;return r=new i(r),e===void 0?r:(v(e,0,n),t===void 0?t=i.rounding:v(t,0,8),D(r,e+S(r)+1,t))},g.toExponential=function(e,t){var r,i=this,a=i.constructor;return e===void 0?r=k(i,!0):(v(e,0,n),t===void 0?t=a.rounding:v(t,0,8),i=D(new a(i),e+1,t),r=k(i,!0,e+1)),r},g.toFixed=function(e,t){var r,i,a=this,o=a.constructor;return e===void 0?k(a):(v(e,0,n),t===void 0?t=o.rounding:v(t,0,8),i=D(new o(a),e+S(a)+1,t),r=k(i.abs(),!1,e+S(i)+1),a.isneg()&&!a.isZero()?`-`+r:r)},g.toInteger=g.toint=function(){var e=this,t=e.constructor;return D(new t(e),S(e)+1,t.rounding)},g.toNumber=function(){return+this},g.toPower=g.pow=function(e){var t,n,r,o,s,l,u=this,f=u.constructor,h=12,g=+(e=new f(e));if(!e.s)return new f(d);if(u=new f(u),!u.s){if(e.s<1)throw Error(a+`Infinity`);return u}if(u.eq(d))return u;if(r=f.precision,e.eq(d))return D(u,r);if(t=e.e,n=e.d.length-1,l=t>=n,s=u.s,!l){if(s<0)throw Error(a+`NaN`)}else if((n=g<0?-g:g)<=m){for(o=new f(d),t=Math.ceil(r/p+4),i=!1;n%2&&(o=o.times(u),A(o.d,t)),n=c(n/2),n!==0;)u=u.times(u),A(u.d,t);return i=!0,e.s<0?new f(d).div(o):D(o,r)}return s=s<0&&e.d[Math.max(t,n)]&1?-1:1,u.s=1,i=!1,o=e.times(T(u,r+h)),i=!0,o=x(o),o.s=s,o},g.toPrecision=function(e,t){var r,i,a=this,o=a.constructor;return e===void 0?(r=S(a),i=k(a,r<=o.toExpNeg||r>=o.toExpPos)):(v(e,1,n),t===void 0?t=o.rounding:v(t,0,8),a=D(new o(a),e,t),r=S(a),i=k(a,e<=r||r<=o.toExpNeg,e)),i},g.toSignificantDigits=g.tosd=function(e,t){var r=this,i=r.constructor;return e===void 0?(e=i.precision,t=i.rounding):(v(e,1,n),t===void 0?t=i.rounding:v(t,0,8)),D(new i(r),e,t)},g.toString=g.valueOf=g.val=g.toJSON=function(){var e=this,t=S(e),n=e.constructor;return k(e,t<=n.toExpNeg||t>=n.toExpPos)};function _(e,t){var n,r,a,o,s,c,l,u,d=e.constructor,m=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),i?D(t,m):t;if(l=e.d,u=t.d,s=e.e,a=t.e,l=l.slice(),o=s-a,o){for(o<0?(r=l,o=-o,c=u.length):(r=u,a=s,c=l.length),s=Math.ceil(m/p),c=s>c?s+1:c+1,o>c&&(o=c,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(c=l.length,o=u.length,c-o<0&&(o=c,r=u,u=l,l=r),n=0;o;)n=(l[--o]=l[o]+u[o]+n)/f|0,l[o]%=f;for(n&&(l.unshift(n),++a),c=l.length;l[--c]==0;)l.pop();return t.d=l,t.e=a,i?D(t,m):t}function v(e,t,n){if(e!==~~e||e<t||e>n)throw Error(o+e)}function y(e){var t,n,r,i=e.length-1,a=``,o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)r=e[t]+``,n=p-r.length,n&&(a+=w(n)),a+=r;o=e[t],r=o+``,n=p-r.length,n&&(a+=w(n))}else if(o===0)return`0`;for(;o%10==0;)o/=10;return a+o}var b=(function(){function e(e,t){var n,r=0,i=e.length;for(e=e.slice();i--;)n=e[i]*t+r,e[i]=n%f|0,r=n/f|0;return r&&e.unshift(r),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=+(e[n]<t[n]),e[n]=r*f+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,s){var c,l,u,d,m,h,g,_,v,y,b,x,C,w,T,E,O,k,A=r.constructor,j=r.s==i.s?1:-1,ee=r.d,te=i.d;if(!r.s)return new A(r);if(!i.s)throw Error(a+`Division by zero`);for(l=r.e-i.e,O=te.length,T=ee.length,g=new A(j),_=g.d=[],u=0;te[u]==(ee[u]||0);)++u;if(te[u]>(ee[u]||0)&&--l,x=o==null?o=A.precision:s?o+(S(r)-S(i))+1:o,x<0)return new A(0);if(x=x/p+2|0,u=0,O==1)for(d=0,te=te[0],x++;(u<T||d)&&x--;u++)C=d*f+(ee[u]||0),_[u]=C/te|0,d=C%te|0;else{for(d=f/(te[0]+1)|0,d>1&&(te=e(te,d),ee=e(ee,d),O=te.length,T=ee.length),w=O,v=ee.slice(0,O),y=v.length;y<O;)v[y++]=0;k=te.slice(),k.unshift(0),E=te[0],te[1]>=f/2&&++E;do d=0,c=t(te,v,O,y),c<0?(b=v[0],O!=y&&(b=b*f+(v[1]||0)),d=b/E|0,d>1?(d>=f&&(d=f-1),m=e(te,d),h=m.length,y=v.length,c=t(m,v,h,y),c==1&&(d--,n(m,O<h?k:te,h))):(d==0&&(c=d=1),m=te.slice()),h=m.length,h<y&&m.unshift(0),n(v,m,y),c==-1&&(y=v.length,c=t(te,v,O,y),c<1&&(d++,n(v,O<y?k:te,y))),y=v.length):c===0&&(d++,v=[0]),_[u++]=d,c&&v[0]?v[y++]=ee[w]||0:(v=[ee[w]],y=1);while((w++<T||v[0]!==void 0)&&x--)}return _[0]||_.shift(),g.e=l,D(g,s?o+S(g)+1:o)}})();function x(e,t){var n,r,a,o,c,u,f=0,p=0,m=e.constructor,h=m.precision;if(S(e)>16)throw Error(s+S(e));if(!e.s)return new m(d);for(t==null?(i=!1,u=h):u=t,c=new m(.03125);e.abs().gte(.1);)e=e.times(c),p+=5;for(r=Math.log(l(2,p))/Math.LN10*2+5|0,u+=r,n=a=o=new m(d),m.precision=u;;){if(a=D(a.times(e),u),n=n.times(++f),c=o.plus(b(a,n,u)),y(c.d).slice(0,u)===y(o.d).slice(0,u)){for(;p--;)o=D(o.times(o),u);return m.precision=h,t==null?(i=!0,D(o,h)):o}o=c}}function S(e){for(var t=e.e*p,n=e.d[0];n>=10;n/=10)t++;return t}function C(e,t,n){if(t>e.LN10.sd())throw i=!0,n&&(e.precision=n),Error(a+`LN10 precision limit exceeded`);return D(new e(e.LN10),t)}function w(e){for(var t=``;e--;)t+=`0`;return t}function T(e,t){var n,r,o,s,c,l,u,f,p,m=1,h=10,g=e,_=g.d,v=g.constructor,x=v.precision;if(g.s<1)throw Error(a+(g.s?`NaN`:`-Infinity`));if(g.eq(d))return new v(0);if(t==null?(i=!1,f=x):f=t,g.eq(10))return t??(i=!0),C(v,f);if(f+=h,v.precision=f,n=y(_),r=n.charAt(0),s=S(g),Math.abs(s)<0x5543df729c000){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)g=g.times(e),n=y(g.d),r=n.charAt(0),m++;s=S(g),r>1?(g=new v(`0.`+n),s++):g=new v(r+`.`+n.slice(1))}else return u=C(v,f+2,x).times(s+``),g=T(new v(r+`.`+n.slice(1)),f-h).plus(u),v.precision=x,t==null?(i=!0,D(g,x)):g;for(l=c=g=b(g.minus(d),g.plus(d),f),p=D(g.times(g),f),o=3;;){if(c=D(c.times(p),f),u=l.plus(b(c,new v(o),f)),y(u.d).slice(0,f)===y(l.d).slice(0,f))return l=l.times(2),s!==0&&(l=l.plus(C(v,f+2,x).times(s+``))),l=b(l,new v(m),f),v.precision=x,t==null?(i=!0,D(l,x)):l;l=u,o+=2}}function E(e,t){var n,r,a;for((n=t.indexOf(`.`))>-1&&(t=t.replace(`.`,``)),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=c(n/p),e.d=[],r=(n+1)%p,n<0&&(r+=p),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=p;r<a;)e.d.push(+t.slice(r,r+=p));t=t.slice(r),r=p-t.length}else r-=a;for(;r--;)t+=`0`;if(e.d.push(+t),i&&(e.e>h||e.e<-h))throw Error(s+n)}else e.s=0,e.e=0,e.d=[0];return e}function D(e,t,n){var r,a,o,u,d,m,g,_,v=e.d;for(u=1,o=v[0];o>=10;o/=10)u++;if(r=t-u,r<0)r+=p,a=t,g=v[_=0];else{if(_=Math.ceil((r+1)/p),o=v.length,_>=o)return e;for(g=o=v[_],u=1;o>=10;o/=10)u++;r%=p,a=r-p+u}if(n!==void 0&&(o=l(10,u-a-1),d=g/o%10|0,m=t<0||v[_+1]!==void 0||g%o,m=n<4?(d||m)&&(n==0||n==(e.s<0?3:2)):d>5||d==5&&(n==4||m||n==6&&(r>0?a>0?g/l(10,u-a):0:v[_-1])%10&1||n==(e.s<0?8:7))),t<1||!v[0])return m?(o=S(e),v.length=1,t=t-o-1,v[0]=l(10,(p-t%p)%p),e.e=c(-t/p)||0):(v.length=1,v[0]=e.e=e.s=0),e;if(r==0?(v.length=_,o=1,_--):(v.length=_+1,o=l(10,p-r),v[_]=a>0?(g/l(10,u-a)%l(10,a)|0)*o:0),m)for(;;)if(_==0){(v[0]+=o)==f&&(v[0]=1,++e.e);break}else{if(v[_]+=o,v[_]!=f)break;v[_--]=0,o=1}for(r=v.length;v[--r]===0;)v.pop();if(i&&(e.e>h||e.e<-h))throw Error(s+S(e));return e}function O(e,t){var n,r,a,o,s,c,l,u,d,m,h=e.constructor,g=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),i?D(t,g):t;if(l=e.d,m=t.d,r=t.e,u=e.e,l=l.slice(),s=u-r,s){for(d=s<0,d?(n=l,s=-s,c=m.length):(n=m,r=u,c=l.length),a=Math.max(Math.ceil(g/p),c)+2,s>a&&(s=a,n.length=1),n.reverse(),a=s;a--;)n.push(0);n.reverse()}else{for(a=l.length,c=m.length,d=a<c,d&&(c=a),a=0;a<c;a++)if(l[a]!=m[a]){d=l[a]<m[a];break}s=0}for(d&&(n=l,l=m,m=n,t.s=-t.s),c=l.length,a=m.length-c;a>0;--a)l[c++]=0;for(a=m.length;a>s;){if(l[--a]<m[a]){for(o=a;o&&l[--o]===0;)l[o]=f-1;--l[o],l[a]+=f}l[a]-=m[a]}for(;l[--c]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,i?D(t,g):t):new h(0)}function k(e,t,n){var r,i=S(e),a=y(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+`.`+a.slice(1)+w(r):o>1&&(a=a.charAt(0)+`.`+a.slice(1)),a=a+(i<0?`e`:`e+`)+i):i<0?(a=`0.`+w(-i-1)+a,n&&(r=n-o)>0&&(a+=w(r))):i>=o?(a+=w(i+1-o),n&&(r=n-i-1)>0&&(a=a+`.`+w(r))):((r=i+1)<o&&(a=a.slice(0,r)+`.`+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+=`.`),a+=w(r))),e.s<0?`-`+a:a}function A(e,t){if(e.length>t)return e.length=t,!0}function j(e){var t,n,r;function i(e){var t=this;if(!(t instanceof i))return new i(e);if(t.constructor=i,e instanceof i)t.s=e.s,t.e=e.e,t.d=(e=e.d)?e.slice():e;else{if(typeof e==`number`){if(e*0!=0)throw Error(o+e);if(e>0)t.s=1;else if(e<0)e=-e,t.s=-1;else{t.s=0,t.e=0,t.d=[0];return}if(e===~~e&&e<1e7){t.e=0,t.d=[e];return}return E(t,e.toString())}if(typeof e!=`string`)throw Error(o+e);if(e.charCodeAt(0)===45?(e=e.slice(1),t.s=-1):t.s=1,u.test(e))E(t,e);else throw Error(o+e)}}if(i.prototype=g,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=j,i.config=i.set=ee,e===void 0&&(e={}),e)for(r=[`precision`,`rounding`,`toExpNeg`,`toExpPos`,`LN10`],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function ee(e){if(!e||typeof e!=`object`)throw Error(a+`Object expected`);var t,r,i,s=[`precision`,1,n,`rounding`,0,8,`toExpNeg`,-1/0,0,`toExpPos`,0,1/0];for(t=0;t<s.length;t+=3)if((i=e[r=s[t]])!==void 0){if(c(i)===i&&i>=s[t+1]&&i<=s[t+2])this[r]=i;else throw Error(o+r+`: `+i)}if((i=e[r=`LN10`])!==void 0){if(i==Math.LN10)this[r]=new this(i);else throw Error(o+r+`: `+i)}return this}r=j(r),r.default=r.Decimal=r,d=new r(1),typeof define==`function`&&define.amd?define(function(){return r}):t!==void 0&&t.exports?t.exports=r:(e||=typeof self<`u`&&self&&self.self==self?self:Function(`return this`)(),e.Decimal=r)})(n)}));function NS(e){return LS(e)||IS(e)||FS(e)||PS()}function PS(){throw TypeError(`Invalid attempt to spread non-iterable instance.
24
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FS(e,t){if(e){if(typeof e==`string`)return RS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return RS(e,t)}}function IS(e){if(typeof Symbol<`u`&&Symbol.iterator in Object(e))return Array.from(e)}function LS(e){if(Array.isArray(e))return RS(e)}function RS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var zS=function(e){return e},BS={"@@functional/placeholder":!0},VS=function(e){return e===BS},HS=function(e){return function t(){return arguments.length===0||arguments.length===1&&VS(arguments.length<=0?void 0:arguments[0])?t:e.apply(void 0,arguments)}},US=function e(t,n){return t===1?n:HS(function(){var r=[...arguments],i=r.filter(function(e){return e!==BS}).length;return i>=t?n.apply(void 0,r):e(t-i,HS(function(){var e=[...arguments],t=r.map(function(t){return VS(t)?e.shift():t});return n.apply(void 0,NS(t).concat(e))}))})},WS=function(e){return US(e.length,e)},GS=function(e,t){for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},KS=WS(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(e){return t[e]}).map(e)}),qS=function(){var e=[...arguments];if(!e.length)return zS;var t=e.reverse(),n=t[0],r=t.slice(1);return function(){return r.reduce(function(e,t){return t(e)},n.apply(void 0,arguments))}},JS=function(e){return Array.isArray(e)?e.reverse():e.split(``).reverse.join(``)},YS=function(e){var t=null,n=null;return function(){var r=[...arguments];return t&&r.every(function(e,n){return e===t[n]})||(t=r,n=e.apply(void 0,r)),n}},XS=l(MS());function ZS(e){return e===0?1:Math.floor(new XS.default(e).abs().log(10).toNumber())+1}function QS(e,t,n){for(var r=new XS.default(e),i=0,a=[];r.lt(t)&&i<1e5;)a.push(r.toNumber()),r=r.add(n),i++;return a}var $S={rangeStep:QS,getDigitCount:ZS,interpolateNumber:WS(function(e,t,n){var r=+e;return r+n*(+t-r)}),uninterpolateNumber:WS(function(e,t,n){var r=t-+e;return r||=1/0,(n-e)/r}),uninterpolateTruncation:WS(function(e,t,n){var r=t-+e;return r||=1/0,Math.max(0,Math.min(1,(n-e)/r))})};function eC(e){return rC(e)||nC(e)||oC(e)||tC()}function tC(){throw TypeError(`Invalid attempt to spread non-iterable instance.
25
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nC(e){if(typeof Symbol<`u`&&Symbol.iterator in Object(e))return Array.from(e)}function rC(e){if(Array.isArray(e))return sC(e)}function iC(e,t){return lC(e)||cC(e,t)||oC(e,t)||aC()}function aC(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
26
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oC(e,t){if(e){if(typeof e==`string`)return sC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sC(e,t)}}function sC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function cC(e,t){if(typeof Symbol<`u`&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw a}}return n}}function lC(e){if(Array.isArray(e))return e}function uC(e){var t=iC(e,2),n=t[0],r=t[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]}function dC(e,t,n){if(e.lte(0))return new XS.default(0);var r=$S.getDigitCount(e.toNumber()),i=new XS.default(10).pow(r),a=e.div(i),o=r===1?.1:.05,s=new XS.default(Math.ceil(a.div(o).toNumber())).add(n).mul(o).mul(i);return t?s:new XS.default(Math.ceil(s))}function fC(e,t,n){var r=1,i=new XS.default(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new XS.default(10).pow($S.getDigitCount(e)-1),i=new XS.default(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new XS.default(Math.floor(e)))}else e===0?i=new XS.default(Math.floor((t-1)/2)):n||(i=new XS.default(Math.floor(e)));var o=Math.floor((t-1)/2);return qS(KS(function(e){return i.add(new XS.default(e-o).mul(r)).toNumber()}),GS)(0,t)}function pC(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new XS.default(0),tickMin:new XS.default(0),tickMax:new XS.default(0)};var a=dC(new XS.default(t).sub(e).div(n-1),r,i),o;e<=0&&t>=0?o=new XS.default(0):(o=new XS.default(e).add(t).div(2),o=o.sub(new XS.default(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),c=Math.ceil(new XS.default(t).sub(o).div(a).toNumber()),l=s+c+1;return l>n?pC(e,t,n,r,i+1):(l<n&&(c=t>0?c+(n-l):c,s=t>0?s:s+(n-l)),{step:a,tickMin:o.sub(new XS.default(s).mul(a)),tickMax:o.add(new XS.default(c).mul(a))})}function mC(e){var t=iC(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=iC(uC([n,r]),2),c=s[0],l=s[1];if(c===-1/0||l===1/0){var u=l===1/0?[c].concat(eC(GS(0,i-1).map(function(){return 1/0}))):[].concat(eC(GS(0,i-1).map(function(){return-1/0})),[l]);return n>r?JS(u):u}if(c===l)return fC(c,i,a);var d=pC(c,l,o,a),f=d.step,p=d.tickMin,m=d.tickMax,h=$S.rangeStep(p,m.add(new XS.default(.1).mul(f)),f);return n>r?JS(h):h}function hC(e,t){var n=iC(e,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=iC(uC([r,i]),2),s=o[0],c=o[1];if(s===-1/0||c===1/0)return[r,i];if(s===c)return[s];var l=Math.max(t,2),u=dC(new XS.default(c).sub(s).div(l-1),a,0),d=[].concat(eC($S.rangeStep(new XS.default(s),new XS.default(c).sub(new XS.default(.99).mul(u)),u)),[c]);return r>i?JS(d):d}var gC=YS(mC),_C=YS(hC),vC=`Invariant failed`;function yC(e,t){if(!e)throw Error(vC)}var bC=[`offset`,`layout`,`width`,`dataKey`,`data`,`dataPointFormatter`,`xAxis`,`yAxis`];function xC(e){"@babel/helpers - typeof";return xC=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},xC(e)}function SC(){return SC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},SC.apply(this,arguments)}function CC(e,t){return OC(e)||DC(e,t)||TC(e,t)||wC()}function wC(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
27
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TC(e,t){if(e){if(typeof e==`string`)return EC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return EC(e,t)}}function EC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function DC(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function OC(e){if(Array.isArray(e))return e}function kC(e,t){if(e==null)return{};var n=AC(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function AC(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function jC(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function MC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,HC(r.key),r)}}function NC(e,t,n){return t&&MC(e.prototype,t),n&&MC(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function PC(e,t,n){return t=RC(t),FC(e,LC()?Reflect.construct(t,n||[],RC(e).constructor):t.apply(e,n))}function FC(e,t){if(t&&(xC(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return IC(e)}function IC(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function LC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(LC=function(){return!!e})()}function RC(e){return RC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},RC(e)}function zC(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&BC(e,t)}function BC(e,t){return BC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},BC(e,t)}function VC(e,t,n){return t=HC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HC(e){var t=UC(e,`string`);return xC(t)==`symbol`?t:t+``}function UC(e,t){if(xC(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(xC(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var WC=function(e){function t(){return jC(this,t),PC(this,t,arguments)}return zC(t,e),NC(t,[{key:`render`,value:function(){var e=this.props,t=e.offset,n=e.layout,r=e.width,i=e.dataKey,a=e.data,o=e.dataPointFormatter,s=e.xAxis,c=e.yAxis,l=Z(kC(e,bC),!1);this.props.direction===`x`&&s.type!==`number`&&yC(!1);var u=a.map(function(e){var a=o(e,i),u=a.x,d=a.y,f=a.value,p=a.errorVal;if(!p)return null;var m=[],h,g;if(Array.isArray(p)){var _=CC(p,2);h=_[0],g=_[1]}else h=g=p;if(n===`vertical`){var y=s.scale,b=d+t,x=b+r,S=b-r,C=y(f-h),w=y(f+g);m.push({x1:w,y1:x,x2:w,y2:S}),m.push({x1:C,y1:b,x2:w,y2:b}),m.push({x1:C,y1:x,x2:C,y2:S})}else if(n===`horizontal`){var T=c.scale,E=u+t,D=E-r,O=E+r,k=T(f-h),A=T(f+g);m.push({x1:D,y1:A,x2:O,y2:A}),m.push({x1:E,y1:k,x2:E,y2:A}),m.push({x1:D,y1:k,x2:O,y2:k})}return v.createElement(Bc,SC({className:`recharts-errorBar`,key:`bar-${m.map(function(e){return`${e.x1}-${e.x2}-${e.y1}-${e.y2}`})}`},l),m.map(function(e){return v.createElement(`line`,SC({},e,{key:`line-${e.x1}-${e.x2}-${e.y1}-${e.y2}`}))}))});return v.createElement(Bc,{className:`recharts-errorBars`},u)}}])}(v.Component);VC(WC,`defaultProps`,{stroke:`black`,strokeWidth:1.5,width:5,offset:0,layout:`horizontal`}),VC(WC,`displayName`,`ErrorBar`);function GC(e){"@babel/helpers - typeof";return GC=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},GC(e)}function KC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?KC(Object(n),!0).forEach(function(t){JC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function JC(e,t,n){return t=YC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YC(e){var t=XC(e,`string`);return GC(t)==`symbol`?t:t+``}function XC(e,t){if(GC(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(GC(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var ZC=function(e){var t=e.children,n=e.formattedGraphicalItems,r=e.legendWidth,i=e.legendContent,a=bc(t,np);if(!a)return null;var o=np.defaultProps,s=o===void 0?{}:qC(qC({},o),a.props),c=a.props&&a.props.payload?a.props&&a.props.payload:i===`children`?(n||[]).reduce(function(e,t){var n=t.item,r=t.props,i=r.sectors||r.data||[];return e.concat(i.map(function(e){return{type:a.props.iconType||n.props.legendType,value:e.name,color:e.fill,payload:e}}))},[]):(n||[]).map(function(e){var t=e.item,n=t.type.defaultProps,r=n===void 0?{}:qC(qC({},n),t.props),i=r.dataKey,a=r.name,o=r.legendType;return{inactive:r.hide,dataKey:i,type:s.iconType||o||`square`,color:_w(t),value:a||i,payload:r}});return qC(qC(qC({},s),np.getWithHeight(a,r)),{},{payload:c,item:a})},QC=l(ES()),$C=l(OS()),ew=l(AS()),tw=l(jS());function nw(e){"@babel/helpers - typeof";return nw=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},nw(e)}function rw(e){return sw(e)||ow(e)||aw(e)||iw()}function iw(){throw TypeError(`Invalid attempt to spread non-iterable instance.
28
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aw(e,t){if(e){if(typeof e==`string`)return cw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cw(e,t)}}function ow(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function sw(e){if(Array.isArray(e))return cw(e)}function cw(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function lw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function uw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?lw(Object(n),!0).forEach(function(t){dw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function dw(e,t,n){return t=fw(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fw(e){var t=pw(e,`string`);return nw(t)==`symbol`?t:t+``}function pw(e,t){if(nw(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(nw(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function mw(e,t,n){return(0,J.default)(e)||(0,J.default)(t)?n:Vs(t)?(0,Is.default)(e,t,n):(0,X.default)(t)?t(e):n}function hw(e,t,n,r){var i=(0,ew.default)(e,function(e){return mw(e,t)});if(n===`number`){var a=i.filter(function(e){return Y(e)||parseFloat(e)});return a.length?[(0,$C.default)(a),(0,QC.default)(a)]:[1/0,-1/0]}return(r?i.filter(function(e){return!(0,J.default)(e)}):i).map(function(e){return Vs(e)||e instanceof Date?e:``})}var gw=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=-1,a=t?.length??0;if(a<=1)return 0;if(r&&r.axisType===`angleAxis`&&Math.abs(Math.abs(r.range[1]-r.range[0])-360)<=1e-6)for(var o=r.range,s=0;s<a;s++){var c=s>0?n[s-1].coordinate:n[a-1].coordinate,l=n[s].coordinate,u=s>=a-1?n[0].coordinate:n[s+1].coordinate,d=void 0;if(Rs(l-c)!==Rs(u-l)){var f=[];if(Rs(u-l)===Rs(o[1]-o[0])){d=u;var p=l+o[1]-o[0];f[0]=Math.min(p,(p+c)/2),f[1]=Math.max(p,(p+c)/2)}else{d=c;var m=u+o[1]-o[0];f[0]=Math.min(l,(m+l)/2),f[1]=Math.max(l,(m+l)/2)}var h=[Math.min(l,(d+l)/2),Math.max(l,(d+l)/2)];if(e>h[0]&&e<=h[1]||e>=f[0]&&e<=f[1]){i=n[s].index;break}}else{var g=Math.min(c,u),_=Math.max(c,u);if(e>(g+l)/2&&e<=(_+l)/2){i=n[s].index;break}}}else for(var v=0;v<a;v++)if(v===0&&e<=(t[v].coordinate+t[v+1].coordinate)/2||v>0&&v<a-1&&e>(t[v].coordinate+t[v-1].coordinate)/2&&e<=(t[v].coordinate+t[v+1].coordinate)/2||v===a-1&&e>(t[v].coordinate+t[v-1].coordinate)/2){i=t[v].index;break}return i},_w=function(e){var t,n=e.type.displayName,r=(t=e.type)!=null&&t.defaultProps?uw(uw({},e.type.defaultProps),e.props):e.props,i=r.stroke,a=r.fill,o;switch(n){case`Line`:o=i;break;case`Area`:case`Radar`:o=i&&i!==`none`?i:a;break;default:o=a}return o},vw=function(e){var t=e.barSize,n=e.totalSize,r=e.stackGroups,i=r===void 0?{}:r;if(!i)return{};for(var a={},o=Object.keys(i),s=0,c=o.length;s<c;s++)for(var l=i[o[s]].stackGroups,u=Object.keys(l),d=0,f=u.length;d<f;d++){var p=l[u[d]],m=p.items,h=p.cateAxisId,g=m.filter(function(e){return hc(e.type).indexOf(`Bar`)>=0});if(g&&g.length){var _=g[0].type.defaultProps,v=_===void 0?g[0].props:uw(uw({},_),g[0].props),y=v.barSize,b=v[h];a[b]||(a[b]=[]);var x=(0,J.default)(y)?t:y;a[b].push({item:g[0],stackList:g.slice(1),barSize:(0,J.default)(x)?void 0:Ws(x,n,0)})}}return a},yw=function(e){var t=e.barGap,n=e.barCategoryGap,r=e.bandSize,i=e.sizeList,a=i===void 0?[]:i,o=e.maxBarSize,s=a.length;if(s<1)return null;var c=Ws(t,r,0,!0),l,u=[];if(a[0].barSize===+a[0].barSize){var d=!1,f=r/s,p=a.reduce(function(e,t){return e+t.barSize||0},0);p+=(s-1)*c,p>=r&&(p-=(s-1)*c,c=0),p>=r&&f>0&&(d=!0,f*=.9,p=s*f);var m={offset:((r-p)/2|0)-c,size:0};l=a.reduce(function(e,t){var n={item:t.item,position:{offset:m.offset+m.size+c,size:d?f:t.barSize}},r=[].concat(rw(e),[n]);return m=r[r.length-1].position,t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){r.push({item:e,position:m})}),r},u)}else{var h=Ws(n,r,0,!0);r-2*h-(s-1)*c<=0&&(c=0);var g=(r-2*h-(s-1)*c)/s;g>1&&(g>>=0);var _=o===+o?Math.min(g,o):g;l=a.reduce(function(e,t,n){var r=[].concat(rw(e),[{item:t.item,position:{offset:h+(g+c)*n+(g-_)/2,size:_}}]);return t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){r.push({item:e,position:r[r.length-1].position})}),r},u)}return l},bw=function(e,t,n,r){var i=n.children,a=n.width,o=n.margin,s=ZC({children:i,legendWidth:a-(o.left||0)-(o.right||0)});if(s){var c=r||{},l=c.width,u=c.height,d=s.align,f=s.verticalAlign,p=s.layout;if((p===`vertical`||p===`horizontal`&&f===`middle`)&&d!==`center`&&Y(e[d]))return uw(uw({},e),{},dw({},d,e[d]+(l||0)));if((p===`horizontal`||p===`vertical`&&d===`center`)&&f!==`middle`&&Y(e[f]))return uw(uw({},e),{},dw({},f,e[f]+(u||0)))}return e},xw=function(e,t,n){return(0,J.default)(t)?!0:e===`horizontal`?t===`yAxis`:e===`vertical`||n===`x`?t===`xAxis`:n!==`y`||t===`yAxis`},Sw=function(e,t,n,r,i){var a=t.props.children,o=yc(a,WC).filter(function(e){return xw(r,i,e.props.direction)});if(o&&o.length){var s=o.map(function(e){return e.props.dataKey});return e.reduce(function(e,t){var r=mw(t,n);if((0,J.default)(r))return e;var i=Array.isArray(r)?[(0,$C.default)(r),(0,QC.default)(r)]:[r,r],a=s.reduce(function(e,n){var r=mw(t,n,0),a=i[0]-Math.abs(Array.isArray(r)?r[0]:r),o=i[1]+Math.abs(Array.isArray(r)?r[1]:r);return[Math.min(a,e[0]),Math.max(o,e[1])]},[1/0,-1/0]);return[Math.min(a[0],e[0]),Math.max(a[1],e[1])]},[1/0,-1/0])}return null},Cw=function(e,t,n,r,i){var a=t.map(function(t){return Sw(e,t,n,i,r)}).filter(function(e){return!(0,J.default)(e)});return a&&a.length?a.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0]):null},ww=function(e,t,n,r,i){var a=t.map(function(t){var a=t.props.dataKey;return n===`number`&&a&&Sw(e,t,a,r)||hw(e,a,n,i)});if(n===`number`)return a.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0]);var o={};return a.reduce(function(e,t){for(var n=0,r=t.length;n<r;n++)o[t[n]]||(o[t[n]]=!0,e.push(t[n]));return e},[])},Tw=function(e,t){return e===`horizontal`&&t===`xAxis`||e===`vertical`&&t===`yAxis`||e===`centric`&&t===`angleAxis`||e===`radial`&&t===`radiusAxis`},Ew=function(e,t,n,r){if(r)return e.map(function(e){return e.coordinate});var i,a,o=e.map(function(e){return e.coordinate===t&&(i=!0),e.coordinate===n&&(a=!0),e.coordinate});return i||o.push(t),a||o.push(n),o},Dw=function(e,t,n){if(!e)return null;var r=e.scale,i=e.duplicateDomain,a=e.type,o=e.range,s=e.realScaleType===`scaleBand`?r.bandwidth()/2:2,c=(t||n)&&a===`category`&&r.bandwidth?r.bandwidth()/s:0;return c=e.axisType===`angleAxis`&&o?.length>=2?Rs(o[0]-o[1])*2*c:c,t&&(e.ticks||e.niceTicks)?(e.ticks||e.niceTicks).map(function(e){return{coordinate:r(i?i.indexOf(e):e)+c,value:e,offset:c}}).filter(function(e){return!(0,Fs.default)(e.coordinate)}):e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map(function(e,t){return{coordinate:r(e)+c,value:e,index:t,offset:c}}):r.ticks&&!n?r.ticks(e.tickCount).map(function(e){return{coordinate:r(e)+c,value:e,offset:c}}):r.domain().map(function(e,t){return{coordinate:r(e)+c,value:i?i[e]:e,index:t,offset:c}})},Ow=new WeakMap,kw=function(e,t){if(typeof t!=`function`)return e;Ow.has(e)||Ow.set(e,new WeakMap);var n=Ow.get(e);if(n.has(t))return n.get(t);var r=function(){e.apply(void 0,arguments),t.apply(void 0,arguments)};return n.set(t,r),r},Aw=function(e,t,n){var r=e.scale,i=e.type,a=e.layout,o=e.axisType;if(r===`auto`)return a===`radial`&&o===`radiusAxis`?{scale:px(),realScaleType:`band`}:a===`radial`&&o===`angleAxis`?{scale:kx(),realScaleType:`linear`}:i===`category`&&t&&(t.indexOf(`LineChart`)>=0||t.indexOf(`AreaChart`)>=0||t.indexOf(`ComposedChart`)>=0&&!n)?{scale:hx(),realScaleType:`point`}:i===`category`?{scale:px(),realScaleType:`band`}:{scale:kx(),realScaleType:`linear`};if((0,Ps.default)(r)){var s=`scale${(0,Mu.default)(r)}`;return{scale:(CS[s]||hx)(),realScaleType:CS[s]?s:`point`}}return(0,X.default)(r)?{scale:r}:{scale:hx(),realScaleType:`point`}},jw=1e-4,Mw=function(e){var t=e.domain();if(!(!t||t.length<=2)){var n=t.length,r=e.range(),i=Math.min(r[0],r[1])-jw,a=Math.max(r[0],r[1])+jw,o=e(t[0]),s=e(t[n-1]);(o<i||o>a||s<i||s>a)&&e.domain([t[0],t[n-1]])}},Nw=function(e,t){if(!e)return null;for(var n=0,r=e.length;n<r;n++)if(e[n].item===t)return e[n].position;return null},Pw=function(e,t){if(!t||t.length!==2||!Y(t[0])||!Y(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!Y(e[0])||e[0]<n)&&(i[0]=n),(!Y(e[1])||e[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i},Fw={sign:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,a=0,o=0;o<t;++o){var s=(0,Fs.default)(e[o][n][1])?e[o][n][0]:e[o][n][1];s>=0?(e[o][n][0]=i,e[o][n][1]=i+s,i=e[o][n][1]):(e[o][n][0]=a,e[o][n][1]=a+s,a=e[o][n][1])}},expand:ku,none:wu,silhouette:Au,wiggle:ju,positive:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,a=0;a<t;++a){var o=(0,Fs.default)(e[a][n][1])?e[a][n][0]:e[a][n][1];o>=0?(e[a][n][0]=i,e[a][n][1]=i+o,i=e[a][n][1]):(e[a][n][0]=0,e[a][n][1]=0)}}},Iw=function(e,t,n){var r=t.map(function(e){return e.props.dataKey}),i=Fw[n];return Ou().keys(r).value(function(e,t){return+mw(e,t,0)}).order(Tu).offset(i)(e)},Lw=function(e,t,n,r,i,a){if(!e)return null;var o=(a?t.reverse():t).reduce(function(e,t){var i,a=(i=t.type)!=null&&i.defaultProps?uw(uw({},t.type.defaultProps),t.props):t.props,o=a.stackId;if(a.hide)return e;var s=a[n],c=e[s]||{hasStack:!1,stackGroups:{}};if(Vs(o)){var l=c.stackGroups[o]||{numericAxisId:n,cateAxisId:r,items:[]};l.items.push(t),c.hasStack=!0,c.stackGroups[o]=l}else c.stackGroups[Us(`_stackId_`)]={numericAxisId:n,cateAxisId:r,items:[t]};return uw(uw({},e),{},dw({},s,c))},{});return Object.keys(o).reduce(function(t,a){var s=o[a];return s.hasStack&&(s.stackGroups=Object.keys(s.stackGroups).reduce(function(t,a){var o=s.stackGroups[a];return uw(uw({},t),{},dw({},a,{numericAxisId:n,cateAxisId:r,items:o.items,stackedData:Iw(e,o.items,i)}))},{})),uw(uw({},t),{},dw({},a,s))},{})},Rw=function(e,t){var n=t.realScaleType,r=t.type,i=t.tickCount,a=t.originalDomain,o=t.allowDecimals,s=n||t.scale;if(s!==`auto`&&s!==`linear`)return null;if(i&&r===`number`&&a&&(a[0]===`auto`||a[1]===`auto`)){var c=e.domain();if(!c.length)return null;var l=gC(c,i,o);return e.domain([(0,$C.default)(l),(0,QC.default)(l)]),{niceTicks:l}}return i&&r===`number`?{niceTicks:_C(e.domain(),i,o)}:null};function zw(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type===`category`){if(!t.allowDuplicatedCategory&&t.dataKey&&!(0,J.default)(i[t.dataKey])){var s=Js(n,`value`,i[t.dataKey]);if(s)return s.coordinate+r/2}return n[a]?n[a].coordinate+r/2:null}var c=mw(i,(0,J.default)(o)?t.dataKey:o);return(0,J.default)(c)?null:t.scale(c)}var Bw=function(e){var t=e.axis,n=e.ticks,r=e.offset,i=e.bandSize,a=e.entry,o=e.index;if(t.type===`category`)return n[o]?n[o].coordinate+r:null;var s=mw(a,t.dataKey,t.domain[o]);return(0,J.default)(s)?null:t.scale(s)-i/2+r},Vw=function(e){var t=e.numericAxis,n=t.scale.domain();if(t.type===`number`){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]},Hw=function(e,t){var n,r=((n=e.type)!=null&&n.defaultProps?uw(uw({},e.type.defaultProps),e.props):e.props).stackId;if(Vs(r)){var i=t[r];if(i){var a=i.items.indexOf(e);return a>=0?i.stackedData[a]:null}}return null},Uw=function(e){return e.reduce(function(e,t){return[(0,$C.default)(t.concat([e[0]]).filter(Y)),(0,QC.default)(t.concat([e[1]]).filter(Y))]},[1/0,-1/0])},Ww=function(e,t,n){return Object.keys(e).reduce(function(r,i){var a=e[i].stackedData.reduce(function(e,r){var i=Uw(r.slice(t,n+1));return[Math.min(e[0],i[0]),Math.max(e[1],i[1])]},[1/0,-1/0]);return[Math.min(a[0],r[0]),Math.max(a[1],r[1])]},[1/0,-1/0]).map(function(e){return e===1/0||e===-1/0?0:e})},Gw=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Kw=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,qw=function(e,t,n){if((0,X.default)(e))return e(t,n);if(!Array.isArray(e))return t;var r=[];if(Y(e[0]))r[0]=n?e[0]:Math.min(e[0],t[0]);else if(Gw.test(e[0])){var i=+Gw.exec(e[0])[1];r[0]=t[0]-i}else r[0]=(0,X.default)(e[0])?e[0](t[0]):t[0];if(Y(e[1]))r[1]=n?e[1]:Math.max(e[1],t[1]);else if(Kw.test(e[1])){var a=+Kw.exec(e[1])[1];r[1]=t[1]+a}else r[1]=(0,X.default)(e[1])?e[1](t[1]):t[1];return r},Jw=function(e,t,n){if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=(0,wp.default)(t,function(e){return e.coordinate}),a=1/0,o=1,s=i.length;o<s;o++){var c=i[o],l=i[o-1];a=Math.min((c.coordinate||0)-(l.coordinate||0),a)}return a===1/0?0:a}return n?void 0:0},Yw=function(e,t,n){return!e||!e.length||(0,tw.default)(e,(0,Is.default)(n,`type.defaultProps.domain`))?t:e},Xw=function(e,t){var n=e.type.defaultProps?uw(uw({},e.type.defaultProps),e.props):e.props,r=n.dataKey,i=n.name,a=n.unit,o=n.formatter,s=n.tooltipType,c=n.chartType,l=n.hide;return uw(uw({},Z(e,!1)),{},{dataKey:r,unit:a,formatter:o,name:i||r,color:_w(e),value:mw(t,r),type:s,payload:t,chartType:c,hide:l})};function Zw(e){"@babel/helpers - typeof";return Zw=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Zw(e)}function Qw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $w(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Qw(Object(n),!0).forEach(function(t){eT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function eT(e,t,n){return t=tT(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tT(e){var t=nT(e,`string`);return Zw(t)==`symbol`?t:t+``}function nT(e,t){if(Zw(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Zw(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var rT=Math.PI/180,iT=function(e){return e*180/Math.PI},aT=function(e,t,n,r){return{x:e+Math.cos(-rT*r)*n,y:t+Math.sin(-rT*r)*n}},oT=function(e,t){var n=e.x,r=e.y,i=t.x,a=t.y;return Math.sqrt((n-i)**2+(r-a)**2)},sT=function(e,t){var n=e.x,r=e.y,i=t.cx,a=t.cy,o=oT({x:n,y:r},{x:i,y:a});if(o<=0)return{radius:o};var s=(n-i)/o,c=Math.acos(s);return r>a&&(c=2*Math.PI-c),{radius:o,angle:iT(c),angleInRadian:c}},cT=function(e){var t=e.startAngle,n=e.endAngle,r=Math.floor(t/360),i=Math.floor(n/360),a=Math.min(r,i);return{startAngle:t-a*360,endAngle:n-a*360}},lT=function(e,t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),a=Math.floor(r/360);return e+Math.min(i,a)*360},uT=function(e,t){var n=e.x,r=e.y,i=sT({x:n,y:r},t),a=i.radius,o=i.angle,s=t.innerRadius,c=t.outerRadius;if(a<s||a>c)return!1;if(a===0)return!0;var l=cT(t),u=l.startAngle,d=l.endAngle,f=o,p;if(u<=d){for(;f>d;)f-=360;for(;f<u;)f+=360;p=f>=u&&f<=d}else{for(;f>u;)f-=360;for(;f<d;)f+=360;p=f>=d&&f<=u}return p?$w($w({},t),{},{radius:a,angle:lT(f,t)}):null};function dT(e){"@babel/helpers - typeof";return dT=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},dT(e)}var fT=[`offset`];function pT(e){return _T(e)||gT(e)||hT(e)||mT()}function mT(){throw TypeError(`Invalid attempt to spread non-iterable instance.
29
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hT(e,t){if(e){if(typeof e==`string`)return vT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vT(e,t)}}function gT(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function _T(e){if(Array.isArray(e))return vT(e)}function vT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function yT(e,t){if(e==null)return{};var n=bT(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bT(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function xT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ST(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?xT(Object(n),!0).forEach(function(t){CT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function CT(e,t,n){return t=wT(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wT(e){var t=TT(e,`string`);return dT(t)==`symbol`?t:t+``}function TT(e,t){if(dT(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(dT(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ET(){return ET=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ET.apply(this,arguments)}var DT=function(e){var t=e.value,n=e.formatter,r=(0,J.default)(e.children)?t:e.children;return(0,X.default)(n)?n(r):r},OT=function(e,t){return Rs(t-e)*Math.min(Math.abs(t-e),360)},kT=function(e,t,n){var r=e.position,i=e.viewBox,a=e.offset,o=e.className,s=i,c=s.cx,l=s.cy,u=s.innerRadius,d=s.outerRadius,f=s.startAngle,p=s.endAngle,m=s.clockWise,h=(u+d)/2,g=OT(f,p),_=g>=0?1:-1,y,b;r===`insideStart`?(y=f+_*a,b=m):r===`insideEnd`?(y=p-_*a,b=!m):r===`end`&&(y=p+_*a,b=m),b=g<=0?b:!b;var x=aT(c,l,h,y),S=aT(c,l,h,y+(b?1:-1)*359),C=`M${x.x},${x.y}
30
- A${h},${h},0,1,${+!b},
31
- ${S.x},${S.y}`,w=(0,J.default)(e.id)?Us(`recharts-radial-line-`):e.id;return v.createElement(`text`,ET({},n,{dominantBaseline:`central`,className:K(`recharts-radial-bar-label`,o)}),v.createElement(`defs`,null,v.createElement(`path`,{id:w,d:C})),v.createElement(`textPath`,{xlinkHref:`#${w}`},t))},AT=function(e){var t=e.viewBox,n=e.offset,r=e.position,i=t,a=i.cx,o=i.cy,s=i.innerRadius,c=i.outerRadius,l=(i.startAngle+i.endAngle)/2;if(r===`outside`){var u=aT(a,o,c+n,l),d=u.x;return{x:d,y:u.y,textAnchor:d>=a?`start`:`end`,verticalAnchor:`middle`}}if(r===`center`)return{x:a,y:o,textAnchor:`middle`,verticalAnchor:`middle`};if(r===`centerTop`)return{x:a,y:o,textAnchor:`middle`,verticalAnchor:`start`};if(r===`centerBottom`)return{x:a,y:o,textAnchor:`middle`,verticalAnchor:`end`};var f=aT(a,o,(s+c)/2,l);return{x:f.x,y:f.y,textAnchor:`middle`,verticalAnchor:`middle`}},jT=function(e){var t=e.viewBox,n=e.parentViewBox,r=e.offset,i=e.position,a=t,o=a.x,s=a.y,c=a.width,l=a.height,u=l>=0?1:-1,d=u*r,f=u>0?`end`:`start`,p=u>0?`start`:`end`,m=c>=0?1:-1,h=m*r,g=m>0?`end`:`start`,_=m>0?`start`:`end`;if(i===`top`)return ST(ST({},{x:o+c/2,y:s-u*r,textAnchor:`middle`,verticalAnchor:f}),n?{height:Math.max(s-n.y,0),width:c}:{});if(i===`bottom`)return ST(ST({},{x:o+c/2,y:s+l+d,textAnchor:`middle`,verticalAnchor:p}),n?{height:Math.max(n.y+n.height-(s+l),0),width:c}:{});if(i===`left`){var v={x:o-h,y:s+l/2,textAnchor:g,verticalAnchor:`middle`};return ST(ST({},v),n?{width:Math.max(v.x-n.x,0),height:l}:{})}if(i===`right`){var y={x:o+c+h,y:s+l/2,textAnchor:_,verticalAnchor:`middle`};return ST(ST({},y),n?{width:Math.max(n.x+n.width-y.x,0),height:l}:{})}var b=n?{width:c,height:l}:{};return i===`insideLeft`?ST({x:o+h,y:s+l/2,textAnchor:_,verticalAnchor:`middle`},b):i===`insideRight`?ST({x:o+c-h,y:s+l/2,textAnchor:g,verticalAnchor:`middle`},b):i===`insideTop`?ST({x:o+c/2,y:s+d,textAnchor:`middle`,verticalAnchor:p},b):i===`insideBottom`?ST({x:o+c/2,y:s+l-d,textAnchor:`middle`,verticalAnchor:f},b):i===`insideTopLeft`?ST({x:o+h,y:s+d,textAnchor:_,verticalAnchor:p},b):i===`insideTopRight`?ST({x:o+c-h,y:s+d,textAnchor:g,verticalAnchor:p},b):i===`insideBottomLeft`?ST({x:o+h,y:s+l-d,textAnchor:_,verticalAnchor:f},b):i===`insideBottomRight`?ST({x:o+c-h,y:s+l-d,textAnchor:g,verticalAnchor:f},b):(0,Qs.default)(i)&&(Y(i.x)||zs(i.x))&&(Y(i.y)||zs(i.y))?ST({x:o+Ws(i.x,c),y:s+Ws(i.y,l),textAnchor:`end`,verticalAnchor:`end`},b):ST({x:o+c/2,y:s+l/2,textAnchor:`middle`,verticalAnchor:`middle`},b)},MT=function(e){return`cx`in e&&Y(e.cx)};function NT(e){var t=e.offset,n=t===void 0?5:t,r=yT(e,fT),i=ST({offset:n},r),a=i.viewBox,o=i.position,s=i.value,c=i.children,l=i.content,u=i.className,d=u===void 0?``:u,f=i.textBreakAll;if(!a||(0,J.default)(s)&&(0,J.default)(c)&&!(0,v.isValidElement)(l)&&!(0,X.default)(l))return null;if((0,v.isValidElement)(l))return(0,v.cloneElement)(l,i);var p;if((0,X.default)(l)){if(p=(0,v.createElement)(l,i),(0,v.isValidElement)(p))return p}else p=DT(i);var m=MT(a),h=Z(i,!0);if(m&&(o===`insideStart`||o===`insideEnd`||o===`end`))return kT(i,p,h);var g=m?AT(i):jT(i);return v.createElement(rg,ET({className:K(`recharts-label`,d)},h,g,{breakAll:f}),p)}NT.displayName=`Label`;var PT=function(e){var t=e.cx,n=e.cy,r=e.angle,i=e.startAngle,a=e.endAngle,o=e.r,s=e.radius,c=e.innerRadius,l=e.outerRadius,u=e.x,d=e.y,f=e.top,p=e.left,m=e.width,h=e.height,g=e.clockWise,_=e.labelViewBox;if(_)return _;if(Y(m)&&Y(h)){if(Y(u)&&Y(d))return{x:u,y:d,width:m,height:h};if(Y(f)&&Y(p))return{x:f,y:p,width:m,height:h}}return Y(u)&&Y(d)?{x:u,y:d,width:0,height:0}:Y(t)&&Y(n)?{cx:t,cy:n,startAngle:i||r||0,endAngle:a||r||0,innerRadius:c||0,outerRadius:l||s||o||0,clockWise:g}:e.viewBox?e.viewBox:{}},FT=function(e,t){return e?e===!0?v.createElement(NT,{key:`label-implicit`,viewBox:t}):Vs(e)?v.createElement(NT,{key:`label-implicit`,viewBox:t,value:e}):(0,v.isValidElement)(e)?e.type===NT?(0,v.cloneElement)(e,{key:`label-implicit`,viewBox:t}):v.createElement(NT,{key:`label-implicit`,content:e,viewBox:t}):(0,X.default)(e)?v.createElement(NT,{key:`label-implicit`,content:e,viewBox:t}):(0,Qs.default)(e)?v.createElement(NT,ET({viewBox:t},e,{key:`label-implicit`})):null:null};NT.parseViewBox=PT,NT.renderCallByParent=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=PT(e),a=yc(r,NT).map(function(e,n){return(0,v.cloneElement)(e,{viewBox:t||i,key:`label-${n}`})});return n?[FT(e.label,t||i)].concat(pT(a)):a};var IT=l(o(((e,t)=>{function n(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}t.exports=n}))());function LT(e){"@babel/helpers - typeof";return LT=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},LT(e)}var RT=[`valueAccessor`],zT=[`data`,`dataKey`,`clockWise`,`id`,`textBreakAll`];function BT(e){return WT(e)||UT(e)||HT(e)||VT()}function VT(){throw TypeError(`Invalid attempt to spread non-iterable instance.
32
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HT(e,t){if(e){if(typeof e==`string`)return GT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return GT(e,t)}}function UT(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function WT(e){if(Array.isArray(e))return GT(e)}function GT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function KT(){return KT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},KT.apply(this,arguments)}function qT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function JT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?qT(Object(n),!0).forEach(function(t){YT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function YT(e,t,n){return t=XT(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XT(e){var t=ZT(e,`string`);return LT(t)==`symbol`?t:t+``}function ZT(e,t){if(LT(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(LT(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function QT(e,t){if(e==null)return{};var n=$T(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $T(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var eE=function(e){return Array.isArray(e.value)?(0,IT.default)(e.value):e.value};function tE(e){var t=e.valueAccessor,n=t===void 0?eE:t,r=QT(e,RT),i=r.data,a=r.dataKey,o=r.clockWise,s=r.id,c=r.textBreakAll,l=QT(r,zT);return!i||!i.length?null:v.createElement(Bc,{className:`recharts-label-list`},i.map(function(e,t){var r=(0,J.default)(a)?n(e,t):mw(e&&e.payload,a),i=(0,J.default)(s)?{}:{id:`${s}-${t}`};return v.createElement(NT,KT({},Z(e,!0),l,i,{parentViewBox:e.parentViewBox,value:r,textBreakAll:c,viewBox:NT.parseViewBox((0,J.default)(o)?e:JT(JT({},e),{},{clockWise:o})),key:`label-${t}`,index:t}))}))}tE.displayName=`LabelList`;function nE(e,t){return e?e===!0?v.createElement(tE,{key:`labelList-implicit`,data:t}):v.isValidElement(e)||(0,X.default)(e)?v.createElement(tE,{key:`labelList-implicit`,data:t,content:e}):(0,Qs.default)(e)?v.createElement(tE,KT({data:t},e,{key:`labelList-implicit`})):null:null}function rE(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=yc(r,tE).map(function(e,n){return(0,v.cloneElement)(e,{data:t,key:`labelList-${n}`})});return n?[nE(e.label,t)].concat(BT(i)):i}tE.renderCallByParent=rE;function iE(e){"@babel/helpers - typeof";return iE=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},iE(e)}function aE(){return aE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aE.apply(this,arguments)}function oE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function sE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?oE(Object(n),!0).forEach(function(t){cE(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cE(e,t,n){return t=lE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lE(e){var t=uE(e,`string`);return iE(t)==`symbol`?t:t+``}function uE(e,t){if(iE(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(iE(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var dE=function(e,t){return Rs(t-e)*Math.min(Math.abs(t-e),359.999)},fE=function(e){var t=e.cx,n=e.cy,r=e.radius,i=e.angle,a=e.sign,o=e.isExternal,s=e.cornerRadius,c=e.cornerIsExternal,l=s*(o?1:-1)+r,u=Math.asin(s/l)/rT,d=c?i:i+a*u,f=aT(t,n,l,d),p=aT(t,n,r,d),m=c?i-a*u:i;return{center:f,circleTangency:p,lineTangency:aT(t,n,l*Math.cos(u*rT),m),theta:u}},pE=function(e){var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,a=e.startAngle,o=e.endAngle,s=dE(a,o),c=a+s,l=aT(t,n,i,a),u=aT(t,n,i,c),d=`M ${l.x},${l.y}
33
- A ${i},${i},0,
34
- ${+(Math.abs(s)>180)},${+(a>c)},
35
- ${u.x},${u.y}
36
- `;if(r>0){var f=aT(t,n,r,a),p=aT(t,n,r,c);d+=`L ${p.x},${p.y}
37
- A ${r},${r},0,
38
- ${+(Math.abs(s)>180)},${+(a<=c)},
39
- ${f.x},${f.y} Z`}else d+=`L ${t},${n} Z`;return d},mE=function(e){var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,a=e.cornerRadius,o=e.forceCornerRadius,s=e.cornerIsExternal,c=e.startAngle,l=e.endAngle,u=Rs(l-c),d=fE({cx:t,cy:n,radius:i,angle:c,sign:u,cornerRadius:a,cornerIsExternal:s}),f=d.circleTangency,p=d.lineTangency,m=d.theta,h=fE({cx:t,cy:n,radius:i,angle:l,sign:-u,cornerRadius:a,cornerIsExternal:s}),g=h.circleTangency,_=h.lineTangency,v=h.theta,y=s?Math.abs(c-l):Math.abs(c-l)-m-v;if(y<0)return o?`M ${p.x},${p.y}
40
- a${a},${a},0,0,1,${a*2},0
41
- a${a},${a},0,0,1,${-a*2},0
42
- `:pE({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:c,endAngle:l});var b=`M ${p.x},${p.y}
43
- A${a},${a},0,0,${+(u<0)},${f.x},${f.y}
44
- A${i},${i},0,${+(y>180)},${+(u<0)},${g.x},${g.y}
45
- A${a},${a},0,0,${+(u<0)},${_.x},${_.y}
46
- `;if(r>0){var x=fE({cx:t,cy:n,radius:r,angle:c,sign:u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),S=x.circleTangency,C=x.lineTangency,w=x.theta,T=fE({cx:t,cy:n,radius:r,angle:l,sign:-u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),E=T.circleTangency,D=T.lineTangency,O=T.theta,k=s?Math.abs(c-l):Math.abs(c-l)-w-O;if(k<0&&a===0)return`${b}L${t},${n}Z`;b+=`L${D.x},${D.y}
47
- A${a},${a},0,0,${+(u<0)},${E.x},${E.y}
48
- A${r},${r},0,${+(k>180)},${+(u>0)},${S.x},${S.y}
49
- A${a},${a},0,0,${+(u<0)},${C.x},${C.y}Z`}else b+=`L${t},${n}Z`;return b},hE={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},gE=function(e){var t=sE(sE({},hE),e),n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,c=t.cornerIsExternal,l=t.startAngle,u=t.endAngle,d=t.className;if(a<i||l===u)return null;var f=K(`recharts-sector`,d),p=a-i,m=Ws(o,p,0,!0),h=m>0&&Math.abs(l-u)<360?mE({cx:n,cy:r,innerRadius:i,outerRadius:a,cornerRadius:Math.min(m,p/2),forceCornerRadius:s,cornerIsExternal:c,startAngle:l,endAngle:u}):pE({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:l,endAngle:u});return v.createElement(`path`,aE({},Z(t,!0),{className:f,d:h,role:`img`}))};function _E(e){"@babel/helpers - typeof";return _E=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},_E(e)}function vE(){return vE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vE.apply(this,arguments)}function yE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?yE(Object(n),!0).forEach(function(t){xE(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xE(e,t,n){return t=SE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SE(e){var t=CE(e,`string`);return _E(t)==`symbol`?t:t+``}function CE(e,t){if(_E(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(_E(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var wE={curveBasisClosed:Jl,curveBasisOpen:Xl,curveBasis:Kl,curveBumpX:Sl,curveBumpY:Cl,curveLinearClosed:su,curveLinear:ml,curveMonotoneX:hu,curveMonotoneY:gu,curveNatural:yu,curveStep:xu,curveStepAfter:Cu,curveStepBefore:Su},TE=function(e){return e.x===+e.x&&e.y===+e.y},EE=function(e){return e.x},DE=function(e){return e.y},OE=function(e,t){if((0,X.default)(e))return e;var n=`curve${(0,Mu.default)(e)}`;return(n===`curveMonotone`||n===`curveBump`)&&t?wE[`${n}${t===`vertical`?`Y`:`X`}`]:wE[n]||ml},kE=function(e){var t=e.type,n=t===void 0?`linear`:t,r=e.points,i=r===void 0?[]:r,a=e.baseLine,o=e.layout,s=e.connectNulls,c=s!==void 0&&s,l=OE(n,o),u=c?i.filter(function(e){return TE(e)}):i,d;if(Array.isArray(a)){var f=c?a.filter(function(e){return TE(e)}):a,p=u.map(function(e,t){return bE(bE({},e),{},{base:f[t]})});return d=o===`vertical`?vl().y(DE).x1(EE).x0(function(e){return e.base.x}):vl().x(EE).y1(DE).y0(function(e){return e.base.y}),d.defined(TE).curve(l),d(p)}return d=o===`vertical`&&Y(a)?vl().y(DE).x1(EE).x0(a):Y(a)?vl().x(EE).y1(DE).y0(a):_l().x(EE).y(DE),d.defined(TE).curve(l),d(u)},AE=function(e){var t=e.className,n=e.points,r=e.path,i=e.pathRef;if((!n||!n.length)&&!r)return null;var a=n&&n.length?kE(e):r;return v.createElement(`path`,vE({},Z(e,!1),ac(e),{className:K(`recharts-curve`,t),d:a,ref:i}))},jE=o(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),ME=o(((e,t)=>{var n=jE();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=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 s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={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:i,resetWarningCache:r};return a.PropTypes=a,a}})),NE=o(((e,t)=>{t.exports=ME()()})),{getOwnPropertyNames:PE,getOwnPropertySymbols:FE}=Object,{hasOwnProperty:IE}=Object.prototype;function LE(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function RE(e){return function(t,n,r){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r);let{cache:i}=r,a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);let s=e(t,n,r);return i.delete(t),i.delete(n),s}}function zE(e){return e?.[Symbol.toStringTag]}function BE(e){return PE(e).concat(FE(e))}var VE=Object.hasOwn||((e,t)=>IE.call(e,t));function HE(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var UE=`__v`,WE=`__o`,GE=`_owner`,KE=64,{getOwnPropertyDescriptor:qE,keys:JE}=Object,{propertyIsEnumerable:YE}=Object.prototype,XE=qE(Object.getPrototypeOf(Int8Array.prototype),Symbol.toStringTag).get;function ZE(e,t){return e.byteLength===t.byteLength&&dD(new Uint8Array(e),new Uint8Array(t))}function QE(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-->0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function $E(e,t){return e.byteLength===t.byteLength&&dD(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function eD(e,t){return HE(e.getTime(),t.getTime())}function tD(e,t,n){if(e.name!==t.name||e.message!==t.message||e.stack!==t.stack)return!1;let r=e.cause,i=t.cause;if(r!==i&&!n.equals(r,i,`cause`,`cause`,e,t,n))return!1;let a=e.errors,o=t.errors;if(a!==o&&!n.equals(a,o,`errors`,`errors`,e,t,n))return!1;let s=JE(e),c=JE(t),l=s.length;if(!l&&!c.length)return!0;let u=0,d;for(;l-->0;)if(d=s[l],d!==`cause`&&d!==`errors`){if(d!==c[l]&&!YE.call(t,d)||!n.equals(e[d],t[d],d,d,e,t,n))return!1;++u}let f=c.length-u;return!f||f===+!!YE.call(t,`cause`)+ +!!YE.call(t,`errors`)}function nD(e,t){return e===t}function rD(e,t,n){return e.name===t.name&&e.message===t.message&&e.stack===t.stack&&sD(e,t,n)}function iD(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.entries(),o,s,c=0;for(;(o=a.next())&&!o.done;){let r=t.entries(),a=!1,l=0;for(;(s=r.next())&&!s.done;){if(i[l]){l++;continue}let r=o.value,u=s.value;if(n.equals(r[0],u[0],c,l,e,t,n)&&n.equals(r[1],u[1],r[0],u[0],e,t,n)){a=i[l]=!0;break}l++}if(!a)return!1;c++}return!0}var aD=HE;function oD(e,t,n){let r=JE(e),i=JE(t),a=r.length;if(i.length!==a)return!1;let o=a<=KE,s;for(;a-->0;)if(s=r[a],!hD(e,t,s)&&(s!==i[a]&&!(o?i.includes(s):YE.call(t,s))||!n.equals(e[s],t[s],s,s,e,t,n)))return!1;return!0}function sD(e,t,n){let r=BE(e),i=r.length;if(BE(t).length!==i)return!1;let a,o,s;for(;i-->0;)if(a=r[i],!hD(e,t,a)&&(!VE(t,a)||!n.equals(e[a],t[a],a,a,e,t,n))||(o=qE(e,a),s=qE(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function cD(e,t){return HE(e.valueOf(),t.valueOf())}function lD(e,t){return e.source===t.source&&e.flags===t.flags}function uD(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.values(),o,s;for(;(o=a.next())&&!o.done;){let r=t.values(),a=!1,c=0;for(;(s=r.next())&&!s.done;){if(!i[c]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){a=i[c]=!0;break}c++}if(!a)return!1}return!0}function dD(e,t){let n=e.length;if(t.length!==n||e.byteOffset!==t.byteOffset)return!1;let r=XE.call(e);if(r===`Float64Array`||r===`Float32Array`||r===`Float16Array`){for(;n-->0;)if(e[n]!==t[n]&&(e[n]===e[n]||t[n]===t[n]))return!1;return!0}for(;n-->0;)if(e[n]!==t[n])return!1;return!0}function fD(e,t){return e.href===t.href||e.protocol===t.protocol&&e.username===t.username&&e.password===t.password&&e.host===t.host&&e.pathname===t.pathname&&e.hash===t.hash&&pD(e.searchParams,t.searchParams)}function pD(e,t){let n=e.toString(),r=t.toString();return n===r||mD(n)===mD(r)}function mD(e){return e.split(`&`).sort().join(`&`)}function hD(e,t,n){return(n===GE||n===WE||n===UE)&&!!(e.$$typeof||t.$$typeof)}var gD=`[object ArrayBuffer]`,_D=`[object Arguments]`,vD=`[object Boolean]`,yD=`[object DataView]`,bD=`[object Date]`,xD=`[object Error]`,SD=`[object Map]`,CD=`[object Number]`,wD=`[object Object]`,TD=`[object RegExp]`,ED=`[object Set]`,DD=`[object String]`,OD={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},kD=`[object URL]`,AD=Object.prototype.toString;function jD({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:c,arePrimitiveWrappersEqual:l,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p,unknownTagComparators:m}){return function(h,g,_){if(h===g)return!0;if(h==null||g==null)return!1;let v=typeof h;if(v!==typeof g)return!1;if(v!==`object`)return v===`number`?s(h,g,_):v===`function`&&a(h,g,_);let y=h.constructor;if(y!==g.constructor)return!1;if(y===Object)return c(h,g,_);if(Array.isArray(h))return t(h,g,_);if(y===Date)return r(h,g,_);if(y===RegExp)return u(h,g,_);if(y===Map)return o(h,g,_);if(y===Set)return d(h,g,_);if(y==null)return c(h,g,_);let b=AD.call(h);if(b===bD)return r(h,g,_);if(b===TD)return u(h,g,_);if(b===SD)return o(h,g,_);if(b===ED)return d(h,g,_);if(b===wD)return typeof h.then!=`function`&&typeof g.then!=`function`&&c(h,g,_);if(b===kD)return p(h,g,_);if(b===xD)return i(h,g,_);if(b===_D)return c(h,g,_);if(OD[b])return f(h,g,_);if(b===gD)return e(h,g,_);if(b===yD)return n(h,g,_);if(b===vD||b===CD||b===DD)return l(h,g,_);if(m){let e=m[b];if(!e){let t=zE(h);t&&(e=m[t])}if(e)return e(h,g,_)}return!1}}function MD({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:ZE,areArraysEqual:n?sD:QE,areDataViewsEqual:$E,areDatesEqual:eD,areErrorsEqual:n?rD:tD,areFunctionsEqual:nD,areMapsEqual:n?LE(iD,sD):iD,areNumbersEqual:aD,areObjectsEqual:n?sD:oD,arePrimitiveWrappersEqual:cD,areRegExpsEqual:lD,areSetsEqual:n?LE(uD,sD):uD,areTypedArraysEqual:n?LE(dD,sD):dD,areUrlsEqual:fD,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=RE(r.areArraysEqual),t=RE(r.areErrorsEqual),n=RE(r.areMapsEqual),i=RE(r.areObjectsEqual),a=RE(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areErrorsEqual:t,areMapsEqual:n,areObjectsEqual:i,areSetsEqual:a})}return r}function ND(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function PD({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(a,o){let{cache:s=e?new WeakMap:void 0,meta:c}=n();return t(a,o,{cache:s,equals:r,meta:c,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let a={cache:void 0,equals:r,meta:void 0,strict:i};return function(e,n){return t(e,n,a)}}var FD=ID();ID({strict:!0}),ID({circular:!0}),ID({circular:!0,strict:!0}),ID({createInternalComparator:()=>HE}),ID({strict:!0,createInternalComparator:()=>HE}),ID({circular:!0,createInternalComparator:()=>HE}),ID({circular:!0,createInternalComparator:()=>HE,strict:!0});function ID(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=jD(MD(e));return PD({circular:t,comparator:a,createState:r,equals:n?n(a):ND(a),strict:i})}function LD(e){typeof requestAnimationFrame<`u`&&requestAnimationFrame(e)}function RD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1;requestAnimationFrame(function r(i){n<0&&(n=i),i-n>t?(e(i),n=-1):LD(r)})}function zD(e){"@babel/helpers - typeof";return zD=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},zD(e)}function BD(e){return GD(e)||WD(e)||HD(e)||VD()}function VD(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
50
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HD(e,t){if(e){if(typeof e==`string`)return UD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return UD(e,t)}}function UD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function WD(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function GD(e){if(Array.isArray(e))return e}function KD(){var e={},t=function(){return null},n=!1,r=function r(i){if(!n){if(Array.isArray(i)){if(!i.length)return;var a=BD(i),o=a[0],s=a.slice(1);if(typeof o==`number`){RD(r.bind(null,s),o);return}r(o),RD(r.bind(null,s))}else zD(i)===`object`&&(e=i,t(e)),typeof i==`function`&&i()}};return{stop:function(){n=!0},start:function(e){n=!1,r(e)},subscribe:function(e){return t=e,function(){t=function(){return null}}}}}function qD(e){"@babel/helpers - typeof";return qD=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},qD(e)}function JD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function YD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?JD(Object(n),!0).forEach(function(t){XD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function XD(e,t,n){return t=ZD(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZD(e){var t=QD(e,`string`);return qD(t)===`symbol`?t:String(t)}function QD(e,t){if(qD(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(qD(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var $D=function(e,t){return[Object.keys(e),Object.keys(t)].reduce(function(e,t){return e.filter(function(e){return t.includes(e)})})},eO=function(e){return e},tO=function(e){return e.replace(/([A-Z])/g,function(e){return`-${e.toLowerCase()}`})},nO=function(e,t){return Object.keys(t).reduce(function(n,r){return YD(YD({},n),{},XD({},r,e(r,t[r])))},{})},rO=function(e,t,n){return e.map(function(e){return`${tO(e)} ${t}ms ${n}`}).join(`,`)};function iO(e,t){return sO(e)||oO(e,t)||uO(e,t)||aO()}function aO(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
51
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oO(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function sO(e){if(Array.isArray(e))return e}function cO(e){return fO(e)||dO(e)||uO(e)||lO()}function lO(){throw TypeError(`Invalid attempt to spread non-iterable instance.
52
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uO(e,t){if(e){if(typeof e==`string`)return pO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pO(e,t)}}function dO(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function fO(e){if(Array.isArray(e))return pO(e)}function pO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var mO=1e-4,hO=function(e,t){return[0,3*e,3*t-6*e,3*e-3*t+1]},gO=function(e,t){return e.map(function(e,n){return e*t**+n}).reduce(function(e,t){return e+t})},_O=function(e,t){return function(n){return gO(hO(e,t),n)}},vO=function(e,t){return function(n){var r=hO(e,t);return gO([].concat(cO(r.map(function(e,t){return e*t}).slice(1)),[0]),n)}},yO=function(){var e=[...arguments],t=e[0],n=e[1],r=e[2],i=e[3];if(e.length===1)switch(e[0]){case`linear`:t=0,n=0,r=1,i=1;break;case`ease`:t=.25,n=.1,r=.25,i=1;break;case`ease-in`:t=.42,n=0,r=1,i=1;break;case`ease-out`:t=.42,n=0,r=.58,i=1;break;case`ease-in-out`:t=0,n=0,r=.58,i=1;break;default:var a=e[0].split(`(`);if(a[0]===`cubic-bezier`&&a[1].split(`)`)[0].split(`,`).length===4){var o=iO(a[1].split(`)`)[0].split(`,`).map(function(e){return parseFloat(e)}),4);t=o[0],n=o[1],r=o[2],i=o[3]}}[t,r,n,i].every(function(e){return typeof e==`number`&&e>=0&&e<=1});var s=_O(t,r),c=_O(n,i),l=vO(t,r),u=function(e){return e>1?1:e<0?0:e},d=function(e){for(var t=e>1?1:e,n=t,r=0;r<8;++r){var i=s(n)-t,a=l(n);if(Math.abs(i-t)<mO||a<mO)return c(n);n=u(n-i/a)}return c(n)};return d.isStepper=!1,d},bO=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.stiff,n=t===void 0?100:t,r=e.damping,i=r===void 0?8:r,a=e.dt,o=a===void 0?17:a,s=function(e,t,r){var a=r+(-(e-t)*n-r*i)*o/1e3,s=r*o/1e3+e;return Math.abs(s-t)<mO&&Math.abs(a)<mO?[t,0]:[s,a]};return s.isStepper=!0,s.dt=o,s},xO=function(){var e=[...arguments][0];if(typeof e==`string`)switch(e){case`ease`:case`ease-in-out`:case`ease-out`:case`ease-in`:case`linear`:return yO(e);case`spring`:return bO();default:if(e.split(`(`)[0]===`cubic-bezier`)return yO(e)}return typeof e==`function`?e:null};function SO(e){"@babel/helpers - typeof";return SO=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},SO(e)}function CO(e){return EO(e)||TO(e)||PO(e)||wO()}function wO(){throw TypeError(`Invalid attempt to spread non-iterable instance.
53
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TO(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function EO(e){if(Array.isArray(e))return FO(e)}function DO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function OO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?DO(Object(n),!0).forEach(function(t){kO(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function kO(e,t,n){return t=AO(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AO(e){var t=jO(e,`string`);return SO(t)===`symbol`?t:String(t)}function jO(e,t){if(SO(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(SO(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function MO(e,t){return LO(e)||IO(e,t)||PO(e,t)||NO()}function NO(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
54
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PO(e,t){if(e){if(typeof e==`string`)return FO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FO(e,t)}}function FO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function IO(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function LO(e){if(Array.isArray(e))return e}var RO=function(e,t,n){return e+(t-e)*n},zO=function(e){return e.from!==e.to},BO=function e(t,n,r){var i=nO(function(e,n){if(zO(n)){var r=MO(t(n.from,n.to,n.velocity),2),i=r[0],a=r[1];return OO(OO({},n),{},{from:i,velocity:a})}return n},n);return r<1?nO(function(e,t){return zO(t)?OO(OO({},t),{},{velocity:RO(t.velocity,i[e].velocity,r),from:RO(t.from,i[e].from,r)}):t},n):e(t,i,r-1)},VO=(function(e,t,n,r,i){var a=$D(e,t),o=a.reduce(function(n,r){return OO(OO({},n),{},kO({},r,[e[r],t[r]]))},{}),s=a.reduce(function(n,r){return OO(OO({},n),{},kO({},r,{from:e[r],velocity:0,to:t[r]}))},{}),c=-1,l,u,d=function(){return null},f=function(){return nO(function(e,t){return t.from},s)},p=function(){return!Object.values(s).filter(zO).length};return d=n.isStepper?function(r){l||=r;var a=(r-l)/n.dt;s=BO(n,s,a),i(OO(OO(OO({},e),t),f(s))),l=r,p()||(c=requestAnimationFrame(d))}:function(a){u||=a;var s=(a-u)/r,l=nO(function(e,t){return RO.apply(void 0,CO(t).concat([n(s)]))},o);if(i(OO(OO(OO({},e),t),l)),s<1)c=requestAnimationFrame(d);else{var f=nO(function(e,t){return RO.apply(void 0,CO(t).concat([n(1)]))},o);i(OO(OO(OO({},e),t),f))}},function(){return requestAnimationFrame(d),function(){cancelAnimationFrame(c)}}}),HO=l(NE());function UO(e){"@babel/helpers - typeof";return UO=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},UO(e)}var WO=[`children`,`begin`,`duration`,`attributeName`,`easing`,`isActive`,`steps`,`from`,`to`,`canBegin`,`onAnimationEnd`,`shouldReAnimate`,`onAnimationReStart`];function GO(e,t){if(e==null)return{};var n=KO(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function KO(e,t){if(e==null)return{};for(var n={},r=Object.keys(e),i,a=0;a<r.length;a++)i=r[a],t.indexOf(i)>=0||(n[i]=e[i]);return n}function qO(e){return ZO(e)||XO(e)||YO(e)||JO()}function JO(){throw TypeError(`Invalid attempt to spread non-iterable instance.
55
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YO(e,t){if(e){if(typeof e==`string`)return QO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return QO(e,t)}}function XO(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function ZO(e){if(Array.isArray(e))return QO(e)}function QO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ek(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?$O(Object(n),!0).forEach(function(t){tk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$O(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tk(e,t,n){return t=ak(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nk(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function rk(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,ak(r.key),r)}}function ik(e,t,n){return t&&rk(e.prototype,t),n&&rk(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ak(e){var t=ok(e,`string`);return UO(t)===`symbol`?t:String(t)}function ok(e,t){if(UO(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(UO(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function sk(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ck(e,t)}function ck(e,t){return ck=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ck(e,t)}function lk(e){var t=fk();return function(){var n=pk(e),r;if(t){var i=pk(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return uk(this,r)}}function uk(e,t){if(t&&(UO(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return dk(e)}function dk(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function fk(){if(typeof Reflect>`u`||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function pk(e){return pk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pk(e)}var mk=function(e){sk(n,e);var t=lk(n);function n(e,r){var i;nk(this,n),i=t.call(this,e,r);var a=i.props,o=a.isActive,s=a.attributeName,c=a.from,l=a.to,u=a.steps,d=a.children,f=a.duration;if(i.handleStyleChange=i.handleStyleChange.bind(dk(i)),i.changeStyle=i.changeStyle.bind(dk(i)),!o||f<=0)return i.state={style:{}},typeof d==`function`&&(i.state={style:l}),uk(i);if(u&&u.length)i.state={style:u[0].style};else if(c){if(typeof d==`function`)return i.state={style:c},uk(i);i.state={style:s?tk({},s,c):c}}else i.state={style:{}};return i}return ik(n,[{key:`componentDidMount`,value:function(){var e=this.props,t=e.isActive,n=e.canBegin;this.mounted=!0,t&&n&&this.runAnimation(this.props)}},{key:`componentDidUpdate`,value:function(e){var t=this.props,n=t.isActive,r=t.canBegin,i=t.attributeName,a=t.shouldReAnimate,o=t.to,s=t.from,c=this.state.style;if(r){if(!n){var l={style:i?tk({},i,o):o};this.state&&c&&(i&&c[i]!==o||!i&&c!==o)&&this.setState(l)}else if(!(FD(e.to,o)&&e.canBegin&&e.isActive)){var u=!e.canBegin||!e.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var d=u||a?s:e.to;if(this.state&&c){var f={style:i?tk({},i,d):d};(i&&c[i]!==d||!i&&c!==d)&&this.setState(f)}this.runAnimation(ek(ek({},this.props),{},{from:d,begin:0}))}}}},{key:`componentWillUnmount`,value:function(){this.mounted=!1;var e=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&=(this.manager.stop(),null),this.stopJSAnimation&&this.stopJSAnimation(),e&&e()}},{key:`handleStyleChange`,value:function(e){this.changeStyle(e)}},{key:`changeStyle`,value:function(e){this.mounted&&this.setState({style:e})}},{key:`runJSAnimation`,value:function(e){var t=this,n=e.from,r=e.to,i=e.duration,a=e.easing,o=e.begin,s=e.onAnimationEnd,c=e.onAnimationStart,l=VO(n,r,xO(a),i,this.changeStyle);this.manager.start([c,o,function(){t.stopJSAnimation=l()},i,s])}},{key:`runStepAnimation`,value:function(e){var t=this,n=e.steps,r=e.begin,i=e.onAnimationStart,a=n[0],o=a.style,s=a.duration,c=s===void 0?0:s;return this.manager.start([i].concat(qO(n.reduce(function(e,r,i){if(i===0)return e;var a=r.duration,o=r.easing,s=o===void 0?`ease`:o,c=r.style,l=r.properties,u=r.onAnimationEnd,d=i>0?n[i-1]:r,f=l||Object.keys(c);if(typeof s==`function`||s===`spring`)return[].concat(qO(e),[t.runJSAnimation.bind(t,{from:d.style,to:c,duration:a,easing:s}),a]);var p=rO(f,a,s),m=ek(ek(ek({},d.style),c),{},{transition:p});return[].concat(qO(e),[m,a,u]).filter(eO)},[o,Math.max(c,r)])),[e.onAnimationEnd]))}},{key:`runAnimation`,value:function(e){this.manager||=KD();var t=e.begin,n=e.duration,r=e.attributeName,i=e.to,a=e.easing,o=e.onAnimationStart,s=e.onAnimationEnd,c=e.steps,l=e.children,u=this.manager;if(this.unSubscribe=u.subscribe(this.handleStyleChange),typeof a==`function`||typeof l==`function`||a===`spring`)this.runJSAnimation(e);else if(c.length>1)this.runStepAnimation(e);else{var d=r?tk({},r,i):i,f=rO(Object.keys(d),n,a);u.start([o,t,ek(ek({},d),{},{transition:f}),n,s])}}},{key:`render`,value:function(){var e=this.props,t=e.children;e.begin;var n=e.duration;e.attributeName,e.easing;var r=e.isActive;e.steps,e.from,e.to,e.canBegin,e.onAnimationEnd,e.shouldReAnimate,e.onAnimationReStart;var i=GO(e,WO),a=v.Children.count(t),o=this.state.style;if(typeof t==`function`)return t(o);if(!r||a===0||n<=0)return t;var s=function(e){var t=e.props,n=t.style,r=n===void 0?{}:n,a=t.className;return(0,v.cloneElement)(e,ek(ek({},i),{},{style:ek(ek({},r),o),className:a}))};return a===1?s(v.Children.only(t)):v.createElement(`div`,null,v.Children.map(t,function(e){return s(e)}))}}]),n}(v.PureComponent);mk.displayName=`Animate`,mk.defaultProps={begin:0,duration:1e3,from:``,to:``,attributeName:``,easing:`ease`,isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},mk.propTypes={from:HO.default.oneOfType([HO.default.object,HO.default.string]),to:HO.default.oneOfType([HO.default.object,HO.default.string]),attributeName:HO.default.string,duration:HO.default.number,begin:HO.default.number,easing:HO.default.oneOfType([HO.default.string,HO.default.func]),steps:HO.default.arrayOf(HO.default.shape({duration:HO.default.number.isRequired,style:HO.default.object.isRequired,easing:HO.default.oneOfType([HO.default.oneOf([`ease`,`ease-in`,`ease-out`,`ease-in-out`,`linear`]),HO.default.func]),properties:HO.default.arrayOf(`string`),onAnimationEnd:HO.default.func})),children:HO.default.oneOfType([HO.default.node,HO.default.func]),isActive:HO.default.bool,canBegin:HO.default.bool,onAnimationEnd:HO.default.func,shouldReAnimate:HO.default.bool,onAnimationStart:HO.default.func,onAnimationReStart:HO.default.func};var hk=mk;function gk(e){"@babel/helpers - typeof";return gk=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},gk(e)}function _k(){return _k=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_k.apply(this,arguments)}function vk(e,t){return Ck(e)||Sk(e,t)||bk(e,t)||yk()}function yk(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
56
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bk(e,t){if(e){if(typeof e==`string`)return xk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xk(e,t)}}function xk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Sk(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Ck(e){if(Array.isArray(e))return e}function wk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Tk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?wk(Object(n),!0).forEach(function(t){Ek(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ek(e,t,n){return t=Dk(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dk(e){var t=Ok(e,`string`);return gk(t)==`symbol`?t:t+``}function Ok(e,t){if(gk(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(gk(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var kk=function(e,t,n,r,i){var a=Math.min(Math.abs(n)/2,Math.abs(r)/2),o=r>=0?1:-1,s=n>=0?1:-1,c=+(r>=0&&n>=0||r<0&&n<0),l;if(a>0&&i instanceof Array){for(var u=[0,0,0,0],d=0,f=4;d<f;d++)u[d]=i[d]>a?a:i[d];l=`M${e},${t+o*u[0]}`,u[0]>0&&(l+=`A ${u[0]},${u[0]},0,0,${c},${e+s*u[0]},${t}`),l+=`L ${e+n-s*u[1]},${t}`,u[1]>0&&(l+=`A ${u[1]},${u[1]},0,0,${c},
57
- ${e+n},${t+o*u[1]}`),l+=`L ${e+n},${t+r-o*u[2]}`,u[2]>0&&(l+=`A ${u[2]},${u[2]},0,0,${c},
58
- ${e+n-s*u[2]},${t+r}`),l+=`L ${e+s*u[3]},${t+r}`,u[3]>0&&(l+=`A ${u[3]},${u[3]},0,0,${c},
59
- ${e},${t+r-o*u[3]}`),l+=`Z`}else if(a>0&&i===+i&&i>0){var p=Math.min(a,i);l=`M ${e},${t+o*p}
60
- A ${p},${p},0,0,${c},${e+s*p},${t}
61
- L ${e+n-s*p},${t}
62
- A ${p},${p},0,0,${c},${e+n},${t+o*p}
63
- L ${e+n},${t+r-o*p}
64
- A ${p},${p},0,0,${c},${e+n-s*p},${t+r}
65
- L ${e+s*p},${t+r}
66
- A ${p},${p},0,0,${c},${e},${t+r-o*p} Z`}else l=`M ${e},${t} h ${n} v ${r} h ${-n} Z`;return l},Ak=function(e,t){if(!e||!t)return!1;var n=e.x,r=e.y,i=t.x,a=t.y,o=t.width,s=t.height;if(Math.abs(o)>0&&Math.abs(s)>0){var c=Math.min(i,i+o),l=Math.max(i,i+o),u=Math.min(a,a+s),d=Math.max(a,a+s);return n>=c&&n<=l&&r>=u&&r<=d}return!1},jk={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:`ease`},Mk=function(e){var t=Tk(Tk({},jk),e),n=(0,v.useRef)(),r=vk((0,v.useState)(-1),2),i=r[0],a=r[1];(0,v.useEffect)(function(){if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&a(e)}catch{}},[]);var o=t.x,s=t.y,c=t.width,l=t.height,u=t.radius,d=t.className,f=t.animationEasing,p=t.animationDuration,m=t.animationBegin,h=t.isAnimationActive,g=t.isUpdateAnimationActive;if(o!==+o||s!==+s||c!==+c||l!==+l||c===0||l===0)return null;var _=K(`recharts-rectangle`,d);return g?v.createElement(hk,{canBegin:i>0,from:{width:c,height:l,x:o,y:s},to:{width:c,height:l,x:o,y:s},duration:p,animationEasing:f,isActive:g},function(e){var r=e.width,a=e.height,o=e.x,s=e.y;return v.createElement(hk,{canBegin:i>0,from:`0px ${i===-1?1:i}px`,to:`${i}px 0px`,attributeName:`strokeDasharray`,begin:m,duration:p,isActive:h,easing:f},v.createElement(`path`,_k({},Z(t,!0),{className:_,d:kk(o,s,r,a,u),ref:n})))}):v.createElement(`path`,_k({},Z(t,!0),{className:_,d:kk(o,s,c,l,u)}))};function Nk(){return Nk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nk.apply(this,arguments)}var Pk=function(e){var t=e.cx,n=e.cy,r=e.r,i=e.className,a=K(`recharts-dot`,i);return t===+t&&n===+n&&r===+r?v.createElement(`circle`,Nk({},Z(e,!1),ac(e),{className:a,cx:t,cy:n,r})):null};function Fk(e){"@babel/helpers - typeof";return Fk=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Fk(e)}var Ik=[`x`,`y`,`top`,`left`,`width`,`height`,`className`];function Lk(){return Lk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lk.apply(this,arguments)}function Rk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Rk(Object(n),!0).forEach(function(t){Bk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Bk(e,t,n){return t=Vk(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vk(e){var t=Hk(e,`string`);return Fk(t)==`symbol`?t:t+``}function Hk(e,t){if(Fk(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Fk(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Uk(e,t){if(e==null)return{};var n=Wk(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Wk(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Gk=function(e,t,n,r,i,a){return`M${e},${i}v${r}M${a},${t}h${n}`},Kk=function(e){var t=e.x,n=t===void 0?0:t,r=e.y,i=r===void 0?0:r,a=e.top,o=a===void 0?0:a,s=e.left,c=s===void 0?0:s,l=e.width,u=l===void 0?0:l,d=e.height,f=d===void 0?0:d,p=e.className,m=Uk(e,Ik),h=zk({x:n,y:i,top:o,left:c,width:u,height:f},m);return!Y(n)||!Y(i)||!Y(u)||!Y(f)||!Y(o)||!Y(c)?null:v.createElement(`path`,Lk({},Z(h,!0),{className:K(`recharts-cross`,p),d:Gk(n,i,u,f,o,c)}))},qk=o(((e,t)=>{t.exports=Jd()(Object.getPrototypeOf,Object)})),Jk=o(((e,t)=>{var n=q(),r=qk(),i=Lo(),a=`[object Object]`,o=Function.prototype,s=Object.prototype,c=o.toString,l=s.hasOwnProperty,u=c.call(Object);function d(e){if(!i(e)||n(e)!=a)return!1;var t=r(e);if(t===null)return!0;var o=l.call(t,`constructor`)&&t.constructor;return typeof o==`function`&&o instanceof o&&c.call(o)==u}t.exports=d})),Yk=o(((e,t)=>{var n=q(),r=Lo(),i=`[object Boolean]`;function a(e){return e===!0||e===!1||r(e)&&n(e)==i}t.exports=a}));function Xk(e){"@babel/helpers - typeof";return Xk=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Xk(e)}function Zk(){return Zk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zk.apply(this,arguments)}function Qk(e,t){return rA(e)||nA(e,t)||eA(e,t)||$k()}function $k(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
67
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eA(e,t){if(e){if(typeof e==`string`)return tA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tA(e,t)}}function tA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function nA(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function rA(e){if(Array.isArray(e))return e}function iA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function aA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?iA(Object(n),!0).forEach(function(t){oA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function oA(e,t,n){return t=sA(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sA(e){var t=cA(e,`string`);return Xk(t)==`symbol`?t:t+``}function cA(e,t){if(Xk(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Xk(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var lA=function(e,t,n,r,i){var a=n-r,o=`M ${e},${t}`;return o+=`L ${e+n},${t}`,o+=`L ${e+n-a/2},${t+i}`,o+=`L ${e+n-a/2-r},${t+i}`,o+=`L ${e},${t} Z`,o},uA={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:`ease`},dA=function(e){var t=aA(aA({},uA),e),n=(0,v.useRef)(),r=Qk((0,v.useState)(-1),2),i=r[0],a=r[1];(0,v.useEffect)(function(){if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&a(e)}catch{}},[]);var o=t.x,s=t.y,c=t.upperWidth,l=t.lowerWidth,u=t.height,d=t.className,f=t.animationEasing,p=t.animationDuration,m=t.animationBegin,h=t.isUpdateAnimationActive;if(o!==+o||s!==+s||c!==+c||l!==+l||u!==+u||c===0&&l===0||u===0)return null;var g=K(`recharts-trapezoid`,d);return h?v.createElement(hk,{canBegin:i>0,from:{upperWidth:0,lowerWidth:0,height:u,x:o,y:s},to:{upperWidth:c,lowerWidth:l,height:u,x:o,y:s},duration:p,animationEasing:f,isActive:h},function(e){var r=e.upperWidth,a=e.lowerWidth,o=e.height,s=e.x,c=e.y;return v.createElement(hk,{canBegin:i>0,from:`0px ${i===-1?1:i}px`,to:`${i}px 0px`,attributeName:`strokeDasharray`,begin:m,duration:p,easing:f},v.createElement(`path`,Zk({},Z(t,!0),{className:g,d:lA(s,c,r,a,o),ref:n})))}):v.createElement(`g`,null,v.createElement(`path`,Zk({},Z(t,!0),{className:g,d:lA(o,s,c,l,u)})))},fA=l(Jk()),pA=l(Yk()),mA=[`option`,`shapeType`,`propTransformer`,`activeClassName`,`isActive`];function hA(e){"@babel/helpers - typeof";return hA=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},hA(e)}function gA(e,t){if(e==null)return{};var n=_A(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _A(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function vA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?vA(Object(n),!0).forEach(function(t){bA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function bA(e,t,n){return t=xA(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xA(e){var t=SA(e,`string`);return hA(t)==`symbol`?t:t+``}function SA(e,t){if(hA(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(hA(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function CA(e,t){return yA(yA({},t),e)}function wA(e,t){return e===`symbols`}function TA(e){var t=e.shapeType,n=e.elementProps;switch(t){case`rectangle`:return v.createElement(Mk,n);case`trapezoid`:return v.createElement(dA,n);case`sector`:return v.createElement(gE,n);case`symbols`:if(wA(t,n))return v.createElement(Ju,n);break;default:return null}}function EA(e){return(0,v.isValidElement)(e)?e.props:e}function DA(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?CA:r,a=e.activeClassName,o=a===void 0?`recharts-active-shape`:a,s=e.isActive,c=gA(e,mA),l;if((0,v.isValidElement)(t))l=(0,v.cloneElement)(t,yA(yA({},c),EA(t)));else if((0,X.default)(t))l=t(c);else if((0,fA.default)(t)&&!(0,pA.default)(t)){var u=i(t,c);l=v.createElement(TA,{shapeType:n,elementProps:u})}else{var d=c;l=v.createElement(TA,{shapeType:n,elementProps:d})}return s?v.createElement(Bc,{className:o},l):l}function OA(e,t){return t!=null&&`trapezoids`in e.props}function kA(e,t){return t!=null&&`sectors`in e.props}function AA(e,t){return t!=null&&`points`in e.props}function jA(e,t){var n,r,i=e.x===(t==null||(n=t.labelViewBox)==null?void 0:n.x)||e.x===t.x,a=e.y===(t==null||(r=t.labelViewBox)==null?void 0:r.y)||e.y===t.y;return i&&a}function MA(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function NA(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function PA(e,t){var n;return OA(e,t)?n=jA:kA(e,t)?n=MA:AA(e,t)&&(n=NA),n}function FA(e,t){var n;return OA(e,t)?n=`trapezoids`:kA(e,t)?n=`sectors`:AA(e,t)&&(n=`points`),n}function IA(e,t){if(OA(e,t)){var n;return(n=t.tooltipPayload)==null||(n=n[0])==null||(n=n.payload)==null?void 0:n.payload}if(kA(e,t)){var r;return(r=t.tooltipPayload)==null||(r=r[0])==null||(r=r.payload)==null?void 0:r.payload}return AA(e,t)?t.payload:{}}function LA(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=FA(n,t),a=IA(n,t),o=r.filter(function(e,r){var o=(0,tw.default)(a,e),s=n.props[i].filter(function(e){return PA(n,t)(e,t)}),c=r===n.props[i].indexOf(s[s.length-1]);return o&&c});return r.indexOf(o[o.length-1])}var RA=o(((e,t)=>{var n=Math.ceil,r=Math.max;function i(e,t,i,a){for(var o=-1,s=r(n((t-e)/(i||1)),0),c=Array(s);s--;)c[a?s:++o]=e,e+=i;return c}t.exports=i})),zA=o(((e,t)=>{var n=Lm(),r=1/0,i=17976931348623157e292;function a(e){return e?(e=n(e),e===r||e===-r?(e<0?-1:1)*i:e===e?e:0):e===0?e:0}t.exports=a})),BA=o(((e,t)=>{var n=RA(),r=Cp(),i=zA();function a(e){return function(t,a,o){return o&&typeof o!=`number`&&r(t,a,o)&&(a=o=void 0),t=i(t),a===void 0?(a=t,t=0):a=i(a),o=o===void 0?t<a?1:-1:i(o),n(t,a,o,e)}}t.exports=a})),VA=o(((e,t)=>{t.exports=BA()()}));function HA(e){"@babel/helpers - typeof";return HA=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},HA(e)}function UA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function WA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?UA(Object(n),!0).forEach(function(t){GA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function GA(e,t,n){return t=KA(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KA(e){var t=qA(e,`string`);return HA(t)==`symbol`?t:t+``}function qA(e,t){if(HA(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(HA(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var JA=[`Webkit`,`Moz`,`O`,`ms`],YA=function(e,t){if(!e)return null;var n=e.replace(/(\w)/,function(e){return e.toUpperCase()}),r=JA.reduce(function(e,r){return WA(WA({},e),{},GA({},r+n,t))},{});return r[e]=t,r},XA=l(VA());function ZA(e){"@babel/helpers - typeof";return ZA=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},ZA(e)}function QA(){return QA=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},QA.apply(this,arguments)}function $A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ej(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?$A(Object(n),!0).forEach(function(t){dj(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$A(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tj(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function nj(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,fj(r.key),r)}}function rj(e,t,n){return t&&nj(e.prototype,t),n&&nj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ij(e,t,n){return t=cj(t),aj(e,sj()?Reflect.construct(t,n||[],cj(e).constructor):t.apply(e,n))}function aj(e,t){if(t&&(ZA(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return oj(e)}function oj(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function sj(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sj=function(){return!!e})()}function cj(e){return cj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},cj(e)}function lj(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uj(e,t)}function uj(e,t){return uj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},uj(e,t)}function dj(e,t,n){return t=fj(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fj(e){var t=pj(e,`string`);return ZA(t)==`symbol`?t:t+``}function pj(e,t){if(ZA(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(ZA(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var mj=function(e){var t=e.data,n=e.startIndex,r=e.endIndex,i=e.x,a=e.width,o=e.travellerWidth;if(!t||!t.length)return{};var s=t.length,c=hx().domain((0,XA.default)(0,s)).range([i,i+a-o]),l=c.domain().map(function(e){return c(e)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:c(n),endX:c(r),scale:c,scaleValues:l}},hj=function(e){return e.changedTouches&&!!e.changedTouches.length},gj=function(e){function t(e){var n;return tj(this,t),n=ij(this,t,[e]),dj(n,`handleDrag`,function(e){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(e):n.state.isSlideMoving&&n.handleSlideDrag(e)}),dj(n,`handleTouchMove`,function(e){e.changedTouches!=null&&e.changedTouches.length>0&&n.handleDrag(e.changedTouches[0])}),dj(n,`handleDragEnd`,function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var e=n.props,t=e.endIndex,r=e.onDragEnd,i=e.startIndex;r?.({endIndex:t,startIndex:i})}),n.detachDragEndListener()}),dj(n,`handleLeaveWrapper`,function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),dj(n,`handleEnterSlideOrTraveller`,function(){n.setState({isTextActive:!0})}),dj(n,`handleLeaveSlideOrTraveller`,function(){n.setState({isTextActive:!1})}),dj(n,`handleSlideDragStart`,function(e){var t=hj(e)?e.changedTouches[0]:e;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:t.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,`startX`),endX:n.handleTravellerDragStart.bind(n,`endX`)},n.state={},n}return lj(t,e),rj(t,[{key:`componentWillUnmount`,value:function(){this.leaveTimer&&=(clearTimeout(this.leaveTimer),null),this.detachDragEndListener()}},{key:`getIndex`,value:function(e){var n=e.startX,r=e.endX,i=this.state.scaleValues,a=this.props,o=a.gap,s=a.data.length-1,c=Math.min(n,r),l=Math.max(n,r),u=t.getIndexInRange(i,c),d=t.getIndexInRange(i,l);return{startIndex:u-u%o,endIndex:d===s?s:d-d%o}}},{key:`getTextOfTick`,value:function(e){var t=this.props,n=t.data,r=t.tickFormatter,i=t.dataKey,a=mw(n[e],i,e);return(0,X.default)(r)?r(a,e):a}},{key:`attachDragEndListener`,value:function(){window.addEventListener(`mouseup`,this.handleDragEnd,!0),window.addEventListener(`touchend`,this.handleDragEnd,!0),window.addEventListener(`mousemove`,this.handleDrag,!0)}},{key:`detachDragEndListener`,value:function(){window.removeEventListener(`mouseup`,this.handleDragEnd,!0),window.removeEventListener(`touchend`,this.handleDragEnd,!0),window.removeEventListener(`mousemove`,this.handleDrag,!0)}},{key:`handleSlideDrag`,value:function(e){var t=this.state,n=t.slideMoveStartX,r=t.startX,i=t.endX,a=this.props,o=a.x,s=a.width,c=a.travellerWidth,l=a.startIndex,u=a.endIndex,d=a.onChange,f=e.pageX-n;f>0?f=Math.min(f,o+s-c-i,o+s-c-r):f<0&&(f=Math.max(f,o-r,o-i));var p=this.getIndex({startX:r+f,endX:i+f});(p.startIndex!==l||p.endIndex!==u)&&d&&d(p),this.setState({startX:r+f,endX:i+f,slideMoveStartX:e.pageX})}},{key:`handleTravellerDragStart`,value:function(e,t){var n=hj(t)?t.changedTouches[0]:t;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:n.pageX}),this.attachDragEndListener()}},{key:`handleTravellerMove`,value:function(e){var t=this.state,n=t.brushMoveStartX,r=t.movingTravellerId,i=t.endX,a=t.startX,o=this.state[r],s=this.props,c=s.x,l=s.width,u=s.travellerWidth,d=s.onChange,f=s.gap,p=s.data,m={startX:this.state.startX,endX:this.state.endX},h=e.pageX-n;h>0?h=Math.min(h,c+l-u-o):h<0&&(h=Math.max(h,c-o)),m[r]=o+h;var g=this.getIndex(m),_=g.startIndex,v=g.endIndex,y=function(){var e=p.length-1;return r===`startX`&&(i>a?_%f===0:v%f===0)||i<a&&v===e||r===`endX`&&(i>a?v%f===0:_%f===0)||i>a&&v===e};this.setState(dj(dj({},r,o+h),`brushMoveStartX`,e.pageX),function(){d&&y()&&d(g)})}},{key:`handleTravellerMoveKeyboard`,value:function(e,t){var n=this,r=this.state,i=r.scaleValues,a=r.startX,o=r.endX,s=this.state[t],c=i.indexOf(s);if(c!==-1){var l=c+e;if(!(l===-1||l>=i.length)){var u=i[l];t===`startX`&&u>=o||t===`endX`&&u<=a||this.setState(dj({},t,u),function(){n.props.onChange(n.getIndex({startX:n.state.startX,endX:n.state.endX}))})}}}},{key:`renderBackground`,value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,i=e.height,a=e.fill,o=e.stroke;return v.createElement(`rect`,{stroke:o,fill:a,x:t,y:n,width:r,height:i})}},{key:`renderPanorama`,value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,i=e.height,a=e.data,o=e.children,s=e.padding,c=v.Children.only(o);return c?v.cloneElement(c,{x:t,y:n,width:r,height:i,margin:s,compact:!0,data:a}):null}},{key:`renderTravellerLayer`,value:function(e,n){var r=this,i=this.props,a=i.y,o=i.travellerWidth,s=i.height,c=i.traveller,l=i.ariaLabel,u=i.data,d=i.startIndex,f=i.endIndex,p=Math.max(e,this.props.x),m=ej(ej({},Z(this.props,!1)),{},{x:p,y:a,width:o,height:s}),h=l||`Min value: ${u[d]?.name}, Max value: ${u[f]?.name}`;return v.createElement(Bc,{tabIndex:0,role:`slider`,"aria-label":h,"aria-valuenow":e,className:`recharts-brush-traveller`,onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[n],onTouchStart:this.travellerDragStartHandlers[n],onKeyDown:function(e){[`ArrowLeft`,`ArrowRight`].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),r.handleTravellerMoveKeyboard(e.key===`ArrowRight`?1:-1,n))},onFocus:function(){r.setState({isTravellerFocused:!0})},onBlur:function(){r.setState({isTravellerFocused:!1})},style:{cursor:`col-resize`}},t.renderTraveller(c,m))}},{key:`renderSlide`,value:function(e,t){var n=this.props,r=n.y,i=n.height,a=n.stroke,o=n.travellerWidth,s=Math.min(e,t)+o,c=Math.max(Math.abs(t-e)-o,0);return v.createElement(`rect`,{className:`recharts-brush-slide`,onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:`move`},stroke:`none`,fill:a,fillOpacity:.2,x:s,y:r,width:c,height:i})}},{key:`renderText`,value:function(){var e=this.props,t=e.startIndex,n=e.endIndex,r=e.y,i=e.height,a=e.travellerWidth,o=e.stroke,s=this.state,c=s.startX,l=s.endX,u=5,d={pointerEvents:`none`,fill:o};return v.createElement(Bc,{className:`recharts-brush-texts`},v.createElement(rg,QA({textAnchor:`end`,verticalAnchor:`middle`,x:Math.min(c,l)-u,y:r+i/2},d),this.getTextOfTick(t)),v.createElement(rg,QA({textAnchor:`start`,verticalAnchor:`middle`,x:Math.max(c,l)+a+u,y:r+i/2},d),this.getTextOfTick(n)))}},{key:`render`,value:function(){var e=this.props,t=e.data,n=e.className,r=e.children,i=e.x,a=e.y,o=e.width,s=e.height,c=e.alwaysShowText,l=this.state,u=l.startX,d=l.endX,f=l.isTextActive,p=l.isSlideMoving,m=l.isTravellerMoving,h=l.isTravellerFocused;if(!t||!t.length||!Y(i)||!Y(a)||!Y(o)||!Y(s)||o<=0||s<=0)return null;var g=K(`recharts-brush`,n),_=v.Children.count(r)===1,y=YA(`userSelect`,`none`);return v.createElement(Bc,{className:g,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:y},this.renderBackground(),_&&this.renderPanorama(),this.renderSlide(u,d),this.renderTravellerLayer(u,`startX`),this.renderTravellerLayer(d,`endX`),(f||p||m||h||c)&&this.renderText())}}],[{key:`renderDefaultTraveller`,value:function(e){var t=e.x,n=e.y,r=e.width,i=e.height,a=e.stroke,o=Math.floor(n+i/2)-1;return v.createElement(v.Fragment,null,v.createElement(`rect`,{x:t,y:n,width:r,height:i,fill:a,stroke:`none`}),v.createElement(`line`,{x1:t+1,y1:o,x2:t+r-1,y2:o,fill:`none`,stroke:`#fff`}),v.createElement(`line`,{x1:t+1,y1:o+2,x2:t+r-1,y2:o+2,fill:`none`,stroke:`#fff`}))}},{key:`renderTraveller`,value:function(e,n){return v.isValidElement(e)?v.cloneElement(e,n):(0,X.default)(e)?e(n):t.renderDefaultTraveller(n)}},{key:`getDerivedStateFromProps`,value:function(e,t){var n=e.data,r=e.width,i=e.x,a=e.travellerWidth,o=e.updateId,s=e.startIndex,c=e.endIndex;if(n!==t.prevData||o!==t.prevUpdateId)return ej({prevData:n,prevTravellerWidth:a,prevUpdateId:o,prevX:i,prevWidth:r},n&&n.length?mj({data:n,width:r,x:i,travellerWidth:a,startIndex:s,endIndex:c}):{scale:null,scaleValues:null});if(t.scale&&(r!==t.prevWidth||i!==t.prevX||a!==t.prevTravellerWidth)){t.scale.range([i,i+r-a]);var l=t.scale.domain().map(function(e){return t.scale(e)});return{prevData:n,prevTravellerWidth:a,prevUpdateId:o,prevX:i,prevWidth:r,startX:t.scale(e.startIndex),endX:t.scale(e.endIndex),scaleValues:l}}return null}},{key:`getIndexInRange`,value:function(e,t){for(var n=e.length,r=0,i=n-1;i-r>1;){var a=Math.floor((r+i)/2);e[a]>t?i=a:r=a}return t>=e[i]?i:r}}])}(v.PureComponent);dj(gj,`displayName`,`Brush`),dj(gj,`defaultProps`,{height:40,travellerWidth:5,gap:1,fill:`#fff`,stroke:`#666`,padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var _j=o(((e,t)=>{var n=lp();function r(e,t){var r;return n(e,function(e,n,i){return r=t(e,n,i),!r}),!!r}t.exports=r})),vj=o(((e,t)=>{var n=Cd(),r=Sf(),i=_j(),a=jo(),o=Cp();function s(e,t,s){var c=a(e)?n:i;return s&&o(e,t,s)&&(t=void 0),c(e,r(t,3))}t.exports=s})),yj=function(e,t){var n=e.alwaysShow,r=e.ifOverflow;return n&&(r=`extendDomain`),r===t},bj=o(((e,t)=>{var n=vp();function r(e,t,r){t==`__proto__`&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}t.exports=r})),xj=o(((e,t)=>{var n=bj(),r=sp(),i=Sf();function a(e,t){var a={};return t=i(t,3),r(e,function(e,r,i){n(a,r,t(e,r,i))}),a}t.exports=a})),Sj=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}t.exports=n})),Cj=o(((e,t)=>{var n=lp();function r(e,t){var r=!0;return n(e,function(e,n,i){return r=!!t(e,n,i),r}),r}t.exports=r})),wj=o(((e,t)=>{var n=Sj(),r=Cj(),i=Sf(),a=jo(),o=Cp();function s(e,t,s){var c=a(e)?n:r;return s&&o(e,t,s)&&(t=void 0),c(e,i(t,3))}t.exports=s})),Tj=[`x`,`y`];function Ej(e){"@babel/helpers - typeof";return Ej=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ej(e)}function Dj(){return Dj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dj.apply(this,arguments)}function Oj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Oj(Object(n),!0).forEach(function(t){Aj(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Aj(e,t,n){return t=jj(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jj(e){var t=Mj(e,`string`);return Ej(t)==`symbol`?t:t+``}function Mj(e,t){if(Ej(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Ej(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Nj(e,t){if(e==null)return{};var n=Pj(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pj(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Fj(e,t){var n=e.x,r=e.y,i=Nj(e,Tj),a=`${n}`,o=parseInt(a,10),s=`${r}`,c=parseInt(s,10),l=`${t.height||i.height}`,u=parseInt(l,10),d=`${t.width||i.width}`,f=parseInt(d,10);return kj(kj(kj(kj(kj({},t),i),o?{x:o}:{}),c?{y:c}:{}),{},{height:u,width:f,name:t.name,radius:t.radius})}function Ij(e){return v.createElement(DA,Dj({shapeType:`rectangle`,propTransformer:Fj,activeClassName:`recharts-active-bar`},e))}var Lj=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,r){if(typeof e==`number`)return e;var i=Y(n)||Bs(n);return i?e(n,r):(!i&&yC(!1),t)}},Rj=[`value`,`background`],zj;function Bj(e){"@babel/helpers - typeof";return Bj=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Bj(e)}function Vj(e,t){if(e==null)return{};var n=Hj(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Hj(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Uj(){return Uj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uj.apply(this,arguments)}function Wj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Gj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Wj(Object(n),!0).forEach(function(t){nM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Kj(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function qj(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,rM(r.key),r)}}function Jj(e,t,n){return t&&qj(e.prototype,t),n&&qj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yj(e,t,n){return t=$j(t),Xj(e,Qj()?Reflect.construct(t,n||[],$j(e).constructor):t.apply(e,n))}function Xj(e,t){if(t&&(Bj(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Zj(e)}function Zj(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function Qj(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Qj=function(){return!!e})()}function $j(e){return $j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$j(e)}function eM(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tM(e,t)}function tM(e,t){return tM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},tM(e,t)}function nM(e,t,n){return t=rM(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rM(e){var t=iM(e,`string`);return Bj(t)==`symbol`?t:t+``}function iM(e,t){if(Bj(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Bj(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var aM=function(e){function t(){var e;Kj(this,t);var n=[...arguments];return e=Yj(this,t,[].concat(n)),nM(e,`state`,{isAnimationFinished:!1}),nM(e,`id`,Us(`recharts-bar-`)),nM(e,`handleAnimationEnd`,function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),t&&t()}),nM(e,`handleAnimationStart`,function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),t&&t()}),e}return eM(t,e),Jj(t,[{key:`renderRectanglesStatically`,value:function(e){var t=this,n=this.props,r=n.shape,i=n.dataKey,a=n.activeIndex,o=n.activeBar,s=Z(this.props,!1);return e&&e.map(function(e,n){var c=n===a,l=c?o:r,u=Gj(Gj(Gj({},s),e),{},{isActive:c,option:l,index:n,dataKey:i,onAnimationStart:t.handleAnimationStart,onAnimationEnd:t.handleAnimationEnd});return v.createElement(Bc,Uj({className:`recharts-bar-rectangle`},sc(t.props,e,n),{key:`rectangle-${e?.x}-${e?.y}-${e?.value}-${n}`}),v.createElement(Ij,u))})}},{key:`renderRectanglesWithAnimation`,value:function(){var e=this,t=this.props,n=t.data,r=t.layout,i=t.isAnimationActive,a=t.animationBegin,o=t.animationDuration,s=t.animationEasing,c=t.animationId,l=this.state.prevData;return v.createElement(hk,{begin:a,duration:o,isActive:i,easing:s,from:{t:0},to:{t:1},key:`bar-${c}`,onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(t){var i=t.t,a=n.map(function(e,t){var n=l&&l[t];if(n){var a=qs(n.x,e.x),o=qs(n.y,e.y),s=qs(n.width,e.width),c=qs(n.height,e.height);return Gj(Gj({},e),{},{x:a(i),y:o(i),width:s(i),height:c(i)})}if(r===`horizontal`){var u=qs(0,e.height)(i);return Gj(Gj({},e),{},{y:e.y+e.height-u,height:u})}var d=qs(0,e.width)(i);return Gj(Gj({},e),{},{width:d})});return v.createElement(Bc,null,e.renderRectanglesStatically(a))})}},{key:`renderRectangles`,value:function(){var e=this.props,t=e.data,n=e.isAnimationActive,r=this.state.prevData;return n&&t&&t.length&&(!r||!(0,tw.default)(r,t))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(t)}},{key:`renderBackground`,value:function(){var e=this,t=this.props,n=t.data,r=t.dataKey,i=t.activeIndex,a=Z(this.props.background,!1);return n.map(function(t,n){t.value;var o=t.background,s=Vj(t,Rj);if(!o)return null;var c=Gj(Gj(Gj(Gj(Gj({},s),{},{fill:`#eee`},o),a),sc(e.props,t,n)),{},{onAnimationStart:e.handleAnimationStart,onAnimationEnd:e.handleAnimationEnd,dataKey:r,index:n,className:`recharts-bar-background-rectangle`});return v.createElement(Ij,Uj({key:`background-bar-${n}`,option:e.props.background,isActive:n===i},c))})}},{key:`renderErrorBar`,value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,r=n.data,i=n.xAxis,a=n.yAxis,o=n.layout,s=n.children,c=yc(s,WC);if(!c)return null;var l=o===`vertical`?r[0].height/2:r[0].width/2,u=function(e,t){var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:mw(e,t)}},d={clipPath:e?`url(#clipPath-${t})`:null};return v.createElement(Bc,d,c.map(function(e){return v.cloneElement(e,{key:`error-bar-${t}-${e.props.dataKey}`,data:r,xAxis:i,yAxis:a,layout:o,offset:l,dataPointFormatter:u})}))}},{key:`render`,value:function(){var e=this.props,t=e.hide,n=e.data,r=e.className,i=e.xAxis,a=e.yAxis,o=e.left,s=e.top,c=e.width,l=e.height,u=e.isAnimationActive,d=e.background,f=e.id;if(t||!n||!n.length)return null;var p=this.state.isAnimationFinished,m=K(`recharts-bar`,r),h=i&&i.allowDataOverflow,g=a&&a.allowDataOverflow,_=h||g,y=(0,J.default)(f)?this.id:f;return v.createElement(Bc,{className:m},h||g?v.createElement(`defs`,null,v.createElement(`clipPath`,{id:`clipPath-${y}`},v.createElement(`rect`,{x:h?o:o-c/2,y:g?s:s-l/2,width:h?c:c*2,height:g?l:l*2}))):null,v.createElement(Bc,{className:`recharts-bar-rectangles`,clipPath:_?`url(#clipPath-${y})`:null},d?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(_,y),(!u||p)&&tE.renderCallByParent(this.props,n))}}],[{key:`getDerivedStateFromProps`,value:function(e,t){return e.animationId===t.prevAnimationId?e.data===t.curData?null:{curData:e.data}:{prevAnimationId:e.animationId,curData:e.data,prevData:t.curData}}}])}(v.PureComponent);zj=aM,nM(aM,`displayName`,`Bar`),nM(aM,`defaultProps`,{xAxisId:0,yAxisId:0,legendType:`rect`,minPointSize:0,hide:!1,data:[],layout:`vertical`,activeBar:!1,isAnimationActive:!mm.isSsr,animationBegin:0,animationDuration:400,animationEasing:`ease`}),nM(aM,`getComposedData`,function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,s=e.xAxisTicks,c=e.yAxisTicks,l=e.stackedData,u=e.dataStartIndex,d=e.displayedData,f=e.offset,p=Nw(r,n);if(!p)return null;var m=t.layout,h=n.type.defaultProps,g=h===void 0?n.props:Gj(Gj({},h),n.props),_=g.dataKey,v=g.children,y=g.minPointSize,b=m===`horizontal`?o:a,x=l?b.scale.domain():null,S=Vw({numericAxis:b}),C=yc(v,$m);return Gj({data:d.map(function(e,t){var r,d,f,h,g,v;l?r=Pw(l[u+t],x):(r=mw(e,_),Array.isArray(r)||(r=[S,r]));var b=Lj(y,zj.defaultProps.minPointSize)(r[1],t);if(m===`horizontal`){var w=[o.scale(r[0]),o.scale(r[1])],T=w[0],E=w[1];d=Bw({axis:a,ticks:s,bandSize:i,offset:p.offset,entry:e,index:t}),f=E??T??void 0,h=p.size;var D=T-E;if(g=Number.isNaN(D)?0:D,v={x:d,y:o.y,width:h,height:o.height},Math.abs(b)>0&&Math.abs(g)<Math.abs(b)){var O=Rs(g||b)*(Math.abs(b)-Math.abs(g));f-=O,g+=O}}else{var k=[a.scale(r[0]),a.scale(r[1])],A=k[0],j=k[1];if(d=A,f=Bw({axis:o,ticks:c,bandSize:i,offset:p.offset,entry:e,index:t}),h=j-A,g=p.size,v={x:a.x,y:f,width:a.width,height:g},Math.abs(b)>0&&Math.abs(h)<Math.abs(b)){var ee=Rs(h||b)*(Math.abs(b)-Math.abs(h));h+=ee}}return Gj(Gj(Gj({},e),{},{x:d,y:f,width:h,height:g,value:l?r:r[1],payload:e,background:v},C&&C[t]&&C[t].props),{},{tooltipPayload:[Xw(n,e)],tooltipPosition:{x:d+h/2,y:f+g/2}})}),layout:m},f)});var oM=l(xj()),sM=l(wj());function cM(e){"@babel/helpers - typeof";return cM=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},cM(e)}function lM(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function uM(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,hM(r.key),r)}}function dM(e,t,n){return t&&uM(e.prototype,t),n&&uM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function fM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?fM(Object(n),!0).forEach(function(t){mM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function mM(e,t,n){return t=hM(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hM(e){var t=gM(e,`string`);return cM(t)==`symbol`?t:t+``}function gM(e,t){if(cM(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(cM(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var _M=function(e,t,n,r,i){var a=e.width,o=e.height,s=e.layout,c=e.children,l=Object.keys(t),u={left:n.left,leftMirror:n.left,right:a-n.right,rightMirror:a-n.right,top:n.top,topMirror:n.top,bottom:o-n.bottom,bottomMirror:o-n.bottom},d=!!bc(c,aM);return l.reduce(function(a,o){var c=t[o],l=c.orientation,f=c.domain,p=c.padding,m=p===void 0?{}:p,h=c.mirror,g=c.reversed,_=`${l}${h?`Mirror`:``}`,v,y,b,x,S;if(c.type===`number`&&(c.padding===`gap`||c.padding===`no-gap`)){var C=f[1]-f[0],w=1/0,T=c.categoricalDomain.sort(Xs);if(T.forEach(function(e,t){t>0&&(w=Math.min((e||0)-(T[t-1]||0),w))}),Number.isFinite(w)){var E=w/C,D=c.layout===`vertical`?n.height:n.width;if(c.padding===`gap`&&(v=E*D/2),c.padding===`no-gap`){var O=Ws(e.barCategoryGap,E*D),k=E*D/2;v=k-O-(k-O)/D*O}}}y=r===`xAxis`?[n.left+(m.left||0)+(v||0),n.left+n.width-(m.right||0)-(v||0)]:r===`yAxis`?s===`horizontal`?[n.top+n.height-(m.bottom||0),n.top+(m.top||0)]:[n.top+(m.top||0)+(v||0),n.top+n.height-(m.bottom||0)-(v||0)]:c.range,g&&(y=[y[1],y[0]]);var A=Aw(c,i,d),j=A.scale,ee=A.realScaleType;j.domain(f).range(y),Mw(j);var te=Rw(j,pM(pM({},c),{},{realScaleType:ee}));r===`xAxis`?(S=l===`top`&&!h||l===`bottom`&&h,b=n.left,x=u[_]-S*c.height):r===`yAxis`&&(S=l===`left`&&!h||l===`right`&&h,b=u[_]-S*c.width,x=n.top);var ne=pM(pM(pM({},c),te),{},{realScaleType:ee,x:b,y:x,scale:j,width:r===`xAxis`?n.width:c.width,height:r===`yAxis`?n.height:c.height});return ne.bandSize=Jw(ne,te),!c.hide&&r===`xAxis`?u[_]+=(S?-1:1)*ne.height:c.hide||(u[_]+=(S?-1:1)*ne.width),pM(pM({},a),{},mM({},o,ne))},{})},vM=function(e,t){var n=e.x,r=e.y,i=t.x,a=t.y;return{x:Math.min(n,i),y:Math.min(r,a),width:Math.abs(i-n),height:Math.abs(a-r)}},yM=function(e){var t=e.x1,n=e.y1,r=e.x2,i=e.y2;return vM({x:t,y:n},{x:r,y:i})},bM=function(){function e(t){lM(this,e),this.scale=t}return dM(e,[{key:`domain`,get:function(){return this.scale.domain}},{key:`range`,get:function(){return this.scale.range}},{key:`rangeMin`,get:function(){return this.range()[0]}},{key:`rangeMax`,get:function(){return this.range()[1]}},{key:`bandwidth`,get:function(){return this.scale.bandwidth}},{key:`apply`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.bandAware,r=t.position;if(e!==void 0){if(r)switch(r){case`start`:return this.scale(e);case`middle`:var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+i;case`end`:var a=this.bandwidth?this.bandwidth():0;return this.scale(e)+a;default:return this.scale(e)}if(n){var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+o}return this.scale(e)}}},{key:`isInRange`,value:function(e){var t=this.range(),n=t[0],r=t[t.length-1];return n<=r?e>=n&&e<=r:e>=r&&e<=n}}],[{key:`create`,value:function(t){return new e(t)}}])}();mM(bM,`EPS`,1e-4);var xM=function(e){var t=Object.keys(e).reduce(function(t,n){return pM(pM({},t),{},mM({},n,bM.create(e[n])))},{});return pM(pM({},t),{},{apply:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.bandAware,i=n.position;return(0,oM.default)(e,function(e,n){return t[n].apply(e,{bandAware:r,position:i})})},isInRange:function(e){return(0,sM.default)(e,function(e,n){return t[n].isInRange(e)})}})};function SM(e){return(e%180+180)%180}var CM=function(e){var t=e.width,n=e.height,r=SM(arguments.length>1&&arguments[1]!==void 0?arguments[1]:0)*Math.PI/180,i=Math.atan(n/t),a=r>i&&r<Math.PI-i?n/Math.sin(r):t/Math.cos(r);return Math.abs(a)},wM=o(((e,t)=>{var n=Sf(),r=Zd(),i=Qd();function a(e){return function(t,a,o){var s=Object(t);if(!r(t)){var c=n(a,3);t=i(t),a=function(e){return c(s[e],e,s)}}var l=e(t,a,o);return l>-1?s[c?t[l]:l]:void 0}}t.exports=a})),TM=o(((e,t)=>{var n=zA();function r(e){var t=n(e),r=t%1;return t===t?r?t-r:t:0}t.exports=r})),EM=o(((e,t)=>{var n=Cf(),r=Sf(),i=TM(),a=Math.max;function o(e,t,o){var s=e==null?0:e.length;if(!s)return-1;var c=o==null?0:i(o);return c<0&&(c=a(s+c,0)),n(e,r(t,3),c)}t.exports=o})),DM=o(((e,t)=>{t.exports=wM()(EM())})),OM=(0,l(vs()).default)(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return[`l`,e.left,`t`,e.top,`w`,e.width,`h`,e.height].join(``)}),kM=l(DM()),AM=(0,v.createContext)(void 0),jM=(0,v.createContext)(void 0),MM=(0,v.createContext)(void 0),NM=(0,v.createContext)({}),PM=(0,v.createContext)(void 0),FM=(0,v.createContext)(0),IM=(0,v.createContext)(0),LM=function(e){var t=e.state,n=t.xAxisMap,r=t.yAxisMap,i=t.offset,a=e.clipPathId,o=e.children,s=e.width,c=e.height,l=OM(i);return v.createElement(AM.Provider,{value:n},v.createElement(jM.Provider,{value:r},v.createElement(NM.Provider,{value:i},v.createElement(MM.Provider,{value:l},v.createElement(PM.Provider,{value:a},v.createElement(FM.Provider,{value:c},v.createElement(IM.Provider,{value:s},o)))))))},RM=function(){return(0,v.useContext)(PM)},zM=function(e){var t=(0,v.useContext)(AM);t??yC(!1);var n=t[e];return n??yC(!1),n},BM=function(){return Gs((0,v.useContext)(AM))},VM=function(){var e=(0,v.useContext)(jM);return(0,kM.default)(e,function(e){return(0,sM.default)(e.domain,Number.isFinite)})||Gs(e)},HM=function(e){var t=(0,v.useContext)(jM);t??yC(!1);var n=t[e];return n??yC(!1),n},UM=function(){return(0,v.useContext)(MM)},WM=function(){return(0,v.useContext)(NM)},GM=function(){return(0,v.useContext)(IM)},KM=function(){return(0,v.useContext)(FM)},qM=l(vj());function JM(e){"@babel/helpers - typeof";return JM=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},JM(e)}function YM(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function XM(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,cN(r.key),r)}}function ZM(e,t,n){return t&&XM(e.prototype,t),n&&XM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function QM(e,t,n){return t=nN(t),$M(e,tN()?Reflect.construct(t,n||[],nN(e).constructor):t.apply(e,n))}function $M(e,t){if(t&&(JM(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return eN(e)}function eN(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function tN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tN=function(){return!!e})()}function nN(e){return nN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},nN(e)}function rN(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&iN(e,t)}function iN(e,t){return iN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},iN(e,t)}function aN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?aN(Object(n),!0).forEach(function(t){sN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function sN(e,t,n){return t=cN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cN(e){var t=lN(e,`string`);return JM(t)==`symbol`?t:t+``}function lN(e,t){if(JM(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(JM(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function uN(e,t){return hN(e)||mN(e,t)||fN(e,t)||dN()}function dN(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
68
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fN(e,t){if(e){if(typeof e==`string`)return pN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pN(e,t)}}function pN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function mN(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function hN(e){if(Array.isArray(e))return e}function gN(){return gN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gN.apply(this,arguments)}var _N=function(e,t){return v.isValidElement(e)?v.cloneElement(e,t):(0,X.default)(e)?e(t):v.createElement(`line`,gN({},t,{className:`recharts-reference-line-line`}))},vN=function(e,t,n,r,i,a,o,s,c){var l=i.x,u=i.y,d=i.width,f=i.height;if(n){var p=c.y,m=e.y.apply(p,{position:a});if(yj(c,`discard`)&&!e.y.isInRange(m))return null;var h=[{x:l+d,y:m},{x:l,y:m}];return s===`left`?h.reverse():h}if(t){var g=c.x,_=e.x.apply(g,{position:a});if(yj(c,`discard`)&&!e.x.isInRange(_))return null;var v=[{x:_,y:u+f},{x:_,y:u}];return o===`top`?v.reverse():v}if(r){var y=c.segment.map(function(t){return e.apply(t,{position:a})});return yj(c,`discard`)&&(0,qM.default)(y,function(t){return!e.isInRange(t)})?null:y}return null};function yN(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,s=e.className;e.alwaysShow;var c=RM(),l=zM(i),u=HM(a),d=UM();if(!c||!d)return null;var f=vN(xM({x:l.scale,y:u.scale}),Vs(t),Vs(n),r&&r.length===2,d,e.position,l.orientation,u.orientation,e);if(!f)return null;var p=uN(f,2),m=p[0],h=m.x,g=m.y,_=p[1],y=_.x,b=_.y,x=oN(oN({clipPath:yj(e,`hidden`)?`url(#${c})`:void 0},Z(e,!0)),{},{x1:h,y1:g,x2:y,y2:b});return v.createElement(Bc,{className:K(`recharts-reference-line`,s)},_N(o,x),NT.renderCallByParent(e,yM({x1:h,y1:g,x2:y,y2:b})))}var bN=function(e){function t(){return YM(this,t),QM(this,t,arguments)}return rN(t,e),ZM(t,[{key:`render`,value:function(){return v.createElement(yN,this.props)}}])}(v.Component);sN(bN,`displayName`,`ReferenceLine`),sN(bN,`defaultProps`,{isFront:!1,ifOverflow:`discard`,xAxisId:0,yAxisId:0,fill:`none`,stroke:`#ccc`,fillOpacity:1,strokeWidth:1,position:`middle`});function xN(){return xN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xN.apply(this,arguments)}function SN(e){"@babel/helpers - typeof";return SN=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},SN(e)}function CN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?CN(Object(n),!0).forEach(function(t){FN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function TN(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function EN(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,IN(r.key),r)}}function DN(e,t,n){return t&&EN(e.prototype,t),n&&EN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ON(e,t,n){return t=MN(t),kN(e,jN()?Reflect.construct(t,n||[],MN(e).constructor):t.apply(e,n))}function kN(e,t){if(t&&(SN(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return AN(e)}function AN(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function jN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jN=function(){return!!e})()}function MN(e){return MN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},MN(e)}function NN(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&PN(e,t)}function PN(e,t){return PN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},PN(e,t)}function FN(e,t,n){return t=IN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IN(e){var t=LN(e,`string`);return SN(t)==`symbol`?t:t+``}function LN(e,t){if(SN(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(SN(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var RN=function(e){var t=e.x,n=e.y,r=e.xAxis,i=e.yAxis,a=xM({x:r.scale,y:i.scale}),o=a.apply({x:t,y:n},{bandAware:!0});return yj(e,`discard`)&&!a.isInRange(o)?null:o},zN=function(e){function t(){return TN(this,t),ON(this,t,arguments)}return NN(t,e),DN(t,[{key:`render`,value:function(){var e=this.props,n=e.x,r=e.y,i=e.r;e.alwaysShow;var a=e.clipPathId,o=Vs(n),s=Vs(r);if(!o||!s)return null;var c=RN(this.props);if(!c)return null;var l=c.x,u=c.y,d=this.props,f=d.shape,p=d.className,m=wN(wN({clipPath:yj(this.props,`hidden`)?`url(#${a})`:void 0},Z(this.props,!0)),{},{cx:l,cy:u});return v.createElement(Bc,{className:K(`recharts-reference-dot`,p)},t.renderDot(f,m),NT.renderCallByParent(this.props,{x:l-i,y:u-i,width:2*i,height:2*i}))}}])}(v.Component);FN(zN,`displayName`,`ReferenceDot`),FN(zN,`defaultProps`,{isFront:!1,ifOverflow:`discard`,xAxisId:0,yAxisId:0,r:10,fill:`#fff`,stroke:`#ccc`,fillOpacity:1,strokeWidth:1}),FN(zN,`renderDot`,function(e,t){return v.isValidElement(e)?v.cloneElement(e,t):(0,X.default)(e)?e(t):v.createElement(Pk,xN({},t,{cx:t.cx,cy:t.cy,className:`recharts-reference-dot-dot`}))});function BN(){return BN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},BN.apply(this,arguments)}function VN(e){"@babel/helpers - typeof";return VN=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},VN(e)}function HN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function UN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?HN(Object(n),!0).forEach(function(t){eP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function WN(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function GN(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,tP(r.key),r)}}function KN(e,t,n){return t&&GN(e.prototype,t),n&&GN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function qN(e,t,n){return t=ZN(t),JN(e,XN()?Reflect.construct(t,n||[],ZN(e).constructor):t.apply(e,n))}function JN(e,t){if(t&&(VN(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return YN(e)}function YN(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function XN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(XN=function(){return!!e})()}function ZN(e){return ZN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ZN(e)}function QN(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$N(e,t)}function $N(e,t){return $N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$N(e,t)}function eP(e,t,n){return t=tP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tP(e){var t=nP(e,`string`);return VN(t)==`symbol`?t:t+``}function nP(e,t){if(VN(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(VN(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var rP=function(e,t,n,r,i){var a=i.x1,o=i.x2,s=i.y1,c=i.y2,l=i.xAxis,u=i.yAxis;if(!l||!u)return null;var d=xM({x:l.scale,y:u.scale}),f={x:e?d.x.apply(a,{position:`start`}):d.x.rangeMin,y:n?d.y.apply(s,{position:`start`}):d.y.rangeMin},p={x:t?d.x.apply(o,{position:`end`}):d.x.rangeMax,y:r?d.y.apply(c,{position:`end`}):d.y.rangeMax};return yj(i,`discard`)&&(!d.isInRange(f)||!d.isInRange(p))?null:vM(f,p)},iP=function(e){function t(){return WN(this,t),qN(this,t,arguments)}return QN(t,e),KN(t,[{key:`render`,value:function(){var e=this.props,n=e.x1,r=e.x2,i=e.y1,a=e.y2,o=e.className;e.alwaysShow;var s=e.clipPathId,c=Vs(n),l=Vs(r),u=Vs(i),d=Vs(a),f=this.props.shape;if(!c&&!l&&!u&&!d&&!f)return null;var p=rP(c,l,u,d,this.props);if(!p&&!f)return null;var m=yj(this.props,`hidden`)?`url(#${s})`:void 0;return v.createElement(Bc,{className:K(`recharts-reference-area`,o)},t.renderRect(f,UN(UN({clipPath:m},Z(this.props,!0)),p)),NT.renderCallByParent(this.props,p))}}])}(v.Component);eP(iP,`displayName`,`ReferenceArea`),eP(iP,`defaultProps`,{isFront:!1,ifOverflow:`discard`,xAxisId:0,yAxisId:0,r:10,fill:`#ccc`,fillOpacity:.5,stroke:`none`,strokeWidth:1}),eP(iP,`renderRect`,function(e,t){return v.isValidElement(e)?v.cloneElement(e,t):(0,X.default)(e)?e(t):v.createElement(Mk,BN({},t,{className:`recharts-reference-area-rect`}))});function aP(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)if(n===void 0||n(e[i])===!0)r.push(e[i]);else return;return r}function oP(e,t,n){return CM({width:e.width+t.width,height:e.height+t.height},n)}function sP(e,t,n){var r=n===`width`,i=e.x,a=e.y,o=e.width,s=e.height;return t===1?{start:r?i:a,end:r?i+o:a+s}:{start:r?i+o:a+s,end:r?i:a}}function cP(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-i)<=0}function lP(e,t){return aP(e,t+1)}function uP(e,t,n,r,i){for(var a=(r||[]).slice(),o=t.start,s=t.end,c=0,l=1,u=o,d=function(){var t=r?.[c];if(t===void 0)return{v:aP(r,l)};var a=c,d,f=function(){return d===void 0&&(d=n(t,a)),d},p=t.coordinate,m=c===0||cP(e,p,f,u,s);m||(c=0,u=o,l+=1),m&&(u=p+e*(f()/2+i),c+=l)},f;l<=a.length;)if(f=d(),f)return f.v;return[]}function dP(e){"@babel/helpers - typeof";return dP=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},dP(e)}function fP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?fP(Object(n),!0).forEach(function(t){mP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function mP(e,t,n){return t=hP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hP(e){var t=gP(e,`string`);return dP(t)==`symbol`?t:t+``}function gP(e,t){if(dP(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(dP(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function _P(e,t,n,r,i){for(var a=(r||[]).slice(),o=a.length,s=t.start,c=t.end,l=function(t){var r=a[t],l,u=function(){return l===void 0&&(l=n(r,t)),l};if(t===o-1){var d=e*(r.coordinate+e*u()/2-c);a[t]=r=pP(pP({},r),{},{tickCoord:d>0?r.coordinate-d*e:r.coordinate})}else a[t]=r=pP(pP({},r),{},{tickCoord:r.coordinate});cP(e,r.tickCoord,u,s,c)&&(c=r.tickCoord-e*(u()/2+i),a[t]=pP(pP({},r),{},{isShow:!0}))},u=o-1;u>=0;u--)l(u);return a}function vP(e,t,n,r,i,a){var o=(r||[]).slice(),s=o.length,c=t.start,l=t.end;if(a){var u=r[s-1],d=n(u,s-1),f=e*(u.coordinate+e*d/2-l);o[s-1]=u=pP(pP({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate}),cP(e,u.tickCoord,function(){return d},c,l)&&(l=u.tickCoord-e*(d/2+i),o[s-1]=pP(pP({},u),{},{isShow:!0}))}for(var p=a?s-1:s,m=function(t){var r=o[t],a,s=function(){return a===void 0&&(a=n(r,t)),a};if(t===0){var u=e*(r.coordinate-e*s()/2-c);o[t]=r=pP(pP({},r),{},{tickCoord:u<0?r.coordinate-u*e:r.coordinate})}else o[t]=r=pP(pP({},r),{},{tickCoord:r.coordinate});cP(e,r.tickCoord,s,c,l)&&(c=r.tickCoord+e*(s()/2+i),o[t]=pP(pP({},r),{},{isShow:!0}))},h=0;h<p;h++)m(h);return o}function yP(e,t,n){var r=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,s=e.orientation,c=e.interval,l=e.tickFormatter,u=e.unit,d=e.angle;if(!i||!i.length||!r)return[];if(Y(c)||mm.isSsr)return lP(i,typeof c==`number`&&Y(c)?c:0);var f=[],p=s===`top`||s===`bottom`?`width`:`height`,m=u&&p===`width`?dh(u,{fontSize:t,letterSpacing:n}):{width:0,height:0},h=function(e,r){var i=(0,X.default)(l)?l(e.value,r):e.value;return p===`width`?oP(dh(i,{fontSize:t,letterSpacing:n}),m,d):dh(i,{fontSize:t,letterSpacing:n})[p]},g=i.length>=2?Rs(i[1].coordinate-i[0].coordinate):1,_=sP(a,g,p);return c===`equidistantPreserveStart`?uP(g,_,h,i,o):(f=c===`preserveStart`||c===`preserveStartEnd`?vP(g,_,h,i,o,c===`preserveStartEnd`):_P(g,_,h,i,o),f.filter(function(e){return e.isShow}))}var bP=[`viewBox`],xP=[`viewBox`],SP=[`ticks`];function CP(e){"@babel/helpers - typeof";return CP=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},CP(e)}function wP(){return wP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wP.apply(this,arguments)}function TP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function EP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?TP(Object(n),!0).forEach(function(t){zP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function DP(e,t){if(e==null)return{};var n=OP(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function OP(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function kP(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function AP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,BP(r.key),r)}}function jP(e,t,n){return t&&AP(e.prototype,t),n&&AP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function MP(e,t,n){return t=IP(t),NP(e,FP()?Reflect.construct(t,n||[],IP(e).constructor):t.apply(e,n))}function NP(e,t){if(t&&(CP(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return PP(e)}function PP(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function FP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(FP=function(){return!!e})()}function IP(e){return IP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},IP(e)}function LP(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&RP(e,t)}function RP(e,t){return RP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},RP(e,t)}function zP(e,t,n){return t=BP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BP(e){var t=VP(e,`string`);return CP(t)==`symbol`?t:t+``}function VP(e,t){if(CP(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(CP(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var HP=function(e){function t(e){var n;return kP(this,t),n=MP(this,t,[e]),n.state={fontSize:``,letterSpacing:``},n}return LP(t,e),jP(t,[{key:`shouldComponentUpdate`,value:function(e,t){var n=e.viewBox,r=DP(e,bP),i=this.props,a=i.viewBox,o=DP(i,xP);return!Zs(n,a)||!Zs(r,o)||!Zs(t,this.state)}},{key:`componentDidMount`,value:function(){var e=this.layerReference;if(e){var t=e.getElementsByClassName(`recharts-cartesian-axis-tick-value`)[0];t&&this.setState({fontSize:window.getComputedStyle(t).fontSize,letterSpacing:window.getComputedStyle(t).letterSpacing})}}},{key:`getTickLineCoord`,value:function(e){var t=this.props,n=t.x,r=t.y,i=t.width,a=t.height,o=t.orientation,s=t.tickSize,c=t.mirror,l=t.tickMargin,u,d,f,p,m,h,g=c?-1:1,_=e.tickSize||s,v=Y(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case`top`:u=d=e.coordinate,p=r+ +!c*a,f=p-g*_,h=f-g*l,m=v;break;case`left`:f=p=e.coordinate,d=n+ +!c*i,u=d-g*_,m=u-g*l,h=v;break;case`right`:f=p=e.coordinate,d=n+ +c*i,u=d+g*_,m=u+g*l,h=v;break;default:u=d=e.coordinate,p=r+ +c*a,f=p+g*_,h=f+g*l,m=v}return{line:{x1:u,y1:f,x2:d,y2:p},tick:{x:m,y:h}}}},{key:`getTickTextAnchor`,value:function(){var e=this.props,t=e.orientation,n=e.mirror,r;switch(t){case`left`:r=n?`start`:`end`;break;case`right`:r=n?`end`:`start`;break;default:r=`middle`}return r}},{key:`getTickVerticalAnchor`,value:function(){var e=this.props,t=e.orientation,n=e.mirror,r=`end`;switch(t){case`left`:case`right`:r=`middle`;break;case`top`:r=n?`start`:`end`;break;default:r=n?`end`:`start`}return r}},{key:`renderAxisLine`,value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,i=e.height,a=e.orientation,o=e.mirror,s=e.axisLine,c=EP(EP(EP({},Z(this.props,!1)),Z(s,!1)),{},{fill:`none`});if(a===`top`||a===`bottom`){var l=+(a===`top`&&!o||a===`bottom`&&o);c=EP(EP({},c),{},{x1:t,y1:n+l*i,x2:t+r,y2:n+l*i})}else{var u=+(a===`left`&&!o||a===`right`&&o);c=EP(EP({},c),{},{x1:t+u*r,y1:n,x2:t+u*r,y2:n+i})}return v.createElement(`line`,wP({},c,{className:K(`recharts-cartesian-axis-line`,(0,Is.default)(s,`className`))}))}},{key:`renderTicks`,value:function(e,n,r){var i=this,a=this.props,o=a.tickLine,s=a.stroke,c=a.tick,l=a.tickFormatter,u=a.unit,d=yP(EP(EP({},this.props),{},{ticks:e}),n,r),f=this.getTickTextAnchor(),p=this.getTickVerticalAnchor(),m=Z(this.props,!1),h=Z(c,!1),g=EP(EP({},m),{},{fill:`none`},Z(o,!1)),_=d.map(function(e,n){var r=i.getTickLineCoord(e),a=r.line,_=r.tick,y=EP(EP(EP(EP({textAnchor:f,verticalAnchor:p},m),{},{stroke:`none`,fill:s},h),_),{},{index:n,payload:e,visibleTicksCount:d.length,tickFormatter:l});return v.createElement(Bc,wP({className:`recharts-cartesian-axis-tick`,key:`tick-${e.value}-${e.coordinate}-${e.tickCoord}`},sc(i.props,e,n)),o&&v.createElement(`line`,wP({},g,a,{className:K(`recharts-cartesian-axis-tick-line`,(0,Is.default)(o,`className`))})),c&&t.renderTickItem(c,y,`${(0,X.default)(l)?l(e.value,n):e.value}${u||``}`))});return v.createElement(`g`,{className:`recharts-cartesian-axis-ticks`},_)}},{key:`render`,value:function(){var e=this,t=this.props,n=t.axisLine,r=t.width,i=t.height,a=t.ticksGenerator,o=t.className;if(t.hide)return null;var s=this.props,c=s.ticks,l=DP(s,SP),u=c;return(0,X.default)(a)&&(u=c&&c.length>0?a(this.props):a(l)),r<=0||i<=0||!u||!u.length?null:v.createElement(Bc,{className:K(`recharts-cartesian-axis`,o),ref:function(t){e.layerReference=t}},n&&this.renderAxisLine(),this.renderTicks(u,this.state.fontSize,this.state.letterSpacing),NT.renderCallByParent(this.props))}}],[{key:`renderTickItem`,value:function(e,t,n){var r,i=K(t.className,`recharts-cartesian-axis-tick-value`);return r=v.isValidElement(e)?v.cloneElement(e,EP(EP({},t),{},{className:i})):(0,X.default)(e)?e(EP(EP({},t),{},{className:i})):v.createElement(rg,wP({},t,{className:`recharts-cartesian-axis-tick-value`}),n),r}}])}(v.Component);zP(HP,`displayName`,`CartesianAxis`),zP(HP,`defaultProps`,{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:`bottom`,ticks:[],stroke:`#666`,tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:`preserveEnd`});var UP=[`x1`,`y1`,`x2`,`y2`,`key`],WP=[`offset`];function GP(e){"@babel/helpers - typeof";return GP=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},GP(e)}function KP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?KP(Object(n),!0).forEach(function(t){JP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function JP(e,t,n){return t=YP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YP(e){var t=XP(e,`string`);return GP(t)==`symbol`?t:t+``}function XP(e,t){if(GP(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(GP(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ZP(){return ZP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ZP.apply(this,arguments)}function QP(e,t){if(e==null)return{};var n=$P(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $P(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var eF=function(e){var t=e.fill;if(!t||t===`none`)return null;var n=e.fillOpacity,r=e.x,i=e.y,a=e.width,o=e.height,s=e.ry;return v.createElement(`rect`,{x:r,y:i,ry:s,width:a,height:o,stroke:`none`,fill:t,fillOpacity:n,className:`recharts-cartesian-grid-bg`})};function tF(e,t){var n;if(v.isValidElement(e))n=v.cloneElement(e,t);else if((0,X.default)(e))n=e(t);else{var r=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.key,c=Z(QP(t,UP),!1);c.offset;var l=QP(c,WP);n=v.createElement(`line`,ZP({},l,{x1:r,y1:i,x2:a,y2:o,fill:`none`,key:s}))}return n}function nF(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0||r,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(r,a){return tF(i,qP(qP({},e),{},{x1:t,y1:r,x2:t+n,y2:r,key:`line-${a}`,index:a}))});return v.createElement(`g`,{className:`recharts-cartesian-grid-horizontal`},o)}function rF(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0||r,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(r,a){return tF(i,qP(qP({},e),{},{x1:r,y1:t,x2:r,y2:t+n,key:`line-${a}`,index:a}))});return v.createElement(`g`,{className:`recharts-cartesian-grid-vertical`},o)}function iF(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,a=e.width,o=e.height,s=e.horizontalPoints,c=e.horizontal;if(!(c===void 0||c)||!t||!t.length)return null;var l=s.map(function(e){return Math.round(e+i-i)}).sort(function(e,t){return e-t});i!==l[0]&&l.unshift(0);var u=l.map(function(e,s){var c=l[s+1]?l[s+1]-e:i+o-e;if(c<=0)return null;var u=s%t.length;return v.createElement(`rect`,{key:`react-${s}`,y:e,x:r,height:c,width:a,stroke:`none`,fill:t[u],fillOpacity:n,className:`recharts-cartesian-grid-bg`})});return v.createElement(`g`,{className:`recharts-cartesian-gridstripes-horizontal`},u)}function aF(e){var t=e.vertical,n=t===void 0||t,r=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,s=e.width,c=e.height,l=e.verticalPoints;if(!n||!r||!r.length)return null;var u=l.map(function(e){return Math.round(e+a-a)}).sort(function(e,t){return e-t});a!==u[0]&&u.unshift(0);var d=u.map(function(e,t){var n=u[t+1]?u[t+1]-e:a+s-e;if(n<=0)return null;var l=t%r.length;return v.createElement(`rect`,{key:`react-${t}`,x:e,y:o,width:n,height:c,stroke:`none`,fill:r[l],fillOpacity:i,className:`recharts-cartesian-grid-bg`})});return v.createElement(`g`,{className:`recharts-cartesian-gridstripes-vertical`},d)}var oF=function(e,t){var n=e.xAxis,r=e.width,i=e.height,a=e.offset;return Ew(yP(qP(qP(qP({},HP.defaultProps),n),{},{ticks:Dw(n,!0),viewBox:{x:0,y:0,width:r,height:i}})),a.left,a.left+a.width,t)},sF=function(e,t){var n=e.yAxis,r=e.width,i=e.height,a=e.offset;return Ew(yP(qP(qP(qP({},HP.defaultProps),n),{},{ticks:Dw(n,!0),viewBox:{x:0,y:0,width:r,height:i}})),a.top,a.top+a.height,t)},cF={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:`#ccc`,fill:`none`,verticalFill:[],horizontalFill:[]};function lF(e){var t=GM(),n=KM(),r=WM(),i=qP(qP({},e),{},{stroke:e.stroke??cF.stroke,fill:e.fill??cF.fill,horizontal:e.horizontal??cF.horizontal,horizontalFill:e.horizontalFill??cF.horizontalFill,vertical:e.vertical??cF.vertical,verticalFill:e.verticalFill??cF.verticalFill,x:Y(e.x)?e.x:r.left,y:Y(e.y)?e.y:r.top,width:Y(e.width)?e.width:r.width,height:Y(e.height)?e.height:r.height}),a=i.x,o=i.y,s=i.width,c=i.height,l=i.syncWithTicks,u=i.horizontalValues,d=i.verticalValues,f=BM(),p=VM();if(!Y(s)||s<=0||!Y(c)||c<=0||!Y(a)||a!==+a||!Y(o)||o!==+o)return null;var m=i.verticalCoordinatesGenerator||oF,h=i.horizontalCoordinatesGenerator||sF,g=i.horizontalPoints,_=i.verticalPoints;if((!g||!g.length)&&(0,X.default)(h)){var y=u&&u.length,b=h({yAxis:p?qP(qP({},p),{},{ticks:y?u:p.ticks}):void 0,width:t,height:n,offset:r},y?!0:l);`${GP(b)}`,Array.isArray(b)&&(g=b)}if((!_||!_.length)&&(0,X.default)(m)){var x=d&&d.length,S=m({xAxis:f?qP(qP({},f),{},{ticks:x?d:f.ticks}):void 0,width:t,height:n,offset:r},x?!0:l);`${GP(S)}`,Array.isArray(S)&&(_=S)}return v.createElement(`g`,{className:`recharts-cartesian-grid`},v.createElement(eF,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),v.createElement(nF,ZP({},i,{offset:r,horizontalPoints:g,xAxis:f,yAxis:p})),v.createElement(rF,ZP({},i,{offset:r,verticalPoints:_,xAxis:f,yAxis:p})),v.createElement(iF,ZP({},i,{horizontalPoints:g})),v.createElement(aF,ZP({},i,{verticalPoints:_})))}lF.displayName=`CartesianGrid`;var uF=[`type`,`layout`,`connectNulls`,`ref`],dF=[`key`];function fF(e){"@babel/helpers - typeof";return fF=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},fF(e)}function pF(e,t){if(e==null)return{};var n=mF(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mF(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function hF(){return hF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hF.apply(this,arguments)}function gF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _F(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?gF(Object(n),!0).forEach(function(t){PF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function vF(e){return SF(e)||xF(e)||bF(e)||yF()}function yF(){throw TypeError(`Invalid attempt to spread non-iterable instance.
69
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bF(e,t){if(e){if(typeof e==`string`)return CF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return CF(e,t)}}function xF(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function SF(e){if(Array.isArray(e))return CF(e)}function CF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function wF(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function TF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,FF(r.key),r)}}function EF(e,t,n){return t&&TF(e.prototype,t),n&&TF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function DF(e,t,n){return t=jF(t),OF(e,AF()?Reflect.construct(t,n||[],jF(e).constructor):t.apply(e,n))}function OF(e,t){if(t&&(fF(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return kF(e)}function kF(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function AF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(AF=function(){return!!e})()}function jF(e){return jF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},jF(e)}function MF(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&NF(e,t)}function NF(e,t){return NF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},NF(e,t)}function PF(e,t,n){return t=FF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FF(e){var t=IF(e,`string`);return fF(t)==`symbol`?t:t+``}function IF(e,t){if(fF(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(fF(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var LF=function(e){function t(){var e;wF(this,t);var n=[...arguments];return e=DF(this,t,[].concat(n)),PF(e,`state`,{isAnimationFinished:!0,totalLength:0}),PF(e,`generateSimpleStrokeDasharray`,function(e,t){return`${t}px ${e-t}px`}),PF(e,`getStrokeDasharray`,function(n,r,i){var a=i.reduce(function(e,t){return e+t});if(!a)return e.generateSimpleStrokeDasharray(r,n);for(var o=Math.floor(n/a),s=n%a,c=r-n,l=[],u=0,d=0;u<i.length;d+=i[u],++u)if(d+i[u]>s){l=[].concat(vF(i.slice(0,u)),[s-d]);break}var f=l.length%2==0?[0,c]:[c];return[].concat(vF(t.repeat(i,o)),vF(l),f).map(function(e){return`${e}px`}).join(`, `)}),PF(e,`id`,Us(`recharts-line-`)),PF(e,`pathRef`,function(t){e.mainCurve=t}),PF(e,`handleAnimationEnd`,function(){e.setState({isAnimationFinished:!0}),e.props.onAnimationEnd&&e.props.onAnimationEnd()}),PF(e,`handleAnimationStart`,function(){e.setState({isAnimationFinished:!1}),e.props.onAnimationStart&&e.props.onAnimationStart()}),e}return MF(t,e),EF(t,[{key:`componentDidMount`,value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();this.setState({totalLength:e})}}},{key:`componentDidUpdate`,value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();e!==this.state.totalLength&&this.setState({totalLength:e})}}},{key:`getTotalLength`,value:function(){var e=this.mainCurve;try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}},{key:`renderErrorBar`,value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,r=n.points,i=n.xAxis,a=n.yAxis,o=n.layout,s=n.children,c=yc(s,WC);if(!c)return null;var l=function(e,t){return{x:e.x,y:e.y,value:e.value,errorVal:mw(e.payload,t)}},u={clipPath:e?`url(#clipPath-${t})`:null};return v.createElement(Bc,u,c.map(function(e){return v.cloneElement(e,{key:`bar-${e.props.dataKey}`,data:r,xAxis:i,yAxis:a,layout:o,dataPointFormatter:l})}))}},{key:`renderDots`,value:function(e,n,r){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,a=i.dot,o=i.points,s=i.dataKey,c=Z(this.props,!1),l=Z(a,!0),u=o.map(function(e,n){var r=_F(_F(_F({key:`dot-${n}`,r:3},c),l),{},{index:n,cx:e.x,cy:e.y,value:e.value,dataKey:s,payload:e.payload,points:o});return t.renderDotItem(a,r)}),d={clipPath:e?`url(#clipPath-${n?``:`dots-`}${r})`:null};return v.createElement(Bc,hF({className:`recharts-line-dots`,key:`dots`},d),u)}},{key:`renderCurveStatically`,value:function(e,t,n,r){var i=this.props,a=i.type,o=i.layout,s=i.connectNulls;i.ref;var c=_F(_F(_F({},Z(pF(i,uF),!0)),{},{fill:`none`,className:`recharts-line-curve`,clipPath:t?`url(#clipPath-${n})`:null,points:e},r),{},{type:a,layout:o,connectNulls:s});return v.createElement(AE,hF({},c,{pathRef:this.pathRef}))}},{key:`renderCurveWithAnimation`,value:function(e,t){var n=this,r=this.props,i=r.points,a=r.strokeDasharray,o=r.isAnimationActive,s=r.animationBegin,c=r.animationDuration,l=r.animationEasing,u=r.animationId,d=r.animateNewValues,f=r.width,p=r.height,m=this.state,h=m.prevPoints,g=m.totalLength;return v.createElement(hk,{begin:s,duration:c,isActive:o,easing:l,from:{t:0},to:{t:1},key:`line-${u}`,onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(r){var o=r.t;if(h){var s=h.length/i.length,c=i.map(function(e,t){var n=Math.floor(t*s);if(h[n]){var r=h[n],i=qs(r.x,e.x),a=qs(r.y,e.y);return _F(_F({},e),{},{x:i(o),y:a(o)})}if(d){var c=qs(f*2,e.x),l=qs(p/2,e.y);return _F(_F({},e),{},{x:c(o),y:l(o)})}return _F(_F({},e),{},{x:e.x,y:e.y})});return n.renderCurveStatically(c,e,t)}var l=qs(0,g)(o),u;if(a){var m=`${a}`.split(/[,\s]+/gim).map(function(e){return parseFloat(e)});u=n.getStrokeDasharray(l,g,m)}else u=n.generateSimpleStrokeDasharray(g,l);return n.renderCurveStatically(i,e,t,{strokeDasharray:u})})}},{key:`renderCurve`,value:function(e,t){var n=this.props,r=n.points,i=n.isAnimationActive,a=this.state,o=a.prevPoints,s=a.totalLength;return i&&r&&r.length&&(!o&&s>0||!(0,tw.default)(o,r))?this.renderCurveWithAnimation(e,t):this.renderCurveStatically(r,e,t)}},{key:`render`,value:function(){var e=this.props,t=e.hide,n=e.dot,r=e.points,i=e.className,a=e.xAxis,o=e.yAxis,s=e.top,c=e.left,l=e.width,u=e.height,d=e.isAnimationActive,f=e.id;if(t||!r||!r.length)return null;var p=this.state.isAnimationFinished,m=r.length===1,h=K(`recharts-line`,i),g=a&&a.allowDataOverflow,_=o&&o.allowDataOverflow,y=g||_,b=(0,J.default)(f)?this.id:f,x=Z(n,!1)??{r:3,strokeWidth:2},S=x.r,C=S===void 0?3:S,w=x.strokeWidth,T=w===void 0?2:w,E=(wc(n)?n:{}).clipDot,D=E===void 0||E,O=C*2+T;return v.createElement(Bc,{className:h},g||_?v.createElement(`defs`,null,v.createElement(`clipPath`,{id:`clipPath-${b}`},v.createElement(`rect`,{x:g?c:c-l/2,y:_?s:s-u/2,width:g?l:l*2,height:_?u:u*2})),!D&&v.createElement(`clipPath`,{id:`clipPath-dots-${b}`},v.createElement(`rect`,{x:c-O/2,y:s-O/2,width:l+O,height:u+O}))):null,!m&&this.renderCurve(y,b),this.renderErrorBar(y,b),(m||n)&&this.renderDots(y,D,b),(!d||p)&&tE.renderCallByParent(this.props,r))}}],[{key:`getDerivedStateFromProps`,value:function(e,t){return e.animationId===t.prevAnimationId?e.points===t.curPoints?null:{curPoints:e.points}:{prevAnimationId:e.animationId,curPoints:e.points,prevPoints:t.curPoints}}},{key:`repeat`,value:function(e,t){for(var n=e.length%2==0?e:[].concat(vF(e),[0]),r=[],i=0;i<t;++i)r=[].concat(vF(r),vF(n));return r}},{key:`renderDotItem`,value:function(e,t){var n;if(v.isValidElement(e))n=v.cloneElement(e,t);else if((0,X.default)(e))n=e(t);else{var r=t.key,i=pF(t,dF),a=K(`recharts-line-dot`,typeof e==`boolean`?``:e.className);n=v.createElement(Pk,hF({key:r},i,{className:a}))}return n}}])}(v.PureComponent);PF(LF,`displayName`,`Line`),PF(LF,`defaultProps`,{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:`line`,stroke:`#3182bd`,strokeWidth:1,fill:`#fff`,points:[],isAnimationActive:!mm.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,hide:!1,label:!1}),PF(LF,`getComposedData`,function(e){var t=e.props,n=e.xAxis,r=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,o=e.dataKey,s=e.bandSize,c=e.displayedData,l=e.offset,u=t.layout;return _F({points:c.map(function(e,t){var c=mw(e,o);return u===`horizontal`?{x:zw({axis:n,ticks:i,bandSize:s,entry:e,index:t}),y:(0,J.default)(c)?null:r.scale(c),value:c,payload:e}:{x:(0,J.default)(c)?null:n.scale(c),y:zw({axis:r,ticks:a,bandSize:s,entry:e,index:t}),value:c,payload:e}}),layout:u},l)});var RF=[`layout`,`type`,`stroke`,`connectNulls`,`isRange`,`ref`],zF=[`key`],BF;function VF(e){"@babel/helpers - typeof";return VF=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},VF(e)}function HF(e,t){if(e==null)return{};var n=UF(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function UF(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function WF(){return WF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},WF.apply(this,arguments)}function GF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function KF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?GF(Object(n),!0).forEach(function(t){rI(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function qF(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function JF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,iI(r.key),r)}}function YF(e,t,n){return t&&JF(e.prototype,t),n&&JF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function XF(e,t,n){return t=eI(t),ZF(e,$F()?Reflect.construct(t,n||[],eI(e).constructor):t.apply(e,n))}function ZF(e,t){if(t&&(VF(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return QF(e)}function QF(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function $F(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($F=function(){return!!e})()}function eI(e){return eI=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},eI(e)}function tI(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nI(e,t)}function nI(e,t){return nI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},nI(e,t)}function rI(e,t,n){return t=iI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iI(e){var t=aI(e,`string`);return VF(t)==`symbol`?t:t+``}function aI(e,t){if(VF(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(VF(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var oI=function(e){function t(){var e;qF(this,t);var n=[...arguments];return e=XF(this,t,[].concat(n)),rI(e,`state`,{isAnimationFinished:!0}),rI(e,`id`,Us(`recharts-area-`)),rI(e,`handleAnimationEnd`,function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),(0,X.default)(t)&&t()}),rI(e,`handleAnimationStart`,function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),(0,X.default)(t)&&t()}),e}return tI(t,e),YF(t,[{key:`renderDots`,value:function(e,n,r){var i=this.props.isAnimationActive,a=this.state.isAnimationFinished;if(i&&!a)return null;var o=this.props,s=o.dot,c=o.points,l=o.dataKey,u=Z(this.props,!1),d=Z(s,!0),f=c.map(function(e,n){var r=KF(KF(KF({key:`dot-${n}`,r:3},u),d),{},{index:n,cx:e.x,cy:e.y,dataKey:l,value:e.value,payload:e.payload,points:c});return t.renderDotItem(s,r)}),p={clipPath:e?`url(#clipPath-${n?``:`dots-`}${r})`:null};return v.createElement(Bc,WF({className:`recharts-area-dots`},p),f)}},{key:`renderHorizontalRect`,value:function(e){var t=this.props,n=t.baseLine,r=t.points,i=t.strokeWidth,a=r[0].x,o=r[r.length-1].x,s=e*Math.abs(a-o),c=(0,QC.default)(r.map(function(e){return e.y||0}));return Y(n)&&typeof n==`number`?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max((0,QC.default)(n.map(function(e){return e.y||0})),c)),Y(c)?v.createElement(`rect`,{x:a<o?a:a-s,y:0,width:s,height:Math.floor(c+(i?parseInt(`${i}`,10):1))}):null}},{key:`renderVerticalRect`,value:function(e){var t=this.props,n=t.baseLine,r=t.points,i=t.strokeWidth,a=r[0].y,o=r[r.length-1].y,s=e*Math.abs(a-o),c=(0,QC.default)(r.map(function(e){return e.x||0}));return Y(n)&&typeof n==`number`?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max((0,QC.default)(n.map(function(e){return e.x||0})),c)),Y(c)?v.createElement(`rect`,{x:0,y:a<o?a:a-s,width:c+(i?parseInt(`${i}`,10):1),height:Math.floor(s)}):null}},{key:`renderClipRect`,value:function(e){return this.props.layout===`vertical`?this.renderVerticalRect(e):this.renderHorizontalRect(e)}},{key:`renderAreaStatically`,value:function(e,t,n,r){var i=this.props,a=i.layout,o=i.type,s=i.stroke,c=i.connectNulls,l=i.isRange;i.ref;var u=HF(i,RF);return v.createElement(Bc,{clipPath:n?`url(#clipPath-${r})`:null},v.createElement(AE,WF({},Z(u,!0),{points:e,connectNulls:c,type:o,baseLine:t,layout:a,stroke:`none`,className:`recharts-area-area`})),s!==`none`&&v.createElement(AE,WF({},Z(this.props,!1),{className:`recharts-area-curve`,layout:a,type:o,connectNulls:c,fill:`none`,points:e})),s!==`none`&&l&&v.createElement(AE,WF({},Z(this.props,!1),{className:`recharts-area-curve`,layout:a,type:o,connectNulls:c,fill:`none`,points:t})))}},{key:`renderAreaWithAnimation`,value:function(e,t){var n=this,r=this.props,i=r.points,a=r.baseLine,o=r.isAnimationActive,s=r.animationBegin,c=r.animationDuration,l=r.animationEasing,u=r.animationId,d=this.state,f=d.prevPoints,p=d.prevBaseLine;return v.createElement(hk,{begin:s,duration:c,isActive:o,easing:l,from:{t:0},to:{t:1},key:`area-${u}`,onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(r){var o=r.t;if(f){var s=f.length/i.length,c=i.map(function(e,t){var n=Math.floor(t*s);if(f[n]){var r=f[n],i=qs(r.x,e.x),a=qs(r.y,e.y);return KF(KF({},e),{},{x:i(o),y:a(o)})}return e}),l=Y(a)&&typeof a==`number`?qs(p,a)(o):(0,J.default)(a)||(0,Fs.default)(a)?qs(p,0)(o):a.map(function(e,t){var n=Math.floor(t*s);if(p[n]){var r=p[n],i=qs(r.x,e.x),a=qs(r.y,e.y);return KF(KF({},e),{},{x:i(o),y:a(o)})}return e});return n.renderAreaStatically(c,l,e,t)}return v.createElement(Bc,null,v.createElement(`defs`,null,v.createElement(`clipPath`,{id:`animationClipPath-${t}`},n.renderClipRect(o))),v.createElement(Bc,{clipPath:`url(#animationClipPath-${t})`},n.renderAreaStatically(i,a,e,t)))})}},{key:`renderArea`,value:function(e,t){var n=this.props,r=n.points,i=n.baseLine,a=n.isAnimationActive,o=this.state,s=o.prevPoints,c=o.prevBaseLine,l=o.totalLength;return a&&r&&r.length&&(!s&&l>0||!(0,tw.default)(s,r)||!(0,tw.default)(c,i))?this.renderAreaWithAnimation(e,t):this.renderAreaStatically(r,i,e,t)}},{key:`render`,value:function(){var e=this.props,t=e.hide,n=e.dot,r=e.points,i=e.className,a=e.top,o=e.left,s=e.xAxis,c=e.yAxis,l=e.width,u=e.height,d=e.isAnimationActive,f=e.id;if(t||!r||!r.length)return null;var p=this.state.isAnimationFinished,m=r.length===1,h=K(`recharts-area`,i),g=s&&s.allowDataOverflow,_=c&&c.allowDataOverflow,y=g||_,b=(0,J.default)(f)?this.id:f,x=Z(n,!1)??{r:3,strokeWidth:2},S=x.r,C=S===void 0?3:S,w=x.strokeWidth,T=w===void 0?2:w,E=(wc(n)?n:{}).clipDot,D=E===void 0||E,O=C*2+T;return v.createElement(Bc,{className:h},g||_?v.createElement(`defs`,null,v.createElement(`clipPath`,{id:`clipPath-${b}`},v.createElement(`rect`,{x:g?o:o-l/2,y:_?a:a-u/2,width:g?l:l*2,height:_?u:u*2})),!D&&v.createElement(`clipPath`,{id:`clipPath-dots-${b}`},v.createElement(`rect`,{x:o-O/2,y:a-O/2,width:l+O,height:u+O}))):null,m?null:this.renderArea(y,b),(n||m)&&this.renderDots(y,D,b),(!d||p)&&tE.renderCallByParent(this.props,r))}}],[{key:`getDerivedStateFromProps`,value:function(e,t){return e.animationId===t.prevAnimationId?e.points!==t.curPoints||e.baseLine!==t.curBaseLine?{curPoints:e.points,curBaseLine:e.baseLine}:null:{prevAnimationId:e.animationId,curPoints:e.points,curBaseLine:e.baseLine,prevPoints:t.curPoints,prevBaseLine:t.curBaseLine}}}])}(v.PureComponent);BF=oI,rI(oI,`displayName`,`Area`),rI(oI,`defaultProps`,{stroke:`#3182bd`,fill:`#3182bd`,fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:`line`,connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!mm.isSsr,animationBegin:0,animationDuration:1500,animationEasing:`ease`}),rI(oI,`getBaseValue`,function(e,t,n,r){var i=e.layout,a=e.baseValue,o=t.props.baseValue??a;if(Y(o)&&typeof o==`number`)return o;var s=i===`horizontal`?r:n,c=s.scale.domain();if(s.type===`number`){var l=Math.max(c[0],c[1]),u=Math.min(c[0],c[1]);return o===`dataMin`?u:o===`dataMax`||l<0?l:Math.max(Math.min(c[0],c[1]),0)}return o===`dataMin`?c[0]:o===`dataMax`?c[1]:c[0]}),rI(oI,`getComposedData`,function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,c=e.dataKey,l=e.stackedData,u=e.dataStartIndex,d=e.displayedData,f=e.offset,p=t.layout,m=l&&l.length,h=BF.getBaseValue(t,n,r,i),g=p===`horizontal`,_=!1,v=d.map(function(e,t){var n;m?n=l[u+t]:(n=mw(e,c),Array.isArray(n)?_=!0:n=[h,n]);var d=n[1]==null||m&&mw(e,c)==null;return g?{x:zw({axis:r,ticks:a,bandSize:s,entry:e,index:t}),y:d?null:i.scale(n[1]),value:n,payload:e}:{x:d?null:r.scale(n[1]),y:zw({axis:i,ticks:o,bandSize:s,entry:e,index:t}),value:n,payload:e}});return KF({points:v,baseLine:m||_?v.map(function(e){var t=Array.isArray(e.value)?e.value[0]:null;return g?{x:e.x,y:t!=null&&e.y!=null?i.scale(t):null}:{x:t==null?null:r.scale(t),y:e.y}}):g?i.scale(h):r.scale(h),layout:p,isRange:_},f)}),rI(oI,`renderDotItem`,function(e,t){var n;if(v.isValidElement(e))n=v.cloneElement(e,t);else if((0,X.default)(e))n=e(t);else{var r=K(`recharts-area-dot`,typeof e==`boolean`?``:e.className),i=t.key,a=HF(t,zF);n=v.createElement(Pk,WF({},a,{key:i,className:r}))}return n});function sI(e){"@babel/helpers - typeof";return sI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},sI(e)}function cI(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function lI(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,yI(r.key),r)}}function uI(e,t,n){return t&&lI(e.prototype,t),n&&lI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function dI(e,t,n){return t=hI(t),fI(e,mI()?Reflect.construct(t,n||[],hI(e).constructor):t.apply(e,n))}function fI(e,t){if(t&&(sI(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return pI(e)}function pI(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function mI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(mI=function(){return!!e})()}function hI(e){return hI=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hI(e)}function gI(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_I(e,t)}function _I(e,t){return _I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_I(e,t)}function vI(e,t,n){return t=yI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yI(e){var t=bI(e,`string`);return sI(t)==`symbol`?t:t+``}function bI(e,t){if(sI(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(sI(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var xI=function(e){function t(){return cI(this,t),dI(this,t,arguments)}return gI(t,e),uI(t,[{key:`render`,value:function(){return null}}])}(v.Component);vI(xI,`displayName`,`ZAxis`),vI(xI,`defaultProps`,{zAxisId:0,range:[64,64],scale:`auto`,type:`number`});var SI=[`option`,`isActive`];function CI(){return CI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},CI.apply(this,arguments)}function wI(e,t){if(e==null)return{};var n=TI(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function TI(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function EI(e){var t=e.option,n=e.isActive,r=wI(e,SI);return typeof t==`string`?v.createElement(DA,CI({option:v.createElement(Ju,CI({type:t},r)),isActive:n,shapeType:`symbols`},r)):v.createElement(DA,CI({option:t,isActive:n,shapeType:`symbols`},r))}function DI(e){"@babel/helpers - typeof";return DI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},DI(e)}function OI(){return OI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},OI.apply(this,arguments)}function kI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function AI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?kI(Object(n),!0).forEach(function(t){VI(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kI(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function jI(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function MI(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,HI(r.key),r)}}function NI(e,t,n){return t&&MI(e.prototype,t),n&&MI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function PI(e,t,n){return t=RI(t),FI(e,LI()?Reflect.construct(t,n||[],RI(e).constructor):t.apply(e,n))}function FI(e,t){if(t&&(DI(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return II(e)}function II(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function LI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(LI=function(){return!!e})()}function RI(e){return RI=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},RI(e)}function zI(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&BI(e,t)}function BI(e,t){return BI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},BI(e,t)}function VI(e,t,n){return t=HI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HI(e){var t=UI(e,`string`);return DI(t)==`symbol`?t:t+``}function UI(e,t){if(DI(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(DI(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var WI=function(e){function t(){var e;jI(this,t);var n=[...arguments];return e=PI(this,t,[].concat(n)),VI(e,`state`,{isAnimationFinished:!1}),VI(e,`handleAnimationEnd`,function(){e.setState({isAnimationFinished:!0})}),VI(e,`handleAnimationStart`,function(){e.setState({isAnimationFinished:!1})}),VI(e,`id`,Us(`recharts-scatter-`)),e}return zI(t,e),NI(t,[{key:`renderSymbolsStatically`,value:function(e){var t=this,n=this.props,r=n.shape,i=n.activeShape,a=n.activeIndex,o=Z(this.props,!1);return e.map(function(e,n){var s=a===n,c=s?i:r,l=AI(AI({},o),e);return v.createElement(Bc,OI({className:`recharts-scatter-symbol`,key:`symbol-${e?.cx}-${e?.cy}-${e?.size}-${n}`},sc(t.props,e,n),{role:`img`}),v.createElement(EI,OI({option:c,isActive:s,key:`symbol-${n}`},l)))})}},{key:`renderSymbolsWithAnimation`,value:function(){var e=this,t=this.props,n=t.points,r=t.isAnimationActive,i=t.animationBegin,a=t.animationDuration,o=t.animationEasing,s=t.animationId,c=this.state.prevPoints;return v.createElement(hk,{begin:i,duration:a,isActive:r,easing:o,from:{t:0},to:{t:1},key:`pie-${s}`,onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(t){var r=t.t,i=n.map(function(e,t){var n=c&&c[t];if(n){var i=qs(n.cx,e.cx),a=qs(n.cy,e.cy),o=qs(n.size,e.size);return AI(AI({},e),{},{cx:i(r),cy:a(r),size:o(r)})}var s=qs(0,e.size);return AI(AI({},e),{},{size:s(r)})});return v.createElement(Bc,null,e.renderSymbolsStatically(i))})}},{key:`renderSymbols`,value:function(){var e=this.props,t=e.points,n=e.isAnimationActive,r=this.state.prevPoints;return n&&t&&t.length&&(!r||!(0,tw.default)(r,t))?this.renderSymbolsWithAnimation():this.renderSymbolsStatically(t)}},{key:`renderErrorBar`,value:function(){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var e=this.props,t=e.points,n=e.xAxis,r=e.yAxis,i=e.children,a=yc(i,WC);return a?a.map(function(e,i){var a=e.props,o=a.direction,s=a.dataKey;return v.cloneElement(e,{key:`${o}-${s}-${t[i]}`,data:t,xAxis:n,yAxis:r,layout:o===`x`?`vertical`:`horizontal`,dataPointFormatter:function(e,t){return{x:e.cx,y:e.cy,value:o===`x`?+e.node.x:+e.node.y,errorVal:mw(e,t)}}})}):null}},{key:`renderLine`,value:function(){var e=this.props,t=e.points,n=e.line,r=e.lineType,i=e.lineJointType,a=Z(this.props,!1),o=Z(n,!1),s,c;if(r===`joint`)s=t.map(function(e){return{x:e.cx,y:e.cy}});else if(r===`fitting`){var l=Ys(t),u=l.xmin,d=l.xmax,f=l.a,p=l.b,m=function(e){return f*e+p};s=[{x:u,y:m(u)},{x:d,y:m(d)}]}var h=AI(AI(AI({},a),{},{fill:`none`,stroke:a&&a.fill},o),{},{points:s});return c=v.isValidElement(n)?v.cloneElement(n,h):(0,X.default)(n)?n(h):v.createElement(AE,OI({},h,{type:i})),v.createElement(Bc,{className:`recharts-scatter-line`,key:`recharts-scatter-line`},c)}},{key:`render`,value:function(){var e=this.props,t=e.hide,n=e.points,r=e.line,i=e.className,a=e.xAxis,o=e.yAxis,s=e.left,c=e.top,l=e.width,u=e.height,d=e.id,f=e.isAnimationActive;if(t||!n||!n.length)return null;var p=this.state.isAnimationFinished,m=K(`recharts-scatter`,i),h=a&&a.allowDataOverflow,g=o&&o.allowDataOverflow,_=h||g,y=(0,J.default)(d)?this.id:d;return v.createElement(Bc,{className:m,clipPath:_?`url(#clipPath-${y})`:null},h||g?v.createElement(`defs`,null,v.createElement(`clipPath`,{id:`clipPath-${y}`},v.createElement(`rect`,{x:h?s:s-l/2,y:g?c:c-u/2,width:h?l:l*2,height:g?u:u*2}))):null,r&&this.renderLine(),this.renderErrorBar(),v.createElement(Bc,{key:`recharts-scatter-symbols`},this.renderSymbols()),(!f||p)&&tE.renderCallByParent(this.props,n))}}],[{key:`getDerivedStateFromProps`,value:function(e,t){return e.animationId===t.prevAnimationId?e.points===t.curPoints?null:{curPoints:e.points}:{prevAnimationId:e.animationId,curPoints:e.points,prevPoints:t.curPoints}}}])}(v.PureComponent);VI(WI,`displayName`,`Scatter`),VI(WI,`defaultProps`,{xAxisId:0,yAxisId:0,zAxisId:0,legendType:`circle`,lineType:`joint`,lineJointType:`linear`,data:[],shape:`circle`,hide:!1,isAnimationActive:!mm.isSsr,animationBegin:0,animationDuration:400,animationEasing:`linear`}),VI(WI,`getComposedData`,function(e){var t=e.xAxis,n=e.yAxis,r=e.zAxis,i=e.item,a=e.displayedData,o=e.xAxisTicks,s=e.yAxisTicks,c=e.offset,l=i.props.tooltipType,u=yc(i.props.children,$m),d=(0,J.default)(t.dataKey)?i.props.dataKey:t.dataKey,f=(0,J.default)(n.dataKey)?i.props.dataKey:n.dataKey,p=r&&r.dataKey,m=r?r.range:xI.defaultProps.range,h=m&&m[0],g=t.scale.bandwidth?t.scale.bandwidth():0,_=n.scale.bandwidth?n.scale.bandwidth():0;return AI({points:a.map(function(e,a){var c=mw(e,d),m=mw(e,f),v=!(0,J.default)(p)&&mw(e,p)||`-`,y=[{name:(0,J.default)(t.dataKey)?i.props.name:t.name||t.dataKey,unit:t.unit||``,value:c,payload:e,dataKey:d,type:l},{name:(0,J.default)(n.dataKey)?i.props.name:n.name||n.dataKey,unit:n.unit||``,value:m,payload:e,dataKey:f,type:l}];v!==`-`&&y.push({name:r.name||r.dataKey,unit:r.unit||``,value:v,payload:e,dataKey:p,type:l});var b=zw({axis:t,ticks:o,bandSize:g,entry:e,index:a,dataKey:d}),x=zw({axis:n,ticks:s,bandSize:_,entry:e,index:a,dataKey:f}),S=v===`-`?h:r.scale(v),C=Math.sqrt(Math.max(S,0)/Math.PI);return AI(AI({},e),{},{cx:b,cy:x,x:b-C,y:x-C,xAxis:t,yAxis:n,zAxis:r,width:2*C,height:2*C,size:S,node:{x:c,y:m,z:v},tooltipPayload:y,tooltipPosition:{x:b,y:x},payload:e},u&&u[a]&&u[a].props)})},c)});function GI(e){"@babel/helpers - typeof";return GI=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},GI(e)}function KI(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function qI(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,rL(r.key),r)}}function JI(e,t,n){return t&&qI(e.prototype,t),n&&qI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function YI(e,t,n){return t=$I(t),XI(e,QI()?Reflect.construct(t,n||[],$I(e).constructor):t.apply(e,n))}function XI(e,t){if(t&&(GI(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return ZI(e)}function ZI(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function QI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(QI=function(){return!!e})()}function $I(e){return $I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$I(e)}function eL(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tL(e,t)}function tL(e,t){return tL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},tL(e,t)}function nL(e,t,n){return t=rL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rL(e){var t=iL(e,`string`);return GI(t)==`symbol`?t:t+``}function iL(e,t){if(GI(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(GI(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function aL(){return aL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aL.apply(this,arguments)}function oL(e){var t=e.xAxisId,n=GM(),r=KM(),i=zM(t);return i==null?null:v.createElement(HP,aL({},i,{className:K(`recharts-${i.axisType} ${i.axisType}`,i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(e){return Dw(e,!0)}}))}var sL=function(e){function t(){return KI(this,t),YI(this,t,arguments)}return eL(t,e),JI(t,[{key:`render`,value:function(){return v.createElement(oL,this.props)}}])}(v.Component);nL(sL,`displayName`,`XAxis`),nL(sL,`defaultProps`,{allowDecimals:!0,hide:!1,orientation:`bottom`,width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:`category`,padding:{left:0,right:0},allowDataOverflow:!1,scale:`auto`,reversed:!1,allowDuplicatedCategory:!0});function cL(e){"@babel/helpers - typeof";return cL=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},cL(e)}function lL(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function uL(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,bL(r.key),r)}}function dL(e,t,n){return t&&uL(e.prototype,t),n&&uL(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function fL(e,t,n){return t=gL(t),pL(e,hL()?Reflect.construct(t,n||[],gL(e).constructor):t.apply(e,n))}function pL(e,t){if(t&&(cL(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return mL(e)}function mL(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function hL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hL=function(){return!!e})()}function gL(e){return gL=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},gL(e)}function _L(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vL(e,t)}function vL(e,t){return vL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vL(e,t)}function yL(e,t,n){return t=bL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bL(e){var t=xL(e,`string`);return cL(t)==`symbol`?t:t+``}function xL(e,t){if(cL(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(cL(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function SL(){return SL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},SL.apply(this,arguments)}var CL=function(e){var t=e.yAxisId,n=GM(),r=KM(),i=HM(t);return i==null?null:v.createElement(HP,SL({},i,{className:K(`recharts-${i.axisType} ${i.axisType}`,i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(e){return Dw(e,!0)}}))},wL=function(e){function t(){return lL(this,t),fL(this,t,arguments)}return _L(t,e),dL(t,[{key:`render`,value:function(){return v.createElement(CL,this.props)}}])}(v.Component);yL(wL,`displayName`,`YAxis`),yL(wL,`defaultProps`,{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:`left`,width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:`number`,padding:{top:0,bottom:0},allowDataOverflow:!1,scale:`auto`,reversed:!1});function TL(e){return kL(e)||OL(e)||DL(e)||EL()}function EL(){throw TypeError(`Invalid attempt to spread non-iterable instance.
70
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DL(e,t){if(e){if(typeof e==`string`)return AL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return AL(e,t)}}function OL(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function kL(e){if(Array.isArray(e))return AL(e)}function AL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var jL=function(e,t,n,r,i){var a=yc(e,bN),o=yc(e,zN),s=[].concat(TL(a),TL(o)),c=yc(e,iP),l=`${r}Id`,u=r[0],d=t;if(s.length&&(d=s.reduce(function(e,t){if(t.props[l]===n&&yj(t.props,`extendDomain`)&&Y(t.props[u])){var r=t.props[u];return[Math.min(e[0],r),Math.max(e[1],r)]}return e},d)),c.length){var f=`${u}1`,p=`${u}2`;d=c.reduce(function(e,t){if(t.props[l]===n&&yj(t.props,`extendDomain`)&&Y(t.props[f])&&Y(t.props[p])){var r=t.props[f],i=t.props[p];return[Math.min(e[0],r,i),Math.max(e[1],r,i)]}return e},d)}return i&&i.length&&(d=i.reduce(function(e,t){return Y(t)?[Math.min(e[0],t),Math.max(e[1],t)]:e},d)),d},ML=new(l(o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i<a;i++)o[i]=n[i].fn;return o},c.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var c=this._events[s],l=arguments.length,u,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(d=1,u=Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,p;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(p=1,u=Array(l-1);p<l;p++)u[p-1]=arguments[p];c[d].fn.apply(c[d].context,u)}}return!0},c.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn!==t||i&&!o.once||n&&o.context!==n||s(this,a);else{for(var c=0,l=[],u=o.length;c<u;c++)(o[c].fn!==t||i&&!o[c].once||n&&o[c].context!==n)&&l.push(o[c]);l.length?this._events[a]=l.length===1?l[0]:l:s(this,a)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,t!==void 0&&(t.exports=c)}))())).default,NL=`recharts.syncMouseEvents`;function PL(e){"@babel/helpers - typeof";return PL=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},PL(e)}function FL(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function IL(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,zL(r.key),r)}}function LL(e,t,n){return t&&IL(e.prototype,t),n&&IL(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function RL(e,t,n){return t=zL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zL(e){var t=BL(e,`string`);return PL(t)==`symbol`?t:t+``}function BL(e,t){if(PL(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(PL(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var VL=function(){function e(){FL(this,e),RL(this,`activeIndex`,0),RL(this,`coordinateList`,[]),RL(this,`layout`,`horizontal`)}return LL(e,[{key:`setDetails`,value:function(e){var t=e.coordinateList,n=t===void 0?null:t,r=e.container,i=r===void 0?null:r,a=e.layout,o=a===void 0?null:a,s=e.offset,c=s===void 0?null:s,l=e.mouseHandlerCallback,u=l===void 0?null:l;this.coordinateList=n??this.coordinateList??[],this.container=i??this.container,this.layout=o??this.layout,this.offset=c??this.offset,this.mouseHandlerCallback=u??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:`focus`,value:function(){this.spoofMouse()}},{key:`keyboardEvent`,value:function(e){if(this.coordinateList.length!==0)switch(e.key){case`ArrowRight`:if(this.layout!==`horizontal`)return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break;case`ArrowLeft`:if(this.layout!==`horizontal`)return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse()}}},{key:`setIndex`,value:function(e){this.activeIndex=e}},{key:`spoofMouse`,value:function(){if(this.layout===`horizontal`&&this.coordinateList.length!==0){var e=this.container.getBoundingClientRect(),t=e.x,n=e.y,r=e.height,i=this.coordinateList[this.activeIndex].coordinate,a=window?.scrollX||0,o=window?.scrollY||0,s=t+i+a,c=n+this.offset.top+r/2+o;this.mouseHandlerCallback({pageX:s,pageY:c})}}}])}();function HL(e,t,n){if(n===`number`&&t===!0&&Array.isArray(e)){var r=e?.[0],i=e?.[1];if(r&&i&&Y(r)&&Y(i))return!0}return!1}function UL(e,t,n,r){var i=r/2;return{stroke:`none`,fill:`#ccc`,x:e===`horizontal`?t.x-i:n.left+.5,y:e===`horizontal`?n.top+.5:t.y-i,width:e===`horizontal`?r:n.width-1,height:e===`horizontal`?n.height-1:r}}function WL(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,a=e.endAngle;return{points:[aT(t,n,r,i),aT(t,n,r,a)],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}function GL(e,t,n){var r,i,a,o;if(e===`horizontal`)r=t.x,a=r,i=n.top,o=n.top+n.height;else if(e===`vertical`)i=t.y,o=i,r=n.left,a=n.left+n.width;else if(t.cx!=null&&t.cy!=null){if(e===`centric`){var s=t.cx,c=t.cy,l=t.innerRadius,u=t.outerRadius,d=t.angle,f=aT(s,c,l,d),p=aT(s,c,u,d);r=f.x,i=f.y,a=p.x,o=p.y}else return WL(t)}return[{x:r,y:i},{x:a,y:o}]}function KL(e){"@babel/helpers - typeof";return KL=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},KL(e)}function qL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function JL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?qL(Object(n),!0).forEach(function(t){YL(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function YL(e,t,n){return t=XL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XL(e){var t=ZL(e,`string`);return KL(t)==`symbol`?t:t+``}function ZL(e,t){if(KL(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(KL(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function QL(e){var t=e.element,n=e.tooltipEventType,r=e.isActive,i=e.activeCoordinate,a=e.activePayload,o=e.offset,s=e.activeTooltipIndex,c=e.tooltipAxisBandSize,l=e.layout,u=e.chartName,d=t.props.cursor??t.type.defaultProps?.cursor;if(!t||!d||!r||!i||u!==`ScatterChart`&&n!==`axis`)return null;var f,p=AE;if(u===`ScatterChart`)f=i,p=Kk;else if(u===`BarChart`)f=UL(l,i,o,c),p=Mk;else if(l===`radial`){var m=WL(i),h=m.cx,g=m.cy,_=m.radius;f={cx:h,cy:g,startAngle:m.startAngle,endAngle:m.endAngle,innerRadius:_,outerRadius:_},p=gE}else f={points:GL(l,i,o)},p=AE;var y=JL(JL(JL(JL({stroke:`#ccc`,pointerEvents:`none`},o),f),Z(d,!1)),{},{payload:a,payloadIndex:s,className:K(`recharts-tooltip-cursor`,d.className)});return(0,v.isValidElement)(d)?(0,v.cloneElement)(d,y):(0,v.createElement)(p,y)}var $L=[`item`],eR=[`children`,`className`,`width`,`height`,`style`,`compact`,`title`,`desc`];function tR(e){"@babel/helpers - typeof";return tR=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},tR(e)}function nR(){return nR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nR.apply(this,arguments)}function rR(e,t){return oR(e)||aR(e,t)||xR(e,t)||iR()}function iR(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
71
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aR(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function oR(e){if(Array.isArray(e))return e}function sR(e,t){if(e==null)return{};var n=cR(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cR(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function lR(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function uR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,ER(r.key),r)}}function dR(e,t,n){return t&&uR(e.prototype,t),n&&uR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function fR(e,t,n){return t=gR(t),pR(e,hR()?Reflect.construct(t,n||[],gR(e).constructor):t.apply(e,n))}function pR(e,t){if(t&&(tR(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return mR(e)}function mR(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function hR(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hR=function(){return!!e})()}function gR(e){return gR=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},gR(e)}function _R(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vR(e,t)}function vR(e,t){return vR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vR(e,t)}function yR(e){return CR(e)||SR(e)||xR(e)||bR()}function bR(){throw TypeError(`Invalid attempt to spread non-iterable instance.
72
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xR(e,t){if(e){if(typeof e==`string`)return wR(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wR(e,t)}}function SR(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function CR(e){if(Array.isArray(e))return wR(e)}function wR(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function TR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Q(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?TR(Object(n),!0).forEach(function(t){$(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TR(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $(e,t,n){return t=ER(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ER(e){var t=DR(e,`string`);return tR(t)==`symbol`?t:t+``}function DR(e,t){if(tR(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(tR(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var OR={xAxis:[`bottom`,`top`],yAxis:[`left`,`right`]},kR={width:`100%`,height:`100%`},AR={x:0,y:0};function jR(e){return e}var MR=function(e,t){return t===`horizontal`?e.x:t===`vertical`?e.y:t===`centric`?e.angle:e.radius},NR=function(e,t,n,r){var i=t.find(function(e){return e&&e.index===n});if(i){if(e===`horizontal`)return{x:i.coordinate,y:r.y};if(e===`vertical`)return{x:r.x,y:i.coordinate};if(e===`centric`){var a=i.coordinate,o=r.radius;return Q(Q(Q({},r),aT(r.cx,r.cy,o,a)),{},{angle:a,radius:o})}var s=i.coordinate,c=r.angle;return Q(Q(Q({},r),aT(r.cx,r.cy,s,c)),{},{angle:c,radius:s})}return AR},PR=function(e,t){var n=t.graphicalItems,r=t.dataStartIndex,i=t.dataEndIndex,a=(n??[]).reduce(function(e,t){var n=t.props.data;return n&&n.length?[].concat(yR(e),yR(n)):e},[]);return a.length>0?a:e&&e.length&&Y(r)&&Y(i)?e.slice(r,i+1):[]};function FR(e){return e===`number`?[0,`auto`]:void 0}var IR=function(e,t,n,r){var i=e.graphicalItems,a=e.tooltipAxis,o=PR(t,e);return n<0||!i||!i.length||n>=o.length?null:i.reduce(function(i,s){var c=s.props.data??t;c&&e.dataStartIndex+e.dataEndIndex!==0&&e.dataEndIndex-e.dataStartIndex>=n&&(c=c.slice(e.dataStartIndex,e.dataEndIndex+1));var l=a.dataKey&&!a.allowDuplicatedCategory?Js(c===void 0?o:c,a.dataKey,r):c&&c[n]||o[n];return l?[].concat(yR(i),[Xw(s,l)]):i},[])},LR=function(e,t,n,r){var i=r||{x:e.chartX,y:e.chartY},a=MR(i,n),o=e.orderedTooltipTicks,s=e.tooltipAxis,c=e.tooltipTicks,l=gw(a,o,c,s);if(l>=0&&c){var u=c[l]&&c[l].value;return{activeTooltipIndex:l,activeLabel:u,activePayload:IR(e,t,l,u),activeCoordinate:NR(n,o,l,i)}}return null},RR=function(e,t){var n=t.axes,r=t.graphicalItems,i=t.axisType,a=t.axisIdKey,o=t.stackGroups,s=t.dataStartIndex,c=t.dataEndIndex,l=e.layout,u=e.children,d=e.stackOffset,f=Tw(l,i);return n.reduce(function(t,n){var p=n.type.defaultProps===void 0?n.props:Q(Q({},n.type.defaultProps),n.props),m=p.type,h=p.dataKey,g=p.allowDataOverflow,_=p.allowDuplicatedCategory,v=p.scale,y=p.ticks,b=p.includeHidden,x=p[a];if(t[x])return t;var S=PR(e.data,{graphicalItems:r.filter(function(e){return(a in e.props?e.props[a]:e.type.defaultProps?.[a])===x}),dataStartIndex:s,dataEndIndex:c}),C=S.length,w,T,E;HL(p.domain,g,m)&&(w=qw(p.domain,null,g),f&&(m===`number`||v!==`auto`)&&(E=hw(S,h,`category`)));var D=FR(m);if(!w||w.length===0){var O=p.domain??D;if(h){if(w=hw(S,h,m),m===`category`&&f){var k=Ks(w);_&&k?(T=w,w=(0,XA.default)(0,C)):_||(w=Yw(O,w,n).reduce(function(e,t){return e.indexOf(t)>=0?e:[].concat(yR(e),[t])},[]))}else if(m===`category`)w=_?w.filter(function(e){return e!==``&&!(0,J.default)(e)}):Yw(O,w,n).reduce(function(e,t){return e.indexOf(t)>=0||t===``||(0,J.default)(t)?e:[].concat(yR(e),[t])},[]);else if(m===`number`){var A=Cw(S,r.filter(function(e){var t=a in e.props?e.props[a]:e.type.defaultProps?.[a],n=`hide`in e.props?e.props.hide:e.type.defaultProps?.hide;return t===x&&(b||!n)}),h,i,l);A&&(w=A)}f&&(m===`number`||v!==`auto`)&&(E=hw(S,h,`category`))}else w=f?(0,XA.default)(0,C):o&&o[x]&&o[x].hasStack&&m===`number`?d===`expand`?[0,1]:Ww(o[x].stackGroups,s,c):ww(S,r.filter(function(e){var t=a in e.props?e.props[a]:e.type.defaultProps[a],n=`hide`in e.props?e.props.hide:e.type.defaultProps.hide;return t===x&&(b||!n)}),m,l,!0);if(m===`number`)w=jL(u,w,x,i,y),O&&(w=qw(O,w,g));else if(m===`category`&&O){var j=O;w.every(function(e){return j.indexOf(e)>=0})&&(w=j)}}return Q(Q({},t),{},$({},x,Q(Q({},p),{},{axisType:i,domain:w,categoricalDomain:E,duplicateDomain:T,originalDomain:p.domain??D,isCategorical:f,layout:l})))},{})},zR=function(e,t){var n=t.graphicalItems,r=t.Axis,i=t.axisType,a=t.axisIdKey,o=t.stackGroups,s=t.dataStartIndex,c=t.dataEndIndex,l=e.layout,u=e.children,d=PR(e.data,{graphicalItems:n,dataStartIndex:s,dataEndIndex:c}),f=d.length,p=Tw(l,i),m=-1;return n.reduce(function(e,t){var h=(t.type.defaultProps===void 0?t.props:Q(Q({},t.type.defaultProps),t.props))[a],g=FR(`number`);if(!e[h]){m++;var _;return p?_=(0,XA.default)(0,f):o&&o[h]&&o[h].hasStack?(_=Ww(o[h].stackGroups,s,c),_=jL(u,_,h,i)):(_=qw(g,ww(d,n.filter(function(e){var t=a in e.props?e.props[a]:e.type.defaultProps?.[a],n=`hide`in e.props?e.props.hide:e.type.defaultProps?.hide;return t===h&&!n}),`number`,l),r.defaultProps.allowDataOverflow),_=jL(u,_,h,i)),Q(Q({},e),{},$({},h,Q(Q({axisType:i},r.defaultProps),{},{hide:!0,orientation:(0,Is.default)(OR,`${i}.${m%2}`,null),domain:_,originalDomain:g,isCategorical:p,layout:l})))}return e},{})},BR=function(e,t){var n=t.axisType,r=n===void 0?`xAxis`:n,i=t.AxisComp,a=t.graphicalItems,o=t.stackGroups,s=t.dataStartIndex,c=t.dataEndIndex,l=e.children,u=`${r}Id`,d=yc(l,i),f={};return d&&d.length?f=RR(e,{axes:d,graphicalItems:a,axisType:r,axisIdKey:u,stackGroups:o,dataStartIndex:s,dataEndIndex:c}):a&&a.length&&(f=zR(e,{Axis:i,graphicalItems:a,axisType:r,axisIdKey:u,stackGroups:o,dataStartIndex:s,dataEndIndex:c})),f},VR=function(e){var t=Gs(e),n=Dw(t,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:(0,wp.default)(n,function(e){return e.coordinate}),tooltipAxis:t,tooltipAxisBandSize:Jw(t,n)}},HR=function(e){var t=e.children,n=e.defaultShowTooltip,r=bc(t,gj),i=0,a=0;return e.data&&e.data.length!==0&&(a=e.data.length-1),r&&r.props&&(r.props.startIndex>=0&&(i=r.props.startIndex),r.props.endIndex>=0&&(a=r.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!n}},UR=function(e){return!e||!e.length?!1:e.some(function(e){var t=hc(e&&e.type);return t&&t.indexOf(`Bar`)>=0})},WR=function(e){return e===`horizontal`?{numericAxisName:`yAxis`,cateAxisName:`xAxis`}:e===`vertical`?{numericAxisName:`xAxis`,cateAxisName:`yAxis`}:e===`centric`?{numericAxisName:`radiusAxis`,cateAxisName:`angleAxis`}:{numericAxisName:`angleAxis`,cateAxisName:`radiusAxis`}},GR=function(e,t){var n=e.props,r=e.graphicalItems,i=e.xAxisMap,a=i===void 0?{}:i,o=e.yAxisMap,s=o===void 0?{}:o,c=n.width,l=n.height,u=n.children,d=n.margin||{},f=bc(u,gj),p=bc(u,np),m=Object.keys(s).reduce(function(e,t){var n=s[t],r=n.orientation;return!n.mirror&&!n.hide?Q(Q({},e),{},$({},r,e[r]+n.width)):e},{left:d.left||0,right:d.right||0}),h=Q(Q({},Object.keys(a).reduce(function(e,t){var n=a[t],r=n.orientation;return!n.mirror&&!n.hide?Q(Q({},e),{},$({},r,(0,Is.default)(e,`${r}`)+n.height)):e},{top:d.top||0,bottom:d.bottom||0})),m),g=h.bottom;f&&(h.bottom+=f.props.height||gj.defaultProps.height),p&&t&&(h=bw(h,r,n,t));var _=c-h.left-h.right,v=l-h.top-h.bottom;return Q(Q({brushBottom:g},h),{},{width:Math.max(_,0),height:Math.max(v,0)})},KR=function(e,t){if(t===`xAxis`)return e[t].width;if(t===`yAxis`)return e[t].height},qR=function(e){var t=e.chartName,n=e.GraphicalChild,r=e.defaultTooltipEventType,i=r===void 0?`axis`:r,a=e.validateTooltipEventTypes,o=a===void 0?[`axis`]:a,s=e.axisComponents,c=e.legendContent,l=e.formatAxisMap,u=e.defaultProps,d=function(e,t){var n=t.graphicalItems,r=t.stackGroups,i=t.offset,a=t.updateId,o=t.dataStartIndex,c=t.dataEndIndex,l=e.barSize,u=e.layout,d=e.barGap,f=e.barCategoryGap,p=e.maxBarSize,m=WR(u),h=m.numericAxisName,g=m.cateAxisName,_=UR(n),v=[];return n.forEach(function(n,m){var y=PR(e.data,{graphicalItems:[n],dataStartIndex:o,dataEndIndex:c}),b=n.type.defaultProps===void 0?n.props:Q(Q({},n.type.defaultProps),n.props),x=b.dataKey,S=b.maxBarSize,C=b[`${h}Id`],w=b[`${g}Id`],T=s.reduce(function(e,n){var r=t[`${n.axisType}Map`],i=b[`${n.axisType}Id`];!(r&&r[i]||n.axisType===`zAxis`)&&yC(!1);var a=r[i];return Q(Q({},e),{},$($({},n.axisType,a),`${n.axisType}Ticks`,Dw(a)))},{}),E=T[g],D=T[`${g}Ticks`],O=r&&r[C]&&r[C].hasStack&&Hw(n,r[C].stackGroups),k=hc(n.type).indexOf(`Bar`)>=0,A=Jw(E,D),j=[],ee=_&&vw({barSize:l,stackGroups:r,totalSize:KR(T,g)});if(k){var te=(0,J.default)(S)?p:S,ne=Jw(E,D,!0)??te??0;j=yw({barGap:d,barCategoryGap:f,bandSize:ne===A?A:ne,sizeList:ee[w],maxBarSize:te}),ne!==A&&(j=j.map(function(e){return Q(Q({},e),{},{position:Q(Q({},e.position),{},{offset:e.position.offset-ne/2})})}))}var re=n&&n.type&&n.type.getComposedData;re&&v.push({props:Q(Q({},re(Q(Q({},T),{},{displayedData:y,props:e,dataKey:x,item:n,bandSize:A,barPosition:j,offset:i,stackedData:O,layout:u,dataStartIndex:o,dataEndIndex:c}))),{},$($($({key:n.key||`item-${m}`},h,T[h]),g,T[g]),`animationId`,a)),childIndex:Ac(n,e.children),item:n})}),v},f=function(e,r){var i=e.props,a=e.dataStartIndex,o=e.dataEndIndex,c=e.updateId;if(!xc({props:i}))return null;var u=i.children,f=i.layout,p=i.stackOffset,m=i.data,h=i.reverseStackOrder,g=WR(f),_=g.numericAxisName,v=g.cateAxisName,y=yc(u,n),b=Lw(m,y,`${_}Id`,`${v}Id`,p,h),x=s.reduce(function(e,t){var n=`${t.axisType}Map`;return Q(Q({},e),{},$({},n,BR(i,Q(Q({},t),{},{graphicalItems:y,stackGroups:t.axisType===_&&b,dataStartIndex:a,dataEndIndex:o}))))},{}),S=GR(Q(Q({},x),{},{props:i,graphicalItems:y}),r?.legendBBox);Object.keys(x).forEach(function(e){x[e]=l(i,x[e],S,e.replace(`Map`,``),t)});var C=x[`${v}Map`],w=VR(C);return Q(Q({formattedGraphicalItems:d(i,Q(Q({},x),{},{dataStartIndex:a,dataEndIndex:o,updateId:c,graphicalItems:y,stackGroups:b,offset:S})),graphicalItems:y,offset:S,stackGroups:b},w),x)},p=function(e){function n(e){var r;return lR(this,n),r=fR(this,n,[e]),$(r,`eventEmitterSymbol`,Symbol(`rechartsEventEmitter`)),$(r,`accessibilityManager`,new VL),$(r,`handleLegendBBoxUpdate`,function(e){if(e){var t=r.state,n=t.dataStartIndex,i=t.dataEndIndex,a=t.updateId;r.setState(Q({legendBBox:e},f({props:r.props,dataStartIndex:n,dataEndIndex:i,updateId:a},Q(Q({},r.state),{},{legendBBox:e}))))}}),$(r,`handleReceiveSyncEvent`,function(e,t,n){if(r.props.syncId===e){if(n===r.eventEmitterSymbol&&typeof r.props.syncMethod!=`function`)return;r.applySyncEvent(t)}}),$(r,`handleBrushChange`,function(e){var t=e.startIndex,n=e.endIndex;if(t!==r.state.dataStartIndex||n!==r.state.dataEndIndex){var i=r.state.updateId;r.setState(function(){return Q({dataStartIndex:t,dataEndIndex:n},f({props:r.props,dataStartIndex:t,dataEndIndex:n,updateId:i},r.state))}),r.triggerSyncEvent({dataStartIndex:t,dataEndIndex:n})}}),$(r,`handleMouseEnter`,function(e){var t=r.getMouseInfo(e);if(t){var n=Q(Q({},t),{},{isTooltipActive:!0});r.setState(n),r.triggerSyncEvent(n);var i=r.props.onMouseEnter;(0,X.default)(i)&&i(n,e)}}),$(r,`triggeredAfterMouseMove`,function(e){var t=r.getMouseInfo(e),n=t?Q(Q({},t),{},{isTooltipActive:!0}):{isTooltipActive:!1};r.setState(n),r.triggerSyncEvent(n);var i=r.props.onMouseMove;(0,X.default)(i)&&i(n,e)}),$(r,`handleItemMouseEnter`,function(e){r.setState(function(){return{isTooltipActive:!0,activeItem:e,activePayload:e.tooltipPayload,activeCoordinate:e.tooltipPosition||{x:e.cx,y:e.cy}}})}),$(r,`handleItemMouseLeave`,function(){r.setState(function(){return{isTooltipActive:!1}})}),$(r,`handleMouseMove`,function(e){e.persist(),r.throttleTriggeredAfterMouseMove(e)}),$(r,`handleMouseLeave`,function(e){r.throttleTriggeredAfterMouseMove.cancel();var t={isTooltipActive:!1};r.setState(t),r.triggerSyncEvent(t);var n=r.props.onMouseLeave;(0,X.default)(n)&&n(t,e)}),$(r,`handleOuterEvent`,function(e){var t=kc(e),n=(0,Is.default)(r.props,`${t}`);t&&(0,X.default)(n)&&n((/.*touch.*/i.test(t)?r.getMouseInfo(e.changedTouches[0]):r.getMouseInfo(e))??{},e)}),$(r,`handleClick`,function(e){var t=r.getMouseInfo(e);if(t){var n=Q(Q({},t),{},{isTooltipActive:!0});r.setState(n),r.triggerSyncEvent(n);var i=r.props.onClick;(0,X.default)(i)&&i(n,e)}}),$(r,`handleMouseDown`,function(e){var t=r.props.onMouseDown;(0,X.default)(t)&&t(r.getMouseInfo(e),e)}),$(r,`handleMouseUp`,function(e){var t=r.props.onMouseUp;(0,X.default)(t)&&t(r.getMouseInfo(e),e)}),$(r,`handleTouchMove`,function(e){e.changedTouches!=null&&e.changedTouches.length>0&&r.throttleTriggeredAfterMouseMove(e.changedTouches[0])}),$(r,`handleTouchStart`,function(e){e.changedTouches!=null&&e.changedTouches.length>0&&r.handleMouseDown(e.changedTouches[0])}),$(r,`handleTouchEnd`,function(e){e.changedTouches!=null&&e.changedTouches.length>0&&r.handleMouseUp(e.changedTouches[0])}),$(r,`handleDoubleClick`,function(e){var t=r.props.onDoubleClick;(0,X.default)(t)&&t(r.getMouseInfo(e),e)}),$(r,`handleContextMenu`,function(e){var t=r.props.onContextMenu;(0,X.default)(t)&&t(r.getMouseInfo(e),e)}),$(r,`triggerSyncEvent`,function(e){r.props.syncId!==void 0&&ML.emit(NL,r.props.syncId,e,r.eventEmitterSymbol)}),$(r,`applySyncEvent`,function(e){var t=r.props,n=t.layout,i=t.syncMethod,a=r.state.updateId,o=e.dataStartIndex,s=e.dataEndIndex;if(e.dataStartIndex!==void 0||e.dataEndIndex!==void 0)r.setState(Q({dataStartIndex:o,dataEndIndex:s},f({props:r.props,dataStartIndex:o,dataEndIndex:s,updateId:a},r.state)));else if(e.activeTooltipIndex!==void 0){var c=e.chartX,l=e.chartY,u=e.activeTooltipIndex,d=r.state,p=d.offset,m=d.tooltipTicks;if(!p)return;if(typeof i==`function`)u=i(m,e);else if(i===`value`){u=-1;for(var h=0;h<m.length;h++)if(m[h].value===e.activeLabel){u=h;break}}var g=Q(Q({},p),{},{x:p.left,y:p.top}),_=Math.min(c,g.x+g.width),v=Math.min(l,g.y+g.height),y=m[u]&&m[u].value,b=IR(r.state,r.props.data,u),x=m[u]?{x:n===`horizontal`?m[u].coordinate:_,y:n===`horizontal`?v:m[u].coordinate}:AR;r.setState(Q(Q({},e),{},{activeLabel:y,activeCoordinate:x,activePayload:b,activeTooltipIndex:u}))}else r.setState(e)}),$(r,`renderCursor`,function(e){var n=r.state,i=n.isTooltipActive,a=n.activeCoordinate,o=n.activePayload,s=n.offset,c=n.activeTooltipIndex,l=n.tooltipAxisBandSize,u=r.getTooltipEventType(),d=e.props.active??i,f=r.props.layout,p=e.key||`_recharts-cursor`;return v.createElement(QL,{key:p,activeCoordinate:a,activePayload:o,activeTooltipIndex:c,chartName:t,element:e,isActive:d,layout:f,offset:s,tooltipAxisBandSize:l,tooltipEventType:u})}),$(r,`renderPolarAxis`,function(e,t,n){var i=(0,Is.default)(e,`type.axisType`),a=(0,Is.default)(r.state,`${i}Map`),o=e.type.defaultProps,s=o===void 0?e.props:Q(Q({},o),e.props),c=a&&a[s[`${i}Id`]];return(0,v.cloneElement)(e,Q(Q({},c),{},{className:K(i,c.className),key:e.key||`${t}-${n}`,ticks:Dw(c,!0)}))}),$(r,`renderPolarGrid`,function(e){var t=e.props,n=t.radialLines,i=t.polarAngles,a=t.polarRadius,o=r.state,s=o.radiusAxisMap,c=o.angleAxisMap,l=Gs(s),u=Gs(c),d=u.cx,f=u.cy,p=u.innerRadius,m=u.outerRadius;return(0,v.cloneElement)(e,{polarAngles:Array.isArray(i)?i:Dw(u,!0).map(function(e){return e.coordinate}),polarRadius:Array.isArray(a)?a:Dw(l,!0).map(function(e){return e.coordinate}),cx:d,cy:f,innerRadius:p,outerRadius:m,key:e.key||`polar-grid`,radialLines:n})}),$(r,`renderLegend`,function(){var e=r.state.formattedGraphicalItems,t=r.props,n=t.children,i=t.width,a=t.height,o=r.props.margin||{},s=ZC({children:n,formattedGraphicalItems:e,legendWidth:i-(o.left||0)-(o.right||0),legendContent:c});if(!s)return null;var l=s.item,u=sR(s,$L);return(0,v.cloneElement)(l,Q(Q({},u),{},{chartWidth:i,chartHeight:a,margin:o,onBBoxUpdate:r.handleLegendBBoxUpdate}))}),$(r,`renderTooltip`,function(){var e=r.props,t=e.children,n=e.accessibilityLayer,i=bc(t,Nm);if(!i)return null;var a=r.state,o=a.isTooltipActive,s=a.activeCoordinate,c=a.activePayload,l=a.activeLabel,u=a.offset,d=i.props.active??o;return(0,v.cloneElement)(i,{viewBox:Q(Q({},u),{},{x:u.left,y:u.top}),active:d,label:l,payload:d?c:[],coordinate:s,accessibilityLayer:n})}),$(r,`renderBrush`,function(e){var t=r.props,n=t.margin,i=t.data,a=r.state,o=a.offset,s=a.dataStartIndex,c=a.dataEndIndex,l=a.updateId;return(0,v.cloneElement)(e,{key:e.key||`_recharts-brush`,onChange:kw(r.handleBrushChange,e.props.onChange),data:i,x:Y(e.props.x)?e.props.x:o.left,y:Y(e.props.y)?e.props.y:o.top+o.height+o.brushBottom-(n.bottom||0),width:Y(e.props.width)?e.props.width:o.width,startIndex:s,endIndex:c,updateId:`brush-${l}`})}),$(r,`renderReferenceElement`,function(e,t,n){if(!e)return null;var i=r.clipPathId,a=r.state,o=a.xAxisMap,s=a.yAxisMap,c=a.offset,l=e.type.defaultProps||{},u=e.props,d=u.xAxisId,f=d===void 0?l.xAxisId:d,p=u.yAxisId,m=p===void 0?l.yAxisId:p;return(0,v.cloneElement)(e,{key:e.key||`${t}-${n}`,xAxis:o[f],yAxis:s[m],viewBox:{x:c.left,y:c.top,width:c.width,height:c.height},clipPathId:i})}),$(r,`renderActivePoints`,function(e){var t=e.item,r=e.activePoint,i=e.basePoint,a=e.childIndex,o=e.isRange,s=[],c=t.props.key,l=t.item.type.defaultProps===void 0?t.item.props:Q(Q({},t.item.type.defaultProps),t.item.props),u=l.activeDot,d=l.dataKey,f=Q(Q({index:a,dataKey:d,cx:r.x,cy:r.y,r:4,fill:_w(t.item),strokeWidth:2,stroke:`#fff`,payload:r.payload,value:r.value},Z(u,!1)),ac(u));return s.push(n.renderActiveDot(u,f,`${c}-activePoint-${a}`)),i?s.push(n.renderActiveDot(u,Q(Q({},f),{},{cx:i.x,cy:i.y}),`${c}-basePoint-${a}`)):o&&s.push(null),s}),$(r,`renderGraphicChild`,function(e,t,n){var i=r.filterFormatItem(e,t,n);if(!i)return null;var a=r.getTooltipEventType(),o=r.state,s=o.isTooltipActive,c=o.tooltipAxis,l=o.activeTooltipIndex,u=o.activeLabel,d=r.props.children,f=bc(d,Nm),p=i.props,m=p.points,h=p.isRange,g=p.baseLine,_=i.item.type.defaultProps===void 0?i.item.props:Q(Q({},i.item.type.defaultProps),i.item.props),y=_.activeDot,b=_.hide,x=_.activeBar,S=_.activeShape,C=!!(!b&&s&&f&&(y||x||S)),w={};a!==`axis`&&f&&f.props.trigger===`click`?w={onClick:kw(r.handleItemMouseEnter,e.props.onClick)}:a!==`axis`&&(w={onMouseLeave:kw(r.handleItemMouseLeave,e.props.onMouseLeave),onMouseEnter:kw(r.handleItemMouseEnter,e.props.onMouseEnter)});var T=(0,v.cloneElement)(e,Q(Q({},i.props),w));function E(e){return typeof c.dataKey==`function`?c.dataKey(e.payload):null}if(C){if(l>=0){var D,O;if(c.dataKey&&!c.allowDuplicatedCategory){var k=typeof c.dataKey==`function`?E:`payload.${c.dataKey.toString()}`;D=Js(m,k,u),O=h&&g&&Js(g,k,u)}else D=m?.[l],O=h&&g&&g[l];if(S||x){var A=e.props.activeIndex===void 0?l:e.props.activeIndex;return[(0,v.cloneElement)(e,Q(Q(Q({},i.props),w),{},{activeIndex:A})),null,null]}if(!(0,J.default)(D))return[T].concat(yR(r.renderActivePoints({item:i,activePoint:D,basePoint:O,childIndex:l,isRange:h})))}else{var j=(r.getItemByXY(r.state.activeCoordinate)??{graphicalItem:T}).graphicalItem,ee=j.item,te=ee===void 0?e:ee,ne=j.childIndex,re=Q(Q(Q({},i.props),w),{},{activeIndex:ne});return[(0,v.cloneElement)(te,re),null,null]}}return h?[T,null,null]:[T,null]}),$(r,`renderCustomized`,function(e,t,n){return(0,v.cloneElement)(e,Q(Q({key:`recharts-customized-${n}`},r.props),r.state))}),$(r,`renderMap`,{CartesianGrid:{handler:jR,once:!0},ReferenceArea:{handler:r.renderReferenceElement},ReferenceLine:{handler:jR},ReferenceDot:{handler:r.renderReferenceElement},XAxis:{handler:jR},YAxis:{handler:jR},Brush:{handler:r.renderBrush,once:!0},Bar:{handler:r.renderGraphicChild},Line:{handler:r.renderGraphicChild},Area:{handler:r.renderGraphicChild},Radar:{handler:r.renderGraphicChild},RadialBar:{handler:r.renderGraphicChild},Scatter:{handler:r.renderGraphicChild},Pie:{handler:r.renderGraphicChild},Funnel:{handler:r.renderGraphicChild},Tooltip:{handler:r.renderCursor,once:!0},PolarGrid:{handler:r.renderPolarGrid,once:!0},PolarAngleAxis:{handler:r.renderPolarAxis},PolarRadiusAxis:{handler:r.renderPolarAxis},Customized:{handler:r.renderCustomized}}),r.clipPathId=`${e.id??Us(`recharts`)}-clip`,r.throttleTriggeredAfterMouseMove=(0,zm.default)(r.triggeredAfterMouseMove,e.throttleDelay??1e3/60),r.state={},r}return _R(n,e),dR(n,[{key:`componentDidMount`,value:function(){this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:this.props.margin.left??0,top:this.props.margin.top??0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:`displayDefaultTooltip`,value:function(){var e=this.props,t=e.children,n=e.data,r=e.height,i=e.layout,a=bc(t,Nm);if(a){var o=a.props.defaultIndex;if(!(typeof o!=`number`||o<0||o>this.state.tooltipTicks.length-1)){var s=this.state.tooltipTicks[o]&&this.state.tooltipTicks[o].value,c=IR(this.state,n,o,s),l=this.state.tooltipTicks[o].coordinate,u=(this.state.offset.top+r)/2,d=i===`horizontal`?{x:l,y:u}:{y:l,x:u},f=this.state.formattedGraphicalItems.find(function(e){return e.item.type.name===`Scatter`});f&&(d=Q(Q({},d),f.props.points[o].tooltipPosition),c=f.props.points[o].tooltipPayload);var p={activeTooltipIndex:o,isTooltipActive:!0,activeLabel:s,activePayload:c,activeCoordinate:d};this.setState(p),this.renderCursor(a),this.accessibilityManager.setIndex(o)}}}},{key:`getSnapshotBeforeUpdate`,value:function(e,t){return this.props.accessibilityLayer&&(this.state.tooltipTicks!==t.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==e.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==e.margin&&this.accessibilityManager.setDetails({offset:{left:this.props.margin.left??0,top:this.props.margin.top??0}})),null}},{key:`componentDidUpdate`,value:function(e){Ec([bc(e.children,Nm)],[bc(this.props.children,Nm)])||this.displayDefaultTooltip()}},{key:`componentWillUnmount`,value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:`getTooltipEventType`,value:function(){var e=bc(this.props.children,Nm);if(e&&typeof e.props.shared==`boolean`){var t=e.props.shared?`axis`:`item`;return o.indexOf(t)>=0?t:i}return i}},{key:`getMouseInfo`,value:function(e){if(!this.container)return null;var t=this.container,n=t.getBoundingClientRect(),r=fh(n),i={chartX:Math.round(e.pageX-r.left),chartY:Math.round(e.pageY-r.top)},a=n.width/t.offsetWidth||1,o=this.inRange(i.chartX,i.chartY,a);if(!o)return null;var s=this.state,c=s.xAxisMap,l=s.yAxisMap,u=this.getTooltipEventType(),d=LR(this.state,this.props.data,this.props.layout,o);if(u!==`axis`&&c&&l){var f=Gs(c).scale,p=Gs(l).scale,m=f&&f.invert?f.invert(i.chartX):null,h=p&&p.invert?p.invert(i.chartY):null;return Q(Q({},i),{},{xValue:m,yValue:h},d)}return d?Q(Q({},i),d):null}},{key:`inRange`,value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,r=this.props.layout,i=e/n,a=t/n;if(r===`horizontal`||r===`vertical`){var o=this.state.offset;return i>=o.left&&i<=o.left+o.width&&a>=o.top&&a<=o.top+o.height?{x:i,y:a}:null}var s=this.state,c=s.angleAxisMap,l=s.radiusAxisMap;if(c&&l){var u=Gs(c);return uT({x:i,y:a},u)}return null}},{key:`parseEventsOfWrapper`,value:function(){var e=this.props.children,t=this.getTooltipEventType(),n=bc(e,Nm),r={};return n&&t===`axis`&&(r=n.props.trigger===`click`?{onClick:this.handleClick}:{onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu}),Q(Q({},ac(this.props,this.handleOuterEvent)),r)}},{key:`addListener`,value:function(){ML.on(NL,this.handleReceiveSyncEvent)}},{key:`removeListener`,value:function(){ML.removeListener(NL,this.handleReceiveSyncEvent)}},{key:`filterFormatItem`,value:function(e,t,n){for(var r=this.state.formattedGraphicalItems,i=0,a=r.length;i<a;i++){var o=r[i];if(o.item===e||o.props.key===e.key||t===hc(o.item.type)&&n===o.childIndex)return o}return null}},{key:`renderClipPath`,value:function(){var e=this.clipPathId,t=this.state.offset,n=t.left,r=t.top,i=t.height,a=t.width;return v.createElement(`defs`,null,v.createElement(`clipPath`,{id:e},v.createElement(`rect`,{x:n,y:r,height:i,width:a})))}},{key:`getXScales`,value:function(){var e=this.state.xAxisMap;return e?Object.entries(e).reduce(function(e,t){var n=rR(t,2),r=n[0],i=n[1];return Q(Q({},e),{},$({},r,i.scale))},{}):null}},{key:`getYScales`,value:function(){var e=this.state.yAxisMap;return e?Object.entries(e).reduce(function(e,t){var n=rR(t,2),r=n[0],i=n[1];return Q(Q({},e),{},$({},r,i.scale))},{}):null}},{key:`getXScaleByAxisId`,value:function(e){var t;return(t=this.state.xAxisMap)==null||(t=t[e])==null?void 0:t.scale}},{key:`getYScaleByAxisId`,value:function(e){var t;return(t=this.state.yAxisMap)==null||(t=t[e])==null?void 0:t.scale}},{key:`getItemByXY`,value:function(e){var t=this.state,n=t.formattedGraphicalItems,r=t.activeItem;if(n&&n.length)for(var i=0,a=n.length;i<a;i++){var o=n[i],s=o.props,c=o.item,l=c.type.defaultProps===void 0?c.props:Q(Q({},c.type.defaultProps),c.props),u=hc(c.type);if(u===`Bar`){var d=(s.data||[]).find(function(t){return Ak(e,t)});if(d)return{graphicalItem:o,payload:d}}else if(u===`RadialBar`){var f=(s.data||[]).find(function(t){return uT(e,t)});if(f)return{graphicalItem:o,payload:f}}else if(OA(o,r)||kA(o,r)||AA(o,r)){var p=LA({graphicalItem:o,activeTooltipItem:r,itemData:l.data}),m=l.activeIndex===void 0?p:l.activeIndex;return{graphicalItem:Q(Q({},o),{},{childIndex:m}),payload:AA(o,r)?l.data[p]:o.props.data[p]}}}return null}},{key:`render`,value:function(){var e=this;if(!xc(this))return null;var t=this.props,n=t.children,r=t.className,i=t.width,a=t.height,o=t.style,s=t.compact,c=t.title,l=t.desc,u=Z(sR(t,eR),!1);if(s)return v.createElement(LM,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},v.createElement(Fc,nR({},u,{width:i,height:a,title:c,desc:l}),this.renderClipPath(),Oc(n,this.renderMap)));this.props.accessibilityLayer&&(u.tabIndex=this.props.tabIndex??0,u.role=this.props.role??`application`,u.onKeyDown=function(t){e.accessibilityManager.keyboardEvent(t)},u.onFocus=function(){e.accessibilityManager.focus()});var d=this.parseEventsOfWrapper();return v.createElement(LM,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},v.createElement(`div`,nR({className:K(`recharts-wrapper`,r),style:Q({position:`relative`,cursor:`default`,width:i,height:a},o)},d,{ref:function(t){e.container=t}}),v.createElement(Fc,nR({},u,{width:i,height:a,title:c,desc:l,style:kR}),this.renderClipPath(),Oc(n,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(v.Component);$(p,`displayName`,t),$(p,`defaultProps`,Q({layout:`horizontal`,stackOffset:`none`,barCategoryGap:`10%`,barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:`index`},u)),$(p,`getDerivedStateFromProps`,function(e,t){var n=e.dataKey,r=e.data,i=e.children,a=e.width,o=e.height,s=e.layout,c=e.stackOffset,l=e.margin,u=t.dataStartIndex,d=t.dataEndIndex;if(t.updateId===void 0){var p=HR(e);return Q(Q(Q({},p),{},{updateId:0},f(Q(Q({props:e},p),{},{updateId:0}),t)),{},{prevDataKey:n,prevData:r,prevWidth:a,prevHeight:o,prevLayout:s,prevStackOffset:c,prevMargin:l,prevChildren:i})}if(n!==t.prevDataKey||r!==t.prevData||a!==t.prevWidth||o!==t.prevHeight||s!==t.prevLayout||c!==t.prevStackOffset||!Zs(l,t.prevMargin)){var m=HR(e),h={chartX:t.chartX,chartY:t.chartY,isTooltipActive:t.isTooltipActive},g=Q(Q({},LR(t,r,s)),{},{updateId:t.updateId+1}),_=Q(Q(Q({},m),h),g);return Q(Q(Q({},_),f(Q({props:e},_),t)),{},{prevDataKey:n,prevData:r,prevWidth:a,prevHeight:o,prevLayout:s,prevStackOffset:c,prevMargin:l,prevChildren:i})}if(!Ec(i,t.prevChildren)){var v=bc(i,gj),y=v?v.props?.startIndex??u:u,b=v?v.props?.endIndex??d:d,x=y!==u||b!==d,S=!(0,J.default)(r)&&!x?t.updateId:t.updateId+1;return Q(Q({updateId:S},f(Q(Q({props:e},t),{},{updateId:S,dataStartIndex:y,dataEndIndex:b}),t)),{},{prevChildren:i,dataStartIndex:y,dataEndIndex:b})}return null}),$(p,`renderActiveDot`,function(e,t,n){var r=(0,v.isValidElement)(e)?(0,v.cloneElement)(e,t):(0,X.default)(e)?e(t):v.createElement(Pk,t);return v.createElement(Bc,{className:`recharts-active-dot`,key:n},r)});var m=(0,v.forwardRef)(function(e,t){return v.createElement(p,nR({},e,{ref:t}))});return m.displayName=p.displayName,m},JR=qR({chartName:`BarChart`,GraphicalChild:aM,defaultTooltipEventType:`axis`,validateTooltipEventTypes:[`axis`,`item`],axisComponents:[{axisType:`xAxis`,AxisComp:sL},{axisType:`yAxis`,AxisComp:wL}],formatAxisMap:_M}),YR=qR({chartName:`ComposedChart`,GraphicalChild:[LF,oI,aM,WI],axisComponents:[{axisType:`xAxis`,AxisComp:sL},{axisType:`yAxis`,AxisComp:wL},{axisType:`zAxis`,AxisComp:xI}],formatAxisMap:_M}),XR=[`#3987e5`,`#d95926`,`#199e70`,`#c98500`,`#d55181`,`#008300`,`#9085e9`,`#e66767`],ZR={good:`#0ca30c`,warn:`#fab219`,serious:`#ec835a`,crit:`#d03b3b`};function QR({active:e,payload:t,label:n,fmt:r,series:i}){if(!e||!t||!t.length)return null;let a=i.map(e=>({s:e,p:t.find(t=>t.dataKey===e.key)})).filter(e=>e.p&&e.p.value!=null);return(0,F.jsxs)(`div`,{className:`rounded-lg border border-line2 px-3 py-2 text-[12px] shadow-xl`,style:{background:`rgba(20,20,27,.97)`,minWidth:150},children:[(0,F.jsx)(`div`,{className:`text-mute mb-1.5`,children:Ea(n,!0)}),a.map(({s:e,p:t})=>(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-4 py-[1px]`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1.5 text-ink2`,children:[(0,F.jsx)(`span`,{className:`inline-block w-2 h-2 rounded-sm`,style:{background:e.color}}),e.label]}),(0,F.jsx)(`span`,{className:`tabular-nums font-medium`,children:Array.isArray(t.value)?`${r(t.value[0],e.key)} – ${r(t.value[1],e.key)}`:r(t.value,e.key)})]},e.key))]})}function $R({series:e}){return e.length<2?null:(0,F.jsx)(`div`,{className:`flex flex-wrap gap-x-3 gap-y-1 text-[11.5px] text-ink2`,children:e.map(e=>(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(`span`,{className:`inline-block w-2.5 h-2.5 rounded-sm`,style:{background:e.color,opacity:e.type===`band`?.3:e.dashed?.6:1}}),e.label]},e.key))})}function ez({data:e,series:t,height:n=180,fmt:r=e=>String(e),yFmt:i,zoom:a=!0,markers:o,onPointClick:s,refLines:c,yDomain:l}){let u=I(),[d,f]=(0,v.useState)({}),p=e.length>1?e[e.length-1].t-e[0].t:36e5,m=t.some(e=>e.type===`bar`),h=e.length>1?e[1].t-e[0].t:p,g=(o||[]).filter(t=>!e.length||t.t>=e[0].t&&t.t<=e[e.length-1].t+h).map(t=>({...t,x:m&&e.length?e.reduce((e,n)=>n.t<=t.t&&n.t>e?n.t:e,e[0].t):t.t}));return(0,F.jsx)(`div`,{style:{height:n},className:`select-none`,children:(0,F.jsx)(Qm,{width:`100%`,height:`100%`,children:(0,F.jsxs)(YR,{data:e,margin:{top:6,right:6,bottom:0,left:-8},barCategoryGap:1,onMouseDown:e=>a&&e&&e.activeLabel&&f({a:e.activeLabel}),onMouseMove:e=>d.a&&e&&e.activeLabel&&f(t=>({...t,b:e.activeLabel})),onMouseUp:()=>{d.a&&d.b&&d.a!==d.b?u.setCustom(Math.min(d.a,d.b),Math.max(d.a,d.b)):d.a&&s&&s(d.a),f({})},children:[(0,F.jsx)(lF,{vertical:!1}),(0,F.jsx)(sL,{dataKey:`t`,type:m?`category`:`number`,domain:[`dataMin`,`dataMax`],scale:m?`auto`:`time`,tickFormatter:e=>Da(e,p),tickLine:!1,axisLine:{stroke:`#2a2a35`},minTickGap:40}),(0,F.jsx)(wL,{tickFormatter:i||(e=>r(e)),tickLine:!1,axisLine:!1,width:60,allowDecimals:!0,domain:l}),(0,F.jsx)(Nm,{content:(0,F.jsx)(QR,{fmt:r,series:t}),cursor:{stroke:`#55556a`,strokeWidth:1,fill:`rgba(255,255,255,.03)`},isAnimationActive:!1}),t.map(e=>e.type===`band`?(0,F.jsx)(oI,{dataKey:e.key,stroke:`none`,fill:e.color,fillOpacity:.16,dot:!1,activeDot:!1,isAnimationActive:!1,connectNulls:!0},e.key):e.type===`bar`?(0,F.jsx)(aM,{dataKey:e.key,stackId:e.stack,fill:e.color,isAnimationActive:!1,maxBarSize:14,radius:e.stack?0:[3,3,0,0],stroke:`var(--color-panel)`,strokeWidth:+!!e.stack},e.key):e.type===`line`||!e.type?(0,F.jsx)(LF,{dataKey:e.key,stroke:e.color,strokeWidth:2,strokeDasharray:e.dashed?`4 3`:void 0,dot:!1,activeDot:{r:4,stroke:`var(--color-panel)`,strokeWidth:2},isAnimationActive:!1,connectNulls:!0},e.key):(0,F.jsx)(oI,{dataKey:e.key,stackId:e.stack,stroke:e.color,strokeWidth:2,fill:e.color,fillOpacity:.14,dot:!1,activeDot:{r:4,stroke:`var(--color-panel)`,strokeWidth:2},isAnimationActive:!1,connectNulls:!0},e.key)),c?.map(e=>(0,F.jsx)(bN,{y:e.y,stroke:e.color||`#82829a`,strokeDasharray:`4 4`,label:{value:e.label,position:`insideBottomRight`,fill:e.color||`#82829a`,fontSize:10}},`y${e.y}${e.label}`)),g.map(e=>(0,F.jsx)(bN,{x:e.x,stroke:e.color||`#ff6b9d`,strokeDasharray:`3 3`,label:{value:e.label,position:`insideTopLeft`,fill:e.color||`#ff6b9d`,fontSize:10}},`${e.t}${e.label}`)),d.a&&d.b&&(0,F.jsx)(iP,{x1:d.a,x2:d.b,fill:`#ff3d7f`,fillOpacity:.12,stroke:`#ff3d7f`,strokeOpacity:.4})]})})})}function tz({title:e,sub:t,series:n,children:r,right:i}){return(0,F.jsxs)(`section`,{className:`card`,children:[(0,F.jsxs)(`div`,{className:`card-h`,children:[(0,F.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[(0,F.jsx)(`span`,{children:e}),t&&(0,F.jsx)(`span`,{className:`card-sub`,children:t})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-3`,children:[n&&(0,F.jsx)($R,{series:n}),i]})]}),(0,F.jsx)(`div`,{className:`px-2 pb-2 pt-2`,children:r})]})}function nz({data:e,height:t=150,color:n=XR[0],highlight:r}){return(0,F.jsx)(`div`,{style:{height:t},children:(0,F.jsx)(Qm,{width:`100%`,height:`100%`,children:(0,F.jsxs)(JR,{data:e,margin:{top:6,right:4,bottom:0,left:-18},barCategoryGap:2,children:[(0,F.jsx)(lF,{vertical:!1}),(0,F.jsx)(sL,{dataKey:`label`,tickLine:!1,axisLine:{stroke:`#2a2a35`},interval:0,tick:{fontSize:9.5}}),(0,F.jsx)(wL,{tickLine:!1,axisLine:!1,allowDecimals:!1}),(0,F.jsx)(Nm,{cursor:{fill:`rgba(255,255,255,.04)`},isAnimationActive:!1,content:({active:e,payload:t})=>e&&t?.length?(0,F.jsxs)(`div`,{className:`rounded-lg border border-line2 px-3 py-1.5 text-[12px]`,style:{background:`rgba(20,20,27,.97)`},children:[t[0].payload.label,`: `,(0,F.jsx)(`b`,{children:t[0].value}),` calls`]}):null}),(0,F.jsx)(aM,{dataKey:`count`,radius:[3,3,0,0],isAnimationActive:!1,children:e.map((e,t)=>(0,F.jsx)($m,{fill:r&&r(e)?ZR.serious:n},t))})]})})})}function rz(e,t){return e.map((e,n)=>{let r=t?.[n];return{...e,usualCalls:r?.calls?r.calls.expected:null,p95Normal:r?.p95?[r.p95.low,r.p95.high]:null}})}var iz=e=>e?{calls:{key:`usualCalls`,label:`Usual for this hour`,color:`#82829a`,type:`line`,dashed:!0},p95:{key:`p95Normal`,label:`Normal p95`,color:XR[1],type:`band`}}:null;function az({k:e,endpoint:t,onClose:n}){let r=e.info.kind===`read`?`curl -H "Authorization: Bearer ${e.key}" ${t}/api/overview`:`OBZERVER_KEY=${e.key}\nOBZERVER_ENDPOINT=${t}${e.info.environment?`\nOBZERVER_ENV=${e.info.environment}`:``}`;return(0,F.jsxs)(`div`,{className:`rounded-lg border border-[#3b3315] bg-[#1d1a0e] p-3.5 flex flex-col gap-2.5`,children:[(0,F.jsxs)(`div`,{className:`flex items-start gap-2 text-[12.5px]`,children:[(0,F.jsx)(Vi,{size:14,className:`text-[#f5c04e] mt-0.5 shrink-0`}),(0,F.jsxs)(`div`,{className:`flex-1`,children:[(0,F.jsxs)(`b`,{children:[`Copy “`,e.info.name,`” now.`]}),` `,(0,F.jsx)(`span`,{className:`text-ink2`,children:`Only its hash is stored, so it can't be shown again. Lost it? Rotate it.`})]}),n&&(0,F.jsx)(`button`,{className:`text-mute hover:text-ink`,onClick:n,title:`Done`,children:(0,F.jsx)(Ki,{size:14})})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`div`,{className:`code flex-1 !py-2 break-all`,children:e.key}),(0,F.jsx)(Wa,{text:e.key,className:`btn h-8`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,F.jsx)(`span`,{className:`text-mute text-[11.5px]`,children:e.info.kind===`read`?`Read the API with it`:`Start an app with it`}),(0,F.jsx)(Wa,{text:r,className:`btn h-6 text-[11px]`})]}),(0,F.jsx)(`div`,{className:`code !text-[11.5px]`,children:r})]})]})}var oz=[{id:``,label:`Never expires`},{id:`30`,label:`30 days`},{id:`90`,label:`90 days`},{id:`365`,label:`1 year`}];function sz({keys:e,endpoint:t,ingestRate:n,reload:r}){let[i,a]=(0,v.useState)(`ingest`),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(``),[u,d]=(0,v.useState)(``),[f,p]=(0,v.useState)(``),[m,h]=(0,v.useState)(null),g=async()=>{p(``);try{let e=await N(`/api/keys`,{method:`POST`,json:{name:o,kind:i,environment:i===`ingest`&&c||null,expiresInDays:u?Number(u):null}});h(e),s(``),l(``),r()}catch(e){p(e.message)}};return(0,F.jsxs)(V,{title:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(Zr,{size:14}),`API keys`]}),sub:`Ingest keys send telemetry (optionally only for one environment); read keys let scripts and CI read the API. Each key is shown once and stored as a hash.${n?` Up to ${n} requests/s per ingest key.`:``}`,pad:!1,children:[(0,F.jsxs)(`div`,{className:`px-4 pt-3 flex flex-col gap-3`,children:[(0,F.jsxs)(`form`,{className:`flex flex-wrap items-center gap-2`,onSubmit:e=>{e.preventDefault(),g()},children:[(0,F.jsx)(Ga,{value:i,onChange:a,options:[{id:`ingest`,label:`Ingest`},{id:`read`,label:`Read`}]}),(0,F.jsx)(`input`,{className:`input h-7 w-36`,placeholder:i===`read`?`Name, e.g. ci`:`Name, e.g. prod api`,value:o,onChange:e=>s(e.target.value)}),i===`ingest`&&(0,F.jsx)(`input`,{className:`input h-7 w-40`,placeholder:`Any environment`,title:`Only accept telemetry from apps reporting this environment (OBZERVER_ENV or NODE_ENV)`,value:c,onChange:e=>l(e.target.value)}),(0,F.jsx)(`select`,{className:`select h-7`,value:u,onChange:e=>d(e.target.value),"aria-label":`Expiry`,children:oz.map(e=>(0,F.jsx)(`option`,{value:e.id,children:e.label},e.id))}),(0,F.jsxs)(`button`,{className:`btn btn-primary h-7`,children:[(0,F.jsx)(_i,{size:13}),`Create key`]}),f&&(0,F.jsx)(`span`,{className:`text-[12px] text-[#ff8a8a]`,children:f})]}),m&&(0,F.jsx)(az,{k:m,endpoint:t,onClose:()=>h(null)})]}),(0,F.jsx)(`div`,{className:`pt-2`,children:(0,F.jsx)(Ka,{rows:e,cols:[{key:`n`,label:`Name`,render:e=>(0,F.jsx)(`span`,{className:e.revoked||e.expired?`line-through text-mute`:``,children:e.name})},{key:`t`,label:`Kind`,render:e=>(0,F.jsx)(`span`,{className:`pill !text-[11px] ${e.kind===`read`?`text-[#7fb2f0]`:``}`,children:e.kind===`read`?`read`:`ingest`})},{key:`k`,label:`Key`,render:e=>(0,F.jsxs)(`span`,{className:`mono text-[11.5px] text-ink2`,children:[e.prefix,`…`]})},{key:`e`,label:`Environment`,render:e=>e.kind===`read`?(0,F.jsx)(`span`,{className:`text-mute`,children:`—`}):e.environment?(0,F.jsx)(`span`,{className:`mono text-[11.5px]`,children:e.environment}):(0,F.jsx)(`span`,{className:`text-mute`,children:`any`})},{key:`x`,label:`Expires`,render:e=>e.expires?(0,F.jsx)(`span`,{className:e.expired?`text-[#ff8a8a]`:`text-ink2`,title:Ea(e.expires,!0),children:e.expired?`expired`:Ea(e.expires,!0).split(` `)[0]}):(0,F.jsx)(`span`,{className:`text-mute`,children:`never`})},{key:`u`,label:`Last used`,render:e=>(0,F.jsx)(`span`,{className:`text-mute`,children:e.lastUsed?(0,F.jsx)(ro,{ts:e.lastUsed}):`never`})},{key:`a`,label:``,render:e=>e.revoked?(0,F.jsx)(`span`,{className:`text-mute`,children:`revoked`}):(0,F.jsxs)(`div`,{className:`flex justify-end gap-1`,children:[(0,F.jsx)(`button`,{className:`btn btn-ghost h-7 px-2`,title:`Rotate: a new key with the same settings; this one stops working`,onClick:async()=>{window.confirm(`Rotate "${e.name}"? You get a new key, and apps using the old one stop reporting until they get it.`)&&(h(await N(`/api/keys/${e.id}/rotate`,{method:`POST`})),r())},children:(0,F.jsx)(Ci,{size:13})}),(0,F.jsx)(`button`,{className:`btn btn-ghost h-7 px-2`,title:`Revoke`,onClick:async()=>{window.confirm(`Revoke "${e.name}"? ${e.kind===`read`?`Scripts`:`Apps`} using it stop working.`)&&(await N(`/api/keys/${e.id}`,{method:`DELETE`}),r())},children:(0,F.jsx)(Ri,{size:13})})]})}]})})]})}var cz=[`github`,`linear`,`clickup`,`trello`],lz={github:`GitHub`,linear:`Linear`,clickup:`ClickUp`,trello:`Trello`};function uz(e=[]){let{data:t,reload:n}=P(`/api/settings/trackers`,e);return{settings:t,connected:cz.filter(e=>t?.[e]),reload:n}}var dz={open:{label:`open`,color:`#5fd38a`},closed:{label:`closed`,color:`#a78bfa`},canceled:{label:`canceled`,color:`#82829a`}};function fz({ticket:e,compact:t=!1}){let n=e.state?dz[e.state]:null;return(0,F.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,onClick:e=>e.stopPropagation(),className:`inline-flex items-center gap-1.5 rounded-md border border-line px-2 py-0.5 text-[12px] hover:border-ink2 hover:text-ink whitespace-nowrap`,children:[!t&&(0,F.jsx)(`span`,{className:`text-mute`,children:lz[e.provider]}),(0,F.jsx)(`span`,{className:`mono`,children:e.key}),n&&(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-mute`,children:[(0,F.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full`,style:{background:n.color}}),n.label]}),(0,F.jsx)(Vr,{size:11,className:`text-mute`})]})}var pz={github:`issue`,linear:`ticket`,clickup:`task`,trello:`card`};function mz({provider:e,settings:t,onSaved:n}){let{msg:r,busy:i,run:a}=_z(),o=t.autoCreate===e,s=t.autoCreate&&t.autoCreate!==e?lz[t.autoCreate]:null;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,F.jsxs)(`label`,{className:`inline-flex items-center gap-2 text-[13px] cursor-pointer`,children:[(0,F.jsx)(`input`,{type:`checkbox`,checked:o,disabled:i||!t[e],onChange:t=>a(async()=>(await N(`/api/settings/trackers`,{method:`PUT`,json:{autoCreate:t.target.checked?e:null}}),n(),t.target.checked?`Alert-opened issues now get a ${lz[e]} ${pz[e]}.`:`Turned off.`))}),`Open a `,lz[e],` `,pz[e],` automatically for issues created by alerts`]}),s&&!o&&(0,F.jsxs)(`div`,{className:`text-mute text-[12px] ml-6`,children:[`Currently on for `,s,`; turning it on here switches it.`]}),(0,F.jsx)(vz,{msg:r})]})}var hz={github:{done:`Closed (completed) issues`,cancel:`Issues closed as not planned`},linear:{done:`Tickets moved to a completed state`,cancel:`Canceled tickets`},clickup:{done:`Tasks moved to a closed or done status`,cancel:``},trello:{done:`Cards moved to the done list`,cancel:`Cards archived outside the done list`}};function gz({provider:e,webhook:t}){let n=hz[e];return(0,F.jsxs)(`div`,{className:`text-[12.5px] text-ink2 flex flex-col gap-1.5`,children:[(0,F.jsxs)(`div`,{children:[`Linked tickets are checked every 2 minutes, so this works even when Obzerver is not reachable from the internet.`,t?` A webhook makes it instant.`:``]}),(0,F.jsxs)(`div`,{children:[n.done,` start fix verification here. Reopened ones reopen the issue.`,n.cancel?` ${n.cancel} close it without verification.`:``,` Verification results are posted back as a comment.`]})]})}function _z(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(!1);return{msg:e,busy:n,run:async e=>{r(!0),t(null);try{t({ok:!0,text:await e()})}catch(e){t({ok:!1,text:e.message})}finally{r(!1)}}}}var vz=({msg:e})=>e?(0,F.jsx)(`div`,{className:`text-[12.5px]`,style:{color:e.ok?`#5fd38a`:`#ff8a8a`},children:e.text}):null;function yz({settings:e,onSaved:t}){let n=e.github,[r,i]=(0,v.useState)(n?.token||``),[a,o]=(0,v.useState)(n?.repo||``),[s,c]=(0,v.useState)((n?.labels||[]).join(`, `)),{msg:l,busy:u,run:d}=_z(),f={github:{token:r,repo:a,labels:s}};return n?.source===`env`?(0,F.jsx)(xz,{p:`github`,status:(0,F.jsx)(W,{kind:`good`,children:`connected via env`}),children:(0,F.jsxs)(`div`,{className:`text-ink2 text-[12.5px]`,children:[`Set by `,(0,F.jsx)(`span`,{className:`mono`,children:`OBZERVER_GITHUB_TOKEN`}),` and `,(0,F.jsx)(`span`,{className:`mono`,children:`OBZERVER_GITHUB_REPO`}),` = `,(0,F.jsx)(`span`,{className:`mono`,children:n.repo}),`. Change the environment variables to update it.`]})}):(0,F.jsxs)(xz,{p:`github`,status:n?(0,F.jsxs)(`span`,{className:`text-ink2 text-[12.5px]`,children:[`Creating tickets in `,(0,F.jsx)(`span`,{className:`mono text-ink`,children:n.repo})]}):null,action:n&&(0,F.jsxs)(`button`,{className:`btn btn-ghost h-7`,onClick:()=>d(async()=>window.confirm(`Disconnect GitHub? Linked tickets stay linked but stop syncing.`)?(await N(`/api/settings/trackers`,{method:`PUT`,json:{github:null}}),t(),`Disconnected.`):`Kept.`),children:[(0,F.jsx)(Ri,{size:13}),`Disconnect`]}),children:[(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @lg:grid-cols-[1fr_220px_180px] gap-3`,children:[(0,F.jsx)(G,{label:`Token`,hint:(0,F.jsxs)(F.Fragment,{children:[`Fine-grained token with `,(0,F.jsx)(`b`,{children:`Issues: read and write`}),` on the repository, or a classic token with `,(0,F.jsx)(`span`,{className:`mono`,children:`repo`}),`.`]}),children:(0,F.jsx)(`input`,{className:`input mono`,type:`password`,autoComplete:`off`,placeholder:`github_pat_…`,value:r,onChange:e=>i(e.target.value)})}),(0,F.jsx)(G,{label:`Repository`,children:(0,F.jsx)(`input`,{className:`input mono`,placeholder:`owner/name`,value:a,onChange:e=>o(e.target.value)})}),(0,F.jsx)(G,{label:`Labels`,hint:`optional, comma-separated`,children:(0,F.jsx)(`input`,{className:`input`,placeholder:`bug, obzerver`,value:s,onChange:e=>c(e.target.value)})})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsxs)(`button`,{className:`btn`,disabled:u||!r||!a,onClick:()=>d(async()=>(await N(`/api/settings/trackers/github/test`,{method:`POST`,json:f})).detail),children:[(0,F.jsx)(hi,{size:13}),`Test`]}),(0,F.jsx)(`button`,{className:`btn btn-primary`,disabled:u||!r||!a,onClick:()=>d(async()=>(await N(`/api/settings/trackers`,{method:`PUT`,json:f}),t(),`Saved.`)),children:`Save`}),(0,F.jsx)(vz,{msg:l})]})]})}function bz({settings:e,onSaved:t}){let n=e.linear,[r,i]=(0,v.useState)(n?.apiKey||``),[a,o]=(0,v.useState)(n?[{id:n.teamId,key:``,name:n.teamName||n.teamId}]:[]),[s,c]=(0,v.useState)(n?.teamId||``),{msg:l,busy:u,run:d}=_z();if(n?.source===`env`)return(0,F.jsx)(xz,{p:`linear`,status:(0,F.jsx)(W,{kind:`good`,children:`connected via env`}),children:(0,F.jsxs)(`div`,{className:`text-ink2 text-[12.5px]`,children:[`Set by `,(0,F.jsx)(`span`,{className:`mono`,children:`OBZERVER_LINEAR_API_KEY`}),` and `,(0,F.jsx)(`span`,{className:`mono`,children:`OBZERVER_LINEAR_TEAM`}),` = `,(0,F.jsx)(`span`,{className:`mono`,children:n.teamId}),`. Change the environment variables to update it.`]})});let f=a.find(e=>e.id===s);return(0,F.jsxs)(xz,{p:`linear`,status:n?(0,F.jsxs)(`span`,{className:`text-ink2 text-[12.5px]`,children:[`Creating tickets in team `,(0,F.jsx)(`span`,{className:`text-ink`,children:n.teamName||n.teamId})]}):null,action:n&&(0,F.jsxs)(`button`,{className:`btn btn-ghost h-7`,onClick:()=>d(async()=>window.confirm(`Disconnect Linear? Linked tickets stay linked but stop syncing.`)?(await N(`/api/settings/trackers`,{method:`PUT`,json:{linear:null}}),t(),`Disconnected.`):`Kept.`),children:[(0,F.jsx)(Ri,{size:13}),`Disconnect`]}),children:[(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @lg:grid-cols-[1fr_auto_260px] gap-3 items-end`,children:[(0,F.jsx)(G,{label:`API key`,hint:`Linear → Settings → Security & access → Personal API keys`,children:(0,F.jsx)(`input`,{className:`input mono`,type:`password`,autoComplete:`off`,placeholder:`lin_api_…`,value:r,onChange:e=>i(e.target.value)})}),(0,F.jsxs)(`button`,{className:`btn mb-[18px]`,disabled:u||!r,onClick:()=>d(async()=>{let e=await N(`/api/settings/trackers/linear/test`,{method:`POST`,json:{linear:{apiKey:r}}});return o(e.teams),!s&&e.teams[0]&&c(e.teams[0].id),`${e.detail}. Pick the team for new tickets.`}),children:[(0,F.jsx)(hi,{size:13}),`Connect`]}),(0,F.jsx)(G,{label:`Team`,hint:`new tickets are created here`,children:(0,F.jsxs)(`select`,{className:`select`,value:s,disabled:!a.length,onChange:e=>c(e.target.value),children:[!a.length&&(0,F.jsx)(`option`,{value:``,children:`Connect first`}),a.map(e=>(0,F.jsxs)(`option`,{value:e.id,children:[e.name,e.key?` (${e.key})`:``]},e.id))]})})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`button`,{className:`btn btn-primary`,disabled:u||!r||!s,onClick:()=>d(async()=>(await N(`/api/settings/trackers`,{method:`PUT`,json:{linear:{apiKey:r,teamId:s,teamName:f?.name}}}),t(),`Saved.`)),children:`Save`}),(0,F.jsx)(vz,{msg:l})]})]})}function xz({status:e,action:t,children:n}){return(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(e||t)&&(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[e,(0,F.jsx)(`span`,{className:`flex-1`}),t]}),n]})}function Sz({settings:e,onSaved:t}){let n=e.clickup,[r,i]=(0,v.useState)(n?.token||``),[a,o]=(0,v.useState)(n?.listId||``),[s,c]=(0,v.useState)(n?.listName||``),{msg:l,busy:u,run:d}=_z();if(n?.source===`env`)return(0,F.jsx)(xz,{p:`clickup`,status:(0,F.jsx)(W,{kind:`good`,children:`connected via env`}),children:(0,F.jsxs)(`div`,{className:`text-ink2 text-[12.5px]`,children:[`Set by `,(0,F.jsx)(`span`,{className:`mono`,children:`OBZERVER_CLICKUP_TOKEN`}),` and `,(0,F.jsx)(`span`,{className:`mono`,children:`OBZERVER_CLICKUP_LIST`}),` = `,(0,F.jsx)(`span`,{className:`mono`,children:n.listId}),`. Change the environment variables to update it.`]})});let f={clickup:{token:r,listId:a,listName:s}};return(0,F.jsxs)(xz,{p:`clickup`,status:n?(0,F.jsxs)(`span`,{className:`text-ink2 text-[12.5px]`,children:[`Creating tasks in list `,(0,F.jsx)(`span`,{className:`text-ink`,children:n.listName||n.listId})]}):null,action:n&&(0,F.jsxs)(`button`,{className:`btn btn-ghost h-7`,onClick:()=>d(async()=>window.confirm(`Disconnect ClickUp? Linked tasks stay linked but stop syncing.`)?(await N(`/api/settings/trackers`,{method:`PUT`,json:{clickup:null}}),t(),`Disconnected.`):`Kept.`),children:[(0,F.jsx)(Ri,{size:13}),`Disconnect`]}),children:[(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @lg:grid-cols-[1fr_1fr] gap-3`,children:[(0,F.jsx)(G,{label:`API token`,hint:`ClickUp → avatar → Settings → Apps → API Token (starts with pk_)`,children:(0,F.jsx)(`input`,{className:`input mono`,type:`password`,autoComplete:`off`,placeholder:`pk_…`,value:r,onChange:e=>i(e.target.value)})}),(0,F.jsx)(G,{label:`List`,hint:`paste the list's URL (…/v/li/901234567) or its id; new tasks go here`,children:(0,F.jsx)(`input`,{className:`input mono`,placeholder:`https://app.clickup.com/…/v/li/…`,value:a,onChange:e=>{o(e.target.value),c(``)}})})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsxs)(`button`,{className:`btn`,disabled:u||!r,onClick:()=>d(async()=>{let e=await N(`/api/settings/trackers/clickup/test`,{method:`POST`,json:f});return e.listName&&c(e.listName),e.detail}),children:[(0,F.jsx)(hi,{size:13}),`Test`]}),(0,F.jsx)(`button`,{className:`btn btn-primary`,disabled:u||!r||!a,onClick:()=>d(async()=>{let e=await N(`/api/settings/trackers/clickup/test`,{method:`POST`,json:f});return await N(`/api/settings/trackers`,{method:`PUT`,json:{clickup:{token:r,listId:a,listName:e.listName||s}}}),t(),`Saved.`}),children:`Save`}),(0,F.jsx)(vz,{msg:l})]})]})}function Cz({settings:e,onSaved:t}){let n=e.trello,[r,i]=(0,v.useState)(n?.apiKey||``),[a,o]=(0,v.useState)(n?.token||``),[s,c]=(0,v.useState)(n?[{id:n.boardId,name:n.boardName||n.boardId}]:[]),[l,u]=(0,v.useState)(n?.boardId||``),[d,f]=(0,v.useState)(n?[{id:n.listId,name:n.listName||n.listId},{id:n.doneListId,name:n.doneListName||n.doneListId}]:[]),[p,m]=(0,v.useState)(n?.listId||``),[h,g]=(0,v.useState)(n?.doneListId||``),{msg:_,busy:y,run:b}=_z();if(n?.source===`env`)return(0,F.jsx)(xz,{p:`trello`,status:(0,F.jsx)(W,{kind:`good`,children:`connected via env`}),children:(0,F.jsxs)(`div`,{className:`text-ink2 text-[12.5px]`,children:[`Set by `,(0,F.jsx)(`span`,{className:`mono`,children:`OBZERVER_TRELLO_KEY`}),`, `,(0,F.jsx)(`span`,{className:`mono`,children:`_TOKEN`}),`, `,(0,F.jsx)(`span`,{className:`mono`,children:`_LIST`}),` and `,(0,F.jsx)(`span`,{className:`mono`,children:`_DONE_LIST`}),`. Change the environment variables to update it.`]})});let x=e=>b(async()=>{let t=await N(`/api/settings/trackers/trello/test`,{method:`POST`,json:{trello:{apiKey:r,token:a,boardId:e}}});f(t.lists);let n=t.lists.find(e=>/done|complete|closed/i.test(e.name));return m(t.lists[0]?.id||``),g(n?.id||t.lists.at(-1)?.id||``),`${t.detail}. Pick the lists.`}),S=(e,t)=>e.find(e=>e.id===t)?.name;return(0,F.jsxs)(xz,{p:`trello`,status:n?(0,F.jsxs)(`span`,{className:`text-ink2 text-[12.5px]`,children:[`Creating cards in `,(0,F.jsxs)(`span`,{className:`text-ink`,children:[n.boardName||`board`,` → `,n.listName||`list`]}),`, done list `,(0,F.jsx)(`span`,{className:`text-ink`,children:n.doneListName||`—`})]}):null,action:n&&(0,F.jsxs)(`button`,{className:`btn btn-ghost h-7`,onClick:()=>b(async()=>window.confirm(`Disconnect Trello? Linked cards stay linked but stop syncing.`)?(await N(`/api/settings/trackers`,{method:`PUT`,json:{trello:null}}),t(),`Disconnected.`):`Kept.`),children:[(0,F.jsx)(Ri,{size:13}),`Disconnect`]}),children:[(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @lg:grid-cols-[1fr_1fr_auto] gap-3 items-end`,children:[(0,F.jsx)(G,{label:`API key`,hint:(0,F.jsxs)(F.Fragment,{children:[`From a Power-Up at `,(0,F.jsx)(`span`,{className:`mono`,children:`trello.com/power-ups/admin`}),` → API key`]}),children:(0,F.jsx)(`input`,{className:`input mono`,type:`password`,autoComplete:`off`,value:r,onChange:e=>i(e.target.value)})}),(0,F.jsx)(G,{label:`Token`,hint:`generated from the same page (Token link next to the key)`,children:(0,F.jsx)(`input`,{className:`input mono`,type:`password`,autoComplete:`off`,value:a,onChange:e=>o(e.target.value)})}),(0,F.jsxs)(`button`,{className:`btn mb-[18px]`,disabled:y||!r||!a,onClick:()=>b(async()=>{let e=await N(`/api/settings/trackers/trello/test`,{method:`POST`,json:{trello:{apiKey:r,token:a}}});return c(e.boards),e.detail}),children:[(0,F.jsx)(hi,{size:13}),`Connect`]})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @lg:grid-cols-3 gap-3`,children:[(0,F.jsx)(G,{label:`Board`,children:(0,F.jsxs)(`select`,{className:`select`,value:l,disabled:!s.length,onChange:e=>{u(e.target.value),e.target.value&&x(e.target.value)},children:[(0,F.jsx)(`option`,{value:``,children:s.length?`Pick a board`:`Connect first`}),s.map(e=>(0,F.jsx)(`option`,{value:e.id,children:e.name},e.id))]})}),(0,F.jsx)(G,{label:`New cards go to`,children:(0,F.jsxs)(`select`,{className:`select`,value:p,disabled:!d.length,onChange:e=>m(e.target.value),children:[!d.length&&(0,F.jsx)(`option`,{value:``,children:`Pick a board first`}),d.map(e=>(0,F.jsx)(`option`,{value:e.id,children:e.name},e.id))]})}),(0,F.jsx)(G,{label:`Done list`,hint:`moving a card here starts verification`,children:(0,F.jsxs)(`select`,{className:`select`,value:h,disabled:!d.length,onChange:e=>g(e.target.value),children:[!d.length&&(0,F.jsx)(`option`,{value:``,children:`Pick a board first`}),d.map(e=>(0,F.jsx)(`option`,{value:e.id,children:e.name},e.id))]})})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`button`,{className:`btn btn-primary`,disabled:y||!r||!a||!l||!p||!h,onClick:()=>b(async()=>(await N(`/api/settings/trackers`,{method:`PUT`,json:{trello:{apiKey:r,token:a,boardId:l,boardName:S(s,l),listId:p,listName:S(d,p),doneListId:h,doneListName:S(d,h)}}}),t(),`Saved.`)),children:`Save`}),(0,F.jsx)(vz,{msg:_})]})]})}function wz({settings:e}){let t=`${window.location.origin}${e.webhooks.github.path}`;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-2 text-[12.5px]`,children:[(0,F.jsxs)(`div`,{className:`text-ink2`,children:[`Repository → Settings → Webhooks → Add webhook. Content type `,(0,F.jsx)(`span`,{className:`mono`,children:`application/json`}),`, event `,(0,F.jsx)(`b`,{children:`Issues`}),`.`]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`text-mute w-24 shrink-0`,children:`Payload URL`}),(0,F.jsx)(`span`,{className:`mono break-all`,children:t}),(0,F.jsx)(Wa,{text:t,className:`btn btn-ghost h-7`,label:``})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`text-mute w-24 shrink-0`,children:`Secret`}),(0,F.jsx)(`span`,{className:`mono break-all`,children:e.webhooks.github.secret}),(0,F.jsx)(Wa,{text:e.webhooks.github.secret,className:`btn btn-ghost h-7`,label:``})]}),(0,F.jsx)(`div`,{className:`text-mute`,children:`Checked against its signature; it never needs the dashboard password.`})]})}function Tz({settings:e,onSaved:t}){let n=`${window.location.origin}${e.webhooks.linear.path}`,[r,i]=(0,v.useState)(``),{msg:a,busy:o,run:s}=_z();return(0,F.jsxs)(`div`,{className:`flex flex-col gap-2 text-[12.5px]`,children:[(0,F.jsxs)(`div`,{className:`text-ink2`,children:[`Linear → Settings → API → Webhooks → New webhook, data change events for `,(0,F.jsx)(`b`,{children:`Issues`}),`. Then paste the signing secret Linear shows.`]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`text-mute w-24 shrink-0`,children:`URL`}),(0,F.jsx)(`span`,{className:`mono break-all`,children:n}),(0,F.jsx)(Wa,{text:n,className:`btn btn-ghost h-7`,label:``})]}),(0,F.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,F.jsx)(G,{label:`Signing secret`,children:(0,F.jsx)(`input`,{className:`input mono w-80`,type:`password`,placeholder:e.webhooks.linear.secretSet?`saved (enter a new one to replace)`:`lin_wh_…`,value:r,onChange:e=>i(e.target.value)})}),(0,F.jsx)(`button`,{className:`btn mb-[18px]`,disabled:o||!r,onClick:()=>s(async()=>(await N(`/api/settings/trackers`,{method:`PUT`,json:{linearWebhookSecret:r}}),i(``),t(),`Signing secret saved.`)),children:`Save`})]}),(0,F.jsx)(vz,{msg:a}),(0,F.jsx)(`div`,{className:`text-mute`,children:`Checked against its signature and timestamp; it never needs the dashboard password.`})]})}var Ez=[{title:`Issue trackers`,sub:`turn issues into tickets; closing a ticket starts fix verification here`,items:[{id:`github`,name:`GitHub Issues`,mono:`GH`,color:`#8b949e`,blurb:`Create GitHub issues with the error, stack and affected users. Status syncs both ways.`},{id:`linear`,name:`Linear`,mono:`L`,color:`#7c83f7`,blurb:`Create Linear tickets in a team. Done starts verification; a failed fix moves the ticket back.`},{id:`clickup`,name:`ClickUp`,mono:`CU`,color:`#7b68ee`,blurb:`Create ClickUp tasks in a list. A closed status starts verification; a failed fix moves the task back to open.`},{id:`trello`,name:`Trello`,mono:`T`,color:`#0c66e4`,blurb:`Create Trello cards on a board. Moving a card to your done list starts verification.`},{id:`jira`,name:`Jira`,mono:`J`,color:`#3b82f6`,blurb:`Jira Cloud tickets with the same two-way sync.`,soon:!0}]},{title:`Notifications`,sub:`where alert rules and SLO burn alerts send messages`,items:[{id:`email`,name:`Email`,mono:`@`,color:`#f59e0b`,blurb:`Send alerts through any SMTP server: Gmail, SES, Resend, Postmark, Mailgun.`},{id:`slack`,name:`Slack`,mono:`S`,color:`#e01e5a`,blurb:`Post alerts to a channel with an incoming webhook URL, set per alert rule.`},{id:`webhook`,name:`Webhooks`,mono:`{}`,color:`#22c55e`,blurb:`POST alert events as JSON to any URL: PagerDuty, Opsgenie, n8n, your own service.`}]},{title:`AI`,sub:`ask questions in the dashboard, or let coding agents read the same telemetry`,items:[{id:`ai`,name:`Ask Obzeri`,mono:`✦`,color:`#a78bfa`,blurb:`Ask questions about this project in the dashboard. Answers come only from your telemetry, with evidence and links.`},{id:`mcp`,name:`MCP server`,mono:`AI`,color:`#ff3d7f`,blurb:`Claude Code, Cursor or any MCP client can investigate errors, traces, releases and SLOs.`}]}],Dz=Ez.flatMap(e=>e.items);function Oz(){let e=P(`/api/settings`),t=uz(),n=P(`/api/alerts`),r=P(`/api/settings/ai`);return{settings:e.data,trackers:t.settings??void 0,rules:n.data?.rules,ai:r.data,error:e.error,reload:()=>{e.reload(),t.reload(),n.reload(),r.reload()}}}var kz=(e,t)=>(e||[]).filter(e=>(e.channels||[]).some(e=>e.type===t));function Az(e,t){switch(e){case`github`:return t.trackers?.github?{kind:`good`,text:`Connected · ${t.trackers.github.repo}`}:{kind:`neutral`,text:`Not connected`};case`linear`:return t.trackers?.linear?{kind:`good`,text:`Connected · ${t.trackers.linear.teamName||`team`}`}:{kind:`neutral`,text:`Not connected`};case`clickup`:return t.trackers?.clickup?{kind:`good`,text:`Connected · ${t.trackers.clickup.listName||`list`}`}:{kind:`neutral`,text:`Not connected`};case`trello`:return t.trackers?.trello?{kind:`good`,text:`Connected · ${t.trackers.trello.boardName||`board`}`}:{kind:`neutral`,text:`Not connected`};case`jira`:return{kind:`neutral`,text:`Coming soon`};case`email`:return t.settings?.email?.configured?{kind:`good`,text:`Configured${t.settings.email.source===`env`?` via env`:``}`}:{kind:`neutral`,text:`Not configured`};case`slack`:case`webhook`:{let n=kz(t.rules,e).length;return n?{kind:`good`,text:`Used by ${n} alert rule${n===1?``:`s`}`}:{kind:`neutral`,text:`Set up per alert rule`}}case`ai`:return t.ai?.configured?{kind:`good`,text:`${t.ai.provider===`anthropic`?`Anthropic`:`OpenAI-compatible`} · ${t.ai.model}`}:{kind:`neutral`,text:`Not set up`};case`mcp`:return t.settings?.mcp?.tokenPrefix?{kind:`good`,text:`Ready`}:{kind:`neutral`,text:`No token`}}}var jz=new Map,Mz=e=>{let t=jz.get(e);return t||(t=new Promise(t=>{let n=new Image;n.onload=()=>t(n.naturalWidth>0),n.onerror=()=>t(!1),n.src=e}),jz.set(e,t)),t};function Nz({item:e,size:t=36}){let n=`/logos/${e.id}.svg`,[r,i]=(0,v.useState)(!1);return(0,v.useEffect)(()=>{let e=!0;return Mz(n).then(t=>{e&&i(t)}),()=>{e=!1}},[n]),r?(0,F.jsx)(`span`,{className:`inline-flex items-center justify-center rounded-lg shrink-0 bg-white`,style:{width:t,height:t},children:(0,F.jsx)(`img`,{src:n,alt:``,width:t*.6,height:t*.6,className:`object-contain`,style:{width:t*.6,height:t*.6}})}):(0,F.jsx)(`span`,{className:`inline-flex items-center justify-center rounded-lg font-semibold shrink-0`,style:{width:t,height:t,fontSize:t*.36,color:e.color,background:`${e.color}26`},children:e.mono})}function Pz(){let{id:e}=yt(),t=Oz();if(t.error)return(0,F.jsx)(Ra,{error:t.error});if(!t.settings||!t.trackers)return(0,F.jsx)(H,{});let n=Dz.find(t=>t.id===e);return e&&n&&!n.soon?(0,F.jsx)(Iz,{item:n,ctx:t}):(0,F.jsx)(Fz,{ctx:t})}function Fz({ctx:e}){let t=L();return(0,F.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,F.jsx)(Ia,{icon:(0,F.jsx)(gi,{size:18,className:`text-brand`}),title:`Integrations`,sub:`Connect Obzerver to the tools your team already uses.`}),Ez.map(n=>(0,F.jsxs)(`section`,{className:`flex flex-col gap-2.5`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-[13px] font-semibold`,children:n.title}),(0,F.jsx)(`div`,{className:`text-mute text-[12px]`,children:n.sub})]}),(0,F.jsx)(`div`,{className:`grid grid-cols-1 @lg:grid-cols-2 @5xl:grid-cols-3 gap-3`,children:n.items.map(n=>{let r=Az(n.id,e),i=(0,F.jsxs)(`div`,{className:`h-full rounded-xl border border-line bg-panel p-4 flex flex-col gap-3 ${n.soon?`opacity-60`:`hover:border-line2 hover:bg-panel2 transition-colors`}`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,F.jsx)(Nz,{item:n}),(0,F.jsx)(`div`,{className:`flex-1 min-w-0`,children:(0,F.jsx)(`div`,{className:`font-medium`,children:n.name})}),!n.soon&&(0,F.jsx)(Or,{size:15,className:`text-mute`})]}),(0,F.jsx)(`div`,{className:`text-ink2 text-[12.5px] flex-1`,children:n.blurb}),(0,F.jsx)(`div`,{children:(0,F.jsx)(W,{kind:r.kind,children:r.text})})]});return n.soon?(0,F.jsx)(`div`,{children:i},n.id):(0,F.jsx)(Nn,{to:t(`/integrations/${n.id}`),children:i},n.id)})})]},n.title))]})}function Iz({item:e,ctx:t}){let n=L(),r=Az(e.id,t);return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4 max-w-[1100px]`,children:[(0,F.jsxs)(Nn,{to:n(`/integrations`),className:`text-mute hover:text-ink text-[12px] -mb-1 inline-flex items-center gap-1`,children:[(0,F.jsx)(dr,{size:12}),`Integrations`]}),(0,F.jsxs)(`div`,{className:`flex items-start gap-3.5`,children:[(0,F.jsx)(Nz,{item:e,size:44}),(0,F.jsxs)(`div`,{className:`flex-1`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,F.jsx)(`h1`,{className:`text-[19px] font-semibold tracking-tight`,children:e.name}),(0,F.jsx)(W,{kind:r.kind,children:r.text})]}),(0,F.jsx)(`div`,{className:`text-ink2 text-[12.5px] mt-1`,children:e.blurb})]})]}),e.id===`github`&&(0,F.jsx)(Lz,{provider:`github`,ctx:t}),e.id===`linear`&&(0,F.jsx)(Lz,{provider:`linear`,ctx:t}),e.id===`clickup`&&(0,F.jsx)(Lz,{provider:`clickup`,ctx:t}),e.id===`trello`&&(0,F.jsx)(Lz,{provider:`trello`,ctx:t}),e.id===`email`&&(0,F.jsx)(Rz,{ctx:t}),(e.id===`slack`||e.id===`webhook`)&&(0,F.jsx)(zz,{type:e.id,ctx:t}),e.id===`mcp`&&(0,F.jsx)(Hz,{ctx:t}),e.id===`ai`&&(t.ai?(0,F.jsx)(Uz,{ctx:t},`${t.ai.source}:${t.ai.provider}:${t.ai.apiKey}`):(0,F.jsx)(`div`,{className:`text-mute text-[12.5px]`,children:`Loading…`}))]})}function Lz({provider:e,ctx:t}){let n=t.trackers,r=!!n[e],i=`${e}:${JSON.stringify(n[e])}`,a=e===`github`||e===`linear`;return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(V,{title:`Connection`,children:[e===`github`&&(0,F.jsx)(yz,{settings:n,onSaved:t.reload},i),e===`linear`&&(0,F.jsx)(bz,{settings:n,onSaved:t.reload},i),e===`clickup`&&(0,F.jsx)(Sz,{settings:n,onSaved:t.reload},i),e===`trello`&&(0,F.jsx)(Cz,{settings:n,onSaved:t.reload},i)]}),r&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(V,{title:`Automation`,children:(0,F.jsx)(mz,{provider:e,settings:n,onSaved:t.reload})}),(0,F.jsx)(V,{title:`Status sync`,sub:a?`optional webhook for instant updates`:`by polling`,children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(gz,{provider:e,webhook:a}),e===`github`&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`border-t border-line`}),(0,F.jsx)(wz,{settings:n})]}),e===`linear`&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`border-t border-line`}),(0,F.jsx)(Tz,{settings:n,onSaved:t.reload})]})]})})]})]})}function Rz({ctx:e}){let t=L(),n=kz(e.rules,`email`);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Vz,{email:e.settings.email,onSaved:e.reload}),(0,F.jsx)(V,{title:`Where it's used`,sub:`add an Email channel to an alert rule or an SLO`,children:(0,F.jsx)(Bz,{rules:n,empty:(0,F.jsxs)(U,{title:`No alert rules send email yet`,children:[`Open a rule in `,(0,F.jsx)(Nn,{className:`link`,to:t(`/alerts`),children:`Alerts`}),` and add an Email channel with one or more addresses.`]})})})]})}function zz({type:e,ctx:t}){let n=L(),r=kz(t.rules,e);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(V,{title:`How to set it up`,children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-2 text-[12.5px] text-ink2`,children:[e===`slack`?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{children:`Each alert rule can post to its own channel, so there is nothing to connect globally.`}),(0,F.jsxs)(`ol`,{className:`list-decimal ml-5 flex flex-col gap-1`,children:[(0,F.jsxs)(`li`,{children:[`In Slack, create an app with `,(0,F.jsx)(`b`,{children:`Incoming Webhooks`}),` turned on and add a webhook for the channel.`]}),(0,F.jsxs)(`li`,{children:[`Copy the URL (it starts with `,(0,F.jsx)(`span`,{className:`mono`,children:`https://hooks.slack.com/services/`}),`).`]}),(0,F.jsxs)(`li`,{children:[`In `,(0,F.jsx)(Nn,{className:`link`,to:n(`/alerts`),children:`Alerts`}),`, open a rule (or an SLO), add a `,(0,F.jsx)(`b`,{children:`Slack`}),` channel and paste the URL.`]})]})]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{children:`Each alert rule can POST to its own URL. The body is JSON:`}),(0,F.jsx)(`div`,{className:`code`,children:`{ "rule": "Checkout error rate", "state": "firing", "value": 7.2,
73
- "message": "error rate 7.2% > 5% over 10 min", "link": "https://…/alerts?rule=3", "ts": 1763400000000 }`}),(0,F.jsxs)(`div`,{children:[`In `,(0,F.jsx)(Nn,{className:`link`,to:n(`/alerts`),children:`Alerts`}),`, open a rule (or an SLO) and add a `,(0,F.jsx)(`b`,{children:`Webhook`}),` channel with the URL.`]})]}),(0,F.jsx)(`div`,{children:(0,F.jsxs)(Nn,{className:`btn mt-1 inline-flex`,to:n(`/alerts`),children:[(0,F.jsx)(_i,{size:13}),`Go to alert rules`]})})]})}),(0,F.jsx)(V,{title:`Where it's used`,pad:!1,children:(0,F.jsx)(`div`,{className:`pt-2`,children:(0,F.jsx)(Bz,{rules:r,empty:(0,F.jsx)(U,{title:`No alert rules use ${e===`slack`?`Slack`:`a webhook`} yet`})})})})]})}function Bz({rules:e,empty:t}){let n=L();return e.length?(0,F.jsx)(Ka,{rows:e,cols:[{key:`n`,label:`Rule`,render:e=>(0,F.jsx)(Nn,{className:`link`,to:n(`/alerts?rule=${e.id}`),children:e.name})},{key:`s`,label:`State`,render:e=>(0,F.jsx)(W,{kind:e.state===`firing`?`crit`:`good`,children:e.state===`firing`?`firing`:`ok`})},{key:`c`,label:`Channels`,render:e=>(0,F.jsx)(`div`,{className:`flex gap-1`,children:e.channels.map((e,t)=>(0,F.jsx)(`span`,{className:`pill`,children:e.type},t))})}]}):(0,F.jsx)(F.Fragment,{children:t})}function Vz({email:e,onSaved:t}){let[n,r]=(0,v.useState)(e.source===`settings`&&e.smtp||``),[i,a]=(0,v.useState)(e.source===`settings`&&e.from||``),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(!1),f=e.source===`env`;return(0,F.jsx)(V,{title:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(ai,{size:14}),`SMTP server`]}),sub:`used by alert rules and SLO burn alerts with an email channel`,right:e.configured?(0,F.jsxs)(W,{kind:`good`,children:[`configured`,f?` via env`:``]}):(0,F.jsx)(W,{kind:`neutral`,children:`not configured`}),children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[f?(0,F.jsxs)(`div`,{className:`text-ink2 text-[12.5px]`,children:[`Set by `,(0,F.jsx)(`span`,{className:`mono`,children:`OBZERVER_SMTP_URL`}),` = `,(0,F.jsx)(`span`,{className:`mono`,children:e.smtp}),`, sending as `,(0,F.jsx)(`span`,{className:`mono`,children:e.from}),`. Change the environment variables to update it.`]}):(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @lg:grid-cols-[1fr_280px_auto] gap-3 items-end`,children:[(0,F.jsx)(G,{label:`SMTP URL`,hint:`smtp://user:pass@host:587 (STARTTLS) or smtps://user:pass@host:465. Works with Gmail, SES, Resend, Postmark, Mailgun.`,children:(0,F.jsx)(`input`,{className:`input mono`,placeholder:`smtps://apikey:secret@smtp.example.com:465`,value:n,onChange:e=>r(e.target.value)})}),(0,F.jsx)(G,{label:`From`,hint:`optional`,children:(0,F.jsx)(`input`,{className:`input`,placeholder:`Obzerver <alerts@company.com>`,value:i,onChange:e=>a(e.target.value)})}),(0,F.jsx)(`button`,{className:`btn btn-primary mb-[18px]`,disabled:u,onClick:async()=>{d(!0),l(null);try{await N(`/api/settings/email`,{method:`PUT`,json:{smtpUrl:n,from:i}}),l({ok:!0,text:`Saved.`}),t()}catch(e){l({ok:!1,text:e.message})}finally{d(!1)}},children:`Save`})]}),e.configured&&(0,F.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,F.jsx)(G,{label:`Send a test email to`,children:(0,F.jsx)(`input`,{className:`input w-72`,placeholder:`you@company.com`,value:o,onChange:e=>s(e.target.value)})}),(0,F.jsxs)(`button`,{className:`btn`,disabled:u||!o,onClick:async()=>{d(!0),l(null);try{await N(`/api/settings/email/test`,{method:`POST`,json:{to:o}}),l({ok:!0,text:`Test email sent to ${o}.`})}catch(e){l({ok:!1,text:e.message})}finally{d(!1)}},children:[(0,F.jsx)(Di,{size:13}),`Send test`]})]}),c&&(0,F.jsx)(`div`,{className:`text-[12.5px]`,style:{color:c.ok?`#5fd38a`:`#ff8a8a`},children:c.text})]})})}function Hz({ctx:e}){let t=e.settings.mcp,[n,r]=(0,v.useState)(null),i=n??`<your MCP token>`,a=JSON.stringify({mcpServers:{obzerver:{type:`http`,url:t.url,headers:{Authorization:`Bearer ${i}`}}}},null,2),o=`claude mcp add --transport http obzerver ${t.url} --header "Authorization: Bearer ${i}"`;return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(V,{title:`Connect an agent`,sub:`read-only: nothing can be changed over MCP`,right:(0,F.jsx)(`button`,{className:`btn h-7`,onClick:async()=>{(!t.tokenPrefix||window.confirm(`Make a new MCP token? The current one stops working, so agents using it need the new one.`))&&(r((await N(`/api/settings/mcp-token`,{method:`POST`})).token),e.reload())},children:t.tokenPrefix?`New token`:`Create token`}),children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)(`div`,{className:`text-ink2 text-[12.5px]`,children:`Let Claude Code, Cursor or any MCP client investigate regressions, follow a trace into its logs, or check whether an error is still happening, using the same data you see here.`}),n?(0,F.jsxs)(`div`,{className:`rounded-lg border border-[#3b3315] bg-[#1d1a0e] p-3 flex flex-col gap-2`,children:[(0,F.jsxs)(`div`,{className:`text-[12.5px]`,children:[(0,F.jsx)(`b`,{children:`Copy the token now.`}),` `,(0,F.jsx)(`span`,{className:`text-ink2`,children:`Only its hash is stored, so it can't be shown again.`})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`div`,{className:`code flex-1 !py-2 break-all`,children:n}),(0,F.jsx)(Wa,{text:n,className:`btn h-8`})]})]}):(0,F.jsx)(`div`,{className:`text-[12.5px] text-ink2`,children:t.tokenPrefix?(0,F.jsxs)(F.Fragment,{children:[`Current token starts with `,(0,F.jsxs)(`span`,{className:`mono`,children:[t.tokenPrefix,`…`]}),`. It is stored as a hash: if you don't have it, make a new one and the commands below fill it in.`]}):`Create a token to connect an agent.`}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,F.jsx)(`span`,{className:`text-ink2 text-[12px]`,children:`Claude Code`}),(0,F.jsx)(Wa,{text:o,className:`btn h-6 text-[11px]`})]}),(0,F.jsx)(`div`,{className:`code`,children:o})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,F.jsx)(`span`,{className:`text-ink2 text-[12px]`,children:`Cursor / generic mcp.json`}),(0,F.jsx)(Wa,{text:a,className:`btn h-6 text-[11px]`})]}),(0,F.jsx)(`div`,{className:`code`,children:a})]})]})}),(0,F.jsx)(V,{title:`Tools (${t.tools.length})`,children:(0,F.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:t.tools.map(e=>(0,F.jsx)(`span`,{className:`pill mono !text-[11px]`,children:e},e))})})]})}function Uz({ctx:e}){let t=e.ai||{configured:!1},[n,r]=(0,v.useState)(t.provider||`anthropic`),[i,a]=(0,v.useState)(t.apiKey||``),[o,s]=(0,v.useState)(t.model||``),[c,l]=(0,v.useState)(t.baseUrl||``),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)(!1),m=async e=>{p(!0),d(null);try{d({ok:!0,text:await e()})}catch(e){d({ok:!1,text:e.message})}finally{p(!1)}},h={provider:n,apiKey:i,model:o,baseUrl:c||null};return t.source===`env`?(0,F.jsx)(V,{title:`Model`,children:(0,F.jsxs)(`div`,{className:`text-ink2 text-[12.5px]`,children:[`Set by `,(0,F.jsx)(`span`,{className:`mono`,children:`OBZERVER_AI_PROVIDER`}),`, `,(0,F.jsx)(`span`,{className:`mono`,children:`OBZERVER_AI_API_KEY`}),` and `,(0,F.jsx)(`span`,{className:`mono`,children:`OBZERVER_AI_MODEL`}),`: `,t.provider,` · `,(0,F.jsx)(`span`,{className:`mono`,children:t.model}),t.baseUrl?(0,F.jsxs)(F.Fragment,{children:[` · `,(0,F.jsx)(`span`,{className:`mono`,children:t.baseUrl})]}):null,`. Change the environment variables to update it.`]})}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(V,{title:`Model`,sub:`one model for every project on this server`,right:t.configured?(0,F.jsx)(`button`,{className:`btn btn-ghost h-7`,onClick:()=>m(async()=>window.confirm(`Turn off Ask Obzeri?`)?(await N(`/api/settings/ai`,{method:`PUT`,json:null}),e.reload(),`Turned off.`):`Kept.`),children:`Turn off`}):void 0,children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsxs)(`div`,{className:`seg w-fit`,children:[(0,F.jsx)(`button`,{className:n===`anthropic`?`on`:``,onClick:()=>{r(`anthropic`),s(``),l(``)},children:`Anthropic (Claude)`}),(0,F.jsx)(`button`,{className:n===`openai`?`on`:``,onClick:()=>{r(`openai`),s(``),l(``)},children:`OpenAI-compatible`})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @lg:grid-cols-2 gap-3`,children:[(0,F.jsx)(G,{label:`API key`,hint:n===`anthropic`?`from console.anthropic.com → API keys`:`leave empty for a local server such as Ollama`,children:(0,F.jsx)(`input`,{className:`input mono`,type:`password`,autoComplete:`off`,placeholder:n===`anthropic`?`sk-ant-…`:`sk-…`,value:i,onChange:e=>a(e.target.value)})}),(0,F.jsx)(G,{label:`Model`,hint:n===`anthropic`?`default: claude-sonnet-5-5`:`the model id your endpoint serves`,children:(0,F.jsx)(`input`,{className:`input mono`,placeholder:n===`anthropic`?`claude-sonnet-5-5`:`e.g. llama3.1, gpt-…`,value:o,onChange:e=>s(e.target.value)})})]}),(0,F.jsx)(G,{label:n===`anthropic`?`Base URL (optional)`:`Base URL`,hint:n===`anthropic`?`only for a proxy or gateway`:`https://api.openai.com/v1 · https://openrouter.ai/api/v1 · http://localhost:11434/v1 (Ollama)`,children:(0,F.jsx)(`input`,{className:`input mono`,placeholder:n===`anthropic`?`https://api.anthropic.com`:`https://api.openai.com/v1`,value:c,onChange:e=>l(e.target.value)})}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsxs)(`button`,{className:`btn`,disabled:f,onClick:()=>m(async()=>(await N(`/api/settings/ai/test`,{method:`POST`,json:h})).detail),children:[(0,F.jsx)(Fi,{size:13}),`Test`]}),(0,F.jsx)(`button`,{className:`btn btn-primary`,disabled:f,onClick:()=>m(async()=>(await N(`/api/settings/ai`,{method:`PUT`,json:h}),e.reload(),`Saved. Open Ask Obzeri from the top bar (⌘I).`)),children:`Save`}),u&&(0,F.jsx)(`span`,{className:`text-[12.5px]`,style:{color:u.ok?`#5fd38a`:`#ff8a8a`},children:u.text})]})]})}),(0,F.jsx)(V,{title:`How answers are built`,children:(0,F.jsxs)(`div`,{className:`text-[12.5px] text-ink2 flex flex-col gap-1.5`,children:[(0,F.jsx)(`div`,{children:`The model never touches the database. It can only call the same read-only tools as the MCP server, against the project you are in, and must finish with a structured answer.`}),(0,F.jsx)(`div`,{children:`Before an answer is shown, Obzerver checks it: sources and the time range come from the tool calls that really ran; links to executions, traces and errors are kept only if those ids appeared in tool results; evidence must cite a tool that ran; and confidence is lowered when something did not hold up.`}),(0,F.jsx)(`div`,{className:`text-mute`,children:`Privacy: your question and what the tools return (route names, error messages, SQL without values) are sent to the model provider. Use a local model through an OpenAI-compatible server if nothing may leave your network.`})]})})]})}function Wz(){let e=L(),t=Oz();if(!t.settings||!t.trackers)return null;let n=Dz.filter(e=>!e.soon);return(0,F.jsx)(V,{title:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(gi,{size:14}),`Integrations`]}),sub:`GitHub, Linear, email, Slack, webhooks and MCP`,right:(0,F.jsxs)(Nn,{className:`btn h-7`,to:e(`/integrations`),children:[`Manage`,(0,F.jsx)(Or,{size:13})]}),children:(0,F.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:n.map(n=>{let r=Az(n.id,t);return(0,F.jsxs)(Nn,{to:e(`/integrations/${n.id}`),className:`inline-flex items-center gap-2 rounded-lg border border-line px-2.5 py-1.5 hover:border-line2`,children:[(0,F.jsx)(Nz,{item:n,size:22}),(0,F.jsx)(`span`,{className:`text-[12.5px]`,children:n.name}),(0,F.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full`,style:{background:r.kind===`good`?`#5fd38a`:`#82829a`}})]},n.id)})})})}function Gz({initial:e=`express`,title:t=`Connect an application`}={}){let{data:n,reload:r}=P(`/api/settings`),[i,a]=(0,v.useState)(e),[o,s]=(0,v.useState)(null),c=(n?.keys)?.find(e=>e.kind===`ingest`&&!e.revoked&&!e.expired),l=o?.key||`<your-ingest-key>`,u=n?.endpoint||`http://localhost:4319`,d=`OBZERVER_KEY=${l}\nOBZERVER_ENDPOINT=${u}\nOBZERVER_SERVICE=my-api`,f={zero:`# no code changes: preload the SDK
74
- npm i @obzerver/node
75
-
76
- ${d.split(`
77
- `).join(` \\
78
- `)} \\
79
- node --import @obzerver/node/register server.ts
80
-
81
- # compiled or CommonJS apps
82
- node -r @obzerver/node/register dist/server.js`,express:`// instrument.ts: loaded first with node --import ./instrument.ts server.ts
83
- import { init } from '@obzerver/node';
84
- import type { Request } from 'express';
85
-
86
- init({
87
- serviceId: 'shop-api', // or OBZERVER_SERVICE
88
- // release version is inferred from CI or .git; set serviceVersion to override
89
- http: { getUserId: (req: Request & { user?: { id: string } }) => req.user?.id },
90
- });
91
-
92
- // server.ts: your app, unchanged
93
- import express from 'express';
94
- const app = express();
95
- app.get('/orders/:id', async (req, res) => {
96
- res.json(await orders.findById(req.params.id)); // pg/mysql2/redis queries are traced
97
- });
98
- app.listen(3000);`,fastify:`// instrument.ts: loaded first with node --import ./instrument.ts server.ts
99
- import { init } from '@obzerver/node';
100
- init({ serviceId: 'billing' });
101
-
102
- // server.ts
103
- import Fastify from 'fastify';
104
- import { pino } from '@obzerver/node';
105
-
106
- const app = Fastify({ logger: { ...pino() } }); // optional: forward Fastify's logs
107
- // Instances are picked up automatically via diagnostics_channel.
108
- app.get('/invoices/:id', async (req) => invoices.find(req.params.id));
109
- await app.listen({ port: 3001 });`};return(0,F.jsx)(V,{title:t,right:(0,F.jsx)(Ga,{value:i,onChange:a,options:[{id:`express`,label:`Express`},{id:`fastify`,label:`Fastify`},{id:`zero`,label:`Zero-code`}]}),children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[!o&&(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-[12.5px] text-ink2`,children:[(0,F.jsx)(Zr,{size:14,className:`text-mute`}),c?(0,F.jsxs)(F.Fragment,{children:[`Use your ingest key (starts with `,(0,F.jsxs)(`span`,{className:`mono`,children:[c.prefix,`…`]}),`), or`]}):(0,F.jsx)(F.Fragment,{children:`You need an ingest key:`}),(0,F.jsx)(`button`,{className:`btn h-7`,onClick:async()=>{s(await N(`/api/keys`,{method:`POST`,json:{name:`setup`,kind:`ingest`}})),r()},children:`Create a new key`})]}),o&&(0,F.jsx)(az,{k:o,endpoint:u}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,F.jsx)(`span`,{className:`text-ink2 text-[12px]`,children:`1. Environment`}),(0,F.jsx)(Wa,{text:d,className:`btn h-6 text-[11px]`})]}),(0,F.jsx)(`div`,{className:`code`,children:d})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,F.jsxs)(`span`,{className:`text-ink2 text-[12px]`,children:[`2. `,i===`zero`?`Run`:`Initialise the SDK first`]}),(0,F.jsx)(Wa,{text:f[i],className:`btn h-6 text-[11px]`})]}),(0,F.jsx)(`div`,{className:`code`,children:f[i]})]}),(0,F.jsxs)(`div`,{className:`text-mute text-[12px] leading-relaxed`,children:[`Traced automatically: every HTTP request (route templates, middleware & handler timings), thrown and `,(0,F.jsx)(`span`,{className:`mono`,children:`next(err)`}),` errors with source lines, console/pino logs, `,(0,F.jsx)(`span`,{className:`mono`,children:`pg`}),`, `,(0,F.jsx)(`span`,{className:`mono`,children:`mysql2`}),`, `,(0,F.jsx)(`span`,{className:`mono`,children:`ioredis`}),`, BullMQ workers, `,(0,F.jsx)(`span`,{className:`mono`,children:`node-cron`}),` and `,(0,F.jsx)(`span`,{className:`mono`,children:`cron`}),` jobs, outbound `,(0,F.jsx)(`span`,{className:`mono`,children:`http`}),`/`,(0,F.jsx)(`span`,{className:`mono`,children:`fetch`}),` with `,(0,F.jsx)(`span`,{className:`mono`,children:`traceparent`}),` propagation, CPU/memory/event-loop/GC, and every method of classes in `,(0,F.jsx)(`span`,{className:`mono`,children:`*.service.ts`}),` / `,(0,F.jsx)(`span`,{className:`mono`,children:`*.repository.ts`}),` files. Add other classes with `,(0,F.jsx)(`span`,{className:`mono`,children:`instrument(MyClass)`}),`, any other background function with `,(0,F.jsx)(`span`,{className:`mono`,children:`job('name', fn)`}),`, and business numbers with `,(0,F.jsx)(`span`,{className:`mono`,children:`metrics.counter()`}),`.`]})]})})}function Kz(){let e=L(),t=P(`/api/projects`).data?.find(e=>e.slug===qn()),{data:n,error:r,reload:i}=P(`/api/settings`);return r?(0,F.jsx)(Ra,{error:r}):n?(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ia,{icon:(0,F.jsx)(ki,{size:18,className:`text-brand`}),title:`Setup & settings`,sub:`Collector at ${n.endpoint} · data kept for ${n.retentionDays} days${n.passwordProtected?` · dashboard password protected`:``}`,right:(0,F.jsxs)(Nn,{to:e(`/projects`),className:`text-[12px] text-ink2 hover:text-ink`,children:[`Keys and setup for project `,(0,F.jsx)(`b`,{className:`text-ink`,children:t?.name??`…`})]})}),(0,F.jsx)(Gz,{}),(0,F.jsx)(sz,{keys:n.keys,endpoint:n.endpoint,ingestRate:n.ingestRate,reload:i}),n.history&&(0,F.jsx)(V,{title:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(Jr,{size:14}),`Long-term history`]}),sub:`hourly roll-ups that outlive raw data; baselines and the assistant learn from them`,children:(0,F.jsxs)(`div`,{className:`grid grid-cols-2 @lg:grid-cols-4 gap-4 text-[12.5px]`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute`,children:`Kept for`}),(0,F.jsxs)(`div`,{className:`font-medium`,children:[n.history.days,` days`]}),(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px]`,children:[`hourly for `,n.history.hourlyDays,` days, then daily`]})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute`,children:`Raw data`}),(0,F.jsxs)(`div`,{className:`font-medium`,children:[n.retentionDays,` days`]}),(0,F.jsx)(`div`,{className:`text-mute text-[11.5px]`,children:`traces, spans, logs`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute`,children:`Oldest`}),(0,F.jsx)(`div`,{className:`font-medium`,children:n.history.oldest?Ea(n.history.oldest,!0):`nothing yet`}),(0,F.jsx)(`div`,{className:`text-mute text-[11.5px]`,children:n.history.rolledUntil?(0,F.jsxs)(F.Fragment,{children:[`rolled up to `,(0,F.jsx)(ro,{ts:n.history.rolledUntil})]}):`first roll-up within minutes`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute`,children:`Size`}),(0,F.jsx)(`div`,{className:`font-medium`,children:n.history.bytes==null?`—`:Ca(n.history.bytes)}),(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px]`,children:[n.history.rows.toLocaleString(),` rows · `,(0,F.jsx)(`span`,{className:`mono`,children:`OBZERVER_HISTORY_DAYS`})]})]})]})}),(0,F.jsx)(Wz,{})]}):(0,F.jsx)(H,{})}var qz=(e,t,n)=>`/operations/${e}/${ka(t)}/${ka(n)}`;function Jz(){let e=I(),t=oo(),n=L(),r=ht(),{data:i,error:a}=P(`/api/overview${e.q()}`,[e.tick]);if(a)return(0,F.jsx)(Ra,{error:a});if(!i)return(0,F.jsx)(H,{});if(e.meta&&e.meta.counts.traces===0)return(0,F.jsx)(Xz,{});let o=i.kpis,s=rz(i.series.points,i.band),c=iz(i.band),l=[{key:`s2xx`,label:`2xx/3xx`,color:XR[0],type:`bar`,stack:`s`},{key:`s4xx`,label:`4xx`,color:ZR.warn,type:`bar`,stack:`s`},{key:`s5xx`,label:`5xx`,color:ZR.crit,type:`bar`,stack:`s`},...c?[c.calls]:[]],u=[...c?[c.p95]:[],{key:`p95`,label:`p95`,color:XR[1],type:`line`},{key:`avg`,label:`Average`,color:XR[0],type:`line`}],d=o.usual&&o.usual.requests>=50?o.usual:o.prev&&o.prev.requests>=50?o.prev:null,f=d&&d===o.usual?`vs usual: ${o.usual.description}`:`vs the previous window of the same length`,p=(e,t)=>d&&t!=null?Oa(e,t):null;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ia,{title:`Overview`,sub:`${t.length} application${t.length===1?``:`s`} reporting${e.env?` in ${e.env}`:``} · ${d===o.usual&&d?`changes vs ${o.usual.description}`:d?`changes vs the previous window`:`drag across any chart to zoom`}`}),i.fromHistory&&(0,F.jsx)(Zz,{note:i.fromHistory.note}),i.secrets?.open>0&&(0,F.jsxs)(`button`,{className:`text-left rounded-xl border px-4 py-3 flex items-center gap-3 hover:brightness-110`,style:{borderColor:`#6b2330`,background:`rgba(208,59,59,.12)`},onClick:()=>r(n(`/secrets`)),children:[(0,F.jsx)(Ai,{size:20,className:`shrink-0`,style:{color:`#ff6b6b`}}),(0,F.jsxs)(`div`,{className:`min-w-0 flex-1 text-[13px]`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`b`,{style:{color:`#ffb0b0`},children:`Secrets are reaching your logs`}),` `,(0,F.jsxs)(`span`,{className:`text-ink2`,children:[`· `,i.secrets.open,` place`,i.secrets.open===1?``:`s`,` to fix`,i.secrets.inWindow?` · ${B(i.secrets.inWindow)} in this window`:``,` · redacted before storage`]})]}),(0,F.jsx)(`div`,{className:`text-ink2 truncate text-[12px] mt-0.5`,children:i.secrets.top.map(e=>`${e.label} in ${e.source===`error`?`error messages`:`logs`} of ${e.service}${e.operation?` at ${e.operation}`:``}`).join(` · `)})]}),(0,F.jsx)(`span`,{className:`btn h-7 shrink-0`,children:`Review`})]}),i.firing.length>0&&(0,F.jsxs)(`div`,{className:`card px-4 py-2.5 flex items-center gap-3 cursor-pointer`,style:{borderColor:`#5a2328`,background:`rgba(208,59,59,.08)`},onClick:()=>r(n(`/alerts`)),children:[(0,F.jsx)(hr,{size:15,style:{color:ZR.crit}}),(0,F.jsxs)(`span`,{className:`font-medium`,children:[i.firing.length,` alert`,i.firing.length>1?`s`:``,` firing:`]}),(0,F.jsx)(`span`,{className:`text-ink2 truncate`,children:i.firing.map(e=>e.name).join(` · `)}),(0,F.jsx)(fr,{size:14,className:`ml-auto text-mute`})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 @2xl:grid-cols-3 @5xl:grid-cols-6 gap-3`,children:[(0,F.jsx)(za,{label:`Requests`,value:B(o.requests),sub:`${B(o.rpm)} rpm`,deltaTitle:f,deltaText:p(o.requests,d?.requests)?.text,deltaDir:p(o.requests,d?.requests)?.dir,badWhen:`none`,spark:s.map(e=>e.count),onClick:()=>r(n(`/requests`))}),(0,F.jsx)(za,{label:`Failure rate (5xx)`,value:Sa(o.failureRate),sub:`${B(o.failed)} failed · ${B(o.clientErrors)} 4xx`,deltaTitle:f,deltaText:p(o.failureRate,d?.failureRate)?.text,deltaDir:p(o.failureRate,d?.failureRate)?.dir,badWhen:`up`,color:o.failureRate>1?`#ff8a8a`:void 0}),(0,F.jsx)(za,{label:`p95 latency`,value:z(o.p95),sub:`p99 ${z(o.p99)}`,deltaTitle:f,deltaText:p(o.p95,d?.p95)?.text,deltaDir:p(o.p95,d?.p95)?.dir,badWhen:`up`}),(0,F.jsx)(za,{label:`Average latency`,value:z(o.avg),deltaTitle:f,deltaText:p(o.avg,d?.avg)?.text,deltaDir:p(o.avg,d?.avg)?.dir,badWhen:`up`}),(0,F.jsx)(za,{label:`Unhandled errors`,value:B(o.errors),sub:`${i.errorGroups.length} group${i.errorGroups.length===1?``:`s`}`,onClick:()=>r(n(`/errors`)),color:o.errors?`#ff8a8a`:void 0}),(0,F.jsx)(za,{label:`Jobs`,value:B(o.jobs),sub:o.jobsFailed?`${B(o.jobsFailed)} failed (${Sa(o.jobsFailed/Math.max(1,o.jobs)*100)})`:`no failures`,onClick:()=>r(n(`/jobs`))})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-2 gap-3`,children:[(0,F.jsx)(tz,{title:`Throughput`,sub:`requests per bucket by status`,series:l,children:(0,F.jsx)(ez,{data:s,series:l,fmt:e=>B(e)})}),(0,F.jsx)(tz,{title:`Latency`,series:u,children:(0,F.jsx)(ez,{data:s,series:u,fmt:e=>z(e)})})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-3 gap-3`,children:[(0,F.jsx)(V,{title:`Where time goes`,sub:`routes by total time`,pad:!1,right:(0,F.jsx)(`button`,{className:`btn btn-ghost h-6 text-[11.5px]`,onClick:()=>r(n(`/requests?sort=time`)),children:`All routes`}),children:(0,F.jsx)(Yz,{rows:i.topByTime,metric:e=>z(e.totalTime),onRow:e=>r(n(qz(`http`,e.service,e.name)))})}),(0,F.jsx)(V,{title:`Slowest routes`,sub:`by p95`,pad:!1,right:(0,F.jsx)(`button`,{className:`btn btn-ghost h-6 text-[11.5px]`,onClick:()=>r(n(`/requests?sort=p95`)),children:`All routes`}),children:(0,F.jsx)(Yz,{rows:i.slowest,metric:e=>z(e.p95),onRow:e=>r(n(qz(`http`,e.service,e.name)))})}),(0,F.jsx)(V,{title:`Unhandled errors`,sub:`by occurrences`,pad:!1,right:(0,F.jsx)(`button`,{className:`btn btn-ghost h-6 text-[11.5px]`,onClick:()=>r(n(`/errors`)),children:`All errors`}),children:i.errorGroups.length===0?(0,F.jsx)(U,{title:`No unhandled errors`,icon:(0,F.jsx)(`span`,{className:`text-[18px]`,children:`✓`}),children:`Nothing escaped a handler in this window.`}):(0,F.jsx)(`div`,{className:`flex flex-col`,children:i.errorGroups.map(e=>(0,F.jsxs)(`div`,{className:`flex items-center gap-3 px-3.5 py-2 border-b border-[#1d1d26] last:border-0 cursor-pointer hover:bg-[#181821]`,onClick:()=>r(n(`/errors/${e.fingerprint}`)),children:[(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`font-medium text-[#ff9b9b]`,children:e.class}),e.isNew&&(0,F.jsx)(W,{kind:`serious`,children:`new`})]}),(0,F.jsx)(`div`,{className:`text-mute truncate text-[12px]`,children:e.message})]}),(0,F.jsx)(Ba,{data:e.spark,color:ZR.crit,w:56}),(0,F.jsx)(`div`,{className:`text-right tabular-nums w-10`,children:B(e.count)})]},e.fingerprint))})})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-3 gap-3`,children:[(0,F.jsx)(`div`,{className:`@5xl:col-span-2`,children:(0,F.jsx)(tz,{title:`Jobs`,sub:`runs and failures`,series:[{key:`count`,label:`Runs`,color:XR[2]},{key:`failed`,label:`Failed`,color:ZR.crit}],children:(0,F.jsx)(ez,{data:i.jobSeries.points,height:150,series:[{key:`count`,label:`Runs`,color:XR[2],type:`area`},{key:`failed`,label:`Failed`,color:ZR.crit,type:`line`}],fmt:e=>B(e)})})}),(0,F.jsx)(V,{title:`Instances`,sub:`latest runtime sample`,pad:!1,right:(0,F.jsx)(`button`,{className:`btn btn-ghost h-6 text-[11.5px]`,onClick:()=>r(n(`/profiler`)),children:`Profiler`}),children:(0,F.jsx)(Ka,{rows:i.runtime,empty:(0,F.jsx)(U,{title:`No runtime samples yet`}),onRow:()=>r(n(`/profiler`)),cols:[{key:`i`,label:`Instance`,render:e=>(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(`div`,{className:`truncate`,children:e.service}),(0,F.jsx)(`div`,{className:`text-mute text-[11px] mono truncate`,children:e.instance})]})},{key:`cpu`,label:`CPU`,num:!0,render:e=>Sa(e.cpu,0)},{key:`rss`,label:`RSS`,num:!0,render:e=>`${Math.round(e.rss/1048576)}MB`},{key:`el`,label:`Loop p99`,num:!0,render:e=>(0,F.jsx)(`span`,{style:{color:e.elP99>100?ZR.serious:void 0},children:z(e.elP99)})},{key:`ts`,label:`Seen`,num:!0,render:e=>(0,F.jsx)(`span`,{className:`text-mute`,children:(0,F.jsx)(ro,{ts:e.ts})})}]})})]})]})}function Yz({rows:e,metric:t,onRow:n}){return e.length?(0,F.jsx)(`div`,{className:`flex flex-col`,children:e.map(e=>(0,F.jsxs)(`div`,{className:`flex items-center gap-3 px-3.5 py-2 border-b border-[#1d1d26] last:border-0 cursor-pointer hover:bg-[#181821]`,onClick:()=>n(e),children:[(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,F.jsx)(Ua,{name:e.name}),(0,F.jsxs)(`div`,{className:`text-mute text-[11px] pl-[44px]`,children:[e.service,` · `,B(e.calls),` calls`]})]}),(0,F.jsx)(`div`,{className:`tabular-nums font-medium`,children:t(e)})]},e.service+e.name))}):(0,F.jsx)(U,{title:`No requests in this window`})}function Xz({simple:e}){return(0,F.jsxs)(`div`,{className:`max-w-3xl mx-auto py-6 flex flex-col gap-4`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`h1`,{className:`text-[22px] font-semibold tracking-tight`,children:e?`Let's connect your app`:`Waiting for your first request`}),(0,F.jsx)(`p`,{className:`text-ink2 mt-1`,children:e?`Two steps: add the environment variables below, then start your app with the SDK. Visit a few pages and this screen turns into a health check within seconds.`:`Add the SDK to an Express or Fastify app and send it some traffic. Requests, errors, logs and traces show up here within seconds. No spans to wire by hand.`})]}),(0,F.jsx)(Gz,{initial:e?`zero`:void 0}),(0,F.jsxs)(`div`,{className:`text-mute text-[12.5px]`,children:[`Just exploring? Run `,(0,F.jsx)(`span`,{className:`mono text-ink2`,children:`npx obzerver seed`}),` to load 24 hours of demo telemetry.`]})]})}function Zz({note:e}){return(0,F.jsxs)(`div`,{className:`card px-4 py-2 text-[12px] text-ink2 flex items-center gap-2`,style:{borderColor:`#2b3a55`,background:`rgba(57,135,229,.06)`},children:[(0,F.jsx)(Jr,{size:14,className:`text-[#7fb2f0] shrink-0`}),e]})}function Qz({kind:e}){let t=I(),n=L(),r=ht(),[i,a]=(0,v.useState)(``),[o,s]=zn(),c=[`calls`,`rpm`,`avg`,`p95`,`fail`,`time`,`last`,`qw`,`name`,`service`].includes(o.get(`sort`)||``)?o.get(`sort`):`calls`,{data:l,error:u}=P(`/api/operations${t.q({kind:e})}`,[t.tick,e]),d=P(`/api/overview${t.q()}`,[t.tick]),f=e===`job`,p=e=>to.includes(e.method||e.name.split(` `)[0]),m=(l||[]).filter(p).length,h=f?null:o.get(`tab`)===`graphql`?`graphql`:`http`,g=h===`graphql`,_=l&&h?l.filter(e=>p(e)===g):l,y=!f&&m>0,b=P(y?`/api/operations/series${t.q({protocol:h})}`:null,[t.tick,h,y]),x=(o.get(`method`)||``).split(`,`).filter(Boolean),S=e=>{let t=o.get(e);return t===null||t===``||!Number.isFinite(Number(t))?null:Number(t)},C=S(`avgMin`),w=S(`avgMax`),T=S(`callsMin`),E=S(`callsMax`),D=e=>s(()=>{let t=new URLSearchParams(window.location.search);for(let[n,r]of Object.entries(e))r===null||r===``?t.delete(n):t.set(n,r);return t},{replace:!0}),O=(e,t)=>D({[e]:t}),k=e=>e.method||(e.name.includes(` `)?e.name.slice(0,e.name.indexOf(` `)):``),A=g?to:[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`],j=[...A,...[...new Set((_||[]).map(k).filter(Boolean))].filter(e=>!A.includes(e)).sort()],ee=x.length>0||C!=null||w!=null||T!=null||E!=null,te=(_||[]).filter(e=>(!i||e.name.toLowerCase().includes(i.toLowerCase())||e.service.toLowerCase().includes(i.toLowerCase()))&&(!x.length||x.includes(k(e)))&&(C==null||(e.avg??0)>=C)&&(w==null||(e.avg??0)<=w)&&(T==null||e.calls>=T)&&(E==null||e.calls<=E)),ne=Math.max(1,...te.map(e=>e.totalTime)),re=d.data&&!y?f?d.data.jobBand:d.data.band:null,ie=y?(b.data?.points||[]).map(e=>({...e,ok:e.count-e.failed})):d.data?rz((f?d.data.jobSeries:d.data.series).points,re):[],ae=iz(re),oe=new Set((_||[]).map(e=>e.service)),se=(t.meta?.versions||[]).filter(e=>(t.service?e.service===t.service:oe.has(e.service))&&e.first>t.from&&e.first<t.to).map(e=>({t:e.first,label:t.service?e.version:`${e.service}@${e.version}`})),ce=g?[{key:`ok`,label:`Succeeded`,color:XR[0],type:`bar`,stack:`g`},{key:`failed`,label:`Failed (resolver errors)`,color:ZR.crit,type:`bar`,stack:`g`}]:f?[{key:`count`,label:`Runs`,color:XR[2],type:`bar`,stack:`a`},{key:`failed`,label:`Failed`,color:ZR.crit,type:`bar`,stack:`a`}]:[{key:`s2xx`,label:`2xx/3xx`,color:XR[0],type:`bar`,stack:`s`},{key:`s4xx`,label:`4xx`,color:ZR.warn,type:`bar`,stack:`s`},{key:`s5xx`,label:`5xx`,color:ZR.crit,type:`bar`,stack:`s`}];ae&&ce.push(ae.calls);let le=f?[{key:`p95`,label:`Duration p95`,color:XR[1],type:`line`},{key:`queueWaitP95`,label:`Queue wait p95`,color:XR[6],type:`line`}]:[{key:`p95`,label:`p95`,color:XR[1],type:`line`},{key:`avg`,label:`Average`,color:XR[0],type:`line`}];return ae&&le.unshift({...ae.p95,label:f?`Normal duration p95`:`Normal p95`}),(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ia,{icon:f?(0,F.jsx)(Gi,{size:18,className:`text-brand`}):(0,F.jsx)(lr,{size:18,className:`text-brand`}),title:f?`Jobs`:`Requests`,sub:f?`Queue consumers (BullMQ) and cron runs, with queue wait, attempts and failures.`:g?`Every GraphQL operation, by its name (anonymous ones by their root fields). A resolver that throws fails the request even when HTTP says 200.`:`Every HTTP route, by its route template. Click a route to see its executions.`}),h&&(0,F.jsx)(`div`,{className:`flex gap-2 -mt-3`,role:`tablist`,"aria-label":`Request type`,children:[[`http`,`HTTP`,Kr,l?l.length-m:null],[`graphql`,`GraphQL`,yr,l?m:null]].map(([e,t,n,r])=>(0,F.jsxs)(`button`,{role:`tab`,"aria-selected":h===e,onClick:()=>D({tab:e===`http`?null:e,method:null}),className:`group flex items-center gap-2 h-9 px-3 rounded-lg border text-[13px] font-semibold transition-colors ${h===e?`border-brand/60 bg-[rgba(255,61,127,.08)] text-ink cursor-default`:`border-line text-ink2 cursor-pointer hover:bg-[#1b1b25] hover:border-line2 hover:text-ink`}`,children:[(0,F.jsx)(n,{size:14,className:h===e?`text-brand`:`text-mute`}),t,r!=null&&(0,F.jsx)(`span`,{className:`text-[11px] font-medium px-1.5 rounded-full tabular-nums ${h===e?`bg-[rgba(255,61,127,.18)] text-ink`:`bg-[#1d1d27] text-mute group-hover:bg-[#2a2a37] group-hover:text-ink2`}`,children:r})]},e))}),_?.[0]?.fromHistory&&(0,F.jsx)(Zz,{note:`This window reaches past the raw data, so routes come from hourly summaries (latency within ~5%). Executions and traces are only kept for the raw-data period.`}),ie.length>0&&!(g&&!m)&&(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-2 gap-3`,children:[(0,F.jsx)(tz,{title:f?`Runs`:`Throughput`,series:ce,children:(0,F.jsx)(ez,{data:ie,series:ce,height:150,fmt:e=>B(e),markers:se})}),(0,F.jsx)(tz,{title:f?`Duration & queue wait`:`Latency`,series:le,children:(0,F.jsx)(ez,{data:ie,series:le,height:150,fmt:e=>z(e),markers:se})})]}),(0,F.jsxs)(V,{pad:!1,title:`${te.length}${ee&&_?` of ${_.length}`:``} ${f?`job`:g?`operation`:`route`}${(ee?_?.length:te.length)===1?``:`s`}`,right:(0,F.jsx)($z,{q:i,setQ:a,ops:_||[],label:f?`jobs`:g?`operations`:`routes`,onPick:t=>r(n(qz(e,t.service,t.name)))}),children:[(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-x-5 gap-y-2 px-4 pt-3 pb-1 text-[12px]`,children:[!f&&j.length>0&&(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`text-mute`,children:g?`Type`:`Method`}),(0,F.jsxs)(`div`,{className:`seg`,children:[(0,F.jsx)(`button`,{className:x.length?``:`on`,onClick:()=>O(`method`,null),children:`All`}),j.map(e=>(0,F.jsx)(`button`,{className:`mono font-semibold ${x.includes(e)?`on`:``}`,style:{color:eo[e]||void 0},onClick:()=>O(`method`,(x.includes(e)?x.filter(t=>t!==e):[...x,e]).join(`,`)||null),children:e},e))]})]}),(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-5 gap-y-2 ml-auto`,children:[(0,F.jsx)(eB,{label:`Mean duration`,unit:`ms`,min:C,max:w,onChange:(e,t)=>D({avgMin:e,avgMax:t})}),(0,F.jsx)(eB,{label:f?`Runs`:`Calls`,min:T,max:E,onChange:(e,t)=>D({callsMin:e,callsMax:t})}),ee&&(0,F.jsxs)(`button`,{className:`btn btn-ghost h-7 text-[12px]`,onClick:()=>D({method:null,avgMin:null,avgMax:null,callsMin:null,callsMax:null}),children:[(0,F.jsx)(Ki,{size:12}),`Clear filters`]})]})]}),(0,F.jsx)(`div`,{className:`pt-2`,children:u?(0,F.jsx)(Ra,{error:u}):_?(0,F.jsx)(Ka,{rows:te,paged:!0,resetKey:`${h}|${i}|${o.get(`method`)}|${o.get(`avgMin`)}|${o.get(`avgMax`)}|${o.get(`callsMin`)}|${o.get(`callsMax`)}|${t.service}|${t.env}`,initialSort:c,initialDir:c===`name`||c===`service`?`asc`:`desc`,onRow:t=>r(n(qz(e,t.service,t.name))),rowKey:e=>e.service+e.name,noun:f?`jobs`:g?`operations`:`routes`,empty:_.length>0?(0,F.jsx)(U,{title:`No ${f?`jobs`:g?`operations`:`routes`} match the filters`,children:`Change or clear the filters above to see more.`}):g?(0,F.jsx)(U,{title:`No GraphQL operations in this window`,children:`Nothing to set up: the SDK names each request after its operation with Apollo Server, Mercurius, graphql-yoga or graphql-http (graphql-js 16 or 17).`}):(0,F.jsx)(U,{title:f?`No jobs in this window`:`No requests in this window`,children:f?`Wrap processors with obzerver.bullmq(), obzerver.job() or obzerver.cron().`:`Send some traffic to an instrumented app.`}),cols:[{key:`name`,label:f?`Job`:g?`Operation`:`Route`,sort:e=>e.name,render:e=>(0,F.jsx)(`div`,{className:`min-w-0`,children:(0,F.jsx)(Ua,{name:e.name})})},{key:`service`,label:`Application`,sort:e=>e.service,render:e=>(0,F.jsx)(`span`,{className:`text-ink2`,children:e.service})},...f?[{key:`queue`,label:`Queue`,sort:e=>e.queue||``,render:e=>(0,F.jsx)(`span`,{className:`pill`,children:e.queue||`default`})}]:[],{key:`spark`,label:`Volume`,render:e=>(0,F.jsx)(Ba,{data:e.spark,color:XR[0],w:64,h:18})},{key:`calls`,label:f?`Runs`:`Calls`,num:!0,sort:e=>e.calls,render:e=>B(e.calls)},{key:`rpm`,label:`Per min`,num:!0,sort:e=>e.rpm,render:e=>B(e.rpm)},{key:`avg`,label:`Avg`,num:!0,sort:e=>e.avg,render:e=>z(e.avg)},{key:`p95`,label:`p95`,num:!0,sort:e=>e.p95,render:e=>z(e.p95)},...f?[{key:`qw`,label:`Wait p95`,num:!0,sort:e=>e.queueWaitP95||0,render:e=>(0,F.jsx)(`span`,{style:{color:e.queueWaitP95>1e3?ZR.serious:void 0},children:z(e.queueWaitP95)})}]:[],{key:`fail`,label:`Failure`,num:!0,sort:e=>e.failureRate,render:e=>(0,F.jsx)(`span`,{style:{color:e.failureRate>=5?`#ff7070`:e.failureRate>1?`#ffb38a`:e.failureRate>0?`var(--color-ink2)`:`var(--color-mute)`},children:Sa(e.failureRate)})},{key:`time`,label:`Total time`,num:!0,sort:e=>e.totalTime,render:e=>(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`inline-block min-w-[52px]`,children:z(e.totalTime)}),(0,F.jsx)(Za,{value:e.totalTime,max:ne,w:50})]})},{key:`last`,label:`Last`,num:!0,sort:e=>e.lastSeen,render:e=>(0,F.jsx)(`span`,{className:`text-mute`,children:(0,F.jsx)(ro,{ts:e.lastSeen})})}]},c):(0,F.jsx)(H,{})})]})]})}function $z({q:e,setQ:t,ops:n,label:r,onPick:i}){let[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(-1),l=e.trim().toLowerCase(),u=l?n.filter(e=>e.name.toLowerCase().includes(l)||e.service.toLowerCase().includes(l)).sort((e,t)=>t.calls-e.calls).slice(0,8):[],d=a&&u.length>0,f=e=>{let t=e.toLowerCase().indexOf(l);return!l||t<0?e:(0,F.jsxs)(F.Fragment,{children:[e.slice(0,t),(0,F.jsx)(`mark`,{className:`bg-transparent text-brand`,children:e.slice(t,t+l.length)}),e.slice(t+l.length)]})},p=e=>{o(!1),c(-1),i(e)};return(0,F.jsxs)(`div`,{className:`relative`,children:[(0,F.jsx)(Ei,{size:13,className:`absolute left-2.5 top-1/2 -translate-y-1/2 text-mute`}),(0,F.jsx)(`input`,{className:`input pl-8 w-[240px] h-7`,placeholder:`Filter…`,value:e,role:`combobox`,"aria-expanded":d,"aria-controls":`route-suggestions`,"aria-autocomplete":`list`,"aria-activedescendant":d&&s>=0?`route-suggestion-${s}`:void 0,onChange:e=>{t(e.target.value),o(!0),c(-1)},onFocus:()=>o(!0),onBlur:()=>setTimeout(()=>o(!1),120),onKeyDown:e=>{e.key===`Escape`?o(!1):d?e.key===`ArrowDown`?(c((s+1)%u.length),e.preventDefault()):e.key===`ArrowUp`?(c(s<=0?u.length-1:s-1),e.preventDefault()):e.key===`Enter`&&s>=0&&(p(u[s]),e.preventDefault()):e.key===`ArrowDown`&&u.length&&(o(!0),c(0),e.preventDefault())}}),d&&(0,F.jsx)(`ul`,{id:`route-suggestions`,role:`listbox`,"aria-label":`Matching ${r}`,className:`absolute right-0 top-[calc(100%+4px)] z-30 w-[420px] max-w-[80vw] rounded-lg border border-line2 bg-panel2 shadow-xl py-1 text-[12.5px]`,children:u.map((e,t)=>(0,F.jsxs)(`li`,{id:`route-suggestion-${t}`,role:`option`,"aria-selected":t===s,className:`flex items-center gap-3 px-3 h-8 cursor-pointer ${t===s?`bg-[#22222d]`:`hover:bg-[#1b1b25]`}`,onMouseDown:t=>{t.preventDefault(),p(e)},onMouseEnter:()=>c(t),children:[(0,F.jsx)(`div`,{className:`min-w-0 flex-1 truncate`,children:(0,F.jsx)(Ua,{name:e.name,render:f})}),(0,F.jsx)(`span`,{className:`text-mute shrink-0`,children:f(e.service)}),(0,F.jsx)(`span`,{className:`text-mute tabular-nums shrink-0 w-[64px] text-right`,children:B(e.calls)})]},e.service+e.name))})]})}function eB({label:e,unit:t,min:n,max:r,onChange:i}){let a=(t,a)=>(0,F.jsx)(`input`,{className:`input h-7 w-[76px] mono text-[12px] px-2`,type:`number`,min:0,inputMode:`numeric`,placeholder:a===`min`?`min`:`max`,"aria-label":`${e} ${a}`,value:t??``,onChange:e=>a===`min`?i(e.target.value||null,r==null?null:String(r)):i(n==null?null:String(n),e.target.value||null)});return(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,F.jsx)(`span`,{className:`text-mute mr-0.5`,children:e}),(0,F.jsx)(`span`,{className:`text-mute`,children:`≥`}),a(n,`min`),(0,F.jsx)(`span`,{className:`text-mute`,children:`≤`}),a(r,`max`),t&&(0,F.jsx)(`span`,{className:`text-mute`,children:t})]})}var tB={request:{color:`#3987e5`,label:`Request`,Icon:Oi},job:{color:`#3987e5`,label:`Job`,Icon:Gi},middleware:{color:`#9085e9`,label:`Middleware`,Icon:Qr},handler:{color:`#199e70`,label:`Handler`,Icon:qi},function:{color:`#d55181`,label:`Function`,Icon:_r},custom:{color:`#c98500`,label:`Custom span`,Icon:Lr},db:{color:`#d95926`,label:`Database`,Icon:Br},http:{color:`#e66767`,label:`Outbound HTTP`,Icon:Kr},graphql:{color:`#e86fc4`,label:`GraphQL operation`,Icon:yr},resolver:{color:`#b48af0`,label:`Resolver`,Icon:ui}},nB=/\b(SELECT|FROM|WHERE|AND|OR|ORDER BY|GROUP BY|HAVING|LIMIT|OFFSET|INSERT INTO|VALUES|UPDATE|SET|DELETE FROM|LEFT JOIN|RIGHT JOIN|INNER JOIN|JOIN|ON|RETURNING|UNION)\b/g;function rB({text:e}){let t=e.replace(nB,`
110
- $1`).trim().split(`
111
- `);return(0,F.jsx)(`div`,{className:`code !whitespace-pre-wrap`,children:t.map((e,t)=>{let n=/^(SELECT|FROM|WHERE|AND|OR|ORDER BY|GROUP BY|HAVING|LIMIT|OFFSET|INSERT INTO|VALUES|UPDATE|SET|DELETE FROM|LEFT JOIN|RIGHT JOIN|INNER JOIN|JOIN|ON|RETURNING|UNION)\b(.*)$/.exec(e),r=n?n[1]:``,i=n?n[2]:e,a=[`AND`,`OR`,`ON`].includes(r)?` `:``;return(0,F.jsxs)(`div`,{children:[a,r&&(0,F.jsx)(`span`,{style:{color:`#ff6b9d`},children:r}),i.split(/(\?)/).map((e,t)=>e===`?`?(0,F.jsx)(`span`,{className:`px-[3px] rounded`,style:{background:`rgba(201,133,0,.25)`,color:`#ffc85a`},children:`?`},t):(0,F.jsx)(v.Fragment,{children:e},t))]},t)})})}function iB(e){let t=new Map;for(let n of e){let e=n.parentId??null;t.has(e)||t.set(e,[]),t.get(e).push(n)}for(let e of t.values())e.sort((e,t)=>e.start-t.start);let n=[],r=(e,i)=>{for(let a of t.get(e)||[])n.push({s:a,depth:i,hasKids:(t.get(a.id)||[]).length>0}),r(a.id,i+1)};return r(null,0),n}function aB({spans:e,logs:t=[],highlightSelf:n=!0}){let r=(0,v.useMemo)(()=>iB(e),[e]),i=Math.max(1,...e.map(e=>e.start+e.duration)),[a,o]=(0,v.useState)(new Set),[s,c]=(0,v.useState)(null),l=new Set(e.map(e=>e.service).filter(Boolean)).size>1,u=Math.max(...e.filter(e=>!e.root).map(e=>e.self),0),d=new Set,f=r.filter(({s:e})=>e.parentId&&(d.has(e.parentId)||a.has(e.parentId))?(d.add(e.id),!1):!0),p=[0,.25,.5,.75,1],m=[...new Set(e.map(e=>e.kind))].filter(e=>tB[e]);return(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex flex-wrap gap-x-3 gap-y-1 text-[11.5px] text-ink2 mb-2 px-1`,children:[m.map(e=>(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(`span`,{className:`w-2.5 h-2.5 rounded-sm`,style:{background:tB[e].color}}),tB[e].label]},e)),(0,F.jsx)(`span`,{className:`ml-auto text-mute`,children:`Bar = total time · bright segment = self time`})]}),(0,F.jsxs)(`div`,{className:`grid text-[12px]`,style:{gridTemplateColumns:`minmax(260px, 38%) 1fr 72px 72px`},children:[(0,F.jsx)(`div`,{className:`text-mute text-[10.5px] uppercase tracking-wider px-2 py-1.5 border-b border-line`,children:`Span`}),(0,F.jsxs)(`div`,{className:`relative border-b border-line`,children:[p.map(e=>(0,F.jsx)(`span`,{className:`absolute top-1.5 text-[10px] text-mute -translate-x-1/2`,style:{left:`${e*100}%`,transform:e===1?`translateX(-100%)`:e===0?`none`:void 0},children:z(i*e)},e)),t.map((e,t)=>(0,F.jsx)(`span`,{title:`${e.level.toUpperCase()} ${e.message}`,className:`absolute bottom-0 w-[2px] h-2 rounded`,style:{left:`${Math.min(100,Math.max(0,(e.offset??0)/i)*100)}%`,background:e.level===`error`?`#d03b3b`:e.level===`warn`?`#fab219`:`#82829a`}},t))]}),(0,F.jsx)(`div`,{className:`text-mute text-[10.5px] uppercase tracking-wider px-2 py-1.5 border-b border-line text-right`,children:`Total`}),(0,F.jsx)(`div`,{className:`text-mute text-[10.5px] uppercase tracking-wider px-2 py-1.5 border-b border-line text-right`,children:`Self`}),f.map(({s:e,depth:t,hasKids:r})=>{let d=tB[e.kind]||tB.function,f=e.start/i*100,m=Math.max(.3,e.duration/i*100),h=e.duration?Math.max(0,Math.min(1,e.self/e.duration)):0,g=n&&!e.root&&e.self===u&&u>0,_=s===e.id;return(0,F.jsxs)(v.Fragment,{children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1 px-2 py-[5px] border-b border-[#1c1c25] cursor-pointer min-w-0 ${_?`bg-[#1a1a24]`:`hover:bg-[#16161e]`}`,style:{paddingLeft:8+t*14},onClick:()=>c(_?null:e.id),children:[r?(0,F.jsx)(`button`,{className:`text-mute hover:text-ink shrink-0`,onClick:t=>{t.stopPropagation();let n=new Set(a);n.has(e.id)?n.delete(e.id):n.add(e.id),o(n)},children:a.has(e.id)?(0,F.jsx)(Or,{size:13}):(0,F.jsx)(Er,{size:13})}):(0,F.jsx)(`span`,{className:`w-[13px] shrink-0`}),(0,F.jsx)(d.Icon,{size:12,style:{color:d.color},className:`shrink-0`}),(0,F.jsx)(`span`,{className:`truncate ${e.kind===`db`?`mono text-[11.5px]`:``}`,title:e.name,children:e.name}),e.count&&e.count>1&&(0,F.jsxs)(`span`,{className:`pill !text-[10px] !py-0`,style:{color:`#ffc85a`,borderColor:`#5a4512`},children:[`×`,e.count]}),l&&e.root&&e.service&&(0,F.jsx)(`span`,{className:`pill !text-[10px] !py-0`,children:e.service}),e.error&&(0,F.jsx)(Vi,{size:12,className:`shrink-0`,style:{color:`#ff7070`}}),g&&(0,F.jsx)(`span`,{className:`pill !text-[10px] !py-0`,style:{color:`#ffb38a`,borderColor:`#5a3322`},children:`most self time`})]}),(0,F.jsxs)(`div`,{className:`relative border-b border-[#1c1c25] cursor-pointer`,onClick:()=>c(_?null:e.id),children:[p.slice(1,-1).map(e=>(0,F.jsx)(`span`,{className:`absolute top-0 bottom-0 w-px bg-[#1c1c26]`,style:{left:`${e*100}%`}},e)),(0,F.jsx)(`div`,{className:`absolute top-1/2 -translate-y-1/2 h-[12px] rounded-[3px] overflow-hidden flex`,style:{left:`${f}%`,width:`${m}%`,background:`color-mix(in srgb, ${d.color} 32%, transparent)`,outline:e.error?`1.5px solid #ff5a5a`:void 0},children:(0,F.jsx)(`div`,{className:`h-full ml-auto`,style:{width:`${h*100}%`,background:d.color}})})]}),(0,F.jsx)(`div`,{className:`num px-2 py-[5px] border-b border-[#1c1c25] tabular-nums`,children:z(e.duration)}),(0,F.jsx)(`div`,{className:`num px-2 py-[5px] border-b border-[#1c1c25] tabular-nums`,style:{color:g?`#ffb38a`:`var(--color-ink2)`},children:z(e.self)}),_&&(0,F.jsx)(`div`,{className:`col-span-4 bg-[#111118] border-b border-line px-4 py-3`,style:{paddingLeft:24+t*14},children:(0,F.jsx)(oB,{s:e})})]},e.id)})]})]})}function oB({s:e}){let t=e.attrs||{},n=Object.entries(t).filter(([e])=>![`statement`,`system`,`url`,`collapsed`,`totalMs`].includes(e));return(0,F.jsxs)(`div`,{className:`flex flex-col gap-2.5 text-[12px]`,children:[(0,F.jsxs)(`div`,{className:`flex flex-wrap gap-x-5 gap-y-1 text-ink2`,children:[(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`span`,{className:`text-mute`,children:`Kind`}),` `,tB[e.kind]?.label||e.kind]}),(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`span`,{className:`text-mute`,children:`Starts at`}),` +`,z(e.start)]}),(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`span`,{className:`text-mute`,children:`Total`}),` `,z(e.duration)]}),(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`span`,{className:`text-mute`,children:`Self`}),` `,z(e.self)]}),e.count&&e.count>1&&(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`span`,{className:`text-mute`,children:`Repeated`}),` `,e.count,`× (collapsed; `,z(t.totalMs),` combined)`]}),t.system&&(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`span`,{className:`text-mute`,children:`System`}),` `,t.system]}),e.service&&(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`span`,{className:`text-mute`,children:`Service`}),` `,e.service]})]}),e.error&&(0,F.jsxs)(`div`,{className:`text-[#ff9b9b] flex items-center gap-1.5`,children:[(0,F.jsx)(Vi,{size:13}),e.error]}),t.statement&&t.system!==`redis`&&(0,F.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,F.jsx)(`span`,{className:`text-mute`,children:`Statement (values removed before sending)`}),(0,F.jsx)(Wa,{text:t.statement,className:`btn h-6 text-[11px]`})]}),(0,F.jsx)(rB,{text:t.statement})]}),t.url&&(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{className:`text-mute`,children:`URL`}),` `,(0,F.jsxs)(`span`,{className:`mono`,children:[t.method,` `,t.url]}),t.status&&(0,F.jsx)(`span`,{className:`ml-2 mono`,style:{color:t.status>=500?`#ff7070`:`#5fd38a`},children:t.status})]}),n.length>0&&(0,F.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:n.map(([e,t])=>(0,F.jsxs)(`span`,{className:`pill mono !text-[11px]`,children:[(0,F.jsx)(`span`,{className:`text-mute`,children:e}),`\xA0`,typeof t==`object`?JSON.stringify(t):String(t)]},e))})]})}function sB(){let{kind:e=`http`,service:t=``,name:n=``}=yt(),r=I(),i=L(),a=ht(),[o,s]=(0,v.useState)(`recent`),[c,l]=(0,v.useState)(`all`),[u,d]=(0,v.useState)(0),{data:f,error:p}=P(`/api/operation${r.q({kind:e,name:n,service:t,sort:o,filter:c,limit:50,offset:u*50})}`,[r.tick]),m=e===`job`;if(p)return(0,F.jsx)(Ra,{error:p});if(!f)return(0,F.jsx)(H,{});let h=f.stats,g=rz(f.series.points,f.band),_=iz(f.band),y=(r.meta?.versions||[]).filter(e=>e.service===t&&e.first>r.from&&e.first<r.to).map(e=>({t:e.first,label:e.version})),b=[..._?[_.p95]:[],{key:`p95`,label:`p95`,color:XR[1],type:`line`},{key:`avg`,label:`Average`,color:XR[0],type:`line`},{key:`p50`,label:`Median`,color:XR[2],type:`line`,dashed:!0}],x=[{key:`count`,label:m?`Runs`:`Calls`,color:XR[0],type:`area`},{key:`failed`,label:`Failed`,color:ZR.crit,type:`line`},..._?[_.calls]:[]],S=Math.max(1,...f.breakdown.map(e=>e.avgSelf)),C=Object.entries(f.statuses).sort((e,t)=>t[1]-e[1]);return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsxs)(Nn,{to:i(m?`/jobs`:`/requests`),className:`text-mute hover:text-ink text-[12px] inline-flex items-center gap-1 -mb-2`,children:[(0,F.jsx)(Dr,{size:13}),m?`Jobs`:`Requests`]}),(0,F.jsx)(Ia,{title:(0,F.jsx)(Ua,{name:n}),sub:(0,F.jsxs)(`span`,{children:[t,` · `,m?`background job`:`HTTP route`]})}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 @3xl:grid-cols-6 gap-3`,children:[(0,F.jsx)(za,{label:m?`Runs`:`Calls`,value:B(h.calls),sub:`${B(h.rpm)} per min`,spark:g.map(e=>e.count)}),(0,F.jsx)(za,{label:`Failure rate`,value:Sa(h.failureRate),sub:`${B(h.failed)} failed`,color:h.failureRate>1?`#ff8a8a`:void 0}),(0,F.jsx)(za,{label:`Average`,value:z(h.avg)}),(0,F.jsx)(za,{label:`p50`,value:z(h.p50)}),(0,F.jsx)(za,{label:`p95`,value:z(h.p95),sub:`p99 ${z(h.p99)}`}),(0,F.jsx)(za,{label:`Max`,value:z(h.max)})]}),f.fromHistory&&(0,F.jsx)(Zz,{note:f.fromHistory.note}),(0,F.jsx)(cB,{usual:f.usual,current:h,windowMin:(r.to-r.from)/6e4}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-2 gap-3`,children:[(0,F.jsx)(tz,{title:m?`Runs`:`Throughput`,series:x,children:(0,F.jsx)(ez,{data:g,series:x,fmt:e=>B(e),markers:y})}),(0,F.jsx)(tz,{title:`Latency`,sub:`is it constant or spiky? did it start at a deploy?`,series:b,children:(0,F.jsx)(ez,{data:g,series:b,fmt:e=>z(e),markers:y})})]}),m&&(0,F.jsx)(tz,{title:`Queue wait`,sub:`time from enqueue to start`,series:[{key:`queueWaitP95`,label:`p95`,color:XR[6]},{key:`queueWaitAvg`,label:`Average`,color:XR[0]}],children:(0,F.jsx)(ez,{data:g,height:140,series:[{key:`queueWaitP95`,label:`p95`,color:XR[6],type:`line`},{key:`queueWaitAvg`,label:`Average`,color:XR[0],type:`line`}],fmt:e=>z(e)})}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-3 gap-3`,children:[(0,F.jsx)(V,{title:`Where the time goes`,sub:`own time per span, averaged per execution`,pad:!1,className:`@5xl:col-span-2`,children:(0,F.jsx)(Ka,{rows:f.breakdown,empty:(0,F.jsx)(U,{title:`No span detail yet`,children:`Spans are kept for sampled, failed and slow executions.`}),cols:[{key:`n`,label:`Span`,render:e=>{let t=tB[e.kind]||tB.function;return(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2 min-w-0`,children:[(0,F.jsx)(t.Icon,{size:12,style:{color:t.color}}),(0,F.jsx)(`span`,{className:`truncate ${e.kind===`db`?`mono text-[11.5px]`:``}`,children:e.name})]})}},{key:`k`,label:`Kind`,render:e=>(0,F.jsx)(`span`,{className:`text-mute`,children:tB[e.kind]?.label||e.kind})},{key:`per`,label:`Calls / exec`,num:!0,render:e=>(0,F.jsx)(`span`,{style:{color:e.perExec>=10?ZR.serious:void 0},children:B(e.perExec)})},{key:`self`,label:`Self / exec`,num:!0,render:e=>(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`inline-block min-w-[52px]`,children:z(e.avgSelf)}),(0,F.jsx)(Za,{value:e.avgSelf,max:S,color:XR[1],w:60})]})}]})}),(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)(V,{title:`Latency distribution`,children:(0,F.jsx)(nz,{data:f.histogram,highlight:e=>h.p95!=null&&e.le>=h.p95})}),(0,F.jsx)(V,{title:m?`Outcomes`:`Status codes`,children:(0,F.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:C.map(([e,t])=>(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(Va,{status:e===`none`?null:Number(e)}),(0,F.jsx)(`span`,{className:`tabular-nums text-ink2`,children:B(t)})]},e))})})]})]}),f.errors.length>0&&(0,F.jsx)(V,{title:`Errors on this operation`,pad:!1,children:(0,F.jsx)(Ka,{rows:f.errors,onRow:e=>a(i(`/errors/${e.fingerprint}`)),cols:[{key:`c`,label:`Error`,render:e=>(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`span`,{className:`font-medium`,style:{color:e.handled?`var(--color-ink)`:`#ff9b9b`},children:e.class}),` `,(0,F.jsx)(`span`,{className:`text-mute`,children:e.message})]})},{key:`h`,label:`Type`,render:e=>e.handled?(0,F.jsx)(W,{kind:`neutral`,children:`handled`}):(0,F.jsx)(W,{kind:`crit`,children:`unhandled`})},{key:`n`,label:`Count`,num:!0,render:e=>B(e.n)}]})}),(0,F.jsx)(V,{pad:!1,title:`Executions`,sub:`${B(f.total)} matching`,right:(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(Ga,{value:c,onChange:e=>{l(e),d(0)},options:[{id:`all`,label:`All`},{id:`failed`,label:`Failed`},{id:`slow`,label:`≥ p95`}]}),(0,F.jsx)(Ga,{value:o,onChange:e=>{s(e),d(0)},options:[{id:`recent`,label:`Recent`},{id:`slowest`,label:`Slowest`}]})]}),children:(0,F.jsxs)(`div`,{className:`pt-2`,children:[(0,F.jsx)(Ka,{rows:f.executions,onRow:e=>a(i(`/executions/${e.id}`)),empty:(0,F.jsx)(U,{title:`No executions match`}),cols:[{key:`ts`,label:`Time`,render:e=>(0,F.jsxs)(`span`,{className:`tabular-nums`,children:[Ea(e.ts,r.rangeMs>864e5),(0,F.jsx)(`span`,{className:`text-mute ml-2 text-[11px]`,children:(0,F.jsx)(ro,{ts:e.ts})})]})},{key:`st`,label:`Status`,render:e=>(0,F.jsx)(Va,{status:e.status})},{key:`d`,label:`Duration`,num:!0,render:e=>(0,F.jsx)(`span`,{style:{color:h.p95&&e.duration>=h.p95?`#ffb38a`:void 0},children:z(e.duration)})},...m?[{key:`qw`,label:`Queue wait`,num:!0,render:e=>z(e.queue_wait)},{key:`at`,label:`Attempt`,num:!0,render:e=>e.attempt??`—`}]:[],{key:`u`,label:`User`,render:e=>e.user_id?(0,F.jsx)(Nn,{className:`link`,onClick:e=>e.stopPropagation(),to:i(`/users/${ka(e.user_id)}`),children:e.user_id}):(0,F.jsx)(`span`,{className:`text-mute`,children:`—`})},{key:`v`,label:`Release`,render:e=>(0,F.jsx)(`span`,{className:`mono text-[11.5px] text-ink2`,children:e.version||`—`})},{key:`err`,label:`Error`,render:e=>e.error_class?(0,F.jsxs)(`span`,{className:`truncate inline-block max-w-[320px] align-middle`,children:[(0,F.jsx)(`span`,{className:`text-[#ff9b9b]`,children:e.error_class}),` `,(0,F.jsx)(`span`,{className:`text-mute`,children:e.error_message})]}):(0,F.jsx)(`span`,{className:`text-mute`,children:`—`})}]}),f.total>50&&(0,F.jsxs)(`div`,{className:`flex items-center justify-end gap-2 px-3 py-2 border-t border-line text-mute`,children:[(0,F.jsxs)(`span`,{children:[u*50+1,`–`,Math.min(f.total,(u+1)*50),` of `,B(f.total)]}),(0,F.jsx)(`button`,{className:`btn h-7`,disabled:u===0,onClick:()=>d(u-1),children:`Prev`}),(0,F.jsx)(`button`,{className:`btn h-7`,disabled:(u+1)*50>=f.total,onClick:()=>d(u+1),children:`Next`})]})]})})]})}function cB({usual:e,current:t,windowMin:n}){let r=e?.thisHour,i=e?.last4Weeks;if(!r?.basis&&!i)return null;let a=(e,t)=>e==null||!t?null:e>t.high?`above`:e<t.low?`below`:null,o=n<=120&&t.calls>=20,s=o?a(t.p95,r?.p95):null,c=o?a(t.failureRate,r?.failureRate):null;return(0,F.jsxs)(`div`,{className:`card px-4 py-2.5 flex flex-wrap items-center gap-x-6 gap-y-1.5 text-[12.5px]`,children:[(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(Jr,{size:14,className:`text-brand`}),(0,F.jsx)(`b`,{className:`font-medium`,children:`Usual`})]}),r?.basis?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`span`,{className:`text-ink2`,children:[`this hour: p95 `,(0,F.jsx)(`b`,{className:`text-ink tabular-nums`,children:z(r.p95?.expected)}),` `,(0,F.jsxs)(`span`,{className:`text-mute`,children:[`(normal `,z(r.p95?.low),`–`,z(r.p95?.high),`)`]})]}),(0,F.jsxs)(`span`,{className:`text-ink2`,children:[`failures `,(0,F.jsx)(`b`,{className:`text-ink tabular-nums`,children:Sa(r.failureRate?.expected??0)})]}),(0,F.jsxs)(`span`,{className:`text-ink2`,children:[(0,F.jsx)(`b`,{className:`text-ink tabular-nums`,children:B(Math.round(r.callsPerHour?.expected??0))}),` calls/hour`]}),(s||c)&&(0,F.jsx)(W,{kind:`serious`,children:[s&&`p95 ${s} normal`,c&&`failures ${c} normal`].filter(Boolean).join(` · `)})]}):(0,F.jsx)(`span`,{className:`text-mute`,children:r?.description}),i&&(0,F.jsxs)(`span`,{className:`text-ink2`,children:[`last `,Math.round(i.days),` days: p50 `,(0,F.jsx)(`b`,{className:`text-ink tabular-nums`,children:z(i.p50)}),` · p95 `,(0,F.jsx)(`b`,{className:`text-ink tabular-nums`,children:z(i.p95)}),i.lastWeekVsBeforeP95Pct!=null&&Math.abs(i.lastWeekVsBeforeP95Pct)>=10&&(0,F.jsxs)(`span`,{className:`text-mute`,children:[` · last week p95 `,i.lastWeekVsBeforeP95Pct>0?`+`:``,i.lastWeekVsBeforeP95Pct,`%`]})]}),r?.basis&&(0,F.jsx)(`span`,{className:`text-mute ml-auto text-[11.5px]`,children:r.description})]})}function lB({frames:e,stack:t}){let[n,r]=(0,v.useState)(!1),[i,a]=(0,v.useState)(!1),o=n?e:e.filter(e=>e.inApp),s=o.length?o:e.slice(0,5);return i&&t?(0,F.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,F.jsx)(`div`,{className:`flex justify-end`,children:(0,F.jsx)(`button`,{className:`btn h-6 text-[11px]`,onClick:()=>a(!1),children:`Frames`})}),(0,F.jsx)(`div`,{className:`code text-[11.5px]`,children:t})]}):(0,F.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,F.jsxs)(`label`,{className:`flex items-center gap-1.5 text-[11.5px] text-mute cursor-pointer`,children:[(0,F.jsx)(`input`,{type:`checkbox`,checked:n,onChange:e=>r(e.target.checked)}),` show library frames`]}),t&&(0,F.jsx)(`button`,{className:`btn h-6 text-[11px]`,onClick:()=>a(!0),children:`Raw`})]}),s.map((e,t)=>(0,F.jsx)(uB,{f:e,open:t===0&&!!e.context},t)),!s.length&&(0,F.jsx)(`div`,{className:`text-mute`,children:`No stack frames captured.`})]})}function uB({f:e,open:t}){let[n,r]=(0,v.useState)(t);return(0,F.jsxs)(`div`,{className:`rounded-lg border ${e.inApp?`border-line2`:`border-line opacity-70`} overflow-hidden`,children:[(0,F.jsxs)(`button`,{className:`w-full flex items-center gap-2 px-3 py-1.5 text-left bg-[#15151d] hover:bg-[#191922]`,onClick:()=>r(!n),disabled:!e.context,children:[e.context?n?(0,F.jsx)(Er,{size:13}):(0,F.jsx)(Or,{size:13}):(0,F.jsx)(`span`,{className:`w-[13px]`}),(0,F.jsx)(`span`,{className:`mono text-[12px] font-medium`,children:e.fn}),(0,F.jsxs)(`span`,{className:`mono text-[11.5px] text-mute truncate`,children:[e.rel,`:`,e.line,`:`,e.col]}),e.inApp&&(0,F.jsx)(`span`,{className:`pill !text-[10px] !py-0 ml-auto`,children:`in app`})]}),n&&e.context&&(0,F.jsx)(`div`,{className:`mono text-[12px] bg-[#0b0b0f] py-1.5 overflow-x-auto`,children:e.context.lines.map((t,n)=>{let r=e.context.start+n,i=r===e.line;return(0,F.jsxs)(`div`,{className:`flex whitespace-pre`,style:i?{background:`rgba(208,59,59,.16)`,boxShadow:`inset 2px 0 0 #d03b3b`}:void 0,children:[(0,F.jsx)(`span`,{className:`w-12 text-right pr-3 text-mute select-none shrink-0`,children:r}),(0,F.jsx)(`span`,{style:{color:i?`#ffd0d0`:`#c9c9d6`},children:t||` `})]},n)})})]})}var dB={error:ZR.crit,fatal:ZR.crit,warn:ZR.warn,info:`#5aa2f0`,debug:`#82829a`,trace:`#82829a`};function fB({l:e,offset:t,showService:n}){let r=L();return(0,F.jsxs)(`div`,{className:`flex gap-3 px-3.5 py-[5px] border-b border-[#1b1b23] hover:bg-[#16161e] text-[12px] items-start`,style:e.level===`error`||e.level===`fatal`?{background:`rgba(208,59,59,.05)`}:void 0,children:[(0,F.jsx)(`span`,{className:`mono text-mute shrink-0 text-[11.5px] tabular-nums`,children:t==null?Ea(e.ts):`+${z(Math.max(0,t))}`}),(0,F.jsx)(`span`,{className:`mono shrink-0 w-[42px] text-[11px] font-semibold uppercase`,style:{color:dB[e.level]||`#aaa`},children:e.level}),n&&(0,F.jsx)(`span`,{className:`text-ink2 shrink-0 w-[92px] truncate`,children:e.service}),e.logger&&(0,F.jsxs)(`span`,{className:`text-mute shrink-0 max-w-[120px] truncate`,children:[`[`,e.logger,`]`]}),(0,F.jsxs)(`span`,{className:`mono text-[12px] flex-1 min-w-0 whitespace-pre-wrap break-words text-[#d8d8e2]`,children:[e.message,e.attrs&&(0,F.jsxs)(`span`,{className:`text-mute`,children:[` `,JSON.stringify(e.attrs)]})]}),e.executionId&&t==null&&(0,F.jsx)(Nn,{to:r(`/executions/${e.executionId}`),className:`link shrink-0 text-[11.5px]`,children:`trace →`})]})}function pB(){let e=I(),[t,n]=zn(),[r,i]=(0,v.useState)(t.get(`q`)||``),[a,o]=(0,v.useState)([]),[s,c]=(0,v.useState)(!1),[l,u]=(0,v.useState)([]),d=e.q({q:t.get(`q`)||``,level:a.join(`,`),traceId:t.get(`traceId`)||``,limit:300}),{data:f,error:p}=P(`/api/logs${d}`,[e.tick]),m=(0,v.useRef)(0);(0,v.useEffect)(()=>{u([])},[d]),(0,v.useEffect)(()=>{f?.logs?.length&&(m.current=f.logs[0].ts)},[f]),(0,v.useEffect)(()=>{if(!s)return;let n=setInterval(async()=>{let n=await N(`/api/logs?from=${m.current+1||Date.now()-1e4}&to=${Date.now()}&q=${encodeURIComponent(t.get(`q`)||``)}&level=${a.join(`,`)}${e.service?`&service=${e.service}`:``}&limit=200`);n.logs.length&&(m.current=n.logs[0].ts,u(e=>[...n.logs,...e].slice(0,1e3)))},2e3);return()=>clearInterval(n)},[s,a,t,e.service]);let h=[...l,...f?.logs||[]],g=[{key:`error`,label:`Error`,color:ZR.crit,type:`bar`,stack:`l`},{key:`warn`,label:`Warn`,color:ZR.warn,type:`bar`,stack:`l`},{key:`info`,label:`Info`,color:`#3987e5`,type:`bar`,stack:`l`},{key:`debug`,label:`Debug`,color:`#4a4a5c`,type:`bar`,stack:`l`}],_=e=>o(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]);return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ia,{icon:(0,F.jsx)(Ti,{size:18,className:`text-brand`}),title:`Logs`,sub:`Every line is tied to the request or job that wrote it.`}),f&&(0,F.jsx)(tz,{title:`Volume by level`,series:g,children:(0,F.jsx)(ez,{data:f.series,series:g,height:120,fmt:e=>B(e)})}),(0,F.jsx)(V,{pad:!1,title:(0,F.jsxs)(`form`,{className:`flex items-center gap-2`,onSubmit:e=>{e.preventDefault();let i=new URLSearchParams(t);r?i.set(`q`,r):i.delete(`q`),n(i,{replace:!0})},children:[(0,F.jsxs)(`div`,{className:`relative`,children:[(0,F.jsx)(Ei,{size:13,className:`absolute left-2.5 top-1/2 -translate-y-1/2 text-mute`}),(0,F.jsx)(`input`,{className:`input pl-8 w-[320px] h-7`,placeholder:`Search messages… (Enter)`,value:r,onChange:e=>i(e.target.value)})]}),(0,F.jsx)(`div`,{className:`seg`,children:[`error`,`warn`,`info`,`debug`].map(e=>(0,F.jsxs)(`button`,{type:`button`,className:a.includes(e)?`on`:``,onClick:()=>_(e),children:[(0,F.jsx)(`span`,{style:{color:dB[e]},children:`●`}),` `,e]},e))}),t.get(`traceId`)&&(0,F.jsxs)(`span`,{className:`pill`,children:[`trace `,t.get(`traceId`).slice(0,8),`… `,(0,F.jsx)(`button`,{type:`button`,onClick:()=>{let e=new URLSearchParams(t);e.delete(`traceId`),n(e)},children:`✕`})]})]}),right:(0,F.jsxs)(`button`,{className:`btn h-7 ${s?`btn-primary`:``}`,onClick:()=>c(!s),children:[(0,F.jsx)(yi,{size:13}),s?`Tailing…`:`Live tail`]}),children:(0,F.jsx)(`div`,{className:`pt-2`,children:p?(0,F.jsx)(Ra,{error:p}):f?h.length===0?(0,F.jsx)(U,{title:`No logs in this window`,children:`Logs are forwarded from console, pino and obzerver.log() (forwardLogs is on by default).`}):(0,F.jsx)(`div`,{className:`max-h-[calc(100vh-380px)] min-h-[300px] overflow-auto`,children:h.map(e=>(0,F.jsx)(fB,{l:e,showService:!0},e.id))}):(0,F.jsx)(H,{})})})]})}function mB(){let{id:e}=yt(),t=L(),n=ht(),{data:r,error:i}=P(`/api/executions/${e}`,[e]),[a,o]=(0,v.useState)(!1);if(i)return(0,F.jsx)(Ra,{error:i});if(!r)return(0,F.jsx)(H,{});let s=r.execution,c=r.baseline,l=r.errors.find(e=>!e.handled)||r.errors[0],u=s.ts,d=Math.min(...r.waterfall.spans.filter(e=>e.executionId===s.id).map(e=>e.start)),f=r.logs.map(e=>({...e,offset:e.ts-u+(Number.isFinite(d)?d:0)})),p=r.host,m=p&&p.baseline&&(p.cpu>p.baseline.cpu*1.5&&p.cpu>40||p.elP99>p.baseline.elP99*2&&p.elP99>50);return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsxs)(Nn,{to:t(qz(s.kind,s.service,s.name)),className:`text-mute hover:text-ink text-[12px] -mb-2`,children:[`← `,s.name]}),(0,F.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,F.jsx)(`h1`,{className:`text-[19px] font-semibold tracking-tight`,children:(0,F.jsx)(Ua,{name:s.name})}),(0,F.jsx)(Va,{status:s.status}),s.failed?(0,F.jsx)(W,{kind:`crit`,children:`failed`}):s.status>=400?(0,F.jsx)(W,{kind:`warn`,children:`client error`}):(0,F.jsx)(W,{kind:`good`,children:`ok`})]}),(0,F.jsxs)(`div`,{className:`text-ink2 mt-1.5 flex flex-wrap gap-x-4 gap-y-1 text-[12.5px]`,children:[(0,F.jsx)(`span`,{children:Ea(s.ts,!0)}),(0,F.jsx)(`span`,{className:`font-medium text-ink`,children:z(s.duration)}),(0,F.jsxs)(`span`,{children:[s.service,s.version&&(0,F.jsxs)(`span`,{className:`mono text-mute`,children:[`@`,s.version]})]}),s.path&&s.kind===`http`&&(0,F.jsx)(`span`,{className:`mono text-mute`,children:s.graphql?`GraphQL ${s.path}`:`${s.method} ${s.path}`}),s.userId&&(0,F.jsx)(Nn,{className:`link`,to:t(`/users/${ka(s.userId)}`),children:s.userId}),(0,F.jsxs)(`span`,{className:`mono text-mute text-[11.5px]`,children:[`trace `,s.traceId]})]})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[(0,F.jsx)(Wa,{text:s.traceId,label:`Trace id`}),r.worthInvestigating&&(0,F.jsx)(Wa,{className:`btn btn-primary`,label:`Copy agent prompt`,text:async()=>(await N(`/api/executions/${s.id}/prompt`)).prompt}),r.issue?(0,F.jsxs)(`button`,{className:`btn`,onClick:()=>n(t(`/issues/${r.issue.id}`)),children:[(0,F.jsx)(Vr,{size:13}),`Issue #`,r.issue.id]}):(s.failed||l)&&(0,F.jsxs)(`button`,{className:`btn`,disabled:a,onClick:async()=>{o(!0);try{let e=await N(`/api/issues`,{method:`POST`,json:{title:l?`${l.class}: ${l.message.slice(0,100)}`:`${s.name} ${s.failed?`failed`:`slow`} (${z(s.duration)})`,severity:s.failed?`high`:`medium`,service:s.service,sourceType:l?`error`:`execution`,sourceRef:l?l.fingerprint:String(s.id),description:`From execution #${s.id} (trace ${s.traceId}) at ${new Date(s.ts).toISOString()}.`}});n(t(`/issues/${e.id}`))}finally{o(!1)}},children:[(0,F.jsx)(Fr,{size:13}),`Create issue`]})]})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @3xl:grid-cols-3 gap-3`,children:[(0,F.jsx)(V,{title:s.graphql?`Compared with this operation`:`Compared with this route`,children:c.samples?(0,F.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,F.jsx)(`div`,{className:`text-[15px]`,children:c.slowerThanPct>=50?(0,F.jsxs)(F.Fragment,{children:[`Slower than `,(0,F.jsxs)(`b`,{style:{color:c.slowerThanPct>=95?`#ffb38a`:void 0},children:[c.slowerThanPct,`%`]}),` of calls`]}):(0,F.jsxs)(F.Fragment,{children:[`Faster than `,(0,F.jsxs)(`b`,{children:[100-c.slowerThanPct,`%`]}),` of calls`]})}),(0,F.jsx)(Qa,{items:[[s.graphql?`Operation average`:`Route average`,z(c.avg)],[s.graphql?`Operation p95`:`Route p95`,z(c.p95)],[`Samples`,`${c.samples} in the surrounding 24h`],...r.usual?.p95?[[`Usual at this hour`,(0,F.jsxs)(`span`,{children:[`p95 `,z(r.usual.p95.expected),` `,(0,F.jsxs)(`span`,{className:`text-mute`,children:[`(normal up to `,z(r.usual.p95.high),`)`]}),r.usual.vsUsualP95>=2&&(0,F.jsxs)(`b`,{style:{color:`#ffb38a`},children:[` · `,r.usual.vsUsualP95,`× usual`]})]},`u`)]]:[]]}),r.usual&&(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px]`,children:[`Usual = `,r.usual.description,`.`]})]}):(0,F.jsx)(`span`,{className:`text-mute`,children:`Not enough history.`})}),(0,F.jsx)(V,{title:`Host at the time`,right:m?(0,F.jsx)(W,{kind:`serious`,children:`under pressure`}):p?(0,F.jsx)(W,{kind:`good`,children:`normal`}):null,children:p?(0,F.jsx)(Qa,{items:[[`Instance`,(0,F.jsx)(`span`,{className:`mono text-[11.5px]`,children:s.instance})],[`CPU`,(0,F.jsxs)(F.Fragment,{children:[p.cpu?.toFixed(0),`% `,(0,F.jsxs)(`span`,{className:`text-mute`,children:[`(hour avg `,p.baseline?.cpu?.toFixed(0),`%)`]})]})],[`Event loop p99`,(0,F.jsxs)(F.Fragment,{children:[z(p.elP99),` `,(0,F.jsxs)(`span`,{className:`text-mute`,children:[`(avg `,z(p.baseline?.elP99),`)`]})]})],[`Memory`,Ca(p.rss)]]}):(0,F.jsx)(`span`,{className:`text-mute`,children:`No runtime sample near this execution.`})}),(0,F.jsx)(V,{title:`Request`,children:(0,F.jsx)(Qa,{items:[[`Kind`,s.kind===`job`?`Job${s.queue?` · queue ${s.queue}`:``}`:s.graphql?`GraphQL ${s.graphql.type} over HTTP`:`HTTP`],...s.kind===`job`?[[`Queue wait`,z(s.queueWait)],[`Attempt`,s.attempt??1]]:[],[`Services in trace`,r.waterfall.services.join(`, `)],[`Spans`,s.sampled?String(r.waterfall.spans.length):`not sampled`],...s.tags?Object.entries(s.tags).map(([e,t])=>[e,String(t)]):[]]})})]}),s.graphql&&(0,F.jsx)(V,{title:`GraphQL operation`,sub:s.graphql.operation?`${s.graphql.type} ${s.graphql.operation}`:`anonymous ${s.graphql.type}`,right:s.graphql.errors?(0,F.jsxs)(W,{kind:`crit`,children:[s.graphql.errors,` resolver error`,s.graphql.errors===1?``:`s`]}):s.graphql.clientErrors?(0,F.jsxs)(W,{kind:`warn`,children:[s.graphql.clientErrors,` client error`,s.graphql.clientErrors===1?``:`s`]}):(0,F.jsx)(W,{kind:`good`,children:`no errors`}),children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)(Qa,{items:[[`Type`,s.graphql.type],[`Root fields`,s.graphql.fields.join(`, `)||`—`],[`HTTP status`,String(s.status??`—`)],...s.graphql.batch?[[`Operations in batch`,String(s.graphql.batch)]]:[]]}),s.graphql.errors>0&&s.status!==null&&s.status<400&&(0,F.jsxs)(`div`,{className:`text-[12.5px] text-ink2`,children:[`The server answered `,s.status,`, but a resolver threw, so this request counts as failed.`]}),s.graphql.document&&(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute text-[11px] uppercase tracking-wider mb-1`,children:`Query`}),(0,F.jsx)(`div`,{className:`code text-[11.5px] !whitespace-pre-wrap`,children:gB(s.graphql.document)})]})]})}),l&&(0,F.jsxs)(V,{title:(0,F.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(Vi,{size:14,style:{color:`#ff7070`}}),(0,F.jsx)(`span`,{className:`text-[#ff9b9b]`,children:l.class})]}),sub:l.handled?`handled`:`unhandled`,right:(0,F.jsx)(Nn,{className:`btn h-7`,to:t(`/errors/${l.fingerprint}`),children:`Error group`}),children:[(0,F.jsx)(`div`,{className:`mb-3 text-[13px]`,children:l.message}),(0,F.jsx)(lB,{frames:l.frames,stack:l.stack})]}),(0,F.jsx)(V,{title:`Waterfall`,sub:r.waterfall.services.length>1?`distributed across ${r.waterfall.services.length} services`:void 0,pad:!0,children:s.sampled||r.waterfall.services.length>1?(0,F.jsx)(aB,{spans:r.waterfall.spans,logs:f}):(0,F.jsx)(U,{title:`Span detail not kept`,icon:(0,F.jsx)(Wr,{size:20}),children:`This execution was not sampled. Failed, slow and sampled executions keep their full waterfall (tracesSampleRate).`})}),r.waterfall.executions.length>1&&(0,F.jsx)(V,{title:`Executions in this trace`,pad:!1,children:(0,F.jsx)(`div`,{className:`flex flex-col`,children:r.waterfall.executions.map(e=>(0,F.jsxs)(Nn,{to:t(`/executions/${e.id}`),className:`flex items-center gap-3 px-3.5 py-2 border-b border-[#1d1d26] last:border-0 hover:bg-[#181821] ${e.id===s.id?`bg-[#16161f]`:``}`,children:[(0,F.jsx)(`span`,{className:`w-28 text-ink2`,children:e.service}),(0,F.jsx)(Ua,{name:e.name}),(0,F.jsx)(`span`,{className:`ml-auto`,children:(0,F.jsx)(Va,{status:e.status})}),(0,F.jsx)(`span`,{className:`w-20 text-right tabular-nums`,children:z(e.duration)})]},e.id))})}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-3 gap-3`,children:[(0,F.jsx)(V,{title:`Logs`,sub:`${r.logs.length} line${r.logs.length===1?``:`s`} written during this trace`,pad:!1,className:s.capture?`@5xl:col-span-2`:`@5xl:col-span-3`,children:r.logs.length?(0,F.jsx)(`div`,{className:`max-h-[360px] overflow-auto`,children:f.map(e=>(0,F.jsx)(fB,{l:e,offset:e.offset},e.id))}):(0,F.jsx)(U,{title:`No logs for this trace`,children:`Logs written with console, pino (obzerver.pino()) or obzerver.log() inside the request are correlated automatically.`})}),s.capture&&(0,F.jsx)(V,{title:`Captured request`,sub:`kept because the request was ${s.capture.reason}`,children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[s.capture.headers&&(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute text-[11px] uppercase tracking-wider mb-1`,children:`Request headers`}),(0,F.jsx)(`div`,{className:`code text-[11.5px]`,children:Object.entries(s.capture.headers).map(([e,t])=>`${e}: ${t}`).join(`
112
- `)})]}),s.capture.query&&(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute text-[11px] uppercase tracking-wider mb-1`,children:`Query`}),(0,F.jsx)(`div`,{className:`code text-[11.5px]`,children:s.capture.query})]}),s.capture.body&&(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute text-[11px] uppercase tracking-wider mb-1`,children:`Request body`}),(0,F.jsx)(`div`,{className:`code text-[11.5px] !whitespace-pre-wrap`,children:hB(s.capture.body)})]}),(0,F.jsxs)(`div`,{className:`text-mute text-[11px] flex items-center gap-1`,children:[(0,F.jsx)(gr,{size:11}),`Redacted inside your process before sending.`]})]})})]})]})}function hB(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function gB(e){let t=``,n=0,r=0,i=()=>{t=t.trimEnd()+`
113
- `+` `.repeat(n)};for(let a=0;a<e.length;a++){let o=e[a];if(o===`(`&&r++,o===`)`&&(r=Math.max(0,r-1)),r)t+=o;else if(o===`{`)n++,t=t.trimEnd()+` {`,i();else if(o===`}`)n=Math.max(0,n-1),i(),t+=`}`;else if(/\s/.test(o)){let r=e.slice(a+1).trimStart()[0];!n&&t.endsWith(`}`)?t+=`
114
-
115
- `:n&&r&&r!==`{`&&r!==`}`&&r!==`(`&&r!==`:`&&!/[:,]$/.test(t.trimEnd())?i():!/\s$/.test(t)&&r!==`{`&&(t+=` `)}else t+=o}return t.replace(/[ \t]+\n/g,`
116
- `).trim()}function _B(){let e=I(),t=L(),n=ht(),[r,i]=zn(),[a,o]=(0,v.useState)(r.get(`q`)||``),[s,c]=(0,v.useState)(`all`),{data:l,error:u}=P(`/api/traces${e.q({q:r.get(`q`)||``,failed:s===`failed`?`1`:``,minDuration:s===`slow`?1e3:``,limit:200})}`,[e.tick,s]),d=(l||[]).filter(e=>s!==`distributed`||e.parts>1);return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ia,{icon:(0,F.jsx)(Gr,{size:18,className:`text-brand`}),title:`Traces`,sub:`Recent requests and jobs. Distributed traces follow the traceparent header across services.`}),(0,F.jsx)(V,{pad:!1,title:(0,F.jsxs)(`form`,{className:`flex items-center gap-2`,onSubmit:e=>{e.preventDefault();let t=new URLSearchParams(r);a?t.set(`q`,a):t.delete(`q`),i(t,{replace:!0})},children:[(0,F.jsxs)(`div`,{className:`relative`,children:[(0,F.jsx)(Ei,{size:13,className:`absolute left-2.5 top-1/2 -translate-y-1/2 text-mute`}),(0,F.jsx)(`input`,{className:`input pl-8 w-[360px] h-7`,placeholder:`Trace id, route, path, user id or error text`,value:a,onChange:e=>o(e.target.value)})]}),(0,F.jsx)(Ga,{value:s,onChange:c,options:[{id:`all`,label:`All`},{id:`failed`,label:`Failed`},{id:`slow`,label:`> 1s`},{id:`distributed`,label:`Multi-service`}]})]}),children:(0,F.jsx)(`div`,{className:`pt-2`,children:u?(0,F.jsx)(Ra,{error:u}):l?(0,F.jsx)(Ka,{rows:d,onRow:e=>n(t(`/executions/${e.id}`)),empty:(0,F.jsx)(U,{title:`No traces match`}),cols:[{key:`t`,label:`Time`,render:e=>(0,F.jsxs)(`span`,{className:`tabular-nums`,children:[Ea(e.ts),` `,(0,F.jsx)(`span`,{className:`text-mute text-[11px] ml-1`,children:(0,F.jsx)(ro,{ts:e.ts})})]})},{key:`n`,label:`Operation`,render:e=>(0,F.jsx)(Ua,{name:e.name})},{key:`s`,label:`Application`,render:e=>(0,F.jsx)(`span`,{className:`text-ink2`,children:e.service})},{key:`p`,label:`Apps`,num:!0,render:e=>e.parts>1?(0,F.jsx)(`span`,{className:`pill`,style:{color:`#9cc4ff`},children:e.parts}):(0,F.jsx)(`span`,{className:`text-mute`,children:`1`})},{key:`st`,label:`Status`,render:e=>(0,F.jsx)(Va,{status:e.status})},{key:`d`,label:`Duration`,num:!0,render:e=>z(e.duration)},{key:`u`,label:`User`,render:e=>(0,F.jsx)(`span`,{className:`text-ink2`,children:e.user_id||`—`})},{key:`id`,label:`Trace id`,render:e=>(0,F.jsxs)(`span`,{className:`mono text-mute text-[11px]`,children:[e.trace_id.slice(0,16),`…`]})}]}):(0,F.jsx)(H,{})})})]})}function vB(){let e=I(),t=L(),n=ht(),[r,i]=(0,v.useState)(`0`),[a,o]=(0,v.useState)(``),{data:s,error:c}=P(`/api/errors${e.q({handled:r,status:a})}`,[e.tick]);return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ia,{icon:(0,F.jsx)(br,{size:18,className:`text-brand`}),title:`Errors`,sub:`Grouped into defects by class and stack shape. Unhandled = 5xx or a thrown job/process error; a 4xx from your own code is your API working.`}),(0,F.jsx)(V,{pad:!1,title:(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(Ga,{value:r,onChange:i,options:[{id:`0`,label:`Unhandled`},{id:`1`,label:`Handled`},{id:`all`,label:`All`}]}),(0,F.jsx)(Ga,{value:a,onChange:o,options:[{id:``,label:`Any status`},{id:`open`,label:`Open`},{id:`resolved`,label:`Resolved`},{id:`ignored`,label:`Ignored`}]})]}),children:(0,F.jsx)(`div`,{className:`pt-2`,children:c?(0,F.jsx)(Ra,{error:c}):s?(0,F.jsx)(Ka,{rows:s,initialSort:`count`,onRow:e=>n(t(`/errors/${e.fingerprint}`)),rowKey:e=>e.fingerprint,empty:(0,F.jsx)(U,{title:`No errors in this window`,icon:(0,F.jsx)(`span`,{className:`text-[18px]`,children:`✓`}),children:`Nothing matched these filters.`}),cols:[{key:`e`,label:`Error`,sort:e=>e.class,render:e=>(0,F.jsxs)(`div`,{className:`min-w-0 max-w-[560px]`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`font-medium`,style:{color:e.handled?`var(--color-ink)`:`#ff9b9b`},children:e.class}),e.isNew&&(0,F.jsx)(W,{kind:`serious`,children:`new`}),e.status!==`open`&&(0,F.jsx)(W,{kind:e.status===`resolved`?`good`:`neutral`,children:e.status})]}),(0,F.jsx)(`div`,{className:`text-mute truncate text-[12px]`,children:e.message})]})},{key:`op`,label:`Where`,render:e=>(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(`div`,{className:`truncate max-w-[220px]`,children:e.operation?(0,F.jsx)(Ua,{name:e.operation}):`—`}),(0,F.jsx)(`div`,{className:`text-mute text-[11px]`,children:e.service})]})},{key:`trend`,label:`Trend`,render:e=>(0,F.jsx)(Ba,{data:e.spark,color:e.handled?`#82829a`:ZR.crit,w:80,h:20})},{key:`count`,label:`Events`,num:!0,sort:e=>e.count,render:e=>B(e.count)},{key:`users`,label:`Users`,num:!0,sort:e=>e.users,render:e=>B(e.users)},{key:`rel`,label:`Introduced`,render:e=>(0,F.jsx)(`span`,{className:`mono text-[11.5px] text-ink2`,children:e.firstVersion||`—`})},{key:`first`,label:`First seen`,num:!0,sort:e=>e.firstSeen,render:e=>(0,F.jsx)(`span`,{className:`text-mute`,children:(0,F.jsx)(ro,{ts:e.firstSeen})})},{key:`last`,label:`Last seen`,num:!0,sort:e=>e.lastSeen,render:e=>(0,F.jsx)(`span`,{className:`text-ink2`,children:(0,F.jsx)(ro,{ts:e.lastSeen})})}]}):(0,F.jsx)(H,{})})})]})}var yB=e=>new Date(e).toLocaleString(void 0,{year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1,timeZoneName:`short`});function bB(){let e=I(),t=L(),n=ht(),[r,i]=zn(),[a,o]=(0,v.useState)(`open`),{data:s,error:c,reload:l}=P(`/api/secrets${e.q({status:a})}`,[e.tick,a]),u=r.get(`fp`),d=P(u?`/api/secrets/${u}`:null,[u,e.tick]),f=e=>i(t=>{let n=new URLSearchParams(t);return e?n.set(`fp`,e):n.delete(`fp`),n},{replace:!0}),p=async(e,t)=>{await N(`/api/secrets/${e}`,{method:`POST`,json:{status:t}}),l(),d.reload()};return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ia,{icon:(0,F.jsx)(Ai,{size:18,style:{color:`#ff6b6b`}}),title:`Secrets in logs`,sub:`Passwords, tokens, API keys, private keys and card numbers that reached a log line or an error message. They are redacted before storage (the value is never kept); each row is a place in your code that logs one.`}),s&&s.open>0&&(0,F.jsxs)(`div`,{className:`rounded-xl border px-4 py-3 flex items-start gap-3`,style:{borderColor:`#6b2330`,background:`rgba(208,59,59,.10)`},children:[(0,F.jsx)(Ai,{size:18,className:`shrink-0 mt-0.5`,style:{color:`#ff6b6b`}}),(0,F.jsxs)(`div`,{className:`text-[13px] leading-relaxed`,children:[(0,F.jsxs)(`b`,{style:{color:`#ffb0b0`},children:[s.open,` place`,s.open===1?``:`s`,` in your code log`,s.open===1?`s`:``,` secrets.`]}),` `,(0,F.jsx)(`span`,{className:`text-ink2`,children:`Fix the log line, then mark it resolved. If a secret may have been exposed before it was redacted (other log sinks, stdout, a log shipper), rotate it.`})]})]}),u&&(0,F.jsx)(V,{title:d.data?(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(`span`,{style:{color:`#ff9b9b`},children:d.data.label}),(0,F.jsxs)(`span`,{className:`text-mute font-normal`,children:[`in `,d.data.source===`error`?`an error message`:`logs`]})]}):`Leak`,right:(0,F.jsx)(`button`,{className:`btn btn-ghost h-6`,onClick:()=>f(null),children:`Close`}),children:d.error?(0,F.jsx)(Ra,{error:d.error}):d.data?(0,F.jsxs)(`div`,{className:`flex flex-col gap-4 text-[12.5px]`,children:[(0,F.jsxs)(`div`,{className:`grid grid-cols-2 @lg:grid-cols-4 gap-4`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute`,children:`Where`}),(0,F.jsx)(`div`,{className:`font-medium`,children:d.data.service}),(0,F.jsx)(`div`,{className:`text-ink2`,children:d.data.operation?(0,F.jsx)(Ua,{name:d.data.operation}):`outside a request or job`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute`,children:`Logger`}),(0,F.jsx)(`div`,{className:`font-medium mono`,children:d.data.logger||`—`}),(0,F.jsx)(`div`,{className:`text-mute`,children:d.data.detectedBy===`sdk`?`Redacted by the SDK, in the process`:`Redacted by the server, before storage`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute`,children:`Seen`}),(0,F.jsxs)(`div`,{className:`font-medium`,children:[B(d.data.count),` times`]}),(0,F.jsxs)(`div`,{className:`text-ink2`,children:[`first `,(0,F.jsx)(ro,{ts:d.data.firstSeen}),d.data.firstVersion?` in ${d.data.firstVersion}`:``,` · last `,(0,F.jsx)(ro,{ts:d.data.lastSeen})]})]}),(0,F.jsxs)(`div`,{className:`flex flex-col items-start gap-1.5`,children:[(0,F.jsx)(`div`,{className:`text-mute`,children:`Status`}),(0,F.jsxs)(`div`,{className:`flex gap-1.5`,children:[d.data.status!==`resolved`&&(0,F.jsxs)(`button`,{className:`btn h-7`,onClick:()=>p(d.data.fingerprint,`resolved`),children:[(0,F.jsx)(ji,{size:13}),`Mark fixed`]}),d.data.status===`open`&&(0,F.jsx)(`button`,{className:`btn btn-ghost h-7`,onClick:()=>p(d.data.fingerprint,`ignored`),children:`Ignore`}),d.data.status!==`open`&&(0,F.jsx)(`button`,{className:`btn btn-ghost h-7`,onClick:()=>p(d.data.fingerprint,`open`),children:`Reopen`}),d.data.issueId&&(0,F.jsxs)(`button`,{className:`btn btn-ghost h-7`,onClick:()=>n(t(`/issues/${d.data.issueId}`)),children:[(0,F.jsx)(Vr,{size:12}),`Issue #`,d.data.issueId]})]})]})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute mb-1`,children:`Example, as stored`}),(0,F.jsx)(`pre`,{className:`mono text-[12px] whitespace-pre-wrap break-all rounded-md border border-line px-3 py-2`,style:{background:`#101016`},children:xB(d.data.sample||``)})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute mb-1`,children:`Recent occurrences`}),(0,F.jsx)(Ka,{rows:d.data.findings,rowKey:e=>`${e.ts}${e.traceId}`,onRow:e=>e.traceId&&n(t(`/traces/${e.traceId}`)),cols:[{key:`t`,label:`Time`,render:e=>(0,F.jsx)(no,{tip:yB(e.ts),children:Ea(e.ts,!0)})},{key:`v`,label:`Version`,render:e=>(0,F.jsx)(`span`,{className:`mono`,children:e.version||`—`})},{key:`i`,label:`Instance`,render:e=>(0,F.jsx)(`span`,{className:`mono text-ink2`,children:e.instance||`—`})},{key:`c`,label:`Count`,num:!0,render:e=>B(e.count)},{key:`s`,label:`Text (redacted)`,render:e=>(0,F.jsx)(`span`,{className:`mono text-[11.5px] text-ink2 truncate inline-block max-w-[520px] align-bottom`,children:xB(e.sample||``)})},{key:`tr`,label:`Trace`,render:e=>e.traceId?(0,F.jsxs)(`span`,{className:`mono text-[11.5px]`,style:{color:`#ff9cc0`},children:[e.traceId.slice(0,8),`…`]}):(0,F.jsx)(`span`,{className:`text-mute`,children:`—`})}]})]})]}):(0,F.jsx)(H,{})}),(0,F.jsx)(V,{pad:!1,title:(0,F.jsx)(Ga,{value:a,onChange:o,options:[{id:`open`,label:`To fix`},{id:`resolved`,label:`Fixed`},{id:`ignored`,label:`Ignored`},{id:``,label:`All`}]}),children:(0,F.jsx)(`div`,{className:`pt-2`,children:c?(0,F.jsx)(Ra,{error:c}):s?(0,F.jsx)(Ka,{rows:s.groups,initialSort:`last`,rowKey:e=>e.fingerprint,onRow:e=>f(e.fingerprint),empty:(0,F.jsx)(U,{title:a===`open`?`No secrets in your logs`:`Nothing here`,icon:(0,F.jsx)(ji,{size:20,className:`text-[#3fb68b]`}),children:`The SDK redacts passwords, tokens, keys and card numbers before logs leave your process, and the server checks again on arrival. Anything that gets through shows up here with a critical alert.`}),cols:[{key:`r`,label:`What leaked`,sort:e=>e.label,render:e=>(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`font-medium`,style:{color:e.status===`open`?`#ff9b9b`:void 0},children:e.label}),e.status!==`open`&&(0,F.jsx)(W,{kind:e.status===`resolved`?`good`:`neutral`,children:e.status===`resolved`?`fixed`:e.status})]})},{key:`s`,label:`In`,render:e=>(0,F.jsx)(`span`,{className:`text-ink2`,children:e.source===`error`?`error message`:`log line`})},{key:`w`,label:`Where`,sort:e=>`${e.service} ${e.operation}`,render:e=>(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(`div`,{children:e.service}),(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px]`,children:[e.operation?(0,F.jsx)(Ua,{name:e.operation}):`outside a request or job`,e.logger?` · ${e.logger}`:``]})]})},{key:`ex`,label:`Example (redacted)`,render:e=>(0,F.jsx)(`span`,{className:`mono text-[11.5px] text-ink2 truncate inline-block max-w-[380px] align-bottom`,children:xB(e.sample||``)})},{key:`win`,label:`In window`,num:!0,sort:e=>e.inWindow,render:e=>B(e.inWindow)},{key:`c`,label:`Total`,num:!0,sort:e=>e.count,render:e=>B(e.count)},{key:`first`,label:`First seen`,sort:e=>e.firstSeen,render:e=>(0,F.jsxs)(`span`,{className:`text-ink2`,children:[(0,F.jsx)(ro,{ts:e.firstSeen}),e.firstVersion?(0,F.jsxs)(`span`,{className:`text-mute`,children:[` · `,e.firstVersion]}):``]})},{key:`last`,label:`Last seen`,sort:e=>e.lastSeen,render:e=>(0,F.jsx)(ro,{ts:e.lastSeen,className:`text-ink2`})}]}):(0,F.jsx)(H,{})})})]})}function xB(e){let t=e.split(`[REDACTED]`);return t.map((e,n)=>(0,F.jsxs)(`span`,{children:[e,n<t.length-1&&(0,F.jsx)(`span`,{className:`rounded px-1 mx-px`,style:{background:`rgba(208,59,59,.22)`,color:`#ff9b9b`},children:`[REDACTED]`})]},n))}function SB(){let{fp:e=``}=yt(),t=I(),n=L(),r=ht(),{data:i,error:a,reload:o}=P(`/api/errors/${e}${t.q()}`,[t.tick]);if(a)return(0,F.jsx)(Ra,{error:a});if(!i)return(0,F.jsx)(H,{});let s=i.group,c=async t=>{await N(`/api/errors/${e}`,{method:`PATCH`,json:{status:t}}),o()};return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Nn,{to:n(`/errors`),className:`text-mute hover:text-ink text-[12px] -mb-2`,children:`← Errors`}),(0,F.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,F.jsx)(`h1`,{className:`text-[19px] font-semibold tracking-tight`,style:{color:s.handled?void 0:`#ff9b9b`},children:s.class}),s.handled?(0,F.jsx)(W,{kind:`neutral`,children:`handled`}):(0,F.jsx)(W,{kind:`crit`,children:`unhandled`}),(0,F.jsx)(W,{kind:s.status===`resolved`?`good`:s.status===`ignored`?`neutral`:`warn`,children:s.status})]}),(0,F.jsx)(`div`,{className:`mt-1.5 text-[13.5px]`,children:s.message}),(0,F.jsxs)(`div`,{className:`text-mute mt-1 text-[12px]`,children:[s.service,` · `,s.operation?(0,F.jsx)(Ua,{name:s.operation}):`no operation`,` · fingerprint `,(0,F.jsx)(`span`,{className:`mono`,children:s.fingerprint})]})]}),(0,F.jsxs)(`div`,{className:`flex gap-2 shrink-0`,children:[i.issues[0]?(0,F.jsxs)(`button`,{className:`btn`,onClick:()=>r(n(`/issues/${i.issues[0].id}`)),children:[`Issue #`,i.issues[0].id]}):(0,F.jsxs)(`button`,{className:`btn`,onClick:async()=>{let t=await N(`/api/issues`,{method:`POST`,json:{title:`${s.class}: ${String(s.message).slice(0,110)}`,severity:s.handled?`low`:`high`,service:s.service,sourceType:`error`,sourceRef:e,description:`Error group first seen ${new Date(s.firstSeen).toISOString()}${s.firstVersion?` in ${s.firstVersion}`:``}.`}});r(n(`/issues/${t.id}`))},children:[(0,F.jsx)(Fr,{size:13}),`Create issue`]}),s.status===`open`?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`button`,{className:`btn`,onClick:()=>c(`resolved`),children:[(0,F.jsx)(Mr,{size:13}),`Resolve`]}),(0,F.jsxs)(`button`,{className:`btn btn-ghost`,onClick:()=>c(`ignored`),children:[(0,F.jsx)(Hr,{size:13}),`Ignore`]})]}):(0,F.jsxs)(`button`,{className:`btn`,onClick:()=>c(`open`),children:[(0,F.jsx)(Si,{size:13}),`Reopen`]})]})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 @3xl:grid-cols-5 gap-3`,children:[(0,F.jsx)(za,{label:`In this window`,value:B(i.windowCount)}),(0,F.jsx)(za,{label:`All time`,value:B(s.count)}),(0,F.jsx)(za,{label:`Users affected`,value:B(i.users.length)}),(0,F.jsx)(za,{label:`First seen`,value:(0,F.jsx)(`span`,{className:`text-[16px]`,children:(0,F.jsx)(ro,{ts:s.firstSeen})}),sub:s.firstVersion?`in release ${s.firstVersion}`:void 0}),(0,F.jsx)(za,{label:`Last seen`,value:(0,F.jsx)(`span`,{className:`text-[16px]`,children:(0,F.jsx)(ro,{ts:s.lastSeen})})})]}),(0,F.jsx)(tz,{title:`Occurrences`,children:(0,F.jsx)(ez,{data:i.series.points,series:[{key:`count`,label:`Occurrences`,color:s.handled?`#82829a`:ZR.crit,type:`bar`}],height:130,fmt:e=>B(e)})}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-3 gap-3`,children:[(0,F.jsx)(V,{title:`Latest stack trace`,sub:i.latest?Ea(i.latest.ts,!0):void 0,className:`@5xl:col-span-2`,children:i.latest?(0,F.jsx)(lB,{frames:i.latest.frames,stack:i.latest.stack}):(0,F.jsx)(U,{title:`No occurrence stored`})}),(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)(V,{title:`Releases`,pad:!1,children:(0,F.jsx)(Ka,{rows:i.versions,cols:[{key:`v`,label:`Version`,render:e=>(0,F.jsx)(`span`,{className:`mono`,children:e.version||`—`})},{key:`n`,label:`Events`,num:!0,render:e=>B(e.n)},{key:`l`,label:`Last`,num:!0,render:e=>(0,F.jsx)(`span`,{className:`text-mute`,children:(0,F.jsx)(ro,{ts:e.last})})}]})}),(0,F.jsx)(V,{title:`Operations`,pad:!1,children:(0,F.jsx)(Ka,{rows:i.operations,empty:(0,F.jsx)(U,{title:`—`}),cols:[{key:`o`,label:`Where`,render:e=>e.operation?(0,F.jsx)(Ua,{name:e.operation}):`—`},{key:`n`,label:`Events`,num:!0,render:e=>B(e.n)}]})}),i.users.length>0&&(0,F.jsx)(V,{title:`Affected users`,pad:!1,children:(0,F.jsx)(Ka,{rows:i.users,maxHeight:220,onRow:e=>r(n(`/users/${ka(e.user_id)}`)),cols:[{key:`u`,label:`User`,render:e=>e.user_id},{key:`n`,label:`Events`,num:!0,render:e=>B(e.n)}]})})]})]}),(0,F.jsx)(V,{title:`Occurrences`,sub:`most recent 50`,pad:!1,children:(0,F.jsx)(Ka,{rows:i.occurrences,onRow:e=>e.execution_id&&r(n(`/executions/${e.execution_id}`)),cols:[{key:`t`,label:`Time`,render:e=>Ea(e.ts,!0)},{key:`v`,label:`Release`,render:e=>(0,F.jsx)(`span`,{className:`mono text-[11.5px]`,children:e.version||`—`})},{key:`i`,label:`Instance`,render:e=>(0,F.jsx)(`span`,{className:`mono text-[11.5px] text-ink2`,children:e.instance})},{key:`u`,label:`User`,render:e=>e.user_id||`—`},{key:`s`,label:`Status`,render:e=>e.http_status??`—`},{key:`m`,label:`Message`,render:e=>(0,F.jsx)(`span`,{className:`text-mute truncate inline-block max-w-[380px] align-middle`,children:e.message})},{key:`x`,label:``,render:e=>e.execution_id?(0,F.jsx)(`span`,{className:`link`,children:`trace →`}):null}]})})]})}var CB=[[`requests`,`Requests`],[`jobs`,`Job runs`],[`errors`,`Errors`],[`logs`,`Log entries`],[`spans`,`Method spans`]],wB=e=>new Date(e).toLocaleDateString(void 0,{month:`short`,day:`numeric`,timeZone:`UTC`}),TB=e=>`$${e.toLocaleString(void 0,{maximumFractionDigits:e<10?2:0})}`,EB=e=>e.overage===`none`?`Nothing to pass`:e.overage===`reduce`?`Less detail, then refused at 2×`:`Overage, within spend controls`;function DB(){let e=I(),{data:t,error:n,reload:r}=P(`/api/usage`,[e.tick]),[i,a]=(0,v.useState)(null),o=async t=>{a(null);try{await N(`/api/usage`,{method:`PUT`,json:t}),await r(),e.refresh()}catch(e){a(e.message)}},s=async t=>{a(null);try{await N(`/api/usage/${t}`,{method:`POST`}),await r(),e.refresh()}catch(e){a(e.message)}};if(n)return(0,F.jsx)(Ra,{error:n});if(!t)return(0,F.jsx)(H,{});let c=t,l=Qi[c.state];return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ia,{icon:(0,F.jsx)(Wr,{size:18,className:`text-brand`}),title:`Usage`,sub:(0,F.jsxs)(F.Fragment,{children:[`Observability Events in `,new Date(c.resetsAt-1).toLocaleDateString(void 0,{month:`long`,year:`numeric`,timeZone:`UTC`}),`, across every project. Resets `,wB(c.resetsAt),` 00:00 UTC.`]}),right:(0,F.jsx)(W,{kind:l.tone,children:l.label})}),i&&(0,F.jsx)(`div`,{className:`card px-3.5 py-2.5 text-[12.5px]`,style:{borderColor:`#5a2a2a`,color:`#f2a0a0`},children:i}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-3 gap-4 items-start`,children:[(0,F.jsxs)(V,{title:`This month`,className:`@5xl:col-span-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-baseline gap-2 flex-wrap`,children:[(0,F.jsx)(`span`,{className:`text-[30px] font-semibold tracking-tight tabular-nums`,children:Yi(c.used)}),(0,F.jsx)(`span`,{className:`text-ink2 text-[14px]`,children:c.included?(0,F.jsxs)(F.Fragment,{children:[`of `,Yi(c.included),` events`,c.pct!=null&&(0,F.jsxs)(F.Fragment,{children:[` · `,(0,F.jsx)(`b`,{className:`text-ink`,children:Xi(c.pct)})]})]}):`events (no allowance on Self-hosted)`})]}),c.included?(0,F.jsx)(`div`,{className:`mt-3 mb-1`,children:(0,F.jsx)(ea,{used:c.used,included:c.included,thresholds:c.settings.thresholds})}):null,(0,F.jsxs)(`div`,{className:`text-[12.5px] text-ink2 mt-2.5 flex flex-wrap gap-x-4 gap-y-1`,children:[(0,F.jsxs)(`span`,{children:[`Today `,(0,F.jsx)(`b`,{className:`text-ink tabular-nums`,children:Yi(c.today)})]}),(0,F.jsxs)(`span`,{children:[`Projected by month end `,(0,F.jsx)(`b`,{className:`text-ink tabular-nums`,children:Yi(c.projected)}),c.included&&c.projected>c.included?(0,F.jsxs)(`span`,{style:{color:`#fab219`},children:[` (`,Yi(c.projected-c.included),` over)`]}):null]}),c.overage>0&&(0,F.jsxs)(`span`,{children:[`Overage `,(0,F.jsx)(`b`,{className:`text-ink tabular-nums`,children:Yi(c.overage)}),c.settings.overageRate?(0,F.jsxs)(F.Fragment,{children:[` ≈ `,TB(c.overage/1e6*c.settings.overageRate)]}):null]}),c.unbilled>0&&(0,F.jsxs)(`span`,{title:`Server errors and failed jobs collected while overage was paused`,children:[`Unbilled `,(0,F.jsx)(`b`,{className:`text-ink tabular-nums`,children:Yi(c.unbilled)})]}),c.dropped>0&&(0,F.jsxs)(`span`,{title:`Events the plan didn't keep`,children:[`Not kept `,(0,F.jsx)(`b`,{className:`text-ink tabular-nums`,children:Yi(c.dropped)})]})]}),c.reason&&(0,F.jsx)(`div`,{className:`mt-3 text-[12.5px] rounded-lg px-3 py-2 bg-[rgba(250,178,25,.08)] border border-[rgba(250,178,25,.25)]`,children:c.reason}),c.plan.id===`self-hosted`&&(0,F.jsx)(`div`,{className:`mt-3 text-[12.5px] text-mute`,children:`Self-hosted keeps everything. Events are still counted, so you can see what a plan would use.`}),(0,F.jsx)(`div`,{className:`grid grid-cols-2 @lg:grid-cols-5 gap-2 mt-4`,children:CB.map(([e,t])=>(0,F.jsxs)(`div`,{className:`rounded-lg bg-[#14141b] border border-line px-3 py-2`,children:[(0,F.jsx)(`div`,{className:`text-[11px] text-mute`,children:t}),(0,F.jsx)(`div`,{className:`text-[15px] font-semibold tabular-nums`,children:Yi(c.kinds[e])})]},e))})]}),(0,F.jsx)(V,{title:`Plan`,right:(0,F.jsx)(`span`,{className:`text-[12px] text-mute`,children:c.plan.name}),children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-2 text-[13px]`,children:[(0,F.jsx)(OB,{label:`Included events`,value:c.plan.included==null?`No limit`:`${Yi(c.plan.included)} / month`}),(0,F.jsx)(OB,{label:`Retention`,value:c.plan.retentionDays==null?`Your setting (OBZERVER_RETENTION_DAYS)`:`${c.plan.retentionDays} days`}),c.limits.spanTreeDays&&(0,F.jsxs)(`div`,{className:`text-[11.5px] text-mute -mt-1`,children:[`Fast, successful executions keep their span tree for `,c.limits.spanTreeDays,` days; slow or failed ones keep it for the whole window.`]}),(0,F.jsx)(OB,{label:`Logs & alerts`,value:(0,F.jsx)(kB,{on:c.plan.features.logs&&c.plan.features.alerts})}),(0,F.jsx)(OB,{label:`SLOs`,value:(0,F.jsx)(kB,{on:c.plan.features.slos})}),(0,F.jsx)(OB,{label:`Past the allowance`,value:EB(c.plan)})]})})]}),(0,F.jsx)(V,{title:`Events per day`,sub:`UTC days, this month`,children:(0,F.jsx)(`div`,{style:{height:180},children:(0,F.jsx)(Qm,{width:`100%`,height:`100%`,children:(0,F.jsxs)(JR,{data:c.daily,margin:{top:6,right:6,bottom:0,left:-6},barCategoryGap:3,children:[(0,F.jsx)(lF,{vertical:!1}),(0,F.jsx)(sL,{dataKey:`day`,tickLine:!1,axisLine:{stroke:`#2a2a35`},tickFormatter:e=>String(Number(e.slice(8))),interval:`preserveStartEnd`}),(0,F.jsx)(wL,{tickLine:!1,axisLine:!1,tickFormatter:e=>Yi(e),width:44}),c.limits.dailyPace&&(0,F.jsx)(bN,{y:c.limits.dailyPace,stroke:`#fab219`,strokeDasharray:`4 3`,label:{value:`Pace ${Yi(c.limits.dailyPace)}/day`,position:`insideTopRight`,fill:`#fab219`,fontSize:10.5}}),(0,F.jsx)(Nm,{cursor:{fill:`rgba(255,255,255,.04)`},isAnimationActive:!1,content:({active:e,payload:t})=>e&&t?.length?(0,F.jsxs)(`div`,{className:`rounded-lg border border-line2 px-3 py-1.5 text-[12px]`,style:{background:`rgba(20,20,27,.97)`},children:[(0,F.jsx)(`div`,{className:`text-mute`,children:wB(Date.parse(t[0].payload.day))}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`b`,{children:t[0].value.toLocaleString()}),` events`]}),t[0].payload.unbilled>0&&(0,F.jsxs)(`div`,{className:`text-ink2`,children:[t[0].payload.unbilled.toLocaleString(),` unbilled`]}),t[0].payload.dropped>0&&(0,F.jsxs)(`div`,{className:`text-ink2`,children:[t[0].payload.dropped.toLocaleString(),` not kept`]})]}):null}),(0,F.jsx)(aM,{dataKey:`events`,fill:XR[0],radius:[4,4,0,0],isAnimationActive:!1})]})})})}),(0,F.jsx)(AB,{report:c,onSave:o}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-2 gap-4 items-start`,children:[(0,F.jsx)(jB,{report:c,onSave:o,onPost:s}),(0,F.jsx)(NB,{report:c,onSave:o})]}),(0,F.jsx)(PB,{report:c}),(0,F.jsx)(LB,{}),(0,F.jsx)(V,{title:`What counts`,right:(0,F.jsx)(Xr,{size:14,className:`text-mute`}),children:(0,F.jsxs)(`div`,{className:`text-[12.8px] text-ink2 leading-relaxed flex flex-col gap-2 max-w-[860px]`,children:[(0,F.jsx)(`p`,{children:`One Observability Event per request, background job run, error, log entry or trace span your apps report. Events add up: a request that ran through three of your own methods, wrote two log lines and raised one error is seven events.`}),(0,F.jsx)(`p`,{children:`Database-query and outbound-HTTP spans don't count: they are detail about a method span that is already counted. Runtime samples (CPU, memory, event loop) and custom metrics don't count either.`}),(0,F.jsxs)(`p`,{children:[`To send fewer events, ignore noisy routes in the SDK (`,(0,F.jsx)(`span`,{className:`mono`,children:`ignore`}),` in `,(0,F.jsx)(`span`,{className:`mono`,children:`init()`}),`) and keep log levels at `,(0,F.jsx)(`span`,{className:`mono`,children:`info`}),` or above in production.`]})]})})]})}function OB({label:e,value:t}){return(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,F.jsx)(`span`,{className:`text-ink2`,children:e}),(0,F.jsx)(`span`,{className:`text-right`,children:t})]})}function kB({on:e}){return e?(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1`,style:{color:`#3ccf7a`},children:[(0,F.jsx)(Tr,{size:14}),`Included`]}):(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-mute`,children:[(0,F.jsx)(ii,{size:13}),`Not included`]})}function AB({report:e,onSave:t}){let[n,r]=(0,v.useState)({included:String(e.settings.enterprise.included),retentionDays:String(e.settings.enterprise.retentionDays)}),i=e.plan.id;return(0,F.jsxs)(V,{title:`Plans`,sub:`Choose the plan this server enforces`,pad:!1,children:[(0,F.jsx)(`div`,{className:`overflow-x-auto`,children:(0,F.jsxs)(`table`,{className:`w-full text-[12.8px]`,children:[(0,F.jsx)(`thead`,{children:(0,F.jsx)(`tr`,{className:`text-mute text-[11.5px] text-left`,children:[`Plan`,`Included events / month`,`Retention`,`Logs & alerts`,`SLOs`,`Past the allowance`,``].map(e=>(0,F.jsx)(`th`,{className:`font-medium px-3.5 py-2 border-b border-line`,children:e},e))})}),(0,F.jsx)(`tbody`,{children:e.plans.map(e=>{let a=e.id===i,o=e.id===`enterprise`;return(0,F.jsxs)(`tr`,{className:a?`bg-[rgba(255,61,127,.06)]`:``,children:[(0,F.jsxs)(`td`,{className:`px-3.5 py-2.5 border-b border-line font-medium`,children:[e.name,a&&(0,F.jsx)(`span`,{className:`ml-2 text-[10.5px] font-semibold text-brand`,children:`CURRENT`})]}),(0,F.jsx)(`td`,{className:`px-3.5 py-2.5 border-b border-line tabular-nums`,children:o?(0,F.jsx)(`input`,{className:`input h-7 w-[120px]`,"aria-label":`Enterprise included events`,value:n.included,onChange:e=>r({...n,included:e.target.value})}):e.included==null?`No limit`:Yi(e.included)}),(0,F.jsx)(`td`,{className:`px-3.5 py-2.5 border-b border-line tabular-nums`,children:o?(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(`input`,{className:`input h-7 w-[70px]`,"aria-label":`Enterprise retention days`,value:n.retentionDays,onChange:e=>r({...n,retentionDays:e.target.value})}),`days`]}):e.retentionDays==null?`Your setting`:`${e.retentionDays} days`}),(0,F.jsx)(`td`,{className:`px-3.5 py-2.5 border-b border-line`,children:(0,F.jsx)(kB,{on:e.features.logs})}),(0,F.jsx)(`td`,{className:`px-3.5 py-2.5 border-b border-line`,children:(0,F.jsx)(kB,{on:e.features.slos})}),(0,F.jsx)(`td`,{className:`px-3.5 py-2.5 border-b border-line text-ink2`,children:EB(e)}),(0,F.jsx)(`td`,{className:`px-3.5 py-2.5 border-b border-line text-right`,children:o?(0,F.jsx)(`button`,{className:`btn h-7`,onClick:()=>t({plan:`enterprise`,enterprise:{included:Number(n.included),retentionDays:Number(n.retentionDays)}}),children:a?`Save`:`Choose`}):!a&&(0,F.jsx)(`button`,{className:`btn h-7`,onClick:()=>t({plan:e.id}),children:`Choose`})})]},e.id)})})]})}),(0,F.jsx)(`div`,{className:`px-3.5 py-2.5 text-[11.5px] text-mute`,children:`Choosing a plan applies its allowance, retention and features to every project on this server. Retention takes effect at the next hourly clean-up.`})]})}function jB({report:e,onSave:t,onPost:n}){let r=e.settings,[i,a]=(0,v.useState)(r.budget==null?``:String(r.budget)),[o,s]=(0,v.useState)(r.overageRate==null?``:String(r.overageRate));if((0,v.useEffect)(()=>{a(r.budget==null?``:String(r.budget)),s(r.overageRate==null?``:String(r.overageRate))},[r.budget,r.overageRate]),e.plan.overage===`none`)return(0,F.jsx)(V,{title:`Spend controls`,children:(0,F.jsx)(`div`,{className:`text-[12.8px] text-ink2`,children:`Self-hosted has no allowance, so there is nothing to control. Choose a plan above to meter against one.`})});if(e.plan.overage===`reduce`){let t=e.plan.included??0;return(0,F.jsxs)(V,{title:`Past the Free allowance`,children:[(0,F.jsxs)(`ol`,{className:`flex flex-col gap-2.5 text-[12.8px]`,children:[(0,F.jsx)(MB,{n:1,on:e.state===`paced`,title:`Paced day: past ${Yi(e.limits.dailyPace)} events in one UTC day`,children:`Most trace waterfalls pause until 00:00 UTC.`}),(0,F.jsx)(MB,{n:2,on:e.state===`reduced`,title:`Past ${Yi(t)} this month`,children:`Charts stay live, but most traces arrive without spans.`}),(0,F.jsx)(MB,{n:3,on:e.state===`refused`,title:`At ${Yi(e.limits.refuseAt)}`,children:`New telemetry is refused with a 429 until the 1st, and dropped, not queued.`})]}),(0,F.jsx)(`div`,{className:`text-[11.5px] text-mute mt-3`,children:`While paced or reduced, server errors, failed jobs and anything slower than 1 second keep full traces.`})]})}let c=e.state===`paused`,l=e.spikeProtection.limit==null?``:r.overageRate?`${TB(50)} of overage (${Yi(e.spikeProtection.limit)} events)`:`${Yi(e.spikeProtection.limit)} overage events (half the allowance; set a price to use $50)`;return(0,F.jsx)(V,{title:`Spend controls`,right:c?(0,F.jsxs)(`button`,{className:`btn h-7`,onClick:()=>n(`resume`),children:[(0,F.jsx)(mi,{size:13}),`Resume overage`]}):(0,F.jsxs)(`button`,{className:`btn h-7`,onClick:()=>n(`pause`),children:[(0,F.jsx)(fi,{size:13}),`Pause overage`]}),children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-4 text-[12.8px]`,children:[(0,F.jsxs)(`label`,{className:`flex items-start gap-3 cursor-pointer`,children:[(0,F.jsx)(`input`,{type:`checkbox`,className:`mt-0.5`,checked:e.spikeProtection.on,onChange:e=>t({spikeProtection:e.target.checked})}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`font-medium flex items-center gap-1.5`,children:[(0,F.jsx)(ji,{size:14,className:`text-mute`}),`Spike protection`]}),(0,F.jsxs)(`div`,{className:`text-ink2 mt-0.5`,children:[`Pauses overage when a surge would push this month's overage to `,l,` at the current pace.`,e.spikeProtection.resumed?` Off until the 1st: you resumed overage this month.`:``]})]})]}),(0,F.jsx)(G,{label:`Monthly overage budget (events beyond the allowance)`,hint:`Empty: no budget. 0: collect nothing beyond the included events.`,children:(0,F.jsxs)(`div`,{className:`flex gap-2`,children:[(0,F.jsx)(`input`,{className:`input h-8 w-[180px]`,inputMode:`numeric`,placeholder:`No budget`,value:i,onChange:e=>a(e.target.value)}),(0,F.jsx)(`button`,{className:`btn h-8`,onClick:()=>t({budget:i.trim()===``?null:Number(i)}),children:`Save`})]})}),(0,F.jsx)(G,{label:`Price per million overage events (optional, USD)`,hint:`Shows overage as money and sizes spike protection at $50.`,children:(0,F.jsxs)(`div`,{className:`flex gap-2`,children:[(0,F.jsx)(`input`,{className:`input h-8 w-[120px]`,inputMode:`decimal`,placeholder:`—`,value:o,onChange:e=>s(e.target.value)}),(0,F.jsx)(`button`,{className:`btn h-8`,onClick:()=>t({overageRate:o.trim()===``?null:Number(o)}),children:`Save`})]})}),(0,F.jsx)(`div`,{className:`text-[11.5px] text-mute`,children:`While overage is paused, server errors, failed jobs, runtime and custom metrics continue unbilled. Other events beyond the allowance are dropped until the 1st, or until you resume, change the budget or upgrade.`})]})})}function MB({n:e,on:t,title:n,children:r}){return(0,F.jsxs)(`li`,{className:`flex gap-3 rounded-lg px-3 py-2 border ${t?`border-[rgba(250,178,25,.45)] bg-[rgba(250,178,25,.07)]`:`border-line`}`,children:[(0,F.jsx)(`span`,{className:`w-5 h-5 rounded-full grid place-items-center text-[11px] font-semibold bg-[#1d1d27] shrink-0`,children:e}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`font-medium`,children:[n,t&&(0,F.jsx)(`span`,{className:`ml-2 text-[10.5px] font-semibold`,style:{color:`#fab219`},children:`NOW`})]}),(0,F.jsx)(`div`,{className:`text-ink2 mt-0.5`,children:r})]})]})}function NB({report:e,onSave:t}){let n=e.settings,[r,i]=(0,v.useState)(n.thresholds.join(`, `)),[a,o]=(0,v.useState)(n.notify),s=P(`/api/settings`);(0,v.useEffect)(()=>{i(n.thresholds.join(`, `)),o(n.notify)},[n.thresholds.join(`,`),n.notify]);let c=!!s.data?.email?.configured;return(0,F.jsx)(V,{title:`Quota notifications`,right:(0,F.jsx)(hr,{size:14,className:`text-mute`}),children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-4 text-[12.8px]`,children:[(0,F.jsx)(G,{label:`Thresholds, % of the allowance (up to five)`,hint:`For example 50, 80, 100. Each one emails once a month.`,children:(0,F.jsx)(`input`,{className:`input h-8 w-full`,value:r,onChange:e=>i(e.target.value),placeholder:`50, 80, 100`,disabled:e.plan.included==null})}),(0,F.jsx)(G,{label:`Email to`,hint:c?`Comma-separated.`:`Email isn’t set up on this server yet (Settings → Email), so notifications only show here.`,children:(0,F.jsx)(`input`,{className:`input h-8 w-full`,value:a,onChange:e=>o(e.target.value),placeholder:`you@example.com`,disabled:e.plan.included==null})}),(0,F.jsx)(`button`,{className:`btn btn-primary h-8 self-start`,disabled:e.plan.included==null,onClick:()=>t({thresholds:r.split(/[\s,%]+/).filter(Boolean).map(Number),notify:a}),children:`Save notifications`}),e.plan.included==null?(0,F.jsx)(`div`,{className:`text-mute text-[11.5px]`,children:`Self-hosted has no allowance to notify about.`}):e.notified.length>0&&(0,F.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,F.jsx)(`div`,{className:`text-[11.5px] text-mute`,children:`This month`}),e.notified.map(e=>(0,F.jsxs)(`div`,{className:`flex justify-between`,children:[(0,F.jsxs)(`span`,{children:[`Passed `,e.pct,`%`]}),(0,F.jsxs)(`span`,{className:`text-ink2`,children:[wB(e.ts),` · `,Yi(e.used),` events`]})]},e.pct))]})]})})}function PB({report:e}){let t=e.byProject.flatMap(e=>e.apps.map(t=>({...t,project:e.name,key:`${e.slug}/${t.service}/${t.env??``}`}))),n=Math.max(1,...t.map(e=>e.billed)),r=(e,t)=>({key:e,label:t,num:!0,sort:t=>t[e],render:t=>Yi(t[e])}),i=[...e.byProject.length>1?[{key:`project`,label:`Project`,sort:e=>e.project,render:e=>e.project}]:[],{key:`app`,label:`App`,sort:e=>e.service,render:e=>(0,F.jsx)(`span`,{className:`font-medium`,children:e.service})},{key:`env`,label:`Environment`,sort:e=>e.env??``,render:e=>e.env??(0,F.jsx)(`span`,{className:`text-mute`,children:`—`})},{key:`billed`,label:`Events`,num:!0,sort:e=>e.billed,render:e=>(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(Za,{value:e.billed,max:n}),Yi(e.billed)]})},r(`requests`,`Requests`),r(`jobs`,`Jobs`),r(`errors`,`Errors`),r(`logs`,`Logs`),r(`spans`,`Spans`)];return(0,F.jsx)(V,{title:`By project and app`,sub:`This month`,pad:!1,children:(0,F.jsx)(Ka,{rows:t,cols:i,initialSort:`billed`,rowKey:e=>e.key,empty:(0,F.jsx)(`div`,{className:`px-3.5 py-4 text-mute text-[12.5px]`,children:`No events yet this month.`})})})}var FB=e=>e==null?null:`$${e<1?e.toFixed(e<.01?4:2):e.toFixed(2)}`,IB=e=>e==null?``:String(e);function LB(){let e=I(),{data:t,error:n,reload:r}=P(`/api/ai/usage`,[e.tick]),[i,a]=(0,v.useState)({}),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(!1);if((0,v.useEffect)(()=>{if(!t)return;let e=t.limits;a({perQuestion:IB(e.perQuestion),perHour:IB(e.perHour),historyTurns:IB(e.historyTurns),budgetUnit:e.budgetUnit,daily:IB(e.daily),monthly:IB(e.monthly),priceIn:IB(e.prices.input),priceOut:IB(e.prices.output),thresholds:e.thresholds.join(`, `),notify:e.notify})},[t]),n)return(0,F.jsx)(Ra,{error:n});if(!t)return null;let u=t,d=u.limits,f=e=>t=>{l(!1),a({...i,[e]:t.target.value})},p=async()=>{s(null);try{await N(`/api/ai/usage`,{method:`PUT`,json:{perQuestion:i.perQuestion,perHour:i.perHour||0,historyTurns:i.historyTurns,budgetUnit:i.budgetUnit,daily:i.daily.trim()||null,monthly:i.monthly.trim()||null,prices:{input:i.priceIn.trim()||null,output:i.priceOut.trim()||null},thresholds:i.thresholds.split(/[\s,%]+/).filter(Boolean).map(Number),notify:i.notify}}),await r(),e.reloadMeta(),l(!0)}catch(e){s(e.message)}},m=d.budgetUnit===`usd`,h=e=>m?FB(e):`${Yi(e)} tokens`,g=(e,t)=>(0,F.jsxs)(`div`,{className:`rounded-lg bg-[#14141b] border border-line px-3 py-2`,children:[(0,F.jsx)(`div`,{className:`text-[11px] text-mute`,children:e}),(0,F.jsxs)(`div`,{className:`text-[15px] font-semibold tabular-nums`,children:[Yi(t.tokens),` `,(0,F.jsx)(`span`,{className:`text-[11.5px] font-normal text-ink2`,children:`tokens`})]}),(0,F.jsxs)(`div`,{className:`text-[11.5px] text-ink2 tabular-nums`,children:[t.questions,` question`,t.questions===1?``:`s`,t.cost==null?``:` · ${FB(t.cost)}`]})]});return(0,F.jsx)(V,{title:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(Fi,{size:14,className:`text-brand`}),`Ask Obzeri`]}),sub:`Tokens on your own model key. Questions over MCP use the client's model and cost nothing here.`,right:u.blocked?(0,F.jsx)(W,{kind:`serious`,children:`Paused`}):null,children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[u.blocked&&(0,F.jsx)(`div`,{className:`text-[12.5px] rounded-lg px-3 py-2 bg-[rgba(250,178,25,.08)] border border-[rgba(250,178,25,.25)]`,children:u.blocked.error}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @lg:grid-cols-3 gap-2`,children:[g(`This month`,u.month),g(`Today`,u.today),(0,F.jsxs)(`div`,{className:`rounded-lg bg-[#14141b] border border-line px-3 py-2`,children:[(0,F.jsx)(`div`,{className:`text-[11px] text-mute`,children:`Per question, on average`}),(0,F.jsx)(`div`,{className:`text-[15px] font-semibold tabular-nums`,children:u.perQuestion==null?`—`:(0,F.jsxs)(F.Fragment,{children:[Yi(u.perQuestion),` `,(0,F.jsx)(`span`,{className:`text-[11.5px] font-normal text-ink2`,children:`tokens`})]})}),(0,F.jsxs)(`div`,{className:`text-[11.5px] text-ink2`,children:[`Capped at `,Yi(d.perQuestion)]})]})]}),(d.monthly!=null||d.daily!=null)&&(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @3xl:grid-cols-2 gap-4`,children:[d.monthly!=null&&(0,F.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,F.jsxs)(`div`,{className:`flex justify-between text-[12.5px]`,children:[(0,F.jsx)(`span`,{children:`Monthly budget`}),(0,F.jsxs)(`span`,{className:`text-ink2 tabular-nums`,children:[h(u.spent.month),` of `,h(d.monthly)]})]}),(0,F.jsx)(ea,{used:u.spent.month,included:d.monthly,thresholds:d.thresholds,height:8})]}),d.daily!=null&&(0,F.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,F.jsxs)(`div`,{className:`flex justify-between text-[12.5px]`,children:[(0,F.jsx)(`span`,{children:`Daily budget`}),(0,F.jsxs)(`span`,{className:`text-ink2 tabular-nums`,children:[h(u.spent.today),` of `,h(d.daily)]})]}),(0,F.jsx)(ea,{used:u.spent.today,included:d.daily,height:8})]})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @3xl:grid-cols-3 gap-x-4 gap-y-3 text-[12.8px]`,children:[(0,F.jsx)(G,{label:`Tokens per question`,hint:`Past this, Obzeri answers with what it has.`,children:(0,F.jsx)(`input`,{className:`input h-8 w-full`,inputMode:`numeric`,value:i.perQuestion??``,onChange:f(`perQuestion`)})}),(0,F.jsx)(G,{label:`Questions per hour, per browser`,hint:`0 turns the limit off.`,children:(0,F.jsx)(`input`,{className:`input h-8 w-full`,inputMode:`numeric`,value:i.perHour??``,onChange:f(`perHour`)})}),(0,F.jsx)(G,{label:`Earlier messages sent with a question`,hint:`Each one is sent again on every step.`,children:(0,F.jsx)(`input`,{className:`input h-8 w-full`,inputMode:`numeric`,value:i.historyTurns??``,onChange:f(`historyTurns`)})}),(0,F.jsx)(G,{label:`Budgets in`,children:(0,F.jsxs)(`select`,{className:`input h-8 w-full`,value:i.budgetUnit??`tokens`,onChange:f(`budgetUnit`),children:[(0,F.jsx)(`option`,{value:`tokens`,children:`Tokens`}),(0,F.jsx)(`option`,{value:`usd`,children:`Dollars (needs prices)`})]})}),(0,F.jsx)(G,{label:`Daily budget${i.budgetUnit===`usd`?` ($)`:``}`,hint:`Empty: none. Resets 00:00 UTC.`,children:(0,F.jsx)(`input`,{className:`input h-8 w-full`,inputMode:`decimal`,placeholder:`No limit`,value:i.daily??``,onChange:f(`daily`)})}),(0,F.jsx)(G,{label:`Monthly budget${i.budgetUnit===`usd`?` ($)`:``}`,hint:`Empty: none. Resets on the 1st.`,children:(0,F.jsx)(`input`,{className:`input h-8 w-full`,inputMode:`decimal`,placeholder:`No limit`,value:i.monthly??``,onChange:f(`monthly`)})}),(0,F.jsx)(G,{label:`Price per million input tokens ($)`,hint:`From your provider's price list for this model.`,children:(0,F.jsx)(`input`,{className:`input h-8 w-full`,inputMode:`decimal`,placeholder:`—`,value:i.priceIn??``,onChange:f(`priceIn`)})}),(0,F.jsx)(G,{label:`Price per million output tokens ($)`,children:(0,F.jsx)(`input`,{className:`input h-8 w-full`,inputMode:`decimal`,placeholder:`—`,value:i.priceOut??``,onChange:f(`priceOut`)})}),(0,F.jsx)(`div`,{}),(0,F.jsx)(G,{label:`Notify at, % of the monthly budget (up to five)`,children:(0,F.jsx)(`input`,{className:`input h-8 w-full`,placeholder:`50, 80, 100`,value:i.thresholds??``,onChange:f(`thresholds`)})}),(0,F.jsx)(G,{label:`Email to`,hint:`Needs email set up in Integrations → Email.`,children:(0,F.jsx)(`input`,{className:`input h-8 w-full`,placeholder:`you@example.com`,value:i.notify??``,onChange:f(`notify`)})}),(0,F.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,F.jsx)(`button`,{className:`btn btn-primary h-8`,onClick:p,children:`Save limits`}),c&&(0,F.jsx)(`span`,{className:`text-[12px]`,style:{color:`#3ccf7a`},children:`Saved`})]})]}),o&&(0,F.jsx)(`div`,{className:`text-[12.5px]`,style:{color:`#f2a0a0`},children:o}),(u.byModel.length>0||u.byProject.length>1)&&(0,F.jsx)(`div`,{className:`grid grid-cols-1 @3xl:grid-cols-2 gap-4 text-[12.5px]`,children:[[`By model`,u.byModel],[`By project`,u.byProject]].filter(([,e])=>e.length>0).map(([e,t])=>(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-[11.5px] text-mute mb-1`,children:e}),t.map(e=>(0,F.jsxs)(`div`,{className:`flex justify-between py-1 border-b border-line last:border-0`,children:[(0,F.jsx)(`span`,{className:`mono text-[12px]`,children:e.name}),(0,F.jsxs)(`span`,{className:`text-ink2 tabular-nums`,children:[Yi(e.tokens),` tokens · `,e.questions,` q`,e.cost==null?``:` · ${FB(e.cost)}`]})]},e.name))]},e))})]})})}function RB(){let e=I(),[t,n]=(0,v.useState)(``),[r,i]=(0,v.useState)(`all`),{data:a,error:o}=P(`/api/functions${e.q()}`,[e.tick]),s=(a||[]).filter(e=>(r===`all`||e.kind===r)&&(!t||e.name.toLowerCase().includes(t.toLowerCase()))),c=Math.max(1,...s.map(e=>e.share));return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ia,{icon:(0,F.jsx)(vr,{size:18,className:`text-brand`}),title:`Services`,sub:`Time per service class method, route handler and middleware. Own time excludes awaited work (queries, HTTP calls, nested methods), so the top of this list is where your own code spends time.`}),(0,F.jsx)(zB,{}),(0,F.jsx)(V,{pad:!1,title:(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsxs)(`div`,{className:`relative`,children:[(0,F.jsx)(Ei,{size:13,className:`absolute left-2.5 top-1/2 -translate-y-1/2 text-mute`}),(0,F.jsx)(`input`,{className:`input pl-8 w-[260px] h-7`,placeholder:`Filter by name`,value:t,onChange:e=>n(e.target.value)})]}),(0,F.jsx)(Ga,{value:r,onChange:i,options:[{id:`all`,label:`All`},{id:`function`,label:`Class methods`},{id:`handler`,label:`Handlers`},{id:`middleware`,label:`Middleware`},{id:`custom`,label:`Custom spans`}]})]}),children:(0,F.jsx)(`div`,{className:`pt-2`,children:o?(0,F.jsx)(Ra,{error:o}):a?(0,F.jsx)(Ka,{rows:s,initialSort:`self`,rowKey:e=>e.service+e.name+e.kind,empty:(0,F.jsxs)(U,{title:`No timed code yet`,children:[`Handlers and middleware are timed automatically, and so are classes exported from `,(0,F.jsx)(`span`,{className:`mono`,children:`*.service.ts`}),` and `,(0,F.jsx)(`span`,{className:`mono`,children:`*.repository.ts`}),` files. For other files, set `,(0,F.jsx)(`span`,{className:`mono`,children:`autoInstrument`}),` globs or call `,(0,F.jsx)(`span`,{className:`mono`,children:`instrument(MyClass)`}),`.`]}),cols:[{key:`n`,label:`Name`,sort:e=>e.name,render:e=>{let t=tB[e.kind]||tB.function;return(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(t.Icon,{size:12,style:{color:t.color}}),(0,F.jsx)(`span`,{className:`mono text-[12px]`,children:e.name})]})}},{key:`k`,label:`Kind`,sort:e=>e.kind,render:e=>(0,F.jsx)(`span`,{className:`text-mute`,children:e.kind===`function`?`Class method`:tB[e.kind]?.label})},{key:`s`,label:`Application`,sort:e=>e.service,render:e=>(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`text-ink2`,children:e.service}),(0,F.jsx)(po,{app:e.service,web:!0})]})},{key:`calls`,label:`Calls`,num:!0,sort:e=>e.calls,render:e=>B(e.calls)},{key:`avgSelf`,label:`Avg own`,num:!0,sort:e=>e.avgSelf,render:e=>z(e.avgSelf)},{key:`avgTotal`,label:`Avg total`,num:!0,sort:e=>e.avgTotal,render:e=>z(e.avgTotal)},{key:`self`,label:`Own time`,num:!0,sort:e=>e.self,render:e=>z(e.self)},{key:`total`,label:`Total time`,num:!0,sort:e=>e.total,render:e=>z(e.total)},{key:`share`,label:`Share of own time`,num:!0,sort:e=>e.share,render:e=>(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`inline-block min-w-[44px]`,children:Sa(e.share,1)}),(0,F.jsx)(Za,{value:e.share,max:c,color:XR[4],w:70})]})},{key:`err`,label:`Errors`,num:!0,sort:e=>e.errors,render:e=>e.errors?(0,F.jsx)(`span`,{style:{color:`#ff8a8a`},children:B(e.errors)}):(0,F.jsx)(`span`,{className:`text-mute`,children:`0`})}]}):(0,F.jsx)(H,{})})})]})}function zB(){let e=I(),t=e.meta?.environments??[],n=(e.meta?.services??[]).filter(t=>!e.service||t.id===e.service).filter(n=>!e.env||t.find(t=>t.id===e.env)?.services.includes(n.id));return n.length?(0,F.jsx)(`div`,{className:`grid grid-cols-1 @3xl:grid-cols-2 @6xl:grid-cols-3 gap-3`,children:n.map(e=>{let n=Date.now()-e.lastSeen<9e5,r=t.filter(t=>t.services.includes(e.id)).map(e=>e.id);return(0,F.jsxs)(`div`,{className:`card px-4 py-3 flex flex-col gap-2 min-w-0`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,F.jsx)(`span`,{className:`w-2 h-2 rounded-full shrink-0`,style:{background:n?`#3ccf7a`:`#5c5c70`},title:n?`Reporting`:`Last heard $<Ago ts={s.lastSeen} /> (${Ta(e.lastSeen)})`}),(0,F.jsx)(`span`,{className:`font-medium text-[13.5px] truncate`,children:e.id}),(0,F.jsx)(`span`,{className:`flex-1`}),(0,F.jsx)(`span`,{className:`text-[11.5px] text-mute shrink-0`,children:n?`reporting`:(0,F.jsx)(ro,{ts:e.lastSeen})})]}),(0,F.jsx)(fo,{frameworks:e.frameworks}),(0,F.jsx)(`div`,{className:`text-[11.5px] text-mute truncate`,children:[e.node?`Node ${e.node.replace(/^v/,``)}`:null,`${e.instances.length} instance${e.instances.length===1?``:`s`}`,r.length?r.join(`, `):e.environment].filter(Boolean).join(` · `)})]},e.id)})}):null}function BB(){let[e,t]=zn(),n=ht(),{data:r,error:i,reload:a}=P(`/api/projects`),[o,s]=(0,v.useState)(e.get(`new`)===`1`),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(null),f=e.get(`project`)||`default`,p=()=>{if(s(!1),e.get(`new`)){let n=new URLSearchParams(e);n.delete(`new`),t(n,{replace:!0})}};return i?(0,F.jsx)(Ra,{error:i}):r?(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ia,{icon:(0,F.jsx)(Ur,{size:18,className:`text-brand`}),title:`Projects`,sub:`Each project has its own apps, ingest keys, alerts, SLOs, issues, status pages, integrations and MCP token. Nothing is shared between projects.`,right:(0,F.jsxs)(`button`,{className:`btn btn-primary`,onClick:()=>s(!0),children:[(0,F.jsx)(_i,{size:14}),`New project`]})}),(0,F.jsx)(V,{pad:!1,children:(0,F.jsx)(Ka,{rows:r,cols:[{key:`n`,label:`Project`,render:e=>(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`font-medium`,children:e.name}),e.isDefault&&(0,F.jsx)(`span`,{className:`pill`,children:`default`}),e.slug===f&&(0,F.jsx)(W,{kind:`good`,children:`current`})]})},{key:`s`,label:`Slug`,render:e=>(0,F.jsx)(`span`,{className:`mono text-ink2`,children:e.slug})},{key:`a`,label:`Apps`,num:!0,render:e=>e.apps},{key:`l`,label:`Last data`,render:e=>(0,F.jsx)(`span`,{className:`text-ink2`,children:e.lastSeen?(0,F.jsx)(ro,{ts:e.lastSeen}):`—`})},{key:`x`,label:``,render:t=>(0,F.jsxs)(`div`,{className:`flex justify-end gap-1`,children:[t.slug!==f&&(0,F.jsxs)(`button`,{className:`btn h-7`,onClick:()=>n(ba(t.slug,`/`,e)),children:[`Open`,(0,F.jsx)(fr,{size:12})]}),(0,F.jsx)(`button`,{className:`btn btn-ghost h-7 px-2`,title:`Rename`,onClick:()=>d(t),children:(0,F.jsx)(pi,{size:13})}),!t.isDefault&&(0,F.jsx)(`button`,{className:`btn btn-ghost h-7 px-2 text-[#ff8a8a]`,title:`Delete`,onClick:async()=>{window.prompt(`Delete "${t.name}" and all of its data (apps, alerts, issues, status pages, keys)? This cannot be undone.\n\nType the slug "${t.slug}" to confirm.`)===t.slug&&(await N(`/api/projects/${t.slug}`,{method:`DELETE`}),t.slug===f?n(ba(`default`,`/projects`,e)):a())},children:(0,F.jsx)(Ri,{size:13})})]})}]})}),o&&(0,F.jsx)(VB,{onClose:p,onCreated:e=>{p(),l(e),a()}}),c&&(0,F.jsx)(HB,{project:c,onClose:()=>l(null),onOpen:()=>{l(null),n(ba(c.slug,`/settings`,e))}}),u&&(0,F.jsx)(UB,{project:u,onClose:()=>d(null),onSaved:()=>{d(null),a()}})]}):(0,F.jsx)(H,{})}function VB({onClose:e,onCreated:t}){let[n,r]=(0,v.useState)(``),[i,a]=(0,v.useState)(``);return(0,F.jsx)($a,{open:!0,title:`New project`,onClose:e,children:(0,F.jsxs)(`form`,{className:`flex flex-col gap-3`,onSubmit:async e=>{e.preventDefault();try{t(await N(`/api/projects`,{method:`POST`,json:{name:n}}))}catch(e){a(e.message)}},children:[(0,F.jsx)(G,{label:`Name`,hint:`a product, a client or a team`,children:(0,F.jsx)(`input`,{className:`input`,autoFocus:!0,value:n,onChange:e=>r(e.target.value),placeholder:`Acme Shop`})}),i&&(0,F.jsx)(`div`,{className:`text-[12.5px] text-[#ff8a8a]`,children:i}),(0,F.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,F.jsx)(`button`,{type:`button`,className:`btn`,onClick:e,children:`Cancel`}),(0,F.jsx)(`button`,{className:`btn btn-primary`,disabled:!n.trim(),children:`Create`})]})]})})}function HB({project:e,onClose:t,onOpen:n}){let r=`OBZERVER_KEY=${e.ingestKey} OBZERVER_ENDPOINT=${window.location.origin} \\\n node --import @obzerver/node/register server.js`;return(0,F.jsx)($a,{open:!0,title:`"${e.name}" is ready`,onClose:t,children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-3 text-[13px]`,children:[(0,F.jsx)(`div`,{className:`text-ink2`,children:`Apps that send data with this project's ingest key show up only here.`}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,F.jsx)(`span`,{className:`text-ink2 text-[12px]`,children:`Ingest key`}),(0,F.jsx)(Wa,{text:e.ingestKey,className:`btn h-6 text-[11px]`})]}),(0,F.jsx)(`div`,{className:`code`,children:e.ingestKey})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,F.jsx)(`span`,{className:`text-ink2 text-[12px]`,children:`Start an app with it`}),(0,F.jsx)(Wa,{text:r,className:`btn h-6 text-[11px]`})]}),(0,F.jsx)(`div`,{className:`code`,children:r})]}),(0,F.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,F.jsx)(`button`,{className:`btn`,onClick:t,children:`Stay here`}),(0,F.jsxs)(`button`,{className:`btn btn-primary`,onClick:n,children:[`Open project setup`,(0,F.jsx)(fr,{size:13})]})]})]})})}function UB({project:e,onClose:t,onSaved:n}){let[r,i]=(0,v.useState)(e.name),[a,o]=(0,v.useState)(``);return(0,F.jsx)($a,{open:!0,title:`Rename project`,onClose:t,children:(0,F.jsxs)(`form`,{className:`flex flex-col gap-3`,onSubmit:async t=>{t.preventDefault();try{await N(`/api/projects/${e.slug}`,{method:`PATCH`,json:{name:r}}),n()}catch(e){o(e.message)}},children:[(0,F.jsx)(G,{label:`Name`,hint:(0,F.jsxs)(F.Fragment,{children:[`the slug `,(0,F.jsx)(`span`,{className:`mono`,children:e.slug}),` stays, so links and keys keep working`]}),children:(0,F.jsx)(`input`,{className:`input`,autoFocus:!0,value:r,onChange:e=>i(e.target.value)})}),a&&(0,F.jsx)(`div`,{className:`text-[12.5px] text-[#ff8a8a]`,children:a}),(0,F.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,F.jsx)(`button`,{type:`button`,className:`btn`,onClick:t,children:`Cancel`}),(0,F.jsx)(`button`,{className:`btn btn-primary`,disabled:!r.trim(),children:`Save`})]})]})})}function WB(){let e=I(),[t,n]=(0,v.useState)(`db`),[r,i]=(0,v.useState)(null),a=P(t===`db`?`/api/queries${e.q()}`:null,[e.tick,t]),o=P(t===`http`?`/api/outbound${e.q()}`:null,[e.tick,t]);return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ia,{icon:(0,F.jsx)(Br,{size:18,className:`text-brand`}),title:`Queries & dependencies`,sub:`Statements from pg, mysql2 and ioredis with literal values stripped in-process, plus outbound HTTP calls (http, https, fetch).`,right:(0,F.jsx)(Ga,{value:t,onChange:n,options:[{id:`db`,label:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(Br,{size:12}),`Database`]})},{id:`http`,label:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(Kr,{size:12}),`Outbound HTTP`]})}]})}),t===`db`?(0,F.jsx)(V,{pad:!1,children:a.error?(0,F.jsx)(Ra,{error:a.error}):a.data?(0,F.jsx)(Ka,{rows:a.data,initialSort:`total`,rowKey:e=>e.service+e.statement,onRow:e=>i(r===e.service+e.statement?null:e.service+e.statement),empty:(0,F.jsx)(U,{title:`No queries recorded`,children:`pg, mysql2 and ioredis are instrumented automatically when installed.`}),cols:[{key:`st`,label:`Statement`,render:e=>(0,F.jsxs)(`div`,{className:`max-w-[640px]`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`mono text-[12px] truncate`,children:e.statement}),e.nPlusOne&&(0,F.jsx)(W,{kind:`serious`,children:`N+1 suspect`})]}),r===e.service+e.statement&&(0,F.jsxs)(`div`,{className:`mt-2`,onClick:e=>e.stopPropagation(),children:[(0,F.jsx)(`div`,{className:`flex justify-end mb-1`,children:(0,F.jsx)(Wa,{text:e.statement,className:`btn h-6 text-[11px]`})}),(0,F.jsx)(rB,{text:e.statement})]})]})},{key:`sys`,label:`System`,sort:e=>e.system,render:e=>(0,F.jsx)(`span`,{className:`pill`,children:e.system})},{key:`svc`,label:`Application`,sort:e=>e.service,render:e=>(0,F.jsx)(`span`,{className:`text-ink2`,children:e.service})},{key:`calls`,label:`Calls`,num:!0,sort:e=>e.calls,render:e=>B(e.calls)},{key:`per`,label:`Per request`,num:!0,sort:e=>e.perRequest,render:e=>(0,F.jsxs)(`span`,{title:`max ${e.maxPerRequest} in one request`,style:{color:e.nPlusOne?`#ffb38a`:void 0},children:[B(e.perRequest),` `,(0,F.jsxs)(`span`,{className:`text-mute text-[11px]`,children:[`max `,e.maxPerRequest]})]})},{key:`avg`,label:`Avg`,num:!0,sort:e=>e.avg,render:e=>z(e.avg)},{key:`p95`,label:`p95`,num:!0,sort:e=>e.p95,render:e=>z(e.p95)},{key:`total`,label:`Total time`,num:!0,sort:e=>e.total,render:e=>z(e.total)}]}):(0,F.jsx)(H,{})}):(0,F.jsx)(V,{pad:!1,children:o.error?(0,F.jsx)(Ra,{error:o.error}):o.data?(0,F.jsx)(Ka,{rows:o.data,initialSort:`calls`,empty:(0,F.jsx)(U,{title:`No outbound calls recorded`}),cols:[{key:`h`,label:`Host`,sort:e=>e.host,render:e=>(0,F.jsx)(`span`,{className:`mono`,children:e.host})},{key:`s`,label:`Called from`,sort:e=>e.service,render:e=>(0,F.jsx)(`span`,{className:`text-ink2`,children:e.service})},{key:`calls`,label:`Calls`,num:!0,sort:e=>e.calls,render:e=>B(e.calls)},{key:`err`,label:`Failures`,num:!0,sort:e=>e.errors,render:e=>e.errors?(0,F.jsxs)(`span`,{style:{color:`#ff8a8a`},children:[B(e.errors),` (`,Sa(e.errors/e.calls*100),`)`]}):(0,F.jsx)(`span`,{className:`text-mute`,children:`0`})},{key:`avg`,label:`Avg`,num:!0,sort:e=>e.avg,render:e=>z(e.avg)},{key:`p95`,label:`p95`,num:!0,sort:e=>e.p95,render:e=>z(e.p95)}]}):(0,F.jsx)(H,{})})]})}var GB=({children:e})=>(0,F.jsx)(`code`,{className:`mono text-[11.5px] text-ink2 bg-[#1b1b24] border border-line rounded px-1 py-[1px]`,children:e});function KB({name:e,guessed:t,more:n=0,strong:r}){return e?(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 whitespace-nowrap`,children:[(0,F.jsx)(`span`,{className:r?`font-medium`:`text-ink2`,children:e}),t&&(0,F.jsx)(`span`,{className:`text-[10.5px] text-mute border border-line rounded px-1 py-[0.5px]`,title:`No tenant was set for these requests; this is the email domain`,children:`email domain`}),n>0&&(0,F.jsxs)(`span`,{className:`text-[11px] text-mute`,children:[`+`,n]})]}):(0,F.jsx)(`span`,{className:`text-mute`,children:`—`})}function qB(){let e=I(),t=L(),n=ht(),[r,i]=(0,v.useState)(`user`),[a]=zn(),[o,s]=(0,v.useState)(()=>a.get(`tenant`)??``),{data:c,error:l}=P(`/api/users${e.q({groupBy:r===`tenant`?`tenant`:``})}`,[e.tick,r]),u=o.toLowerCase(),d=c?c.filter(e=>r===`user`==(e.userId!==void 0)):null,f=!!d&&(d.length>0||!c.length),p=(d||[]).filter(e=>!o||(r===`user`?[e.userId,e.tenant]:[e.tenant]).some(e=>e&&String(e).toLowerCase().includes(u)));return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ia,{icon:(0,F.jsx)(Ui,{size:18,className:`text-brand`}),title:`Users`,sub:(0,F.jsxs)(`span`,{className:`flex flex-col gap-1.5 mt-0.5`,children:[(0,F.jsxs)(`span`,{children:[`Who is affected. Users come from `,(0,F.jsx)(GB,{children:`req.user.id`}),`, `,(0,F.jsx)(GB,{children:`http.getUserId`}),` or `,(0,F.jsx)(GB,{children:`obzerver.setUser()`}),`.`]}),(0,F.jsxs)(`span`,{children:[`Tenants come from `,(0,F.jsx)(GB,{children:`req.user.tenantId`}),` / `,(0,F.jsx)(GB,{children:`orgId`}),`, `,(0,F.jsx)(GB,{children:`http.getTenantId`}),` or `,(0,F.jsx)(GB,{children:`obzerver.setTenant()`}),`; without them, the email domain.`]})]})}),(0,F.jsx)(V,{pad:!1,title:(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsxs)(`div`,{className:`relative`,children:[(0,F.jsx)(Ei,{size:13,className:`absolute left-2.5 top-1/2 -translate-y-1/2 text-mute`}),(0,F.jsx)(`input`,{className:`input pl-8 w-[260px] h-7`,placeholder:r===`user`?`Filter users or tenants`:`Filter tenants`,value:o,onChange:e=>s(e.target.value)})]}),(0,F.jsx)(Ga,{value:r,onChange:i,options:[{id:`user`,label:`By user`},{id:`tenant`,label:`By tenant`}]})]}),children:(0,F.jsx)(`div`,{className:`pt-2`,children:l?(0,F.jsx)(Ra,{error:l}):f?r===`user`?(0,F.jsx)(Ka,{rows:p,initialSort:`c`,onRow:e=>n(t(`/users/${ka(e.userId)}`)),rowKey:e=>e.userId,paged:!0,noun:`users`,resetKey:`${o}|${r}|${e.service}|${e.env}`,empty:d.length>0?(0,F.jsx)(U,{title:`No users match the filter`,children:`Change or clear the filter above to see more.`}):(0,F.jsx)(U,{title:`No identified users`,children:`Set http.getUserId in the SDK options, or populate req.user.`}),cols:[{key:`u`,label:`User`,sort:e=>e.userId,render:e=>(0,F.jsx)(`span`,{className:`font-medium`,children:e.userId})},{key:`t`,label:`Tenant`,sort:e=>e.tenant||``,render:e=>e.tenant?(0,F.jsx)(Nn,{to:t(Aa(e.tenant,e.tenantGuessed)),onClick:e=>e.stopPropagation(),className:`hover:underline decoration-dotted underline-offset-4`,children:(0,F.jsx)(KB,{name:e.tenant,guessed:e.tenantGuessed,more:e.tenants>1?e.tenants-1:0})}):(0,F.jsx)(KB,{name:null})},{key:`c`,label:`Calls`,num:!0,sort:e=>e.calls,render:e=>B(e.calls)},{key:`o`,label:`Operations`,num:!0,sort:e=>e.operations,render:e=>B(e.operations)},{key:`f`,label:`Failure rate`,num:!0,sort:e=>e.failureRate,render:e=>(0,F.jsxs)(`span`,{style:{color:e.failureRate>2?`#ff8a8a`:e.failureRate>0?`var(--color-ink2)`:`var(--color-mute)`},children:[Sa(e.failureRate),` `,(0,F.jsxs)(`span`,{className:`text-mute text-[11px]`,children:[`(`,e.failed,`)`]})]})},{key:`a`,label:`Avg latency`,num:!0,sort:e=>e.avg,render:e=>z(e.avg)},{key:`l`,label:`Last seen`,num:!0,sort:e=>e.lastSeen,render:e=>(0,F.jsx)(`span`,{className:`text-ink2`,children:(0,F.jsx)(ro,{ts:e.lastSeen})})}]},`users`):(0,F.jsx)(Ka,{rows:p,initialSort:`n`,rowKey:e=>`${e.tenant}|${e.guessed}`,onRow:e=>{e.tenant!==`(no tenant)`&&n(t(Aa(e.tenant,e.guessed)))},paged:!0,noun:`tenants`,resetKey:`${o}|${r}|${e.service}|${e.env}`,empty:d.length>0?(0,F.jsx)(U,{title:`No tenants match the filter`,children:`Change or clear the filter above to see more.`}):(0,F.jsx)(U,{title:`No tenants yet`,children:`Set http.getTenantId in the SDK options, or req.user.tenantId; without them, users are grouped by email domain.`}),cols:[{key:`c`,label:`Tenant`,sort:e=>e.tenant,render:e=>(0,F.jsx)(KB,{name:e.tenant,guessed:e.guessed,strong:!0})},{key:`u`,label:`Users`,num:!0,sort:e=>e.users,render:e=>B(e.users)},{key:`n`,label:`Calls`,num:!0,sort:e=>e.calls,render:e=>B(e.calls)},{key:`f`,label:`Failure rate`,num:!0,sort:e=>e.failureRate,render:e=>(0,F.jsxs)(`span`,{style:{color:e.failureRate>2?`#ff8a8a`:void 0},children:[Sa(e.failureRate),` `,(0,F.jsxs)(`span`,{className:`text-mute text-[11px]`,children:[`(`,e.failed,`)`]})]})},{key:`l`,label:`Last seen`,num:!0,sort:e=>e.lastSeen,render:e=>(0,F.jsx)(ro,{ts:e.lastSeen})}]},`tenants`):(0,F.jsx)(H,{})})})]})}function JB(e){let t=new Date(e),n=t.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,hour12:!1});return`${t.getDate()}/${t.getMonth()+1} ${n}`}function YB(e){if(e<6e4)return`<1m`;let t=Math.round(e/6e4);return t<60?`${t}m`:`${Math.floor(t/60)}h${t%60?` ${t%60}m`:``}`}function XB(e){return`Session #${e.n} · ${JB(e.start)} (${YB(e.end-e.start)})`}function ZB({s:e,sticky:t,open:n,onClick:r}){return(0,F.jsxs)(`div`,{onClick:r,role:r?`button`:void 0,"aria-expanded":r?!!n:void 0,className:`flex items-center justify-between gap-3 px-3.5 py-2 border-b border-line ${n?`bg-[#17171f]`:`bg-[#111118]`} ${t?`sticky top-0 z-[1]`:``} ${r?`cursor-pointer hover:bg-[#191922] select-none`:``}`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1.5 text-ink text-[12.5px] font-medium tabular-nums`,children:[r&&(0,F.jsx)(n?Er:Or,{size:14,className:n?`text-brand`:`text-mute`}),XB(e)]}),(0,F.jsxs)(`span`,{className:`flex items-center gap-2.5 text-mute text-[11.5px] tabular-nums whitespace-nowrap`,children:[B(e.actions),` `,e.actions===1?`action`:`actions`,e.failed>0&&(0,F.jsxs)(`span`,{className:`text-[11px] font-medium px-1.5 py-[1px] rounded`,style:{color:`var(--color-crit)`,background:`color-mix(in srgb, var(--color-crit) 16%, transparent)`},children:[B(e.failed),` failed`]})]})]})}function QB({items:e}){let t=ht(),n=L();return(0,F.jsx)(F.Fragment,{children:e.map(e=>(0,F.jsxs)(`div`,{className:`flex items-center gap-3 px-3.5 py-1.5 border-b border-[#1b1b23] hover:bg-[#16161e] cursor-pointer`,onClick:()=>t(n(`/executions/${e.id}`)),children:[(0,F.jsx)(`span`,{className:`mono text-mute text-[11.5px] w-16`,children:Ea(e.ts)}),(0,F.jsxs)(`span`,{className:`flex-1 min-w-0 flex items-center`,children:[(0,F.jsx)(Ua,{name:e.name}),e.error_message&&(0,F.jsx)(`span`,{className:`text-[#ff9b9b] text-[12px] ml-2 truncate`,children:e.error_message})]}),(0,F.jsx)(Va,{status:e.status}),(0,F.jsx)(`span`,{className:`w-16 text-right tabular-nums`,children:z(e.duration)})]},e.id))})}function $B({s:e}){return(0,F.jsxs)(`div`,{children:[(0,F.jsx)(ZB,{s:e,sticky:!0}),(0,F.jsx)(QB,{items:e.items||[]})]})}function eV({ts:e}){let t=e!=null&&Date.now()-e<3e5;return(0,F.jsxs)(`div`,{className:`flex items-center gap-3 rounded-lg border border-line bg-panel px-3.5 py-2`,children:[(0,F.jsx)(`span`,{className:`w-2 h-2 rounded-full ${t?`bg-good shadow-[0_0_0_3px_rgba(12,163,12,0.25)]`:`bg-mute`}`}),(0,F.jsxs)(`div`,{className:`leading-tight`,children:[(0,F.jsx)(`div`,{className:`text-[10.5px] uppercase tracking-wider text-mute`,children:`Last seen`}),(0,F.jsx)(`div`,{className:`text-ink text-[14px] font-semibold`,children:e?t?`Active now`:(0,F.jsx)(ro,{ts:e}):`Never`})]}),e!=null&&(0,F.jsx)(`div`,{className:`text-mute text-[11.5px] tabular-nums pl-3 border-l border-line`,children:Ea(e,!0)})]})}function tV(){let{id:e=``}=yt(),t=I(),n=L(),r=ht(),{data:i,error:a}=P(`/api/users/${encodeURIComponent(e)}${t.q()}`,[t.tick]);if(a)return(0,F.jsx)(Ra,{error:a});if(!i)return(0,F.jsx)(H,{});let o=i.sessions,s=i.sessionCount>o.length;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Nn,{to:n(`/users`),className:`text-mute hover:text-ink text-[12px] -mb-2`,children:`← Users`}),(0,F.jsx)(Ia,{title:e,sub:i.tenants.length?(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[`tenant `,i.tenants.map((e,t)=>(0,F.jsxs)(`span`,{children:[t>0&&`, `,(0,F.jsx)(Nn,{to:n(Aa(e,i.tenantGuessed)),className:`text-ink2 hover:text-ink underline decoration-dotted underline-offset-4`,children:e})]},e)),i.tenantGuessed&&(0,F.jsx)(`span`,{className:`text-[10.5px] text-mute border border-line rounded px-1 py-[0.5px]`,children:`email domain`})]}):void 0,right:(0,F.jsx)(eV,{ts:i.lastSeen})}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 @3xl:grid-cols-4 gap-3`,children:[(0,F.jsx)(za,{label:`Actions in window`,value:B(i.actionCount)}),(0,F.jsx)(za,{label:`Failed`,value:B(i.failedCount),color:i.failedCount?`#ff8a8a`:void 0}),(0,F.jsx)(za,{label:`Sessions`,value:B(i.sessionCount)}),(0,F.jsx)(za,{label:`Distinct errors`,value:B(i.errors.length)})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-3 gap-3`,children:[(0,F.jsx)(V,{title:`Activity replay`,sub:s?`latest ${o.length} of ${B(i.sessionCount)} sessions, newest first`:`newest first`,pad:!1,className:`@5xl:col-span-2`,right:i.sessionCount>0&&(0,F.jsxs)(Nn,{to:n(`/users/${encodeURIComponent(e)}/sessions`),className:`text-[12px] text-ink2 hover:text-ink border border-line hover:border-line2 rounded-md px-2.5 py-1 whitespace-nowrap`,children:[`All sessions (`,B(i.sessionCount),`) →`]}),children:o.length===0?(0,F.jsx)(U,{title:`No activity in this window`}):(0,F.jsx)(`div`,{className:`max-h-[560px] overflow-auto`,children:o.map(e=>(0,F.jsx)($B,{s:e},e.n))})}),(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)(V,{title:`Actions`,pad:!1,children:(0,F.jsx)(Ka,{rows:i.operations,cols:[{key:`n`,label:`Operation`,render:e=>(0,F.jsx)(Ua,{name:e.name})},{key:`c`,label:`Calls`,num:!0,render:e=>B(e.calls)},{key:`f`,label:`Failed`,num:!0,render:e=>e.failed?(0,F.jsx)(`span`,{style:{color:`#ff8a8a`},children:e.failed}):(0,F.jsx)(`span`,{className:`text-mute`,children:`0`})}]})}),(0,F.jsx)(V,{title:`Common paths`,sub:`action → next action`,pad:!1,children:i.paths.length?i.paths.map(e=>(0,F.jsxs)(`div`,{className:`flex justify-between gap-2 px-3.5 py-1.5 border-b border-[#1b1b23] text-[12px]`,children:[(0,F.jsx)(`span`,{className:`mono truncate`,children:e.path}),(0,F.jsx)(`span`,{className:`tabular-nums text-ink2`,children:e.n})]},e.path)):(0,F.jsx)(U,{title:`Not enough actions`})}),i.errors.length>0&&(0,F.jsx)(V,{title:`Errors hit`,pad:!1,children:(0,F.jsx)(Ka,{rows:i.errors,onRow:e=>r(n(`/errors/${e.fingerprint}`)),cols:[{key:`c`,label:`Error`,render:e=>(0,F.jsx)(`span`,{className:`text-[#ff9b9b]`,children:e.class})},{key:`n`,label:`Count`,num:!0,render:e=>e.n}]})})]})]})]})}function nV({id:e,n:t}){let n=I(),r=n.q(),{data:i,error:a}=P(`/api/users/${encodeURIComponent(e)}/sessions${r}${r?`&`:`?`}session=${t}`,[n.tick,t]);return a?(0,F.jsx)(`div`,{className:`px-4 py-3 text-[#ff8a8a] text-[12px] border-b border-line`,children:a.message}):i?.session?(0,F.jsx)(`div`,{className:`bg-[#0f0f15] border-b border-line`,children:(0,F.jsx)(QB,{items:i.session.items})}):(0,F.jsx)(`div`,{className:`py-3 border-b border-line`,children:(0,F.jsx)(H,{})})}function rV(){let{id:e=``}=yt(),t=I(),n=L(),[r,i]=zn(),a=Number(r.get(`session`))||0,[o,s]=Ja(),[c,l]=(0,v.useState)(0),u=`/api/users/${encodeURIComponent(e)}`,{data:d,error:f}=P(`${u}/sessions${t.q()}`,[t.tick]),p=P(`${u}${t.q()}`,[t.tick]);if(f)return(0,F.jsx)(Ra,{error:f});if(!d)return(0,F.jsx)(H,{});let m=d.sessions,h=Math.max(1,Math.ceil(m.length/o)),g=Math.min(c,h-1),_=m.slice(g*o,g*o+o),y=e=>{let t=new URLSearchParams(r);e===a?t.delete(`session`):t.set(`session`,String(e)),i(t,{replace:!0})};return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4 @5xl:w-4/5`,children:[(0,F.jsxs)(Nn,{to:n(`/users/${encodeURIComponent(e)}`),className:`text-mute hover:text-ink text-[12px] -mb-2`,children:[`← `,e]}),(0,F.jsx)(Ia,{title:`Sessions`,sub:(0,F.jsxs)(F.Fragment,{children:[e,` · `,B(m.length),` `,m.length===1?`session`:`sessions`,` in this window · a new session starts after 30 minutes without actions`]}),right:p.data&&(0,F.jsx)(eV,{ts:p.data.lastSeen})}),(0,F.jsx)(V,{title:`All sessions`,sub:`newest first · click a session to see its actions`,pad:!1,children:m.length===0?(0,F.jsx)(U,{title:`No sessions in this window`}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`border-t border-line`,children:_.map(t=>(0,F.jsxs)(`div`,{children:[(0,F.jsx)(ZB,{s:t,open:t.n===a,onClick:()=>y(t.n)}),t.n===a&&(0,F.jsx)(nV,{id:e,n:t.n})]},t.n))}),(0,F.jsx)(Ya,{total:m.length,page:g,size:o,onPage:l,onSize:e=>{s(e),l(0)},noun:`sessions`})]})})]})}var iV={open:{kind:`crit`,label:`Open`},in_progress:{kind:`warn`,label:`In progress`},verifying:{kind:`serious`,label:`Verifying`},unverified:{kind:`neutral`,label:`Unverified`},resolved:{kind:`good`,label:`Resolved`},closed:{kind:`good`,label:`Closed`}},aV={critical:`#d03b3b`,high:`#ec835a`,medium:`#fab219`,low:`#82829a`};function oV(){let e=I(),t=L(),n=ht(),[r,i]=(0,v.useState)(`active`),[a,o]=(0,v.useState)(!1),{data:s,error:c}=P(`/api/issues`,[e.tick]);if(c)return(0,F.jsx)(Ra,{error:c});if(!s)return(0,F.jsx)(H,{});let l=s.filter(e=>r===`all`||(r===`active`?![`closed`,`resolved`].includes(e.status):[`closed`,`resolved`].includes(e.status)));return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ia,{icon:(0,F.jsx)(Pr,{size:18,className:`text-brand`}),title:`Issues`,sub:`Track what needs fixing. Issues linked to an error or route verify themselves against the next release and close or reopen automatically.`,right:(0,F.jsxs)(`button`,{className:`btn btn-primary`,onClick:()=>o(!0),children:[(0,F.jsx)(_i,{size:14}),`New issue`]})}),(0,F.jsx)(V,{pad:!1,title:(0,F.jsx)(Ga,{value:r,onChange:i,options:[{id:`active`,label:`Active`},{id:`done`,label:`Done`},{id:`all`,label:`All`}]}),children:(0,F.jsx)(`div`,{className:`pt-2`,children:(0,F.jsx)(Ka,{rows:l,onRow:e=>n(t(`/issues/${e.id}`)),empty:(0,F.jsx)(U,{title:`No issues`,children:`Create one from an error group, a failed execution, or let an alert open it.`}),cols:[{key:`id`,label:`#`,render:e=>(0,F.jsxs)(`span`,{className:`text-mute`,children:[`#`,e.id]}),width:50},{key:`t`,label:`Title`,render:e=>(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`font-medium`,children:e.title}),(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px]`,children:[e.service||`no service`,e.sourceType?` · from ${e.sourceType}`:``]})]})},{key:`s`,label:`Status`,render:e=>(0,F.jsx)(W,{kind:iV[e.status]?.kind||`neutral`,children:iV[e.status]?.label||e.status})},{key:`sev`,label:`Severity`,render:e=>(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 capitalize`,children:[(0,F.jsx)(`span`,{className:`w-2 h-2 rounded-full`,style:{background:aV[e.severity]}}),e.severity]})},{key:`tk`,label:`Ticket`,render:e=>e.ticket?(0,F.jsx)(fz,{ticket:e.ticket}):(0,F.jsx)(`span`,{className:`text-mute`,children:`—`})},{key:`o`,label:`Owner`,render:e=>e.owner||(0,F.jsx)(`span`,{className:`text-mute`,children:`unassigned`})},{key:`d`,label:`Due`,render:e=>e.due?(0,F.jsx)(`span`,{style:{color:e.due<Date.now()&&![`closed`,`resolved`].includes(e.status)?`#ff8a8a`:void 0},children:Ea(e.due,!0).split(` `).slice(0,2).join(` `)}):(0,F.jsx)(`span`,{className:`text-mute`,children:`—`})},{key:`u`,label:`Updated`,num:!0,render:e=>(0,F.jsx)(`span`,{className:`text-mute`,children:(0,F.jsx)(ro,{ts:e.updated})})}]})})}),a&&(0,F.jsx)(sV,{onClose:()=>o(!1),onCreated:e=>n(t(`/issues/${e}`))})]})}function sV({onClose:e,onCreated:t}){let n=I(),[r,i]=(0,v.useState)({title:``,severity:`medium`,owner:``,description:``,service:``,sourceType:``,sourceRef:``}),{settings:a,connected:o}=uz(),[s,c]=(0,v.useState)(null),l=s??(a?.autoCreate||``),[u,d]=(0,v.useState)(``);return(0,F.jsx)($a,{open:!0,onClose:e,title:`New issue`,children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)(G,{label:`Title`,children:(0,F.jsx)(`input`,{className:`input`,autoFocus:!0,value:r.title,onChange:e=>i({...r,title:e.target.value})})}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,F.jsx)(G,{label:`Severity`,children:(0,F.jsx)(`select`,{className:`select`,value:r.severity,onChange:e=>i({...r,severity:e.target.value}),children:Object.keys(aV).map(e=>(0,F.jsx)(`option`,{children:e},e))})}),(0,F.jsx)(G,{label:`Owner`,children:(0,F.jsx)(`input`,{className:`input`,value:r.owner,onChange:e=>i({...r,owner:e.target.value})})}),(0,F.jsx)(G,{label:`Application`,children:(0,F.jsxs)(`select`,{className:`select`,value:r.service,onChange:e=>i({...r,service:e.target.value}),children:[(0,F.jsx)(`option`,{value:``,children:`—`}),n.meta?.services.map(e=>(0,F.jsx)(`option`,{children:e.id},e.id))]})}),(0,F.jsx)(G,{label:`Measurable route (optional)`,hint:`e.g. "POST /checkout" enables auto-verification`,children:(0,F.jsx)(`input`,{className:`input`,value:r.sourceRef,onChange:e=>i({...r,sourceRef:e.target.value,sourceType:e.target.value?`operation`:``})})})]}),(0,F.jsx)(G,{label:`Description`,children:(0,F.jsx)(`textarea`,{className:`input`,rows:4,value:r.description,onChange:e=>i({...r,description:e.target.value})})}),o.length>0&&(0,F.jsx)(G,{label:`Also create a ticket in`,children:(0,F.jsxs)(`select`,{className:`select w-56`,value:l,onChange:e=>c(e.target.value),children:[(0,F.jsx)(`option`,{value:``,children:`Don't create a ticket`}),o.map(e=>(0,F.jsx)(`option`,{value:e,children:lz[e]},e))]})}),u&&(0,F.jsx)(`div`,{className:`text-[12.5px] text-[#ff8a8a]`,children:u}),(0,F.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,F.jsx)(`button`,{className:`btn`,onClick:e,children:`Cancel`}),(0,F.jsx)(`button`,{className:`btn btn-primary`,disabled:!r.title,onClick:async()=>{let e=await N(`/api/issues`,{method:`POST`,json:{...r,tracker:l||void 0}});e.ticketError&&window.alert(`Issue #${e.id} was created, but the ticket was not: ${e.ticketError}`),t(e.id)},children:`Create`})]})]})})}function cV(e,t){let n=Oa(e,t);return n?{deltaText:n.text,deltaDir:n.dir,deltaTitle:`Compared with the previous period of the same length`}:{}}function lV(e,t,n,r=``){if(e==null||t==null)return null;let i=e=>`${n(e)}${r}`,a=t===0?e===0?1:1/0:e/t;return e===0||a>=.9&&a<=1.1?{text:`all tenants: ${n(t)}${r?` (${r.slice(2)})`:``}`,worse:!1}:Number.isFinite(a)?{text:a>1?`${a.toFixed(1)}× all tenants (${i(t)})`:`${Math.round((1-a)*100)}% below all tenants (${i(t)})`,worse:a>1.1}:{text:`all tenants: ${n(t)}${r?` (${r.slice(2)})`:``}`,worse:!0}}function uV(){let{id:e=``}=yt(),[t]=zn(),n=t.get(`guessed`)===`1`,r=I(),i=ht(),a=L(),o=r.q(),{data:s,error:c}=P(`/api/tenants/${ka(e)}${o}${n?`${o?`&`:`?`}guessed=1`:``}`,[r.tick,n]);if(c)return(0,F.jsx)(Ra,{error:c});if(!s)return(0,F.jsx)(H,{});let l=s.kpis,u=lV(l.failureRate,l.allFailureRate,e=>Sa(e),`, ${B(l.allFailed)} ${l.allFailed===1?`failure`:`failures`}`),d=lV(l.p95,l.allP95,e=>z(e)),f=a(`/users?tenant=${ka(e)}`);return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Nn,{to:a(`/users`),className:`text-mute hover:text-ink text-[12px] -mb-2`,children:`← Users`}),(0,F.jsx)(Ia,{icon:(0,F.jsx)(xr,{size:18}),title:e,sub:n?(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[`Tenant `,(0,F.jsx)(`span`,{className:`text-[10.5px] text-mute border border-line rounded px-1 py-[0.5px]`,children:`email domain`}),` requests without a tenant, from users `,(0,F.jsxs)(`span`,{className:`mono`,children:[`@`,e]})]}):`Tenant`,right:(0,F.jsx)(eV,{ts:s.lastSeen})}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 @3xl:grid-cols-3 @6xl:grid-cols-5 gap-3`,children:[(0,F.jsx)(za,{label:`Requests`,value:B(l.requests),...cV(l.requests,l.prevRequests),badWhen:`none`,sub:l.prevRequests?`${B(l.prevRequests)} in the previous period`:`no data for the previous period`}),(0,F.jsx)(za,{label:`Failure rate`,value:(0,F.jsxs)(F.Fragment,{children:[Sa(l.failureRate),l.failed>0&&(0,F.jsxs)(`span`,{className:`text-mute text-[12px] font-normal ml-1.5`,children:[B(l.failed),` failed`]})]}),color:l.failureRate>0&&u?.worse?`#ff8a8a`:void 0,...cV(l.failureRate,l.prevFailureRate),badWhen:`up`,sub:u?(0,F.jsx)(`span`,{className:l.failureRate>0&&u.worse?`text-[#ff8a8a]`:``,children:u.text}):void 0}),(0,F.jsx)(za,{label:`p95 latency`,value:z(l.p95),color:d?.worse?`#ffb27a`:void 0,...cV(l.p95,l.prevP95),badWhen:`up`,sub:d?(0,F.jsx)(`span`,{className:d.worse?`text-[#ffb27a]`:``,children:d.text}):void 0}),(0,F.jsx)(za,{label:`Active users`,value:B(l.users),...cV(l.users,l.prevUsers),badWhen:`down`,sub:l.prevRequests?`${B(l.prevUsers)} in the previous period`:`no data for the previous period`,onClick:()=>i(f)}),(0,F.jsx)(za,{label:`Errors`,value:B(l.errors),color:l.errors?`#ff8a8a`:void 0,sub:l.incidents?`${l.incidents} open ${l.incidents===1?`incident`:`incidents`}`:`no open incidents`})]}),(0,F.jsx)(tz,{title:`Requests`,sub:`requests and failures over time`,series:[{key:`count`,label:`Requests`,color:XR[0]},{key:`failed`,label:`Failed`,color:ZR.crit}],children:(0,F.jsx)(ez,{data:s.series.points,height:170,series:[{key:`count`,label:`Requests`,color:XR[0],type:`area`},{key:`failed`,label:`Failed`,color:ZR.crit,type:`line`}],fmt:e=>B(e)})}),s.incidents.length>0&&(0,F.jsx)(V,{title:`Open incidents`,sub:`from errors that hit this tenant`,pad:!1,children:(0,F.jsx)(Ka,{rows:s.incidents,rowKey:e=>e.id,onRow:e=>i(a(`/issues/${e.id}`)),cols:[{key:`t`,label:`Incident`,render:e=>(0,F.jsx)(`span`,{className:`text-ink`,children:e.title})},{key:`s`,label:`Status`,render:e=>(0,F.jsx)(W,{kind:iV[e.status]?.kind||`neutral`,children:iV[e.status]?.label||e.status})},{key:`u`,label:`Updated`,num:!0,render:e=>(0,F.jsx)(ro,{ts:e.updated,className:`text-mute`})}]})}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-2 gap-3 items-start`,children:[(0,F.jsx)(V,{title:`Operations`,sub:`what this tenant uses, busiest first`,pad:!1,children:(0,F.jsx)(Ka,{rows:s.operations,paged:!0,noun:`operations`,resetKey:`${e}|${r.service}|${r.env}`,initialSort:`c`,rowKey:e=>`${e.service}|${e.name}`,onRow:e=>i(a(qz(e.kind,e.service,e.name))),empty:(0,F.jsx)(U,{title:`No requests in this window`}),cols:[{key:`o`,label:`Operation`,sort:e=>e.name,render:e=>(0,F.jsx)(Ua,{name:e.name})},{key:`c`,label:`Calls`,num:!0,sort:e=>e.calls,render:e=>B(e.calls)},{key:`f`,label:`Failure rate`,num:!0,sort:e=>e.failureRate??0,render:e=>(0,F.jsxs)(`span`,{style:{color:e.failed?`#ff8a8a`:void 0},children:[Sa(e.failureRate),` `,(0,F.jsxs)(`span`,{className:`text-mute`,children:[`(`,e.failed,`)`]})]})},{key:`p`,label:`p95`,num:!0,sort:e=>e.p95??0,render:e=>z(e.p95)}]})}),(0,F.jsx)(V,{title:`Users`,sub:(0,F.jsxs)(F.Fragment,{children:[`busiest first · `,(0,F.jsx)(Nn,{to:f,className:`text-ink2 hover:text-ink underline decoration-dotted underline-offset-4`,children:`in the Users list`})]}),pad:!1,children:(0,F.jsx)(Ka,{rows:s.users,paged:!0,noun:`users`,resetKey:`${e}|${r.service}|${r.env}`,initialSort:`c`,rowKey:e=>e.userId,onRow:e=>i(a(`/users/${ka(e.userId)}`)),empty:(0,F.jsx)(U,{title:`No identified users in this window`}),cols:[{key:`u`,label:`User`,sort:e=>e.userId,render:e=>(0,F.jsx)(`span`,{className:`font-medium`,children:e.userId})},{key:`c`,label:`Calls`,num:!0,sort:e=>e.calls,render:e=>B(e.calls)},{key:`f`,label:`Failure rate`,num:!0,sort:e=>e.failureRate??0,render:e=>(0,F.jsxs)(`span`,{style:{color:e.failed?`#ff8a8a`:void 0},children:[Sa(e.failureRate),` `,(0,F.jsxs)(`span`,{className:`text-mute`,children:[`(`,e.failed,`)`]})]})},{key:`l`,label:`Last seen`,num:!0,sort:e=>e.lastSeen,render:e=>(0,F.jsx)(ro,{ts:e.lastSeen,className:`text-ink2`})}]})})]}),(0,F.jsx)(V,{title:`Errors`,sub:`that hit this tenant, most frequent first`,pad:!1,children:(0,F.jsx)(Ka,{rows:s.errors,paged:!0,noun:`errors`,resetKey:`${e}|${r.service}|${r.env}`,initialSort:`n`,rowKey:e=>e.fingerprint,onRow:e=>i(a(`/errors/${ka(e.fingerprint)}`)),empty:(0,F.jsx)(U,{title:`No errors for this tenant in this window`}),cols:[{key:`e`,label:`Error`,render:e=>(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(`span`,{className:`mono text-[#ff9b9b]`,children:e.class}),` `,(0,F.jsx)(`span`,{className:`text-ink2 truncate`,children:e.message})]})},{key:`n`,label:`Events`,num:!0,sort:e=>e.n,render:e=>B(e.n)},{key:`u`,label:`Users`,num:!0,sort:e=>e.users,render:e=>B(e.users)},{key:`l`,label:`Last seen`,num:!0,sort:e=>e.last,render:e=>(0,F.jsx)(ro,{ts:e.last,className:`text-ink2`})}]})})]})}var dV=e=>new Date(e).toLocaleString(`en-US`,{month:`long`,day:`numeric`,hour:`numeric`,minute:`2-digit`}),fV=e=>String(e).padStart(2,`0`),pV=(e,t)=>{let n=new Date(e),r=`${fV(n.getHours())}:${fV(n.getMinutes())}`,i=`${fV(n.getMonth()+1)}/${fV(n.getDate())}`;return t<=72e6?r:t<=2592e5?`${i} ${r}`:i},mV=({color:e})=>(0,F.jsx)(`span`,{className:`inline-block w-[2px] h-[11px] rounded-full align-[-1px]`,style:{background:e}});function hV({title:e,sub:t,children:n}){return(0,F.jsxs)(`section`,{className:`flex flex-col gap-2.5`,children:[(0,F.jsxs)(`div`,{className:`flex items-baseline gap-2.5 px-0.5`,children:[(0,F.jsx)(`h2`,{className:`text-[15px] font-medium tracking-tight`,children:e}),(0,F.jsx)(`span`,{className:`mono text-[10.5px] uppercase tracking-[.12em] text-mute`,children:t})]}),(0,F.jsx)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-2 gap-3`,children:n})]})}function gV({now:e,prev:t,unit:n,badWhen:r=`up`}){if(e==null||t==null||n===`pct`&&!t)return null;let i=n===`pp`?e-t:(e-t)/t*100,a=Math.abs(i)<(n===`pp`?.05:.5),o=i>0,s=!a&&(o?r===`up`:r===`down`),c=a?si:o?Bi:zi,l=n===`pp`?`${o?`+`:`−`}${Math.abs(i).toFixed(2)}pp`:`${o?`+`:`−`}${Math.abs(i).toFixed(0)}%`;return(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-[12px] text-ink2`,title:`Average over this window compared with the window of the same length before it`,children:[(0,F.jsx)(c,{size:13,style:{color:a?`var(--color-mute)`:s?`#f0506e`:`#3fb68b`}}),a?`no change`:l,` since last period`]})}function _V({value:e,color:t,fmt:n}){return e==null?null:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2 text-[12px] text-ink2`,children:[(0,F.jsx)(mV,{color:t}),`AVG`,(0,F.jsx)(`span`,{className:`mono text-[11.5px] font-semibold px-1.5 py-[2px] rounded`,style:{background:`#2a2a33`,color:`#e8e8ef`},children:n(e)})]})}function vV({title:e,trend:t,right:n,children:r}){return(0,F.jsxs)(`div`,{className:`rounded-xl border border-line overflow-hidden`,style:{background:`linear-gradient(180deg, #17171d 0%, #121217 100%)`},children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-5 h-[52px] border-b border-line`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-3 min-w-0`,children:[(0,F.jsx)(`span`,{className:`font-medium text-[14px] whitespace-nowrap`,children:e}),t]}),(0,F.jsx)(`div`,{className:`flex items-center gap-4 shrink-0`,children:n})]}),(0,F.jsx)(`div`,{className:`px-3 pt-4 pb-2`,children:r})]})}var yV=({series:e})=>(0,F.jsx)(F.Fragment,{children:e.map(e=>(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-[12px] text-ink2`,children:[(0,F.jsx)(mV,{color:e.color}),e.label]},e.key))});function bV({active:e,payload:t,label:n,series:r,fmt:i,pinned:a,hint:o,extra:s}){if(!e||!t?.length)return null;let c=t[0].payload;return(0,F.jsxs)(`div`,{className:`mono rounded-md border border-[#2c2c36] px-3 py-2.5 text-[11.5px] shadow-2xl`,style:{background:`rgba(17,17,22,.97)`,minWidth:200},children:[r.filter(e=>c[e.key]!=null).map(e=>{let t=a?.[e.key],n=t!=null&&c[e.key]!=null?c[e.key]-t:null;return(0,F.jsxs)(`div`,{className:`flex items-center gap-2 py-[2px]`,children:[(0,F.jsx)(mV,{color:e.color}),(0,F.jsxs)(`span`,{className:`font-semibold text-ink`,children:[e.label,`: `,i(c[e.key],e.key)]}),n!=null&&(0,F.jsxs)(`span`,{className:`text-mute`,children:[`(`,n>=0?`+`:`−`,i(Math.abs(n),e.key),` vs pin)`]})]},e.key)}),s?.(c),(0,F.jsx)(`div`,{className:`text-ink2 mt-1.5`,children:dV(n)}),(0,F.jsx)(`div`,{className:`text-mute mt-2 pt-2 border-t border-[#24242c]`,children:a?`Pinned ${dV(a.t)} · shift+click to unpin`:o})]})}function xV({data:e,series:t,fmt:n,yFmt:r,height:i=240,yMax:a,onInspect:o,gcKey:s,extra:c,releases:l=[]}){let u=(0,v.useRef)(!1),[d,f]=(0,v.useState)(null);if(!e.length)return(0,F.jsx)(`div`,{className:`flex items-center justify-center text-mute text-[12px]`,style:{height:i},children:`No samples in this window`});let p=s?Math.max(1,...e.map(e=>e[s]||0)):1,m=t.some(e=>e.kind===`bar`),h=e.length>1?e[e.length-1].t-e[0].t:36e5,g=e.length>1?e[1].t-e[0].t:h,_=l.filter(t=>t.t>=e[0].t&&t.t<=e[e.length-1].t+g).map(t=>({...t,at:e.reduce((e,n)=>n.t<=t.t&&n.t>e?n.t:e,e[0].t)})),y=e=>_.filter(t=>t.at===e),b=o?`Click to see what ran here · shift+click to pin and compare`:`Shift+click to pin and compare`;return(0,F.jsx)(`div`,{className:`relative select-none`,onMouseDownCapture:e=>{u.current=e.shiftKey},children:(0,F.jsx)(`div`,{style:{height:i},children:(0,F.jsx)(Qm,{width:`100%`,height:`100%`,children:(0,F.jsxs)(YR,{data:e,margin:{top:8,right:44,bottom:0,left:0},barGap:2,barCategoryGap:`30%`,onClick:t=>{if(!t||t.activeLabel==null)return;let n=e.find(e=>e.t===t.activeLabel);u.current?f(e=>e&&e.t===t.activeLabel?null:n):o?.(t.activeLabel)},style:{cursor:o?`pointer`:`default`},children:[(0,F.jsx)(`defs`,{children:t.filter(e=>e.kind===`area`||e.kind===`bar`).map(e=>(0,F.jsxs)(`linearGradient`,{id:`g-${e.key}`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,F.jsx)(`stop`,{offset:`0%`,stopColor:e.color,stopOpacity:e.kind===`bar`?1:.42}),(0,F.jsx)(`stop`,{offset:`100%`,stopColor:e.color,stopOpacity:e.kind===`bar`?.35:.02})]},e.key))}),(0,F.jsx)(lF,{vertical:!1,stroke:`#ffffff`,strokeOpacity:.045,strokeDasharray:`2 6`}),(0,F.jsx)(sL,{dataKey:`t`,type:m?`category`:`number`,domain:[`dataMin`,`dataMax`],scale:m?`auto`:`time`,tickFormatter:e=>pV(e,h),tick:{fill:`#6f6f7d`,fontSize:10.5,fontFamily:`var(--font-mono)`},tickLine:!1,axisLine:{stroke:`#2a2a35`},minTickGap:44,tickMargin:6}),(0,F.jsx)(wL,{yAxisId:`v`,width:64,tickLine:!1,axisLine:!1,tickCount:5,tick:{fill:`#6f6f7d`,fontSize:10.5,fontFamily:`var(--font-mono)`},tickFormatter:e=>(r??n)(e),domain:[0,a??`auto`],allowDecimals:!0}),s&&(0,F.jsx)(wL,{yAxisId:`gc`,hide:!0,domain:[0,p*6]}),(0,F.jsx)(Nm,{content:(0,F.jsx)(bV,{series:t,fmt:n,pinned:d,hint:b,extra:e=>(0,F.jsxs)(F.Fragment,{children:[y(e.t).map(e=>(0,F.jsxs)(`div`,{className:`py-[2px]`,style:{color:`#ff6b9d`},children:[`Release `,e.version,` deployed `,new Date(e.t).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,hour12:!1})]},e.version)),c?.(e)]})}),cursor:{stroke:`#ffffff`,strokeOpacity:.18,strokeDasharray:`3 3`},isAnimationActive:!1}),s&&(0,F.jsx)(aM,{yAxisId:`gc`,dataKey:s,fill:`#8a8a98`,fillOpacity:.55,barSize:1.5,isAnimationActive:!1}),t.map(e=>e.kind===`bar`?(0,F.jsx)(aM,{yAxisId:`v`,dataKey:e.key,fill:`url(#g-${e.key})`,barSize:3,radius:[2,2,0,0],isAnimationActive:!1},e.key):e.kind===`area`?(0,F.jsx)(oI,{yAxisId:`v`,type:`monotone`,dataKey:e.key,stroke:e.color,strokeWidth:1.6,fill:`url(#g-${e.key})`,dot:!1,activeDot:{r:4,fill:e.color,stroke:`#121217`,strokeWidth:2},isAnimationActive:!1,connectNulls:!0},e.key):(0,F.jsx)(LF,{yAxisId:`v`,type:`monotone`,dataKey:e.key,stroke:e.color,strokeOpacity:e.faint?.55:1,strokeWidth:e.faint?1.3:1.6,dot:!1,activeDot:{r:4,fill:e.color,stroke:`#121217`,strokeWidth:2},isAnimationActive:!1,connectNulls:!0},e.key)),_.map(e=>(0,F.jsx)(bN,{yAxisId:`v`,x:e.at,stroke:`#ff6b9d`,strokeDasharray:`3 3`,strokeOpacity:.85,label:{value:e.version,position:`insideTopLeft`,fill:`#ff6b9d`,fontSize:10.5,fontFamily:`var(--font-mono)`}},`${e.version}${e.t}`)),d&&(0,F.jsx)(bN,{yAxisId:`v`,x:d.t,stroke:`#ff9cc0`,strokeDasharray:`4 3`,strokeOpacity:.8})]})})})})}var SV={heapUsed:`#f0506e`,heapTotal:`#b0344d`,rss:`#7c7c8a`,memUtil:`#3fa58a`,cpuUtil:`#e5484d`,user:`#e5484d`,system:`#f59bb0`,elP99:`#f0506e`,elP50:`#7c7c8a`,elu:`#9085e9`},CV=e=>e>=1024?`${(e/1024).toFixed(2)} GB`:`${e.toFixed(2)} MB`,wV=e=>`${e.toFixed(2)}%`,TV=e=>`${e<10&&e%1?e.toFixed(1):Math.round(e)}%`,EV=e=>e>=1024?`${(e/1024).toFixed(1)} GB`:`${Math.round(e)} MB`,DV=`Utilization needs @obzerver/node 0.8.2 or later, which reports the V8 heap limit, the container limits and CPU time.`;function OV(){let e=I(),t=L(),n=ht(),r=P(`/api/runtime${e.q()}`,[e.tick]),i=[...new Set((r.data||[]).map(e=>e.service))],[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(``),l=a&&i.includes(a)?a:e.service||i[0]||``,u=P(l?`/api/runtime/view${e.q({service:l,instance:s})}`:null,[e.tick,l,s]),[d,f]=(0,v.useState)(null);if((0,v.useEffect)(()=>{f(null),c(``)},[l]),(0,v.useEffect)(()=>{let e=u.data?.points;!e?.length||d&&!d.auto||b(e.reduce((e,t)=>(t.elP99??0)>(e.elP99??0)?t:e,e[0]).t,!0)},[u.data]),r.error)return(0,F.jsx)(Ra,{error:r.error});if(!r.data)return(0,F.jsx)(H,{});let p=u.data,m=p?.points||[],h=p?.summary,g=p?.prev,_=m.some(e=>e.memUtil!=null||e.cpuUtil!=null),y=(r.data||[]).filter(e=>e.service===l).map(e=>e.instance);async function b(e,t=!1){let n=u.data?.bucketMs||6e4,r=await N(`/api/runtime/spike?service=${encodeURIComponent(l)}${s?`&instance=${encodeURIComponent(s)}`:``}&ts=${e}&windowMs=${Math.max(6e4,n/2)}`);f({ts:e,rows:r,auto:t}),t||document.getElementById(`what-ran`)?.scrollIntoView({behavior:`smooth`,block:`start`})}let x=e=>{b(e)},S=(e.meta?.versions||[]).filter(t=>t.service===l&&t.first>=e.from&&t.first<=e.to).map(e=>({t:e.first,version:e.version})),C=p?.byInstance||[],w=e=>XR[Math.max(0,C.findIndex(t=>t.instance===e))%XR.length],T=!s&&C.length>1,E=e=>{let t=new Map;return C.forEach((n,r)=>{for(let i of n.points)t.has(i.t)||t.set(i.t,{t:i.t}),t.get(i.t)[`i${r}`]=i[e]}),[...t.values()].sort((e,t)=>e.t-t.t)},D=C.map((e,t)=>({key:`i${t}`,label:e.instance,color:XR[t%XR.length],kind:`line`})),O=[{key:`heapUsed`,label:`Heap Used`,color:SV.heapUsed,kind:`line`},{key:`heapTotal`,label:`Heap Total`,color:SV.heapTotal,kind:`line`},{key:`rss`,label:`RSS`,color:SV.rss,kind:`line`,faint:!0}],k=[{key:`cpuUser`,label:`User`,color:SV.user,kind:`bar`},{key:`cpuSystem`,label:`System`,color:SV.system,kind:`bar`}],A=[{key:`elP99`,label:`p99`,color:SV.elP99,kind:`line`},{key:`elP50`,label:`p50`,color:SV.elP50,kind:`line`,faint:!0}],j=!s&&y.length>1;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,F.jsx)(Ia,{icon:(0,F.jsx)(zr,{size:18,className:`text-brand`}),title:`Profiler`,sub:`Memory, CPU and event-loop health for each app, sampled every 15 seconds.${j?` Across ${y.length} instances, memory and CPU time add up, while utilization and loop delay follow the busiest instance.`:``}`,right:i.length>0&&(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`select`,{className:`select`,value:l,onChange:e=>o(e.target.value),"aria-label":`Application`,children:i.map(e=>(0,F.jsx)(`option`,{children:e},e))}),y.length>1&&(0,F.jsxs)(`select`,{className:`select`,value:s,onChange:e=>c(e.target.value),"aria-label":`Instance`,children:[(0,F.jsxs)(`option`,{value:``,children:[`All instances (`,y.length,`)`]}),y.map(e=>(0,F.jsx)(`option`,{value:e,children:e},e))]})]})}),i.length?u.error?(0,F.jsx)(Ra,{error:u.error}):p?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(V,{title:`Instances`,sub:`latest sample · click one to focus on it`,pad:!1,children:(0,F.jsx)(Ka,{rows:p.instances,onRow:e=>c(e.instance===s?``:e.instance),cols:[{key:`i`,label:`Instance`,render:e=>(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`w-2.5 h-2.5 rounded-sm shrink-0`,style:{background:w(e.instance)}}),(0,F.jsx)(`span`,{className:`mono`,style:{color:e.instance===s?`#ff9cc0`:void 0},children:e.instance}),e.instance===s&&(0,F.jsx)(`span`,{className:`pill !h-5 !text-[10.5px]`,children:`focused`})]})},{key:`cu`,label:`CPU util`,num:!0,render:e=>e.cpuUtil==null?`—`:Sa(e.cpuUtil,1)},{key:`cl`,label:`CPUs`,num:!0,render:e=>(0,F.jsx)(`span`,{className:`text-ink2`,children:e.cpuLimit?`${B(e.cpuLimit)} (quota)`:e.cores??`—`})},{key:`rss`,label:`RSS`,num:!0,render:e=>CV(e.rss)},{key:`heap`,label:`Heap used / total`,num:!0,render:e=>`${B(e.heapUsed)} / ${B(e.heapTotal)} MB`},{key:`mu`,label:`Mem util`,num:!0,render:e=>e.memUtil==null?`—`:(0,F.jsx)(`span`,{title:e.memBasis===`container`?`RSS of the container limit`:`Heap of the V8 limit`,children:Sa(e.memUtil,1)})},{key:`lim`,label:`Limits`,num:!0,render:e=>(0,F.jsx)(`span`,{className:`text-ink2`,children:[e.heapLimitMb&&`heap ${CV(e.heapLimitMb)}`,e.memLimitMb&&`container ${CV(e.memLimitMb)}`].filter(Boolean).join(` · `)||`—`})},{key:`el`,label:`Loop p99`,num:!0,render:e=>z(e.elP99)},{key:`inf`,label:`In-flight`,num:!0,render:e=>B(e.inflight)},{key:`h`,label:`Handles`,num:!0,render:e=>B(e.handles)}]})}),(0,F.jsx)(`div`,{id:`what-ran`,className:`scroll-mt-4`,children:d?(0,F.jsx)(V,{title:`Running around ${Ea(d.ts,!0)}`,sub:d.auto?`the worst event-loop delay in this window · click any point on a chart to look at another moment`:`the moment you clicked · operations ranked by how far they moved from their own baseline`,pad:!1,children:(0,F.jsx)(Ka,{rows:d.rows,onRow:e=>n(t(qz(`http`,l,e.name))),empty:(0,F.jsx)(U,{title:`Nothing ran in that window`}),cols:[{key:`n`,label:`Operation`,render:e=>(0,F.jsx)(Ua,{name:e.name})},{key:`c`,label:`Calls`,num:!0,render:e=>B(e.calls)},{key:`a`,label:`Avg`,num:!0,render:e=>z(e.avg)},{key:`b`,label:`Baseline avg`,num:!0,render:e=>z(e.baselineAvg)},{key:`lx`,label:`Latency ×`,num:!0,render:e=>(0,F.jsx)(`span`,{style:{color:e.latencyX>=2?`#ffb38a`:void 0},children:e.latencyX?`${e.latencyX}×`:`—`})},{key:`vx`,label:`Volume ×`,num:!0,render:e=>(0,F.jsx)(`span`,{style:{color:e.volumeX>=2?`#ffb38a`:void 0},children:e.volumeX?`${e.volumeX}×`:`—`})}]})}):(0,F.jsx)(V,{title:`Running around…`,sub:`click any point on a chart to see which operations ran then`,children:(0,F.jsx)(`span`,{className:`text-mute text-[12px]`,children:`Loading…`})})}),(0,F.jsxs)(hV,{title:`Memory`,sub:`heap and resident size over time, with garbage collection`,children:[(0,F.jsx)(vV,{title:`Memory`,trend:(0,F.jsx)(gV,{now:h?.heapUsed,prev:g?.heapUsed,unit:`pct`}),right:(0,F.jsx)(yV,{series:[...O,{key:`gc`,label:`GC pauses`,color:`#8a8a98`,kind:`bar`}]}),children:(0,F.jsx)(xV,{releases:S,data:m,series:O,fmt:e=>CV(e),yFmt:EV,gcKey:`gcMs`,onInspect:x,extra:e=>e.gcCount?(0,F.jsxs)(`div`,{className:`text-mute py-[2px]`,children:[`GC: `,e.gcCount,` pauses · `,z(e.gcMs)]}):null})}),(0,F.jsx)(vV,{title:`Memory utilization`,trend:(0,F.jsx)(gV,{now:h?.memUtil,prev:g?.memUtil,unit:`pp`}),right:(0,F.jsxs)(F.Fragment,{children:[T&&(0,F.jsx)(yV,{series:D}),(0,F.jsx)(_V,{value:h?.memUtil,color:SV.memUtil,fmt:wV})]}),children:_?(0,F.jsx)(xV,{releases:S,data:T?E(`memUtil`):m,series:T?D:[{key:`memUtil`,label:`Utilization`,color:SV.memUtil,kind:`area`}],fmt:wV,yFmt:TV,extra:e=>e.memBasis&&(0,F.jsx)(`div`,{className:`text-mute py-[2px]`,children:e.memBasis===`container`?`RSS of the container memory limit`:`Heap used of the V8 heap limit`})}):(0,F.jsx)(kV,{})})]}),(0,F.jsxs)(hV,{title:`CPU`,sub:`share of the available CPU, and where the time goes`,children:[(0,F.jsx)(vV,{title:`CPU utilization`,trend:(0,F.jsx)(gV,{now:h?.cpuUtil,prev:g?.cpuUtil,unit:`pp`}),right:(0,F.jsxs)(F.Fragment,{children:[T&&(0,F.jsx)(yV,{series:D}),(0,F.jsx)(_V,{value:h?.cpuUtil,color:SV.cpuUtil,fmt:wV})]}),children:_?(0,F.jsx)(xV,{releases:S,data:T?E(`cpuUtil`):m,series:T?D:[{key:`cpuUtil`,label:`Utilization`,color:SV.cpuUtil,kind:`area`}],fmt:wV,yFmt:TV,onInspect:x}):(0,F.jsx)(kV,{})}),(0,F.jsx)(vV,{title:`CPU`,trend:(0,F.jsx)(gV,{now:h?.cpuTime,prev:g?.cpuTime,unit:`pct`}),right:(0,F.jsx)(yV,{series:k}),children:m.some(e=>e.cpuUser!=null)?(0,F.jsx)(xV,{releases:S,data:m,series:k,fmt:e=>`${e.toFixed(2)}ms`,yFmt:e=>`${Math.round(e)}ms`,onInspect:x,extra:()=>(0,F.jsx)(`div`,{className:`text-mute py-[2px]`,children:`CPU time per second of wall clock`})}):(0,F.jsx)(kV,{})})]}),(0,F.jsxs)(hV,{title:`Event loop`,sub:`queueing delay and how busy the loop is`,children:[(0,F.jsx)(vV,{title:T?`Event loop delay p99`:`Event loop delay`,trend:(0,F.jsx)(gV,{now:h?.elP99,prev:g?.elP99,unit:`pct`}),right:(0,F.jsx)(yV,{series:T?D:A}),children:(0,F.jsx)(xV,{releases:S,data:T?E(`elP99`):m,series:T?D:A,fmt:e=>z(e),yFmt:e=>`${Math.round(e)}ms`,onInspect:x})}),(0,F.jsx)(vV,{title:`Event loop utilization`,trend:(0,F.jsx)(gV,{now:h?.elu,prev:g?.elu,unit:`pp`}),right:(0,F.jsxs)(F.Fragment,{children:[T&&(0,F.jsx)(yV,{series:D}),(0,F.jsx)(_V,{value:h?.elu,color:SV.elu,fmt:wV})]}),children:(0,F.jsx)(xV,{releases:S,data:T?E(`elu`):m,series:T?D:[{key:`elu`,label:`Utilization`,color:SV.elu,kind:`area`}],fmt:wV,yFmt:TV})})]})]}):(0,F.jsx)(H,{}):(0,F.jsx)(V,{children:(0,F.jsx)(U,{title:`No runtime samples in this window`,children:`The SDK samples every 15s by default (runtimeMetricsInterval).`})})]})}function kV(){return(0,F.jsx)(`div`,{className:`h-[220px] flex items-center justify-center text-center text-mute text-[12px] px-8`,children:DV})}function AV(){let e=I(),t=P(`/api/metrics${e.q()}`,[e.tick]),n=[...new Set((t.data||[]).map(e=>e.name))],[r,i]=(0,v.useState)(``),a=r&&n.includes(r)?r:n[0]||``,o=P(a?`/api/metrics/${encodeURIComponent(a)}${e.q()}`:null,[e.tick,a]);if(t.error)return(0,F.jsx)(Ra,{error:t.error});if(!t.data)return(0,F.jsx)(H,{});let s=t.data.filter(e=>e.name===a),c=[],l=[];if(o.data){let e=new Map,t=o.data.series.length>8;o.data.series.slice(0,8).forEach((t,n)=>{for(let r of t.points)e.has(r.t)||e.set(r.t,{t:r.t}),e.get(r.t)[`s${n}`]=r.value}),c=[...e.values()].sort((e,t)=>e.t-t.t),l=o.data.series.slice(0,8).map((e,t)=>({key:`s${t}`,label:Object.entries(e.labels).map(([e,t])=>`${e}=${t}`).join(`, `)||a,color:XR[t],type:e.type===`counter`?`bar`:`line`,stack:e.type===`counter`?`c`:void 0})),t&&l.push()}return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ia,{icon:(0,F.jsx)(Wr,{size:18,className:`text-brand`}),title:`Custom metrics`,sub:(0,F.jsxs)(F.Fragment,{children:[`Counters, gauges and summaries your code reports: `,(0,F.jsxs)(`span`,{className:`mono`,children:[`obzerver.metrics.counter('orders_created', `,`{`,` channel `,`}`,`).inc()`]})]})}),n.length===0?(0,F.jsx)(V,{children:(0,F.jsx)(U,{title:`No custom metrics yet`,children:`Report business numbers with obzerver.metrics.counter / gauge / summary. They are aggregated in-process and flushed every 10s.`})}):(0,F.jsxs)(`div`,{className:`grid grid-cols-[240px_1fr] gap-3`,children:[(0,F.jsx)(V,{pad:!1,title:`Metrics`,children:(0,F.jsx)(`div`,{className:`py-1.5`,children:n.map(e=>{let n=t.data.find(t=>t.name===e).type;return(0,F.jsxs)(`button`,{onClick:()=>i(e),className:`w-full text-left px-3.5 py-2 flex items-center justify-between gap-2 ${e===a?`bg-[#1d1d27]`:`hover:bg-[#16161e]`}`,children:[(0,F.jsx)(`span`,{className:`mono text-[12px] truncate`,children:e}),(0,F.jsx)(`span`,{className:`pill !text-[10px]`,children:n})]},e)})})}),(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)(tz,{title:(0,F.jsx)(`span`,{className:`mono`,children:a}),sub:s[0]?.type===`counter`?`sum per bucket`:s[0]?.type===`gauge`?`last value per bucket`:`average per bucket`,series:l,children:o.data?(0,F.jsx)(ez,{data:c,series:l,height:260,fmt:e=>B(e)}):(0,F.jsx)(H,{})}),(0,F.jsx)(V,{title:`Series`,pad:!1,children:(0,F.jsxs)(`table`,{className:`tbl`,children:[(0,F.jsx)(`thead`,{children:(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:`Labels`}),(0,F.jsx)(`th`,{children:`Application`}),(0,F.jsx)(`th`,{className:`num`,children:`Points`}),(0,F.jsx)(`th`,{className:`num`,children:`Average`})]})}),(0,F.jsx)(`tbody`,{children:s.map((e,t)=>(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`mono text-[12px]`,children:Object.entries(e.labels).map(([e,t])=>`${e}=${t}`).join(`, `)||`—`}),(0,F.jsx)(`td`,{className:`text-ink2`,children:e.service}),(0,F.jsx)(`td`,{className:`num`,children:B(e.points)}),(0,F.jsx)(`td`,{className:`num`,children:B(e.avg)})]},t))})]})})]})]})]})}var jV={regression:{kind:`crit`,label:`Regression`},changed:{kind:`warn`,label:`Changed`},clean:{kind:`good`,label:`Clean`},not_enough_data:{kind:`neutral`,label:`Not enough data`},baseline:{kind:`neutral`,label:`Baseline`}},MV=e=>e?new Date(e).toLocaleString(void 0,{weekday:`short`,year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1,timeZoneName:`short`}):``;function NV(){let e=I(),{data:t,error:n}=P(`/api/releases${e.q()}`,[e.tick]),[r]=zn(),[i,a]=(0,v.useState)(r.get(`version`)?{service:r.get(`service`)||``,version:r.get(`version`)}:null);if(n)return(0,F.jsx)(Ra,{error:n});if(!t)return(0,F.jsx)(H,{});let o=i||(t[0]?{service:t[0].service,version:t[0].version}:null);return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ia,{icon:(0,F.jsx)(xi,{size:18,className:`text-brand`}),title:`Releases`,sub:(0,F.jsxs)(F.Fragment,{children:[`Each `,(0,F.jsx)(`span`,{className:`mono`,children:`serviceVersion`}),` compared with the one before it: 5xx rate, latency, new error groups, memory and CPU, and what changed in the code path.`]})}),t.length===0?(0,F.jsx)(V,{children:(0,F.jsx)(U,{title:`No releases yet`,children:`Set serviceVersion (or OBZERVER_VERSION / GIT_SHA) so every request is tagged with the release that served it.`})}):(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-[minmax(380px,40%)_1fr] gap-3 items-start`,children:[(0,F.jsx)(V,{pad:!1,children:(0,F.jsx)(Ka,{rows:t,rowKey:e=>e.service+e.version,onRow:e=>a({service:e.service,version:e.version}),cols:[{key:`v`,label:`Release`,render:e=>(0,F.jsxs)(`div`,{className:o&&o.service===e.service&&o.version===e.version?`text-brand2`:``,children:[(0,F.jsx)(`div`,{className:`mono font-medium`,children:e.version}),(0,F.jsx)(`div`,{className:`text-mute text-[11px]`,children:e.service})]})},{key:`verdict`,label:`Verdict`,render:e=>(0,F.jsx)(W,{kind:jV[e.verdict]?.kind||`neutral`,children:jV[e.verdict]?.label||e.verdict})},{key:`f`,label:`Deployed`,num:!0,render:e=>(0,F.jsx)(ro,{ts:e.first,className:`text-ink2`})},{key:`n`,label:`Requests`,num:!0,render:e=>B(e.requests)}]})}),o&&(0,F.jsx)(PV,{service:o.service,version:o.version})]})]})}function PV({service:e,version:t}){let n=L(),r=ht(),{data:i,error:a}=P(`/api/releases/${encodeURIComponent(e)}/${encodeURIComponent(t)}`,[e,t]);if(a)return(0,F.jsx)(Ra,{error:a});if(!i)return(0,F.jsx)(H,{});let o=jV[i.verdict]||jV.baseline,s=i.previousStats,c=i.stats,l=e=>e===`query`?(0,F.jsx)(Br,{size:12,style:{color:`#d95926`}}):e===`outbound`?(0,F.jsx)(Kr,{size:12,style:{color:`#e66767`}}):(0,F.jsx)(_r,{size:12,style:{color:`#d55181`}}),u=e=>({new:`New`,gone:`Gone`,more_frequent:`${e.multiplier}× more often`,less_frequent:`${e.multiplier}× as often`,slower:`${e.multiplier}× slower`})[e.change];return(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsxs)(V,{title:(0,F.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,F.jsxs)(`span`,{className:`mono`,children:[e,`@`,t]}),(0,F.jsx)(W,{kind:o.kind,children:o.label})]}),sub:i.previous?`vs ${i.previous}`:void 0,children:[(0,F.jsx)(`div`,{className:`text-[13px] leading-relaxed`,children:i.summary}),s&&(0,F.jsxs)(`table`,{className:`tbl mt-3`,children:[(0,F.jsx)(`thead`,{children:(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{}),(0,F.jsx)(`th`,{className:`num`,children:i.previous}),(0,F.jsx)(`th`,{className:`num`,children:t})]})}),(0,F.jsxs)(`tbody`,{children:[(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`text-mute`,children:`Requests`}),(0,F.jsx)(`td`,{className:`num`,children:B(s.requests)}),(0,F.jsx)(`td`,{className:`num`,children:B(c.requests)})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`text-mute`,children:`5xx rate`}),(0,F.jsx)(`td`,{className:`num`,children:Sa(s.errorRate)}),(0,F.jsx)(`td`,{className:`num`,style:{color:c.errorRate>s.errorRate*1.5&&c.errorRate>.3?`#ff8a8a`:void 0},children:Sa(c.errorRate)})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`text-mute`,children:`p95`}),(0,F.jsx)(`td`,{className:`num`,children:z(s.p95)}),(0,F.jsx)(`td`,{className:`num`,style:{color:c.p95>s.p95*1.3?`#ffb38a`:void 0},children:z(c.p95)})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`text-mute`,children:`Average`}),(0,F.jsx)(`td`,{className:`num`,children:z(s.avg)}),(0,F.jsx)(`td`,{className:`num`,children:z(c.avg)})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`text-mute`,children:`Served from`}),(0,F.jsx)(`td`,{className:`num text-[11.5px]`,children:(0,F.jsx)(no,{tip:MV(s.first),children:Ea(s.first,!0)})}),(0,F.jsx)(`td`,{className:`num text-[11.5px]`,children:(0,F.jsx)(no,{tip:MV(c.first),children:Ea(c.first,!0)})})]}),(i.runtime||i.previousRuntime)&&(()=>{let e=i.previousRuntime||{},t=i.runtime||{},n=(e,t,n,r)=>e!=null&&t!=null&&t>e*n&&t-e>r,r=e=>e==null?`—`:`${e>0?`+`:``}${e.toFixed(1)} MB/h`,a=i.evidence?.some(e=>e.type===`memory_leak`);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`tr`,{children:(0,F.jsx)(`td`,{colSpan:3,className:`!pt-4 text-[10.5px] uppercase tracking-[.08em] text-mute`,children:`Runtime, per instance`})}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`text-mute`,children:`Heap used`}),(0,F.jsx)(`td`,{className:`num`,children:e.heapUsed==null?`—`:`${B(e.heapUsed)} MB`}),(0,F.jsx)(`td`,{className:`num`,style:{color:n(e.heapUsed,t.heapUsed,1.3,20)?`#ffb38a`:void 0},children:t.heapUsed==null?`—`:`${B(t.heapUsed)} MB`})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`text-mute`,title:`Least-squares slope of heap used over the time each version served`,children:`Heap growth`}),(0,F.jsx)(`td`,{className:`num`,children:r(e.heapGrowth)}),(0,F.jsx)(`td`,{className:`num`,style:{color:a?`#ff8a8a`:void 0},children:r(t.heapGrowth)})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`text-mute`,children:`RSS`}),(0,F.jsx)(`td`,{className:`num`,children:e.rss==null?`—`:`${B(e.rss)} MB`}),(0,F.jsx)(`td`,{className:`num`,children:t.rss==null?`—`:`${B(t.rss)} MB`})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`text-mute`,children:t.cpuUtil==null?`CPU`:`CPU utilization`}),(0,F.jsx)(`td`,{className:`num`,children:Sa(e.cpuUtil??e.cpu)}),(0,F.jsx)(`td`,{className:`num`,style:{color:n(e.cpuUtil??e.cpu,t.cpuUtil??t.cpu,1.3,5)?`#ffb38a`:void 0},children:Sa(t.cpuUtil??t.cpu)})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`text-mute`,children:`Event loop p99`}),(0,F.jsx)(`td`,{className:`num`,children:z(e.elP99)}),(0,F.jsx)(`td`,{className:`num`,style:{color:n(e.elP99,t.elP99,1.5,10)?`#ffb38a`:void 0},children:z(t.elP99)})]})]})})()]})]})]}),(i.evidence?.length>0||i.newErrors?.length>0)&&(0,F.jsxs)(V,{title:`Evidence`,children:[(0,F.jsx)(`ul`,{className:`flex flex-col gap-1.5 list-disc pl-4`,children:i.evidence.map((e,t)=>(0,F.jsx)(`li`,{children:e.text},t))}),i.newErrors.length>0&&(0,F.jsx)(`div`,{className:`mt-3 flex flex-col`,children:i.newErrors.map(e=>(0,F.jsxs)(`button`,{className:`text-left flex items-center gap-2 py-1.5 border-b border-[#1d1d26] last:border-0 hover:text-white`,onClick:()=>r(n(`/errors/${e.fingerprint}`)),children:[(0,F.jsx)(W,{kind:`serious`,children:`new`}),(0,F.jsx)(`span`,{className:`text-[#ff9b9b]`,children:e.class}),(0,F.jsx)(`span`,{className:`text-mute truncate`,children:e.message}),(0,F.jsx)(`span`,{className:`ml-auto tabular-nums`,children:B(e.count)})]},e.fingerprint))})]}),(0,F.jsx)(V,{title:`What changed in the code`,sub:`queries, outbound calls and methods per request, beyond noise`,pad:!1,children:(0,F.jsx)(Ka,{rows:i.changes||[],empty:(0,F.jsx)(U,{title:`No call-pattern changes detected`}),cols:[{key:`t`,label:`Call`,render:e=>(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2 min-w-0`,children:[l(e.type),(0,F.jsx)(`span`,{className:`mono text-[11.5px] truncate max-w-[420px]`,children:e.label})]})},{key:`c`,label:`Change`,render:e=>(0,F.jsx)(W,{kind:e.change===`gone`||e.change===`less_frequent`?`neutral`:e.change===`new`?`warn`:`serious`,children:u(e)})},{key:`p`,label:`Per request now`,num:!0,render:e=>e.perRequest==null?e.selfMs==null?`—`:`${z(e.selfMs)} self`:B(e.perRequest)}]})})]})}var FV=980,IV=160,LV=46;function RV(e){return e>5?`#d03b3b`:e>1?`#e07a7a`:`#199e70`}function zV(){let e=I(),t=L(),n=ht(),{data:r,error:i}=P(`/api/map${e.q()}`,[e.tick]),[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(null),l=(0,v.useMemo)(()=>{if(!r)return null;let e=r.nodes,t=r.edges,n=e.filter(e=>e.type===`service`||e.type===`queue`),i=e.filter(e=>e.type===`database`||e.type===`external`),a=new Map;for(let e of n)a.set(e.id,e.type===`queue`?0:1);for(let e=0;e<n.length;e++)for(let e of t){if(!a.has(e.from)||!a.has(e.to))continue;let t=a.get(e.from)+1;a.get(e.to)<t&&a.set(e.to,t)}let o=[...new Set(a.values())].sort((e,t)=>e-t).map(e=>n.filter(t=>a.get(t.id)===e)),s=e=>o.length===1?FV/2:110+e*760/(o.length-1),c=new Map,l=0;o.forEach((e,t)=>e.forEach((e,n)=>{c.set(e.id,{x:s(t),y:60+n*90}),l=Math.max(l,60+n*90)}));let u=l+150,d=new Map;for(let e of i){let n=t.filter(t=>t.to===e.id).sort((e,t)=>t.calls-e.calls)[0],r=n?n.from:`none`;d.has(r)||d.set(r,[]),d.get(r).push(e)}let f=[...d.entries()].sort((e,t)=>(c.get(e[0])?.x??0)-(c.get(t[0])?.x??0)).flatMap(([,e])=>e);return f.forEach((e,t)=>{let n=Math.floor(t/5),r=Math.min(5,f.length-n*5),i=t%5,a=r*180;c.set(e.id,{x:(FV-a)/2+i*180+IV/2,y:u+n*80})}),{nodes:e,edges:t,pos:c,height:Math.max(...[...c.values()].map(e=>e.y),100)+70}},[r]);if(i)return(0,F.jsx)(Ra,{error:i});if(!r||!l)return(0,F.jsx)(H,{});let u=a||s,d=e=>!u||e===u||l.edges.some(t=>t.from===u&&t.to===e||t.to===u&&t.from===e),f=s?l.nodes.find(e=>e.id===s):null,p=Math.max(1,...l.edges.map(e=>e.calls)),m=e=>e===`service`?Oi:e===`database`?Br:e===`queue`?Yr:Kr;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ia,{icon:(0,F.jsx)(ui,{size:18,className:`text-brand`}),title:`Service map`,sub:`Drawn from real traffic: applications and queues left to right in call order, their databases and external hosts below. Line weight is volume; red means errors.`}),l.nodes.length===0?(0,F.jsx)(V,{children:(0,F.jsx)(U,{title:`Nothing to draw yet`})}):(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-[1fr_300px] gap-3 items-start`,children:[(0,F.jsxs)(V,{pad:!1,children:[(0,F.jsxs)(`div`,{className:`flex gap-4 px-4 pt-3 text-[11.5px] text-ink2`,children:[(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(`span`,{className:`w-4 h-[3px] rounded`,style:{background:`#199e70`}}),`healthy`]}),(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(`span`,{className:`w-4 h-[3px] rounded`,style:{background:`#e07a7a`}}),`> 1% errors`]}),(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(`span`,{className:`w-4 h-[3px] rounded`,style:{background:`#d03b3b`}}),`> 5% errors`]}),(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(`span`,{className:`w-4 border-t-2 border-dashed`,style:{borderColor:`#7a7a90`}}),`service → service (shared trace ids)`]})]}),(0,F.jsxs)(`svg`,{viewBox:`0 0 ${FV} ${l.height}`,className:`w-full`,style:{minHeight:360},onClick:()=>c(null),children:[l.edges.map(e=>{let t=l.pos.get(e.from),n=l.pos.get(e.to);if(!t||!n)return null;let r=n.y>t.y+40,i=r?t.x:t.x+IV/2,a=r?t.y+LV/2:t.y,o=r?n.x:n.x-IV/2,s=r?n.y-LV/2:n.y,c=r?`M${i},${a} C${i},${(a+s)/2} ${o},${(a+s)/2} ${o},${s}`:`M${i},${a} C${(i+o)/2},${a} ${(i+o)/2},${s} ${o},${s}`,d=1.2+4.5*Math.sqrt(e.calls/p),f=!u||e.from===u||e.to===u,m=RV(e.errorRate),h=e.from.startsWith(`svc:`)&&e.to.startsWith(`svc:`);return(0,F.jsxs)(`g`,{opacity:f?1:.12,children:[(0,F.jsx)(`path`,{d:c,fill:`none`,stroke:m,strokeOpacity:.55,strokeWidth:d,strokeDasharray:h?`8 6`:void 0}),(0,F.jsx)(`path`,{d:c,fill:`none`,stroke:`#ffffff`,strokeOpacity:.55,strokeWidth:Math.max(1,d/2.5),strokeLinecap:`round`,className:`flow`,style:{strokeDasharray:`1 23`,animationDuration:`${Math.max(.5,3-2.5*(e.calls/p))}s`}}),(0,F.jsxs)(`text`,{x:(i+o)/2,y:(a+s)/2-6,textAnchor:`middle`,fontSize:`11`,fill:`#9a9aab`,paintOrder:`stroke`,stroke:`#13131a`,strokeWidth:4,children:[B(e.calls),e.errorRate>0?` · ${Sa(e.errorRate,1)}`:``]})]},e.from+e.to)}),l.nodes.map(e=>{let t=l.pos.get(e.id);if(!t)return null;let n=m(e.type),r=RV(e.errorRate),i=s===e.id;return(0,F.jsxs)(`g`,{transform:`translate(${t.x-IV/2},${t.y-LV/2})`,opacity:d(e.id)?1:.25,style:{cursor:`pointer`},onMouseEnter:()=>o(e.id),onMouseLeave:()=>o(null),onClick:t=>{t.stopPropagation(),c(e.id)},children:[(0,F.jsx)(`rect`,{width:IV,height:LV,rx:10,fill:`#16161e`,stroke:i?`#ff3d7f`:e.type===`service`?r:`#33333f`,strokeWidth:i?2:1.4}),(0,F.jsx)(`foreignObject`,{x:10,y:14,width:18,height:18,children:(0,F.jsx)(n,{size:16,color:e.type===`service`?`#ececf1`:`#9a9aab`})}),(0,F.jsx)(`text`,{x:34,y:20,fontSize:`13`,fontWeight:`600`,fill:`#ececf1`,children:e.label.length>18?`${e.label.slice(0,17)}…`:e.label}),(0,F.jsx)(`text`,{x:34,y:36,fontSize:`11`,fill:`#82829a`,children:e.type===`service`?`${B(e.calls)} req · ${z(e.avg)}`:e.type===`queue`?`queue · ${B(e.calls)} jobs`:`${e.type===`database`?`database`:`external`} · ${B(e.calls)}`})]},e.id)})]})]}),(0,F.jsx)(V,{title:f?f.label:`Details`,sub:f?.type,children:f?(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)(Qa,{items:[[`Calls`,B(f.calls)],[`Errors`,`${B(f.errors)} (${Sa(f.errorRate)})`],...f.avg==null?[]:[[`Avg`,z(f.avg)]]]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute text-[11px] uppercase tracking-wider mb-1`,children:`Callers`}),l.edges.filter(e=>e.to===f.id).map(e=>(0,F.jsxs)(`div`,{className:`flex justify-between text-[12px] py-0.5`,children:[(0,F.jsx)(`span`,{children:l.nodes.find(t=>t.id===e.from)?.label}),(0,F.jsxs)(`span`,{className:`tabular-nums text-ink2`,children:[B(e.calls),` · `,z(e.avg)]})]},e.from)),!l.edges.some(e=>e.to===f.id)&&(0,F.jsx)(`div`,{className:`text-mute text-[12px]`,children:`—`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute text-[11px] uppercase tracking-wider mb-1`,children:`Calls out to`}),l.edges.filter(e=>e.from===f.id).map(e=>(0,F.jsxs)(`div`,{className:`flex justify-between text-[12px] py-0.5`,children:[(0,F.jsx)(`span`,{className:`truncate`,children:l.nodes.find(t=>t.id===e.to)?.label}),(0,F.jsxs)(`span`,{className:`tabular-nums text-ink2`,children:[B(e.calls),` · `,z(e.avg)]})]},e.to)),!l.edges.some(e=>e.from===f.id)&&(0,F.jsx)(`div`,{className:`text-mute text-[12px]`,children:`—`})]}),f.type===`service`&&(0,F.jsx)(`button`,{className:`btn`,onClick:()=>n(t(`/requests?service=${encodeURIComponent(f.label)}`)),children:`View requests`}),f.type===`database`&&(0,F.jsx)(`button`,{className:`btn`,onClick:()=>n(t(`/queries`)),children:`View statements`})]}):(0,F.jsx)(`div`,{className:`text-mute text-[12.5px]`,children:`Hover a node to isolate its connections; click it for numbers.`})})]})]})}var BV={error_rate:[{key:`mode`,label:`Mode`,type:`select`,options:[`threshold`,`anomaly`]},{key:`threshold`,label:`Threshold (%) / anomaly floor`,type:`number`},{key:`windowMin`,label:`Window (minutes)`,type:`number`},{key:`minRequests`,label:`Minimum requests`,type:`number`}],p95_latency:[{key:`mode`,label:`Mode`,type:`select`,options:[`threshold`,`anomaly`]},{key:`threshold`,label:`Threshold (ms)`,type:`number`},{key:`windowMin`,label:`Window (minutes)`,type:`number`},{key:`minRequests`,label:`Minimum requests`,type:`number`}],avg_latency:[{key:`threshold`,label:`Threshold (ms)`,type:`number`},{key:`windowMin`,label:`Window (minutes)`,type:`number`},{key:`minRequests`,label:`Minimum requests`,type:`number`}],throughput:[{key:`op`,label:`Fire when`,type:`select`,options:[`<`,`>`]},{key:`threshold`,label:`Requests per minute`,type:`number`},{key:`windowMin`,label:`Window (minutes)`,type:`number`}],job_failure_rate:[{key:`threshold`,label:`Threshold (%)`,type:`number`},{key:`windowMin`,label:`Window (minutes)`,type:`number`},{key:`minRequests`,label:`Minimum runs`,type:`number`}],job_queue_wait:[{key:`threshold`,label:`p95 queue wait (ms)`,type:`number`},{key:`windowMin`,label:`Window (minutes)`,type:`number`}],silence:[{key:`windowMin`,label:`Silence tolerance (minutes)`,type:`number`,hint:`Never fires for a scope that has never reported.`}],job_silence:[{key:`windowMin`,label:`Silence tolerance (minutes)`,type:`number`}],log_pattern:[{key:`pattern`,label:`Message contains`,type:`text`},{key:`levels`,label:`Levels`,type:`levels`},{key:`logger`,label:`Logger / context`,type:`text`},{key:`threshold`,label:`Fire above N lines`,type:`number`},{key:`windowMin`,label:`Window (minutes)`,type:`number`}],new_error_group:[],secret_leak:[],event_loop_delay:[{key:`threshold`,label:`p99 delay (ms)`,type:`number`},{key:`windowMin`,label:`Window (minutes)`,type:`number`}],memory:[{key:`threshold`,label:`RSS (MB)`,type:`number`},{key:`windowMin`,label:`Window (minutes)`,type:`number`}],cpu:[{key:`threshold`,label:`CPU (%)`,type:`number`},{key:`windowMin`,label:`Window (minutes)`,type:`number`}],custom_metric:[{key:`metric`,label:`Metric name`,type:`text`},{key:`agg`,label:`Aggregation`,type:`select`,options:[`sum`,`avg`,`max`,`min`]},{key:`op`,label:`Fire when`,type:`select`,options:[`>`,`<`]},{key:`threshold`,label:`Threshold`,type:`number`},{key:`windowMin`,label:`Window (minutes)`,type:`number`}]},VV=new Set([`error_rate`,`p95_latency`,`avg_latency`,`throughput`,`job_failure_rate`,`job_queue_wait`,`silence`,`job_silence`]);function HV(){let e=I(),t=L(),[n]=zn(),r=P(`/api/alerts`,[e.tick]),i=P(`/api/alerts/events${n.get(`rule`)?`?rule=${n.get(`rule`)}`:``}`,[e.tick]),[a,o]=(0,v.useState)(null);if((0,v.useEffect)(()=>{N(`/api/alerts/events/read`,{method:`POST`}).then(()=>e.refresh()).catch(()=>{})},[]),r.error)return(0,F.jsx)(Ra,{error:r.error});if(!r.data)return(0,F.jsx)(H,{});let s=r.data.types,c=e=>s[e]?.unit||``,l=()=>{r.reload(),i.reload()};return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ia,{icon:(0,F.jsx)(hr,{size:18,className:`text-brand`}),title:`Alerts`,sub:`Thresholds or anomaly detection against the metric's recent baseline. Evaluated every 30 seconds.`,right:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`button`,{className:`btn`,onClick:async()=>{await N(`/api/alerts/evaluate`,{method:`POST`}),l()},children:[(0,F.jsx)(mi,{size:13}),`Evaluate now`]}),(0,F.jsxs)(`button`,{className:`btn btn-primary`,onClick:()=>o({name:``,type:`error_rate`,params:{mode:`threshold`,threshold:5,windowMin:10,minRequests:20},channels:[{type:`inapp`}],enabled:!0,create_issue:!1}),children:[(0,F.jsx)(_i,{size:14}),`New rule`]})]})}),(0,F.jsx)(V,{pad:!1,title:`Rules`,children:(0,F.jsx)(Ka,{rows:r.data.rules,rowKey:e=>e.id,cols:[{key:`s`,label:`State`,render:e=>e.enabled?e.state===`firing`?(0,F.jsx)(W,{kind:`crit`,children:`firing`}):(0,F.jsx)(W,{kind:`good`,children:`ok`}):(0,F.jsx)(W,{kind:`neutral`,children:`disabled`})},{key:`n`,label:`Rule`,render:e=>(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`font-medium`,children:e.name}),(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px]`,children:[s[e.type]?.family,` · `,s[e.type]?.label,e.params.mode===`anomaly`?` · anomaly`:e.params.threshold!=null&&e.type!==`silence`?` ${e.params.op||`>`} ${e.params.threshold}${c(e.type)}`:``,e.params.windowMin?` over ${e.params.windowMin}m`:``,e.params.service?` · ${e.params.service}`:``,e.params.route?` ${e.params.route}`:``]})]})},{key:`v`,label:`Current`,num:!0,render:e=>e.type===`new_error_group`||e.type===`secret_leak`?(0,F.jsx)(`span`,{className:`text-mute`,children:`event`}):e.last_value==null?`—`:`${B(Math.round(e.last_value*100)/100)}${c(e.type)?` ${c(e.type)}`:``}`},{key:`c`,label:`Channels`,render:e=>(0,F.jsxs)(`div`,{className:`flex gap-1`,children:[e.channels.map((e,t)=>(0,F.jsx)(`span`,{className:`pill`,children:e.type},t)),e.create_issue&&(0,F.jsx)(`span`,{className:`pill`,children:`issue`})]})},{key:`ch`,label:`Last change`,num:!0,render:e=>(0,F.jsx)(`span`,{className:`text-mute`,children:(0,F.jsx)(ro,{ts:e.last_change})})},{key:`a`,label:``,render:e=>(0,F.jsxs)(`div`,{className:`flex justify-end gap-1`,children:[(0,F.jsx)(`button`,{className:`btn btn-ghost h-7 px-2`,title:`Send test notification`,onClick:async()=>{WV((await N(`/api/alerts/${e.id}/test`,{method:`POST`})).deliveries)},children:(0,F.jsx)(Di,{size:13})}),e.type===`slo_burn`?(0,F.jsx)(Nn,{className:`btn btn-ghost h-7 px-2 text-[11.5px]`,to:t(`/slos?id=${e.params.sloId}`),title:`Managed by its SLO`,children:`Edit SLO`}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`button`,{className:`btn btn-ghost h-7 px-2`,title:`Edit`,onClick:()=>o(e),children:(0,F.jsx)(pi,{size:13})}),(0,F.jsx)(`button`,{className:`btn btn-ghost h-7 px-2`,title:`Delete`,onClick:async()=>{GV(e.name)&&(await N(`/api/alerts/${e.id}`,{method:`DELETE`}),l())},children:(0,F.jsx)(Ri,{size:13})})]})]})}]})}),(0,F.jsx)(V,{pad:!1,title:`History`,sub:`state transitions with per-channel delivery`,children:i.data?(0,F.jsx)(Ka,{rows:i.data,empty:(0,F.jsx)(U,{title:`No alert events yet`}),maxHeight:480,cols:[{key:`t`,label:`Time`,render:e=>(0,F.jsx)(`span`,{className:`tabular-nums`,children:Ea(e.ts,!0)})},{key:`s`,label:`State`,render:e=>e.state===`firing`?(0,F.jsx)(W,{kind:`crit`,children:`firing`}):e.state===`resolved`?(0,F.jsx)(W,{kind:`good`,children:`resolved`}):(0,F.jsx)(W,{kind:`neutral`,children:e.state})},{key:`r`,label:`Rule`,render:e=>(0,F.jsx)(`span`,{className:`font-medium`,children:e.rule})},{key:`m`,label:`Message`,render:e=>(0,F.jsx)(`span`,{className:`text-ink2`,children:e.message})},{key:`d`,label:`Delivery`,render:e=>(0,F.jsx)(`div`,{className:`flex gap-1`,children:e.deliveries.map((e,t)=>(0,F.jsxs)(`span`,{className:`pill`,style:{color:e.ok?`#5fd38a`:`#ff8a8a`},title:e.error||String(e.status||``),children:[e.type,` `,e.ok?`✓`:`✕`]},t))})}]}):(0,F.jsx)(H,{})}),a&&(0,F.jsx)(KV,{rule:a,types:s,onClose:()=>o(null),onSaved:()=>{o(null),l()}})]})}function UV({value:e,onChange:t}){let{data:n}=P(`/api/settings`),r=L();return(0,F.jsx)(G,{label:`Email to`,hint:n&&!n.email.configured?(0,F.jsxs)(`span`,{children:[`Email is not configured yet. `,(0,F.jsx)(Nn,{className:`link`,to:r(`/integrations/email`),children:`Set up SMTP in Integrations`}),` first.`]}):`Comma-separated addresses`,children:(0,F.jsx)(`input`,{className:`input`,placeholder:`oncall@company.com, ops@company.com`,value:e,onChange:e=>t(e.target.value)})})}function WV(e){let t=e.length?e.map(e=>`${e.type}: ${e.ok?`delivered`:`failed ${e.error||e.status||``}`}`).join(`
117
- `):`No external channels configured (in-app only).`;window.alert(t)}function GV(e){return window.confirm(`Delete rule "${e}"?`)}function KV({rule:e,types:t,onClose:n,onSaved:r}){let i=I(),[a,o]=(0,v.useState)(JSON.parse(JSON.stringify(e))),[s,c]=(0,v.useState)(``),l=(e,t)=>o({...a,params:{...a.params,[e]:t}}),u=a.channels.find(e=>e.type===`webhook`)?.url||``,d=a.channels.find(e=>e.type===`slack`)?.url||``,f=a.channels.find(e=>e.type===`email`)?.to||``,p=e=>{let t=a.channels.filter(e=>e.type!==`email`);o({...a,channels:e.trim()?[...t,{type:`email`,to:e}]:t})},m=(e,t)=>{let n=a.channels.filter(t=>t.type!==e);o({...a,channels:t?[...n,{type:e,url:t}]:n})},h=a.params.mute||{};return(0,F.jsxs)($a,{open:!0,onClose:n,title:a.id?`Edit alert rule`:`New alert rule`,wide:!0,children:[(0,F.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,F.jsx)(G,{label:`Name`,children:(0,F.jsx)(`input`,{className:`input`,value:a.name,placeholder:t[a.type]?.label,onChange:e=>o({...a,name:e.target.value})})}),(0,F.jsx)(G,{label:`Type`,children:(0,F.jsx)(`select`,{className:`select`,value:a.type,onChange:e=>o({...a,type:e.target.value,params:{windowMin:10}}),children:Object.entries(t).filter(([e])=>e!==`slo_burn`).map(([e,t])=>(0,F.jsxs)(`option`,{value:e,children:[t.family,` — `,t.label]},e))})}),VV.has(a.type)&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(G,{label:`Application (optional)`,children:(0,F.jsxs)(`select`,{className:`select`,value:a.params.service||``,onChange:e=>l(`service`,e.target.value||void 0),children:[(0,F.jsx)(`option`,{value:``,children:`All applications`}),i.meta?.services.map(e=>(0,F.jsx)(`option`,{children:e.id},e.id))]})}),(0,F.jsx)(G,{label:`Route / job (optional)`,hint:`e.g. "POST /checkout"`,children:(0,F.jsx)(`input`,{className:`input`,value:a.params.route||``,onChange:e=>l(`route`,e.target.value||void 0)})})]}),(BV[a.type]||[]).map(e=>(0,F.jsx)(G,{label:e.label,hint:e.hint,children:e.type===`select`?(0,F.jsx)(`select`,{className:`select`,value:a.params[e.key]??e.options[0],onChange:t=>l(e.key,t.target.value),children:e.options.map(e=>(0,F.jsx)(`option`,{children:e},e))}):e.type===`levels`?(0,F.jsx)(`div`,{className:`flex gap-2 h-[30px] items-center`,children:[`error`,`warn`,`info`,`debug`].map(e=>(0,F.jsxs)(`label`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(`input`,{type:`checkbox`,checked:(a.params.levels||[]).includes(e),onChange:t=>l(`levels`,t.target.checked?[...a.params.levels||[],e]:(a.params.levels||[]).filter(t=>t!==e))}),e]},e))}):(0,F.jsx)(`input`,{className:`input`,type:e.type===`number`?`number`:`text`,value:a.params[e.key]??``,onChange:t=>l(e.key,e.type===`number`?t.target.value===``?void 0:Number(t.target.value):t.target.value)})},e.key))]}),(0,F.jsxs)(`div`,{className:`mt-4 pt-4 border-t border-line grid grid-cols-2 gap-3`,children:[(0,F.jsx)(`div`,{className:`col-span-2 text-[12px] font-semibold`,children:`Notify`}),(0,F.jsx)(G,{label:`Slack incoming webhook URL`,children:(0,F.jsx)(`input`,{className:`input`,placeholder:`https://hooks.slack.com/services/…`,value:d,onChange:e=>m(`slack`,e.target.value)})}),(0,F.jsx)(G,{label:`Generic webhook URL`,hint:`POSTs JSON { rule, state, value, message, link }`,children:(0,F.jsx)(`input`,{className:`input`,placeholder:`https://…`,value:u,onChange:e=>m(`webhook`,e.target.value)})}),(0,F.jsx)(`div`,{className:`col-span-2`,children:(0,F.jsx)(UV,{value:f,onChange:e=>p(e)})}),(0,F.jsxs)(`label`,{className:`flex items-center gap-2 text-[12.5px]`,children:[(0,F.jsx)(`input`,{type:`checkbox`,checked:a.create_issue,onChange:e=>o({...a,create_issue:e.target.checked})}),`Open an issue when it fires`]}),(0,F.jsxs)(`label`,{className:`flex items-center gap-2 text-[12.5px]`,children:[(0,F.jsx)(`input`,{type:`checkbox`,checked:a.enabled,onChange:e=>o({...a,enabled:e.target.checked})}),`Enabled`]}),(0,F.jsxs)(`div`,{className:`col-span-2 flex items-center gap-2 text-[12.5px] flex-wrap`,children:[(0,F.jsx)(`span`,{className:`text-ink2`,children:`Mute daily (UTC) from`}),(0,F.jsx)(`input`,{className:`input w-16`,type:`number`,min:0,max:23,value:h.from??``,onChange:e=>l(`mute`,{...h,from:e.target.value===``?void 0:Number(e.target.value)})}),(0,F.jsx)(`span`,{className:`text-ink2`,children:`to`}),(0,F.jsx)(`input`,{className:`input w-16`,type:`number`,min:0,max:24,value:h.to??``,onChange:e=>l(`mute`,{...h,to:e.target.value===``?void 0:Number(e.target.value)})}),(0,F.jsx)(`span`,{className:`text-mute`,children:`hours (leave empty for no mute)`})]})]}),s&&(0,F.jsx)(`div`,{className:`text-[#ff8a8a] mt-3`,children:s}),(0,F.jsxs)(`div`,{className:`flex justify-end gap-2 mt-4`,children:[(0,F.jsx)(`button`,{className:`btn`,onClick:n,children:`Cancel`}),(0,F.jsx)(`button`,{className:`btn btn-primary`,onClick:async()=>{try{let e={...a,channels:a.channels.some(e=>e.type===`inapp`)?a.channels:[{type:`inapp`},...a.channels]};a.id?await N(`/api/alerts/${a.id}`,{method:`PUT`,json:e}):await N(`/api/alerts`,{method:`POST`,json:e}),r()}catch(e){c(e.message)}},children:`Save rule`})]})]})}var qV={fixed:{kind:`good`,label:`Fixed`},not_fixed:{kind:`crit`,label:`Not fixed`},too_early:{kind:`warn`,label:`Too early to tell`},not_enough_data:{kind:`neutral`,label:`Not enough data`}};function JV(){let{id:e}=yt(),t=I(),n=L(),r=ht(),{data:i,error:a,reload:o}=P(`/api/issues/${e}`,[e,t.tick]),[s,c]=(0,v.useState)(``),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)(``),{connected:p}=uz(),[m,h]=(0,v.useState)(null),[g,_]=(0,v.useState)(!1),y=async e=>{_(!0),h(null);try{h({ok:!0,text:await e()}),o()}catch(e){h({ok:!1,text:e.message})}finally{_(!1)}};if(a)return(0,F.jsx)(Ra,{error:a});if(!i)return(0,F.jsx)(H,{});let b=async n=>{await N(`/api/issues/${e}`,{method:`PATCH`,json:n}),o(),t.refresh()},x=i.incident,S=(t.meta?.versions||[]).filter(e=>!i.service||e.service===i.service).map(e=>e.version),C=[`Issue #${i.id}: ${i.title}`,`Status: ${i.status} · Severity: ${i.severity}${i.owner?` · Owner: ${i.owner}`:``}`,x?`Error: ${x.error}\nOperation: ${x.operation}\nStarted: ${new Date(x.start).toISOString()}${x.end?`\nEnded: ${new Date(x.end).toISOString()}`:``}\nIntroduced in: ${x.introducedIn||`unknown`}${i.fixVersion?`\nFixed in: ${i.fixVersion}`:``}\nOccurrences: ${x.occurrences}\nAffected users: ${x.users.length}${x.tenants.length?`\nTenants: ${x.tenants.map(e=>e.name).join(`, `)}`:``}`:``,`Timeline:`,...i.timeline.map(e=>`- ${new Date(e.ts).toISOString()} ${e.text}`)].filter(Boolean).join(`
118
- `),w=i.sourceType===`error`?`/errors/${i.sourceRef}`:i.sourceType===`execution`?`/executions/${i.sourceRef}`:i.sourceType===`alert`?`/alerts`:null;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Nn,{to:n(`/issues`),className:`text-mute hover:text-ink text-[12px] -mb-2`,children:`← Issues`}),(0,F.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,F.jsxs)(`span`,{className:`text-mute text-[19px]`,children:[`#`,i.id]}),(0,F.jsx)(`h1`,{className:`text-[19px] font-semibold tracking-tight`,children:i.title})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2 mt-1.5`,children:[(0,F.jsx)(W,{kind:iV[i.status]?.kind||`neutral`,children:iV[i.status]?.label||i.status}),(0,F.jsxs)(`span`,{className:`text-mute text-[12px]`,children:[`opened `,(0,F.jsx)(ro,{ts:i.created}),i.sourceType?` from ${i.sourceType}`:``]}),w&&(0,F.jsx)(`button`,{className:`link text-[12px]`,onClick:()=>r(n(w)),children:`view source →`})]})]}),(0,F.jsxs)(`div`,{className:`flex gap-2`,children:[(0,F.jsx)(Wa,{text:C,label:`Copy summary`}),[`open`,`in_progress`,`unverified`].includes(i.status)&&(0,F.jsx)(`button`,{className:`btn btn-primary`,onClick:()=>b({status:`resolved`}),children:`Mark resolved`}),[`resolved`,`closed`,`verifying`].includes(i.status)&&(0,F.jsx)(`button`,{className:`btn`,onClick:()=>b({status:`open`}),children:`Reopen`})]})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-3 gap-3`,children:[(0,F.jsxs)(`div`,{className:`@5xl:col-span-2 flex flex-col gap-3`,children:[i.description&&(0,F.jsx)(V,{title:`Description`,children:(0,F.jsx)(`div`,{className:`whitespace-pre-wrap text-[13px]`,children:i.description})}),x&&(0,F.jsx)(V,{title:`Incident record`,children:(0,F.jsx)(Qa,{items:[[`Error`,(0,F.jsx)(`span`,{className:`text-[#ff9b9b]`,children:x.error})],[`Operation`,(0,F.jsx)(`span`,{className:`mono`,children:x.operation})],[`Started`,Ea(x.start,!0)],[`Ended`,x.end?Ea(x.end,!0):`ongoing`],[`Last seen`,(0,F.jsx)(ro,{ts:x.lastSeen})],[`Introduced in`,(0,F.jsx)(`span`,{className:`mono`,children:x.introducedIn||`—`})],[`Fixed in`,(0,F.jsx)(`span`,{className:`mono`,children:i.fixVersion||`—`})],[`Occurrences`,x.occurrences],[`Users affected`,x.users.length],[`Tenants`,x.tenants.length?(0,F.jsx)(`span`,{children:x.tenants.map((e,t)=>(0,F.jsxs)(`span`,{children:[t>0&&`, `,(0,F.jsx)(Nn,{to:n(Aa(e.name,e.guessed)),className:`underline decoration-dotted underline-offset-4 hover:text-ink`,children:e.name})]},`${e.guessed}|${e.name}`))}):`—`]]})}),(0,F.jsxs)(V,{title:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(ji,{size:14}),`Did a release fix this?`]}),children:[(0,F.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,F.jsx)(G,{label:`Release`,children:(0,F.jsxs)(`select`,{className:`select w-48`,value:d,onChange:e=>f(e.target.value),children:[(0,F.jsx)(`option`,{value:``,children:i.fixVersion?`Fix version (${i.fixVersion})`:`Since resolution`}),[...new Set(S)].map(e=>(0,F.jsx)(`option`,{children:e},e))]})}),(0,F.jsx)(`button`,{className:`btn`,onClick:async()=>u(await N(`/api/issues/${e}/verify${d?`?version=${encodeURIComponent(d)}`:``}`)),children:`Check`}),d&&d!==i.fixVersion&&(0,F.jsx)(`button`,{className:`btn btn-ghost`,onClick:()=>b({fixVersion:d}),children:`Set as fix version`})]}),l&&(0,F.jsxs)(`div`,{className:`mt-3 flex flex-col gap-1.5`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(W,{kind:qV[l.verdict]?.kind||`neutral`,children:qV[l.verdict]?.label||l.verdict}),(0,F.jsx)(`span`,{className:`text-ink2`,children:l.reason})]}),l.newErrorGroupsInRelease>0&&(0,F.jsxs)(`div`,{className:`text-mute text-[12px]`,children:[`Note: `,l.newErrorGroupsInRelease,` new error group(s) appeared in that release.`]})]}),(0,F.jsx)(`div`,{className:`text-mute text-[11.5px] mt-3`,children:`Marking an issue with a measurable scope as resolved moves it to Verifying: it closes on its own once the fix holds, reopens if the failure returns, and becomes Unverified after 7 days without a conclusion.`})]}),(0,F.jsxs)(V,{title:`Timeline`,children:[(0,F.jsx)(`div`,{className:`flex flex-col gap-2`,children:[...i.timeline].reverse().map((e,t)=>(0,F.jsxs)(`div`,{className:`flex gap-3 text-[12.5px]`,children:[(0,F.jsx)(`span`,{className:`text-mute w-[130px] shrink-0 tabular-nums`,children:Ea(e.ts,!0)}),(0,F.jsx)(`span`,{children:e.text})]},t))}),(0,F.jsxs)(`form`,{className:`flex gap-2 mt-3`,onSubmit:e=>{e.preventDefault(),s&&(b({comment:s}),c(``))},children:[(0,F.jsx)(`input`,{className:`input flex-1`,placeholder:`Add a comment`,value:s,onChange:e=>c(e.target.value)}),(0,F.jsx)(`button`,{className:`btn`,children:`Comment`})]})]})]}),(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsxs)(V,{title:`Ticket`,sub:i.ticket?`kept in step with this issue`:p.length?`track the work where your team works`:void 0,children:[i.ticket?(0,F.jsxs)(`div`,{className:`flex flex-col gap-2.5`,children:[(0,F.jsx)(`div`,{children:(0,F.jsx)(fz,{ticket:i.ticket})}),(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px]`,children:[i.ticket.syncedAt?(0,F.jsxs)(F.Fragment,{children:[`Checked `,(0,F.jsx)(ro,{ts:i.ticket.syncedAt}),`. `]}):``,`Closing it starts verification here; the result is posted on the ticket.`]}),(0,F.jsxs)(`div`,{className:`flex gap-2`,children:[(0,F.jsxs)(`button`,{className:`btn h-7`,disabled:g,onClick:()=>y(async()=>(await N(`/api/issues/${e}/ticket/sync`,{method:`POST`}),`Synced.`)),children:[(0,F.jsx)(bi,{size:12}),`Sync now`]}),(0,F.jsxs)(`button`,{className:`btn btn-ghost h-7`,disabled:g,onClick:()=>y(async()=>window.confirm(`Unlink the ticket? It is not deleted.`)?(await N(`/api/issues/${e}/ticket`,{method:`DELETE`}),`Unlinked.`):`Kept.`),children:[(0,F.jsx)(Hi,{size:12}),`Unlink`]})]})]}):p.length?(0,F.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:p.map(t=>(0,F.jsxs)(`button`,{className:`btn`,disabled:g,onClick:()=>y(async()=>{let n=await N(`/api/issues/${e}/ticket`,{method:`POST`,json:{provider:t}});return`Created ${lz[t]} ${n.key}.`}),children:[`Create in `,lz[t]]},t))}):(0,F.jsxs)(`div`,{className:`text-mute text-[12.5px]`,children:[`Connect GitHub or Linear in `,(0,F.jsx)(`button`,{className:`link`,onClick:()=>r(n(`/integrations`)),children:`Integrations`}),` to open tickets from issues.`]}),m&&(0,F.jsx)(`div`,{className:`text-[12px] mt-2`,style:{color:m.ok?`#5fd38a`:`#ff8a8a`},children:m.text})]}),(0,F.jsx)(V,{title:`Details`,children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)(G,{label:`Status`,children:(0,F.jsx)(`select`,{className:`select`,value:i.status,onChange:e=>b({status:e.target.value}),children:Object.entries(iV).map(([e,t])=>(0,F.jsx)(`option`,{value:e,children:t.label},e))})}),(0,F.jsx)(G,{label:`Severity`,children:(0,F.jsx)(`select`,{className:`select`,value:i.severity,onChange:e=>b({severity:e.target.value}),children:Object.keys(aV).map(e=>(0,F.jsx)(`option`,{children:e},e))})}),(0,F.jsx)(G,{label:`Owner`,children:(0,F.jsx)(`input`,{className:`input`,defaultValue:i.owner||``,onBlur:e=>e.target.value!==(i.owner||``)&&b({owner:e.target.value}),placeholder:`name or email`})}),(0,F.jsx)(G,{label:`Due date`,children:(0,F.jsx)(`input`,{className:`input`,type:`date`,defaultValue:i.due?new Date(i.due).toISOString().slice(0,10):``,onChange:e=>b({due:e.target.value?new Date(e.target.value).getTime():null})})}),(0,F.jsx)(Qa,{items:[[`Application`,i.service||`—`],[`Created`,Ea(i.created,!0)],[`Updated`,(0,F.jsx)(ro,{ts:i.updated})]]}),(0,F.jsx)(`button`,{className:`btn btn-ghost justify-center text-[#ff8a8a]`,onClick:async()=>{window.confirm(`Delete this issue?`)&&(await N(`/api/issues/${e}`,{method:`DELETE`}),r(n(`/issues`)))},children:`Delete issue`})]})})]})]})]})}var YV={healthy:{kind:`good`,label:`Healthy`},at_risk:{kind:`warn`,label:`At risk`},burning:{kind:`serious`,label:`Burning`},exhausted:{kind:`crit`,label:`Budget exhausted`},no_data:{kind:`neutral`,label:`No data`}},XV=e=>e==null?`#55556a`:e<=0?ZR.crit:e<.25?ZR.serious:e<.5?ZR.warn:ZR.good,ZV=(e,t)=>e==null?void 0:e>t?`#ff8a8a`:e>1?`#ffc85a`:void 0,QV=e=>`${e.service||`all applications`}${e.operation?` · ${e.operation}`:``}${e.kind===`job`?` (jobs)`:``}`,$V=e=>`${e.kind===`job`?`runs succeed`:`requests succeed (non-5xx)`}${e.latencyMs?` and finish within ${e.latencyMs}ms`:``}`;function eH({value:e}){let t=e==null?0:Math.max(0,Math.min(1,e))*100;return(0,F.jsx)(`div`,{className:`h-1.5 rounded-full bg-[#24242e] overflow-hidden`,title:e==null?`no data`:`${(e*100).toFixed(1)}% budget left`,children:(0,F.jsx)(`div`,{className:`h-full rounded-full`,style:{width:`${t}%`,background:XV(e)}})})}function tH(){let e=I(),[t,n]=zn(),{data:r,error:i,reload:a}=P(`/api/slos`,[e.tick]),[o,s]=(0,v.useState)(null),c=Number(t.get(`id`))||r?.[0]?.slo.id||null,l=e=>{let r=new URLSearchParams(t);r.set(`id`,String(e)),n(r,{replace:!0})};return i?(0,F.jsx)(Ra,{error:i}):r?(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ia,{icon:(0,F.jsx)(Li,{size:18,className:`text-brand`}),title:`SLOs`,sub:`Service level objectives on real traffic: the share of good requests or job runs over a rolling window, the error budget left, and burn-rate alerts that fire before the budget runs out.`,right:(0,F.jsxs)(`button`,{className:`btn btn-primary`,onClick:()=>s({target:99.5,windowDays:7,kind:`http`,channels:[{type:`inapp`}]}),children:[(0,F.jsx)(_i,{size:14}),`New SLO`]})}),r.length===0?(0,F.jsx)(V,{children:(0,F.jsx)(U,{title:`No SLOs yet`,icon:(0,F.jsx)(Li,{size:22}),children:`An SLO says how reliable something must be, e.g. 99.5% of checkout requests succeed over 7 days. Obzerver tracks the error budget and alerts on fast and slow burn.`})}):(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-[360px_1fr] gap-3 items-start`,children:[(0,F.jsx)(`div`,{className:`flex flex-col gap-2`,children:r.map(e=>(0,F.jsxs)(`button`,{onClick:()=>l(e.slo.id),className:`card text-left px-3.5 py-3 flex flex-col gap-2 ${c===e.slo.id?`!border-[#5a2340]`:`hover:border-line2`}`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,F.jsx)(`span`,{className:`font-medium truncate`,children:e.slo.name}),(0,F.jsx)(W,{kind:YV[e.state].kind,children:YV[e.state].label})]}),(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px] truncate`,children:[QV(e.slo),` · `,e.slo.target,`% over `,e.slo.windowDays,`d`]}),(0,F.jsxs)(`div`,{className:`flex items-baseline justify-between gap-2`,children:[(0,F.jsx)(`span`,{className:`text-[18px] font-semibold tabular-nums`,children:e.sli==null?`—`:`${e.sli}%`}),(0,F.jsx)(`span`,{className:`text-[11.5px] tabular-nums`,style:{color:XV(e.budgetRemaining)},children:e.budgetRemaining==null?`no data`:`${(e.budgetRemaining*100).toFixed(1)}% budget left`})]}),(0,F.jsx)(eH,{value:e.budgetRemaining})]},e.slo.id))}),c&&(0,F.jsx)(nH,{id:c,onEdit:e=>s(e),onDeleted:()=>{let e=new URLSearchParams(t);e.delete(`id`),n(e),a()}})]}),o&&(0,F.jsx)(iH,{slo:o,onClose:()=>s(null),onSaved:e=>{s(null),a(),l(e)}})]}):(0,F.jsx)(H,{})}function nH({id:e,onEdit:t,onDeleted:n}){let r=I(),i=L(),{data:a,error:o}=P(`/api/slos/${e}`,[e,r.tick]);if(o)return(0,F.jsx)(Ra,{error:o});if(!a)return(0,F.jsx)(H,{});let s=a.slo,c=a.history.points,l=[[`5 minutes`,a.burn.m5,14.4],[`30 minutes`,a.burn.m30,6],[`1 hour`,a.burn.h1,14.4],[`6 hours`,a.burn.h6,6],[`1 day`,a.burn.d1,1]];return(0,F.jsxs)(`div`,{className:`flex flex-col gap-3 min-w-0`,children:[(0,F.jsx)(V,{title:(0,F.jsxs)(`span`,{className:`flex items-center gap-2`,children:[s.name,(0,F.jsx)(W,{kind:YV[a.state].kind,children:YV[a.state].label})]}),right:(0,F.jsxs)(`div`,{className:`flex gap-1`,children:[(0,F.jsxs)(`button`,{className:`btn h-7`,onClick:()=>t(s),children:[(0,F.jsx)(pi,{size:13}),`Edit`]}),(0,F.jsx)(`button`,{className:`btn btn-ghost h-7 px-2`,title:`Delete`,onClick:async()=>{window.confirm(`Delete SLO "${s.name}" and its burn alerts?`)&&(await N(`/api/slos/${s.id}`,{method:`DELETE`}),n())},children:(0,F.jsx)(Ri,{size:13})})]}),children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[s.description&&(0,F.jsx)(`div`,{className:`text-ink2`,children:s.description}),(0,F.jsxs)(`div`,{className:`text-[13px]`,children:[(0,F.jsxs)(`b`,{children:[s.target,`%`]}),` of `,s.operation?(0,F.jsx)(Ua,{name:s.operation}):(0,F.jsx)(`span`,{children:s.kind===`job`?`job runs`:`requests`}),` in `,(0,F.jsx)(`b`,{children:s.service||`all applications`}),` `,$V(s),`, over a rolling `,(0,F.jsxs)(`b`,{children:[s.windowDays,`-day`]}),` window.`]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 @3xl:grid-cols-4 gap-3`,children:[(0,F.jsx)(rH,{label:`Achieved`,value:a.sli==null?`—`:`${a.sli}%`,sub:`target ${s.target}%`,color:a.sli!=null&&a.sli<s.target?`#ff8a8a`:void 0}),(0,F.jsx)(rH,{label:`Error budget left`,value:a.budgetRemaining==null?`—`:`${(a.budgetRemaining*100).toFixed(1)}%`,color:XV(a.budgetRemaining),sub:(0,F.jsx)(eH,{value:a.budgetRemaining})}),(0,F.jsx)(rH,{label:`Bad events left`,value:a.budgetEventsLeft==null?`—`:B(Math.max(0,a.budgetEventsLeft)),sub:`${B(a.bad)} bad of ${B(a.total)}`}),(0,F.jsx)(rH,{label:`Burn rate (1h)`,value:a.burn.h1==null?`—`:`${a.burn.h1}×`,sub:`1× spends the budget exactly by window end`,color:ZV(a.burn.h1,14.4)})]}),a.partialWindow&&(0,F.jsxs)(`div`,{className:`flex items-center gap-2 text-[12px] text-[#ffc85a]`,children:[(0,F.jsx)(Vi,{size:13}),a.dataSince?`Data only goes back to ${Ea(a.dataSince,!0)}`:`No data yet`,`, so this window is partial.`,s.windowDays>a.retentionDays&&` Retention is ${a.retentionDays} days; raise OBZERVER_RETENTION_DAYS to cover the full ${s.windowDays}-day window.`]})]})}),(0,F.jsx)(tz,{title:`Error budget burn-down`,sub:`share of the window's budget still unspent`,children:(0,F.jsx)(ez,{data:c,series:[{key:`budget`,label:`Budget left`,color:XR[0],type:`area`}],height:190,fmt:e=>`${e.toFixed(1)}%`,refLines:[{y:0,label:`exhausted`,color:ZR.crit}],zoom:!1})}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @7xl:grid-cols-2 gap-3`,children:[(0,F.jsx)(tz,{title:`SLI per bucket`,sub:`good share per ${a.history.bucketMs>=864e5?`day`:a.history.bucketMs>=36e5?`${a.history.bucketMs/36e5}h`:`30m`}`,children:(0,F.jsx)(ez,{data:c,series:[{key:`sli`,label:`SLI`,color:XR[2],type:`line`}],height:170,fmt:e=>`${e.toFixed(2)}%`,refLines:[{y:s.target,label:`target ${s.target}%`,color:`#ff6b9d`}],yDomain:[`auto`,100],zoom:!1})}),(0,F.jsx)(V,{title:`Burn rates`,sub:`multiples of the sustainable rate`,children:(0,F.jsxs)(`table`,{className:`tbl`,children:[(0,F.jsx)(`thead`,{children:(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:`Lookback`}),(0,F.jsx)(`th`,{className:`num`,children:`Burn rate`}),(0,F.jsx)(`th`,{className:`num`,children:`Error rate`})]})}),(0,F.jsx)(`tbody`,{children:l.map(([e,t,n])=>(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{children:e}),(0,F.jsx)(`td`,{className:`num`,style:{color:ZV(t,n)},children:t==null?`—`:`${t}×`}),(0,F.jsx)(`td`,{className:`num text-ink2`,children:t==null?`—`:Sa(t*(100-s.target))})]},e))})]})})]}),(0,F.jsxs)(V,{title:`Burn-rate alerts`,sub:`created and kept in step with this SLO`,pad:!1,children:[(0,F.jsx)(Ka,{rows:a.rules,cols:[{key:`s`,label:`State`,render:e=>e.state===`firing`?(0,F.jsx)(W,{kind:`crit`,children:`firing`}):(0,F.jsx)(W,{kind:`good`,children:`ok`})},{key:`n`,label:`Rule`,render:e=>(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{children:e.params.speed===`fast`?`Fast burn`:`Slow burn`}),(0,F.jsx)(`div`,{className:`text-mute text-[11.5px]`,children:e.params.speed===`fast`?`over 14.4× on both the last 1h and 5m (about 2% of a 30-day budget in an hour)`:`over 6× on both the last 6h and 30m (about 5% of a 30-day budget in 6 hours)`})]})},{key:`v`,label:`Current`,num:!0,render:e=>e.last_value==null?`—`:`${e.last_value.toFixed(1)}×`},{key:`c`,label:`Notifies`,render:()=>(0,F.jsx)(`div`,{className:`flex gap-1`,children:s.channels.map((e,t)=>(0,F.jsx)(`span`,{className:`pill`,children:e.type},t))})}]}),a.events.length>0&&(0,F.jsx)(`div`,{className:`border-t border-line`,children:a.events.slice(0,8).map(e=>(0,F.jsxs)(`div`,{className:`flex gap-3 px-3.5 py-2 border-b border-[#1d1d26] last:border-0 text-[12px]`,children:[(0,F.jsx)(`span`,{className:`text-mute w-32 shrink-0`,children:(0,F.jsx)(ro,{ts:e.ts})}),e.state===`firing`?(0,F.jsx)(W,{kind:`crit`,children:`firing`}):(0,F.jsx)(W,{kind:`good`,children:e.state}),(0,F.jsx)(`span`,{className:`text-ink2 truncate`,children:e.message})]},e.id))}),(0,F.jsxs)(`div`,{className:`px-3.5 py-2 border-t border-line text-[11.5px] text-mute`,children:[`Delivery history is on `,(0,F.jsx)(Nn,{className:`link`,to:i(`/alerts`),children:`Alerts`}),`.`]})]})]})}function rH({label:e,value:t,sub:n,color:r}){return(0,F.jsxs)(`div`,{className:`rounded-lg border border-line px-3 py-2.5 flex flex-col gap-1`,children:[(0,F.jsx)(`div`,{className:`text-mute text-[11.5px]`,children:e}),(0,F.jsx)(`div`,{className:`text-[20px] font-semibold tabular-nums leading-none`,style:r?{color:r}:void 0,children:t}),n&&(0,F.jsx)(`div`,{className:`text-mute text-[11px]`,children:n})]})}function iH({slo:e,onClose:t,onSaved:n}){let r=I(),[i,a]=(0,v.useState)({...e,channels:e.channels??[{type:`inapp`}]}),[o,s]=(0,v.useState)(``),c=P(`/api/operations?range=604800000&kind=${i.kind||`http`}${i.service?`&service=${encodeURIComponent(i.service)}`:``}`,[i.kind,i.service]),l=e=>i.channels?.find(t=>t.type===e),u=(e,t)=>{let n=(i.channels||[]).filter(t=>t.type!==e);a({...i,channels:t?[...n,{type:e,...t}]:n})};(0,v.useEffect)(()=>s(``),[i]);let d=async()=>{try{let e={...i,channels:[{type:`inapp`},...(i.channels||[]).filter(e=>e.type!==`inapp`)]};n((i.id?await N(`/api/slos/${i.id}`,{method:`PUT`,json:e}):await N(`/api/slos`,{method:`POST`,json:e})).id)}catch(e){s(e.message)}},f=i.target?100-i.target:null;return(0,F.jsxs)($a,{open:!0,onClose:t,title:i.id?`Edit SLO`:`New SLO`,wide:!0,children:[(0,F.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,F.jsx)(G,{label:`Name`,children:(0,F.jsx)(`input`,{className:`input`,autoFocus:!0,placeholder:`Checkout availability`,value:i.name||``,onChange:e=>a({...i,name:e.target.value})})}),(0,F.jsx)(G,{label:`Measures`,children:(0,F.jsx)(Ga,{value:i.kind||`http`,onChange:e=>a({...i,kind:e,operation:null}),options:[{id:`http`,label:`HTTP requests`},{id:`job`,label:`Job runs`}]})}),(0,F.jsx)(G,{label:`Application`,children:(0,F.jsxs)(`select`,{className:`select`,value:i.service||``,onChange:e=>a({...i,service:e.target.value||null,operation:null}),children:[(0,F.jsx)(`option`,{value:``,children:`All applications`}),r.meta?.services.map(e=>(0,F.jsx)(`option`,{children:e.id},e.id))]})}),(0,F.jsxs)(G,{label:i.kind===`job`?`Job (optional)`:`Route (optional)`,hint:`leave empty to cover everything in the application`,children:[(0,F.jsx)(`input`,{className:`input mono`,list:`slo-ops`,placeholder:i.kind===`job`?`send-email`:`POST /checkout`,value:i.operation||``,onChange:e=>a({...i,operation:e.target.value||null})}),(0,F.jsx)(`datalist`,{id:`slo-ops`,children:[...new Set((c.data||[]).map(e=>e.name))].map(e=>(0,F.jsx)(`option`,{value:e},e))})]}),(0,F.jsx)(G,{label:`Target (% good)`,hint:f==null?void 0:`allows ${f.toFixed(3).replace(/0+$/,``).replace(/\.$/,``)}% bad events`,children:(0,F.jsxs)(`div`,{className:`flex gap-2 items-center`,children:[(0,F.jsx)(`input`,{className:`input w-28`,type:`number`,step:`0.01`,min:`1`,max:`99.999`,value:i.target??``,onChange:e=>a({...i,target:e.target.value===``?void 0:Number(e.target.value)})}),[99,99.5,99.9,99.95].map(e=>(0,F.jsx)(`button`,{type:`button`,className:`btn h-7 px-2 ${i.target===e?`btn-primary`:``}`,onClick:()=>a({...i,target:e}),children:e},e))]})}),(0,F.jsx)(G,{label:`Window`,children:(0,F.jsx)(Ga,{value:String(i.windowDays??7),onChange:e=>a({...i,windowDays:Number(e)}),options:[`1`,`7`,`14`,`28`,`30`].map(e=>({id:e,label:`${e}d`}))})}),(0,F.jsx)(G,{label:`Latency threshold (optional)`,hint:`if set, a successful event slower than this also counts as bad`,children:(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`input`,{className:`input w-32`,type:`number`,min:`1`,placeholder:`e.g. 800`,value:i.latencyMs??``,onChange:e=>a({...i,latencyMs:e.target.value===``?null:Number(e.target.value)})}),(0,F.jsx)(`span`,{className:`text-mute`,children:`ms`})]})}),(0,F.jsx)(G,{label:`Description (optional)`,children:(0,F.jsx)(`input`,{className:`input`,value:i.description||``,onChange:e=>a({...i,description:e.target.value||null})})})]}),(0,F.jsxs)(`div`,{className:`mt-4 pt-4 border-t border-line grid grid-cols-2 gap-3`,children:[(0,F.jsx)(`div`,{className:`col-span-2 text-[12px] font-semibold`,children:`Burn-rate alerts notify`}),(0,F.jsx)(G,{label:`Slack incoming webhook URL`,children:(0,F.jsx)(`input`,{className:`input`,placeholder:`https://hooks.slack.com/services/…`,value:l(`slack`)?.url||``,onChange:e=>u(`slack`,e.target.value?{url:e.target.value}:null)})}),(0,F.jsx)(G,{label:`Generic webhook URL`,children:(0,F.jsx)(`input`,{className:`input`,placeholder:`https://…`,value:l(`webhook`)?.url||``,onChange:e=>u(`webhook`,e.target.value?{url:e.target.value}:null)})}),(0,F.jsx)(`div`,{className:`col-span-2`,children:(0,F.jsx)(UV,{value:l(`email`)?.to||``,onChange:e=>u(`email`,e.trim()?{to:e}:null)})})]}),o&&(0,F.jsx)(`div`,{className:`text-[#ff8a8a] mt-3`,children:o}),(0,F.jsxs)(`div`,{className:`flex justify-end gap-2 mt-4`,children:[(0,F.jsx)(`button`,{className:`btn`,onClick:t,children:`Cancel`}),(0,F.jsx)(`button`,{className:`btn btn-primary`,onClick:d,children:`Save SLO`})]})]})}var aH={operational:{label:`Operational`,color:`#0ca30c`,kind:`good`},degraded:{label:`Degraded`,color:`#e6a100`,kind:`warn`},partial_outage:{label:`Partial outage`,color:`#ec835a`,kind:`serious`},major_outage:{label:`Major outage`,color:`#d03b3b`,kind:`crit`},no_data:{label:`No data`,color:`#3a3a48`,kind:`neutral`}},oH=[`investigating`,`identified`,`monitoring`,`resolved`],sH=e=>e[0].toUpperCase()+e.slice(1).replace(`_`,` `);function cH(){let e=I(),[t,n]=zn(),{data:r,error:i,reload:a}=P(`/api/status-pages`,[e.tick]),[o,s]=(0,v.useState)(null);if(i)return(0,F.jsx)(Ra,{error:i});if(!r)return(0,F.jsx)(H,{});let c=Number(t.get(`id`))||r[0]?.id||null,l=e=>{let r=new URLSearchParams(t);r.set(`id`,String(e)),n(r,{replace:!0})};return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ia,{icon:(0,F.jsx)(yi,{size:18,className:`text-brand`}),title:`Status pages`,sub:`Public pages for your customers. Each component's status comes from its live traffic, and incidents can be posted by hand or opened automatically during an outage.`,right:(0,F.jsxs)(`button`,{className:`btn btn-primary`,onClick:()=>s({autoIncidents:!0,published:!0,components:[]}),children:[(0,F.jsx)(_i,{size:14}),`New status page`]})}),r.length===0?(0,F.jsx)(V,{children:(0,F.jsx)(U,{title:`No status pages yet`,icon:(0,F.jsx)(yi,{size:22}),children:`Create a page, map components like "Checkout" or "API" to your applications and routes, and share the public link.`})}):(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-[300px_1fr] gap-3 items-start`,children:[(0,F.jsx)(`div`,{className:`flex flex-col gap-2`,children:r.map(e=>(0,F.jsxs)(`button`,{onClick:()=>l(e.id),className:`card text-left px-3.5 py-3 flex flex-col gap-1.5 ${c===e.id?`!border-[#5a2340]`:`hover:border-line2`}`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,F.jsx)(`span`,{className:`font-medium truncate`,children:e.title}),(0,F.jsx)(W,{kind:aH[e.overall].kind,children:aH[e.overall].label})]}),(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px] mono`,children:[`/status/`,e.slug,!e.published&&` · unpublished`]}),(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px]`,children:[e.components.length,` component`,e.components.length===1?``:`s`,e.activeIncidents?` · ${e.activeIncidents} active incident${e.activeIncidents>1?`s`:``}`:``]})]},e.id))}),c&&(0,F.jsx)(lH,{id:c,onEdit:s,onDeleted:()=>{let e=new URLSearchParams(t);e.delete(`id`),n(e),a()},onChanged:a})]}),o&&(0,F.jsx)(fH,{page:o,onClose:()=>s(null),onSaved:e=>{s(null),a(),l(e)}})]})}function lH({id:e,onEdit:t,onDeleted:n,onChanged:r}){let i=I(),{data:a,error:o,reload:s}=P(`/api/status-pages/${e}`,[e,i.tick]),[c,l]=(0,v.useState)(null);if(o)return(0,F.jsx)(Ra,{error:o});if(!a)return(0,F.jsx)(H,{});let u=a.page,d=`${window.location.origin}/status/${u.slug}`,f=()=>{s(),r()},p=a.incidents.filter(e=>e.status!==`resolved`),m=a.incidents.filter(e=>e.status===`resolved`),h=e=>u.components.find(t=>t.id===e)?.name||`removed component`;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-3 min-w-0`,children:[(0,F.jsxs)(V,{title:(0,F.jsxs)(`span`,{className:`flex items-center gap-2`,children:[u.title,(0,F.jsx)(W,{kind:aH[a.overall].kind,children:aH[a.overall].label})]}),right:(0,F.jsxs)(`div`,{className:`flex gap-1`,children:[(0,F.jsxs)(`a`,{className:`btn h-7`,href:`/status/${u.slug}`,target:`_blank`,rel:`noreferrer`,children:[(0,F.jsx)(Vr,{size:13}),`Open public page`]}),(0,F.jsx)(Wa,{text:d,label:`Copy link`,className:`btn h-7`}),(0,F.jsxs)(`button`,{className:`btn h-7`,onClick:()=>t(u),children:[(0,F.jsx)(pi,{size:13}),`Edit`]}),(0,F.jsx)(`button`,{className:`btn btn-ghost h-7 px-2`,title:`Delete`,onClick:async()=>{window.confirm(`Delete status page "${u.title}" and its incidents?`)&&(await N(`/api/status-pages/${u.id}`,{method:`DELETE`}),n())},children:(0,F.jsx)(Ri,{size:13})})]}),children:[(0,F.jsxs)(`div`,{className:`flex flex-wrap gap-x-5 gap-y-1 text-[12.5px] text-ink2`,children:[(0,F.jsxs)(`span`,{children:[u.published?`Public at `:`Unpublished · `,(0,F.jsx)(`span`,{className:`mono`,children:d})]}),(0,F.jsxs)(`span`,{children:[`Automatic incidents: `,(0,F.jsx)(`b`,{children:u.autoIncidents?`on`:`off`})]})]}),u.description&&(0,F.jsx)(`div`,{className:`text-ink2 mt-2`,children:u.description})]}),(0,F.jsx)(V,{title:`Components`,sub:`status from the last 10 minutes of traffic; bars show the last 90 days`,pad:!1,children:a.components.length===0?(0,F.jsx)(U,{title:`No components`,children:`Edit the page to map components to applications and routes.`}):a.components.map(e=>(0,F.jsxs)(`div`,{className:`px-3.5 py-3 border-b border-[#1d1d26] last:border-0`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(`div`,{className:`font-medium`,children:e.name}),(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px] mono truncate`,children:[e.service,e.operation?` · ${e.operation}`:``,e.latencyMs?` · degraded above p95 ${e.latencyMs}ms`:``]})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-4 shrink-0 text-[12px]`,children:[(0,F.jsx)(`span`,{className:`text-mute tabular-nums`,children:e.live.requests?`${e.live.requests} req · ${Sa(e.live.errorRate)} 5xx · p95 ${z(e.live.p95)}`:`no recent traffic`}),(0,F.jsx)(W,{kind:aH[e.status].kind,children:aH[e.status].label})]})]}),(0,F.jsx)(`div`,{className:`flex gap-[2px] h-6 mt-2`,children:e.days.map(e=>(0,F.jsx)(`span`,{className:`flex-1 rounded-[2px]`,style:{background:aH[e.status].color},title:`${new Date(e.day).toISOString().slice(0,10)}: ${aH[e.status].label}${e.requests?` · ${e.requests} req, ${Sa(e.errorRate)} errors`:``}`},e.day))}),(0,F.jsxs)(`div`,{className:`flex justify-between text-mute text-[11px] mt-1`,children:[(0,F.jsx)(`span`,{children:`90 days ago`}),(0,F.jsx)(`span`,{children:e.uptime==null?``:`${e.uptime}% uptime`}),(0,F.jsx)(`span`,{children:`today`})]})]},e.id))}),(0,F.jsx)(V,{title:`Incidents`,right:(0,F.jsxs)(`button`,{className:`btn btn-primary h-7`,disabled:!u.components.length,onClick:()=>l({impact:`minor`,status:`investigating`,components:[]}),children:[(0,F.jsx)(oi,{size:13}),`Post incident`]}),pad:!1,children:a.incidents.length===0?(0,F.jsx)(U,{title:`No incidents`,children:`Post one when something is wrong, or let automatic incidents handle outages.`}):(0,F.jsx)(`div`,{children:[...p,...m.slice(0,10)].map(e=>(0,F.jsx)(uH,{inc:e,name:h,onChanged:f},e.id))})}),c&&(0,F.jsx)(dH,{page:u,inc:c,onClose:()=>l(null),onSaved:()=>{l(null),f()}})]})}function uH({inc:e,name:t,onChanged:n}){let[r,i]=(0,v.useState)(``),[a,o]=(0,v.useState)(e.status===`resolved`?`resolved`:e.status),s=e.status!==`resolved`,c=async()=>{await N(`/api/incidents/${e.id}`,{method:`PATCH`,json:{status:a,message:r}}),i(``),n()},l=e.impact===`critical`?`crit`:e.impact===`major`?`serious`:`warn`;return(0,F.jsxs)(`div`,{className:`px-3.5 py-3 border-b border-[#1d1d26] last:border-0 flex flex-col gap-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,F.jsx)(`span`,{className:`font-medium truncate`,children:e.title}),(0,F.jsx)(W,{kind:s?l:`good`,children:s?`${e.impact} · ${e.status}`:`resolved`}),e.auto&&(0,F.jsx)(`span`,{className:`pill`,children:`automatic`})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0 text-mute text-[11.5px]`,children:[Ea(e.created,!0),e.resolvedAt&&` → ${Ea(e.resolvedAt,!0)}`,(0,F.jsx)(`button`,{className:`btn btn-ghost h-6 px-1.5`,title:`Delete`,onClick:async()=>{window.confirm(`Delete this incident? It disappears from the public page.`)&&(await N(`/api/incidents/${e.id}`,{method:`DELETE`}),n())},children:(0,F.jsx)(Ki,{size:12})})]})]}),(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px]`,children:[`Affects: `,e.components.map(t).join(`, `)||`—`]}),(0,F.jsx)(`div`,{className:`flex flex-col gap-1 border-l border-line2 pl-3`,children:[...e.updates].reverse().map((e,t)=>(0,F.jsxs)(`div`,{className:`text-[12.5px]`,children:[(0,F.jsx)(`b`,{className:`capitalize`,children:e.status}),` `,(0,F.jsxs)(`span`,{className:`text-ink2`,children:[`— `,e.text]}),` `,(0,F.jsx)(`span`,{className:`text-mute text-[11px]`,children:(0,F.jsx)(ro,{ts:e.ts})})]},t))}),s&&(0,F.jsxs)(`div`,{className:`flex gap-2 items-center`,children:[(0,F.jsx)(`select`,{className:`select`,value:a,onChange:e=>o(e.target.value),children:oH.map(e=>(0,F.jsx)(`option`,{value:e,children:sH(e)},e))}),(0,F.jsx)(`input`,{className:`input flex-1`,placeholder:a===`resolved`?`What fixed it (optional)`:`Post an update for customers`,value:r,onChange:e=>i(e.target.value)}),(0,F.jsx)(`button`,{className:`btn`,disabled:!r&&a===e.status,onClick:c,children:a===`resolved`?`Resolve`:`Post update`})]})]})}function dH({page:e,inc:t,onClose:n,onSaved:r}){let[i,a]=(0,v.useState)({title:t.title||``,impact:t.impact||`minor`,status:t.status||`investigating`,components:t.components||[],message:``}),[o,s]=(0,v.useState)(``),c=e=>a({...i,components:i.components.includes(e)?i.components.filter(t=>t!==e):[...i.components,e]});return(0,F.jsx)($a,{open:!0,onClose:n,title:`Post incident`,children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)(G,{label:`Title`,children:(0,F.jsx)(`input`,{className:`input`,autoFocus:!0,placeholder:`Checkout errors for some customers`,value:i.title,onChange:e=>a({...i,title:e.target.value})})}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,F.jsx)(G,{label:`Impact`,hint:`minor = degraded, major = partial outage, critical = major outage`,children:(0,F.jsx)(Ga,{value:i.impact,onChange:e=>a({...i,impact:e}),options:[{id:`minor`,label:`Minor`},{id:`major`,label:`Major`},{id:`critical`,label:`Critical`}]})}),(0,F.jsx)(G,{label:`Status`,children:(0,F.jsx)(`select`,{className:`select`,value:i.status,onChange:e=>a({...i,status:e.target.value}),children:oH.filter(e=>e!==`resolved`).map(e=>(0,F.jsx)(`option`,{value:e,children:sH(e)},e))})})]}),(0,F.jsx)(G,{label:`Affected components`,children:(0,F.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:e.components.map(e=>(0,F.jsxs)(`label`,{className:`pill cursor-pointer !py-1 ${i.components.includes(e.id)?`!border-[#ff3d7f] !text-white`:``}`,children:[(0,F.jsx)(`input`,{type:`checkbox`,className:`hidden`,checked:i.components.includes(e.id),onChange:()=>c(e.id)}),e.name]},e.id))})}),(0,F.jsx)(G,{label:`First update (shown publicly)`,children:(0,F.jsx)(`textarea`,{className:`input`,rows:3,placeholder:`We are investigating elevated error rates on checkout.`,value:i.message,onChange:e=>a({...i,message:e.target.value})})}),o&&(0,F.jsx)(`div`,{className:`text-[#ff8a8a]`,children:o}),(0,F.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,F.jsx)(`button`,{className:`btn`,onClick:n,children:`Cancel`}),(0,F.jsx)(`button`,{className:`btn btn-primary`,disabled:!i.title||!i.components.length,onClick:async()=>{try{await N(`/api/status-pages/${e.id}/incidents`,{method:`POST`,json:i}),r()}catch(e){s(e.message)}},children:`Post incident`})]})]})})}function fH({page:e,onClose:t,onSaved:n}){let r=I(),[i,a]=(0,v.useState)({...e,components:e.components??[]}),[o,s]=(0,v.useState)(``),c=i.components||[],l=(e,t)=>a({...i,components:c.map((n,r)=>r===e?{...n,...t}:n)});return(0,F.jsxs)($a,{open:!0,onClose:t,title:i.id?`Edit status page`:`New status page`,wide:!0,children:[(0,F.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,F.jsx)(G,{label:`Title`,children:(0,F.jsx)(`input`,{className:`input`,autoFocus:!0,placeholder:`Acme Status`,value:i.title||``,onChange:e=>a({...i,title:e.target.value})})}),(0,F.jsx)(G,{label:`URL slug`,hint:`public at /status/${i.slug||(i.title||``).toLowerCase().replace(/[^\w]+/g,`-`)||`…`}`,children:(0,F.jsx)(`input`,{className:`input mono`,placeholder:`from the title`,value:i.slug||``,onChange:e=>a({...i,slug:e.target.value})})}),(0,F.jsx)(`div`,{className:`col-span-2`,children:(0,F.jsx)(G,{label:`Description (optional)`,children:(0,F.jsx)(`input`,{className:`input`,placeholder:`Live status of Acme's APIs and checkout`,value:i.description||``,onChange:e=>a({...i,description:e.target.value||null})})})}),(0,F.jsxs)(`label`,{className:`flex items-center gap-2 text-[12.5px]`,children:[(0,F.jsx)(`input`,{type:`checkbox`,checked:i.published!==!1,onChange:e=>a({...i,published:e.target.checked})}),`Published (anyone with the link can view it)`]}),(0,F.jsxs)(`label`,{className:`flex items-center gap-2 text-[12.5px]`,children:[(0,F.jsx)(`input`,{type:`checkbox`,checked:i.autoIncidents!==!1,onChange:e=>a({...i,autoIncidents:e.target.checked})}),`Open and resolve incidents automatically on outages`]})]}),(0,F.jsxs)(`div`,{className:`mt-4 pt-4 border-t border-line flex flex-col gap-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,F.jsx)(`span`,{className:`text-[12px] font-semibold`,children:`Components`}),(0,F.jsxs)(`button`,{className:`btn h-7`,onClick:()=>a({...i,components:[...c,{id:``,name:``,service:r.meta?.services[0]?.id||``,operation:null,latencyMs:null}]}),children:[(0,F.jsx)(_i,{size:13}),`Add component`]})]}),(0,F.jsx)(`div`,{className:`text-mute text-[11.5px]`,children:`Customers only see the component name and its status. The application and route stay private.`}),c.length===0&&(0,F.jsx)(`div`,{className:`text-mute text-[12.5px] py-2`,children:`No components yet.`}),c.map((e,t)=>(0,F.jsxs)(`div`,{className:`grid grid-cols-[1.2fr_1fr_1.2fr_110px_auto] gap-2 items-center`,children:[(0,F.jsx)(`input`,{className:`input`,placeholder:`Name, e.g. Checkout`,value:e.name,onChange:e=>l(t,{name:e.target.value})}),(0,F.jsxs)(`select`,{className:`select`,value:e.service,onChange:e=>l(t,{service:e.target.value}),children:[(0,F.jsx)(`option`,{value:``,children:`Application…`}),r.meta?.services.map(e=>(0,F.jsx)(`option`,{children:e.id},e.id))]}),(0,F.jsx)(`input`,{className:`input mono`,placeholder:`Route (optional)`,value:e.operation||``,onChange:e=>l(t,{operation:e.target.value||null})}),(0,F.jsx)(`input`,{className:`input`,type:`number`,placeholder:`p95 ms`,title:`Degraded when p95 is above this (optional)`,value:e.latencyMs??``,onChange:e=>l(t,{latencyMs:e.target.value===``?null:Number(e.target.value)})}),(0,F.jsx)(`button`,{className:`btn btn-ghost h-7 px-2`,onClick:()=>a({...i,components:c.filter((e,n)=>n!==t)}),children:(0,F.jsx)(Ri,{size:13})})]},t))]}),o&&(0,F.jsx)(`div`,{className:`text-[#ff8a8a] mt-3`,children:o}),(0,F.jsxs)(`div`,{className:`flex justify-end gap-2 mt-4`,children:[(0,F.jsx)(`button`,{className:`btn`,onClick:t,children:`Cancel`}),(0,F.jsx)(`button`,{className:`btn btn-primary`,onClick:async()=>{try{n((i.id?await N(`/api/status-pages/${i.id}`,{method:`PUT`,json:i}):await N(`/api/status-pages`,{method:`POST`,json:i})).id)}catch(e){s(e.message)}},children:`Save page`})]})]})}var pH={good:Mr,warn:jr,bad:di,neutral:Nr};function mH(e){if(!e)return``;let t=Date.now()-e;if(t<6e4)return`just now`;let n=Math.round(t/6e4);if(n<60)return`${n} minute${n===1?``:`s`} ago`;let r=Math.round(t/36e5);if(r<24)return`${r} hour${r===1?``:`s`} ago`;let i=Math.round(t/864e5);return i===1?`yesterday`:`${i} days ago`}function hH({n:e,title:t,right:n,children:r,className:i=``}){return(0,F.jsxs)(`section`,{className:`card p-5 flex flex-col gap-3.5 ${i}`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,F.jsx)(`h2`,{className:`text-[16px] font-semibold tracking-tight`,children:t}),e!=null&&e>0&&(0,F.jsx)(`span`,{className:`text-[11px] font-semibold px-2 py-0.5 rounded-full bg-[#22222d] text-ink2`,children:e}),(0,F.jsx)(`div`,{className:`flex-1`}),n]}),r]})}function gH({question:e,label:t=`Ask Obzeri`,className:n=`btn btn-ghost h-7 px-2 text-[12px]`}){return(0,F.jsxs)(`button`,{className:n,title:`Ask Obzeri: ${e}`,onClick:t=>{t.stopPropagation(),ir(e)},children:[(0,F.jsx)(Fi,{size:13,className:`text-brand`}),t]})}function _H({title:e,children:t}){return(0,F.jsxs)(`div`,{className:`tone-good rounded-xl px-4 py-5 flex items-center gap-3`,style:{background:`var(--tone-bg)`},children:[(0,F.jsx)(Mr,{size:22,style:{color:`var(--tone)`},className:`shrink-0`}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`font-medium text-[14px]`,children:e}),t&&(0,F.jsx)(`div`,{className:`text-ink2 text-[12.5px] mt-0.5`,children:t})]})]})}var vH={"15m":`the last 15 minutes`,"1h":`the last hour`,"6h":`the last 6 hours`,"24h":`the last 24 hours`,"7d":`the last 7 days`,"30d":`the last 30 days`,custom:`the selected time`},yH={healthy:{tone:`good`,Icon:Mr},attention:{tone:`warn`,Icon:jr},broken:{tone:`bad`,Icon:di},idle:{tone:`neutral`,Icon:li},no_data:{tone:`neutral`,Icon:li}},bH={secret:Ai,silent:vi,error:br,endpoint:wi,jobs:Gi,alert:hr,release:xi,new_errors:br,traffic:Bi,speed:Wr,failures:lr};function xH(){let e=I(),{data:t,error:n}=P(`/api/simple${e.q()}`,[e.tick]);return n?(0,F.jsx)(Ra,{error:n}):t?t.health===`no_data`?(0,F.jsx)(Xz,{simple:!0}):(0,F.jsxs)(`div`,{className:`@container flex flex-col gap-5`,children:[(0,F.jsx)(SH,{d:t}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @4xl:grid-cols-5 gap-5 items-start`,children:[(0,F.jsxs)(`div`,{className:`@4xl:col-span-3 flex flex-col gap-5`,children:[(0,F.jsx)(EH,{items:t.broke}),(0,F.jsx)(DH,{items:t.changed,basis:t.usualBasis})]}),(0,F.jsxs)(`div`,{className:`@4xl:col-span-2 flex flex-col gap-5`,children:[(0,F.jsx)(kH,{items:t.todo}),(0,F.jsx)(jH,{suggestions:t.suggestions})]})]})]}):(0,F.jsx)(H,{})}function SH({d:e}){let t=I(),n=yH[e.health];return(0,F.jsxs)(`section`,{className:`card tone-${n.tone} p-6 grid grid-cols-1 @4xl:grid-cols-[1fr_420px] gap-6`,style:{borderColor:`var(--tone-line)`,background:`linear-gradient(135deg, var(--tone-bg), transparent 55%), var(--color-panel)`},children:[(0,F.jsxs)(`div`,{className:`flex flex-col gap-4 min-w-0`,children:[(0,F.jsx)(`div`,{className:`text-[11.5px] uppercase tracking-wider font-semibold text-mute`,children:`Is my app healthy?`}),(0,F.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,F.jsx)(`div`,{className:`w-14 h-14 rounded-full flex items-center justify-center shrink-0 ${e.health===`healthy`?`health-orb`:``}`,style:{background:`var(--tone-bg)`,border:`1px solid var(--tone-line)`},children:(0,F.jsx)(n.Icon,{size:28,style:{color:`var(--tone)`}})}),(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(`h1`,{className:`text-[26px] font-semibold tracking-tight leading-tight`,children:e.headline}),(0,F.jsx)(`p`,{className:`text-ink2 text-[14px] mt-1 leading-relaxed`,children:e.summary})]})]}),(0,F.jsx)(wH,{points:e.timeline,bucketMs:e.bucketMs,label:vH[t.range]||`this period`})]}),(0,F.jsx)(`div`,{className:`grid grid-cols-2 @2xl:@max-4xl:grid-cols-4 gap-3 content-start`,children:e.vitals.map(e=>(0,F.jsx)(CH,{v:e},e.id))})]})}function CH({v:e}){let t=pH[e.tone];return(0,F.jsxs)(`div`,{className:`tone-${e.tone} rounded-xl border border-line bg-[#111118] px-3.5 py-3 min-w-0`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[12px] text-ink2 font-medium`,children:[(0,F.jsx)(t,{size:13,style:{color:`var(--tone)`}}),e.label]}),(0,F.jsx)(`div`,{className:`text-[22px] font-semibold tracking-tight mt-1 tabular-nums`,style:{color:e.tone===`bad`||e.tone===`warn`?`var(--tone)`:void 0},children:e.value}),(0,F.jsx)(`div`,{className:`text-[11.5px] text-mute leading-snug mt-0.5`,children:e.note}),e.usual&&(0,F.jsx)(`div`,{className:`text-[11.5px] text-ink2 mt-1`,children:e.usual})]})}function wH({points:e,bucketMs:t,label:n}){if(!e.length)return null;let r=Math.max(1,...e.map(e=>e.count)),i=e=>e.count?e.failed/e.count>=.05?`#e05252`:e.failed/e.count>=.01?`#e8a92a`:`#36b56a`:`#2a2a35`,a=e.length*t;return(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`flex items-end gap-[2px] h-[54px]`,children:e.map(e=>(0,F.jsx)(`div`,{className:`flex-1 rounded-[3px] min-w-[2px] hover:opacity-80`,style:{height:`${Math.max(8,e.count/r*100)}%`,background:i(e)},title:`${Ea(e.t,a>864e5)} · ${B(e.count)} requests${e.failed?` · ${B(e.failed)} failed`:``}`},e.t))}),(0,F.jsxs)(`div`,{className:`flex flex-wrap justify-between gap-x-4 gap-y-1 text-[11px] text-mute mt-1.5`,children:[(0,F.jsx)(`span`,{className:`whitespace-nowrap`,children:n.charAt(0).toUpperCase()+n.slice(1)}),(0,F.jsxs)(`span`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1 whitespace-nowrap`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(`i`,{className:`w-2 h-2 rounded-sm inline-block bg-[#36b56a]`}),`fine`]}),(0,F.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(`i`,{className:`w-2 h-2 rounded-sm inline-block bg-[#e8a92a]`}),`some failures`]}),(0,F.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(`i`,{className:`w-2 h-2 rounded-sm inline-block bg-[#e05252]`}),`many failures`]}),(0,F.jsx)(`span`,{children:`now`})]})]})]})}function TH({f:e,timeline:t}){let n=ht(),r=L(),i=bH[e.kind]||br;return(0,F.jsxs)(`div`,{className:`tone-${e.tone} group flex items-start gap-3 rounded-xl px-3.5 py-3 border border-transparent ${e.link?`cursor-pointer hover:bg-[#181821] hover:border-line`:``}`,onClick:()=>e.link&&n(r(e.link)),children:[(0,F.jsx)(`div`,{className:`${t?`w-8 h-8`:`w-9 h-9`} rounded-lg flex items-center justify-center shrink-0`,style:{background:`var(--tone-bg)`},children:(0,F.jsx)(i,{size:t?15:17,style:{color:`var(--tone)`}})}),(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,F.jsx)(`span`,{className:`font-medium text-[13.5px]`,children:e.title}),e.isNew&&(0,F.jsx)(`span`,{className:`text-[10.5px] font-semibold px-1.5 py-px rounded-full`,style:{color:`var(--tone)`,background:`var(--tone-bg)`},children:`NEW`})]}),(0,F.jsx)(`div`,{className:`text-ink2 text-[12.5px] mt-0.5 leading-relaxed break-words`,children:e.detail}),e.ts&&(0,F.jsx)(`div`,{className:`text-mute text-[11.5px] mt-1`,children:t?mH(e.ts):`last seen ${mH(e.ts)}`})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0 opacity-70 group-hover:opacity-100`,children:[e.ask&&(0,F.jsx)(gH,{question:e.ask,label:`Ask`}),e.link&&(0,F.jsx)(Or,{size:16,className:`text-mute`})]})]})}function EH({items:e}){let[t,n]=(0,v.useState)(!1),r=t?e:e.slice(0,5);return(0,F.jsx)(hH,{title:`What broke?`,n:e.length,children:e.length===0?(0,F.jsx)(_H,{title:`Nothing is broken`,children:`No crashes, failing pages, leaks or firing alerts in this period.`}):(0,F.jsxs)(`div`,{className:`flex flex-col -mx-1.5`,children:[r.map(e=>(0,F.jsx)(TH,{f:e},e.id)),e.length>5&&(0,F.jsx)(`button`,{className:`btn btn-ghost self-start ml-1.5 mt-1`,onClick:()=>n(!t),children:t?`Show less`:`Show ${e.length-5} more`})]})})}function DH({items:e,basis:t}){return(0,F.jsx)(hH,{title:`What changed?`,n:e.length,right:t?(0,F.jsxs)(`span`,{className:`text-[11.5px] text-mute`,title:`Compared with ${t}`,children:[`vs a normal `,t.includes(`week`)?`week`:`day`]}):null,children:e.length===0?(0,F.jsxs)(`div`,{className:`text-ink2 text-[13px] px-1`,children:[`Nothing new: no deploys, no new kinds of errors, and traffic and speed look `,t?`like they usually do at this time`:`steady`,`.`]}):(0,F.jsx)(`div`,{className:`flex flex-col -mx-1.5`,children:e.map(e=>(0,F.jsx)(TH,{f:e,timeline:!0},e.id))})})}var OH={now:{label:`Do now`,tone:`bad`},soon:{label:`Soon`,tone:`warn`},later:{label:`When you can`,tone:`neutral`}};function kH({items:e}){let[t,n]=(0,v.useState)(e[0]?.id??null);return(0,F.jsx)(hH,{title:`What should I do?`,n:e.length,children:e.length===0?(0,F.jsx)(_H,{title:`Nothing to do right now`,children:`Go build something. We will tell you when that changes.`}):(0,F.jsx)(`ol`,{className:`flex flex-col gap-2`,children:e.map((e,r)=>(0,F.jsx)(AH,{t:e,n:r+1,open:t===e.id,onToggle:()=>n(t===e.id?null:e.id)},e.id))})})}function AH({t:e,n:t,open:n,onToggle:r}){let i=ht(),a=L(),o=OH[e.urgency];return(0,F.jsxs)(`li`,{className:`tone-${o.tone} rounded-xl border bg-[#111118] ${n?`border-line2`:`border-line`}`,children:[(0,F.jsxs)(`button`,{className:`w-full flex items-start gap-3 px-3.5 py-3 text-left`,onClick:r,"aria-expanded":n,children:[(0,F.jsx)(`span`,{className:`w-6 h-6 rounded-full flex items-center justify-center text-[12px] font-semibold shrink-0 mt-px`,style:{background:`var(--tone-bg)`,color:`var(--tone)`},children:t}),(0,F.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,F.jsx)(`span`,{className:`font-medium text-[13.5px]`,children:e.title}),(0,F.jsx)(`span`,{className:`text-[10.5px] font-semibold uppercase tracking-wide`,style:{color:`var(--tone)`},children:o.label})]}),!n&&(0,F.jsx)(`span`,{className:`block text-mute text-[12px] truncate mt-0.5`,children:e.why})]}),n?(0,F.jsx)(Er,{size:15,className:`text-mute mt-1`}):(0,F.jsx)(Or,{size:15,className:`text-mute mt-1`})]}),n&&(0,F.jsxs)(`div`,{className:`px-3.5 pb-3.5 pl-[50px] flex flex-col gap-3`,children:[(0,F.jsx)(`div`,{className:`text-ink2 text-[12.5px] leading-relaxed`,children:e.why}),e.steps.length>0&&(0,F.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:e.steps.map((e,t)=>(0,F.jsxs)(`li`,{className:`flex gap-2 text-[12.5px]`,children:[(0,F.jsxs)(`span`,{className:`text-mute tabular-nums`,children:[t+1,`.`]}),(0,F.jsx)(`span`,{children:e})]},t))}),(0,F.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[e.executionId&&(0,F.jsx)(Wa,{className:`btn btn-primary h-8`,label:`Copy fix prompt`,text:async()=>(await N(`/api/executions/${e.executionId}/prompt`)).prompt}),e.link&&(0,F.jsxs)(`button`,{className:`btn h-8 ${e.executionId?``:`btn-primary`}`,onClick:()=>i(a(e.link)),children:[e.linkLabel||`Open`,(0,F.jsx)(Or,{size:13})]}),e.ask&&(0,F.jsx)(gH,{question:e.ask,className:`btn h-8`})]}),e.executionId&&(0,F.jsxs)(`div`,{className:`text-[11.5px] text-mute flex items-center gap-1.5`,children:[(0,F.jsx)(Wi,{size:12}),`The prompt has the error, the code around it and what happened, ready for Cursor, Claude Code or Copilot.`]})]})]})}function jH({suggestions:e}){let[t,n]=(0,v.useState)(``);return(0,F.jsxs)(hH,{title:`Ask Obzeri`,children:[(0,F.jsxs)(`form`,{className:`relative`,onSubmit:e=>{e.preventDefault(),t.trim()&&(ir(t.trim()),n(``))},children:[(0,F.jsx)(Fi,{size:15,className:`absolute left-3 top-1/2 -translate-y-1/2 text-brand`}),(0,F.jsx)(`input`,{dir:`auto`,className:`input w-full h-11 pl-9 pr-11 text-[13.5px] rounded-xl`,placeholder:`Ask anything about your app…`,value:t,onChange:e=>n(e.target.value)}),(0,F.jsx)(`button`,{className:`absolute right-1.5 top-1/2 -translate-y-1/2 btn btn-primary h-8 w-8 !p-0 justify-center rounded-lg`,disabled:!t.trim(),title:`Ask`,children:(0,F.jsx)(pr,{size:15})})]}),(0,F.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:e.map(e=>(0,F.jsx)(`button`,{className:`text-left rounded-full border border-line hover:border-line2 hover:bg-panel2 px-3 py-1.5 text-[12px] text-ink2 hover:text-ink max-w-full truncate`,title:e,onClick:()=>ir(e),children:e},e))}),(0,F.jsx)(`div`,{className:`text-[11.5px] text-mute`,children:`Plain answers from your app's own data, in any language.`})]})}function MH(){let e=I(),{data:t,error:n,setData:r}=P(`/api/simple/alerts`,[e.tick]);if((0,v.useEffect)(()=>{N(`/api/alerts/events/read`,{method:`POST`}).then(()=>e.refresh()).catch(()=>{})},[]),n)return(0,F.jsx)(Ra,{error:n});if(!t)return(0,F.jsx)(H,{});let i=async e=>r(await N(`/api/simple/alerts`,{method:`PUT`,json:e}));return(0,F.jsxs)(`div`,{className:`@container flex flex-col gap-5`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`h1`,{className:`text-[24px] font-semibold tracking-tight flex items-center gap-2.5`,children:[(0,F.jsx)(hr,{size:22,className:`text-brand`}),`Alerts`]}),(0,F.jsx)(`p`,{className:`text-ink2 mt-1 text-[14px]`,children:`Hear about problems before your users tell you.`})]}),(0,F.jsx)(NH,{firing:t.firing}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @4xl:grid-cols-5 gap-5 items-start`,children:[(0,F.jsxs)(`div`,{className:`@4xl:col-span-3 flex flex-col gap-5`,children:[(0,F.jsx)(hH,{title:`Tell me when…`,children:(0,F.jsx)(`div`,{className:`flex flex-col divide-y divide-[#1f1f29]`,children:t.presets.map(e=>(0,F.jsx)(FH,{p:e,onChange:t=>i({presets:{[e.id]:t}})},e.id))})}),(0,F.jsx)(LH,{events:t.events})]}),(0,F.jsx)(`div`,{className:`@4xl:col-span-2`,children:(0,F.jsx)(IH,{data:t,onSave:e=>i({channels:e})})})]})]})}function NH({firing:e}){let t=I(),n=ht(),r=L(),i=rr(),a=t.meta?.openSecrets||0;return!e.length&&!a?(0,F.jsx)(_H,{title:`All quiet right now`,children:`No alert is firing. The switches below decide what wakes you up.`}):(0,F.jsxs)(`section`,{className:`card tone-bad p-5 flex flex-col gap-2`,style:{borderColor:`var(--tone-line)`,background:`linear-gradient(135deg, var(--tone-bg), transparent 60%), var(--color-panel)`},children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2 font-semibold text-[15px]`,children:[(0,F.jsx)(mr,{size:17,style:{color:`var(--tone)`}}),`Happening right now`]}),a>0&&(0,F.jsxs)(`button`,{className:`flex items-center gap-3 text-left rounded-lg px-2 py-2 hover:bg-[#1c1c25]`,onClick:()=>n(r(`/secrets`)),children:[(0,F.jsx)(Ai,{size:16,style:{color:`var(--tone)`}}),(0,F.jsxs)(`span`,{className:`flex-1 text-[13.5px]`,children:[a===1?`A secret is`:`${a} secrets are`,` being written to your logs`]}),(0,F.jsx)(Or,{size:15,className:`text-mute`})]}),e.map(e=>(0,F.jsxs)(`button`,{className:`flex items-center gap-3 text-left rounded-lg px-2 py-2 hover:bg-[#1c1c25]`,onClick:()=>i(`/alerts?rule=${e.id}`),children:[(0,F.jsx)(hr,{size:16,style:{color:`var(--tone)`}}),(0,F.jsx)(`span`,{className:`flex-1 text-[13.5px]`,children:e.name}),e.since&&(0,F.jsxs)(`span`,{className:`text-mute text-[12px]`,children:[`since `,mH(e.since)]}),(0,F.jsx)(Or,{size:15,className:`text-mute`})]},e.id))]})}function PH({on:e,onChange:t,label:n}){return(0,F.jsx)(`button`,{role:`switch`,"aria-checked":e,"aria-label":n,onClick:()=>t(!e),className:`relative w-[42px] h-[24px] rounded-full shrink-0 transition-colors`,style:{background:e?`linear-gradient(120deg, #ff3d7f, #a855f7)`:`#2c2c38`},children:(0,F.jsx)(`span`,{className:`absolute top-[3px] w-[18px] h-[18px] rounded-full bg-white shadow transition-[left]`,style:{left:e?21:3}})})}function FH({p:e,onChange:t}){let[n,r]=(0,v.useState)(!1);return(0,F.jsxs)(`div`,{className:`flex items-center gap-4 py-3.5`,children:[(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,F.jsx)(`span`,{className:`font-medium text-[14px]`,children:e.label}),e.firing&&(0,F.jsx)(`span`,{className:`tone-bad text-[10.5px] font-semibold px-1.5 py-px rounded-full`,style:{color:`var(--tone)`,background:`var(--tone-bg)`},children:`FIRING`})]}),(0,F.jsxs)(`div`,{className:`text-mute text-[12.5px] mt-0.5`,children:[e.description,e.lastFired?` · last time ${mH(e.lastFired)}`:``]})]}),(0,F.jsx)(PH,{on:e.enabled,label:e.label,onChange:async e=>{r(!0);try{await t(e)}finally{r(!1)}}}),n&&(0,F.jsx)(`span`,{className:`sr-only`,children:`saving`})]})}function IH({data:e,onSave:t}){let n=rr(),[r,i]=(0,v.useState)(e.channels.email),[a,o]=(0,v.useState)(e.channels.slack),[s,c]=(0,v.useState)(null),l=r!==e.channels.email||a!==e.channels.slack,u=!!(e.channels.email||e.channels.slack);return(0,F.jsxs)(hH,{title:`Where should we tell you?`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-3 text-[13px]`,children:[(0,F.jsx)(ci,{size:16,className:`text-mute`}),(0,F.jsx)(`span`,{className:`flex-1`,children:`In this dashboard`}),(0,F.jsx)(`span`,{className:`text-mute text-[12px]`,children:`always on`})]}),(0,F.jsxs)(`form`,{className:`flex flex-col gap-3.5`,onSubmit:async e=>{e.preventDefault();try{await t({email:r,slack:a}),c({ok:!0,text:`Saved.`})}catch(e){c({ok:!1,text:e.message})}},children:[(0,F.jsxs)(`label`,{className:`flex flex-col gap-1.5`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-2 text-[13px]`,children:[(0,F.jsx)(ai,{size:15,className:`text-mute`}),`Email`]}),(0,F.jsx)(`input`,{className:`input h-9`,type:`text`,placeholder:`you@example.com`,value:r,onChange:e=>i(e.target.value),disabled:!e.emailReady&&!r}),!e.emailReady&&(0,F.jsxs)(`span`,{className:`text-[11.5px] text-mute`,children:[`Email needs a mail server first. `,(0,F.jsx)(`button`,{type:`button`,className:`link`,onClick:()=>n(`/integrations/email`),children:`Set one up`})]})]}),(0,F.jsxs)(`label`,{className:`flex flex-col gap-1.5`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-2 text-[13px]`,children:[(0,F.jsx)(Mi,{size:15,className:`text-mute`}),`Slack`]}),(0,F.jsx)(`input`,{className:`input h-9`,type:`url`,placeholder:`https://hooks.slack.com/services/…`,value:a,onChange:e=>o(e.target.value)}),(0,F.jsxs)(`a`,{className:`text-[11.5px] link inline-flex items-center gap-1 self-start`,href:`https://api.slack.com/messaging/webhooks`,target:`_blank`,rel:`noreferrer`,children:[`How to get a Slack webhook`,(0,F.jsx)(Vr,{size:11})]})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`button`,{className:`btn btn-primary h-9`,disabled:!l,children:`Save`}),(0,F.jsxs)(`button`,{type:`button`,className:`btn h-9`,disabled:!u||l,title:l?`Save first`:void 0,onClick:async()=>{c(null);try{let e=(await N(`/api/simple/alerts/test`,{method:`POST`})).deliveries.filter(e=>e.type!==`inapp`&&!e.ok);c(e.length?{ok:!1,text:`Could not reach ${e.map(e=>`${e.type}${e.error?` (${e.error})`:``}`).join(`, `)}`}:{ok:!0,text:`Test sent. Check your inbox or Slack.`})}catch(e){c({ok:!1,text:e.message})}},children:[(0,F.jsx)(Di,{size:13}),`Send a test`]})]}),s&&(0,F.jsxs)(`div`,{className:`text-[12.5px] flex items-center gap-1.5 ${s.ok?`text-[#5ad17a]`:`text-[#ff8a8a]`}`,children:[s.ok&&(0,F.jsx)(Mr,{size:13}),s.text]})]}),(0,F.jsxs)(`div`,{className:`text-[11.5px] text-mute border-t border-line pt-3`,children:[`Webhooks, Discord, per-route rules and quiet hours are in `,(0,F.jsx)(`button`,{className:`link`,onClick:()=>n(`/alerts`),children:`Advanced → Alerts`}),`.`]})]})}function LH({events:e}){let[t,n]=(0,v.useState)(!1),r=t?e:e.slice(0,8);return(0,F.jsx)(hH,{title:`Recent alerts`,n:e.length,children:e.length===0?(0,F.jsx)(`div`,{className:`text-ink2 text-[13px]`,children:`Nothing has fired yet.`}):(0,F.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[r.map(e=>{let t=e.state===`firing`?`bad`:`good`;return(0,F.jsxs)(`div`,{className:`tone-${t} flex items-start gap-3 px-1 py-2`,children:[(0,F.jsx)(`span`,{className:`w-2 h-2 rounded-full mt-[7px] shrink-0`,style:{background:`var(--tone)`}}),(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,F.jsxs)(`div`,{className:`text-[13px]`,children:[(0,F.jsx)(`span`,{className:`font-medium`,children:e.rule}),` `,(0,F.jsxs)(`span`,{className:`text-mute`,children:[`· `,e.state===`firing`?`went off`:`back to normal`,` `,mH(e.ts)]})]}),(0,F.jsx)(`div`,{className:`text-ink2 text-[12px] mt-0.5 break-words`,children:e.message})]})]},e.id)}),e.length>8&&(0,F.jsx)(`button`,{className:`btn btn-ghost self-start`,onClick:()=>n(!t),children:t?`Show less`:`Show ${e.length-8} more`})]})})}function RH(){let e=I(),t=rr(),n=P(`/api/overview${e.q()}`,[e.tick]),r=P(`/api/runtime${e.q()}`,[e.tick]),i=P(`/api/metrics${e.q()}`,[e.tick]);if(n.error)return(0,F.jsx)(Ra,{error:n.error});if(!n.data)return(0,F.jsx)(H,{});let a=n.data,o=a.kpis,s=o.usual&&o.usual.requests>=50?o.usual:null,c=rz(a.series.points,a.band),l=iz(a.band),u=vH[e.range]||`this period`,d=[{key:`count`,label:`Requests`,color:XR[0],type:`bar`},...l?[{...l.calls,label:`Usual`}]:[]],f=[...l?[{...l.p95,label:`Normal range`}]:[],{key:`p95`,label:`Slowest 5%`,color:XR[1],type:`line`},{key:`avg`,label:`Average`,color:XR[2],type:`line`}],p=[{key:`s5xx`,label:`Failed (server errors)`,color:ZR.crit,type:`bar`,stack:`e`},{key:`s4xx`,label:`Rejected (bad requests)`,color:ZR.warn,type:`bar`,stack:`e`}],m=new Map;for(let e of r.data||[])for(let t of e.points){let e=m.get(t.t)||{t:t.t,cpu:null,mem:null};t.cpuUtil!=null&&(e.cpu=Math.max(e.cpu??0,t.cpuUtil)),t.memUtil!=null&&(e.mem=Math.max(e.mem??0,t.memUtil)),m.set(t.t,e)}let h=[...m.values()].sort((e,t)=>e.t-t.t),g=h[h.length-1],_=[{key:`cpu`,label:`CPU`,color:XR[0],type:`line`},{key:`mem`,label:`Memory`,color:XR[6],type:`line`}],v=Math.max(g?.cpu??0,g?.mem??0),y=s?.requests?o.requests/s.requests:null,b=s?.p95&&o.p95?o.p95/s.p95:null,x=o.requests>=20&&o.failureRate>=5?`bad`:o.failureRate>=1&&o.failed>=3?`warn`:`good`,S=[...new Set((i.data||[]).map(e=>e.name))];return(0,F.jsxs)(`div`,{className:`@container flex flex-col gap-5`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`h1`,{className:`text-[24px] font-semibold tracking-tight flex items-center gap-2.5`,children:[(0,F.jsx)(wr,{size:22,className:`text-brand`}),`Metrics`]}),(0,F.jsxs)(`p`,{className:`text-ink2 mt-1 text-[14px]`,children:[`How your app did over `,u,s?`, next to what is normal for this time`:``,`.`]})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @4xl:grid-cols-2 gap-5`,children:[(0,F.jsx)(zH,{title:`Traffic`,what:`How many requests your app handled.`,value:B(o.requests),unit:`requests`,status:y==null?{tone:`neutral`,text:o.rpm?`About ${B(o.rpm)} a minute`:`No requests yet`}:y>=1.5?{tone:`neutral`,text:`${y.toFixed(1)}× busier than usual`}:y<=.67?{tone:`warn`,text:`${Math.round((1-y)*100)}% quieter than usual`}:{tone:`good`,text:`About as busy as usual`},series:d,children:(0,F.jsx)(ez,{data:c,series:d,height:190,zoom:!1,fmt:e=>B(e)})}),(0,F.jsx)(zH,{title:`Speed`,what:`How long requests take. Lower is better; the slowest 5% is what unhappy users feel.`,value:z(o.p95),unit:`slowest 5%`,status:o.p95==null?{tone:`neutral`,text:`Nothing to time yet`}:b!=null&&b>=1.4?{tone:`warn`,text:`Slower than usual (normally ${z(s.p95)})`}:o.p95>=1500?{tone:`warn`,text:`On the slow side`}:{tone:`good`,text:s?.p95?`Normal (usually ${z(s.p95)})`:`Fast`},series:f,children:(0,F.jsx)(ez,{data:c,series:f,height:190,zoom:!1,fmt:e=>z(e),yFmt:e=>e>=1e3?`${+(e/1e3).toFixed(1)}s`:`${Math.round(e)}ms`})}),(0,F.jsx)(zH,{title:`Errors`,what:`Requests that failed because of your server (red), and requests your app rejected, like a wrong password or a missing page (yellow).`,value:Sa(o.failureRate),unit:`failed`,status:{tone:x,text:o.failed?`${B(o.failed)} failed, ${B(o.clientErrors)} rejected`:`No server errors`},series:p,children:(0,F.jsx)(ez,{data:c,series:p,height:190,zoom:!1,fmt:e=>B(e)})}),(0,F.jsx)(zH,{title:`Server load`,what:`How much of its CPU and memory your app uses. Near 100% it slows down or restarts.`,value:g?`${Math.round(v)}%`:`—`,unit:`busiest`,status:g?v>=90?{tone:`bad`,text:`Close to the limit`}:v>=75?{tone:`warn`,text:`Busy`}:{tone:`good`,text:`Plenty of room`}:{tone:`neutral`,text:`No server stats yet`},series:_,children:r.data?(0,F.jsx)(ez,{data:h,series:_,height:190,zoom:!1,fmt:e=>`${Math.round(e)}%`,yDomain:[0,`auto`]}):(0,F.jsx)(H,{})})]}),S.length>0&&(0,F.jsxs)(`section`,{className:`card p-5 flex flex-col gap-3`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`h2`,{className:`text-[16px] font-semibold`,children:`Your own numbers`}),(0,F.jsx)(`span`,{className:`text-mute text-[12.5px]`,children:`counters and gauges your code reports`})]}),(0,F.jsx)(`div`,{className:`grid grid-cols-2 @lg:grid-cols-3 @5xl:grid-cols-4 gap-3`,children:S.slice(0,12).map(e=>{let n=(i.data||[]).filter(t=>t.name===e),r=n.reduce((e,t)=>e+(t.type===`counter`?t.count??0:0),0);return(0,F.jsxs)(`button`,{className:`text-left rounded-xl border border-line hover:border-line2 bg-[#111118] px-3.5 py-3 group`,onClick:()=>t(`/metrics`),children:[(0,F.jsx)(`div`,{className:`mono text-[11.5px] text-ink2 truncate`,children:e}),(0,F.jsx)(`div`,{className:`text-[20px] font-semibold mt-1 tabular-nums`,children:n[0]?.type===`counter`?B(r):B(n[0]?.avg)}),(0,F.jsxs)(`div`,{className:`text-[11px] text-mute flex items-center gap-1`,children:[n[0]?.type===`counter`?`total`:`average`,(0,F.jsx)(Or,{size:11,className:`opacity-0 group-hover:opacity-100`})]})]},e)})})]})]})}function zH({title:e,what:t,value:n,unit:r,status:i,series:a,children:o}){let s=pH[i.tone];return(0,F.jsxs)(`section`,{className:`card p-5 flex flex-col gap-3 min-w-0`,children:[(0,F.jsxs)(`div`,{className:`flex items-start gap-4`,children:[(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,F.jsx)(`h2`,{className:`text-[16px] font-semibold`,children:e}),(0,F.jsx)(`p`,{className:`text-mute text-[12.5px] mt-0.5 leading-snug`,children:t})]}),(0,F.jsxs)(`div`,{className:`text-right shrink-0`,children:[(0,F.jsx)(`div`,{className:`text-[24px] font-semibold tabular-nums leading-tight`,children:n}),(0,F.jsx)(`div`,{className:`text-[11.5px] text-mute`,children:r})]})]}),(0,F.jsxs)(`div`,{className:`tone-${i.tone} flex items-center gap-1.5 text-[12.5px] font-medium`,style:{color:`var(--tone)`},children:[(0,F.jsx)(s,{size:14}),i.text]}),o,(0,F.jsx)($R,{series:a})]})}var BH=[{id:`all`,label:`Everything`,levels:``},{id:`problems`,label:`Problems only`,levels:`warn,error,fatal`},{id:`errors`,label:`Errors only`,levels:`error,fatal`}],VH={fatal:{word:`Error`,color:`#ff7a7a`,bg:`rgba(208,59,59,.14)`},error:{word:`Error`,color:`#ff7a7a`,bg:`rgba(208,59,59,.14)`},warn:{word:`Warning`,color:`#f5c04e`,bg:`rgba(250,178,25,.12)`},info:{word:`Info`,color:`#7fb2f0`,bg:`rgba(57,135,229,.12)`},debug:{word:`Debug`,color:`#9a9ab0`,bg:`rgba(130,130,154,.12)`},trace:{word:`Debug`,color:`#9a9ab0`,bg:`rgba(130,130,154,.12)`}};function HH(){let e=I(),[t,n]=zn(),[r,i]=(0,v.useState)(t.get(`q`)||``),a=BH.find(e=>e.id===t.get(`show`))??BH[0],{data:o,error:s}=P(`/api/logs${e.q({q:t.get(`q`)||``,level:a.levels,limit:300})}`,[e.tick]),c=(e,t)=>{let r=new URLSearchParams(window.location.search);t?r.set(e,t):r.delete(e),n(r,{replace:!0})},l={all:0,error:0,warn:0};for(let e of o?.series||[]){for(let t of[`error`,`fatal`,`warn`,`info`,`debug`,`trace`])l.all+=e[t]||0;l.error+=(e.error||0)+(e.fatal||0),l.warn+=e.warn||0}return(0,F.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`h1`,{className:`text-[24px] font-semibold tracking-tight flex items-center gap-2.5`,children:[(0,F.jsx)(Ti,{size:22,className:`text-brand`}),`Logs`]}),(0,F.jsx)(`p`,{className:`text-ink2 mt-1 text-[14px]`,children:`Everything your app printed, newest first. Each line knows which request wrote it.`})]}),(0,F.jsxs)(`section`,{className:`card p-5 flex flex-col gap-4`,children:[(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,F.jsxs)(`form`,{className:`relative flex-1 min-w-[240px]`,onSubmit:e=>{e.preventDefault(),c(`q`,r.trim())},children:[(0,F.jsx)(Ei,{size:15,className:`absolute left-3 top-1/2 -translate-y-1/2 text-mute`}),(0,F.jsx)(`input`,{className:`input w-full h-10 pl-9 pr-9 text-[13.5px] rounded-xl`,placeholder:`Search your logs, then press Enter`,value:r,onChange:e=>i(e.target.value)}),t.get(`q`)&&(0,F.jsx)(`button`,{type:`button`,className:`absolute right-2.5 top-1/2 -translate-y-1/2 text-mute hover:text-ink`,title:`Clear`,onClick:()=>{i(``),c(`q`,``)},children:(0,F.jsx)(Ki,{size:15})})]}),(0,F.jsx)(`div`,{className:`seg seg-lg`,children:BH.map(e=>(0,F.jsx)(`button`,{className:a.id===e.id?`on`:``,onClick:()=>c(`show`,e.id===`all`?``:e.id),children:e.label},e.id))})]}),o&&(0,F.jsxs)(`div`,{className:`text-[12.5px] text-ink2`,children:[B(l.all),` line`,l.all===1?``:`s`,` in `,vH[e.range]||`this period`,l.error>0&&(0,F.jsxs)(F.Fragment,{children:[` · `,(0,F.jsxs)(`span`,{className:`text-[#ff8a8a]`,children:[B(l.error),` error`,l.error===1?``:`s`]})]}),l.warn>0&&(0,F.jsxs)(F.Fragment,{children:[` · `,(0,F.jsxs)(`span`,{className:`text-[#f5c04e]`,children:[B(l.warn),` warning`,l.warn===1?``:`s`]})]}),t.get(`q`)&&(0,F.jsxs)(F.Fragment,{children:[` · matching “`,t.get(`q`),`”`]})]}),s?(0,F.jsx)(Ra,{error:s}):o?o.logs.length===0?(0,F.jsx)(`div`,{className:`text-center text-ink2 py-12 text-[13.5px]`,children:t.get(`q`)||a.levels?`Nothing matches. Try another word or show everything.`:`No logs in this period. console.log and pino output shows up here automatically.`}):(0,F.jsx)(`div`,{className:`flex flex-col -mx-2`,children:o.logs.map(e=>(0,F.jsx)(UH,{l:e},e.id))}):(0,F.jsx)(H,{})]})]})}function UH({l:e}){let[t,n]=(0,v.useState)(!1),r=ht(),i=L(),a=VH[e.level]||VH.info;return(0,F.jsxs)(`div`,{className:`rounded-lg ${t?`bg-[#16161e]`:`hover:bg-[#15151c]`}`,children:[(0,F.jsxs)(`button`,{className:`w-full flex items-start gap-3 px-2 py-2 text-left`,onClick:()=>n(!t),children:[(0,F.jsx)(`span`,{className:`text-mute text-[12px] tabular-nums shrink-0 w-[62px] pt-px`,title:mH(e.ts),children:Ea(e.ts)}),(0,F.jsx)(`span`,{className:`text-[11px] font-semibold px-2 py-0.5 rounded-md shrink-0 w-[64px] text-center`,style:{color:a.color,background:a.bg},children:a.word}),(0,F.jsx)(`span`,{className:`mono text-[12.5px] flex-1 min-w-0 text-[#dcdce6] ${t?`whitespace-pre-wrap break-words`:`truncate`}`,children:e.message}),(0,F.jsx)(`span`,{className:`text-mute text-[12px] shrink-0 max-w-[110px] truncate`,children:e.service}),(0,F.jsx)(Or,{size:14,className:`text-mute shrink-0 mt-0.5 transition-transform ${t?`rotate-90`:``}`})]}),t&&(0,F.jsxs)(`div`,{className:`px-2 pb-3 pl-[150px] flex flex-col gap-2.5`,children:[(0,F.jsxs)(`div`,{className:`text-[12px] text-mute`,children:[Ea(e.ts,!0),` · `,mH(e.ts),e.logger?` · ${e.logger}`:``,e.instance?` · ${e.instance}`:``]}),e.attrs&&(0,F.jsx)(`pre`,{className:`code !text-[11.5px] !py-2 max-h-[240px] overflow-auto`,children:JSON.stringify(e.attrs,null,2)}),(0,F.jsxs)(`div`,{className:`flex gap-2`,children:[e.executionId&&(0,F.jsxs)(`button`,{className:`btn h-8`,onClick:()=>r(i(`/executions/${e.executionId}`)),children:[`See the request that wrote it`,(0,F.jsx)(Or,{size:13})]}),(0,F.jsx)(gH,{className:`btn h-8`,label:`Ask Obzeri about this`,question:`What does this ${e.level} log from ${e.service} mean, and do I need to do anything? "${String(e.message).slice(0,300)}"`})]})]})]})}function WH(){let e=I(),t=ht(),n=L(),r=rr(),i=P(`/api/settings`),a=P(`/api/settings/ai`);if(i.error)return(0,F.jsx)(Ra,{error:i.error});if(!i.data)return(0,F.jsx)(H,{});let o=i.data,s=e.meta?.services||[];return(0,F.jsxs)(`div`,{className:`@container flex flex-col gap-5`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`h1`,{className:`text-[24px] font-semibold tracking-tight flex items-center gap-2.5`,children:[(0,F.jsx)(ki,{size:22,className:`text-brand`}),`Settings`]}),(0,F.jsx)(`p`,{className:`text-ink2 mt-1 text-[14px]`,children:`Connect your app, choose how the dashboard looks, and turn on the assistant.`})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @4xl:grid-cols-5 gap-5 items-start`,children:[(0,F.jsxs)(`div`,{className:`@4xl:col-span-3 flex flex-col gap-5`,children:[(0,F.jsx)(hH,{title:`Your apps`,n:s.length,children:s.length===0?(0,F.jsx)(`div`,{className:`text-ink2 text-[13px]`,children:`No app has reported yet. Follow the steps below.`}):(0,F.jsx)(`div`,{className:`flex flex-col divide-y divide-[#1f1f29]`,children:s.map(t=>{let n=Date.now()-t.lastSeen<9e5,r=(e.meta?.versions||[]).filter(e=>e.service===t.id);return(0,F.jsxs)(`div`,{className:`flex items-center gap-3 py-3`,children:[(0,F.jsx)(vr,{size:17,className:`text-mute shrink-0`}),(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,F.jsx)(`div`,{className:`font-medium text-[14px]`,children:t.id}),(0,F.jsx)(fo,{frameworks:t.frameworks,className:`mt-1`}),(0,F.jsx)(`div`,{className:`text-mute text-[12px] mt-1`,children:[r.length?`version ${r[r.length-1].version}`:null,t.instances.length>1?`${t.instances.length} instances`:null].filter(Boolean).join(` · `)||`Node.js`})]}),(0,F.jsxs)(`span`,{className:`tone-${n?`good`:`neutral`} text-[12px] font-medium flex items-center gap-1.5`,style:{color:`var(--tone)`},children:[(0,F.jsx)(`span`,{className:`w-2 h-2 rounded-full ${n?`live-dot`:``}`,style:{background:`var(--tone)`}}),n?`Reporting`:`Last heard ${mH(t.lastSeen)}`]})]},t.id)})})}),(0,F.jsx)(Gz,{initial:`zero`,title:`Connect an app`})]}),(0,F.jsxs)(`div`,{className:`@4xl:col-span-2 flex flex-col gap-5`,children:[(0,F.jsx)(GH,{}),(0,F.jsx)(KH,{}),(0,F.jsx)(hH,{title:`Ask Obzeri`,children:a.data?a.data.configured?(0,F.jsxs)(`div`,{className:`tone-good flex items-center gap-2 text-[13px]`,children:[(0,F.jsx)(Mr,{size:16,style:{color:`var(--tone)`}}),`Ready, using `,(0,F.jsx)(`b`,{children:a.data.model})]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`text-ink2 text-[13px] leading-relaxed`,children:`Ask questions about your app in plain words. Needs an AI model: Claude, any OpenAI-compatible API, or a local one through Ollama.`}),(0,F.jsxs)(`button`,{className:`btn btn-primary h-9 self-start`,onClick:()=>t(n(`/integrations/ai`)),children:[(0,F.jsx)(Fi,{size:14}),`Set up Ask Obzeri`]})]}):(0,F.jsx)(H,{})}),(0,F.jsxs)(hH,{title:`Privacy & data`,children:[(0,F.jsxs)(`div`,{className:`flex items-start gap-3 text-[13px]`,children:[(0,F.jsx)(ii,{size:15,className:`text-mute mt-0.5`}),(0,F.jsx)(`div`,{children:o.passwordProtected?`The dashboard is password protected.`:(0,F.jsxs)(F.Fragment,{children:[`No password: anyone who can reach this address can open the dashboard. Set `,(0,F.jsx)(`span`,{className:`mono`,children:`OBZERVER_PASSWORD`}),` to lock it.`]})})]}),(0,F.jsxs)(`div`,{className:`flex items-start gap-3 text-[13px]`,children:[(0,F.jsx)(Ir,{size:15,className:`text-mute mt-0.5`}),(0,F.jsxs)(`div`,{children:[`Details are kept for `,o.retentionDays,` days`,o.history?`, daily summaries for ${o.history.days} days`:``,`. Passwords and keys found in logs are hidden before saving.`]})]}),(0,F.jsxs)(`div`,{className:`flex items-start gap-3 text-[13px]`,children:[(0,F.jsx)(Ni,{size:15,className:`text-mute mt-0.5`}),(0,F.jsxs)(`div`,{children:[`Your app keys are stored as hashes and shown only once. Create, rotate or limit them to one environment in `,(0,F.jsx)(`button`,{className:`link`,onClick:()=>r(`/settings`),children:`Advanced → Settings`}),`.`]})]})]}),(0,F.jsxs)(`button`,{className:`card p-4 text-left flex items-center gap-3 hover:border-line2 group`,onClick:()=>r(`/settings`),children:[(0,F.jsx)(Ni,{size:17,className:`text-mute`}),(0,F.jsxs)(`div`,{className:`flex-1`,children:[(0,F.jsx)(`div`,{className:`font-medium text-[13.5px]`,children:`All settings`}),(0,F.jsx)(`div`,{className:`text-mute text-[12px]`,children:`Ingest keys, projects, email, MCP, ticket trackers, history`})]}),(0,F.jsx)(Or,{size:15,className:`text-mute group-hover:translate-x-0.5 transition-transform`})]})]})]})]})}function GH(){let e=I(),t=ht(),n=L(),r=e.meta?.usage;if(!r)return null;let i={unlimited:`No monthly limit: everything your apps send is kept.`,ok:`${Yi(r.included==null?null:Math.max(0,r.included-r.used))} events left this month.`,paced:`You sent a lot today, so most step-by-step timings pause until midnight (UTC). Errors and slow requests still keep theirs.`,reduced:`You used this month's events. Charts stay live, but most requests arrive without step-by-step timings.`,refused:`You used twice this month's events, so new data is turned away until the 1st.`,overage:`Past this month's events: extra ones are collected within your spending limits.`,paused:`Extra events are paused. Server errors and failed jobs are still collected.`};return(0,F.jsxs)(hH,{title:`Your plan`,right:(0,F.jsx)(`span`,{className:`text-[12px] text-mute`,children:r.name}),children:[r.included!=null&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:`flex items-baseline justify-between text-[13px]`,children:[(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`b`,{className:`text-[16px]`,children:Yi(r.used)}),` of `,Yi(r.included),` events used`]}),(0,F.jsx)(`span`,{className:`text-mute`,children:Xi(r.pct)})]}),(0,F.jsx)(ea,{used:r.used,included:r.included})]}),(0,F.jsx)(`div`,{className:`text-[13px] leading-relaxed tone-${Qi[r.state].tone}`,children:i[r.state]}),(0,F.jsx)(`div`,{className:`text-[12px] text-mute leading-snug`,children:`An event is one request, background job, error, log line or step inside your code. Database calls are free.`}),(0,F.jsx)(`button`,{className:`btn h-9 self-start`,onClick:()=>t(n(`/usage`)),children:`Usage & plans`})]})}function KH(){let{mode:e,setMode:t}=nr(),n=(n,r,i,a)=>(0,F.jsxs)(`button`,{className:`text-left rounded-xl border px-3.5 py-3 flex gap-3 ${e===n?`border-brand bg-[rgba(255,61,127,.06)]`:`border-line hover:border-line2`}`,onClick:()=>t(n),"aria-pressed":e===n,children:[(0,F.jsx)(r,{size:18,className:e===n?`text-brand mt-0.5`:`text-mute mt-0.5`}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`font-medium text-[13.5px]`,children:i}),(0,F.jsx)(`div`,{className:`text-mute text-[12px] mt-0.5 leading-snug`,children:a})]})]});return(0,F.jsxs)(hH,{title:`Dashboard mode`,children:[n(`simple`,Pi,`Simple`,`Is my app healthy, what broke, what changed, what to do. Plain words, no jargon.`),n(`advanced`,Ni,`Advanced`,`Every request, trace, query, release and runtime detail, for digging deep.`),(0,F.jsx)(`div`,{className:`text-[11.5px] text-mute`,children:`Saved in this browser. Switch any time from the top bar.`})]})}var qH=e=>`${e.service}@${e.version}`;function JH(){let e=I(),[t]=zn(),{data:n,error:r}=P(`/api/simple/releases${e.q()}`,[e.tick]),i=t.get(`release`)||(t.get(`service`)&&t.get(`version`)?`${t.get(`service`)}@${t.get(`version`)}`:null);if(r)return(0,F.jsx)(Ra,{error:r});if(!n)return(0,F.jsx)(H,{});let a=n.filter(e=>e.latest),o=n.filter(e=>!e.latest);return(0,F.jsxs)(`div`,{className:`@container flex flex-col gap-5`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`h1`,{className:`text-[24px] font-semibold tracking-tight flex items-center gap-2.5`,children:[(0,F.jsx)(xi,{size:22,className:`text-brand`}),`Releases`]}),(0,F.jsx)(`p`,{className:`text-ink2 mt-1 text-[14px]`,children:`Every deploy, and whether it made your app better or worse than the one before.`})]}),n.length===0?(0,F.jsx)(tU,{}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`flex flex-col gap-5`,children:a.map(e=>(0,F.jsx)(QH,{r:e,focus:i===qH(e)},qH(e)))}),o.length>0&&(0,F.jsx)(hH,{title:`Earlier deploys`,n:o.length,children:(0,F.jsx)(`div`,{className:`flex flex-col gap-2`,children:o.map(e=>(0,F.jsx)($H,{r:e,focus:i===qH(e)},qH(e)))})})]})]})}function YH({r:e}){return(0,F.jsxs)(no,{tip:`Deployed ${Ea(e.first,!0)} · last request ${Ea(e.last,!0)}`,children:[`deployed `,mH(e.first)]})}function XH({r:e,big:t}){let n=pH[e.tone];return(0,F.jsxs)(`span`,{className:`tone-${e.tone} inline-flex items-center gap-1.5 font-semibold rounded-full ${t?`text-[12.5px] px-2.5 py-1`:`text-[11.5px] px-2 py-0.5`}`,style:{color:`var(--tone)`,background:`var(--tone-bg)`},children:[(0,F.jsx)(n,{size:t?14:12}),e.label]})}function ZH(e){let t=(0,v.useRef)(null);return(0,v.useEffect)(()=>{e&&setTimeout(()=>t.current?.scrollIntoView({block:`start`,behavior:`smooth`}),100)},[e]),t}function QH({r:e,focus:t}){let n=ZH(t);return(0,F.jsxs)(`section`,{ref:n,className:`card tone-${e.tone} p-6 flex flex-col gap-5 scroll-mt-4`,style:{borderColor:e.tone===`bad`||e.tone===`warn`||t?`var(--tone-line)`:void 0,background:e.tone===`bad`||e.tone===`warn`?`linear-gradient(135deg, var(--tone-bg), transparent 50%), var(--color-panel)`:void 0},children:[(0,F.jsxs)(`div`,{className:`flex items-start gap-4 flex-wrap`,children:[(0,F.jsx)(`div`,{className:`w-12 h-12 rounded-xl flex items-center justify-center shrink-0`,style:{background:`var(--tone-bg)`,border:`1px solid var(--tone-line)`},children:(0,F.jsx)(xi,{size:22,style:{color:`var(--tone)`}})}),(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,F.jsxs)(`div`,{className:`text-[11.5px] uppercase tracking-wider font-semibold text-mute`,children:[`Latest deploy of `,e.service]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap mt-0.5`,children:[(0,F.jsxs)(`h2`,{className:`text-[22px] font-semibold tracking-tight`,children:[e.service,` `,(0,F.jsx)(`span`,{className:`font-mono text-[19px]`,children:e.version})]}),(0,F.jsx)(XH,{r:e,big:!0})]}),(0,F.jsx)(`div`,{className:`text-ink2 text-[14px] mt-1.5 leading-relaxed`,children:e.summary}),(0,F.jsxs)(`div`,{className:`text-mute text-[12px] mt-1`,children:[(0,F.jsx)(YH,{r:e}),` · `,B(e.requests),` requests since`,e.previous?(0,F.jsxs)(F.Fragment,{children:[` · compared with `,(0,F.jsx)(`span`,{className:`mono`,children:e.previous})]}):null]})]}),(0,F.jsx)(`div`,{className:`flex gap-2 shrink-0`,children:(0,F.jsx)(gH,{question:e.ask,className:`btn h-9`})})]}),(0,F.jsx)(eU,{r:e})]})}function $H({r:e,focus:t}){let[n,r]=(0,v.useState)(t),i=ZH(t);return(0,F.jsxs)(`div`,{ref:i,className:`rounded-xl border bg-[#111118] scroll-mt-4 ${n?`border-line2`:`border-line`}`,children:[(0,F.jsxs)(`button`,{className:`w-full flex items-center gap-3 px-4 py-3 text-left flex-wrap`,onClick:()=>r(!n),"aria-expanded":n,children:[(0,F.jsxs)(`span`,{className:`font-medium text-[14px] min-w-[150px]`,children:[e.service,` `,(0,F.jsx)(`span`,{className:`font-mono text-[13px]`,children:e.version})]}),(0,F.jsx)(XH,{r:e}),(0,F.jsx)(`span`,{className:`text-mute text-[12.5px] flex-1 min-w-[200px] truncate`,children:e.summary}),(0,F.jsx)(`span`,{className:`text-mute text-[12px] shrink-0`,children:mH(e.first)}),n?(0,F.jsx)(Er,{size:15,className:`text-mute`}):(0,F.jsx)(Or,{size:15,className:`text-mute`})]}),n&&(0,F.jsxs)(`div`,{className:`px-4 pb-4 flex flex-col gap-4`,children:[(0,F.jsxs)(`div`,{className:`text-mute text-[12px]`,children:[(0,F.jsx)(YH,{r:e}),` · `,B(e.requests),` requests`]}),(0,F.jsx)(eU,{r:e}),(0,F.jsx)(`div`,{children:(0,F.jsx)(gH,{question:e.ask,className:`btn h-8`})})]})]})}function eU({r:e}){let t=ht(),n=L(),r=rr(),i=e.newErrors.length>0||e.codeChanges.length>0;return!e.compare.length&&!i&&!e.advice?e.verdict===`baseline`?null:(0,F.jsx)(`div`,{className:`text-ink2 text-[13px]`,children:`Not enough traffic on this version yet to compare. Check back after a few hundred requests.`}):(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[e.advice&&(0,F.jsxs)(`div`,{className:`tone-${e.tone} rounded-xl px-4 py-3.5 flex gap-3`,style:{background:`var(--tone-bg)`,border:`1px solid var(--tone-line)`},children:[(0,F.jsx)(ei,{size:17,style:{color:`var(--tone)`},className:`shrink-0 mt-0.5`}),(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(`div`,{className:`font-semibold text-[13.5px]`,children:`What to do`}),(0,F.jsx)(`ol`,{className:`mt-1.5 flex flex-col gap-1`,children:e.advice.map((e,t)=>(0,F.jsxs)(`li`,{className:`text-[13px] flex gap-2`,children:[(0,F.jsxs)(`span`,{className:`text-mute tabular-nums`,children:[t+1,`.`]}),e]},t))})]})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 ${i&&e.compare.length?`@4xl:grid-cols-2`:``} gap-4`,children:[e.compare.length>0&&(0,F.jsxs)(`div`,{className:`rounded-xl border border-line overflow-hidden`,children:[(0,F.jsxs)(`div`,{className:`grid grid-cols-[1fr_auto_20px_auto] gap-x-3 items-center px-4 py-2 text-[11px] uppercase tracking-wider text-mute border-b border-line bg-[#111118]`,children:[(0,F.jsx)(`span`,{children:`Before vs after`}),(0,F.jsx)(`span`,{className:`mono normal-case tracking-normal text-right`,children:e.previous}),(0,F.jsx)(`span`,{}),(0,F.jsx)(`span`,{className:`mono normal-case tracking-normal`,children:e.version})]}),e.compare.map(e=>(0,F.jsxs)(`div`,{className:`tone-${e.tone} grid grid-cols-[1fr_auto_20px_auto] gap-x-3 items-center px-4 py-2.5 border-b border-[#1d1d26] last:border-0`,children:[(0,F.jsx)(`span`,{className:`text-[13px] text-ink2`,children:e.hint?(0,F.jsx)(no,{tip:e.hint,children:e.label}):e.label}),(0,F.jsx)(`span`,{className:`text-[13px] tabular-nums text-mute text-right`,children:e.before}),(0,F.jsx)(fr,{size:13,className:`text-mute`}),(0,F.jsx)(`span`,{className:`text-[13.5px] tabular-nums font-semibold min-w-[70px]`,style:{color:e.tone===`neutral`?void 0:`var(--tone)`},children:e.after})]},e.label))]}),i&&(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[e.newErrors.length>0&&(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`text-[12.5px] font-semibold flex items-center gap-1.5 mb-1.5`,children:[(0,F.jsx)(br,{size:14,className:`text-[#ff8a8a]`}),`New errors in this version`]}),(0,F.jsx)(`div`,{className:`flex flex-col`,children:e.newErrors.map(e=>(0,F.jsxs)(`button`,{className:`text-left rounded-lg px-2.5 py-2 -mx-2.5 hover:bg-[#181821] flex items-center gap-3 group`,onClick:()=>t(n(`/errors/${e.fingerprint}`)),children:[(0,F.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,F.jsx)(`span`,{className:`text-[13px] font-medium text-[#ff9b9b]`,children:e.class}),(0,F.jsx)(`span`,{className:`block text-mute text-[12px] truncate`,children:e.message})]}),(0,F.jsxs)(`span`,{className:`text-[12px] text-ink2 tabular-nums`,children:[B(e.count),`×`]}),(0,F.jsx)(Or,{size:14,className:`text-mute`})]},e.fingerprint))})]}),e.codeChanges.length>0&&(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`text-[12.5px] font-semibold flex items-center gap-1.5 mb-1.5`,children:[(0,F.jsx)(Lr,{size:14,className:`text-mute`}),`What changed in the code`]}),(0,F.jsx)(`ul`,{className:`flex flex-col gap-1`,children:e.codeChanges.map(e=>(0,F.jsxs)(`li`,{className:`text-[13px] text-ink2 flex gap-2`,children:[(0,F.jsx)(`span`,{className:`text-mute`,children:`•`}),e]},e))})]})]})]}),(0,F.jsx)(`div`,{children:(0,F.jsxs)(`button`,{className:`btn btn-ghost h-8 px-2 text-[12.5px]`,onClick:()=>r(`/releases?service=${encodeURIComponent(e.service)}&version=${encodeURIComponent(e.version)}`),children:[(0,F.jsx)(Ni,{size:13}),`Full comparison in Advanced`]})})]})}function tU(){let e=`OBZERVER_VERSION=$(git rev-parse --short HEAD)`;return(0,F.jsxs)(hH,{title:`Tag your deploys to see them here`,children:[(0,F.jsxs)(`div`,{className:`text-ink2 text-[13.5px] leading-relaxed`,children:[`Obzerver compares each version of your app with the one before: did errors go up, did it get slower, does it leak memory. Most CI and hosting providers (GitHub Actions, GitLab, Vercel, Render, Railway, Netlify, Heroku…) and a `,(0,F.jsx)(`span`,{className:`mono`,children:`.git`}),` folder are detected automatically. Otherwise, set a version when you deploy:`]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`div`,{className:`code flex-1`,children:e}),(0,F.jsx)(Wa,{text:e,className:`btn h-9`})]})]})}function nU({simple:e,advanced:t}){let{mode:n}=nr();return(0,F.jsx)(F.Fragment,{children:n===`simple`?e:t})}function rU(){let{traceId:e}=yt(),[t,n]=(0,v.useState)(void 0);return(0,v.useEffect)(()=>{N(`/api/traces/${e}`).then(e=>n(e.execution.id)).catch(()=>n(null))},[e]),t===void 0?(0,F.jsx)(H,{}):t===null?(0,F.jsxs)(`div`,{className:`text-mute py-10 text-center`,children:[`Trace `,e,` not found.`]}):(0,F.jsx)(Vt,{to:`/executions/${t}${window.location.search}`,replace:!0})}function iU({onDone:e}){let[t,n]=(0,v.useState)(``),[r,i]=(0,v.useState)(``);return(0,F.jsxs)(`div`,{className:`h-full overflow-y-auto flex flex-col items-center justify-center gap-10 px-6 py-10`,children:[(0,F.jsxs)(`div`,{className:`flex flex-col items-center gap-6 text-center`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-[18px] max-[480px]:scale-[0.72]`,children:[(0,F.jsx)(So,{size:88}),(0,F.jsx)(wo,{size:64})]}),(0,F.jsx)(`p`,{className:`m-0 text-[15px] text-[#a3a3b8]`,children:`Know your app is healthy. Zero-config observability for Express and Fastify.`})]}),(0,F.jsxs)(`form`,{className:`card p-5 w-full max-w-[340px] flex flex-col gap-3`,onSubmit:async n=>{n.preventDefault();try{await N(`/api/auth/login`,{method:`POST`,json:{password:t}}),e()}catch(e){i(e.message||`Wrong password`)}},children:[(0,F.jsx)(`label`,{className:`text-[12.5px] text-ink2`,htmlFor:`obz-password`,children:`Dashboard password`}),(0,F.jsx)(`input`,{id:`obz-password`,type:`password`,autoFocus:!0,className:`input h-9`,placeholder:`Password`,value:t,onChange:e=>n(e.target.value)}),r&&(0,F.jsx)(`div`,{className:`text-[#ff8a8a] text-[12px]`,children:r}),(0,F.jsx)(`button`,{className:`btn btn-primary justify-center h-9`,children:`Sign in`})]})]})}function aU({children:e}){let[t]=zn();return(0,F.jsx)(v.Fragment,{children:e},t.get(`project`)||`default`)}function oU(){let[e,t]=(0,v.useState)(`loading`),n=()=>N(`/api/auth`).then(e=>t(e.ok?`ok`:`login`)).catch(()=>t(`ok`));return(0,v.useEffect)(()=>{n();let e=()=>t(`login`);return window.addEventListener(`obz:unauthorized`,e),()=>window.removeEventListener(`obz:unauthorized`,e)},[]),e===`loading`?(0,F.jsx)(H,{}):e===`login`?(0,F.jsx)(iU,{onDone:()=>t(`ok`)}):(0,F.jsx)(Mn,{basename:`/`.replace(/\/$/,``)||void 0,children:(0,F.jsx)(aU,{children:(0,F.jsx)(Zn,{children:(0,F.jsx)(tr,{children:(0,F.jsx)(Gt,{children:(0,F.jsxs)(Ut,{element:(0,F.jsx)(To,{}),children:[(0,F.jsx)(Ut,{index:!0,element:(0,F.jsx)(nU,{simple:(0,F.jsx)(xH,{}),advanced:(0,F.jsx)(Jz,{})})}),(0,F.jsx)(Ut,{path:`requests`,element:(0,F.jsx)(Qz,{kind:`http`})}),(0,F.jsx)(Ut,{path:`jobs`,element:(0,F.jsx)(Qz,{kind:`job`})}),(0,F.jsx)(Ut,{path:`operations/:kind/:service/:name`,element:(0,F.jsx)(sB,{})}),(0,F.jsx)(Ut,{path:`executions/:id`,element:(0,F.jsx)(mB,{})}),(0,F.jsx)(Ut,{path:`traces`,element:(0,F.jsx)(_B,{})}),(0,F.jsx)(Ut,{path:`traces/:traceId`,element:(0,F.jsx)(rU,{})}),(0,F.jsx)(Ut,{path:`map`,element:(0,F.jsx)(zV,{})}),(0,F.jsx)(Ut,{path:`errors`,element:(0,F.jsx)(vB,{})}),(0,F.jsx)(Ut,{path:`secrets`,element:(0,F.jsx)(bB,{})}),(0,F.jsx)(Ut,{path:`errors/:fp`,element:(0,F.jsx)(SB,{})}),(0,F.jsx)(Ut,{path:`logs`,element:(0,F.jsx)(Zi,{feature:`logs`,children:(0,F.jsx)(nU,{simple:(0,F.jsx)(HH,{}),advanced:(0,F.jsx)(pB,{})})})}),(0,F.jsx)(Ut,{path:`services`,element:(0,F.jsx)(RB,{})}),(0,F.jsx)(Ut,{path:`integrations`,element:(0,F.jsx)(Pz,{})}),(0,F.jsx)(Ut,{path:`projects`,element:(0,F.jsx)(BB,{})}),(0,F.jsx)(Ut,{path:`integrations/:id`,element:(0,F.jsx)(Pz,{})}),(0,F.jsx)(Ut,{path:`functions`,element:(0,F.jsx)(Vt,{to:`/services${window.location.search}`,replace:!0})}),(0,F.jsx)(Ut,{path:`queries`,element:(0,F.jsx)(WB,{})}),(0,F.jsx)(Ut,{path:`users`,element:(0,F.jsx)(qB,{})}),(0,F.jsx)(Ut,{path:`users/:id`,element:(0,F.jsx)(tV,{})}),(0,F.jsx)(Ut,{path:`users/:id/sessions`,element:(0,F.jsx)(rV,{})}),(0,F.jsx)(Ut,{path:`tenants/:id`,element:(0,F.jsx)(uV,{})}),(0,F.jsx)(Ut,{path:`profiler`,element:(0,F.jsx)(OV,{})}),(0,F.jsx)(Ut,{path:`metrics`,element:(0,F.jsx)(nU,{simple:(0,F.jsx)(RH,{}),advanced:(0,F.jsx)(AV,{})})}),(0,F.jsx)(Ut,{path:`releases`,element:(0,F.jsx)(nU,{simple:(0,F.jsx)(JH,{}),advanced:(0,F.jsx)(NV,{})})}),(0,F.jsx)(Ut,{path:`alerts`,element:(0,F.jsx)(Zi,{feature:`alerts`,children:(0,F.jsx)(nU,{simple:(0,F.jsx)(MH,{}),advanced:(0,F.jsx)(HV,{})})})}),(0,F.jsx)(Ut,{path:`slos`,element:(0,F.jsx)(Zi,{feature:`slos`,children:(0,F.jsx)(tH,{})})}),(0,F.jsx)(Ut,{path:`usage`,element:(0,F.jsx)(DB,{})}),(0,F.jsx)(Ut,{path:`status-pages`,element:(0,F.jsx)(cH,{})}),(0,F.jsx)(Ut,{path:`issues`,element:(0,F.jsx)(oV,{})}),(0,F.jsx)(Ut,{path:`issues/:id`,element:(0,F.jsx)(JV,{})}),(0,F.jsx)(Ut,{path:`settings`,element:(0,F.jsx)(nU,{simple:(0,F.jsx)(WH,{}),advanced:(0,F.jsx)(Kz,{})})}),(0,F.jsx)(Ut,{path:`*`,element:(0,F.jsx)(`div`,{className:`text-mute py-10 text-center`,children:`Not found`})})]})})})})})})}(0,Gn.createRoot)(document.getElementById(`root`)).render((0,F.jsx)(v.StrictMode,{children:(0,F.jsx)(oU,{})}));