@obzerver/server 0.17.0 → 0.17.2

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,z=[],Ji=0,Yi=null,Xi=1,Zi=``;function Qi(e,t){Wi[Gi++]=qi,Wi[Gi++]=Ki,Ki=e,qi=t}function $i(e,t,n){z[Ji++]=Xi,z[Ji++]=Zi,z[Ji++]=Yi,Yi=e;var r=Xi;e=Zi;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,Xi=1<<32-it(t)+i|n<<i|r,Zi=a+e}else Xi=1<<a|n<<i|r,Zi=e}function ea(e){e.return!==null&&(Qi(e,1),$i(e,1,0))}function ta(e){for(;e===Ki;)Ki=Wi[--Gi],Wi[Gi]=null,qi=Wi[--Gi],Wi[Gi]=null;for(;e===Yi;)Yi=z[--Ji],z[Ji]=null,Zi=z[--Ji],z[Ji]=null,Xi=z[--Ji],z[Ji]=null}function na(e,t){z[Ji++]=Xi,z[Ji++]=Zi,z[Ji++]=Yi,Xi=t.id,Zi=t.overflow,Yi=e}var ra=null,ia=null,aa=!1,oa=null,sa=!1,ca=Error(i(519));function la(e){throw ha(Ui(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ca}function ua(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||la(e,!0)}function da(e){for(ra=e.return;ra;)switch(ra.tag){case 5:case 31:case 13:sa=!1;return;case 27:case 3:sa=!0;return;default:ra=ra.return}}function fa(e){if(e!==ra)return!1;if(!aa)return da(e),aa=!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&&ia&&la(e),da(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ia=pm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ia=pm(e)}else t===27?(t=ia,wp(e.type)?(e=fm,fm=null,ia=e):ia=t):ia=ra?dm(e.stateNode.nextSibling):null;return!0}function pa(){ia=ra=null,aa=!1}function ma(){var e=oa;return e!==null&&(dd===null?dd=e:dd.push.apply(dd,e),oa=null),e}function ha(e){oa===null?oa=[e]:oa.push(e)}var ga=Ce(null),_a=null,va=null;function ya(e,t,n){Te(ga,t._currentValue),t._currentValue=n}function B(e){e._currentValue=ga.current,we(ga)}function V(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 ba(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),V(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),V(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),V(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 xa(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&&ba(t,e,n,r),t.flags|=262144,e!==null}function Sa(e){for(e=e.firstContext;e!==null;){if(!Hr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ca(e){_a=e,va=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function wa(e){return Ea(_a,e)}function Ta(e,t){return _a===null&&Ca(e),Ea(e,t)}function Ea(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},va===null){if(e===null)throw Error(i(308));va=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else va=va.next=t;return n}var Da=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()})}},Oa=t.unstable_scheduleCallback,ka=t.unstable_NormalPriority,Aa={$$typeof:re,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ja(){return{controller:new Da,data:new Map,refCount:0}}function H(e){e.refCount--,e.refCount===0&&Oa(ka,function(){e.controller.abort()})}function Ma(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 U=null;function Na(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var W=null,Pa=0,Fa=0,Ia=null;function La(e,t){if(W===null){var n=W=[];Pa=0,Fa=Pf(),Ia={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Pa++,t.then(Ra,Ra),t}function Ra(){if(--Pa===0&&(U=null,W!==null)){Ia!==null&&(Ia.status=`fulfilled`);var e=W;W=null,Fa=0,Ia=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function G(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 za=M.S;M.S=function(e,t){if(md=Ke(),typeof t==`object`&&t&&typeof t.then==`function`&&La(e,t),U!==null)for(var n=bf;n!==null;)Ma(n,U),n=n.next;if(n=e.types,n!==null){for(var r=bf;r!==null;)Ma(r,n),r=r.next;if(Fa!==0){r=U,r===null&&(r=U=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}za!==null&&za(e,t)};var Ba=Ce(null);function Va(){var e=Ba.current;return e===null?Yu.pooledCache:e}function Ha(e,t){t===null?Te(Ba,Ba.current):Te(Ba,t.pool)}function Ua(){var e=Va();return e===null?null:{parent:Aa._currentValue,pool:e}}var Wa=Error(i(460)),K=Error(i(474)),Ga=Error(i(542)),Ka={then:function(){}};function qa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ja(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,Qa(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,Qa(e),e}throw Xa=t,Wa}}function Ya(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Xa=e,Wa):e}}var Xa=null;function Za(){if(Xa===null)throw Error(i(459));var e=Xa;return Xa=null,e}function Qa(e){if(e===Wa||e===Ga)throw Error(i(483))}var $a=null,eo=0;function to(e){var t=eo;return eo+=1,$a===null&&($a=[]),Ja($a,e,t)}function no(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function ro(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 io(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),no(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ce&&Ya(i)===t.type)?(t=a(t,n.props),no(t,n),t.return=e,t):(t=Li(n.type,n.key,n.props,null,e.mode,r),no(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),no(n,t),n.return=e,n;case A:return t=Vi(t,e.mode,n),t.return=e,t;case ce:return t=Ya(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,to(t),n);if(t.$$typeof===re)return f(e,Ta(e,t),n);ro(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=Ya(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,to(n),r);if(n.$$typeof===re)return p(e,t,Ta(e,n),r);ro(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=Ya(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,to(r),i);if(r.$$typeof===re)return m(e,t,n,Ta(t,r),i);ro(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),aa&&Qi(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 aa&&Qi(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)}),aa&&Qi(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),aa&&Qi(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 aa&&Qi(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)}),aa&&Qi(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),no(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ce&&Ya(l)===r.type){n(e,r.sibling),c=a(r,o.props),no(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),no(c,o),c.return=e,e=c):(c=Li(o.type,o.key,o.props,null,e.mode,c),no(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=Ya(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,to(o),c);if(o.$$typeof===re)return _(e,r,Ta(e,o),c);ro(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{eo=0;var i=_(e,t,n,r);return $a=null,i}catch(t){if(t===Wa||t===Ga)throw t;var a=Ni(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var ao=io(!0),oo=io(!1),so=!1;function co(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function lo(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 uo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function fo(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 po(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 mo(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 ho=!1;function go(){if(ho){var e=Ia;if(e!==null)throw e}}function _o(e,t,n,r){ho=!1;var i=e.updateQueue;so=!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===Fa&&(ho=!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:so=!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 vo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function yo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)vo(n[e],t)}var bo=Ce(null),xo=Ce(0);function So(e,t){e=rd,Te(xo,e),Te(bo,t),rd=e|t.baseLanes}function Co(){Te(xo,rd),Te(bo,bo.current)}function wo(){rd=xo.current,we(bo),we(xo)}var To=Ce(null),Eo=null;function Do(e){var t=e.alternate;Te(Mo,Mo.current&1),Te(To,e),Eo===null&&(t===null||bo.current!==null||t.memoizedState!==null)&&(Eo=e)}function Oo(e){Te(Mo,Mo.current),Te(To,e),Eo===null&&(Eo=e)}function ko(e){e.tag===22?(Te(Mo,Mo.current),Te(To,e),Eo===null&&(Eo=e)):Ao()}function Ao(){Te(Mo,Mo.current),Te(To,To.current)}function jo(e){we(To),Eo===e&&(Eo=null),we(Mo)}var Mo=Ce(0);function No(e,t){Te(To,To.current),Te(Mo,t)}function Po(e){we(Mo),we(To),Eo===e&&(Eo=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=sc;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||Tc||(e=e.dependencies,e!==null&&Sa(e)&&(Tc=!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=Ja(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 wa(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===Fa&&(d=!0);else if((Io&p)===p){u=u.next,p===Fa&&(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)&&(Tc=!0,d&&(n=Ia,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)||(Tc=!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=aa;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,Tc=!0),a=a.queue,Ps(ms.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Ro!==null&&!!(Ro.memoizedState.tag&1),As(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(ic(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(aa){var n=Yu.formState;if(n!==null){a:{var r=q;if(aa){if(ia){b:{for(var i=ia,a=sa;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){ia=dm(i.nextSibling),r=i.data===`F!`;break a}}la(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=tc.bind(null,q,r),r.dispatch=n,r=_s(!1),a=rc.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===Wa?Ga:e}else r=t;t=ns();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(q.flags|=2048,As(9,{destroy:void 0},J.bind(null,i,n),null)),[r,a,e]}function J(e,t){e.action=t}function ks(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 As(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 Y(){return ns().memoizedState}function js(e,t,n,r){var i=ts();q.flags|=e,i.memoizedState=As(1|t,{destroy:void 0},n,r===void 0?null:r)}function Ms(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=As(t,a,n,r):(q.flags|=e,i.memoizedState=As(1|t,a,n,r))}function Ns(e,t){js(8390656,8,e,t)}function Ps(e,t){Ms(2048,8,e,t)}function Fs(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 Is(e){var t=ns().memoizedState;return Fs({ref:t,nextImpl:e}),function(){if(Ju&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Ls(e,t){return Ms(4,2,e,t)}function Rs(e,t){return Ms(4,4,e,t)}function zs(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]),Ms(4,4,zs.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:bo.current===null?!(Io&106)||Io&1073741824&&!(Zu&261930)?(Tc=!0,e.memoizedState=n):(e=jd(),q.lanes|=e,ad|=e,t):(e=Ws(e,n,r),Hr(e,t)||(Tc=!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,rc(e,!1,t,n);try{var c=i(),l=M.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?nc(e,t,G(c,r),Ad(e)):nc(e,t,r,Ad(e))}catch(n){nc(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),nc(e,t.next.queue,{},Ad())}function Zs(){return wa(lh)}function Qs(){return ns().memoizedState}function X(){return ns().memoizedState}function $s(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Ad();e=uo(n);var r=fo(t,e,n);r!==null&&(Nd(r,t,n),po(r,t,n)),t={cache:ja()},e.payload=t;return}t=t.return}}function ec(e,t,n){var r=Ad();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ic(e)?ac(t,n):(n=Di(e,t,n,r),n!==null&&(Nd(n,e,r),oc(n,t,r)))}function tc(e,t,n){nc(e,t,n,Ad())}function nc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ic(e))ac(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),oc(n,t,r),!0}return!1}function rc(e,t,n,r){if(r={lane:2,revertLane:Pf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ic(e)){if(t)throw Error(i(479))}else t=Di(e,n,r,2),t!==null&&Nd(t,e,2)}function ic(e){var t=e.alternate;return e===q||t!==null&&t===q}function ac(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 oc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xt(e,n)}}var sc={readContext:wa,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:wa,use:as,useCallback:function(e,t){return ts().memoizedState=[e,t===void 0?null:t],e},useContext:wa,useEffect:Ns,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),js(4194308,4,zs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return js(4194308,4,e,t)},useInsertionEffect:function(e,t){js(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=ec.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=tc.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(aa){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,Ns(ms.bind(null,r,o,e),[e]),r.flags|=2048,As(9,{destroy:void 0},ps.bind(null,r,o,n,t),null),n},useId:function(){var e=ts(),t=Yu.identifierPrefix;if(aa){var n=Zi,r=Xi;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=rc.bind(null,q,!0,n),n.dispatch=t,[e,t]},useMemoCache:os,useCacheRefresh:function(){return ts().memoizedState=$s.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:wa,use:as,useCallback:Hs,useContext:wa,useEffect:Ps,useImperativeHandle:Bs,useInsertionEffect:Ls,useLayoutEffect:Rs,useMemo:Us,useReducer:cs,useRef:Y,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:X,useEffectEvent:Is},uc={readContext:wa,use:as,useCallback:Hs,useContext:wa,useEffect:Ps,useImperativeHandle:Bs,useInsertionEffect:Ls,useLayoutEffect:Rs,useMemo:Us,useReducer:us,useRef:Y,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:ks,useActionState:ks,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:X,useEffectEvent:Is};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=uo(r);i.payload=t,n!=null&&(i.callback=n),t=fo(e,i,r),t!==null&&(Nd(t,e,r),po(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ad(),i=uo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=fo(e,i,r),t!==null&&(Nd(t,e,r),po(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ad(),r=uo(n);r.tag=2,t!=null&&(r.callback=t),t=fo(e,r,n),t!==null&&(Nd(t,e,n),po(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 Z(e){console.error(e)}function _c(e){xi(e)}function vc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function yc(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 bc(e,t,n){return n=uo(n),n.tag=3,n.payload={element:null},n.callback=function(){vc(e,t)},n}function xc(e){return e=uo(e),e.tag=3,e}function Sc(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(){yc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){yc(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 Cc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&xa(t,n,a,!0),n=To.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Eo===null?Gd():n.alternate===null&&id===0&&(id=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ka?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===Ka?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(aa)return t=To.current,t===null?(r!==ca&&(t=Error(i(423),{cause:r}),ha(Ui(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Ui(r,n),a=bc(e.stateNode,r,a),mo(e,a),id!==4&&(id=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ca&&(e=Error(i(422),{cause:r}),ha(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=bc(n.stateNode,r,e),mo(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=xc(a),Sc(a,e,n,r),mo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var wc=Error(i(461)),Tc=!1;function Ec(e,t,n,r){t.child=e===null?oo(t,null,n,r):ao(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 Ca(t),r=Jo(e,t,n,o,a,i),s=Qo(),e!==null&&!Tc?($o(e,t,i),tl(e,t,i)):(aa&&s&&ea(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(Tc=!1,t.pendingProps=r=a,nl(e,i))e.flags&131072&&(Tc=!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&&Ha(t,a===null?null:a.cachePool),a===null?Co():So(t,a),ko(t);else return r=t.lanes=536870912,Mc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ha(t,null),Co(),Ao()):(Ha(t,a.cachePool),So(t,a),Ao(),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=Va();return a=a===null?null:{parent:Aa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ha(t,null),Co(),ko(t),e!==null&&xa(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 ao(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(aa){if(r.mode===`hidden`)return e=Nc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},jc(null,e);if(Oo(t),(e=ia)?(e=sm(e,sa),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Yi===null?null:{id:Xi,overflow:Zi},retryLane:536870912,hydrationErrors:null},n=Bi(e),n.return=t,t.child=n,ra=t,ia=null)):e=null,e===null)throw la(t);return t.lanes=536870912,null}return Nc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Oo(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(Tc||xa(e,t,n,!1),a=(n&e.childLanes)!==0,Tc||a){if(bo.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),wc;Gd()}t=Pc(e,t,n)}else e=o.treeContext,ia=dm(s.nextSibling),ra=t,aa=!0,oa=null,sa=!1,e!==null&&na(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 Ca(t),n=Jo(e,t,n,r,void 0,i),r=Qo(),e!==null&&!Tc?($o(e,t,i),tl(e,t,i)):(aa&&r&&ea(t),t.flags|=1,Ec(e,t,n,i),t.child)}function Rc(e,t,n,r,i,a){return Ca(t),t.updateQueue=null,n=Xo(t,r,n,i),Yo(e),r=Qo(),e!==null&&!Tc?($o(e,t,a),tl(e,t,a)):(aa&&r&&ea(t),t.flags|=1,Ec(e,t,n,a),t.child)}function zc(e,t,n,r,i){if(Ca(t),t.stateNode===null){var a=ji,o=n.contextType;typeof o==`object`&&o&&(a=wa(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={},co(t),o=n.contextType,a.context=typeof o==`object`&&o?wa(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),_o(t,r,a,i),go(),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=wa(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),so=!1;var f=t.memoizedState;a.state=f,_o(t,r,a,i),go(),l=t.memoizedState,s||f!==l||so?(typeof d==`function`&&(dc(t,n,d,r),l=t.memoizedState),(c=so||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,lo(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=wa(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),so=!1,f=t.memoizedState,a.state=f,_o(t,r,a,i),go();var p=t.memoizedState;o!==d||f!==p||so||e!==null&&e.dependencies!==null&&Sa(e.dependencies)?(typeof s==`function`&&(dc(t,n,s,r),p=t.memoizedState),(u=so||pc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Sa(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=ao(t,e.child,null,i),t.child=ao(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 pa(),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:Ua()}}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(aa){if(i?Do(t):Ao(),(e=ia)?(e=sm(e,sa),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Yi===null?null:{id:Xi,overflow:Zi},retryLane:536870912,hydrationErrors:null},n=Bi(e),n.return=t,t.child=n,ra=t,ia=null)):e=null,e===null)throw la(t);return t.lanes=lm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Ao(),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)):(Do(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?(Ao(),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=Ua():(s=Aa._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)):(Do(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 ao(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?(Do(t),t.flags&=-257,qc(e,t,c)):t.memoizedState===null?(Ao(),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,ao(t,e.child,null,c),a=t.child,a.memoizedState=Hc(c),a.childLanes=Uc(e,r,c),t.memoizedState=Vc,jc(null,a)):(Ao(),t.child=e.child,t.flags|=128,null);if(Do(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,ha({value:a,source:null,stack:null})),qc(e,t,c)}if(Tc||xa(e,t,c,!1),r=(c&e.childLanes)!==0,Tc||r){if(bo.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),wc;return cm(o)||Gd(),qc(e,t,c)}return cm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,ia=dm(o.nextSibling),ra=t,aa=!0,oa=null,sa=!1,e!==null&&na(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),V(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=aa?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 ya(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(xa(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&&Sa(e)))}function rl(e,t,n){switch(t.tag){case 3:Ae(t,t.stateNode.containerInfo),ya(t,Aa,e.memoizedState.cache),pa();break;case 27:case 5:Me(t);break;case 4:Ae(t,t.stateNode.containerInfo);break;case 10:ya(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Oo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Do(t),t.flags|=128,null;r=xa(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Wc(e,t,n):(Do(t),e=tl(e,t,n),e===null?null:e.sibling)}Do(t);break;case 19:if(t.flags&128)return $c(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(xa(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:ya(t,Aa,e.memoizedState.cache)}return tl(e,t,n)}function il(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Tc=!0;else{if(!nl(e,n)&&!(t.flags&128))return Tc=!1,rl(e,t,n);Tc=!!(e.flags&131072)}}else Tc=!1,aa&&t.flags&1048576&&$i(t,qi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ya(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,lo(e,t),_o(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ya(t,Aa,r),r!==o.cache&&ba(t,[Aa],n,!0),go(),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),ha(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(ia=dm(e.firstChild),ra=t,aa=!0,oa=null,sa=!0,n=oo(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(pa(),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:aa||(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&&aa&&(r=t.stateNode=_m(t.type,t.pendingProps,Oe.current),ra=t,sa=!0,a=ia,wp(t.type)?(fm=a,ia=dm(r.firstChild)):ia=a),Ec(e,t,t.pendingProps.children,n),Ic(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&aa&&((a=r=ia)&&(r=am(r,t.type,t.pendingProps,sa),r===null?a=!1:(t.stateNode=r,ra=t,ia=dm(r.firstChild),sa=!1,a=!0)),a||la(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&&aa&&((e=n=ia)&&(n=om(n,t.pendingProps,sa),n===null?e=!1:(t.stateNode=n,ra=t,ia=null,e=!0)),e||la(t)),null;case 13:return Wc(e,t,n);case 4:return Ae(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ao(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,Ca(t),a=wa(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 Ca(t),r=wa(Aa),e===null?(a=Va(),a===null&&(a=Yu,o=ja(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},co(t),ya(t,Aa,a)):((e.lanes&n)!==0&&(lo(e,t),_o(t,null,null,n),go()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ya(t,Aa,r),r!==a.cache&&ba(t,[Aa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ya(t,Aa,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:aa&&ea(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 Xa=Ka,K}}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 Xa=Ka,K}}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(!aa)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(ta(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),B(Aa),je(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(fa(t)?al(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ma())),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,fa(t)?ua(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,fa(t))ua(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,fa(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ra,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||la(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=fa(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 pa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ul(t),e=!1}else n=ma(),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=fa(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 pa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ul(t),a=!1}else a=ma(),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 B(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),aa&&Qi(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&&!aa)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||aa?No(t,o):(n=o,Te(To,t),Te(Mo,n),Eo===null&&(Eo=t)),aa&&Qi(t,r.treeForkCount),e}return ul(t),null;case 22:case 23:return jo(t),wo(),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(Ba),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),B(Aa),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(ta(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return B(Aa),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));pa()}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));pa()}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 B(t.type),null;case 22:case 23:return jo(t),wo(),e!==null&&we(Ba),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return B(Aa),null;case 25:return null;default:return null}}function pl(e,t){switch(ta(t),t.tag){case 3:B(Aa),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:B(t.type);break;case 22:case 23:jo(t),wo(),e!==null&&we(Ba);break;case 24:B(Aa)}}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{yo(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{yo(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++)vo(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&&H(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&&H(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&&H(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:H(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=wa(Aa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return wa(Aa).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)||aa){var e=lt;lt<<=1,!(lt&3932160)&&(lt=262144),cd=e}else cd=536870912}return e=To.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,va=_a=null,es(e),$a=null,eo=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=sc,t===Wa||t===Ga?(t=Za(),Qu=3):t===K?(t=Za(),Qu=4):Qu=t===wc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,$u=t,Xu===null&&(id=1,vc(e,Ui(t,e.current)))}function Hd(){var e=To.current;return e===null?!0:(Zu&4194048)===Zu?Eo===null:(Zu&62914560)===Zu||Zu&536870912?e===Eo:!1}function Ud(){var e=M.H;return M.H=sc,e===null?sc:e}function Wd(){var e=M.A;return M.A=Ku,e}function Gd(){id=4,ed||(Zu&4194048)!==Zu&&To.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:To.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++,va=_a=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(qa(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:qa(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 va=_a=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===ra&&(aa?(da(r),r.tag===5&&r.stateNode!=null&&(ia=r.stateNode)):(da(r),aa=!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){va=_a=null,es(t),$a=null,eo=0;var i=t.return;try{if(Cc(e,i,t,n,Zu)){id=1,vc(e,Ui(n,e.current)),Xu=null;return}}catch(t){if(i!==null)throw Xu=i,t;id=1,vc(e,Ui(n,e.current)),Xu=null;return}t.flags&32768?(aa||r===1?e=!0:td||Zu&536870912?e=!1:(ed=e=!0,(r===2||r===9||r===3||r===6)&&(r=To.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=Na(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,H(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=bc(e.stateNode,t,2),e=fo(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=xc(2),r=fo(t,n,2),r!==null&&(Sc(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=Fa;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=ja(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},co(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=uo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=fo(e,r,t),n!==null&&(Nd(n,e,t),po(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=Z,c=_c;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;try{e=(await i.json()).error||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]),{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),[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(`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`}]]),Sr=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`}]]),Cr=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`}]]),wr=R(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Tr=R(`ChevronDown`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Er=R(`ChevronLeft`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),Dr=R(`ChevronRight`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Or=R(`ChevronUp`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),kr=R(`ChevronsUpDown`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),Ar=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`}]]),jr=R(`CircleCheck`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Mr=R(`CircleDot`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}]]),Nr=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`}]]),Pr=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`}]]),Fr=R(`Clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`polyline`,{points:`12 6 12 12 16 14`,key:`68esgv`}]]),Ir=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`}]]),Lr=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`}]]),Rr=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`}]]),zr=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`}]]),Br=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`}]]),Vr=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`}]]),Hr=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`}]]),Ur=R(`Gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),Wr=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`}]]),Gr=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`}]]),Kr=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`}]]),qr=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`}]]),Jr=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`}]]),Yr=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`}]]),Xr=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`}]]),Zr=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`}]]),Qr=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`}]]),$r=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`}]]),ei=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`}]]),ti=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`}]]),ni=R(`LoaderCircle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ri=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`}]]),ii=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`}]]),ai=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`}]]),oi=R(`Minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),si=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`}]]),ci=R(`Moon`,[[`path`,{d:`M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z`,key:`a7tn18`}]]),li=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`}]]),ui=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`}]]),di=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`}]]),fi=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`}]]),pi=R(`Play`,[[`polygon`,{points:`6 3 20 12 6 21 6 3`,key:`1oa8hb`}]]),mi=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`}]]),hi=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`}]]),gi=R(`Plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),_i=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`}]]),vi=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`}]]),yi=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`}]]),bi=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`}]]),xi=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`}]]),Si=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`}]]),Ci=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`}]]),wi=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`}]]),Ti=R(`Search`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`path`,{d:`m21 21-4.3-4.3`,key:`1qie3q`}]]),Ei=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`}]]),Di=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`}]]),Oi=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`}]]),ki=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`}]]),Ai=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`}]]),ji=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`}]]),Mi=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`}]]),Ni=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`}]]),Pi=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`}]]),Fi=R(`Square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),Ii=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`}]]),Li=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`}]]),Ri=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`}]]),zi=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`}]]),Bi=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`}]]),Vi=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`}]]),Hi=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`}]]),Ui=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`}]]),Wi=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`}]]),Gi=R(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Ki=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`}]]),qi={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 z(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 Ji=e=>e==null?`—`:e>0&&e<1?`<1%`:`${Math.floor(e)}%`;function Yi({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=qi[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)(ri,{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 Xi={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 Zi(){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)(Bi,{size:14,style:{color:r?`#f07070`:`#fab219`}}),(0,F.jsx)(`b`,{className:`font-medium`,children:Xi[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)(Ur,{size:13}),`Usage`]})]})}function Qi({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 $i(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:$i(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 ea({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:$i(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:$i(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`,{}),$i(e,`${a}-${t}`)]},t))},a))}return(0,F.jsx)(`div`,{className:`flex flex-col gap-2 leading-relaxed`,dir:`auto`,children:n})}var ta=[`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`],na=[`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?`],ra={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`},ia=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`,aa=e=>Object.entries(e).filter(([,e])=>e!=null&&e!==``).map(([e,t])=>`${e}: ${typeof t==`string`?t:JSON.stringify(t)}`).join(` · `),oa=()=>`obz.ask.${qn()}`,sa=()=>{try{return JSON.parse(sessionStorage.getItem(oa())||`[]`).map(e=>({...e,running:!1}))}catch{return[]}},ca=e=>{try{sessionStorage.setItem(oa(),JSON.stringify(e.slice(-20)))}catch{}};function la({open:e,onClose:t,pending:n,onPending:r,simple:i}){let a=P(e?`/api/settings/ai`:null,[e]),[o,s]=(0,v.useState)(sa),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)(()=>{ca(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)(Pi,{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)(gi,{size:14})}),(0,F.jsx)(`button`,{className:`btn btn-ghost h-7 px-2`,title:`Close (Esc)`,onClick:t,children:(0,F.jsx)(Gi,{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)(ua,{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?na:ta).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)(Pi,{size:12,className:`text-mute shrink-0`}),e]},e))})]}),o.map((e,t)=>(0,F.jsx)(da,{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)(Fi,{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 ua({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)(Dr,{size:13})]})})]})}function da({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)(wr,{size:13,className:`text-[#5fd38a]`}),(0,F.jsx)(`span`,{className:`flex-1 text-left`,children:e.running&&!e.answer?e.steps.length?(ra[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?` · ${fa(e.usage)}`:``}`}),(0,F.jsx)(Dr,{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)(wr,{size:11,className:`text-[#5fd38a]`}):(0,F.jsx)(Bi,{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:[ra[e.tool]||e.tool,` `,(0,F.jsx)(`span`,{className:`mono text-mute text-[11px]`,children:e.tool})]}),aa(e.input)&&(0,F.jsx)(`div`,{className:`mono text-[11px] text-mute break-all`,children:aa(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)(_a,{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 fa(e){return`${z(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 pa={high:{label:`High confidence`,color:`#5fd38a`},medium:{label:`Medium confidence`,color:`#ffb547`},low:{label:`Low confidence`,color:`#ff8a8a`}},ma={execution:lr,trace:Wr,error:br,operation:lr,release:bi,issue:ti};function ha(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 ga({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 _a({a:e,onAsk:t,showFollowUps:n}){let r=ht(),i=L(),a=pa[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)(ea,{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)(Fr,{size:11}),ia(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)(ga,{title:`Evidence`,icon:(0,F.jsx)(Ai,{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)(ga,{title:`Open in Obzerver`,icon:(0,F.jsx)(ei,{size:11}),children:(0,F.jsx)(`div`,{className:`flex flex-col gap-1`,children:e.links.map((e,t)=>{let n=ma[e.kind];return(0,F.jsxs)(`button`,{onClick:()=>r(i(ha(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)(Dr,{size:12,className:`text-mute`})]},t)})})}),(0,F.jsx)(ga,{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:ra[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)(Bi,{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 va(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 ya(){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)(Hr,{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)(kr,{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(va(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)(wr,{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(`${va(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)(gi,{size:13,className:`ml-0.5`}),`New project`]}),(0,F.jsxs)(`button`,{onClick:()=>c(va(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 B(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 V(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 ba(e,t=2){return e==null||!Number.isFinite(e)?`—`:e===0?`0%`:e<.01?`<0.01%`:`${e.toFixed(e>=10?1:t)}%`}function xa(e){return e==null?`—`:e>=1073741824?`${(e/1073741824).toFixed(2)} GB`:e>=1048576?`${(e/1048576).toFixed(0)} MB`:`${(e/1024).toFixed(0)} KB`}function Sa(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 Ca(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 wa(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 Ta(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 Ea=encodeURIComponent,Da=864e5,Oa=e=>new Date(e-new Date(e).getTimezoneOffset()*6e4).toISOString().slice(0,16),ka=e=>e?new Date(e).getTime():NaN,Aa=e=>{let t=new Date(e);return t.setHours(0,0,0,0),t.getTime()};function ja(){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(Oa(e.from)),o(Oa(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=Aa(d),p=[[`Today`,f,d],[`Yesterday`,f-Da,f],[`Same day last week`,f-7*Da,f-6*Da],[`Last 14 days`,d-14*Da,d],[`Last 30 days`,d-30*Da,d],[`Last 90 days`,d-90*Da,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)(xr,{size:12}),Ca(e.from,!0),` → `,Ca(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)(Gi,{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)(xr,{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:Oa(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:Oa(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(ka(r),ka(a)),children:`Apply`})]})]})]})}function H({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 Ma({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 U({label:e}){return(0,F.jsxs)(`div`,{className:`flex items-center justify-center gap-2 text-mute py-10`,children:[(0,F.jsx)(ni,{size:16,className:`animate-spin`}),e||`Loading…`]})}function Na({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)(Jr,{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})]})}function W({error:e}){return e?(0,F.jsxs)(`div`,{className:`card p-3 text-[12.5px] flex gap-2 items-center`,style:{borderColor:`#5a2328`,color:`#ff9b9b`},children:[(0,F.jsx)(Bi,{size:14}),e.message]}):null}function Pa({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 ${l?`cursor-pointer hover:border-line2`:``}`,onClick:l,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)(Fa,{data:s,color:c})]}),n&&(0,F.jsx)(`div`,{className:`text-mute text-[11.5px] truncate`,children:n})]})}function Fa({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 Ia({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 La({m:e}){if(!e)return null;let t=Ga;return(0,F.jsx)(`span`,{className:`mono text-[10.5px] font-semibold inline-block shrink-0 ${Ka.includes(e)?`min-w-[44px] pr-2`:`w-[44px]`}`,style:{color:t[e]||`var(--color-ink2)`},children:e})}function Ra({name:e}){let t=/^(GET|POST|PUT|PATCH|DELETE|HEAD|OPTIONS|ALL|QUERY|MUTATION|SUBSCRIPTION)\s+(.*)$/.exec(e);return t?(0,F.jsxs)(`span`,{className:`inline-flex items-center min-w-0`,children:[(0,F.jsx)(La,{m:t[1]}),(0,F.jsx)(`span`,{className:`mono truncate`,children:t[2]})]}):(0,F.jsx)(`span`,{className:`mono`,children:e})}function G({kind:e,children:t}){let[n,r]={good:[`var(--color-good)`,jr],warn:[`var(--color-warn)`,Ar],serious:[`var(--color-serious)`,Ar],crit:[`var(--color-crit)`,Ar],neutral:[`var(--color-mute)`,Mr]}[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 za({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)(wr,{size:13}):(0,F.jsx)(Lr,{size:13}),r?`Copied`:t]})}function Ba({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 Va({rows:e,cols:t,onRow:n,initialSort:r,initialDir:i=`desc`,empty:a,maxHeight:o,rowKey:s}){let[c,l]=(0,v.useState)(r),[u,d]=(0,v.useState)(i),f=(0,v.useMemo)(()=>{let n=t.find(e=>e.key===c);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 u===`asc`?a:-a})},[e,t,c,u]);return!e.length&&a?(0,F.jsx)(F.Fragment,{children:a}):(0,F.jsx)(`div`,{className:`overflow-auto`,style:o?{maxHeight:o}:void 0,children:(0,F.jsxs)(`table`,{className:`tbl`,children:[(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&&(c===e.key?d(u===`asc`?`desc`:`asc`):(l(e.key),d(`desc`)))},children:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-0.5`,children:[e.label,c===e.key&&(u===`asc`?(0,F.jsx)(Or,{size:11}):(0,F.jsx)(Tr,{size:11}))]})},e.key))})}),(0,F.jsx)(`tbody`,{children:f.map((e,r)=>(0,F.jsx)(`tr`,{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))})]})})}function Ha({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 Ua({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 Wa({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 K({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 Ga={GET:`#5aa2f0`,POST:`#3fbf8f`,PUT:`#e0a33a`,PATCH:`#c99af0`,DELETE:`#f07070`,QUERY:`#e86fc4`,MUTATION:`#f0a35a`,SUBSCRIPTION:`#6fc8e8`},Ka=[`QUERY`,`MUTATION`,`SUBSCRIPTION`];function qa({tip:e,children:t,className:n=``}){let[r,i]=(0,v.useState)(null);return(0,F.jsxs)(`span`,{className:`cursor-help underline decoration-dotted decoration-[#55556a] underline-offset-4 ${n}`,onMouseEnter:e=>{let t=e.currentTarget.getBoundingClientRect();i({x:t.left+t.width/2,y:t.top})},onMouseLeave:()=>i(null),children:[t,r&&(0,F.jsx)(`span`,{role:`tooltip`,className:`mono fixed z-[100] -translate-x-1/2 -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:r.x,top:r.y-6,background:`rgba(17,17,22,.97)`},children:e})]})}function Ja(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 Ya({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?Ja(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 Xa(){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 Za={pg:`PostgreSQL`,mysql2:`MySQL`,ioredis:`Redis`,bullmq:`BullMQ`,"node-cron":`cron`,cron:`cron`},Qa={express:{label:`Express`,color:`#f4f4f8`,bg:`rgba(244, 244, 248, .1)`},fastify:{label:`Fastify`,color:`#8fd3ff`,bg:`rgba(143, 211, 255, .12)`}};function $a(e){let[t,n]=e.split(`@`);return Qa[t]?{label:`${Qa[t].label}${n&&n!==`?`?` ${n}`:``}`,web:!0}:{label:Za[t]??t,web:!1}}function eo(e){return e.filter(e=>Qa[e.split(`@`)[0]]).map(e=>$a(e).label).join(`, `)}function to({frameworks:e,web:t=!1,className:n=``}){let r=new Set,i=e.map(e=>({f:e,...$a(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=Qa[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 no({app:e,web:t,className:n}){let r=I().meta?.services.find(t=>t.id===e);return r?(0,F.jsx)(to,{frameworks:r.frameworks,web:t,className:n}):null}var ro=[{items:[{to:`/`,label:`Overview`,Icon:Qr,end:!0}]},{title:`Activity`,items:[{to:`/requests`,label:`Requests`,Icon:lr},{to:`/jobs`,label:`Jobs`,Icon:Wi},{to:`/traces`,label:`Traces`,Icon:Wr},{to:`/map`,label:`Service map`,Icon:li}]},{title:`Diagnose`,items:[{to:`/errors`,label:`Errors`,Icon:br},{to:`/secrets`,label:`Secrets in logs`,Icon:ki,badge:`secrets`},{to:`/logs`,label:`Logs`,Icon:wi},{to:`/services`,label:`Services`,Icon:vr},{to:`/queries`,label:`Queries`,Icon:zr},{to:`/users`,label:`Users`,Icon:Hi}]},{title:`Runtime`,items:[{to:`/profiler`,label:`Profiler`,Icon:Rr},{to:`/metrics`,label:`Custom metrics`,Icon:Ur},{to:`/releases`,label:`Releases`,Icon:bi}]},{title:`Respond`,items:[{to:`/alerts`,label:`Alerts`,Icon:hr,badge:`alerts`},{to:`/slos`,label:`SLOs`,Icon:Ii},{to:`/status-pages`,label:`Status pages`,Icon:vi},{to:`/issues`,label:`Issues`,Icon:Nr,badge:`issues`}]}],io={"/logs":`logs`,"/alerts":`alerts`,"/slos":`slos`};function ao(e){let{meta:t}=I(),n=io[e];return!!(n&&t?.usage&&!t.usage.features[n])}function oo({to:e}){return ao(e)?(0,F.jsx)(ri,{size:12,className:`text-mute`,"aria-label":`Not in your plan`}):null}function so({to:e,n:t,red:n}){return ao(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 co=[{to:`/`,label:`Home`,hint:`Is my app healthy?`,Icon:Kr,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:bi},{to:`/metrics`,label:`Metrics`,hint:`Traffic, speed, errors, server`,Icon:Cr},{to:`/logs`,label:`Logs`,hint:`What your app printed`,Icon:wi},{to:`/settings`,label:`Settings`,hint:`Connect your app`,Icon:Oi}],lo=[{id:`1h`,label:`Last hour`},{id:`24h`,label:`Today`},{id:`7d`,label:`7 days`}];function uo({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`,Ni,`Simple mode: is my app healthy, what broke, what changed, what to do`),r(`advanced`,`Advanced`,Mi,`Advanced mode: every request, trace, query and runtime detail`)]})}function fo({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 po={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 mo({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:po.ob,fill:`#f4f4f8`}),(0,F.jsx)(`path`,{d:po.z,fill:a}),(0,F.jsx)(`path`,{d:po.erver,fill:`#f4f4f8`})]})}function ho(){let{mode:e}=nr();return e?e===`simple`?(0,F.jsx)(_o,{}):(0,F.jsx)(vo,{}):(0,F.jsx)(`div`,{className:`h-full flex items-center justify-center`,children:(0,F.jsx)(U,{})})}function go(){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 _o(){let e=I(),t=Xa(),n=L(),{setMode:r}=nr(),{askOpen:i,setAskOpen:a,pending:o,clearPending:s}=go(),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)(fo,{size:28}),(0,F.jsx)(`span`,{className:`mt-px`,children:(0,F.jsx)(mo,{size:20})})]}),(0,F.jsx)(ya,{}),(0,F.jsxs)(`nav`,{className:`flex-1 overflow-y-auto px-2.5 py-3 flex flex-col gap-1`,children:[co.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)(oo,{to:e.to}),e.badge&&(0,F.jsx)(so,{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)(Pi,{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)(uo,{}),(0,F.jsx)(`div`,{className:`flex-1`}),(0,F.jsx)(Ya,{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,eo(e.frameworks)?` · ${eo(e.frameworks)}`:``]},e.id))]}),e.service&&(0,F.jsx)(no,{app:e.service,web:!0}),i?(0,F.jsxs)(`select`,{className:`select h-8`,value:lo.some(t=>t.id===e.range)?e.range:``,onChange:t=>t.target.value&&e.setRange(t.target.value),"aria-label":`Time range`,children:[!lo.some(t=>t.id===e.range)&&(0,F.jsx)(`option`,{value:``,children:e.range===`custom`?`Custom`:e.range}),lo.map(e=>(0,F.jsx)(`option`,{value:e.id,children:e.label},e.id))]}):(0,F.jsx)(`div`,{className:`seg seg-lg`,children:lo.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)(Pi,{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)(yi,{size:14})})]}),(0,F.jsx)(Zi,{}),(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)(la,{open:i,onClose:()=>a(!1),pending:o,onPending:s,simple:!0})]})]})}function vo(){let e=I(),t=Xa(),n=L(),r=ht(),[i,a]=(0,v.useState)(``),{askOpen:o,setAskOpen:s,pending:c,clearPending:l}=go(),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)(fo,{size:28}),(0,F.jsxs)(`div`,{className:`flex flex-col gap-[5px]`,children:[(0,F.jsx)(mo,{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)(ya,{}),(0,F.jsx)(`nav`,{className:`flex-1 overflow-y-auto px-2 py-3 flex flex-col gap-4`,children:ro.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)(oo,{to:e.to}),e.badge&&(0,F.jsx)(so,{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)(hi,{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)(Sr,{size:15}),` `,(0,F.jsx)(`span`,{className:`flex-1`,children:`Usage`}),(0,F.jsx)(yo,{})]}),(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)(Oi,{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)(uo,{}),(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)(Ti,{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)(Pi,{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)(yi,{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)(Ya,{}),(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,eo(e.frameworks)?` · ${eo(e.frameworks)}`:``]},e.id))]}),e.service&&(0,F.jsx)(no,{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)(ja,{})]})]}),(0,F.jsx)(Zi,{}),(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)(la,{open:o,onClose:()=>s(!1),pending:c,onPending:l})]})]})}function yo(){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:Ji(t.pct)})}function bo(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=bo(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function xo(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=bo(e))&&(r&&(r+=` `),r+=t);return r}var So=o(((e,t)=>{t.exports=Array.isArray})),Co=o(((e,t)=>{t.exports=typeof global==`object`&&global&&global.Object===Object&&global})),wo=o(((e,t)=>{var n=Co(),r=typeof self==`object`&&self&&self.Object===Object&&self;t.exports=n||r||Function(`return this`)()})),To=o(((e,t)=>{t.exports=wo().Symbol})),Eo=o(((e,t)=>{var n=To(),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})),Do=o(((e,t)=>{var n=Object.prototype.toString;function r(e){return n.call(e)}t.exports=r})),Oo=o(((e,t)=>{var n=To(),r=Eo(),i=Do(),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})),ko=o(((e,t)=>{function n(e){return typeof e==`object`&&!!e}t.exports=n})),Ao=o(((e,t)=>{var n=Oo(),r=ko(),i=`[object Symbol]`;function a(e){return typeof e==`symbol`||r(e)&&n(e)==i}t.exports=a})),jo=o(((e,t)=>{var n=So(),r=Ao(),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})),Mo=o(((e,t)=>{function n(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=n})),No=o(((e,t)=>{var n=Oo(),r=Mo(),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})),Po=o(((e,t)=>{t.exports=wo()[`__core-js_shared__`]})),Fo=o(((e,t)=>{var n=Po(),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})),Io=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})),q=o(((e,t)=>{var n=No(),r=Fo(),i=Mo(),a=Io(),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})),Lo=o(((e,t)=>{function n(e,t){return e?.[t]}t.exports=n})),Ro=o(((e,t)=>{var n=q(),r=Lo();function i(e,t){var i=r(e,t);return n(i)?i:void 0}t.exports=i})),zo=o(((e,t)=>{t.exports=Ro()(Object,`create`)})),Bo=o(((e,t)=>{var n=zo();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r})),Vo=o(((e,t)=>{function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}t.exports=n})),Ho=o(((e,t)=>{var n=zo(),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})),Uo=o(((e,t)=>{var n=zo(),r=Object.prototype.hasOwnProperty;function i(e){var t=this.__data__;return n?t[e]!==void 0:r.call(t,e)}t.exports=i})),Wo=o(((e,t)=>{var n=zo(),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})),Go=o(((e,t)=>{var n=Bo(),r=Vo(),i=Ho(),a=Uo(),o=Wo();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})),Ko=o(((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n})),qo=o(((e,t)=>{function n(e,t){return e===t||e!==e&&t!==t}t.exports=n})),Jo=o(((e,t)=>{var n=qo();function r(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}t.exports=r})),Yo=o(((e,t)=>{var n=Jo(),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})),Xo=o(((e,t)=>{var n=Jo();function r(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}t.exports=r})),Zo=o(((e,t)=>{var n=Jo();function r(e){return n(this.__data__,e)>-1}t.exports=r})),Qo=o(((e,t)=>{var n=Jo();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})),$o=o(((e,t)=>{var n=Ko(),r=Yo(),i=Xo(),a=Zo(),o=Qo();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})),es=o(((e,t)=>{t.exports=Ro()(wo(),`Map`)})),ts=o(((e,t)=>{var n=Go(),r=$o(),i=es();function a(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=a})),ns=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})),rs=o(((e,t)=>{var n=ns();function r(e,t){var r=e.__data__;return n(t)?r[typeof t==`string`?`string`:`hash`]:r.map}t.exports=r})),is=o(((e,t)=>{var n=rs();function r(e){var t=n(this,e).delete(e);return this.size-=+!!t,t}t.exports=r})),as=o(((e,t)=>{var n=rs();function r(e){return n(this,e).get(e)}t.exports=r})),os=o(((e,t)=>{var n=rs();function r(e){return n(this,e).has(e)}t.exports=r})),ss=o(((e,t)=>{var n=rs();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})),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)=>{var n=cs(),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})),us=o(((e,t)=>{var n=ls(),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})),ds=o(((e,t)=>{var n=us(),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})})),fs=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})),ps=o(((e,t)=>{var n=To(),r=fs(),i=So(),a=Ao(),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})),ms=o(((e,t)=>{var n=ps();function r(e){return e==null?``:n(e)}t.exports=r})),hs=o(((e,t)=>{var n=So(),r=jo(),i=ds(),a=ms();function o(e,t){return n(e)?e:r(e,t)?[e]:i(a(e))}t.exports=o})),gs=o(((e,t)=>{var n=Ao(),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})),_s=o(((e,t)=>{var n=hs(),r=gs();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})),vs=o(((e,t)=>{var n=_s();function r(e,t,r){var i=e==null?void 0:n(e,t);return i===void 0?r:i}t.exports=r})),ys=o(((e,t)=>{function n(e){return e==null}t.exports=n})),bs=o(((e,t)=>{var n=Oo(),r=So(),i=ko(),a=`[object String]`;function o(e){return typeof e==`string`||!r(e)&&i(e)&&n(e)==a}t.exports=o})),xs=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}})),Ss=o(((e,t)=>{t.exports=xs()})),Cs=o(((e,t)=>{var n=Oo(),r=ko(),i=`[object Number]`;function a(e){return typeof e==`number`||r(e)&&n(e)==i}t.exports=a})),ws=o(((e,t)=>{var n=Cs();function r(e){return n(e)&&e!=+e}t.exports=r})),Ts=l(bs()),Es=l(ws()),Ds=l(vs()),Os=l(Cs()),J=l(ys()),ks=function(e){return e===0?0:e>0?1:-1},As=function(e){return(0,Ts.default)(e)&&e.indexOf(`%`)===e.length-1},Y=function(e){return(0,Os.default)(e)&&!(0,Es.default)(e)},js=function(e){return(0,J.default)(e)},Ms=function(e){return Y(e)||(0,Ts.default)(e)},Ns=0,Ps=function(e){var t=++Ns;return`${e||``}${t}`},Fs=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,Ts.default)(e))return n;var i;if(As(e)){var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return(0,Es.default)(i)&&(i=n),r&&i>t&&(i=t),i},Is=function(e){if(!e)return null;var t=Object.keys(e);return t&&t.length?e[t[0]]:null},Ls=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},Rs=function(e,t){return Y(e)&&Y(t)?function(n){return e+n*(t-e)}:function(){return t}};function zs(e,t,n){return!e||!e.length?null:e.find(function(e){return e&&(typeof t==`function`?t(e):(0,Ds.default)(e,t))===n})}var Bs=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}},Vs=function(e,t){return Y(e)&&Y(t)?e-t:(0,Ts.default)(e)&&(0,Ts.default)(t)?e.localeCompare(t):e instanceof Date&&t instanceof Date?e.getTime()-t.getTime():String(e).localeCompare(String(t))};function Hs(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 Us=l(Mo());function Ws(e){"@babel/helpers - typeof";return Ws=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},Ws(e)}var Gs=[`viewBox`,`children`],Ks=`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(`.`),qs=[`points`,`pathLength`],Js={svg:Gs,polygon:qs,polyline:qs},Ys=`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(`.`),Xs=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,Us.default)(n))return null;var r={};return Object.keys(n).forEach(function(e){Ys.includes(e)&&(r[e]=t||function(t){return n[e](n,t)})}),r},Zs=function(e,t,n){return function(r){return e(t,n,r),null}},Qs=function(e,t,n){if(!(0,Us.default)(e)||Ws(e)!==`object`)return null;var r=null;return Object.keys(e).forEach(function(i){var a=e[i];Ys.includes(i)&&typeof a==`function`&&(r||={},r[i]=Zs(a,t,n))}),r},X=l(No()),$s=Ss(),ec=[`children`],tc=[`children`];function nc(e,t){if(e==null)return{};var n=rc(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 rc(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 ic(e){"@babel/helpers - typeof";return ic=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},ic(e)}var ac={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`},oc=function(e){return typeof e==`string`?e:e?e.displayName||e.name||`Component`:``},sc=null,cc=null,lc=function e(t){if(t===sc&&Array.isArray(cc))return cc;var n=[];return v.Children.forEach(t,function(t){(0,J.default)(t)||((0,$s.isFragment)(t)?n=n.concat(e(t.props.children)):n.push(t))}),cc=n,sc=t,n};function uc(e,t){var n=[],r=[];return r=Array.isArray(t)?t.map(function(e){return oc(e)}):[oc(t)],lc(e).forEach(function(e){var t=(0,Ds.default)(e,`type.displayName`)||(0,Ds.default)(e,`type.name`);r.indexOf(t)!==-1&&n.push(e)}),n}function dc(e,t){var n=uc(e,t);return n&&n[0]}var fc=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)},pc=`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(`.`),mc=function(e){return e&&e.type&&(0,Ts.default)(e.type)&&pc.indexOf(e.type)>=0},hc=function(e){return e&&ic(e)===`object`&&`clipDot`in e},gc=function(e,t,n,r){var i=Js?.[r]??[];return t.startsWith(`data-`)||!(0,X.default)(e)&&(r&&i.includes(t)||Ks.includes(t))||n&&Ys.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,Us.default)(r))return null;var i={};return Object.keys(r).forEach(function(e){gc(r?.[e],e,t,n)&&(i[e]=r[e])}),i},_c=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 vc(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(!vc(a,o))return!1}return!0},vc=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=nc(n,ec),a=t.props||{},o=a.children,s=nc(a,tc);return r&&o?Hs(i,s)&&_c(r,o):!r&&!o&&Hs(i,s)}return!1},yc=function(e,t){var n=[],r={};return lc(e).forEach(function(e,i){if(mc(e))n.push(e);else if(e){var a=oc(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},bc=function(e){var t=e&&e.type;return t&&ac[t]?ac[t]:null},xc=function(e,t){return lc(t).indexOf(e)},Sc=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function Cc(){return Cc=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},Cc.apply(this,arguments)}function wc(e,t){if(e==null)return{};var n=Tc(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 Tc(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 Ec(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=wc(e,Sc),u=i||{width:n,height:r,x:0,y:0},d=xo(`recharts-surface`,a);return v.createElement(`svg`,Cc({},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 Dc=[`children`,`className`];function Oc(){return Oc=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},Oc.apply(this,arguments)}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}var jc=v.forwardRef(function(e,t){var n=e.children,r=e.className,i=kc(e,Dc),a=xo(`recharts-layer`,r);return v.createElement(`g`,Oc({className:a},Z(i,!0),{ref:t}),n)}),Mc=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})),Nc=o(((e,t)=>{var n=Mc();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})),Pc=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})),Fc=o(((e,t)=>{function n(e){return e.split(``)}t.exports=n})),Ic=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})),Lc=o(((e,t)=>{var n=Fc(),r=Pc(),i=Ic();function a(e){return r(e)?i(e):n(e)}t.exports=a})),Rc=o(((e,t)=>{var n=Nc(),r=Pc(),i=Lc(),a=ms();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})),zc=o(((e,t)=>{t.exports=Rc()(`toUpperCase`)})),Bc=Math.PI,Vc=2*Bc,Hc=1e-6,Uc=Vc-Hc;function Wc(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Gc(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return Wc;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 Kc(e,t,n,r){return e===n&&t===r}function qc(e){let t=Math.floor(e);if(!(t<=15))return Kc;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 Jc=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?Wc:Gc(e),this._equal=e==null?Kc:qc(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>Hc){if(!(Math.abs(u*s-c*l)>Hc)||!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((Bc-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>Hc&&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)>Hc||Math.abs(this._y1-l)>Hc)&&this._append`L${c},${l}`,n){if(d<0&&(d=d%Vc+Vc),d>Uc)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>Hc){let a=e+n*Math.cos(i),o=t+n*Math.sin(i);if(d>=Bc&&this._equal(c,l,a,o)){d/=2;let i=r+d;this._append`A${n},${n},0,${+(d>=Bc)},${u},${e+n*Math.cos(i)},${t+n*Math.sin(i)}`}this._append`A${n},${n},0,${+(d>=Bc)},${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._}};Jc.prototype;function Yc(e){return function(){return e}}var Xc=Math.cos,Zc=Math.sin,Qc=Math.sqrt,$c=1e-12,el=Math.PI;el/2;var tl=2*el;function nl(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 Jc(t)}Array.prototype.slice;function rl(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function il(e){this._context=e}il.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 al(e){return new il(e)}function ol(e){return e[0]}function sl(e){return e[1]}function cl(e,t){var n=Yc(!0),r=null,i=al,a=null,o=nl(s);e=typeof e==`function`?e:e===void 0?ol:Yc(e),t=typeof t==`function`?t:t===void 0?sl:Yc(t);function s(s){var c,l=(s=rl(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:Yc(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:Yc(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:Yc(!!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 ll(e,t,n){var r=null,i=Yc(!0),a=null,o=al,s=null,c=nl(l);e=typeof e==`function`?e:e===void 0?ol:Yc(+e),t=typeof t==`function`?t:Yc(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?sl:Yc(+n);function l(l){var u,d,f,p=(l=rl(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 cl().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:Yc(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:Yc(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:Yc(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:Yc(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:Yc(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:Yc(+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:Yc(!!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}dl(al);function ul(e){this._curve=e}ul.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 dl(e){function t(t){return new ul(e(t))}return t._curve=e,t}var fl=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 pl(e){return new fl(e,!0)}function ml(e){return new fl(e,!1)}Qc(3);var hl={draw(e,t){let n=Qc(t/el);e.moveTo(n,0),e.arc(0,0,n,0,tl)}},gl={draw(e,t){let n=Qc(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()}},_l=Qc(1/3),vl=_l*2,yl={draw(e,t){let n=Qc(t/vl),r=n*_l;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},bl={draw(e,t){let n=Qc(t),r=-n/2;e.rect(r,r,n,n)}},xl=.8908130915292852,Sl=Zc(el/10)/Zc(7*el/10),Cl=Zc(tl/10)*Sl,wl=-Xc(tl/10)*Sl,Tl={draw(e,t){let n=Qc(t*xl),r=Cl*n,i=wl*n;e.moveTo(0,-n),e.lineTo(r,i);for(let t=1;t<5;++t){let a=tl*t/5,o=Xc(a),s=Zc(a);e.lineTo(s*n,-o*n),e.lineTo(o*r-s*i,s*r+o*i)}e.closePath()}},El=Qc(3),Dl={draw(e,t){let n=-Qc(t/(El*3));e.moveTo(0,n*2),e.lineTo(-El*n,-n),e.lineTo(El*n,-n),e.closePath()}};Qc(3);var Ol=-.5,kl=Qc(3)/2,Al=1/Qc(12),jl=(Al/2+1)*3,Ml={draw(e,t){let n=Qc(t/jl),r=n/2,i=n*Al,a=r,o=n*Al+n,s=-a,c=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,c),e.lineTo(Ol*r-kl*i,kl*r+Ol*i),e.lineTo(Ol*a-kl*o,kl*a+Ol*o),e.lineTo(Ol*s-kl*c,kl*s+Ol*c),e.lineTo(Ol*r+kl*i,Ol*i-kl*r),e.lineTo(Ol*a+kl*o,Ol*o-kl*a),e.lineTo(Ol*s+kl*c,Ol*c-kl*s),e.closePath()}};function Nl(e,t){let n=null,r=nl(i);e=typeof e==`function`?e:Yc(e||hl),t=typeof t==`function`?t:Yc(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:Yc(t),i):e},i.size=function(e){return arguments.length?(t=typeof e==`function`?e:Yc(+e),i):t},i.context=function(e){return arguments.length?(n=e??null,i):n},i}function Pl(){}function Fl(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 Il(e){this._context=e}Il.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:Fl(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:Fl(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ll(e){return new Il(e)}function Rl(e){this._context=e}Rl.prototype={areaStart:Pl,areaEnd:Pl,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:Fl(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function zl(e){return new Rl(e)}function Bl(e){this._context=e}Bl.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:Fl(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Vl(e){return new Bl(e)}function Hl(e,t){this._basis=new Il(e),this._beta=t}Hl.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 Il(e):new Hl(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function Ul(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 Wl(e,t){this._context=e,this._k=(1-t)/6}Wl.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:Ul(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:Ul(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 Wl(e,t)}return n.tension=function(t){return e(+t)},n})(0);function Gl(e,t){this._context=e,this._k=(1-t)/6}Gl.prototype={areaStart:Pl,areaEnd:Pl,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:Ul(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 Gl(e,t)}return n.tension=function(t){return e(+t)},n})(0);function Kl(e,t){this._context=e,this._k=(1-t)/6}Kl.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:Ul(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 Kl(e,t)}return n.tension=function(t){return e(+t)},n})(0);function ql(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>$c){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>$c){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 Jl(e,t){this._context=e,this._alpha=t}Jl.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:ql(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 Jl(e,t):new Wl(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Yl(e,t){this._context=e,this._alpha=t}Yl.prototype={areaStart:Pl,areaEnd:Pl,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:ql(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 Yl(e,t):new Gl(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Xl(e,t){this._context=e,this._alpha=t}Xl.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:ql(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 Xl(e,t):new Kl(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Zl(e){this._context=e}Zl.prototype={areaStart:Pl,areaEnd:Pl,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 Ql(e){return new Zl(e)}function $l(e){return e<0?-1:1}function eu(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($l(a)+$l(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function tu(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function nu(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 ru(e){this._context=e}ru.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:nu(this,this._t0,tu(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,nu(this,tu(this,n=eu(this,e,t)),n);break;default:nu(this,this._t0,n=eu(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function iu(e){this._context=new au(e)}(iu.prototype=Object.create(ru.prototype)).point=function(e,t){ru.prototype.point.call(this,t,e)};function au(e){this._context=e}au.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 ou(e){return new ru(e)}function su(e){return new iu(e)}function cu(e){this._context=e}cu.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=lu(e),i=lu(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 lu(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 uu(e){return new cu(e)}function du(e,t){this._context=e,this._t=t}du.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 fu(e){return new du(e,.5)}function pu(e){return new du(e,0)}function mu(e){return new du(e,1)}function hu(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 gu(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function _u(e,t){return e[t]}function vu(e){let t=[];return t.key=e,t}function yu(){var e=Yc([]),t=gu,n=hu,r=_u;function i(i){var a=Array.from(e.apply(this,arguments),vu),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=rl(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:Yc(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:Yc(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?gu:typeof e==`function`?e:Yc(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??hu,i):n},i}function bu(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}hu(e,t)}}function xu(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}hu(e,t)}}function Su(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,hu(e,t)}}var Cu=l(zc());function wu(e){"@babel/helpers - typeof";return wu=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},wu(e)}var Tu=[`type`,`size`,`sizeType`];function Eu(){return Eu=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},Eu.apply(this,arguments)}function Du(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 Ou(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Du(Object(n),!0).forEach(function(t){ku(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Du(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ku(e,t,n){return t=Au(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Au(e){var t=ju(e,`string`);return wu(t)==`symbol`?t:t+``}function ju(e,t){if(wu(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(wu(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Mu(e,t){if(e==null)return{};var n=Nu(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 Nu(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 Pu={symbolCircle:hl,symbolCross:gl,symbolDiamond:yl,symbolSquare:bl,symbolStar:Tl,symbolTriangle:Dl,symbolWye:Ml},Fu=Math.PI/180,Iu=function(e){return Pu[`symbol${(0,Cu.default)(e)}`]||hl},Lu=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*Fu;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}},Ru=function(e,t){Pu[`symbol${(0,Cu.default)(e)}`]=t},zu=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=Ou(Ou({},Mu(e,Tu)),{},{type:n,size:i,sizeType:o}),c=function(){var e=Iu(n);return Nl().type(e).size(Lu(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`,Eu({},f,{className:xo(`recharts-symbols`,l),transform:`translate(${u}, ${d})`,d:c()})):null};zu.registerSymbol=Ru;function Bu(e){"@babel/helpers - typeof";return Bu=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},Bu(e)}function Vu(){return Vu=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},Vu.apply(this,arguments)}function Hu(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 Uu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Hu(Object(n),!0).forEach(function(t){ed(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Wu(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Gu(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,td(r.key),r)}}function Ku(e,t,n){return t&&Gu(e.prototype,t),n&&Gu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function qu(e,t,n){return t=Zu(t),Ju(e,Xu()?Reflect.construct(t,n||[],Zu(e).constructor):t.apply(e,n))}function Ju(e,t){if(t&&(Bu(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Yu(e)}function Yu(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function Xu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Xu=function(){return!!e})()}function Zu(e){return Zu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zu(e)}function Qu(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&&$u(e,t)}function $u(e,t){return $u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$u(e,t)}function ed(e,t,n){return t=td(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function td(e){var t=nd(e,`string`);return Bu(t)==`symbol`?t:t+``}function nd(e,t){if(Bu(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Bu(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var rd=32,id=function(e){function t(){return Wu(this,t),qu(this,t,arguments)}return Qu(t,e),Ku(t,[{key:`renderIcon`,value:function(e){var t=this.props.inactiveColor,n=rd/2,r=rd/6,i=rd/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:rd,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${rd}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,${rd/8}h${rd}v${rd*3/4}h${-rd}z`,className:`recharts-legend-icon`});if(v.isValidElement(e.legendIcon)){var o=Uu({},e);return delete o.legendIcon,v.cloneElement(e.legendIcon,o)}return v.createElement(zu,{fill:a,cx:n,cy:n,size:rd,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:rd,height:rd},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=xo(ed(ed({"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`,Vu({className:u,style:c,key:`legend-item-${n}`},Qs(e.props,t,n)),v.createElement(Ec,{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);ed(id,`displayName`,`Legend`),ed(id,`defaultProps`,{iconSize:14,layout:`horizontal`,align:`center`,verticalAlign:`middle`,inactiveColor:`#ccc`});var ad=o(((e,t)=>{var n=$o();function r(){this.__data__=new n,this.size=0}t.exports=r})),od=o(((e,t)=>{function n(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}t.exports=n})),sd=o(((e,t)=>{function n(e){return this.__data__.get(e)}t.exports=n})),cd=o(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),ld=o(((e,t)=>{var n=$o(),r=es(),i=cs(),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})),ud=o(((e,t)=>{var n=$o(),r=ad(),i=od(),a=sd(),o=cd(),s=ld();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})),dd=o(((e,t)=>{function n(e){return this.__data__.set(e,`__lodash_hash_undefined__`),this}t.exports=n})),fd=o(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),pd=o(((e,t)=>{var n=cs(),r=dd(),i=fd();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})),md=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})),hd=o(((e,t)=>{function n(e,t){return e.has(t)}t.exports=n})),gd=o(((e,t)=>{var n=pd(),r=md(),i=hd(),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})),_d=o(((e,t)=>{t.exports=wo().Uint8Array})),vd=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})),yd=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})),bd=o(((e,t)=>{var n=To(),r=_d(),i=qo(),a=gd(),o=vd(),s=yd(),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})),xd=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})),Sd=o(((e,t)=>{var n=xd(),r=So();function i(e,t,i){var a=t(e);return r(e)?a:n(a,i(e))}t.exports=i})),Cd=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})),wd=o(((e,t)=>{function n(){return[]}t.exports=n})),Td=o(((e,t)=>{var n=Cd(),r=wd(),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})),Ed=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})),Dd=o(((e,t)=>{var n=Oo(),r=ko(),i=`[object Arguments]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),Od=o(((e,t)=>{var n=Dd(),r=ko(),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`)}})),kd=o(((e,t)=>{function n(){return!1}t.exports=n})),Ad=o(((e,t)=>{var n=wo(),r=kd(),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})),jd=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})),Md=o(((e,t)=>{function n(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=9007199254740991}t.exports=n})),Nd=o(((e,t)=>{var n=Oo(),r=Md(),i=ko(),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})),Pd=o(((e,t)=>{function n(e){return function(t){return e(t)}}t.exports=n})),Fd=o(((e,t)=>{var n=Co(),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{}}()})),Id=o(((e,t)=>{var n=Nd(),r=Pd(),i=Fd(),a=i&&i.isTypedArray;t.exports=a?r(a):n})),Ld=o(((e,t)=>{var n=Ed(),r=Od(),i=So(),a=Ad(),o=jd(),s=Id(),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})),Rd=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})),zd=o(((e,t)=>{function n(e,t){return function(n){return e(t(n))}}t.exports=n})),Bd=o(((e,t)=>{t.exports=zd()(Object.keys,Object)})),Vd=o(((e,t)=>{var n=Rd(),r=Bd(),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})),Hd=o(((e,t)=>{var n=No(),r=Md();function i(e){return e!=null&&r(e.length)&&!n(e)}t.exports=i})),Ud=o(((e,t)=>{var n=Ld(),r=Vd(),i=Hd();function a(e){return i(e)?n(e):r(e)}t.exports=a})),Wd=o(((e,t)=>{var n=Sd(),r=Td(),i=Ud();function a(e){return n(e,i,r)}t.exports=a})),Gd=o(((e,t)=>{var n=Wd(),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})),Kd=o(((e,t)=>{t.exports=Ro()(wo(),`DataView`)})),qd=o(((e,t)=>{t.exports=Ro()(wo(),`Promise`)})),Jd=o(((e,t)=>{t.exports=Ro()(wo(),`Set`)})),Yd=o(((e,t)=>{t.exports=Ro()(wo(),`WeakMap`)})),Xd=o(((e,t)=>{var n=Kd(),r=es(),i=qd(),a=Jd(),o=Yd(),s=Oo(),c=Io(),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})),Zd=o(((e,t)=>{var n=ud(),r=gd(),i=bd(),a=Gd(),o=Xd(),s=So(),c=Ad(),l=Id(),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})),Qd=o(((e,t)=>{var n=Zd(),r=ko();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})),$d=o(((e,t)=>{var n=ud(),r=Qd(),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})),ef=o(((e,t)=>{var n=Mo();function r(e){return e===e&&!n(e)}t.exports=r})),tf=o(((e,t)=>{var n=ef(),r=Ud();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})),nf=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})),rf=o(((e,t)=>{var n=$d(),r=tf(),i=nf();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})),af=o(((e,t)=>{function n(e,t){return e!=null&&t in Object(e)}t.exports=n})),of=o(((e,t)=>{var n=hs(),r=Od(),i=So(),a=jd(),o=Md(),s=gs();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})),sf=o(((e,t)=>{var n=af(),r=of();function i(e,t){return e!=null&&r(e,t,n)}t.exports=i})),cf=o(((e,t)=>{var n=Qd(),r=vs(),i=sf(),a=jo(),o=ef(),s=nf(),c=gs(),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})),lf=o(((e,t)=>{function n(e){return e}t.exports=n})),uf=o(((e,t)=>{function n(e){return function(t){return t?.[e]}}t.exports=n})),df=o(((e,t)=>{var n=_s();function r(e){return function(t){return n(t,e)}}t.exports=r})),ff=o(((e,t)=>{var n=uf(),r=df(),i=jo(),a=gs();function o(e){return i(e)?n(a(e)):r(e)}t.exports=o})),pf=o(((e,t)=>{var n=rf(),r=cf(),i=lf(),a=So(),o=ff();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})),mf=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})),hf=o(((e,t)=>{function n(e){return e!==e}t.exports=n})),gf=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})),_f=o(((e,t)=>{var n=mf(),r=hf(),i=gf();function a(e,t,a){return t===t?i(e,t,a):n(e,r,a)}t.exports=a})),vf=o(((e,t)=>{var n=_f();function r(e,t){return!!(e!=null&&e.length)&&n(e,t,0)>-1}t.exports=r})),yf=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})),bf=o(((e,t)=>{function n(){}t.exports=n})),xf=o(((e,t)=>{var n=Jd(),r=bf(),i=yd();t.exports=n&&1/i(new n([,-0]))[1]==1/0?function(e){return new n(e)}:r})),Sf=o(((e,t)=>{var n=pd(),r=vf(),i=yf(),a=hd(),o=xf(),s=yd(),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})),Cf=l(o(((e,t)=>{var n=pf(),r=Sf();function i(e,t){return e&&e.length?r(e,n(t,2)):[]}t.exports=i}))());function wf(e,t,n){return t===!0?(0,Cf.default)(e,n):(0,X.default)(t)?(0,Cf.default)(e,t):e}function Tf(e){"@babel/helpers - typeof";return Tf=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},Tf(e)}var Ef=[`ref`];function Df(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 Of(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Df(Object(n),!0).forEach(function(t){zf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Df(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function kf(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Af(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,Bf(r.key),r)}}function jf(e,t,n){return t&&Af(e.prototype,t),n&&Af(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Mf(e,t,n){return t=If(t),Nf(e,Ff()?Reflect.construct(t,n||[],If(e).constructor):t.apply(e,n))}function Nf(e,t){if(t&&(Tf(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Pf(e)}function Pf(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function Ff(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ff=function(){return!!e})()}function If(e){return If=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},If(e)}function Lf(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&&Rf(e,t)}function Rf(e,t){return Rf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Rf(e,t)}function zf(e,t,n){return t=Bf(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bf(e){var t=Vf(e,`string`);return Tf(t)==`symbol`?t:t+``}function Vf(e,t){if(Tf(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Tf(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(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(e){return e.value}function Gf(e,t){if(v.isValidElement(e))return v.cloneElement(e,t);if(typeof e==`function`)return v.createElement(e,t);t.ref;var n=Hf(t,Ef);return v.createElement(id,n)}var Kf=1,qf=function(e){function t(){var e;kf(this,t);var n=[...arguments];return e=Mf(this,t,[].concat(n)),zf(e,`lastBoundingBox`,{width:-1,height:-1}),e}return Lf(t,e),jf(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)>Kf||Math.abs(t.height-this.lastBoundingBox.height)>Kf)&&(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?Of({},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 Of(Of({},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=Of(Of({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}},Gf(n,Of(Of({},this.props),{},{payload:wf(s,o,Wf)})))}}],[{key:`getWithHeight`,value:function(e,t){var n=Of(Of({},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);zf(qf,`displayName`,`Legend`),zf(qf,`defaultProps`,{iconSize:14,layout:`horizontal`,align:`center`,verticalAlign:`bottom`});var Jf=o(((e,t)=>{var n=To(),r=Od(),i=So(),a=n?n.isConcatSpreadable:void 0;function o(e){return i(e)||r(e)||!!(a&&e&&e[a])}t.exports=o})),Yf=o(((e,t)=>{var n=xd(),r=Jf();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})),Xf=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})),Zf=o(((e,t)=>{t.exports=Xf()()})),Qf=o(((e,t)=>{var n=Zf(),r=Ud();function i(e,t){return e&&n(e,t,r)}t.exports=i})),$f=o(((e,t)=>{var n=Hd();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})),ep=o(((e,t)=>{var n=Qf();t.exports=$f()(n)})),tp=o(((e,t)=>{var n=ep(),r=Hd();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})),np=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})),rp=o(((e,t)=>{var n=Ao();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})),ip=o(((e,t)=>{var n=rp();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})),ap=o(((e,t)=>{var n=fs(),r=_s(),i=pf(),a=tp(),o=np(),s=Pd(),c=ip(),l=lf(),u=So();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})),op=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})),sp=o(((e,t)=>{var n=op(),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})),cp=o(((e,t)=>{function n(e){return function(){return e}}t.exports=n})),lp=o(((e,t)=>{var n=Ro();t.exports=function(){try{var e=n(Object,`defineProperty`);return e({},``,{}),e}catch{}}()})),up=o(((e,t)=>{var n=cp(),r=lp(),i=lf();t.exports=r?function(e,t){return r(e,`toString`,{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i})),dp=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})),fp=o(((e,t)=>{var n=up();t.exports=dp()(n)})),pp=o(((e,t)=>{var n=lf(),r=sp(),i=fp();function a(e,t){return i(r(e,t,n),e+``)}t.exports=a})),mp=o(((e,t)=>{var n=qo(),r=Hd(),i=jd(),a=Mo();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})),hp=l(o(((e,t)=>{var n=Yf(),r=ap(),i=pp(),a=mp();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 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 _p(){return _p=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},_p.apply(this,arguments)}function vp(e,t){return Cp(e)||Sp(e,t)||bp(e,t)||yp()}function yp(){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 bp(e,t){if(e){if(typeof e==`string`)return xp(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 xp(e,t)}}function xp(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 Sp(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 Cp(e){if(Array.isArray(e))return e}function wp(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 Tp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?wp(Object(n),!0).forEach(function(t){Ep(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wp(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ep(e,t,n){return t=Dp(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dp(e){var t=Op(e,`string`);return gp(t)==`symbol`?t:t+``}function Op(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 kp(e){return Array.isArray(e)&&Ms(e[0])&&Ms(e[1])?e.join(` ~ `):e}var Ap=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,hp.default)(l,d):l).map(function(e,t){if(e.type===`none`)return null;var r=Tp({display:`block`,paddingTop:4,paddingBottom:4,color:e.color||`#000`},o),i=e.formatter||u||kp,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=vp(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},Ms(d)?v.createElement(`span`,{className:`recharts-tooltip-item-name`},d):null,Ms(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=Tp({margin:0,padding:10,backgroundColor:`#fff`,border:`1px solid #ccc`,whiteSpace:`nowrap`},i),x=Tp({margin:0},c),S=!(0,J.default)(m),C=S?m:``,w=xo(`recharts-default-tooltip`,f),T=xo(`recharts-tooltip-label`,p);S&&h&&l!=null&&(C=h(m,l));var E=_?{role:`status`,"aria-live":`assertive`}:{};return v.createElement(`div`,_p({className:w,style:b},E),v.createElement(`p`,{className:T,style:x},v.isValidElement(C)?C:`${C}`),y())};function jp(e){"@babel/helpers - typeof";return jp=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},jp(e)}function Mp(e,t,n){return t=Np(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Np(e){var t=Pp(e,`string`);return jp(t)==`symbol`?t:t+``}function Pp(e,t){if(jp(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(jp(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Fp=`recharts-tooltip-wrapper`,Ip={visibility:`hidden`};function Lp(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return xo(Fp,Mp(Mp(Mp(Mp({},`${Fp}-right`,Y(n)&&t&&Y(t.x)&&n>=t.x),`${Fp}-left`,Y(n)&&t&&Y(t.x)&&n<t.x),`${Fp}-bottom`,Y(r)&&t&&Y(t.y)&&r>=t.y),`${Fp}-top`,Y(r)&&t&&Y(t.y)&&r<t.y))}function Rp(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 zp(e){var t=e.translateX,n=e.translateY;return{transform:e.useTranslate3d?`translate3d(${t}px, ${n}px, 0)`:`translate(${t}px, ${n}px)`}}function Bp(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=Rp({allowEscapeViewBox:t,coordinate:n,key:`x`,offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),d=Rp({allowEscapeViewBox:t,coordinate:n,key:`y`,offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),l=zp({translateX:u,translateY:d,useTranslate3d:s})):l=Ip,{cssProperties:l,cssClasses:Lp({translateX:u,translateY:d,coordinate:n})}}function Vp(e){"@babel/helpers - typeof";return Vp=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},Vp(e)}function Hp(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 Up(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Hp(Object(n),!0).forEach(function(t){em(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hp(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Wp(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Gp(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,tm(r.key),r)}}function Kp(e,t,n){return t&&Gp(e.prototype,t),n&&Gp(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function qp(e,t,n){return t=Zp(t),Jp(e,Xp()?Reflect.construct(t,n||[],Zp(e).constructor):t.apply(e,n))}function Jp(e,t){if(t&&(Vp(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Yp(e)}function Yp(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function Xp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Xp=function(){return!!e})()}function Zp(e){return Zp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zp(e)}function Qp(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&&$p(e,t)}function $p(e,t){return $p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$p(e,t)}function em(e,t,n){return t=tm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tm(e){var t=nm(e,`string`);return Vp(t)==`symbol`?t:t+``}function nm(e,t){if(Vp(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Vp(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var rm=1,im=function(e){function t(){var e;Wp(this,t);var n=[...arguments];return e=qp(this,t,[].concat(n)),em(e,`state`,{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),em(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 Qp(t,e),Kp(t,[{key:`updateBBox`,value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.state.lastBoundingBox.width)>rm||Math.abs(e.height-this.state.lastBoundingBox.height)>rm)&&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=Bp({allowEscapeViewBox:r,coordinate:s,offsetTopLeft:u,position:d,reverseDirection:f,tooltipBox:this.state.lastBoundingBox,useTranslate3d:p,viewBox:m}),_=g.cssClasses,y=g.cssProperties,b=Up(Up({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),am={isSsr:function(){return!(typeof window<`u`&&window.document&&window.document.createElement&&window.setTimeout)}(),get:function(e){return am[e]},set:function(e,t){if(typeof e==`string`)am[e]=t;else{var n=Object.keys(e);n&&n.length&&n.forEach(function(t){am[t]=e[t]})}}};function om(e){"@babel/helpers - typeof";return om=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},om(e)}function sm(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 cm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?sm(Object(n),!0).forEach(function(t){ym(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return 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,bm(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,n){return t=gm(t),pm(e,hm()?Reflect.construct(t,n||[],gm(e).constructor):t.apply(e,n))}function pm(e,t){if(t&&(om(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return mm(e)}function mm(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function hm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hm=function(){return!!e})()}function gm(e){return gm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},gm(e)}function _m(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&&vm(e,t)}function vm(e,t){return vm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vm(e,t)}function ym(e,t,n){return t=bm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bm(e){var t=xm(e,`string`);return om(t)==`symbol`?t:t+``}function xm(e,t){if(om(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(om(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Sm(e){return e.dataKey}function Cm(e,t){return v.isValidElement(e)?v.cloneElement(e,t):typeof e==`function`?v.createElement(e,t):v.createElement(Ap,t)}var wm=function(e){function t(){return lm(this,t),fm(this,t,arguments)}return _m(t,e),dm(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=wf(d.filter(function(t){return t.value!=null&&(t.hide!==!0||e.props.includeHidden)}),f,Sm));var b=y.length>0;return v.createElement(im,{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:_},Cm(o,cm(cm({},this.props),{},{payload:y})))}}])}(v.PureComponent);ym(wm,`displayName`,`Tooltip`),ym(wm,`defaultProps`,{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:`ease`,contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!am.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 Tm=o(((e,t)=>{var n=wo();t.exports=function(){return n.Date.now()}})),Em=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})),Dm=o(((e,t)=>{var n=Em(),r=/^\s+/;function i(e){return e&&e.slice(0,n(e)+1).replace(r,``)}t.exports=i})),Om=o(((e,t)=>{var n=Dm(),r=Mo(),i=Ao(),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})),km=o(((e,t)=>{var n=Mo(),r=Tm(),i=Om(),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})),Am=l(o(((e,t)=>{var n=km(),r=Mo(),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 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 Mm(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 Nm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Mm(Object(n),!0).forEach(function(t){Pm(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Pm(e,t,n){return t=Fm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fm(e){var t=Im(e,`string`);return jm(t)==`symbol`?t:t+``}function Im(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 Lm(e,t){return Hm(e)||Vm(e,t)||zm(e,t)||Rm()}function Rm(){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 zm(e,t){if(e){if(typeof e==`string`)return Bm(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 Bm(e,t)}}function Bm(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 Vm(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 Hm(e){if(Array.isArray(e))return e}var Um=(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=Lm((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,Am.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;As(o)||As(c);var r=As(o)?e:o,i=As(c)?t:c;n&&n>0&&(r?i=r/n:i&&(r=i*n),f&&i>f&&(i=f));var a=!Array.isArray(p)&&oc(p.type).endsWith(`Chart`);return v.Children.map(p,function(e){return v.isValidElement(e)?(0,v.cloneElement)(e,Nm({width:r,height:i},a?{style:Nm({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:xo(`recharts-responsive-container`,_),style:Nm(Nm({},x),{},{width:o,height:c,minWidth:u,minHeight:d,maxHeight:f}),ref:S},O)}),Wm=function(e){return null};Wm.displayName=`Cell`;function Gm(e){"@babel/helpers - typeof";return Gm=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},Gm(e)}function Km(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 qm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Km(Object(n),!0).forEach(function(t){Jm(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Km(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Jm(e,t,n){return t=Ym(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ym(e){var t=Xm(e,`string`);return Gm(t)==`symbol`?t:t+``}function Xm(e,t){if(Gm(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Gm(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Zm={widthCache:{},cacheCount:0},Qm=2e3,$m={position:`absolute`,top:`-20000px`,left:0,padding:0,margin:0,border:`none`,whiteSpace:`pre`},eh=`recharts_measurement_span`;function th(e){var t=qm({},e);return Object.keys(t).forEach(function(e){t[e]||delete t[e]}),t}var nh=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e==null||am.isSsr)return{width:0,height:0};var n=th(t),r=JSON.stringify({text:e,copyStyle:n});if(Zm.widthCache[r])return Zm.widthCache[r];try{var i=document.getElementById(eh);i||(i=document.createElement(`span`),i.setAttribute(`id`,eh),i.setAttribute(`aria-hidden`,`true`),document.body.appendChild(i));var a=qm(qm({},$m),n);Object.assign(i.style,a),i.textContent=`${e}`;var o=i.getBoundingClientRect(),s={width:o.width,height:o.height};return Zm.widthCache[r]=s,++Zm.cacheCount>Qm&&(Zm.cacheCount=0,Zm.widthCache={}),s}catch{return{width:0,height:0}}},rh=function(e){return{top:e.top+window.scrollY-document.documentElement.clientTop,left:e.left+window.scrollX-document.documentElement.clientLeft}};function ih(e){"@babel/helpers - typeof";return ih=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},ih(e)}function ah(e,t){return uh(e)||lh(e,t)||sh(e,t)||oh()}function oh(){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 sh(e,t){if(e){if(typeof e==`string`)return ch(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 ch(e,t)}}function ch(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 lh(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 uh(e){if(Array.isArray(e))return e}function dh(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function fh(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,mh(r.key),r)}}function ph(e,t,n){return t&&fh(e.prototype,t),n&&fh(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function mh(e){var t=hh(e,`string`);return ih(t)==`symbol`?t:t+``}function hh(e,t){if(ih(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(ih(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var gh=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,_h=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,vh=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,yh=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,bh={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},xh=Object.keys(bh),Sh=`NaN`;function Ch(e,t){return e*bh[t]}var wh=function(){function e(t,n){dh(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=``),n!==``&&!vh.test(n)&&(this.num=NaN,this.unit=``),xh.includes(n)&&(this.num=Ch(t,n),this.unit=`px`)}return ph(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=ah(yh.exec(t)??[],3),r=n[1],i=n[2];return new e(parseFloat(r),i??``)}}])}();function Th(e){if(e.includes(Sh))return Sh;for(var t=e;t.includes(`*`)||t.includes(`/`);){var n=ah(gh.exec(t)??[],4),r=n[1],i=n[2],a=n[3],o=wh.parse(r??``),s=wh.parse(a??``),c=i===`*`?o.multiply(s):o.divide(s);if(c.isNaN())return Sh;t=t.replace(gh,c.toString())}for(;t.includes(`+`)||/.-\d+(?:\.\d+)?/.test(t);){var l=ah(_h.exec(t)??[],4),u=l[1],d=l[2],f=l[3],p=wh.parse(u??``),m=wh.parse(f??``),h=d===`+`?p.add(m):p.subtract(m);if(h.isNaN())return Sh;t=t.replace(_h,h.toString())}return t}var Eh=/\(([^()]*)\)/;function Dh(e){for(var t=e;t.includes(`(`);){var n=ah(Eh.exec(t),2)[1];t=t.replace(Eh,Th(n))}return t}function Oh(e){var t=e.replace(/\s+/g,``);return t=Dh(t),t=Th(t),t}function kh(e){try{return Oh(e)}catch{return Sh}}function Ah(e){var t=kh(e.slice(5,-1));return t===Sh?``:t}var jh=[`x`,`y`,`lineHeight`,`capHeight`,`scaleToFit`,`textAnchor`,`verticalAnchor`,`fill`],Mh=[`dx`,`dy`,`angle`,`className`,`breakAll`];function Nh(){return Nh=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},Nh.apply(this,arguments)}function Ph(e,t){if(e==null)return{};var n=Fh(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 Fh(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 Ih(e,t){return Vh(e)||Bh(e,t)||Rh(e,t)||Lh()}function Lh(){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 Rh(e,t){if(e){if(typeof e==`string`)return zh(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 zh(e,t)}}function zh(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 Bh(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 Vh(e){if(Array.isArray(e))return e}var Hh=/[ \f\n\r\t\v\u2028\u2029]+/,Uh=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(Hh)),{wordsWithComputedWidth:i.map(function(e){return{word:e,width:nh(e,r).width}}),spaceWidth:n?0:nh(`\xA0`,r).width}}catch{return null}},Wh=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=Uh({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=Ih(h(b-1),2),S=x[0],C=x[1],w=Ih(h(b),1)[0];if(!S&&!w&&(g=b+1),S&&w&&(_=b-1),!S&&w){y=C;break}v++}return y||f},Gh=function(e){return[{words:(0,J.default)(e)?[]:e.toString().split(Hh)}]},Kh=function(e){var t=e.width,n=e.scaleToFit,r=e.children,i=e.style,a=e.breakAll,o=e.maxLines;if((t||n)&&!am.isSsr){var s,c,l=Uh({breakAll:a,children:r,style:i});if(l){var u=l.wordsWithComputedWidth,d=l.spaceWidth;s=u,c=d}else return Gh(r);return Wh({breakAll:a,children:r,maxLines:o,style:i},s,c,t,n)}return Gh(r)},qh=`#808080`,Jh=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?qh:h,_=Ph(e,jh),y=(0,v.useMemo)(function(){return Kh({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=Ph(_,Mh);if(!Ms(n)||!Ms(i))return null;var E=n+(Y(b)?b:0),D=i+(Y(x)?x:0),O;switch(m){case`start`:O=Ah(`calc(${c})`);break;case`middle`:O=Ah(`calc(${(y.length-1)/2} * -${o} + (${c} / 2))`);break;default:O=Ah(`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`,Nh({},Z(T,!0),{x:E,y:D,className:xo(`recharts-text`,C),textAnchor:f,fill:g.includes(`url`)?qh: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 Yh(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Xh(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Zh(e){let t,n,r;e.length===2?(t=e===Yh||e===Xh?e:Qh,n=e,r=e):(t=Yh,n=(t,n)=>Yh(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 Qh(){return 0}function $h(e){return e===null?NaN:+e}function*eg(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 tg=Zh(Yh),ng=tg.right;tg.left,Zh($h).center;var rg=class extends Map{constructor(e,t=sg){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(ig(this,e))}has(e){return super.has(ig(this,e))}set(e,t){return super.set(ag(this,e),t)}delete(e){return super.delete(og(this,e))}};function ig({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function ag({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function og({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function sg(e){return typeof e==`object`&&e?e.valueOf():e}function cg(e=Yh){if(e===Yh)return lg;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 lg(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:+(e>t))}Array.prototype.slice;var ug=Math.sqrt(50),dg=Math.sqrt(10),fg=Math.sqrt(2);function pg(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=ug?10:a>=dg?5:a>=fg?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?pg(e,t,n*2):[s,c,l]}function mg(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?pg(t,e,n):pg(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 hg(e,t,n){return t=+t,e=+e,n=+n,pg(e,t,n)[2]}function gg(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?hg(t,e,n):hg(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function _g(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 vg(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 yg(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?lg:cg(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));yg(e,t,u,d,i)}let a=e[t],o=n,s=r;for(bg(e,n,t),i(e[r],a)>0&&bg(e,n,r);o<s;){for(bg(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[n],a)===0?bg(e,n,s):(++s,bg(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function bg(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}function xg(e,t,n){if(e=Float64Array.from(eg(e,n)),(r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return vg(e);if(t>=1)return _g(e);var r,i=(r-1)*t,a=Math.floor(i),o=_g(yg(e,a).subarray(0,a+1));return o+(vg(e.subarray(a+1))-o)*(i-a)}}function Sg(e,t,n=$h){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 Cg(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 wg(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Tg(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Eg(){}var Dg=.7,Og=1/Dg,kg=`\\s*([+-]?\\d+)\\s*`,Ag=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,jg=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,Mg=/^#([0-9a-f]{3,8})$/,Ng=RegExp(`^rgb\\(${kg},${kg},${kg}\\)$`),Pg=RegExp(`^rgb\\(${jg},${jg},${jg}\\)$`),Fg=RegExp(`^rgba\\(${kg},${kg},${kg},${Ag}\\)$`),Ig=RegExp(`^rgba\\(${jg},${jg},${jg},${Ag}\\)$`),Lg=RegExp(`^hsl\\(${Ag},${jg},${jg}\\)$`),Rg=RegExp(`^hsla\\(${Ag},${jg},${jg},${Ag}\\)$`),zg={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};wg(Eg,Wg,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Bg,formatHex:Bg,formatHex8:Vg,formatHsl:Hg,formatRgb:Ug,toString:Ug});function Bg(){return this.rgb().formatHex()}function Vg(){return this.rgb().formatHex8()}function Hg(){return r_(this).formatHsl()}function Ug(){return this.rgb().formatRgb()}function Wg(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=Mg.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Gg(t):n===3?new Yg(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Kg(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Kg(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=Ng.exec(e))?new Yg(t[1],t[2],t[3],1):(t=Pg.exec(e))?new Yg(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Fg.exec(e))?Kg(t[1],t[2],t[3],t[4]):(t=Ig.exec(e))?Kg(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Lg.exec(e))?n_(t[1],t[2]/100,t[3]/100,1):(t=Rg.exec(e))?n_(t[1],t[2]/100,t[3]/100,t[4]):zg.hasOwnProperty(e)?Gg(zg[e]):e===`transparent`?new Yg(NaN,NaN,NaN,0):null}function Gg(e){return new Yg(e>>16&255,e>>8&255,e&255,1)}function Kg(e,t,n,r){return r<=0&&(e=t=n=NaN),new Yg(e,t,n,r)}function qg(e){return e instanceof Eg||(e=Wg(e)),e?(e=e.rgb(),new Yg(e.r,e.g,e.b,e.opacity)):new Yg}function Jg(e,t,n,r){return arguments.length===1?qg(e):new Yg(e,t,n,r??1)}function Yg(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}wg(Yg,Jg,Tg(Eg,{brighter(e){return e=e==null?Og:Og**+e,new Yg(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Dg:Dg**+e,new Yg(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Yg(e_(this.r),e_(this.g),e_(this.b),$g(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:Xg,formatHex:Xg,formatHex8:Zg,formatRgb:Qg,toString:Qg}));function Xg(){return`#${t_(this.r)}${t_(this.g)}${t_(this.b)}`}function Zg(){return`#${t_(this.r)}${t_(this.g)}${t_(this.b)}${t_((isNaN(this.opacity)?1:this.opacity)*255)}`}function Qg(){let e=$g(this.opacity);return`${e===1?`rgb(`:`rgba(`}${e_(this.r)}, ${e_(this.g)}, ${e_(this.b)}${e===1?`)`:`, ${e})`}`}function $g(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function e_(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function t_(e){return e=e_(e),(e<16?`0`:``)+e.toString(16)}function n_(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new a_(e,t,n,r)}function r_(e){if(e instanceof a_)return new a_(e.h,e.s,e.l,e.opacity);if(e instanceof Eg||(e=Wg(e)),!e)return new a_;if(e instanceof a_)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 a_(o,s,c,e.opacity)}function i_(e,t,n,r){return arguments.length===1?r_(e):new a_(e,t,n,r??1)}function a_(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}wg(a_,i_,Tg(Eg,{brighter(e){return e=e==null?Og:Og**+e,new a_(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Dg:Dg**+e,new a_(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 Yg(c_(e>=240?e-240:e+120,i,r),c_(e,i,r),c_(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new a_(o_(this.h),s_(this.s),s_(this.l),$g(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=$g(this.opacity);return`${e===1?`hsl(`:`hsla(`}${o_(this.h)}, ${s_(this.s)*100}%, ${s_(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function o_(e){return e=(e||0)%360,e<0?e+360:e}function s_(e){return Math.max(0,Math.min(1,e||0))}function c_(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 l_=Math.PI/180,u_=180/Math.PI,d_=18,f_=.96422,p_=1,m_=.82521,h_=4/29,g_=6/29,__=3*g_*g_,v_=g_*g_*g_;function y_(e){if(e instanceof x_)return new x_(e.l,e.a,e.b,e.opacity);if(e instanceof O_)return k_(e);e instanceof Yg||(e=qg(e));var t=T_(e.r),n=T_(e.g),r=T_(e.b),i=S_((.2225045*t+.7168786*n+.0606169*r)/p_),a,o;return t===n&&n===r?a=o=i:(a=S_((.4360747*t+.3850649*n+.1430804*r)/f_),o=S_((.0139322*t+.0971045*n+.7141733*r)/m_)),new x_(116*i-16,500*(a-i),200*(i-o),e.opacity)}function b_(e,t,n,r){return arguments.length===1?y_(e):new x_(e,t,n,r??1)}function x_(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}wg(x_,b_,Tg(Eg,{brighter(e){return new x_(this.l+d_*(e??1),this.a,this.b,this.opacity)},darker(e){return new x_(this.l-d_*(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=f_*C_(t),e=p_*C_(e),n=m_*C_(n),new Yg(w_(3.1338561*t-1.6168667*e-.4906146*n),w_(-.9787684*t+1.9161415*e+.033454*n),w_(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function S_(e){return e>v_?e**(1/3):e/__+h_}function C_(e){return e>g_?e*e*e:__*(e-h_)}function w_(e){return 255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055)}function T_(e){return(e/=255)<=.04045?e/12.92:((e+.055)/1.055)**2.4}function E_(e){if(e instanceof O_)return new O_(e.h,e.c,e.l,e.opacity);if(e instanceof x_||(e=y_(e)),e.a===0&&e.b===0)return new O_(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*u_;return new O_(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function D_(e,t,n,r){return arguments.length===1?E_(e):new O_(e,t,n,r??1)}function O_(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function k_(e){if(isNaN(e.h))return new x_(e.l,0,0,e.opacity);var t=e.h*l_;return new x_(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}wg(O_,D_,Tg(Eg,{brighter(e){return new O_(this.h,this.c,this.l+d_*(e??1),this.opacity)},darker(e){return new O_(this.h,this.c,this.l-d_*(e??1),this.opacity)},rgb(){return k_(this).rgb()}}));var A_=-.14861,j_=1.78277,M_=-.29227,N_=-.90649,P_=1.97294,F_=P_*N_,I_=P_*j_,L_=j_*M_-N_*A_;function R_(e){if(e instanceof B_)return new B_(e.h,e.s,e.l,e.opacity);e instanceof Yg||(e=qg(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(L_*r+F_*t-I_*n)/(L_+F_-I_),a=r-i,o=(P_*(n-i)-M_*a)/N_,s=Math.sqrt(o*o+a*a)/(P_*i*(1-i)),c=s?Math.atan2(o,a)*u_-120:NaN;return new B_(c<0?c+360:c,s,i,e.opacity)}function z_(e,t,n,r){return arguments.length===1?R_(e):new B_(e,t,n,r??1)}function B_(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}wg(B_,z_,Tg(Eg,{brighter(e){return e=e==null?Og:Og**+e,new B_(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Dg:Dg**+e,new B_(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*l_,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new Yg(255*(t+n*(A_*r+j_*i)),255*(t+n*(M_*r+N_*i)),255*(t+P_*r*n),this.opacity)}}));var V_=e=>()=>e;function H_(e,t){return function(n){return e+n*t}}function U_(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function W_(e,t){var n=t-e;return n?H_(e,n>180||n<-180?n-360*Math.round(n/360):n):V_(isNaN(e)?t:e)}function G_(e){return(e=+e)==1?K_:function(t,n){return n-t?U_(t,n,e):V_(isNaN(t)?n:t)}}function K_(e,t){var n=t-e;return n?H_(e,n):V_(isNaN(e)?t:e)}var q_=(function e(t){var n=G_(t);function r(e,t){var r=n((e=Jg(e)).r,(t=Jg(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=K_(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 J_(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 Y_(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function X_(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]=av(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 Z_(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Q_(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function $_(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]=av(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var ev=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,tv=new RegExp(ev.source,`g`);function nv(e){return function(){return e}}function rv(e){return function(t){return e(t)+``}}function iv(e,t){var n=ev.lastIndex=tv.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=ev.exec(e))&&(i=tv.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:Q_(r,i)})),n=tv.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?rv(c[0].x):nv(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 av(e,t){var n=typeof t,r;return t==null||n===`boolean`?V_(t):(n===`number`?Q_:n===`string`?(r=Wg(t))?(t=r,q_):iv:t instanceof Wg?q_:t instanceof Date?Z_:Y_(t)?J_:Array.isArray(t)?X_:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?$_:Q_)(e,t)}function ov(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var sv=1e-12;function cv(e){return((e=Math.exp(e))+1/e)/2}function lv(e){return((e=Math.exp(e))-1/e)/2}function uv(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<sv)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=cv(y),c=s/(n*g)*(i*uv(t*r+y)-lv(y));return[a+c*d,o+c*f,s*i/cv(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 dv(e){return(function t(n){n=+n;function r(t,r){var i=e((t=z_(t)).h,(r=z_(r)).h),a=K_(t.s,r.s),o=K_(t.l,r.l),s=K_(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)}dv(W_),dv(K_);function fv(e,t){t===void 0&&(t=e,e=av);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 pv(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function mv(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 hv(e){return e=mv(Math.abs(e)),e?e[1]:NaN}function gv(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 _v(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var vv=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function yv(e){if(!(t=vv.exec(e)))throw Error(`invalid format: `+e);var t;return new bv({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]})}yv.prototype=bv.prototype;function bv(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+``}bv.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 xv(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 Sv;function Cv(e,t){var n=mv(e,t);if(!n)return Sv=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(Sv=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`)+mv(e,Math.max(0,t+a-1))[0]}function wv(e,t){var n=mv(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 Tv={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:pv,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)=>wv(e*100,t),r:wv,s:Cv,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Ev(e){return e}var Dv=Array.prototype.map,Ov=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function kv(e){var t=e.grouping===void 0||e.thousands===void 0?Ev:gv(Dv.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?Ev:_v(Dv.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=yv(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`):Tv[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=Tv[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=xv(e)),w&&+e==0&&f!==`+`&&(w=!1),n=(w?f===`(`?f:s:f===`-`||f===`(`?``:f)+n,r=(y===`s`&&!isNaN(e)&&Sv!==void 0?Ov[8+Sv/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(hv(t)/3)))*3,r=10**-n,i=l((e=yv(e),e.type=`f`,e),{suffix:Ov[8+n/3]});return function(e){return i(r*e)}}return{format:l,formatPrefix:u}}var Av,jv,Mv;Nv({thousands:`,`,grouping:[3],currency:[`$`,``]});function Nv(e){return Av=kv(e),jv=Av.format,Mv=Av.formatPrefix,Av}function Pv(e){return Math.max(0,-hv(Math.abs(e)))}function Fv(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(hv(t)/3)))*3-hv(Math.abs(e)))}function Iv(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,hv(t)-hv(e))+1}var Lv=new Date,Rv=new Date;function zv(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=>zv(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)=>(Lv.setTime(+t),Rv.setTime(+r),e(Lv),e(Rv),Math.floor(n(Lv,Rv))),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 Bv=zv(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Bv.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?zv(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Bv),Bv.range;var Vv=1e3,Hv=Vv*60,Uv=Hv*60,Wv=Uv*24,Gv=Wv*7,Kv=Wv*30,qv=Wv*365,Jv=zv(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Vv)},(e,t)=>(t-e)/Vv,e=>e.getUTCSeconds());Jv.range;var Yv=zv(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Vv)},(e,t)=>{e.setTime(+e+t*Hv)},(e,t)=>(t-e)/Hv,e=>e.getMinutes());Yv.range;var Xv=zv(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Hv)},(e,t)=>(t-e)/Hv,e=>e.getUTCMinutes());Xv.range;var Zv=zv(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Vv-e.getMinutes()*Hv)},(e,t)=>{e.setTime(+e+t*Uv)},(e,t)=>(t-e)/Uv,e=>e.getHours());Zv.range;var Qv=zv(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Uv)},(e,t)=>(t-e)/Uv,e=>e.getUTCHours());Qv.range;var $v=zv(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Hv)/Wv,e=>e.getDate()-1);$v.range;var ey=zv(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Wv,e=>e.getUTCDate()-1);ey.range;var ty=zv(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Wv,e=>Math.floor(e/Wv));ty.range;function ny(e){return zv(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())*Hv)/Gv)}var ry=ny(0),iy=ny(1),ay=ny(2),oy=ny(3),sy=ny(4),cy=ny(5),ly=ny(6);ry.range,iy.range,ay.range,oy.range,sy.range,cy.range,ly.range;function uy(e){return zv(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)/Gv)}var dy=uy(0),fy=uy(1),py=uy(2),my=uy(3),hy=uy(4),gy=uy(5),_y=uy(6);dy.range,fy.range,py.range,my.range,hy.range,gy.range,_y.range;var vy=zv(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());vy.range;var yy=zv(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());yy.range;var by=zv(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());by.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:zv(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)}),by.range;var xy=zv(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());xy.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:zv(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)}),xy.range;function Sy(e,t,n,r,i,a){let o=[[Jv,1,Vv],[Jv,5,5*Vv],[Jv,15,15*Vv],[Jv,30,30*Vv],[a,1,Hv],[a,5,5*Hv],[a,15,15*Hv],[a,30,30*Hv],[i,1,Uv],[i,3,3*Uv],[i,6,6*Uv],[i,12,12*Uv],[r,1,Wv],[r,2,2*Wv],[n,1,Gv],[t,1,Kv],[t,3,3*Kv],[e,1,qv]];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=Zh(([,,e])=>e).right(o,i);if(a===o.length)return e.every(gg(t/qv,n/qv,r));if(a===0)return Bv.every(Math.max(gg(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[Cy,wy]=Sy(xy,yy,dy,ty,Qv,Xv),[Ty,Ey]=Sy(by,vy,ry,$v,Zv,Yv);function Dy(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 Oy(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 ky(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Ay(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=Ly(i),u=Ry(i),d=Ly(a),f=Ry(a),p=Ly(o),m=Ry(o),h=Ly(s),g=Ry(s),_=Ly(c),v=Ry(c),y={a:te,A:ne,b:re,B:ie,c:null,d:ab,e:ab,f:ub,g:xb,G:Cb,H:ob,I:sb,j:cb,L:lb,m:db,M:fb,p:ae,q:oe,Q:Kb,s:qb,S:pb,u:mb,U:hb,V:_b,w:vb,W:yb,x:null,X:null,y:bb,Y:Sb,Z:wb,"%":Gb},b={a:se,A:ce,b:le,B:ue,c:null,d:Tb,e:Tb,f:Ab,g:Vb,G:Ub,H:Eb,I:Db,j:Ob,L:kb,m:jb,M:Mb,p:de,q:fe,Q:Kb,s:qb,S:Nb,u:Pb,U:Fb,V:Lb,w:Rb,W:zb,x:null,X:null,y:Bb,Y:Hb,Z:Wb,"%":Gb},x={a:E,A:D,b:O,B:k,c:A,d:Yy,e:Yy,f:tb,g:Gy,G:Wy,H:Zy,I:Zy,j:Xy,L:eb,m:Jy,M:Qy,p:T,q:qy,Q:rb,s:ib,S:$y,u:By,U:Vy,V:Hy,w:zy,W:Uy,x:j,X:ee,y:Gy,Y:Wy,Z:Ky,"%":nb};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=jy[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=ky(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=Oy(ky(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?fy.ceil(a):fy(a),a=ey.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=Dy(ky(r.y,0,1)),o=a.getDay(),a=o>4||o===0?iy.ceil(a):iy(a),a=$v.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?Oy(ky(r.y,0,1)).getUTCDay():Dy(ky(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,Oy(r)):Dy(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 jy?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 jy={"-":``,_:` `,0:`0`},My=/^\s*\d+/,Ny=/^%/,Py=/[\\^$*+?|[\]().{}]/g;function Fy(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 Iy(e){return e.replace(Py,`\\$&`)}function Ly(e){return RegExp(`^(?:`+e.map(Iy).join(`|`)+`)`,`i`)}function Ry(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function zy(e,t,n){var r=My.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function By(e,t,n){var r=My.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Vy(e,t,n){var r=My.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Hy(e,t,n){var r=My.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Uy(e,t,n){var r=My.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Wy(e,t,n){var r=My.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Gy(e,t,n){var r=My.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Ky(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 qy(e,t,n){var r=My.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Jy(e,t,n){var r=My.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Yy(e,t,n){var r=My.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Xy(e,t,n){var r=My.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Zy(e,t,n){var r=My.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Qy(e,t,n){var r=My.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function $y(e,t,n){var r=My.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function eb(e,t,n){var r=My.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function tb(e,t,n){var r=My.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function nb(e,t,n){var r=Ny.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function rb(e,t,n){var r=My.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function ib(e,t,n){var r=My.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function ab(e,t){return Fy(e.getDate(),t,2)}function ob(e,t){return Fy(e.getHours(),t,2)}function sb(e,t){return Fy(e.getHours()%12||12,t,2)}function cb(e,t){return Fy(1+$v.count(by(e),e),t,3)}function lb(e,t){return Fy(e.getMilliseconds(),t,3)}function ub(e,t){return lb(e,t)+`000`}function db(e,t){return Fy(e.getMonth()+1,t,2)}function fb(e,t){return Fy(e.getMinutes(),t,2)}function pb(e,t){return Fy(e.getSeconds(),t,2)}function mb(e){var t=e.getDay();return t===0?7:t}function hb(e,t){return Fy(ry.count(by(e)-1,e),t,2)}function gb(e){var t=e.getDay();return t>=4||t===0?sy(e):sy.ceil(e)}function _b(e,t){return e=gb(e),Fy(sy.count(by(e),e)+(by(e).getDay()===4),t,2)}function vb(e){return e.getDay()}function yb(e,t){return Fy(iy.count(by(e)-1,e),t,2)}function bb(e,t){return Fy(e.getFullYear()%100,t,2)}function xb(e,t){return e=gb(e),Fy(e.getFullYear()%100,t,2)}function Sb(e,t){return Fy(e.getFullYear()%1e4,t,4)}function Cb(e,t){var n=e.getDay();return e=n>=4||n===0?sy(e):sy.ceil(e),Fy(e.getFullYear()%1e4,t,4)}function wb(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+Fy(t/60|0,`0`,2)+Fy(t%60,`0`,2)}function Tb(e,t){return Fy(e.getUTCDate(),t,2)}function Eb(e,t){return Fy(e.getUTCHours(),t,2)}function Db(e,t){return Fy(e.getUTCHours()%12||12,t,2)}function Ob(e,t){return Fy(1+ey.count(xy(e),e),t,3)}function kb(e,t){return Fy(e.getUTCMilliseconds(),t,3)}function Ab(e,t){return kb(e,t)+`000`}function jb(e,t){return Fy(e.getUTCMonth()+1,t,2)}function Mb(e,t){return Fy(e.getUTCMinutes(),t,2)}function Nb(e,t){return Fy(e.getUTCSeconds(),t,2)}function Pb(e){var t=e.getUTCDay();return t===0?7:t}function Fb(e,t){return Fy(dy.count(xy(e)-1,e),t,2)}function Ib(e){var t=e.getUTCDay();return t>=4||t===0?hy(e):hy.ceil(e)}function Lb(e,t){return e=Ib(e),Fy(hy.count(xy(e),e)+(xy(e).getUTCDay()===4),t,2)}function Rb(e){return e.getUTCDay()}function zb(e,t){return Fy(fy.count(xy(e)-1,e),t,2)}function Bb(e,t){return Fy(e.getUTCFullYear()%100,t,2)}function Vb(e,t){return e=Ib(e),Fy(e.getUTCFullYear()%100,t,2)}function Hb(e,t){return Fy(e.getUTCFullYear()%1e4,t,4)}function Ub(e,t){var n=e.getUTCDay();return e=n>=4||n===0?hy(e):hy.ceil(e),Fy(e.getUTCFullYear()%1e4,t,4)}function Wb(){return`+0000`}function Gb(){return`%`}function Kb(e){return+e}function qb(e){return Math.floor(e/1e3)}var Jb,Yb,Xb,Zb;Qb({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 Qb(e){return Jb=Ay(e),Yb=Jb.format,Jb.parse,Xb=Jb.utcFormat,Zb=Jb.utcParse,Jb}var $b=`%Y-%m-%dT%H:%M:%S.%LZ`;Date.prototype.toISOString||Xb($b),+new Date(`2000-01-01T00:00:00.000Z`)||Zb($b);function ex(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function tx(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 nx=Symbol(`implicit`);function rx(){var e=new rg,t=[],n=[],r=nx;function i(i){let a=e.get(i);if(a===void 0){if(r!==nx)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 rg;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 rx(t,n).unknown(r)},ex.apply(i,arguments),i}function ix(){var e=rx().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=Cg(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 ix(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},ex.apply(d(),arguments)}function ax(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return ax(t())},e}function ox(){return ax(ix.apply(null,arguments).paddingInner(1))}function sx(e){return function(){return e}}function cx(e){return+e}var lx=[0,1];function ux(e){return e}function dx(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:sx(isNaN(t)?NaN:.5)}function fx(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function px(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=dx(i,r),a=n(o,a)):(r=dx(r,i),a=n(a,o)),function(e){return a(r(e))}}function mx(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]=dx(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=ng(e,t,1,r)-1;return a[n](i[n](t))}}function hx(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function gx(){var e=lx,t=lx,n=av,r,i,a,o=ux,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==ux&&(o=fx(e[0],e[n-1])),s=n>2?mx:px,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),Q_))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,cx),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=ov,u()},d.clamp=function(e){return arguments.length?(o=e?!0:ux,u()):o!==ux},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 _x(){return gx()(ux,ux)}function vx(e,t,n,r){var i=gg(e,t,n),a;switch(r=yv(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=Fv(i,o))&&(r.precision=a),Mv(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=Iv(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=Pv(i))&&(r.precision=a-(r.type===`%`)*2)}return jv(r)}function yx(e){var t=e.domain;return e.ticks=function(e){var n=t();return mg(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return vx(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=hg(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 bx(){var e=_x();return e.copy=function(){return hx(e,bx())},ex.apply(e,arguments),yx(e)}function xx(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,cx),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return xx(e).unknown(t)},e=arguments.length?Array.from(e,cx):[0,1],yx(n)}function Sx(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 Cx(e){return Math.log(e)}function wx(e){return Math.exp(e)}function Tx(e){return-Math.log(-e)}function Ex(e){return-Math.exp(-e)}function Dx(e){return isFinite(e)?+(`1e`+e):e<0?0:e}function Ox(e){return e===10?Dx:e===Math.E?Math.exp:t=>e**+t}function kx(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 Ax(e){return(t,n)=>-e(-t,n)}function jx(e){let t=e(Cx,wx),n=t.domain,r=10,i,a;function o(){return i=kx(r),a=Ox(r),n()[0]<0?(i=Ax(i),a=Ax(a),e(Tx,Ex)):e(Cx,wx),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=mg(o,s,p))}else m=mg(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=yv(n)).precision==null&&(n.trim=!0),n=jv(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(Sx(n(),{floor:e=>a(Math.floor(i(e))),ceil:e=>a(Math.ceil(i(e)))})),t}function Mx(){let e=jx(gx()).domain([1,10]);return e.copy=()=>hx(e,Mx()).base(e.base()),ex.apply(e,arguments),e}function Nx(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Px(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Fx(e){var t=1,n=e(Nx(t),Px(t));return n.constant=function(n){return arguments.length?e(Nx(t=+n),Px(t)):t},yx(n)}function Ix(){var e=Fx(gx());return e.copy=function(){return hx(e,Ix()).constant(e.constant())},ex.apply(e,arguments)}function Lx(e){return function(t){return t<0?-((-t)**+e):t**+e}}function Rx(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function zx(e){return e<0?-e*e:e*e}function Bx(e){var t=e(ux,ux),n=1;function r(){return n===1?e(ux,ux):n===.5?e(Rx,zx):e(Lx(n),Lx(1/n))}return t.exponent=function(e){return arguments.length?(n=+e,r()):n},yx(t)}function Vx(){var e=Bx(gx());return e.copy=function(){return hx(e,Vx()).exponent(e.exponent())},ex.apply(e,arguments),e}function Hx(){return Vx.apply(null,arguments).exponent(.5)}function Ux(e){return Math.sign(e)*e*e}function Wx(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Gx(){var e=_x(),t=[0,1],n=!1,r;function i(t){var i=Wx(e(t));return isNaN(i)?r:n?Math.round(i):i}return i.invert=function(t){return e.invert(Ux(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,cx)).map(Ux)),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 Gx(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},ex.apply(i,arguments),yx(i)}function Kx(){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]=Sg(e,r/i);return a}function a(e){return e==null||isNaN(e=+e)?r:t[ng(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(Yh),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 Kx().domain(e).range(t).unknown(r)},ex.apply(a,arguments)}function qx(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(e){return e!=null&&e<=e?i[ng(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 qx().domain([e,t]).range(i).unknown(a)},ex.apply(yx(o),arguments)}function Jx(){var e=[.5],t=[0,1],n,r=1;function i(i){return i!=null&&i<=i?t[ng(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 Jx().domain(e).range(t).unknown(n)},ex.apply(i,arguments)}function Yx(e){return new Date(e)}function Xx(e){return e instanceof Date?+e:Math.round(e)}function Zx(e,t,n,r,i,a,o,s,c,l){var u=_x(),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,Xx)):f().map(Yx)},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(Sx(n,e)):u},u.copy=function(){return hx(u,Zx(e,t,n,r,i,a,o,s,c,l))},u}function Qx(){return ex.apply(Zx(Ty,Ey,by,vy,ry,$v,Zv,Yv,Jv,Yb).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function $x(){return ex.apply(Zx(Cy,wy,xy,yy,dy,ey,Qv,Xv,Jv,Xb).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function eS(){var e=0,t=1,n,r,i,a,o=ux,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(av),l.rangeRound=u(ov),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 tS(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function nS(){var e=yx(eS()(ux));return e.copy=function(){return tS(e,nS())},tx.apply(e,arguments)}function rS(){var e=jx(eS()).domain([1,10]);return e.copy=function(){return tS(e,rS()).base(e.base())},tx.apply(e,arguments)}function iS(){var e=Fx(eS());return e.copy=function(){return tS(e,iS()).constant(e.constant())},tx.apply(e,arguments)}function aS(){var e=Bx(eS());return e.copy=function(){return tS(e,aS()).exponent(e.exponent())},tx.apply(e,arguments)}function oS(){return aS.apply(null,arguments).exponent(.5)}function sS(){var e=[],t=ux;function n(n){if(n!=null&&!isNaN(n=+n))return t((ng(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(Yh),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)=>xg(e,r/t))},n.copy=function(){return sS(t).domain(e)},tx.apply(n,arguments)}function cS(){var e=0,t=.5,n=1,r=1,i,a,o,s,c,l=ux,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=fv(e,[n,r,i]),p):[l(0),l(.5),l(1)]}}return p.range=m(av),p.rangeRound=m(ov),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 lS(){var e=yx(cS()(ux));return e.copy=function(){return tS(e,lS())},tx.apply(e,arguments)}function uS(){var e=jx(cS()).domain([.1,1,10]);return e.copy=function(){return tS(e,uS()).base(e.base())},tx.apply(e,arguments)}function dS(){var e=Fx(cS());return e.copy=function(){return tS(e,dS()).constant(e.constant())},tx.apply(e,arguments)}function fS(){var e=Bx(cS());return e.copy=function(){return tS(e,fS()).exponent(e.exponent())},tx.apply(e,arguments)}function pS(){return fS.apply(null,arguments).exponent(.5)}var mS=s({scaleBand:()=>ix,scaleDiverging:()=>lS,scaleDivergingLog:()=>uS,scaleDivergingPow:()=>fS,scaleDivergingSqrt:()=>pS,scaleDivergingSymlog:()=>dS,scaleIdentity:()=>xx,scaleImplicit:()=>nx,scaleLinear:()=>bx,scaleLog:()=>Mx,scaleOrdinal:()=>rx,scalePoint:()=>ox,scalePow:()=>Vx,scaleQuantile:()=>Kx,scaleQuantize:()=>qx,scaleRadial:()=>Gx,scaleSequential:()=>nS,scaleSequentialLog:()=>rS,scaleSequentialPow:()=>aS,scaleSequentialQuantile:()=>sS,scaleSequentialSqrt:()=>oS,scaleSequentialSymlog:()=>iS,scaleSqrt:()=>Hx,scaleSymlog:()=>Ix,scaleThreshold:()=>Jx,scaleTime:()=>Qx,scaleUtc:()=>$x,tickFormat:()=>vx}),hS=o(((e,t)=>{var n=Ao();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})),gS=o(((e,t)=>{function n(e,t){return e>t}t.exports=n})),_S=o(((e,t)=>{var n=hS(),r=gS(),i=lf();function a(e){return e&&e.length?n(e,i,r):void 0}t.exports=a})),vS=o(((e,t)=>{function n(e,t){return e<t}t.exports=n})),yS=o(((e,t)=>{var n=hS(),r=vS(),i=lf();function a(e){return e&&e.length?n(e,i,r):void 0}t.exports=a})),bS=o(((e,t)=>{var n=fs(),r=pf(),i=tp(),a=So();function o(e,t){return(a(e)?n:i)(e,r(t,3))}t.exports=o})),xS=o(((e,t)=>{var n=Yf(),r=bS();function i(e,t){return n(r(e,t),1)}t.exports=i})),SS=o(((e,t)=>{var n=Qd();function r(e,t){return n(e,t)}t.exports=r})),CS=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 wS(e){return OS(e)||DS(e)||ES(e)||TS()}function TS(){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 ES(e,t){if(e){if(typeof e==`string`)return kS(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 kS(e,t)}}function DS(e){if(typeof Symbol<`u`&&Symbol.iterator in Object(e))return Array.from(e)}function OS(e){if(Array.isArray(e))return kS(e)}function kS(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 AS=function(e){return e},jS={"@@functional/placeholder":!0},MS=function(e){return e===jS},NS=function(e){return function t(){return arguments.length===0||arguments.length===1&&MS(arguments.length<=0?void 0:arguments[0])?t:e.apply(void 0,arguments)}},PS=function e(t,n){return t===1?n:NS(function(){var r=[...arguments],i=r.filter(function(e){return e!==jS}).length;return i>=t?n.apply(void 0,r):e(t-i,NS(function(){var e=[...arguments],t=r.map(function(t){return MS(t)?e.shift():t});return n.apply(void 0,wS(t).concat(e))}))})},FS=function(e){return PS(e.length,e)},IS=function(e,t){for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},LS=FS(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(e){return t[e]}).map(e)}),RS=function(){var e=[...arguments];if(!e.length)return AS;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))}},zS=function(e){return Array.isArray(e)?e.reverse():e.split(``).reverse.join(``)},BS=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}},VS=l(CS());function HS(e){return e===0?1:Math.floor(new VS.default(e).abs().log(10).toNumber())+1}function US(e,t,n){for(var r=new VS.default(e),i=0,a=[];r.lt(t)&&i<1e5;)a.push(r.toNumber()),r=r.add(n),i++;return a}var WS={rangeStep:US,getDigitCount:HS,interpolateNumber:FS(function(e,t,n){var r=+e;return r+n*(+t-r)}),uninterpolateNumber:FS(function(e,t,n){var r=t-+e;return r||=1/0,(n-e)/r}),uninterpolateTruncation:FS(function(e,t,n){var r=t-+e;return r||=1/0,Math.max(0,Math.min(1,(n-e)/r))})};function GS(e){return JS(e)||qS(e)||ZS(e)||KS()}function KS(){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 qS(e){if(typeof Symbol<`u`&&Symbol.iterator in Object(e))return Array.from(e)}function JS(e){if(Array.isArray(e))return QS(e)}function YS(e,t){return eC(e)||$S(e,t)||ZS(e,t)||XS()}function XS(){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 ZS(e,t){if(e){if(typeof e==`string`)return QS(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 QS(e,t)}}function QS(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 $S(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 eC(e){if(Array.isArray(e))return e}function tC(e){var t=YS(e,2),n=t[0],r=t[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]}function nC(e,t,n){if(e.lte(0))return new VS.default(0);var r=WS.getDigitCount(e.toNumber()),i=new VS.default(10).pow(r),a=e.div(i),o=r===1?.1:.05,s=new VS.default(Math.ceil(a.div(o).toNumber())).add(n).mul(o).mul(i);return t?s:new VS.default(Math.ceil(s))}function rC(e,t,n){var r=1,i=new VS.default(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new VS.default(10).pow(WS.getDigitCount(e)-1),i=new VS.default(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new VS.default(Math.floor(e)))}else e===0?i=new VS.default(Math.floor((t-1)/2)):n||(i=new VS.default(Math.floor(e)));var o=Math.floor((t-1)/2);return RS(LS(function(e){return i.add(new VS.default(e-o).mul(r)).toNumber()}),IS)(0,t)}function iC(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 VS.default(0),tickMin:new VS.default(0),tickMax:new VS.default(0)};var a=nC(new VS.default(t).sub(e).div(n-1),r,i),o;e<=0&&t>=0?o=new VS.default(0):(o=new VS.default(e).add(t).div(2),o=o.sub(new VS.default(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),c=Math.ceil(new VS.default(t).sub(o).div(a).toNumber()),l=s+c+1;return l>n?iC(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 VS.default(s).mul(a)),tickMax:o.add(new VS.default(c).mul(a))})}function aC(e){var t=YS(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=YS(tC([n,r]),2),c=s[0],l=s[1];if(c===-1/0||l===1/0){var u=l===1/0?[c].concat(GS(IS(0,i-1).map(function(){return 1/0}))):[].concat(GS(IS(0,i-1).map(function(){return-1/0})),[l]);return n>r?zS(u):u}if(c===l)return rC(c,i,a);var d=iC(c,l,o,a),f=d.step,p=d.tickMin,m=d.tickMax,h=WS.rangeStep(p,m.add(new VS.default(.1).mul(f)),f);return n>r?zS(h):h}function oC(e,t){var n=YS(e,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=YS(tC([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=nC(new VS.default(c).sub(s).div(l-1),a,0),d=[].concat(GS(WS.rangeStep(new VS.default(s),new VS.default(c).sub(new VS.default(.99).mul(u)),u)),[c]);return r>i?zS(d):d}var sC=BS(aC),cC=BS(oC),lC=`Invariant failed`;function uC(e,t){if(!e)throw Error(lC)}var dC=[`offset`,`layout`,`width`,`dataKey`,`data`,`dataPointFormatter`,`xAxis`,`yAxis`];function fC(e){"@babel/helpers - typeof";return fC=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},fC(e)}function pC(){return pC=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},pC.apply(this,arguments)}function mC(e,t){return yC(e)||vC(e,t)||gC(e,t)||hC()}function hC(){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 gC(e,t){if(e){if(typeof e==`string`)return _C(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 _C(e,t)}}function _C(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 vC(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 yC(e){if(Array.isArray(e))return e}function bC(e,t){if(e==null)return{};var n=xC(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 xC(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 SC(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function CC(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,NC(r.key),r)}}function wC(e,t,n){return t&&CC(e.prototype,t),n&&CC(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function TC(e,t,n){return t=kC(t),EC(e,OC()?Reflect.construct(t,n||[],kC(e).constructor):t.apply(e,n))}function EC(e,t){if(t&&(fC(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return DC(e)}function DC(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function OC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(OC=function(){return!!e})()}function kC(e){return kC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},kC(e)}function AC(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&&jC(e,t)}function jC(e,t){return jC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},jC(e,t)}function MC(e,t,n){return t=NC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NC(e){var t=PC(e,`string`);return fC(t)==`symbol`?t:t+``}function PC(e,t){if(fC(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(fC(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var FC=function(e){function t(){return SC(this,t),TC(this,t,arguments)}return AC(t,e),wC(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(bC(e,dC),!1);this.props.direction===`x`&&s.type!==`number`&&uC(!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 _=mC(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(jc,pC({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`,pC({},e,{key:`line-${e.x1}-${e.x2}-${e.y1}-${e.y2}`}))}))});return v.createElement(jc,{className:`recharts-errorBars`},u)}}])}(v.Component);MC(FC,`defaultProps`,{stroke:`black`,strokeWidth:1.5,width:5,offset:0,layout:`horizontal`}),MC(FC,`displayName`,`ErrorBar`);function IC(e){"@babel/helpers - typeof";return IC=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},IC(e)}function LC(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 RC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?LC(Object(n),!0).forEach(function(t){zC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zC(e,t,n){return t=BC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BC(e){var t=VC(e,`string`);return IC(t)==`symbol`?t:t+``}function VC(e,t){if(IC(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(IC(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var HC=function(e){var t=e.children,n=e.formattedGraphicalItems,r=e.legendWidth,i=e.legendContent,a=dc(t,qf);if(!a)return null;var o=qf.defaultProps,s=o===void 0?{}:RC(RC({},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?{}:RC(RC({},n),t.props),i=r.dataKey,a=r.name,o=r.legendType;return{inactive:r.hide,dataKey:i,type:s.iconType||o||`square`,color:cw(t),value:a||i,payload:r}});return RC(RC(RC({},s),qf.getWithHeight(a,r)),{},{payload:c,item:a})},UC=l(_S()),WC=l(yS()),GC=l(xS()),KC=l(SS());function qC(e){"@babel/helpers - typeof";return qC=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},qC(e)}function JC(e){return QC(e)||ZC(e)||XC(e)||YC()}function YC(){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 XC(e,t){if(e){if(typeof e==`string`)return $C(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 $C(e,t)}}function ZC(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function QC(e){if(Array.isArray(e))return $C(e)}function $C(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 ew(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 tw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ew(Object(n),!0).forEach(function(t){nw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ew(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nw(e,t,n){return t=rw(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rw(e){var t=iw(e,`string`);return qC(t)==`symbol`?t:t+``}function iw(e,t){if(qC(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(qC(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function aw(e,t,n){return(0,J.default)(e)||(0,J.default)(t)?n:Ms(t)?(0,Ds.default)(e,t,n):(0,X.default)(t)?t(e):n}function ow(e,t,n,r){var i=(0,GC.default)(e,function(e){return aw(e,t)});if(n===`number`){var a=i.filter(function(e){return Y(e)||parseFloat(e)});return a.length?[(0,WC.default)(a),(0,UC.default)(a)]:[1/0,-1/0]}return(r?i.filter(function(e){return!(0,J.default)(e)}):i).map(function(e){return Ms(e)||e instanceof Date?e:``})}var sw=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(ks(l-c)!==ks(u-l)){var f=[];if(ks(u-l)===ks(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},cw=function(e){var t,n=e.type.displayName,r=(t=e.type)!=null&&t.defaultProps?tw(tw({},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},lw=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 oc(e.type).indexOf(`Bar`)>=0});if(g&&g.length){var _=g[0].type.defaultProps,v=_===void 0?g[0].props:tw(tw({},_),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:Fs(x,n,0)})}}return a},uw=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=Fs(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(JC(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=Fs(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(JC(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},dw=function(e,t,n,r){var i=n.children,a=n.width,o=n.margin,s=HC({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 tw(tw({},e),{},nw({},d,e[d]+(l||0)));if((p===`horizontal`||p===`vertical`&&d===`center`)&&f!==`middle`&&Y(e[f]))return tw(tw({},e),{},nw({},f,e[f]+(u||0)))}return e},fw=function(e,t,n){return(0,J.default)(t)?!0:e===`horizontal`?t===`yAxis`:e===`vertical`||n===`x`?t===`xAxis`:n!==`y`||t===`yAxis`},pw=function(e,t,n,r,i){var a=t.props.children,o=uc(a,FC).filter(function(e){return fw(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=aw(t,n);if((0,J.default)(r))return e;var i=Array.isArray(r)?[(0,WC.default)(r),(0,UC.default)(r)]:[r,r],a=s.reduce(function(e,n){var r=aw(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},mw=function(e,t,n,r,i){var a=t.map(function(t){return pw(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},hw=function(e,t,n,r,i){var a=t.map(function(t){var a=t.props.dataKey;return n===`number`&&a&&pw(e,t,a,r)||ow(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},[])},gw=function(e,t){return e===`horizontal`&&t===`xAxis`||e===`vertical`&&t===`yAxis`||e===`centric`&&t===`angleAxis`||e===`radial`&&t===`radiusAxis`},_w=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},vw=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?ks(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,Es.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}})},yw=new WeakMap,bw=function(e,t){if(typeof t!=`function`)return e;yw.has(e)||yw.set(e,new WeakMap);var n=yw.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},xw=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:ix(),realScaleType:`band`}:a===`radial`&&o===`angleAxis`?{scale:bx(),realScaleType:`linear`}:i===`category`&&t&&(t.indexOf(`LineChart`)>=0||t.indexOf(`AreaChart`)>=0||t.indexOf(`ComposedChart`)>=0&&!n)?{scale:ox(),realScaleType:`point`}:i===`category`?{scale:ix(),realScaleType:`band`}:{scale:bx(),realScaleType:`linear`};if((0,Ts.default)(r)){var s=`scale${(0,Cu.default)(r)}`;return{scale:(mS[s]||ox)(),realScaleType:mS[s]?s:`point`}}return(0,X.default)(r)?{scale:r}:{scale:ox(),realScaleType:`point`}},Sw=1e-4,Cw=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])-Sw,a=Math.max(r[0],r[1])+Sw,o=e(t[0]),s=e(t[n-1]);(o<i||o>a||s<i||s>a)&&e.domain([t[0],t[n-1]])}},ww=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},Tw=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},Ew={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,Es.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:bu,none:hu,silhouette:xu,wiggle:Su,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,Es.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)}}},Dw=function(e,t,n){var r=t.map(function(e){return e.props.dataKey}),i=Ew[n];return yu().keys(r).value(function(e,t){return+aw(e,t,0)}).order(gu).offset(i)(e)},Ow=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?tw(tw({},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(Ms(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[Ps(`_stackId_`)]={numericAxisId:n,cateAxisId:r,items:[t]};return tw(tw({},e),{},nw({},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 tw(tw({},t),{},nw({},a,{numericAxisId:n,cateAxisId:r,items:o.items,stackedData:Dw(e,o.items,i)}))},{})),tw(tw({},t),{},nw({},a,s))},{})},kw=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=sC(c,i,o);return e.domain([(0,WC.default)(l),(0,UC.default)(l)]),{niceTicks:l}}return i&&r===`number`?{niceTicks:cC(e.domain(),i,o)}:null};function Aw(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=zs(n,`value`,i[t.dataKey]);if(s)return s.coordinate+r/2}return n[a]?n[a].coordinate+r/2:null}var c=aw(i,(0,J.default)(o)?t.dataKey:o);return(0,J.default)(c)?null:t.scale(c)}var jw=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=aw(a,t.dataKey,t.domain[o]);return(0,J.default)(s)?null:t.scale(s)-i/2+r},Mw=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]},Nw=function(e,t){var n,r=((n=e.type)!=null&&n.defaultProps?tw(tw({},e.type.defaultProps),e.props):e.props).stackId;if(Ms(r)){var i=t[r];if(i){var a=i.items.indexOf(e);return a>=0?i.stackedData[a]:null}}return null},Pw=function(e){return e.reduce(function(e,t){return[(0,WC.default)(t.concat([e[0]]).filter(Y)),(0,UC.default)(t.concat([e[1]]).filter(Y))]},[1/0,-1/0])},Fw=function(e,t,n){return Object.keys(e).reduce(function(r,i){var a=e[i].stackedData.reduce(function(e,r){var i=Pw(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})},Iw=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Lw=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Rw=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(Iw.test(e[0])){var i=+Iw.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(Lw.test(e[1])){var a=+Lw.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},zw=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,hp.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},Bw=function(e,t,n){return!e||!e.length||(0,KC.default)(e,(0,Ds.default)(n,`type.defaultProps.domain`))?t:e},Vw=function(e,t){var n=e.type.defaultProps?tw(tw({},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 tw(tw({},Z(e,!1)),{},{dataKey:r,unit:a,formatter:o,name:i||r,color:cw(e),value:aw(t,r),type:s,payload:t,chartType:c,hide:l})};function Hw(e){"@babel/helpers - typeof";return Hw=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},Hw(e)}function Uw(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 Ww(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Uw(Object(n),!0).forEach(function(t){Gw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Gw(e,t,n){return t=Kw(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kw(e){var t=qw(e,`string`);return Hw(t)==`symbol`?t:t+``}function qw(e,t){if(Hw(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Hw(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Jw=Math.PI/180,Yw=function(e){return e*180/Math.PI},Xw=function(e,t,n,r){return{x:e+Math.cos(-Jw*r)*n,y:t+Math.sin(-Jw*r)*n}},Zw=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)},Qw=function(e,t){var n=e.x,r=e.y,i=t.cx,a=t.cy,o=Zw({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:Yw(c),angleInRadian:c}},$w=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}},eT=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},tT=function(e,t){var n=e.x,r=e.y,i=Qw({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=$w(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?Ww(Ww({},t),{},{radius:a,angle:eT(f,t)}):null};function nT(e){"@babel/helpers - typeof";return nT=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},nT(e)}var rT=[`offset`];function iT(e){return cT(e)||sT(e)||oT(e)||aT()}function aT(){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 oT(e,t){if(e){if(typeof e==`string`)return lT(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 lT(e,t)}}function sT(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function cT(e){if(Array.isArray(e))return lT(e)}function lT(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 uT(e,t){if(e==null)return{};var n=dT(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 dT(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 fT(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 pT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?fT(Object(n),!0).forEach(function(t){mT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function mT(e,t,n){return t=hT(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hT(e){var t=gT(e,`string`);return nT(t)==`symbol`?t:t+``}function gT(e,t){if(nT(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(nT(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function _T(){return _T=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},_T.apply(this,arguments)}var vT=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},yT=function(e,t){return ks(t-e)*Math.min(Math.abs(t-e),360)},bT=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=yT(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=Xw(c,l,h,y),S=Xw(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)?Ps(`recharts-radial-line-`):e.id;return v.createElement(`text`,_T({},n,{dominantBaseline:`central`,className:xo(`recharts-radial-bar-label`,o)}),v.createElement(`defs`,null,v.createElement(`path`,{id:w,d:C})),v.createElement(`textPath`,{xlinkHref:`#${w}`},t))},xT=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=Xw(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=Xw(a,o,(s+c)/2,l);return{x:f.x,y:f.y,textAnchor:`middle`,verticalAnchor:`middle`}},ST=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 pT(pT({},{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 pT(pT({},{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 pT(pT({},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 pT(pT({},y),n?{width:Math.max(n.x+n.width-y.x,0),height:l}:{})}var b=n?{width:c,height:l}:{};return i===`insideLeft`?pT({x:o+h,y:s+l/2,textAnchor:_,verticalAnchor:`middle`},b):i===`insideRight`?pT({x:o+c-h,y:s+l/2,textAnchor:g,verticalAnchor:`middle`},b):i===`insideTop`?pT({x:o+c/2,y:s+d,textAnchor:`middle`,verticalAnchor:p},b):i===`insideBottom`?pT({x:o+c/2,y:s+l-d,textAnchor:`middle`,verticalAnchor:f},b):i===`insideTopLeft`?pT({x:o+h,y:s+d,textAnchor:_,verticalAnchor:p},b):i===`insideTopRight`?pT({x:o+c-h,y:s+d,textAnchor:g,verticalAnchor:p},b):i===`insideBottomLeft`?pT({x:o+h,y:s+l-d,textAnchor:_,verticalAnchor:f},b):i===`insideBottomRight`?pT({x:o+c-h,y:s+l-d,textAnchor:g,verticalAnchor:f},b):(0,Us.default)(i)&&(Y(i.x)||As(i.x))&&(Y(i.y)||As(i.y))?pT({x:o+Fs(i.x,c),y:s+Fs(i.y,l),textAnchor:`end`,verticalAnchor:`end`},b):pT({x:o+c/2,y:s+l/2,textAnchor:`middle`,verticalAnchor:`middle`},b)},CT=function(e){return`cx`in e&&Y(e.cx)};function wT(e){var t=e.offset,n=t===void 0?5:t,r=uT(e,rT),i=pT({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=vT(i);var m=CT(a),h=Z(i,!0);if(m&&(o===`insideStart`||o===`insideEnd`||o===`end`))return bT(i,p,h);var g=m?xT(i):ST(i);return v.createElement(Jh,_T({className:xo(`recharts-label`,d)},h,g,{breakAll:f}),p)}wT.displayName=`Label`;var TT=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:{}},ET=function(e,t){return e?e===!0?v.createElement(wT,{key:`label-implicit`,viewBox:t}):Ms(e)?v.createElement(wT,{key:`label-implicit`,viewBox:t,value:e}):(0,v.isValidElement)(e)?e.type===wT?(0,v.cloneElement)(e,{key:`label-implicit`,viewBox:t}):v.createElement(wT,{key:`label-implicit`,content:e,viewBox:t}):(0,X.default)(e)?v.createElement(wT,{key:`label-implicit`,content:e,viewBox:t}):(0,Us.default)(e)?v.createElement(wT,_T({viewBox:t},e,{key:`label-implicit`})):null:null};wT.parseViewBox=TT,wT.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=TT(e),a=uc(r,wT).map(function(e,n){return(0,v.cloneElement)(e,{viewBox:t||i,key:`label-${n}`})});return n?[ET(e.label,t||i)].concat(iT(a)):a};var DT=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 OT(e){"@babel/helpers - typeof";return OT=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},OT(e)}var kT=[`valueAccessor`],AT=[`data`,`dataKey`,`clockWise`,`id`,`textBreakAll`];function jT(e){return FT(e)||PT(e)||NT(e)||MT()}function MT(){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 NT(e,t){if(e){if(typeof e==`string`)return IT(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 IT(e,t)}}function PT(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function FT(e){if(Array.isArray(e))return IT(e)}function IT(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 LT(){return LT=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},LT.apply(this,arguments)}function RT(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 zT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?RT(Object(n),!0).forEach(function(t){BT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function BT(e,t,n){return t=VT(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VT(e){var t=HT(e,`string`);return OT(t)==`symbol`?t:t+``}function HT(e,t){if(OT(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(OT(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function UT(e,t){if(e==null)return{};var n=WT(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 WT(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 GT=function(e){return Array.isArray(e.value)?(0,DT.default)(e.value):e.value};function KT(e){var t=e.valueAccessor,n=t===void 0?GT:t,r=UT(e,kT),i=r.data,a=r.dataKey,o=r.clockWise,s=r.id,c=r.textBreakAll,l=UT(r,AT);return!i||!i.length?null:v.createElement(jc,{className:`recharts-label-list`},i.map(function(e,t){var r=(0,J.default)(a)?n(e,t):aw(e&&e.payload,a),i=(0,J.default)(s)?{}:{id:`${s}-${t}`};return v.createElement(wT,LT({},Z(e,!0),l,i,{parentViewBox:e.parentViewBox,value:r,textBreakAll:c,viewBox:wT.parseViewBox((0,J.default)(o)?e:zT(zT({},e),{},{clockWise:o})),key:`label-${t}`,index:t}))}))}KT.displayName=`LabelList`;function qT(e,t){return e?e===!0?v.createElement(KT,{key:`labelList-implicit`,data:t}):v.isValidElement(e)||(0,X.default)(e)?v.createElement(KT,{key:`labelList-implicit`,data:t,content:e}):(0,Us.default)(e)?v.createElement(KT,LT({data:t},e,{key:`labelList-implicit`})):null:null}function JT(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=uc(r,KT).map(function(e,n){return(0,v.cloneElement)(e,{data:t,key:`labelList-${n}`})});return n?[qT(e.label,t)].concat(jT(i)):i}KT.renderCallByParent=JT;function YT(e){"@babel/helpers - typeof";return YT=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},YT(e)}function XT(){return XT=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},XT.apply(this,arguments)}function ZT(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 QT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ZT(Object(n),!0).forEach(function(t){$T(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $T(e,t,n){return t=eE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eE(e){var t=tE(e,`string`);return YT(t)==`symbol`?t:t+``}function tE(e,t){if(YT(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(YT(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var nE=function(e,t){return ks(t-e)*Math.min(Math.abs(t-e),359.999)},rE=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)/Jw,d=c?i:i+a*u,f=Xw(t,n,l,d),p=Xw(t,n,r,d),m=c?i-a*u:i;return{center:f,circleTangency:p,lineTangency:Xw(t,n,l*Math.cos(u*Jw),m),theta:u}},iE=function(e){var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,a=e.startAngle,o=e.endAngle,s=nE(a,o),c=a+s,l=Xw(t,n,i,a),u=Xw(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=Xw(t,n,r,a),p=Xw(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},aE=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=ks(l-c),d=rE({cx:t,cy:n,radius:i,angle:c,sign:u,cornerRadius:a,cornerIsExternal:s}),f=d.circleTangency,p=d.lineTangency,m=d.theta,h=rE({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
- `:iE({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=rE({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=rE({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},oE={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},sE=function(e){var t=QT(QT({},oE),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=xo(`recharts-sector`,d),p=a-i,m=Fs(o,p,0,!0),h=m>0&&Math.abs(l-u)<360?aE({cx:n,cy:r,innerRadius:i,outerRadius:a,cornerRadius:Math.min(m,p/2),forceCornerRadius:s,cornerIsExternal:c,startAngle:l,endAngle:u}):iE({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:l,endAngle:u});return v.createElement(`path`,XT({},Z(t,!0),{className:f,d:h,role:`img`}))};function cE(e){"@babel/helpers - typeof";return cE=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},cE(e)}function lE(){return lE=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},lE.apply(this,arguments)}function uE(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 dE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?uE(Object(n),!0).forEach(function(t){fE(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fE(e,t,n){return t=pE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pE(e){var t=mE(e,`string`);return cE(t)==`symbol`?t:t+``}function mE(e,t){if(cE(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(cE(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var hE={curveBasisClosed:zl,curveBasisOpen:Vl,curveBasis:Ll,curveBumpX:pl,curveBumpY:ml,curveLinearClosed:Ql,curveLinear:al,curveMonotoneX:ou,curveMonotoneY:su,curveNatural:uu,curveStep:fu,curveStepAfter:mu,curveStepBefore:pu},gE=function(e){return e.x===+e.x&&e.y===+e.y},_E=function(e){return e.x},vE=function(e){return e.y},yE=function(e,t){if((0,X.default)(e))return e;var n=`curve${(0,Cu.default)(e)}`;return(n===`curveMonotone`||n===`curveBump`)&&t?hE[`${n}${t===`vertical`?`Y`:`X`}`]:hE[n]||al},bE=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=yE(n,o),u=c?i.filter(function(e){return gE(e)}):i,d;if(Array.isArray(a)){var f=c?a.filter(function(e){return gE(e)}):a,p=u.map(function(e,t){return dE(dE({},e),{},{base:f[t]})});return d=o===`vertical`?ll().y(vE).x1(_E).x0(function(e){return e.base.x}):ll().x(_E).y1(vE).y0(function(e){return e.base.y}),d.defined(gE).curve(l),d(p)}return d=o===`vertical`&&Y(a)?ll().y(vE).x1(_E).x0(a):Y(a)?ll().x(_E).y1(vE).y0(a):cl().x(_E).y(vE),d.defined(gE).curve(l),d(u)},xE=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?bE(e):r;return v.createElement(`path`,lE({},Z(e,!1),Xs(e),{className:xo(`recharts-curve`,t),d:a,ref:i}))},SE=o(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),CE=o(((e,t)=>{var n=SE();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}})),wE=o(((e,t)=>{t.exports=CE()()})),{getOwnPropertyNames:TE,getOwnPropertySymbols:EE}=Object,{hasOwnProperty:DE}=Object.prototype;function OE(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function kE(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 AE(e){return e?.[Symbol.toStringTag]}function jE(e){return TE(e).concat(EE(e))}var ME=Object.hasOwn||((e,t)=>DE.call(e,t));function NE(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var PE=`__v`,FE=`__o`,IE=`_owner`,LE=64,{getOwnPropertyDescriptor:RE,keys:zE}=Object,{propertyIsEnumerable:BE}=Object.prototype,VE=RE(Object.getPrototypeOf(Int8Array.prototype),Symbol.toStringTag).get;function HE(e,t){return e.byteLength===t.byteLength&&nD(new Uint8Array(e),new Uint8Array(t))}function UE(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 WE(e,t){return e.byteLength===t.byteLength&&nD(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function GE(e,t){return NE(e.getTime(),t.getTime())}function KE(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=zE(e),c=zE(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]&&!BE.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===+!!BE.call(t,`cause`)+ +!!BE.call(t,`errors`)}function qE(e,t){return e===t}function JE(e,t,n){return e.name===t.name&&e.message===t.message&&e.stack===t.stack&&QE(e,t,n)}function YE(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 XE=NE;function ZE(e,t,n){let r=zE(e),i=zE(t),a=r.length;if(i.length!==a)return!1;let o=a<=LE,s;for(;a-->0;)if(s=r[a],!oD(e,t,s)&&(s!==i[a]&&!(o?i.includes(s):BE.call(t,s))||!n.equals(e[s],t[s],s,s,e,t,n)))return!1;return!0}function QE(e,t,n){let r=jE(e),i=r.length;if(jE(t).length!==i)return!1;let a,o,s;for(;i-->0;)if(a=r[i],!oD(e,t,a)&&(!ME(t,a)||!n.equals(e[a],t[a],a,a,e,t,n))||(o=RE(e,a),s=RE(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function $E(e,t){return NE(e.valueOf(),t.valueOf())}function eD(e,t){return e.source===t.source&&e.flags===t.flags}function tD(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 nD(e,t){let n=e.length;if(t.length!==n||e.byteOffset!==t.byteOffset)return!1;let r=VE.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 rD(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&&iD(e.searchParams,t.searchParams)}function iD(e,t){let n=e.toString(),r=t.toString();return n===r||aD(n)===aD(r)}function aD(e){return e.split(`&`).sort().join(`&`)}function oD(e,t,n){return(n===IE||n===FE||n===PE)&&!!(e.$$typeof||t.$$typeof)}var sD=`[object ArrayBuffer]`,cD=`[object Arguments]`,lD=`[object Boolean]`,uD=`[object DataView]`,dD=`[object Date]`,fD=`[object Error]`,pD=`[object Map]`,mD=`[object Number]`,hD=`[object Object]`,gD=`[object RegExp]`,_D=`[object Set]`,vD=`[object String]`,yD={"[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},bD=`[object URL]`,xD=Object.prototype.toString;function SD({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=xD.call(h);if(b===dD)return r(h,g,_);if(b===gD)return u(h,g,_);if(b===pD)return o(h,g,_);if(b===_D)return d(h,g,_);if(b===hD)return typeof h.then!=`function`&&typeof g.then!=`function`&&c(h,g,_);if(b===bD)return p(h,g,_);if(b===fD)return i(h,g,_);if(b===cD)return c(h,g,_);if(yD[b])return f(h,g,_);if(b===sD)return e(h,g,_);if(b===uD)return n(h,g,_);if(b===lD||b===mD||b===vD)return l(h,g,_);if(m){let e=m[b];if(!e){let t=AE(h);t&&(e=m[t])}if(e)return e(h,g,_)}return!1}}function CD({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:HE,areArraysEqual:n?QE:UE,areDataViewsEqual:WE,areDatesEqual:GE,areErrorsEqual:n?JE:KE,areFunctionsEqual:qE,areMapsEqual:n?OE(YE,QE):YE,areNumbersEqual:XE,areObjectsEqual:n?QE:ZE,arePrimitiveWrappersEqual:$E,areRegExpsEqual:eD,areSetsEqual:n?OE(tD,QE):tD,areTypedArraysEqual:n?OE(nD,QE):nD,areUrlsEqual:rD,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=kE(r.areArraysEqual),t=kE(r.areErrorsEqual),n=kE(r.areMapsEqual),i=kE(r.areObjectsEqual),a=kE(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areErrorsEqual:t,areMapsEqual:n,areObjectsEqual:i,areSetsEqual:a})}return r}function wD(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function TD({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 ED=DD();DD({strict:!0}),DD({circular:!0}),DD({circular:!0,strict:!0}),DD({createInternalComparator:()=>NE}),DD({strict:!0,createInternalComparator:()=>NE}),DD({circular:!0,createInternalComparator:()=>NE}),DD({circular:!0,createInternalComparator:()=>NE,strict:!0});function DD(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=SD(CD(e));return TD({circular:t,comparator:a,createState:r,equals:n?n(a):wD(a),strict:i})}function OD(e){typeof requestAnimationFrame<`u`&&requestAnimationFrame(e)}function kD(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):OD(r)})}function AD(e){"@babel/helpers - typeof";return AD=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},AD(e)}function jD(e){return ID(e)||FD(e)||ND(e)||MD()}function MD(){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 ND(e,t){if(e){if(typeof e==`string`)return PD(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 PD(e,t)}}function PD(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 FD(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function ID(e){if(Array.isArray(e))return e}function LD(){var e={},t=function(){return null},n=!1,r=function r(i){if(!n){if(Array.isArray(i)){if(!i.length)return;var a=jD(i),o=a[0],s=a.slice(1);if(typeof o==`number`){kD(r.bind(null,s),o);return}r(o),kD(r.bind(null,s))}else AD(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 RD(e){"@babel/helpers - typeof";return RD=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},RD(e)}function zD(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 BD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?zD(Object(n),!0).forEach(function(t){VD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function VD(e,t,n){return t=HD(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HD(e){var t=UD(e,`string`);return RD(t)===`symbol`?t:String(t)}function UD(e,t){if(RD(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(RD(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var WD=function(e,t){return[Object.keys(e),Object.keys(t)].reduce(function(e,t){return e.filter(function(e){return t.includes(e)})})},GD=function(e){return e},KD=function(e){return e.replace(/([A-Z])/g,function(e){return`-${e.toLowerCase()}`})},qD=function(e,t){return Object.keys(t).reduce(function(n,r){return BD(BD({},n),{},VD({},r,e(r,t[r])))},{})},JD=function(e,t,n){return e.map(function(e){return`${KD(e)} ${t}ms ${n}`}).join(`,`)};function YD(e,t){return QD(e)||ZD(e,t)||tO(e,t)||XD()}function XD(){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 ZD(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 QD(e){if(Array.isArray(e))return e}function $D(e){return rO(e)||nO(e)||tO(e)||eO()}function eO(){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 tO(e,t){if(e){if(typeof e==`string`)return iO(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 iO(e,t)}}function nO(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function rO(e){if(Array.isArray(e))return iO(e)}function iO(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 aO=1e-4,oO=function(e,t){return[0,3*e,3*t-6*e,3*e-3*t+1]},sO=function(e,t){return e.map(function(e,n){return e*t**+n}).reduce(function(e,t){return e+t})},cO=function(e,t){return function(n){return sO(oO(e,t),n)}},lO=function(e,t){return function(n){var r=oO(e,t);return sO([].concat($D(r.map(function(e,t){return e*t}).slice(1)),[0]),n)}},uO=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=YD(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=cO(t,r),c=cO(n,i),l=lO(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)<aO||a<aO)return c(n);n=u(n-i/a)}return c(n)};return d.isStepper=!1,d},dO=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)<aO&&Math.abs(a)<aO?[t,0]:[s,a]};return s.isStepper=!0,s.dt=o,s},fO=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 uO(e);case`spring`:return dO();default:if(e.split(`(`)[0]===`cubic-bezier`)return uO(e)}return typeof e==`function`?e:null};function pO(e){"@babel/helpers - typeof";return pO=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},pO(e)}function mO(e){return _O(e)||gO(e)||TO(e)||hO()}function hO(){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 gO(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function _O(e){if(Array.isArray(e))return EO(e)}function vO(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 yO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?vO(Object(n),!0).forEach(function(t){bO(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function bO(e,t,n){return t=xO(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xO(e){var t=SO(e,`string`);return pO(t)===`symbol`?t:String(t)}function SO(e,t){if(pO(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(pO(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function CO(e,t){return OO(e)||DO(e,t)||TO(e,t)||wO()}function wO(){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 TO(e,t){if(e){if(typeof e==`string`)return EO(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 EO(e,t)}}function EO(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 DO(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 OO(e){if(Array.isArray(e))return e}var kO=function(e,t,n){return e+(t-e)*n},AO=function(e){return e.from!==e.to},jO=function e(t,n,r){var i=qD(function(e,n){if(AO(n)){var r=CO(t(n.from,n.to,n.velocity),2),i=r[0],a=r[1];return yO(yO({},n),{},{from:i,velocity:a})}return n},n);return r<1?qD(function(e,t){return AO(t)?yO(yO({},t),{},{velocity:kO(t.velocity,i[e].velocity,r),from:kO(t.from,i[e].from,r)}):t},n):e(t,i,r-1)},MO=(function(e,t,n,r,i){var a=WD(e,t),o=a.reduce(function(n,r){return yO(yO({},n),{},bO({},r,[e[r],t[r]]))},{}),s=a.reduce(function(n,r){return yO(yO({},n),{},bO({},r,{from:e[r],velocity:0,to:t[r]}))},{}),c=-1,l,u,d=function(){return null},f=function(){return qD(function(e,t){return t.from},s)},p=function(){return!Object.values(s).filter(AO).length};return d=n.isStepper?function(r){l||=r;var a=(r-l)/n.dt;s=jO(n,s,a),i(yO(yO(yO({},e),t),f(s))),l=r,p()||(c=requestAnimationFrame(d))}:function(a){u||=a;var s=(a-u)/r,l=qD(function(e,t){return kO.apply(void 0,mO(t).concat([n(s)]))},o);if(i(yO(yO(yO({},e),t),l)),s<1)c=requestAnimationFrame(d);else{var f=qD(function(e,t){return kO.apply(void 0,mO(t).concat([n(1)]))},o);i(yO(yO(yO({},e),t),f))}},function(){return requestAnimationFrame(d),function(){cancelAnimationFrame(c)}}}),NO=l(wE());function PO(e){"@babel/helpers - typeof";return PO=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},PO(e)}var FO=[`children`,`begin`,`duration`,`attributeName`,`easing`,`isActive`,`steps`,`from`,`to`,`canBegin`,`onAnimationEnd`,`shouldReAnimate`,`onAnimationReStart`];function IO(e,t){if(e==null)return{};var n=LO(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 LO(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 RO(e){return HO(e)||VO(e)||BO(e)||zO()}function zO(){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 BO(e,t){if(e){if(typeof e==`string`)return UO(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 UO(e,t)}}function VO(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function HO(e){if(Array.isArray(e))return UO(e)}function UO(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 WO(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 GO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?WO(Object(n),!0).forEach(function(t){KO(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function KO(e,t,n){return t=XO(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qO(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function JO(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,XO(r.key),r)}}function YO(e,t,n){return t&&JO(e.prototype,t),n&&JO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function XO(e){var t=ZO(e,`string`);return PO(t)===`symbol`?t:String(t)}function ZO(e,t){if(PO(e)!==`object`||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(PO(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function QO(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&&$O(e,t)}function $O(e,t){return $O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$O(e,t)}function ek(e){var t=rk();return function(){var n=ik(e),r;if(t){var i=ik(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return tk(this,r)}}function tk(e,t){if(t&&(PO(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return nk(e)}function nk(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function rk(){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 ik(e){return ik=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ik(e)}var ak=function(e){QO(n,e);var t=ek(n);function n(e,r){var i;qO(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(nk(i)),i.changeStyle=i.changeStyle.bind(nk(i)),!o||f<=0)return i.state={style:{}},typeof d==`function`&&(i.state={style:l}),tk(i);if(u&&u.length)i.state={style:u[0].style};else if(c){if(typeof d==`function`)return i.state={style:c},tk(i);i.state={style:s?KO({},s,c):c}}else i.state={style:{}};return i}return YO(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?KO({},i,o):o};this.state&&c&&(i&&c[i]!==o||!i&&c!==o)&&this.setState(l)}else if(!(ED(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?KO({},i,d):d};(i&&c[i]!==d||!i&&c!==d)&&this.setState(f)}this.runAnimation(GO(GO({},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=MO(n,r,fO(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(RO(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(RO(e),[t.runJSAnimation.bind(t,{from:d.style,to:c,duration:a,easing:s}),a]);var p=JD(f,a,s),m=GO(GO(GO({},d.style),c),{},{transition:p});return[].concat(RO(e),[m,a,u]).filter(GD)},[o,Math.max(c,r)])),[e.onAnimationEnd]))}},{key:`runAnimation`,value:function(e){this.manager||=LD();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?KO({},r,i):i,f=JD(Object.keys(d),n,a);u.start([o,t,GO(GO({},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=IO(e,FO),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,GO(GO({},i),{},{style:GO(GO({},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);ak.displayName=`Animate`,ak.defaultProps={begin:0,duration:1e3,from:``,to:``,attributeName:``,easing:`ease`,isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},ak.propTypes={from:NO.default.oneOfType([NO.default.object,NO.default.string]),to:NO.default.oneOfType([NO.default.object,NO.default.string]),attributeName:NO.default.string,duration:NO.default.number,begin:NO.default.number,easing:NO.default.oneOfType([NO.default.string,NO.default.func]),steps:NO.default.arrayOf(NO.default.shape({duration:NO.default.number.isRequired,style:NO.default.object.isRequired,easing:NO.default.oneOfType([NO.default.oneOf([`ease`,`ease-in`,`ease-out`,`ease-in-out`,`linear`]),NO.default.func]),properties:NO.default.arrayOf(`string`),onAnimationEnd:NO.default.func})),children:NO.default.oneOfType([NO.default.node,NO.default.func]),isActive:NO.default.bool,canBegin:NO.default.bool,onAnimationEnd:NO.default.func,shouldReAnimate:NO.default.bool,onAnimationStart:NO.default.func,onAnimationReStart:NO.default.func};var ok=ak;function sk(e){"@babel/helpers - typeof";return sk=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},sk(e)}function ck(){return ck=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},ck.apply(this,arguments)}function lk(e,t){return mk(e)||pk(e,t)||dk(e,t)||uk()}function uk(){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 dk(e,t){if(e){if(typeof e==`string`)return fk(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 fk(e,t)}}function fk(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 pk(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 mk(e){if(Array.isArray(e))return e}function hk(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 gk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?hk(Object(n),!0).forEach(function(t){_k(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _k(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=yk(e,`string`);return sk(t)==`symbol`?t:t+``}function yk(e,t){if(sk(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(sk(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var bk=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},xk=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},Sk={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:`ease`},Ck=function(e){var t=gk(gk({},Sk),e),n=(0,v.useRef)(),r=lk((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 _=xo(`recharts-rectangle`,d);return g?v.createElement(ok,{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(ok,{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`,ck({},Z(t,!0),{className:_,d:bk(o,s,r,a,u),ref:n})))}):v.createElement(`path`,ck({},Z(t,!0),{className:_,d:bk(o,s,c,l,u)}))};function wk(){return wk=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},wk.apply(this,arguments)}var Tk=function(e){var t=e.cx,n=e.cy,r=e.r,i=e.className,a=xo(`recharts-dot`,i);return t===+t&&n===+n&&r===+r?v.createElement(`circle`,wk({},Z(e,!1),Xs(e),{className:a,cx:t,cy:n,r})):null};function Ek(e){"@babel/helpers - typeof";return Ek=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},Ek(e)}var Dk=[`x`,`y`,`top`,`left`,`width`,`height`,`className`];function Ok(){return Ok=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},Ok.apply(this,arguments)}function kk(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 Ak(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?kk(Object(n),!0).forEach(function(t){jk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function jk(e,t,n){return t=Mk(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mk(e){var t=Nk(e,`string`);return Ek(t)==`symbol`?t:t+``}function Nk(e,t){if(Ek(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Ek(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Pk(e,t){if(e==null)return{};var n=Fk(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 Fk(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 Ik=function(e,t,n,r,i,a){return`M${e},${i}v${r}M${a},${t}h${n}`},Lk=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=Pk(e,Dk),h=Ak({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`,Ok({},Z(h,!0),{className:xo(`recharts-cross`,p),d:Ik(n,i,u,f,o,c)}))},Rk=o(((e,t)=>{t.exports=zd()(Object.getPrototypeOf,Object)})),zk=o(((e,t)=>{var n=Oo(),r=Rk(),i=ko(),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})),Bk=o(((e,t)=>{var n=Oo(),r=ko(),i=`[object Boolean]`;function a(e){return e===!0||e===!1||r(e)&&n(e)==i}t.exports=a}));function Vk(e){"@babel/helpers - typeof";return Vk=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},Vk(e)}function Hk(){return Hk=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},Hk.apply(this,arguments)}function Uk(e,t){return Jk(e)||qk(e,t)||Gk(e,t)||Wk()}function Wk(){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 Gk(e,t){if(e){if(typeof e==`string`)return Kk(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 Kk(e,t)}}function Kk(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 qk(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 Jk(e){if(Array.isArray(e))return e}function Yk(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 Xk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Yk(Object(n),!0).forEach(function(t){Zk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Zk(e,t,n){return t=Qk(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qk(e){var t=$k(e,`string`);return Vk(t)==`symbol`?t:t+``}function $k(e,t){if(Vk(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Vk(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var eA=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},tA={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:`ease`},nA=function(e){var t=Xk(Xk({},tA),e),n=(0,v.useRef)(),r=Uk((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=xo(`recharts-trapezoid`,d);return h?v.createElement(ok,{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(ok,{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`,Hk({},Z(t,!0),{className:g,d:eA(s,c,r,a,o),ref:n})))}):v.createElement(`g`,null,v.createElement(`path`,Hk({},Z(t,!0),{className:g,d:eA(o,s,c,l,u)})))},rA=l(zk()),iA=l(Bk()),aA=[`option`,`shapeType`,`propTransformer`,`activeClassName`,`isActive`];function oA(e){"@babel/helpers - typeof";return oA=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},oA(e)}function sA(e,t){if(e==null)return{};var n=cA(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 cA(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 lA(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 uA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?lA(Object(n),!0).forEach(function(t){dA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function dA(e,t,n){return t=fA(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fA(e){var t=pA(e,`string`);return oA(t)==`symbol`?t:t+``}function pA(e,t){if(oA(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(oA(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function mA(e,t){return uA(uA({},t),e)}function hA(e,t){return e===`symbols`}function gA(e){var t=e.shapeType,n=e.elementProps;switch(t){case`rectangle`:return v.createElement(Ck,n);case`trapezoid`:return v.createElement(nA,n);case`sector`:return v.createElement(sE,n);case`symbols`:if(hA(t,n))return v.createElement(zu,n);break;default:return null}}function _A(e){return(0,v.isValidElement)(e)?e.props:e}function vA(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?mA:r,a=e.activeClassName,o=a===void 0?`recharts-active-shape`:a,s=e.isActive,c=sA(e,aA),l;if((0,v.isValidElement)(t))l=(0,v.cloneElement)(t,uA(uA({},c),_A(t)));else if((0,X.default)(t))l=t(c);else if((0,rA.default)(t)&&!(0,iA.default)(t)){var u=i(t,c);l=v.createElement(gA,{shapeType:n,elementProps:u})}else{var d=c;l=v.createElement(gA,{shapeType:n,elementProps:d})}return s?v.createElement(jc,{className:o},l):l}function yA(e,t){return t!=null&&`trapezoids`in e.props}function bA(e,t){return t!=null&&`sectors`in e.props}function xA(e,t){return t!=null&&`points`in e.props}function SA(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 CA(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function wA(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function TA(e,t){var n;return yA(e,t)?n=SA:bA(e,t)?n=CA:xA(e,t)&&(n=wA),n}function EA(e,t){var n;return yA(e,t)?n=`trapezoids`:bA(e,t)?n=`sectors`:xA(e,t)&&(n=`points`),n}function DA(e,t){if(yA(e,t)){var n;return(n=t.tooltipPayload)==null||(n=n[0])==null||(n=n.payload)==null?void 0:n.payload}if(bA(e,t)){var r;return(r=t.tooltipPayload)==null||(r=r[0])==null||(r=r.payload)==null?void 0:r.payload}return xA(e,t)?t.payload:{}}function OA(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=EA(n,t),a=DA(n,t),o=r.filter(function(e,r){var o=(0,KC.default)(a,e),s=n.props[i].filter(function(e){return TA(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 kA=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})),AA=o(((e,t)=>{var n=Om(),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})),jA=o(((e,t)=>{var n=kA(),r=mp(),i=AA();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})),MA=o(((e,t)=>{t.exports=jA()()}));function NA(e){"@babel/helpers - typeof";return NA=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},NA(e)}function PA(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 FA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?PA(Object(n),!0).forEach(function(t){IA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function IA(e,t,n){return t=LA(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LA(e){var t=RA(e,`string`);return NA(t)==`symbol`?t:t+``}function RA(e,t){if(NA(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(NA(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var zA=[`Webkit`,`Moz`,`O`,`ms`],BA=function(e,t){if(!e)return null;var n=e.replace(/(\w)/,function(e){return e.toUpperCase()}),r=zA.reduce(function(e,r){return FA(FA({},e),{},IA({},r+n,t))},{});return r[e]=t,r},VA=l(MA());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(){return UA=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},UA.apply(this,arguments)}function WA(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 GA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?WA(Object(n),!0).forEach(function(t){nj(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function KA(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function qA(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,rj(r.key),r)}}function JA(e,t,n){return t&&qA(e.prototype,t),n&&qA(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function YA(e,t,n){return t=$A(t),XA(e,QA()?Reflect.construct(t,n||[],$A(e).constructor):t.apply(e,n))}function XA(e,t){if(t&&(HA(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return ZA(e)}function ZA(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function QA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(QA=function(){return!!e})()}function $A(e){return $A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$A(e)}function ej(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&&tj(e,t)}function tj(e,t){return tj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},tj(e,t)}function nj(e,t,n){return t=rj(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rj(e){var t=ij(e,`string`);return HA(t)==`symbol`?t:t+``}function ij(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 aj=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=ox().domain((0,VA.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}},oj=function(e){return e.changedTouches&&!!e.changedTouches.length},sj=function(e){function t(e){var n;return KA(this,t),n=YA(this,t,[e]),nj(n,`handleDrag`,function(e){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(e):n.state.isSlideMoving&&n.handleSlideDrag(e)}),nj(n,`handleTouchMove`,function(e){e.changedTouches!=null&&e.changedTouches.length>0&&n.handleDrag(e.changedTouches[0])}),nj(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()}),nj(n,`handleLeaveWrapper`,function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),nj(n,`handleEnterSlideOrTraveller`,function(){n.setState({isTextActive:!0})}),nj(n,`handleLeaveSlideOrTraveller`,function(){n.setState({isTextActive:!1})}),nj(n,`handleSlideDragStart`,function(e){var t=oj(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 ej(t,e),JA(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=aw(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=oj(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(nj(nj({},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(nj({},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=GA(GA({},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(jc,{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(jc,{className:`recharts-brush-texts`},v.createElement(Jh,UA({textAnchor:`end`,verticalAnchor:`middle`,x:Math.min(c,l)-u,y:r+i/2},d),this.getTextOfTick(t)),v.createElement(Jh,UA({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=xo(`recharts-brush`,n),_=v.Children.count(r)===1,y=BA(`userSelect`,`none`);return v.createElement(jc,{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 GA({prevData:n,prevTravellerWidth:a,prevUpdateId:o,prevX:i,prevWidth:r},n&&n.length?aj({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);nj(sj,`displayName`,`Brush`),nj(sj,`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 cj=o(((e,t)=>{var n=ep();function r(e,t){var r;return n(e,function(e,n,i){return r=t(e,n,i),!r}),!!r}t.exports=r})),lj=o(((e,t)=>{var n=md(),r=pf(),i=cj(),a=So(),o=mp();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})),uj=function(e,t){var n=e.alwaysShow,r=e.ifOverflow;return n&&(r=`extendDomain`),r===t},dj=o(((e,t)=>{var n=lp();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})),fj=o(((e,t)=>{var n=dj(),r=Qf(),i=pf();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})),pj=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})),mj=o(((e,t)=>{var n=ep();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})),hj=o(((e,t)=>{var n=pj(),r=mj(),i=pf(),a=So(),o=mp();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})),gj=[`x`,`y`];function _j(e){"@babel/helpers - typeof";return _j=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},_j(e)}function vj(){return vj=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},vj.apply(this,arguments)}function yj(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 bj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?yj(Object(n),!0).forEach(function(t){xj(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xj(e,t,n){return t=Sj(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sj(e){var t=Cj(e,`string`);return _j(t)==`symbol`?t:t+``}function Cj(e,t){if(_j(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(_j(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function wj(e,t){if(e==null)return{};var n=Tj(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 Tj(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 Ej(e,t){var n=e.x,r=e.y,i=wj(e,gj),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 bj(bj(bj(bj(bj({},t),i),o?{x:o}:{}),c?{y:c}:{}),{},{height:u,width:f,name:t.name,radius:t.radius})}function Dj(e){return v.createElement(vA,vj({shapeType:`rectangle`,propTransformer:Ej,activeClassName:`recharts-active-bar`},e))}var Oj=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)||js(n);return i?e(n,r):(!i&&uC(!1),t)}},kj=[`value`,`background`],Aj;function jj(e){"@babel/helpers - typeof";return jj=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},jj(e)}function Mj(e,t){if(e==null)return{};var n=Nj(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 Nj(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 Pj(){return Pj=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},Pj.apply(this,arguments)}function Fj(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 Ij(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Fj(Object(n),!0).forEach(function(t){qj(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Lj(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Rj(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,Jj(r.key),r)}}function zj(e,t,n){return t&&Rj(e.prototype,t),n&&Rj(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Bj(e,t,n){return t=Wj(t),Vj(e,Uj()?Reflect.construct(t,n||[],Wj(e).constructor):t.apply(e,n))}function Vj(e,t){if(t&&(jj(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Hj(e)}function Hj(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function Uj(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Uj=function(){return!!e})()}function Wj(e){return Wj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Wj(e)}function Gj(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&&Kj(e,t)}function Kj(e,t){return Kj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Kj(e,t)}function qj(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=Yj(e,`string`);return jj(t)==`symbol`?t:t+``}function Yj(e,t){if(jj(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(jj(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Xj=function(e){function t(){var e;Lj(this,t);var n=[...arguments];return e=Bj(this,t,[].concat(n)),qj(e,`state`,{isAnimationFinished:!1}),qj(e,`id`,Ps(`recharts-bar-`)),qj(e,`handleAnimationEnd`,function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),t&&t()}),qj(e,`handleAnimationStart`,function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),t&&t()}),e}return Gj(t,e),zj(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=Ij(Ij(Ij({},s),e),{},{isActive:c,option:l,index:n,dataKey:i,onAnimationStart:t.handleAnimationStart,onAnimationEnd:t.handleAnimationEnd});return v.createElement(jc,Pj({className:`recharts-bar-rectangle`},Qs(t.props,e,n),{key:`rectangle-${e?.x}-${e?.y}-${e?.value}-${n}`}),v.createElement(Dj,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(ok,{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=Rs(n.x,e.x),o=Rs(n.y,e.y),s=Rs(n.width,e.width),c=Rs(n.height,e.height);return Ij(Ij({},e),{},{x:a(i),y:o(i),width:s(i),height:c(i)})}if(r===`horizontal`){var u=Rs(0,e.height)(i);return Ij(Ij({},e),{},{y:e.y+e.height-u,height:u})}var d=Rs(0,e.width)(i);return Ij(Ij({},e),{},{width:d})});return v.createElement(jc,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,KC.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=Mj(t,kj);if(!o)return null;var c=Ij(Ij(Ij(Ij(Ij({},s),{},{fill:`#eee`},o),a),Qs(e.props,t,n)),{},{onAnimationStart:e.handleAnimationStart,onAnimationEnd:e.handleAnimationEnd,dataKey:r,index:n,className:`recharts-bar-background-rectangle`});return v.createElement(Dj,Pj({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=uc(s,FC);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:aw(e,t)}},d={clipPath:e?`url(#clipPath-${t})`:null};return v.createElement(jc,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=xo(`recharts-bar`,r),h=i&&i.allowDataOverflow,g=a&&a.allowDataOverflow,_=h||g,y=(0,J.default)(f)?this.id:f;return v.createElement(jc,{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(jc,{className:`recharts-bar-rectangles`,clipPath:_?`url(#clipPath-${y})`:null},d?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(_,y),(!u||p)&&KT.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);Aj=Xj,qj(Xj,`displayName`,`Bar`),qj(Xj,`defaultProps`,{xAxisId:0,yAxisId:0,legendType:`rect`,minPointSize:0,hide:!1,data:[],layout:`vertical`,activeBar:!1,isAnimationActive:!am.isSsr,animationBegin:0,animationDuration:400,animationEasing:`ease`}),qj(Xj,`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=ww(r,n);if(!p)return null;var m=t.layout,h=n.type.defaultProps,g=h===void 0?n.props:Ij(Ij({},h),n.props),_=g.dataKey,v=g.children,y=g.minPointSize,b=m===`horizontal`?o:a,x=l?b.scale.domain():null,S=Mw({numericAxis:b}),C=uc(v,Wm);return Ij({data:d.map(function(e,t){var r,d,f,h,g,v;l?r=Tw(l[u+t],x):(r=aw(e,_),Array.isArray(r)||(r=[S,r]));var b=Oj(y,Aj.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=jw({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=ks(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=jw({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=ks(h||b)*(Math.abs(b)-Math.abs(h));h+=ee}}return Ij(Ij(Ij({},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:[Vw(n,e)],tooltipPosition:{x:d+h/2,y:f+g/2}})}),layout:m},f)});var Zj=l(fj()),Qj=l(hj());function $j(e){"@babel/helpers - typeof";return $j=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},$j(e)}function eM(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function tM(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,oM(r.key),r)}}function nM(e,t,n){return t&&tM(e.prototype,t),n&&tM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function rM(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 iM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?rM(Object(n),!0).forEach(function(t){aM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function aM(e,t,n){return t=oM(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oM(e){var t=sM(e,`string`);return $j(t)==`symbol`?t:t+``}function sM(e,t){if($j(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if($j(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var cM=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=!!dc(c,Xj);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(Vs);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=Fs(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=xw(c,i,d),j=A.scale,ee=A.realScaleType;j.domain(f).range(y),Cw(j);var te=kw(j,iM(iM({},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=iM(iM(iM({},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=zw(ne,te),!c.hide&&r===`xAxis`?u[_]+=(S?-1:1)*ne.height:c.hide||(u[_]+=(S?-1:1)*ne.width),iM(iM({},a),{},aM({},o,ne))},{})},lM=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)}},uM=function(e){var t=e.x1,n=e.y1,r=e.x2,i=e.y2;return lM({x:t,y:n},{x:r,y:i})},dM=function(){function e(t){eM(this,e),this.scale=t}return nM(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)}}])}();aM(dM,`EPS`,1e-4);var fM=function(e){var t=Object.keys(e).reduce(function(t,n){return iM(iM({},t),{},aM({},n,dM.create(e[n])))},{});return iM(iM({},t),{},{apply:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.bandAware,i=n.position;return(0,Zj.default)(e,function(e,n){return t[n].apply(e,{bandAware:r,position:i})})},isInRange:function(e){return(0,Qj.default)(e,function(e,n){return t[n].isInRange(e)})}})};function pM(e){return(e%180+180)%180}var mM=function(e){var t=e.width,n=e.height,r=pM(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)},hM=o(((e,t)=>{var n=pf(),r=Hd(),i=Ud();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})),gM=o(((e,t)=>{var n=AA();function r(e){var t=n(e),r=t%1;return t===t?r?t-r:t:0}t.exports=r})),_M=o(((e,t)=>{var n=mf(),r=pf(),i=gM(),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})),vM=o(((e,t)=>{t.exports=hM()(_M())})),yM=(0,l(ls()).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(``)}),bM=l(vM()),xM=(0,v.createContext)(void 0),SM=(0,v.createContext)(void 0),CM=(0,v.createContext)(void 0),wM=(0,v.createContext)({}),TM=(0,v.createContext)(void 0),EM=(0,v.createContext)(0),DM=(0,v.createContext)(0),OM=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=yM(i);return v.createElement(xM.Provider,{value:n},v.createElement(SM.Provider,{value:r},v.createElement(wM.Provider,{value:i},v.createElement(CM.Provider,{value:l},v.createElement(TM.Provider,{value:a},v.createElement(EM.Provider,{value:c},v.createElement(DM.Provider,{value:s},o)))))))},kM=function(){return(0,v.useContext)(TM)},AM=function(e){var t=(0,v.useContext)(xM);t??uC(!1);var n=t[e];return n??uC(!1),n},jM=function(){return Is((0,v.useContext)(xM))},MM=function(){var e=(0,v.useContext)(SM);return(0,bM.default)(e,function(e){return(0,Qj.default)(e.domain,Number.isFinite)})||Is(e)},NM=function(e){var t=(0,v.useContext)(SM);t??uC(!1);var n=t[e];return n??uC(!1),n},PM=function(){return(0,v.useContext)(CM)},FM=function(){return(0,v.useContext)(wM)},IM=function(){return(0,v.useContext)(DM)},LM=function(){return(0,v.useContext)(EM)},RM=l(lj());function zM(e){"@babel/helpers - typeof";return zM=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},zM(e)}function BM(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function VM(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,$M(r.key),r)}}function HM(e,t,n){return t&&VM(e.prototype,t),n&&VM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function UM(e,t,n){return t=qM(t),WM(e,KM()?Reflect.construct(t,n||[],qM(e).constructor):t.apply(e,n))}function WM(e,t){if(t&&(zM(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return GM(e)}function GM(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function KM(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(KM=function(){return!!e})()}function qM(e){return qM=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qM(e)}function JM(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&&YM(e,t)}function YM(e,t){return YM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},YM(e,t)}function XM(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 ZM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?XM(Object(n),!0).forEach(function(t){QM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function QM(e,t,n){return t=$M(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $M(e){var t=eN(e,`string`);return zM(t)==`symbol`?t:t+``}function eN(e,t){if(zM(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(zM(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function tN(e,t){return oN(e)||aN(e,t)||rN(e,t)||nN()}function nN(){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 rN(e,t){if(e){if(typeof e==`string`)return iN(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 iN(e,t)}}function iN(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 aN(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 oN(e){if(Array.isArray(e))return e}function sN(){return sN=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},sN.apply(this,arguments)}var cN=function(e,t){return v.isValidElement(e)?v.cloneElement(e,t):(0,X.default)(e)?e(t):v.createElement(`line`,sN({},t,{className:`recharts-reference-line-line`}))},lN=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(uj(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(uj(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 uj(c,`discard`)&&(0,RM.default)(y,function(t){return!e.isInRange(t)})?null:y}return null};function uN(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=kM(),l=AM(i),u=NM(a),d=PM();if(!c||!d)return null;var f=lN(fM({x:l.scale,y:u.scale}),Ms(t),Ms(n),r&&r.length===2,d,e.position,l.orientation,u.orientation,e);if(!f)return null;var p=tN(f,2),m=p[0],h=m.x,g=m.y,_=p[1],y=_.x,b=_.y,x=ZM(ZM({clipPath:uj(e,`hidden`)?`url(#${c})`:void 0},Z(e,!0)),{},{x1:h,y1:g,x2:y,y2:b});return v.createElement(jc,{className:xo(`recharts-reference-line`,s)},cN(o,x),wT.renderCallByParent(e,uM({x1:h,y1:g,x2:y,y2:b})))}var dN=function(e){function t(){return BM(this,t),UM(this,t,arguments)}return JM(t,e),HM(t,[{key:`render`,value:function(){return v.createElement(uN,this.props)}}])}(v.Component);QM(dN,`displayName`,`ReferenceLine`),QM(dN,`defaultProps`,{isFront:!1,ifOverflow:`discard`,xAxisId:0,yAxisId:0,fill:`none`,stroke:`#ccc`,fillOpacity:1,strokeWidth:1,position:`middle`});function fN(){return fN=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},fN.apply(this,arguments)}function pN(e){"@babel/helpers - typeof";return pN=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},pN(e)}function mN(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 hN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?mN(Object(n),!0).forEach(function(t){EN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gN(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function _N(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,DN(r.key),r)}}function vN(e,t,n){return t&&_N(e.prototype,t),n&&_N(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function yN(e,t,n){return t=CN(t),bN(e,SN()?Reflect.construct(t,n||[],CN(e).constructor):t.apply(e,n))}function bN(e,t){if(t&&(pN(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return xN(e)}function xN(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function SN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(SN=function(){return!!e})()}function CN(e){return CN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},CN(e)}function wN(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&&TN(e,t)}function TN(e,t){return TN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},TN(e,t)}function EN(e,t,n){return t=DN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DN(e){var t=ON(e,`string`);return pN(t)==`symbol`?t:t+``}function ON(e,t){if(pN(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(pN(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var kN=function(e){var t=e.x,n=e.y,r=e.xAxis,i=e.yAxis,a=fM({x:r.scale,y:i.scale}),o=a.apply({x:t,y:n},{bandAware:!0});return uj(e,`discard`)&&!a.isInRange(o)?null:o},AN=function(e){function t(){return gN(this,t),yN(this,t,arguments)}return wN(t,e),vN(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=Ms(n),s=Ms(r);if(!o||!s)return null;var c=kN(this.props);if(!c)return null;var l=c.x,u=c.y,d=this.props,f=d.shape,p=d.className,m=hN(hN({clipPath:uj(this.props,`hidden`)?`url(#${a})`:void 0},Z(this.props,!0)),{},{cx:l,cy:u});return v.createElement(jc,{className:xo(`recharts-reference-dot`,p)},t.renderDot(f,m),wT.renderCallByParent(this.props,{x:l-i,y:u-i,width:2*i,height:2*i}))}}])}(v.Component);EN(AN,`displayName`,`ReferenceDot`),EN(AN,`defaultProps`,{isFront:!1,ifOverflow:`discard`,xAxisId:0,yAxisId:0,r:10,fill:`#fff`,stroke:`#ccc`,fillOpacity:1,strokeWidth:1}),EN(AN,`renderDot`,function(e,t){return v.isValidElement(e)?v.cloneElement(e,t):(0,X.default)(e)?e(t):v.createElement(Tk,fN({},t,{cx:t.cx,cy:t.cy,className:`recharts-reference-dot-dot`}))});function jN(){return jN=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},jN.apply(this,arguments)}function MN(e){"@babel/helpers - typeof";return MN=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},MN(e)}function NN(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 PN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?NN(Object(n),!0).forEach(function(t){GN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function FN(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function IN(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,KN(r.key),r)}}function LN(e,t,n){return t&&IN(e.prototype,t),n&&IN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function RN(e,t,n){return t=HN(t),zN(e,VN()?Reflect.construct(t,n||[],HN(e).constructor):t.apply(e,n))}function zN(e,t){if(t&&(MN(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return BN(e)}function BN(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function VN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(VN=function(){return!!e})()}function HN(e){return HN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},HN(e)}function UN(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&&WN(e,t)}function WN(e,t){return WN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},WN(e,t)}function GN(e,t,n){return t=KN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KN(e){var t=qN(e,`string`);return MN(t)==`symbol`?t:t+``}function qN(e,t){if(MN(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(MN(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var JN=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=fM({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 uj(i,`discard`)&&(!d.isInRange(f)||!d.isInRange(p))?null:lM(f,p)},YN=function(e){function t(){return FN(this,t),RN(this,t,arguments)}return UN(t,e),LN(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=Ms(n),l=Ms(r),u=Ms(i),d=Ms(a),f=this.props.shape;if(!c&&!l&&!u&&!d&&!f)return null;var p=JN(c,l,u,d,this.props);if(!p&&!f)return null;var m=uj(this.props,`hidden`)?`url(#${s})`:void 0;return v.createElement(jc,{className:xo(`recharts-reference-area`,o)},t.renderRect(f,PN(PN({clipPath:m},Z(this.props,!0)),p)),wT.renderCallByParent(this.props,p))}}])}(v.Component);GN(YN,`displayName`,`ReferenceArea`),GN(YN,`defaultProps`,{isFront:!1,ifOverflow:`discard`,xAxisId:0,yAxisId:0,r:10,fill:`#ccc`,fillOpacity:.5,stroke:`none`,strokeWidth:1}),GN(YN,`renderRect`,function(e,t){return v.isValidElement(e)?v.cloneElement(e,t):(0,X.default)(e)?e(t):v.createElement(Ck,jN({},t,{className:`recharts-reference-area-rect`}))});function XN(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 ZN(e,t,n){return mM({width:e.width+t.width,height:e.height+t.height},n)}function QN(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 $N(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 eP(e,t){return XN(e,t+1)}function tP(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:XN(r,l)};var a=c,d,f=function(){return d===void 0&&(d=n(t,a)),d},p=t.coordinate,m=c===0||$N(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 nP(e){"@babel/helpers - typeof";return nP=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},nP(e)}function rP(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 iP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?rP(Object(n),!0).forEach(function(t){aP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function aP(e,t,n){return t=oP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oP(e){var t=sP(e,`string`);return nP(t)==`symbol`?t:t+``}function sP(e,t){if(nP(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(nP(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function cP(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=iP(iP({},r),{},{tickCoord:d>0?r.coordinate-d*e:r.coordinate})}else a[t]=r=iP(iP({},r),{},{tickCoord:r.coordinate});$N(e,r.tickCoord,u,s,c)&&(c=r.tickCoord-e*(u()/2+i),a[t]=iP(iP({},r),{},{isShow:!0}))},u=o-1;u>=0;u--)l(u);return a}function lP(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=iP(iP({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate}),$N(e,u.tickCoord,function(){return d},c,l)&&(l=u.tickCoord-e*(d/2+i),o[s-1]=iP(iP({},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=iP(iP({},r),{},{tickCoord:u<0?r.coordinate-u*e:r.coordinate})}else o[t]=r=iP(iP({},r),{},{tickCoord:r.coordinate});$N(e,r.tickCoord,s,c,l)&&(c=r.tickCoord+e*(s()/2+i),o[t]=iP(iP({},r),{},{isShow:!0}))},h=0;h<p;h++)m(h);return o}function uP(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)||am.isSsr)return eP(i,typeof c==`number`&&Y(c)?c:0);var f=[],p=s===`top`||s===`bottom`?`width`:`height`,m=u&&p===`width`?nh(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`?ZN(nh(i,{fontSize:t,letterSpacing:n}),m,d):nh(i,{fontSize:t,letterSpacing:n})[p]},g=i.length>=2?ks(i[1].coordinate-i[0].coordinate):1,_=QN(a,g,p);return c===`equidistantPreserveStart`?tP(g,_,h,i,o):(f=c===`preserveStart`||c===`preserveStartEnd`?lP(g,_,h,i,o,c===`preserveStartEnd`):cP(g,_,h,i,o),f.filter(function(e){return e.isShow}))}var dP=[`viewBox`],fP=[`viewBox`],pP=[`ticks`];function mP(e){"@babel/helpers - typeof";return mP=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},mP(e)}function hP(){return hP=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},hP.apply(this,arguments)}function gP(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 _P(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?gP(Object(n),!0).forEach(function(t){AP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function vP(e,t){if(e==null)return{};var n=yP(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 yP(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 bP(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function xP(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,jP(r.key),r)}}function SP(e,t,n){return t&&xP(e.prototype,t),n&&xP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function CP(e,t,n){return t=DP(t),wP(e,EP()?Reflect.construct(t,n||[],DP(e).constructor):t.apply(e,n))}function wP(e,t){if(t&&(mP(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return TP(e)}function TP(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function EP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(EP=function(){return!!e})()}function DP(e){return DP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},DP(e)}function OP(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&&kP(e,t)}function kP(e,t){return kP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kP(e,t)}function AP(e,t,n){return t=jP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jP(e){var t=MP(e,`string`);return mP(t)==`symbol`?t:t+``}function MP(e,t){if(mP(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(mP(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var NP=function(e){function t(e){var n;return bP(this,t),n=CP(this,t,[e]),n.state={fontSize:``,letterSpacing:``},n}return OP(t,e),SP(t,[{key:`shouldComponentUpdate`,value:function(e,t){var n=e.viewBox,r=vP(e,dP),i=this.props,a=i.viewBox,o=vP(i,fP);return!Hs(n,a)||!Hs(r,o)||!Hs(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=_P(_P(_P({},Z(this.props,!1)),Z(s,!1)),{},{fill:`none`});if(a===`top`||a===`bottom`){var l=+(a===`top`&&!o||a===`bottom`&&o);c=_P(_P({},c),{},{x1:t,y1:n+l*i,x2:t+r,y2:n+l*i})}else{var u=+(a===`left`&&!o||a===`right`&&o);c=_P(_P({},c),{},{x1:t+u*r,y1:n,x2:t+u*r,y2:n+i})}return v.createElement(`line`,hP({},c,{className:xo(`recharts-cartesian-axis-line`,(0,Ds.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=uP(_P(_P({},this.props),{},{ticks:e}),n,r),f=this.getTickTextAnchor(),p=this.getTickVerticalAnchor(),m=Z(this.props,!1),h=Z(c,!1),g=_P(_P({},m),{},{fill:`none`},Z(o,!1)),_=d.map(function(e,n){var r=i.getTickLineCoord(e),a=r.line,_=r.tick,y=_P(_P(_P(_P({textAnchor:f,verticalAnchor:p},m),{},{stroke:`none`,fill:s},h),_),{},{index:n,payload:e,visibleTicksCount:d.length,tickFormatter:l});return v.createElement(jc,hP({className:`recharts-cartesian-axis-tick`,key:`tick-${e.value}-${e.coordinate}-${e.tickCoord}`},Qs(i.props,e,n)),o&&v.createElement(`line`,hP({},g,a,{className:xo(`recharts-cartesian-axis-tick-line`,(0,Ds.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=vP(s,pP),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(jc,{className:xo(`recharts-cartesian-axis`,o),ref:function(t){e.layerReference=t}},n&&this.renderAxisLine(),this.renderTicks(u,this.state.fontSize,this.state.letterSpacing),wT.renderCallByParent(this.props))}}],[{key:`renderTickItem`,value:function(e,t,n){var r,i=xo(t.className,`recharts-cartesian-axis-tick-value`);return r=v.isValidElement(e)?v.cloneElement(e,_P(_P({},t),{},{className:i})):(0,X.default)(e)?e(_P(_P({},t),{},{className:i})):v.createElement(Jh,hP({},t,{className:`recharts-cartesian-axis-tick-value`}),n),r}}])}(v.Component);AP(NP,`displayName`,`CartesianAxis`),AP(NP,`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 PP=[`x1`,`y1`,`x2`,`y2`,`key`],FP=[`offset`];function IP(e){"@babel/helpers - typeof";return IP=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},IP(e)}function LP(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 RP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?LP(Object(n),!0).forEach(function(t){zP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}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 IP(t)==`symbol`?t:t+``}function VP(e,t){if(IP(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(IP(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function HP(){return HP=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},HP.apply(this,arguments)}function UP(e,t){if(e==null)return{};var n=WP(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 WP(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 GP=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 KP(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(UP(t,PP),!1);c.offset;var l=UP(c,FP);n=v.createElement(`line`,HP({},l,{x1:r,y1:i,x2:a,y2:o,fill:`none`,key:s}))}return n}function qP(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 KP(i,RP(RP({},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 JP(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 KP(i,RP(RP({},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 YP(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 XP(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 ZP=function(e,t){var n=e.xAxis,r=e.width,i=e.height,a=e.offset;return _w(uP(RP(RP(RP({},NP.defaultProps),n),{},{ticks:vw(n,!0),viewBox:{x:0,y:0,width:r,height:i}})),a.left,a.left+a.width,t)},QP=function(e,t){var n=e.yAxis,r=e.width,i=e.height,a=e.offset;return _w(uP(RP(RP(RP({},NP.defaultProps),n),{},{ticks:vw(n,!0),viewBox:{x:0,y:0,width:r,height:i}})),a.top,a.top+a.height,t)},$P={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:`#ccc`,fill:`none`,verticalFill:[],horizontalFill:[]};function eF(e){var t=IM(),n=LM(),r=FM(),i=RP(RP({},e),{},{stroke:e.stroke??$P.stroke,fill:e.fill??$P.fill,horizontal:e.horizontal??$P.horizontal,horizontalFill:e.horizontalFill??$P.horizontalFill,vertical:e.vertical??$P.vertical,verticalFill:e.verticalFill??$P.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=jM(),p=MM();if(!Y(s)||s<=0||!Y(c)||c<=0||!Y(a)||a!==+a||!Y(o)||o!==+o)return null;var m=i.verticalCoordinatesGenerator||ZP,h=i.horizontalCoordinatesGenerator||QP,g=i.horizontalPoints,_=i.verticalPoints;if((!g||!g.length)&&(0,X.default)(h)){var y=u&&u.length,b=h({yAxis:p?RP(RP({},p),{},{ticks:y?u:p.ticks}):void 0,width:t,height:n,offset:r},y?!0:l);`${IP(b)}`,Array.isArray(b)&&(g=b)}if((!_||!_.length)&&(0,X.default)(m)){var x=d&&d.length,S=m({xAxis:f?RP(RP({},f),{},{ticks:x?d:f.ticks}):void 0,width:t,height:n,offset:r},x?!0:l);`${IP(S)}`,Array.isArray(S)&&(_=S)}return v.createElement(`g`,{className:`recharts-cartesian-grid`},v.createElement(GP,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),v.createElement(qP,HP({},i,{offset:r,horizontalPoints:g,xAxis:f,yAxis:p})),v.createElement(JP,HP({},i,{offset:r,verticalPoints:_,xAxis:f,yAxis:p})),v.createElement(YP,HP({},i,{horizontalPoints:g})),v.createElement(XP,HP({},i,{verticalPoints:_})))}eF.displayName=`CartesianGrid`;var tF=[`type`,`layout`,`connectNulls`,`ref`],nF=[`key`];function rF(e){"@babel/helpers - typeof";return rF=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},rF(e)}function iF(e,t){if(e==null)return{};var n=aF(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 aF(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 oF(){return oF=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},oF.apply(this,arguments)}function sF(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 cF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?sF(Object(n),!0).forEach(function(t){TF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sF(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lF(e){return pF(e)||fF(e)||dF(e)||uF()}function uF(){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 dF(e,t){if(e){if(typeof e==`string`)return mF(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 mF(e,t)}}function fF(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function pF(e){if(Array.isArray(e))return mF(e)}function mF(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 hF(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function gF(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,EF(r.key),r)}}function _F(e,t,n){return t&&gF(e.prototype,t),n&&gF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function vF(e,t,n){return t=SF(t),yF(e,xF()?Reflect.construct(t,n||[],SF(e).constructor):t.apply(e,n))}function yF(e,t){if(t&&(rF(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return bF(e)}function bF(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function xF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xF=function(){return!!e})()}function SF(e){return SF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},SF(e)}function CF(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&&wF(e,t)}function wF(e,t){return wF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wF(e,t)}function TF(e,t,n){return t=EF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EF(e){var t=DF(e,`string`);return rF(t)==`symbol`?t:t+``}function DF(e,t){if(rF(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(rF(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var OF=function(e){function t(){var e;hF(this,t);var n=[...arguments];return e=vF(this,t,[].concat(n)),TF(e,`state`,{isAnimationFinished:!0,totalLength:0}),TF(e,`generateSimpleStrokeDasharray`,function(e,t){return`${t}px ${e-t}px`}),TF(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(lF(i.slice(0,u)),[s-d]);break}var f=l.length%2==0?[0,c]:[c];return[].concat(lF(t.repeat(i,o)),lF(l),f).map(function(e){return`${e}px`}).join(`, `)}),TF(e,`id`,Ps(`recharts-line-`)),TF(e,`pathRef`,function(t){e.mainCurve=t}),TF(e,`handleAnimationEnd`,function(){e.setState({isAnimationFinished:!0}),e.props.onAnimationEnd&&e.props.onAnimationEnd()}),TF(e,`handleAnimationStart`,function(){e.setState({isAnimationFinished:!1}),e.props.onAnimationStart&&e.props.onAnimationStart()}),e}return CF(t,e),_F(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=uc(s,FC);if(!c)return null;var l=function(e,t){return{x:e.x,y:e.y,value:e.value,errorVal:aw(e.payload,t)}},u={clipPath:e?`url(#clipPath-${t})`:null};return v.createElement(jc,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=cF(cF(cF({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(jc,oF({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=cF(cF(cF({},Z(iF(i,tF),!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(xE,oF({},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(ok,{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=Rs(r.x,e.x),a=Rs(r.y,e.y);return cF(cF({},e),{},{x:i(o),y:a(o)})}if(d){var c=Rs(f*2,e.x),l=Rs(p/2,e.y);return cF(cF({},e),{},{x:c(o),y:l(o)})}return cF(cF({},e),{},{x:e.x,y:e.y})});return n.renderCurveStatically(c,e,t)}var l=Rs(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,KC.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=xo(`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=(hc(n)?n:{}).clipDot,D=E===void 0||E,O=C*2+T;return v.createElement(jc,{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)&&KT.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(lF(e),[0]),r=[],i=0;i<t;++i)r=[].concat(lF(r),lF(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=iF(t,nF),a=xo(`recharts-line-dot`,typeof e==`boolean`?``:e.className);n=v.createElement(Tk,oF({key:r},i,{className:a}))}return n}}])}(v.PureComponent);TF(OF,`displayName`,`Line`),TF(OF,`defaultProps`,{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:`line`,stroke:`#3182bd`,strokeWidth:1,fill:`#fff`,points:[],isAnimationActive:!am.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,hide:!1,label:!1}),TF(OF,`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 cF({points:c.map(function(e,t){var c=aw(e,o);return u===`horizontal`?{x:Aw({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:Aw({axis:r,ticks:a,bandSize:s,entry:e,index:t}),value:c,payload:e}}),layout:u},l)});var kF=[`layout`,`type`,`stroke`,`connectNulls`,`isRange`,`ref`],AF=[`key`],jF;function MF(e){"@babel/helpers - typeof";return MF=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},MF(e)}function NF(e,t){if(e==null)return{};var n=PF(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 PF(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 FF(){return FF=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},FF.apply(this,arguments)}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&&(MF(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 MF(t)==`symbol`?t:t+``}function XF(e,t){if(MF(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(MF(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var ZF=function(e){function t(){var e;RF(this,t);var n=[...arguments];return e=VF(this,t,[].concat(n)),JF(e,`state`,{isAnimationFinished:!0}),JF(e,`id`,Ps(`recharts-area-`)),JF(e,`handleAnimationEnd`,function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),(0,X.default)(t)&&t()}),JF(e,`handleAnimationStart`,function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),(0,X.default)(t)&&t()}),e}return KF(t,e),BF(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=LF(LF(LF({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(jc,FF({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,UC.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,UC.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,UC.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,UC.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=NF(i,kF);return v.createElement(jc,{clipPath:n?`url(#clipPath-${r})`:null},v.createElement(xE,FF({},Z(u,!0),{points:e,connectNulls:c,type:o,baseLine:t,layout:a,stroke:`none`,className:`recharts-area-area`})),s!==`none`&&v.createElement(xE,FF({},Z(this.props,!1),{className:`recharts-area-curve`,layout:a,type:o,connectNulls:c,fill:`none`,points:e})),s!==`none`&&l&&v.createElement(xE,FF({},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(ok,{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=Rs(r.x,e.x),a=Rs(r.y,e.y);return LF(LF({},e),{},{x:i(o),y:a(o)})}return e}),l=Y(a)&&typeof a==`number`?Rs(p,a)(o):(0,J.default)(a)||(0,Es.default)(a)?Rs(p,0)(o):a.map(function(e,t){var n=Math.floor(t*s);if(p[n]){var r=p[n],i=Rs(r.x,e.x),a=Rs(r.y,e.y);return LF(LF({},e),{},{x:i(o),y:a(o)})}return e});return n.renderAreaStatically(c,l,e,t)}return v.createElement(jc,null,v.createElement(`defs`,null,v.createElement(`clipPath`,{id:`animationClipPath-${t}`},n.renderClipRect(o))),v.createElement(jc,{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,KC.default)(s,r)||!(0,KC.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=xo(`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=(hc(n)?n:{}).clipDot,D=E===void 0||E,O=C*2+T;return v.createElement(jc,{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)&&KT.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);jF=ZF,JF(ZF,`displayName`,`Area`),JF(ZF,`defaultProps`,{stroke:`#3182bd`,fill:`#3182bd`,fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:`line`,connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!am.isSsr,animationBegin:0,animationDuration:1500,animationEasing:`ease`}),JF(ZF,`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]}),JF(ZF,`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=jF.getBaseValue(t,n,r,i),g=p===`horizontal`,_=!1,v=d.map(function(e,t){var n;m?n=l[u+t]:(n=aw(e,c),Array.isArray(n)?_=!0:n=[h,n]);var d=n[1]==null||m&&aw(e,c)==null;return g?{x:Aw({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:Aw({axis:i,ticks:o,bandSize:s,entry:e,index:t}),value:n,payload:e}});return LF({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)}),JF(ZF,`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=xo(`recharts-area-dot`,typeof e==`boolean`?``:e.className),i=t.key,a=NF(t,AF);n=v.createElement(Tk,FF({},a,{key:i,className:r}))}return n});function QF(e){"@babel/helpers - typeof";return QF=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},QF(e)}function $F(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function eI(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,uI(r.key),r)}}function tI(e,t,n){return t&&eI(e.prototype,t),n&&eI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function nI(e,t,n){return t=oI(t),rI(e,aI()?Reflect.construct(t,n||[],oI(e).constructor):t.apply(e,n))}function rI(e,t){if(t&&(QF(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 aI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(aI=function(){return!!e})()}function oI(e){return oI=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oI(e)}function sI(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&&cI(e,t)}function cI(e,t){return cI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cI(e,t)}function lI(e,t,n){return t=uI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uI(e){var t=dI(e,`string`);return QF(t)==`symbol`?t:t+``}function dI(e,t){if(QF(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(QF(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var fI=function(e){function t(){return $F(this,t),nI(this,t,arguments)}return sI(t,e),tI(t,[{key:`render`,value:function(){return null}}])}(v.Component);lI(fI,`displayName`,`ZAxis`),lI(fI,`defaultProps`,{zAxisId:0,range:[64,64],scale:`auto`,type:`number`});var pI=[`option`,`isActive`];function mI(){return mI=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},mI.apply(this,arguments)}function hI(e,t){if(e==null)return{};var n=gI(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 gI(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 _I(e){var t=e.option,n=e.isActive,r=hI(e,pI);return typeof t==`string`?v.createElement(vA,mI({option:v.createElement(zu,mI({type:t},r)),isActive:n,shapeType:`symbols`},r)):v.createElement(vA,mI({option:t,isActive:n,shapeType:`symbols`},r))}function vI(e){"@babel/helpers - typeof";return vI=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},vI(e)}function yI(){return yI=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},yI.apply(this,arguments)}function bI(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 xI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?bI(Object(n),!0).forEach(function(t){MI(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bI(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function SI(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function CI(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,NI(r.key),r)}}function wI(e,t,n){return t&&CI(e.prototype,t),n&&CI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function TI(e,t,n){return t=kI(t),EI(e,OI()?Reflect.construct(t,n||[],kI(e).constructor):t.apply(e,n))}function EI(e,t){if(t&&(vI(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return DI(e)}function DI(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function OI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(OI=function(){return!!e})()}function kI(e){return kI=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},kI(e)}function AI(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&&jI(e,t)}function jI(e,t){return jI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},jI(e,t)}function MI(e,t,n){return t=NI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NI(e){var t=PI(e,`string`);return vI(t)==`symbol`?t:t+``}function PI(e,t){if(vI(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(vI(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var FI=function(e){function t(){var e;SI(this,t);var n=[...arguments];return e=TI(this,t,[].concat(n)),MI(e,`state`,{isAnimationFinished:!1}),MI(e,`handleAnimationEnd`,function(){e.setState({isAnimationFinished:!0})}),MI(e,`handleAnimationStart`,function(){e.setState({isAnimationFinished:!1})}),MI(e,`id`,Ps(`recharts-scatter-`)),e}return AI(t,e),wI(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=xI(xI({},o),e);return v.createElement(jc,yI({className:`recharts-scatter-symbol`,key:`symbol-${e?.cx}-${e?.cy}-${e?.size}-${n}`},Qs(t.props,e,n),{role:`img`}),v.createElement(_I,yI({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(ok,{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=Rs(n.cx,e.cx),a=Rs(n.cy,e.cy),o=Rs(n.size,e.size);return xI(xI({},e),{},{cx:i(r),cy:a(r),size:o(r)})}var s=Rs(0,e.size);return xI(xI({},e),{},{size:s(r)})});return v.createElement(jc,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,KC.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=uc(i,FC);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:aw(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=Bs(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=xI(xI(xI({},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(xE,yI({},h,{type:i})),v.createElement(jc,{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=xo(`recharts-scatter`,i),h=a&&a.allowDataOverflow,g=o&&o.allowDataOverflow,_=h||g,y=(0,J.default)(d)?this.id:d;return v.createElement(jc,{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(jc,{key:`recharts-scatter-symbols`},this.renderSymbols()),(!f||p)&&KT.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);MI(FI,`displayName`,`Scatter`),MI(FI,`defaultProps`,{xAxisId:0,yAxisId:0,zAxisId:0,legendType:`circle`,lineType:`joint`,lineJointType:`linear`,data:[],shape:`circle`,hide:!1,isAnimationActive:!am.isSsr,animationBegin:0,animationDuration:400,animationEasing:`linear`}),MI(FI,`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=uc(i.props.children,Wm),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:fI.defaultProps.range,h=m&&m[0],g=t.scale.bandwidth?t.scale.bandwidth():0,_=n.scale.bandwidth?n.scale.bandwidth():0;return xI({points:a.map(function(e,a){var c=aw(e,d),m=aw(e,f),v=!(0,J.default)(p)&&aw(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=Aw({axis:t,ticks:o,bandSize:g,entry:e,index:a,dataKey:d}),x=Aw({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 xI(xI({},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 II(e){"@babel/helpers - typeof";return II=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},II(e)}function LI(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function RI(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,JI(r.key),r)}}function zI(e,t,n){return t&&RI(e.prototype,t),n&&RI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function BI(e,t,n){return t=WI(t),VI(e,UI()?Reflect.construct(t,n||[],WI(e).constructor):t.apply(e,n))}function VI(e,t){if(t&&(II(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return HI(e)}function HI(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function UI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(UI=function(){return!!e})()}function WI(e){return WI=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},WI(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&&KI(e,t)}function KI(e,t){return KI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},KI(e,t)}function qI(e,t,n){return t=JI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JI(e){var t=YI(e,`string`);return II(t)==`symbol`?t:t+``}function YI(e,t){if(II(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(II(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function XI(){return XI=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},XI.apply(this,arguments)}function ZI(e){var t=e.xAxisId,n=IM(),r=LM(),i=AM(t);return i==null?null:v.createElement(NP,XI({},i,{className:xo(`recharts-${i.axisType} ${i.axisType}`,i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(e){return vw(e,!0)}}))}var QI=function(e){function t(){return LI(this,t),BI(this,t,arguments)}return GI(t,e),zI(t,[{key:`render`,value:function(){return v.createElement(ZI,this.props)}}])}(v.Component);qI(QI,`displayName`,`XAxis`),qI(QI,`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 $I(e){"@babel/helpers - typeof";return $I=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},$I(e)}function eL(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function tL(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,dL(r.key),r)}}function nL(e,t,n){return t&&tL(e.prototype,t),n&&tL(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function rL(e,t,n){return t=sL(t),iL(e,oL()?Reflect.construct(t,n||[],sL(e).constructor):t.apply(e,n))}function iL(e,t){if(t&&($I(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return aL(e)}function aL(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function oL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(oL=function(){return!!e})()}function sL(e){return sL=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sL(e)}function cL(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&&lL(e,t)}function lL(e,t){return lL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lL(e,t)}function uL(e,t,n){return t=dL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dL(e){var t=fL(e,`string`);return $I(t)==`symbol`?t:t+``}function fL(e,t){if($I(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if($I(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function pL(){return pL=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},pL.apply(this,arguments)}var mL=function(e){var t=e.yAxisId,n=IM(),r=LM(),i=NM(t);return i==null?null:v.createElement(NP,pL({},i,{className:xo(`recharts-${i.axisType} ${i.axisType}`,i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(e){return vw(e,!0)}}))},hL=function(e){function t(){return eL(this,t),rL(this,t,arguments)}return cL(t,e),nL(t,[{key:`render`,value:function(){return v.createElement(mL,this.props)}}])}(v.Component);uL(hL,`displayName`,`YAxis`),uL(hL,`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 gL(e){return bL(e)||yL(e)||vL(e)||_L()}function _L(){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 vL(e,t){if(e){if(typeof e==`string`)return xL(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 xL(e,t)}}function yL(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function bL(e){if(Array.isArray(e))return xL(e)}function xL(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 SL=function(e,t,n,r,i){var a=uc(e,dN),o=uc(e,AN),s=[].concat(gL(a),gL(o)),c=uc(e,YN),l=`${r}Id`,u=r[0],d=t;if(s.length&&(d=s.reduce(function(e,t){if(t.props[l]===n&&uj(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&&uj(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},CL=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,wL=`recharts.syncMouseEvents`;function TL(e){"@babel/helpers - typeof";return TL=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},TL(e)}function EL(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function DL(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,AL(r.key),r)}}function OL(e,t,n){return t&&DL(e.prototype,t),n&&DL(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function kL(e,t,n){return t=AL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AL(e){var t=jL(e,`string`);return TL(t)==`symbol`?t:t+``}function jL(e,t){if(TL(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(TL(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var ML=function(){function e(){EL(this,e),kL(this,`activeIndex`,0),kL(this,`coordinateList`,[]),kL(this,`layout`,`horizontal`)}return OL(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 NL(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 PL(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 FL(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,a=e.endAngle;return{points:[Xw(t,n,r,i),Xw(t,n,r,a)],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}function IL(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=Xw(s,c,l,d),p=Xw(s,c,u,d);r=f.x,i=f.y,a=p.x,o=p.y}else return FL(t)}return[{x:r,y:i},{x:a,y:o}]}function LL(e){"@babel/helpers - typeof";return LL=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},LL(e)}function RL(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 zL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?RL(Object(n),!0).forEach(function(t){BL(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function BL(e,t,n){return t=VL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VL(e){var t=HL(e,`string`);return LL(t)==`symbol`?t:t+``}function HL(e,t){if(LL(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(LL(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function UL(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=xE;if(u===`ScatterChart`)f=i,p=Lk;else if(u===`BarChart`)f=PL(l,i,o,c),p=Ck;else if(l===`radial`){var m=FL(i),h=m.cx,g=m.cy,_=m.radius;f={cx:h,cy:g,startAngle:m.startAngle,endAngle:m.endAngle,innerRadius:_,outerRadius:_},p=sE}else f={points:IL(l,i,o)},p=xE;var y=zL(zL(zL(zL({stroke:`#ccc`,pointerEvents:`none`},o),f),Z(d,!1)),{},{payload:a,payloadIndex:s,className:xo(`recharts-tooltip-cursor`,d.className)});return(0,v.isValidElement)(d)?(0,v.cloneElement)(d,y):(0,v.createElement)(p,y)}var WL=[`item`],GL=[`children`,`className`,`width`,`height`,`style`,`compact`,`title`,`desc`];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(){return qL=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},qL.apply(this,arguments)}function JL(e,t){return ZL(e)||XL(e,t)||fR(e,t)||YL()}function YL(){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 XL(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 ZL(e){if(Array.isArray(e))return e}function QL(e,t){if(e==null)return{};var n=$L(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 $L(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 eR(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function tR(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,_R(r.key),r)}}function nR(e,t,n){return t&&tR(e.prototype,t),n&&tR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function rR(e,t,n){return t=sR(t),iR(e,oR()?Reflect.construct(t,n||[],sR(e).constructor):t.apply(e,n))}function iR(e,t){if(t&&(KL(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return aR(e)}function aR(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function oR(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(oR=function(){return!!e})()}function sR(e){return sR=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sR(e)}function cR(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&&lR(e,t)}function lR(e,t){return lR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lR(e,t)}function uR(e){return mR(e)||pR(e)||fR(e)||dR()}function dR(){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 fR(e,t){if(e){if(typeof e==`string`)return hR(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 hR(e,t)}}function pR(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function mR(e){if(Array.isArray(e))return hR(e)}function hR(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 gR(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?gR(Object(n),!0).forEach(function(t){$(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gR(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $(e,t,n){return t=_R(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _R(e){var t=vR(e,`string`);return KL(t)==`symbol`?t:t+``}function vR(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)}var yR={xAxis:[`bottom`,`top`],yAxis:[`left`,`right`]},bR={width:`100%`,height:`100%`},xR={x:0,y:0};function SR(e){return e}var CR=function(e,t){return t===`horizontal`?e.x:t===`vertical`?e.y:t===`centric`?e.angle:e.radius},wR=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),Xw(r.cx,r.cy,o,a)),{},{angle:a,radius:o})}var s=i.coordinate,c=r.angle;return Q(Q(Q({},r),Xw(r.cx,r.cy,s,c)),{},{angle:c,radius:s})}return xR},TR=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(uR(e),uR(n)):e},[]);return a.length>0?a:e&&e.length&&Y(r)&&Y(i)?e.slice(r,i+1):[]};function ER(e){return e===`number`?[0,`auto`]:void 0}var DR=function(e,t,n,r){var i=e.graphicalItems,a=e.tooltipAxis,o=TR(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?zs(c===void 0?o:c,a.dataKey,r):c&&c[n]||o[n];return l?[].concat(uR(i),[Vw(s,l)]):i},[])},OR=function(e,t,n,r){var i=r||{x:e.chartX,y:e.chartY},a=CR(i,n),o=e.orderedTooltipTicks,s=e.tooltipAxis,c=e.tooltipTicks,l=sw(a,o,c,s);if(l>=0&&c){var u=c[l]&&c[l].value;return{activeTooltipIndex:l,activeLabel:u,activePayload:DR(e,t,l,u),activeCoordinate:wR(n,o,l,i)}}return null},kR=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=gw(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=TR(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;NL(p.domain,g,m)&&(w=Rw(p.domain,null,g),f&&(m===`number`||v!==`auto`)&&(E=ow(S,h,`category`)));var D=ER(m);if(!w||w.length===0){var O=p.domain??D;if(h){if(w=ow(S,h,m),m===`category`&&f){var k=Ls(w);_&&k?(T=w,w=(0,VA.default)(0,C)):_||(w=Bw(O,w,n).reduce(function(e,t){return e.indexOf(t)>=0?e:[].concat(uR(e),[t])},[]))}else if(m===`category`)w=_?w.filter(function(e){return e!==``&&!(0,J.default)(e)}):Bw(O,w,n).reduce(function(e,t){return e.indexOf(t)>=0||t===``||(0,J.default)(t)?e:[].concat(uR(e),[t])},[]);else if(m===`number`){var A=mw(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=ow(S,h,`category`))}else w=f?(0,VA.default)(0,C):o&&o[x]&&o[x].hasStack&&m===`number`?d===`expand`?[0,1]:Fw(o[x].stackGroups,s,c):hw(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=SL(u,w,x,i,y),O&&(w=Rw(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})))},{})},AR=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=TR(e.data,{graphicalItems:n,dataStartIndex:s,dataEndIndex:c}),f=d.length,p=gw(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=ER(`number`);if(!e[h]){m++;var _;return p?_=(0,VA.default)(0,f):o&&o[h]&&o[h].hasStack?(_=Fw(o[h].stackGroups,s,c),_=SL(u,_,h,i)):(_=Rw(g,hw(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),_=SL(u,_,h,i)),Q(Q({},e),{},$({},h,Q(Q({axisType:i},r.defaultProps),{},{hide:!0,orientation:(0,Ds.default)(yR,`${i}.${m%2}`,null),domain:_,originalDomain:g,isCategorical:p,layout:l})))}return e},{})},jR=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=uc(l,i),f={};return d&&d.length?f=kR(e,{axes:d,graphicalItems:a,axisType:r,axisIdKey:u,stackGroups:o,dataStartIndex:s,dataEndIndex:c}):a&&a.length&&(f=AR(e,{Axis:i,graphicalItems:a,axisType:r,axisIdKey:u,stackGroups:o,dataStartIndex:s,dataEndIndex:c})),f},MR=function(e){var t=Is(e),n=vw(t,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:(0,hp.default)(n,function(e){return e.coordinate}),tooltipAxis:t,tooltipAxisBandSize:zw(t,n)}},NR=function(e){var t=e.children,n=e.defaultShowTooltip,r=dc(t,sj),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}},PR=function(e){return!e||!e.length?!1:e.some(function(e){var t=oc(e&&e.type);return t&&t.indexOf(`Bar`)>=0})},FR=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`}},IR=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=dc(u,sj),p=dc(u,qf),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,Ds.default)(e,`${r}`)+n.height)):e},{top:d.top||0,bottom:d.bottom||0})),m),g=h.bottom;f&&(h.bottom+=f.props.height||sj.defaultProps.height),p&&t&&(h=dw(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)})},LR=function(e,t){if(t===`xAxis`)return e[t].width;if(t===`yAxis`)return e[t].height},RR=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=FR(u),h=m.numericAxisName,g=m.cateAxisName,_=PR(n),v=[];return n.forEach(function(n,m){var y=TR(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`)&&uC(!1);var a=r[i];return Q(Q({},e),{},$($({},n.axisType,a),`${n.axisType}Ticks`,vw(a)))},{}),E=T[g],D=T[`${g}Ticks`],O=r&&r[C]&&r[C].hasStack&&Nw(n,r[C].stackGroups),k=oc(n.type).indexOf(`Bar`)>=0,A=zw(E,D),j=[],ee=_&&lw({barSize:l,stackGroups:r,totalSize:LR(T,g)});if(k){var te=(0,J.default)(S)?p:S,ne=zw(E,D,!0)??te??0;j=uw({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:xc(n,e.children),item:n})}),v},f=function(e,r){var i=e.props,a=e.dataStartIndex,o=e.dataEndIndex,c=e.updateId;if(!fc({props:i}))return null;var u=i.children,f=i.layout,p=i.stackOffset,m=i.data,h=i.reverseStackOrder,g=FR(f),_=g.numericAxisName,v=g.cateAxisName,y=uc(u,n),b=Ow(m,y,`${_}Id`,`${v}Id`,p,h),x=s.reduce(function(e,t){var n=`${t.axisType}Map`;return Q(Q({},e),{},$({},n,jR(i,Q(Q({},t),{},{graphicalItems:y,stackGroups:t.axisType===_&&b,dataStartIndex:a,dataEndIndex:o}))))},{}),S=IR(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=MR(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 eR(this,n),r=rR(this,n,[e]),$(r,`eventEmitterSymbol`,Symbol(`rechartsEventEmitter`)),$(r,`accessibilityManager`,new ML),$(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=bc(e),n=(0,Ds.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&&CL.emit(wL,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=DR(r.state,r.props.data,u),x=m[u]?{x:n===`horizontal`?m[u].coordinate:_,y:n===`horizontal`?v:m[u].coordinate}:xR;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(UL,{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,Ds.default)(e,`type.axisType`),a=(0,Ds.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:xo(i,c.className),key:e.key||`${t}-${n}`,ticks:vw(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=Is(s),u=Is(c),d=u.cx,f=u.cy,p=u.innerRadius,m=u.outerRadius;return(0,v.cloneElement)(e,{polarAngles:Array.isArray(i)?i:vw(u,!0).map(function(e){return e.coordinate}),polarRadius:Array.isArray(a)?a:vw(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=HC({children:n,formattedGraphicalItems:e,legendWidth:i-(o.left||0)-(o.right||0),legendContent:c});if(!s)return null;var l=s.item,u=QL(s,WL);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=dc(t,wm);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:bw(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:cw(t.item),strokeWidth:2,stroke:`#fff`,payload:r.payload,value:r.value},Z(u,!1)),Xs(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=dc(d,wm),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:bw(r.handleItemMouseEnter,e.props.onClick)}:a!==`axis`&&(w={onMouseLeave:bw(r.handleItemMouseLeave,e.props.onMouseLeave),onMouseEnter:bw(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=zs(m,k,u),O=h&&g&&zs(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(uR(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:SR,once:!0},ReferenceArea:{handler:r.renderReferenceElement},ReferenceLine:{handler:SR},ReferenceDot:{handler:r.renderReferenceElement},XAxis:{handler:SR},YAxis:{handler:SR},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??Ps(`recharts`)}-clip`,r.throttleTriggeredAfterMouseMove=(0,Am.default)(r.triggeredAfterMouseMove,e.throttleDelay??1e3/60),r.state={},r}return cR(n,e),nR(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=dc(t,wm);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=DR(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){_c([dc(e.children,wm)],[dc(this.props.children,wm)])||this.displayDefaultTooltip()}},{key:`componentWillUnmount`,value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:`getTooltipEventType`,value:function(){var e=dc(this.props.children,wm);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=rh(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=OR(this.state,this.props.data,this.props.layout,o);if(u!==`axis`&&c&&l){var f=Is(c).scale,p=Is(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=Is(c);return tT({x:i,y:a},u)}return null}},{key:`parseEventsOfWrapper`,value:function(){var e=this.props.children,t=this.getTooltipEventType(),n=dc(e,wm),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({},Xs(this.props,this.handleOuterEvent)),r)}},{key:`addListener`,value:function(){CL.on(wL,this.handleReceiveSyncEvent)}},{key:`removeListener`,value:function(){CL.removeListener(wL,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===oc(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=JL(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=JL(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=oc(c.type);if(u===`Bar`){var d=(s.data||[]).find(function(t){return xk(e,t)});if(d)return{graphicalItem:o,payload:d}}else if(u===`RadialBar`){var f=(s.data||[]).find(function(t){return tT(e,t)});if(f)return{graphicalItem:o,payload:f}}else if(yA(o,r)||bA(o,r)||xA(o,r)){var p=OA({graphicalItem:o,activeTooltipItem:r,itemData:l.data}),m=l.activeIndex===void 0?p:l.activeIndex;return{graphicalItem:Q(Q({},o),{},{childIndex:m}),payload:xA(o,r)?l.data[p]:o.props.data[p]}}}return null}},{key:`render`,value:function(){var e=this;if(!fc(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(QL(t,GL),!1);if(s)return v.createElement(OM,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},v.createElement(Ec,qL({},u,{width:i,height:a,title:c,desc:l}),this.renderClipPath(),yc(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(OM,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},v.createElement(`div`,qL({className:xo(`recharts-wrapper`,r),style:Q({position:`relative`,cursor:`default`,width:i,height:a},o)},d,{ref:function(t){e.container=t}}),v.createElement(Ec,qL({},u,{width:i,height:a,title:c,desc:l,style:bR}),this.renderClipPath(),yc(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=NR(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||!Hs(l,t.prevMargin)){var m=NR(e),h={chartX:t.chartX,chartY:t.chartY,isTooltipActive:t.isTooltipActive},g=Q(Q({},OR(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(!_c(i,t.prevChildren)){var v=dc(i,sj),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(Tk,t);return v.createElement(jc,{className:`recharts-active-dot`,key:n},r)});var m=(0,v.forwardRef)(function(e,t){return v.createElement(p,qL({},e,{ref:t}))});return m.displayName=p.displayName,m},zR=RR({chartName:`BarChart`,GraphicalChild:Xj,defaultTooltipEventType:`axis`,validateTooltipEventTypes:[`axis`,`item`],axisComponents:[{axisType:`xAxis`,AxisComp:QI},{axisType:`yAxis`,AxisComp:hL}],formatAxisMap:cM}),BR=RR({chartName:`ComposedChart`,GraphicalChild:[OF,ZF,Xj,FI],axisComponents:[{axisType:`xAxis`,AxisComp:QI},{axisType:`yAxis`,AxisComp:hL},{axisType:`zAxis`,AxisComp:fI}],formatAxisMap:cM}),VR=[`#3987e5`,`#d95926`,`#199e70`,`#c98500`,`#d55181`,`#008300`,`#9085e9`,`#e66767`],HR={good:`#0ca30c`,warn:`#fab219`,serious:`#ec835a`,crit:`#d03b3b`};function UR({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:Ca(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 WR({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 GR({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)(Um,{width:`100%`,height:`100%`,children:(0,F.jsxs)(BR,{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)(eF,{vertical:!1}),(0,F.jsx)(QI,{dataKey:`t`,type:m?`category`:`number`,domain:[`dataMin`,`dataMax`],scale:m?`auto`:`time`,tickFormatter:e=>wa(e,p),tickLine:!1,axisLine:{stroke:`#2a2a35`},minTickGap:40}),(0,F.jsx)(hL,{tickFormatter:i||(e=>r(e)),tickLine:!1,axisLine:!1,width:60,allowDecimals:!0,domain:l}),(0,F.jsx)(wm,{content:(0,F.jsx)(UR,{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)(ZF,{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)(Xj,{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)(OF,{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)(ZF,{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)(dN,{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)(dN,{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)(YN,{x1:d.a,x2:d.b,fill:`#ff3d7f`,fillOpacity:.12,stroke:`#ff3d7f`,strokeOpacity:.4})]})})})}function KR({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)(WR,{series:n}),i]})]}),(0,F.jsx)(`div`,{className:`px-2 pb-2 pt-2`,children:r})]})}function qR({data:e,height:t=150,color:n=VR[0],highlight:r}){return(0,F.jsx)(`div`,{style:{height:t},children:(0,F.jsx)(Um,{width:`100%`,height:`100%`,children:(0,F.jsxs)(zR,{data:e,margin:{top:6,right:4,bottom:0,left:-18},barCategoryGap:2,children:[(0,F.jsx)(eF,{vertical:!1}),(0,F.jsx)(QI,{dataKey:`label`,tickLine:!1,axisLine:{stroke:`#2a2a35`},interval:0,tick:{fontSize:9.5}}),(0,F.jsx)(hL,{tickLine:!1,axisLine:!1,allowDecimals:!1}),(0,F.jsx)(wm,{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)(Xj,{dataKey:`count`,radius:[3,3,0,0],isAnimationActive:!1,children:e.map((e,t)=>(0,F.jsx)(Wm,{fill:r&&r(e)?HR.serious:n},t))})]})})})}function JR(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 YR=e=>e?{calls:{key:`usualCalls`,label:`Usual for this hour`,color:`#82829a`,type:`line`,dashed:!0},p95:{key:`p95Normal`,label:`Normal p95`,color:VR[1],type:`band`}}:null;function XR({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)(Bi,{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)(Gi,{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)(za,{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)(za,{text:r,className:`btn h-6 text-[11px]`})]}),(0,F.jsx)(`div`,{className:`code !text-[11.5px]`,children:r})]})]})}var ZR=[{id:``,label:`Never expires`},{id:`30`,label:`30 days`},{id:`90`,label:`90 days`},{id:`365`,label:`1 year`}];function QR({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)(H,{title:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(Xr,{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)(Ba,{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:ZR.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)(gi,{size:13}),`Create key`]}),f&&(0,F.jsx)(`span`,{className:`text-[12px] text-[#ff8a8a]`,children:f})]}),m&&(0,F.jsx)(XR,{k:m,endpoint:t,onClose:()=>h(null)})]}),(0,F.jsx)(`div`,{className:`pt-2`,children:(0,F.jsx)(Va,{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:Ca(e.expires,!0),children:e.expired?`expired`:Ca(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?Sa(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)(Si,{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)(Li,{size:13})})]})}]})})]})}var $R=[`github`,`linear`,`clickup`,`trello`],ez={github:`GitHub`,linear:`Linear`,clickup:`ClickUp`,trello:`Trello`};function tz(e=[]){let{data:t,reload:n}=P(`/api/settings/trackers`,e);return{settings:t,connected:$R.filter(e=>t?.[e]),reload:n}}var nz={open:{label:`open`,color:`#5fd38a`},closed:{label:`closed`,color:`#a78bfa`},canceled:{label:`canceled`,color:`#82829a`}};function rz({ticket:e,compact:t=!1}){let n=e.state?nz[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:ez[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)(Br,{size:11,className:`text-mute`})]})}var iz={github:`issue`,linear:`ticket`,clickup:`task`,trello:`card`};function az({provider:e,settings:t,onSaved:n}){let{msg:r,busy:i,run:a}=cz(),o=t.autoCreate===e,s=t.autoCreate&&t.autoCreate!==e?ez[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 ${ez[e]} ${iz[e]}.`:`Turned off.`))}),`Open a `,ez[e],` `,iz[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)(lz,{msg:r})]})}var oz={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 sz({provider:e,webhook:t}){let n=oz[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 cz(){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 lz=({msg:e})=>e?(0,F.jsx)(`div`,{className:`text-[12.5px]`,style:{color:e.ok?`#5fd38a`:`#ff8a8a`},children:e.text}):null;function uz({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}=cz(),f={github:{token:r,repo:a,labels:s}};return n?.source===`env`?(0,F.jsx)(fz,{p:`github`,status:(0,F.jsx)(G,{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)(fz,{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)(Li,{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)(K,{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)(K,{label:`Repository`,children:(0,F.jsx)(`input`,{className:`input mono`,placeholder:`owner/name`,value:a,onChange:e=>o(e.target.value)})}),(0,F.jsx)(K,{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)(mi,{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)(lz,{msg:l})]})]})}function dz({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}=cz();if(n?.source===`env`)return(0,F.jsx)(fz,{p:`linear`,status:(0,F.jsx)(G,{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)(fz,{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)(Li,{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)(K,{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)(mi,{size:13}),`Connect`]}),(0,F.jsx)(K,{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)(lz,{msg:l})]})]})}function fz({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 pz({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}=cz();if(n?.source===`env`)return(0,F.jsx)(fz,{p:`clickup`,status:(0,F.jsx)(G,{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)(fz,{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)(Li,{size:13}),`Disconnect`]}),children:[(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @lg:grid-cols-[1fr_1fr] gap-3`,children:[(0,F.jsx)(K,{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)(K,{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)(mi,{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)(lz,{msg:l})]})]})}function mz({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}=cz();if(n?.source===`env`)return(0,F.jsx)(fz,{p:`trello`,status:(0,F.jsx)(G,{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)(fz,{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)(Li,{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)(K,{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)(K,{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)(mi,{size:13}),`Connect`]})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @lg:grid-cols-3 gap-3`,children:[(0,F.jsx)(K,{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)(K,{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)(K,{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)(lz,{msg:_})]})]})}function hz({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)(za,{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)(za,{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 gz({settings:e,onSaved:t}){let n=`${window.location.origin}${e.webhooks.linear.path}`,[r,i]=(0,v.useState)(``),{msg:a,busy:o,run:s}=cz();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)(za,{text:n,className:`btn btn-ghost h-7`,label:``})]}),(0,F.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,F.jsx)(K,{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)(lz,{msg:a}),(0,F.jsx)(`div`,{className:`text-mute`,children:`Checked against its signature and timestamp; it never needs the dashboard password.`})]})}var _z=[{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.`}]}],vz=_z.flatMap(e=>e.items);function yz(){let e=P(`/api/settings`),t=tz(),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 bz=(e,t)=>(e||[]).filter(e=>(e.channels||[]).some(e=>e.type===t));function xz(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=bz(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`}}}function Sz({item:e,size:t=36}){return(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}1f`,border:`1px solid ${e.color}55`},children:e.mono})}function Cz(){let{id:e}=yt(),t=yz();if(t.error)return(0,F.jsx)(W,{error:t.error});if(!t.settings||!t.trackers)return(0,F.jsx)(U,{});let n=vz.find(t=>t.id===e);return e&&n&&!n.soon?(0,F.jsx)(Tz,{item:n,ctx:t}):(0,F.jsx)(wz,{ctx:t})}function wz({ctx:e}){let t=L();return(0,F.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,F.jsx)(Ma,{icon:(0,F.jsx)(hi,{size:18,className:`text-brand`}),title:`Integrations`,sub:`Connect Obzerver to the tools your team already uses.`}),_z.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=xz(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)(Sz,{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)(Dr,{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)(G,{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 Tz({item:e,ctx:t}){let n=L(),r=xz(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)(Sz,{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)(G,{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)(Ez,{provider:`github`,ctx:t}),e.id===`linear`&&(0,F.jsx)(Ez,{provider:`linear`,ctx:t}),e.id===`clickup`&&(0,F.jsx)(Ez,{provider:`clickup`,ctx:t}),e.id===`trello`&&(0,F.jsx)(Ez,{provider:`trello`,ctx:t}),e.id===`email`&&(0,F.jsx)(Dz,{ctx:t}),(e.id===`slack`||e.id===`webhook`)&&(0,F.jsx)(Oz,{type:e.id,ctx:t}),e.id===`mcp`&&(0,F.jsx)(jz,{ctx:t}),e.id===`ai`&&(t.ai?(0,F.jsx)(Mz,{ctx:t},`${t.ai.source}:${t.ai.provider}:${t.ai.apiKey}`):(0,F.jsx)(`div`,{className:`text-mute text-[12.5px]`,children:`Loading…`}))]})}function Ez({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)(H,{title:`Connection`,children:[e===`github`&&(0,F.jsx)(uz,{settings:n,onSaved:t.reload},i),e===`linear`&&(0,F.jsx)(dz,{settings:n,onSaved:t.reload},i),e===`clickup`&&(0,F.jsx)(pz,{settings:n,onSaved:t.reload},i),e===`trello`&&(0,F.jsx)(mz,{settings:n,onSaved:t.reload},i)]}),r&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(H,{title:`Automation`,children:(0,F.jsx)(az,{provider:e,settings:n,onSaved:t.reload})}),(0,F.jsx)(H,{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)(sz,{provider:e,webhook:a}),e===`github`&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`border-t border-line`}),(0,F.jsx)(hz,{settings:n})]}),e===`linear`&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`border-t border-line`}),(0,F.jsx)(gz,{settings:n,onSaved:t.reload})]})]})})]})]})}function Dz({ctx:e}){let t=L(),n=bz(e.rules,`email`);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Az,{email:e.settings.email,onSaved:e.reload}),(0,F.jsx)(H,{title:`Where it's used`,sub:`add an Email channel to an alert rule or an SLO`,children:(0,F.jsx)(kz,{rules:n,empty:(0,F.jsxs)(Na,{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 Oz({type:e,ctx:t}){let n=L(),r=bz(t.rules,e);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(H,{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)(gi,{size:13}),`Go to alert rules`]})})]})}),(0,F.jsx)(H,{title:`Where it's used`,pad:!1,children:(0,F.jsx)(`div`,{className:`pt-2`,children:(0,F.jsx)(kz,{rules:r,empty:(0,F.jsx)(Na,{title:`No alert rules use ${e===`slack`?`Slack`:`a webhook`} yet`})})})})]})}function kz({rules:e,empty:t}){let n=L();return e.length?(0,F.jsx)(Va,{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)(G,{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 Az({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)(H,{title:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(ii,{size:14}),`SMTP server`]}),sub:`used by alert rules and SLO burn alerts with an email channel`,right:e.configured?(0,F.jsxs)(G,{kind:`good`,children:[`configured`,f?` via env`:``]}):(0,F.jsx)(G,{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)(K,{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)(K,{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)(K,{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)(Ei,{size:13}),`Send test`]})]}),c&&(0,F.jsx)(`div`,{className:`text-[12.5px]`,style:{color:c.ok?`#5fd38a`:`#ff8a8a`},children:c.text})]})})}function jz({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)(H,{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)(za,{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)(za,{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)(za,{text:a,className:`btn h-6 text-[11px]`})]}),(0,F.jsx)(`div`,{className:`code`,children:a})]})]})}),(0,F.jsx)(H,{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 Mz({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)(H,{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)(H,{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)(K,{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)(K,{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)(K,{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)(Pi,{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)(H,{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 Nz(){let e=L(),t=yz();if(!t.settings||!t.trackers)return null;let n=vz.filter(e=>!e.soon);return(0,F.jsx)(H,{title:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(hi,{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)(Dr,{size:13})]}),children:(0,F.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:n.map(n=>{let r=xz(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)(Sz,{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 Pz({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)(H,{title:t,right:(0,F.jsx)(Ba,{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)(Xr,{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)(XR,{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)(za,{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)(za,{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 Fz(){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)(W,{error:r}):n?(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ma,{icon:(0,F.jsx)(Oi,{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)(Pz,{}),(0,F.jsx)(QR,{keys:n.keys,endpoint:n.endpoint,ingestRate:n.ingestRate,reload:i}),n.history&&(0,F.jsx)(H,{title:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(qr,{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?Ca(n.history.oldest,!0):`nothing yet`}),(0,F.jsx)(`div`,{className:`text-mute text-[11.5px]`,children:n.history.rolledUntil?`rolled up to ${Sa(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?`—`:xa(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)(Nz,{})]}):(0,F.jsx)(U,{})}var Iz=(e,t,n)=>`/operations/${e}/${Ea(t)}/${Ea(n)}`;function Lz(){let e=I(),t=Xa(),n=L(),r=ht(),{data:i,error:a}=P(`/api/overview${e.q()}`,[e.tick]);if(a)return(0,F.jsx)(W,{error:a});if(!i)return(0,F.jsx)(U,{});if(e.meta&&e.meta.counts.traces===0)return(0,F.jsx)(zz,{});let o=i.kpis,s=JR(i.series.points,i.band),c=YR(i.band),l=[{key:`s2xx`,label:`2xx/3xx`,color:VR[0],type:`bar`,stack:`s`},{key:`s4xx`,label:`4xx`,color:HR.warn,type:`bar`,stack:`s`},{key:`s5xx`,label:`5xx`,color:HR.crit,type:`bar`,stack:`s`},...c?[c.calls]:[]],u=[...c?[c.p95]:[],{key:`p95`,label:`p95`,color:VR[1],type:`line`},{key:`avg`,label:`Average`,color:VR[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?Ta(e,t):null;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ma,{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)(Bz,{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)(ki,{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?` · ${V(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:HR.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)(Pa,{label:`Requests`,value:V(o.requests),sub:`${V(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)(Pa,{label:`Failure rate (5xx)`,value:ba(o.failureRate),sub:`${V(o.failed)} failed · ${V(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)(Pa,{label:`p95 latency`,value:B(o.p95),sub:`p99 ${B(o.p99)}`,deltaTitle:f,deltaText:p(o.p95,d?.p95)?.text,deltaDir:p(o.p95,d?.p95)?.dir,badWhen:`up`}),(0,F.jsx)(Pa,{label:`Average latency`,value:B(o.avg),deltaTitle:f,deltaText:p(o.avg,d?.avg)?.text,deltaDir:p(o.avg,d?.avg)?.dir,badWhen:`up`}),(0,F.jsx)(Pa,{label:`Unhandled errors`,value:V(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)(Pa,{label:`Jobs`,value:V(o.jobs),sub:o.jobsFailed?`${V(o.jobsFailed)} failed (${ba(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)(KR,{title:`Throughput`,sub:`requests per bucket by status`,series:l,children:(0,F.jsx)(GR,{data:s,series:l,fmt:e=>V(e)})}),(0,F.jsx)(KR,{title:`Latency`,series:u,children:(0,F.jsx)(GR,{data:s,series:u,fmt:e=>B(e)})})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-3 gap-3`,children:[(0,F.jsx)(H,{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)(Rz,{rows:i.topByTime,metric:e=>B(e.totalTime),onRow:e=>r(n(Iz(`http`,e.service,e.name)))})}),(0,F.jsx)(H,{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)(Rz,{rows:i.slowest,metric:e=>B(e.p95),onRow:e=>r(n(Iz(`http`,e.service,e.name)))})}),(0,F.jsx)(H,{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)(Na,{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)(G,{kind:`serious`,children:`new`})]}),(0,F.jsx)(`div`,{className:`text-mute truncate text-[12px]`,children:e.message})]}),(0,F.jsx)(Fa,{data:e.spark,color:HR.crit,w:56}),(0,F.jsx)(`div`,{className:`text-right tabular-nums w-10`,children:V(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)(KR,{title:`Jobs`,sub:`runs and failures`,series:[{key:`count`,label:`Runs`,color:VR[2]},{key:`failed`,label:`Failed`,color:HR.crit}],children:(0,F.jsx)(GR,{data:i.jobSeries.points,height:150,series:[{key:`count`,label:`Runs`,color:VR[2],type:`area`},{key:`failed`,label:`Failed`,color:HR.crit,type:`line`}],fmt:e=>V(e)})})}),(0,F.jsx)(H,{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)(Va,{rows:i.runtime,empty:(0,F.jsx)(Na,{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=>ba(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?HR.serious:void 0},children:B(e.elP99)})},{key:`ts`,label:`Seen`,num:!0,render:e=>(0,F.jsx)(`span`,{className:`text-mute`,children:Sa(e.ts)})}]})})]})]})}function Rz({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)(Ra,{name:e.name}),(0,F.jsxs)(`div`,{className:`text-mute text-[11px] pl-[44px]`,children:[e.service,` · `,V(e.calls),` calls`]})]}),(0,F.jsx)(`div`,{className:`tabular-nums font-medium`,children:t(e)})]},e.service+e.name))}):(0,F.jsx)(Na,{title:`No requests in this window`})}function zz({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)(Pz,{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 Bz({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)(qr,{size:14,className:`text-[#7fb2f0] shrink-0`}),e]})}function Vz({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=>Ka.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?Ka:[`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?JR((f?d.data.jobSeries:d.data.series).points,re):[],ae=YR(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:VR[0],type:`bar`,stack:`g`},{key:`failed`,label:`Failed (resolver errors)`,color:HR.crit,type:`bar`,stack:`g`}]:f?[{key:`count`,label:`Runs`,color:VR[2],type:`bar`,stack:`a`},{key:`failed`,label:`Failed`,color:HR.crit,type:`bar`,stack:`a`}]:[{key:`s2xx`,label:`2xx/3xx`,color:VR[0],type:`bar`,stack:`s`},{key:`s4xx`,label:`4xx`,color:HR.warn,type:`bar`,stack:`s`},{key:`s5xx`,label:`5xx`,color:HR.crit,type:`bar`,stack:`s`}];ae&&ce.push(ae.calls);let le=f?[{key:`p95`,label:`Duration p95`,color:VR[1],type:`line`},{key:`queueWaitP95`,label:`Queue wait p95`,color:VR[6],type:`line`}]:[{key:`p95`,label:`p95`,color:VR[1],type:`line`},{key:`avg`,label:`Average`,color:VR[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)(Ma,{icon:f?(0,F.jsx)(Wi,{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`,role:`tablist`,"aria-label":`Request type`,children:[[`http`,`HTTP`,Gr,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:`flex items-center gap-2.5 h-11 px-4 rounded-xl border text-[14px] font-semibold transition-colors ${h===e?`border-brand/60 bg-[rgba(255,61,127,.08)] text-ink`:`border-line text-ink2 hover:bg-[#16161e]`}`,children:[(0,F.jsx)(n,{size:16,className:h===e?`text-brand`:`text-mute`}),t,r!=null&&(0,F.jsx)(`span`,{className:`text-[11.5px] font-medium px-1.5 rounded-full tabular-nums ${h===e?`bg-[rgba(255,61,127,.18)] text-ink`:`bg-[#1d1d27] text-mute`}`,children:r})]},e))}),_?.[0]?.fromHistory&&(0,F.jsx)(Bz,{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)(KR,{title:f?`Runs`:`Throughput`,series:ce,children:(0,F.jsx)(GR,{data:ie,series:ce,height:150,fmt:e=>V(e),markers:se})}),(0,F.jsx)(KR,{title:f?`Duration & queue wait`:`Latency`,series:le,children:(0,F.jsx)(GR,{data:ie,series:le,height:150,fmt:e=>B(e),markers:se})})]}),(0,F.jsxs)(H,{pad:!1,title:`${te.length}${ee&&_?` of ${_.length}`:``} ${f?`job`:g?`operation`:`route`}${(ee?_?.length:te.length)===1?``:`s`}`,right:(0,F.jsxs)(`div`,{className:`relative`,children:[(0,F.jsx)(Ti,{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:i,onChange:e=>a(e.target.value)})]}),children:[(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center 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:Ga[e]||void 0},onClick:()=>O(`method`,(x.includes(e)?x.filter(t=>t!==e):[...x,e]).join(`,`)||null),children:e},e))]})]}),(0,F.jsx)(Hz,{label:`Mean duration`,unit:`ms`,min:C,max:w,onChange:(e,t)=>D({avgMin:e,avgMax:t})}),(0,F.jsx)(Hz,{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)(Gi,{size:12}),`Clear filters`]})]}),(0,F.jsx)(`div`,{className:`pt-2`,children:u?(0,F.jsx)(W,{error:u}):_?(0,F.jsx)(Va,{rows:te,initialSort:c,initialDir:c===`name`||c===`service`?`asc`:`desc`,onRow:t=>r(n(Iz(e,t.service,t.name))),rowKey:e=>e.service+e.name,empty:g?(0,F.jsx)(Na,{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)(Na,{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)(Ra,{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)(Fa,{data:e.spark,color:VR[0],w:64,h:18})},{key:`calls`,label:f?`Runs`:`Calls`,num:!0,sort:e=>e.calls,render:e=>V(e.calls)},{key:`rpm`,label:`Per min`,num:!0,sort:e=>e.rpm,render:e=>V(e.rpm)},{key:`avg`,label:`Avg`,num:!0,sort:e=>e.avg,render:e=>B(e.avg)},{key:`p95`,label:`p95`,num:!0,sort:e=>e.p95,render:e=>B(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?HR.serious:void 0},children:B(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:ba(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:[B(e.totalTime),(0,F.jsx)(Ha,{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:Sa(e.lastSeen)})}]},c):(0,F.jsx)(U,{})})]})]})}function Hz({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 Uz={request:{color:`#3987e5`,label:`Request`,Icon:Di},job:{color:`#3987e5`,label:`Job`,Icon:Wi},middleware:{color:`#9085e9`,label:`Middleware`,Icon:Zr},handler:{color:`#199e70`,label:`Handler`,Icon:Ki},function:{color:`#d55181`,label:`Function`,Icon:_r},custom:{color:`#c98500`,label:`Custom span`,Icon:Ir},db:{color:`#d95926`,label:`Database`,Icon:zr},http:{color:`#e66767`,label:`Outbound HTTP`,Icon:Gr},graphql:{color:`#e86fc4`,label:`GraphQL operation`,Icon:yr},resolver:{color:`#b48af0`,label:`Resolver`,Icon:li}},Wz=/\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 Gz({text:e}){let t=e.replace(Wz,`
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 Kz(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 qz({spans:e,logs:t=[],highlightSelf:n=!0}){let r=(0,v.useMemo)(()=>Kz(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=>Uz[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:Uz[e].color}}),Uz[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:B(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=Uz[e.kind]||Uz.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)(Dr,{size:13}):(0,F.jsx)(Tr,{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)(Bi,{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:B(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:B(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)(Jz,{s:e})})]},e.id)})]})]})}function Jz({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`}),` `,Uz[e.kind]?.label||e.kind]}),(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`span`,{className:`text-mute`,children:`Starts at`}),` +`,B(e.start)]}),(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`span`,{className:`text-mute`,children:`Total`}),` `,B(e.duration)]}),(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`span`,{className:`text-mute`,children:`Self`}),` `,B(e.self)]}),e.count&&e.count>1&&(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`span`,{className:`text-mute`,children:`Repeated`}),` `,e.count,`× (collapsed; `,B(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)(Bi,{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)(za,{text:t.statement,className:`btn h-6 text-[11px]`})]}),(0,F.jsx)(Gz,{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 Yz(){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)(W,{error:p});if(!f)return(0,F.jsx)(U,{});let h=f.stats,g=JR(f.series.points,f.band),_=YR(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:VR[1],type:`line`},{key:`avg`,label:`Average`,color:VR[0],type:`line`},{key:`p50`,label:`Median`,color:VR[2],type:`line`,dashed:!0}],x=[{key:`count`,label:m?`Runs`:`Calls`,color:VR[0],type:`area`},{key:`failed`,label:`Failed`,color:HR.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)(Er,{size:13}),m?`Jobs`:`Requests`]}),(0,F.jsx)(Ma,{title:(0,F.jsx)(Ra,{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)(Pa,{label:m?`Runs`:`Calls`,value:V(h.calls),sub:`${V(h.rpm)} per min`,spark:g.map(e=>e.count)}),(0,F.jsx)(Pa,{label:`Failure rate`,value:ba(h.failureRate),sub:`${V(h.failed)} failed`,color:h.failureRate>1?`#ff8a8a`:void 0}),(0,F.jsx)(Pa,{label:`Average`,value:B(h.avg)}),(0,F.jsx)(Pa,{label:`p50`,value:B(h.p50)}),(0,F.jsx)(Pa,{label:`p95`,value:B(h.p95),sub:`p99 ${B(h.p99)}`}),(0,F.jsx)(Pa,{label:`Max`,value:B(h.max)})]}),f.fromHistory&&(0,F.jsx)(Bz,{note:f.fromHistory.note}),(0,F.jsx)(Xz,{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)(KR,{title:m?`Runs`:`Throughput`,series:x,children:(0,F.jsx)(GR,{data:g,series:x,fmt:e=>V(e),markers:y})}),(0,F.jsx)(KR,{title:`Latency`,sub:`is it constant or spiky? did it start at a deploy?`,series:b,children:(0,F.jsx)(GR,{data:g,series:b,fmt:e=>B(e),markers:y})})]}),m&&(0,F.jsx)(KR,{title:`Queue wait`,sub:`time from enqueue to start`,series:[{key:`queueWaitP95`,label:`p95`,color:VR[6]},{key:`queueWaitAvg`,label:`Average`,color:VR[0]}],children:(0,F.jsx)(GR,{data:g,height:140,series:[{key:`queueWaitP95`,label:`p95`,color:VR[6],type:`line`},{key:`queueWaitAvg`,label:`Average`,color:VR[0],type:`line`}],fmt:e=>B(e)})}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-3 gap-3`,children:[(0,F.jsx)(H,{title:`Where the time goes`,sub:`own time per span, averaged per execution`,pad:!1,className:`@5xl:col-span-2`,children:(0,F.jsx)(Va,{rows:f.breakdown,empty:(0,F.jsx)(Na,{title:`No span detail yet`,children:`Spans are kept for sampled, failed and slow executions.`}),cols:[{key:`n`,label:`Span`,render:e=>{let t=Uz[e.kind]||Uz.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:Uz[e.kind]?.label||e.kind})},{key:`per`,label:`Calls / exec`,num:!0,render:e=>(0,F.jsx)(`span`,{style:{color:e.perExec>=10?HR.serious:void 0},children:V(e.perExec)})},{key:`self`,label:`Self / exec`,num:!0,render:e=>(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[B(e.avgSelf),(0,F.jsx)(Ha,{value:e.avgSelf,max:S,color:VR[1],w:60})]})}]})}),(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)(H,{title:`Latency distribution`,children:(0,F.jsx)(qR,{data:f.histogram,highlight:e=>h.p95!=null&&e.le>=h.p95})}),(0,F.jsx)(H,{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)(Ia,{status:e===`none`?null:Number(e)}),(0,F.jsx)(`span`,{className:`tabular-nums text-ink2`,children:V(t)})]},e))})})]})]}),f.errors.length>0&&(0,F.jsx)(H,{title:`Errors on this operation`,pad:!1,children:(0,F.jsx)(Va,{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)(G,{kind:`neutral`,children:`handled`}):(0,F.jsx)(G,{kind:`crit`,children:`unhandled`})},{key:`n`,label:`Count`,num:!0,render:e=>V(e.n)}]})}),(0,F.jsx)(H,{pad:!1,title:`Executions`,sub:`${V(f.total)} matching`,right:(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(Ba,{value:c,onChange:e=>{l(e),d(0)},options:[{id:`all`,label:`All`},{id:`failed`,label:`Failed`},{id:`slow`,label:`≥ p95`}]}),(0,F.jsx)(Ba,{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)(Va,{rows:f.executions,onRow:e=>a(i(`/executions/${e.id}`)),empty:(0,F.jsx)(Na,{title:`No executions match`}),cols:[{key:`ts`,label:`Time`,render:e=>(0,F.jsxs)(`span`,{className:`tabular-nums`,children:[Ca(e.ts,r.rangeMs>864e5),(0,F.jsx)(`span`,{className:`text-mute ml-2 text-[11px]`,children:Sa(e.ts)})]})},{key:`st`,label:`Status`,render:e=>(0,F.jsx)(Ia,{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:B(e.duration)})},...m?[{key:`qw`,label:`Queue wait`,num:!0,render:e=>B(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/${Ea(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 `,V(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 Xz({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)(qr,{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:B(r.p95?.expected)}),` `,(0,F.jsxs)(`span`,{className:`text-mute`,children:[`(normal `,B(r.p95?.low),`–`,B(r.p95?.high),`)`]})]}),(0,F.jsxs)(`span`,{className:`text-ink2`,children:[`failures `,(0,F.jsx)(`b`,{className:`text-ink tabular-nums`,children:ba(r.failureRate?.expected??0)})]}),(0,F.jsxs)(`span`,{className:`text-ink2`,children:[(0,F.jsx)(`b`,{className:`text-ink tabular-nums`,children:V(Math.round(r.callsPerHour?.expected??0))}),` calls/hour`]}),(s||c)&&(0,F.jsx)(G,{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:B(i.p50)}),` · p95 `,(0,F.jsx)(`b`,{className:`text-ink tabular-nums`,children:B(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 Zz({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)(Qz,{f:e,open:t===0&&!!e.context},t)),!s.length&&(0,F.jsx)(`div`,{className:`text-mute`,children:`No stack frames captured.`})]})}function Qz({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)(Tr,{size:13}):(0,F.jsx)(Dr,{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 $z={error:HR.crit,fatal:HR.crit,warn:HR.warn,info:`#5aa2f0`,debug:`#82829a`,trace:`#82829a`};function eB({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?Ca(e.ts):`+${B(Math.max(0,t))}`}),(0,F.jsx)(`span`,{className:`mono shrink-0 w-[42px] text-[11px] font-semibold uppercase`,style:{color:$z[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 tB(){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:HR.crit,type:`bar`,stack:`l`},{key:`warn`,label:`Warn`,color:HR.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)(Ma,{icon:(0,F.jsx)(wi,{size:18,className:`text-brand`}),title:`Logs`,sub:`Every line is tied to the request or job that wrote it.`}),f&&(0,F.jsx)(KR,{title:`Volume by level`,series:g,children:(0,F.jsx)(GR,{data:f.series,series:g,height:120,fmt:e=>V(e)})}),(0,F.jsx)(H,{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)(Ti,{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:$z[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)(vi,{size:13}),s?`Tailing…`:`Live tail`]}),children:(0,F.jsx)(`div`,{className:`pt-2`,children:p?(0,F.jsx)(W,{error:p}):f?h.length===0?(0,F.jsx)(Na,{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)(eB,{l:e,showService:!0},e.id))}):(0,F.jsx)(U,{})})})]})}function nB(){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)(W,{error:i});if(!r)return(0,F.jsx)(U,{});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(Iz(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)(Ra,{name:s.name})}),(0,F.jsx)(Ia,{status:s.status}),s.failed?(0,F.jsx)(G,{kind:`crit`,children:`failed`}):s.status>=400?(0,F.jsx)(G,{kind:`warn`,children:`client error`}):(0,F.jsx)(G,{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:Ca(s.ts,!0)}),(0,F.jsx)(`span`,{className:`font-medium text-ink`,children:B(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/${Ea(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)(za,{text:s.traceId,label:`Trace id`}),r.worthInvestigating&&(0,F.jsx)(za,{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)(Br,{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`} (${B(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)(Pr,{size:13}),`Create issue`]})]})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @3xl:grid-cols-3 gap-3`,children:[(0,F.jsx)(H,{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)(Ua,{items:[[s.graphql?`Operation average`:`Route average`,B(c.avg)],[s.graphql?`Operation p95`:`Route p95`,B(c.p95)],[`Samples`,`${c.samples} in the surrounding 24h`],...r.usual?.p95?[[`Usual at this hour`,(0,F.jsxs)(`span`,{children:[`p95 `,B(r.usual.p95.expected),` `,(0,F.jsxs)(`span`,{className:`text-mute`,children:[`(normal up to `,B(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)(H,{title:`Host at the time`,right:m?(0,F.jsx)(G,{kind:`serious`,children:`under pressure`}):p?(0,F.jsx)(G,{kind:`good`,children:`normal`}):null,children:p?(0,F.jsx)(Ua,{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:[B(p.elP99),` `,(0,F.jsxs)(`span`,{className:`text-mute`,children:[`(avg `,B(p.baseline?.elP99),`)`]})]})],[`Memory`,xa(p.rss)]]}):(0,F.jsx)(`span`,{className:`text-mute`,children:`No runtime sample near this execution.`})}),(0,F.jsx)(H,{title:`Request`,children:(0,F.jsx)(Ua,{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`,B(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)(H,{title:`GraphQL operation`,sub:s.graphql.operation?`${s.graphql.type} ${s.graphql.operation}`:`anonymous ${s.graphql.type}`,right:s.graphql.errors?(0,F.jsxs)(G,{kind:`crit`,children:[s.graphql.errors,` resolver error`,s.graphql.errors===1?``:`s`]}):s.graphql.clientErrors?(0,F.jsxs)(G,{kind:`warn`,children:[s.graphql.clientErrors,` client error`,s.graphql.clientErrors===1?``:`s`]}):(0,F.jsx)(G,{kind:`good`,children:`no errors`}),children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)(Ua,{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:iB(s.graphql.document)})]})]})}),l&&(0,F.jsxs)(H,{title:(0,F.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(Bi,{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)(Zz,{frames:l.frames,stack:l.stack})]}),(0,F.jsx)(H,{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)(qz,{spans:r.waterfall.spans,logs:f}):(0,F.jsx)(Na,{title:`Span detail not kept`,icon:(0,F.jsx)(Ur,{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)(H,{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)(Ra,{name:e.name}),(0,F.jsx)(`span`,{className:`ml-auto`,children:(0,F.jsx)(Ia,{status:e.status})}),(0,F.jsx)(`span`,{className:`w-20 text-right tabular-nums`,children:B(e.duration)})]},e.id))})}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-3 gap-3`,children:[(0,F.jsx)(H,{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)(eB,{l:e,offset:e.offset},e.id))}):(0,F.jsx)(Na,{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)(H,{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:rB(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 rB(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function iB(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 aB(){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)(Ma,{icon:(0,F.jsx)(Wr,{size:18,className:`text-brand`}),title:`Traces`,sub:`Recent requests and jobs. Distributed traces follow the traceparent header across services.`}),(0,F.jsx)(H,{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)(Ti,{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)(Ba,{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)(W,{error:u}):l?(0,F.jsx)(Va,{rows:d,onRow:e=>n(t(`/executions/${e.id}`)),empty:(0,F.jsx)(Na,{title:`No traces match`}),cols:[{key:`t`,label:`Time`,render:e=>(0,F.jsxs)(`span`,{className:`tabular-nums`,children:[Ca(e.ts),` `,(0,F.jsx)(`span`,{className:`text-mute text-[11px] ml-1`,children:Sa(e.ts)})]})},{key:`n`,label:`Operation`,render:e=>(0,F.jsx)(Ra,{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)(Ia,{status:e.status})},{key:`d`,label:`Duration`,num:!0,render:e=>B(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)(U,{})})})]})}function oB(){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)(Ma,{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)(H,{pad:!1,title:(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(Ba,{value:r,onChange:i,options:[{id:`0`,label:`Unhandled`},{id:`1`,label:`Handled`},{id:`all`,label:`All`}]}),(0,F.jsx)(Ba,{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)(W,{error:c}):s?(0,F.jsx)(Va,{rows:s,initialSort:`count`,onRow:e=>n(t(`/errors/${e.fingerprint}`)),rowKey:e=>e.fingerprint,empty:(0,F.jsx)(Na,{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)(G,{kind:`serious`,children:`new`}),e.status!==`open`&&(0,F.jsx)(G,{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)(Ra,{name:e.operation}):`—`}),(0,F.jsx)(`div`,{className:`text-mute text-[11px]`,children:e.service})]})},{key:`trend`,label:`Trend`,render:e=>(0,F.jsx)(Fa,{data:e.spark,color:e.handled?`#82829a`:HR.crit,w:80,h:20})},{key:`count`,label:`Events`,num:!0,sort:e=>e.count,render:e=>V(e.count)},{key:`users`,label:`Users`,num:!0,sort:e=>e.users,render:e=>V(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:Sa(e.firstSeen)})},{key:`last`,label:`Last seen`,num:!0,sort:e=>e.lastSeen,render:e=>(0,F.jsx)(`span`,{className:`text-ink2`,children:Sa(e.lastSeen)})}]}):(0,F.jsx)(U,{})})})]})}var sB=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 cB(){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)(Ma,{icon:(0,F.jsx)(ki,{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)(ki,{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)(H,{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)(W,{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)(Ra,{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:[V(d.data.count),` times`]}),(0,F.jsxs)(`div`,{className:`text-ink2`,children:[`first `,(0,F.jsx)(qa,{tip:sB(d.data.firstSeen),children:Sa(d.data.firstSeen)}),d.data.firstVersion?` in ${d.data.firstVersion}`:``,` · last `,(0,F.jsx)(qa,{tip:sB(d.data.lastSeen),children:Sa(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)(Ai,{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)(Br,{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:lB(d.data.sample||``)})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{className:`text-mute mb-1`,children:`Recent occurrences`}),(0,F.jsx)(Va,{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)(qa,{tip:sB(e.ts),children:Ca(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=>V(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:lB(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)(U,{})}),(0,F.jsx)(H,{pad:!1,title:(0,F.jsx)(Ba,{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)(W,{error:c}):s?(0,F.jsx)(Va,{rows:s.groups,initialSort:`last`,rowKey:e=>e.fingerprint,onRow:e=>f(e.fingerprint),empty:(0,F.jsx)(Na,{title:a===`open`?`No secrets in your logs`:`Nothing here`,icon:(0,F.jsx)(Ai,{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)(G,{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)(Ra,{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:lB(e.sample||``)})},{key:`win`,label:`In window`,num:!0,sort:e=>e.inWindow,render:e=>V(e.inWindow)},{key:`c`,label:`Total`,num:!0,sort:e=>e.count,render:e=>V(e.count)},{key:`first`,label:`First seen`,sort:e=>e.firstSeen,render:e=>(0,F.jsxs)(`span`,{className:`text-ink2`,children:[(0,F.jsx)(qa,{tip:sB(e.firstSeen),children:Sa(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)(qa,{tip:sB(e.lastSeen),className:`text-ink2`,children:Sa(e.lastSeen)})}]}):(0,F.jsx)(U,{})})})]})}function lB(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 uB(){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)(W,{error:a});if(!i)return(0,F.jsx)(U,{});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)(G,{kind:`neutral`,children:`handled`}):(0,F.jsx)(G,{kind:`crit`,children:`unhandled`}),(0,F.jsx)(G,{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)(Ra,{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)(Pr,{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)(jr,{size:13}),`Resolve`]}),(0,F.jsxs)(`button`,{className:`btn btn-ghost`,onClick:()=>c(`ignored`),children:[(0,F.jsx)(Vr,{size:13}),`Ignore`]})]}):(0,F.jsxs)(`button`,{className:`btn`,onClick:()=>c(`open`),children:[(0,F.jsx)(xi,{size:13}),`Reopen`]})]})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 @3xl:grid-cols-5 gap-3`,children:[(0,F.jsx)(Pa,{label:`In this window`,value:V(i.windowCount)}),(0,F.jsx)(Pa,{label:`All time`,value:V(s.count)}),(0,F.jsx)(Pa,{label:`Users affected`,value:V(i.users.length)}),(0,F.jsx)(Pa,{label:`First seen`,value:(0,F.jsx)(`span`,{className:`text-[16px]`,children:Sa(s.firstSeen)}),sub:s.firstVersion?`in release ${s.firstVersion}`:void 0}),(0,F.jsx)(Pa,{label:`Last seen`,value:(0,F.jsx)(`span`,{className:`text-[16px]`,children:Sa(s.lastSeen)})})]}),(0,F.jsx)(KR,{title:`Occurrences`,children:(0,F.jsx)(GR,{data:i.series.points,series:[{key:`count`,label:`Occurrences`,color:s.handled?`#82829a`:HR.crit,type:`bar`}],height:130,fmt:e=>V(e)})}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-3 gap-3`,children:[(0,F.jsx)(H,{title:`Latest stack trace`,sub:i.latest?Ca(i.latest.ts,!0):void 0,className:`@5xl:col-span-2`,children:i.latest?(0,F.jsx)(Zz,{frames:i.latest.frames,stack:i.latest.stack}):(0,F.jsx)(Na,{title:`No occurrence stored`})}),(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)(H,{title:`Releases`,pad:!1,children:(0,F.jsx)(Va,{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=>V(e.n)},{key:`l`,label:`Last`,num:!0,render:e=>(0,F.jsx)(`span`,{className:`text-mute`,children:Sa(e.last)})}]})}),(0,F.jsx)(H,{title:`Operations`,pad:!1,children:(0,F.jsx)(Va,{rows:i.operations,empty:(0,F.jsx)(Na,{title:`—`}),cols:[{key:`o`,label:`Where`,render:e=>e.operation?(0,F.jsx)(Ra,{name:e.operation}):`—`},{key:`n`,label:`Events`,num:!0,render:e=>V(e.n)}]})}),i.users.length>0&&(0,F.jsx)(H,{title:`Affected users`,pad:!1,children:(0,F.jsx)(Va,{rows:i.users,maxHeight:220,onRow:e=>r(n(`/users/${Ea(e.user_id)}`)),cols:[{key:`u`,label:`User`,render:e=>e.user_id},{key:`n`,label:`Events`,num:!0,render:e=>V(e.n)}]})})]})]}),(0,F.jsx)(H,{title:`Occurrences`,sub:`most recent 50`,pad:!1,children:(0,F.jsx)(Va,{rows:i.occurrences,onRow:e=>e.execution_id&&r(n(`/executions/${e.execution_id}`)),cols:[{key:`t`,label:`Time`,render:e=>Ca(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 dB=[[`requests`,`Requests`],[`jobs`,`Job runs`],[`errors`,`Errors`],[`logs`,`Log entries`],[`spans`,`Method spans`]],fB=e=>new Date(e).toLocaleDateString(void 0,{month:`short`,day:`numeric`,timeZone:`UTC`}),pB=e=>`$${e.toLocaleString(void 0,{maximumFractionDigits:e<10?2:0})}`,mB=e=>e.overage===`none`?`Nothing to pass`:e.overage===`reduce`?`Less detail, then refused at 2×`:`Overage, within spend controls`;function hB(){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)(W,{error:n});if(!t)return(0,F.jsx)(U,{});let c=t,l=Xi[c.state];return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ma,{icon:(0,F.jsx)(Ur,{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 `,fB(c.resetsAt),` 00:00 UTC.`]}),right:(0,F.jsx)(G,{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)(H,{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:z(c.used)}),(0,F.jsx)(`span`,{className:`text-ink2 text-[14px]`,children:c.included?(0,F.jsxs)(F.Fragment,{children:[`of `,z(c.included),` events`,c.pct!=null&&(0,F.jsxs)(F.Fragment,{children:[` · `,(0,F.jsx)(`b`,{className:`text-ink`,children:Ji(c.pct)})]})]}):`events (no allowance on Self-hosted)`})]}),c.included?(0,F.jsx)(`div`,{className:`mt-3 mb-1`,children:(0,F.jsx)(Qi,{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:z(c.today)})]}),(0,F.jsxs)(`span`,{children:[`Projected by month end `,(0,F.jsx)(`b`,{className:`text-ink tabular-nums`,children:z(c.projected)}),c.included&&c.projected>c.included?(0,F.jsxs)(`span`,{style:{color:`#fab219`},children:[` (`,z(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:z(c.overage)}),c.settings.overageRate?(0,F.jsxs)(F.Fragment,{children:[` ≈ `,pB(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:z(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:z(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:dB.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:z(c.kinds[e])})]},e))})]}),(0,F.jsx)(H,{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)(gB,{label:`Included events`,value:c.plan.included==null?`No limit`:`${z(c.plan.included)} / month`}),(0,F.jsx)(gB,{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)(gB,{label:`Logs & alerts`,value:(0,F.jsx)(_B,{on:c.plan.features.logs&&c.plan.features.alerts})}),(0,F.jsx)(gB,{label:`SLOs`,value:(0,F.jsx)(_B,{on:c.plan.features.slos})}),(0,F.jsx)(gB,{label:`Past the allowance`,value:mB(c.plan)})]})})]}),(0,F.jsx)(H,{title:`Events per day`,sub:`UTC days, this month`,children:(0,F.jsx)(`div`,{style:{height:180},children:(0,F.jsx)(Um,{width:`100%`,height:`100%`,children:(0,F.jsxs)(zR,{data:c.daily,margin:{top:6,right:6,bottom:0,left:-6},barCategoryGap:3,children:[(0,F.jsx)(eF,{vertical:!1}),(0,F.jsx)(QI,{dataKey:`day`,tickLine:!1,axisLine:{stroke:`#2a2a35`},tickFormatter:e=>String(Number(e.slice(8))),interval:`preserveStartEnd`}),(0,F.jsx)(hL,{tickLine:!1,axisLine:!1,tickFormatter:e=>z(e),width:44}),c.limits.dailyPace&&(0,F.jsx)(dN,{y:c.limits.dailyPace,stroke:`#fab219`,strokeDasharray:`4 3`,label:{value:`Pace ${z(c.limits.dailyPace)}/day`,position:`insideTopRight`,fill:`#fab219`,fontSize:10.5}}),(0,F.jsx)(wm,{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:fB(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)(Xj,{dataKey:`events`,fill:VR[0],radius:[4,4,0,0],isAnimationActive:!1})]})})})}),(0,F.jsx)(vB,{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)(yB,{report:c,onSave:o,onPost:s}),(0,F.jsx)(xB,{report:c,onSave:o})]}),(0,F.jsx)(SB,{report:c}),(0,F.jsx)(TB,{}),(0,F.jsx)(H,{title:`What counts`,right:(0,F.jsx)(Yr,{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 gB({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 _B({on:e}){return e?(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1`,style:{color:`#3ccf7a`},children:[(0,F.jsx)(wr,{size:14}),`Included`]}):(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-mute`,children:[(0,F.jsx)(ri,{size:13}),`Not included`]})}function vB({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)(H,{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`:z(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)(_B,{on:e.features.logs})}),(0,F.jsx)(`td`,{className:`px-3.5 py-2.5 border-b border-line`,children:(0,F.jsx)(_B,{on:e.features.slos})}),(0,F.jsx)(`td`,{className:`px-3.5 py-2.5 border-b border-line text-ink2`,children:mB(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 yB({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)(H,{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)(H,{title:`Past the Free allowance`,children:[(0,F.jsxs)(`ol`,{className:`flex flex-col gap-2.5 text-[12.8px]`,children:[(0,F.jsx)(bB,{n:1,on:e.state===`paced`,title:`Paced day: past ${z(e.limits.dailyPace)} events in one UTC day`,children:`Most trace waterfalls pause until 00:00 UTC.`}),(0,F.jsx)(bB,{n:2,on:e.state===`reduced`,title:`Past ${z(t)} this month`,children:`Charts stay live, but most traces arrive without spans.`}),(0,F.jsx)(bB,{n:3,on:e.state===`refused`,title:`At ${z(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?`${pB(50)} of overage (${z(e.spikeProtection.limit)} events)`:`${z(e.spikeProtection.limit)} overage events (half the allowance; set a price to use $50)`;return(0,F.jsx)(H,{title:`Spend controls`,right:c?(0,F.jsxs)(`button`,{className:`btn h-7`,onClick:()=>n(`resume`),children:[(0,F.jsx)(pi,{size:13}),`Resume overage`]}):(0,F.jsxs)(`button`,{className:`btn h-7`,onClick:()=>n(`pause`),children:[(0,F.jsx)(di,{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)(Ai,{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)(K,{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)(K,{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 bB({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 xB({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)(H,{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)(K,{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)(K,{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:[fB(e.ts),` · `,z(e.used),` events`]})]},e.pct))]})]})})}function SB({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=>z(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 justify-end`,children:[(0,F.jsx)(Ha,{value:e.billed,max:n}),z(e.billed)]})},r(`requests`,`Requests`),r(`jobs`,`Jobs`),r(`errors`,`Errors`),r(`logs`,`Logs`),r(`spans`,`Spans`)];return(0,F.jsx)(H,{title:`By project and app`,sub:`This month`,pad:!1,children:(0,F.jsx)(Va,{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 CB=e=>e==null?null:`$${e<1?e.toFixed(e<.01?4:2):e.toFixed(2)}`,wB=e=>e==null?``:String(e);function TB(){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:wB(e.perQuestion),perHour:wB(e.perHour),historyTurns:wB(e.historyTurns),budgetUnit:e.budgetUnit,daily:wB(e.daily),monthly:wB(e.monthly),priceIn:wB(e.prices.input),priceOut:wB(e.prices.output),thresholds:e.thresholds.join(`, `),notify:e.notify})},[t]),n)return(0,F.jsx)(W,{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?CB(e):`${z(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:[z(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?``:` · ${CB(t.cost)}`]})]});return(0,F.jsx)(H,{title:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(Pi,{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)(G,{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:[z(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 `,z(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)(Qi,{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)(Qi,{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)(K,{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)(K,{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)(K,{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)(K,{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)(K,{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)(K,{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)(K,{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)(K,{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)(K,{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)(K,{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:[z(e.tokens),` tokens · `,e.questions,` q`,e.cost==null?``:` · ${CB(e.cost)}`]})]},e.name))]},e))})]})})}function EB(){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)(Ma,{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)(DB,{}),(0,F.jsx)(H,{pad:!1,title:(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsxs)(`div`,{className:`relative`,children:[(0,F.jsx)(Ti,{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)(Ba,{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)(W,{error:o}):a?(0,F.jsx)(Va,{rows:s,initialSort:`self`,rowKey:e=>e.service+e.name+e.kind,empty:(0,F.jsxs)(Na,{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=Uz[e.kind]||Uz.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`:Uz[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)(no,{app:e.service,web:!0})]})},{key:`calls`,label:`Calls`,num:!0,sort:e=>e.calls,render:e=>V(e.calls)},{key:`avgSelf`,label:`Avg own`,num:!0,sort:e=>e.avgSelf,render:e=>B(e.avgSelf)},{key:`avgTotal`,label:`Avg total`,num:!0,sort:e=>e.avgTotal,render:e=>B(e.avgTotal)},{key:`self`,label:`Own time`,num:!0,sort:e=>e.self,render:e=>B(e.self)},{key:`total`,label:`Total time`,num:!0,sort:e=>e.total,render:e=>B(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:[ba(e.share,1),(0,F.jsx)(Ha,{value:e.share,max:c,color:VR[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:V(e.errors)}):(0,F.jsx)(`span`,{className:`text-mute`,children:`0`})}]}):(0,F.jsx)(U,{})})})]})}function DB(){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 ${Sa(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`:Sa(e.lastSeen)})]}),(0,F.jsx)(to,{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 OB(){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)(W,{error:i}):r?(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ma,{icon:(0,F.jsx)(Hr,{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)(gi,{size:14}),`New project`]})}),(0,F.jsx)(H,{pad:!1,children:(0,F.jsx)(Va,{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)(G,{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?Sa(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(va(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)(fi,{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(va(`default`,`/projects`,e)):a())},children:(0,F.jsx)(Li,{size:13})})]})}]})}),o&&(0,F.jsx)(kB,{onClose:p,onCreated:e=>{p(),l(e),a()}}),c&&(0,F.jsx)(AB,{project:c,onClose:()=>l(null),onOpen:()=>{l(null),n(va(c.slug,`/settings`,e))}}),u&&(0,F.jsx)(jB,{project:u,onClose:()=>d(null),onSaved:()=>{d(null),a()}})]}):(0,F.jsx)(U,{})}function kB({onClose:e,onCreated:t}){let[n,r]=(0,v.useState)(``),[i,a]=(0,v.useState)(``);return(0,F.jsx)(Wa,{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)(K,{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 AB({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)(Wa,{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)(za,{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)(za,{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 jB({project:e,onClose:t,onSaved:n}){let[r,i]=(0,v.useState)(e.name),[a,o]=(0,v.useState)(``);return(0,F.jsx)(Wa,{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)(K,{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 MB(){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)(Ma,{icon:(0,F.jsx)(zr,{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)(Ba,{value:t,onChange:n,options:[{id:`db`,label:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(zr,{size:12}),`Database`]})},{id:`http`,label:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(Gr,{size:12}),`Outbound HTTP`]})}]})}),t===`db`?(0,F.jsx)(H,{pad:!1,children:a.error?(0,F.jsx)(W,{error:a.error}):a.data?(0,F.jsx)(Va,{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)(Na,{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)(G,{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)(za,{text:e.statement,className:`btn h-6 text-[11px]`})}),(0,F.jsx)(Gz,{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=>V(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:[V(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=>B(e.avg)},{key:`p95`,label:`p95`,num:!0,sort:e=>e.p95,render:e=>B(e.p95)},{key:`total`,label:`Total time`,num:!0,sort:e=>e.total,render:e=>B(e.total)}]}):(0,F.jsx)(U,{})}):(0,F.jsx)(H,{pad:!1,children:o.error?(0,F.jsx)(W,{error:o.error}):o.data?(0,F.jsx)(Va,{rows:o.data,initialSort:`calls`,empty:(0,F.jsx)(Na,{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=>V(e.calls)},{key:`err`,label:`Failures`,num:!0,sort:e=>e.errors,render:e=>e.errors?(0,F.jsxs)(`span`,{style:{color:`#ff8a8a`},children:[V(e.errors),` (`,ba(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=>B(e.avg)},{key:`p95`,label:`p95`,num:!0,sort:e=>e.p95,render:e=>B(e.p95)}]}):(0,F.jsx)(U,{})})]})}function NB(){let e=I(),t=L(),n=ht(),[r,i]=(0,v.useState)(`user`),[a,o]=(0,v.useState)(``),{data:s,error:c}=P(`/api/users${e.q({groupBy:r===`customer`?`customer`:``})}`,[e.tick,r]),l=(s||[]).filter(e=>!a||(e.userId||e.customer).toLowerCase().includes(a.toLowerCase()));return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ma,{icon:(0,F.jsx)(Hi,{size:18,className:`text-brand`}),title:`Users`,sub:(0,F.jsxs)(F.Fragment,{children:[`Who is affected. Users come from `,(0,F.jsx)(`span`,{className:`mono`,children:`req.user.id`}),`, the `,(0,F.jsx)(`span`,{className:`mono`,children:`http.getUserId`}),` option or `,(0,F.jsx)(`span`,{className:`mono`,children:`obzerver.setUser()`}),`.`]})}),(0,F.jsx)(H,{pad:!1,title:(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsxs)(`div`,{className:`relative`,children:[(0,F.jsx)(Ti,{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`,value:a,onChange:e=>o(e.target.value)})]}),(0,F.jsx)(Ba,{value:r,onChange:i,options:[{id:`user`,label:`By user`},{id:`customer`,label:`By customer (email domain)`}]})]}),children:(0,F.jsx)(`div`,{className:`pt-2`,children:c?(0,F.jsx)(W,{error:c}):s?r===`user`?(0,F.jsx)(Va,{rows:l,initialSort:`calls`,onRow:e=>n(t(`/users/${Ea(e.userId)}`)),rowKey:e=>e.userId,empty:(0,F.jsx)(Na,{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:`c`,label:`Calls`,num:!0,sort:e=>e.calls,render:e=>V(e.calls)},{key:`o`,label:`Operations`,num:!0,sort:e=>e.operations,render:e=>V(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:[ba(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=>B(e.avg)},{key:`l`,label:`Last seen`,num:!0,sort:e=>e.lastSeen,render:e=>(0,F.jsx)(`span`,{className:`text-ink2`,children:Sa(e.lastSeen)})}]}):(0,F.jsx)(Va,{rows:l,initialSort:`calls`,rowKey:e=>e.customer,cols:[{key:`c`,label:`Customer`,sort:e=>e.customer,render:e=>(0,F.jsx)(`span`,{className:`font-medium`,children:e.customer})},{key:`u`,label:`Users`,num:!0,sort:e=>e.users,render:e=>V(e.users)},{key:`n`,label:`Calls`,num:!0,sort:e=>e.calls,render:e=>V(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:[ba(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=>Sa(e.lastSeen)}]}):(0,F.jsx)(U,{})})})]})}function PB(){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)(W,{error:a});if(!i)return(0,F.jsx)(U,{});let o=i.actions.filter(e=>e.failed).length,s=[];for(let e of i.actions){let t=s[s.length-1];t&&t[t.length-1].ts-e.ts<18e5?t.push(e):s.push([e])}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)(Ma,{title:e,sub:e.includes(`@`)?`customer ${e.split(`@`)[1]}`:void 0}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 @3xl:grid-cols-4 gap-3`,children:[(0,F.jsx)(Pa,{label:`Actions in window`,value:V(i.actions.length)}),(0,F.jsx)(Pa,{label:`Failed`,value:V(o),color:o?`#ff8a8a`:void 0}),(0,F.jsx)(Pa,{label:`Sessions`,value:V(s.length)}),(0,F.jsx)(Pa,{label:`Distinct errors`,value:V(i.errors.length)})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @5xl:grid-cols-3 gap-3`,children:[(0,F.jsx)(H,{title:`Activity replay`,sub:`newest first, grouped into sessions`,pad:!1,className:`@5xl:col-span-2`,children:s.length===0?(0,F.jsx)(Na,{title:`No activity in this window`}):(0,F.jsx)(`div`,{className:`max-h-[560px] overflow-auto`,children:s.map((e,t)=>(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`div`,{className:`px-3.5 py-1.5 text-[11px] uppercase tracking-wider text-mute bg-[#111118] border-b border-line sticky top-0`,children:[`Session · `,Ca(e[e.length-1].ts,!0),` → `,Ca(e[0].ts),` · `,e.length,` actions`]}),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:()=>r(n(`/executions/${e.id}`)),children:[(0,F.jsx)(`span`,{className:`mono text-mute text-[11.5px] w-16`,children:Ca(e.ts)}),(0,F.jsxs)(`span`,{className:`flex-1 min-w-0`,children:[(0,F.jsx)(Ra,{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)(Ia,{status:e.status}),(0,F.jsx)(`span`,{className:`w-16 text-right tabular-nums`,children:B(e.duration)})]},e.id))]},t))})}),(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)(H,{title:`Actions`,pad:!1,children:(0,F.jsx)(Va,{rows:i.operations,cols:[{key:`n`,label:`Operation`,render:e=>(0,F.jsx)(Ra,{name:e.name})},{key:`c`,label:`Calls`,num:!0,render:e=>V(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)(H,{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)(Na,{title:`Not enough actions`})}),i.errors.length>0&&(0,F.jsx)(H,{title:`Errors hit`,pad:!1,children:(0,F.jsx)(Va,{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}]})})]})]})]})}var FB=e=>new Date(e).toLocaleString(`en-US`,{month:`long`,day:`numeric`,hour:`numeric`,minute:`2-digit`}),IB=e=>String(e).padStart(2,`0`),LB=(e,t)=>{let n=new Date(e),r=`${IB(n.getHours())}:${IB(n.getMinutes())}`,i=`${IB(n.getMonth()+1)}/${IB(n.getDate())}`;return t<=72e6?r:t<=2592e5?`${i} ${r}`:i},RB=({color:e})=>(0,F.jsx)(`span`,{className:`inline-block w-[2px] h-[11px] rounded-full align-[-1px]`,style:{background:e}});function zB({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 BB({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?oi:o?zi:Ri,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 VB({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)(RB,{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 HB({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 UB=({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)(RB,{color:e.color}),e.label]},e.key))});function WB({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)(RB,{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:FB(n)}),(0,F.jsx)(`div`,{className:`text-mute mt-2 pt-2 border-t border-[#24242c]`,children:a?`Pinned ${FB(a.t)} · shift+click to unpin`:o})]})}function GB({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)(Um,{width:`100%`,height:`100%`,children:(0,F.jsxs)(BR,{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)(eF,{vertical:!1,stroke:`#ffffff`,strokeOpacity:.045,strokeDasharray:`2 6`}),(0,F.jsx)(QI,{dataKey:`t`,type:m?`category`:`number`,domain:[`dataMin`,`dataMax`],scale:m?`auto`:`time`,tickFormatter:e=>LB(e,h),tick:{fill:`#6f6f7d`,fontSize:10.5,fontFamily:`var(--font-mono)`},tickLine:!1,axisLine:{stroke:`#2a2a35`},minTickGap:44,tickMargin:6}),(0,F.jsx)(hL,{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)(hL,{yAxisId:`gc`,hide:!0,domain:[0,p*6]}),(0,F.jsx)(wm,{content:(0,F.jsx)(WB,{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)(Xj,{yAxisId:`gc`,dataKey:s,fill:`#8a8a98`,fillOpacity:.55,barSize:1.5,isAnimationActive:!1}),t.map(e=>e.kind===`bar`?(0,F.jsx)(Xj,{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)(ZF,{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)(OF,{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)(dN,{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)(dN,{yAxisId:`v`,x:d.t,stroke:`#ff9cc0`,strokeDasharray:`4 3`,strokeOpacity:.8})]})})})})}var KB={heapUsed:`#f0506e`,heapTotal:`#b0344d`,rss:`#7c7c8a`,memUtil:`#3fa58a`,cpuUtil:`#e5484d`,user:`#e5484d`,system:`#f59bb0`,elP99:`#f0506e`,elP50:`#7c7c8a`,elu:`#9085e9`},qB=e=>e>=1024?`${(e/1024).toFixed(2)} GB`:`${e.toFixed(2)} MB`,JB=e=>`${e.toFixed(2)}%`,YB=e=>`${e<10&&e%1?e.toFixed(1):Math.round(e)}%`,XB=e=>e>=1024?`${(e/1024).toFixed(1)} GB`:`${Math.round(e)} MB`,ZB=`Utilization needs @obzerver/node 0.8.2 or later, which reports the V8 heap limit, the container limits and CPU time.`;function QB(){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)(W,{error:r.error});if(!r.data)return(0,F.jsx)(U,{});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=>VR[Math.max(0,C.findIndex(t=>t.instance===e))%VR.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:VR[t%VR.length],kind:`line`})),O=[{key:`heapUsed`,label:`Heap Used`,color:KB.heapUsed,kind:`line`},{key:`heapTotal`,label:`Heap Total`,color:KB.heapTotal,kind:`line`},{key:`rss`,label:`RSS`,color:KB.rss,kind:`line`,faint:!0}],k=[{key:`cpuUser`,label:`User`,color:KB.user,kind:`bar`},{key:`cpuSystem`,label:`System`,color:KB.system,kind:`bar`}],A=[{key:`elP99`,label:`p99`,color:KB.elP99,kind:`line`},{key:`elP50`,label:`p50`,color:KB.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)(Ma,{icon:(0,F.jsx)(Rr,{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)(W,{error:u.error}):p?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(H,{title:`Instances`,sub:`latest sample · click one to focus on it`,pad:!1,children:(0,F.jsx)(Va,{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?`—`:ba(e.cpuUtil,1)},{key:`cl`,label:`CPUs`,num:!0,render:e=>(0,F.jsx)(`span`,{className:`text-ink2`,children:e.cpuLimit?`${V(e.cpuLimit)} (quota)`:e.cores??`—`})},{key:`rss`,label:`RSS`,num:!0,render:e=>qB(e.rss)},{key:`heap`,label:`Heap used / total`,num:!0,render:e=>`${V(e.heapUsed)} / ${V(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:ba(e.memUtil,1)})},{key:`lim`,label:`Limits`,num:!0,render:e=>(0,F.jsx)(`span`,{className:`text-ink2`,children:[e.heapLimitMb&&`heap ${qB(e.heapLimitMb)}`,e.memLimitMb&&`container ${qB(e.memLimitMb)}`].filter(Boolean).join(` · `)||`—`})},{key:`el`,label:`Loop p99`,num:!0,render:e=>B(e.elP99)},{key:`inf`,label:`In-flight`,num:!0,render:e=>V(e.inflight)},{key:`h`,label:`Handles`,num:!0,render:e=>V(e.handles)}]})}),(0,F.jsx)(`div`,{id:`what-ran`,className:`scroll-mt-4`,children:d?(0,F.jsx)(H,{title:`Running around ${Ca(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)(Va,{rows:d.rows,onRow:e=>n(t(Iz(`http`,l,e.name))),empty:(0,F.jsx)(Na,{title:`Nothing ran in that window`}),cols:[{key:`n`,label:`Operation`,render:e=>(0,F.jsx)(Ra,{name:e.name})},{key:`c`,label:`Calls`,num:!0,render:e=>V(e.calls)},{key:`a`,label:`Avg`,num:!0,render:e=>B(e.avg)},{key:`b`,label:`Baseline avg`,num:!0,render:e=>B(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)(H,{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)(zB,{title:`Memory`,sub:`heap and resident size over time, with garbage collection`,children:[(0,F.jsx)(HB,{title:`Memory`,trend:(0,F.jsx)(BB,{now:h?.heapUsed,prev:g?.heapUsed,unit:`pct`}),right:(0,F.jsx)(UB,{series:[...O,{key:`gc`,label:`GC pauses`,color:`#8a8a98`,kind:`bar`}]}),children:(0,F.jsx)(GB,{releases:S,data:m,series:O,fmt:e=>qB(e),yFmt:XB,gcKey:`gcMs`,onInspect:x,extra:e=>e.gcCount?(0,F.jsxs)(`div`,{className:`text-mute py-[2px]`,children:[`GC: `,e.gcCount,` pauses · `,B(e.gcMs)]}):null})}),(0,F.jsx)(HB,{title:`Memory utilization`,trend:(0,F.jsx)(BB,{now:h?.memUtil,prev:g?.memUtil,unit:`pp`}),right:(0,F.jsxs)(F.Fragment,{children:[T&&(0,F.jsx)(UB,{series:D}),(0,F.jsx)(VB,{value:h?.memUtil,color:KB.memUtil,fmt:JB})]}),children:_?(0,F.jsx)(GB,{releases:S,data:T?E(`memUtil`):m,series:T?D:[{key:`memUtil`,label:`Utilization`,color:KB.memUtil,kind:`area`}],fmt:JB,yFmt:YB,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)($B,{})})]}),(0,F.jsxs)(zB,{title:`CPU`,sub:`share of the available CPU, and where the time goes`,children:[(0,F.jsx)(HB,{title:`CPU utilization`,trend:(0,F.jsx)(BB,{now:h?.cpuUtil,prev:g?.cpuUtil,unit:`pp`}),right:(0,F.jsxs)(F.Fragment,{children:[T&&(0,F.jsx)(UB,{series:D}),(0,F.jsx)(VB,{value:h?.cpuUtil,color:KB.cpuUtil,fmt:JB})]}),children:_?(0,F.jsx)(GB,{releases:S,data:T?E(`cpuUtil`):m,series:T?D:[{key:`cpuUtil`,label:`Utilization`,color:KB.cpuUtil,kind:`area`}],fmt:JB,yFmt:YB,onInspect:x}):(0,F.jsx)($B,{})}),(0,F.jsx)(HB,{title:`CPU`,trend:(0,F.jsx)(BB,{now:h?.cpuTime,prev:g?.cpuTime,unit:`pct`}),right:(0,F.jsx)(UB,{series:k}),children:m.some(e=>e.cpuUser!=null)?(0,F.jsx)(GB,{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)($B,{})})]}),(0,F.jsxs)(zB,{title:`Event loop`,sub:`queueing delay and how busy the loop is`,children:[(0,F.jsx)(HB,{title:T?`Event loop delay p99`:`Event loop delay`,trend:(0,F.jsx)(BB,{now:h?.elP99,prev:g?.elP99,unit:`pct`}),right:(0,F.jsx)(UB,{series:T?D:A}),children:(0,F.jsx)(GB,{releases:S,data:T?E(`elP99`):m,series:T?D:A,fmt:e=>B(e),yFmt:e=>`${Math.round(e)}ms`,onInspect:x})}),(0,F.jsx)(HB,{title:`Event loop utilization`,trend:(0,F.jsx)(BB,{now:h?.elu,prev:g?.elu,unit:`pp`}),right:(0,F.jsxs)(F.Fragment,{children:[T&&(0,F.jsx)(UB,{series:D}),(0,F.jsx)(VB,{value:h?.elu,color:KB.elu,fmt:JB})]}),children:(0,F.jsx)(GB,{releases:S,data:T?E(`elu`):m,series:T?D:[{key:`elu`,label:`Utilization`,color:KB.elu,kind:`area`}],fmt:JB,yFmt:YB})})]})]}):(0,F.jsx)(U,{}):(0,F.jsx)(H,{children:(0,F.jsx)(Na,{title:`No runtime samples in this window`,children:`The SDK samples every 15s by default (runtimeMetricsInterval).`})})]})}function $B(){return(0,F.jsx)(`div`,{className:`h-[220px] flex items-center justify-center text-center text-mute text-[12px] px-8`,children:ZB})}function eV(){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)(W,{error:t.error});if(!t.data)return(0,F.jsx)(U,{});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:VR[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)(Ma,{icon:(0,F.jsx)(Ur,{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)(H,{children:(0,F.jsx)(Na,{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)(H,{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)(KR,{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)(GR,{data:c,series:l,height:260,fmt:e=>V(e)}):(0,F.jsx)(U,{})}),(0,F.jsx)(H,{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:V(e.points)}),(0,F.jsx)(`td`,{className:`num`,children:V(e.avg)})]},t))})]})})]})]})]})}var tV={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`}},nV=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 rV(){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)(W,{error:n});if(!t)return(0,F.jsx)(U,{});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)(Ma,{icon:(0,F.jsx)(bi,{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)(H,{children:(0,F.jsx)(Na,{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)(H,{pad:!1,children:(0,F.jsx)(Va,{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)(G,{kind:tV[e.verdict]?.kind||`neutral`,children:tV[e.verdict]?.label||e.verdict})},{key:`f`,label:`Deployed`,num:!0,render:e=>(0,F.jsx)(qa,{tip:nV(e.first),className:`text-ink2`,children:Sa(e.first)})},{key:`n`,label:`Requests`,num:!0,render:e=>V(e.requests)}]})}),o&&(0,F.jsx)(iV,{service:o.service,version:o.version})]})]})}function iV({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)(W,{error:a});if(!i)return(0,F.jsx)(U,{});let o=tV[i.verdict]||tV.baseline,s=i.previousStats,c=i.stats,l=e=>e===`query`?(0,F.jsx)(zr,{size:12,style:{color:`#d95926`}}):e===`outbound`?(0,F.jsx)(Gr,{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)(H,{title:(0,F.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,F.jsxs)(`span`,{className:`mono`,children:[e,`@`,t]}),(0,F.jsx)(G,{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:V(s.requests)}),(0,F.jsx)(`td`,{className:`num`,children:V(c.requests)})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`text-mute`,children:`5xx rate`}),(0,F.jsx)(`td`,{className:`num`,children:ba(s.errorRate)}),(0,F.jsx)(`td`,{className:`num`,style:{color:c.errorRate>s.errorRate*1.5&&c.errorRate>.3?`#ff8a8a`:void 0},children:ba(c.errorRate)})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`text-mute`,children:`p95`}),(0,F.jsx)(`td`,{className:`num`,children:B(s.p95)}),(0,F.jsx)(`td`,{className:`num`,style:{color:c.p95>s.p95*1.3?`#ffb38a`:void 0},children:B(c.p95)})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`td`,{className:`text-mute`,children:`Average`}),(0,F.jsx)(`td`,{className:`num`,children:B(s.avg)}),(0,F.jsx)(`td`,{className:`num`,children:B(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)(qa,{tip:nV(s.first),children:Ca(s.first,!0)})}),(0,F.jsx)(`td`,{className:`num text-[11.5px]`,children:(0,F.jsx)(qa,{tip:nV(c.first),children:Ca(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?`—`:`${V(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?`—`:`${V(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?`—`:`${V(e.rss)} MB`}),(0,F.jsx)(`td`,{className:`num`,children:t.rss==null?`—`:`${V(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:ba(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:ba(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:B(e.elP99)}),(0,F.jsx)(`td`,{className:`num`,style:{color:n(e.elP99,t.elP99,1.5,10)?`#ffb38a`:void 0},children:B(t.elP99)})]})]})})()]})]})]}),(i.evidence?.length>0||i.newErrors?.length>0)&&(0,F.jsxs)(H,{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)(G,{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:V(e.count)})]},e.fingerprint))})]}),(0,F.jsx)(H,{title:`What changed in the code`,sub:`queries, outbound calls and methods per request, beyond noise`,pad:!1,children:(0,F.jsx)(Va,{rows:i.changes||[],empty:(0,F.jsx)(Na,{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)(G,{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?`—`:`${B(e.selfMs)} self`:V(e.perRequest)}]})})]})}var aV=980,oV=160,sV=46;function cV(e){return e>5?`#d03b3b`:e>1?`#e07a7a`:`#199e70`}function lV(){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?aV/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:(aV-a)/2+i*180+oV/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)(W,{error:i});if(!r||!l)return(0,F.jsx)(U,{});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`?Di:e===`database`?zr:e===`queue`?Jr:Gr;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ma,{icon:(0,F.jsx)(li,{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)(H,{children:(0,F.jsx)(Na,{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)(H,{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 ${aV} ${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+oV/2,a=r?t.y+sV/2:t.y,o=r?n.x:n.x-oV/2,s=r?n.y-sV/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=cV(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:[V(e.calls),e.errorRate>0?` · ${ba(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=cV(e.errorRate),i=s===e.id;return(0,F.jsxs)(`g`,{transform:`translate(${t.x-oV/2},${t.y-sV/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:oV,height:sV,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`?`${V(e.calls)} req · ${B(e.avg)}`:e.type===`queue`?`queue · ${V(e.calls)} jobs`:`${e.type===`database`?`database`:`external`} · ${V(e.calls)}`})]},e.id)})]})]}),(0,F.jsx)(H,{title:f?f.label:`Details`,sub:f?.type,children:f?(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)(Ua,{items:[[`Calls`,V(f.calls)],[`Errors`,`${V(f.errors)} (${ba(f.errorRate)})`],...f.avg==null?[]:[[`Avg`,B(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:[V(e.calls),` · `,B(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:[V(e.calls),` · `,B(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 uV={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`}]},dV=new Set([`error_rate`,`p95_latency`,`avg_latency`,`throughput`,`job_failure_rate`,`job_queue_wait`,`silence`,`job_silence`]);function fV(){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)(W,{error:r.error});if(!r.data)return(0,F.jsx)(U,{});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)(Ma,{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)(pi,{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)(gi,{size:14}),`New rule`]})]})}),(0,F.jsx)(H,{pad:!1,title:`Rules`,children:(0,F.jsx)(Va,{rows:r.data.rules,rowKey:e=>e.id,cols:[{key:`s`,label:`State`,render:e=>e.enabled?e.state===`firing`?(0,F.jsx)(G,{kind:`crit`,children:`firing`}):(0,F.jsx)(G,{kind:`good`,children:`ok`}):(0,F.jsx)(G,{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?`—`:`${V(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:Sa(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()=>{mV((await N(`/api/alerts/${e.id}/test`,{method:`POST`})).deliveries)},children:(0,F.jsx)(Ei,{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)(fi,{size:13})}),(0,F.jsx)(`button`,{className:`btn btn-ghost h-7 px-2`,title:`Delete`,onClick:async()=>{hV(e.name)&&(await N(`/api/alerts/${e.id}`,{method:`DELETE`}),l())},children:(0,F.jsx)(Li,{size:13})})]})]})}]})}),(0,F.jsx)(H,{pad:!1,title:`History`,sub:`state transitions with per-channel delivery`,children:i.data?(0,F.jsx)(Va,{rows:i.data,empty:(0,F.jsx)(Na,{title:`No alert events yet`}),maxHeight:480,cols:[{key:`t`,label:`Time`,render:e=>(0,F.jsx)(`span`,{className:`tabular-nums`,children:Ca(e.ts,!0)})},{key:`s`,label:`State`,render:e=>e.state===`firing`?(0,F.jsx)(G,{kind:`crit`,children:`firing`}):e.state===`resolved`?(0,F.jsx)(G,{kind:`good`,children:`resolved`}):(0,F.jsx)(G,{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)(U,{})}),a&&(0,F.jsx)(gV,{rule:a,types:s,onClose:()=>o(null),onSaved:()=>{o(null),l()}})]})}function pV({value:e,onChange:t}){let{data:n}=P(`/api/settings`),r=L();return(0,F.jsx)(K,{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 mV(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 hV(e){return window.confirm(`Delete rule "${e}"?`)}function gV({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)(Wa,{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)(K,{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)(K,{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))})}),dV.has(a.type)&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(K,{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)(K,{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)})})]}),(uV[a.type]||[]).map(e=>(0,F.jsx)(K,{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)(K,{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)(K,{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)(pV,{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 _V={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`}},vV={critical:`#d03b3b`,high:`#ec835a`,medium:`#fab219`,low:`#82829a`};function yV(){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)(W,{error:c});if(!s)return(0,F.jsx)(U,{});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)(Ma,{icon:(0,F.jsx)(Nr,{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)(gi,{size:14}),`New issue`]})}),(0,F.jsx)(H,{pad:!1,title:(0,F.jsx)(Ba,{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)(Va,{rows:l,onRow:e=>n(t(`/issues/${e.id}`)),empty:(0,F.jsx)(Na,{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)(G,{kind:_V[e.status]?.kind||`neutral`,children:_V[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:vV[e.severity]}}),e.severity]})},{key:`tk`,label:`Ticket`,render:e=>e.ticket?(0,F.jsx)(rz,{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:Ca(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:Sa(e.updated)})}]})})}),a&&(0,F.jsx)(bV,{onClose:()=>o(!1),onCreated:e=>n(t(`/issues/${e}`))})]})}function bV({onClose:e,onCreated:t}){let n=I(),[r,i]=(0,v.useState)({title:``,severity:`medium`,owner:``,description:``,service:``,sourceType:``,sourceRef:``}),{settings:a,connected:o}=tz(),[s,c]=(0,v.useState)(null),l=s??(a?.autoCreate||``),[u,d]=(0,v.useState)(``);return(0,F.jsx)(Wa,{open:!0,onClose:e,title:`New issue`,children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)(K,{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)(K,{label:`Severity`,children:(0,F.jsx)(`select`,{className:`select`,value:r.severity,onChange:e=>i({...r,severity:e.target.value}),children:Object.keys(vV).map(e=>(0,F.jsx)(`option`,{children:e},e))})}),(0,F.jsx)(K,{label:`Owner`,children:(0,F.jsx)(`input`,{className:`input`,value:r.owner,onChange:e=>i({...r,owner:e.target.value})})}),(0,F.jsx)(K,{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)(K,{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)(K,{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)(K,{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:ez[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`})]})]})})}var xV={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 SV(){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}=tz(),[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)(W,{error:a});if(!i)return(0,F.jsx)(U,{});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.customers.length?`\nCustomers: ${x.customers.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)(G,{kind:_V[i.status]?.kind||`neutral`,children:_V[i.status]?.label||i.status}),(0,F.jsxs)(`span`,{className:`text-mute text-[12px]`,children:[`opened `,Sa(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)(za,{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)(H,{title:`Description`,children:(0,F.jsx)(`div`,{className:`whitespace-pre-wrap text-[13px]`,children:i.description})}),x&&(0,F.jsx)(H,{title:`Incident record`,children:(0,F.jsx)(Ua,{items:[[`Error`,(0,F.jsx)(`span`,{className:`text-[#ff9b9b]`,children:x.error})],[`Operation`,(0,F.jsx)(`span`,{className:`mono`,children:x.operation})],[`Started`,Ca(x.start,!0)],[`Ended`,x.end?Ca(x.end,!0):`ongoing`],[`Last seen`,Sa(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],[`Customers`,x.customers.join(`, `)||`—`]]})}),(0,F.jsxs)(H,{title:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,F.jsx)(Ai,{size:14}),`Did a release fix this?`]}),children:[(0,F.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,F.jsx)(K,{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)(G,{kind:xV[l.verdict]?.kind||`neutral`,children:xV[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)(H,{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:Ca(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)(H,{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)(rz,{ticket:i.ticket})}),(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px]`,children:[i.ticket.syncedAt?`Checked ${Sa(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)(yi,{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)(Vi,{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 ${ez[t]} ${n.key}.`}),children:[`Create in `,ez[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)(H,{title:`Details`,children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)(K,{label:`Status`,children:(0,F.jsx)(`select`,{className:`select`,value:i.status,onChange:e=>b({status:e.target.value}),children:Object.entries(_V).map(([e,t])=>(0,F.jsx)(`option`,{value:e,children:t.label},e))})}),(0,F.jsx)(K,{label:`Severity`,children:(0,F.jsx)(`select`,{className:`select`,value:i.severity,onChange:e=>b({severity:e.target.value}),children:Object.keys(vV).map(e=>(0,F.jsx)(`option`,{children:e},e))})}),(0,F.jsx)(K,{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)(K,{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)(Ua,{items:[[`Application`,i.service||`—`],[`Created`,Ca(i.created,!0)],[`Updated`,Sa(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 CV={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`}},wV=e=>e==null?`#55556a`:e<=0?HR.crit:e<.25?HR.serious:e<.5?HR.warn:HR.good,TV=(e,t)=>e==null?void 0:e>t?`#ff8a8a`:e>1?`#ffc85a`:void 0,EV=e=>`${e.service||`all applications`}${e.operation?` · ${e.operation}`:``}${e.kind===`job`?` (jobs)`:``}`,DV=e=>`${e.kind===`job`?`runs succeed`:`requests succeed (non-5xx)`}${e.latencyMs?` and finish within ${e.latencyMs}ms`:``}`;function OV({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:wV(e)}})})}function kV(){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)(W,{error:i}):r?(0,F.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,F.jsx)(Ma,{icon:(0,F.jsx)(Ii,{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)(gi,{size:14}),`New SLO`]})}),r.length===0?(0,F.jsx)(H,{children:(0,F.jsx)(Na,{title:`No SLOs yet`,icon:(0,F.jsx)(Ii,{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)(G,{kind:CV[e.state].kind,children:CV[e.state].label})]}),(0,F.jsxs)(`div`,{className:`text-mute text-[11.5px] truncate`,children:[EV(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:wV(e.budgetRemaining)},children:e.budgetRemaining==null?`no data`:`${(e.budgetRemaining*100).toFixed(1)}% budget left`})]}),(0,F.jsx)(OV,{value:e.budgetRemaining})]},e.slo.id))}),c&&(0,F.jsx)(AV,{id:c,onEdit:e=>s(e),onDeleted:()=>{let e=new URLSearchParams(t);e.delete(`id`),n(e),a()}})]}),o&&(0,F.jsx)(MV,{slo:o,onClose:()=>s(null),onSaved:e=>{s(null),a(),l(e)}})]}):(0,F.jsx)(U,{})}function AV({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)(W,{error:o});if(!a)return(0,F.jsx)(U,{});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)(H,{title:(0,F.jsxs)(`span`,{className:`flex items-center gap-2`,children:[s.name,(0,F.jsx)(G,{kind:CV[a.state].kind,children:CV[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)(fi,{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)(Li,{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)(Ra,{name:s.operation}):(0,F.jsx)(`span`,{children:s.kind===`job`?`job runs`:`requests`}),` in `,(0,F.jsx)(`b`,{children:s.service||`all applications`}),` `,DV(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)(jV,{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)(jV,{label:`Error budget left`,value:a.budgetRemaining==null?`—`:`${(a.budgetRemaining*100).toFixed(1)}%`,color:wV(a.budgetRemaining),sub:(0,F.jsx)(OV,{value:a.budgetRemaining})}),(0,F.jsx)(jV,{label:`Bad events left`,value:a.budgetEventsLeft==null?`—`:V(Math.max(0,a.budgetEventsLeft)),sub:`${V(a.bad)} bad of ${V(a.total)}`}),(0,F.jsx)(jV,{label:`Burn rate (1h)`,value:a.burn.h1==null?`—`:`${a.burn.h1}×`,sub:`1× spends the budget exactly by window end`,color:TV(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)(Bi,{size:13}),a.dataSince?`Data only goes back to ${Ca(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)(KR,{title:`Error budget burn-down`,sub:`share of the window's budget still unspent`,children:(0,F.jsx)(GR,{data:c,series:[{key:`budget`,label:`Budget left`,color:VR[0],type:`area`}],height:190,fmt:e=>`${e.toFixed(1)}%`,refLines:[{y:0,label:`exhausted`,color:HR.crit}],zoom:!1})}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 @7xl:grid-cols-2 gap-3`,children:[(0,F.jsx)(KR,{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)(GR,{data:c,series:[{key:`sli`,label:`SLI`,color:VR[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)(H,{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:TV(t,n)},children:t==null?`—`:`${t}×`}),(0,F.jsx)(`td`,{className:`num text-ink2`,children:t==null?`—`:ba(t*(100-s.target))})]},e))})]})})]}),(0,F.jsxs)(H,{title:`Burn-rate alerts`,sub:`created and kept in step with this SLO`,pad:!1,children:[(0,F.jsx)(Va,{rows:a.rules,cols:[{key:`s`,label:`State`,render:e=>e.state===`firing`?(0,F.jsx)(G,{kind:`crit`,children:`firing`}):(0,F.jsx)(G,{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:Sa(e.ts)}),e.state===`firing`?(0,F.jsx)(G,{kind:`crit`,children:`firing`}):(0,F.jsx)(G,{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 jV({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 MV({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)(Wa,{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)(K,{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)(K,{label:`Measures`,children:(0,F.jsx)(Ba,{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)(K,{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)(K,{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)(K,{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)(K,{label:`Window`,children:(0,F.jsx)(Ba,{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)(K,{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)(K,{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)(K,{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)(K,{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)(pV,{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 NV={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`}},PV=[`investigating`,`identified`,`monitoring`,`resolved`],FV=e=>e[0].toUpperCase()+e.slice(1).replace(`_`,` `);function IV(){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)(W,{error:i});if(!r)return(0,F.jsx)(U,{});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)(Ma,{icon:(0,F.jsx)(vi,{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)(gi,{size:14}),`New status page`]})}),r.length===0?(0,F.jsx)(H,{children:(0,F.jsx)(Na,{title:`No status pages yet`,icon:(0,F.jsx)(vi,{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)(G,{kind:NV[e.overall].kind,children:NV[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)(LV,{id:c,onEdit:s,onDeleted:()=>{let e=new URLSearchParams(t);e.delete(`id`),n(e),a()},onChanged:a})]}),o&&(0,F.jsx)(BV,{page:o,onClose:()=>s(null),onSaved:e=>{s(null),a(),l(e)}})]})}function LV({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)(W,{error:o});if(!a)return(0,F.jsx)(U,{});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)(H,{title:(0,F.jsxs)(`span`,{className:`flex items-center gap-2`,children:[u.title,(0,F.jsx)(G,{kind:NV[a.overall].kind,children:NV[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)(Br,{size:13}),`Open public page`]}),(0,F.jsx)(za,{text:d,label:`Copy link`,className:`btn h-7`}),(0,F.jsxs)(`button`,{className:`btn h-7`,onClick:()=>t(u),children:[(0,F.jsx)(fi,{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)(Li,{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)(H,{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)(Na,{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 · ${ba(e.live.errorRate)} 5xx · p95 ${B(e.live.p95)}`:`no recent traffic`}),(0,F.jsx)(G,{kind:NV[e.status].kind,children:NV[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:NV[e.status].color},title:`${new Date(e.day).toISOString().slice(0,10)}: ${NV[e.status].label}${e.requests?` · ${e.requests} req, ${ba(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)(H,{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)(ai,{size:13}),`Post incident`]}),pad:!1,children:a.incidents.length===0?(0,F.jsx)(Na,{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)(RV,{inc:e,name:h,onChanged:f},e.id))})}),c&&(0,F.jsx)(zV,{page:u,inc:c,onClose:()=>l(null),onSaved:()=>{l(null),f()}})]})}function RV({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)(G,{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:[Ca(e.created,!0),e.resolvedAt&&` → ${Ca(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)(Gi,{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:Sa(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:PV.map(e=>(0,F.jsx)(`option`,{value:e,children:FV(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 zV({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)(Wa,{open:!0,onClose:n,title:`Post incident`,children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,F.jsx)(K,{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)(K,{label:`Impact`,hint:`minor = degraded, major = partial outage, critical = major outage`,children:(0,F.jsx)(Ba,{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)(K,{label:`Status`,children:(0,F.jsx)(`select`,{className:`select`,value:i.status,onChange:e=>a({...i,status:e.target.value}),children:PV.filter(e=>e!==`resolved`).map(e=>(0,F.jsx)(`option`,{value:e,children:FV(e)},e))})})]}),(0,F.jsx)(K,{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)(K,{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 BV({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)(Wa,{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)(K,{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)(K,{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)(K,{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)(gi,{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)(Li,{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 VV={good:jr,warn:Ar,bad:ui,neutral:Mr};function HV(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 UV({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 WV({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)(Pi,{size:13,className:`text-brand`}),t]})}function GV({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)(jr,{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 KV={"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`},qV={healthy:{tone:`good`,Icon:jr},attention:{tone:`warn`,Icon:Ar},broken:{tone:`bad`,Icon:ui},idle:{tone:`neutral`,Icon:ci},no_data:{tone:`neutral`,Icon:ci}},JV={secret:ki,silent:_i,error:br,endpoint:Ci,jobs:Wi,alert:hr,release:bi,new_errors:br,traffic:zi,speed:Ur,failures:lr};function YV(){let e=I(),{data:t,error:n}=P(`/api/simple${e.q()}`,[e.tick]);return n?(0,F.jsx)(W,{error:n}):t?t.health===`no_data`?(0,F.jsx)(zz,{simple:!0}):(0,F.jsxs)(`div`,{className:`@container flex flex-col gap-5`,children:[(0,F.jsx)(XV,{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)(tH,{items:t.changed,basis:t.usualBasis})]}),(0,F.jsxs)(`div`,{className:`@4xl:col-span-2 flex flex-col gap-5`,children:[(0,F.jsx)(rH,{items:t.todo}),(0,F.jsx)(aH,{suggestions:t.suggestions})]})]})]}):(0,F.jsx)(U,{})}function XV({d:e}){let t=I(),n=qV[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)(QV,{points:e.timeline,bucketMs:e.bucketMs,label:KV[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)(ZV,{v:e},e.id))})]})}function ZV({v:e}){let t=VV[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 QV({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:`${Ca(e.t,a>864e5)} · ${V(e.count)} requests${e.failed?` · ${V(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 $V({f:e,timeline:t}){let n=ht(),r=L(),i=JV[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?HV(e.ts):`last seen ${HV(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)(WV,{question:e.ask,label:`Ask`}),e.link&&(0,F.jsx)(Dr,{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)(UV,{title:`What broke?`,n:e.length,children:e.length===0?(0,F.jsx)(GV,{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)($V,{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 tH({items:e,basis:t}){return(0,F.jsx)(UV,{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)($V,{f:e,timeline:!0},e.id))})})}var nH={now:{label:`Do now`,tone:`bad`},soon:{label:`Soon`,tone:`warn`},later:{label:`When you can`,tone:`neutral`}};function rH({items:e}){let[t,n]=(0,v.useState)(e[0]?.id??null);return(0,F.jsx)(UV,{title:`What should I do?`,n:e.length,children:e.length===0?(0,F.jsx)(GV,{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)(iH,{t:e,n:r+1,open:t===e.id,onToggle:()=>n(t===e.id?null:e.id)},e.id))})})}function iH({t:e,n:t,open:n,onToggle:r}){let i=ht(),a=L(),o=nH[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)(Tr,{size:15,className:`text-mute mt-1`}):(0,F.jsx)(Dr,{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)(za,{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)(Dr,{size:13})]}),e.ask&&(0,F.jsx)(WV,{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)(Ui,{size:12}),`The prompt has the error, the code around it and what happened, ready for Cursor, Claude Code or Copilot.`]})]})]})}function aH({suggestions:e}){let[t,n]=(0,v.useState)(``);return(0,F.jsxs)(UV,{title:`Ask Obzeri`,children:[(0,F.jsxs)(`form`,{className:`relative`,onSubmit:e=>{e.preventDefault(),t.trim()&&(ir(t.trim()),n(``))},children:[(0,F.jsx)(Pi,{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 oH(){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)(W,{error:n});if(!t)return(0,F.jsx)(U,{});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)(sH,{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)(UV,{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)(lH,{p:e,onChange:t=>i({presets:{[e.id]:t}})},e.id))})}),(0,F.jsx)(dH,{events:t.events})]}),(0,F.jsx)(`div`,{className:`@4xl:col-span-2`,children:(0,F.jsx)(uH,{data:t,onSave:e=>i({channels:e})})})]})]})}function sH({firing:e}){let t=I(),n=ht(),r=L(),i=rr(),a=t.meta?.openSecrets||0;return!e.length&&!a?(0,F.jsx)(GV,{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)(ki,{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)(Dr,{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 `,HV(e.since)]}),(0,F.jsx)(Dr,{size:15,className:`text-mute`})]},e.id))]})}function cH({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 lH({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 ${HV(e.lastFired)}`:``]})]}),(0,F.jsx)(cH,{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 uH({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)(UV,{title:`Where should we tell you?`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-3 text-[13px]`,children:[(0,F.jsx)(si,{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)(ii,{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)(ji,{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)(Br,{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)(Ei,{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)(jr,{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 dH({events:e}){let[t,n]=(0,v.useState)(!1),r=t?e:e.slice(0,8);return(0,F.jsx)(UV,{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`,` `,HV(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 fH(){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)(W,{error:n.error});if(!n.data)return(0,F.jsx)(U,{});let a=n.data,o=a.kpis,s=o.usual&&o.usual.requests>=50?o.usual:null,c=JR(a.series.points,a.band),l=YR(a.band),u=KV[e.range]||`this period`,d=[{key:`count`,label:`Requests`,color:VR[0],type:`bar`},...l?[{...l.calls,label:`Usual`}]:[]],f=[...l?[{...l.p95,label:`Normal range`}]:[],{key:`p95`,label:`Slowest 5%`,color:VR[1],type:`line`},{key:`avg`,label:`Average`,color:VR[2],type:`line`}],p=[{key:`s5xx`,label:`Failed (server errors)`,color:HR.crit,type:`bar`,stack:`e`},{key:`s4xx`,label:`Rejected (bad requests)`,color:HR.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:VR[0],type:`line`},{key:`mem`,label:`Memory`,color:VR[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)(Cr,{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)(pH,{title:`Traffic`,what:`How many requests your app handled.`,value:V(o.requests),unit:`requests`,status:y==null?{tone:`neutral`,text:o.rpm?`About ${V(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)(GR,{data:c,series:d,height:190,zoom:!1,fmt:e=>V(e)})}),(0,F.jsx)(pH,{title:`Speed`,what:`How long requests take. Lower is better; the slowest 5% is what unhappy users feel.`,value:B(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 ${B(s.p95)})`}:o.p95>=1500?{tone:`warn`,text:`On the slow side`}:{tone:`good`,text:s?.p95?`Normal (usually ${B(s.p95)})`:`Fast`},series:f,children:(0,F.jsx)(GR,{data:c,series:f,height:190,zoom:!1,fmt:e=>B(e),yFmt:e=>e>=1e3?`${+(e/1e3).toFixed(1)}s`:`${Math.round(e)}ms`})}),(0,F.jsx)(pH,{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:ba(o.failureRate),unit:`failed`,status:{tone:x,text:o.failed?`${V(o.failed)} failed, ${V(o.clientErrors)} rejected`:`No server errors`},series:p,children:(0,F.jsx)(GR,{data:c,series:p,height:190,zoom:!1,fmt:e=>V(e)})}),(0,F.jsx)(pH,{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)(GR,{data:h,series:_,height:190,zoom:!1,fmt:e=>`${Math.round(e)}%`,yDomain:[0,`auto`]}):(0,F.jsx)(U,{})})]}),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`?V(r):V(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)(Dr,{size:11,className:`opacity-0 group-hover:opacity-100`})]})]},e)})})]})]})}function pH({title:e,what:t,value:n,unit:r,status:i,series:a,children:o}){let s=VV[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)(WR,{series:a})]})}var mH=[{id:`all`,label:`Everything`,levels:``},{id:`problems`,label:`Problems only`,levels:`warn,error,fatal`},{id:`errors`,label:`Errors only`,levels:`error,fatal`}],hH={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 gH(){let e=I(),[t,n]=zn(),[r,i]=(0,v.useState)(t.get(`q`)||``),a=mH.find(e=>e.id===t.get(`show`))??mH[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)(wi,{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)(Ti,{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)(Gi,{size:15})})]}),(0,F.jsx)(`div`,{className:`seg seg-lg`,children:mH.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:[V(l.all),` line`,l.all===1?``:`s`,` in `,KV[e.range]||`this period`,l.error>0&&(0,F.jsxs)(F.Fragment,{children:[` · `,(0,F.jsxs)(`span`,{className:`text-[#ff8a8a]`,children:[V(l.error),` error`,l.error===1?``:`s`]})]}),l.warn>0&&(0,F.jsxs)(F.Fragment,{children:[` · `,(0,F.jsxs)(`span`,{className:`text-[#f5c04e]`,children:[V(l.warn),` warning`,l.warn===1?``:`s`]})]}),t.get(`q`)&&(0,F.jsxs)(F.Fragment,{children:[` · matching “`,t.get(`q`),`”`]})]}),s?(0,F.jsx)(W,{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)(_H,{l:e},e.id))}):(0,F.jsx)(U,{})]})]})}function _H({l:e}){let[t,n]=(0,v.useState)(!1),r=ht(),i=L(),a=hH[e.level]||hH.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:HV(e.ts),children:Ca(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)(Dr,{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:[Ca(e.ts,!0),` · `,HV(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)(Dr,{size:13})]}),(0,F.jsx)(WV,{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 vH(){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)(W,{error:i.error});if(!i.data)return(0,F.jsx)(U,{});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)(Oi,{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)(UV,{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)(to,{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 ${HV(t.lastSeen)}`]})]},t.id)})})}),(0,F.jsx)(Pz,{initial:`zero`,title:`Connect an app`})]}),(0,F.jsxs)(`div`,{className:`@4xl:col-span-2 flex flex-col gap-5`,children:[(0,F.jsx)(yH,{}),(0,F.jsx)(bH,{}),(0,F.jsx)(UV,{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)(jr,{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)(Pi,{size:14}),`Set up Ask Obzeri`]})]}):(0,F.jsx)(U,{})}),(0,F.jsxs)(UV,{title:`Privacy & data`,children:[(0,F.jsxs)(`div`,{className:`flex items-start gap-3 text-[13px]`,children:[(0,F.jsx)(ri,{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)(Fr,{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)(Mi,{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)(Mi,{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)(Dr,{size:15,className:`text-mute group-hover:translate-x-0.5 transition-transform`})]})]})]})]})}function yH(){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:`${z(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)(UV,{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:z(r.used)}),` of `,z(r.included),` events used`]}),(0,F.jsx)(`span`,{className:`text-mute`,children:Ji(r.pct)})]}),(0,F.jsx)(Qi,{used:r.used,included:r.included})]}),(0,F.jsx)(`div`,{className:`text-[13px] leading-relaxed tone-${Xi[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 bH(){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)(UV,{title:`Dashboard mode`,children:[n(`simple`,Ni,`Simple`,`Is my app healthy, what broke, what changed, what to do. Plain words, no jargon.`),n(`advanced`,Mi,`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 xH=e=>`${e.service}@${e.version}`;function SH(){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)(W,{error:r});if(!n)return(0,F.jsx)(U,{});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)(bi,{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)(kH,{}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`flex flex-col gap-5`,children:a.map(e=>(0,F.jsx)(EH,{r:e,focus:i===xH(e)},xH(e)))}),o.length>0&&(0,F.jsx)(UV,{title:`Earlier deploys`,n:o.length,children:(0,F.jsx)(`div`,{className:`flex flex-col gap-2`,children:o.map(e=>(0,F.jsx)(DH,{r:e,focus:i===xH(e)},xH(e)))})})]})]})}function CH({r:e}){return(0,F.jsxs)(qa,{tip:`Deployed ${Ca(e.first,!0)} · last request ${Ca(e.last,!0)}`,children:[`deployed `,HV(e.first)]})}function wH({r:e,big:t}){let n=VV[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 TH(e){let t=(0,v.useRef)(null);return(0,v.useEffect)(()=>{e&&setTimeout(()=>t.current?.scrollIntoView({block:`start`,behavior:`smooth`}),100)},[e]),t}function EH({r:e,focus:t}){let n=TH(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)(bi,{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)(wH,{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)(CH,{r:e}),` · `,V(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)(WV,{question:e.ask,className:`btn h-9`})})]}),(0,F.jsx)(OH,{r:e})]})}function DH({r:e,focus:t}){let[n,r]=(0,v.useState)(t),i=TH(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)(wH,{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:HV(e.first)}),n?(0,F.jsx)(Tr,{size:15,className:`text-mute`}):(0,F.jsx)(Dr,{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)(CH,{r:e}),` · `,V(e.requests),` requests`]}),(0,F.jsx)(OH,{r:e}),(0,F.jsx)(`div`,{children:(0,F.jsx)(WV,{question:e.ask,className:`btn h-8`})})]})]})}function OH({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)($r,{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)(qa,{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:[V(e.count),`×`]}),(0,F.jsx)(Dr,{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)(Ir,{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)(Mi,{size:13}),`Full comparison in Advanced`]})})]})}function kH(){let e=`OBZERVER_VERSION=$(git rev-parse --short HEAD)`;return(0,F.jsxs)(UV,{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)(za,{text:e,className:`btn h-9`})]})]})}function AH({simple:e,advanced:t}){let{mode:n}=nr();return(0,F.jsx)(F.Fragment,{children:n===`simple`?e:t})}function jH(){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)(U,{}):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 MH({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)(fo,{size:88}),(0,F.jsx)(mo,{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 NH({children:e}){let[t]=zn();return(0,F.jsx)(v.Fragment,{children:e},t.get(`project`)||`default`)}function PH(){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)(U,{}):e===`login`?(0,F.jsx)(MH,{onDone:()=>t(`ok`)}):(0,F.jsx)(Mn,{basename:`/`.replace(/\/$/,``)||void 0,children:(0,F.jsx)(NH,{children:(0,F.jsx)(Zn,{children:(0,F.jsx)(tr,{children:(0,F.jsx)(Gt,{children:(0,F.jsxs)(Ut,{element:(0,F.jsx)(ho,{}),children:[(0,F.jsx)(Ut,{index:!0,element:(0,F.jsx)(AH,{simple:(0,F.jsx)(YV,{}),advanced:(0,F.jsx)(Lz,{})})}),(0,F.jsx)(Ut,{path:`requests`,element:(0,F.jsx)(Vz,{kind:`http`})}),(0,F.jsx)(Ut,{path:`jobs`,element:(0,F.jsx)(Vz,{kind:`job`})}),(0,F.jsx)(Ut,{path:`operations/:kind/:service/:name`,element:(0,F.jsx)(Yz,{})}),(0,F.jsx)(Ut,{path:`executions/:id`,element:(0,F.jsx)(nB,{})}),(0,F.jsx)(Ut,{path:`traces`,element:(0,F.jsx)(aB,{})}),(0,F.jsx)(Ut,{path:`traces/:traceId`,element:(0,F.jsx)(jH,{})}),(0,F.jsx)(Ut,{path:`map`,element:(0,F.jsx)(lV,{})}),(0,F.jsx)(Ut,{path:`errors`,element:(0,F.jsx)(oB,{})}),(0,F.jsx)(Ut,{path:`secrets`,element:(0,F.jsx)(cB,{})}),(0,F.jsx)(Ut,{path:`errors/:fp`,element:(0,F.jsx)(uB,{})}),(0,F.jsx)(Ut,{path:`logs`,element:(0,F.jsx)(Yi,{feature:`logs`,children:(0,F.jsx)(AH,{simple:(0,F.jsx)(gH,{}),advanced:(0,F.jsx)(tB,{})})})}),(0,F.jsx)(Ut,{path:`services`,element:(0,F.jsx)(EB,{})}),(0,F.jsx)(Ut,{path:`integrations`,element:(0,F.jsx)(Cz,{})}),(0,F.jsx)(Ut,{path:`projects`,element:(0,F.jsx)(OB,{})}),(0,F.jsx)(Ut,{path:`integrations/:id`,element:(0,F.jsx)(Cz,{})}),(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)(MB,{})}),(0,F.jsx)(Ut,{path:`users`,element:(0,F.jsx)(NB,{})}),(0,F.jsx)(Ut,{path:`users/:id`,element:(0,F.jsx)(PB,{})}),(0,F.jsx)(Ut,{path:`profiler`,element:(0,F.jsx)(QB,{})}),(0,F.jsx)(Ut,{path:`metrics`,element:(0,F.jsx)(AH,{simple:(0,F.jsx)(fH,{}),advanced:(0,F.jsx)(eV,{})})}),(0,F.jsx)(Ut,{path:`releases`,element:(0,F.jsx)(AH,{simple:(0,F.jsx)(SH,{}),advanced:(0,F.jsx)(rV,{})})}),(0,F.jsx)(Ut,{path:`alerts`,element:(0,F.jsx)(Yi,{feature:`alerts`,children:(0,F.jsx)(AH,{simple:(0,F.jsx)(oH,{}),advanced:(0,F.jsx)(fV,{})})})}),(0,F.jsx)(Ut,{path:`slos`,element:(0,F.jsx)(Yi,{feature:`slos`,children:(0,F.jsx)(kV,{})})}),(0,F.jsx)(Ut,{path:`usage`,element:(0,F.jsx)(hB,{})}),(0,F.jsx)(Ut,{path:`status-pages`,element:(0,F.jsx)(IV,{})}),(0,F.jsx)(Ut,{path:`issues`,element:(0,F.jsx)(yV,{})}),(0,F.jsx)(Ut,{path:`issues/:id`,element:(0,F.jsx)(SV,{})}),(0,F.jsx)(Ut,{path:`settings`,element:(0,F.jsx)(AH,{simple:(0,F.jsx)(vH,{}),advanced:(0,F.jsx)(Fz,{})})}),(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)(PH,{})}));