nano-brain 2026.6.25 → 2026.6.26

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.
@@ -0,0 +1,509 @@
1
+ var t_=t=>{throw TypeError(t)};var Wp=(t,e,r)=>e.has(t)||t_("Cannot "+r);var q=(t,e,r)=>(Wp(t,e,"read from private field"),r?r.call(t):e.get(t)),Re=(t,e,r)=>e.has(t)?t_("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),Se=(t,e,r,n)=>(Wp(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),Be=(t,e,r)=>(Wp(t,e,"access private method"),r);var Gc=(t,e,r,n)=>({set _(i){Se(t,e,i,r)},get _(){return q(t,e,n)}});(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var Uc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Hp={exports:{}},nu={},Vp={exports:{}},$e={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var r_;function OM(){if(r_)return $e;r_=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.iterator;function m(F){return F===null||typeof F!="object"?null:(F=h&&F[h]||F["@@iterator"],typeof F=="function"?F:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,w={};function b(F,H,te){this.props=F,this.context=H,this.refs=w,this.updater=te||g}b.prototype.isReactComponent={},b.prototype.setState=function(F,H){if(typeof F!="object"&&typeof F!="function"&&F!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,F,H,"setState")},b.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function E(){}E.prototype=b.prototype;function P(F,H,te){this.props=F,this.context=H,this.refs=w,this.updater=te||g}var T=P.prototype=new E;T.constructor=P,_(T,b.prototype),T.isPureReactComponent=!0;var A=Array.isArray,x=Object.prototype.hasOwnProperty,O={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function N(F,H,te){var we,xe={},De=null,Le=null;if(H!=null)for(we in H.ref!==void 0&&(Le=H.ref),H.key!==void 0&&(De=""+H.key),H)x.call(H,we)&&!C.hasOwnProperty(we)&&(xe[we]=H[we]);var Me=arguments.length-2;if(Me===1)xe.children=te;else if(1<Me){for(var le=Array(Me),pe=0;pe<Me;pe++)le[pe]=arguments[pe+2];xe.children=le}if(F&&F.defaultProps)for(we in Me=F.defaultProps,Me)xe[we]===void 0&&(xe[we]=Me[we]);return{$$typeof:t,type:F,key:De,ref:Le,props:xe,_owner:O.current}}function D(F,H){return{$$typeof:t,type:F.type,key:H,ref:F.ref,props:F.props,_owner:F._owner}}function B(F){return typeof F=="object"&&F!==null&&F.$$typeof===t}function U(F){var H={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(te){return H[te]})}var L=/\/+/g;function j(F,H){return typeof F=="object"&&F!==null&&F.key!=null?U(""+F.key):H.toString(36)}function X(F,H,te,we,xe){var De=typeof F;(De==="undefined"||De==="boolean")&&(F=null);var Le=!1;if(F===null)Le=!0;else switch(De){case"string":case"number":Le=!0;break;case"object":switch(F.$$typeof){case t:case e:Le=!0}}if(Le)return Le=F,xe=xe(Le),F=we===""?"."+j(Le,0):we,A(xe)?(te="",F!=null&&(te=F.replace(L,"$&/")+"/"),X(xe,H,te,"",function(pe){return pe})):xe!=null&&(B(xe)&&(xe=D(xe,te+(!xe.key||Le&&Le.key===xe.key?"":(""+xe.key).replace(L,"$&/")+"/")+F)),H.push(xe)),1;if(Le=0,we=we===""?".":we+":",A(F))for(var Me=0;Me<F.length;Me++){De=F[Me];var le=we+j(De,Me);Le+=X(De,H,te,le,xe)}else if(le=m(F),typeof le=="function")for(F=le.call(F),Me=0;!(De=F.next()).done;)De=De.value,le=we+j(De,Me++),Le+=X(De,H,te,le,xe);else if(De==="object")throw H=String(F),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.");return Le}function K(F,H,te){if(F==null)return F;var we=[],xe=0;return X(F,we,"","",function(De){return H.call(te,De,xe++)}),we}function G(F){if(F._status===-1){var H=F._result;H=H(),H.then(function(te){(F._status===0||F._status===-1)&&(F._status=1,F._result=te)},function(te){(F._status===0||F._status===-1)&&(F._status=2,F._result=te)}),F._status===-1&&(F._status=0,F._result=H)}if(F._status===1)return F._result.default;throw F._result}var M={current:null},V={transition:null},J={ReactCurrentDispatcher:M,ReactCurrentBatchConfig:V,ReactCurrentOwner:O};function ee(){throw Error("act(...) is not supported in production builds of React.")}return $e.Children={map:K,forEach:function(F,H,te){K(F,function(){H.apply(this,arguments)},te)},count:function(F){var H=0;return K(F,function(){H++}),H},toArray:function(F){return K(F,function(H){return H})||[]},only:function(F){if(!B(F))throw Error("React.Children.only expected to receive a single React element child.");return F}},$e.Component=b,$e.Fragment=r,$e.Profiler=i,$e.PureComponent=P,$e.StrictMode=n,$e.Suspense=c,$e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=J,$e.act=ee,$e.cloneElement=function(F,H,te){if(F==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+F+".");var we=_({},F.props),xe=F.key,De=F.ref,Le=F._owner;if(H!=null){if(H.ref!==void 0&&(De=H.ref,Le=O.current),H.key!==void 0&&(xe=""+H.key),F.type&&F.type.defaultProps)var Me=F.type.defaultProps;for(le in H)x.call(H,le)&&!C.hasOwnProperty(le)&&(we[le]=H[le]===void 0&&Me!==void 0?Me[le]:H[le])}var le=arguments.length-2;if(le===1)we.children=te;else if(1<le){Me=Array(le);for(var pe=0;pe<le;pe++)Me[pe]=arguments[pe+2];we.children=Me}return{$$typeof:t,type:F.type,key:xe,ref:De,props:we,_owner:Le}},$e.createContext=function(F){return F={$$typeof:s,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},F.Provider={$$typeof:a,_context:F},F.Consumer=F},$e.createElement=N,$e.createFactory=function(F){var H=N.bind(null,F);return H.type=F,H},$e.createRef=function(){return{current:null}},$e.forwardRef=function(F){return{$$typeof:l,render:F}},$e.isValidElement=B,$e.lazy=function(F){return{$$typeof:p,_payload:{_status:-1,_result:F},_init:G}},$e.memo=function(F,H){return{$$typeof:f,type:F,compare:H===void 0?null:H}},$e.startTransition=function(F){var H=V.transition;V.transition={};try{F()}finally{V.transition=H}},$e.unstable_act=ee,$e.useCallback=function(F,H){return M.current.useCallback(F,H)},$e.useContext=function(F){return M.current.useContext(F)},$e.useDebugValue=function(){},$e.useDeferredValue=function(F){return M.current.useDeferredValue(F)},$e.useEffect=function(F,H){return M.current.useEffect(F,H)},$e.useId=function(){return M.current.useId()},$e.useImperativeHandle=function(F,H,te){return M.current.useImperativeHandle(F,H,te)},$e.useInsertionEffect=function(F,H){return M.current.useInsertionEffect(F,H)},$e.useLayoutEffect=function(F,H){return M.current.useLayoutEffect(F,H)},$e.useMemo=function(F,H){return M.current.useMemo(F,H)},$e.useReducer=function(F,H,te){return M.current.useReducer(F,H,te)},$e.useRef=function(F){return M.current.useRef(F)},$e.useState=function(F){return M.current.useState(F)},$e.useSyncExternalStore=function(F,H,te){return M.current.useSyncExternalStore(F,H,te)},$e.useTransition=function(){return M.current.useTransition()},$e.version="18.3.1",$e}var n_;function Zb(){return n_||(n_=1,Vp.exports=OM()),Vp.exports}/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var i_;function AM(){if(i_)return nu;i_=1;var t=Zb(),e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(l,c,f){var p,h={},m=null,g=null;f!==void 0&&(m=""+f),c.key!==void 0&&(m=""+c.key),c.ref!==void 0&&(g=c.ref);for(p in c)n.call(c,p)&&!a.hasOwnProperty(p)&&(h[p]=c[p]);if(l&&l.defaultProps)for(p in c=l.defaultProps,c)h[p]===void 0&&(h[p]=c[p]);return{$$typeof:e,type:l,key:m,ref:g,props:h,_owner:i.current}}return nu.Fragment=r,nu.jsx=s,nu.jsxs=s,nu}var a_;function PM(){return a_||(a_=1,Hp.exports=AM()),Hp.exports}var R=PM(),I=Zb();const Q=tt(I);var qc={},Kp={exports:{}},fr={},Xp={exports:{}},Yp={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var o_;function TM(){return o_||(o_=1,(function(t){function e(V,J){var ee=V.length;V.push(J);e:for(;0<ee;){var F=ee-1>>>1,H=V[F];if(0<i(H,J))V[F]=J,V[ee]=H,ee=F;else break e}}function r(V){return V.length===0?null:V[0]}function n(V){if(V.length===0)return null;var J=V[0],ee=V.pop();if(ee!==J){V[0]=ee;e:for(var F=0,H=V.length,te=H>>>1;F<te;){var we=2*(F+1)-1,xe=V[we],De=we+1,Le=V[De];if(0>i(xe,ee))De<H&&0>i(Le,xe)?(V[F]=Le,V[De]=ee,F=De):(V[F]=xe,V[we]=ee,F=we);else if(De<H&&0>i(Le,ee))V[F]=Le,V[De]=ee,F=De;else break e}}return J}function i(V,J){var ee=V.sortIndex-J.sortIndex;return ee!==0?ee:V.id-J.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],f=[],p=1,h=null,m=3,g=!1,_=!1,w=!1,b=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(V){for(var J=r(f);J!==null;){if(J.callback===null)n(f);else if(J.startTime<=V)n(f),J.sortIndex=J.expirationTime,e(c,J);else break;J=r(f)}}function A(V){if(w=!1,T(V),!_)if(r(c)!==null)_=!0,G(x);else{var J=r(f);J!==null&&M(A,J.startTime-V)}}function x(V,J){_=!1,w&&(w=!1,E(N),N=-1),g=!0;var ee=m;try{for(T(J),h=r(c);h!==null&&(!(h.expirationTime>J)||V&&!U());){var F=h.callback;if(typeof F=="function"){h.callback=null,m=h.priorityLevel;var H=F(h.expirationTime<=J);J=t.unstable_now(),typeof H=="function"?h.callback=H:h===r(c)&&n(c),T(J)}else n(c);h=r(c)}if(h!==null)var te=!0;else{var we=r(f);we!==null&&M(A,we.startTime-J),te=!1}return te}finally{h=null,m=ee,g=!1}}var O=!1,C=null,N=-1,D=5,B=-1;function U(){return!(t.unstable_now()-B<D)}function L(){if(C!==null){var V=t.unstable_now();B=V;var J=!0;try{J=C(!0,V)}finally{J?j():(O=!1,C=null)}}else O=!1}var j;if(typeof P=="function")j=function(){P(L)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,K=X.port2;X.port1.onmessage=L,j=function(){K.postMessage(null)}}else j=function(){b(L,0)};function G(V){C=V,O||(O=!0,j())}function M(V,J){N=b(function(){V(t.unstable_now())},J)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(V){V.callback=null},t.unstable_continueExecution=function(){_||g||(_=!0,G(x))},t.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<V?Math.floor(1e3/V):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(V){switch(m){case 1:case 2:case 3:var J=3;break;default:J=m}var ee=m;m=J;try{return V()}finally{m=ee}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(V,J){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var ee=m;m=V;try{return J()}finally{m=ee}},t.unstable_scheduleCallback=function(V,J,ee){var F=t.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?F+ee:F):ee=F,V){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=ee+H,V={id:p++,callback:J,priorityLevel:V,startTime:ee,expirationTime:H,sortIndex:-1},ee>F?(V.sortIndex=ee,e(f,V),r(c)===null&&V===r(f)&&(w?(E(N),N=-1):w=!0,M(A,ee-F))):(V.sortIndex=H,e(c,V),_||g||(_=!0,G(x))),V},t.unstable_shouldYield=U,t.unstable_wrapCallback=function(V){var J=m;return function(){var ee=m;m=J;try{return V.apply(this,arguments)}finally{m=ee}}}})(Yp)),Yp}var s_;function CM(){return s_||(s_=1,Xp.exports=TM()),Xp.exports}/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var u_;function kM(){if(u_)return fr;u_=1;var t=Zb(),e=CM();function r(o){for(var u="https://reactjs.org/docs/error-decoder.html?invariant="+o,d=1;d<arguments.length;d++)u+="&args[]="+encodeURIComponent(arguments[d]);return"Minified React error #"+o+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,i={};function a(o,u){s(o,u),s(o+"Capture",u)}function s(o,u){for(i[o]=u,o=0;o<u.length;o++)n.add(u[o])}var l=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,f=/^[: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]*$/,p={},h={};function m(o){return c.call(h,o)?!0:c.call(p,o)?!1:f.test(o)?h[o]=!0:(p[o]=!0,!1)}function g(o,u,d,v){if(d!==null&&d.type===0)return!1;switch(typeof u){case"function":case"symbol":return!0;case"boolean":return v?!1:d!==null?!d.acceptsBooleans:(o=o.toLowerCase().slice(0,5),o!=="data-"&&o!=="aria-");default:return!1}}function _(o,u,d,v){if(u===null||typeof u>"u"||g(o,u,d,v))return!0;if(v)return!1;if(d!==null)switch(d.type){case 3:return!u;case 4:return u===!1;case 5:return isNaN(u);case 6:return isNaN(u)||1>u}return!1}function w(o,u,d,v,y,S,k){this.acceptsBooleans=u===2||u===3||u===4,this.attributeName=v,this.attributeNamespace=y,this.mustUseProperty=d,this.propertyName=o,this.type=u,this.sanitizeURL=S,this.removeEmptyString=k}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(o){b[o]=new w(o,0,!1,o,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(o){var u=o[0];b[u]=new w(u,1,!1,o[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(o){b[o]=new w(o,2,!1,o.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(o){b[o]=new w(o,2,!1,o,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(o){b[o]=new w(o,3,!1,o.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(o){b[o]=new w(o,3,!0,o,null,!1,!1)}),["capture","download"].forEach(function(o){b[o]=new w(o,4,!1,o,null,!1,!1)}),["cols","rows","size","span"].forEach(function(o){b[o]=new w(o,6,!1,o,null,!1,!1)}),["rowSpan","start"].forEach(function(o){b[o]=new w(o,5,!1,o.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function P(o){return o[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(o){var u=o.replace(E,P);b[u]=new w(u,1,!1,o,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(o){var u=o.replace(E,P);b[u]=new w(u,1,!1,o,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(o){var u=o.replace(E,P);b[u]=new w(u,1,!1,o,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(o){b[o]=new w(o,1,!1,o.toLowerCase(),null,!1,!1)}),b.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(o){b[o]=new w(o,1,!1,o.toLowerCase(),null,!0,!0)});function T(o,u,d,v){var y=b.hasOwnProperty(u)?b[u]:null;(y!==null?y.type!==0:v||!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(_(u,d,y,v)&&(d=null),v||y===null?m(u)&&(d===null?o.removeAttribute(u):o.setAttribute(u,""+d)):y.mustUseProperty?o[y.propertyName]=d===null?y.type===3?!1:"":d:(u=y.attributeName,v=y.attributeNamespace,d===null?o.removeAttribute(u):(y=y.type,d=y===3||y===4&&d===!0?"":""+d,v?o.setAttributeNS(v,u,d):o.setAttribute(u,d))))}var A=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=Symbol.for("react.element"),O=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),B=Symbol.for("react.provider"),U=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),M=Symbol.for("react.offscreen"),V=Symbol.iterator;function J(o){return o===null||typeof o!="object"?null:(o=V&&o[V]||o["@@iterator"],typeof o=="function"?o:null)}var ee=Object.assign,F;function H(o){if(F===void 0)try{throw Error()}catch(d){var u=d.stack.trim().match(/\n( *(at )?)/);F=u&&u[1]||""}return`
34
+ `+F+o}var te=!1;function we(o,u){if(!o||te)return"";te=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(u)if(u=function(){throw Error()},Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(re){var v=re}Reflect.construct(o,[],u)}else{try{u.call()}catch(re){v=re}o.call(u.prototype)}else{try{throw Error()}catch(re){v=re}o()}}catch(re){if(re&&v&&typeof re.stack=="string"){for(var y=re.stack.split(`
35
+ `),S=v.stack.split(`
36
+ `),k=y.length-1,$=S.length-1;1<=k&&0<=$&&y[k]!==S[$];)$--;for(;1<=k&&0<=$;k--,$--)if(y[k]!==S[$]){if(k!==1||$!==1)do if(k--,$--,0>$||y[k]!==S[$]){var z=`
37
+ `+y[k].replace(" at new "," at ");return o.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",o.displayName)),z}while(1<=k&&0<=$);break}}}finally{te=!1,Error.prepareStackTrace=d}return(o=o?o.displayName||o.name:"")?H(o):""}function xe(o){switch(o.tag){case 5:return H(o.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return o=we(o.type,!1),o;case 11:return o=we(o.type.render,!1),o;case 1:return o=we(o.type,!0),o;default:return""}}function De(o){if(o==null)return null;if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case C:return"Fragment";case O:return"Portal";case D:return"Profiler";case N:return"StrictMode";case j:return"Suspense";case X:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case U:return(o.displayName||"Context")+".Consumer";case B:return(o._context.displayName||"Context")+".Provider";case L:var u=o.render;return o=o.displayName,o||(o=u.displayName||u.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case K:return u=o.displayName||null,u!==null?u:De(o.type)||"Memo";case G:u=o._payload,o=o._init;try{return De(o(u))}catch{}}return null}function Le(o){var u=o.type;switch(o.tag){case 24:return"Cache";case 9:return(u.displayName||"Context")+".Consumer";case 10:return(u._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return o=u.render,o=o.displayName||o.name||"",u.displayName||(o!==""?"ForwardRef("+o+")":"ForwardRef");case 7:return"Fragment";case 5:return u;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return De(u);case 8:return u===N?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u}return null}function Me(o){switch(typeof o){case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function le(o){var u=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function pe(o){var u=le(o)?"checked":"value",d=Object.getOwnPropertyDescriptor(o.constructor.prototype,u),v=""+o[u];if(!o.hasOwnProperty(u)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var y=d.get,S=d.set;return Object.defineProperty(o,u,{configurable:!0,get:function(){return y.call(this)},set:function(k){v=""+k,S.call(this,k)}}),Object.defineProperty(o,u,{enumerable:d.enumerable}),{getValue:function(){return v},setValue:function(k){v=""+k},stopTracking:function(){o._valueTracker=null,delete o[u]}}}}function ve(o){o._valueTracker||(o._valueTracker=pe(o))}function ie(o){if(!o)return!1;var u=o._valueTracker;if(!u)return!0;var d=u.getValue(),v="";return o&&(v=le(o)?o.checked?"true":"false":o.value),o=v,o!==d?(u.setValue(o),!0):!1}function Fe(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}function de(o,u){var d=u.checked;return ee({},u,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??o._wrapperState.initialChecked})}function me(o,u){var d=u.defaultValue==null?"":u.defaultValue,v=u.checked!=null?u.checked:u.defaultChecked;d=Me(u.value!=null?u.value:d),o._wrapperState={initialChecked:v,initialValue:d,controlled:u.type==="checkbox"||u.type==="radio"?u.checked!=null:u.value!=null}}function ne(o,u){u=u.checked,u!=null&&T(o,"checked",u,!1)}function it(o,u){ne(o,u);var d=Me(u.value),v=u.type;if(d!=null)v==="number"?(d===0&&o.value===""||o.value!=d)&&(o.value=""+d):o.value!==""+d&&(o.value=""+d);else if(v==="submit"||v==="reset"){o.removeAttribute("value");return}u.hasOwnProperty("value")?Rt(o,u.type,d):u.hasOwnProperty("defaultValue")&&Rt(o,u.type,Me(u.defaultValue)),u.checked==null&&u.defaultChecked!=null&&(o.defaultChecked=!!u.defaultChecked)}function kt(o,u,d){if(u.hasOwnProperty("value")||u.hasOwnProperty("defaultValue")){var v=u.type;if(!(v!=="submit"&&v!=="reset"||u.value!==void 0&&u.value!==null))return;u=""+o._wrapperState.initialValue,d||u===o.value||(o.value=u),o.defaultValue=u}d=o.name,d!==""&&(o.name=""),o.defaultChecked=!!o._wrapperState.initialChecked,d!==""&&(o.name=d)}function Rt(o,u,d){(u!=="number"||Fe(o.ownerDocument)!==o)&&(d==null?o.defaultValue=""+o._wrapperState.initialValue:o.defaultValue!==""+d&&(o.defaultValue=""+d))}var Bt=Array.isArray;function rt(o,u,d,v){if(o=o.options,u){u={};for(var y=0;y<d.length;y++)u["$"+d[y]]=!0;for(d=0;d<o.length;d++)y=u.hasOwnProperty("$"+o[d].value),o[d].selected!==y&&(o[d].selected=y),y&&v&&(o[d].defaultSelected=!0)}else{for(d=""+Me(d),u=null,y=0;y<o.length;y++){if(o[y].value===d){o[y].selected=!0,v&&(o[y].defaultSelected=!0);return}u!==null||o[y].disabled||(u=o[y])}u!==null&&(u.selected=!0)}}function jt(o,u){if(u.dangerouslySetInnerHTML!=null)throw Error(r(91));return ee({},u,{value:void 0,defaultValue:void 0,children:""+o._wrapperState.initialValue})}function fn(o,u){var d=u.value;if(d==null){if(d=u.children,u=u.defaultValue,d!=null){if(u!=null)throw Error(r(92));if(Bt(d)){if(1<d.length)throw Error(r(93));d=d[0]}u=d}u==null&&(u=""),d=u}o._wrapperState={initialValue:Me(d)}}function dn(o,u){var d=Me(u.value),v=Me(u.defaultValue);d!=null&&(d=""+d,d!==o.value&&(o.value=d),u.defaultValue==null&&o.defaultValue!==d&&(o.defaultValue=d)),v!=null&&(o.defaultValue=""+v)}function hn(o){var u=o.textContent;u===o._wrapperState.initialValue&&u!==""&&u!==null&&(o.value=u)}function ea(o){switch(o){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Mn(o,u){return o==null||o==="http://www.w3.org/1999/xhtml"?ea(u):o==="http://www.w3.org/2000/svg"&&u==="foreignObject"?"http://www.w3.org/1999/xhtml":o}var Ln,pn=(function(o){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(u,d,v,y){MSApp.execUnsafeLocalFunction(function(){return o(u,d,v,y)})}:o})(function(o,u){if(o.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in o)o.innerHTML=u;else{for(Ln=Ln||document.createElement("div"),Ln.innerHTML="<svg>"+u.valueOf().toString()+"</svg>",u=Ln.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;u.firstChild;)o.appendChild(u.firstChild)}});function vn(o,u){if(u){var d=o.firstChild;if(d&&d===o.lastChild&&d.nodeType===3){d.nodeValue=u;return}}o.textContent=u}var mn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},CD=["Webkit","ms","Moz","O"];Object.keys(mn).forEach(function(o){CD.forEach(function(u){u=u+o.charAt(0).toUpperCase()+o.substring(1),mn[u]=mn[o]})});function mx(o,u,d){return u==null||typeof u=="boolean"||u===""?"":d||typeof u!="number"||u===0||mn.hasOwnProperty(o)&&mn[o]?(""+u).trim():u+"px"}function gx(o,u){o=o.style;for(var d in u)if(u.hasOwnProperty(d)){var v=d.indexOf("--")===0,y=mx(d,u[d],v);d==="float"&&(d="cssFloat"),v?o.setProperty(d,y):o[d]=y}}var kD=ee({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function nh(o,u){if(u){if(kD[o]&&(u.children!=null||u.dangerouslySetInnerHTML!=null))throw Error(r(137,o));if(u.dangerouslySetInnerHTML!=null){if(u.children!=null)throw Error(r(60));if(typeof u.dangerouslySetInnerHTML!="object"||!("__html"in u.dangerouslySetInnerHTML))throw Error(r(61))}if(u.style!=null&&typeof u.style!="object")throw Error(r(62))}}function ih(o,u){if(o.indexOf("-")===-1)return typeof u.is=="string";switch(o){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 ah=null;function oh(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var sh=null,qa=null,Wa=null;function yx(o){if(o=Gs(o)){if(typeof sh!="function")throw Error(r(280));var u=o.stateNode;u&&(u=nc(u),sh(o.stateNode,o.type,u))}}function bx(o){qa?Wa?Wa.push(o):Wa=[o]:qa=o}function wx(){if(qa){var o=qa,u=Wa;if(Wa=qa=null,yx(o),u)for(o=0;o<u.length;o++)yx(u[o])}}function xx(o,u){return o(u)}function Sx(){}var uh=!1;function _x(o,u,d){if(uh)return o(u,d);uh=!0;try{return xx(o,u,d)}finally{uh=!1,(qa!==null||Wa!==null)&&(Sx(),wx())}}function xs(o,u){var d=o.stateNode;if(d===null)return null;var v=nc(d);if(v===null)return null;d=v[u];e:switch(u){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(v=!v.disabled)||(o=o.type,v=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!v;break e;default:o=!1}if(o)return null;if(d&&typeof d!="function")throw Error(r(231,u,typeof d));return d}var lh=!1;if(l)try{var Ss={};Object.defineProperty(Ss,"passive",{get:function(){lh=!0}}),window.addEventListener("test",Ss,Ss),window.removeEventListener("test",Ss,Ss)}catch{lh=!1}function RD(o,u,d,v,y,S,k,$,z){var re=Array.prototype.slice.call(arguments,3);try{u.apply(d,re)}catch(ue){this.onError(ue)}}var _s=!1,Il=null,Ml=!1,ch=null,jD={onError:function(o){_s=!0,Il=o}};function ND(o,u,d,v,y,S,k,$,z){_s=!1,Il=null,RD.apply(jD,arguments)}function DD(o,u,d,v,y,S,k,$,z){if(ND.apply(this,arguments),_s){if(_s){var re=Il;_s=!1,Il=null}else throw Error(r(198));Ml||(Ml=!0,ch=re)}}function ta(o){var u=o,d=o;if(o.alternate)for(;u.return;)u=u.return;else{o=u;do u=o,(u.flags&4098)!==0&&(d=u.return),o=u.return;while(o)}return u.tag===3?d:null}function Ex(o){if(o.tag===13){var u=o.memoizedState;if(u===null&&(o=o.alternate,o!==null&&(u=o.memoizedState)),u!==null)return u.dehydrated}return null}function Ox(o){if(ta(o)!==o)throw Error(r(188))}function ID(o){var u=o.alternate;if(!u){if(u=ta(o),u===null)throw Error(r(188));return u!==o?null:o}for(var d=o,v=u;;){var y=d.return;if(y===null)break;var S=y.alternate;if(S===null){if(v=y.return,v!==null){d=v;continue}break}if(y.child===S.child){for(S=y.child;S;){if(S===d)return Ox(y),o;if(S===v)return Ox(y),u;S=S.sibling}throw Error(r(188))}if(d.return!==v.return)d=y,v=S;else{for(var k=!1,$=y.child;$;){if($===d){k=!0,d=y,v=S;break}if($===v){k=!0,v=y,d=S;break}$=$.sibling}if(!k){for($=S.child;$;){if($===d){k=!0,d=S,v=y;break}if($===v){k=!0,v=S,d=y;break}$=$.sibling}if(!k)throw Error(r(189))}}if(d.alternate!==v)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?o:u}function Ax(o){return o=ID(o),o!==null?Px(o):null}function Px(o){if(o.tag===5||o.tag===6)return o;for(o=o.child;o!==null;){var u=Px(o);if(u!==null)return u;o=o.sibling}return null}var Tx=e.unstable_scheduleCallback,Cx=e.unstable_cancelCallback,MD=e.unstable_shouldYield,LD=e.unstable_requestPaint,yt=e.unstable_now,$D=e.unstable_getCurrentPriorityLevel,fh=e.unstable_ImmediatePriority,kx=e.unstable_UserBlockingPriority,Ll=e.unstable_NormalPriority,FD=e.unstable_LowPriority,Rx=e.unstable_IdlePriority,$l=null,gn=null;function BD(o){if(gn&&typeof gn.onCommitFiberRoot=="function")try{gn.onCommitFiberRoot($l,o,void 0,(o.current.flags&128)===128)}catch{}}var qr=Math.clz32?Math.clz32:UD,zD=Math.log,GD=Math.LN2;function UD(o){return o>>>=0,o===0?32:31-(zD(o)/GD|0)|0}var Fl=64,Bl=4194304;function Es(o){switch(o&-o){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: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 o&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return o&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return o}}function zl(o,u){var d=o.pendingLanes;if(d===0)return 0;var v=0,y=o.suspendedLanes,S=o.pingedLanes,k=d&268435455;if(k!==0){var $=k&~y;$!==0?v=Es($):(S&=k,S!==0&&(v=Es(S)))}else k=d&~y,k!==0?v=Es(k):S!==0&&(v=Es(S));if(v===0)return 0;if(u!==0&&u!==v&&(u&y)===0&&(y=v&-v,S=u&-u,y>=S||y===16&&(S&4194240)!==0))return u;if((v&4)!==0&&(v|=d&16),u=o.entangledLanes,u!==0)for(o=o.entanglements,u&=v;0<u;)d=31-qr(u),y=1<<d,v|=o[d],u&=~y;return v}function qD(o,u){switch(o){case 1:case 2:case 4:return u+250;case 8:case 16:case 32:case 64: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 u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function WD(o,u){for(var d=o.suspendedLanes,v=o.pingedLanes,y=o.expirationTimes,S=o.pendingLanes;0<S;){var k=31-qr(S),$=1<<k,z=y[k];z===-1?(($&d)===0||($&v)!==0)&&(y[k]=qD($,u)):z<=u&&(o.expiredLanes|=$),S&=~$}}function dh(o){return o=o.pendingLanes&-1073741825,o!==0?o:o&1073741824?1073741824:0}function jx(){var o=Fl;return Fl<<=1,(Fl&4194240)===0&&(Fl=64),o}function hh(o){for(var u=[],d=0;31>d;d++)u.push(o);return u}function Os(o,u,d){o.pendingLanes|=u,u!==536870912&&(o.suspendedLanes=0,o.pingedLanes=0),o=o.eventTimes,u=31-qr(u),o[u]=d}function HD(o,u){var d=o.pendingLanes&~u;o.pendingLanes=u,o.suspendedLanes=0,o.pingedLanes=0,o.expiredLanes&=u,o.mutableReadLanes&=u,o.entangledLanes&=u,u=o.entanglements;var v=o.eventTimes;for(o=o.expirationTimes;0<d;){var y=31-qr(d),S=1<<y;u[y]=0,v[y]=-1,o[y]=-1,d&=~S}}function ph(o,u){var d=o.entangledLanes|=u;for(o=o.entanglements;d;){var v=31-qr(d),y=1<<v;y&u|o[v]&u&&(o[v]|=u),d&=~y}}var Je=0;function Nx(o){return o&=-o,1<o?4<o?(o&268435455)!==0?16:536870912:4:1}var Dx,vh,Ix,Mx,Lx,mh=!1,Gl=[],pi=null,vi=null,mi=null,As=new Map,Ps=new Map,gi=[],VD="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 submit".split(" ");function $x(o,u){switch(o){case"focusin":case"focusout":pi=null;break;case"dragenter":case"dragleave":vi=null;break;case"mouseover":case"mouseout":mi=null;break;case"pointerover":case"pointerout":As.delete(u.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ps.delete(u.pointerId)}}function Ts(o,u,d,v,y,S){return o===null||o.nativeEvent!==S?(o={blockedOn:u,domEventName:d,eventSystemFlags:v,nativeEvent:S,targetContainers:[y]},u!==null&&(u=Gs(u),u!==null&&vh(u)),o):(o.eventSystemFlags|=v,u=o.targetContainers,y!==null&&u.indexOf(y)===-1&&u.push(y),o)}function KD(o,u,d,v,y){switch(u){case"focusin":return pi=Ts(pi,o,u,d,v,y),!0;case"dragenter":return vi=Ts(vi,o,u,d,v,y),!0;case"mouseover":return mi=Ts(mi,o,u,d,v,y),!0;case"pointerover":var S=y.pointerId;return As.set(S,Ts(As.get(S)||null,o,u,d,v,y)),!0;case"gotpointercapture":return S=y.pointerId,Ps.set(S,Ts(Ps.get(S)||null,o,u,d,v,y)),!0}return!1}function Fx(o){var u=ra(o.target);if(u!==null){var d=ta(u);if(d!==null){if(u=d.tag,u===13){if(u=Ex(d),u!==null){o.blockedOn=u,Lx(o.priority,function(){Ix(d)});return}}else if(u===3&&d.stateNode.current.memoizedState.isDehydrated){o.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}o.blockedOn=null}function Ul(o){if(o.blockedOn!==null)return!1;for(var u=o.targetContainers;0<u.length;){var d=yh(o.domEventName,o.eventSystemFlags,u[0],o.nativeEvent);if(d===null){d=o.nativeEvent;var v=new d.constructor(d.type,d);ah=v,d.target.dispatchEvent(v),ah=null}else return u=Gs(d),u!==null&&vh(u),o.blockedOn=d,!1;u.shift()}return!0}function Bx(o,u,d){Ul(o)&&d.delete(u)}function XD(){mh=!1,pi!==null&&Ul(pi)&&(pi=null),vi!==null&&Ul(vi)&&(vi=null),mi!==null&&Ul(mi)&&(mi=null),As.forEach(Bx),Ps.forEach(Bx)}function Cs(o,u){o.blockedOn===u&&(o.blockedOn=null,mh||(mh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,XD)))}function ks(o){function u(y){return Cs(y,o)}if(0<Gl.length){Cs(Gl[0],o);for(var d=1;d<Gl.length;d++){var v=Gl[d];v.blockedOn===o&&(v.blockedOn=null)}}for(pi!==null&&Cs(pi,o),vi!==null&&Cs(vi,o),mi!==null&&Cs(mi,o),As.forEach(u),Ps.forEach(u),d=0;d<gi.length;d++)v=gi[d],v.blockedOn===o&&(v.blockedOn=null);for(;0<gi.length&&(d=gi[0],d.blockedOn===null);)Fx(d),d.blockedOn===null&&gi.shift()}var Ha=A.ReactCurrentBatchConfig,ql=!0;function YD(o,u,d,v){var y=Je,S=Ha.transition;Ha.transition=null;try{Je=1,gh(o,u,d,v)}finally{Je=y,Ha.transition=S}}function QD(o,u,d,v){var y=Je,S=Ha.transition;Ha.transition=null;try{Je=4,gh(o,u,d,v)}finally{Je=y,Ha.transition=S}}function gh(o,u,d,v){if(ql){var y=yh(o,u,d,v);if(y===null)Ih(o,u,v,Wl,d),$x(o,v);else if(KD(y,o,u,d,v))v.stopPropagation();else if($x(o,v),u&4&&-1<VD.indexOf(o)){for(;y!==null;){var S=Gs(y);if(S!==null&&Dx(S),S=yh(o,u,d,v),S===null&&Ih(o,u,v,Wl,d),S===y)break;y=S}y!==null&&v.stopPropagation()}else Ih(o,u,v,null,d)}}var Wl=null;function yh(o,u,d,v){if(Wl=null,o=oh(v),o=ra(o),o!==null)if(u=ta(o),u===null)o=null;else if(d=u.tag,d===13){if(o=Ex(u),o!==null)return o;o=null}else if(d===3){if(u.stateNode.current.memoizedState.isDehydrated)return u.tag===3?u.stateNode.containerInfo:null;o=null}else u!==o&&(o=null);return Wl=o,null}function zx(o){switch(o){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"resize":case"seeked":case"submit":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"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch($D()){case fh:return 1;case kx:return 4;case Ll:case FD:return 16;case Rx:return 536870912;default:return 16}default:return 16}}var yi=null,bh=null,Hl=null;function Gx(){if(Hl)return Hl;var o,u=bh,d=u.length,v,y="value"in yi?yi.value:yi.textContent,S=y.length;for(o=0;o<d&&u[o]===y[o];o++);var k=d-o;for(v=1;v<=k&&u[d-v]===y[S-v];v++);return Hl=y.slice(o,1<v?1-v:void 0)}function Vl(o){var u=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&u===13&&(o=13)):o=u,o===10&&(o=13),32<=o||o===13?o:0}function Kl(){return!0}function Ux(){return!1}function mr(o){function u(d,v,y,S,k){this._reactName=d,this._targetInst=y,this.type=v,this.nativeEvent=S,this.target=k,this.currentTarget=null;for(var $ in o)o.hasOwnProperty($)&&(d=o[$],this[$]=d?d(S):S[$]);return this.isDefaultPrevented=(S.defaultPrevented!=null?S.defaultPrevented:S.returnValue===!1)?Kl:Ux,this.isPropagationStopped=Ux,this}return ee(u.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=Kl)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=Kl)},persist:function(){},isPersistent:Kl}),u}var Va={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wh=mr(Va),Rs=ee({},Va,{view:0,detail:0}),ZD=mr(Rs),xh,Sh,js,Xl=ee({},Rs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Eh,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==js&&(js&&o.type==="mousemove"?(xh=o.screenX-js.screenX,Sh=o.screenY-js.screenY):Sh=xh=0,js=o),xh)},movementY:function(o){return"movementY"in o?o.movementY:Sh}}),qx=mr(Xl),JD=ee({},Xl,{dataTransfer:0}),eI=mr(JD),tI=ee({},Rs,{relatedTarget:0}),_h=mr(tI),rI=ee({},Va,{animationName:0,elapsedTime:0,pseudoElement:0}),nI=mr(rI),iI=ee({},Va,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),aI=mr(iI),oI=ee({},Va,{data:0}),Wx=mr(oI),sI={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},uI={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"},lI={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function cI(o){var u=this.nativeEvent;return u.getModifierState?u.getModifierState(o):(o=lI[o])?!!u[o]:!1}function Eh(){return cI}var fI=ee({},Rs,{key:function(o){if(o.key){var u=sI[o.key]||o.key;if(u!=="Unidentified")return u}return o.type==="keypress"?(o=Vl(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?uI[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Eh,charCode:function(o){return o.type==="keypress"?Vl(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?Vl(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),dI=mr(fI),hI=ee({},Xl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Hx=mr(hI),pI=ee({},Rs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Eh}),vI=mr(pI),mI=ee({},Va,{propertyName:0,elapsedTime:0,pseudoElement:0}),gI=mr(mI),yI=ee({},Xl,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),bI=mr(yI),wI=[9,13,27,32],Oh=l&&"CompositionEvent"in window,Ns=null;l&&"documentMode"in document&&(Ns=document.documentMode);var xI=l&&"TextEvent"in window&&!Ns,Vx=l&&(!Oh||Ns&&8<Ns&&11>=Ns),Kx=" ",Xx=!1;function Yx(o,u){switch(o){case"keyup":return wI.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qx(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var Ka=!1;function SI(o,u){switch(o){case"compositionend":return Qx(u);case"keypress":return u.which!==32?null:(Xx=!0,Kx);case"textInput":return o=u.data,o===Kx&&Xx?null:o;default:return null}}function _I(o,u){if(Ka)return o==="compositionend"||!Oh&&Yx(o,u)?(o=Gx(),Hl=bh=yi=null,Ka=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1<u.char.length)return u.char;if(u.which)return String.fromCharCode(u.which)}return null;case"compositionend":return Vx&&u.locale!=="ko"?null:u.data;default:return null}}var EI={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 Zx(o){var u=o&&o.nodeName&&o.nodeName.toLowerCase();return u==="input"?!!EI[o.type]:u==="textarea"}function Jx(o,u,d,v){bx(v),u=ec(u,"onChange"),0<u.length&&(d=new wh("onChange","change",null,d,v),o.push({event:d,listeners:u}))}var Ds=null,Is=null;function OI(o){g1(o,0)}function Yl(o){var u=Ja(o);if(ie(u))return o}function AI(o,u){if(o==="change")return u}var e1=!1;if(l){var Ah;if(l){var Ph="oninput"in document;if(!Ph){var t1=document.createElement("div");t1.setAttribute("oninput","return;"),Ph=typeof t1.oninput=="function"}Ah=Ph}else Ah=!1;e1=Ah&&(!document.documentMode||9<document.documentMode)}function r1(){Ds&&(Ds.detachEvent("onpropertychange",n1),Is=Ds=null)}function n1(o){if(o.propertyName==="value"&&Yl(Is)){var u=[];Jx(u,Is,o,oh(o)),_x(OI,u)}}function PI(o,u,d){o==="focusin"?(r1(),Ds=u,Is=d,Ds.attachEvent("onpropertychange",n1)):o==="focusout"&&r1()}function TI(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return Yl(Is)}function CI(o,u){if(o==="click")return Yl(u)}function kI(o,u){if(o==="input"||o==="change")return Yl(u)}function RI(o,u){return o===u&&(o!==0||1/o===1/u)||o!==o&&u!==u}var Wr=typeof Object.is=="function"?Object.is:RI;function Ms(o,u){if(Wr(o,u))return!0;if(typeof o!="object"||o===null||typeof u!="object"||u===null)return!1;var d=Object.keys(o),v=Object.keys(u);if(d.length!==v.length)return!1;for(v=0;v<d.length;v++){var y=d[v];if(!c.call(u,y)||!Wr(o[y],u[y]))return!1}return!0}function i1(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function a1(o,u){var d=i1(o);o=0;for(var v;d;){if(d.nodeType===3){if(v=o+d.textContent.length,o<=u&&v>=u)return{node:d,offset:u-o};o=v}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=i1(d)}}function o1(o,u){return o&&u?o===u?!0:o&&o.nodeType===3?!1:u&&u.nodeType===3?o1(o,u.parentNode):"contains"in o?o.contains(u):o.compareDocumentPosition?!!(o.compareDocumentPosition(u)&16):!1:!1}function s1(){for(var o=window,u=Fe();u instanceof o.HTMLIFrameElement;){try{var d=typeof u.contentWindow.location.href=="string"}catch{d=!1}if(d)o=u.contentWindow;else break;u=Fe(o.document)}return u}function Th(o){var u=o&&o.nodeName&&o.nodeName.toLowerCase();return u&&(u==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||u==="textarea"||o.contentEditable==="true")}function jI(o){var u=s1(),d=o.focusedElem,v=o.selectionRange;if(u!==d&&d&&d.ownerDocument&&o1(d.ownerDocument.documentElement,d)){if(v!==null&&Th(d)){if(u=v.start,o=v.end,o===void 0&&(o=u),"selectionStart"in d)d.selectionStart=u,d.selectionEnd=Math.min(o,d.value.length);else if(o=(u=d.ownerDocument||document)&&u.defaultView||window,o.getSelection){o=o.getSelection();var y=d.textContent.length,S=Math.min(v.start,y);v=v.end===void 0?S:Math.min(v.end,y),!o.extend&&S>v&&(y=v,v=S,S=y),y=a1(d,S);var k=a1(d,v);y&&k&&(o.rangeCount!==1||o.anchorNode!==y.node||o.anchorOffset!==y.offset||o.focusNode!==k.node||o.focusOffset!==k.offset)&&(u=u.createRange(),u.setStart(y.node,y.offset),o.removeAllRanges(),S>v?(o.addRange(u),o.extend(k.node,k.offset)):(u.setEnd(k.node,k.offset),o.addRange(u)))}}for(u=[],o=d;o=o.parentNode;)o.nodeType===1&&u.push({element:o,left:o.scrollLeft,top:o.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<u.length;d++)o=u[d],o.element.scrollLeft=o.left,o.element.scrollTop=o.top}}var NI=l&&"documentMode"in document&&11>=document.documentMode,Xa=null,Ch=null,Ls=null,kh=!1;function u1(o,u,d){var v=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;kh||Xa==null||Xa!==Fe(v)||(v=Xa,"selectionStart"in v&&Th(v)?v={start:v.selectionStart,end:v.selectionEnd}:(v=(v.ownerDocument&&v.ownerDocument.defaultView||window).getSelection(),v={anchorNode:v.anchorNode,anchorOffset:v.anchorOffset,focusNode:v.focusNode,focusOffset:v.focusOffset}),Ls&&Ms(Ls,v)||(Ls=v,v=ec(Ch,"onSelect"),0<v.length&&(u=new wh("onSelect","select",null,u,d),o.push({event:u,listeners:v}),u.target=Xa)))}function Ql(o,u){var d={};return d[o.toLowerCase()]=u.toLowerCase(),d["Webkit"+o]="webkit"+u,d["Moz"+o]="moz"+u,d}var Ya={animationend:Ql("Animation","AnimationEnd"),animationiteration:Ql("Animation","AnimationIteration"),animationstart:Ql("Animation","AnimationStart"),transitionend:Ql("Transition","TransitionEnd")},Rh={},l1={};l&&(l1=document.createElement("div").style,"AnimationEvent"in window||(delete Ya.animationend.animation,delete Ya.animationiteration.animation,delete Ya.animationstart.animation),"TransitionEvent"in window||delete Ya.transitionend.transition);function Zl(o){if(Rh[o])return Rh[o];if(!Ya[o])return o;var u=Ya[o],d;for(d in u)if(u.hasOwnProperty(d)&&d in l1)return Rh[o]=u[d];return o}var c1=Zl("animationend"),f1=Zl("animationiteration"),d1=Zl("animationstart"),h1=Zl("transitionend"),p1=new Map,v1="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error 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(" ");function bi(o,u){p1.set(o,u),a(u,[o])}for(var jh=0;jh<v1.length;jh++){var Nh=v1[jh],DI=Nh.toLowerCase(),II=Nh[0].toUpperCase()+Nh.slice(1);bi(DI,"on"+II)}bi(c1,"onAnimationEnd"),bi(f1,"onAnimationIteration"),bi(d1,"onAnimationStart"),bi("dblclick","onDoubleClick"),bi("focusin","onFocus"),bi("focusout","onBlur"),bi(h1,"onTransitionEnd"),s("onMouseEnter",["mouseout","mouseover"]),s("onMouseLeave",["mouseout","mouseover"]),s("onPointerEnter",["pointerout","pointerover"]),s("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $s="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(" "),MI=new Set("cancel close invalid load scroll toggle".split(" ").concat($s));function m1(o,u,d){var v=o.type||"unknown-event";o.currentTarget=d,DD(v,u,void 0,o),o.currentTarget=null}function g1(o,u){u=(u&4)!==0;for(var d=0;d<o.length;d++){var v=o[d],y=v.event;v=v.listeners;e:{var S=void 0;if(u)for(var k=v.length-1;0<=k;k--){var $=v[k],z=$.instance,re=$.currentTarget;if($=$.listener,z!==S&&y.isPropagationStopped())break e;m1(y,$,re),S=z}else for(k=0;k<v.length;k++){if($=v[k],z=$.instance,re=$.currentTarget,$=$.listener,z!==S&&y.isPropagationStopped())break e;m1(y,$,re),S=z}}}if(Ml)throw o=ch,Ml=!1,ch=null,o}function st(o,u){var d=u[zh];d===void 0&&(d=u[zh]=new Set);var v=o+"__bubble";d.has(v)||(y1(u,o,2,!1),d.add(v))}function Dh(o,u,d){var v=0;u&&(v|=4),y1(d,o,v,u)}var Jl="_reactListening"+Math.random().toString(36).slice(2);function Fs(o){if(!o[Jl]){o[Jl]=!0,n.forEach(function(d){d!=="selectionchange"&&(MI.has(d)||Dh(d,!1,o),Dh(d,!0,o))});var u=o.nodeType===9?o:o.ownerDocument;u===null||u[Jl]||(u[Jl]=!0,Dh("selectionchange",!1,u))}}function y1(o,u,d,v){switch(zx(u)){case 1:var y=YD;break;case 4:y=QD;break;default:y=gh}d=y.bind(null,u,d,o),y=void 0,!lh||u!=="touchstart"&&u!=="touchmove"&&u!=="wheel"||(y=!0),v?y!==void 0?o.addEventListener(u,d,{capture:!0,passive:y}):o.addEventListener(u,d,!0):y!==void 0?o.addEventListener(u,d,{passive:y}):o.addEventListener(u,d,!1)}function Ih(o,u,d,v,y){var S=v;if((u&1)===0&&(u&2)===0&&v!==null)e:for(;;){if(v===null)return;var k=v.tag;if(k===3||k===4){var $=v.stateNode.containerInfo;if($===y||$.nodeType===8&&$.parentNode===y)break;if(k===4)for(k=v.return;k!==null;){var z=k.tag;if((z===3||z===4)&&(z=k.stateNode.containerInfo,z===y||z.nodeType===8&&z.parentNode===y))return;k=k.return}for(;$!==null;){if(k=ra($),k===null)return;if(z=k.tag,z===5||z===6){v=S=k;continue e}$=$.parentNode}}v=v.return}_x(function(){var re=S,ue=oh(d),ce=[];e:{var oe=p1.get(o);if(oe!==void 0){var be=wh,Oe=o;switch(o){case"keypress":if(Vl(d)===0)break e;case"keydown":case"keyup":be=dI;break;case"focusin":Oe="focus",be=_h;break;case"focusout":Oe="blur",be=_h;break;case"beforeblur":case"afterblur":be=_h;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":be=qx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":be=eI;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":be=vI;break;case c1:case f1:case d1:be=nI;break;case h1:be=gI;break;case"scroll":be=ZD;break;case"wheel":be=bI;break;case"copy":case"cut":case"paste":be=aI;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":be=Hx}var Ae=(u&4)!==0,bt=!Ae&&o==="scroll",Y=Ae?oe!==null?oe+"Capture":null:oe;Ae=[];for(var W=re,Z;W!==null;){Z=W;var fe=Z.stateNode;if(Z.tag===5&&fe!==null&&(Z=fe,Y!==null&&(fe=xs(W,Y),fe!=null&&Ae.push(Bs(W,fe,Z)))),bt)break;W=W.return}0<Ae.length&&(oe=new be(oe,Oe,null,d,ue),ce.push({event:oe,listeners:Ae}))}}if((u&7)===0){e:{if(oe=o==="mouseover"||o==="pointerover",be=o==="mouseout"||o==="pointerout",oe&&d!==ah&&(Oe=d.relatedTarget||d.fromElement)&&(ra(Oe)||Oe[$n]))break e;if((be||oe)&&(oe=ue.window===ue?ue:(oe=ue.ownerDocument)?oe.defaultView||oe.parentWindow:window,be?(Oe=d.relatedTarget||d.toElement,be=re,Oe=Oe?ra(Oe):null,Oe!==null&&(bt=ta(Oe),Oe!==bt||Oe.tag!==5&&Oe.tag!==6)&&(Oe=null)):(be=null,Oe=re),be!==Oe)){if(Ae=qx,fe="onMouseLeave",Y="onMouseEnter",W="mouse",(o==="pointerout"||o==="pointerover")&&(Ae=Hx,fe="onPointerLeave",Y="onPointerEnter",W="pointer"),bt=be==null?oe:Ja(be),Z=Oe==null?oe:Ja(Oe),oe=new Ae(fe,W+"leave",be,d,ue),oe.target=bt,oe.relatedTarget=Z,fe=null,ra(ue)===re&&(Ae=new Ae(Y,W+"enter",Oe,d,ue),Ae.target=Z,Ae.relatedTarget=bt,fe=Ae),bt=fe,be&&Oe)t:{for(Ae=be,Y=Oe,W=0,Z=Ae;Z;Z=Qa(Z))W++;for(Z=0,fe=Y;fe;fe=Qa(fe))Z++;for(;0<W-Z;)Ae=Qa(Ae),W--;for(;0<Z-W;)Y=Qa(Y),Z--;for(;W--;){if(Ae===Y||Y!==null&&Ae===Y.alternate)break t;Ae=Qa(Ae),Y=Qa(Y)}Ae=null}else Ae=null;be!==null&&b1(ce,oe,be,Ae,!1),Oe!==null&&bt!==null&&b1(ce,bt,Oe,Ae,!0)}}e:{if(oe=re?Ja(re):window,be=oe.nodeName&&oe.nodeName.toLowerCase(),be==="select"||be==="input"&&oe.type==="file")var Te=AI;else if(Zx(oe))if(e1)Te=kI;else{Te=TI;var Ce=PI}else(be=oe.nodeName)&&be.toLowerCase()==="input"&&(oe.type==="checkbox"||oe.type==="radio")&&(Te=CI);if(Te&&(Te=Te(o,re))){Jx(ce,Te,d,ue);break e}Ce&&Ce(o,oe,re),o==="focusout"&&(Ce=oe._wrapperState)&&Ce.controlled&&oe.type==="number"&&Rt(oe,"number",oe.value)}switch(Ce=re?Ja(re):window,o){case"focusin":(Zx(Ce)||Ce.contentEditable==="true")&&(Xa=Ce,Ch=re,Ls=null);break;case"focusout":Ls=Ch=Xa=null;break;case"mousedown":kh=!0;break;case"contextmenu":case"mouseup":case"dragend":kh=!1,u1(ce,d,ue);break;case"selectionchange":if(NI)break;case"keydown":case"keyup":u1(ce,d,ue)}var ke;if(Oh)e:{switch(o){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else Ka?Yx(o,d)&&(Ie="onCompositionEnd"):o==="keydown"&&d.keyCode===229&&(Ie="onCompositionStart");Ie&&(Vx&&d.locale!=="ko"&&(Ka||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&Ka&&(ke=Gx()):(yi=ue,bh="value"in yi?yi.value:yi.textContent,Ka=!0)),Ce=ec(re,Ie),0<Ce.length&&(Ie=new Wx(Ie,o,null,d,ue),ce.push({event:Ie,listeners:Ce}),ke?Ie.data=ke:(ke=Qx(d),ke!==null&&(Ie.data=ke)))),(ke=xI?SI(o,d):_I(o,d))&&(re=ec(re,"onBeforeInput"),0<re.length&&(ue=new Wx("onBeforeInput","beforeinput",null,d,ue),ce.push({event:ue,listeners:re}),ue.data=ke))}g1(ce,u)})}function Bs(o,u,d){return{instance:o,listener:u,currentTarget:d}}function ec(o,u){for(var d=u+"Capture",v=[];o!==null;){var y=o,S=y.stateNode;y.tag===5&&S!==null&&(y=S,S=xs(o,d),S!=null&&v.unshift(Bs(o,S,y)),S=xs(o,u),S!=null&&v.push(Bs(o,S,y))),o=o.return}return v}function Qa(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5);return o||null}function b1(o,u,d,v,y){for(var S=u._reactName,k=[];d!==null&&d!==v;){var $=d,z=$.alternate,re=$.stateNode;if(z!==null&&z===v)break;$.tag===5&&re!==null&&($=re,y?(z=xs(d,S),z!=null&&k.unshift(Bs(d,z,$))):y||(z=xs(d,S),z!=null&&k.push(Bs(d,z,$)))),d=d.return}k.length!==0&&o.push({event:u,listeners:k})}var LI=/\r\n?/g,$I=/\u0000|\uFFFD/g;function w1(o){return(typeof o=="string"?o:""+o).replace(LI,`
38
+ `).replace($I,"")}function tc(o,u,d){if(u=w1(u),w1(o)!==u&&d)throw Error(r(425))}function rc(){}var Mh=null,Lh=null;function $h(o,u){return o==="textarea"||o==="noscript"||typeof u.children=="string"||typeof u.children=="number"||typeof u.dangerouslySetInnerHTML=="object"&&u.dangerouslySetInnerHTML!==null&&u.dangerouslySetInnerHTML.__html!=null}var Fh=typeof setTimeout=="function"?setTimeout:void 0,FI=typeof clearTimeout=="function"?clearTimeout:void 0,x1=typeof Promise=="function"?Promise:void 0,BI=typeof queueMicrotask=="function"?queueMicrotask:typeof x1<"u"?function(o){return x1.resolve(null).then(o).catch(zI)}:Fh;function zI(o){setTimeout(function(){throw o})}function Bh(o,u){var d=u,v=0;do{var y=d.nextSibling;if(o.removeChild(d),y&&y.nodeType===8)if(d=y.data,d==="/$"){if(v===0){o.removeChild(y),ks(u);return}v--}else d!=="$"&&d!=="$?"&&d!=="$!"||v++;d=y}while(d);ks(u)}function wi(o){for(;o!=null;o=o.nextSibling){var u=o.nodeType;if(u===1||u===3)break;if(u===8){if(u=o.data,u==="$"||u==="$!"||u==="$?")break;if(u==="/$")return null}}return o}function S1(o){o=o.previousSibling;for(var u=0;o;){if(o.nodeType===8){var d=o.data;if(d==="$"||d==="$!"||d==="$?"){if(u===0)return o;u--}else d==="/$"&&u++}o=o.previousSibling}return null}var Za=Math.random().toString(36).slice(2),yn="__reactFiber$"+Za,zs="__reactProps$"+Za,$n="__reactContainer$"+Za,zh="__reactEvents$"+Za,GI="__reactListeners$"+Za,UI="__reactHandles$"+Za;function ra(o){var u=o[yn];if(u)return u;for(var d=o.parentNode;d;){if(u=d[$n]||d[yn]){if(d=u.alternate,u.child!==null||d!==null&&d.child!==null)for(o=S1(o);o!==null;){if(d=o[yn])return d;o=S1(o)}return u}o=d,d=o.parentNode}return null}function Gs(o){return o=o[yn]||o[$n],!o||o.tag!==5&&o.tag!==6&&o.tag!==13&&o.tag!==3?null:o}function Ja(o){if(o.tag===5||o.tag===6)return o.stateNode;throw Error(r(33))}function nc(o){return o[zs]||null}var Gh=[],eo=-1;function xi(o){return{current:o}}function ut(o){0>eo||(o.current=Gh[eo],Gh[eo]=null,eo--)}function at(o,u){eo++,Gh[eo]=o.current,o.current=u}var Si={},Vt=xi(Si),or=xi(!1),na=Si;function to(o,u){var d=o.type.contextTypes;if(!d)return Si;var v=o.stateNode;if(v&&v.__reactInternalMemoizedUnmaskedChildContext===u)return v.__reactInternalMemoizedMaskedChildContext;var y={},S;for(S in d)y[S]=u[S];return v&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=u,o.__reactInternalMemoizedMaskedChildContext=y),y}function sr(o){return o=o.childContextTypes,o!=null}function ic(){ut(or),ut(Vt)}function _1(o,u,d){if(Vt.current!==Si)throw Error(r(168));at(Vt,u),at(or,d)}function E1(o,u,d){var v=o.stateNode;if(u=u.childContextTypes,typeof v.getChildContext!="function")return d;v=v.getChildContext();for(var y in v)if(!(y in u))throw Error(r(108,Le(o)||"Unknown",y));return ee({},d,v)}function ac(o){return o=(o=o.stateNode)&&o.__reactInternalMemoizedMergedChildContext||Si,na=Vt.current,at(Vt,o),at(or,or.current),!0}function O1(o,u,d){var v=o.stateNode;if(!v)throw Error(r(169));d?(o=E1(o,u,na),v.__reactInternalMemoizedMergedChildContext=o,ut(or),ut(Vt),at(Vt,o)):ut(or),at(or,d)}var Fn=null,oc=!1,Uh=!1;function A1(o){Fn===null?Fn=[o]:Fn.push(o)}function qI(o){oc=!0,A1(o)}function _i(){if(!Uh&&Fn!==null){Uh=!0;var o=0,u=Je;try{var d=Fn;for(Je=1;o<d.length;o++){var v=d[o];do v=v(!0);while(v!==null)}Fn=null,oc=!1}catch(y){throw Fn!==null&&(Fn=Fn.slice(o+1)),Tx(fh,_i),y}finally{Je=u,Uh=!1}}return null}var ro=[],no=0,sc=null,uc=0,Or=[],Ar=0,ia=null,Bn=1,zn="";function aa(o,u){ro[no++]=uc,ro[no++]=sc,sc=o,uc=u}function P1(o,u,d){Or[Ar++]=Bn,Or[Ar++]=zn,Or[Ar++]=ia,ia=o;var v=Bn;o=zn;var y=32-qr(v)-1;v&=~(1<<y),d+=1;var S=32-qr(u)+y;if(30<S){var k=y-y%5;S=(v&(1<<k)-1).toString(32),v>>=k,y-=k,Bn=1<<32-qr(u)+y|d<<y|v,zn=S+o}else Bn=1<<S|d<<y|v,zn=o}function qh(o){o.return!==null&&(aa(o,1),P1(o,1,0))}function Wh(o){for(;o===sc;)sc=ro[--no],ro[no]=null,uc=ro[--no],ro[no]=null;for(;o===ia;)ia=Or[--Ar],Or[Ar]=null,zn=Or[--Ar],Or[Ar]=null,Bn=Or[--Ar],Or[Ar]=null}var gr=null,yr=null,ct=!1,Hr=null;function T1(o,u){var d=kr(5,null,null,0);d.elementType="DELETED",d.stateNode=u,d.return=o,u=o.deletions,u===null?(o.deletions=[d],o.flags|=16):u.push(d)}function C1(o,u){switch(o.tag){case 5:var d=o.type;return u=u.nodeType!==1||d.toLowerCase()!==u.nodeName.toLowerCase()?null:u,u!==null?(o.stateNode=u,gr=o,yr=wi(u.firstChild),!0):!1;case 6:return u=o.pendingProps===""||u.nodeType!==3?null:u,u!==null?(o.stateNode=u,gr=o,yr=null,!0):!1;case 13:return u=u.nodeType!==8?null:u,u!==null?(d=ia!==null?{id:Bn,overflow:zn}:null,o.memoizedState={dehydrated:u,treeContext:d,retryLane:1073741824},d=kr(18,null,null,0),d.stateNode=u,d.return=o,o.child=d,gr=o,yr=null,!0):!1;default:return!1}}function Hh(o){return(o.mode&1)!==0&&(o.flags&128)===0}function Vh(o){if(ct){var u=yr;if(u){var d=u;if(!C1(o,u)){if(Hh(o))throw Error(r(418));u=wi(d.nextSibling);var v=gr;u&&C1(o,u)?T1(v,d):(o.flags=o.flags&-4097|2,ct=!1,gr=o)}}else{if(Hh(o))throw Error(r(418));o.flags=o.flags&-4097|2,ct=!1,gr=o}}}function k1(o){for(o=o.return;o!==null&&o.tag!==5&&o.tag!==3&&o.tag!==13;)o=o.return;gr=o}function lc(o){if(o!==gr)return!1;if(!ct)return k1(o),ct=!0,!1;var u;if((u=o.tag!==3)&&!(u=o.tag!==5)&&(u=o.type,u=u!=="head"&&u!=="body"&&!$h(o.type,o.memoizedProps)),u&&(u=yr)){if(Hh(o))throw R1(),Error(r(418));for(;u;)T1(o,u),u=wi(u.nextSibling)}if(k1(o),o.tag===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));e:{for(o=o.nextSibling,u=0;o;){if(o.nodeType===8){var d=o.data;if(d==="/$"){if(u===0){yr=wi(o.nextSibling);break e}u--}else d!=="$"&&d!=="$!"&&d!=="$?"||u++}o=o.nextSibling}yr=null}}else yr=gr?wi(o.stateNode.nextSibling):null;return!0}function R1(){for(var o=yr;o;)o=wi(o.nextSibling)}function io(){yr=gr=null,ct=!1}function Kh(o){Hr===null?Hr=[o]:Hr.push(o)}var WI=A.ReactCurrentBatchConfig;function Us(o,u,d){if(o=d.ref,o!==null&&typeof o!="function"&&typeof o!="object"){if(d._owner){if(d=d._owner,d){if(d.tag!==1)throw Error(r(309));var v=d.stateNode}if(!v)throw Error(r(147,o));var y=v,S=""+o;return u!==null&&u.ref!==null&&typeof u.ref=="function"&&u.ref._stringRef===S?u.ref:(u=function(k){var $=y.refs;k===null?delete $[S]:$[S]=k},u._stringRef=S,u)}if(typeof o!="string")throw Error(r(284));if(!d._owner)throw Error(r(290,o))}return o}function cc(o,u){throw o=Object.prototype.toString.call(u),Error(r(31,o==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":o))}function j1(o){var u=o._init;return u(o._payload)}function N1(o){function u(Y,W){if(o){var Z=Y.deletions;Z===null?(Y.deletions=[W],Y.flags|=16):Z.push(W)}}function d(Y,W){if(!o)return null;for(;W!==null;)u(Y,W),W=W.sibling;return null}function v(Y,W){for(Y=new Map;W!==null;)W.key!==null?Y.set(W.key,W):Y.set(W.index,W),W=W.sibling;return Y}function y(Y,W){return Y=Ri(Y,W),Y.index=0,Y.sibling=null,Y}function S(Y,W,Z){return Y.index=Z,o?(Z=Y.alternate,Z!==null?(Z=Z.index,Z<W?(Y.flags|=2,W):Z):(Y.flags|=2,W)):(Y.flags|=1048576,W)}function k(Y){return o&&Y.alternate===null&&(Y.flags|=2),Y}function $(Y,W,Z,fe){return W===null||W.tag!==6?(W=Fp(Z,Y.mode,fe),W.return=Y,W):(W=y(W,Z),W.return=Y,W)}function z(Y,W,Z,fe){var Te=Z.type;return Te===C?ue(Y,W,Z.props.children,fe,Z.key):W!==null&&(W.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===G&&j1(Te)===W.type)?(fe=y(W,Z.props),fe.ref=Us(Y,W,Z),fe.return=Y,fe):(fe=Dc(Z.type,Z.key,Z.props,null,Y.mode,fe),fe.ref=Us(Y,W,Z),fe.return=Y,fe)}function re(Y,W,Z,fe){return W===null||W.tag!==4||W.stateNode.containerInfo!==Z.containerInfo||W.stateNode.implementation!==Z.implementation?(W=Bp(Z,Y.mode,fe),W.return=Y,W):(W=y(W,Z.children||[]),W.return=Y,W)}function ue(Y,W,Z,fe,Te){return W===null||W.tag!==7?(W=ha(Z,Y.mode,fe,Te),W.return=Y,W):(W=y(W,Z),W.return=Y,W)}function ce(Y,W,Z){if(typeof W=="string"&&W!==""||typeof W=="number")return W=Fp(""+W,Y.mode,Z),W.return=Y,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case x:return Z=Dc(W.type,W.key,W.props,null,Y.mode,Z),Z.ref=Us(Y,null,W),Z.return=Y,Z;case O:return W=Bp(W,Y.mode,Z),W.return=Y,W;case G:var fe=W._init;return ce(Y,fe(W._payload),Z)}if(Bt(W)||J(W))return W=ha(W,Y.mode,Z,null),W.return=Y,W;cc(Y,W)}return null}function oe(Y,W,Z,fe){var Te=W!==null?W.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number")return Te!==null?null:$(Y,W,""+Z,fe);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case x:return Z.key===Te?z(Y,W,Z,fe):null;case O:return Z.key===Te?re(Y,W,Z,fe):null;case G:return Te=Z._init,oe(Y,W,Te(Z._payload),fe)}if(Bt(Z)||J(Z))return Te!==null?null:ue(Y,W,Z,fe,null);cc(Y,Z)}return null}function be(Y,W,Z,fe,Te){if(typeof fe=="string"&&fe!==""||typeof fe=="number")return Y=Y.get(Z)||null,$(W,Y,""+fe,Te);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case x:return Y=Y.get(fe.key===null?Z:fe.key)||null,z(W,Y,fe,Te);case O:return Y=Y.get(fe.key===null?Z:fe.key)||null,re(W,Y,fe,Te);case G:var Ce=fe._init;return be(Y,W,Z,Ce(fe._payload),Te)}if(Bt(fe)||J(fe))return Y=Y.get(Z)||null,ue(W,Y,fe,Te,null);cc(W,fe)}return null}function Oe(Y,W,Z,fe){for(var Te=null,Ce=null,ke=W,Ie=W=0,It=null;ke!==null&&Ie<Z.length;Ie++){ke.index>Ie?(It=ke,ke=null):It=ke.sibling;var qe=oe(Y,ke,Z[Ie],fe);if(qe===null){ke===null&&(ke=It);break}o&&ke&&qe.alternate===null&&u(Y,ke),W=S(qe,W,Ie),Ce===null?Te=qe:Ce.sibling=qe,Ce=qe,ke=It}if(Ie===Z.length)return d(Y,ke),ct&&aa(Y,Ie),Te;if(ke===null){for(;Ie<Z.length;Ie++)ke=ce(Y,Z[Ie],fe),ke!==null&&(W=S(ke,W,Ie),Ce===null?Te=ke:Ce.sibling=ke,Ce=ke);return ct&&aa(Y,Ie),Te}for(ke=v(Y,ke);Ie<Z.length;Ie++)It=be(ke,Y,Ie,Z[Ie],fe),It!==null&&(o&&It.alternate!==null&&ke.delete(It.key===null?Ie:It.key),W=S(It,W,Ie),Ce===null?Te=It:Ce.sibling=It,Ce=It);return o&&ke.forEach(function(ji){return u(Y,ji)}),ct&&aa(Y,Ie),Te}function Ae(Y,W,Z,fe){var Te=J(Z);if(typeof Te!="function")throw Error(r(150));if(Z=Te.call(Z),Z==null)throw Error(r(151));for(var Ce=Te=null,ke=W,Ie=W=0,It=null,qe=Z.next();ke!==null&&!qe.done;Ie++,qe=Z.next()){ke.index>Ie?(It=ke,ke=null):It=ke.sibling;var ji=oe(Y,ke,qe.value,fe);if(ji===null){ke===null&&(ke=It);break}o&&ke&&ji.alternate===null&&u(Y,ke),W=S(ji,W,Ie),Ce===null?Te=ji:Ce.sibling=ji,Ce=ji,ke=It}if(qe.done)return d(Y,ke),ct&&aa(Y,Ie),Te;if(ke===null){for(;!qe.done;Ie++,qe=Z.next())qe=ce(Y,qe.value,fe),qe!==null&&(W=S(qe,W,Ie),Ce===null?Te=qe:Ce.sibling=qe,Ce=qe);return ct&&aa(Y,Ie),Te}for(ke=v(Y,ke);!qe.done;Ie++,qe=Z.next())qe=be(ke,Y,Ie,qe.value,fe),qe!==null&&(o&&qe.alternate!==null&&ke.delete(qe.key===null?Ie:qe.key),W=S(qe,W,Ie),Ce===null?Te=qe:Ce.sibling=qe,Ce=qe);return o&&ke.forEach(function(EM){return u(Y,EM)}),ct&&aa(Y,Ie),Te}function bt(Y,W,Z,fe){if(typeof Z=="object"&&Z!==null&&Z.type===C&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case x:e:{for(var Te=Z.key,Ce=W;Ce!==null;){if(Ce.key===Te){if(Te=Z.type,Te===C){if(Ce.tag===7){d(Y,Ce.sibling),W=y(Ce,Z.props.children),W.return=Y,Y=W;break e}}else if(Ce.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===G&&j1(Te)===Ce.type){d(Y,Ce.sibling),W=y(Ce,Z.props),W.ref=Us(Y,Ce,Z),W.return=Y,Y=W;break e}d(Y,Ce);break}else u(Y,Ce);Ce=Ce.sibling}Z.type===C?(W=ha(Z.props.children,Y.mode,fe,Z.key),W.return=Y,Y=W):(fe=Dc(Z.type,Z.key,Z.props,null,Y.mode,fe),fe.ref=Us(Y,W,Z),fe.return=Y,Y=fe)}return k(Y);case O:e:{for(Ce=Z.key;W!==null;){if(W.key===Ce)if(W.tag===4&&W.stateNode.containerInfo===Z.containerInfo&&W.stateNode.implementation===Z.implementation){d(Y,W.sibling),W=y(W,Z.children||[]),W.return=Y,Y=W;break e}else{d(Y,W);break}else u(Y,W);W=W.sibling}W=Bp(Z,Y.mode,fe),W.return=Y,Y=W}return k(Y);case G:return Ce=Z._init,bt(Y,W,Ce(Z._payload),fe)}if(Bt(Z))return Oe(Y,W,Z,fe);if(J(Z))return Ae(Y,W,Z,fe);cc(Y,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"?(Z=""+Z,W!==null&&W.tag===6?(d(Y,W.sibling),W=y(W,Z),W.return=Y,Y=W):(d(Y,W),W=Fp(Z,Y.mode,fe),W.return=Y,Y=W),k(Y)):d(Y,W)}return bt}var ao=N1(!0),D1=N1(!1),fc=xi(null),dc=null,oo=null,Xh=null;function Yh(){Xh=oo=dc=null}function Qh(o){var u=fc.current;ut(fc),o._currentValue=u}function Zh(o,u,d){for(;o!==null;){var v=o.alternate;if((o.childLanes&u)!==u?(o.childLanes|=u,v!==null&&(v.childLanes|=u)):v!==null&&(v.childLanes&u)!==u&&(v.childLanes|=u),o===d)break;o=o.return}}function so(o,u){dc=o,Xh=oo=null,o=o.dependencies,o!==null&&o.firstContext!==null&&((o.lanes&u)!==0&&(ur=!0),o.firstContext=null)}function Pr(o){var u=o._currentValue;if(Xh!==o)if(o={context:o,memoizedValue:u,next:null},oo===null){if(dc===null)throw Error(r(308));oo=o,dc.dependencies={lanes:0,firstContext:o}}else oo=oo.next=o;return u}var oa=null;function Jh(o){oa===null?oa=[o]:oa.push(o)}function I1(o,u,d,v){var y=u.interleaved;return y===null?(d.next=d,Jh(u)):(d.next=y.next,y.next=d),u.interleaved=d,Gn(o,v)}function Gn(o,u){o.lanes|=u;var d=o.alternate;for(d!==null&&(d.lanes|=u),d=o,o=o.return;o!==null;)o.childLanes|=u,d=o.alternate,d!==null&&(d.childLanes|=u),d=o,o=o.return;return d.tag===3?d.stateNode:null}var Ei=!1;function ep(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function M1(o,u){o=o.updateQueue,u.updateQueue===o&&(u.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,effects:o.effects})}function Un(o,u){return{eventTime:o,lane:u,tag:0,payload:null,callback:null,next:null}}function Oi(o,u,d){var v=o.updateQueue;if(v===null)return null;if(v=v.shared,(Ue&2)!==0){var y=v.pending;return y===null?u.next=u:(u.next=y.next,y.next=u),v.pending=u,Gn(o,d)}return y=v.interleaved,y===null?(u.next=u,Jh(v)):(u.next=y.next,y.next=u),v.interleaved=u,Gn(o,d)}function hc(o,u,d){if(u=u.updateQueue,u!==null&&(u=u.shared,(d&4194240)!==0)){var v=u.lanes;v&=o.pendingLanes,d|=v,u.lanes=d,ph(o,d)}}function L1(o,u){var d=o.updateQueue,v=o.alternate;if(v!==null&&(v=v.updateQueue,d===v)){var y=null,S=null;if(d=d.firstBaseUpdate,d!==null){do{var k={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};S===null?y=S=k:S=S.next=k,d=d.next}while(d!==null);S===null?y=S=u:S=S.next=u}else y=S=u;d={baseState:v.baseState,firstBaseUpdate:y,lastBaseUpdate:S,shared:v.shared,effects:v.effects},o.updateQueue=d;return}o=d.lastBaseUpdate,o===null?d.firstBaseUpdate=u:o.next=u,d.lastBaseUpdate=u}function pc(o,u,d,v){var y=o.updateQueue;Ei=!1;var S=y.firstBaseUpdate,k=y.lastBaseUpdate,$=y.shared.pending;if($!==null){y.shared.pending=null;var z=$,re=z.next;z.next=null,k===null?S=re:k.next=re,k=z;var ue=o.alternate;ue!==null&&(ue=ue.updateQueue,$=ue.lastBaseUpdate,$!==k&&($===null?ue.firstBaseUpdate=re:$.next=re,ue.lastBaseUpdate=z))}if(S!==null){var ce=y.baseState;k=0,ue=re=z=null,$=S;do{var oe=$.lane,be=$.eventTime;if((v&oe)===oe){ue!==null&&(ue=ue.next={eventTime:be,lane:0,tag:$.tag,payload:$.payload,callback:$.callback,next:null});e:{var Oe=o,Ae=$;switch(oe=u,be=d,Ae.tag){case 1:if(Oe=Ae.payload,typeof Oe=="function"){ce=Oe.call(be,ce,oe);break e}ce=Oe;break e;case 3:Oe.flags=Oe.flags&-65537|128;case 0:if(Oe=Ae.payload,oe=typeof Oe=="function"?Oe.call(be,ce,oe):Oe,oe==null)break e;ce=ee({},ce,oe);break e;case 2:Ei=!0}}$.callback!==null&&$.lane!==0&&(o.flags|=64,oe=y.effects,oe===null?y.effects=[$]:oe.push($))}else be={eventTime:be,lane:oe,tag:$.tag,payload:$.payload,callback:$.callback,next:null},ue===null?(re=ue=be,z=ce):ue=ue.next=be,k|=oe;if($=$.next,$===null){if($=y.shared.pending,$===null)break;oe=$,$=oe.next,oe.next=null,y.lastBaseUpdate=oe,y.shared.pending=null}}while(!0);if(ue===null&&(z=ce),y.baseState=z,y.firstBaseUpdate=re,y.lastBaseUpdate=ue,u=y.shared.interleaved,u!==null){y=u;do k|=y.lane,y=y.next;while(y!==u)}else S===null&&(y.shared.lanes=0);la|=k,o.lanes=k,o.memoizedState=ce}}function $1(o,u,d){if(o=u.effects,u.effects=null,o!==null)for(u=0;u<o.length;u++){var v=o[u],y=v.callback;if(y!==null){if(v.callback=null,v=d,typeof y!="function")throw Error(r(191,y));y.call(v)}}}var qs={},bn=xi(qs),Ws=xi(qs),Hs=xi(qs);function sa(o){if(o===qs)throw Error(r(174));return o}function tp(o,u){switch(at(Hs,u),at(Ws,o),at(bn,qs),o=u.nodeType,o){case 9:case 11:u=(u=u.documentElement)?u.namespaceURI:Mn(null,"");break;default:o=o===8?u.parentNode:u,u=o.namespaceURI||null,o=o.tagName,u=Mn(u,o)}ut(bn),at(bn,u)}function uo(){ut(bn),ut(Ws),ut(Hs)}function F1(o){sa(Hs.current);var u=sa(bn.current),d=Mn(u,o.type);u!==d&&(at(Ws,o),at(bn,d))}function rp(o){Ws.current===o&&(ut(bn),ut(Ws))}var ht=xi(0);function vc(o){for(var u=o;u!==null;){if(u.tag===13){var d=u.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||d.data==="$?"||d.data==="$!"))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===o)break;for(;u.sibling===null;){if(u.return===null||u.return===o)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var np=[];function ip(){for(var o=0;o<np.length;o++)np[o]._workInProgressVersionPrimary=null;np.length=0}var mc=A.ReactCurrentDispatcher,ap=A.ReactCurrentBatchConfig,ua=0,pt=null,_t=null,Nt=null,gc=!1,Vs=!1,Ks=0,HI=0;function Kt(){throw Error(r(321))}function op(o,u){if(u===null)return!1;for(var d=0;d<u.length&&d<o.length;d++)if(!Wr(o[d],u[d]))return!1;return!0}function sp(o,u,d,v,y,S){if(ua=S,pt=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,mc.current=o===null||o.memoizedState===null?YI:QI,o=d(v,y),Vs){S=0;do{if(Vs=!1,Ks=0,25<=S)throw Error(r(301));S+=1,Nt=_t=null,u.updateQueue=null,mc.current=ZI,o=d(v,y)}while(Vs)}if(mc.current=wc,u=_t!==null&&_t.next!==null,ua=0,Nt=_t=pt=null,gc=!1,u)throw Error(r(300));return o}function up(){var o=Ks!==0;return Ks=0,o}function wn(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Nt===null?pt.memoizedState=Nt=o:Nt=Nt.next=o,Nt}function Tr(){if(_t===null){var o=pt.alternate;o=o!==null?o.memoizedState:null}else o=_t.next;var u=Nt===null?pt.memoizedState:Nt.next;if(u!==null)Nt=u,_t=o;else{if(o===null)throw Error(r(310));_t=o,o={memoizedState:_t.memoizedState,baseState:_t.baseState,baseQueue:_t.baseQueue,queue:_t.queue,next:null},Nt===null?pt.memoizedState=Nt=o:Nt=Nt.next=o}return Nt}function Xs(o,u){return typeof u=="function"?u(o):u}function lp(o){var u=Tr(),d=u.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=o;var v=_t,y=v.baseQueue,S=d.pending;if(S!==null){if(y!==null){var k=y.next;y.next=S.next,S.next=k}v.baseQueue=y=S,d.pending=null}if(y!==null){S=y.next,v=v.baseState;var $=k=null,z=null,re=S;do{var ue=re.lane;if((ua&ue)===ue)z!==null&&(z=z.next={lane:0,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null}),v=re.hasEagerState?re.eagerState:o(v,re.action);else{var ce={lane:ue,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null};z===null?($=z=ce,k=v):z=z.next=ce,pt.lanes|=ue,la|=ue}re=re.next}while(re!==null&&re!==S);z===null?k=v:z.next=$,Wr(v,u.memoizedState)||(ur=!0),u.memoizedState=v,u.baseState=k,u.baseQueue=z,d.lastRenderedState=v}if(o=d.interleaved,o!==null){y=o;do S=y.lane,pt.lanes|=S,la|=S,y=y.next;while(y!==o)}else y===null&&(d.lanes=0);return[u.memoizedState,d.dispatch]}function cp(o){var u=Tr(),d=u.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=o;var v=d.dispatch,y=d.pending,S=u.memoizedState;if(y!==null){d.pending=null;var k=y=y.next;do S=o(S,k.action),k=k.next;while(k!==y);Wr(S,u.memoizedState)||(ur=!0),u.memoizedState=S,u.baseQueue===null&&(u.baseState=S),d.lastRenderedState=S}return[S,v]}function B1(){}function z1(o,u){var d=pt,v=Tr(),y=u(),S=!Wr(v.memoizedState,y);if(S&&(v.memoizedState=y,ur=!0),v=v.queue,fp(q1.bind(null,d,v,o),[o]),v.getSnapshot!==u||S||Nt!==null&&Nt.memoizedState.tag&1){if(d.flags|=2048,Ys(9,U1.bind(null,d,v,y,u),void 0,null),Dt===null)throw Error(r(349));(ua&30)!==0||G1(d,u,y)}return y}function G1(o,u,d){o.flags|=16384,o={getSnapshot:u,value:d},u=pt.updateQueue,u===null?(u={lastEffect:null,stores:null},pt.updateQueue=u,u.stores=[o]):(d=u.stores,d===null?u.stores=[o]:d.push(o))}function U1(o,u,d,v){u.value=d,u.getSnapshot=v,W1(u)&&H1(o)}function q1(o,u,d){return d(function(){W1(u)&&H1(o)})}function W1(o){var u=o.getSnapshot;o=o.value;try{var d=u();return!Wr(o,d)}catch{return!0}}function H1(o){var u=Gn(o,1);u!==null&&Yr(u,o,1,-1)}function V1(o){var u=wn();return typeof o=="function"&&(o=o()),u.memoizedState=u.baseState=o,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Xs,lastRenderedState:o},u.queue=o,o=o.dispatch=XI.bind(null,pt,o),[u.memoizedState,o]}function Ys(o,u,d,v){return o={tag:o,create:u,destroy:d,deps:v,next:null},u=pt.updateQueue,u===null?(u={lastEffect:null,stores:null},pt.updateQueue=u,u.lastEffect=o.next=o):(d=u.lastEffect,d===null?u.lastEffect=o.next=o:(v=d.next,d.next=o,o.next=v,u.lastEffect=o)),o}function K1(){return Tr().memoizedState}function yc(o,u,d,v){var y=wn();pt.flags|=o,y.memoizedState=Ys(1|u,d,void 0,v===void 0?null:v)}function bc(o,u,d,v){var y=Tr();v=v===void 0?null:v;var S=void 0;if(_t!==null){var k=_t.memoizedState;if(S=k.destroy,v!==null&&op(v,k.deps)){y.memoizedState=Ys(u,d,S,v);return}}pt.flags|=o,y.memoizedState=Ys(1|u,d,S,v)}function X1(o,u){return yc(8390656,8,o,u)}function fp(o,u){return bc(2048,8,o,u)}function Y1(o,u){return bc(4,2,o,u)}function Q1(o,u){return bc(4,4,o,u)}function Z1(o,u){if(typeof u=="function")return o=o(),u(o),function(){u(null)};if(u!=null)return o=o(),u.current=o,function(){u.current=null}}function J1(o,u,d){return d=d!=null?d.concat([o]):null,bc(4,4,Z1.bind(null,u,o),d)}function dp(){}function eS(o,u){var d=Tr();u=u===void 0?null:u;var v=d.memoizedState;return v!==null&&u!==null&&op(u,v[1])?v[0]:(d.memoizedState=[o,u],o)}function tS(o,u){var d=Tr();u=u===void 0?null:u;var v=d.memoizedState;return v!==null&&u!==null&&op(u,v[1])?v[0]:(o=o(),d.memoizedState=[o,u],o)}function rS(o,u,d){return(ua&21)===0?(o.baseState&&(o.baseState=!1,ur=!0),o.memoizedState=d):(Wr(d,u)||(d=jx(),pt.lanes|=d,la|=d,o.baseState=!0),u)}function VI(o,u){var d=Je;Je=d!==0&&4>d?d:4,o(!0);var v=ap.transition;ap.transition={};try{o(!1),u()}finally{Je=d,ap.transition=v}}function nS(){return Tr().memoizedState}function KI(o,u,d){var v=Ci(o);if(d={lane:v,action:d,hasEagerState:!1,eagerState:null,next:null},iS(o))aS(u,d);else if(d=I1(o,u,d,v),d!==null){var y=nr();Yr(d,o,v,y),oS(d,u,v)}}function XI(o,u,d){var v=Ci(o),y={lane:v,action:d,hasEagerState:!1,eagerState:null,next:null};if(iS(o))aS(u,y);else{var S=o.alternate;if(o.lanes===0&&(S===null||S.lanes===0)&&(S=u.lastRenderedReducer,S!==null))try{var k=u.lastRenderedState,$=S(k,d);if(y.hasEagerState=!0,y.eagerState=$,Wr($,k)){var z=u.interleaved;z===null?(y.next=y,Jh(u)):(y.next=z.next,z.next=y),u.interleaved=y;return}}catch{}finally{}d=I1(o,u,y,v),d!==null&&(y=nr(),Yr(d,o,v,y),oS(d,u,v))}}function iS(o){var u=o.alternate;return o===pt||u!==null&&u===pt}function aS(o,u){Vs=gc=!0;var d=o.pending;d===null?u.next=u:(u.next=d.next,d.next=u),o.pending=u}function oS(o,u,d){if((d&4194240)!==0){var v=u.lanes;v&=o.pendingLanes,d|=v,u.lanes=d,ph(o,d)}}var wc={readContext:Pr,useCallback:Kt,useContext:Kt,useEffect:Kt,useImperativeHandle:Kt,useInsertionEffect:Kt,useLayoutEffect:Kt,useMemo:Kt,useReducer:Kt,useRef:Kt,useState:Kt,useDebugValue:Kt,useDeferredValue:Kt,useTransition:Kt,useMutableSource:Kt,useSyncExternalStore:Kt,useId:Kt,unstable_isNewReconciler:!1},YI={readContext:Pr,useCallback:function(o,u){return wn().memoizedState=[o,u===void 0?null:u],o},useContext:Pr,useEffect:X1,useImperativeHandle:function(o,u,d){return d=d!=null?d.concat([o]):null,yc(4194308,4,Z1.bind(null,u,o),d)},useLayoutEffect:function(o,u){return yc(4194308,4,o,u)},useInsertionEffect:function(o,u){return yc(4,2,o,u)},useMemo:function(o,u){var d=wn();return u=u===void 0?null:u,o=o(),d.memoizedState=[o,u],o},useReducer:function(o,u,d){var v=wn();return u=d!==void 0?d(u):u,v.memoizedState=v.baseState=u,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:u},v.queue=o,o=o.dispatch=KI.bind(null,pt,o),[v.memoizedState,o]},useRef:function(o){var u=wn();return o={current:o},u.memoizedState=o},useState:V1,useDebugValue:dp,useDeferredValue:function(o){return wn().memoizedState=o},useTransition:function(){var o=V1(!1),u=o[0];return o=VI.bind(null,o[1]),wn().memoizedState=o,[u,o]},useMutableSource:function(){},useSyncExternalStore:function(o,u,d){var v=pt,y=wn();if(ct){if(d===void 0)throw Error(r(407));d=d()}else{if(d=u(),Dt===null)throw Error(r(349));(ua&30)!==0||G1(v,u,d)}y.memoizedState=d;var S={value:d,getSnapshot:u};return y.queue=S,X1(q1.bind(null,v,S,o),[o]),v.flags|=2048,Ys(9,U1.bind(null,v,S,d,u),void 0,null),d},useId:function(){var o=wn(),u=Dt.identifierPrefix;if(ct){var d=zn,v=Bn;d=(v&~(1<<32-qr(v)-1)).toString(32)+d,u=":"+u+"R"+d,d=Ks++,0<d&&(u+="H"+d.toString(32)),u+=":"}else d=HI++,u=":"+u+"r"+d.toString(32)+":";return o.memoizedState=u},unstable_isNewReconciler:!1},QI={readContext:Pr,useCallback:eS,useContext:Pr,useEffect:fp,useImperativeHandle:J1,useInsertionEffect:Y1,useLayoutEffect:Q1,useMemo:tS,useReducer:lp,useRef:K1,useState:function(){return lp(Xs)},useDebugValue:dp,useDeferredValue:function(o){var u=Tr();return rS(u,_t.memoizedState,o)},useTransition:function(){var o=lp(Xs)[0],u=Tr().memoizedState;return[o,u]},useMutableSource:B1,useSyncExternalStore:z1,useId:nS,unstable_isNewReconciler:!1},ZI={readContext:Pr,useCallback:eS,useContext:Pr,useEffect:fp,useImperativeHandle:J1,useInsertionEffect:Y1,useLayoutEffect:Q1,useMemo:tS,useReducer:cp,useRef:K1,useState:function(){return cp(Xs)},useDebugValue:dp,useDeferredValue:function(o){var u=Tr();return _t===null?u.memoizedState=o:rS(u,_t.memoizedState,o)},useTransition:function(){var o=cp(Xs)[0],u=Tr().memoizedState;return[o,u]},useMutableSource:B1,useSyncExternalStore:z1,useId:nS,unstable_isNewReconciler:!1};function Vr(o,u){if(o&&o.defaultProps){u=ee({},u),o=o.defaultProps;for(var d in o)u[d]===void 0&&(u[d]=o[d]);return u}return u}function hp(o,u,d,v){u=o.memoizedState,d=d(v,u),d=d==null?u:ee({},u,d),o.memoizedState=d,o.lanes===0&&(o.updateQueue.baseState=d)}var xc={isMounted:function(o){return(o=o._reactInternals)?ta(o)===o:!1},enqueueSetState:function(o,u,d){o=o._reactInternals;var v=nr(),y=Ci(o),S=Un(v,y);S.payload=u,d!=null&&(S.callback=d),u=Oi(o,S,y),u!==null&&(Yr(u,o,y,v),hc(u,o,y))},enqueueReplaceState:function(o,u,d){o=o._reactInternals;var v=nr(),y=Ci(o),S=Un(v,y);S.tag=1,S.payload=u,d!=null&&(S.callback=d),u=Oi(o,S,y),u!==null&&(Yr(u,o,y,v),hc(u,o,y))},enqueueForceUpdate:function(o,u){o=o._reactInternals;var d=nr(),v=Ci(o),y=Un(d,v);y.tag=2,u!=null&&(y.callback=u),u=Oi(o,y,v),u!==null&&(Yr(u,o,v,d),hc(u,o,v))}};function sS(o,u,d,v,y,S,k){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(v,S,k):u.prototype&&u.prototype.isPureReactComponent?!Ms(d,v)||!Ms(y,S):!0}function uS(o,u,d){var v=!1,y=Si,S=u.contextType;return typeof S=="object"&&S!==null?S=Pr(S):(y=sr(u)?na:Vt.current,v=u.contextTypes,S=(v=v!=null)?to(o,y):Si),u=new u(d,S),o.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=xc,o.stateNode=u,u._reactInternals=o,v&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=y,o.__reactInternalMemoizedMaskedChildContext=S),u}function lS(o,u,d,v){o=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(d,v),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(d,v),u.state!==o&&xc.enqueueReplaceState(u,u.state,null)}function pp(o,u,d,v){var y=o.stateNode;y.props=d,y.state=o.memoizedState,y.refs={},ep(o);var S=u.contextType;typeof S=="object"&&S!==null?y.context=Pr(S):(S=sr(u)?na:Vt.current,y.context=to(o,S)),y.state=o.memoizedState,S=u.getDerivedStateFromProps,typeof S=="function"&&(hp(o,u,S,d),y.state=o.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(u=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),u!==y.state&&xc.enqueueReplaceState(y,y.state,null),pc(o,d,y,v),y.state=o.memoizedState),typeof y.componentDidMount=="function"&&(o.flags|=4194308)}function lo(o,u){try{var d="",v=u;do d+=xe(v),v=v.return;while(v);var y=d}catch(S){y=`
39
+ Error generating stack: `+S.message+`
40
+ `+S.stack}return{value:o,source:u,stack:y,digest:null}}function vp(o,u,d){return{value:o,source:null,stack:d??null,digest:u??null}}function mp(o,u){try{console.error(u.value)}catch(d){setTimeout(function(){throw d})}}var JI=typeof WeakMap=="function"?WeakMap:Map;function cS(o,u,d){d=Un(-1,d),d.tag=3,d.payload={element:null};var v=u.value;return d.callback=function(){Tc||(Tc=!0,Rp=v),mp(o,u)},d}function fS(o,u,d){d=Un(-1,d),d.tag=3;var v=o.type.getDerivedStateFromError;if(typeof v=="function"){var y=u.value;d.payload=function(){return v(y)},d.callback=function(){mp(o,u)}}var S=o.stateNode;return S!==null&&typeof S.componentDidCatch=="function"&&(d.callback=function(){mp(o,u),typeof v!="function"&&(Pi===null?Pi=new Set([this]):Pi.add(this));var k=u.stack;this.componentDidCatch(u.value,{componentStack:k!==null?k:""})}),d}function dS(o,u,d){var v=o.pingCache;if(v===null){v=o.pingCache=new JI;var y=new Set;v.set(u,y)}else y=v.get(u),y===void 0&&(y=new Set,v.set(u,y));y.has(d)||(y.add(d),o=hM.bind(null,o,u,d),u.then(o,o))}function hS(o){do{var u;if((u=o.tag===13)&&(u=o.memoizedState,u=u!==null?u.dehydrated!==null:!0),u)return o;o=o.return}while(o!==null);return null}function pS(o,u,d,v,y){return(o.mode&1)===0?(o===u?o.flags|=65536:(o.flags|=128,d.flags|=131072,d.flags&=-52805,d.tag===1&&(d.alternate===null?d.tag=17:(u=Un(-1,1),u.tag=2,Oi(d,u,1))),d.lanes|=1),o):(o.flags|=65536,o.lanes=y,o)}var eM=A.ReactCurrentOwner,ur=!1;function rr(o,u,d,v){u.child=o===null?D1(u,null,d,v):ao(u,o.child,d,v)}function vS(o,u,d,v,y){d=d.render;var S=u.ref;return so(u,y),v=sp(o,u,d,v,S,y),d=up(),o!==null&&!ur?(u.updateQueue=o.updateQueue,u.flags&=-2053,o.lanes&=~y,qn(o,u,y)):(ct&&d&&qh(u),u.flags|=1,rr(o,u,v,y),u.child)}function mS(o,u,d,v,y){if(o===null){var S=d.type;return typeof S=="function"&&!$p(S)&&S.defaultProps===void 0&&d.compare===null&&d.defaultProps===void 0?(u.tag=15,u.type=S,gS(o,u,S,v,y)):(o=Dc(d.type,null,v,u,u.mode,y),o.ref=u.ref,o.return=u,u.child=o)}if(S=o.child,(o.lanes&y)===0){var k=S.memoizedProps;if(d=d.compare,d=d!==null?d:Ms,d(k,v)&&o.ref===u.ref)return qn(o,u,y)}return u.flags|=1,o=Ri(S,v),o.ref=u.ref,o.return=u,u.child=o}function gS(o,u,d,v,y){if(o!==null){var S=o.memoizedProps;if(Ms(S,v)&&o.ref===u.ref)if(ur=!1,u.pendingProps=v=S,(o.lanes&y)!==0)(o.flags&131072)!==0&&(ur=!0);else return u.lanes=o.lanes,qn(o,u,y)}return gp(o,u,d,v,y)}function yS(o,u,d){var v=u.pendingProps,y=v.children,S=o!==null?o.memoizedState:null;if(v.mode==="hidden")if((u.mode&1)===0)u.memoizedState={baseLanes:0,cachePool:null,transitions:null},at(fo,br),br|=d;else{if((d&1073741824)===0)return o=S!==null?S.baseLanes|d:d,u.lanes=u.childLanes=1073741824,u.memoizedState={baseLanes:o,cachePool:null,transitions:null},u.updateQueue=null,at(fo,br),br|=o,null;u.memoizedState={baseLanes:0,cachePool:null,transitions:null},v=S!==null?S.baseLanes:d,at(fo,br),br|=v}else S!==null?(v=S.baseLanes|d,u.memoizedState=null):v=d,at(fo,br),br|=v;return rr(o,u,y,d),u.child}function bS(o,u){var d=u.ref;(o===null&&d!==null||o!==null&&o.ref!==d)&&(u.flags|=512,u.flags|=2097152)}function gp(o,u,d,v,y){var S=sr(d)?na:Vt.current;return S=to(u,S),so(u,y),d=sp(o,u,d,v,S,y),v=up(),o!==null&&!ur?(u.updateQueue=o.updateQueue,u.flags&=-2053,o.lanes&=~y,qn(o,u,y)):(ct&&v&&qh(u),u.flags|=1,rr(o,u,d,y),u.child)}function wS(o,u,d,v,y){if(sr(d)){var S=!0;ac(u)}else S=!1;if(so(u,y),u.stateNode===null)_c(o,u),uS(u,d,v),pp(u,d,v,y),v=!0;else if(o===null){var k=u.stateNode,$=u.memoizedProps;k.props=$;var z=k.context,re=d.contextType;typeof re=="object"&&re!==null?re=Pr(re):(re=sr(d)?na:Vt.current,re=to(u,re));var ue=d.getDerivedStateFromProps,ce=typeof ue=="function"||typeof k.getSnapshotBeforeUpdate=="function";ce||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||($!==v||z!==re)&&lS(u,k,v,re),Ei=!1;var oe=u.memoizedState;k.state=oe,pc(u,v,k,y),z=u.memoizedState,$!==v||oe!==z||or.current||Ei?(typeof ue=="function"&&(hp(u,d,ue,v),z=u.memoizedState),($=Ei||sS(u,d,$,v,oe,z,re))?(ce||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(u.flags|=4194308)):(typeof k.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=v,u.memoizedState=z),k.props=v,k.state=z,k.context=re,v=$):(typeof k.componentDidMount=="function"&&(u.flags|=4194308),v=!1)}else{k=u.stateNode,M1(o,u),$=u.memoizedProps,re=u.type===u.elementType?$:Vr(u.type,$),k.props=re,ce=u.pendingProps,oe=k.context,z=d.contextType,typeof z=="object"&&z!==null?z=Pr(z):(z=sr(d)?na:Vt.current,z=to(u,z));var be=d.getDerivedStateFromProps;(ue=typeof be=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||($!==ce||oe!==z)&&lS(u,k,v,z),Ei=!1,oe=u.memoizedState,k.state=oe,pc(u,v,k,y);var Oe=u.memoizedState;$!==ce||oe!==Oe||or.current||Ei?(typeof be=="function"&&(hp(u,d,be,v),Oe=u.memoizedState),(re=Ei||sS(u,d,re,v,oe,Oe,z)||!1)?(ue||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(v,Oe,z),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(v,Oe,z)),typeof k.componentDidUpdate=="function"&&(u.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof k.componentDidUpdate!="function"||$===o.memoizedProps&&oe===o.memoizedState||(u.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||$===o.memoizedProps&&oe===o.memoizedState||(u.flags|=1024),u.memoizedProps=v,u.memoizedState=Oe),k.props=v,k.state=Oe,k.context=z,v=re):(typeof k.componentDidUpdate!="function"||$===o.memoizedProps&&oe===o.memoizedState||(u.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||$===o.memoizedProps&&oe===o.memoizedState||(u.flags|=1024),v=!1)}return yp(o,u,d,v,S,y)}function yp(o,u,d,v,y,S){bS(o,u);var k=(u.flags&128)!==0;if(!v&&!k)return y&&O1(u,d,!1),qn(o,u,S);v=u.stateNode,eM.current=u;var $=k&&typeof d.getDerivedStateFromError!="function"?null:v.render();return u.flags|=1,o!==null&&k?(u.child=ao(u,o.child,null,S),u.child=ao(u,null,$,S)):rr(o,u,$,S),u.memoizedState=v.state,y&&O1(u,d,!0),u.child}function xS(o){var u=o.stateNode;u.pendingContext?_1(o,u.pendingContext,u.pendingContext!==u.context):u.context&&_1(o,u.context,!1),tp(o,u.containerInfo)}function SS(o,u,d,v,y){return io(),Kh(y),u.flags|=256,rr(o,u,d,v),u.child}var bp={dehydrated:null,treeContext:null,retryLane:0};function wp(o){return{baseLanes:o,cachePool:null,transitions:null}}function _S(o,u,d){var v=u.pendingProps,y=ht.current,S=!1,k=(u.flags&128)!==0,$;if(($=k)||($=o!==null&&o.memoizedState===null?!1:(y&2)!==0),$?(S=!0,u.flags&=-129):(o===null||o.memoizedState!==null)&&(y|=1),at(ht,y&1),o===null)return Vh(u),o=u.memoizedState,o!==null&&(o=o.dehydrated,o!==null)?((u.mode&1)===0?u.lanes=1:o.data==="$!"?u.lanes=8:u.lanes=1073741824,null):(k=v.children,o=v.fallback,S?(v=u.mode,S=u.child,k={mode:"hidden",children:k},(v&1)===0&&S!==null?(S.childLanes=0,S.pendingProps=k):S=Ic(k,v,0,null),o=ha(o,v,d,null),S.return=u,o.return=u,S.sibling=o,u.child=S,u.child.memoizedState=wp(d),u.memoizedState=bp,o):xp(u,k));if(y=o.memoizedState,y!==null&&($=y.dehydrated,$!==null))return tM(o,u,k,v,$,y,d);if(S){S=v.fallback,k=u.mode,y=o.child,$=y.sibling;var z={mode:"hidden",children:v.children};return(k&1)===0&&u.child!==y?(v=u.child,v.childLanes=0,v.pendingProps=z,u.deletions=null):(v=Ri(y,z),v.subtreeFlags=y.subtreeFlags&14680064),$!==null?S=Ri($,S):(S=ha(S,k,d,null),S.flags|=2),S.return=u,v.return=u,v.sibling=S,u.child=v,v=S,S=u.child,k=o.child.memoizedState,k=k===null?wp(d):{baseLanes:k.baseLanes|d,cachePool:null,transitions:k.transitions},S.memoizedState=k,S.childLanes=o.childLanes&~d,u.memoizedState=bp,v}return S=o.child,o=S.sibling,v=Ri(S,{mode:"visible",children:v.children}),(u.mode&1)===0&&(v.lanes=d),v.return=u,v.sibling=null,o!==null&&(d=u.deletions,d===null?(u.deletions=[o],u.flags|=16):d.push(o)),u.child=v,u.memoizedState=null,v}function xp(o,u){return u=Ic({mode:"visible",children:u},o.mode,0,null),u.return=o,o.child=u}function Sc(o,u,d,v){return v!==null&&Kh(v),ao(u,o.child,null,d),o=xp(u,u.pendingProps.children),o.flags|=2,u.memoizedState=null,o}function tM(o,u,d,v,y,S,k){if(d)return u.flags&256?(u.flags&=-257,v=vp(Error(r(422))),Sc(o,u,k,v)):u.memoizedState!==null?(u.child=o.child,u.flags|=128,null):(S=v.fallback,y=u.mode,v=Ic({mode:"visible",children:v.children},y,0,null),S=ha(S,y,k,null),S.flags|=2,v.return=u,S.return=u,v.sibling=S,u.child=v,(u.mode&1)!==0&&ao(u,o.child,null,k),u.child.memoizedState=wp(k),u.memoizedState=bp,S);if((u.mode&1)===0)return Sc(o,u,k,null);if(y.data==="$!"){if(v=y.nextSibling&&y.nextSibling.dataset,v)var $=v.dgst;return v=$,S=Error(r(419)),v=vp(S,v,void 0),Sc(o,u,k,v)}if($=(k&o.childLanes)!==0,ur||$){if(v=Dt,v!==null){switch(k&-k){case 4:y=2;break;case 16:y=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:y=32;break;case 536870912:y=268435456;break;default:y=0}y=(y&(v.suspendedLanes|k))!==0?0:y,y!==0&&y!==S.retryLane&&(S.retryLane=y,Gn(o,y),Yr(v,o,y,-1))}return Lp(),v=vp(Error(r(421))),Sc(o,u,k,v)}return y.data==="$?"?(u.flags|=128,u.child=o.child,u=pM.bind(null,o),y._reactRetry=u,null):(o=S.treeContext,yr=wi(y.nextSibling),gr=u,ct=!0,Hr=null,o!==null&&(Or[Ar++]=Bn,Or[Ar++]=zn,Or[Ar++]=ia,Bn=o.id,zn=o.overflow,ia=u),u=xp(u,v.children),u.flags|=4096,u)}function ES(o,u,d){o.lanes|=u;var v=o.alternate;v!==null&&(v.lanes|=u),Zh(o.return,u,d)}function Sp(o,u,d,v,y){var S=o.memoizedState;S===null?o.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:v,tail:d,tailMode:y}:(S.isBackwards=u,S.rendering=null,S.renderingStartTime=0,S.last=v,S.tail=d,S.tailMode=y)}function OS(o,u,d){var v=u.pendingProps,y=v.revealOrder,S=v.tail;if(rr(o,u,v.children,d),v=ht.current,(v&2)!==0)v=v&1|2,u.flags|=128;else{if(o!==null&&(o.flags&128)!==0)e:for(o=u.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&ES(o,d,u);else if(o.tag===19)ES(o,d,u);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===u)break e;for(;o.sibling===null;){if(o.return===null||o.return===u)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}v&=1}if(at(ht,v),(u.mode&1)===0)u.memoizedState=null;else switch(y){case"forwards":for(d=u.child,y=null;d!==null;)o=d.alternate,o!==null&&vc(o)===null&&(y=d),d=d.sibling;d=y,d===null?(y=u.child,u.child=null):(y=d.sibling,d.sibling=null),Sp(u,!1,y,d,S);break;case"backwards":for(d=null,y=u.child,u.child=null;y!==null;){if(o=y.alternate,o!==null&&vc(o)===null){u.child=y;break}o=y.sibling,y.sibling=d,d=y,y=o}Sp(u,!0,d,null,S);break;case"together":Sp(u,!1,null,null,void 0);break;default:u.memoizedState=null}return u.child}function _c(o,u){(u.mode&1)===0&&o!==null&&(o.alternate=null,u.alternate=null,u.flags|=2)}function qn(o,u,d){if(o!==null&&(u.dependencies=o.dependencies),la|=u.lanes,(d&u.childLanes)===0)return null;if(o!==null&&u.child!==o.child)throw Error(r(153));if(u.child!==null){for(o=u.child,d=Ri(o,o.pendingProps),u.child=d,d.return=u;o.sibling!==null;)o=o.sibling,d=d.sibling=Ri(o,o.pendingProps),d.return=u;d.sibling=null}return u.child}function rM(o,u,d){switch(u.tag){case 3:xS(u),io();break;case 5:F1(u);break;case 1:sr(u.type)&&ac(u);break;case 4:tp(u,u.stateNode.containerInfo);break;case 10:var v=u.type._context,y=u.memoizedProps.value;at(fc,v._currentValue),v._currentValue=y;break;case 13:if(v=u.memoizedState,v!==null)return v.dehydrated!==null?(at(ht,ht.current&1),u.flags|=128,null):(d&u.child.childLanes)!==0?_S(o,u,d):(at(ht,ht.current&1),o=qn(o,u,d),o!==null?o.sibling:null);at(ht,ht.current&1);break;case 19:if(v=(d&u.childLanes)!==0,(o.flags&128)!==0){if(v)return OS(o,u,d);u.flags|=128}if(y=u.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),at(ht,ht.current),v)break;return null;case 22:case 23:return u.lanes=0,yS(o,u,d)}return qn(o,u,d)}var AS,_p,PS,TS;AS=function(o,u){for(var d=u.child;d!==null;){if(d.tag===5||d.tag===6)o.appendChild(d.stateNode);else if(d.tag!==4&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===u)break;for(;d.sibling===null;){if(d.return===null||d.return===u)return;d=d.return}d.sibling.return=d.return,d=d.sibling}},_p=function(){},PS=function(o,u,d,v){var y=o.memoizedProps;if(y!==v){o=u.stateNode,sa(bn.current);var S=null;switch(d){case"input":y=de(o,y),v=de(o,v),S=[];break;case"select":y=ee({},y,{value:void 0}),v=ee({},v,{value:void 0}),S=[];break;case"textarea":y=jt(o,y),v=jt(o,v),S=[];break;default:typeof y.onClick!="function"&&typeof v.onClick=="function"&&(o.onclick=rc)}nh(d,v);var k;d=null;for(re in y)if(!v.hasOwnProperty(re)&&y.hasOwnProperty(re)&&y[re]!=null)if(re==="style"){var $=y[re];for(k in $)$.hasOwnProperty(k)&&(d||(d={}),d[k]="")}else re!=="dangerouslySetInnerHTML"&&re!=="children"&&re!=="suppressContentEditableWarning"&&re!=="suppressHydrationWarning"&&re!=="autoFocus"&&(i.hasOwnProperty(re)?S||(S=[]):(S=S||[]).push(re,null));for(re in v){var z=v[re];if($=y!=null?y[re]:void 0,v.hasOwnProperty(re)&&z!==$&&(z!=null||$!=null))if(re==="style")if($){for(k in $)!$.hasOwnProperty(k)||z&&z.hasOwnProperty(k)||(d||(d={}),d[k]="");for(k in z)z.hasOwnProperty(k)&&$[k]!==z[k]&&(d||(d={}),d[k]=z[k])}else d||(S||(S=[]),S.push(re,d)),d=z;else re==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,$=$?$.__html:void 0,z!=null&&$!==z&&(S=S||[]).push(re,z)):re==="children"?typeof z!="string"&&typeof z!="number"||(S=S||[]).push(re,""+z):re!=="suppressContentEditableWarning"&&re!=="suppressHydrationWarning"&&(i.hasOwnProperty(re)?(z!=null&&re==="onScroll"&&st("scroll",o),S||$===z||(S=[])):(S=S||[]).push(re,z))}d&&(S=S||[]).push("style",d);var re=S;(u.updateQueue=re)&&(u.flags|=4)}},TS=function(o,u,d,v){d!==v&&(u.flags|=4)};function Qs(o,u){if(!ct)switch(o.tailMode){case"hidden":u=o.tail;for(var d=null;u!==null;)u.alternate!==null&&(d=u),u=u.sibling;d===null?o.tail=null:d.sibling=null;break;case"collapsed":d=o.tail;for(var v=null;d!==null;)d.alternate!==null&&(v=d),d=d.sibling;v===null?u||o.tail===null?o.tail=null:o.tail.sibling=null:v.sibling=null}}function Xt(o){var u=o.alternate!==null&&o.alternate.child===o.child,d=0,v=0;if(u)for(var y=o.child;y!==null;)d|=y.lanes|y.childLanes,v|=y.subtreeFlags&14680064,v|=y.flags&14680064,y.return=o,y=y.sibling;else for(y=o.child;y!==null;)d|=y.lanes|y.childLanes,v|=y.subtreeFlags,v|=y.flags,y.return=o,y=y.sibling;return o.subtreeFlags|=v,o.childLanes=d,u}function nM(o,u,d){var v=u.pendingProps;switch(Wh(u),u.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xt(u),null;case 1:return sr(u.type)&&ic(),Xt(u),null;case 3:return v=u.stateNode,uo(),ut(or),ut(Vt),ip(),v.pendingContext&&(v.context=v.pendingContext,v.pendingContext=null),(o===null||o.child===null)&&(lc(u)?u.flags|=4:o===null||o.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,Hr!==null&&(Dp(Hr),Hr=null))),_p(o,u),Xt(u),null;case 5:rp(u);var y=sa(Hs.current);if(d=u.type,o!==null&&u.stateNode!=null)PS(o,u,d,v,y),o.ref!==u.ref&&(u.flags|=512,u.flags|=2097152);else{if(!v){if(u.stateNode===null)throw Error(r(166));return Xt(u),null}if(o=sa(bn.current),lc(u)){v=u.stateNode,d=u.type;var S=u.memoizedProps;switch(v[yn]=u,v[zs]=S,o=(u.mode&1)!==0,d){case"dialog":st("cancel",v),st("close",v);break;case"iframe":case"object":case"embed":st("load",v);break;case"video":case"audio":for(y=0;y<$s.length;y++)st($s[y],v);break;case"source":st("error",v);break;case"img":case"image":case"link":st("error",v),st("load",v);break;case"details":st("toggle",v);break;case"input":me(v,S),st("invalid",v);break;case"select":v._wrapperState={wasMultiple:!!S.multiple},st("invalid",v);break;case"textarea":fn(v,S),st("invalid",v)}nh(d,S),y=null;for(var k in S)if(S.hasOwnProperty(k)){var $=S[k];k==="children"?typeof $=="string"?v.textContent!==$&&(S.suppressHydrationWarning!==!0&&tc(v.textContent,$,o),y=["children",$]):typeof $=="number"&&v.textContent!==""+$&&(S.suppressHydrationWarning!==!0&&tc(v.textContent,$,o),y=["children",""+$]):i.hasOwnProperty(k)&&$!=null&&k==="onScroll"&&st("scroll",v)}switch(d){case"input":ve(v),kt(v,S,!0);break;case"textarea":ve(v),hn(v);break;case"select":case"option":break;default:typeof S.onClick=="function"&&(v.onclick=rc)}v=y,u.updateQueue=v,v!==null&&(u.flags|=4)}else{k=y.nodeType===9?y:y.ownerDocument,o==="http://www.w3.org/1999/xhtml"&&(o=ea(d)),o==="http://www.w3.org/1999/xhtml"?d==="script"?(o=k.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild)):typeof v.is=="string"?o=k.createElement(d,{is:v.is}):(o=k.createElement(d),d==="select"&&(k=o,v.multiple?k.multiple=!0:v.size&&(k.size=v.size))):o=k.createElementNS(o,d),o[yn]=u,o[zs]=v,AS(o,u,!1,!1),u.stateNode=o;e:{switch(k=ih(d,v),d){case"dialog":st("cancel",o),st("close",o),y=v;break;case"iframe":case"object":case"embed":st("load",o),y=v;break;case"video":case"audio":for(y=0;y<$s.length;y++)st($s[y],o);y=v;break;case"source":st("error",o),y=v;break;case"img":case"image":case"link":st("error",o),st("load",o),y=v;break;case"details":st("toggle",o),y=v;break;case"input":me(o,v),y=de(o,v),st("invalid",o);break;case"option":y=v;break;case"select":o._wrapperState={wasMultiple:!!v.multiple},y=ee({},v,{value:void 0}),st("invalid",o);break;case"textarea":fn(o,v),y=jt(o,v),st("invalid",o);break;default:y=v}nh(d,y),$=y;for(S in $)if($.hasOwnProperty(S)){var z=$[S];S==="style"?gx(o,z):S==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,z!=null&&pn(o,z)):S==="children"?typeof z=="string"?(d!=="textarea"||z!=="")&&vn(o,z):typeof z=="number"&&vn(o,""+z):S!=="suppressContentEditableWarning"&&S!=="suppressHydrationWarning"&&S!=="autoFocus"&&(i.hasOwnProperty(S)?z!=null&&S==="onScroll"&&st("scroll",o):z!=null&&T(o,S,z,k))}switch(d){case"input":ve(o),kt(o,v,!1);break;case"textarea":ve(o),hn(o);break;case"option":v.value!=null&&o.setAttribute("value",""+Me(v.value));break;case"select":o.multiple=!!v.multiple,S=v.value,S!=null?rt(o,!!v.multiple,S,!1):v.defaultValue!=null&&rt(o,!!v.multiple,v.defaultValue,!0);break;default:typeof y.onClick=="function"&&(o.onclick=rc)}switch(d){case"button":case"input":case"select":case"textarea":v=!!v.autoFocus;break e;case"img":v=!0;break e;default:v=!1}}v&&(u.flags|=4)}u.ref!==null&&(u.flags|=512,u.flags|=2097152)}return Xt(u),null;case 6:if(o&&u.stateNode!=null)TS(o,u,o.memoizedProps,v);else{if(typeof v!="string"&&u.stateNode===null)throw Error(r(166));if(d=sa(Hs.current),sa(bn.current),lc(u)){if(v=u.stateNode,d=u.memoizedProps,v[yn]=u,(S=v.nodeValue!==d)&&(o=gr,o!==null))switch(o.tag){case 3:tc(v.nodeValue,d,(o.mode&1)!==0);break;case 5:o.memoizedProps.suppressHydrationWarning!==!0&&tc(v.nodeValue,d,(o.mode&1)!==0)}S&&(u.flags|=4)}else v=(d.nodeType===9?d:d.ownerDocument).createTextNode(v),v[yn]=u,u.stateNode=v}return Xt(u),null;case 13:if(ut(ht),v=u.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(ct&&yr!==null&&(u.mode&1)!==0&&(u.flags&128)===0)R1(),io(),u.flags|=98560,S=!1;else if(S=lc(u),v!==null&&v.dehydrated!==null){if(o===null){if(!S)throw Error(r(318));if(S=u.memoizedState,S=S!==null?S.dehydrated:null,!S)throw Error(r(317));S[yn]=u}else io(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Xt(u),S=!1}else Hr!==null&&(Dp(Hr),Hr=null),S=!0;if(!S)return u.flags&65536?u:null}return(u.flags&128)!==0?(u.lanes=d,u):(v=v!==null,v!==(o!==null&&o.memoizedState!==null)&&v&&(u.child.flags|=8192,(u.mode&1)!==0&&(o===null||(ht.current&1)!==0?Et===0&&(Et=3):Lp())),u.updateQueue!==null&&(u.flags|=4),Xt(u),null);case 4:return uo(),_p(o,u),o===null&&Fs(u.stateNode.containerInfo),Xt(u),null;case 10:return Qh(u.type._context),Xt(u),null;case 17:return sr(u.type)&&ic(),Xt(u),null;case 19:if(ut(ht),S=u.memoizedState,S===null)return Xt(u),null;if(v=(u.flags&128)!==0,k=S.rendering,k===null)if(v)Qs(S,!1);else{if(Et!==0||o!==null&&(o.flags&128)!==0)for(o=u.child;o!==null;){if(k=vc(o),k!==null){for(u.flags|=128,Qs(S,!1),v=k.updateQueue,v!==null&&(u.updateQueue=v,u.flags|=4),u.subtreeFlags=0,v=d,d=u.child;d!==null;)S=d,o=v,S.flags&=14680066,k=S.alternate,k===null?(S.childLanes=0,S.lanes=o,S.child=null,S.subtreeFlags=0,S.memoizedProps=null,S.memoizedState=null,S.updateQueue=null,S.dependencies=null,S.stateNode=null):(S.childLanes=k.childLanes,S.lanes=k.lanes,S.child=k.child,S.subtreeFlags=0,S.deletions=null,S.memoizedProps=k.memoizedProps,S.memoizedState=k.memoizedState,S.updateQueue=k.updateQueue,S.type=k.type,o=k.dependencies,S.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),d=d.sibling;return at(ht,ht.current&1|2),u.child}o=o.sibling}S.tail!==null&&yt()>ho&&(u.flags|=128,v=!0,Qs(S,!1),u.lanes=4194304)}else{if(!v)if(o=vc(k),o!==null){if(u.flags|=128,v=!0,d=o.updateQueue,d!==null&&(u.updateQueue=d,u.flags|=4),Qs(S,!0),S.tail===null&&S.tailMode==="hidden"&&!k.alternate&&!ct)return Xt(u),null}else 2*yt()-S.renderingStartTime>ho&&d!==1073741824&&(u.flags|=128,v=!0,Qs(S,!1),u.lanes=4194304);S.isBackwards?(k.sibling=u.child,u.child=k):(d=S.last,d!==null?d.sibling=k:u.child=k,S.last=k)}return S.tail!==null?(u=S.tail,S.rendering=u,S.tail=u.sibling,S.renderingStartTime=yt(),u.sibling=null,d=ht.current,at(ht,v?d&1|2:d&1),u):(Xt(u),null);case 22:case 23:return Mp(),v=u.memoizedState!==null,o!==null&&o.memoizedState!==null!==v&&(u.flags|=8192),v&&(u.mode&1)!==0?(br&1073741824)!==0&&(Xt(u),u.subtreeFlags&6&&(u.flags|=8192)):Xt(u),null;case 24:return null;case 25:return null}throw Error(r(156,u.tag))}function iM(o,u){switch(Wh(u),u.tag){case 1:return sr(u.type)&&ic(),o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 3:return uo(),ut(or),ut(Vt),ip(),o=u.flags,(o&65536)!==0&&(o&128)===0?(u.flags=o&-65537|128,u):null;case 5:return rp(u),null;case 13:if(ut(ht),o=u.memoizedState,o!==null&&o.dehydrated!==null){if(u.alternate===null)throw Error(r(340));io()}return o=u.flags,o&65536?(u.flags=o&-65537|128,u):null;case 19:return ut(ht),null;case 4:return uo(),null;case 10:return Qh(u.type._context),null;case 22:case 23:return Mp(),null;case 24:return null;default:return null}}var Ec=!1,Yt=!1,aM=typeof WeakSet=="function"?WeakSet:Set,_e=null;function co(o,u){var d=o.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(v){vt(o,u,v)}else d.current=null}function Ep(o,u,d){try{d()}catch(v){vt(o,u,v)}}var CS=!1;function oM(o,u){if(Mh=ql,o=s1(),Th(o)){if("selectionStart"in o)var d={start:o.selectionStart,end:o.selectionEnd};else e:{d=(d=o.ownerDocument)&&d.defaultView||window;var v=d.getSelection&&d.getSelection();if(v&&v.rangeCount!==0){d=v.anchorNode;var y=v.anchorOffset,S=v.focusNode;v=v.focusOffset;try{d.nodeType,S.nodeType}catch{d=null;break e}var k=0,$=-1,z=-1,re=0,ue=0,ce=o,oe=null;t:for(;;){for(var be;ce!==d||y!==0&&ce.nodeType!==3||($=k+y),ce!==S||v!==0&&ce.nodeType!==3||(z=k+v),ce.nodeType===3&&(k+=ce.nodeValue.length),(be=ce.firstChild)!==null;)oe=ce,ce=be;for(;;){if(ce===o)break t;if(oe===d&&++re===y&&($=k),oe===S&&++ue===v&&(z=k),(be=ce.nextSibling)!==null)break;ce=oe,oe=ce.parentNode}ce=be}d=$===-1||z===-1?null:{start:$,end:z}}else d=null}d=d||{start:0,end:0}}else d=null;for(Lh={focusedElem:o,selectionRange:d},ql=!1,_e=u;_e!==null;)if(u=_e,o=u.child,(u.subtreeFlags&1028)!==0&&o!==null)o.return=u,_e=o;else for(;_e!==null;){u=_e;try{var Oe=u.alternate;if((u.flags&1024)!==0)switch(u.tag){case 0:case 11:case 15:break;case 1:if(Oe!==null){var Ae=Oe.memoizedProps,bt=Oe.memoizedState,Y=u.stateNode,W=Y.getSnapshotBeforeUpdate(u.elementType===u.type?Ae:Vr(u.type,Ae),bt);Y.__reactInternalSnapshotBeforeUpdate=W}break;case 3:var Z=u.stateNode.containerInfo;Z.nodeType===1?Z.textContent="":Z.nodeType===9&&Z.documentElement&&Z.removeChild(Z.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(fe){vt(u,u.return,fe)}if(o=u.sibling,o!==null){o.return=u.return,_e=o;break}_e=u.return}return Oe=CS,CS=!1,Oe}function Zs(o,u,d){var v=u.updateQueue;if(v=v!==null?v.lastEffect:null,v!==null){var y=v=v.next;do{if((y.tag&o)===o){var S=y.destroy;y.destroy=void 0,S!==void 0&&Ep(u,d,S)}y=y.next}while(y!==v)}}function Oc(o,u){if(u=u.updateQueue,u=u!==null?u.lastEffect:null,u!==null){var d=u=u.next;do{if((d.tag&o)===o){var v=d.create;d.destroy=v()}d=d.next}while(d!==u)}}function Op(o){var u=o.ref;if(u!==null){var d=o.stateNode;switch(o.tag){case 5:o=d;break;default:o=d}typeof u=="function"?u(o):u.current=o}}function kS(o){var u=o.alternate;u!==null&&(o.alternate=null,kS(u)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(u=o.stateNode,u!==null&&(delete u[yn],delete u[zs],delete u[zh],delete u[GI],delete u[UI])),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}function RS(o){return o.tag===5||o.tag===3||o.tag===4}function jS(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||RS(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function Ap(o,u,d){var v=o.tag;if(v===5||v===6)o=o.stateNode,u?d.nodeType===8?d.parentNode.insertBefore(o,u):d.insertBefore(o,u):(d.nodeType===8?(u=d.parentNode,u.insertBefore(o,d)):(u=d,u.appendChild(o)),d=d._reactRootContainer,d!=null||u.onclick!==null||(u.onclick=rc));else if(v!==4&&(o=o.child,o!==null))for(Ap(o,u,d),o=o.sibling;o!==null;)Ap(o,u,d),o=o.sibling}function Pp(o,u,d){var v=o.tag;if(v===5||v===6)o=o.stateNode,u?d.insertBefore(o,u):d.appendChild(o);else if(v!==4&&(o=o.child,o!==null))for(Pp(o,u,d),o=o.sibling;o!==null;)Pp(o,u,d),o=o.sibling}var zt=null,Kr=!1;function Ai(o,u,d){for(d=d.child;d!==null;)NS(o,u,d),d=d.sibling}function NS(o,u,d){if(gn&&typeof gn.onCommitFiberUnmount=="function")try{gn.onCommitFiberUnmount($l,d)}catch{}switch(d.tag){case 5:Yt||co(d,u);case 6:var v=zt,y=Kr;zt=null,Ai(o,u,d),zt=v,Kr=y,zt!==null&&(Kr?(o=zt,d=d.stateNode,o.nodeType===8?o.parentNode.removeChild(d):o.removeChild(d)):zt.removeChild(d.stateNode));break;case 18:zt!==null&&(Kr?(o=zt,d=d.stateNode,o.nodeType===8?Bh(o.parentNode,d):o.nodeType===1&&Bh(o,d),ks(o)):Bh(zt,d.stateNode));break;case 4:v=zt,y=Kr,zt=d.stateNode.containerInfo,Kr=!0,Ai(o,u,d),zt=v,Kr=y;break;case 0:case 11:case 14:case 15:if(!Yt&&(v=d.updateQueue,v!==null&&(v=v.lastEffect,v!==null))){y=v=v.next;do{var S=y,k=S.destroy;S=S.tag,k!==void 0&&((S&2)!==0||(S&4)!==0)&&Ep(d,u,k),y=y.next}while(y!==v)}Ai(o,u,d);break;case 1:if(!Yt&&(co(d,u),v=d.stateNode,typeof v.componentWillUnmount=="function"))try{v.props=d.memoizedProps,v.state=d.memoizedState,v.componentWillUnmount()}catch($){vt(d,u,$)}Ai(o,u,d);break;case 21:Ai(o,u,d);break;case 22:d.mode&1?(Yt=(v=Yt)||d.memoizedState!==null,Ai(o,u,d),Yt=v):Ai(o,u,d);break;default:Ai(o,u,d)}}function DS(o){var u=o.updateQueue;if(u!==null){o.updateQueue=null;var d=o.stateNode;d===null&&(d=o.stateNode=new aM),u.forEach(function(v){var y=vM.bind(null,o,v);d.has(v)||(d.add(v),v.then(y,y))})}}function Xr(o,u){var d=u.deletions;if(d!==null)for(var v=0;v<d.length;v++){var y=d[v];try{var S=o,k=u,$=k;e:for(;$!==null;){switch($.tag){case 5:zt=$.stateNode,Kr=!1;break e;case 3:zt=$.stateNode.containerInfo,Kr=!0;break e;case 4:zt=$.stateNode.containerInfo,Kr=!0;break e}$=$.return}if(zt===null)throw Error(r(160));NS(S,k,y),zt=null,Kr=!1;var z=y.alternate;z!==null&&(z.return=null),y.return=null}catch(re){vt(y,u,re)}}if(u.subtreeFlags&12854)for(u=u.child;u!==null;)IS(u,o),u=u.sibling}function IS(o,u){var d=o.alternate,v=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:if(Xr(u,o),xn(o),v&4){try{Zs(3,o,o.return),Oc(3,o)}catch(Ae){vt(o,o.return,Ae)}try{Zs(5,o,o.return)}catch(Ae){vt(o,o.return,Ae)}}break;case 1:Xr(u,o),xn(o),v&512&&d!==null&&co(d,d.return);break;case 5:if(Xr(u,o),xn(o),v&512&&d!==null&&co(d,d.return),o.flags&32){var y=o.stateNode;try{vn(y,"")}catch(Ae){vt(o,o.return,Ae)}}if(v&4&&(y=o.stateNode,y!=null)){var S=o.memoizedProps,k=d!==null?d.memoizedProps:S,$=o.type,z=o.updateQueue;if(o.updateQueue=null,z!==null)try{$==="input"&&S.type==="radio"&&S.name!=null&&ne(y,S),ih($,k);var re=ih($,S);for(k=0;k<z.length;k+=2){var ue=z[k],ce=z[k+1];ue==="style"?gx(y,ce):ue==="dangerouslySetInnerHTML"?pn(y,ce):ue==="children"?vn(y,ce):T(y,ue,ce,re)}switch($){case"input":it(y,S);break;case"textarea":dn(y,S);break;case"select":var oe=y._wrapperState.wasMultiple;y._wrapperState.wasMultiple=!!S.multiple;var be=S.value;be!=null?rt(y,!!S.multiple,be,!1):oe!==!!S.multiple&&(S.defaultValue!=null?rt(y,!!S.multiple,S.defaultValue,!0):rt(y,!!S.multiple,S.multiple?[]:"",!1))}y[zs]=S}catch(Ae){vt(o,o.return,Ae)}}break;case 6:if(Xr(u,o),xn(o),v&4){if(o.stateNode===null)throw Error(r(162));y=o.stateNode,S=o.memoizedProps;try{y.nodeValue=S}catch(Ae){vt(o,o.return,Ae)}}break;case 3:if(Xr(u,o),xn(o),v&4&&d!==null&&d.memoizedState.isDehydrated)try{ks(u.containerInfo)}catch(Ae){vt(o,o.return,Ae)}break;case 4:Xr(u,o),xn(o);break;case 13:Xr(u,o),xn(o),y=o.child,y.flags&8192&&(S=y.memoizedState!==null,y.stateNode.isHidden=S,!S||y.alternate!==null&&y.alternate.memoizedState!==null||(kp=yt())),v&4&&DS(o);break;case 22:if(ue=d!==null&&d.memoizedState!==null,o.mode&1?(Yt=(re=Yt)||ue,Xr(u,o),Yt=re):Xr(u,o),xn(o),v&8192){if(re=o.memoizedState!==null,(o.stateNode.isHidden=re)&&!ue&&(o.mode&1)!==0)for(_e=o,ue=o.child;ue!==null;){for(ce=_e=ue;_e!==null;){switch(oe=_e,be=oe.child,oe.tag){case 0:case 11:case 14:case 15:Zs(4,oe,oe.return);break;case 1:co(oe,oe.return);var Oe=oe.stateNode;if(typeof Oe.componentWillUnmount=="function"){v=oe,d=oe.return;try{u=v,Oe.props=u.memoizedProps,Oe.state=u.memoizedState,Oe.componentWillUnmount()}catch(Ae){vt(v,d,Ae)}}break;case 5:co(oe,oe.return);break;case 22:if(oe.memoizedState!==null){$S(ce);continue}}be!==null?(be.return=oe,_e=be):$S(ce)}ue=ue.sibling}e:for(ue=null,ce=o;;){if(ce.tag===5){if(ue===null){ue=ce;try{y=ce.stateNode,re?(S=y.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none"):($=ce.stateNode,z=ce.memoizedProps.style,k=z!=null&&z.hasOwnProperty("display")?z.display:null,$.style.display=mx("display",k))}catch(Ae){vt(o,o.return,Ae)}}}else if(ce.tag===6){if(ue===null)try{ce.stateNode.nodeValue=re?"":ce.memoizedProps}catch(Ae){vt(o,o.return,Ae)}}else if((ce.tag!==22&&ce.tag!==23||ce.memoizedState===null||ce===o)&&ce.child!==null){ce.child.return=ce,ce=ce.child;continue}if(ce===o)break e;for(;ce.sibling===null;){if(ce.return===null||ce.return===o)break e;ue===ce&&(ue=null),ce=ce.return}ue===ce&&(ue=null),ce.sibling.return=ce.return,ce=ce.sibling}}break;case 19:Xr(u,o),xn(o),v&4&&DS(o);break;case 21:break;default:Xr(u,o),xn(o)}}function xn(o){var u=o.flags;if(u&2){try{e:{for(var d=o.return;d!==null;){if(RS(d)){var v=d;break e}d=d.return}throw Error(r(160))}switch(v.tag){case 5:var y=v.stateNode;v.flags&32&&(vn(y,""),v.flags&=-33);var S=jS(o);Pp(o,S,y);break;case 3:case 4:var k=v.stateNode.containerInfo,$=jS(o);Ap(o,$,k);break;default:throw Error(r(161))}}catch(z){vt(o,o.return,z)}o.flags&=-3}u&4096&&(o.flags&=-4097)}function sM(o,u,d){_e=o,MS(o)}function MS(o,u,d){for(var v=(o.mode&1)!==0;_e!==null;){var y=_e,S=y.child;if(y.tag===22&&v){var k=y.memoizedState!==null||Ec;if(!k){var $=y.alternate,z=$!==null&&$.memoizedState!==null||Yt;$=Ec;var re=Yt;if(Ec=k,(Yt=z)&&!re)for(_e=y;_e!==null;)k=_e,z=k.child,k.tag===22&&k.memoizedState!==null?FS(y):z!==null?(z.return=k,_e=z):FS(y);for(;S!==null;)_e=S,MS(S),S=S.sibling;_e=y,Ec=$,Yt=re}LS(o)}else(y.subtreeFlags&8772)!==0&&S!==null?(S.return=y,_e=S):LS(o)}}function LS(o){for(;_e!==null;){var u=_e;if((u.flags&8772)!==0){var d=u.alternate;try{if((u.flags&8772)!==0)switch(u.tag){case 0:case 11:case 15:Yt||Oc(5,u);break;case 1:var v=u.stateNode;if(u.flags&4&&!Yt)if(d===null)v.componentDidMount();else{var y=u.elementType===u.type?d.memoizedProps:Vr(u.type,d.memoizedProps);v.componentDidUpdate(y,d.memoizedState,v.__reactInternalSnapshotBeforeUpdate)}var S=u.updateQueue;S!==null&&$1(u,S,v);break;case 3:var k=u.updateQueue;if(k!==null){if(d=null,u.child!==null)switch(u.child.tag){case 5:d=u.child.stateNode;break;case 1:d=u.child.stateNode}$1(u,k,d)}break;case 5:var $=u.stateNode;if(d===null&&u.flags&4){d=$;var z=u.memoizedProps;switch(u.type){case"button":case"input":case"select":case"textarea":z.autoFocus&&d.focus();break;case"img":z.src&&(d.src=z.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(u.memoizedState===null){var re=u.alternate;if(re!==null){var ue=re.memoizedState;if(ue!==null){var ce=ue.dehydrated;ce!==null&&ks(ce)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}Yt||u.flags&512&&Op(u)}catch(oe){vt(u,u.return,oe)}}if(u===o){_e=null;break}if(d=u.sibling,d!==null){d.return=u.return,_e=d;break}_e=u.return}}function $S(o){for(;_e!==null;){var u=_e;if(u===o){_e=null;break}var d=u.sibling;if(d!==null){d.return=u.return,_e=d;break}_e=u.return}}function FS(o){for(;_e!==null;){var u=_e;try{switch(u.tag){case 0:case 11:case 15:var d=u.return;try{Oc(4,u)}catch(z){vt(u,d,z)}break;case 1:var v=u.stateNode;if(typeof v.componentDidMount=="function"){var y=u.return;try{v.componentDidMount()}catch(z){vt(u,y,z)}}var S=u.return;try{Op(u)}catch(z){vt(u,S,z)}break;case 5:var k=u.return;try{Op(u)}catch(z){vt(u,k,z)}}}catch(z){vt(u,u.return,z)}if(u===o){_e=null;break}var $=u.sibling;if($!==null){$.return=u.return,_e=$;break}_e=u.return}}var uM=Math.ceil,Ac=A.ReactCurrentDispatcher,Tp=A.ReactCurrentOwner,Cr=A.ReactCurrentBatchConfig,Ue=0,Dt=null,wt=null,Gt=0,br=0,fo=xi(0),Et=0,Js=null,la=0,Pc=0,Cp=0,eu=null,lr=null,kp=0,ho=1/0,Wn=null,Tc=!1,Rp=null,Pi=null,Cc=!1,Ti=null,kc=0,tu=0,jp=null,Rc=-1,jc=0;function nr(){return(Ue&6)!==0?yt():Rc!==-1?Rc:Rc=yt()}function Ci(o){return(o.mode&1)===0?1:(Ue&2)!==0&&Gt!==0?Gt&-Gt:WI.transition!==null?(jc===0&&(jc=jx()),jc):(o=Je,o!==0||(o=window.event,o=o===void 0?16:zx(o.type)),o)}function Yr(o,u,d,v){if(50<tu)throw tu=0,jp=null,Error(r(185));Os(o,d,v),((Ue&2)===0||o!==Dt)&&(o===Dt&&((Ue&2)===0&&(Pc|=d),Et===4&&ki(o,Gt)),cr(o,v),d===1&&Ue===0&&(u.mode&1)===0&&(ho=yt()+500,oc&&_i()))}function cr(o,u){var d=o.callbackNode;WD(o,u);var v=zl(o,o===Dt?Gt:0);if(v===0)d!==null&&Cx(d),o.callbackNode=null,o.callbackPriority=0;else if(u=v&-v,o.callbackPriority!==u){if(d!=null&&Cx(d),u===1)o.tag===0?qI(zS.bind(null,o)):A1(zS.bind(null,o)),BI(function(){(Ue&6)===0&&_i()}),d=null;else{switch(Nx(v)){case 1:d=fh;break;case 4:d=kx;break;case 16:d=Ll;break;case 536870912:d=Rx;break;default:d=Ll}d=XS(d,BS.bind(null,o))}o.callbackPriority=u,o.callbackNode=d}}function BS(o,u){if(Rc=-1,jc=0,(Ue&6)!==0)throw Error(r(327));var d=o.callbackNode;if(po()&&o.callbackNode!==d)return null;var v=zl(o,o===Dt?Gt:0);if(v===0)return null;if((v&30)!==0||(v&o.expiredLanes)!==0||u)u=Nc(o,v);else{u=v;var y=Ue;Ue|=2;var S=US();(Dt!==o||Gt!==u)&&(Wn=null,ho=yt()+500,fa(o,u));do try{fM();break}catch($){GS(o,$)}while(!0);Yh(),Ac.current=S,Ue=y,wt!==null?u=0:(Dt=null,Gt=0,u=Et)}if(u!==0){if(u===2&&(y=dh(o),y!==0&&(v=y,u=Np(o,y))),u===1)throw d=Js,fa(o,0),ki(o,v),cr(o,yt()),d;if(u===6)ki(o,v);else{if(y=o.current.alternate,(v&30)===0&&!lM(y)&&(u=Nc(o,v),u===2&&(S=dh(o),S!==0&&(v=S,u=Np(o,S))),u===1))throw d=Js,fa(o,0),ki(o,v),cr(o,yt()),d;switch(o.finishedWork=y,o.finishedLanes=v,u){case 0:case 1:throw Error(r(345));case 2:da(o,lr,Wn);break;case 3:if(ki(o,v),(v&130023424)===v&&(u=kp+500-yt(),10<u)){if(zl(o,0)!==0)break;if(y=o.suspendedLanes,(y&v)!==v){nr(),o.pingedLanes|=o.suspendedLanes&y;break}o.timeoutHandle=Fh(da.bind(null,o,lr,Wn),u);break}da(o,lr,Wn);break;case 4:if(ki(o,v),(v&4194240)===v)break;for(u=o.eventTimes,y=-1;0<v;){var k=31-qr(v);S=1<<k,k=u[k],k>y&&(y=k),v&=~S}if(v=y,v=yt()-v,v=(120>v?120:480>v?480:1080>v?1080:1920>v?1920:3e3>v?3e3:4320>v?4320:1960*uM(v/1960))-v,10<v){o.timeoutHandle=Fh(da.bind(null,o,lr,Wn),v);break}da(o,lr,Wn);break;case 5:da(o,lr,Wn);break;default:throw Error(r(329))}}}return cr(o,yt()),o.callbackNode===d?BS.bind(null,o):null}function Np(o,u){var d=eu;return o.current.memoizedState.isDehydrated&&(fa(o,u).flags|=256),o=Nc(o,u),o!==2&&(u=lr,lr=d,u!==null&&Dp(u)),o}function Dp(o){lr===null?lr=o:lr.push.apply(lr,o)}function lM(o){for(var u=o;;){if(u.flags&16384){var d=u.updateQueue;if(d!==null&&(d=d.stores,d!==null))for(var v=0;v<d.length;v++){var y=d[v],S=y.getSnapshot;y=y.value;try{if(!Wr(S(),y))return!1}catch{return!1}}}if(d=u.child,u.subtreeFlags&16384&&d!==null)d.return=u,u=d;else{if(u===o)break;for(;u.sibling===null;){if(u.return===null||u.return===o)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function ki(o,u){for(u&=~Cp,u&=~Pc,o.suspendedLanes|=u,o.pingedLanes&=~u,o=o.expirationTimes;0<u;){var d=31-qr(u),v=1<<d;o[d]=-1,u&=~v}}function zS(o){if((Ue&6)!==0)throw Error(r(327));po();var u=zl(o,0);if((u&1)===0)return cr(o,yt()),null;var d=Nc(o,u);if(o.tag!==0&&d===2){var v=dh(o);v!==0&&(u=v,d=Np(o,v))}if(d===1)throw d=Js,fa(o,0),ki(o,u),cr(o,yt()),d;if(d===6)throw Error(r(345));return o.finishedWork=o.current.alternate,o.finishedLanes=u,da(o,lr,Wn),cr(o,yt()),null}function Ip(o,u){var d=Ue;Ue|=1;try{return o(u)}finally{Ue=d,Ue===0&&(ho=yt()+500,oc&&_i())}}function ca(o){Ti!==null&&Ti.tag===0&&(Ue&6)===0&&po();var u=Ue;Ue|=1;var d=Cr.transition,v=Je;try{if(Cr.transition=null,Je=1,o)return o()}finally{Je=v,Cr.transition=d,Ue=u,(Ue&6)===0&&_i()}}function Mp(){br=fo.current,ut(fo)}function fa(o,u){o.finishedWork=null,o.finishedLanes=0;var d=o.timeoutHandle;if(d!==-1&&(o.timeoutHandle=-1,FI(d)),wt!==null)for(d=wt.return;d!==null;){var v=d;switch(Wh(v),v.tag){case 1:v=v.type.childContextTypes,v!=null&&ic();break;case 3:uo(),ut(or),ut(Vt),ip();break;case 5:rp(v);break;case 4:uo();break;case 13:ut(ht);break;case 19:ut(ht);break;case 10:Qh(v.type._context);break;case 22:case 23:Mp()}d=d.return}if(Dt=o,wt=o=Ri(o.current,null),Gt=br=u,Et=0,Js=null,Cp=Pc=la=0,lr=eu=null,oa!==null){for(u=0;u<oa.length;u++)if(d=oa[u],v=d.interleaved,v!==null){d.interleaved=null;var y=v.next,S=d.pending;if(S!==null){var k=S.next;S.next=y,v.next=k}d.pending=v}oa=null}return o}function GS(o,u){do{var d=wt;try{if(Yh(),mc.current=wc,gc){for(var v=pt.memoizedState;v!==null;){var y=v.queue;y!==null&&(y.pending=null),v=v.next}gc=!1}if(ua=0,Nt=_t=pt=null,Vs=!1,Ks=0,Tp.current=null,d===null||d.return===null){Et=1,Js=u,wt=null;break}e:{var S=o,k=d.return,$=d,z=u;if(u=Gt,$.flags|=32768,z!==null&&typeof z=="object"&&typeof z.then=="function"){var re=z,ue=$,ce=ue.tag;if((ue.mode&1)===0&&(ce===0||ce===11||ce===15)){var oe=ue.alternate;oe?(ue.updateQueue=oe.updateQueue,ue.memoizedState=oe.memoizedState,ue.lanes=oe.lanes):(ue.updateQueue=null,ue.memoizedState=null)}var be=hS(k);if(be!==null){be.flags&=-257,pS(be,k,$,S,u),be.mode&1&&dS(S,re,u),u=be,z=re;var Oe=u.updateQueue;if(Oe===null){var Ae=new Set;Ae.add(z),u.updateQueue=Ae}else Oe.add(z);break e}else{if((u&1)===0){dS(S,re,u),Lp();break e}z=Error(r(426))}}else if(ct&&$.mode&1){var bt=hS(k);if(bt!==null){(bt.flags&65536)===0&&(bt.flags|=256),pS(bt,k,$,S,u),Kh(lo(z,$));break e}}S=z=lo(z,$),Et!==4&&(Et=2),eu===null?eu=[S]:eu.push(S),S=k;do{switch(S.tag){case 3:S.flags|=65536,u&=-u,S.lanes|=u;var Y=cS(S,z,u);L1(S,Y);break e;case 1:$=z;var W=S.type,Z=S.stateNode;if((S.flags&128)===0&&(typeof W.getDerivedStateFromError=="function"||Z!==null&&typeof Z.componentDidCatch=="function"&&(Pi===null||!Pi.has(Z)))){S.flags|=65536,u&=-u,S.lanes|=u;var fe=fS(S,$,u);L1(S,fe);break e}}S=S.return}while(S!==null)}WS(d)}catch(Te){u=Te,wt===d&&d!==null&&(wt=d=d.return);continue}break}while(!0)}function US(){var o=Ac.current;return Ac.current=wc,o===null?wc:o}function Lp(){(Et===0||Et===3||Et===2)&&(Et=4),Dt===null||(la&268435455)===0&&(Pc&268435455)===0||ki(Dt,Gt)}function Nc(o,u){var d=Ue;Ue|=2;var v=US();(Dt!==o||Gt!==u)&&(Wn=null,fa(o,u));do try{cM();break}catch(y){GS(o,y)}while(!0);if(Yh(),Ue=d,Ac.current=v,wt!==null)throw Error(r(261));return Dt=null,Gt=0,Et}function cM(){for(;wt!==null;)qS(wt)}function fM(){for(;wt!==null&&!MD();)qS(wt)}function qS(o){var u=KS(o.alternate,o,br);o.memoizedProps=o.pendingProps,u===null?WS(o):wt=u,Tp.current=null}function WS(o){var u=o;do{var d=u.alternate;if(o=u.return,(u.flags&32768)===0){if(d=nM(d,u,br),d!==null){wt=d;return}}else{if(d=iM(d,u),d!==null){d.flags&=32767,wt=d;return}if(o!==null)o.flags|=32768,o.subtreeFlags=0,o.deletions=null;else{Et=6,wt=null;return}}if(u=u.sibling,u!==null){wt=u;return}wt=u=o}while(u!==null);Et===0&&(Et=5)}function da(o,u,d){var v=Je,y=Cr.transition;try{Cr.transition=null,Je=1,dM(o,u,d,v)}finally{Cr.transition=y,Je=v}return null}function dM(o,u,d,v){do po();while(Ti!==null);if((Ue&6)!==0)throw Error(r(327));d=o.finishedWork;var y=o.finishedLanes;if(d===null)return null;if(o.finishedWork=null,o.finishedLanes=0,d===o.current)throw Error(r(177));o.callbackNode=null,o.callbackPriority=0;var S=d.lanes|d.childLanes;if(HD(o,S),o===Dt&&(wt=Dt=null,Gt=0),(d.subtreeFlags&2064)===0&&(d.flags&2064)===0||Cc||(Cc=!0,XS(Ll,function(){return po(),null})),S=(d.flags&15990)!==0,(d.subtreeFlags&15990)!==0||S){S=Cr.transition,Cr.transition=null;var k=Je;Je=1;var $=Ue;Ue|=4,Tp.current=null,oM(o,d),IS(d,o),jI(Lh),ql=!!Mh,Lh=Mh=null,o.current=d,sM(d),LD(),Ue=$,Je=k,Cr.transition=S}else o.current=d;if(Cc&&(Cc=!1,Ti=o,kc=y),S=o.pendingLanes,S===0&&(Pi=null),BD(d.stateNode),cr(o,yt()),u!==null)for(v=o.onRecoverableError,d=0;d<u.length;d++)y=u[d],v(y.value,{componentStack:y.stack,digest:y.digest});if(Tc)throw Tc=!1,o=Rp,Rp=null,o;return(kc&1)!==0&&o.tag!==0&&po(),S=o.pendingLanes,(S&1)!==0?o===jp?tu++:(tu=0,jp=o):tu=0,_i(),null}function po(){if(Ti!==null){var o=Nx(kc),u=Cr.transition,d=Je;try{if(Cr.transition=null,Je=16>o?16:o,Ti===null)var v=!1;else{if(o=Ti,Ti=null,kc=0,(Ue&6)!==0)throw Error(r(331));var y=Ue;for(Ue|=4,_e=o.current;_e!==null;){var S=_e,k=S.child;if((_e.flags&16)!==0){var $=S.deletions;if($!==null){for(var z=0;z<$.length;z++){var re=$[z];for(_e=re;_e!==null;){var ue=_e;switch(ue.tag){case 0:case 11:case 15:Zs(8,ue,S)}var ce=ue.child;if(ce!==null)ce.return=ue,_e=ce;else for(;_e!==null;){ue=_e;var oe=ue.sibling,be=ue.return;if(kS(ue),ue===re){_e=null;break}if(oe!==null){oe.return=be,_e=oe;break}_e=be}}}var Oe=S.alternate;if(Oe!==null){var Ae=Oe.child;if(Ae!==null){Oe.child=null;do{var bt=Ae.sibling;Ae.sibling=null,Ae=bt}while(Ae!==null)}}_e=S}}if((S.subtreeFlags&2064)!==0&&k!==null)k.return=S,_e=k;else e:for(;_e!==null;){if(S=_e,(S.flags&2048)!==0)switch(S.tag){case 0:case 11:case 15:Zs(9,S,S.return)}var Y=S.sibling;if(Y!==null){Y.return=S.return,_e=Y;break e}_e=S.return}}var W=o.current;for(_e=W;_e!==null;){k=_e;var Z=k.child;if((k.subtreeFlags&2064)!==0&&Z!==null)Z.return=k,_e=Z;else e:for(k=W;_e!==null;){if($=_e,($.flags&2048)!==0)try{switch($.tag){case 0:case 11:case 15:Oc(9,$)}}catch(Te){vt($,$.return,Te)}if($===k){_e=null;break e}var fe=$.sibling;if(fe!==null){fe.return=$.return,_e=fe;break e}_e=$.return}}if(Ue=y,_i(),gn&&typeof gn.onPostCommitFiberRoot=="function")try{gn.onPostCommitFiberRoot($l,o)}catch{}v=!0}return v}finally{Je=d,Cr.transition=u}}return!1}function HS(o,u,d){u=lo(d,u),u=cS(o,u,1),o=Oi(o,u,1),u=nr(),o!==null&&(Os(o,1,u),cr(o,u))}function vt(o,u,d){if(o.tag===3)HS(o,o,d);else for(;u!==null;){if(u.tag===3){HS(u,o,d);break}else if(u.tag===1){var v=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&(Pi===null||!Pi.has(v))){o=lo(d,o),o=fS(u,o,1),u=Oi(u,o,1),o=nr(),u!==null&&(Os(u,1,o),cr(u,o));break}}u=u.return}}function hM(o,u,d){var v=o.pingCache;v!==null&&v.delete(u),u=nr(),o.pingedLanes|=o.suspendedLanes&d,Dt===o&&(Gt&d)===d&&(Et===4||Et===3&&(Gt&130023424)===Gt&&500>yt()-kp?fa(o,0):Cp|=d),cr(o,u)}function VS(o,u){u===0&&((o.mode&1)===0?u=1:(u=Bl,Bl<<=1,(Bl&130023424)===0&&(Bl=4194304)));var d=nr();o=Gn(o,u),o!==null&&(Os(o,u,d),cr(o,d))}function pM(o){var u=o.memoizedState,d=0;u!==null&&(d=u.retryLane),VS(o,d)}function vM(o,u){var d=0;switch(o.tag){case 13:var v=o.stateNode,y=o.memoizedState;y!==null&&(d=y.retryLane);break;case 19:v=o.stateNode;break;default:throw Error(r(314))}v!==null&&v.delete(u),VS(o,d)}var KS;KS=function(o,u,d){if(o!==null)if(o.memoizedProps!==u.pendingProps||or.current)ur=!0;else{if((o.lanes&d)===0&&(u.flags&128)===0)return ur=!1,rM(o,u,d);ur=(o.flags&131072)!==0}else ur=!1,ct&&(u.flags&1048576)!==0&&P1(u,uc,u.index);switch(u.lanes=0,u.tag){case 2:var v=u.type;_c(o,u),o=u.pendingProps;var y=to(u,Vt.current);so(u,d),y=sp(null,u,v,o,y,d);var S=up();return u.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(u.tag=1,u.memoizedState=null,u.updateQueue=null,sr(v)?(S=!0,ac(u)):S=!1,u.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,ep(u),y.updater=xc,u.stateNode=y,y._reactInternals=u,pp(u,v,o,d),u=yp(null,u,v,!0,S,d)):(u.tag=0,ct&&S&&qh(u),rr(null,u,y,d),u=u.child),u;case 16:v=u.elementType;e:{switch(_c(o,u),o=u.pendingProps,y=v._init,v=y(v._payload),u.type=v,y=u.tag=gM(v),o=Vr(v,o),y){case 0:u=gp(null,u,v,o,d);break e;case 1:u=wS(null,u,v,o,d);break e;case 11:u=vS(null,u,v,o,d);break e;case 14:u=mS(null,u,v,Vr(v.type,o),d);break e}throw Error(r(306,v,""))}return u;case 0:return v=u.type,y=u.pendingProps,y=u.elementType===v?y:Vr(v,y),gp(o,u,v,y,d);case 1:return v=u.type,y=u.pendingProps,y=u.elementType===v?y:Vr(v,y),wS(o,u,v,y,d);case 3:e:{if(xS(u),o===null)throw Error(r(387));v=u.pendingProps,S=u.memoizedState,y=S.element,M1(o,u),pc(u,v,null,d);var k=u.memoizedState;if(v=k.element,S.isDehydrated)if(S={element:v,isDehydrated:!1,cache:k.cache,pendingSuspenseBoundaries:k.pendingSuspenseBoundaries,transitions:k.transitions},u.updateQueue.baseState=S,u.memoizedState=S,u.flags&256){y=lo(Error(r(423)),u),u=SS(o,u,v,d,y);break e}else if(v!==y){y=lo(Error(r(424)),u),u=SS(o,u,v,d,y);break e}else for(yr=wi(u.stateNode.containerInfo.firstChild),gr=u,ct=!0,Hr=null,d=D1(u,null,v,d),u.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(io(),v===y){u=qn(o,u,d);break e}rr(o,u,v,d)}u=u.child}return u;case 5:return F1(u),o===null&&Vh(u),v=u.type,y=u.pendingProps,S=o!==null?o.memoizedProps:null,k=y.children,$h(v,y)?k=null:S!==null&&$h(v,S)&&(u.flags|=32),bS(o,u),rr(o,u,k,d),u.child;case 6:return o===null&&Vh(u),null;case 13:return _S(o,u,d);case 4:return tp(u,u.stateNode.containerInfo),v=u.pendingProps,o===null?u.child=ao(u,null,v,d):rr(o,u,v,d),u.child;case 11:return v=u.type,y=u.pendingProps,y=u.elementType===v?y:Vr(v,y),vS(o,u,v,y,d);case 7:return rr(o,u,u.pendingProps,d),u.child;case 8:return rr(o,u,u.pendingProps.children,d),u.child;case 12:return rr(o,u,u.pendingProps.children,d),u.child;case 10:e:{if(v=u.type._context,y=u.pendingProps,S=u.memoizedProps,k=y.value,at(fc,v._currentValue),v._currentValue=k,S!==null)if(Wr(S.value,k)){if(S.children===y.children&&!or.current){u=qn(o,u,d);break e}}else for(S=u.child,S!==null&&(S.return=u);S!==null;){var $=S.dependencies;if($!==null){k=S.child;for(var z=$.firstContext;z!==null;){if(z.context===v){if(S.tag===1){z=Un(-1,d&-d),z.tag=2;var re=S.updateQueue;if(re!==null){re=re.shared;var ue=re.pending;ue===null?z.next=z:(z.next=ue.next,ue.next=z),re.pending=z}}S.lanes|=d,z=S.alternate,z!==null&&(z.lanes|=d),Zh(S.return,d,u),$.lanes|=d;break}z=z.next}}else if(S.tag===10)k=S.type===u.type?null:S.child;else if(S.tag===18){if(k=S.return,k===null)throw Error(r(341));k.lanes|=d,$=k.alternate,$!==null&&($.lanes|=d),Zh(k,d,u),k=S.sibling}else k=S.child;if(k!==null)k.return=S;else for(k=S;k!==null;){if(k===u){k=null;break}if(S=k.sibling,S!==null){S.return=k.return,k=S;break}k=k.return}S=k}rr(o,u,y.children,d),u=u.child}return u;case 9:return y=u.type,v=u.pendingProps.children,so(u,d),y=Pr(y),v=v(y),u.flags|=1,rr(o,u,v,d),u.child;case 14:return v=u.type,y=Vr(v,u.pendingProps),y=Vr(v.type,y),mS(o,u,v,y,d);case 15:return gS(o,u,u.type,u.pendingProps,d);case 17:return v=u.type,y=u.pendingProps,y=u.elementType===v?y:Vr(v,y),_c(o,u),u.tag=1,sr(v)?(o=!0,ac(u)):o=!1,so(u,d),uS(u,v,y),pp(u,v,y,d),yp(null,u,v,!0,o,d);case 19:return OS(o,u,d);case 22:return yS(o,u,d)}throw Error(r(156,u.tag))};function XS(o,u){return Tx(o,u)}function mM(o,u,d,v){this.tag=o,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=v,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function kr(o,u,d,v){return new mM(o,u,d,v)}function $p(o){return o=o.prototype,!(!o||!o.isReactComponent)}function gM(o){if(typeof o=="function")return $p(o)?1:0;if(o!=null){if(o=o.$$typeof,o===L)return 11;if(o===K)return 14}return 2}function Ri(o,u){var d=o.alternate;return d===null?(d=kr(o.tag,u,o.key,o.mode),d.elementType=o.elementType,d.type=o.type,d.stateNode=o.stateNode,d.alternate=o,o.alternate=d):(d.pendingProps=u,d.type=o.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=o.flags&14680064,d.childLanes=o.childLanes,d.lanes=o.lanes,d.child=o.child,d.memoizedProps=o.memoizedProps,d.memoizedState=o.memoizedState,d.updateQueue=o.updateQueue,u=o.dependencies,d.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},d.sibling=o.sibling,d.index=o.index,d.ref=o.ref,d}function Dc(o,u,d,v,y,S){var k=2;if(v=o,typeof o=="function")$p(o)&&(k=1);else if(typeof o=="string")k=5;else e:switch(o){case C:return ha(d.children,y,S,u);case N:k=8,y|=8;break;case D:return o=kr(12,d,u,y|2),o.elementType=D,o.lanes=S,o;case j:return o=kr(13,d,u,y),o.elementType=j,o.lanes=S,o;case X:return o=kr(19,d,u,y),o.elementType=X,o.lanes=S,o;case M:return Ic(d,y,S,u);default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case B:k=10;break e;case U:k=9;break e;case L:k=11;break e;case K:k=14;break e;case G:k=16,v=null;break e}throw Error(r(130,o==null?o:typeof o,""))}return u=kr(k,d,u,y),u.elementType=o,u.type=v,u.lanes=S,u}function ha(o,u,d,v){return o=kr(7,o,v,u),o.lanes=d,o}function Ic(o,u,d,v){return o=kr(22,o,v,u),o.elementType=M,o.lanes=d,o.stateNode={isHidden:!1},o}function Fp(o,u,d){return o=kr(6,o,null,u),o.lanes=d,o}function Bp(o,u,d){return u=kr(4,o.children!==null?o.children:[],o.key,u),u.lanes=d,u.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},u}function yM(o,u,d,v,y){this.tag=u,this.containerInfo=o,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=hh(0),this.expirationTimes=hh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hh(0),this.identifierPrefix=v,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function zp(o,u,d,v,y,S,k,$,z){return o=new yM(o,u,d,$,z),u===1?(u=1,S===!0&&(u|=8)):u=0,S=kr(3,null,null,u),o.current=S,S.stateNode=o,S.memoizedState={element:v,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},ep(S),o}function bM(o,u,d){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:O,key:v==null?null:""+v,children:o,containerInfo:u,implementation:d}}function YS(o){if(!o)return Si;o=o._reactInternals;e:{if(ta(o)!==o||o.tag!==1)throw Error(r(170));var u=o;do{switch(u.tag){case 3:u=u.stateNode.context;break e;case 1:if(sr(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break e}}u=u.return}while(u!==null);throw Error(r(171))}if(o.tag===1){var d=o.type;if(sr(d))return E1(o,d,u)}return u}function QS(o,u,d,v,y,S,k,$,z){return o=zp(d,v,!0,o,y,S,k,$,z),o.context=YS(null),d=o.current,v=nr(),y=Ci(d),S=Un(v,y),S.callback=u??null,Oi(d,S,y),o.current.lanes=y,Os(o,y,v),cr(o,v),o}function Mc(o,u,d,v){var y=u.current,S=nr(),k=Ci(y);return d=YS(d),u.context===null?u.context=d:u.pendingContext=d,u=Un(S,k),u.payload={element:o},v=v===void 0?null:v,v!==null&&(u.callback=v),o=Oi(y,u,k),o!==null&&(Yr(o,y,k,S),hc(o,y,k)),k}function Lc(o){if(o=o.current,!o.child)return null;switch(o.child.tag){case 5:return o.child.stateNode;default:return o.child.stateNode}}function ZS(o,u){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var d=o.retryLane;o.retryLane=d!==0&&d<u?d:u}}function Gp(o,u){ZS(o,u),(o=o.alternate)&&ZS(o,u)}function wM(){return null}var JS=typeof reportError=="function"?reportError:function(o){console.error(o)};function Up(o){this._internalRoot=o}$c.prototype.render=Up.prototype.render=function(o){var u=this._internalRoot;if(u===null)throw Error(r(409));Mc(o,u,null,null)},$c.prototype.unmount=Up.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var u=o.containerInfo;ca(function(){Mc(null,o,null,null)}),u[$n]=null}};function $c(o){this._internalRoot=o}$c.prototype.unstable_scheduleHydration=function(o){if(o){var u=Mx();o={blockedOn:null,target:o,priority:u};for(var d=0;d<gi.length&&u!==0&&u<gi[d].priority;d++);gi.splice(d,0,o),d===0&&Fx(o)}};function qp(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function Fc(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11&&(o.nodeType!==8||o.nodeValue!==" react-mount-point-unstable "))}function e_(){}function xM(o,u,d,v,y){if(y){if(typeof v=="function"){var S=v;v=function(){var re=Lc(k);S.call(re)}}var k=QS(u,v,o,0,null,!1,!1,"",e_);return o._reactRootContainer=k,o[$n]=k.current,Fs(o.nodeType===8?o.parentNode:o),ca(),k}for(;y=o.lastChild;)o.removeChild(y);if(typeof v=="function"){var $=v;v=function(){var re=Lc(z);$.call(re)}}var z=zp(o,0,!1,null,null,!1,!1,"",e_);return o._reactRootContainer=z,o[$n]=z.current,Fs(o.nodeType===8?o.parentNode:o),ca(function(){Mc(u,z,d,v)}),z}function Bc(o,u,d,v,y){var S=d._reactRootContainer;if(S){var k=S;if(typeof y=="function"){var $=y;y=function(){var z=Lc(k);$.call(z)}}Mc(u,k,o,y)}else k=xM(d,u,o,y,v);return Lc(k)}Dx=function(o){switch(o.tag){case 3:var u=o.stateNode;if(u.current.memoizedState.isDehydrated){var d=Es(u.pendingLanes);d!==0&&(ph(u,d|1),cr(u,yt()),(Ue&6)===0&&(ho=yt()+500,_i()))}break;case 13:ca(function(){var v=Gn(o,1);if(v!==null){var y=nr();Yr(v,o,1,y)}}),Gp(o,1)}},vh=function(o){if(o.tag===13){var u=Gn(o,134217728);if(u!==null){var d=nr();Yr(u,o,134217728,d)}Gp(o,134217728)}},Ix=function(o){if(o.tag===13){var u=Ci(o),d=Gn(o,u);if(d!==null){var v=nr();Yr(d,o,u,v)}Gp(o,u)}},Mx=function(){return Je},Lx=function(o,u){var d=Je;try{return Je=o,u()}finally{Je=d}},sh=function(o,u,d){switch(u){case"input":if(it(o,d),u=d.name,d.type==="radio"&&u!=null){for(d=o;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll("input[name="+JSON.stringify(""+u)+'][type="radio"]'),u=0;u<d.length;u++){var v=d[u];if(v!==o&&v.form===o.form){var y=nc(v);if(!y)throw Error(r(90));ie(v),it(v,y)}}}break;case"textarea":dn(o,d);break;case"select":u=d.value,u!=null&&rt(o,!!d.multiple,u,!1)}},xx=Ip,Sx=ca;var SM={usingClientEntryPoint:!1,Events:[Gs,Ja,nc,bx,wx,Ip]},ru={findFiberByHostInstance:ra,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},_M={bundleType:ru.bundleType,version:ru.version,rendererPackageName:ru.rendererPackageName,rendererConfig:ru.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:A.ReactCurrentDispatcher,findHostInstanceByFiber:function(o){return o=Ax(o),o===null?null:o.stateNode},findFiberByHostInstance:ru.findFiberByHostInstance||wM,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zc.isDisabled&&zc.supportsFiber)try{$l=zc.inject(_M),gn=zc}catch{}}return fr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=SM,fr.createPortal=function(o,u){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!qp(u))throw Error(r(200));return bM(o,u,null,d)},fr.createRoot=function(o,u){if(!qp(o))throw Error(r(299));var d=!1,v="",y=JS;return u!=null&&(u.unstable_strictMode===!0&&(d=!0),u.identifierPrefix!==void 0&&(v=u.identifierPrefix),u.onRecoverableError!==void 0&&(y=u.onRecoverableError)),u=zp(o,1,!1,null,null,d,!1,v,y),o[$n]=u.current,Fs(o.nodeType===8?o.parentNode:o),new Up(u)},fr.findDOMNode=function(o){if(o==null)return null;if(o.nodeType===1)return o;var u=o._reactInternals;if(u===void 0)throw typeof o.render=="function"?Error(r(188)):(o=Object.keys(o).join(","),Error(r(268,o)));return o=Ax(u),o=o===null?null:o.stateNode,o},fr.flushSync=function(o){return ca(o)},fr.hydrate=function(o,u,d){if(!Fc(u))throw Error(r(200));return Bc(null,o,u,!0,d)},fr.hydrateRoot=function(o,u,d){if(!qp(o))throw Error(r(405));var v=d!=null&&d.hydratedSources||null,y=!1,S="",k=JS;if(d!=null&&(d.unstable_strictMode===!0&&(y=!0),d.identifierPrefix!==void 0&&(S=d.identifierPrefix),d.onRecoverableError!==void 0&&(k=d.onRecoverableError)),u=QS(u,null,o,1,d??null,y,!1,S,k),o[$n]=u.current,Fs(o),v)for(o=0;o<v.length;o++)d=v[o],y=d._getVersion,y=y(d._source),u.mutableSourceEagerHydrationData==null?u.mutableSourceEagerHydrationData=[d,y]:u.mutableSourceEagerHydrationData.push(d,y);return new $c(u)},fr.render=function(o,u,d){if(!Fc(u))throw Error(r(200));return Bc(null,o,u,!1,d)},fr.unmountComponentAtNode=function(o){if(!Fc(o))throw Error(r(40));return o._reactRootContainer?(ca(function(){Bc(null,null,o,!1,function(){o._reactRootContainer=null,o[$n]=null})}),!0):!1},fr.unstable_batchedUpdates=Ip,fr.unstable_renderSubtreeIntoContainer=function(o,u,d,v){if(!Fc(d))throw Error(r(200));if(o==null||o._reactInternals===void 0)throw Error(r(38));return Bc(o,u,d,!1,v)},fr.version="18.3.1-next-f1338f8080-20240426",fr}var l_;function RM(){if(l_)return Kp.exports;l_=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Kp.exports=kM(),Kp.exports}var c_;function jM(){if(c_)return qc;c_=1;var t=RM();return qc.createRoot=t.createRoot,qc.hydrateRoot=t.hydrateRoot,qc}var NM=jM();/**
41
+ * react-router v7.13.1
42
+ *
43
+ * Copyright (c) Remix Software Inc.
44
+ *
45
+ * This source code is licensed under the MIT license found in the
46
+ * LICENSE.md file in the root directory of this source tree.
47
+ *
48
+ * @license MIT
49
+ */var f_="popstate";function d_(t){return typeof t=="object"&&t!=null&&"pathname"in t&&"search"in t&&"hash"in t&&"state"in t&&"key"in t}function DM(t={}){function e(n,i){var f;let a=(f=i.state)==null?void 0:f.masked,{pathname:s,search:l,hash:c}=a||n.location;return p0("",{pathname:s,search:l,hash:c},i.state&&i.state.usr||null,i.state&&i.state.key||"default",a?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}function r(n,i){return typeof i=="string"?i:Ru(i)}return MM(e,r,null,t)}function dt(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function un(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function IM(){return Math.random().toString(36).substring(2,10)}function h_(t,e){return{usr:t.state,key:t.key,idx:e,masked:t.unstable_mask?{pathname:t.pathname,search:t.search,hash:t.hash}:void 0}}function p0(t,e,r=null,n,i){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?ls(e):e,state:r,key:e&&e.key||n||IM(),unstable_mask:i}}function Ru({pathname:t="/",search:e="",hash:r=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function ls(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substring(r),t=t.substring(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substring(n),t=t.substring(0,n)),t&&(e.pathname=t)}return e}function MM(t,e,r,n={}){let{window:i=document.defaultView,v5Compat:a=!1}=n,s=i.history,l="POP",c=null,f=p();f==null&&(f=0,s.replaceState({...s.state,idx:f},""));function p(){return(s.state||{idx:null}).idx}function h(){l="POP";let b=p(),E=b==null?null:b-f;f=b,c&&c({action:l,location:w.location,delta:E})}function m(b,E){l="PUSH";let P=d_(b)?b:p0(w.location,b,E);f=p()+1;let T=h_(P,f),A=w.createHref(P.unstable_mask||P);try{s.pushState(T,"",A)}catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;i.location.assign(A)}a&&c&&c({action:l,location:w.location,delta:1})}function g(b,E){l="REPLACE";let P=d_(b)?b:p0(w.location,b,E);f=p();let T=h_(P,f),A=w.createHref(P.unstable_mask||P);s.replaceState(T,"",A),a&&c&&c({action:l,location:w.location,delta:0})}function _(b){return LM(b)}let w={get action(){return l},get location(){return t(i,s)},listen(b){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(f_,h),c=b,()=>{i.removeEventListener(f_,h),c=null}},createHref(b){return e(i,b)},createURL:_,encodeLocation(b){let E=_(b);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:m,replace:g,go(b){return s.go(b)}};return w}function LM(t,e=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),dt(r,"No window.location.(origin|href) available to create URL");let n=typeof t=="string"?t:Ru(t);return n=n.replace(/ $/,"%20"),!e&&n.startsWith("//")&&(n=r+n),new URL(n,r)}function oR(t,e,r="/"){return $M(t,e,r,!1)}function $M(t,e,r,n){let i=typeof e=="string"?ls(e):e,a=ai(i.pathname||"/",r);if(a==null)return null;let s=sR(t);FM(s);let l=null;for(let c=0;l==null&&c<s.length;++c){let f=YM(a);l=KM(s[c],f,n)}return l}function sR(t,e=[],r=[],n="",i=!1){let a=(s,l,c=i,f)=>{let p={relativePath:f===void 0?s.path||"":f,caseSensitive:s.caseSensitive===!0,childrenIndex:l,route:s};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(n)&&c)return;dt(p.relativePath.startsWith(n),`Absolute route path "${p.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(n.length)}let h=Pn([n,p.relativePath]),m=r.concat(p);s.children&&s.children.length>0&&(dt(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),sR(s.children,e,m,h,c)),!(s.path==null&&!s.index)&&e.push({path:h,score:HM(h,s.index),routesMeta:m})};return t.forEach((s,l)=>{var c;if(s.path===""||!((c=s.path)!=null&&c.includes("?")))a(s,l);else for(let f of uR(s.path))a(s,l,!0,f)}),e}function uR(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let s=uR(n.join("/")),l=[];return l.push(...s.map(c=>c===""?a:[a,c].join("/"))),i&&l.push(...s),l.map(c=>t.startsWith("/")&&c===""?"/":c)}function FM(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:VM(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var BM=/^:[\w-]+$/,zM=3,GM=2,UM=1,qM=10,WM=-2,p_=t=>t==="*";function HM(t,e){let r=t.split("/"),n=r.length;return r.some(p_)&&(n+=WM),e&&(n+=GM),r.filter(i=>!p_(i)).reduce((i,a)=>i+(BM.test(a)?zM:a===""?UM:qM),n)}function VM(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function KM(t,e,r=!1){let{routesMeta:n}=t,i={},a="/",s=[];for(let l=0;l<n.length;++l){let c=n[l],f=l===n.length-1,p=a==="/"?e:e.slice(a.length)||"/",h=mf({path:c.relativePath,caseSensitive:c.caseSensitive,end:f},p),m=c.route;if(!h&&f&&r&&!n[n.length-1].route.index&&(h=mf({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},p)),!h)return null;Object.assign(i,h.params),s.push({params:i,pathname:Pn([a,h.pathname]),pathnameBase:eL(Pn([a,h.pathnameBase])),route:m}),h.pathnameBase!=="/"&&(a=Pn([a,h.pathnameBase]))}return s}function mf(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=XM(t.path,t.caseSensitive,t.end),i=e.match(r);if(!i)return null;let a=i[0],s=a.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:n.reduce((f,{paramName:p,isOptional:h},m)=>{if(p==="*"){let _=l[m]||"";s=a.slice(0,a.length-_.length).replace(/(.)\/+$/,"$1")}const g=l[m];return h&&!g?f[p]=void 0:f[p]=(g||"").replace(/%2F/g,"/"),f},{}),pathname:a,pathnameBase:s,pattern:t}}function XM(t,e=!1,r=!0){un(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,l,c,f,p)=>{if(n.push({paramName:l,isOptional:c!=null}),c){let h=p.charAt(f+s.length);return h&&h!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(n.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function YM(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return un(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function ai(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}var QM=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function ZM(t,e="/"){let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?ls(t):t,a;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?a=v_(r.substring(1),"/"):a=v_(r,e)):a=e,{pathname:a,search:tL(n),hash:rL(i)}}function v_(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Qp(t,e,r,n){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function JM(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function Jb(t){let e=JM(t);return e.map((r,n)=>n===e.length-1?r.pathname:r.pathnameBase)}function vd(t,e,r,n=!1){let i;typeof t=="string"?i=ls(t):(i={...t},dt(!i.pathname||!i.pathname.includes("?"),Qp("?","pathname","search",i)),dt(!i.pathname||!i.pathname.includes("#"),Qp("#","pathname","hash",i)),dt(!i.search||!i.search.includes("#"),Qp("#","search","hash",i)));let a=t===""||i.pathname==="",s=a?"/":i.pathname,l;if(s==null)l=r;else{let h=e.length-1;if(!n&&s.startsWith("..")){let m=s.split("/");for(;m[0]==="..";)m.shift(),h-=1;i.pathname=m.join("/")}l=h>=0?e[h]:"/"}let c=ZM(i,l),f=s&&s!=="/"&&s.endsWith("/"),p=(a||s===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(f||p)&&(c.pathname+="/"),c}var Pn=t=>t.join("/").replace(/\/\/+/g,"/"),eL=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),tL=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,rL=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,nL=class{constructor(t,e,r,n=!1){this.status=t,this.statusText=e||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function iL(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function aL(t){return t.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var lR=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function cR(t,e){let r=t;if(typeof r!="string"||!QM.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,i=!1;if(lR)try{let a=new URL(window.location.href),s=r.startsWith("//")?new URL(a.protocol+r):new URL(r),l=ai(s.pathname,e);s.origin===a.origin&&l!=null?r=l+s.search+s.hash:i=!0}catch{un(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:i,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var fR=["POST","PUT","PATCH","DELETE"];new Set(fR);var oL=["GET",...fR];new Set(oL);var cs=I.createContext(null);cs.displayName="DataRouter";var md=I.createContext(null);md.displayName="DataRouterState";var sL=I.createContext(!1),dR=I.createContext({isTransitioning:!1});dR.displayName="ViewTransition";var uL=I.createContext(new Map);uL.displayName="Fetchers";var lL=I.createContext(null);lL.displayName="Await";var Er=I.createContext(null);Er.displayName="Navigation";var _l=I.createContext(null);_l.displayName="Location";var Nn=I.createContext({outlet:null,matches:[],isDataRoute:!1});Nn.displayName="Route";var ew=I.createContext(null);ew.displayName="RouteError";var hR="REACT_ROUTER_ERROR",cL="REDIRECT",fL="ROUTE_ERROR_RESPONSE";function dL(t){if(t.startsWith(`${hR}:${cL}:{`))try{let e=JSON.parse(t.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function hL(t){if(t.startsWith(`${hR}:${fL}:{`))try{let e=JSON.parse(t.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new nL(e.status,e.statusText,e.data)}catch{}}function pL(t,{relative:e}={}){dt(fs(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=I.useContext(Er),{hash:i,pathname:a,search:s}=El(t,{relative:e}),l=a;return r!=="/"&&(l=a==="/"?r:Pn([r,a])),n.createHref({pathname:l,search:s,hash:i})}function fs(){return I.useContext(_l)!=null}function li(){return dt(fs(),"useLocation() may be used only in the context of a <Router> component."),I.useContext(_l).location}var pR="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function vR(t){I.useContext(Er).static||I.useLayoutEffect(t)}function mR(){let{isDataRoute:t}=I.useContext(Nn);return t?PL():vL()}function vL(){dt(fs(),"useNavigate() may be used only in the context of a <Router> component.");let t=I.useContext(cs),{basename:e,navigator:r}=I.useContext(Er),{matches:n}=I.useContext(Nn),{pathname:i}=li(),a=JSON.stringify(Jb(n)),s=I.useRef(!1);return vR(()=>{s.current=!0}),I.useCallback((c,f={})=>{if(un(s.current,pR),!s.current)return;if(typeof c=="number"){r.go(c);return}let p=vd(c,JSON.parse(a),i,f.relative==="path");t==null&&e!=="/"&&(p.pathname=p.pathname==="/"?e:Pn([e,p.pathname])),(f.replace?r.replace:r.push)(p,f.state,f)},[e,r,a,i,t])}I.createContext(null);function El(t,{relative:e}={}){let{matches:r}=I.useContext(Nn),{pathname:n}=li(),i=JSON.stringify(Jb(r));return I.useMemo(()=>vd(t,JSON.parse(i),n,e==="path"),[t,i,n,e])}function mL(t,e){return gR(t,e)}function gR(t,e,r){var b;dt(fs(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=I.useContext(Er),{matches:i}=I.useContext(Nn),a=i[i.length-1],s=a?a.params:{},l=a?a.pathname:"/",c=a?a.pathnameBase:"/",f=a&&a.route;{let E=f&&f.path||"";bR(l,!f||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (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.
50
+
51
+ Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let p=li(),h;if(e){let E=typeof e=="string"?ls(e):e;dt(c==="/"||((b=E.pathname)==null?void 0:b.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.`),h=E}else h=p;let m=h.pathname||"/",g=m;if(c!=="/"){let E=c.replace(/^\//,"").split("/");g="/"+m.replace(/^\//,"").split("/").slice(E.length).join("/")}let _=oR(t,{pathname:g});un(f||_!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),un(_==null||_[_.length-1].route.element!==void 0||_[_.length-1].route.Component!==void 0||_[_.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.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 w=xL(_&&_.map(E=>Object.assign({},E,{params:Object.assign({},s,E.params),pathname:Pn([c,n.encodeLocation?n.encodeLocation(E.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?c:Pn([c,n.encodeLocation?n.encodeLocation(E.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),i,r);return e&&w?I.createElement(_l.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...h},navigationType:"POP"}},w):w}function gL(){let t=AL(),e=iL(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,n="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:n},a={padding:"2px 4px",backgroundColor:n},s=null;return console.error("Error handled by React Router default ErrorBoundary:",t),s=I.createElement(I.Fragment,null,I.createElement("p",null,"💿 Hey developer 👋"),I.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",I.createElement("code",{style:a},"ErrorBoundary")," or"," ",I.createElement("code",{style:a},"errorElement")," prop on your route.")),I.createElement(I.Fragment,null,I.createElement("h2",null,"Unexpected Application Error!"),I.createElement("h3",{style:{fontStyle:"italic"}},e),r?I.createElement("pre",{style:i},r):null,s)}var yL=I.createElement(gL,null),yR=class extends I.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.onError?this.props.onError(t,e):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const r=hL(t.digest);r&&(t=r)}let e=t!==void 0?I.createElement(Nn.Provider,{value:this.props.routeContext},I.createElement(ew.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?I.createElement(bL,{error:t},e):e}};yR.contextType=sL;var Zp=new WeakMap;function bL({children:t,error:e}){let{basename:r}=I.useContext(Er);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let n=dL(e.digest);if(n){let i=Zp.get(e);if(i)throw i;let a=cR(n.location,r);if(lR&&!Zp.get(e))if(a.isExternal||n.reloadDocument)window.location.href=a.absoluteURL||a.to;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:n.replace}));throw Zp.set(e,s),s}return I.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return t}function wL({routeContext:t,match:e,children:r}){let n=I.useContext(cs);return n&&n.static&&n.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=e.route.id),I.createElement(Nn.Provider,{value:t},r)}function xL(t,e=[],r){let n=r==null?void 0:r.state;if(t==null){if(!n)return null;if(n.errors)t=n.matches;else if(e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let i=t,a=n==null?void 0:n.errors;if(a!=null){let p=i.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);dt(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),i=i.slice(0,Math.min(i.length,p+1))}let s=!1,l=-1;if(r&&n){s=n.renderFallback;for(let p=0;p<i.length;p++){let h=i[p];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(l=p),h.route.id){let{loaderData:m,errors:g}=n,_=h.route.loader&&!m.hasOwnProperty(h.route.id)&&(!g||g[h.route.id]===void 0);if(h.route.lazy||_){r.isStatic&&(s=!0),l>=0?i=i.slice(0,l+1):i=[i[0]];break}}}}let c=r==null?void 0:r.onError,f=n&&c?(p,h)=>{var m,g;c(p,{location:n.location,params:((g=(m=n.matches)==null?void 0:m[0])==null?void 0:g.params)??{},unstable_pattern:aL(n.matches),errorInfo:h})}:void 0;return i.reduceRight((p,h,m)=>{let g,_=!1,w=null,b=null;n&&(g=a&&h.route.id?a[h.route.id]:void 0,w=h.route.errorElement||yL,s&&(l<0&&m===0?(bR("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),_=!0,b=null):l===m&&(_=!0,b=h.route.hydrateFallbackElement||null)));let E=e.concat(i.slice(0,m+1)),P=()=>{let T;return g?T=w:_?T=b:h.route.Component?T=I.createElement(h.route.Component,null):h.route.element?T=h.route.element:T=p,I.createElement(wL,{match:h,routeContext:{outlet:p,matches:E,isDataRoute:n!=null},children:T})};return n&&(h.route.ErrorBoundary||h.route.errorElement||m===0)?I.createElement(yR,{location:n.location,revalidation:n.revalidation,component:w,error:g,children:P(),routeContext:{outlet:null,matches:E,isDataRoute:!0},onError:f}):P()},null)}function tw(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function SL(t){let e=I.useContext(cs);return dt(e,tw(t)),e}function _L(t){let e=I.useContext(md);return dt(e,tw(t)),e}function EL(t){let e=I.useContext(Nn);return dt(e,tw(t)),e}function rw(t){let e=EL(t),r=e.matches[e.matches.length-1];return dt(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}function OL(){return rw("useRouteId")}function AL(){var n;let t=I.useContext(ew),e=_L("useRouteError"),r=rw("useRouteError");return t!==void 0?t:(n=e.errors)==null?void 0:n[r]}function PL(){let{router:t}=SL("useNavigate"),e=rw("useNavigate"),r=I.useRef(!1);return vR(()=>{r.current=!0}),I.useCallback(async(i,a={})=>{un(r.current,pR),r.current&&(typeof i=="number"?await t.navigate(i):await t.navigate(i,{fromRouteId:e,...a}))},[t,e])}var m_={};function bR(t,e,r){!e&&!m_[t]&&(m_[t]=!0,un(!1,r))}I.memo(TL);function TL({routes:t,future:e,state:r,isStatic:n,onError:i}){return gR(t,void 0,{state:r,isStatic:n,onError:i})}function CL({to:t,replace:e,state:r,relative:n}){dt(fs(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=I.useContext(Er);un(!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:a}=I.useContext(Nn),{pathname:s}=li(),l=mR(),c=vd(t,Jb(a),s,n==="path"),f=JSON.stringify(c);return I.useEffect(()=>{l(JSON.parse(f),{replace:e,state:r,relative:n})},[l,f,n,e,r]),null}function Sn(t){dt(!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 kL({basename:t="/",children:e=null,location:r,navigationType:n="POP",navigator:i,static:a=!1,unstable_useTransitions:s}){dt(!fs(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=t.replace(/^\/*/,"/"),c=I.useMemo(()=>({basename:l,navigator:i,static:a,unstable_useTransitions:s,future:{}}),[l,i,a,s]);typeof r=="string"&&(r=ls(r));let{pathname:f="/",search:p="",hash:h="",state:m=null,key:g="default",unstable_mask:_}=r,w=I.useMemo(()=>{let b=ai(f,l);return b==null?null:{location:{pathname:b,search:p,hash:h,state:m,key:g,unstable_mask:_},navigationType:n}},[l,f,p,h,m,g,n,_]);return un(w!=null,`<Router basename="${l}"> is not able to match the URL "${f}${p}${h}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:I.createElement(Er.Provider,{value:c},I.createElement(_l.Provider,{children:e,value:w}))}function RL({children:t,location:e}){return mL(v0(t),e)}function v0(t,e=[]){let r=[];return I.Children.forEach(t,(n,i)=>{if(!I.isValidElement(n))return;let a=[...e,i];if(n.type===I.Fragment){r.push.apply(r,v0(n.props.children,a));return}dt(n.type===Sn,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),dt(!n.props.index||!n.props.children,"An index route cannot have child routes.");let s={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(s.children=v0(n.props.children,a)),r.push(s)}),r}var hf="get",pf="application/x-www-form-urlencoded";function gd(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function jL(t){return gd(t)&&t.tagName.toLowerCase()==="button"}function NL(t){return gd(t)&&t.tagName.toLowerCase()==="form"}function DL(t){return gd(t)&&t.tagName.toLowerCase()==="input"}function IL(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function ML(t,e){return t.button===0&&(!e||e==="_self")&&!IL(t)}var Wc=null;function LL(){if(Wc===null)try{new FormData(document.createElement("form"),0),Wc=!1}catch{Wc=!0}return Wc}var $L=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Jp(t){return t!=null&&!$L.has(t)?(un(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${pf}"`),null):t}function FL(t,e){let r,n,i,a,s;if(NL(t)){let l=t.getAttribute("action");n=l?ai(l,e):null,r=t.getAttribute("method")||hf,i=Jp(t.getAttribute("enctype"))||pf,a=new FormData(t)}else if(jL(t)||DL(t)&&(t.type==="submit"||t.type==="image")){let l=t.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=t.getAttribute("formaction")||l.getAttribute("action");if(n=c?ai(c,e):null,r=t.getAttribute("formmethod")||l.getAttribute("method")||hf,i=Jp(t.getAttribute("formenctype"))||Jp(l.getAttribute("enctype"))||pf,a=new FormData(l,t),!LL()){let{name:f,type:p,value:h}=t;if(p==="image"){let m=f?`${f}.`:"";a.append(`${m}x`,"0"),a.append(`${m}y`,"0")}else f&&a.append(f,h)}}else{if(gd(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=hf,n=null,i=pf,s=t}return a&&i==="text/plain"&&(s=a,a=void 0),{action:n,method:r.toLowerCase(),encType:i,formData:a,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function nw(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function BL(t,e,r,n){let i=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return r?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${n}`:i.pathname=`${i.pathname}.${n}`:i.pathname==="/"?i.pathname=`_root.${n}`:e&&ai(i.pathname,e)==="/"?i.pathname=`${e.replace(/\/$/,"")}/_root.${n}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${n}`,i}async function zL(t,e){if(t.id in e)return e[t.id];try{let r=await import(t.module);return e[t.id]=r,r}catch(r){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function GL(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function UL(t,e,r){let n=await Promise.all(t.map(async i=>{let a=e.routes[i.route.id];if(a){let s=await zL(a,r);return s.links?s.links():[]}return[]}));return VL(n.flat(1).filter(GL).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function g_(t,e,r,n,i,a){let s=(c,f)=>r[f]?c.route.id!==r[f].route.id:!0,l=(c,f)=>{var p;return r[f].pathname!==c.pathname||((p=r[f].route.path)==null?void 0:p.endsWith("*"))&&r[f].params["*"]!==c.params["*"]};return a==="assets"?e.filter((c,f)=>s(c,f)||l(c,f)):a==="data"?e.filter((c,f)=>{var h;let p=n.routes[c.route.id];if(!p||!p.hasLoader)return!1;if(s(c,f)||l(c,f))return!0;if(c.route.shouldRevalidate){let m=c.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((h=r[0])==null?void 0:h.params)||{},nextUrl:new URL(t,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof m=="boolean")return m}return!0}):[]}function qL(t,e,{includeHydrateFallback:r}={}){return WL(t.map(n=>{let i=e.routes[n.route.id];if(!i)return[];let a=[i.module];return i.clientActionModule&&(a=a.concat(i.clientActionModule)),i.clientLoaderModule&&(a=a.concat(i.clientLoaderModule)),r&&i.hydrateFallbackModule&&(a=a.concat(i.hydrateFallbackModule)),i.imports&&(a=a.concat(i.imports)),a}).flat(1))}function WL(t){return[...new Set(t)]}function HL(t){let e={},r=Object.keys(t).sort();for(let n of r)e[n]=t[n];return e}function VL(t,e){let r=new Set;return new Set(e),t.reduce((n,i)=>{let a=JSON.stringify(HL(i));return r.has(a)||(r.add(a),n.push({key:a,link:i})),n},[])}function wR(){let t=I.useContext(cs);return nw(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function KL(){let t=I.useContext(md);return nw(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var iw=I.createContext(void 0);iw.displayName="FrameworkContext";function xR(){let t=I.useContext(iw);return nw(t,"You must render this element inside a <HydratedRouter> element"),t}function XL(t,e){let r=I.useContext(iw),[n,i]=I.useState(!1),[a,s]=I.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:f,onMouseLeave:p,onTouchStart:h}=e,m=I.useRef(null);I.useEffect(()=>{if(t==="render"&&s(!0),t==="viewport"){let w=E=>{E.forEach(P=>{s(P.isIntersecting)})},b=new IntersectionObserver(w,{threshold:.5});return m.current&&b.observe(m.current),()=>{b.disconnect()}}},[t]),I.useEffect(()=>{if(n){let w=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(w)}}},[n]);let g=()=>{i(!0)},_=()=>{i(!1),s(!1)};return r?t!=="intent"?[a,m,{}]:[a,m,{onFocus:iu(l,g),onBlur:iu(c,_),onMouseEnter:iu(f,g),onMouseLeave:iu(p,_),onTouchStart:iu(h,g)}]:[!1,m,{}]}function iu(t,e){return r=>{t&&t(r),r.defaultPrevented||e(r)}}function YL({page:t,...e}){let{router:r}=wR(),n=I.useMemo(()=>oR(r.routes,t,r.basename),[r.routes,t,r.basename]);return n?I.createElement(ZL,{page:t,matches:n,...e}):null}function QL(t){let{manifest:e,routeModules:r}=xR(),[n,i]=I.useState([]);return I.useEffect(()=>{let a=!1;return UL(t,e,r).then(s=>{a||i(s)}),()=>{a=!0}},[t,e,r]),n}function ZL({page:t,matches:e,...r}){let n=li(),{future:i,manifest:a,routeModules:s}=xR(),{basename:l}=wR(),{loaderData:c,matches:f}=KL(),p=I.useMemo(()=>g_(t,e,f,a,n,"data"),[t,e,f,a,n]),h=I.useMemo(()=>g_(t,e,f,a,n,"assets"),[t,e,f,a,n]),m=I.useMemo(()=>{if(t===n.pathname+n.search+n.hash)return[];let w=new Set,b=!1;if(e.forEach(P=>{var A;let T=a.routes[P.route.id];!T||!T.hasLoader||(!p.some(x=>x.route.id===P.route.id)&&P.route.id in c&&((A=s[P.route.id])!=null&&A.shouldRevalidate)||T.hasClientLoader?b=!0:w.add(P.route.id))}),w.size===0)return[];let E=BL(t,l,i.unstable_trailingSlashAwareDataRequests,"data");return b&&w.size>0&&E.searchParams.set("_routes",e.filter(P=>w.has(P.route.id)).map(P=>P.route.id).join(",")),[E.pathname+E.search]},[l,i.unstable_trailingSlashAwareDataRequests,c,n,a,p,e,t,s]),g=I.useMemo(()=>qL(h,a),[h,a]),_=QL(h);return I.createElement(I.Fragment,null,m.map(w=>I.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...r})),g.map(w=>I.createElement("link",{key:w,rel:"modulepreload",href:w,...r})),_.map(({key:w,link:b})=>I.createElement("link",{key:w,nonce:r.nonce,...b,crossOrigin:b.crossOrigin??r.crossOrigin})))}function JL(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})}}var e$=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{e$&&(window.__reactRouterVersion="7.13.1")}catch{}function t$({basename:t,children:e,unstable_useTransitions:r,window:n}){let i=I.useRef();i.current==null&&(i.current=DM({window:n,v5Compat:!0}));let a=i.current,[s,l]=I.useState({action:a.action,location:a.location}),c=I.useCallback(f=>{r===!1?l(f):I.startTransition(()=>l(f))},[r]);return I.useLayoutEffect(()=>a.listen(c),[a,c]),I.createElement(kL,{basename:t,children:e,location:s.location,navigationType:s.action,navigator:a,unstable_useTransitions:r})}var SR=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_R=I.forwardRef(function({onClick:e,discover:r="render",prefetch:n="none",relative:i,reloadDocument:a,replace:s,unstable_mask:l,state:c,target:f,to:p,preventScrollReset:h,viewTransition:m,unstable_defaultShouldRevalidate:g,..._},w){let{basename:b,navigator:E,unstable_useTransitions:P}=I.useContext(Er),T=typeof p=="string"&&SR.test(p),A=cR(p,b);p=A.to;let x=pL(p,{relative:i}),O=li(),C=null;if(l){let K=vd(l,[],O.unstable_mask?O.unstable_mask.pathname:"/",!0);b!=="/"&&(K.pathname=K.pathname==="/"?b:Pn([b,K.pathname])),C=E.createHref(K)}let[N,D,B]=XL(n,_),U=i$(p,{replace:s,unstable_mask:l,state:c,target:f,preventScrollReset:h,relative:i,viewTransition:m,unstable_defaultShouldRevalidate:g,unstable_useTransitions:P});function L(K){e&&e(K),K.defaultPrevented||U(K)}let j=!(A.isExternal||a),X=I.createElement("a",{..._,...B,href:(j?C:void 0)||A.absoluteURL||x,onClick:j?L:e,ref:JL(w,D),target:f,"data-discover":!T&&r==="render"?"true":void 0});return N&&!T?I.createElement(I.Fragment,null,X,I.createElement(YL,{page:x})):X});_R.displayName="Link";var ER=I.forwardRef(function({"aria-current":e="page",caseSensitive:r=!1,className:n="",end:i=!1,style:a,to:s,viewTransition:l,children:c,...f},p){let h=El(s,{relative:f.relative}),m=li(),g=I.useContext(md),{navigator:_,basename:w}=I.useContext(Er),b=g!=null&&l$(h)&&l===!0,E=_.encodeLocation?_.encodeLocation(h).pathname:h.pathname,P=m.pathname,T=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;r||(P=P.toLowerCase(),T=T?T.toLowerCase():null,E=E.toLowerCase()),T&&w&&(T=ai(T,w)||T);const A=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let x=P===E||!i&&P.startsWith(E)&&P.charAt(A)==="/",O=T!=null&&(T===E||!i&&T.startsWith(E)&&T.charAt(E.length)==="/"),C={isActive:x,isPending:O,isTransitioning:b},N=x?e:void 0,D;typeof n=="function"?D=n(C):D=[n,x?"active":null,O?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let B=typeof a=="function"?a(C):a;return I.createElement(_R,{...f,"aria-current":N,className:D,ref:p,style:B,to:s,viewTransition:l},typeof c=="function"?c(C):c)});ER.displayName="NavLink";var r$=I.forwardRef(({discover:t="render",fetcherKey:e,navigate:r,reloadDocument:n,replace:i,state:a,method:s=hf,action:l,onSubmit:c,relative:f,preventScrollReset:p,viewTransition:h,unstable_defaultShouldRevalidate:m,...g},_)=>{let{unstable_useTransitions:w}=I.useContext(Er),b=s$(),E=u$(l,{relative:f}),P=s.toLowerCase()==="get"?"get":"post",T=typeof l=="string"&&SR.test(l),A=x=>{if(c&&c(x),x.defaultPrevented)return;x.preventDefault();let O=x.nativeEvent.submitter,C=(O==null?void 0:O.getAttribute("formmethod"))||s,N=()=>b(O||x.currentTarget,{fetcherKey:e,method:C,navigate:r,replace:i,state:a,relative:f,preventScrollReset:p,viewTransition:h,unstable_defaultShouldRevalidate:m});w&&r!==!1?I.startTransition(()=>N()):N()};return I.createElement("form",{ref:_,method:P,action:E,onSubmit:n?c:A,...g,"data-discover":!T&&t==="render"?"true":void 0})});r$.displayName="Form";function n$(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function OR(t){let e=I.useContext(cs);return dt(e,n$(t)),e}function i$(t,{target:e,replace:r,unstable_mask:n,state:i,preventScrollReset:a,relative:s,viewTransition:l,unstable_defaultShouldRevalidate:c,unstable_useTransitions:f}={}){let p=mR(),h=li(),m=El(t,{relative:s});return I.useCallback(g=>{if(ML(g,e)){g.preventDefault();let _=r!==void 0?r:Ru(h)===Ru(m),w=()=>p(t,{replace:_,unstable_mask:n,state:i,preventScrollReset:a,relative:s,viewTransition:l,unstable_defaultShouldRevalidate:c});f?I.startTransition(()=>w()):w()}},[h,p,m,r,n,i,e,t,a,s,l,c,f])}var a$=0,o$=()=>`__${String(++a$)}__`;function s$(){let{router:t}=OR("useSubmit"),{basename:e}=I.useContext(Er),r=OL(),n=t.fetch,i=t.navigate;return I.useCallback(async(a,s={})=>{let{action:l,method:c,encType:f,formData:p,body:h}=FL(a,e);if(s.navigate===!1){let m=s.fetcherKey||o$();await n(m,r,s.action||l,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:p,body:h,formMethod:s.method||c,formEncType:s.encType||f,flushSync:s.flushSync})}else await i(s.action||l,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:p,body:h,formMethod:s.method||c,formEncType:s.encType||f,replace:s.replace,state:s.state,fromRouteId:r,flushSync:s.flushSync,viewTransition:s.viewTransition})},[n,i,e,r])}function u$(t,{relative:e}={}){let{basename:r}=I.useContext(Er),n=I.useContext(Nn);dt(n,"useFormAction must be used inside a RouteContext");let[i]=n.matches.slice(-1),a={...El(t||".",{relative:e})},s=li();if(t==null){a.search=s.search;let l=new URLSearchParams(a.search),c=l.getAll("index");if(c.some(p=>p==="")){l.delete("index"),c.filter(h=>h).forEach(h=>l.append("index",h));let p=l.toString();a.search=p?`?${p}`:""}}return(!t||t===".")&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(a.pathname=a.pathname==="/"?r:Pn([r,a.pathname])),Ru(a)}function l$(t,{relative:e}={}){let r=I.useContext(dR);dt(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=OR("useViewTransitionState"),i=El(t,{relative:e});if(!r.isTransitioning)return!1;let a=ai(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=ai(r.nextLocation.pathname,n)||r.nextLocation.pathname;return mf(i.pathname,s)!=null||mf(i.pathname,a)!=null}var Ol=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},_a,Mi,To,Yk,c$=(Yk=class extends Ol{constructor(){super();Re(this,_a);Re(this,Mi);Re(this,To);Se(this,To,e=>{if(typeof window<"u"&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){q(this,Mi)||this.setEventListener(q(this,To))}onUnsubscribe(){var e;this.hasListeners()||((e=q(this,Mi))==null||e.call(this),Se(this,Mi,void 0))}setEventListener(e){var r;Se(this,To,e),(r=q(this,Mi))==null||r.call(this),Se(this,Mi,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){q(this,_a)!==e&&(Se(this,_a,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(r=>{r(e)})}isFocused(){var e;return typeof q(this,_a)=="boolean"?q(this,_a):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},_a=new WeakMap,Mi=new WeakMap,To=new WeakMap,Yk),aw=new c$,f$={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},Li,Qb,Qk,d$=(Qk=class{constructor(){Re(this,Li,f$);Re(this,Qb,!1)}setTimeoutProvider(t){Se(this,Li,t)}setTimeout(t,e){return q(this,Li).setTimeout(t,e)}clearTimeout(t){q(this,Li).clearTimeout(t)}setInterval(t,e){return q(this,Li).setInterval(t,e)}clearInterval(t){q(this,Li).clearInterval(t)}},Li=new WeakMap,Qb=new WeakMap,Qk),ya=new d$;function h$(t){setTimeout(t,0)}var p$=typeof window>"u"||"Deno"in globalThis;function hr(){}function v$(t,e){return typeof t=="function"?t(e):t}function m0(t){return typeof t=="number"&&t>=0&&t!==1/0}function AR(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Wi(t,e){return typeof t=="function"?t(e):t}function Mr(t,e){return typeof t=="function"?t(e):t}function y_(t,e){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:s,stale:l}=t;if(s){if(n){if(e.queryHash!==ow(s,e.options))return!1}else if(!Nu(e.queryKey,s))return!1}if(r!=="all"){const c=e.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof l=="boolean"&&e.isStale()!==l||i&&i!==e.state.fetchStatus||a&&!a(e))}function b_(t,e){const{exact:r,status:n,predicate:i,mutationKey:a}=t;if(a){if(!e.options.mutationKey)return!1;if(r){if(ju(e.options.mutationKey)!==ju(a))return!1}else if(!Nu(e.options.mutationKey,a))return!1}return!(n&&e.state.status!==n||i&&!i(e))}function ow(t,e){return((e==null?void 0:e.queryKeyHashFn)||ju)(t)}function ju(t){return JSON.stringify(t,(e,r)=>y0(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Nu(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(r=>Nu(t[r],e[r])):!1}var m$=Object.prototype.hasOwnProperty;function PR(t,e,r=0){if(t===e)return t;if(r>500)return e;const n=w_(t)&&w_(e);if(!n&&!(y0(t)&&y0(e)))return e;const a=(n?t:Object.keys(t)).length,s=n?e:Object.keys(e),l=s.length,c=n?new Array(l):{};let f=0;for(let p=0;p<l;p++){const h=n?p:s[p],m=t[h],g=e[h];if(m===g){c[h]=m,(n?p<a:m$.call(t,h))&&f++;continue}if(m===null||g===null||typeof m!="object"||typeof g!="object"){c[h]=g;continue}const _=PR(m,g,r+1);c[h]=_,_===m&&f++}return a===l&&f===a?t:c}function g0(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const r in t)if(t[r]!==e[r])return!1;return!0}function w_(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function y0(t){if(!x_(t))return!1;const e=t.constructor;if(e===void 0)return!0;const r=e.prototype;return!(!x_(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function x_(t){return Object.prototype.toString.call(t)==="[object Object]"}function g$(t){return new Promise(e=>{ya.setTimeout(e,t)})}function b0(t,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?PR(t,e):e}function y$(t,e,r=0){const n=[...t,e];return r&&n.length>r?n.slice(1):n}function b$(t,e,r=0){const n=[e,...t];return r&&n.length>r?n.slice(0,-1):n}var sw=Symbol();function TR(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===sw?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function CR(t,e){return typeof t=="function"?t(...e):!!t}function w$(t,e,r){let n=!1,i;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(i??(i=e()),n||(n=!0,i.aborted?r():i.addEventListener("abort",r,{once:!0})),i)}),t}var Du=(()=>{let t=()=>p$;return{isServer(){return t()},setIsServer(e){t=e}}})();function w0(){let t,e;const r=new Promise((i,a)=>{t=i,e=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),t(i)},r.reject=i=>{n({status:"rejected",reason:i}),e(i)},r}var x$=h$;function S$(){let t=[],e=0,r=l=>{l()},n=l=>{l()},i=x$;const a=l=>{e?t.push(l):i(()=>{r(l)})},s=()=>{const l=t;t=[],l.length&&i(()=>{n(()=>{l.forEach(c=>{r(c)})})})};return{batch:l=>{let c;e++;try{c=l()}finally{e--,e||s()}return c},batchCalls:l=>(...c)=>{a(()=>{l(...c)})},schedule:a,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{i=l}}}var qt=S$(),Co,$i,ko,Zk,_$=(Zk=class extends Ol{constructor(){super();Re(this,Co,!0);Re(this,$i);Re(this,ko);Se(this,ko,e=>{if(typeof window<"u"&&window.addEventListener){const r=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){q(this,$i)||this.setEventListener(q(this,ko))}onUnsubscribe(){var e;this.hasListeners()||((e=q(this,$i))==null||e.call(this),Se(this,$i,void 0))}setEventListener(e){var r;Se(this,ko,e),(r=q(this,$i))==null||r.call(this),Se(this,$i,e(this.setOnline.bind(this)))}setOnline(e){q(this,Co)!==e&&(Se(this,Co,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return q(this,Co)}},Co=new WeakMap,$i=new WeakMap,ko=new WeakMap,Zk),gf=new _$;function E$(t){return Math.min(1e3*2**t,3e4)}function kR(t){return(t??"online")==="online"?gf.isOnline():!0}var x0=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function RR(t){let e=!1,r=0,n;const i=w0(),a=()=>i.status!=="pending",s=w=>{var b;if(!a()){const E=new x0(w);m(E),(b=t.onCancel)==null||b.call(t,E)}},l=()=>{e=!0},c=()=>{e=!1},f=()=>aw.isFocused()&&(t.networkMode==="always"||gf.isOnline())&&t.canRun(),p=()=>kR(t.networkMode)&&t.canRun(),h=w=>{a()||(n==null||n(),i.resolve(w))},m=w=>{a()||(n==null||n(),i.reject(w))},g=()=>new Promise(w=>{var b;n=E=>{(a()||f())&&w(E)},(b=t.onPause)==null||b.call(t)}).then(()=>{var w;n=void 0,a()||(w=t.onContinue)==null||w.call(t)}),_=()=>{if(a())return;let w;const b=r===0?t.initialPromise:void 0;try{w=b??t.fn()}catch(E){w=Promise.reject(E)}Promise.resolve(w).then(h).catch(E=>{var O;if(a())return;const P=t.retry??(Du.isServer()?0:3),T=t.retryDelay??E$,A=typeof T=="function"?T(r,E):T,x=P===!0||typeof P=="number"&&r<P||typeof P=="function"&&P(r,E);if(e||!x){m(E);return}r++,(O=t.onFail)==null||O.call(t,r,E),g$(A).then(()=>f()?void 0:g()).then(()=>{e?m(E):_()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(n==null||n(),i),cancelRetry:l,continueRetry:c,canStart:p,start:()=>(p()?_():g().then(_),i)}}var Ea,Jk,jR=(Jk=class{constructor(){Re(this,Ea)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),m0(this.gcTime)&&Se(this,Ea,ya.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Du.isServer()?1/0:300*1e3))}clearGcTimeout(){q(this,Ea)&&(ya.clearTimeout(q(this,Ea)),Se(this,Ea,void 0))}},Ea=new WeakMap,Jk),Oa,Ro,Ir,Aa,Mt,yl,Pa,Sr,NR,Kn,eR,O$=(eR=class extends jR{constructor(e){super();Re(this,Sr);Re(this,Oa);Re(this,Ro);Re(this,Ir);Re(this,Aa);Re(this,Mt);Re(this,yl);Re(this,Pa);Se(this,Pa,!1),Se(this,yl,e.defaultOptions),this.setOptions(e.options),this.observers=[],Se(this,Aa,e.client),Se(this,Ir,q(this,Aa).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Se(this,Oa,__(this.options)),this.state=e.state??q(this,Oa),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=q(this,Mt))==null?void 0:e.promise}setOptions(e){if(this.options={...q(this,yl),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=__(this.options);r.data!==void 0&&(this.setState(S_(r.data,r.dataUpdatedAt)),Se(this,Oa,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&q(this,Ir).remove(this)}setData(e,r){const n=b0(this.state.data,e,this.options);return Be(this,Sr,Kn).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){Be(this,Sr,Kn).call(this,{type:"setState",state:e,setStateOptions:r})}cancel(e){var n,i;const r=(n=q(this,Mt))==null?void 0:n.promise;return(i=q(this,Mt))==null||i.cancel(e),r?r.then(hr).catch(hr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return q(this,Oa)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Mr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===sw||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Wi(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!AR(this.state.dataUpdatedAt,e)}onFocus(){var r;const e=this.observers.find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(r=q(this,Mt))==null||r.continue()}onOnline(){var r;const e=this.observers.find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(r=q(this,Mt))==null||r.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),q(this,Ir).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(q(this,Mt)&&(q(this,Pa)||Be(this,Sr,NR).call(this)?q(this,Mt).cancel({revert:!0}):q(this,Mt).cancelRetry()),this.scheduleGc()),q(this,Ir).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Be(this,Sr,Kn).call(this,{type:"invalidate"})}async fetch(e,r){var c,f,p,h,m,g,_,w,b,E,P,T;if(this.state.fetchStatus!=="idle"&&((c=q(this,Mt))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(q(this,Mt))return q(this,Mt).continueRetry(),q(this,Mt).promise}if(e&&this.setOptions(e),!this.options.queryFn){const A=this.observers.find(x=>x.options.queryFn);A&&this.setOptions(A.options)}const n=new AbortController,i=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(Se(this,Pa,!0),n.signal)})},a=()=>{const A=TR(this.options,r),O=(()=>{const C={client:q(this,Aa),queryKey:this.queryKey,meta:this.meta};return i(C),C})();return Se(this,Pa,!1),this.options.persister?this.options.persister(A,O,this):A(O)},l=(()=>{const A={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:q(this,Aa),state:this.state,fetchFn:a};return i(A),A})();(f=this.options.behavior)==null||f.onFetch(l,this),Se(this,Ro,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=l.fetchOptions)==null?void 0:p.meta))&&Be(this,Sr,Kn).call(this,{type:"fetch",meta:(h=l.fetchOptions)==null?void 0:h.meta}),Se(this,Mt,RR({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,onCancel:A=>{A instanceof x0&&A.revert&&this.setState({...q(this,Ro),fetchStatus:"idle"}),n.abort()},onFail:(A,x)=>{Be(this,Sr,Kn).call(this,{type:"failed",failureCount:A,error:x})},onPause:()=>{Be(this,Sr,Kn).call(this,{type:"pause"})},onContinue:()=>{Be(this,Sr,Kn).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const A=await q(this,Mt).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(g=(m=q(this,Ir).config).onSuccess)==null||g.call(m,A,this),(w=(_=q(this,Ir).config).onSettled)==null||w.call(_,A,this.state.error,this),A}catch(A){if(A instanceof x0){if(A.silent)return q(this,Mt).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw Be(this,Sr,Kn).call(this,{type:"error",error:A}),(E=(b=q(this,Ir).config).onError)==null||E.call(b,A,this),(T=(P=q(this,Ir).config).onSettled)==null||T.call(P,this.state.data,A,this),A}finally{this.scheduleGc()}}},Oa=new WeakMap,Ro=new WeakMap,Ir=new WeakMap,Aa=new WeakMap,Mt=new WeakMap,yl=new WeakMap,Pa=new WeakMap,Sr=new WeakSet,NR=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Kn=function(e){const r=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...DR(n.data,this.options),fetchMeta:e.meta??null};case"success":const i={...n,...S_(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Se(this,Ro,e.manual?i:void 0),i;case"error":const a=e.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=r(this.state),qt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),q(this,Ir).notify({query:this,type:"updated",action:e})})},eR);function DR(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:kR(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function S_(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function __(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=e!==void 0,n=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var dr,ze,bl,ir,Ta,jo,Yn,Fi,wl,No,Do,Ca,ka,Bi,Io,Ze,xu,S0,_0,E0,O0,A0,P0,T0,IR,tR,A$=(tR=class extends Ol{constructor(e,r){super();Re(this,Ze);Re(this,dr);Re(this,ze);Re(this,bl);Re(this,ir);Re(this,Ta);Re(this,jo);Re(this,Yn);Re(this,Fi);Re(this,wl);Re(this,No);Re(this,Do);Re(this,Ca);Re(this,ka);Re(this,Bi);Re(this,Io,new Set);this.options=r,Se(this,dr,e),Se(this,Fi,null),Se(this,Yn,w0()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(q(this,ze).addObserver(this),E_(q(this,ze),this.options)?Be(this,Ze,xu).call(this):this.updateResult(),Be(this,Ze,O0).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return C0(q(this,ze),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return C0(q(this,ze),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Be(this,Ze,A0).call(this),Be(this,Ze,P0).call(this),q(this,ze).removeObserver(this)}setOptions(e){const r=this.options,n=q(this,ze);if(this.options=q(this,dr).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Mr(this.options.enabled,q(this,ze))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Be(this,Ze,T0).call(this),q(this,ze).setOptions(this.options),r._defaulted&&!g0(this.options,r)&&q(this,dr).getQueryCache().notify({type:"observerOptionsUpdated",query:q(this,ze),observer:this});const i=this.hasListeners();i&&O_(q(this,ze),n,this.options,r)&&Be(this,Ze,xu).call(this),this.updateResult(),i&&(q(this,ze)!==n||Mr(this.options.enabled,q(this,ze))!==Mr(r.enabled,q(this,ze))||Wi(this.options.staleTime,q(this,ze))!==Wi(r.staleTime,q(this,ze)))&&Be(this,Ze,S0).call(this);const a=Be(this,Ze,_0).call(this);i&&(q(this,ze)!==n||Mr(this.options.enabled,q(this,ze))!==Mr(r.enabled,q(this,ze))||a!==q(this,Bi))&&Be(this,Ze,E0).call(this,a)}getOptimisticResult(e){const r=q(this,dr).getQueryCache().build(q(this,dr),e),n=this.createResult(r,e);return T$(this,n)&&(Se(this,ir,n),Se(this,jo,this.options),Se(this,Ta,q(this,ze).state)),n}getCurrentResult(){return q(this,ir)}trackResult(e,r){return new Proxy(e,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&q(this,Yn).status==="pending"&&q(this,Yn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(e){q(this,Io).add(e)}getCurrentQuery(){return q(this,ze)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const r=q(this,dr).defaultQueryOptions(e),n=q(this,dr).getQueryCache().build(q(this,dr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(e){return Be(this,Ze,xu).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),q(this,ir)))}createResult(e,r){var D;const n=q(this,ze),i=this.options,a=q(this,ir),s=q(this,Ta),l=q(this,jo),f=e!==n?e.state:q(this,bl),{state:p}=e;let h={...p},m=!1,g;if(r._optimisticResults){const B=this.hasListeners(),U=!B&&E_(e,r),L=B&&O_(e,n,r,i);(U||L)&&(h={...h,...DR(p.data,e.options)}),r._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:_,errorUpdatedAt:w,status:b}=h;g=h.data;let E=!1;if(r.placeholderData!==void 0&&g===void 0&&b==="pending"){let B;a!=null&&a.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData)?(B=a.data,E=!0):B=typeof r.placeholderData=="function"?r.placeholderData((D=q(this,Do))==null?void 0:D.state.data,q(this,Do)):r.placeholderData,B!==void 0&&(b="success",g=b0(a==null?void 0:a.data,B,r),m=!0)}if(r.select&&g!==void 0&&!E)if(a&&g===(s==null?void 0:s.data)&&r.select===q(this,wl))g=q(this,No);else try{Se(this,wl,r.select),g=r.select(g),g=b0(a==null?void 0:a.data,g,r),Se(this,No,g),Se(this,Fi,null)}catch(B){Se(this,Fi,B)}q(this,Fi)&&(_=q(this,Fi),g=q(this,No),w=Date.now(),b="error");const P=h.fetchStatus==="fetching",T=b==="pending",A=b==="error",x=T&&P,O=g!==void 0,N={status:b,fetchStatus:h.fetchStatus,isPending:T,isSuccess:b==="success",isError:A,isInitialLoading:x,isLoading:x,data:g,dataUpdatedAt:h.dataUpdatedAt,error:_,errorUpdatedAt:w,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:h.dataUpdateCount>f.dataUpdateCount||h.errorUpdateCount>f.errorUpdateCount,isFetching:P,isRefetching:P&&!T,isLoadingError:A&&!O,isPaused:h.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:A&&O,isStale:uw(e,r),refetch:this.refetch,promise:q(this,Yn),isEnabled:Mr(r.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const B=N.data!==void 0,U=N.status==="error"&&!B,L=K=>{U?K.reject(N.error):B&&K.resolve(N.data)},j=()=>{const K=Se(this,Yn,N.promise=w0());L(K)},X=q(this,Yn);switch(X.status){case"pending":e.queryHash===n.queryHash&&L(X);break;case"fulfilled":(U||N.data!==X.value)&&j();break;case"rejected":(!U||N.error!==X.reason)&&j();break}}return N}updateResult(){const e=q(this,ir),r=this.createResult(q(this,ze),this.options);if(Se(this,Ta,q(this,ze).state),Se(this,jo,this.options),q(this,Ta).data!==void 0&&Se(this,Do,q(this,ze)),g0(r,e))return;Se(this,ir,r);const n=()=>{if(!e)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!q(this,Io).size)return!0;const s=new Set(a??q(this,Io));return this.options.throwOnError&&s.add("error"),Object.keys(q(this,ir)).some(l=>{const c=l;return q(this,ir)[c]!==e[c]&&s.has(c)})};Be(this,Ze,IR).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Be(this,Ze,O0).call(this)}},dr=new WeakMap,ze=new WeakMap,bl=new WeakMap,ir=new WeakMap,Ta=new WeakMap,jo=new WeakMap,Yn=new WeakMap,Fi=new WeakMap,wl=new WeakMap,No=new WeakMap,Do=new WeakMap,Ca=new WeakMap,ka=new WeakMap,Bi=new WeakMap,Io=new WeakMap,Ze=new WeakSet,xu=function(e){Be(this,Ze,T0).call(this);let r=q(this,ze).fetch(this.options,e);return e!=null&&e.throwOnError||(r=r.catch(hr)),r},S0=function(){Be(this,Ze,A0).call(this);const e=Wi(this.options.staleTime,q(this,ze));if(Du.isServer()||q(this,ir).isStale||!m0(e))return;const n=AR(q(this,ir).dataUpdatedAt,e)+1;Se(this,Ca,ya.setTimeout(()=>{q(this,ir).isStale||this.updateResult()},n))},_0=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(q(this,ze)):this.options.refetchInterval)??!1},E0=function(e){Be(this,Ze,P0).call(this),Se(this,Bi,e),!(Du.isServer()||Mr(this.options.enabled,q(this,ze))===!1||!m0(q(this,Bi))||q(this,Bi)===0)&&Se(this,ka,ya.setInterval(()=>{(this.options.refetchIntervalInBackground||aw.isFocused())&&Be(this,Ze,xu).call(this)},q(this,Bi)))},O0=function(){Be(this,Ze,S0).call(this),Be(this,Ze,E0).call(this,Be(this,Ze,_0).call(this))},A0=function(){q(this,Ca)&&(ya.clearTimeout(q(this,Ca)),Se(this,Ca,void 0))},P0=function(){q(this,ka)&&(ya.clearInterval(q(this,ka)),Se(this,ka,void 0))},T0=function(){const e=q(this,dr).getQueryCache().build(q(this,dr),this.options);if(e===q(this,ze))return;const r=q(this,ze);Se(this,ze,e),Se(this,bl,e.state),this.hasListeners()&&(r==null||r.removeObserver(this),e.addObserver(this))},IR=function(e){qt.batch(()=>{e.listeners&&this.listeners.forEach(r=>{r(q(this,ir))}),q(this,dr).getQueryCache().notify({query:q(this,ze),type:"observerResultsUpdated"})})},tR);function P$(t,e){return Mr(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function E_(t,e){return P$(t,e)||t.state.data!==void 0&&C0(t,e,e.refetchOnMount)}function C0(t,e,r){if(Mr(e.enabled,t)!==!1&&Wi(e.staleTime,t)!=="static"){const n=typeof r=="function"?r(t):r;return n==="always"||n!==!1&&uw(t,e)}return!1}function O_(t,e,r,n){return(t!==e||Mr(n.enabled,t)===!1)&&(!r.suspense||t.state.status!=="error")&&uw(t,r)}function uw(t,e){return Mr(e.enabled,t)!==!1&&t.isStaleByTime(Wi(e.staleTime,t))}function T$(t,e){return!g0(t.getCurrentResult(),e)}function A_(t){return{onFetch:(e,r)=>{var p,h,m,g,_;const n=e.options,i=(m=(h=(p=e.fetchOptions)==null?void 0:p.meta)==null?void 0:h.fetchMore)==null?void 0:m.direction,a=((g=e.state.data)==null?void 0:g.pages)||[],s=((_=e.state.data)==null?void 0:_.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const f=async()=>{let w=!1;const b=T=>{w$(T,()=>e.signal,()=>w=!0)},E=TR(e.options,e.fetchOptions),P=async(T,A,x)=>{if(w)return Promise.reject();if(A==null&&T.pages.length)return Promise.resolve(T);const C=(()=>{const U={client:e.client,queryKey:e.queryKey,pageParam:A,direction:x?"backward":"forward",meta:e.options.meta};return b(U),U})(),N=await E(C),{maxPages:D}=e.options,B=x?b$:y$;return{pages:B(T.pages,N,D),pageParams:B(T.pageParams,A,D)}};if(i&&a.length){const T=i==="backward",A=T?C$:P_,x={pages:a,pageParams:s},O=A(n,x);l=await P(x,O,T)}else{const T=t??a.length;do{const A=c===0?s[0]??n.initialPageParam:P_(n,l);if(c>0&&A==null)break;l=await P(l,A),c++}while(c<T)}return l};e.options.persister?e.fetchFn=()=>{var w,b;return(b=(w=e.options).persister)==null?void 0:b.call(w,f,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r)}:e.fetchFn=f}}}function P_(t,{pages:e,pageParams:r}){const n=e.length-1;return e.length>0?t.getNextPageParam(e[n],e,r[n],r):void 0}function C$(t,{pages:e,pageParams:r}){var n;return e.length>0?(n=t.getPreviousPageParam)==null?void 0:n.call(t,e[0],e,r[0],r):void 0}var xl,_n,Qt,Ra,En,Di,rR,k$=(rR=class extends jR{constructor(e){super();Re(this,En);Re(this,xl);Re(this,_n);Re(this,Qt);Re(this,Ra);Se(this,xl,e.client),this.mutationId=e.mutationId,Se(this,Qt,e.mutationCache),Se(this,_n,[]),this.state=e.state||R$(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){q(this,_n).includes(e)||(q(this,_n).push(e),this.clearGcTimeout(),q(this,Qt).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Se(this,_n,q(this,_n).filter(r=>r!==e)),this.scheduleGc(),q(this,Qt).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){q(this,_n).length||(this.state.status==="pending"?this.scheduleGc():q(this,Qt).remove(this))}continue(){var e;return((e=q(this,Ra))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var s,l,c,f,p,h,m,g,_,w,b,E,P,T,A,x,O,C;const r=()=>{Be(this,En,Di).call(this,{type:"continue"})},n={client:q(this,xl),meta:this.options.meta,mutationKey:this.options.mutationKey};Se(this,Ra,RR({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(N,D)=>{Be(this,En,Di).call(this,{type:"failed",failureCount:N,error:D})},onPause:()=>{Be(this,En,Di).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>q(this,Qt).canRun(this)}));const i=this.state.status==="pending",a=!q(this,Ra).canStart();try{if(i)r();else{Be(this,En,Di).call(this,{type:"pending",variables:e,isPaused:a}),q(this,Qt).config.onMutate&&await q(this,Qt).config.onMutate(e,this,n);const D=await((l=(s=this.options).onMutate)==null?void 0:l.call(s,e,n));D!==this.state.context&&Be(this,En,Di).call(this,{type:"pending",context:D,variables:e,isPaused:a})}const N=await q(this,Ra).start();return await((f=(c=q(this,Qt).config).onSuccess)==null?void 0:f.call(c,N,e,this.state.context,this,n)),await((h=(p=this.options).onSuccess)==null?void 0:h.call(p,N,e,this.state.context,n)),await((g=(m=q(this,Qt).config).onSettled)==null?void 0:g.call(m,N,null,this.state.variables,this.state.context,this,n)),await((w=(_=this.options).onSettled)==null?void 0:w.call(_,N,null,e,this.state.context,n)),Be(this,En,Di).call(this,{type:"success",data:N}),N}catch(N){try{await((E=(b=q(this,Qt).config).onError)==null?void 0:E.call(b,N,e,this.state.context,this,n))}catch(D){Promise.reject(D)}try{await((T=(P=this.options).onError)==null?void 0:T.call(P,N,e,this.state.context,n))}catch(D){Promise.reject(D)}try{await((x=(A=q(this,Qt).config).onSettled)==null?void 0:x.call(A,void 0,N,this.state.variables,this.state.context,this,n))}catch(D){Promise.reject(D)}try{await((C=(O=this.options).onSettled)==null?void 0:C.call(O,void 0,N,e,this.state.context,n))}catch(D){Promise.reject(D)}throw Be(this,En,Di).call(this,{type:"error",error:N}),N}finally{q(this,Qt).runNext(this)}}},xl=new WeakMap,_n=new WeakMap,Qt=new WeakMap,Ra=new WeakMap,En=new WeakSet,Di=function(e){const r=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=r(this.state),qt.batch(()=>{q(this,_n).forEach(n=>{n.onMutationUpdate(e)}),q(this,Qt).notify({mutation:this,type:"updated",action:e})})},rR);function R$(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Qn,en,Sl,nR,j$=(nR=class extends Ol{constructor(e={}){super();Re(this,Qn);Re(this,en);Re(this,Sl);this.config=e,Se(this,Qn,new Set),Se(this,en,new Map),Se(this,Sl,0)}build(e,r,n){const i=new k$({client:e,mutationCache:this,mutationId:++Gc(this,Sl)._,options:e.defaultMutationOptions(r),state:n});return this.add(i),i}add(e){q(this,Qn).add(e);const r=Hc(e);if(typeof r=="string"){const n=q(this,en).get(r);n?n.push(e):q(this,en).set(r,[e])}this.notify({type:"added",mutation:e})}remove(e){if(q(this,Qn).delete(e)){const r=Hc(e);if(typeof r=="string"){const n=q(this,en).get(r);if(n)if(n.length>1){const i=n.indexOf(e);i!==-1&&n.splice(i,1)}else n[0]===e&&q(this,en).delete(r)}}this.notify({type:"removed",mutation:e})}canRun(e){const r=Hc(e);if(typeof r=="string"){const n=q(this,en).get(r),i=n==null?void 0:n.find(a=>a.state.status==="pending");return!i||i===e}else return!0}runNext(e){var n;const r=Hc(e);if(typeof r=="string"){const i=(n=q(this,en).get(r))==null?void 0:n.find(a=>a!==e&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){qt.batch(()=>{q(this,Qn).forEach(e=>{this.notify({type:"removed",mutation:e})}),q(this,Qn).clear(),q(this,en).clear()})}getAll(){return Array.from(q(this,Qn))}find(e){const r={exact:!0,...e};return this.getAll().find(n=>b_(r,n))}findAll(e={}){return this.getAll().filter(r=>b_(e,r))}notify(e){qt.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.getAll().filter(r=>r.state.isPaused);return qt.batch(()=>Promise.all(e.map(r=>r.continue().catch(hr))))}},Qn=new WeakMap,en=new WeakMap,Sl=new WeakMap,nR);function Hc(t){var e;return(e=t.options.scope)==null?void 0:e.id}var On,iR,N$=(iR=class extends Ol{constructor(e={}){super();Re(this,On);this.config=e,Se(this,On,new Map)}build(e,r,n){const i=r.queryKey,a=r.queryHash??ow(i,r);let s=this.get(a);return s||(s=new O$({client:e,queryKey:i,queryHash:a,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(s)),s}add(e){q(this,On).has(e.queryHash)||(q(this,On).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const r=q(this,On).get(e.queryHash);r&&(e.destroy(),r===e&&q(this,On).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){qt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return q(this,On).get(e)}getAll(){return[...q(this,On).values()]}find(e){const r={exact:!0,...e};return this.getAll().find(n=>y_(r,n))}findAll(e={}){const r=this.getAll();return Object.keys(e).length>0?r.filter(n=>y_(e,n)):r}notify(e){qt.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){qt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){qt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},On=new WeakMap,iR),mt,zi,Gi,Mo,Lo,Ui,$o,Fo,aR,D$=(aR=class{constructor(t={}){Re(this,mt);Re(this,zi);Re(this,Gi);Re(this,Mo);Re(this,Lo);Re(this,Ui);Re(this,$o);Re(this,Fo);Se(this,mt,t.queryCache||new N$),Se(this,zi,t.mutationCache||new j$),Se(this,Gi,t.defaultOptions||{}),Se(this,Mo,new Map),Se(this,Lo,new Map),Se(this,Ui,0)}mount(){Gc(this,Ui)._++,q(this,Ui)===1&&(Se(this,$o,aw.subscribe(async t=>{t&&(await this.resumePausedMutations(),q(this,mt).onFocus())})),Se(this,Fo,gf.subscribe(async t=>{t&&(await this.resumePausedMutations(),q(this,mt).onOnline())})))}unmount(){var t,e;Gc(this,Ui)._--,q(this,Ui)===0&&((t=q(this,$o))==null||t.call(this),Se(this,$o,void 0),(e=q(this,Fo))==null||e.call(this),Se(this,Fo,void 0))}isFetching(t){return q(this,mt).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return q(this,zi).findAll({...t,status:"pending"}).length}getQueryData(t){var r;const e=this.defaultQueryOptions({queryKey:t});return(r=q(this,mt).get(e.queryHash))==null?void 0:r.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),r=q(this,mt).build(this,e),n=r.state.data;return n===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(Wi(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(t){return q(this,mt).findAll(t).map(({queryKey:e,state:r})=>{const n=r.data;return[e,n]})}setQueryData(t,e,r){const n=this.defaultQueryOptions({queryKey:t}),i=q(this,mt).get(n.queryHash),a=i==null?void 0:i.state.data,s=v$(e,a);if(s!==void 0)return q(this,mt).build(this,n).setData(s,{...r,manual:!0})}setQueriesData(t,e,r){return qt.batch(()=>q(this,mt).findAll(t).map(({queryKey:n})=>[n,this.setQueryData(n,e,r)]))}getQueryState(t){var r;const e=this.defaultQueryOptions({queryKey:t});return(r=q(this,mt).get(e.queryHash))==null?void 0:r.state}removeQueries(t){const e=q(this,mt);qt.batch(()=>{e.findAll(t).forEach(r=>{e.remove(r)})})}resetQueries(t,e){const r=q(this,mt);return qt.batch(()=>(r.findAll(t).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const r={revert:!0,...e},n=qt.batch(()=>q(this,mt).findAll(t).map(i=>i.cancel(r)));return Promise.all(n).then(hr).catch(hr)}invalidateQueries(t,e={}){return qt.batch(()=>(q(this,mt).findAll(t).forEach(r=>{r.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const r={...e,cancelRefetch:e.cancelRefetch??!0},n=qt.batch(()=>q(this,mt).findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(hr)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(hr)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const r=q(this,mt).build(this,e);return r.isStaleByTime(Wi(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(hr).catch(hr)}fetchInfiniteQuery(t){return t.behavior=A_(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(hr).catch(hr)}ensureInfiniteQueryData(t){return t.behavior=A_(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return gf.isOnline()?q(this,zi).resumePausedMutations():Promise.resolve()}getQueryCache(){return q(this,mt)}getMutationCache(){return q(this,zi)}getDefaultOptions(){return q(this,Gi)}setDefaultOptions(t){Se(this,Gi,t)}setQueryDefaults(t,e){q(this,Mo).set(ju(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...q(this,Mo).values()],r={};return e.forEach(n=>{Nu(t,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(t,e){q(this,Lo).set(ju(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...q(this,Lo).values()],r={};return e.forEach(n=>{Nu(t,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const e={...q(this,Gi).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=ow(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===sw&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...q(this,Gi).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){q(this,mt).clear(),q(this,zi).clear()}},mt=new WeakMap,zi=new WeakMap,Gi=new WeakMap,Mo=new WeakMap,Lo=new WeakMap,Ui=new WeakMap,$o=new WeakMap,Fo=new WeakMap,aR),MR=I.createContext(void 0),I$=t=>{const e=I.useContext(MR);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},M$=({client:t,children:e})=>(I.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),R.jsx(MR.Provider,{value:t,children:e})),LR=I.createContext(!1),L$=()=>I.useContext(LR);LR.Provider;function $$(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var F$=I.createContext($$()),B$=()=>I.useContext(F$),z$=(t,e,r)=>{const n=r!=null&&r.state.error&&typeof t.throwOnError=="function"?CR(t.throwOnError,[r.state.error,r]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||n)&&(e.isReset()||(t.retryOnMount=!1))},G$=t=>{I.useEffect(()=>{t.clearReset()},[t])},U$=({result:t,errorResetBoundary:e,throwOnError:r,query:n,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&n&&(i&&t.data===void 0||CR(r,[t.error,n])),q$=t=>{if(t.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=t.staleTime;t.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},W$=(t,e)=>t.isLoading&&t.isFetching&&!e,H$=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,T_=(t,e,r)=>e.fetchOptimistic(t).catch(()=>{r.clearReset()});function V$(t,e,r){var m,g,_,w;const n=L$(),i=B$(),a=I$(),s=a.defaultQueryOptions(t);(g=(m=a.getDefaultOptions().queries)==null?void 0:m._experimental_beforeQuery)==null||g.call(m,s);const l=a.getQueryCache().get(s.queryHash);s._optimisticResults=n?"isRestoring":"optimistic",q$(s),z$(s,i,l),G$(i);const c=!a.getQueryCache().get(s.queryHash),[f]=I.useState(()=>new e(a,s)),p=f.getOptimisticResult(s),h=!n&&t.subscribed!==!1;if(I.useSyncExternalStore(I.useCallback(b=>{const E=h?f.subscribe(qt.batchCalls(b)):hr;return f.updateResult(),E},[f,h]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),I.useEffect(()=>{f.setOptions(s)},[s,f]),H$(s,p))throw T_(s,f,i);if(U$({result:p,errorResetBoundary:i,throwOnError:s.throwOnError,query:l,suspense:s.suspense}))throw p.error;if((w=(_=a.getDefaultOptions().queries)==null?void 0:_._experimental_afterQuery)==null||w.call(_,s,p),s.experimental_prefetchInRender&&!Du.isServer()&&W$(p,n)){const b=c?T_(s,f,i):l==null?void 0:l.promise;b==null||b.catch(hr).finally(()=>{f.updateResult()})}return s.notifyOnChangeProps?p:f.trackResult(p)}function ln(t,e){return V$(t,A$)}/**
52
+ * @license lucide-react v0.577.0 - ISC
53
+ *
54
+ * This source code is licensed under the ISC license.
55
+ * See the LICENSE file in the root directory of this source tree.
56
+ */const $R=(...t)=>t.filter((e,r,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===r).join(" ").trim();/**
57
+ * @license lucide-react v0.577.0 - ISC
58
+ *
59
+ * This source code is licensed under the ISC license.
60
+ * See the LICENSE file in the root directory of this source tree.
61
+ */const K$=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
62
+ * @license lucide-react v0.577.0 - ISC
63
+ *
64
+ * This source code is licensed under the ISC license.
65
+ * See the LICENSE file in the root directory of this source tree.
66
+ */const X$=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,n)=>n?n.toUpperCase():r.toLowerCase());/**
67
+ * @license lucide-react v0.577.0 - ISC
68
+ *
69
+ * This source code is licensed under the ISC license.
70
+ * See the LICENSE file in the root directory of this source tree.
71
+ */const C_=t=>{const e=X$(t);return e.charAt(0).toUpperCase()+e.slice(1)};/**
72
+ * @license lucide-react v0.577.0 - ISC
73
+ *
74
+ * This source code is licensed under the ISC license.
75
+ * See the LICENSE file in the root directory of this source tree.
76
+ */var Y$={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"};/**
77
+ * @license lucide-react v0.577.0 - ISC
78
+ *
79
+ * This source code is licensed under the ISC license.
80
+ * See the LICENSE file in the root directory of this source tree.
81
+ */const Q$=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1};/**
82
+ * @license lucide-react v0.577.0 - ISC
83
+ *
84
+ * This source code is licensed under the ISC license.
85
+ * See the LICENSE file in the root directory of this source tree.
86
+ */const Z$=I.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:s,...l},c)=>I.createElement("svg",{ref:c,...Y$,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:$R("lucide",i),...!a&&!Q$(l)&&{"aria-hidden":"true"},...l},[...s.map(([f,p])=>I.createElement(f,p)),...Array.isArray(a)?a:[a]]));/**
87
+ * @license lucide-react v0.577.0 - ISC
88
+ *
89
+ * This source code is licensed under the ISC license.
90
+ * See the LICENSE file in the root directory of this source tree.
91
+ */const Ki=(t,e)=>{const r=I.forwardRef(({className:n,...i},a)=>I.createElement(Z$,{ref:a,iconNode:e,className:$R(`lucide-${K$(C_(t))}`,`lucide-${t}`,n),...i}));return r.displayName=C_(t),r};/**
92
+ * @license lucide-react v0.577.0 - ISC
93
+ *
94
+ * This source code is licensed under the ISC license.
95
+ * See the LICENSE file in the root directory of this source tree.
96
+ */const J$=[["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"}]],eF=Ki("activity",J$);/**
97
+ * @license lucide-react v0.577.0 - ISC
98
+ *
99
+ * This source code is licensed under the ISC license.
100
+ * See the LICENSE file in the root directory of this source tree.
101
+ */const tF=[["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"}]],rF=Ki("boxes",tF);/**
102
+ * @license lucide-react v0.577.0 - ISC
103
+ *
104
+ * This source code is licensed under the ISC license.
105
+ * See the LICENSE file in the root directory of this source tree.
106
+ */const nF=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],iF=Ki("git-branch",nF);/**
107
+ * @license lucide-react v0.577.0 - ISC
108
+ *
109
+ * This source code is licensed under the ISC license.
110
+ * See the LICENSE file in the root directory of this source tree.
111
+ */const aF=[["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"}]],oF=Ki("link-2",aF);/**
112
+ * @license lucide-react v0.577.0 - ISC
113
+ *
114
+ * This source code is licensed under the ISC license.
115
+ * See the LICENSE file in the root directory of this source tree.
116
+ */const sF=[["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"}]],uF=Ki("network",sF);/**
117
+ * @license lucide-react v0.577.0 - ISC
118
+ *
119
+ * This source code is licensed under the ISC license.
120
+ * See the LICENSE file in the root directory of this source tree.
121
+ */const lF=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],cF=Ki("search",lF);/**
122
+ * @license lucide-react v0.577.0 - ISC
123
+ *
124
+ * This source code is licensed under the ISC license.
125
+ * See the LICENSE file in the root directory of this source tree.
126
+ */const fF=[["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"}]],dF=Ki("server",fF);/**
127
+ * @license lucide-react v0.577.0 - ISC
128
+ *
129
+ * This source code is licensed under the ISC license.
130
+ * See the LICENSE file in the root directory of this source tree.
131
+ */const hF=[["path",{d:"m10.586 5.414-5.172 5.172",key:"4mc350"}],["path",{d:"m18.586 13.414-5.172 5.172",key:"8c96vv"}],["path",{d:"M6 12h12",key:"8npq4p"}],["circle",{cx:"12",cy:"20",r:"2",key:"144qzu"}],["circle",{cx:"12",cy:"4",r:"2",key:"muu5ef"}],["circle",{cx:"20",cy:"12",r:"2",key:"1xzzfp"}],["circle",{cx:"4",cy:"12",r:"2",key:"1hvhnz"}]],pF=Ki("waypoints",hF),vF="/api/v1";async function Dn(t){const e=`${vF}${t}`;console.log(`[api] → GET ${e}`);const r=performance.now();try{const n=await fetch(e),i=Math.round(performance.now()-r);if(!n.ok){const s=await n.text();throw console.error(`[api] ✗ ${e} ${n.status} (${i}ms)`,s),new Error(s||`Request failed: ${n.status}`)}const a=await n.json();return console.log(`[api] ✓ ${e} ${n.status} (${i}ms)`,a),a}catch(n){const i=Math.round(performance.now()-r);throw console.error(`[api] ✗ ${e} FAILED (${i}ms)`,n),n}}async function FR(){return Dn("/status")}async function mF(t){const e=t?`?workspace=${t}`:"";return Dn(`/graph/entities${e}`)}async function gF(t){const e=t?`?workspace=${t}`:"";return Dn(`/code/dependencies${e}`)}async function yF(t){const e=t?`?workspace=${t}`:"";return Dn(`/graph/symbols${e}`)}async function bF(t){const e=t?`?workspace=${t}`:"";return Dn(`/graph/flows${e}`)}async function wF(t){const e=t?`?workspace=${t}`:"";return Dn(`/graph/connections${e}`)}async function xF(t){const e=t?`?workspace=${t}`:"";return Dn(`/graph/infrastructure${e}`)}async function SF(t,e=20,r){const n=new URLSearchParams({q:t,limit:String(e)});return r&&n.set("workspace",r),Dn(`/search?${n.toString()}`)}async function _F(t){const e=t?`?workspace=${t}`:"";return Dn(`/telemetry${e}`)}async function EF(){return Dn("/workspaces")}const k_=t=>{let e;const r=new Set,n=(f,p)=>{const h=typeof f=="function"?f(e):f;if(!Object.is(h,e)){const m=e;e=p??(typeof h!="object"||h===null)?h:Object.assign({},e,h),r.forEach(g=>g(e,m))}},i=()=>e,l={setState:n,getState:i,getInitialState:()=>c,subscribe:f=>(r.add(f),()=>r.delete(f))},c=e=t(n,i,l);return l},OF=(t=>t?k_(t):k_),AF=t=>t;function PF(t,e=AF){const r=Q.useSyncExternalStore(t.subscribe,Q.useCallback(()=>e(t.getState()),[t,e]),Q.useCallback(()=>e(t.getInitialState()),[t,e]));return Q.useDebugValue(r),r}const R_=t=>{const e=OF(t),r=n=>PF(e,n);return Object.assign(r,e),r},TF=(t=>t?R_(t):R_),kn=TF(t=>({workspace:void 0,setWorkspace:e=>t({workspace:e})})),CF=[{label:"Dashboard",path:"/dashboard",icon:eF},{label:"Knowledge Graph",path:"/graph",icon:uF},{label:"Code Dependencies",path:"/code",icon:pF},{label:"Symbol Graph",path:"/symbols",icon:rF},{label:"Execution Flows",path:"/flows",icon:iF},{label:"Document Connections",path:"/connections",icon:oF},{label:"Infrastructure Symbols",path:"/infrastructure",icon:dF},{label:"Search",path:"/search",icon:cF}];function kF({children:t}){var l,c;const{data:e}=ln({queryKey:["status"],queryFn:FR}),{data:r}=ln({queryKey:["workspaces"],queryFn:EF}),n=kn(f=>f.workspace),i=kn(f=>f.setWorkspace),a=(r==null?void 0:r.workspaces)??[],s=n??((l=a[0])==null?void 0:l.hash)??"";return R.jsxs("div",{className:"min-h-screen bg-[#0a0a0f] text-[#e4e4ed]",children:[R.jsxs("header",{className:"flex items-center justify-between border-b border-[#1b1b26] bg-[#0f0f16] px-6 py-4",children:[R.jsxs("div",{className:"flex items-center gap-3",children:[R.jsx("div",{className:"h-3 w-3 rounded-full bg-gradient-to-r from-sky-500 via-indigo-500 to-fuchsia-500"}),R.jsxs("div",{children:[R.jsx("p",{className:"text-sm uppercase tracking-[0.3em] text-[#8888a0]",children:"nano-brain"}),R.jsx("p",{className:"text-lg font-semibold",children:"Developer Dashboard"})]})]}),R.jsxs("div",{className:"flex items-center gap-4",children:[R.jsxs("div",{className:"text-right",children:[R.jsx("p",{className:"text-xs text-[#8888a0]",children:"Version"}),R.jsx("p",{className:"text-sm font-medium",children:(e==null?void 0:e.version)??"loading"})]}),R.jsx("select",{className:"panel px-3 py-2 text-sm text-[#e4e4ed]",value:s,onChange:f=>i(f.target.value),children:a.map(f=>R.jsxs("option",{value:f.hash,children:[f.name," · ",f.documentCount]},f.hash))})]})]}),R.jsxs("div",{className:"flex min-h-[calc(100vh-65px)]",children:[R.jsxs("aside",{className:"w-56 shrink-0 border-r border-[#1b1b26] bg-[#111118] p-4",children:[R.jsx("nav",{className:"flex flex-col gap-1",children:CF.map(f=>{const p=f.icon;return R.jsxs(ER,{to:f.path,className:({isActive:h})=>`flex items-center gap-3 rounded-xl px-3 py-2 text-sm transition ${h?"bg-[#1c1c27] text-white":"text-[#8888a0] hover:bg-[#16161f] hover:text-white"}`,children:[R.jsx(p,{size:18}),f.label]},f.path)})}),R.jsxs("div",{className:"mt-8 border-t border-[#1f1f2c] pt-4 text-xs text-[#8888a0]",children:[R.jsx("p",{children:"Workspace"}),R.jsx("p",{className:"mt-1 truncate text-sm text-[#e4e4ed]",title:e==null?void 0:e.primaryWorkspace,children:((c=e==null?void 0:e.primaryWorkspace)==null?void 0:c.split("/").pop())??"loading"})]})]}),R.jsx("main",{className:"min-w-0 flex-1 overflow-auto px-6 py-6",children:t})]})]})}function BR(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=BR(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Ve(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=BR(t))&&(n&&(n+=" "),n+=e);return n}var ev,j_;function vr(){if(j_)return ev;j_=1;var t=Array.isArray;return ev=t,ev}var tv,N_;function zR(){if(N_)return tv;N_=1;var t=typeof Uc=="object"&&Uc&&Uc.Object===Object&&Uc;return tv=t,tv}var rv,D_;function In(){if(D_)return rv;D_=1;var t=zR(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return rv=r,rv}var nv,I_;function Al(){if(I_)return nv;I_=1;var t=In(),e=t.Symbol;return nv=e,nv}var iv,M_;function RF(){if(M_)return iv;M_=1;var t=Al(),e=Object.prototype,r=e.hasOwnProperty,n=e.toString,i=t?t.toStringTag:void 0;function a(s){var l=r.call(s,i),c=s[i];try{s[i]=void 0;var f=!0}catch{}var p=n.call(s);return f&&(l?s[i]=c:delete s[i]),p}return iv=a,iv}var av,L_;function jF(){if(L_)return av;L_=1;var t=Object.prototype,e=t.toString;function r(n){return e.call(n)}return av=r,av}var ov,$_;function ci(){if($_)return ov;$_=1;var t=Al(),e=RF(),r=jF(),n="[object Null]",i="[object Undefined]",a=t?t.toStringTag:void 0;function s(l){return l==null?l===void 0?i:n:a&&a in Object(l)?e(l):r(l)}return ov=s,ov}var sv,F_;function fi(){if(F_)return sv;F_=1;function t(e){return e!=null&&typeof e=="object"}return sv=t,sv}var uv,B_;function ds(){if(B_)return uv;B_=1;var t=ci(),e=fi(),r="[object Symbol]";function n(i){return typeof i=="symbol"||e(i)&&t(i)==r}return uv=n,uv}var lv,z_;function lw(){if(z_)return lv;z_=1;var t=vr(),e=ds(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,s){if(t(a))return!1;var l=typeof a;return l=="number"||l=="symbol"||l=="boolean"||a==null||e(a)?!0:n.test(a)||!r.test(a)||s!=null&&a in Object(s)}return lv=i,lv}var cv,G_;function Xi(){if(G_)return cv;G_=1;function t(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}return cv=t,cv}var fv,U_;function cw(){if(U_)return fv;U_=1;var t=ci(),e=Xi(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function s(l){if(!e(l))return!1;var c=t(l);return c==n||c==i||c==r||c==a}return fv=s,fv}var dv,q_;function NF(){if(q_)return dv;q_=1;var t=In(),e=t["__core-js_shared__"];return dv=e,dv}var hv,W_;function DF(){if(W_)return hv;W_=1;var t=NF(),e=(function(){var n=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!e&&e in n}return hv=r,hv}var pv,H_;function GR(){if(H_)return pv;H_=1;var t=Function.prototype,e=t.toString;function r(n){if(n!=null){try{return e.call(n)}catch{}try{return n+""}catch{}}return""}return pv=r,pv}var vv,V_;function IF(){if(V_)return vv;V_=1;var t=cw(),e=DF(),r=Xi(),n=GR(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,s=Function.prototype,l=Object.prototype,c=s.toString,f=l.hasOwnProperty,p=RegExp("^"+c.call(f).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(m){if(!r(m)||e(m))return!1;var g=t(m)?p:a;return g.test(n(m))}return vv=h,vv}var mv,K_;function MF(){if(K_)return mv;K_=1;function t(e,r){return e==null?void 0:e[r]}return mv=t,mv}var gv,X_;function Ba(){if(X_)return gv;X_=1;var t=IF(),e=MF();function r(n,i){var a=e(n,i);return t(a)?a:void 0}return gv=r,gv}var yv,Y_;function yd(){if(Y_)return yv;Y_=1;var t=Ba(),e=t(Object,"create");return yv=e,yv}var bv,Q_;function LF(){if(Q_)return bv;Q_=1;var t=yd();function e(){this.__data__=t?t(null):{},this.size=0}return bv=e,bv}var wv,Z_;function $F(){if(Z_)return wv;Z_=1;function t(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}return wv=t,wv}var xv,J_;function FF(){if(J_)return xv;J_=1;var t=yd(),e="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(a){var s=this.__data__;if(t){var l=s[a];return l===e?void 0:l}return n.call(s,a)?s[a]:void 0}return xv=i,xv}var Sv,eE;function BF(){if(eE)return Sv;eE=1;var t=yd(),e=Object.prototype,r=e.hasOwnProperty;function n(i){var a=this.__data__;return t?a[i]!==void 0:r.call(a,i)}return Sv=n,Sv}var _v,tE;function zF(){if(tE)return _v;tE=1;var t=yd(),e="__lodash_hash_undefined__";function r(n,i){var a=this.__data__;return this.size+=this.has(n)?0:1,a[n]=t&&i===void 0?e:i,this}return _v=r,_v}var Ev,rE;function GF(){if(rE)return Ev;rE=1;var t=LF(),e=$F(),r=FF(),n=BF(),i=zF();function a(s){var l=-1,c=s==null?0:s.length;for(this.clear();++l<c;){var f=s[l];this.set(f[0],f[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,Ev=a,Ev}var Ov,nE;function UF(){if(nE)return Ov;nE=1;function t(){this.__data__=[],this.size=0}return Ov=t,Ov}var Av,iE;function fw(){if(iE)return Av;iE=1;function t(e,r){return e===r||e!==e&&r!==r}return Av=t,Av}var Pv,aE;function bd(){if(aE)return Pv;aE=1;var t=fw();function e(r,n){for(var i=r.length;i--;)if(t(r[i][0],n))return i;return-1}return Pv=e,Pv}var Tv,oE;function qF(){if(oE)return Tv;oE=1;var t=bd(),e=Array.prototype,r=e.splice;function n(i){var a=this.__data__,s=t(a,i);if(s<0)return!1;var l=a.length-1;return s==l?a.pop():r.call(a,s,1),--this.size,!0}return Tv=n,Tv}var Cv,sE;function WF(){if(sE)return Cv;sE=1;var t=bd();function e(r){var n=this.__data__,i=t(n,r);return i<0?void 0:n[i][1]}return Cv=e,Cv}var kv,uE;function HF(){if(uE)return kv;uE=1;var t=bd();function e(r){return t(this.__data__,r)>-1}return kv=e,kv}var Rv,lE;function VF(){if(lE)return Rv;lE=1;var t=bd();function e(r,n){var i=this.__data__,a=t(i,r);return a<0?(++this.size,i.push([r,n])):i[a][1]=n,this}return Rv=e,Rv}var jv,cE;function wd(){if(cE)return jv;cE=1;var t=UF(),e=qF(),r=WF(),n=HF(),i=VF();function a(s){var l=-1,c=s==null?0:s.length;for(this.clear();++l<c;){var f=s[l];this.set(f[0],f[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,jv=a,jv}var Nv,fE;function dw(){if(fE)return Nv;fE=1;var t=Ba(),e=In(),r=t(e,"Map");return Nv=r,Nv}var Dv,dE;function KF(){if(dE)return Dv;dE=1;var t=GF(),e=wd(),r=dw();function n(){this.size=0,this.__data__={hash:new t,map:new(r||e),string:new t}}return Dv=n,Dv}var Iv,hE;function XF(){if(hE)return Iv;hE=1;function t(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}return Iv=t,Iv}var Mv,pE;function xd(){if(pE)return Mv;pE=1;var t=XF();function e(r,n){var i=r.__data__;return t(n)?i[typeof n=="string"?"string":"hash"]:i.map}return Mv=e,Mv}var Lv,vE;function YF(){if(vE)return Lv;vE=1;var t=xd();function e(r){var n=t(this,r).delete(r);return this.size-=n?1:0,n}return Lv=e,Lv}var $v,mE;function QF(){if(mE)return $v;mE=1;var t=xd();function e(r){return t(this,r).get(r)}return $v=e,$v}var Fv,gE;function ZF(){if(gE)return Fv;gE=1;var t=xd();function e(r){return t(this,r).has(r)}return Fv=e,Fv}var Bv,yE;function JF(){if(yE)return Bv;yE=1;var t=xd();function e(r,n){var i=t(this,r),a=i.size;return i.set(r,n),this.size+=i.size==a?0:1,this}return Bv=e,Bv}var zv,bE;function hw(){if(bE)return zv;bE=1;var t=KF(),e=YF(),r=QF(),n=ZF(),i=JF();function a(s){var l=-1,c=s==null?0:s.length;for(this.clear();++l<c;){var f=s[l];this.set(f[0],f[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,zv=a,zv}var Gv,wE;function UR(){if(wE)return Gv;wE=1;var t=hw(),e="Expected a function";function r(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(e);var a=function(){var s=arguments,l=i?i.apply(this,s):s[0],c=a.cache;if(c.has(l))return c.get(l);var f=n.apply(this,s);return a.cache=c.set(l,f)||c,f};return a.cache=new(r.Cache||t),a}return r.Cache=t,Gv=r,Gv}var Uv,xE;function e8(){if(xE)return Uv;xE=1;var t=UR(),e=500;function r(n){var i=t(n,function(s){return a.size===e&&a.clear(),s}),a=i.cache;return i}return Uv=r,Uv}var qv,SE;function t8(){if(SE)return qv;SE=1;var t=e8(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=t(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(e,function(s,l,c,f){a.push(c?f.replace(r,"$1"):l||s)}),a});return qv=n,qv}var Wv,_E;function pw(){if(_E)return Wv;_E=1;function t(e,r){for(var n=-1,i=e==null?0:e.length,a=Array(i);++n<i;)a[n]=r(e[n],n,e);return a}return Wv=t,Wv}var Hv,EE;function r8(){if(EE)return Hv;EE=1;var t=Al(),e=pw(),r=vr(),n=ds(),i=t?t.prototype:void 0,a=i?i.toString:void 0;function s(l){if(typeof l=="string")return l;if(r(l))return e(l,s)+"";if(n(l))return a?a.call(l):"";var c=l+"";return c=="0"&&1/l==-1/0?"-0":c}return Hv=s,Hv}var Vv,OE;function qR(){if(OE)return Vv;OE=1;var t=r8();function e(r){return r==null?"":t(r)}return Vv=e,Vv}var Kv,AE;function WR(){if(AE)return Kv;AE=1;var t=vr(),e=lw(),r=t8(),n=qR();function i(a,s){return t(a)?a:e(a,s)?[a]:r(n(a))}return Kv=i,Kv}var Xv,PE;function Sd(){if(PE)return Xv;PE=1;var t=ds();function e(r){if(typeof r=="string"||t(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return Xv=e,Xv}var Yv,TE;function vw(){if(TE)return Yv;TE=1;var t=WR(),e=Sd();function r(n,i){i=t(i,n);for(var a=0,s=i.length;n!=null&&a<s;)n=n[e(i[a++])];return a&&a==s?n:void 0}return Yv=r,Yv}var Qv,CE;function HR(){if(CE)return Qv;CE=1;var t=vw();function e(r,n,i){var a=r==null?void 0:t(r,n);return a===void 0?i:a}return Qv=e,Qv}var n8=HR();const $r=tt(n8);var Zv,kE;function i8(){if(kE)return Zv;kE=1;function t(e){return e==null}return Zv=t,Zv}var a8=i8();const Ke=tt(a8);var Jv,RE;function o8(){if(RE)return Jv;RE=1;var t=ci(),e=vr(),r=fi(),n="[object String]";function i(a){return typeof a=="string"||!e(a)&&r(a)&&t(a)==n}return Jv=i,Jv}var s8=o8();const Ma=tt(s8);var u8=cw();const Ge=tt(u8);var l8=Xi();const hs=tt(l8);var em={exports:{}},Xe={};/**
132
+ * @license React
133
+ * react-is.production.min.js
134
+ *
135
+ * Copyright (c) Facebook, Inc. and its affiliates.
136
+ *
137
+ * This source code is licensed under the MIT license found in the
138
+ * LICENSE file in the root directory of this source tree.
139
+ */var jE;function c8(){if(jE)return Xe;jE=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),_;_=Symbol.for("react.module.reference");function w(b){if(typeof b=="object"&&b!==null){var E=b.$$typeof;switch(E){case t:switch(b=b.type,b){case r:case i:case n:case f:case p:return b;default:switch(b=b&&b.$$typeof,b){case l:case s:case c:case m:case h:case a:return b;default:return E}}case e:return E}}}return Xe.ContextConsumer=s,Xe.ContextProvider=a,Xe.Element=t,Xe.ForwardRef=c,Xe.Fragment=r,Xe.Lazy=m,Xe.Memo=h,Xe.Portal=e,Xe.Profiler=i,Xe.StrictMode=n,Xe.Suspense=f,Xe.SuspenseList=p,Xe.isAsyncMode=function(){return!1},Xe.isConcurrentMode=function(){return!1},Xe.isContextConsumer=function(b){return w(b)===s},Xe.isContextProvider=function(b){return w(b)===a},Xe.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===t},Xe.isForwardRef=function(b){return w(b)===c},Xe.isFragment=function(b){return w(b)===r},Xe.isLazy=function(b){return w(b)===m},Xe.isMemo=function(b){return w(b)===h},Xe.isPortal=function(b){return w(b)===e},Xe.isProfiler=function(b){return w(b)===i},Xe.isStrictMode=function(b){return w(b)===n},Xe.isSuspense=function(b){return w(b)===f},Xe.isSuspenseList=function(b){return w(b)===p},Xe.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===r||b===i||b===n||b===f||b===p||b===g||typeof b=="object"&&b!==null&&(b.$$typeof===m||b.$$typeof===h||b.$$typeof===a||b.$$typeof===s||b.$$typeof===c||b.$$typeof===_||b.getModuleId!==void 0)},Xe.typeOf=w,Xe}var NE;function f8(){return NE||(NE=1,em.exports=c8()),em.exports}var d8=f8(),tm,DE;function VR(){if(DE)return tm;DE=1;var t=ci(),e=fi(),r="[object Number]";function n(i){return typeof i=="number"||e(i)&&t(i)==r}return tm=n,tm}var rm,IE;function h8(){if(IE)return rm;IE=1;var t=VR();function e(r){return t(r)&&r!=+r}return rm=e,rm}var p8=h8();const Pl=tt(p8);var v8=VR();const m8=tt(v8);var on=function(e){return e===0?0:e>0?1:-1},ba=function(e){return Ma(e)&&e.indexOf("%")===e.length-1},ge=function(e){return m8(e)&&!Pl(e)},g8=function(e){return Ke(e)},Tt=function(e){return ge(e)||Ma(e)},y8=0,_d=function(e){var r=++y8;return"".concat(e||"").concat(r)},La=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ge(e)&&!Ma(e))return n;var a;if(ba(e)){var s=e.indexOf("%");a=r*parseFloat(e.slice(0,s))/100}else a=+e;return Pl(a)&&(a=n),i&&a>r&&(a=r),a},bo=function(e){if(!e)return null;var r=Object.keys(e);return r&&r.length?e[r[0]]:null},b8=function(e){if(!Array.isArray(e))return!1;for(var r=e.length,n={},i=0;i<r;i++)if(!n[e[i]])n[e[i]]=!0;else return!0;return!1},vo=function(e,r){return ge(e)&&ge(r)?function(n){return e+n*(r-e)}:function(){return r}};function k0(t,e,r){return!t||!t.length?null:t.find(function(n){return n&&(typeof e=="function"?e(n):$r(n,e))===r})}var w8=function(e,r){return ge(e)&&ge(r)?e-r:Ma(e)&&Ma(r)?e.localeCompare(r):e instanceof Date&&r instanceof Date?e.getTime()-r.getTime():String(e).localeCompare(String(r))};function _o(t,e){for(var r in t)if({}.hasOwnProperty.call(t,r)&&(!{}.hasOwnProperty.call(e,r)||t[r]!==e[r]))return!1;for(var n in e)if({}.hasOwnProperty.call(e,n)&&!{}.hasOwnProperty.call(t,n))return!1;return!0}function R0(t){"@babel/helpers - typeof";return R0=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},R0(t)}var x8=["viewBox","children"],S8=["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"],ME=["points","pathLength"],nm={svg:x8,polygon:ME,polyline:ME},mw=["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"],yf=function(e,r){if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(I.isValidElement(e)&&(n=e.props),!hs(n))return null;var i={};return Object.keys(n).forEach(function(a){mw.includes(a)&&(i[a]=r||function(s){return n[a](n,s)})}),i},_8=function(e,r,n){return function(i){return e(r,n,i),null}},bf=function(e,r,n){if(!hs(e)||R0(e)!=="object")return null;var i=null;return Object.keys(e).forEach(function(a){var s=e[a];mw.includes(a)&&typeof s=="function"&&(i||(i={}),i[a]=_8(s,r,n))}),i},E8=["children"],O8=["children"];function LE(t,e){if(t==null)return{};var r=A8(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function A8(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var $E={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"},ti=function(e){return typeof e=="string"?e:e?e.displayName||e.name||"Component":""},FE=null,im=null,gw=function t(e){if(e===FE&&Array.isArray(im))return im;var r=[];return I.Children.forEach(e,function(n){Ke(n)||(d8.isFragment(n)?r=r.concat(t(n.props.children)):r.push(n))}),im=r,FE=e,r};function sn(t,e){var r=[],n=[];return Array.isArray(e)?n=e.map(function(i){return ti(i)}):n=[ti(e)],gw(t).forEach(function(i){var a=$r(i,"type.displayName")||$r(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function xr(t,e){var r=sn(t,e);return r&&r[0]}var BE=function(e){if(!e||!e.props)return!1;var r=e.props,n=r.width,i=r.height;return!(!ge(n)||n<=0||!ge(i)||i<=0)},P8=["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"],T8=function(e){return e&&e.type&&Ma(e.type)&&P8.indexOf(e.type)>=0},C8=function(e,r,n,i){var a,s=(a=nm==null?void 0:nm[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!Ge(e)&&(i&&s.includes(r)||S8.includes(r))||n&&mw.includes(r)},Qe=function(e,r,n){if(!e||typeof e=="function"||typeof e=="boolean")return null;var i=e;if(I.isValidElement(e)&&(i=e.props),!hs(i))return null;var a={};return Object.keys(i).forEach(function(s){var l;C8((l=i)===null||l===void 0?void 0:l[s],s,r,n)&&(a[s]=i[s])}),a},j0=function t(e,r){if(e===r)return!0;var n=I.Children.count(e);if(n!==I.Children.count(r))return!1;if(n===0)return!0;if(n===1)return zE(Array.isArray(e)?e[0]:e,Array.isArray(r)?r[0]:r);for(var i=0;i<n;i++){var a=e[i],s=r[i];if(Array.isArray(a)||Array.isArray(s)){if(!t(a,s))return!1}else if(!zE(a,s))return!1}return!0},zE=function(e,r){if(Ke(e)&&Ke(r))return!0;if(!Ke(e)&&!Ke(r)){var n=e.props||{},i=n.children,a=LE(n,E8),s=r.props||{},l=s.children,c=LE(s,O8);return i&&l?_o(a,c)&&j0(i,l):!i&&!l?_o(a,c):!1}return!1},GE=function(e,r){var n=[],i={};return gw(e).forEach(function(a,s){if(T8(a))n.push(a);else if(a){var l=ti(a.type),c=r[l]||{},f=c.handler,p=c.once;if(f&&(!p||!i[l])){var h=f(a,l,s);n.push(h),i[l]=!0}}}),n},k8=function(e){var r=e&&e.type;return r&&$E[r]?$E[r]:null},R8=function(e,r){return gw(r).indexOf(e)},j8=["children","width","height","viewBox","className","style","title","desc"];function N0(){return N0=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},N0.apply(this,arguments)}function N8(t,e){if(t==null)return{};var r=D8(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function D8(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function D0(t){var e=t.children,r=t.width,n=t.height,i=t.viewBox,a=t.className,s=t.style,l=t.title,c=t.desc,f=N8(t,j8),p=i||{width:r,height:n,x:0,y:0},h=Ve("recharts-surface",a);return Q.createElement("svg",N0({},Qe(f,!0,"svg"),{className:h,width:r,height:n,style:s,viewBox:"".concat(p.x," ").concat(p.y," ").concat(p.width," ").concat(p.height)}),Q.createElement("title",null,l),Q.createElement("desc",null,c),e)}var I8=["children","className"];function I0(){return I0=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},I0.apply(this,arguments)}function M8(t,e){if(t==null)return{};var r=L8(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function L8(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var $t=Q.forwardRef(function(t,e){var r=t.children,n=t.className,i=M8(t,I8),a=Ve("recharts-layer",n);return Q.createElement("g",I0({className:a},Qe(i,!0),{ref:e}),r)}),ja=function(e,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a]},am,UE;function $8(){if(UE)return am;UE=1;function t(e,r,n){var i=-1,a=e.length;r<0&&(r=-r>a?0:a+r),n=n>a?a:n,n<0&&(n+=a),a=r>n?0:n-r>>>0,r>>>=0;for(var s=Array(a);++i<a;)s[i]=e[i+r];return s}return am=t,am}var om,qE;function F8(){if(qE)return om;qE=1;var t=$8();function e(r,n,i){var a=r.length;return i=i===void 0?a:i,!n&&i>=a?r:t(r,n,i)}return om=e,om}var sm,WE;function KR(){if(WE)return sm;WE=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=e+r+n,a="\\ufe0e\\ufe0f",s="\\u200d",l=RegExp("["+s+t+i+a+"]");function c(f){return l.test(f)}return sm=c,sm}var um,HE;function B8(){if(HE)return um;HE=1;function t(e){return e.split("")}return um=t,um}var lm,VE;function z8(){if(VE)return lm;VE=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=e+r+n,a="\\ufe0e\\ufe0f",s="["+t+"]",l="["+i+"]",c="\\ud83c[\\udffb-\\udfff]",f="(?:"+l+"|"+c+")",p="[^"+t+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",g="\\u200d",_=f+"?",w="["+a+"]?",b="(?:"+g+"(?:"+[p,h,m].join("|")+")"+w+_+")*",E=w+_+b,P="(?:"+[p+l+"?",l,h,m,s].join("|")+")",T=RegExp(c+"(?="+c+")|"+P+E,"g");function A(x){return x.match(T)||[]}return lm=A,lm}var cm,KE;function G8(){if(KE)return cm;KE=1;var t=B8(),e=KR(),r=z8();function n(i){return e(i)?r(i):t(i)}return cm=n,cm}var fm,XE;function U8(){if(XE)return fm;XE=1;var t=F8(),e=KR(),r=G8(),n=qR();function i(a){return function(s){s=n(s);var l=e(s)?r(s):void 0,c=l?l[0]:s.charAt(0),f=l?t(l,1).join(""):s.slice(1);return c[a]()+f}}return fm=i,fm}var dm,YE;function q8(){if(YE)return dm;YE=1;var t=U8(),e=t("toUpperCase");return dm=e,dm}var W8=q8();const Ed=tt(W8);function ot(t){return function(){return t}}const XR=Math.cos,wf=Math.sin,cn=Math.sqrt,xf=Math.PI,Od=2*xf,M0=Math.PI,L0=2*M0,ma=1e-6,H8=L0-ma;function YR(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}function V8(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return YR;const r=10**e;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class K8{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?YR:V8(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,n,i){this._append`Q${+e},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(e,r,n,i,a,s){this._append`C${+e},${+r},${+n},${+i},${this._x1=+a},${this._y1=+s}`}arcTo(e,r,n,i,a){if(e=+e,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,l=this._y1,c=n-e,f=i-r,p=s-e,h=l-r,m=p*p+h*h;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(m>ma)if(!(Math.abs(h*c-f*p)>ma)||!a)this._append`L${this._x1=e},${this._y1=r}`;else{let g=n-s,_=i-l,w=c*c+f*f,b=g*g+_*_,E=Math.sqrt(w),P=Math.sqrt(m),T=a*Math.tan((M0-Math.acos((w+m-b)/(2*E*P)))/2),A=T/P,x=T/E;Math.abs(A-1)>ma&&this._append`L${e+A*p},${r+A*h}`,this._append`A${a},${a},0,0,${+(h*g>p*_)},${this._x1=e+x*c},${this._y1=r+x*f}`}}arc(e,r,n,i,a,s){if(e=+e,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(i),c=n*Math.sin(i),f=e+l,p=r+c,h=1^s,m=s?i-a:a-i;this._x1===null?this._append`M${f},${p}`:(Math.abs(this._x1-f)>ma||Math.abs(this._y1-p)>ma)&&this._append`L${f},${p}`,n&&(m<0&&(m=m%L0+L0),m>H8?this._append`A${n},${n},0,1,${h},${e-l},${r-c}A${n},${n},0,1,${h},${this._x1=f},${this._y1=p}`:m>ma&&this._append`A${n},${n},0,${+(m>=M0)},${h},${this._x1=e+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(e,r,n,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function yw(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);e=n}return t},()=>new K8(e)}function bw(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function QR(t){this._context=t}QR.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function Ad(t){return new QR(t)}function ZR(t){return t[0]}function JR(t){return t[1]}function ej(t,e){var r=ot(!0),n=null,i=Ad,a=null,s=yw(l);t=typeof t=="function"?t:t===void 0?ZR:ot(t),e=typeof e=="function"?e:e===void 0?JR:ot(e);function l(c){var f,p=(c=bw(c)).length,h,m=!1,g;for(n==null&&(a=i(g=s())),f=0;f<=p;++f)!(f<p&&r(h=c[f],f,c))===m&&((m=!m)?a.lineStart():a.lineEnd()),m&&a.point(+t(h,f,c),+e(h,f,c));if(g)return a=null,g+""||null}return l.x=function(c){return arguments.length?(t=typeof c=="function"?c:ot(+c),l):t},l.y=function(c){return arguments.length?(e=typeof c=="function"?c:ot(+c),l):e},l.defined=function(c){return arguments.length?(r=typeof c=="function"?c:ot(!!c),l):r},l.curve=function(c){return arguments.length?(i=c,n!=null&&(a=i(n)),l):i},l.context=function(c){return arguments.length?(c==null?n=a=null:a=i(n=c),l):n},l}function Vc(t,e,r){var n=null,i=ot(!0),a=null,s=Ad,l=null,c=yw(f);t=typeof t=="function"?t:t===void 0?ZR:ot(+t),e=typeof e=="function"?e:ot(e===void 0?0:+e),r=typeof r=="function"?r:r===void 0?JR:ot(+r);function f(h){var m,g,_,w=(h=bw(h)).length,b,E=!1,P,T=new Array(w),A=new Array(w);for(a==null&&(l=s(P=c())),m=0;m<=w;++m){if(!(m<w&&i(b=h[m],m,h))===E)if(E=!E)g=m,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),_=m-1;_>=g;--_)l.point(T[_],A[_]);l.lineEnd(),l.areaEnd()}E&&(T[m]=+t(b,m,h),A[m]=+e(b,m,h),l.point(n?+n(b,m,h):T[m],r?+r(b,m,h):A[m]))}if(P)return l=null,P+""||null}function p(){return ej().defined(i).curve(s).context(a)}return f.x=function(h){return arguments.length?(t=typeof h=="function"?h:ot(+h),n=null,f):t},f.x0=function(h){return arguments.length?(t=typeof h=="function"?h:ot(+h),f):t},f.x1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:ot(+h),f):n},f.y=function(h){return arguments.length?(e=typeof h=="function"?h:ot(+h),r=null,f):e},f.y0=function(h){return arguments.length?(e=typeof h=="function"?h:ot(+h),f):e},f.y1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:ot(+h),f):r},f.lineX0=f.lineY0=function(){return p().x(t).y(e)},f.lineY1=function(){return p().x(t).y(r)},f.lineX1=function(){return p().x(n).y(e)},f.defined=function(h){return arguments.length?(i=typeof h=="function"?h:ot(!!h),f):i},f.curve=function(h){return arguments.length?(s=h,a!=null&&(l=s(a)),f):s},f.context=function(h){return arguments.length?(h==null?a=l=null:l=s(a=h),f):a},f}class tj{constructor(e,r){this._context=e,this._x=r}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,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}}function X8(t){return new tj(t,!0)}function Y8(t){return new tj(t,!1)}const ww={draw(t,e){const r=cn(e/xf);t.moveTo(r,0),t.arc(0,0,r,0,Od)}},Q8={draw(t,e){const r=cn(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},rj=cn(1/3),Z8=rj*2,J8={draw(t,e){const r=cn(e/Z8),n=r*rj;t.moveTo(0,-r),t.lineTo(n,0),t.lineTo(0,r),t.lineTo(-n,0),t.closePath()}},eB={draw(t,e){const r=cn(e),n=-r/2;t.rect(n,n,r,r)}},tB=.8908130915292852,nj=wf(xf/10)/wf(7*xf/10),rB=wf(Od/10)*nj,nB=-XR(Od/10)*nj,iB={draw(t,e){const r=cn(e*tB),n=rB*r,i=nB*r;t.moveTo(0,-r),t.lineTo(n,i);for(let a=1;a<5;++a){const s=Od*a/5,l=XR(s),c=wf(s);t.lineTo(c*r,-l*r),t.lineTo(l*n-c*i,c*n+l*i)}t.closePath()}},hm=cn(3),aB={draw(t,e){const r=-cn(e/(hm*3));t.moveTo(0,r*2),t.lineTo(-hm*r,-r),t.lineTo(hm*r,-r),t.closePath()}},Rr=-.5,jr=cn(3)/2,$0=1/cn(12),oB=($0/2+1)*3,sB={draw(t,e){const r=cn(e/oB),n=r/2,i=r*$0,a=n,s=r*$0+r,l=-a,c=s;t.moveTo(n,i),t.lineTo(a,s),t.lineTo(l,c),t.lineTo(Rr*n-jr*i,jr*n+Rr*i),t.lineTo(Rr*a-jr*s,jr*a+Rr*s),t.lineTo(Rr*l-jr*c,jr*l+Rr*c),t.lineTo(Rr*n+jr*i,Rr*i-jr*n),t.lineTo(Rr*a+jr*s,Rr*s-jr*a),t.lineTo(Rr*l+jr*c,Rr*c-jr*l),t.closePath()}};function uB(t,e){let r=null,n=yw(i);t=typeof t=="function"?t:ot(t||ww),e=typeof e=="function"?e:ot(e===void 0?64:+e);function i(){let a;if(r||(r=a=n()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(t=typeof a=="function"?a:ot(a),i):t},i.size=function(a){return arguments.length?(e=typeof a=="function"?a:ot(+a),i):e},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function Sf(){}function _f(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function ij(t){this._context=t}ij.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:_f(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);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:_f(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function lB(t){return new ij(t)}function aj(t){this._context=t}aj.prototype={areaStart:Sf,areaEnd:Sf,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);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:_f(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function cB(t){return new aj(t)}function oj(t){this._context=t}oj.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:_f(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function fB(t){return new oj(t)}function sj(t){this._context=t}sj.prototype={areaStart:Sf,areaEnd:Sf,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function dB(t){return new sj(t)}function QE(t){return t<0?-1:1}function ZE(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),s=(r-t._y1)/(i||n<0&&-0),l=(a*i+s*n)/(n+i);return(QE(a)+QE(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(l))||0}function JE(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function pm(t,e,r){var n=t._x0,i=t._y0,a=t._x1,s=t._y1,l=(a-n)/3;t._context.bezierCurveTo(n+l,i+l*e,a-l,s-l*r,a,s)}function Ef(t){this._context=t}Ef.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:pm(this,this._t0,JE(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,pm(this,JE(this,r=ZE(this,t,e)),r);break;default:pm(this,this._t0,r=ZE(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function uj(t){this._context=new lj(t)}(uj.prototype=Object.create(Ef.prototype)).point=function(t,e){Ef.prototype.point.call(this,e,t)};function lj(t){this._context=t}lj.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,n,i,a){this._context.bezierCurveTo(e,t,n,r,a,i)}};function hB(t){return new Ef(t)}function pB(t){return new uj(t)}function cj(t){this._context=t}cj.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var n=eO(t),i=eO(e),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],t[s],e[s]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function eO(t){var e,r=t.length-1,n,i=new Array(r),a=new Array(r),s=new Array(r);for(i[0]=0,a[0]=2,s[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,s[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,s[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,s[e]-=n*s[e-1];for(i[r-1]=s[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(s[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function vB(t){return new cj(t)}function Pd(t,e){this._context=t,this._t=e}Pd.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}};function mB(t){return new Pd(t,.5)}function gB(t){return new Pd(t,0)}function yB(t){return new Pd(t,1)}function Bo(t,e){if((s=t.length)>1)for(var r=1,n,i,a=t[e[0]],s,l=a.length;r<s;++r)for(i=a,a=t[e[r]],n=0;n<l;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function F0(t){for(var e=t.length,r=new Array(e);--e>=0;)r[e]=e;return r}function bB(t,e){return t[e]}function wB(t){const e=[];return e.key=t,e}function xB(){var t=ot([]),e=F0,r=Bo,n=bB;function i(a){var s=Array.from(t.apply(this,arguments),wB),l,c=s.length,f=-1,p;for(const h of a)for(l=0,++f;l<c;++l)(s[l][f]=[0,+n(h,s[l].key,f,a)]).data=h;for(l=0,p=bw(e(s));l<c;++l)s[p[l]].index=l;return r(s,p),s}return i.keys=function(a){return arguments.length?(t=typeof a=="function"?a:ot(Array.from(a)),i):t},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:ot(+a),i):n},i.order=function(a){return arguments.length?(e=a==null?F0:typeof a=="function"?a:ot(Array.from(a)),i):e},i.offset=function(a){return arguments.length?(r=a??Bo,i):r},i}function SB(t,e){if((n=t.length)>0){for(var r,n,i=0,a=t[0].length,s;i<a;++i){for(s=r=0;r<n;++r)s+=t[r][i][1]||0;if(s)for(r=0;r<n;++r)t[r][i][1]/=s}Bo(t,e)}}function _B(t,e){if((i=t.length)>0){for(var r=0,n=t[e[0]],i,a=n.length;r<a;++r){for(var s=0,l=0;s<i;++s)l+=t[s][r][1]||0;n[r][1]+=n[r][0]=-l/2}Bo(t,e)}}function EB(t,e){if(!(!((s=t.length)>0)||!((a=(i=t[e[0]]).length)>0))){for(var r=0,n=1,i,a,s;n<a;++n){for(var l=0,c=0,f=0;l<s;++l){for(var p=t[e[l]],h=p[n][1]||0,m=p[n-1][1]||0,g=(h-m)/2,_=0;_<l;++_){var w=t[e[_]],b=w[n][1]||0,E=w[n-1][1]||0;g+=b-E}c+=h,f+=g*h}i[n-1][1]+=i[n-1][0]=r,c&&(r-=f/c)}i[n-1][1]+=i[n-1][0]=r,Bo(t,e)}}function Iu(t){"@babel/helpers - typeof";return Iu=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},Iu(t)}var OB=["type","size","sizeType"];function B0(){return B0=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},B0.apply(this,arguments)}function tO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function rO(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?tO(Object(r),!0).forEach(function(n){AB(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):tO(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function AB(t,e,r){return e=PB(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function PB(t){var e=TB(t,"string");return Iu(e)=="symbol"?e:e+""}function TB(t,e){if(Iu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Iu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function CB(t,e){if(t==null)return{};var r=kB(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function kB(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var fj={symbolCircle:ww,symbolCross:Q8,symbolDiamond:J8,symbolSquare:eB,symbolStar:iB,symbolTriangle:aB,symbolWye:sB},RB=Math.PI/180,jB=function(e){var r="symbol".concat(Ed(e));return fj[r]||ww},NB=function(e,r,n){if(r==="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 i=18*RB;return 1.25*e*e*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),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}},DB=function(e,r){fj["symbol".concat(Ed(e))]=r},xw=function(e){var r=e.type,n=r===void 0?"circle":r,i=e.size,a=i===void 0?64:i,s=e.sizeType,l=s===void 0?"area":s,c=CB(e,OB),f=rO(rO({},c),{},{type:n,size:a,sizeType:l}),p=function(){var b=jB(n),E=uB().type(b).size(NB(a,l,n));return E()},h=f.className,m=f.cx,g=f.cy,_=Qe(f,!0);return m===+m&&g===+g&&a===+a?Q.createElement("path",B0({},_,{className:Ve("recharts-symbols",h),transform:"translate(".concat(m,", ").concat(g,")"),d:p()})):null};xw.registerSymbol=DB;function zo(t){"@babel/helpers - typeof";return zo=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},zo(t)}function z0(){return z0=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},z0.apply(this,arguments)}function nO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function IB(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?nO(Object(r),!0).forEach(function(n){Mu(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):nO(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function MB(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function LB(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,hj(n.key),n)}}function $B(t,e,r){return e&&LB(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function FB(t,e,r){return e=Of(e),BB(t,dj()?Reflect.construct(e,r||[],Of(t).constructor):e.apply(t,r))}function BB(t,e){if(e&&(zo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zB(t)}function zB(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function dj(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(dj=function(){return!!t})()}function Of(t){return Of=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Of(t)}function GB(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&G0(t,e)}function G0(t,e){return G0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},G0(t,e)}function Mu(t,e,r){return e=hj(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hj(t){var e=UB(t,"string");return zo(e)=="symbol"?e:e+""}function UB(t,e){if(zo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(zo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Nr=32,Sw=(function(t){function e(){return MB(this,e),FB(this,e,arguments)}return GB(e,t),$B(e,[{key:"renderIcon",value:function(n){var i=this.props.inactiveColor,a=Nr/2,s=Nr/6,l=Nr/3,c=n.inactive?i:n.color;if(n.type==="plainline")return Q.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:a,x2:Nr,y2:a,className:"recharts-legend-icon"});if(n.type==="line")return Q.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(a,"h").concat(l,`
140
+ A`).concat(s,",").concat(s,",0,1,1,").concat(2*l,",").concat(a,`
141
+ H`).concat(Nr,"M").concat(2*l,",").concat(a,`
142
+ A`).concat(s,",").concat(s,",0,1,1,").concat(l,",").concat(a),className:"recharts-legend-icon"});if(n.type==="rect")return Q.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(Nr/8,"h").concat(Nr,"v").concat(Nr*3/4,"h").concat(-Nr,"z"),className:"recharts-legend-icon"});if(Q.isValidElement(n.legendIcon)){var f=IB({},n);return delete f.legendIcon,Q.cloneElement(n.legendIcon,f)}return Q.createElement(xw,{fill:c,cx:a,cy:a,size:Nr,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,i=this.props,a=i.payload,s=i.iconSize,l=i.layout,c=i.formatter,f=i.inactiveColor,p={x:0,y:0,width:Nr,height:Nr},h={display:l==="horizontal"?"inline-block":"block",marginRight:10},m={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(g,_){var w=g.formatter||c,b=Ve(Mu(Mu({"recharts-legend-item":!0},"legend-item-".concat(_),!0),"inactive",g.inactive));if(g.type==="none")return null;var E=Ge(g.value)?null:g.value;ja(!Ge(g.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var P=g.inactive?f:g.color;return Q.createElement("li",z0({className:b,style:h,key:"legend-item-".concat(_)},bf(n.props,g,_)),Q.createElement(D0,{width:s,height:s,viewBox:p,style:m},n.renderIcon(g)),Q.createElement("span",{className:"recharts-legend-item-text",style:{color:P}},w?w(E,g,_):E))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,s=n.align;if(!i||!i.length)return null;var l={padding:0,margin:0,textAlign:a==="horizontal"?s:"left"};return Q.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])})(I.PureComponent);Mu(Sw,"displayName","Legend");Mu(Sw,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var vm,iO;function qB(){if(iO)return vm;iO=1;var t=wd();function e(){this.__data__=new t,this.size=0}return vm=e,vm}var mm,aO;function WB(){if(aO)return mm;aO=1;function t(e){var r=this.__data__,n=r.delete(e);return this.size=r.size,n}return mm=t,mm}var gm,oO;function HB(){if(oO)return gm;oO=1;function t(e){return this.__data__.get(e)}return gm=t,gm}var ym,sO;function VB(){if(sO)return ym;sO=1;function t(e){return this.__data__.has(e)}return ym=t,ym}var bm,uO;function KB(){if(uO)return bm;uO=1;var t=wd(),e=dw(),r=hw(),n=200;function i(a,s){var l=this.__data__;if(l instanceof t){var c=l.__data__;if(!e||c.length<n-1)return c.push([a,s]),this.size=++l.size,this;l=this.__data__=new r(c)}return l.set(a,s),this.size=l.size,this}return bm=i,bm}var wm,lO;function pj(){if(lO)return wm;lO=1;var t=wd(),e=qB(),r=WB(),n=HB(),i=VB(),a=KB();function s(l){var c=this.__data__=new t(l);this.size=c.size}return s.prototype.clear=e,s.prototype.delete=r,s.prototype.get=n,s.prototype.has=i,s.prototype.set=a,wm=s,wm}var xm,cO;function XB(){if(cO)return xm;cO=1;var t="__lodash_hash_undefined__";function e(r){return this.__data__.set(r,t),this}return xm=e,xm}var Sm,fO;function YB(){if(fO)return Sm;fO=1;function t(e){return this.__data__.has(e)}return Sm=t,Sm}var _m,dO;function vj(){if(dO)return _m;dO=1;var t=hw(),e=XB(),r=YB();function n(i){var a=-1,s=i==null?0:i.length;for(this.__data__=new t;++a<s;)this.add(i[a])}return n.prototype.add=n.prototype.push=e,n.prototype.has=r,_m=n,_m}var Em,hO;function mj(){if(hO)return Em;hO=1;function t(e,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(e[n],n,e))return!0;return!1}return Em=t,Em}var Om,pO;function gj(){if(pO)return Om;pO=1;function t(e,r){return e.has(r)}return Om=t,Om}var Am,vO;function yj(){if(vO)return Am;vO=1;var t=vj(),e=mj(),r=gj(),n=1,i=2;function a(s,l,c,f,p,h){var m=c&n,g=s.length,_=l.length;if(g!=_&&!(m&&_>g))return!1;var w=h.get(s),b=h.get(l);if(w&&b)return w==l&&b==s;var E=-1,P=!0,T=c&i?new t:void 0;for(h.set(s,l),h.set(l,s);++E<g;){var A=s[E],x=l[E];if(f)var O=m?f(x,A,E,l,s,h):f(A,x,E,s,l,h);if(O!==void 0){if(O)continue;P=!1;break}if(T){if(!e(l,function(C,N){if(!r(T,N)&&(A===C||p(A,C,c,f,h)))return T.push(N)})){P=!1;break}}else if(!(A===x||p(A,x,c,f,h))){P=!1;break}}return h.delete(s),h.delete(l),P}return Am=a,Am}var Pm,mO;function QB(){if(mO)return Pm;mO=1;var t=In(),e=t.Uint8Array;return Pm=e,Pm}var Tm,gO;function ZB(){if(gO)return Tm;gO=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(i,a){n[++r]=[a,i]}),n}return Tm=t,Tm}var Cm,yO;function _w(){if(yO)return Cm;yO=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(i){n[++r]=i}),n}return Cm=t,Cm}var km,bO;function JB(){if(bO)return km;bO=1;var t=Al(),e=QB(),r=fw(),n=yj(),i=ZB(),a=_w(),s=1,l=2,c="[object Boolean]",f="[object Date]",p="[object Error]",h="[object Map]",m="[object Number]",g="[object RegExp]",_="[object Set]",w="[object String]",b="[object Symbol]",E="[object ArrayBuffer]",P="[object DataView]",T=t?t.prototype:void 0,A=T?T.valueOf:void 0;function x(O,C,N,D,B,U,L){switch(N){case P:if(O.byteLength!=C.byteLength||O.byteOffset!=C.byteOffset)return!1;O=O.buffer,C=C.buffer;case E:return!(O.byteLength!=C.byteLength||!U(new e(O),new e(C)));case c:case f:case m:return r(+O,+C);case p:return O.name==C.name&&O.message==C.message;case g:case w:return O==C+"";case h:var j=i;case _:var X=D&s;if(j||(j=a),O.size!=C.size&&!X)return!1;var K=L.get(O);if(K)return K==C;D|=l,L.set(O,C);var G=n(j(O),j(C),D,B,U,L);return L.delete(O),G;case b:if(A)return A.call(O)==A.call(C)}return!1}return km=x,km}var Rm,wO;function bj(){if(wO)return Rm;wO=1;function t(e,r){for(var n=-1,i=r.length,a=e.length;++n<i;)e[a+n]=r[n];return e}return Rm=t,Rm}var jm,xO;function e3(){if(xO)return jm;xO=1;var t=bj(),e=vr();function r(n,i,a){var s=i(n);return e(n)?s:t(s,a(n))}return jm=r,jm}var Nm,SO;function t3(){if(SO)return Nm;SO=1;function t(e,r){for(var n=-1,i=e==null?0:e.length,a=0,s=[];++n<i;){var l=e[n];r(l,n,e)&&(s[a++]=l)}return s}return Nm=t,Nm}var Dm,_O;function r3(){if(_O)return Dm;_O=1;function t(){return[]}return Dm=t,Dm}var Im,EO;function n3(){if(EO)return Im;EO=1;var t=t3(),e=r3(),r=Object.prototype,n=r.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(s){return s==null?[]:(s=Object(s),t(i(s),function(l){return n.call(s,l)}))}:e;return Im=a,Im}var Mm,OO;function i3(){if(OO)return Mm;OO=1;function t(e,r){for(var n=-1,i=Array(e);++n<e;)i[n]=r(n);return i}return Mm=t,Mm}var Lm,AO;function a3(){if(AO)return Lm;AO=1;var t=ci(),e=fi(),r="[object Arguments]";function n(i){return e(i)&&t(i)==r}return Lm=n,Lm}var $m,PO;function Ew(){if(PO)return $m;PO=1;var t=a3(),e=fi(),r=Object.prototype,n=r.hasOwnProperty,i=r.propertyIsEnumerable,a=t((function(){return arguments})())?t:function(s){return e(s)&&n.call(s,"callee")&&!i.call(s,"callee")};return $m=a,$m}var Su={exports:{}},Fm,TO;function o3(){if(TO)return Fm;TO=1;function t(){return!1}return Fm=t,Fm}Su.exports;var CO;function wj(){return CO||(CO=1,(function(t,e){var r=In(),n=o3(),i=e&&!e.nodeType&&e,a=i&&!0&&t&&!t.nodeType&&t,s=a&&a.exports===i,l=s?r.Buffer:void 0,c=l?l.isBuffer:void 0,f=c||n;t.exports=f})(Su,Su.exports)),Su.exports}var Bm,kO;function Ow(){if(kO)return Bm;kO=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function r(n,i){var a=typeof n;return i=i??t,!!i&&(a=="number"||a!="symbol"&&e.test(n))&&n>-1&&n%1==0&&n<i}return Bm=r,Bm}var zm,RO;function Aw(){if(RO)return zm;RO=1;var t=9007199254740991;function e(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=t}return zm=e,zm}var Gm,jO;function s3(){if(jO)return Gm;jO=1;var t=ci(),e=Aw(),r=fi(),n="[object Arguments]",i="[object Array]",a="[object Boolean]",s="[object Date]",l="[object Error]",c="[object Function]",f="[object Map]",p="[object Number]",h="[object Object]",m="[object RegExp]",g="[object Set]",_="[object String]",w="[object WeakMap]",b="[object ArrayBuffer]",E="[object DataView]",P="[object Float32Array]",T="[object Float64Array]",A="[object Int8Array]",x="[object Int16Array]",O="[object Int32Array]",C="[object Uint8Array]",N="[object Uint8ClampedArray]",D="[object Uint16Array]",B="[object Uint32Array]",U={};U[P]=U[T]=U[A]=U[x]=U[O]=U[C]=U[N]=U[D]=U[B]=!0,U[n]=U[i]=U[b]=U[a]=U[E]=U[s]=U[l]=U[c]=U[f]=U[p]=U[h]=U[m]=U[g]=U[_]=U[w]=!1;function L(j){return r(j)&&e(j.length)&&!!U[t(j)]}return Gm=L,Gm}var Um,NO;function xj(){if(NO)return Um;NO=1;function t(e){return function(r){return e(r)}}return Um=t,Um}var _u={exports:{}};_u.exports;var DO;function u3(){return DO||(DO=1,(function(t,e){var r=zR(),n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,s=a&&r.process,l=(function(){try{var c=i&&i.require&&i.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}})();t.exports=l})(_u,_u.exports)),_u.exports}var qm,IO;function Sj(){if(IO)return qm;IO=1;var t=s3(),e=xj(),r=u3(),n=r&&r.isTypedArray,i=n?e(n):t;return qm=i,qm}var Wm,MO;function l3(){if(MO)return Wm;MO=1;var t=i3(),e=Ew(),r=vr(),n=wj(),i=Ow(),a=Sj(),s=Object.prototype,l=s.hasOwnProperty;function c(f,p){var h=r(f),m=!h&&e(f),g=!h&&!m&&n(f),_=!h&&!m&&!g&&a(f),w=h||m||g||_,b=w?t(f.length,String):[],E=b.length;for(var P in f)(p||l.call(f,P))&&!(w&&(P=="length"||g&&(P=="offset"||P=="parent")||_&&(P=="buffer"||P=="byteLength"||P=="byteOffset")||i(P,E)))&&b.push(P);return b}return Wm=c,Wm}var Hm,LO;function c3(){if(LO)return Hm;LO=1;var t=Object.prototype;function e(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||t;return r===i}return Hm=e,Hm}var Vm,$O;function _j(){if($O)return Vm;$O=1;function t(e,r){return function(n){return e(r(n))}}return Vm=t,Vm}var Km,FO;function f3(){if(FO)return Km;FO=1;var t=_j(),e=t(Object.keys,Object);return Km=e,Km}var Xm,BO;function d3(){if(BO)return Xm;BO=1;var t=c3(),e=f3(),r=Object.prototype,n=r.hasOwnProperty;function i(a){if(!t(a))return e(a);var s=[];for(var l in Object(a))n.call(a,l)&&l!="constructor"&&s.push(l);return s}return Xm=i,Xm}var Ym,zO;function Tl(){if(zO)return Ym;zO=1;var t=cw(),e=Aw();function r(n){return n!=null&&e(n.length)&&!t(n)}return Ym=r,Ym}var Qm,GO;function Td(){if(GO)return Qm;GO=1;var t=l3(),e=d3(),r=Tl();function n(i){return r(i)?t(i):e(i)}return Qm=n,Qm}var Zm,UO;function h3(){if(UO)return Zm;UO=1;var t=e3(),e=n3(),r=Td();function n(i){return t(i,r,e)}return Zm=n,Zm}var Jm,qO;function p3(){if(qO)return Jm;qO=1;var t=h3(),e=1,r=Object.prototype,n=r.hasOwnProperty;function i(a,s,l,c,f,p){var h=l&e,m=t(a),g=m.length,_=t(s),w=_.length;if(g!=w&&!h)return!1;for(var b=g;b--;){var E=m[b];if(!(h?E in s:n.call(s,E)))return!1}var P=p.get(a),T=p.get(s);if(P&&T)return P==s&&T==a;var A=!0;p.set(a,s),p.set(s,a);for(var x=h;++b<g;){E=m[b];var O=a[E],C=s[E];if(c)var N=h?c(C,O,E,s,a,p):c(O,C,E,a,s,p);if(!(N===void 0?O===C||f(O,C,l,c,p):N)){A=!1;break}x||(x=E=="constructor")}if(A&&!x){var D=a.constructor,B=s.constructor;D!=B&&"constructor"in a&&"constructor"in s&&!(typeof D=="function"&&D instanceof D&&typeof B=="function"&&B instanceof B)&&(A=!1)}return p.delete(a),p.delete(s),A}return Jm=i,Jm}var eg,WO;function v3(){if(WO)return eg;WO=1;var t=Ba(),e=In(),r=t(e,"DataView");return eg=r,eg}var tg,HO;function m3(){if(HO)return tg;HO=1;var t=Ba(),e=In(),r=t(e,"Promise");return tg=r,tg}var rg,VO;function Ej(){if(VO)return rg;VO=1;var t=Ba(),e=In(),r=t(e,"Set");return rg=r,rg}var ng,KO;function g3(){if(KO)return ng;KO=1;var t=Ba(),e=In(),r=t(e,"WeakMap");return ng=r,ng}var ig,XO;function y3(){if(XO)return ig;XO=1;var t=v3(),e=dw(),r=m3(),n=Ej(),i=g3(),a=ci(),s=GR(),l="[object Map]",c="[object Object]",f="[object Promise]",p="[object Set]",h="[object WeakMap]",m="[object DataView]",g=s(t),_=s(e),w=s(r),b=s(n),E=s(i),P=a;return(t&&P(new t(new ArrayBuffer(1)))!=m||e&&P(new e)!=l||r&&P(r.resolve())!=f||n&&P(new n)!=p||i&&P(new i)!=h)&&(P=function(T){var A=a(T),x=A==c?T.constructor:void 0,O=x?s(x):"";if(O)switch(O){case g:return m;case _:return l;case w:return f;case b:return p;case E:return h}return A}),ig=P,ig}var ag,YO;function b3(){if(YO)return ag;YO=1;var t=pj(),e=yj(),r=JB(),n=p3(),i=y3(),a=vr(),s=wj(),l=Sj(),c=1,f="[object Arguments]",p="[object Array]",h="[object Object]",m=Object.prototype,g=m.hasOwnProperty;function _(w,b,E,P,T,A){var x=a(w),O=a(b),C=x?p:i(w),N=O?p:i(b);C=C==f?h:C,N=N==f?h:N;var D=C==h,B=N==h,U=C==N;if(U&&s(w)){if(!s(b))return!1;x=!0,D=!1}if(U&&!D)return A||(A=new t),x||l(w)?e(w,b,E,P,T,A):r(w,b,C,E,P,T,A);if(!(E&c)){var L=D&&g.call(w,"__wrapped__"),j=B&&g.call(b,"__wrapped__");if(L||j){var X=L?w.value():w,K=j?b.value():b;return A||(A=new t),T(X,K,E,P,A)}}return U?(A||(A=new t),n(w,b,E,P,T,A)):!1}return ag=_,ag}var og,QO;function Pw(){if(QO)return og;QO=1;var t=b3(),e=fi();function r(n,i,a,s,l){return n===i?!0:n==null||i==null||!e(n)&&!e(i)?n!==n&&i!==i:t(n,i,a,s,r,l)}return og=r,og}var sg,ZO;function w3(){if(ZO)return sg;ZO=1;var t=pj(),e=Pw(),r=1,n=2;function i(a,s,l,c){var f=l.length,p=f,h=!c;if(a==null)return!p;for(a=Object(a);f--;){var m=l[f];if(h&&m[2]?m[1]!==a[m[0]]:!(m[0]in a))return!1}for(;++f<p;){m=l[f];var g=m[0],_=a[g],w=m[1];if(h&&m[2]){if(_===void 0&&!(g in a))return!1}else{var b=new t;if(c)var E=c(_,w,g,a,s,b);if(!(E===void 0?e(w,_,r|n,c,b):E))return!1}}return!0}return sg=i,sg}var ug,JO;function Oj(){if(JO)return ug;JO=1;var t=Xi();function e(r){return r===r&&!t(r)}return ug=e,ug}var lg,eA;function x3(){if(eA)return lg;eA=1;var t=Oj(),e=Td();function r(n){for(var i=e(n),a=i.length;a--;){var s=i[a],l=n[s];i[a]=[s,l,t(l)]}return i}return lg=r,lg}var cg,tA;function Aj(){if(tA)return cg;tA=1;function t(e,r){return function(n){return n==null?!1:n[e]===r&&(r!==void 0||e in Object(n))}}return cg=t,cg}var fg,rA;function S3(){if(rA)return fg;rA=1;var t=w3(),e=x3(),r=Aj();function n(i){var a=e(i);return a.length==1&&a[0][2]?r(a[0][0],a[0][1]):function(s){return s===i||t(s,i,a)}}return fg=n,fg}var dg,nA;function _3(){if(nA)return dg;nA=1;function t(e,r){return e!=null&&r in Object(e)}return dg=t,dg}var hg,iA;function E3(){if(iA)return hg;iA=1;var t=WR(),e=Ew(),r=vr(),n=Ow(),i=Aw(),a=Sd();function s(l,c,f){c=t(c,l);for(var p=-1,h=c.length,m=!1;++p<h;){var g=a(c[p]);if(!(m=l!=null&&f(l,g)))break;l=l[g]}return m||++p!=h?m:(h=l==null?0:l.length,!!h&&i(h)&&n(g,h)&&(r(l)||e(l)))}return hg=s,hg}var pg,aA;function O3(){if(aA)return pg;aA=1;var t=_3(),e=E3();function r(n,i){return n!=null&&e(n,i,t)}return pg=r,pg}var vg,oA;function A3(){if(oA)return vg;oA=1;var t=Pw(),e=HR(),r=O3(),n=lw(),i=Oj(),a=Aj(),s=Sd(),l=1,c=2;function f(p,h){return n(p)&&i(h)?a(s(p),h):function(m){var g=e(m,p);return g===void 0&&g===h?r(m,p):t(h,g,l|c)}}return vg=f,vg}var mg,sA;function ps(){if(sA)return mg;sA=1;function t(e){return e}return mg=t,mg}var gg,uA;function P3(){if(uA)return gg;uA=1;function t(e){return function(r){return r==null?void 0:r[e]}}return gg=t,gg}var yg,lA;function T3(){if(lA)return yg;lA=1;var t=vw();function e(r){return function(n){return t(n,r)}}return yg=e,yg}var bg,cA;function C3(){if(cA)return bg;cA=1;var t=P3(),e=T3(),r=lw(),n=Sd();function i(a){return r(a)?t(n(a)):e(a)}return bg=i,bg}var wg,fA;function Yi(){if(fA)return wg;fA=1;var t=S3(),e=A3(),r=ps(),n=vr(),i=C3();function a(s){return typeof s=="function"?s:s==null?r:typeof s=="object"?n(s)?e(s[0],s[1]):t(s):i(s)}return wg=a,wg}var xg,dA;function Pj(){if(dA)return xg;dA=1;function t(e,r,n,i){for(var a=e.length,s=n+(i?1:-1);i?s--:++s<a;)if(r(e[s],s,e))return s;return-1}return xg=t,xg}var Sg,hA;function k3(){if(hA)return Sg;hA=1;function t(e){return e!==e}return Sg=t,Sg}var _g,pA;function R3(){if(pA)return _g;pA=1;function t(e,r,n){for(var i=n-1,a=e.length;++i<a;)if(e[i]===r)return i;return-1}return _g=t,_g}var Eg,vA;function j3(){if(vA)return Eg;vA=1;var t=Pj(),e=k3(),r=R3();function n(i,a,s){return a===a?r(i,a,s):t(i,e,s)}return Eg=n,Eg}var Og,mA;function N3(){if(mA)return Og;mA=1;var t=j3();function e(r,n){var i=r==null?0:r.length;return!!i&&t(r,n,0)>-1}return Og=e,Og}var Ag,gA;function D3(){if(gA)return Ag;gA=1;function t(e,r,n){for(var i=-1,a=e==null?0:e.length;++i<a;)if(n(r,e[i]))return!0;return!1}return Ag=t,Ag}var Pg,yA;function I3(){if(yA)return Pg;yA=1;function t(){}return Pg=t,Pg}var Tg,bA;function M3(){if(bA)return Tg;bA=1;var t=Ej(),e=I3(),r=_w(),n=1/0,i=t&&1/r(new t([,-0]))[1]==n?function(a){return new t(a)}:e;return Tg=i,Tg}var Cg,wA;function L3(){if(wA)return Cg;wA=1;var t=vj(),e=N3(),r=D3(),n=gj(),i=M3(),a=_w(),s=200;function l(c,f,p){var h=-1,m=e,g=c.length,_=!0,w=[],b=w;if(p)_=!1,m=r;else if(g>=s){var E=f?null:i(c);if(E)return a(E);_=!1,m=n,b=new t}else b=f?[]:w;e:for(;++h<g;){var P=c[h],T=f?f(P):P;if(P=p||P!==0?P:0,_&&T===T){for(var A=b.length;A--;)if(b[A]===T)continue e;f&&b.push(T),w.push(P)}else m(b,T,p)||(b!==w&&b.push(T),w.push(P))}return w}return Cg=l,Cg}var kg,xA;function $3(){if(xA)return kg;xA=1;var t=Yi(),e=L3();function r(n,i){return n&&n.length?e(n,t(i,2)):[]}return kg=r,kg}var F3=$3();const SA=tt(F3);function Tj(t,e,r){return e===!0?SA(t,r):Ge(e)?SA(t,e):t}function Go(t){"@babel/helpers - typeof";return Go=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},Go(t)}var B3=["ref"];function _A(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Hn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?_A(Object(r),!0).forEach(function(n){Cd(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_A(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function z3(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function EA(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,kj(n.key),n)}}function G3(t,e,r){return e&&EA(t.prototype,e),r&&EA(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function U3(t,e,r){return e=Af(e),q3(t,Cj()?Reflect.construct(e,r||[],Af(t).constructor):e.apply(t,r))}function q3(t,e){if(e&&(Go(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return W3(t)}function W3(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Cj(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Cj=function(){return!!t})()}function Af(t){return Af=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Af(t)}function H3(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&U0(t,e)}function U0(t,e){return U0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},U0(t,e)}function Cd(t,e,r){return e=kj(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function kj(t){var e=V3(t,"string");return Go(e)=="symbol"?e:e+""}function V3(t,e){if(Go(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Go(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function K3(t,e){if(t==null)return{};var r=X3(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function X3(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function Y3(t){return t.value}function Q3(t,e){if(Q.isValidElement(t))return Q.cloneElement(t,e);if(typeof t=="function")return Q.createElement(t,e);e.ref;var r=K3(e,B3);return Q.createElement(Sw,r)}var OA=1,Eo=(function(t){function e(){var r;z3(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=U3(this,e,[].concat(i)),Cd(r,"lastBoundingBox",{width:-1,height:-1}),r}return H3(e,t),G3(e,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();return n.height=this.wrapperNode.offsetHeight,n.width=this.wrapperNode.offsetWidth,n}return null}},{key:"updateBBox",value:function(){var n=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>OA||Math.abs(i.height-this.lastBoundingBox.height)>OA)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Hn({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,s=i.align,l=i.verticalAlign,c=i.margin,f=i.chartWidth,p=i.chartHeight,h,m;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(s==="center"&&a==="vertical"){var g=this.getBBoxSnapshot();h={left:((f||0)-g.width)/2}}else h=s==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(l==="middle"){var _=this.getBBoxSnapshot();m={top:((p||0)-_.height)/2}}else m=l==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return Hn(Hn({},h),m)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,s=i.width,l=i.height,c=i.wrapperStyle,f=i.payloadUniqBy,p=i.payload,h=Hn(Hn({position:"absolute",width:s||"auto",height:l||"auto"},this.getDefaultPosition(c)),c);return Q.createElement("div",{className:"recharts-legend-wrapper",style:h,ref:function(g){n.wrapperNode=g}},Q3(a,Hn(Hn({},this.props),{},{payload:Tj(p,f,Y3)})))}}],[{key:"getWithHeight",value:function(n,i){var a=Hn(Hn({},this.defaultProps),n.props),s=a.layout;return s==="vertical"&&ge(n.props.height)?{height:n.props.height}:s==="horizontal"?{width:n.props.width||i}:null}}])})(I.PureComponent);Cd(Eo,"displayName","Legend");Cd(Eo,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Rg,AA;function Z3(){if(AA)return Rg;AA=1;var t=Al(),e=Ew(),r=vr(),n=t?t.isConcatSpreadable:void 0;function i(a){return r(a)||e(a)||!!(n&&a&&a[n])}return Rg=i,Rg}var jg,PA;function Rj(){if(PA)return jg;PA=1;var t=bj(),e=Z3();function r(n,i,a,s,l){var c=-1,f=n.length;for(a||(a=e),l||(l=[]);++c<f;){var p=n[c];i>0&&a(p)?i>1?r(p,i-1,a,s,l):t(l,p):s||(l[l.length]=p)}return l}return jg=r,jg}var Ng,TA;function J3(){if(TA)return Ng;TA=1;function t(e){return function(r,n,i){for(var a=-1,s=Object(r),l=i(r),c=l.length;c--;){var f=l[e?c:++a];if(n(s[f],f,s)===!1)break}return r}}return Ng=t,Ng}var Dg,CA;function ez(){if(CA)return Dg;CA=1;var t=J3(),e=t();return Dg=e,Dg}var Ig,kA;function jj(){if(kA)return Ig;kA=1;var t=ez(),e=Td();function r(n,i){return n&&t(n,i,e)}return Ig=r,Ig}var Mg,RA;function tz(){if(RA)return Mg;RA=1;var t=Tl();function e(r,n){return function(i,a){if(i==null)return i;if(!t(i))return r(i,a);for(var s=i.length,l=n?s:-1,c=Object(i);(n?l--:++l<s)&&a(c[l],l,c)!==!1;);return i}}return Mg=e,Mg}var Lg,jA;function Tw(){if(jA)return Lg;jA=1;var t=jj(),e=tz(),r=e(t);return Lg=r,Lg}var $g,NA;function Nj(){if(NA)return $g;NA=1;var t=Tw(),e=Tl();function r(n,i){var a=-1,s=e(n)?Array(n.length):[];return t(n,function(l,c,f){s[++a]=i(l,c,f)}),s}return $g=r,$g}var Fg,DA;function rz(){if(DA)return Fg;DA=1;function t(e,r){var n=e.length;for(e.sort(r);n--;)e[n]=e[n].value;return e}return Fg=t,Fg}var Bg,IA;function nz(){if(IA)return Bg;IA=1;var t=ds();function e(r,n){if(r!==n){var i=r!==void 0,a=r===null,s=r===r,l=t(r),c=n!==void 0,f=n===null,p=n===n,h=t(n);if(!f&&!h&&!l&&r>n||l&&c&&p&&!f&&!h||a&&c&&p||!i&&p||!s)return 1;if(!a&&!l&&!h&&r<n||h&&i&&s&&!a&&!l||f&&i&&s||!c&&s||!p)return-1}return 0}return Bg=e,Bg}var zg,MA;function iz(){if(MA)return zg;MA=1;var t=nz();function e(r,n,i){for(var a=-1,s=r.criteria,l=n.criteria,c=s.length,f=i.length;++a<c;){var p=t(s[a],l[a]);if(p){if(a>=f)return p;var h=i[a];return p*(h=="desc"?-1:1)}}return r.index-n.index}return zg=e,zg}var Gg,LA;function az(){if(LA)return Gg;LA=1;var t=pw(),e=vw(),r=Yi(),n=Nj(),i=rz(),a=xj(),s=iz(),l=ps(),c=vr();function f(p,h,m){h.length?h=t(h,function(w){return c(w)?function(b){return e(b,w.length===1?w[0]:w)}:w}):h=[l];var g=-1;h=t(h,a(r));var _=n(p,function(w,b,E){var P=t(h,function(T){return T(w)});return{criteria:P,index:++g,value:w}});return i(_,function(w,b){return s(w,b,m)})}return Gg=f,Gg}var Ug,$A;function oz(){if($A)return Ug;$A=1;function t(e,r,n){switch(n.length){case 0:return e.call(r);case 1:return e.call(r,n[0]);case 2:return e.call(r,n[0],n[1]);case 3:return e.call(r,n[0],n[1],n[2])}return e.apply(r,n)}return Ug=t,Ug}var qg,FA;function sz(){if(FA)return qg;FA=1;var t=oz(),e=Math.max;function r(n,i,a){return i=e(i===void 0?n.length-1:i,0),function(){for(var s=arguments,l=-1,c=e(s.length-i,0),f=Array(c);++l<c;)f[l]=s[i+l];l=-1;for(var p=Array(i+1);++l<i;)p[l]=s[l];return p[i]=a(f),t(n,this,p)}}return qg=r,qg}var Wg,BA;function uz(){if(BA)return Wg;BA=1;function t(e){return function(){return e}}return Wg=t,Wg}var Hg,zA;function Dj(){if(zA)return Hg;zA=1;var t=Ba(),e=(function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch{}})();return Hg=e,Hg}var Vg,GA;function lz(){if(GA)return Vg;GA=1;var t=uz(),e=Dj(),r=ps(),n=e?function(i,a){return e(i,"toString",{configurable:!0,enumerable:!1,value:t(a),writable:!0})}:r;return Vg=n,Vg}var Kg,UA;function cz(){if(UA)return Kg;UA=1;var t=800,e=16,r=Date.now;function n(i){var a=0,s=0;return function(){var l=r(),c=e-(l-s);if(s=l,c>0){if(++a>=t)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return Kg=n,Kg}var Xg,qA;function fz(){if(qA)return Xg;qA=1;var t=lz(),e=cz(),r=e(t);return Xg=r,Xg}var Yg,WA;function dz(){if(WA)return Yg;WA=1;var t=ps(),e=sz(),r=fz();function n(i,a){return r(e(i,a,t),i+"")}return Yg=n,Yg}var Qg,HA;function kd(){if(HA)return Qg;HA=1;var t=fw(),e=Tl(),r=Ow(),n=Xi();function i(a,s,l){if(!n(l))return!1;var c=typeof s;return(c=="number"?e(l)&&r(s,l.length):c=="string"&&s in l)?t(l[s],a):!1}return Qg=i,Qg}var Zg,VA;function hz(){if(VA)return Zg;VA=1;var t=Rj(),e=az(),r=dz(),n=kd(),i=r(function(a,s){if(a==null)return[];var l=s.length;return l>1&&n(a,s[0],s[1])?s=[]:l>2&&n(s[0],s[1],s[2])&&(s=[s[0]]),e(a,t(s,1),[])});return Zg=i,Zg}var pz=hz();const Cw=tt(pz);function Lu(t){"@babel/helpers - typeof";return Lu=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},Lu(t)}function q0(){return q0=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},q0.apply(this,arguments)}function vz(t,e){return bz(t)||yz(t,e)||gz(t,e)||mz()}function mz(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
143
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gz(t,e){if(t){if(typeof t=="string")return KA(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return KA(t,e)}}function KA(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function yz(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,l=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return l}}function bz(t){if(Array.isArray(t))return t}function XA(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Jg(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?XA(Object(r),!0).forEach(function(n){wz(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):XA(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function wz(t,e,r){return e=xz(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function xz(t){var e=Sz(t,"string");return Lu(e)=="symbol"?e:e+""}function Sz(t,e){if(Lu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Lu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function _z(t){return Array.isArray(t)&&Tt(t[0])&&Tt(t[1])?t.join(" ~ "):t}var Ez=function(e){var r=e.separator,n=r===void 0?" : ":r,i=e.contentStyle,a=i===void 0?{}:i,s=e.itemStyle,l=s===void 0?{}:s,c=e.labelStyle,f=c===void 0?{}:c,p=e.payload,h=e.formatter,m=e.itemSorter,g=e.wrapperClassName,_=e.labelClassName,w=e.label,b=e.labelFormatter,E=e.accessibilityLayer,P=E===void 0?!1:E,T=function(){if(p&&p.length){var L={padding:0,margin:0},j=(m?Cw(p,m):p).map(function(X,K){if(X.type==="none")return null;var G=Jg({display:"block",paddingTop:4,paddingBottom:4,color:X.color||"#000"},l),M=X.formatter||h||_z,V=X.value,J=X.name,ee=V,F=J;if(M&&ee!=null&&F!=null){var H=M(V,J,X,K,p);if(Array.isArray(H)){var te=vz(H,2);ee=te[0],F=te[1]}else ee=H}return Q.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(K),style:G},Tt(F)?Q.createElement("span",{className:"recharts-tooltip-item-name"},F):null,Tt(F)?Q.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,Q.createElement("span",{className:"recharts-tooltip-item-value"},ee),Q.createElement("span",{className:"recharts-tooltip-item-unit"},X.unit||""))});return Q.createElement("ul",{className:"recharts-tooltip-item-list",style:L},j)}return null},A=Jg({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),x=Jg({margin:0},f),O=!Ke(w),C=O?w:"",N=Ve("recharts-default-tooltip",g),D=Ve("recharts-tooltip-label",_);O&&b&&p!==void 0&&p!==null&&(C=b(w,p));var B=P?{role:"status","aria-live":"assertive"}:{};return Q.createElement("div",q0({className:N,style:A},B),Q.createElement("p",{className:D,style:x},Q.isValidElement(C)?C:"".concat(C)),T())};function $u(t){"@babel/helpers - typeof";return $u=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},$u(t)}function Kc(t,e,r){return e=Oz(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Oz(t){var e=Az(t,"string");return $u(e)=="symbol"?e:e+""}function Az(t,e){if($u(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if($u(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var au="recharts-tooltip-wrapper",Pz={visibility:"hidden"};function Tz(t){var e=t.coordinate,r=t.translateX,n=t.translateY;return Ve(au,Kc(Kc(Kc(Kc({},"".concat(au,"-right"),ge(r)&&e&&ge(e.x)&&r>=e.x),"".concat(au,"-left"),ge(r)&&e&&ge(e.x)&&r<e.x),"".concat(au,"-bottom"),ge(n)&&e&&ge(e.y)&&n>=e.y),"".concat(au,"-top"),ge(n)&&e&&ge(e.y)&&n<e.y))}function YA(t){var e=t.allowEscapeViewBox,r=t.coordinate,n=t.key,i=t.offsetTopLeft,a=t.position,s=t.reverseDirection,l=t.tooltipDimension,c=t.viewBox,f=t.viewBoxDimension;if(a&&ge(a[n]))return a[n];var p=r[n]-l-i,h=r[n]+i;if(e[n])return s[n]?p:h;if(s[n]){var m=p,g=c[n];return m<g?Math.max(h,c[n]):Math.max(p,c[n])}var _=h+l,w=c[n]+f;return _>w?Math.max(p,c[n]):Math.max(h,c[n])}function Cz(t){var e=t.translateX,r=t.translateY,n=t.useTranslate3d;return{transform:n?"translate3d(".concat(e,"px, ").concat(r,"px, 0)"):"translate(".concat(e,"px, ").concat(r,"px)")}}function kz(t){var e=t.allowEscapeViewBox,r=t.coordinate,n=t.offsetTopLeft,i=t.position,a=t.reverseDirection,s=t.tooltipBox,l=t.useTranslate3d,c=t.viewBox,f,p,h;return s.height>0&&s.width>0&&r?(p=YA({allowEscapeViewBox:e,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:s.width,viewBox:c,viewBoxDimension:c.width}),h=YA({allowEscapeViewBox:e,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:s.height,viewBox:c,viewBoxDimension:c.height}),f=Cz({translateX:p,translateY:h,useTranslate3d:l})):f=Pz,{cssProperties:f,cssClasses:Tz({translateX:p,translateY:h,coordinate:r})}}function Uo(t){"@babel/helpers - typeof";return Uo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Uo(t)}function QA(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ZA(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?QA(Object(r),!0).forEach(function(n){H0(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):QA(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Rz(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jz(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Mj(n.key),n)}}function Nz(t,e,r){return e&&jz(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Dz(t,e,r){return e=Pf(e),Iz(t,Ij()?Reflect.construct(e,r||[],Pf(t).constructor):e.apply(t,r))}function Iz(t,e){if(e&&(Uo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mz(t)}function Mz(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ij(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ij=function(){return!!t})()}function Pf(t){return Pf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Pf(t)}function Lz(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&W0(t,e)}function W0(t,e){return W0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},W0(t,e)}function H0(t,e,r){return e=Mj(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mj(t){var e=$z(t,"string");return Uo(e)=="symbol"?e:e+""}function $z(t,e){if(Uo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Uo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var JA=1,Fz=(function(t){function e(){var r;Rz(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=Dz(this,e,[].concat(i)),H0(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),H0(r,"handleKeyDown",function(s){if(s.key==="Escape"){var l,c,f,p;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(l=(c=r.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&l!==void 0?l:0,y:(f=(p=r.props.coordinate)===null||p===void 0?void 0:p.y)!==null&&f!==void 0?f:0}})}}),r}return Lz(e,t),Nz(e,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>JA||Math.abs(n.height-this.state.lastBoundingBox.height)>JA)&&this.setState({lastBoundingBox:{width:n.width,height:n.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(){var n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,a=i.active,s=i.allowEscapeViewBox,l=i.animationDuration,c=i.animationEasing,f=i.children,p=i.coordinate,h=i.hasPayload,m=i.isAnimationActive,g=i.offset,_=i.position,w=i.reverseDirection,b=i.useTranslate3d,E=i.viewBox,P=i.wrapperStyle,T=kz({allowEscapeViewBox:s,coordinate:p,offsetTopLeft:g,position:_,reverseDirection:w,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:E}),A=T.cssClasses,x=T.cssProperties,O=ZA(ZA({transition:m&&a?"transform ".concat(l,"ms ").concat(c):void 0},x),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&h?"visible":"hidden",position:"absolute",top:0,left:0},P);return Q.createElement("div",{tabIndex:-1,className:A,style:O,ref:function(N){n.wrapperNode=N}},f)}}])})(I.PureComponent),Bz=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Cl={isSsr:Bz()};function qo(t){"@babel/helpers - typeof";return qo=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},qo(t)}function eP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function tP(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?eP(Object(r),!0).forEach(function(n){kw(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):eP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function zz(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gz(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,$j(n.key),n)}}function Uz(t,e,r){return e&&Gz(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function qz(t,e,r){return e=Tf(e),Wz(t,Lj()?Reflect.construct(e,r||[],Tf(t).constructor):e.apply(t,r))}function Wz(t,e){if(e&&(qo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hz(t)}function Hz(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Lj(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Lj=function(){return!!t})()}function Tf(t){return Tf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Tf(t)}function Vz(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&V0(t,e)}function V0(t,e){return V0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},V0(t,e)}function kw(t,e,r){return e=$j(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $j(t){var e=Kz(t,"string");return qo(e)=="symbol"?e:e+""}function Kz(t,e){if(qo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(qo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Xz(t){return t.dataKey}function Yz(t,e){return Q.isValidElement(t)?Q.cloneElement(t,e):typeof t=="function"?Q.createElement(t,e):Q.createElement(Ez,e)}var tn=(function(t){function e(){return zz(this,e),qz(this,e,arguments)}return Vz(e,t),Uz(e,[{key:"render",value:function(){var n=this,i=this.props,a=i.active,s=i.allowEscapeViewBox,l=i.animationDuration,c=i.animationEasing,f=i.content,p=i.coordinate,h=i.filterNull,m=i.isAnimationActive,g=i.offset,_=i.payload,w=i.payloadUniqBy,b=i.position,E=i.reverseDirection,P=i.useTranslate3d,T=i.viewBox,A=i.wrapperStyle,x=_??[];h&&x.length&&(x=Tj(_.filter(function(C){return C.value!=null&&(C.hide!==!0||n.props.includeHidden)}),w,Xz));var O=x.length>0;return Q.createElement(Fz,{allowEscapeViewBox:s,animationDuration:l,animationEasing:c,isAnimationActive:m,active:a,coordinate:p,hasPayload:O,offset:g,position:b,reverseDirection:E,useTranslate3d:P,viewBox:T,wrapperStyle:A},Yz(f,tP(tP({},this.props),{},{payload:x})))}}])})(I.PureComponent);kw(tn,"displayName","Tooltip");kw(tn,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Cl.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 ey,rP;function Qz(){if(rP)return ey;rP=1;var t=In(),e=function(){return t.Date.now()};return ey=e,ey}var ty,nP;function Zz(){if(nP)return ty;nP=1;var t=/\s/;function e(r){for(var n=r.length;n--&&t.test(r.charAt(n)););return n}return ty=e,ty}var ry,iP;function Jz(){if(iP)return ry;iP=1;var t=Zz(),e=/^\s+/;function r(n){return n&&n.slice(0,t(n)+1).replace(e,"")}return ry=r,ry}var ny,aP;function Fj(){if(aP)return ny;aP=1;var t=Jz(),e=Xi(),r=ds(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt;function c(f){if(typeof f=="number")return f;if(r(f))return n;if(e(f)){var p=typeof f.valueOf=="function"?f.valueOf():f;f=e(p)?p+"":p}if(typeof f!="string")return f===0?f:+f;f=t(f);var h=a.test(f);return h||s.test(f)?l(f.slice(2),h?2:8):i.test(f)?n:+f}return ny=c,ny}var iy,oP;function eG(){if(oP)return iy;oP=1;var t=Xi(),e=Qz(),r=Fj(),n="Expected a function",i=Math.max,a=Math.min;function s(l,c,f){var p,h,m,g,_,w,b=0,E=!1,P=!1,T=!0;if(typeof l!="function")throw new TypeError(n);c=r(c)||0,t(f)&&(E=!!f.leading,P="maxWait"in f,m=P?i(r(f.maxWait)||0,c):m,T="trailing"in f?!!f.trailing:T);function A(j){var X=p,K=h;return p=h=void 0,b=j,g=l.apply(K,X),g}function x(j){return b=j,_=setTimeout(N,c),E?A(j):g}function O(j){var X=j-w,K=j-b,G=c-X;return P?a(G,m-K):G}function C(j){var X=j-w,K=j-b;return w===void 0||X>=c||X<0||P&&K>=m}function N(){var j=e();if(C(j))return D(j);_=setTimeout(N,O(j))}function D(j){return _=void 0,T&&p?A(j):(p=h=void 0,g)}function B(){_!==void 0&&clearTimeout(_),b=0,p=w=h=_=void 0}function U(){return _===void 0?g:D(e())}function L(){var j=e(),X=C(j);if(p=arguments,h=this,w=j,X){if(_===void 0)return x(w);if(P)return clearTimeout(_),_=setTimeout(N,c),A(w)}return _===void 0&&(_=setTimeout(N,c)),g}return L.cancel=B,L.flush=U,L}return iy=s,iy}var ay,sP;function tG(){if(sP)return ay;sP=1;var t=eG(),e=Xi(),r="Expected a function";function n(i,a,s){var l=!0,c=!0;if(typeof i!="function")throw new TypeError(r);return e(s)&&(l="leading"in s?!!s.leading:l,c="trailing"in s?!!s.trailing:c),t(i,a,{leading:l,maxWait:a,trailing:c})}return ay=n,ay}var rG=tG();const Bj=tt(rG);function Fu(t){"@babel/helpers - typeof";return Fu=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},Fu(t)}function uP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Xc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?uP(Object(r),!0).forEach(function(n){nG(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):uP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function nG(t,e,r){return e=iG(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function iG(t){var e=aG(t,"string");return Fu(e)=="symbol"?e:e+""}function aG(t,e){if(Fu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Fu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function oG(t,e){return cG(t)||lG(t,e)||uG(t,e)||sG()}function sG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
144
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uG(t,e){if(t){if(typeof t=="string")return lP(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lP(t,e)}}function lP(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function lG(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,l=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return l}}function cG(t){if(Array.isArray(t))return t}var cP=I.forwardRef(function(t,e){var r=t.aspect,n=t.initialDimension,i=n===void 0?{width:-1,height:-1}:n,a=t.width,s=a===void 0?"100%":a,l=t.height,c=l===void 0?"100%":l,f=t.minWidth,p=f===void 0?0:f,h=t.minHeight,m=t.maxHeight,g=t.children,_=t.debounce,w=_===void 0?0:_,b=t.id,E=t.className,P=t.onResize,T=t.style,A=T===void 0?{}:T,x=I.useRef(null),O=I.useRef();O.current=P,I.useImperativeHandle(e,function(){return Object.defineProperty(x.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),x.current},configurable:!0})});var C=I.useState({containerWidth:i.width,containerHeight:i.height}),N=oG(C,2),D=N[0],B=N[1],U=I.useCallback(function(j,X){B(function(K){var G=Math.round(j),M=Math.round(X);return K.containerWidth===G&&K.containerHeight===M?K:{containerWidth:G,containerHeight:M}})},[]);I.useEffect(function(){var j=function(J){var ee,F=J[0].contentRect,H=F.width,te=F.height;U(H,te),(ee=O.current)===null||ee===void 0||ee.call(O,H,te)};w>0&&(j=Bj(j,w,{trailing:!0,leading:!1}));var X=new ResizeObserver(j),K=x.current.getBoundingClientRect(),G=K.width,M=K.height;return U(G,M),X.observe(x.current),function(){X.disconnect()}},[U,w]);var L=I.useMemo(function(){var j=D.containerWidth,X=D.containerHeight;if(j<0||X<0)return null;ja(ba(s)||ba(c),`The width(%s) and height(%s) are both fixed numbers,
145
+ maybe you don't need to use a ResponsiveContainer.`,s,c),ja(!r||r>0,"The aspect(%s) must be greater than zero.",r);var K=ba(s)?j:s,G=ba(c)?X:c;r&&r>0&&(K?G=K/r:G&&(K=G*r),m&&G>m&&(G=m)),ja(K>0||G>0,`The width(%s) and height(%s) of chart should be greater than 0,
146
+ please check the style of container, or the props width(%s) and height(%s),
147
+ or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
148
+ height and width.`,K,G,s,c,p,h,r);var M=!Array.isArray(g)&&ti(g.type).endsWith("Chart");return Q.Children.map(g,function(V){return Q.isValidElement(V)?I.cloneElement(V,Xc({width:K,height:G},M?{style:Xc({height:"100%",width:"100%",maxHeight:G,maxWidth:K},V.props.style)}:{})):V})},[r,g,c,m,h,p,D,s]);return Q.createElement("div",{id:b?"".concat(b):void 0,className:Ve("recharts-responsive-container",E),style:Xc(Xc({},A),{},{width:s,height:c,minWidth:p,minHeight:h,maxHeight:m}),ref:x},L)}),zj=function(e){return null};zj.displayName="Cell";function Bu(t){"@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(t)}function fP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function K0(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?fP(Object(r),!0).forEach(function(n){fG(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):fP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function fG(t,e,r){return e=dG(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function dG(t){var e=hG(t,"string");return Bu(e)=="symbol"?e:e+""}function hG(t,e){if(Bu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Bu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var mo={widthCache:{},cacheCount:0},pG=2e3,vG={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},dP="recharts_measurement_span";function mG(t){var e=K0({},t);return Object.keys(e).forEach(function(r){e[r]||delete e[r]}),e}var Au=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e==null||Cl.isSsr)return{width:0,height:0};var n=mG(r),i=JSON.stringify({text:e,copyStyle:n});if(mo.widthCache[i])return mo.widthCache[i];try{var a=document.getElementById(dP);a||(a=document.createElement("span"),a.setAttribute("id",dP),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var s=K0(K0({},vG),n);Object.assign(a.style,s),a.textContent="".concat(e);var l=a.getBoundingClientRect(),c={width:l.width,height:l.height};return mo.widthCache[i]=c,++mo.cacheCount>pG&&(mo.cacheCount=0,mo.widthCache={}),c}catch{return{width:0,height:0}}},gG=function(e){return{top:e.top+window.scrollY-document.documentElement.clientTop,left:e.left+window.scrollX-document.documentElement.clientLeft}};function zu(t){"@babel/helpers - typeof";return zu=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},zu(t)}function Cf(t,e){return xG(t)||wG(t,e)||bG(t,e)||yG()}function yG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
149
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bG(t,e){if(t){if(typeof t=="string")return hP(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hP(t,e)}}function hP(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function wG(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,l=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return l}}function xG(t){if(Array.isArray(t))return t}function SG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pP(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,EG(n.key),n)}}function _G(t,e,r){return e&&pP(t.prototype,e),r&&pP(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function EG(t){var e=OG(t,"string");return zu(e)=="symbol"?e:e+""}function OG(t,e){if(zu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(zu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var vP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,mP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,AG=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,PG=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,Gj={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},TG=Object.keys(Gj),wo="NaN";function CG(t,e){return t*Gj[e]}var Yc=(function(){function t(e,r){SG(this,t),this.num=e,this.unit=r,this.num=e,this.unit=r,Number.isNaN(e)&&(this.unit=""),r!==""&&!AG.test(r)&&(this.num=NaN,this.unit=""),TG.includes(r)&&(this.num=CG(e,r),this.unit="px")}return _G(t,[{key:"add",value:function(r){return this.unit!==r.unit?new t(NaN,""):new t(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new t(NaN,""):new t(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new t(NaN,""):new t(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new t(NaN,""):new t(this.num/r.num,this.unit||r.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(r){var n,i=(n=PG.exec(r))!==null&&n!==void 0?n:[],a=Cf(i,3),s=a[1],l=a[2];return new t(parseFloat(s),l??"")}}])})();function Uj(t){if(t.includes(wo))return wo;for(var e=t;e.includes("*")||e.includes("/");){var r,n=(r=vP.exec(e))!==null&&r!==void 0?r:[],i=Cf(n,4),a=i[1],s=i[2],l=i[3],c=Yc.parse(a??""),f=Yc.parse(l??""),p=s==="*"?c.multiply(f):c.divide(f);if(p.isNaN())return wo;e=e.replace(vP,p.toString())}for(;e.includes("+")||/.-\d+(?:\.\d+)?/.test(e);){var h,m=(h=mP.exec(e))!==null&&h!==void 0?h:[],g=Cf(m,4),_=g[1],w=g[2],b=g[3],E=Yc.parse(_??""),P=Yc.parse(b??""),T=w==="+"?E.add(P):E.subtract(P);if(T.isNaN())return wo;e=e.replace(mP,T.toString())}return e}var gP=/\(([^()]*)\)/;function kG(t){for(var e=t;e.includes("(");){var r=gP.exec(e),n=Cf(r,2),i=n[1];e=e.replace(gP,Uj(i))}return e}function RG(t){var e=t.replace(/\s+/g,"");return e=kG(e),e=Uj(e),e}function jG(t){try{return RG(t)}catch{return wo}}function oy(t){var e=jG(t.slice(5,-1));return e===wo?"":e}var NG=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],DG=["dx","dy","angle","className","breakAll"];function X0(){return X0=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},X0.apply(this,arguments)}function yP(t,e){if(t==null)return{};var r=IG(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function IG(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function bP(t,e){return FG(t)||$G(t,e)||LG(t,e)||MG()}function MG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
150
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LG(t,e){if(t){if(typeof t=="string")return wP(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wP(t,e)}}function wP(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function $G(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,l=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return l}}function FG(t){if(Array.isArray(t))return t}var qj=/[ \f\n\r\t\v\u2028\u2029]+/,Wj=function(e){var r=e.children,n=e.breakAll,i=e.style;try{var a=[];Ke(r)||(n?a=r.toString().split(""):a=r.toString().split(qj));var s=a.map(function(c){return{word:c,width:Au(c,i).width}}),l=n?0:Au(" ",i).width;return{wordsWithComputedWidth:s,spaceWidth:l}}catch{return null}},BG=function(e,r,n,i,a){var s=e.maxLines,l=e.children,c=e.style,f=e.breakAll,p=ge(s),h=l,m=function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return K.reduce(function(G,M){var V=M.word,J=M.width,ee=G[G.length-1];if(ee&&(i==null||a||ee.width+J+n<Number(i)))ee.words.push(V),ee.width+=J+n;else{var F={words:[V],width:J};G.push(F)}return G},[])},g=m(r),_=function(K){return K.reduce(function(G,M){return G.width>M.width?G:M})};if(!p)return g;for(var w="…",b=function(K){var G=h.slice(0,K),M=Wj({breakAll:f,style:c,children:G+w}).wordsWithComputedWidth,V=m(M),J=V.length>s||_(V).width>Number(i);return[J,V]},E=0,P=h.length-1,T=0,A;E<=P&&T<=h.length-1;){var x=Math.floor((E+P)/2),O=x-1,C=b(O),N=bP(C,2),D=N[0],B=N[1],U=b(x),L=bP(U,1),j=L[0];if(!D&&!j&&(E=x+1),D&&j&&(P=x-1),!D&&j){A=B;break}T++}return A||g},xP=function(e){var r=Ke(e)?[]:e.toString().split(qj);return[{words:r}]},zG=function(e){var r=e.width,n=e.scaleToFit,i=e.children,a=e.style,s=e.breakAll,l=e.maxLines;if((r||n)&&!Cl.isSsr){var c,f,p=Wj({breakAll:s,children:i,style:a});if(p){var h=p.wordsWithComputedWidth,m=p.spaceWidth;c=h,f=m}else return xP(i);return BG({breakAll:s,children:i,maxLines:l,style:a},c,f,r,n)}return xP(i)},SP="#808080",kf=function(e){var r=e.x,n=r===void 0?0:r,i=e.y,a=i===void 0?0:i,s=e.lineHeight,l=s===void 0?"1em":s,c=e.capHeight,f=c===void 0?"0.71em":c,p=e.scaleToFit,h=p===void 0?!1:p,m=e.textAnchor,g=m===void 0?"start":m,_=e.verticalAnchor,w=_===void 0?"end":_,b=e.fill,E=b===void 0?SP:b,P=yP(e,NG),T=I.useMemo(function(){return zG({breakAll:P.breakAll,children:P.children,maxLines:P.maxLines,scaleToFit:h,style:P.style,width:P.width})},[P.breakAll,P.children,P.maxLines,h,P.style,P.width]),A=P.dx,x=P.dy,O=P.angle,C=P.className,N=P.breakAll,D=yP(P,DG);if(!Tt(n)||!Tt(a))return null;var B=n+(ge(A)?A:0),U=a+(ge(x)?x:0),L;switch(w){case"start":L=oy("calc(".concat(f,")"));break;case"middle":L=oy("calc(".concat((T.length-1)/2," * -").concat(l," + (").concat(f," / 2))"));break;default:L=oy("calc(".concat(T.length-1," * -").concat(l,")"));break}var j=[];if(h){var X=T[0].width,K=P.width;j.push("scale(".concat((ge(K)?K/X:1)/X,")"))}return O&&j.push("rotate(".concat(O,", ").concat(B,", ").concat(U,")")),j.length&&(D.transform=j.join(" ")),Q.createElement("text",X0({},Qe(D,!0),{x:B,y:U,className:Ve("recharts-text",C),textAnchor:g,fill:E.includes("url")?SP:E}),T.map(function(G,M){var V=G.words.join(N?"":" ");return Q.createElement("tspan",{x:B,dy:M===0?L:l,key:"".concat(V,"-").concat(M)},V)}))};function Hi(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function GG(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Rw(t){let e,r,n;t.length!==2?(e=Hi,r=(l,c)=>Hi(t(l),c),n=(l,c)=>t(l)-c):(e=t===Hi||t===GG?t:UG,r=t,n=t);function i(l,c,f=0,p=l.length){if(f<p){if(e(c,c)!==0)return p;do{const h=f+p>>>1;r(l[h],c)<0?f=h+1:p=h}while(f<p)}return f}function a(l,c,f=0,p=l.length){if(f<p){if(e(c,c)!==0)return p;do{const h=f+p>>>1;r(l[h],c)<=0?f=h+1:p=h}while(f<p)}return f}function s(l,c,f=0,p=l.length){const h=i(l,c,f,p-1);return h>f&&n(l[h-1],c)>-n(l[h],c)?h-1:h}return{left:i,center:s,right:a}}function UG(){return 0}function Hj(t){return t===null?NaN:+t}function*qG(t,e){for(let r of t)r!=null&&(r=+r)>=r&&(yield r)}const WG=Rw(Hi),kl=WG.right;Rw(Hj).center;class _P extends Map{constructor(e,r=KG){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(const[n,i]of e)this.set(n,i)}get(e){return super.get(EP(this,e))}has(e){return super.has(EP(this,e))}set(e,r){return super.set(HG(this,e),r)}delete(e){return super.delete(VG(this,e))}}function EP({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):r}function HG({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function VG({_intern:t,_key:e},r){const n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function KG(t){return t!==null&&typeof t=="object"?t.valueOf():t}function XG(t=Hi){if(t===Hi)return Vj;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,r)=>{const n=t(e,r);return n||n===0?n:(t(r,r)===0)-(t(e,e)===0)}}function Vj(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}const YG=Math.sqrt(50),QG=Math.sqrt(10),ZG=Math.sqrt(2);function Rf(t,e,r){const n=(e-t)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=a>=YG?10:a>=QG?5:a>=ZG?2:1;let l,c,f;return i<0?(f=Math.pow(10,-i)/s,l=Math.round(t*f),c=Math.round(e*f),l/f<t&&++l,c/f>e&&--c,f=-f):(f=Math.pow(10,i)*s,l=Math.round(t/f),c=Math.round(e/f),l*f<t&&++l,c*f>e&&--c),c<l&&.5<=r&&r<2?Rf(t,e,r*2):[l,c,f]}function Y0(t,e,r){if(e=+e,t=+t,r=+r,!(r>0))return[];if(t===e)return[t];const n=e<t,[i,a,s]=n?Rf(e,t,r):Rf(t,e,r);if(!(a>=i))return[];const l=a-i+1,c=new Array(l);if(n)if(s<0)for(let f=0;f<l;++f)c[f]=(a-f)/-s;else for(let f=0;f<l;++f)c[f]=(a-f)*s;else if(s<0)for(let f=0;f<l;++f)c[f]=(i+f)/-s;else for(let f=0;f<l;++f)c[f]=(i+f)*s;return c}function Q0(t,e,r){return e=+e,t=+t,r=+r,Rf(t,e,r)[2]}function Z0(t,e,r){e=+e,t=+t,r=+r;const n=e<t,i=n?Q0(e,t,r):Q0(t,e,r);return(n?-1:1)*(i<0?1/-i:i)}function OP(t,e){let r;for(const n of t)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function AP(t,e){let r;for(const n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function Kj(t,e,r=0,n=1/0,i){if(e=Math.floor(e),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(t.length-1,n)),!(r<=e&&e<=n))return t;for(i=i===void 0?Vj:XG(i);n>r;){if(n-r>600){const c=n-r+1,f=e-r+1,p=Math.log(c),h=.5*Math.exp(2*p/3),m=.5*Math.sqrt(p*h*(c-h)/c)*(f-c/2<0?-1:1),g=Math.max(r,Math.floor(e-f*h/c+m)),_=Math.min(n,Math.floor(e+(c-f)*h/c+m));Kj(t,e,g,_,i)}const a=t[e];let s=r,l=n;for(ou(t,r,e),i(t[n],a)>0&&ou(t,r,n);s<l;){for(ou(t,s,l),++s,--l;i(t[s],a)<0;)++s;for(;i(t[l],a)>0;)--l}i(t[r],a)===0?ou(t,r,l):(++l,ou(t,l,n)),l<=e&&(r=l+1),e<=l&&(n=l-1)}return t}function ou(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function JG(t,e,r){if(t=Float64Array.from(qG(t)),!(!(n=t.length)||isNaN(e=+e))){if(e<=0||n<2)return AP(t);if(e>=1)return OP(t);var n,i=(n-1)*e,a=Math.floor(i),s=OP(Kj(t,a).subarray(0,a+1)),l=AP(t.subarray(a+1));return s+(l-s)*(i-a)}}function eU(t,e,r=Hj){if(!(!(n=t.length)||isNaN(e=+e))){if(e<=0||n<2)return+r(t[0],0,t);if(e>=1)return+r(t[n-1],n-1,t);var n,i=(n-1)*e,a=Math.floor(i),s=+r(t[a],a,t),l=+r(t[a+1],a+1,t);return s+(l-s)*(i-a)}}function tU(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((e-t)/r))|0,a=new Array(i);++n<i;)a[n]=t+n*r;return a}function zr(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function di(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const J0=Symbol("implicit");function jw(){var t=new _P,e=[],r=[],n=J0;function i(a){let s=t.get(a);if(s===void 0){if(n!==J0)return n;t.set(a,s=e.push(a)-1)}return r[s%r.length]}return i.domain=function(a){if(!arguments.length)return e.slice();e=[],t=new _P;for(const s of a)t.has(s)||t.set(s,e.push(s)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return jw(e,r).unknown(n)},zr.apply(i,arguments),i}function Gu(){var t=jw().unknown(void 0),e=t.domain,r=t.range,n=0,i=1,a,s,l=!1,c=0,f=0,p=.5;delete t.unknown;function h(){var m=e().length,g=i<n,_=g?i:n,w=g?n:i;a=(w-_)/Math.max(1,m-c+f*2),l&&(a=Math.floor(a)),_+=(w-_-a*(m-c))*p,s=a*(1-c),l&&(_=Math.round(_),s=Math.round(s));var b=tU(m).map(function(E){return _+a*E});return r(g?b.reverse():b)}return t.domain=function(m){return arguments.length?(e(m),h()):e()},t.range=function(m){return arguments.length?([n,i]=m,n=+n,i=+i,h()):[n,i]},t.rangeRound=function(m){return[n,i]=m,n=+n,i=+i,l=!0,h()},t.bandwidth=function(){return s},t.step=function(){return a},t.round=function(m){return arguments.length?(l=!!m,h()):l},t.padding=function(m){return arguments.length?(c=Math.min(1,f=+m),h()):c},t.paddingInner=function(m){return arguments.length?(c=Math.min(1,m),h()):c},t.paddingOuter=function(m){return arguments.length?(f=+m,h()):f},t.align=function(m){return arguments.length?(p=Math.max(0,Math.min(1,m)),h()):p},t.copy=function(){return Gu(e(),[n,i]).round(l).paddingInner(c).paddingOuter(f).align(p)},zr.apply(h(),arguments)}function Xj(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Xj(e())},t}function Pu(){return Xj(Gu.apply(null,arguments).paddingInner(1))}function Nw(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function Yj(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function Rl(){}var Uu=.7,jf=1/Uu,Oo="\\s*([+-]?\\d+)\\s*",qu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Tn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",rU=/^#([0-9a-f]{3,8})$/,nU=new RegExp(`^rgb\\(${Oo},${Oo},${Oo}\\)$`),iU=new RegExp(`^rgb\\(${Tn},${Tn},${Tn}\\)$`),aU=new RegExp(`^rgba\\(${Oo},${Oo},${Oo},${qu}\\)$`),oU=new RegExp(`^rgba\\(${Tn},${Tn},${Tn},${qu}\\)$`),sU=new RegExp(`^hsl\\(${qu},${Tn},${Tn}\\)$`),uU=new RegExp(`^hsla\\(${qu},${Tn},${Tn},${qu}\\)$`),PP={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};Nw(Rl,Wu,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:TP,formatHex:TP,formatHex8:lU,formatHsl:cU,formatRgb:CP,toString:CP});function TP(){return this.rgb().formatHex()}function lU(){return this.rgb().formatHex8()}function cU(){return Qj(this).formatHsl()}function CP(){return this.rgb().formatRgb()}function Wu(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=rU.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?kP(e):r===3?new pr(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?Qc(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?Qc(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=nU.exec(t))?new pr(e[1],e[2],e[3],1):(e=iU.exec(t))?new pr(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=aU.exec(t))?Qc(e[1],e[2],e[3],e[4]):(e=oU.exec(t))?Qc(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=sU.exec(t))?NP(e[1],e[2]/100,e[3]/100,1):(e=uU.exec(t))?NP(e[1],e[2]/100,e[3]/100,e[4]):PP.hasOwnProperty(t)?kP(PP[t]):t==="transparent"?new pr(NaN,NaN,NaN,0):null}function kP(t){return new pr(t>>16&255,t>>8&255,t&255,1)}function Qc(t,e,r,n){return n<=0&&(t=e=r=NaN),new pr(t,e,r,n)}function fU(t){return t instanceof Rl||(t=Wu(t)),t?(t=t.rgb(),new pr(t.r,t.g,t.b,t.opacity)):new pr}function eb(t,e,r,n){return arguments.length===1?fU(t):new pr(t,e,r,n??1)}function pr(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}Nw(pr,eb,Yj(Rl,{brighter(t){return t=t==null?jf:Math.pow(jf,t),new pr(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Uu:Math.pow(Uu,t),new pr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new pr(Na(this.r),Na(this.g),Na(this.b),Nf(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:RP,formatHex:RP,formatHex8:dU,formatRgb:jP,toString:jP}));function RP(){return`#${wa(this.r)}${wa(this.g)}${wa(this.b)}`}function dU(){return`#${wa(this.r)}${wa(this.g)}${wa(this.b)}${wa((isNaN(this.opacity)?1:this.opacity)*255)}`}function jP(){const t=Nf(this.opacity);return`${t===1?"rgb(":"rgba("}${Na(this.r)}, ${Na(this.g)}, ${Na(this.b)}${t===1?")":`, ${t})`}`}function Nf(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Na(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function wa(t){return t=Na(t),(t<16?"0":"")+t.toString(16)}function NP(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new nn(t,e,r,n)}function Qj(t){if(t instanceof nn)return new nn(t.h,t.s,t.l,t.opacity);if(t instanceof Rl||(t=Wu(t)),!t)return new nn;if(t instanceof nn)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),a=Math.max(e,r,n),s=NaN,l=a-i,c=(a+i)/2;return l?(e===a?s=(r-n)/l+(r<n)*6:r===a?s=(n-e)/l+2:s=(e-r)/l+4,l/=c<.5?a+i:2-a-i,s*=60):l=c>0&&c<1?0:s,new nn(s,l,c,t.opacity)}function hU(t,e,r,n){return arguments.length===1?Qj(t):new nn(t,e,r,n??1)}function nn(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}Nw(nn,hU,Yj(Rl,{brighter(t){return t=t==null?jf:Math.pow(jf,t),new nn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Uu:Math.pow(Uu,t),new nn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new pr(sy(t>=240?t-240:t+120,i,n),sy(t,i,n),sy(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new nn(DP(this.h),Zc(this.s),Zc(this.l),Nf(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(){const t=Nf(this.opacity);return`${t===1?"hsl(":"hsla("}${DP(this.h)}, ${Zc(this.s)*100}%, ${Zc(this.l)*100}%${t===1?")":`, ${t})`}`}}));function DP(t){return t=(t||0)%360,t<0?t+360:t}function Zc(t){return Math.max(0,Math.min(1,t||0))}function sy(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const Dw=t=>()=>t;function pU(t,e){return function(r){return t+r*e}}function vU(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function mU(t){return(t=+t)==1?Zj:function(e,r){return r-e?vU(e,r,t):Dw(isNaN(e)?r:e)}}function Zj(t,e){var r=e-t;return r?pU(t,r):Dw(isNaN(t)?e:t)}const IP=(function t(e){var r=mU(e);function n(i,a){var s=r((i=eb(i)).r,(a=eb(a)).r),l=r(i.g,a.g),c=r(i.b,a.b),f=Zj(i.opacity,a.opacity);return function(p){return i.r=s(p),i.g=l(p),i.b=c(p),i.opacity=f(p),i+""}}return n.gamma=t,n})(1);function gU(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=t[i]*(1-a)+e[i]*a;return n}}function yU(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function bU(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,i=new Array(n),a=new Array(r),s;for(s=0;s<n;++s)i[s]=vs(t[s],e[s]);for(;s<r;++s)a[s]=e[s];return function(l){for(s=0;s<n;++s)a[s]=i[s](l);return a}}function wU(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}function Df(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function xU(t,e){var r={},n={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?r[i]=vs(t[i],e[i]):n[i]=e[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var tb=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,uy=new RegExp(tb.source,"g");function SU(t){return function(){return t}}function _U(t){return function(e){return t(e)+""}}function EU(t,e){var r=tb.lastIndex=uy.lastIndex=0,n,i,a,s=-1,l=[],c=[];for(t=t+"",e=e+"";(n=tb.exec(t))&&(i=uy.exec(e));)(a=i.index)>r&&(a=e.slice(r,a),l[s]?l[s]+=a:l[++s]=a),(n=n[0])===(i=i[0])?l[s]?l[s]+=i:l[++s]=i:(l[++s]=null,c.push({i:s,x:Df(n,i)})),r=uy.lastIndex;return r<e.length&&(a=e.slice(r),l[s]?l[s]+=a:l[++s]=a),l.length<2?c[0]?_U(c[0].x):SU(e):(e=c.length,function(f){for(var p=0,h;p<e;++p)l[(h=c[p]).i]=h.x(f);return l.join("")})}function vs(t,e){var r=typeof e,n;return e==null||r==="boolean"?Dw(e):(r==="number"?Df:r==="string"?(n=Wu(e))?(e=n,IP):EU:e instanceof Wu?IP:e instanceof Date?wU:yU(e)?gU:Array.isArray(e)?bU:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?xU:Df)(t,e)}function Iw(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}function OU(t,e){e===void 0&&(e=t,t=vs);for(var r=0,n=e.length-1,i=e[0],a=new Array(n<0?0:n);r<n;)a[r]=t(i,i=e[++r]);return function(s){var l=Math.max(0,Math.min(n-1,Math.floor(s*=n)));return a[l](s-l)}}function AU(t){return function(){return t}}function If(t){return+t}var MP=[0,1];function ar(t){return t}function rb(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:AU(isNaN(e)?NaN:.5)}function PU(t,e){var r;return t>e&&(r=t,t=e,e=r),function(n){return Math.max(t,Math.min(e,n))}}function TU(t,e,r){var n=t[0],i=t[1],a=e[0],s=e[1];return i<n?(n=rb(i,n),a=r(s,a)):(n=rb(n,i),a=r(a,s)),function(l){return a(n(l))}}function CU(t,e,r){var n=Math.min(t.length,e.length)-1,i=new Array(n),a=new Array(n),s=-1;for(t[n]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<n;)i[s]=rb(t[s],t[s+1]),a[s]=r(e[s],e[s+1]);return function(l){var c=kl(t,l,1,n)-1;return a[c](i[c](l))}}function jl(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Rd(){var t=MP,e=MP,r=vs,n,i,a,s=ar,l,c,f;function p(){var m=Math.min(t.length,e.length);return s!==ar&&(s=PU(t[0],t[m-1])),l=m>2?CU:TU,c=f=null,h}function h(m){return m==null||isNaN(m=+m)?a:(c||(c=l(t.map(n),e,r)))(n(s(m)))}return h.invert=function(m){return s(i((f||(f=l(e,t.map(n),Df)))(m)))},h.domain=function(m){return arguments.length?(t=Array.from(m,If),p()):t.slice()},h.range=function(m){return arguments.length?(e=Array.from(m),p()):e.slice()},h.rangeRound=function(m){return e=Array.from(m),r=Iw,p()},h.clamp=function(m){return arguments.length?(s=m?!0:ar,p()):s!==ar},h.interpolate=function(m){return arguments.length?(r=m,p()):r},h.unknown=function(m){return arguments.length?(a=m,h):a},function(m,g){return n=m,i=g,p()}}function Mw(){return Rd()(ar,ar)}function kU(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Mf(t,e){if(!isFinite(t)||t===0)return null;var r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}function Wo(t){return t=Mf(Math.abs(t)),t?t[1]:NaN}function RU(t,e){return function(r,n){for(var i=r.length,a=[],s=0,l=t[0],c=0;i>0&&l>0&&(c+l+1>n&&(l=Math.max(1,n-c)),a.push(r.substring(i-=l,i+l)),!((c+=l+1)>n));)l=t[s=(s+1)%t.length];return a.reverse().join(e)}}function jU(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var NU=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Hu(t){if(!(e=NU.exec(t)))throw new Error("invalid format: "+t);var e;return new Lw({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Hu.prototype=Lw.prototype;function Lw(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}Lw.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 DU(t){e:for(var e=t.length,r=1,n=-1,i;r<e;++r)switch(t[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+t[r])break e;n>0&&(n=0);break}return n>0?t.slice(0,n)+t.slice(i+1):t}var Lf;function IU(t,e){var r=Mf(t,e);if(!r)return Lf=void 0,t.toPrecision(e);var n=r[0],i=r[1],a=i-(Lf=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=n.length;return a===s?n:a>s?n+new Array(a-s+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+Mf(t,Math.max(0,e+a-1))[0]}function LP(t,e){var r=Mf(t,e);if(!r)return t+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const $P={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:kU,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>LP(t*100,e),r:LP,s:IU,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function FP(t){return t}var BP=Array.prototype.map,zP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function MU(t){var e=t.grouping===void 0||t.thousands===void 0?FP:RU(BP.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",n=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?FP:jU(BP.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",l=t.minus===void 0?"−":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function f(h,m){h=Hu(h);var g=h.fill,_=h.align,w=h.sign,b=h.symbol,E=h.zero,P=h.width,T=h.comma,A=h.precision,x=h.trim,O=h.type;O==="n"?(T=!0,O="g"):$P[O]||(A===void 0&&(A=12),x=!0,O="g"),(E||g==="0"&&_==="=")&&(E=!0,g="0",_="=");var C=(m&&m.prefix!==void 0?m.prefix:"")+(b==="$"?r:b==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():""),N=(b==="$"?n:/[%p]/.test(O)?s:"")+(m&&m.suffix!==void 0?m.suffix:""),D=$P[O],B=/[defgprs%]/.test(O);A=A===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,A)):Math.max(0,Math.min(20,A));function U(L){var j=C,X=N,K,G,M;if(O==="c")X=D(L)+X,L="";else{L=+L;var V=L<0||1/L<0;if(L=isNaN(L)?c:D(Math.abs(L),A),x&&(L=DU(L)),V&&+L==0&&w!=="+"&&(V=!1),j=(V?w==="("?w:l:w==="-"||w==="("?"":w)+j,X=(O==="s"&&!isNaN(L)&&Lf!==void 0?zP[8+Lf/3]:"")+X+(V&&w==="("?")":""),B){for(K=-1,G=L.length;++K<G;)if(M=L.charCodeAt(K),48>M||M>57){X=(M===46?i+L.slice(K+1):L.slice(K))+X,L=L.slice(0,K);break}}}T&&!E&&(L=e(L,1/0));var J=j.length+L.length+X.length,ee=J<P?new Array(P-J+1).join(g):"";switch(T&&E&&(L=e(ee+L,ee.length?P-X.length:1/0),ee=""),_){case"<":L=j+L+X+ee;break;case"=":L=j+ee+L+X;break;case"^":L=ee.slice(0,J=ee.length>>1)+j+L+X+ee.slice(J);break;default:L=ee+j+L+X;break}return a(L)}return U.toString=function(){return h+""},U}function p(h,m){var g=Math.max(-8,Math.min(8,Math.floor(Wo(m)/3)))*3,_=Math.pow(10,-g),w=f((h=Hu(h),h.type="f",h),{suffix:zP[8+g/3]});return function(b){return w(_*b)}}return{format:f,formatPrefix:p}}var Jc,$w,Jj;LU({thousands:",",grouping:[3],currency:["$",""]});function LU(t){return Jc=MU(t),$w=Jc.format,Jj=Jc.formatPrefix,Jc}function $U(t){return Math.max(0,-Wo(Math.abs(t)))}function FU(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Wo(e)/3)))*3-Wo(Math.abs(t)))}function BU(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Wo(e)-Wo(t))+1}function e2(t,e,r,n){var i=Z0(t,e,r),a;switch(n=Hu(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return n.precision==null&&!isNaN(a=FU(i,s))&&(n.precision=a),Jj(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=BU(i,Math.max(Math.abs(t),Math.abs(e))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=$U(i))&&(n.precision=a-(n.type==="%")*2);break}}return $w(n)}function Qi(t){var e=t.domain;return t.ticks=function(r){var n=e();return Y0(n[0],n[n.length-1],r??10)},t.tickFormat=function(r,n){var i=e();return e2(i[0],i[i.length-1],r??10,n)},t.nice=function(r){r==null&&(r=10);var n=e(),i=0,a=n.length-1,s=n[i],l=n[a],c,f,p=10;for(l<s&&(f=s,s=l,l=f,f=i,i=a,a=f);p-- >0;){if(f=Q0(s,l,r),f===c)return n[i]=s,n[a]=l,e(n);if(f>0)s=Math.floor(s/f)*f,l=Math.ceil(l/f)*f;else if(f<0)s=Math.ceil(s*f)/f,l=Math.floor(l*f)/f;else break;c=f}return t},t}function $f(){var t=Mw();return t.copy=function(){return jl(t,$f())},zr.apply(t,arguments),Qi(t)}function t2(t){var e;function r(n){return n==null||isNaN(n=+n)?e:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(t=Array.from(n,If),r):t.slice()},r.unknown=function(n){return arguments.length?(e=n,r):e},r.copy=function(){return t2(t).unknown(e)},t=arguments.length?Array.from(t,If):[0,1],Qi(r)}function r2(t,e){t=t.slice();var r=0,n=t.length-1,i=t[r],a=t[n],s;return a<i&&(s=r,r=n,n=s,s=i,i=a,a=s),t[r]=e.floor(i),t[n]=e.ceil(a),t}function GP(t){return Math.log(t)}function UP(t){return Math.exp(t)}function zU(t){return-Math.log(-t)}function GU(t){return-Math.exp(-t)}function UU(t){return isFinite(t)?+("1e"+t):t<0?0:t}function qU(t){return t===10?UU:t===Math.E?Math.exp:e=>Math.pow(t,e)}function WU(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function qP(t){return(e,r)=>-t(-e,r)}function Fw(t){const e=t(GP,UP),r=e.domain;let n=10,i,a;function s(){return i=WU(n),a=qU(n),r()[0]<0?(i=qP(i),a=qP(a),t(zU,GU)):t(GP,UP),e}return e.base=function(l){return arguments.length?(n=+l,s()):n},e.domain=function(l){return arguments.length?(r(l),s()):r()},e.ticks=l=>{const c=r();let f=c[0],p=c[c.length-1];const h=p<f;h&&([f,p]=[p,f]);let m=i(f),g=i(p),_,w;const b=l==null?10:+l;let E=[];if(!(n%1)&&g-m<b){if(m=Math.floor(m),g=Math.ceil(g),f>0){for(;m<=g;++m)for(_=1;_<n;++_)if(w=m<0?_/a(-m):_*a(m),!(w<f)){if(w>p)break;E.push(w)}}else for(;m<=g;++m)for(_=n-1;_>=1;--_)if(w=m>0?_/a(-m):_*a(m),!(w<f)){if(w>p)break;E.push(w)}E.length*2<b&&(E=Y0(f,p,b))}else E=Y0(m,g,Math.min(g-m,b)).map(a);return h?E.reverse():E},e.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=n===10?"s":","),typeof c!="function"&&(!(n%1)&&(c=Hu(c)).precision==null&&(c.trim=!0),c=$w(c)),l===1/0)return c;const f=Math.max(1,n*l/e.ticks().length);return p=>{let h=p/a(Math.round(i(p)));return h*n<n-.5&&(h*=n),h<=f?c(p):""}},e.nice=()=>r(r2(r(),{floor:l=>a(Math.floor(i(l))),ceil:l=>a(Math.ceil(i(l)))})),e}function n2(){const t=Fw(Rd()).domain([1,10]);return t.copy=()=>jl(t,n2()).base(t.base()),zr.apply(t,arguments),t}function WP(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function HP(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Bw(t){var e=1,r=t(WP(e),HP(e));return r.constant=function(n){return arguments.length?t(WP(e=+n),HP(e)):e},Qi(r)}function i2(){var t=Bw(Rd());return t.copy=function(){return jl(t,i2()).constant(t.constant())},zr.apply(t,arguments)}function VP(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function HU(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function VU(t){return t<0?-t*t:t*t}function zw(t){var e=t(ar,ar),r=1;function n(){return r===1?t(ar,ar):r===.5?t(HU,VU):t(VP(r),VP(1/r))}return e.exponent=function(i){return arguments.length?(r=+i,n()):r},Qi(e)}function Gw(){var t=zw(Rd());return t.copy=function(){return jl(t,Gw()).exponent(t.exponent())},zr.apply(t,arguments),t}function KU(){return Gw.apply(null,arguments).exponent(.5)}function KP(t){return Math.sign(t)*t*t}function XU(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function a2(){var t=Mw(),e=[0,1],r=!1,n;function i(a){var s=XU(t(a));return isNaN(s)?n:r?Math.round(s):s}return i.invert=function(a){return t.invert(KP(a))},i.domain=function(a){return arguments.length?(t.domain(a),i):t.domain()},i.range=function(a){return arguments.length?(t.range((e=Array.from(a,If)).map(KP)),i):e.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(t.clamp(a),i):t.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return a2(t.domain(),e).round(r).clamp(t.clamp()).unknown(n)},zr.apply(i,arguments),Qi(i)}function o2(){var t=[],e=[],r=[],n;function i(){var s=0,l=Math.max(1,e.length);for(r=new Array(l-1);++s<l;)r[s-1]=eU(t,s/l);return a}function a(s){return s==null||isNaN(s=+s)?n:e[kl(r,s)]}return a.invertExtent=function(s){var l=e.indexOf(s);return l<0?[NaN,NaN]:[l>0?r[l-1]:t[0],l<r.length?r[l]:t[t.length-1]]},a.domain=function(s){if(!arguments.length)return t.slice();t=[];for(let l of s)l!=null&&!isNaN(l=+l)&&t.push(l);return t.sort(Hi),i()},a.range=function(s){return arguments.length?(e=Array.from(s),i()):e.slice()},a.unknown=function(s){return arguments.length?(n=s,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return o2().domain(t).range(e).unknown(n)},zr.apply(a,arguments)}function s2(){var t=0,e=1,r=1,n=[.5],i=[0,1],a;function s(c){return c!=null&&c<=c?i[kl(n,c,0,r)]:a}function l(){var c=-1;for(n=new Array(r);++c<r;)n[c]=((c+1)*e-(c-r)*t)/(r+1);return s}return s.domain=function(c){return arguments.length?([t,e]=c,t=+t,e=+e,l()):[t,e]},s.range=function(c){return arguments.length?(r=(i=Array.from(c)).length-1,l()):i.slice()},s.invertExtent=function(c){var f=i.indexOf(c);return f<0?[NaN,NaN]:f<1?[t,n[0]]:f>=r?[n[r-1],e]:[n[f-1],n[f]]},s.unknown=function(c){return arguments.length&&(a=c),s},s.thresholds=function(){return n.slice()},s.copy=function(){return s2().domain([t,e]).range(i).unknown(a)},zr.apply(Qi(s),arguments)}function u2(){var t=[.5],e=[0,1],r,n=1;function i(a){return a!=null&&a<=a?e[kl(t,a,0,n)]:r}return i.domain=function(a){return arguments.length?(t=Array.from(a),n=Math.min(t.length,e.length-1),i):t.slice()},i.range=function(a){return arguments.length?(e=Array.from(a),n=Math.min(t.length,e.length-1),i):e.slice()},i.invertExtent=function(a){var s=e.indexOf(a);return[t[s-1],t[s]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return u2().domain(t).range(e).unknown(r)},zr.apply(i,arguments)}const ly=new Date,cy=new Date;function Ct(t,e,r,n){function i(a){return t(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(t(a=new Date(+a)),a),i.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),i.round=a=>{const s=i(a),l=i.ceil(a);return a-s<l-a?s:l},i.offset=(a,s)=>(e(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,l)=>{const c=[];if(a=i.ceil(a),l=l==null?1:Math.floor(l),!(a<s)||!(l>0))return c;let f;do c.push(f=new Date(+a)),e(a,l),t(a);while(f<a&&a<s);return c},i.filter=a=>Ct(s=>{if(s>=s)for(;t(s),!a(s);)s.setTime(s-1)},(s,l)=>{if(s>=s)if(l<0)for(;++l<=0;)for(;e(s,-1),!a(s););else for(;--l>=0;)for(;e(s,1),!a(s););}),r&&(i.count=(a,s)=>(ly.setTime(+a),cy.setTime(+s),t(ly),t(cy),Math.floor(r(ly,cy))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?s=>n(s)%a===0:s=>i.count(0,s)%a===0):i)),i}const Ff=Ct(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Ff.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Ct(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):Ff);Ff.range;const Jn=1e3,Lr=Jn*60,ei=Lr*60,oi=ei*24,Uw=oi*7,XP=oi*30,fy=oi*365,xa=Ct(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Jn)},(t,e)=>(e-t)/Jn,t=>t.getUTCSeconds());xa.range;const qw=Ct(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Jn)},(t,e)=>{t.setTime(+t+e*Lr)},(t,e)=>(e-t)/Lr,t=>t.getMinutes());qw.range;const Ww=Ct(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*Lr)},(t,e)=>(e-t)/Lr,t=>t.getUTCMinutes());Ww.range;const Hw=Ct(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Jn-t.getMinutes()*Lr)},(t,e)=>{t.setTime(+t+e*ei)},(t,e)=>(e-t)/ei,t=>t.getHours());Hw.range;const Vw=Ct(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*ei)},(t,e)=>(e-t)/ei,t=>t.getUTCHours());Vw.range;const Nl=Ct(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Lr)/oi,t=>t.getDate()-1);Nl.range;const jd=Ct(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/oi,t=>t.getUTCDate()-1);jd.range;const l2=Ct(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/oi,t=>Math.floor(t/oi));l2.range;function za(t){return Ct(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*Lr)/Uw)}const Nd=za(0),Bf=za(1),YU=za(2),QU=za(3),Ho=za(4),ZU=za(5),JU=za(6);Nd.range;Bf.range;YU.range;QU.range;Ho.range;ZU.range;JU.range;function Ga(t){return Ct(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/Uw)}const Dd=Ga(0),zf=Ga(1),e4=Ga(2),t4=Ga(3),Vo=Ga(4),r4=Ga(5),n4=Ga(6);Dd.range;zf.range;e4.range;t4.range;Vo.range;r4.range;n4.range;const Kw=Ct(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Kw.range;const Xw=Ct(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Xw.range;const si=Ct(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());si.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Ct(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)});si.range;const ui=Ct(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());ui.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Ct(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)});ui.range;function c2(t,e,r,n,i,a){const s=[[xa,1,Jn],[xa,5,5*Jn],[xa,15,15*Jn],[xa,30,30*Jn],[a,1,Lr],[a,5,5*Lr],[a,15,15*Lr],[a,30,30*Lr],[i,1,ei],[i,3,3*ei],[i,6,6*ei],[i,12,12*ei],[n,1,oi],[n,2,2*oi],[r,1,Uw],[e,1,XP],[e,3,3*XP],[t,1,fy]];function l(f,p,h){const m=p<f;m&&([f,p]=[p,f]);const g=h&&typeof h.range=="function"?h:c(f,p,h),_=g?g.range(f,+p+1):[];return m?_.reverse():_}function c(f,p,h){const m=Math.abs(p-f)/h,g=Rw(([,,b])=>b).right(s,m);if(g===s.length)return t.every(Z0(f/fy,p/fy,h));if(g===0)return Ff.every(Math.max(Z0(f,p,h),1));const[_,w]=s[m/s[g-1][2]<s[g][2]/m?g-1:g];return _.every(w)}return[l,c]}const[i4,a4]=c2(ui,Xw,Dd,l2,Vw,Ww),[o4,s4]=c2(si,Kw,Nd,Nl,Hw,qw);function dy(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function hy(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function su(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function u4(t){var e=t.dateTime,r=t.date,n=t.time,i=t.periods,a=t.days,s=t.shortDays,l=t.months,c=t.shortMonths,f=uu(i),p=lu(i),h=uu(a),m=lu(a),g=uu(s),_=lu(s),w=uu(l),b=lu(l),E=uu(c),P=lu(c),T={a:M,A:V,b:J,B:ee,c:null,d:tT,e:tT,f:R4,g:z4,G:U4,H:T4,I:C4,j:k4,L:f2,m:j4,M:N4,p:F,q:H,Q:iT,s:aT,S:D4,u:I4,U:M4,V:L4,w:$4,W:F4,x:null,X:null,y:B4,Y:G4,Z:q4,"%":nT},A={a:te,A:we,b:xe,B:De,c:null,d:rT,e:rT,f:K4,g:iq,G:oq,H:W4,I:H4,j:V4,L:h2,m:X4,M:Y4,p:Le,q:Me,Q:iT,s:aT,S:Q4,u:Z4,U:J4,V:eq,w:tq,W:rq,x:null,X:null,y:nq,Y:aq,Z:sq,"%":nT},x={a:B,A:U,b:L,B:j,c:X,d:JP,e:JP,f:E4,g:ZP,G:QP,H:eT,I:eT,j:w4,L:_4,m:b4,M:x4,p:D,q:y4,Q:A4,s:P4,S:S4,u:h4,U:p4,V:v4,w:d4,W:m4,x:K,X:G,y:ZP,Y:QP,Z:g4,"%":O4};T.x=O(r,T),T.X=O(n,T),T.c=O(e,T),A.x=O(r,A),A.X=O(n,A),A.c=O(e,A);function O(le,pe){return function(ve){var ie=[],Fe=-1,de=0,me=le.length,ne,it,kt;for(ve instanceof Date||(ve=new Date(+ve));++Fe<me;)le.charCodeAt(Fe)===37&&(ie.push(le.slice(de,Fe)),(it=YP[ne=le.charAt(++Fe)])!=null?ne=le.charAt(++Fe):it=ne==="e"?" ":"0",(kt=pe[ne])&&(ne=kt(ve,it)),ie.push(ne),de=Fe+1);return ie.push(le.slice(de,Fe)),ie.join("")}}function C(le,pe){return function(ve){var ie=su(1900,void 0,1),Fe=N(ie,le,ve+="",0),de,me;if(Fe!=ve.length)return null;if("Q"in ie)return new Date(ie.Q);if("s"in ie)return new Date(ie.s*1e3+("L"in ie?ie.L:0));if(pe&&!("Z"in ie)&&(ie.Z=0),"p"in ie&&(ie.H=ie.H%12+ie.p*12),ie.m===void 0&&(ie.m="q"in ie?ie.q:0),"V"in ie){if(ie.V<1||ie.V>53)return null;"w"in ie||(ie.w=1),"Z"in ie?(de=hy(su(ie.y,0,1)),me=de.getUTCDay(),de=me>4||me===0?zf.ceil(de):zf(de),de=jd.offset(de,(ie.V-1)*7),ie.y=de.getUTCFullYear(),ie.m=de.getUTCMonth(),ie.d=de.getUTCDate()+(ie.w+6)%7):(de=dy(su(ie.y,0,1)),me=de.getDay(),de=me>4||me===0?Bf.ceil(de):Bf(de),de=Nl.offset(de,(ie.V-1)*7),ie.y=de.getFullYear(),ie.m=de.getMonth(),ie.d=de.getDate()+(ie.w+6)%7)}else("W"in ie||"U"in ie)&&("w"in ie||(ie.w="u"in ie?ie.u%7:"W"in ie?1:0),me="Z"in ie?hy(su(ie.y,0,1)).getUTCDay():dy(su(ie.y,0,1)).getDay(),ie.m=0,ie.d="W"in ie?(ie.w+6)%7+ie.W*7-(me+5)%7:ie.w+ie.U*7-(me+6)%7);return"Z"in ie?(ie.H+=ie.Z/100|0,ie.M+=ie.Z%100,hy(ie)):dy(ie)}}function N(le,pe,ve,ie){for(var Fe=0,de=pe.length,me=ve.length,ne,it;Fe<de;){if(ie>=me)return-1;if(ne=pe.charCodeAt(Fe++),ne===37){if(ne=pe.charAt(Fe++),it=x[ne in YP?pe.charAt(Fe++):ne],!it||(ie=it(le,ve,ie))<0)return-1}else if(ne!=ve.charCodeAt(ie++))return-1}return ie}function D(le,pe,ve){var ie=f.exec(pe.slice(ve));return ie?(le.p=p.get(ie[0].toLowerCase()),ve+ie[0].length):-1}function B(le,pe,ve){var ie=g.exec(pe.slice(ve));return ie?(le.w=_.get(ie[0].toLowerCase()),ve+ie[0].length):-1}function U(le,pe,ve){var ie=h.exec(pe.slice(ve));return ie?(le.w=m.get(ie[0].toLowerCase()),ve+ie[0].length):-1}function L(le,pe,ve){var ie=E.exec(pe.slice(ve));return ie?(le.m=P.get(ie[0].toLowerCase()),ve+ie[0].length):-1}function j(le,pe,ve){var ie=w.exec(pe.slice(ve));return ie?(le.m=b.get(ie[0].toLowerCase()),ve+ie[0].length):-1}function X(le,pe,ve){return N(le,e,pe,ve)}function K(le,pe,ve){return N(le,r,pe,ve)}function G(le,pe,ve){return N(le,n,pe,ve)}function M(le){return s[le.getDay()]}function V(le){return a[le.getDay()]}function J(le){return c[le.getMonth()]}function ee(le){return l[le.getMonth()]}function F(le){return i[+(le.getHours()>=12)]}function H(le){return 1+~~(le.getMonth()/3)}function te(le){return s[le.getUTCDay()]}function we(le){return a[le.getUTCDay()]}function xe(le){return c[le.getUTCMonth()]}function De(le){return l[le.getUTCMonth()]}function Le(le){return i[+(le.getUTCHours()>=12)]}function Me(le){return 1+~~(le.getUTCMonth()/3)}return{format:function(le){var pe=O(le+="",T);return pe.toString=function(){return le},pe},parse:function(le){var pe=C(le+="",!1);return pe.toString=function(){return le},pe},utcFormat:function(le){var pe=O(le+="",A);return pe.toString=function(){return le},pe},utcParse:function(le){var pe=C(le+="",!0);return pe.toString=function(){return le},pe}}}var YP={"-":"",_:" ",0:"0"},Ft=/^\s*\d+/,l4=/^%/,c4=/[\\^$*+?|[\]().{}]/g;function We(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(e)+i:i)}function f4(t){return t.replace(c4,"\\$&")}function uu(t){return new RegExp("^(?:"+t.map(f4).join("|")+")","i")}function lu(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}function d4(t,e,r){var n=Ft.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function h4(t,e,r){var n=Ft.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function p4(t,e,r){var n=Ft.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function v4(t,e,r){var n=Ft.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function m4(t,e,r){var n=Ft.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function QP(t,e,r){var n=Ft.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function ZP(t,e,r){var n=Ft.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function g4(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function y4(t,e,r){var n=Ft.exec(e.slice(r,r+1));return n?(t.q=n[0]*3-3,r+n[0].length):-1}function b4(t,e,r){var n=Ft.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function JP(t,e,r){var n=Ft.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function w4(t,e,r){var n=Ft.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function eT(t,e,r){var n=Ft.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function x4(t,e,r){var n=Ft.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function S4(t,e,r){var n=Ft.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function _4(t,e,r){var n=Ft.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function E4(t,e,r){var n=Ft.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function O4(t,e,r){var n=l4.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function A4(t,e,r){var n=Ft.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function P4(t,e,r){var n=Ft.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function tT(t,e){return We(t.getDate(),e,2)}function T4(t,e){return We(t.getHours(),e,2)}function C4(t,e){return We(t.getHours()%12||12,e,2)}function k4(t,e){return We(1+Nl.count(si(t),t),e,3)}function f2(t,e){return We(t.getMilliseconds(),e,3)}function R4(t,e){return f2(t,e)+"000"}function j4(t,e){return We(t.getMonth()+1,e,2)}function N4(t,e){return We(t.getMinutes(),e,2)}function D4(t,e){return We(t.getSeconds(),e,2)}function I4(t){var e=t.getDay();return e===0?7:e}function M4(t,e){return We(Nd.count(si(t)-1,t),e,2)}function d2(t){var e=t.getDay();return e>=4||e===0?Ho(t):Ho.ceil(t)}function L4(t,e){return t=d2(t),We(Ho.count(si(t),t)+(si(t).getDay()===4),e,2)}function $4(t){return t.getDay()}function F4(t,e){return We(Bf.count(si(t)-1,t),e,2)}function B4(t,e){return We(t.getFullYear()%100,e,2)}function z4(t,e){return t=d2(t),We(t.getFullYear()%100,e,2)}function G4(t,e){return We(t.getFullYear()%1e4,e,4)}function U4(t,e){var r=t.getDay();return t=r>=4||r===0?Ho(t):Ho.ceil(t),We(t.getFullYear()%1e4,e,4)}function q4(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+We(e/60|0,"0",2)+We(e%60,"0",2)}function rT(t,e){return We(t.getUTCDate(),e,2)}function W4(t,e){return We(t.getUTCHours(),e,2)}function H4(t,e){return We(t.getUTCHours()%12||12,e,2)}function V4(t,e){return We(1+jd.count(ui(t),t),e,3)}function h2(t,e){return We(t.getUTCMilliseconds(),e,3)}function K4(t,e){return h2(t,e)+"000"}function X4(t,e){return We(t.getUTCMonth()+1,e,2)}function Y4(t,e){return We(t.getUTCMinutes(),e,2)}function Q4(t,e){return We(t.getUTCSeconds(),e,2)}function Z4(t){var e=t.getUTCDay();return e===0?7:e}function J4(t,e){return We(Dd.count(ui(t)-1,t),e,2)}function p2(t){var e=t.getUTCDay();return e>=4||e===0?Vo(t):Vo.ceil(t)}function eq(t,e){return t=p2(t),We(Vo.count(ui(t),t)+(ui(t).getUTCDay()===4),e,2)}function tq(t){return t.getUTCDay()}function rq(t,e){return We(zf.count(ui(t)-1,t),e,2)}function nq(t,e){return We(t.getUTCFullYear()%100,e,2)}function iq(t,e){return t=p2(t),We(t.getUTCFullYear()%100,e,2)}function aq(t,e){return We(t.getUTCFullYear()%1e4,e,4)}function oq(t,e){var r=t.getUTCDay();return t=r>=4||r===0?Vo(t):Vo.ceil(t),We(t.getUTCFullYear()%1e4,e,4)}function sq(){return"+0000"}function nT(){return"%"}function iT(t){return+t}function aT(t){return Math.floor(+t/1e3)}var go,v2,m2;uq({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 uq(t){return go=u4(t),v2=go.format,go.parse,m2=go.utcFormat,go.utcParse,go}function lq(t){return new Date(t)}function cq(t){return t instanceof Date?+t:+new Date(+t)}function Yw(t,e,r,n,i,a,s,l,c,f){var p=Mw(),h=p.invert,m=p.domain,g=f(".%L"),_=f(":%S"),w=f("%I:%M"),b=f("%I %p"),E=f("%a %d"),P=f("%b %d"),T=f("%B"),A=f("%Y");function x(O){return(c(O)<O?g:l(O)<O?_:s(O)<O?w:a(O)<O?b:n(O)<O?i(O)<O?E:P:r(O)<O?T:A)(O)}return p.invert=function(O){return new Date(h(O))},p.domain=function(O){return arguments.length?m(Array.from(O,cq)):m().map(lq)},p.ticks=function(O){var C=m();return t(C[0],C[C.length-1],O??10)},p.tickFormat=function(O,C){return C==null?x:f(C)},p.nice=function(O){var C=m();return(!O||typeof O.range!="function")&&(O=e(C[0],C[C.length-1],O??10)),O?m(r2(C,O)):p},p.copy=function(){return jl(p,Yw(t,e,r,n,i,a,s,l,c,f))},p}function fq(){return zr.apply(Yw(o4,s4,si,Kw,Nd,Nl,Hw,qw,xa,v2).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function dq(){return zr.apply(Yw(i4,a4,ui,Xw,Dd,jd,Vw,Ww,xa,m2).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Id(){var t=0,e=1,r,n,i,a,s=ar,l=!1,c;function f(h){return h==null||isNaN(h=+h)?c:s(i===0?.5:(h=(a(h)-r)*i,l?Math.max(0,Math.min(1,h)):h))}f.domain=function(h){return arguments.length?([t,e]=h,r=a(t=+t),n=a(e=+e),i=r===n?0:1/(n-r),f):[t,e]},f.clamp=function(h){return arguments.length?(l=!!h,f):l},f.interpolator=function(h){return arguments.length?(s=h,f):s};function p(h){return function(m){var g,_;return arguments.length?([g,_]=m,s=h(g,_),f):[s(0),s(1)]}}return f.range=p(vs),f.rangeRound=p(Iw),f.unknown=function(h){return arguments.length?(c=h,f):c},function(h){return a=h,r=h(t),n=h(e),i=r===n?0:1/(n-r),f}}function Zi(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function g2(){var t=Qi(Id()(ar));return t.copy=function(){return Zi(t,g2())},di.apply(t,arguments)}function y2(){var t=Fw(Id()).domain([1,10]);return t.copy=function(){return Zi(t,y2()).base(t.base())},di.apply(t,arguments)}function b2(){var t=Bw(Id());return t.copy=function(){return Zi(t,b2()).constant(t.constant())},di.apply(t,arguments)}function Qw(){var t=zw(Id());return t.copy=function(){return Zi(t,Qw()).exponent(t.exponent())},di.apply(t,arguments)}function hq(){return Qw.apply(null,arguments).exponent(.5)}function w2(){var t=[],e=ar;function r(n){if(n!=null&&!isNaN(n=+n))return e((kl(t,n,1)-1)/(t.length-1))}return r.domain=function(n){if(!arguments.length)return t.slice();t=[];for(let i of n)i!=null&&!isNaN(i=+i)&&t.push(i);return t.sort(Hi),r},r.interpolator=function(n){return arguments.length?(e=n,r):e},r.range=function(){return t.map((n,i)=>e(i/(t.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>JG(t,a/n))},r.copy=function(){return w2(e).domain(t)},di.apply(r,arguments)}function Md(){var t=0,e=.5,r=1,n=1,i,a,s,l,c,f=ar,p,h=!1,m;function g(w){return isNaN(w=+w)?m:(w=.5+((w=+p(w))-a)*(n*w<n*a?l:c),f(h?Math.max(0,Math.min(1,w)):w))}g.domain=function(w){return arguments.length?([t,e,r]=w,i=p(t=+t),a=p(e=+e),s=p(r=+r),l=i===a?0:.5/(a-i),c=a===s?0:.5/(s-a),n=a<i?-1:1,g):[t,e,r]},g.clamp=function(w){return arguments.length?(h=!!w,g):h},g.interpolator=function(w){return arguments.length?(f=w,g):f};function _(w){return function(b){var E,P,T;return arguments.length?([E,P,T]=b,f=OU(w,[E,P,T]),g):[f(0),f(.5),f(1)]}}return g.range=_(vs),g.rangeRound=_(Iw),g.unknown=function(w){return arguments.length?(m=w,g):m},function(w){return p=w,i=w(t),a=w(e),s=w(r),l=i===a?0:.5/(a-i),c=a===s?0:.5/(s-a),n=a<i?-1:1,g}}function x2(){var t=Qi(Md()(ar));return t.copy=function(){return Zi(t,x2())},di.apply(t,arguments)}function S2(){var t=Fw(Md()).domain([.1,1,10]);return t.copy=function(){return Zi(t,S2()).base(t.base())},di.apply(t,arguments)}function _2(){var t=Bw(Md());return t.copy=function(){return Zi(t,_2()).constant(t.constant())},di.apply(t,arguments)}function Zw(){var t=zw(Md());return t.copy=function(){return Zi(t,Zw()).exponent(t.exponent())},di.apply(t,arguments)}function pq(){return Zw.apply(null,arguments).exponent(.5)}const oT=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Gu,scaleDiverging:x2,scaleDivergingLog:S2,scaleDivergingPow:Zw,scaleDivergingSqrt:pq,scaleDivergingSymlog:_2,scaleIdentity:t2,scaleImplicit:J0,scaleLinear:$f,scaleLog:n2,scaleOrdinal:jw,scalePoint:Pu,scalePow:Gw,scaleQuantile:o2,scaleQuantize:s2,scaleRadial:a2,scaleSequential:g2,scaleSequentialLog:y2,scaleSequentialPow:Qw,scaleSequentialQuantile:w2,scaleSequentialSqrt:hq,scaleSequentialSymlog:b2,scaleSqrt:KU,scaleSymlog:i2,scaleThreshold:u2,scaleTime:fq,scaleUtc:dq,tickFormat:e2},Symbol.toStringTag,{value:"Module"}));var py,sT;function E2(){if(sT)return py;sT=1;var t=ds();function e(r,n,i){for(var a=-1,s=r.length;++a<s;){var l=r[a],c=n(l);if(c!=null&&(f===void 0?c===c&&!t(c):i(c,f)))var f=c,p=l}return p}return py=e,py}var vy,uT;function vq(){if(uT)return vy;uT=1;function t(e,r){return e>r}return vy=t,vy}var my,lT;function mq(){if(lT)return my;lT=1;var t=E2(),e=vq(),r=ps();function n(i){return i&&i.length?t(i,r,e):void 0}return my=n,my}var gq=mq();const Ld=tt(gq);var gy,cT;function yq(){if(cT)return gy;cT=1;function t(e,r){return e<r}return gy=t,gy}var yy,fT;function bq(){if(fT)return yy;fT=1;var t=E2(),e=yq(),r=ps();function n(i){return i&&i.length?t(i,r,e):void 0}return yy=n,yy}var wq=bq();const $d=tt(wq);var by,dT;function xq(){if(dT)return by;dT=1;var t=pw(),e=Yi(),r=Nj(),n=vr();function i(a,s){var l=n(a)?t:r;return l(a,e(s,3))}return by=i,by}var wy,hT;function Sq(){if(hT)return wy;hT=1;var t=Rj(),e=xq();function r(n,i){return t(e(n,i),1)}return wy=r,wy}var _q=Sq();const Eq=tt(_q);var xy,pT;function Oq(){if(pT)return xy;pT=1;var t=Pw();function e(r,n){return t(r,n)}return xy=e,xy}var Aq=Oq();const Jw=tt(Aq);var ms=1e9,Pq={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},tx,ft=!0,Br="[DecimalError] ",Da=Br+"Invalid argument: ",ex=Br+"Exponent out of range: ",gs=Math.floor,ga=Math.pow,Tq=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,_r,Lt=1e7,lt=7,O2=9007199254740991,Gf=gs(O2/lt),Ee={};Ee.absoluteValue=Ee.abs=function(){var t=new this.constructor(this);return t.s&&(t.s=1),t};Ee.comparedTo=Ee.cmp=function(t){var e,r,n,i,a=this;if(t=new a.constructor(t),a.s!==t.s)return a.s||-t.s;if(a.e!==t.e)return a.e>t.e^a.s<0?1:-1;for(n=a.d.length,i=t.d.length,e=0,r=n<i?n:i;e<r;++e)if(a.d[e]!==t.d[e])return a.d[e]>t.d[e]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};Ee.decimalPlaces=Ee.dp=function(){var t=this,e=t.d.length-1,r=(e-t.e)*lt;if(e=t.d[e],e)for(;e%10==0;e/=10)r--;return r<0?0:r};Ee.dividedBy=Ee.div=function(t){return ri(this,new this.constructor(t))};Ee.dividedToIntegerBy=Ee.idiv=function(t){var e=this,r=e.constructor;return nt(ri(e,new r(t),0,1),r.precision)};Ee.equals=Ee.eq=function(t){return!this.cmp(t)};Ee.exponent=function(){return St(this)};Ee.greaterThan=Ee.gt=function(t){return this.cmp(t)>0};Ee.greaterThanOrEqualTo=Ee.gte=function(t){return this.cmp(t)>=0};Ee.isInteger=Ee.isint=function(){return this.e>this.d.length-2};Ee.isNegative=Ee.isneg=function(){return this.s<0};Ee.isPositive=Ee.ispos=function(){return this.s>0};Ee.isZero=function(){return this.s===0};Ee.lessThan=Ee.lt=function(t){return this.cmp(t)<0};Ee.lessThanOrEqualTo=Ee.lte=function(t){return this.cmp(t)<1};Ee.logarithm=Ee.log=function(t){var e,r=this,n=r.constructor,i=n.precision,a=i+5;if(t===void 0)t=new n(10);else if(t=new n(t),t.s<1||t.eq(_r))throw Error(Br+"NaN");if(r.s<1)throw Error(Br+(r.s?"NaN":"-Infinity"));return r.eq(_r)?new n(0):(ft=!1,e=ri(Vu(r,a),Vu(t,a),a),ft=!0,nt(e,i))};Ee.minus=Ee.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?T2(e,t):A2(e,(t.s=-t.s,t))};Ee.modulo=Ee.mod=function(t){var e,r=this,n=r.constructor,i=n.precision;if(t=new n(t),!t.s)throw Error(Br+"NaN");return r.s?(ft=!1,e=ri(r,t,0,1).times(t),ft=!0,r.minus(e)):nt(new n(r),i)};Ee.naturalExponential=Ee.exp=function(){return P2(this)};Ee.naturalLogarithm=Ee.ln=function(){return Vu(this)};Ee.negated=Ee.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t};Ee.plus=Ee.add=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?A2(e,t):T2(e,(t.s=-t.s,t))};Ee.precision=Ee.sd=function(t){var e,r,n,i=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(Da+t);if(e=St(i)+1,n=i.d.length-1,r=n*lt+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return t&&e>r?e:r};Ee.squareRoot=Ee.sqrt=function(){var t,e,r,n,i,a,s,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(Br+"NaN")}for(t=St(l),ft=!1,i=Math.sqrt(+l),i==0||i==1/0?(e=An(l.d),(e.length+t)%2==0&&(e+="0"),i=Math.sqrt(e),t=gs((t+1)/2)-(t<0||t%2),i==1/0?e="5e"+t:(e=i.toExponential(),e=e.slice(0,e.indexOf("e")+1)+t),n=new c(e)):n=new c(i.toString()),r=c.precision,i=s=r+3;;)if(a=n,n=a.plus(ri(l,a,s+2)).times(.5),An(a.d).slice(0,s)===(e=An(n.d)).slice(0,s)){if(e=e.slice(s-3,s+1),i==s&&e=="4999"){if(nt(a,r+1,0),a.times(a).eq(l)){n=a;break}}else if(e!="9999")break;s+=4}return ft=!0,nt(n,r)};Ee.times=Ee.mul=function(t){var e,r,n,i,a,s,l,c,f,p=this,h=p.constructor,m=p.d,g=(t=new h(t)).d;if(!p.s||!t.s)return new h(0);for(t.s*=p.s,r=p.e+t.e,c=m.length,f=g.length,c<f&&(a=m,m=g,g=a,s=c,c=f,f=s),a=[],s=c+f,n=s;n--;)a.push(0);for(n=f;--n>=0;){for(e=0,i=c+n;i>n;)l=a[i]+g[n]*m[i-n-1]+e,a[i--]=l%Lt|0,e=l/Lt|0;a[i]=(a[i]+e)%Lt|0}for(;!a[--s];)a.pop();return e?++r:a.shift(),t.d=a,t.e=r,ft?nt(t,h.precision):t};Ee.toDecimalPlaces=Ee.todp=function(t,e){var r=this,n=r.constructor;return r=new n(r),t===void 0?r:(Rn(t,0,ms),e===void 0?e=n.rounding:Rn(e,0,8),nt(r,t+St(r)+1,e))};Ee.toExponential=function(t,e){var r,n=this,i=n.constructor;return t===void 0?r=$a(n,!0):(Rn(t,0,ms),e===void 0?e=i.rounding:Rn(e,0,8),n=nt(new i(n),t+1,e),r=$a(n,!0,t+1)),r};Ee.toFixed=function(t,e){var r,n,i=this,a=i.constructor;return t===void 0?$a(i):(Rn(t,0,ms),e===void 0?e=a.rounding:Rn(e,0,8),n=nt(new a(i),t+St(i)+1,e),r=$a(n.abs(),!1,t+St(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};Ee.toInteger=Ee.toint=function(){var t=this,e=t.constructor;return nt(new e(t),St(t)+1,e.rounding)};Ee.toNumber=function(){return+this};Ee.toPower=Ee.pow=function(t){var e,r,n,i,a,s,l=this,c=l.constructor,f=12,p=+(t=new c(t));if(!t.s)return new c(_r);if(l=new c(l),!l.s){if(t.s<1)throw Error(Br+"Infinity");return l}if(l.eq(_r))return l;if(n=c.precision,t.eq(_r))return nt(l,n);if(e=t.e,r=t.d.length-1,s=e>=r,a=l.s,s){if((r=p<0?-p:p)<=O2){for(i=new c(_r),e=Math.ceil(n/lt+4),ft=!1;r%2&&(i=i.times(l),mT(i.d,e)),r=gs(r/2),r!==0;)l=l.times(l),mT(l.d,e);return ft=!0,t.s<0?new c(_r).div(i):nt(i,n)}}else if(a<0)throw Error(Br+"NaN");return a=a<0&&t.d[Math.max(e,r)]&1?-1:1,l.s=1,ft=!1,i=t.times(Vu(l,n+f)),ft=!0,i=P2(i),i.s=a,i};Ee.toPrecision=function(t,e){var r,n,i=this,a=i.constructor;return t===void 0?(r=St(i),n=$a(i,r<=a.toExpNeg||r>=a.toExpPos)):(Rn(t,1,ms),e===void 0?e=a.rounding:Rn(e,0,8),i=nt(new a(i),t,e),r=St(i),n=$a(i,t<=r||r<=a.toExpNeg,t)),n};Ee.toSignificantDigits=Ee.tosd=function(t,e){var r=this,n=r.constructor;return t===void 0?(t=n.precision,e=n.rounding):(Rn(t,1,ms),e===void 0?e=n.rounding:Rn(e,0,8)),nt(new n(r),t,e)};Ee.toString=Ee.valueOf=Ee.val=Ee.toJSON=Ee[Symbol.for("nodejs.util.inspect.custom")]=function(){var t=this,e=St(t),r=t.constructor;return $a(t,e<=r.toExpNeg||e>=r.toExpPos)};function A2(t,e){var r,n,i,a,s,l,c,f,p=t.constructor,h=p.precision;if(!t.s||!e.s)return e.s||(e=new p(t)),ft?nt(e,h):e;if(c=t.d,f=e.d,s=t.e,i=e.e,c=c.slice(),a=s-i,a){for(a<0?(n=c,a=-a,l=f.length):(n=f,i=s,l=c.length),s=Math.ceil(h/lt),l=s>l?s+1:l+1,a>l&&(a=l,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(l=c.length,a=f.length,l-a<0&&(a=l,n=f,f=c,c=n),r=0;a;)r=(c[--a]=c[a]+f[a]+r)/Lt|0,c[a]%=Lt;for(r&&(c.unshift(r),++i),l=c.length;c[--l]==0;)c.pop();return e.d=c,e.e=i,ft?nt(e,h):e}function Rn(t,e,r){if(t!==~~t||t<e||t>r)throw Error(Da+t)}function An(t){var e,r,n,i=t.length-1,a="",s=t[0];if(i>0){for(a+=s,e=1;e<i;e++)n=t[e]+"",r=lt-n.length,r&&(a+=Ii(r)),a+=n;s=t[e],n=s+"",r=lt-n.length,r&&(a+=Ii(r))}else if(s===0)return"0";for(;s%10===0;)s/=10;return a+s}var ri=(function(){function t(n,i){var a,s=0,l=n.length;for(n=n.slice();l--;)a=n[l]*i+s,n[l]=a%Lt|0,s=a/Lt|0;return s&&n.unshift(s),n}function e(n,i,a,s){var l,c;if(a!=s)c=a>s?1:-1;else for(l=c=0;l<a;l++)if(n[l]!=i[l]){c=n[l]>i[l]?1:-1;break}return c}function r(n,i,a){for(var s=0;a--;)n[a]-=s,s=n[a]<i[a]?1:0,n[a]=s*Lt+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,s){var l,c,f,p,h,m,g,_,w,b,E,P,T,A,x,O,C,N,D=n.constructor,B=n.s==i.s?1:-1,U=n.d,L=i.d;if(!n.s)return new D(n);if(!i.s)throw Error(Br+"Division by zero");for(c=n.e-i.e,C=L.length,x=U.length,g=new D(B),_=g.d=[],f=0;L[f]==(U[f]||0);)++f;if(L[f]>(U[f]||0)&&--c,a==null?P=a=D.precision:s?P=a+(St(n)-St(i))+1:P=a,P<0)return new D(0);if(P=P/lt+2|0,f=0,C==1)for(p=0,L=L[0],P++;(f<x||p)&&P--;f++)T=p*Lt+(U[f]||0),_[f]=T/L|0,p=T%L|0;else{for(p=Lt/(L[0]+1)|0,p>1&&(L=t(L,p),U=t(U,p),C=L.length,x=U.length),A=C,w=U.slice(0,C),b=w.length;b<C;)w[b++]=0;N=L.slice(),N.unshift(0),O=L[0],L[1]>=Lt/2&&++O;do p=0,l=e(L,w,C,b),l<0?(E=w[0],C!=b&&(E=E*Lt+(w[1]||0)),p=E/O|0,p>1?(p>=Lt&&(p=Lt-1),h=t(L,p),m=h.length,b=w.length,l=e(h,w,m,b),l==1&&(p--,r(h,C<m?N:L,m))):(p==0&&(l=p=1),h=L.slice()),m=h.length,m<b&&h.unshift(0),r(w,h,b),l==-1&&(b=w.length,l=e(L,w,C,b),l<1&&(p++,r(w,C<b?N:L,b))),b=w.length):l===0&&(p++,w=[0]),_[f++]=p,l&&w[0]?w[b++]=U[A]||0:(w=[U[A]],b=1);while((A++<x||w[0]!==void 0)&&P--)}return _[0]||_.shift(),g.e=c,nt(g,s?a+St(g)+1:a)}})();function P2(t,e){var r,n,i,a,s,l,c=0,f=0,p=t.constructor,h=p.precision;if(St(t)>16)throw Error(ex+St(t));if(!t.s)return new p(_r);for(ft=!1,l=h,s=new p(.03125);t.abs().gte(.1);)t=t.times(s),f+=5;for(n=Math.log(ga(2,f))/Math.LN10*2+5|0,l+=n,r=i=a=new p(_r),p.precision=l;;){if(i=nt(i.times(t),l),r=r.times(++c),s=a.plus(ri(i,r,l)),An(s.d).slice(0,l)===An(a.d).slice(0,l)){for(;f--;)a=nt(a.times(a),l);return p.precision=h,e==null?(ft=!0,nt(a,h)):a}a=s}}function St(t){for(var e=t.e*lt,r=t.d[0];r>=10;r/=10)e++;return e}function Sy(t,e,r){if(e>t.LN10.sd())throw ft=!0,r&&(t.precision=r),Error(Br+"LN10 precision limit exceeded");return nt(new t(t.LN10),e)}function Ii(t){for(var e="";t--;)e+="0";return e}function Vu(t,e){var r,n,i,a,s,l,c,f,p,h=1,m=10,g=t,_=g.d,w=g.constructor,b=w.precision;if(g.s<1)throw Error(Br+(g.s?"NaN":"-Infinity"));if(g.eq(_r))return new w(0);if(e==null?(ft=!1,f=b):f=e,g.eq(10))return e==null&&(ft=!0),Sy(w,f);if(f+=m,w.precision=f,r=An(_),n=r.charAt(0),a=St(g),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)g=g.times(t),r=An(g.d),n=r.charAt(0),h++;a=St(g),n>1?(g=new w("0."+r),a++):g=new w(n+"."+r.slice(1))}else return c=Sy(w,f+2,b).times(a+""),g=Vu(new w(n+"."+r.slice(1)),f-m).plus(c),w.precision=b,e==null?(ft=!0,nt(g,b)):g;for(l=s=g=ri(g.minus(_r),g.plus(_r),f),p=nt(g.times(g),f),i=3;;){if(s=nt(s.times(p),f),c=l.plus(ri(s,new w(i),f)),An(c.d).slice(0,f)===An(l.d).slice(0,f))return l=l.times(2),a!==0&&(l=l.plus(Sy(w,f+2,b).times(a+""))),l=ri(l,new w(h),f),w.precision=b,e==null?(ft=!0,nt(l,b)):l;l=c,i+=2}}function vT(t,e){var r,n,i;for((r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),n=0;e.charCodeAt(n)===48;)++n;for(i=e.length;e.charCodeAt(i-1)===48;)--i;if(e=e.slice(n,i),e){if(i-=n,r=r-n-1,t.e=gs(r/lt),t.d=[],n=(r+1)%lt,r<0&&(n+=lt),n<i){for(n&&t.d.push(+e.slice(0,n)),i-=lt;n<i;)t.d.push(+e.slice(n,n+=lt));e=e.slice(n),n=lt-e.length}else n-=i;for(;n--;)e+="0";if(t.d.push(+e),ft&&(t.e>Gf||t.e<-Gf))throw Error(ex+r)}else t.s=0,t.e=0,t.d=[0];return t}function nt(t,e,r){var n,i,a,s,l,c,f,p,h=t.d;for(s=1,a=h[0];a>=10;a/=10)s++;if(n=e-s,n<0)n+=lt,i=e,f=h[p=0];else{if(p=Math.ceil((n+1)/lt),a=h.length,p>=a)return t;for(f=a=h[p],s=1;a>=10;a/=10)s++;n%=lt,i=n-lt+s}if(r!==void 0&&(a=ga(10,s-i-1),l=f/a%10|0,c=e<0||h[p+1]!==void 0||f%a,c=r<4?(l||c)&&(r==0||r==(t.s<0?3:2)):l>5||l==5&&(r==4||c||r==6&&(n>0?i>0?f/ga(10,s-i):0:h[p-1])%10&1||r==(t.s<0?8:7))),e<1||!h[0])return c?(a=St(t),h.length=1,e=e-a-1,h[0]=ga(10,(lt-e%lt)%lt),t.e=gs(-e/lt)||0):(h.length=1,h[0]=t.e=t.s=0),t;if(n==0?(h.length=p,a=1,p--):(h.length=p+1,a=ga(10,lt-n),h[p]=i>0?(f/ga(10,s-i)%ga(10,i)|0)*a:0),c)for(;;)if(p==0){(h[0]+=a)==Lt&&(h[0]=1,++t.e);break}else{if(h[p]+=a,h[p]!=Lt)break;h[p--]=0,a=1}for(n=h.length;h[--n]===0;)h.pop();if(ft&&(t.e>Gf||t.e<-Gf))throw Error(ex+St(t));return t}function T2(t,e){var r,n,i,a,s,l,c,f,p,h,m=t.constructor,g=m.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new m(t),ft?nt(e,g):e;if(c=t.d,h=e.d,n=e.e,f=t.e,c=c.slice(),s=f-n,s){for(p=s<0,p?(r=c,s=-s,l=h.length):(r=h,n=f,l=c.length),i=Math.max(Math.ceil(g/lt),l)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=c.length,l=h.length,p=i<l,p&&(l=i),i=0;i<l;i++)if(c[i]!=h[i]){p=c[i]<h[i];break}s=0}for(p&&(r=c,c=h,h=r,e.s=-e.s),l=c.length,i=h.length-l;i>0;--i)c[l++]=0;for(i=h.length;i>s;){if(c[--i]<h[i]){for(a=i;a&&c[--a]===0;)c[a]=Lt-1;--c[a],c[i]+=Lt}c[i]-=h[i]}for(;c[--l]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(e.d=c,e.e=n,ft?nt(e,g):e):new m(0)}function $a(t,e,r){var n,i=St(t),a=An(t.d),s=a.length;return e?(r&&(n=r-s)>0?a=a.charAt(0)+"."+a.slice(1)+Ii(n):s>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Ii(-i-1)+a,r&&(n=r-s)>0&&(a+=Ii(n))):i>=s?(a+=Ii(i+1-s),r&&(n=r-i-1)>0&&(a=a+"."+Ii(n))):((n=i+1)<s&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-s)>0&&(i+1===s&&(a+="."),a+=Ii(n))),t.s<0?"-"+a:a}function mT(t,e){if(t.length>e)return t.length=e,!0}function C2(t){var e,r,n;function i(a){var s=this;if(!(s instanceof i))return new i(a);if(s.constructor=i,a instanceof i){s.s=a.s,s.e=a.e,s.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Da+a);if(a>0)s.s=1;else if(a<0)a=-a,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(a===~~a&&a<1e7){s.e=0,s.d=[a];return}return vT(s,a.toString())}else if(typeof a!="string")throw Error(Da+a);if(a.charCodeAt(0)===45?(a=a.slice(1),s.s=-1):s.s=1,Tq.test(a))vT(s,a);else throw Error(Da+a)}if(i.prototype=Ee,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=C2,i.config=i.set=Cq,t===void 0&&(t={}),t)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],e=0;e<n.length;)t.hasOwnProperty(r=n[e++])||(t[r]=this[r]);return i.config(t),i}function Cq(t){if(!t||typeof t!="object")throw Error(Br+"Object expected");var e,r,n,i=["precision",1,ms,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(e=0;e<i.length;e+=3)if((n=t[r=i[e]])!==void 0)if(gs(n)===n&&n>=i[e+1]&&n<=i[e+2])this[r]=n;else throw Error(Da+r+": "+n);if((n=t[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Da+r+": "+n);return this}var tx=C2(Pq);_r=new tx(1);const et=tx;function kq(t){return Dq(t)||Nq(t)||jq(t)||Rq()}function Rq(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
151
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jq(t,e){if(t){if(typeof t=="string")return nb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nb(t,e)}}function Nq(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function Dq(t){if(Array.isArray(t))return nb(t)}function nb(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Iq=function(e){return e},k2={},R2=function(e){return e===k2},gT=function(e){return function r(){return arguments.length===0||arguments.length===1&&R2(arguments.length<=0?void 0:arguments[0])?r:e.apply(void 0,arguments)}},Mq=function t(e,r){return e===1?r:gT(function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var s=i.filter(function(l){return l!==k2}).length;return s>=e?r.apply(void 0,i):t(e-s,gT(function(){for(var l=arguments.length,c=new Array(l),f=0;f<l;f++)c[f]=arguments[f];var p=i.map(function(h){return R2(h)?c.shift():h});return r.apply(void 0,kq(p).concat(c))}))})},Fd=function(e){return Mq(e.length,e)},ib=function(e,r){for(var n=[],i=e;i<r;++i)n[i-e]=i;return n},Lq=Fd(function(t,e){return Array.isArray(e)?e.map(t):Object.keys(e).map(function(r){return e[r]}).map(t)}),$q=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];if(!r.length)return Iq;var i=r.reverse(),a=i[0],s=i.slice(1);return function(){return s.reduce(function(l,c){return c(l)},a.apply(void 0,arguments))}},ab=function(e){return Array.isArray(e)?e.reverse():e.split("").reverse.join("")},j2=function(e){var r=null,n=null;return function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r&&a.every(function(l,c){return l===r[c]})||(r=a,n=e.apply(void 0,a)),n}};function Fq(t){var e;return t===0?e=1:e=Math.floor(new et(t).abs().log(10).toNumber())+1,e}function Bq(t,e,r){for(var n=new et(t),i=0,a=[];n.lt(e)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var zq=Fd(function(t,e,r){var n=+t,i=+e;return n+r*(i-n)}),Gq=Fd(function(t,e,r){var n=e-+t;return n=n||1/0,(r-t)/n}),Uq=Fd(function(t,e,r){var n=e-+t;return n=n||1/0,Math.max(0,Math.min(1,(r-t)/n))});const Bd={rangeStep:Bq,getDigitCount:Fq,interpolateNumber:zq,uninterpolateNumber:Gq,uninterpolateTruncation:Uq};function ob(t){return Hq(t)||Wq(t)||N2(t)||qq()}function qq(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
152
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wq(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function Hq(t){if(Array.isArray(t))return sb(t)}function Ku(t,e){return Xq(t)||Kq(t,e)||N2(t,e)||Vq()}function Vq(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
153
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N2(t,e){if(t){if(typeof t=="string")return sb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sb(t,e)}}function sb(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Kq(t,e){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(t)))){var r=[],n=!0,i=!1,a=void 0;try{for(var s=t[Symbol.iterator](),l;!(n=(l=s.next()).done)&&(r.push(l.value),!(e&&r.length===e));n=!0);}catch(c){i=!0,a=c}finally{try{!n&&s.return!=null&&s.return()}finally{if(i)throw a}}return r}}function Xq(t){if(Array.isArray(t))return t}function D2(t){var e=Ku(t,2),r=e[0],n=e[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function I2(t,e,r){if(t.lte(0))return new et(0);var n=Bd.getDigitCount(t.toNumber()),i=new et(10).pow(n),a=t.div(i),s=n!==1?.05:.1,l=new et(Math.ceil(a.div(s).toNumber())).add(r).mul(s),c=l.mul(i);return e?c:new et(Math.ceil(c))}function Yq(t,e,r){var n=1,i=new et(t);if(!i.isint()&&r){var a=Math.abs(t);a<1?(n=new et(10).pow(Bd.getDigitCount(t)-1),i=new et(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new et(Math.floor(t)))}else t===0?i=new et(Math.floor((e-1)/2)):r||(i=new et(Math.floor(t)));var s=Math.floor((e-1)/2),l=$q(Lq(function(c){return i.add(new et(c-s).mul(n)).toNumber()}),ib);return l(0,e)}function M2(t,e,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((e-t)/(r-1)))return{step:new et(0),tickMin:new et(0),tickMax:new et(0)};var a=I2(new et(e).sub(t).div(r-1),n,i),s;t<=0&&e>=0?s=new et(0):(s=new et(t).add(e).div(2),s=s.sub(new et(s).mod(a)));var l=Math.ceil(s.sub(t).div(a).toNumber()),c=Math.ceil(new et(e).sub(s).div(a).toNumber()),f=l+c+1;return f>r?M2(t,e,r,n,i+1):(f<r&&(c=e>0?c+(r-f):c,l=e>0?l:l+(r-f)),{step:a,tickMin:s.sub(new et(l).mul(a)),tickMax:s.add(new et(c).mul(a))})}function Qq(t){var e=Ku(t,2),r=e[0],n=e[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=Math.max(i,2),l=D2([r,n]),c=Ku(l,2),f=c[0],p=c[1];if(f===-1/0||p===1/0){var h=p===1/0?[f].concat(ob(ib(0,i-1).map(function(){return 1/0}))):[].concat(ob(ib(0,i-1).map(function(){return-1/0})),[p]);return r>n?ab(h):h}if(f===p)return Yq(f,i,a);var m=M2(f,p,s,a),g=m.step,_=m.tickMin,w=m.tickMax,b=Bd.rangeStep(_,w.add(new et(.1).mul(g)),g);return r>n?ab(b):b}function Zq(t,e){var r=Ku(t,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=D2([n,i]),l=Ku(s,2),c=l[0],f=l[1];if(c===-1/0||f===1/0)return[n,i];if(c===f)return[c];var p=Math.max(e,2),h=I2(new et(f).sub(c).div(p-1),a,0),m=[].concat(ob(Bd.rangeStep(new et(c),new et(f).sub(new et(.99).mul(h)),h)),[f]);return n>i?ab(m):m}var Jq=j2(Qq),e6=j2(Zq),t6="Invariant failed";function Fa(t,e){throw new Error(t6)}var r6=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Ko(t){"@babel/helpers - typeof";return Ko=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},Ko(t)}function Uf(){return Uf=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Uf.apply(this,arguments)}function n6(t,e){return s6(t)||o6(t,e)||a6(t,e)||i6()}function i6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
154
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a6(t,e){if(t){if(typeof t=="string")return yT(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yT(t,e)}}function yT(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function o6(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,l=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return l}}function s6(t){if(Array.isArray(t))return t}function u6(t,e){if(t==null)return{};var r=l6(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function l6(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function c6(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f6(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,F2(n.key),n)}}function d6(t,e,r){return e&&f6(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function h6(t,e,r){return e=qf(e),p6(t,L2()?Reflect.construct(e,r||[],qf(t).constructor):e.apply(t,r))}function p6(t,e){if(e&&(Ko(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return v6(t)}function v6(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function L2(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(L2=function(){return!!t})()}function qf(t){return qf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qf(t)}function m6(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ub(t,e)}function ub(t,e){return ub=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ub(t,e)}function $2(t,e,r){return e=F2(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function F2(t){var e=g6(t,"string");return Ko(e)=="symbol"?e:e+""}function g6(t,e){if(Ko(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Ko(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var zd=(function(t){function e(){return c6(this,e),h6(this,e,arguments)}return m6(e,t),d6(e,[{key:"render",value:function(){var n=this.props,i=n.offset,a=n.layout,s=n.width,l=n.dataKey,c=n.data,f=n.dataPointFormatter,p=n.xAxis,h=n.yAxis,m=u6(n,r6),g=Qe(m,!1);this.props.direction==="x"&&p.type!=="number"&&Fa();var _=c.map(function(w){var b=f(w,l),E=b.x,P=b.y,T=b.value,A=b.errorVal;if(!A)return null;var x=[],O,C;if(Array.isArray(A)){var N=n6(A,2);O=N[0],C=N[1]}else O=C=A;if(a==="vertical"){var D=p.scale,B=P+i,U=B+s,L=B-s,j=D(T-O),X=D(T+C);x.push({x1:X,y1:U,x2:X,y2:L}),x.push({x1:j,y1:B,x2:X,y2:B}),x.push({x1:j,y1:U,x2:j,y2:L})}else if(a==="horizontal"){var K=h.scale,G=E+i,M=G-s,V=G+s,J=K(T-O),ee=K(T+C);x.push({x1:M,y1:ee,x2:V,y2:ee}),x.push({x1:G,y1:J,x2:G,y2:ee}),x.push({x1:M,y1:J,x2:V,y2:J})}return Q.createElement($t,Uf({className:"recharts-errorBar",key:"bar-".concat(x.map(function(F){return"".concat(F.x1,"-").concat(F.x2,"-").concat(F.y1,"-").concat(F.y2)}))},g),x.map(function(F){return Q.createElement("line",Uf({},F,{key:"line-".concat(F.x1,"-").concat(F.x2,"-").concat(F.y1,"-").concat(F.y2)}))}))});return Q.createElement($t,{className:"recharts-errorBars"},_)}}])})(Q.Component);$2(zd,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});$2(zd,"displayName","ErrorBar");function Xu(t){"@babel/helpers - typeof";return Xu=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},Xu(t)}function bT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function pa(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?bT(Object(r),!0).forEach(function(n){y6(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bT(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function y6(t,e,r){return e=b6(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function b6(t){var e=w6(t,"string");return Xu(e)=="symbol"?e:e+""}function w6(t,e){if(Xu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Xu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var B2=function(e){var r=e.children,n=e.formattedGraphicalItems,i=e.legendWidth,a=e.legendContent,s=xr(r,Eo);if(!s)return null;var l=Eo.defaultProps,c=l!==void 0?pa(pa({},l),s.props):{},f;return s.props&&s.props.payload?f=s.props&&s.props.payload:a==="children"?f=(n||[]).reduce(function(p,h){var m=h.item,g=h.props,_=g.sectors||g.data||[];return p.concat(_.map(function(w){return{type:s.props.iconType||m.props.legendType,value:w.name,color:w.fill,payload:w}}))},[]):f=(n||[]).map(function(p){var h=p.item,m=h.type.defaultProps,g=m!==void 0?pa(pa({},m),h.props):{},_=g.dataKey,w=g.name,b=g.legendType,E=g.hide;return{inactive:E,dataKey:_,type:c.iconType||b||"square",color:rx(h),value:w||_,payload:g}}),pa(pa(pa({},c),Eo.getWithHeight(s,i)),{},{payload:f,item:s})};function Yu(t){"@babel/helpers - typeof";return Yu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yu(t)}function wT(t){return E6(t)||_6(t)||S6(t)||x6()}function x6(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
155
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S6(t,e){if(t){if(typeof t=="string")return lb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lb(t,e)}}function _6(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function E6(t){if(Array.isArray(t))return lb(t)}function lb(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function xT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function gt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?xT(Object(r),!0).forEach(function(n){Ao(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xT(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Ao(t,e,r){return e=O6(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function O6(t){var e=A6(t,"string");return Yu(e)=="symbol"?e:e+""}function A6(t,e){if(Yu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Yu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function jn(t,e,r){return Ke(t)||Ke(e)?r:Tt(e)?$r(t,e,r):Ge(e)?e(t):r}function Tu(t,e,r,n){var i=Eq(t,function(l){return jn(l,e)});if(r==="number"){var a=i.filter(function(l){return ge(l)||parseFloat(l)});return a.length?[$d(a),Ld(a)]:[1/0,-1/0]}var s=n?i.filter(function(l){return!Ke(l)}):i;return s.map(function(l){return Tt(l)||l instanceof Date?l:""})}var P6=function(e){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,s=-1,l=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(l<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var c=a.range,f=0;f<l;f++){var p=f>0?i[f-1].coordinate:i[l-1].coordinate,h=i[f].coordinate,m=f>=l-1?i[0].coordinate:i[f+1].coordinate,g=void 0;if(on(h-p)!==on(m-h)){var _=[];if(on(m-h)===on(c[1]-c[0])){g=m;var w=h+c[1]-c[0];_[0]=Math.min(w,(w+p)/2),_[1]=Math.max(w,(w+p)/2)}else{g=p;var b=m+c[1]-c[0];_[0]=Math.min(h,(b+h)/2),_[1]=Math.max(h,(b+h)/2)}var E=[Math.min(h,(g+h)/2),Math.max(h,(g+h)/2)];if(e>E[0]&&e<=E[1]||e>=_[0]&&e<=_[1]){s=i[f].index;break}}else{var P=Math.min(p,m),T=Math.max(p,m);if(e>(P+h)/2&&e<=(T+h)/2){s=i[f].index;break}}}else for(var A=0;A<l;A++)if(A===0&&e<=(n[A].coordinate+n[A+1].coordinate)/2||A>0&&A<l-1&&e>(n[A].coordinate+n[A-1].coordinate)/2&&e<=(n[A].coordinate+n[A+1].coordinate)/2||A===l-1&&e>(n[A].coordinate+n[A-1].coordinate)/2){s=n[A].index;break}return s},rx=function(e){var r,n=e,i=n.type.displayName,a=(r=e.type)!==null&&r!==void 0&&r.defaultProps?gt(gt({},e.type.defaultProps),e.props):e.props,s=a.stroke,l=a.fill,c;switch(i){case"Line":c=s;break;case"Area":case"Radar":c=s&&s!=="none"?s:l;break;default:c=l;break}return c},T6=function(e){var r=e.barSize,n=e.totalSize,i=e.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var s={},l=Object.keys(a),c=0,f=l.length;c<f;c++)for(var p=a[l[c]].stackGroups,h=Object.keys(p),m=0,g=h.length;m<g;m++){var _=p[h[m]],w=_.items,b=_.cateAxisId,E=w.filter(function(C){return ti(C.type).indexOf("Bar")>=0});if(E&&E.length){var P=E[0].type.defaultProps,T=P!==void 0?gt(gt({},P),E[0].props):E[0].props,A=T.barSize,x=T[b];s[x]||(s[x]=[]);var O=Ke(A)?r:A;s[x].push({item:E[0],stackList:E.slice(1),barSize:Ke(O)?void 0:La(O,n,0)})}}return s},C6=function(e){var r=e.barGap,n=e.barCategoryGap,i=e.bandSize,a=e.sizeList,s=a===void 0?[]:a,l=e.maxBarSize,c=s.length;if(c<1)return null;var f=La(r,i,0,!0),p,h=[];if(s[0].barSize===+s[0].barSize){var m=!1,g=i/c,_=s.reduce(function(A,x){return A+x.barSize||0},0);_+=(c-1)*f,_>=i&&(_-=(c-1)*f,f=0),_>=i&&g>0&&(m=!0,g*=.9,_=c*g);var w=(i-_)/2>>0,b={offset:w-f,size:0};p=s.reduce(function(A,x){var O={item:x.item,position:{offset:b.offset+b.size+f,size:m?g:x.barSize}},C=[].concat(wT(A),[O]);return b=C[C.length-1].position,x.stackList&&x.stackList.length&&x.stackList.forEach(function(N){C.push({item:N,position:b})}),C},h)}else{var E=La(n,i,0,!0);i-2*E-(c-1)*f<=0&&(f=0);var P=(i-2*E-(c-1)*f)/c;P>1&&(P>>=0);var T=l===+l?Math.min(P,l):P;p=s.reduce(function(A,x,O){var C=[].concat(wT(A),[{item:x.item,position:{offset:E+(P+f)*O+(P-T)/2,size:T}}]);return x.stackList&&x.stackList.length&&x.stackList.forEach(function(N){C.push({item:N,position:C[C.length-1].position})}),C},h)}return p},k6=function(e,r,n,i){var a=n.children,s=n.width,l=n.margin,c=s-(l.left||0)-(l.right||0),f=B2({children:a,legendWidth:c});if(f){var p=i||{},h=p.width,m=p.height,g=f.align,_=f.verticalAlign,w=f.layout;if((w==="vertical"||w==="horizontal"&&_==="middle")&&g!=="center"&&ge(e[g]))return gt(gt({},e),{},Ao({},g,e[g]+(h||0)));if((w==="horizontal"||w==="vertical"&&g==="center")&&_!=="middle"&&ge(e[_]))return gt(gt({},e),{},Ao({},_,e[_]+(m||0)))}return e},R6=function(e,r,n){return Ke(r)?!0:e==="horizontal"?r==="yAxis":e==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},z2=function(e,r,n,i,a){var s=r.props.children,l=sn(s,zd).filter(function(f){return R6(i,a,f.props.direction)});if(l&&l.length){var c=l.map(function(f){return f.props.dataKey});return e.reduce(function(f,p){var h=jn(p,n);if(Ke(h))return f;var m=Array.isArray(h)?[$d(h),Ld(h)]:[h,h],g=c.reduce(function(_,w){var b=jn(p,w,0),E=m[0]-Math.abs(Array.isArray(b)?b[0]:b),P=m[1]+Math.abs(Array.isArray(b)?b[1]:b);return[Math.min(E,_[0]),Math.max(P,_[1])]},[1/0,-1/0]);return[Math.min(g[0],f[0]),Math.max(g[1],f[1])]},[1/0,-1/0])}return null},j6=function(e,r,n,i,a){var s=r.map(function(l){return z2(e,l,n,a,i)}).filter(function(l){return!Ke(l)});return s&&s.length?s.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]):null},G2=function(e,r,n,i,a){var s=r.map(function(c){var f=c.props.dataKey;return n==="number"&&f&&z2(e,c,f,i)||Tu(e,f,n,a)});if(n==="number")return s.reduce(function(c,f){return[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]);var l={};return s.reduce(function(c,f){for(var p=0,h=f.length;p<h;p++)l[f[p]]||(l[f[p]]=!0,c.push(f[p]));return c},[])},U2=function(e,r){return e==="horizontal"&&r==="xAxis"||e==="vertical"&&r==="yAxis"||e==="centric"&&r==="angleAxis"||e==="radial"&&r==="radiusAxis"},Sa=function(e,r,n){if(!e)return null;var i=e.scale,a=e.duplicateDomain,s=e.type,l=e.range,c=e.realScaleType==="scaleBand"?i.bandwidth()/2:2,f=(r||n)&&s==="category"&&i.bandwidth?i.bandwidth()/c:0;if(f=e.axisType==="angleAxis"&&(l==null?void 0:l.length)>=2?on(l[0]-l[1])*2*f:f,r&&(e.ticks||e.niceTicks)){var p=(e.ticks||e.niceTicks).map(function(h){var m=a?a.indexOf(h):h;return{coordinate:i(m)+f,value:h,offset:f}});return p.filter(function(h){return!Pl(h.coordinate)})}return e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map(function(h,m){return{coordinate:i(h)+f,value:h,index:m,offset:f}}):i.ticks&&!n?i.ticks(e.tickCount).map(function(h){return{coordinate:i(h)+f,value:h,offset:f}}):i.domain().map(function(h,m){return{coordinate:i(h)+f,value:a?a[h]:h,index:m,offset:f}})},_y=new WeakMap,ef=function(e,r){if(typeof r!="function")return e;_y.has(e)||_y.set(e,new WeakMap);var n=_y.get(e);if(n.has(r))return n.get(r);var i=function(){e.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},N6=function(e,r,n){var i=e.scale,a=e.type,s=e.layout,l=e.axisType;if(i==="auto")return s==="radial"&&l==="radiusAxis"?{scale:Gu(),realScaleType:"band"}:s==="radial"&&l==="angleAxis"?{scale:$f(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Pu(),realScaleType:"point"}:a==="category"?{scale:Gu(),realScaleType:"band"}:{scale:$f(),realScaleType:"linear"};if(Ma(i)){var c="scale".concat(Ed(i));return{scale:(oT[c]||Pu)(),realScaleType:oT[c]?c:"point"}}return Ge(i)?{scale:i}:{scale:Pu(),realScaleType:"point"}},ST=1e-4,D6=function(e){var r=e.domain();if(!(!r||r.length<=2)){var n=r.length,i=e.range(),a=Math.min(i[0],i[1])-ST,s=Math.max(i[0],i[1])+ST,l=e(r[0]),c=e(r[n-1]);(l<a||l>s||c<a||c>s)&&e.domain([r[0],r[n-1]])}},I6=function(e,r){if(!e)return null;for(var n=0,i=e.length;n<i;n++)if(e[n].item===r)return e[n].position;return null},M6=function(e,r){if(!r||r.length!==2||!ge(r[0])||!ge(r[1]))return e;var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),a=[e[0],e[1]];return(!ge(e[0])||e[0]<n)&&(a[0]=n),(!ge(e[1])||e[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<n&&(a[1]=n),a},L6=function(e){var r=e.length;if(!(r<=0))for(var n=0,i=e[0].length;n<i;++n)for(var a=0,s=0,l=0;l<r;++l){var c=Pl(e[l][n][1])?e[l][n][0]:e[l][n][1];c>=0?(e[l][n][0]=a,e[l][n][1]=a+c,a=e[l][n][1]):(e[l][n][0]=s,e[l][n][1]=s+c,s=e[l][n][1])}},$6=function(e){var r=e.length;if(!(r<=0))for(var n=0,i=e[0].length;n<i;++n)for(var a=0,s=0;s<r;++s){var l=Pl(e[s][n][1])?e[s][n][0]:e[s][n][1];l>=0?(e[s][n][0]=a,e[s][n][1]=a+l,a=e[s][n][1]):(e[s][n][0]=0,e[s][n][1]=0)}},F6={sign:L6,expand:SB,none:Bo,silhouette:_B,wiggle:EB,positive:$6},B6=function(e,r,n){var i=r.map(function(l){return l.props.dataKey}),a=F6[n],s=xB().keys(i).value(function(l,c){return+jn(l,c,0)}).order(F0).offset(a);return s(e)},z6=function(e,r,n,i,a,s){if(!e)return null;var l=s?r.reverse():r,c={},f=l.reduce(function(h,m){var g,_=(g=m.type)!==null&&g!==void 0&&g.defaultProps?gt(gt({},m.type.defaultProps),m.props):m.props,w=_.stackId,b=_.hide;if(b)return h;var E=_[n],P=h[E]||{hasStack:!1,stackGroups:{}};if(Tt(w)){var T=P.stackGroups[w]||{numericAxisId:n,cateAxisId:i,items:[]};T.items.push(m),P.hasStack=!0,P.stackGroups[w]=T}else P.stackGroups[_d("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[m]};return gt(gt({},h),{},Ao({},E,P))},c),p={};return Object.keys(f).reduce(function(h,m){var g=f[m];if(g.hasStack){var _={};g.stackGroups=Object.keys(g.stackGroups).reduce(function(w,b){var E=g.stackGroups[b];return gt(gt({},w),{},Ao({},b,{numericAxisId:n,cateAxisId:i,items:E.items,stackedData:B6(e,E.items,a)}))},_)}return gt(gt({},h),{},Ao({},m,g))},p)},G6=function(e,r){var n=r.realScaleType,i=r.type,a=r.tickCount,s=r.originalDomain,l=r.allowDecimals,c=n||r.scale;if(c!=="auto"&&c!=="linear")return null;if(a&&i==="number"&&s&&(s[0]==="auto"||s[1]==="auto")){var f=e.domain();if(!f.length)return null;var p=Jq(f,a,l);return e.domain([$d(p),Ld(p)]),{niceTicks:p}}if(a&&i==="number"){var h=e.domain(),m=e6(h,a,l);return{niceTicks:m}}return null},_T=function(e){var r=e.axis,n=e.ticks,i=e.offset,a=e.bandSize,s=e.entry,l=e.index;if(r.type==="category")return n[l]?n[l].coordinate+i:null;var c=jn(s,r.dataKey,r.domain[l]);return Ke(c)?null:r.scale(c)-a/2+i},U6=function(e){var r=e.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},q6=function(e,r){var n,i=(n=e.type)!==null&&n!==void 0&&n.defaultProps?gt(gt({},e.type.defaultProps),e.props):e.props,a=i.stackId;if(Tt(a)){var s=r[a];if(s){var l=s.items.indexOf(e);return l>=0?s.stackedData[l]:null}}return null},W6=function(e){return e.reduce(function(r,n){return[$d(n.concat([r[0]]).filter(ge)),Ld(n.concat([r[1]]).filter(ge))]},[1/0,-1/0])},q2=function(e,r,n){return Object.keys(e).reduce(function(i,a){var s=e[a],l=s.stackedData,c=l.reduce(function(f,p){var h=W6(p.slice(r,n+1));return[Math.min(f[0],h[0]),Math.max(f[1],h[1])]},[1/0,-1/0]);return[Math.min(c[0],i[0]),Math.max(c[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},ET=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,OT=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,cb=function(e,r,n){if(Ge(e))return e(r,n);if(!Array.isArray(e))return r;var i=[];if(ge(e[0]))i[0]=n?e[0]:Math.min(e[0],r[0]);else if(ET.test(e[0])){var a=+ET.exec(e[0])[1];i[0]=r[0]-a}else Ge(e[0])?i[0]=e[0](r[0]):i[0]=r[0];if(ge(e[1]))i[1]=n?e[1]:Math.max(e[1],r[1]);else if(OT.test(e[1])){var s=+OT.exec(e[1])[1];i[1]=r[1]+s}else Ge(e[1])?i[1]=e[1](r[1]):i[1]=r[1];return i},Wf=function(e,r,n){if(e&&e.scale&&e.scale.bandwidth){var i=e.scale.bandwidth();if(!n||i>0)return i}if(e&&r&&r.length>=2){for(var a=Cw(r,function(h){return h.coordinate}),s=1/0,l=1,c=a.length;l<c;l++){var f=a[l],p=a[l-1];s=Math.min((f.coordinate||0)-(p.coordinate||0),s)}return s===1/0?0:s}return n?void 0:0},AT=function(e,r,n){return!e||!e.length||Jw(e,$r(n,"type.defaultProps.domain"))?r:e},W2=function(e,r){var n=e.type.defaultProps?gt(gt({},e.type.defaultProps),e.props):e.props,i=n.dataKey,a=n.name,s=n.unit,l=n.formatter,c=n.tooltipType,f=n.chartType,p=n.hide;return gt(gt({},Qe(e,!1)),{},{dataKey:i,unit:s,formatter:l,name:a||i,color:rx(e),value:jn(r,i),type:c,payload:r,chartType:f,hide:p})};function Qu(t){"@babel/helpers - typeof";return Qu=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},Qu(t)}function PT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function TT(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?PT(Object(r),!0).forEach(function(n){H6(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):PT(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function H6(t,e,r){return e=V6(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function V6(t){var e=K6(t,"string");return Qu(e)=="symbol"?e:e+""}function K6(t,e){if(Qu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Qu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Hf=Math.PI/180,X6=function(e){return e*180/Math.PI},Ht=function(e,r,n,i){return{x:e+Math.cos(-Hf*i)*n,y:r+Math.sin(-Hf*i)*n}},Y6=function(e,r){var n=e.x,i=e.y,a=r.x,s=r.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(i-s,2))},Q6=function(e,r){var n=e.x,i=e.y,a=r.cx,s=r.cy,l=Y6({x:n,y:i},{x:a,y:s});if(l<=0)return{radius:l};var c=(n-a)/l,f=Math.acos(c);return i>s&&(f=2*Math.PI-f),{radius:l,angle:X6(f),angleInRadian:f}},Z6=function(e){var r=e.startAngle,n=e.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),s=Math.min(i,a);return{startAngle:r-s*360,endAngle:n-s*360}},J6=function(e,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),s=Math.floor(i/360),l=Math.min(a,s);return e+l*360},CT=function(e,r){var n=e.x,i=e.y,a=Q6({x:n,y:i},r),s=a.radius,l=a.angle,c=r.innerRadius,f=r.outerRadius;if(s<c||s>f)return!1;if(s===0)return!0;var p=Z6(r),h=p.startAngle,m=p.endAngle,g=l,_;if(h<=m){for(;g>m;)g-=360;for(;g<h;)g+=360;_=g>=h&&g<=m}else{for(;g>h;)g-=360;for(;g<m;)g+=360;_=g>=m&&g<=h}return _?TT(TT({},r),{},{radius:s,angle:J6(g,r)}):null};function Zu(t){"@babel/helpers - typeof";return Zu=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},Zu(t)}var e5=["offset"];function t5(t){return a5(t)||i5(t)||n5(t)||r5()}function r5(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
156
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n5(t,e){if(t){if(typeof t=="string")return fb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fb(t,e)}}function i5(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function a5(t){if(Array.isArray(t))return fb(t)}function fb(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function o5(t,e){if(t==null)return{};var r=s5(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function s5(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function kT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function At(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?kT(Object(r),!0).forEach(function(n){u5(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):kT(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function u5(t,e,r){return e=l5(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function l5(t){var e=c5(t,"string");return Zu(e)=="symbol"?e:e+""}function c5(t,e){if(Zu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Zu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ju(){return Ju=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ju.apply(this,arguments)}var f5=function(e){var r=e.value,n=e.formatter,i=Ke(e.children)?r:e.children;return Ge(n)?n(i):i},d5=function(e,r){var n=on(r-e),i=Math.min(Math.abs(r-e),360);return n*i},h5=function(e,r,n){var i=e.position,a=e.viewBox,s=e.offset,l=e.className,c=a,f=c.cx,p=c.cy,h=c.innerRadius,m=c.outerRadius,g=c.startAngle,_=c.endAngle,w=c.clockWise,b=(h+m)/2,E=d5(g,_),P=E>=0?1:-1,T,A;i==="insideStart"?(T=g+P*s,A=w):i==="insideEnd"?(T=_-P*s,A=!w):i==="end"&&(T=_+P*s,A=w),A=E<=0?A:!A;var x=Ht(f,p,b,T),O=Ht(f,p,b,T+(A?1:-1)*359),C="M".concat(x.x,",").concat(x.y,`
157
+ A`).concat(b,",").concat(b,",0,1,").concat(A?0:1,`,
158
+ `).concat(O.x,",").concat(O.y),N=Ke(e.id)?_d("recharts-radial-line-"):e.id;return Q.createElement("text",Ju({},n,{dominantBaseline:"central",className:Ve("recharts-radial-bar-label",l)}),Q.createElement("defs",null,Q.createElement("path",{id:N,d:C})),Q.createElement("textPath",{xlinkHref:"#".concat(N)},r))},p5=function(e){var r=e.viewBox,n=e.offset,i=e.position,a=r,s=a.cx,l=a.cy,c=a.innerRadius,f=a.outerRadius,p=a.startAngle,h=a.endAngle,m=(p+h)/2;if(i==="outside"){var g=Ht(s,l,f+n,m),_=g.x,w=g.y;return{x:_,y:w,textAnchor:_>=s?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:s,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:s,y:l,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:s,y:l,textAnchor:"middle",verticalAnchor:"end"};var b=(c+f)/2,E=Ht(s,l,b,m),P=E.x,T=E.y;return{x:P,y:T,textAnchor:"middle",verticalAnchor:"middle"}},v5=function(e){var r=e.viewBox,n=e.parentViewBox,i=e.offset,a=e.position,s=r,l=s.x,c=s.y,f=s.width,p=s.height,h=p>=0?1:-1,m=h*i,g=h>0?"end":"start",_=h>0?"start":"end",w=f>=0?1:-1,b=w*i,E=w>0?"end":"start",P=w>0?"start":"end";if(a==="top"){var T={x:l+f/2,y:c-h*i,textAnchor:"middle",verticalAnchor:g};return At(At({},T),n?{height:Math.max(c-n.y,0),width:f}:{})}if(a==="bottom"){var A={x:l+f/2,y:c+p+m,textAnchor:"middle",verticalAnchor:_};return At(At({},A),n?{height:Math.max(n.y+n.height-(c+p),0),width:f}:{})}if(a==="left"){var x={x:l-b,y:c+p/2,textAnchor:E,verticalAnchor:"middle"};return At(At({},x),n?{width:Math.max(x.x-n.x,0),height:p}:{})}if(a==="right"){var O={x:l+f+b,y:c+p/2,textAnchor:P,verticalAnchor:"middle"};return At(At({},O),n?{width:Math.max(n.x+n.width-O.x,0),height:p}:{})}var C=n?{width:f,height:p}:{};return a==="insideLeft"?At({x:l+b,y:c+p/2,textAnchor:P,verticalAnchor:"middle"},C):a==="insideRight"?At({x:l+f-b,y:c+p/2,textAnchor:E,verticalAnchor:"middle"},C):a==="insideTop"?At({x:l+f/2,y:c+m,textAnchor:"middle",verticalAnchor:_},C):a==="insideBottom"?At({x:l+f/2,y:c+p-m,textAnchor:"middle",verticalAnchor:g},C):a==="insideTopLeft"?At({x:l+b,y:c+m,textAnchor:P,verticalAnchor:_},C):a==="insideTopRight"?At({x:l+f-b,y:c+m,textAnchor:E,verticalAnchor:_},C):a==="insideBottomLeft"?At({x:l+b,y:c+p-m,textAnchor:P,verticalAnchor:g},C):a==="insideBottomRight"?At({x:l+f-b,y:c+p-m,textAnchor:E,verticalAnchor:g},C):hs(a)&&(ge(a.x)||ba(a.x))&&(ge(a.y)||ba(a.y))?At({x:l+La(a.x,f),y:c+La(a.y,p),textAnchor:"end",verticalAnchor:"end"},C):At({x:l+f/2,y:c+p/2,textAnchor:"middle",verticalAnchor:"middle"},C)},m5=function(e){return"cx"in e&&ge(e.cx)};function Jt(t){var e=t.offset,r=e===void 0?5:e,n=o5(t,e5),i=At({offset:r},n),a=i.viewBox,s=i.position,l=i.value,c=i.children,f=i.content,p=i.className,h=p===void 0?"":p,m=i.textBreakAll;if(!a||Ke(l)&&Ke(c)&&!I.isValidElement(f)&&!Ge(f))return null;if(I.isValidElement(f))return I.cloneElement(f,i);var g;if(Ge(f)){if(g=I.createElement(f,i),I.isValidElement(g))return g}else g=f5(i);var _=m5(a),w=Qe(i,!0);if(_&&(s==="insideStart"||s==="insideEnd"||s==="end"))return h5(i,g,w);var b=_?p5(i):v5(i);return Q.createElement(kf,Ju({className:Ve("recharts-label",h)},w,b,{breakAll:m}),g)}Jt.displayName="Label";var H2=function(e){var r=e.cx,n=e.cy,i=e.angle,a=e.startAngle,s=e.endAngle,l=e.r,c=e.radius,f=e.innerRadius,p=e.outerRadius,h=e.x,m=e.y,g=e.top,_=e.left,w=e.width,b=e.height,E=e.clockWise,P=e.labelViewBox;if(P)return P;if(ge(w)&&ge(b)){if(ge(h)&&ge(m))return{x:h,y:m,width:w,height:b};if(ge(g)&&ge(_))return{x:g,y:_,width:w,height:b}}return ge(h)&&ge(m)?{x:h,y:m,width:0,height:0}:ge(r)&&ge(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:s||i||0,innerRadius:f||0,outerRadius:p||c||l||0,clockWise:E}:e.viewBox?e.viewBox:{}},g5=function(e,r){return e?e===!0?Q.createElement(Jt,{key:"label-implicit",viewBox:r}):Tt(e)?Q.createElement(Jt,{key:"label-implicit",viewBox:r,value:e}):I.isValidElement(e)?e.type===Jt?I.cloneElement(e,{key:"label-implicit",viewBox:r}):Q.createElement(Jt,{key:"label-implicit",content:e,viewBox:r}):Ge(e)?Q.createElement(Jt,{key:"label-implicit",content:e,viewBox:r}):hs(e)?Q.createElement(Jt,Ju({viewBox:r},e,{key:"label-implicit"})):null:null},y5=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var i=e.children,a=H2(e),s=sn(i,Jt).map(function(c,f){return I.cloneElement(c,{viewBox:r||a,key:"label-".concat(f)})});if(!n)return s;var l=g5(e.label,r||a);return[l].concat(t5(s))};Jt.parseViewBox=H2;Jt.renderCallByParent=y5;var Ey,RT;function b5(){if(RT)return Ey;RT=1;function t(e){var r=e==null?0:e.length;return r?e[r-1]:void 0}return Ey=t,Ey}var w5=b5();const x5=tt(w5);function el(t){"@babel/helpers - typeof";return el=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},el(t)}var S5=["valueAccessor"],_5=["data","dataKey","clockWise","id","textBreakAll"];function E5(t){return T5(t)||P5(t)||A5(t)||O5()}function O5(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
159
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function A5(t,e){if(t){if(typeof t=="string")return db(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return db(t,e)}}function P5(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function T5(t){if(Array.isArray(t))return db(t)}function db(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Vf(){return Vf=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Vf.apply(this,arguments)}function jT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function NT(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?jT(Object(r),!0).forEach(function(n){C5(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jT(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function C5(t,e,r){return e=k5(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function k5(t){var e=R5(t,"string");return el(e)=="symbol"?e:e+""}function R5(t,e){if(el(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(el(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function DT(t,e){if(t==null)return{};var r=j5(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function j5(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var N5=function(e){return Array.isArray(e.value)?x5(e.value):e.value};function Ia(t){var e=t.valueAccessor,r=e===void 0?N5:e,n=DT(t,S5),i=n.data,a=n.dataKey,s=n.clockWise,l=n.id,c=n.textBreakAll,f=DT(n,_5);return!i||!i.length?null:Q.createElement($t,{className:"recharts-label-list"},i.map(function(p,h){var m=Ke(a)?r(p,h):jn(p&&p.payload,a),g=Ke(l)?{}:{id:"".concat(l,"-").concat(h)};return Q.createElement(Jt,Vf({},Qe(p,!0),f,g,{parentViewBox:p.parentViewBox,value:m,textBreakAll:c,viewBox:Jt.parseViewBox(Ke(s)?p:NT(NT({},p),{},{clockWise:s})),key:"label-".concat(h),index:h}))}))}Ia.displayName="LabelList";function D5(t,e){return t?t===!0?Q.createElement(Ia,{key:"labelList-implicit",data:e}):Q.isValidElement(t)||Ge(t)?Q.createElement(Ia,{key:"labelList-implicit",data:e,content:t}):hs(t)?Q.createElement(Ia,Vf({data:e},t,{key:"labelList-implicit"})):null:null}function I5(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var n=t.children,i=sn(n,Ia).map(function(s,l){return I.cloneElement(s,{data:e,key:"labelList-".concat(l)})});if(!r)return i;var a=D5(t.label,e);return[a].concat(E5(i))}Ia.renderCallByParent=I5;function tl(t){"@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(t)}function hb(){return hb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},hb.apply(this,arguments)}function IT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function MT(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?IT(Object(r),!0).forEach(function(n){M5(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):IT(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function M5(t,e,r){return e=L5(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function L5(t){var e=$5(t,"string");return tl(e)=="symbol"?e:e+""}function $5(t,e){if(tl(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(tl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var F5=function(e,r){var n=on(r-e),i=Math.min(Math.abs(r-e),359.999);return n*i},tf=function(e){var r=e.cx,n=e.cy,i=e.radius,a=e.angle,s=e.sign,l=e.isExternal,c=e.cornerRadius,f=e.cornerIsExternal,p=c*(l?1:-1)+i,h=Math.asin(c/p)/Hf,m=f?a:a+s*h,g=Ht(r,n,p,m),_=Ht(r,n,i,m),w=f?a-s*h:a,b=Ht(r,n,p*Math.cos(h*Hf),w);return{center:g,circleTangency:_,lineTangency:b,theta:h}},V2=function(e){var r=e.cx,n=e.cy,i=e.innerRadius,a=e.outerRadius,s=e.startAngle,l=e.endAngle,c=F5(s,l),f=s+c,p=Ht(r,n,a,s),h=Ht(r,n,a,f),m="M ".concat(p.x,",").concat(p.y,`
160
+ A `).concat(a,",").concat(a,`,0,
161
+ `).concat(+(Math.abs(c)>180),",").concat(+(s>f),`,
162
+ `).concat(h.x,",").concat(h.y,`
163
+ `);if(i>0){var g=Ht(r,n,i,s),_=Ht(r,n,i,f);m+="L ".concat(_.x,",").concat(_.y,`
164
+ A `).concat(i,",").concat(i,`,0,
165
+ `).concat(+(Math.abs(c)>180),",").concat(+(s<=f),`,
166
+ `).concat(g.x,",").concat(g.y," Z")}else m+="L ".concat(r,",").concat(n," Z");return m},B5=function(e){var r=e.cx,n=e.cy,i=e.innerRadius,a=e.outerRadius,s=e.cornerRadius,l=e.forceCornerRadius,c=e.cornerIsExternal,f=e.startAngle,p=e.endAngle,h=on(p-f),m=tf({cx:r,cy:n,radius:a,angle:f,sign:h,cornerRadius:s,cornerIsExternal:c}),g=m.circleTangency,_=m.lineTangency,w=m.theta,b=tf({cx:r,cy:n,radius:a,angle:p,sign:-h,cornerRadius:s,cornerIsExternal:c}),E=b.circleTangency,P=b.lineTangency,T=b.theta,A=c?Math.abs(f-p):Math.abs(f-p)-w-T;if(A<0)return l?"M ".concat(_.x,",").concat(_.y,`
167
+ a`).concat(s,",").concat(s,",0,0,1,").concat(s*2,`,0
168
+ a`).concat(s,",").concat(s,",0,0,1,").concat(-s*2,`,0
169
+ `):V2({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:f,endAngle:p});var x="M ".concat(_.x,",").concat(_.y,`
170
+ A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(g.x,",").concat(g.y,`
171
+ A`).concat(a,",").concat(a,",0,").concat(+(A>180),",").concat(+(h<0),",").concat(E.x,",").concat(E.y,`
172
+ A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(P.x,",").concat(P.y,`
173
+ `);if(i>0){var O=tf({cx:r,cy:n,radius:i,angle:f,sign:h,isExternal:!0,cornerRadius:s,cornerIsExternal:c}),C=O.circleTangency,N=O.lineTangency,D=O.theta,B=tf({cx:r,cy:n,radius:i,angle:p,sign:-h,isExternal:!0,cornerRadius:s,cornerIsExternal:c}),U=B.circleTangency,L=B.lineTangency,j=B.theta,X=c?Math.abs(f-p):Math.abs(f-p)-D-j;if(X<0&&s===0)return"".concat(x,"L").concat(r,",").concat(n,"Z");x+="L".concat(L.x,",").concat(L.y,`
174
+ A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(U.x,",").concat(U.y,`
175
+ A`).concat(i,",").concat(i,",0,").concat(+(X>180),",").concat(+(h>0),",").concat(C.x,",").concat(C.y,`
176
+ A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(N.x,",").concat(N.y,"Z")}else x+="L".concat(r,",").concat(n,"Z");return x},z5={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},K2=function(e){var r=MT(MT({},z5),e),n=r.cx,i=r.cy,a=r.innerRadius,s=r.outerRadius,l=r.cornerRadius,c=r.forceCornerRadius,f=r.cornerIsExternal,p=r.startAngle,h=r.endAngle,m=r.className;if(s<a||p===h)return null;var g=Ve("recharts-sector",m),_=s-a,w=La(l,_,0,!0),b;return w>0&&Math.abs(p-h)<360?b=B5({cx:n,cy:i,innerRadius:a,outerRadius:s,cornerRadius:Math.min(w,_/2),forceCornerRadius:c,cornerIsExternal:f,startAngle:p,endAngle:h}):b=V2({cx:n,cy:i,innerRadius:a,outerRadius:s,startAngle:p,endAngle:h}),Q.createElement("path",hb({},Qe(r,!0),{className:g,d:b,role:"img"}))};function rl(t){"@babel/helpers - typeof";return rl=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},rl(t)}function pb(){return pb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},pb.apply(this,arguments)}function LT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function $T(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?LT(Object(r),!0).forEach(function(n){G5(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):LT(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function G5(t,e,r){return e=U5(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function U5(t){var e=q5(t,"string");return rl(e)=="symbol"?e:e+""}function q5(t,e){if(rl(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(rl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var FT={curveBasisClosed:cB,curveBasisOpen:fB,curveBasis:lB,curveBumpX:X8,curveBumpY:Y8,curveLinearClosed:dB,curveLinear:Ad,curveMonotoneX:hB,curveMonotoneY:pB,curveNatural:vB,curveStep:mB,curveStepAfter:yB,curveStepBefore:gB},rf=function(e){return e.x===+e.x&&e.y===+e.y},cu=function(e){return e.x},fu=function(e){return e.y},W5=function(e,r){if(Ge(e))return e;var n="curve".concat(Ed(e));return(n==="curveMonotone"||n==="curveBump")&&r?FT["".concat(n).concat(r==="vertical"?"Y":"X")]:FT[n]||Ad},H5=function(e){var r=e.type,n=r===void 0?"linear":r,i=e.points,a=i===void 0?[]:i,s=e.baseLine,l=e.layout,c=e.connectNulls,f=c===void 0?!1:c,p=W5(n,l),h=f?a.filter(function(w){return rf(w)}):a,m;if(Array.isArray(s)){var g=f?s.filter(function(w){return rf(w)}):s,_=h.map(function(w,b){return $T($T({},w),{},{base:g[b]})});return l==="vertical"?m=Vc().y(fu).x1(cu).x0(function(w){return w.base.x}):m=Vc().x(cu).y1(fu).y0(function(w){return w.base.y}),m.defined(rf).curve(p),m(_)}return l==="vertical"&&ge(s)?m=Vc().y(fu).x1(cu).x0(s):ge(s)?m=Vc().x(cu).y1(fu).y0(s):m=ej().x(cu).y(fu),m.defined(rf).curve(p),m(h)},BT=function(e){var r=e.className,n=e.points,i=e.path,a=e.pathRef;if((!n||!n.length)&&!i)return null;var s=n&&n.length?H5(e):i;return I.createElement("path",pb({},Qe(e,!1),yf(e),{className:Ve("recharts-curve",r),d:s,ref:a}))},Oy={exports:{}},Ay,zT;function V5(){if(zT)return Ay;zT=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ay=t,Ay}var Py,GT;function K5(){if(GT)return Py;GT=1;var t=V5();function e(){}function r(){}return r.resetWarningCache=e,Py=function(){function n(s,l,c,f,p,h){if(h!==t){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}n.isRequired=n;function i(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:e};return a.PropTypes=a,a},Py}var UT;function X5(){return UT||(UT=1,Oy.exports=K5()()),Oy.exports}var Y5=X5();const Ye=tt(Y5),{getOwnPropertyNames:Q5,getOwnPropertySymbols:Z5}=Object,{hasOwnProperty:J5}=Object.prototype;function Ty(t,e){return function(n,i,a){return t(n,i,a)&&e(n,i,a)}}function nf(t){return function(r,n,i){if(!r||!n||typeof r!="object"||typeof n!="object")return t(r,n,i);const{cache:a}=i,s=a.get(r),l=a.get(n);if(s&&l)return s===n&&l===r;a.set(r,n),a.set(n,r);const c=t(r,n,i);return a.delete(r),a.delete(n),c}}function eW(t){return t!=null?t[Symbol.toStringTag]:void 0}function qT(t){return Q5(t).concat(Z5(t))}const tW=Object.hasOwn||((t,e)=>J5.call(t,e));function Ua(t,e){return t===e||!t&&!e&&t!==t&&e!==e}const rW="__v",nW="__o",iW="_owner",{getOwnPropertyDescriptor:WT,keys:HT}=Object;function aW(t,e){return t.byteLength===e.byteLength&&Kf(new Uint8Array(t),new Uint8Array(e))}function oW(t,e,r){let n=t.length;if(e.length!==n)return!1;for(;n-- >0;)if(!r.equals(t[n],e[n],n,n,t,e,r))return!1;return!0}function sW(t,e){return t.byteLength===e.byteLength&&Kf(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function uW(t,e){return Ua(t.getTime(),e.getTime())}function lW(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function cW(t,e){return t===e}function VT(t,e,r){const n=t.size;if(n!==e.size)return!1;if(!n)return!0;const i=new Array(n),a=t.entries();let s,l,c=0;for(;(s=a.next())&&!s.done;){const f=e.entries();let p=!1,h=0;for(;(l=f.next())&&!l.done;){if(i[h]){h++;continue}const m=s.value,g=l.value;if(r.equals(m[0],g[0],c,h,t,e,r)&&r.equals(m[1],g[1],m[0],g[0],t,e,r)){p=i[h]=!0;break}h++}if(!p)return!1;c++}return!0}const fW=Ua;function dW(t,e,r){const n=HT(t);let i=n.length;if(HT(e).length!==i)return!1;for(;i-- >0;)if(!X2(t,e,r,n[i]))return!1;return!0}function du(t,e,r){const n=qT(t);let i=n.length;if(qT(e).length!==i)return!1;let a,s,l;for(;i-- >0;)if(a=n[i],!X2(t,e,r,a)||(s=WT(t,a),l=WT(e,a),(s||l)&&(!s||!l||s.configurable!==l.configurable||s.enumerable!==l.enumerable||s.writable!==l.writable)))return!1;return!0}function hW(t,e){return Ua(t.valueOf(),e.valueOf())}function pW(t,e){return t.source===e.source&&t.flags===e.flags}function KT(t,e,r){const n=t.size;if(n!==e.size)return!1;if(!n)return!0;const i=new Array(n),a=t.values();let s,l;for(;(s=a.next())&&!s.done;){const c=e.values();let f=!1,p=0;for(;(l=c.next())&&!l.done;){if(!i[p]&&r.equals(s.value,l.value,s.value,l.value,t,e,r)){f=i[p]=!0;break}p++}if(!f)return!1}return!0}function Kf(t,e){let r=t.byteLength;if(e.byteLength!==r||t.byteOffset!==e.byteOffset)return!1;for(;r-- >0;)if(t[r]!==e[r])return!1;return!0}function vW(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function X2(t,e,r,n){return(n===iW||n===nW||n===rW)&&(t.$$typeof||e.$$typeof)?!0:tW(e,n)&&r.equals(t[n],e[n],n,n,t,e,r)}const mW="[object ArrayBuffer]",gW="[object Arguments]",yW="[object Boolean]",bW="[object DataView]",wW="[object Date]",xW="[object Error]",SW="[object Map]",_W="[object Number]",EW="[object Object]",OW="[object RegExp]",AW="[object Set]",PW="[object String]",TW={"[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},CW="[object URL]",kW=Object.prototype.toString;function RW({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:s,areNumbersEqual:l,areObjectsEqual:c,arePrimitiveWrappersEqual:f,areRegExpsEqual:p,areSetsEqual:h,areTypedArraysEqual:m,areUrlsEqual:g,unknownTagComparators:_}){return function(b,E,P){if(b===E)return!0;if(b==null||E==null)return!1;const T=typeof b;if(T!==typeof E)return!1;if(T!=="object")return T==="number"?l(b,E,P):T==="function"?a(b,E,P):!1;const A=b.constructor;if(A!==E.constructor)return!1;if(A===Object)return c(b,E,P);if(Array.isArray(b))return e(b,E,P);if(A===Date)return n(b,E,P);if(A===RegExp)return p(b,E,P);if(A===Map)return s(b,E,P);if(A===Set)return h(b,E,P);const x=kW.call(b);if(x===wW)return n(b,E,P);if(x===OW)return p(b,E,P);if(x===SW)return s(b,E,P);if(x===AW)return h(b,E,P);if(x===EW)return typeof b.then!="function"&&typeof E.then!="function"&&c(b,E,P);if(x===CW)return g(b,E,P);if(x===xW)return i(b,E,P);if(x===gW)return c(b,E,P);if(TW[x])return m(b,E,P);if(x===mW)return t(b,E,P);if(x===bW)return r(b,E,P);if(x===yW||x===_W||x===PW)return f(b,E,P);if(_){let O=_[x];if(!O){const C=eW(b);C&&(O=_[C])}if(O)return O(b,E,P)}return!1}}function jW({circular:t,createCustomConfig:e,strict:r}){let n={areArrayBuffersEqual:aW,areArraysEqual:r?du:oW,areDataViewsEqual:sW,areDatesEqual:uW,areErrorsEqual:lW,areFunctionsEqual:cW,areMapsEqual:r?Ty(VT,du):VT,areNumbersEqual:fW,areObjectsEqual:r?du:dW,arePrimitiveWrappersEqual:hW,areRegExpsEqual:pW,areSetsEqual:r?Ty(KT,du):KT,areTypedArraysEqual:r?Ty(Kf,du):Kf,areUrlsEqual:vW,unknownTagComparators:void 0};if(e&&(n=Object.assign({},n,e(n))),t){const i=nf(n.areArraysEqual),a=nf(n.areMapsEqual),s=nf(n.areObjectsEqual),l=nf(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:l})}return n}function NW(t){return function(e,r,n,i,a,s,l){return t(e,r,l)}}function DW({circular:t,comparator:e,createState:r,equals:n,strict:i}){if(r)return function(l,c){const{cache:f=t?new WeakMap:void 0,meta:p}=r();return e(l,c,{cache:f,equals:n,meta:p,strict:i})};if(t)return function(l,c){return e(l,c,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};const a={cache:void 0,equals:n,meta:void 0,strict:i};return function(l,c){return e(l,c,a)}}const IW=Ji();Ji({strict:!0});Ji({circular:!0});Ji({circular:!0,strict:!0});Ji({createInternalComparator:()=>Ua});Ji({strict:!0,createInternalComparator:()=>Ua});Ji({circular:!0,createInternalComparator:()=>Ua});Ji({circular:!0,createInternalComparator:()=>Ua,strict:!0});function Ji(t={}){const{circular:e=!1,createInternalComparator:r,createState:n,strict:i=!1}=t,a=jW(t),s=RW(a),l=r?r(s):NW(s);return DW({circular:e,comparator:s,createState:n,equals:l,strict:i})}function MW(t){typeof requestAnimationFrame<"u"&&requestAnimationFrame(t)}function XT(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>e?(t(a),r=-1):MW(i)};requestAnimationFrame(n)}function vb(t){"@babel/helpers - typeof";return vb=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},vb(t)}function LW(t){return zW(t)||BW(t)||FW(t)||$W()}function $W(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
177
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FW(t,e){if(t){if(typeof t=="string")return YT(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return YT(t,e)}}function YT(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function BW(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function zW(t){if(Array.isArray(t))return t}function GW(){var t={},e=function(){return null},r=!1,n=function i(a){if(!r){if(Array.isArray(a)){if(!a.length)return;var s=a,l=LW(s),c=l[0],f=l.slice(1);if(typeof c=="number"){XT(i.bind(null,f),c);return}i(c),XT(i.bind(null,f));return}vb(a)==="object"&&(t=a,e(t)),typeof a=="function"&&a()}};return{stop:function(){r=!0},start:function(a){r=!1,n(a)},subscribe:function(a){return e=a,function(){e=function(){return null}}}}}function nl(t){"@babel/helpers - typeof";return nl=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},nl(t)}function QT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ZT(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?QT(Object(r),!0).forEach(function(n){Y2(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):QT(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Y2(t,e,r){return e=UW(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function UW(t){var e=qW(t,"string");return nl(e)==="symbol"?e:String(e)}function qW(t,e){if(nl(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(nl(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var WW=function(e,r){return[Object.keys(e),Object.keys(r)].reduce(function(n,i){return n.filter(function(a){return i.includes(a)})})},HW=function(e){return e},VW=function(e){return e.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},Cu=function(e,r){return Object.keys(r).reduce(function(n,i){return ZT(ZT({},n),{},Y2({},i,e(i,r[i])))},{})},JT=function(e,r,n){return e.map(function(i){return"".concat(VW(i)," ").concat(r,"ms ").concat(n)}).join(",")};function KW(t,e){return QW(t)||YW(t,e)||Q2(t,e)||XW()}function XW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
178
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YW(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,l=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return l}}function QW(t){if(Array.isArray(t))return t}function ZW(t){return tH(t)||eH(t)||Q2(t)||JW()}function JW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
179
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Q2(t,e){if(t){if(typeof t=="string")return mb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return mb(t,e)}}function eH(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function tH(t){if(Array.isArray(t))return mb(t)}function mb(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Xf=1e-4,Z2=function(e,r){return[0,3*e,3*r-6*e,3*e-3*r+1]},J2=function(e,r){return e.map(function(n,i){return n*Math.pow(r,i)}).reduce(function(n,i){return n+i})},eC=function(e,r){return function(n){var i=Z2(e,r);return J2(i,n)}},rH=function(e,r){return function(n){var i=Z2(e,r),a=[].concat(ZW(i.map(function(s,l){return s*l}).slice(1)),[0]);return J2(a,n)}},tC=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var i=r[0],a=r[1],s=r[2],l=r[3];if(r.length===1)switch(r[0]){case"linear":i=0,a=0,s=1,l=1;break;case"ease":i=.25,a=.1,s=.25,l=1;break;case"ease-in":i=.42,a=0,s=1,l=1;break;case"ease-out":i=.42,a=0,s=.58,l=1;break;case"ease-in-out":i=0,a=0,s=.58,l=1;break;default:{var c=r[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var f=c[1].split(")")[0].split(",").map(function(b){return parseFloat(b)}),p=KW(f,4);i=p[0],a=p[1],s=p[2],l=p[3]}}}var h=eC(i,s),m=eC(a,l),g=rH(i,s),_=function(E){return E>1?1:E<0?0:E},w=function(E){for(var P=E>1?1:E,T=P,A=0;A<8;++A){var x=h(T)-P,O=g(T);if(Math.abs(x-P)<Xf||O<Xf)return m(T);T=_(T-x/O)}return m(T)};return w.isStepper=!1,w},nH=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.stiff,n=r===void 0?100:r,i=e.damping,a=i===void 0?8:i,s=e.dt,l=s===void 0?17:s,c=function(p,h,m){var g=-(p-h)*n,_=m*a,w=m+(g-_)*l/1e3,b=m*l/1e3+p;return Math.abs(b-h)<Xf&&Math.abs(w)<Xf?[h,0]:[b,w]};return c.isStepper=!0,c.dt=l,c},iH=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var i=r[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return tC(i);case"spring":return nH();default:if(i.split("(")[0]==="cubic-bezier")return tC(i)}return typeof i=="function"?i:null};function il(t){"@babel/helpers - typeof";return il=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},il(t)}function rC(t){return sH(t)||oH(t)||eN(t)||aH()}function aH(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
180
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oH(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function sH(t){if(Array.isArray(t))return yb(t)}function nC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ut(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?nC(Object(r),!0).forEach(function(n){gb(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):nC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function gb(t,e,r){return e=uH(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function uH(t){var e=lH(t,"string");return il(e)==="symbol"?e:String(e)}function lH(t,e){if(il(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(il(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function cH(t,e){return hH(t)||dH(t,e)||eN(t,e)||fH()}function fH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
181
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eN(t,e){if(t){if(typeof t=="string")return yb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yb(t,e)}}function yb(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function dH(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,l=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return l}}function hH(t){if(Array.isArray(t))return t}var Yf=function(e,r,n){return e+(r-e)*n},bb=function(e){var r=e.from,n=e.to;return r!==n},pH=function t(e,r,n){var i=Cu(function(a,s){if(bb(s)){var l=e(s.from,s.to,s.velocity),c=cH(l,2),f=c[0],p=c[1];return Ut(Ut({},s),{},{from:f,velocity:p})}return s},r);return n<1?Cu(function(a,s){return bb(s)?Ut(Ut({},s),{},{velocity:Yf(s.velocity,i[a].velocity,n),from:Yf(s.from,i[a].from,n)}):s},r):t(e,i,n-1)};const vH=(function(t,e,r,n,i){var a=WW(t,e),s=a.reduce(function(b,E){return Ut(Ut({},b),{},gb({},E,[t[E],e[E]]))},{}),l=a.reduce(function(b,E){return Ut(Ut({},b),{},gb({},E,{from:t[E],velocity:0,to:e[E]}))},{}),c=-1,f,p,h=function(){return null},m=function(){return Cu(function(E,P){return P.from},l)},g=function(){return!Object.values(l).filter(bb).length},_=function(E){f||(f=E);var P=E-f,T=P/r.dt;l=pH(r,l,T),i(Ut(Ut(Ut({},t),e),m())),f=E,g()||(c=requestAnimationFrame(h))},w=function(E){p||(p=E);var P=(E-p)/n,T=Cu(function(x,O){return Yf.apply(void 0,rC(O).concat([r(P)]))},s);if(i(Ut(Ut(Ut({},t),e),T)),P<1)c=requestAnimationFrame(h);else{var A=Cu(function(x,O){return Yf.apply(void 0,rC(O).concat([r(1)]))},s);i(Ut(Ut(Ut({},t),e),A))}};return h=r.isStepper?_:w,function(){return requestAnimationFrame(h),function(){cancelAnimationFrame(c)}}});function Xo(t){"@babel/helpers - typeof";return Xo=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},Xo(t)}var mH=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function gH(t,e){if(t==null)return{};var r=yH(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function yH(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function Cy(t){return SH(t)||xH(t)||wH(t)||bH()}function bH(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
182
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wH(t,e){if(t){if(typeof t=="string")return wb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wb(t,e)}}function xH(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function SH(t){if(Array.isArray(t))return wb(t)}function wb(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function iC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Qr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?iC(Object(r),!0).forEach(function(n){Eu(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):iC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Eu(t,e,r){return e=tN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _H(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function EH(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,tN(n.key),n)}}function OH(t,e,r){return e&&EH(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function tN(t){var e=AH(t,"string");return Xo(e)==="symbol"?e:String(e)}function AH(t,e){if(Xo(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Xo(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function PH(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xb(t,e)}function xb(t,e){return xb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},xb(t,e)}function TH(t){var e=CH();return function(){var n=Qf(t),i;if(e){var a=Qf(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return Sb(this,i)}}function Sb(t,e){if(e&&(Xo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _b(t)}function _b(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function CH(){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 Qf(t){return Qf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Qf(t)}var Vi=(function(t){PH(r,t);var e=TH(r);function r(n,i){var a;_H(this,r),a=e.call(this,n,i);var s=a.props,l=s.isActive,c=s.attributeName,f=s.from,p=s.to,h=s.steps,m=s.children,g=s.duration;if(a.handleStyleChange=a.handleStyleChange.bind(_b(a)),a.changeStyle=a.changeStyle.bind(_b(a)),!l||g<=0)return a.state={style:{}},typeof m=="function"&&(a.state={style:p}),Sb(a);if(h&&h.length)a.state={style:h[0].style};else if(f){if(typeof m=="function")return a.state={style:f},Sb(a);a.state={style:c?Eu({},c,f):f}}else a.state={style:{}};return a}return OH(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,s=i.canBegin;this.mounted=!0,!(!a||!s)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,s=a.isActive,l=a.canBegin,c=a.attributeName,f=a.shouldReAnimate,p=a.to,h=a.from,m=this.state.style;if(l){if(!s){var g={style:c?Eu({},c,p):p};this.state&&m&&(c&&m[c]!==p||!c&&m!==p)&&this.setState(g);return}if(!(IW(i.to,p)&&i.canBegin&&i.isActive)){var _=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var w=_||f?h:i.to;if(this.state&&m){var b={style:c?Eu({},c,w):w};(c&&m[c]!==w||!c&&m!==w)&&this.setState(b)}this.runAnimation(Qr(Qr({},this.props),{},{from:w,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,s=i.from,l=i.to,c=i.duration,f=i.easing,p=i.begin,h=i.onAnimationEnd,m=i.onAnimationStart,g=vH(s,l,iH(f),c,this.changeStyle),_=function(){a.stopJSAnimation=g()};this.manager.start([m,p,_,c,h])}},{key:"runStepAnimation",value:function(i){var a=this,s=i.steps,l=i.begin,c=i.onAnimationStart,f=s[0],p=f.style,h=f.duration,m=h===void 0?0:h,g=function(w,b,E){if(E===0)return w;var P=b.duration,T=b.easing,A=T===void 0?"ease":T,x=b.style,O=b.properties,C=b.onAnimationEnd,N=E>0?s[E-1]:b,D=O||Object.keys(x);if(typeof A=="function"||A==="spring")return[].concat(Cy(w),[a.runJSAnimation.bind(a,{from:N.style,to:x,duration:P,easing:A}),P]);var B=JT(D,P,A),U=Qr(Qr(Qr({},N.style),x),{},{transition:B});return[].concat(Cy(w),[U,P,C]).filter(HW)};return this.manager.start([c].concat(Cy(s.reduce(g,[p,Math.max(m,l)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=GW());var a=i.begin,s=i.duration,l=i.attributeName,c=i.to,f=i.easing,p=i.onAnimationStart,h=i.onAnimationEnd,m=i.steps,g=i.children,_=this.manager;if(this.unSubscribe=_.subscribe(this.handleStyleChange),typeof f=="function"||typeof g=="function"||f==="spring"){this.runJSAnimation(i);return}if(m.length>1){this.runStepAnimation(i);return}var w=l?Eu({},l,c):c,b=JT(Object.keys(w),s,f);_.start([p,a,Qr(Qr({},w),{},{transition:b}),s,h])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var s=i.duration;i.attributeName,i.easing;var l=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var c=gH(i,mH),f=I.Children.count(a),p=this.state.style;if(typeof a=="function")return a(p);if(!l||f===0||s<=0)return a;var h=function(g){var _=g.props,w=_.style,b=w===void 0?{}:w,E=_.className,P=I.cloneElement(g,Qr(Qr({},c),{},{style:Qr(Qr({},b),p),className:E}));return P};return f===1?h(I.Children.only(a)):Q.createElement("div",null,I.Children.map(a,function(m){return h(m)}))}}]),r})(I.PureComponent);Vi.displayName="Animate";Vi.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Vi.propTypes={from:Ye.oneOfType([Ye.object,Ye.string]),to:Ye.oneOfType([Ye.object,Ye.string]),attributeName:Ye.string,duration:Ye.number,begin:Ye.number,easing:Ye.oneOfType([Ye.string,Ye.func]),steps:Ye.arrayOf(Ye.shape({duration:Ye.number.isRequired,style:Ye.object.isRequired,easing:Ye.oneOfType([Ye.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Ye.func]),properties:Ye.arrayOf("string"),onAnimationEnd:Ye.func})),children:Ye.oneOfType([Ye.node,Ye.func]),isActive:Ye.bool,canBegin:Ye.bool,onAnimationEnd:Ye.func,shouldReAnimate:Ye.bool,onAnimationStart:Ye.func,onAnimationReStart:Ye.func};function al(t){"@babel/helpers - typeof";return al=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},al(t)}function Zf(){return Zf=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Zf.apply(this,arguments)}function kH(t,e){return DH(t)||NH(t,e)||jH(t,e)||RH()}function RH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
183
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jH(t,e){if(t){if(typeof t=="string")return aC(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return aC(t,e)}}function aC(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function NH(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,l=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return l}}function DH(t){if(Array.isArray(t))return t}function oC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function sC(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?oC(Object(r),!0).forEach(function(n){IH(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):oC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function IH(t,e,r){return e=MH(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function MH(t){var e=LH(t,"string");return al(e)=="symbol"?e:e+""}function LH(t,e){if(al(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(al(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var uC=function(e,r,n,i,a){var s=Math.min(Math.abs(n)/2,Math.abs(i)/2),l=i>=0?1:-1,c=n>=0?1:-1,f=i>=0&&n>=0||i<0&&n<0?1:0,p;if(s>0&&a instanceof Array){for(var h=[0,0,0,0],m=0,g=4;m<g;m++)h[m]=a[m]>s?s:a[m];p="M".concat(e,",").concat(r+l*h[0]),h[0]>0&&(p+="A ".concat(h[0],",").concat(h[0],",0,0,").concat(f,",").concat(e+c*h[0],",").concat(r)),p+="L ".concat(e+n-c*h[1],",").concat(r),h[1]>0&&(p+="A ".concat(h[1],",").concat(h[1],",0,0,").concat(f,`,
184
+ `).concat(e+n,",").concat(r+l*h[1])),p+="L ".concat(e+n,",").concat(r+i-l*h[2]),h[2]>0&&(p+="A ".concat(h[2],",").concat(h[2],",0,0,").concat(f,`,
185
+ `).concat(e+n-c*h[2],",").concat(r+i)),p+="L ".concat(e+c*h[3],",").concat(r+i),h[3]>0&&(p+="A ".concat(h[3],",").concat(h[3],",0,0,").concat(f,`,
186
+ `).concat(e,",").concat(r+i-l*h[3])),p+="Z"}else if(s>0&&a===+a&&a>0){var _=Math.min(s,a);p="M ".concat(e,",").concat(r+l*_,`
187
+ A `).concat(_,",").concat(_,",0,0,").concat(f,",").concat(e+c*_,",").concat(r,`
188
+ L `).concat(e+n-c*_,",").concat(r,`
189
+ A `).concat(_,",").concat(_,",0,0,").concat(f,",").concat(e+n,",").concat(r+l*_,`
190
+ L `).concat(e+n,",").concat(r+i-l*_,`
191
+ A `).concat(_,",").concat(_,",0,0,").concat(f,",").concat(e+n-c*_,",").concat(r+i,`
192
+ L `).concat(e+c*_,",").concat(r+i,`
193
+ A `).concat(_,",").concat(_,",0,0,").concat(f,",").concat(e,",").concat(r+i-l*_," Z")}else p="M ".concat(e,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return p},$H=function(e,r){if(!e||!r)return!1;var n=e.x,i=e.y,a=r.x,s=r.y,l=r.width,c=r.height;if(Math.abs(l)>0&&Math.abs(c)>0){var f=Math.min(a,a+l),p=Math.max(a,a+l),h=Math.min(s,s+c),m=Math.max(s,s+c);return n>=f&&n<=p&&i>=h&&i<=m}return!1},FH={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},nx=function(e){var r=sC(sC({},FH),e),n=I.useRef(),i=I.useState(-1),a=kH(i,2),s=a[0],l=a[1];I.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var A=n.current.getTotalLength();A&&l(A)}catch{}},[]);var c=r.x,f=r.y,p=r.width,h=r.height,m=r.radius,g=r.className,_=r.animationEasing,w=r.animationDuration,b=r.animationBegin,E=r.isAnimationActive,P=r.isUpdateAnimationActive;if(c!==+c||f!==+f||p!==+p||h!==+h||p===0||h===0)return null;var T=Ve("recharts-rectangle",g);return P?Q.createElement(Vi,{canBegin:s>0,from:{width:p,height:h,x:c,y:f},to:{width:p,height:h,x:c,y:f},duration:w,animationEasing:_,isActive:P},function(A){var x=A.width,O=A.height,C=A.x,N=A.y;return Q.createElement(Vi,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:w,isActive:E,easing:_},Q.createElement("path",Zf({},Qe(r,!0),{className:T,d:uC(C,N,x,O,m),ref:n})))}):Q.createElement("path",Zf({},Qe(r,!0),{className:T,d:uC(c,f,p,h,m)}))};function Eb(){return Eb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Eb.apply(this,arguments)}var rN=function(e){var r=e.cx,n=e.cy,i=e.r,a=e.className,s=Ve("recharts-dot",a);return r===+r&&n===+n&&i===+i?I.createElement("circle",Eb({},Qe(e,!1),yf(e),{className:s,cx:r,cy:n,r:i})):null};function ol(t){"@babel/helpers - typeof";return ol=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},ol(t)}var BH=["x","y","top","left","width","height","className"];function Ob(){return Ob=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ob.apply(this,arguments)}function lC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function zH(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?lC(Object(r),!0).forEach(function(n){GH(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):lC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function GH(t,e,r){return e=UH(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function UH(t){var e=qH(t,"string");return ol(e)=="symbol"?e:e+""}function qH(t,e){if(ol(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ol(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function WH(t,e){if(t==null)return{};var r=HH(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function HH(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var VH=function(e,r,n,i,a,s){return"M".concat(e,",").concat(a,"v").concat(i,"M").concat(s,",").concat(r,"h").concat(n)},KH=function(e){var r=e.x,n=r===void 0?0:r,i=e.y,a=i===void 0?0:i,s=e.top,l=s===void 0?0:s,c=e.left,f=c===void 0?0:c,p=e.width,h=p===void 0?0:p,m=e.height,g=m===void 0?0:m,_=e.className,w=WH(e,BH),b=zH({x:n,y:a,top:l,left:f,width:h,height:g},w);return!ge(n)||!ge(a)||!ge(h)||!ge(g)||!ge(l)||!ge(f)?null:Q.createElement("path",Ob({},Qe(b,!0),{className:Ve("recharts-cross",_),d:VH(n,a,h,g,l,f)}))},ky,cC;function XH(){if(cC)return ky;cC=1;var t=_j(),e=t(Object.getPrototypeOf,Object);return ky=e,ky}var Ry,fC;function YH(){if(fC)return Ry;fC=1;var t=ci(),e=XH(),r=fi(),n="[object Object]",i=Function.prototype,a=Object.prototype,s=i.toString,l=a.hasOwnProperty,c=s.call(Object);function f(p){if(!r(p)||t(p)!=n)return!1;var h=e(p);if(h===null)return!0;var m=l.call(h,"constructor")&&h.constructor;return typeof m=="function"&&m instanceof m&&s.call(m)==c}return Ry=f,Ry}var QH=YH();const ZH=tt(QH);var jy,dC;function JH(){if(dC)return jy;dC=1;var t=ci(),e=fi(),r="[object Boolean]";function n(i){return i===!0||i===!1||e(i)&&t(i)==r}return jy=n,jy}var e9=JH();const t9=tt(e9);function sl(t){"@babel/helpers - typeof";return sl=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},sl(t)}function Jf(){return Jf=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Jf.apply(this,arguments)}function r9(t,e){return o9(t)||a9(t,e)||i9(t,e)||n9()}function n9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
194
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i9(t,e){if(t){if(typeof t=="string")return hC(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hC(t,e)}}function hC(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function a9(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,l=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return l}}function o9(t){if(Array.isArray(t))return t}function pC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function vC(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?pC(Object(r),!0).forEach(function(n){s9(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function s9(t,e,r){return e=u9(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u9(t){var e=l9(t,"string");return sl(e)=="symbol"?e:e+""}function l9(t,e){if(sl(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(sl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var mC=function(e,r,n,i,a){var s=n-i,l;return l="M ".concat(e,",").concat(r),l+="L ".concat(e+n,",").concat(r),l+="L ".concat(e+n-s/2,",").concat(r+a),l+="L ".concat(e+n-s/2-i,",").concat(r+a),l+="L ".concat(e,",").concat(r," Z"),l},c9={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},f9=function(e){var r=vC(vC({},c9),e),n=I.useRef(),i=I.useState(-1),a=r9(i,2),s=a[0],l=a[1];I.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var T=n.current.getTotalLength();T&&l(T)}catch{}},[]);var c=r.x,f=r.y,p=r.upperWidth,h=r.lowerWidth,m=r.height,g=r.className,_=r.animationEasing,w=r.animationDuration,b=r.animationBegin,E=r.isUpdateAnimationActive;if(c!==+c||f!==+f||p!==+p||h!==+h||m!==+m||p===0&&h===0||m===0)return null;var P=Ve("recharts-trapezoid",g);return E?Q.createElement(Vi,{canBegin:s>0,from:{upperWidth:0,lowerWidth:0,height:m,x:c,y:f},to:{upperWidth:p,lowerWidth:h,height:m,x:c,y:f},duration:w,animationEasing:_,isActive:E},function(T){var A=T.upperWidth,x=T.lowerWidth,O=T.height,C=T.x,N=T.y;return Q.createElement(Vi,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:w,easing:_},Q.createElement("path",Jf({},Qe(r,!0),{className:P,d:mC(C,N,A,x,O),ref:n})))}):Q.createElement("g",null,Q.createElement("path",Jf({},Qe(r,!0),{className:P,d:mC(c,f,p,h,m)})))},d9=["option","shapeType","propTransformer","activeClassName","isActive"];function ul(t){"@babel/helpers - typeof";return ul=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},ul(t)}function h9(t,e){if(t==null)return{};var r=p9(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function p9(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function gC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ed(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?gC(Object(r),!0).forEach(function(n){v9(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function v9(t,e,r){return e=m9(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function m9(t){var e=g9(t,"string");return ul(e)=="symbol"?e:e+""}function g9(t,e){if(ul(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ul(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function y9(t,e){return ed(ed({},e),t)}function b9(t,e){return t==="symbols"}function yC(t){var e=t.shapeType,r=t.elementProps;switch(e){case"rectangle":return Q.createElement(nx,r);case"trapezoid":return Q.createElement(f9,r);case"sector":return Q.createElement(K2,r);case"symbols":if(b9(e))return Q.createElement(xw,r);break;default:return null}}function w9(t){return I.isValidElement(t)?t.props:t}function x9(t){var e=t.option,r=t.shapeType,n=t.propTransformer,i=n===void 0?y9:n,a=t.activeClassName,s=a===void 0?"recharts-active-shape":a,l=t.isActive,c=h9(t,d9),f;if(I.isValidElement(e))f=I.cloneElement(e,ed(ed({},c),w9(e)));else if(Ge(e))f=e(c);else if(ZH(e)&&!t9(e)){var p=i(e,c);f=Q.createElement(yC,{shapeType:r,elementProps:p})}else{var h=c;f=Q.createElement(yC,{shapeType:r,elementProps:h})}return l?Q.createElement($t,{className:s},f):f}function Gd(t,e){return e!=null&&"trapezoids"in t.props}function Ud(t,e){return e!=null&&"sectors"in t.props}function ll(t,e){return e!=null&&"points"in t.props}function S9(t,e){var r,n,i=t.x===(e==null||(r=e.labelViewBox)===null||r===void 0?void 0:r.x)||t.x===e.x,a=t.y===(e==null||(n=e.labelViewBox)===null||n===void 0?void 0:n.y)||t.y===e.y;return i&&a}function _9(t,e){var r=t.endAngle===e.endAngle,n=t.startAngle===e.startAngle;return r&&n}function E9(t,e){var r=t.x===e.x,n=t.y===e.y,i=t.z===e.z;return r&&n&&i}function O9(t,e){var r;return Gd(t,e)?r=S9:Ud(t,e)?r=_9:ll(t,e)&&(r=E9),r}function A9(t,e){var r;return Gd(t,e)?r="trapezoids":Ud(t,e)?r="sectors":ll(t,e)&&(r="points"),r}function P9(t,e){if(Gd(t,e)){var r;return(r=e.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(Ud(t,e)){var n;return(n=e.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return ll(t,e)?e.payload:{}}function T9(t){var e=t.activeTooltipItem,r=t.graphicalItem,n=t.itemData,i=A9(r,e),a=P9(r,e),s=n.filter(function(c,f){var p=Jw(a,c),h=r.props[i].filter(function(_){var w=O9(r,e);return w(_,e)}),m=r.props[i].indexOf(h[h.length-1]),g=f===m;return p&&g}),l=n.indexOf(s[s.length-1]);return l}var Ny,bC;function C9(){if(bC)return Ny;bC=1;var t=Math.ceil,e=Math.max;function r(n,i,a,s){for(var l=-1,c=e(t((i-n)/(a||1)),0),f=Array(c);c--;)f[s?c:++l]=n,n+=a;return f}return Ny=r,Ny}var Dy,wC;function nN(){if(wC)return Dy;wC=1;var t=Fj(),e=1/0,r=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=t(i),i===e||i===-e){var a=i<0?-1:1;return a*r}return i===i?i:0}return Dy=n,Dy}var Iy,xC;function k9(){if(xC)return Iy;xC=1;var t=C9(),e=kd(),r=nN();function n(i){return function(a,s,l){return l&&typeof l!="number"&&e(a,s,l)&&(s=l=void 0),a=r(a),s===void 0?(s=a,a=0):s=r(s),l=l===void 0?a<s?1:-1:r(l),t(a,s,l,i)}}return Iy=n,Iy}var My,SC;function R9(){if(SC)return My;SC=1;var t=k9(),e=t();return My=e,My}var j9=R9();const td=tt(j9);function cl(t){"@babel/helpers - typeof";return cl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cl(t)}function _C(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function EC(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?_C(Object(r),!0).forEach(function(n){iN(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_C(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function iN(t,e,r){return e=N9(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function N9(t){var e=D9(t,"string");return cl(e)=="symbol"?e:e+""}function D9(t,e){if(cl(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(cl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var I9=["Webkit","Moz","O","ms"],M9=function(e,r){var n=e.replace(/(\w)/,function(a){return a.toUpperCase()}),i=I9.reduce(function(a,s){return EC(EC({},a),{},iN({},s+n,r))},{});return i[e]=r,i};function Yo(t){"@babel/helpers - typeof";return Yo=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},Yo(t)}function rd(){return rd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},rd.apply(this,arguments)}function OC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ly(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?OC(Object(r),!0).forEach(function(n){wr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):OC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function L9(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function AC(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,oN(n.key),n)}}function $9(t,e,r){return e&&AC(t.prototype,e),r&&AC(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function F9(t,e,r){return e=nd(e),B9(t,aN()?Reflect.construct(e,r||[],nd(t).constructor):e.apply(t,r))}function B9(t,e){if(e&&(Yo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return z9(t)}function z9(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function aN(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(aN=function(){return!!t})()}function nd(t){return nd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},nd(t)}function G9(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ab(t,e)}function Ab(t,e){return Ab=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Ab(t,e)}function wr(t,e,r){return e=oN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function oN(t){var e=U9(t,"string");return Yo(e)=="symbol"?e:e+""}function U9(t,e){if(Yo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Yo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var q9=function(e){var r=e.data,n=e.startIndex,i=e.endIndex,a=e.x,s=e.width,l=e.travellerWidth;if(!r||!r.length)return{};var c=r.length,f=Pu().domain(td(0,c)).range([a,a+s-l]),p=f.domain().map(function(h){return f(h)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:f(n),endX:f(i),scale:f,scaleValues:p}},PC=function(e){return e.changedTouches&&!!e.changedTouches.length},Qo=(function(t){function e(r){var n;return L9(this,e),n=F9(this,e,[r]),wr(n,"handleDrag",function(i){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(i):n.state.isSlideMoving&&n.handleSlideDrag(i)}),wr(n,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&n.handleDrag(i.changedTouches[0])}),wr(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,s=i.onDragEnd,l=i.startIndex;s==null||s({endIndex:a,startIndex:l})}),n.detachDragEndListener()}),wr(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),wr(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),wr(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),wr(n,"handleSlideDragStart",function(i){var a=PC(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return G9(e,t),$9(e,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,s=this.state.scaleValues,l=this.props,c=l.gap,f=l.data,p=f.length-1,h=Math.min(i,a),m=Math.max(i,a),g=e.getIndexInRange(s,h),_=e.getIndexInRange(s,m);return{startIndex:g-g%c,endIndex:_===p?p:_-_%c}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,s=i.tickFormatter,l=i.dataKey,c=jn(a[n],l,n);return Ge(s)?s(c,n):c}},{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(n){var i=this.state,a=i.slideMoveStartX,s=i.startX,l=i.endX,c=this.props,f=c.x,p=c.width,h=c.travellerWidth,m=c.startIndex,g=c.endIndex,_=c.onChange,w=n.pageX-a;w>0?w=Math.min(w,f+p-h-l,f+p-h-s):w<0&&(w=Math.max(w,f-s,f-l));var b=this.getIndex({startX:s+w,endX:l+w});(b.startIndex!==m||b.endIndex!==g)&&_&&_(b),this.setState({startX:s+w,endX:l+w,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=PC(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,s=i.movingTravellerId,l=i.endX,c=i.startX,f=this.state[s],p=this.props,h=p.x,m=p.width,g=p.travellerWidth,_=p.onChange,w=p.gap,b=p.data,E={startX:this.state.startX,endX:this.state.endX},P=n.pageX-a;P>0?P=Math.min(P,h+m-g-f):P<0&&(P=Math.max(P,h-f)),E[s]=f+P;var T=this.getIndex(E),A=T.startIndex,x=T.endIndex,O=function(){var N=b.length-1;return s==="startX"&&(l>c?A%w===0:x%w===0)||l<c&&x===N||s==="endX"&&(l>c?x%w===0:A%w===0)||l>c&&x===N};this.setState(wr(wr({},s,f+P),"brushMoveStartX",n.pageX),function(){_&&O()&&_(T)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,s=this.state,l=s.scaleValues,c=s.startX,f=s.endX,p=this.state[i],h=l.indexOf(p);if(h!==-1){var m=h+n;if(!(m===-1||m>=l.length)){var g=l[m];i==="startX"&&g>=f||i==="endX"&&g<=c||this.setState(wr({},i,g),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,s=n.width,l=n.height,c=n.fill,f=n.stroke;return Q.createElement("rect",{stroke:f,fill:c,x:i,y:a,width:s,height:l})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,s=n.width,l=n.height,c=n.data,f=n.children,p=n.padding,h=I.Children.only(f);return h?Q.cloneElement(h,{x:i,y:a,width:s,height:l,margin:p,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,s,l=this,c=this.props,f=c.y,p=c.travellerWidth,h=c.height,m=c.traveller,g=c.ariaLabel,_=c.data,w=c.startIndex,b=c.endIndex,E=Math.max(n,this.props.x),P=Ly(Ly({},Qe(this.props,!1)),{},{x:E,y:f,width:p,height:h}),T=g||"Min value: ".concat((a=_[w])===null||a===void 0?void 0:a.name,", Max value: ").concat((s=_[b])===null||s===void 0?void 0:s.name);return Q.createElement($t,{tabIndex:0,role:"slider","aria-label":T,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(x){["ArrowLeft","ArrowRight"].includes(x.key)&&(x.preventDefault(),x.stopPropagation(),l.handleTravellerMoveKeyboard(x.key==="ArrowRight"?1:-1,i))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},e.renderTraveller(m,P))}},{key:"renderSlide",value:function(n,i){var a=this.props,s=a.y,l=a.height,c=a.stroke,f=a.travellerWidth,p=Math.min(n,i)+f,h=Math.max(Math.abs(i-n)-f,0);return Q.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:p,y:s,width:h,height:l})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,s=n.y,l=n.height,c=n.travellerWidth,f=n.stroke,p=this.state,h=p.startX,m=p.endX,g=5,_={pointerEvents:"none",fill:f};return Q.createElement($t,{className:"recharts-brush-texts"},Q.createElement(kf,rd({textAnchor:"end",verticalAnchor:"middle",x:Math.min(h,m)-g,y:s+l/2},_),this.getTextOfTick(i)),Q.createElement(kf,rd({textAnchor:"start",verticalAnchor:"middle",x:Math.max(h,m)+c+g,y:s+l/2},_),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,s=n.children,l=n.x,c=n.y,f=n.width,p=n.height,h=n.alwaysShowText,m=this.state,g=m.startX,_=m.endX,w=m.isTextActive,b=m.isSlideMoving,E=m.isTravellerMoving,P=m.isTravellerFocused;if(!i||!i.length||!ge(l)||!ge(c)||!ge(f)||!ge(p)||f<=0||p<=0)return null;var T=Ve("recharts-brush",a),A=Q.Children.count(s)===1,x=M9("userSelect","none");return Q.createElement($t,{className:T,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:x},this.renderBackground(),A&&this.renderPanorama(),this.renderSlide(g,_),this.renderTravellerLayer(g,"startX"),this.renderTravellerLayer(_,"endX"),(w||b||E||P||h)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,s=n.width,l=n.height,c=n.stroke,f=Math.floor(a+l/2)-1;return Q.createElement(Q.Fragment,null,Q.createElement("rect",{x:i,y:a,width:s,height:l,fill:c,stroke:"none"}),Q.createElement("line",{x1:i+1,y1:f,x2:i+s-1,y2:f,fill:"none",stroke:"#fff"}),Q.createElement("line",{x1:i+1,y1:f+2,x2:i+s-1,y2:f+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return Q.isValidElement(n)?a=Q.cloneElement(n,i):Ge(n)?a=n(i):a=e.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,s=n.width,l=n.x,c=n.travellerWidth,f=n.updateId,p=n.startIndex,h=n.endIndex;if(a!==i.prevData||f!==i.prevUpdateId)return Ly({prevData:a,prevTravellerWidth:c,prevUpdateId:f,prevX:l,prevWidth:s},a&&a.length?q9({data:a,width:s,x:l,travellerWidth:c,startIndex:p,endIndex:h}):{scale:null,scaleValues:null});if(i.scale&&(s!==i.prevWidth||l!==i.prevX||c!==i.prevTravellerWidth)){i.scale.range([l,l+s-c]);var m=i.scale.domain().map(function(g){return i.scale(g)});return{prevData:a,prevTravellerWidth:c,prevUpdateId:f,prevX:l,prevWidth:s,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:m}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,s=0,l=a-1;l-s>1;){var c=Math.floor((s+l)/2);n[c]>i?l=c:s=c}return i>=n[l]?l:s}}])})(I.PureComponent);wr(Qo,"displayName","Brush");wr(Qo,"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 $y,TC;function W9(){if(TC)return $y;TC=1;var t=Tw();function e(r,n){var i;return t(r,function(a,s,l){return i=n(a,s,l),!i}),!!i}return $y=e,$y}var Fy,CC;function H9(){if(CC)return Fy;CC=1;var t=mj(),e=Yi(),r=W9(),n=vr(),i=kd();function a(s,l,c){var f=n(s)?t:r;return c&&i(s,l,c)&&(l=void 0),f(s,e(l,3))}return Fy=a,Fy}var V9=H9();const K9=tt(V9);var Cn=function(e,r){var n=e.alwaysShow,i=e.ifOverflow;return n&&(i="extendDomain"),i===r},By,kC;function X9(){if(kC)return By;kC=1;var t=Dj();function e(r,n,i){n=="__proto__"&&t?t(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return By=e,By}var zy,RC;function Y9(){if(RC)return zy;RC=1;var t=X9(),e=jj(),r=Yi();function n(i,a){var s={};return a=r(a,3),e(i,function(l,c,f){t(s,c,a(l,c,f))}),s}return zy=n,zy}var Q9=Y9();const Z9=tt(Q9);var Gy,jC;function J9(){if(jC)return Gy;jC=1;function t(e,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(!r(e[n],n,e))return!1;return!0}return Gy=t,Gy}var Uy,NC;function e7(){if(NC)return Uy;NC=1;var t=Tw();function e(r,n){var i=!0;return t(r,function(a,s,l){return i=!!n(a,s,l),i}),i}return Uy=e,Uy}var qy,DC;function t7(){if(DC)return qy;DC=1;var t=J9(),e=e7(),r=Yi(),n=vr(),i=kd();function a(s,l,c){var f=n(s)?t:e;return c&&i(s,l,c)&&(l=void 0),f(s,r(l,3))}return qy=a,qy}var r7=t7();const n7=tt(r7);var i7=["x","y"];function fl(t){"@babel/helpers - typeof";return fl=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},fl(t)}function Pb(){return Pb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Pb.apply(this,arguments)}function IC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function hu(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?IC(Object(r),!0).forEach(function(n){a7(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):IC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function a7(t,e,r){return e=o7(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o7(t){var e=s7(t,"string");return fl(e)=="symbol"?e:e+""}function s7(t,e){if(fl(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(fl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function u7(t,e){if(t==null)return{};var r=l7(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function l7(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function c7(t,e){var r=t.x,n=t.y,i=u7(t,i7),a="".concat(r),s=parseInt(a,10),l="".concat(n),c=parseInt(l,10),f="".concat(e.height||i.height),p=parseInt(f,10),h="".concat(e.width||i.width),m=parseInt(h,10);return hu(hu(hu(hu(hu({},e),i),s?{x:s}:{}),c?{y:c}:{}),{},{height:p,width:m,name:e.name,radius:e.radius})}function MC(t){return Q.createElement(x9,Pb({shapeType:"rectangle",propTransformer:c7,activeClassName:"recharts-active-bar"},t))}var f7=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof e=="number")return e;var a=ge(n)||g8(n);return a?e(n,i):(a||Fa(),r)}},d7=["value","background"],sN;function Zo(t){"@babel/helpers - typeof";return Zo=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},Zo(t)}function h7(t,e){if(t==null)return{};var r=p7(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function p7(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function id(){return id=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},id.apply(this,arguments)}function LC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function xt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?LC(Object(r),!0).forEach(function(n){qi(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):LC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function v7(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $C(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,lN(n.key),n)}}function m7(t,e,r){return e&&$C(t.prototype,e),r&&$C(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function g7(t,e,r){return e=ad(e),y7(t,uN()?Reflect.construct(e,r||[],ad(t).constructor):e.apply(t,r))}function y7(t,e){if(e&&(Zo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return b7(t)}function b7(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function uN(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(uN=function(){return!!t})()}function ad(t){return ad=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ad(t)}function w7(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Tb(t,e)}function Tb(t,e){return Tb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Tb(t,e)}function qi(t,e,r){return e=lN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function lN(t){var e=x7(t,"string");return Zo(e)=="symbol"?e:e+""}function x7(t,e){if(Zo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Zo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var ni=(function(t){function e(){var r;v7(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=g7(this,e,[].concat(i)),qi(r,"state",{isAnimationFinished:!1}),qi(r,"id",_d("recharts-bar-")),qi(r,"handleAnimationEnd",function(){var s=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),s&&s()}),qi(r,"handleAnimationStart",function(){var s=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),s&&s()}),r}return w7(e,t),m7(e,[{key:"renderRectanglesStatically",value:function(n){var i=this,a=this.props,s=a.shape,l=a.dataKey,c=a.activeIndex,f=a.activeBar,p=Qe(this.props,!1);return n&&n.map(function(h,m){var g=m===c,_=g?f:s,w=xt(xt(xt({},p),h),{},{isActive:g,option:_,index:m,dataKey:l,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return Q.createElement($t,id({className:"recharts-bar-rectangle"},bf(i.props,h,m),{key:"rectangle-".concat(h==null?void 0:h.x,"-").concat(h==null?void 0:h.y,"-").concat(h==null?void 0:h.value,"-").concat(m)}),Q.createElement(MC,w))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,i=this.props,a=i.data,s=i.layout,l=i.isAnimationActive,c=i.animationBegin,f=i.animationDuration,p=i.animationEasing,h=i.animationId,m=this.state.prevData;return Q.createElement(Vi,{begin:c,duration:f,isActive:l,easing:p,from:{t:0},to:{t:1},key:"bar-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(g){var _=g.t,w=a.map(function(b,E){var P=m&&m[E];if(P){var T=vo(P.x,b.x),A=vo(P.y,b.y),x=vo(P.width,b.width),O=vo(P.height,b.height);return xt(xt({},b),{},{x:T(_),y:A(_),width:x(_),height:O(_)})}if(s==="horizontal"){var C=vo(0,b.height),N=C(_);return xt(xt({},b),{},{y:b.y+b.height-N,height:N})}var D=vo(0,b.width),B=D(_);return xt(xt({},b),{},{width:B})});return Q.createElement($t,null,n.renderRectanglesStatically(w))})}},{key:"renderRectangles",value:function(){var n=this.props,i=n.data,a=n.isAnimationActive,s=this.state.prevData;return a&&i&&i.length&&(!s||!Jw(s,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var n=this,i=this.props,a=i.data,s=i.dataKey,l=i.activeIndex,c=Qe(this.props.background,!1);return a.map(function(f,p){f.value;var h=f.background,m=h7(f,d7);if(!h)return null;var g=xt(xt(xt(xt(xt({},m),{},{fill:"#eee"},h),c),bf(n.props,f,p)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:s,index:p,className:"recharts-bar-background-rectangle"});return Q.createElement(MC,id({key:"background-bar-".concat(p),option:n.props.background,isActive:p===l},g))})}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,s=a.data,l=a.xAxis,c=a.yAxis,f=a.layout,p=a.children,h=sn(p,zd);if(!h)return null;var m=f==="vertical"?s[0].height/2:s[0].width/2,g=function(b,E){var P=Array.isArray(b.value)?b.value[1]:b.value;return{x:b.x,y:b.y,value:P,errorVal:jn(b,E)}},_={clipPath:n?"url(#clipPath-".concat(i,")"):null};return Q.createElement($t,_,h.map(function(w){return Q.cloneElement(w,{key:"error-bar-".concat(i,"-").concat(w.props.dataKey),data:s,xAxis:l,yAxis:c,layout:f,offset:m,dataPointFormatter:g})}))}},{key:"render",value:function(){var n=this.props,i=n.hide,a=n.data,s=n.className,l=n.xAxis,c=n.yAxis,f=n.left,p=n.top,h=n.width,m=n.height,g=n.isAnimationActive,_=n.background,w=n.id;if(i||!a||!a.length)return null;var b=this.state.isAnimationFinished,E=Ve("recharts-bar",s),P=l&&l.allowDataOverflow,T=c&&c.allowDataOverflow,A=P||T,x=Ke(w)?this.id:w;return Q.createElement($t,{className:E},P||T?Q.createElement("defs",null,Q.createElement("clipPath",{id:"clipPath-".concat(x)},Q.createElement("rect",{x:P?f:f-h/2,y:T?p:p-m/2,width:P?h:h*2,height:T?m:m*2}))):null,Q.createElement($t,{className:"recharts-bar-rectangles",clipPath:A?"url(#clipPath-".concat(x,")"):null},_?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(A,x),(!g||b)&&Ia.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:i.curData}:n.data!==i.curData?{curData:n.data}:null}}])})(I.PureComponent);sN=ni;qi(ni,"displayName","Bar");qi(ni,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Cl.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});qi(ni,"getComposedData",function(t){var e=t.props,r=t.item,n=t.barPosition,i=t.bandSize,a=t.xAxis,s=t.yAxis,l=t.xAxisTicks,c=t.yAxisTicks,f=t.stackedData,p=t.dataStartIndex,h=t.displayedData,m=t.offset,g=I6(n,r);if(!g)return null;var _=e.layout,w=r.type.defaultProps,b=w!==void 0?xt(xt({},w),r.props):r.props,E=b.dataKey,P=b.children,T=b.minPointSize,A=_==="horizontal"?s:a,x=f?A.scale.domain():null,O=U6({numericAxis:A}),C=sn(P,zj),N=h.map(function(D,B){var U,L,j,X,K,G;f?U=M6(f[p+B],x):(U=jn(D,E),Array.isArray(U)||(U=[O,U]));var M=f7(T,sN.defaultProps.minPointSize)(U[1],B);if(_==="horizontal"){var V,J=[s.scale(U[0]),s.scale(U[1])],ee=J[0],F=J[1];L=_T({axis:a,ticks:l,bandSize:i,offset:g.offset,entry:D,index:B}),j=(V=F??ee)!==null&&V!==void 0?V:void 0,X=g.size;var H=ee-F;if(K=Number.isNaN(H)?0:H,G={x:L,y:s.y,width:X,height:s.height},Math.abs(M)>0&&Math.abs(K)<Math.abs(M)){var te=on(K||M)*(Math.abs(M)-Math.abs(K));j-=te,K+=te}}else{var we=[a.scale(U[0]),a.scale(U[1])],xe=we[0],De=we[1];if(L=xe,j=_T({axis:s,ticks:c,bandSize:i,offset:g.offset,entry:D,index:B}),X=De-xe,K=g.size,G={x:a.x,y:j,width:a.width,height:K},Math.abs(M)>0&&Math.abs(X)<Math.abs(M)){var Le=on(X||M)*(Math.abs(M)-Math.abs(X));X+=Le}}return xt(xt(xt({},D),{},{x:L,y:j,width:X,height:K,value:f?U:U[1],payload:D,background:G},C&&C[B]&&C[B].props),{},{tooltipPayload:[W2(r,D)],tooltipPosition:{x:L+X/2,y:j+K/2}})});return xt({data:N,layout:_},m)});function dl(t){"@babel/helpers - typeof";return dl=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},dl(t)}function S7(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function FC(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,cN(n.key),n)}}function _7(t,e,r){return e&&FC(t.prototype,e),r&&FC(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function BC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function rn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?BC(Object(r),!0).forEach(function(n){qd(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):BC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function qd(t,e,r){return e=cN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function cN(t){var e=E7(t,"string");return dl(e)=="symbol"?e:e+""}function E7(t,e){if(dl(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(dl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var O7=function(e,r,n,i,a){var s=e.width,l=e.height,c=e.layout,f=e.children,p=Object.keys(r),h={left:n.left,leftMirror:n.left,right:s-n.right,rightMirror:s-n.right,top:n.top,topMirror:n.top,bottom:l-n.bottom,bottomMirror:l-n.bottom},m=!!xr(f,ni);return p.reduce(function(g,_){var w=r[_],b=w.orientation,E=w.domain,P=w.padding,T=P===void 0?{}:P,A=w.mirror,x=w.reversed,O="".concat(b).concat(A?"Mirror":""),C,N,D,B,U;if(w.type==="number"&&(w.padding==="gap"||w.padding==="no-gap")){var L=E[1]-E[0],j=1/0,X=w.categoricalDomain.sort(w8);if(X.forEach(function(we,xe){xe>0&&(j=Math.min((we||0)-(X[xe-1]||0),j))}),Number.isFinite(j)){var K=j/L,G=w.layout==="vertical"?n.height:n.width;if(w.padding==="gap"&&(C=K*G/2),w.padding==="no-gap"){var M=La(e.barCategoryGap,K*G),V=K*G/2;C=V-M-(V-M)/G*M}}}i==="xAxis"?N=[n.left+(T.left||0)+(C||0),n.left+n.width-(T.right||0)-(C||0)]:i==="yAxis"?N=c==="horizontal"?[n.top+n.height-(T.bottom||0),n.top+(T.top||0)]:[n.top+(T.top||0)+(C||0),n.top+n.height-(T.bottom||0)-(C||0)]:N=w.range,x&&(N=[N[1],N[0]]);var J=N6(w,a,m),ee=J.scale,F=J.realScaleType;ee.domain(E).range(N),D6(ee);var H=G6(ee,rn(rn({},w),{},{realScaleType:F}));i==="xAxis"?(U=b==="top"&&!A||b==="bottom"&&A,D=n.left,B=h[O]-U*w.height):i==="yAxis"&&(U=b==="left"&&!A||b==="right"&&A,D=h[O]-U*w.width,B=n.top);var te=rn(rn(rn({},w),H),{},{realScaleType:F,x:D,y:B,scale:ee,width:i==="xAxis"?n.width:w.width,height:i==="yAxis"?n.height:w.height});return te.bandSize=Wf(te,H),!w.hide&&i==="xAxis"?h[O]+=(U?-1:1)*te.height:w.hide||(h[O]+=(U?-1:1)*te.width),rn(rn({},g),{},qd({},_,te))},{})},fN=function(e,r){var n=e.x,i=e.y,a=r.x,s=r.y;return{x:Math.min(n,a),y:Math.min(i,s),width:Math.abs(a-n),height:Math.abs(s-i)}},A7=function(e){var r=e.x1,n=e.y1,i=e.x2,a=e.y2;return fN({x:r,y:n},{x:i,y:a})},dN=(function(){function t(e){S7(this,t),this.scale=e}return _7(t,[{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(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){case"start":return this.scale(r);case"middle":{var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+s}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(r)+l}default:return this.scale(r)}if(i){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+c}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new t(r)}}])})();qd(dN,"EPS",1e-4);var ix=function(e){var r=Object.keys(e).reduce(function(n,i){return rn(rn({},n),{},qd({},i,dN.create(e[i])))},{});return rn(rn({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=a.bandAware,l=a.position;return Z9(i,function(c,f){return r[f].apply(c,{bandAware:s,position:l})})},isInRange:function(i){return n7(i,function(a,s){return r[s].isInRange(a)})}})};function P7(t){return(t%180+180)%180}var T7=function(e){var r=e.width,n=e.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=P7(i),s=a*Math.PI/180,l=Math.atan(n/r),c=s>l&&s<Math.PI-l?n/Math.sin(s):r/Math.cos(s);return Math.abs(c)},Wy,zC;function C7(){if(zC)return Wy;zC=1;var t=Yi(),e=Tl(),r=Td();function n(i){return function(a,s,l){var c=Object(a);if(!e(a)){var f=t(s,3);a=r(a),s=function(h){return f(c[h],h,c)}}var p=i(a,s,l);return p>-1?c[f?a[p]:p]:void 0}}return Wy=n,Wy}var Hy,GC;function k7(){if(GC)return Hy;GC=1;var t=nN();function e(r){var n=t(r),i=n%1;return n===n?i?n-i:n:0}return Hy=e,Hy}var Vy,UC;function R7(){if(UC)return Vy;UC=1;var t=Pj(),e=Yi(),r=k7(),n=Math.max;function i(a,s,l){var c=a==null?0:a.length;if(!c)return-1;var f=l==null?0:r(l);return f<0&&(f=n(c+f,0)),t(a,e(s,3),f)}return Vy=i,Vy}var Ky,qC;function j7(){if(qC)return Ky;qC=1;var t=C7(),e=R7(),r=t(e);return Ky=r,Ky}j7();var N7=UR();const D7=tt(N7);var I7=D7(function(t){return{x:t.left,y:t.top,width:t.width,height:t.height}},function(t){return["l",t.left,"t",t.top,"w",t.width,"h",t.height].join("")}),hN=I.createContext(void 0),pN=I.createContext(void 0),vN=I.createContext(void 0),M7=I.createContext({}),mN=I.createContext(void 0),gN=I.createContext(0),yN=I.createContext(0),WC=function(e){var r=e.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,s=e.clipPathId,l=e.children,c=e.width,f=e.height,p=I7(a);return Q.createElement(hN.Provider,{value:n},Q.createElement(pN.Provider,{value:i},Q.createElement(M7.Provider,{value:a},Q.createElement(vN.Provider,{value:p},Q.createElement(mN.Provider,{value:s},Q.createElement(gN.Provider,{value:f},Q.createElement(yN.Provider,{value:c},l)))))))},L7=function(){return I.useContext(mN)},bN=function(e){var r=I.useContext(hN);r==null&&Fa();var n=r[e];return n==null&&Fa(),n},wN=function(e){var r=I.useContext(pN);r==null&&Fa();var n=r[e];return n==null&&Fa(),n},$7=function(){var e=I.useContext(vN);return e},xN=function(){return I.useContext(yN)},SN=function(){return I.useContext(gN)};function Jo(t){"@babel/helpers - typeof";return Jo=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},Jo(t)}function F7(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function B7(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,EN(n.key),n)}}function z7(t,e,r){return e&&B7(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function G7(t,e,r){return e=od(e),U7(t,_N()?Reflect.construct(e,r||[],od(t).constructor):e.apply(t,r))}function U7(t,e){if(e&&(Jo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return q7(t)}function q7(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _N(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_N=function(){return!!t})()}function od(t){return od=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},od(t)}function W7(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Cb(t,e)}function Cb(t,e){return Cb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Cb(t,e)}function HC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function VC(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?HC(Object(r),!0).forEach(function(n){ax(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):HC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function ax(t,e,r){return e=EN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function EN(t){var e=H7(t,"string");return Jo(e)=="symbol"?e:e+""}function H7(t,e){if(Jo(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Jo(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function V7(t,e){return Q7(t)||Y7(t,e)||X7(t,e)||K7()}function K7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
195
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X7(t,e){if(t){if(typeof t=="string")return KC(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return KC(t,e)}}function KC(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Y7(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,l=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return l}}function Q7(t){if(Array.isArray(t))return t}function kb(){return kb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},kb.apply(this,arguments)}var Z7=function(e,r){var n;return Q.isValidElement(e)?n=Q.cloneElement(e,r):Ge(e)?n=e(r):n=Q.createElement("line",kb({},r,{className:"recharts-reference-line-line"})),n},J7=function(e,r,n,i,a,s,l,c,f){var p=a.x,h=a.y,m=a.width,g=a.height;if(n){var _=f.y,w=e.y.apply(_,{position:s});if(Cn(f,"discard")&&!e.y.isInRange(w))return null;var b=[{x:p+m,y:w},{x:p,y:w}];return c==="left"?b.reverse():b}if(r){var E=f.x,P=e.x.apply(E,{position:s});if(Cn(f,"discard")&&!e.x.isInRange(P))return null;var T=[{x:P,y:h+g},{x:P,y:h}];return l==="top"?T.reverse():T}if(i){var A=f.segment,x=A.map(function(O){return e.apply(O,{position:s})});return Cn(f,"discard")&&K9(x,function(O){return!e.isInRange(O)})?null:x}return null};function eV(t){var e=t.x,r=t.y,n=t.segment,i=t.xAxisId,a=t.yAxisId,s=t.shape,l=t.className,c=t.alwaysShow,f=L7(),p=bN(i),h=wN(a),m=$7();if(!f||!m)return null;ja(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var g=ix({x:p.scale,y:h.scale}),_=Tt(e),w=Tt(r),b=n&&n.length===2,E=J7(g,_,w,b,m,t.position,p.orientation,h.orientation,t);if(!E)return null;var P=V7(E,2),T=P[0],A=T.x,x=T.y,O=P[1],C=O.x,N=O.y,D=Cn(t,"hidden")?"url(#".concat(f,")"):void 0,B=VC(VC({clipPath:D},Qe(t,!0)),{},{x1:A,y1:x,x2:C,y2:N});return Q.createElement($t,{className:Ve("recharts-reference-line",l)},Z7(s,B),Jt.renderCallByParent(t,A7({x1:A,y1:x,x2:C,y2:N})))}var ox=(function(t){function e(){return F7(this,e),G7(this,e,arguments)}return W7(e,t),z7(e,[{key:"render",value:function(){return Q.createElement(eV,this.props)}}])})(Q.Component);ax(ox,"displayName","ReferenceLine");ax(ox,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Rb(){return Rb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Rb.apply(this,arguments)}function es(t){"@babel/helpers - typeof";return es=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},es(t)}function XC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function YC(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?XC(Object(r),!0).forEach(function(n){Wd(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):XC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function tV(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rV(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,AN(n.key),n)}}function nV(t,e,r){return e&&rV(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function iV(t,e,r){return e=sd(e),aV(t,ON()?Reflect.construct(e,r||[],sd(t).constructor):e.apply(t,r))}function aV(t,e){if(e&&(es(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oV(t)}function oV(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ON(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ON=function(){return!!t})()}function sd(t){return sd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},sd(t)}function sV(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jb(t,e)}function jb(t,e){return jb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},jb(t,e)}function Wd(t,e,r){return e=AN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function AN(t){var e=uV(t,"string");return es(e)=="symbol"?e:e+""}function uV(t,e){if(es(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(es(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var lV=function(e){var r=e.x,n=e.y,i=e.xAxis,a=e.yAxis,s=ix({x:i.scale,y:a.scale}),l=s.apply({x:r,y:n},{bandAware:!0});return Cn(e,"discard")&&!s.isInRange(l)?null:l},Hd=(function(t){function e(){return tV(this,e),iV(this,e,arguments)}return sV(e,t),nV(e,[{key:"render",value:function(){var n=this.props,i=n.x,a=n.y,s=n.r,l=n.alwaysShow,c=n.clipPathId,f=Tt(i),p=Tt(a);if(ja(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!f||!p)return null;var h=lV(this.props);if(!h)return null;var m=h.x,g=h.y,_=this.props,w=_.shape,b=_.className,E=Cn(this.props,"hidden")?"url(#".concat(c,")"):void 0,P=YC(YC({clipPath:E},Qe(this.props,!0)),{},{cx:m,cy:g});return Q.createElement($t,{className:Ve("recharts-reference-dot",b)},e.renderDot(w,P),Jt.renderCallByParent(this.props,{x:m-s,y:g-s,width:2*s,height:2*s}))}}])})(Q.Component);Wd(Hd,"displayName","ReferenceDot");Wd(Hd,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Wd(Hd,"renderDot",function(t,e){var r;return Q.isValidElement(t)?r=Q.cloneElement(t,e):Ge(t)?r=t(e):r=Q.createElement(rN,Rb({},e,{cx:e.cx,cy:e.cy,className:"recharts-reference-dot-dot"})),r});function Nb(){return Nb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Nb.apply(this,arguments)}function ts(t){"@babel/helpers - typeof";return ts=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},ts(t)}function QC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ZC(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?QC(Object(r),!0).forEach(function(n){Vd(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):QC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function cV(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fV(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,TN(n.key),n)}}function dV(t,e,r){return e&&fV(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function hV(t,e,r){return e=ud(e),pV(t,PN()?Reflect.construct(e,r||[],ud(t).constructor):e.apply(t,r))}function pV(t,e){if(e&&(ts(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vV(t)}function vV(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function PN(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(PN=function(){return!!t})()}function ud(t){return ud=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ud(t)}function mV(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Db(t,e)}function Db(t,e){return Db=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Db(t,e)}function Vd(t,e,r){return e=TN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function TN(t){var e=gV(t,"string");return ts(e)=="symbol"?e:e+""}function gV(t,e){if(ts(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ts(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var yV=function(e,r,n,i,a){var s=a.x1,l=a.x2,c=a.y1,f=a.y2,p=a.xAxis,h=a.yAxis;if(!p||!h)return null;var m=ix({x:p.scale,y:h.scale}),g={x:e?m.x.apply(s,{position:"start"}):m.x.rangeMin,y:n?m.y.apply(c,{position:"start"}):m.y.rangeMin},_={x:r?m.x.apply(l,{position:"end"}):m.x.rangeMax,y:i?m.y.apply(f,{position:"end"}):m.y.rangeMax};return Cn(a,"discard")&&(!m.isInRange(g)||!m.isInRange(_))?null:fN(g,_)},Kd=(function(t){function e(){return cV(this,e),hV(this,e,arguments)}return mV(e,t),dV(e,[{key:"render",value:function(){var n=this.props,i=n.x1,a=n.x2,s=n.y1,l=n.y2,c=n.className,f=n.alwaysShow,p=n.clipPathId;ja(f===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=Tt(i),m=Tt(a),g=Tt(s),_=Tt(l),w=this.props.shape;if(!h&&!m&&!g&&!_&&!w)return null;var b=yV(h,m,g,_,this.props);if(!b&&!w)return null;var E=Cn(this.props,"hidden")?"url(#".concat(p,")"):void 0;return Q.createElement($t,{className:Ve("recharts-reference-area",c)},e.renderRect(w,ZC(ZC({clipPath:E},Qe(this.props,!0)),b)),Jt.renderCallByParent(this.props,b))}}])})(Q.Component);Vd(Kd,"displayName","ReferenceArea");Vd(Kd,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});Vd(Kd,"renderRect",function(t,e){var r;return Q.isValidElement(t)?r=Q.cloneElement(t,e):Ge(t)?r=t(e):r=Q.createElement(nx,Nb({},e,{className:"recharts-reference-area-rect"})),r});function CN(t,e,r){if(e<1)return[];if(e===1&&r===void 0)return t;for(var n=[],i=0;i<t.length;i+=e)n.push(t[i]);return n}function bV(t,e,r){var n={width:t.width+e.width,height:t.height+e.height};return T7(n,r)}function wV(t,e,r){var n=r==="width",i=t.x,a=t.y,s=t.width,l=t.height;return e===1?{start:n?i:a,end:n?i+s:a+l}:{start:n?i+s:a+l,end:n?i:a}}function ld(t,e,r,n,i){if(t*e<t*n||t*e>t*i)return!1;var a=r();return t*(e-t*a/2-n)>=0&&t*(e+t*a/2-i)<=0}function xV(t,e){return CN(t,e+1)}function SV(t,e,r,n,i){for(var a=(n||[]).slice(),s=e.start,l=e.end,c=0,f=1,p=s,h=function(){var _=n==null?void 0:n[c];if(_===void 0)return{v:CN(n,f)};var w=c,b,E=function(){return b===void 0&&(b=r(_,w)),b},P=_.coordinate,T=c===0||ld(t,P,E,p,l);T||(c=0,p=s,f+=1),T&&(p=P+t*(E()/2+i),c+=f)},m;f<=a.length;)if(m=h(),m)return m.v;return[]}function hl(t){"@babel/helpers - typeof";return hl=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},hl(t)}function JC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Zt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?JC(Object(r),!0).forEach(function(n){_V(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):JC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function _V(t,e,r){return e=EV(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function EV(t){var e=OV(t,"string");return hl(e)=="symbol"?e:e+""}function OV(t,e){if(hl(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(hl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function AV(t,e,r,n,i){for(var a=(n||[]).slice(),s=a.length,l=e.start,c=e.end,f=function(m){var g=a[m],_,w=function(){return _===void 0&&(_=r(g,m)),_};if(m===s-1){var b=t*(g.coordinate+t*w()/2-c);a[m]=g=Zt(Zt({},g),{},{tickCoord:b>0?g.coordinate-b*t:g.coordinate})}else a[m]=g=Zt(Zt({},g),{},{tickCoord:g.coordinate});var E=ld(t,g.tickCoord,w,l,c);E&&(c=g.tickCoord-t*(w()/2+i),a[m]=Zt(Zt({},g),{},{isShow:!0}))},p=s-1;p>=0;p--)f(p);return a}function PV(t,e,r,n,i,a){var s=(n||[]).slice(),l=s.length,c=e.start,f=e.end;if(a){var p=n[l-1],h=r(p,l-1),m=t*(p.coordinate+t*h/2-f);s[l-1]=p=Zt(Zt({},p),{},{tickCoord:m>0?p.coordinate-m*t:p.coordinate});var g=ld(t,p.tickCoord,function(){return h},c,f);g&&(f=p.tickCoord-t*(h/2+i),s[l-1]=Zt(Zt({},p),{},{isShow:!0}))}for(var _=a?l-1:l,w=function(P){var T=s[P],A,x=function(){return A===void 0&&(A=r(T,P)),A};if(P===0){var O=t*(T.coordinate-t*x()/2-c);s[P]=T=Zt(Zt({},T),{},{tickCoord:O<0?T.coordinate-O*t:T.coordinate})}else s[P]=T=Zt(Zt({},T),{},{tickCoord:T.coordinate});var C=ld(t,T.tickCoord,x,c,f);C&&(c=T.tickCoord+t*(x()/2+i),s[P]=Zt(Zt({},T),{},{isShow:!0}))},b=0;b<_;b++)w(b);return s}function TV(t,e,r){var n=t.tick,i=t.ticks,a=t.viewBox,s=t.minTickGap,l=t.orientation,c=t.interval,f=t.tickFormatter,p=t.unit,h=t.angle;if(!i||!i.length||!n)return[];if(ge(c)||Cl.isSsr)return xV(i,typeof c=="number"&&ge(c)?c:0);var m=[],g=l==="top"||l==="bottom"?"width":"height",_=p&&g==="width"?Au(p,{fontSize:e,letterSpacing:r}):{width:0,height:0},w=function(T,A){var x=Ge(f)?f(T.value,A):T.value;return g==="width"?bV(Au(x,{fontSize:e,letterSpacing:r}),_,h):Au(x,{fontSize:e,letterSpacing:r})[g]},b=i.length>=2?on(i[1].coordinate-i[0].coordinate):1,E=wV(a,b,g);return c==="equidistantPreserveStart"?SV(b,E,w,i,s):(c==="preserveStart"||c==="preserveStartEnd"?m=PV(b,E,w,i,s,c==="preserveStartEnd"):m=AV(b,E,w,i,s),m.filter(function(P){return P.isShow}))}var CV=["viewBox"],kV=["viewBox"],RV=["ticks"];function rs(t){"@babel/helpers - typeof";return rs=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},rs(t)}function xo(){return xo=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},xo.apply(this,arguments)}function ek(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ot(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ek(Object(r),!0).forEach(function(n){sx(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ek(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Xy(t,e){if(t==null)return{};var r=jV(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function jV(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function NV(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tk(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,RN(n.key),n)}}function DV(t,e,r){return e&&tk(t.prototype,e),r&&tk(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function IV(t,e,r){return e=cd(e),MV(t,kN()?Reflect.construct(e,r||[],cd(t).constructor):e.apply(t,r))}function MV(t,e){if(e&&(rs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return LV(t)}function LV(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function kN(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kN=function(){return!!t})()}function cd(t){return cd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},cd(t)}function $V(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ib(t,e)}function Ib(t,e){return Ib=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Ib(t,e)}function sx(t,e,r){return e=RN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function RN(t){var e=FV(t,"string");return rs(e)=="symbol"?e:e+""}function FV(t,e){if(rs(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(rs(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Xd=(function(t){function e(r){var n;return NV(this,e),n=IV(this,e,[r]),n.state={fontSize:"",letterSpacing:""},n}return $V(e,t),DV(e,[{key:"shouldComponentUpdate",value:function(n,i){var a=n.viewBox,s=Xy(n,CV),l=this.props,c=l.viewBox,f=Xy(l,kV);return!_o(a,c)||!_o(s,f)||!_o(i,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var i=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.x,s=i.y,l=i.width,c=i.height,f=i.orientation,p=i.tickSize,h=i.mirror,m=i.tickMargin,g,_,w,b,E,P,T=h?-1:1,A=n.tickSize||p,x=ge(n.tickCoord)?n.tickCoord:n.coordinate;switch(f){case"top":g=_=n.coordinate,b=s+ +!h*c,w=b-T*A,P=w-T*m,E=x;break;case"left":w=b=n.coordinate,_=a+ +!h*l,g=_-T*A,E=g-T*m,P=x;break;case"right":w=b=n.coordinate,_=a+ +h*l,g=_+T*A,E=g+T*m,P=x;break;default:g=_=n.coordinate,b=s+ +h*c,w=b+T*A,P=w+T*m,E=x;break}return{line:{x1:g,y1:w,x2:_,y2:b},tick:{x:E,y:P}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,s;switch(i){case"left":s=a?"start":"end";break;case"right":s=a?"end":"start";break;default:s="middle";break}return s}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,s="end";switch(i){case"left":case"right":s="middle";break;case"top":s=a?"start":"end";break;default:s=a?"end":"start";break}return s}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.x,a=n.y,s=n.width,l=n.height,c=n.orientation,f=n.mirror,p=n.axisLine,h=Ot(Ot(Ot({},Qe(this.props,!1)),Qe(p,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var m=+(c==="top"&&!f||c==="bottom"&&f);h=Ot(Ot({},h),{},{x1:i,y1:a+m*l,x2:i+s,y2:a+m*l})}else{var g=+(c==="left"&&!f||c==="right"&&f);h=Ot(Ot({},h),{},{x1:i+g*s,y1:a,x2:i+g*s,y2:a+l})}return Q.createElement("line",xo({},h,{className:Ve("recharts-cartesian-axis-line",$r(p,"className"))}))}},{key:"renderTicks",value:function(n,i,a){var s=this,l=this.props,c=l.tickLine,f=l.stroke,p=l.tick,h=l.tickFormatter,m=l.unit,g=TV(Ot(Ot({},this.props),{},{ticks:n}),i,a),_=this.getTickTextAnchor(),w=this.getTickVerticalAnchor(),b=Qe(this.props,!1),E=Qe(p,!1),P=Ot(Ot({},b),{},{fill:"none"},Qe(c,!1)),T=g.map(function(A,x){var O=s.getTickLineCoord(A),C=O.line,N=O.tick,D=Ot(Ot(Ot(Ot({textAnchor:_,verticalAnchor:w},b),{},{stroke:"none",fill:f},E),N),{},{index:x,payload:A,visibleTicksCount:g.length,tickFormatter:h});return Q.createElement($t,xo({className:"recharts-cartesian-axis-tick",key:"tick-".concat(A.value,"-").concat(A.coordinate,"-").concat(A.tickCoord)},bf(s.props,A,x)),c&&Q.createElement("line",xo({},P,C,{className:Ve("recharts-cartesian-axis-tick-line",$r(c,"className"))})),p&&e.renderTickItem(p,D,"".concat(Ge(h)?h(A.value,x):A.value).concat(m||"")))});return Q.createElement("g",{className:"recharts-cartesian-axis-ticks"},T)}},{key:"render",value:function(){var n=this,i=this.props,a=i.axisLine,s=i.width,l=i.height,c=i.ticksGenerator,f=i.className,p=i.hide;if(p)return null;var h=this.props,m=h.ticks,g=Xy(h,RV),_=m;return Ge(c)&&(_=m&&m.length>0?c(this.props):c(g)),s<=0||l<=0||!_||!_.length?null:Q.createElement($t,{className:Ve("recharts-cartesian-axis",f),ref:function(b){n.layerReference=b}},a&&this.renderAxisLine(),this.renderTicks(_,this.state.fontSize,this.state.letterSpacing),Jt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var s,l=Ve(i.className,"recharts-cartesian-axis-tick-value");return Q.isValidElement(n)?s=Q.cloneElement(n,Ot(Ot({},i),{},{className:l})):Ge(n)?s=n(Ot(Ot({},i),{},{className:l})):s=Q.createElement(kf,xo({},i,{className:"recharts-cartesian-axis-tick-value"}),a),s}}])})(I.Component);sx(Xd,"displayName","CartesianAxis");sx(Xd,"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"});function ns(t){"@babel/helpers - typeof";return ns=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},ns(t)}function BV(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zV(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,DN(n.key),n)}}function GV(t,e,r){return e&&zV(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function UV(t,e,r){return e=fd(e),qV(t,jN()?Reflect.construct(e,r||[],fd(t).constructor):e.apply(t,r))}function qV(t,e){if(e&&(ns(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return WV(t)}function WV(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function jN(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jN=function(){return!!t})()}function fd(t){return fd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},fd(t)}function HV(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Mb(t,e)}function Mb(t,e){return Mb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Mb(t,e)}function NN(t,e,r){return e=DN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function DN(t){var e=VV(t,"string");return ns(e)=="symbol"?e:e+""}function VV(t,e){if(ns(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ns(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Lb(){return Lb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Lb.apply(this,arguments)}function KV(t){var e=t.xAxisId,r=xN(),n=SN(),i=bN(e);return i==null?null:I.createElement(Xd,Lb({},i,{className:Ve("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(s){return Sa(s,!0)}}))}var pl=(function(t){function e(){return BV(this,e),UV(this,e,arguments)}return HV(e,t),GV(e,[{key:"render",value:function(){return I.createElement(KV,this.props)}}])})(I.Component);NN(pl,"displayName","XAxis");NN(pl,"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 is(t){"@babel/helpers - typeof";return is=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},is(t)}function XV(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function YV(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,LN(n.key),n)}}function QV(t,e,r){return e&&YV(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function ZV(t,e,r){return e=dd(e),JV(t,IN()?Reflect.construct(e,r||[],dd(t).constructor):e.apply(t,r))}function JV(t,e){if(e&&(is(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return eK(t)}function eK(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function IN(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(IN=function(){return!!t})()}function dd(t){return dd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},dd(t)}function tK(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$b(t,e)}function $b(t,e){return $b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},$b(t,e)}function MN(t,e,r){return e=LN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function LN(t){var e=rK(t,"string");return is(e)=="symbol"?e:e+""}function rK(t,e){if(is(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(is(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Fb(){return Fb=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Fb.apply(this,arguments)}var nK=function(e){var r=e.yAxisId,n=xN(),i=SN(),a=wN(r);return a==null?null:I.createElement(Xd,Fb({},a,{className:Ve("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(l){return Sa(l,!0)}}))},vl=(function(t){function e(){return XV(this,e),ZV(this,e,arguments)}return tK(e,t),QV(e,[{key:"render",value:function(){return I.createElement(nK,this.props)}}])})(I.Component);MN(vl,"displayName","YAxis");MN(vl,"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 rk(t){return sK(t)||oK(t)||aK(t)||iK()}function iK(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
196
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aK(t,e){if(t){if(typeof t=="string")return Bb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Bb(t,e)}}function oK(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function sK(t){if(Array.isArray(t))return Bb(t)}function Bb(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var zb=function(e,r,n,i,a){var s=sn(e,ox),l=sn(e,Hd),c=[].concat(rk(s),rk(l)),f=sn(e,Kd),p="".concat(i,"Id"),h=i[0],m=r;if(c.length&&(m=c.reduce(function(w,b){if(b.props[p]===n&&Cn(b.props,"extendDomain")&&ge(b.props[h])){var E=b.props[h];return[Math.min(w[0],E),Math.max(w[1],E)]}return w},m)),f.length){var g="".concat(h,"1"),_="".concat(h,"2");m=f.reduce(function(w,b){if(b.props[p]===n&&Cn(b.props,"extendDomain")&&ge(b.props[g])&&ge(b.props[_])){var E=b.props[g],P=b.props[_];return[Math.min(w[0],E,P),Math.max(w[1],E,P)]}return w},m)}return a&&a.length&&(m=a.reduce(function(w,b){return ge(b)?[Math.min(w[0],b),Math.max(w[1],b)]:w},m)),m},Yy={exports:{}},nk;function uK(){return nk||(nk=1,(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(c,f,p){this.fn=c,this.context=f,this.once=p||!1}function a(c,f,p,h,m){if(typeof p!="function")throw new TypeError("The listener must be a function");var g=new i(p,h||c,m),_=r?r+f:f;return c._events[_]?c._events[_].fn?c._events[_]=[c._events[_],g]:c._events[_].push(g):(c._events[_]=g,c._eventsCount++),c}function s(c,f){--c._eventsCount===0?c._events=new n:delete c._events[f]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var f=[],p,h;if(this._eventsCount===0)return f;for(h in p=this._events)e.call(p,h)&&f.push(r?h.slice(1):h);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(p)):f},l.prototype.listeners=function(f){var p=r?r+f:f,h=this._events[p];if(!h)return[];if(h.fn)return[h.fn];for(var m=0,g=h.length,_=new Array(g);m<g;m++)_[m]=h[m].fn;return _},l.prototype.listenerCount=function(f){var p=r?r+f:f,h=this._events[p];return h?h.fn?1:h.length:0},l.prototype.emit=function(f,p,h,m,g,_){var w=r?r+f:f;if(!this._events[w])return!1;var b=this._events[w],E=arguments.length,P,T;if(b.fn){switch(b.once&&this.removeListener(f,b.fn,void 0,!0),E){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,p),!0;case 3:return b.fn.call(b.context,p,h),!0;case 4:return b.fn.call(b.context,p,h,m),!0;case 5:return b.fn.call(b.context,p,h,m,g),!0;case 6:return b.fn.call(b.context,p,h,m,g,_),!0}for(T=1,P=new Array(E-1);T<E;T++)P[T-1]=arguments[T];b.fn.apply(b.context,P)}else{var A=b.length,x;for(T=0;T<A;T++)switch(b[T].once&&this.removeListener(f,b[T].fn,void 0,!0),E){case 1:b[T].fn.call(b[T].context);break;case 2:b[T].fn.call(b[T].context,p);break;case 3:b[T].fn.call(b[T].context,p,h);break;case 4:b[T].fn.call(b[T].context,p,h,m);break;default:if(!P)for(x=1,P=new Array(E-1);x<E;x++)P[x-1]=arguments[x];b[T].fn.apply(b[T].context,P)}}return!0},l.prototype.on=function(f,p,h){return a(this,f,p,h,!1)},l.prototype.once=function(f,p,h){return a(this,f,p,h,!0)},l.prototype.removeListener=function(f,p,h,m){var g=r?r+f:f;if(!this._events[g])return this;if(!p)return s(this,g),this;var _=this._events[g];if(_.fn)_.fn===p&&(!m||_.once)&&(!h||_.context===h)&&s(this,g);else{for(var w=0,b=[],E=_.length;w<E;w++)(_[w].fn!==p||m&&!_[w].once||h&&_[w].context!==h)&&b.push(_[w]);b.length?this._events[g]=b.length===1?b[0]:b:s(this,g)}return this},l.prototype.removeAllListeners=function(f){var p;return f?(p=r?r+f:f,this._events[p]&&s(this,p)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,t.exports=l})(Yy)),Yy.exports}var lK=uK();const cK=tt(lK);var Qy=new cK,Zy="recharts.syncMouseEvents";function ml(t){"@babel/helpers - typeof";return ml=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},ml(t)}function fK(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dK(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,$N(n.key),n)}}function hK(t,e,r){return e&&dK(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Jy(t,e,r){return e=$N(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $N(t){var e=pK(t,"string");return ml(e)=="symbol"?e:e+""}function pK(t,e){if(ml(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ml(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var vK=(function(){function t(){fK(this,t),Jy(this,"activeIndex",0),Jy(this,"coordinateList",[]),Jy(this,"layout","horizontal")}return hK(t,[{key:"setDetails",value:function(r){var n,i=r.coordinateList,a=i===void 0?null:i,s=r.container,l=s===void 0?null:s,c=r.layout,f=c===void 0?null:c,p=r.offset,h=p===void 0?null:p,m=r.mouseHandlerCallback,g=m===void 0?null:m;this.coordinateList=(n=a??this.coordinateList)!==null&&n!==void 0?n:[],this.container=l??this.container,this.layout=f??this.layout,this.offset=h??this.offset,this.mouseHandlerCallback=g??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(r){if(this.coordinateList.length!==0)switch(r.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();break}}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),a=i.x,s=i.y,l=i.height,c=this.coordinateList[this.activeIndex].coordinate,f=((r=window)===null||r===void 0?void 0:r.scrollX)||0,p=((n=window)===null||n===void 0?void 0:n.scrollY)||0,h=a+c+f,m=s+this.offset.top+l/2+p;this.mouseHandlerCallback({pageX:h,pageY:m})}}}])})();function mK(t,e,r){if(r==="number"&&e===!0&&Array.isArray(t)){var n=t==null?void 0:t[0],i=t==null?void 0:t[1];if(n&&i&&ge(n)&&ge(i))return!0}return!1}function gK(t,e,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:t==="horizontal"?e.x-i:r.left+.5,y:t==="horizontal"?r.top+.5:e.y-i,width:t==="horizontal"?n:r.width-1,height:t==="horizontal"?r.height-1:n}}function FN(t){var e=t.cx,r=t.cy,n=t.radius,i=t.startAngle,a=t.endAngle,s=Ht(e,r,n,i),l=Ht(e,r,n,a);return{points:[s,l],cx:e,cy:r,radius:n,startAngle:i,endAngle:a}}function yK(t,e,r){var n,i,a,s;if(t==="horizontal")n=e.x,a=n,i=r.top,s=r.top+r.height;else if(t==="vertical")i=e.y,s=i,n=r.left,a=r.left+r.width;else if(e.cx!=null&&e.cy!=null)if(t==="centric"){var l=e.cx,c=e.cy,f=e.innerRadius,p=e.outerRadius,h=e.angle,m=Ht(l,c,f,h),g=Ht(l,c,p,h);n=m.x,i=m.y,a=g.x,s=g.y}else return FN(e);return[{x:n,y:i},{x:a,y:s}]}function gl(t){"@babel/helpers - typeof";return gl=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},gl(t)}function ik(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function af(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ik(Object(r),!0).forEach(function(n){bK(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ik(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function bK(t,e,r){return e=wK(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function wK(t){var e=xK(t,"string");return gl(e)=="symbol"?e:e+""}function xK(t,e){if(gl(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(gl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function SK(t){var e,r,n=t.element,i=t.tooltipEventType,a=t.isActive,s=t.activeCoordinate,l=t.activePayload,c=t.offset,f=t.activeTooltipIndex,p=t.tooltipAxisBandSize,h=t.layout,m=t.chartName,g=(e=n.props.cursor)!==null&&e!==void 0?e:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!g||!a||!s||m!=="ScatterChart"&&i!=="axis")return null;var _,w=BT;if(m==="ScatterChart")_=s,w=KH;else if(m==="BarChart")_=gK(h,s,c,p),w=nx;else if(h==="radial"){var b=FN(s),E=b.cx,P=b.cy,T=b.radius,A=b.startAngle,x=b.endAngle;_={cx:E,cy:P,startAngle:A,endAngle:x,innerRadius:T,outerRadius:T},w=K2}else _={points:yK(h,s,c)},w=BT;var O=af(af(af(af({stroke:"#ccc",pointerEvents:"none"},c),_),Qe(g,!1)),{},{payload:l,payloadIndex:f,className:Ve("recharts-tooltip-cursor",g.className)});return I.isValidElement(g)?I.cloneElement(g,O):I.createElement(w,O)}var _K=["item"],EK=["children","className","width","height","style","compact","title","desc"];function as(t){"@babel/helpers - typeof";return as=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},as(t)}function So(){return So=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},So.apply(this,arguments)}function ak(t,e){return PK(t)||AK(t,e)||zN(t,e)||OK()}function OK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
197
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AK(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,l=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return l}}function PK(t){if(Array.isArray(t))return t}function ok(t,e){if(t==null)return{};var r=TK(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function TK(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function CK(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kK(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,GN(n.key),n)}}function RK(t,e,r){return e&&kK(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function jK(t,e,r){return e=hd(e),NK(t,BN()?Reflect.construct(e,r||[],hd(t).constructor):e.apply(t,r))}function NK(t,e){if(e&&(as(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return DK(t)}function DK(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function BN(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(BN=function(){return!!t})()}function hd(t){return hd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},hd(t)}function IK(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gb(t,e)}function Gb(t,e){return Gb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Gb(t,e)}function os(t){return $K(t)||LK(t)||zN(t)||MK()}function MK(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
198
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zN(t,e){if(t){if(typeof t=="string")return Ub(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ub(t,e)}}function LK(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function $K(t){if(Array.isArray(t))return Ub(t)}function Ub(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function sk(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ae(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?sk(Object(r),!0).forEach(function(n){Ne(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):sk(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Ne(t,e,r){return e=GN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function GN(t){var e=FK(t,"string");return as(e)=="symbol"?e:e+""}function FK(t,e){if(as(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(as(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var BK={xAxis:["bottom","top"],yAxis:["left","right"]},zK={width:"100%",height:"100%"},UN={x:0,y:0};function of(t){return t}var GK=function(e,r){return r==="horizontal"?e.x:r==="vertical"?e.y:r==="centric"?e.angle:e.radius},UK=function(e,r,n,i){var a=r.find(function(p){return p&&p.index===n});if(a){if(e==="horizontal")return{x:a.coordinate,y:i.y};if(e==="vertical")return{x:i.x,y:a.coordinate};if(e==="centric"){var s=a.coordinate,l=i.radius;return ae(ae(ae({},i),Ht(i.cx,i.cy,l,s)),{},{angle:s,radius:l})}var c=a.coordinate,f=i.angle;return ae(ae(ae({},i),Ht(i.cx,i.cy,c,f)),{},{angle:f,radius:c})}return UN},Yd=function(e,r){var n=r.graphicalItems,i=r.dataStartIndex,a=r.dataEndIndex,s=(n??[]).reduce(function(l,c){var f=c.props.data;return f&&f.length?[].concat(os(l),os(f)):l},[]);return s.length>0?s:e&&e.length&&ge(i)&&ge(a)?e.slice(i,a+1):[]};function qN(t){return t==="number"?[0,"auto"]:void 0}var qb=function(e,r,n,i){var a=e.graphicalItems,s=e.tooltipAxis,l=Yd(r,e);return n<0||!a||!a.length||n>=l.length?null:a.reduce(function(c,f){var p,h=(p=f.props.data)!==null&&p!==void 0?p:r;h&&e.dataStartIndex+e.dataEndIndex!==0&&e.dataEndIndex-e.dataStartIndex>=n&&(h=h.slice(e.dataStartIndex,e.dataEndIndex+1));var m;if(s.dataKey&&!s.allowDuplicatedCategory){var g=h===void 0?l:h;m=k0(g,s.dataKey,i)}else m=h&&h[n]||l[n];return m?[].concat(os(c),[W2(f,m)]):c},[])},uk=function(e,r,n,i){var a=i||{x:e.chartX,y:e.chartY},s=GK(a,n),l=e.orderedTooltipTicks,c=e.tooltipAxis,f=e.tooltipTicks,p=P6(s,l,f,c);if(p>=0&&f){var h=f[p]&&f[p].value,m=qb(e,r,p,h),g=UK(n,l,p,a);return{activeTooltipIndex:p,activeLabel:h,activePayload:m,activeCoordinate:g}}return null},qK=function(e,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,s=r.axisIdKey,l=r.stackGroups,c=r.dataStartIndex,f=r.dataEndIndex,p=e.layout,h=e.children,m=e.stackOffset,g=U2(p,a);return n.reduce(function(_,w){var b,E=w.type.defaultProps!==void 0?ae(ae({},w.type.defaultProps),w.props):w.props,P=E.type,T=E.dataKey,A=E.allowDataOverflow,x=E.allowDuplicatedCategory,O=E.scale,C=E.ticks,N=E.includeHidden,D=E[s];if(_[D])return _;var B=Yd(e.data,{graphicalItems:i.filter(function(H){var te,we=s in H.props?H.props[s]:(te=H.type.defaultProps)===null||te===void 0?void 0:te[s];return we===D}),dataStartIndex:c,dataEndIndex:f}),U=B.length,L,j,X;mK(E.domain,A,P)&&(L=cb(E.domain,null,A),g&&(P==="number"||O!=="auto")&&(X=Tu(B,T,"category")));var K=qN(P);if(!L||L.length===0){var G,M=(G=E.domain)!==null&&G!==void 0?G:K;if(T){if(L=Tu(B,T,P),P==="category"&&g){var V=b8(L);x&&V?(j=L,L=td(0,U)):x||(L=AT(M,L,w).reduce(function(H,te){return H.indexOf(te)>=0?H:[].concat(os(H),[te])},[]))}else if(P==="category")x?L=L.filter(function(H){return H!==""&&!Ke(H)}):L=AT(M,L,w).reduce(function(H,te){return H.indexOf(te)>=0||te===""||Ke(te)?H:[].concat(os(H),[te])},[]);else if(P==="number"){var J=j6(B,i.filter(function(H){var te,we,xe=s in H.props?H.props[s]:(te=H.type.defaultProps)===null||te===void 0?void 0:te[s],De="hide"in H.props?H.props.hide:(we=H.type.defaultProps)===null||we===void 0?void 0:we.hide;return xe===D&&(N||!De)}),T,a,p);J&&(L=J)}g&&(P==="number"||O!=="auto")&&(X=Tu(B,T,"category"))}else g?L=td(0,U):l&&l[D]&&l[D].hasStack&&P==="number"?L=m==="expand"?[0,1]:q2(l[D].stackGroups,c,f):L=G2(B,i.filter(function(H){var te=s in H.props?H.props[s]:H.type.defaultProps[s],we="hide"in H.props?H.props.hide:H.type.defaultProps.hide;return te===D&&(N||!we)}),P,p,!0);if(P==="number")L=zb(h,L,D,a,C),M&&(L=cb(M,L,A));else if(P==="category"&&M){var ee=M,F=L.every(function(H){return ee.indexOf(H)>=0});F&&(L=ee)}}return ae(ae({},_),{},Ne({},D,ae(ae({},E),{},{axisType:a,domain:L,categoricalDomain:X,duplicateDomain:j,originalDomain:(b=E.domain)!==null&&b!==void 0?b:K,isCategorical:g,layout:p})))},{})},WK=function(e,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,s=r.axisIdKey,l=r.stackGroups,c=r.dataStartIndex,f=r.dataEndIndex,p=e.layout,h=e.children,m=Yd(e.data,{graphicalItems:n,dataStartIndex:c,dataEndIndex:f}),g=m.length,_=U2(p,a),w=-1;return n.reduce(function(b,E){var P=E.type.defaultProps!==void 0?ae(ae({},E.type.defaultProps),E.props):E.props,T=P[s],A=qN("number");if(!b[T]){w++;var x;return _?x=td(0,g):l&&l[T]&&l[T].hasStack?(x=q2(l[T].stackGroups,c,f),x=zb(h,x,T,a)):(x=cb(A,G2(m,n.filter(function(O){var C,N,D=s in O.props?O.props[s]:(C=O.type.defaultProps)===null||C===void 0?void 0:C[s],B="hide"in O.props?O.props.hide:(N=O.type.defaultProps)===null||N===void 0?void 0:N.hide;return D===T&&!B}),"number",p),i.defaultProps.allowDataOverflow),x=zb(h,x,T,a)),ae(ae({},b),{},Ne({},T,ae(ae({axisType:a},i.defaultProps),{},{hide:!0,orientation:$r(BK,"".concat(a,".").concat(w%2),null),domain:x,originalDomain:A,isCategorical:_,layout:p})))}return b},{})},HK=function(e,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,s=r.graphicalItems,l=r.stackGroups,c=r.dataStartIndex,f=r.dataEndIndex,p=e.children,h="".concat(i,"Id"),m=sn(p,a),g={};return m&&m.length?g=qK(e,{axes:m,graphicalItems:s,axisType:i,axisIdKey:h,stackGroups:l,dataStartIndex:c,dataEndIndex:f}):s&&s.length&&(g=WK(e,{Axis:a,graphicalItems:s,axisType:i,axisIdKey:h,stackGroups:l,dataStartIndex:c,dataEndIndex:f})),g},VK=function(e){var r=bo(e),n=Sa(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Cw(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Wf(r,n)}},lk=function(e){var r=e.children,n=e.defaultShowTooltip,i=xr(r,Qo),a=0,s=0;return e.data&&e.data.length!==0&&(s=e.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(s=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:s,activeTooltipIndex:-1,isTooltipActive:!!n}},KK=function(e){return!e||!e.length?!1:e.some(function(r){var n=ti(r&&r.type);return n&&n.indexOf("Bar")>=0})},ck=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"}},XK=function(e,r){var n=e.props,i=e.graphicalItems,a=e.xAxisMap,s=a===void 0?{}:a,l=e.yAxisMap,c=l===void 0?{}:l,f=n.width,p=n.height,h=n.children,m=n.margin||{},g=xr(h,Qo),_=xr(h,Eo),w=Object.keys(c).reduce(function(x,O){var C=c[O],N=C.orientation;return!C.mirror&&!C.hide?ae(ae({},x),{},Ne({},N,x[N]+C.width)):x},{left:m.left||0,right:m.right||0}),b=Object.keys(s).reduce(function(x,O){var C=s[O],N=C.orientation;return!C.mirror&&!C.hide?ae(ae({},x),{},Ne({},N,$r(x,"".concat(N))+C.height)):x},{top:m.top||0,bottom:m.bottom||0}),E=ae(ae({},b),w),P=E.bottom;g&&(E.bottom+=g.props.height||Qo.defaultProps.height),_&&r&&(E=k6(E,i,n,r));var T=f-E.left-E.right,A=p-E.top-E.bottom;return ae(ae({brushBottom:P},E),{},{width:Math.max(T,0),height:Math.max(A,0)})},YK=function(e,r){if(r==="xAxis")return e[r].width;if(r==="yAxis")return e[r].height},QK=function(e){var r=e.chartName,n=e.GraphicalChild,i=e.defaultTooltipEventType,a=i===void 0?"axis":i,s=e.validateTooltipEventTypes,l=s===void 0?["axis"]:s,c=e.axisComponents,f=e.legendContent,p=e.formatAxisMap,h=e.defaultProps,m=function(E,P){var T=P.graphicalItems,A=P.stackGroups,x=P.offset,O=P.updateId,C=P.dataStartIndex,N=P.dataEndIndex,D=E.barSize,B=E.layout,U=E.barGap,L=E.barCategoryGap,j=E.maxBarSize,X=ck(B),K=X.numericAxisName,G=X.cateAxisName,M=KK(T),V=[];return T.forEach(function(J,ee){var F=Yd(E.data,{graphicalItems:[J],dataStartIndex:C,dataEndIndex:N}),H=J.type.defaultProps!==void 0?ae(ae({},J.type.defaultProps),J.props):J.props,te=H.dataKey,we=H.maxBarSize,xe=H["".concat(K,"Id")],De=H["".concat(G,"Id")],Le={},Me=c.reduce(function(rt,jt){var fn=P["".concat(jt.axisType,"Map")],dn=H["".concat(jt.axisType,"Id")];fn&&fn[dn]||jt.axisType==="zAxis"||Fa();var hn=fn[dn];return ae(ae({},rt),{},Ne(Ne({},jt.axisType,hn),"".concat(jt.axisType,"Ticks"),Sa(hn)))},Le),le=Me[G],pe=Me["".concat(G,"Ticks")],ve=A&&A[xe]&&A[xe].hasStack&&q6(J,A[xe].stackGroups),ie=ti(J.type).indexOf("Bar")>=0,Fe=Wf(le,pe),de=[],me=M&&T6({barSize:D,stackGroups:A,totalSize:YK(Me,G)});if(ie){var ne,it,kt=Ke(we)?j:we,Rt=(ne=(it=Wf(le,pe,!0))!==null&&it!==void 0?it:kt)!==null&&ne!==void 0?ne:0;de=C6({barGap:U,barCategoryGap:L,bandSize:Rt!==Fe?Rt:Fe,sizeList:me[De],maxBarSize:kt}),Rt!==Fe&&(de=de.map(function(rt){return ae(ae({},rt),{},{position:ae(ae({},rt.position),{},{offset:rt.position.offset-Rt/2})})}))}var Bt=J&&J.type&&J.type.getComposedData;Bt&&V.push({props:ae(ae({},Bt(ae(ae({},Me),{},{displayedData:F,props:E,dataKey:te,item:J,bandSize:Fe,barPosition:de,offset:x,stackedData:ve,layout:B,dataStartIndex:C,dataEndIndex:N}))),{},Ne(Ne(Ne({key:J.key||"item-".concat(ee)},K,Me[K]),G,Me[G]),"animationId",O)),childIndex:R8(J,E.children),item:J})}),V},g=function(E,P){var T=E.props,A=E.dataStartIndex,x=E.dataEndIndex,O=E.updateId;if(!BE({props:T}))return null;var C=T.children,N=T.layout,D=T.stackOffset,B=T.data,U=T.reverseStackOrder,L=ck(N),j=L.numericAxisName,X=L.cateAxisName,K=sn(C,n),G=z6(B,K,"".concat(j,"Id"),"".concat(X,"Id"),D,U),M=c.reduce(function(H,te){var we="".concat(te.axisType,"Map");return ae(ae({},H),{},Ne({},we,HK(T,ae(ae({},te),{},{graphicalItems:K,stackGroups:te.axisType===j&&G,dataStartIndex:A,dataEndIndex:x}))))},{}),V=XK(ae(ae({},M),{},{props:T,graphicalItems:K}),P==null?void 0:P.legendBBox);Object.keys(M).forEach(function(H){M[H]=p(T,M[H],V,H.replace("Map",""),r)});var J=M["".concat(X,"Map")],ee=VK(J),F=m(T,ae(ae({},M),{},{dataStartIndex:A,dataEndIndex:x,updateId:O,graphicalItems:K,stackGroups:G,offset:V}));return ae(ae({formattedGraphicalItems:F,graphicalItems:K,offset:V,stackGroups:G},ee),M)},_=(function(b){function E(P){var T,A,x;return CK(this,E),x=jK(this,E,[P]),Ne(x,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Ne(x,"accessibilityManager",new vK),Ne(x,"handleLegendBBoxUpdate",function(O){if(O){var C=x.state,N=C.dataStartIndex,D=C.dataEndIndex,B=C.updateId;x.setState(ae({legendBBox:O},g({props:x.props,dataStartIndex:N,dataEndIndex:D,updateId:B},ae(ae({},x.state),{},{legendBBox:O}))))}}),Ne(x,"handleReceiveSyncEvent",function(O,C,N){if(x.props.syncId===O){if(N===x.eventEmitterSymbol&&typeof x.props.syncMethod!="function")return;x.applySyncEvent(C)}}),Ne(x,"handleBrushChange",function(O){var C=O.startIndex,N=O.endIndex;if(C!==x.state.dataStartIndex||N!==x.state.dataEndIndex){var D=x.state.updateId;x.setState(function(){return ae({dataStartIndex:C,dataEndIndex:N},g({props:x.props,dataStartIndex:C,dataEndIndex:N,updateId:D},x.state))}),x.triggerSyncEvent({dataStartIndex:C,dataEndIndex:N})}}),Ne(x,"handleMouseEnter",function(O){var C=x.getMouseInfo(O);if(C){var N=ae(ae({},C),{},{isTooltipActive:!0});x.setState(N),x.triggerSyncEvent(N);var D=x.props.onMouseEnter;Ge(D)&&D(N,O)}}),Ne(x,"triggeredAfterMouseMove",function(O){var C=x.getMouseInfo(O),N=C?ae(ae({},C),{},{isTooltipActive:!0}):{isTooltipActive:!1};x.setState(N),x.triggerSyncEvent(N);var D=x.props.onMouseMove;Ge(D)&&D(N,O)}),Ne(x,"handleItemMouseEnter",function(O){x.setState(function(){return{isTooltipActive:!0,activeItem:O,activePayload:O.tooltipPayload,activeCoordinate:O.tooltipPosition||{x:O.cx,y:O.cy}}})}),Ne(x,"handleItemMouseLeave",function(){x.setState(function(){return{isTooltipActive:!1}})}),Ne(x,"handleMouseMove",function(O){O.persist(),x.throttleTriggeredAfterMouseMove(O)}),Ne(x,"handleMouseLeave",function(O){x.throttleTriggeredAfterMouseMove.cancel();var C={isTooltipActive:!1};x.setState(C),x.triggerSyncEvent(C);var N=x.props.onMouseLeave;Ge(N)&&N(C,O)}),Ne(x,"handleOuterEvent",function(O){var C=k8(O),N=$r(x.props,"".concat(C));if(C&&Ge(N)){var D,B;/.*touch.*/i.test(C)?B=x.getMouseInfo(O.changedTouches[0]):B=x.getMouseInfo(O),N((D=B)!==null&&D!==void 0?D:{},O)}}),Ne(x,"handleClick",function(O){var C=x.getMouseInfo(O);if(C){var N=ae(ae({},C),{},{isTooltipActive:!0});x.setState(N),x.triggerSyncEvent(N);var D=x.props.onClick;Ge(D)&&D(N,O)}}),Ne(x,"handleMouseDown",function(O){var C=x.props.onMouseDown;if(Ge(C)){var N=x.getMouseInfo(O);C(N,O)}}),Ne(x,"handleMouseUp",function(O){var C=x.props.onMouseUp;if(Ge(C)){var N=x.getMouseInfo(O);C(N,O)}}),Ne(x,"handleTouchMove",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&x.throttleTriggeredAfterMouseMove(O.changedTouches[0])}),Ne(x,"handleTouchStart",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&x.handleMouseDown(O.changedTouches[0])}),Ne(x,"handleTouchEnd",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&x.handleMouseUp(O.changedTouches[0])}),Ne(x,"handleDoubleClick",function(O){var C=x.props.onDoubleClick;if(Ge(C)){var N=x.getMouseInfo(O);C(N,O)}}),Ne(x,"handleContextMenu",function(O){var C=x.props.onContextMenu;if(Ge(C)){var N=x.getMouseInfo(O);C(N,O)}}),Ne(x,"triggerSyncEvent",function(O){x.props.syncId!==void 0&&Qy.emit(Zy,x.props.syncId,O,x.eventEmitterSymbol)}),Ne(x,"applySyncEvent",function(O){var C=x.props,N=C.layout,D=C.syncMethod,B=x.state.updateId,U=O.dataStartIndex,L=O.dataEndIndex;if(O.dataStartIndex!==void 0||O.dataEndIndex!==void 0)x.setState(ae({dataStartIndex:U,dataEndIndex:L},g({props:x.props,dataStartIndex:U,dataEndIndex:L,updateId:B},x.state)));else if(O.activeTooltipIndex!==void 0){var j=O.chartX,X=O.chartY,K=O.activeTooltipIndex,G=x.state,M=G.offset,V=G.tooltipTicks;if(!M)return;if(typeof D=="function")K=D(V,O);else if(D==="value"){K=-1;for(var J=0;J<V.length;J++)if(V[J].value===O.activeLabel){K=J;break}}var ee=ae(ae({},M),{},{x:M.left,y:M.top}),F=Math.min(j,ee.x+ee.width),H=Math.min(X,ee.y+ee.height),te=V[K]&&V[K].value,we=qb(x.state,x.props.data,K),xe=V[K]?{x:N==="horizontal"?V[K].coordinate:F,y:N==="horizontal"?H:V[K].coordinate}:UN;x.setState(ae(ae({},O),{},{activeLabel:te,activeCoordinate:xe,activePayload:we,activeTooltipIndex:K}))}else x.setState(O)}),Ne(x,"renderCursor",function(O){var C,N=x.state,D=N.isTooltipActive,B=N.activeCoordinate,U=N.activePayload,L=N.offset,j=N.activeTooltipIndex,X=N.tooltipAxisBandSize,K=x.getTooltipEventType(),G=(C=O.props.active)!==null&&C!==void 0?C:D,M=x.props.layout,V=O.key||"_recharts-cursor";return Q.createElement(SK,{key:V,activeCoordinate:B,activePayload:U,activeTooltipIndex:j,chartName:r,element:O,isActive:G,layout:M,offset:L,tooltipAxisBandSize:X,tooltipEventType:K})}),Ne(x,"renderPolarAxis",function(O,C,N){var D=$r(O,"type.axisType"),B=$r(x.state,"".concat(D,"Map")),U=O.type.defaultProps,L=U!==void 0?ae(ae({},U),O.props):O.props,j=B&&B[L["".concat(D,"Id")]];return I.cloneElement(O,ae(ae({},j),{},{className:Ve(D,j.className),key:O.key||"".concat(C,"-").concat(N),ticks:Sa(j,!0)}))}),Ne(x,"renderPolarGrid",function(O){var C=O.props,N=C.radialLines,D=C.polarAngles,B=C.polarRadius,U=x.state,L=U.radiusAxisMap,j=U.angleAxisMap,X=bo(L),K=bo(j),G=K.cx,M=K.cy,V=K.innerRadius,J=K.outerRadius;return I.cloneElement(O,{polarAngles:Array.isArray(D)?D:Sa(K,!0).map(function(ee){return ee.coordinate}),polarRadius:Array.isArray(B)?B:Sa(X,!0).map(function(ee){return ee.coordinate}),cx:G,cy:M,innerRadius:V,outerRadius:J,key:O.key||"polar-grid",radialLines:N})}),Ne(x,"renderLegend",function(){var O=x.state.formattedGraphicalItems,C=x.props,N=C.children,D=C.width,B=C.height,U=x.props.margin||{},L=D-(U.left||0)-(U.right||0),j=B2({children:N,formattedGraphicalItems:O,legendWidth:L,legendContent:f});if(!j)return null;var X=j.item,K=ok(j,_K);return I.cloneElement(X,ae(ae({},K),{},{chartWidth:D,chartHeight:B,margin:U,onBBoxUpdate:x.handleLegendBBoxUpdate}))}),Ne(x,"renderTooltip",function(){var O,C=x.props,N=C.children,D=C.accessibilityLayer,B=xr(N,tn);if(!B)return null;var U=x.state,L=U.isTooltipActive,j=U.activeCoordinate,X=U.activePayload,K=U.activeLabel,G=U.offset,M=(O=B.props.active)!==null&&O!==void 0?O:L;return I.cloneElement(B,{viewBox:ae(ae({},G),{},{x:G.left,y:G.top}),active:M,label:K,payload:M?X:[],coordinate:j,accessibilityLayer:D})}),Ne(x,"renderBrush",function(O){var C=x.props,N=C.margin,D=C.data,B=x.state,U=B.offset,L=B.dataStartIndex,j=B.dataEndIndex,X=B.updateId;return I.cloneElement(O,{key:O.key||"_recharts-brush",onChange:ef(x.handleBrushChange,O.props.onChange),data:D,x:ge(O.props.x)?O.props.x:U.left,y:ge(O.props.y)?O.props.y:U.top+U.height+U.brushBottom-(N.bottom||0),width:ge(O.props.width)?O.props.width:U.width,startIndex:L,endIndex:j,updateId:"brush-".concat(X)})}),Ne(x,"renderReferenceElement",function(O,C,N){if(!O)return null;var D=x,B=D.clipPathId,U=x.state,L=U.xAxisMap,j=U.yAxisMap,X=U.offset,K=O.type.defaultProps||{},G=O.props,M=G.xAxisId,V=M===void 0?K.xAxisId:M,J=G.yAxisId,ee=J===void 0?K.yAxisId:J;return I.cloneElement(O,{key:O.key||"".concat(C,"-").concat(N),xAxis:L[V],yAxis:j[ee],viewBox:{x:X.left,y:X.top,width:X.width,height:X.height},clipPathId:B})}),Ne(x,"renderActivePoints",function(O){var C=O.item,N=O.activePoint,D=O.basePoint,B=O.childIndex,U=O.isRange,L=[],j=C.props.key,X=C.item.type.defaultProps!==void 0?ae(ae({},C.item.type.defaultProps),C.item.props):C.item.props,K=X.activeDot,G=X.dataKey,M=ae(ae({index:B,dataKey:G,cx:N.x,cy:N.y,r:4,fill:rx(C.item),strokeWidth:2,stroke:"#fff",payload:N.payload,value:N.value},Qe(K,!1)),yf(K));return L.push(E.renderActiveDot(K,M,"".concat(j,"-activePoint-").concat(B))),D?L.push(E.renderActiveDot(K,ae(ae({},M),{},{cx:D.x,cy:D.y}),"".concat(j,"-basePoint-").concat(B))):U&&L.push(null),L}),Ne(x,"renderGraphicChild",function(O,C,N){var D=x.filterFormatItem(O,C,N);if(!D)return null;var B=x.getTooltipEventType(),U=x.state,L=U.isTooltipActive,j=U.tooltipAxis,X=U.activeTooltipIndex,K=U.activeLabel,G=x.props.children,M=xr(G,tn),V=D.props,J=V.points,ee=V.isRange,F=V.baseLine,H=D.item.type.defaultProps!==void 0?ae(ae({},D.item.type.defaultProps),D.item.props):D.item.props,te=H.activeDot,we=H.hide,xe=H.activeBar,De=H.activeShape,Le=!!(!we&&L&&M&&(te||xe||De)),Me={};B!=="axis"&&M&&M.props.trigger==="click"?Me={onClick:ef(x.handleItemMouseEnter,O.props.onClick)}:B!=="axis"&&(Me={onMouseLeave:ef(x.handleItemMouseLeave,O.props.onMouseLeave),onMouseEnter:ef(x.handleItemMouseEnter,O.props.onMouseEnter)});var le=I.cloneElement(O,ae(ae({},D.props),Me));function pe(jt){return typeof j.dataKey=="function"?j.dataKey(jt.payload):null}if(Le)if(X>=0){var ve,ie;if(j.dataKey&&!j.allowDuplicatedCategory){var Fe=typeof j.dataKey=="function"?pe:"payload.".concat(j.dataKey.toString());ve=k0(J,Fe,K),ie=ee&&F&&k0(F,Fe,K)}else ve=J==null?void 0:J[X],ie=ee&&F&&F[X];if(De||xe){var de=O.props.activeIndex!==void 0?O.props.activeIndex:X;return[I.cloneElement(O,ae(ae(ae({},D.props),Me),{},{activeIndex:de})),null,null]}if(!Ke(ve))return[le].concat(os(x.renderActivePoints({item:D,activePoint:ve,basePoint:ie,childIndex:X,isRange:ee})))}else{var me,ne=(me=x.getItemByXY(x.state.activeCoordinate))!==null&&me!==void 0?me:{graphicalItem:le},it=ne.graphicalItem,kt=it.item,Rt=kt===void 0?O:kt,Bt=it.childIndex,rt=ae(ae(ae({},D.props),Me),{},{activeIndex:Bt});return[I.cloneElement(Rt,rt),null,null]}return ee?[le,null,null]:[le,null]}),Ne(x,"renderCustomized",function(O,C,N){return I.cloneElement(O,ae(ae({key:"recharts-customized-".concat(N)},x.props),x.state))}),Ne(x,"renderMap",{CartesianGrid:{handler:of,once:!0},ReferenceArea:{handler:x.renderReferenceElement},ReferenceLine:{handler:of},ReferenceDot:{handler:x.renderReferenceElement},XAxis:{handler:of},YAxis:{handler:of},Brush:{handler:x.renderBrush,once:!0},Bar:{handler:x.renderGraphicChild},Line:{handler:x.renderGraphicChild},Area:{handler:x.renderGraphicChild},Radar:{handler:x.renderGraphicChild},RadialBar:{handler:x.renderGraphicChild},Scatter:{handler:x.renderGraphicChild},Pie:{handler:x.renderGraphicChild},Funnel:{handler:x.renderGraphicChild},Tooltip:{handler:x.renderCursor,once:!0},PolarGrid:{handler:x.renderPolarGrid,once:!0},PolarAngleAxis:{handler:x.renderPolarAxis},PolarRadiusAxis:{handler:x.renderPolarAxis},Customized:{handler:x.renderCustomized}}),x.clipPathId="".concat((T=P.id)!==null&&T!==void 0?T:_d("recharts"),"-clip"),x.throttleTriggeredAfterMouseMove=Bj(x.triggeredAfterMouseMove,(A=P.throttleDelay)!==null&&A!==void 0?A:1e3/60),x.state={},x}return IK(E,b),RK(E,[{key:"componentDidMount",value:function(){var T,A;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(T=this.props.margin.left)!==null&&T!==void 0?T:0,top:(A=this.props.margin.top)!==null&&A!==void 0?A:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var T=this.props,A=T.children,x=T.data,O=T.height,C=T.layout,N=xr(A,tn);if(N){var D=N.props.defaultIndex;if(!(typeof D!="number"||D<0||D>this.state.tooltipTicks.length-1)){var B=this.state.tooltipTicks[D]&&this.state.tooltipTicks[D].value,U=qb(this.state,x,D,B),L=this.state.tooltipTicks[D].coordinate,j=(this.state.offset.top+O)/2,X=C==="horizontal",K=X?{x:L,y:j}:{y:L,x:j},G=this.state.formattedGraphicalItems.find(function(V){var J=V.item;return J.type.name==="Scatter"});G&&(K=ae(ae({},K),G.props.points[D].tooltipPosition),U=G.props.points[D].tooltipPayload);var M={activeTooltipIndex:D,isTooltipActive:!0,activeLabel:B,activePayload:U,activeCoordinate:K};this.setState(M),this.renderCursor(N),this.accessibilityManager.setIndex(D)}}}},{key:"getSnapshotBeforeUpdate",value:function(T,A){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==A.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==T.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==T.margin){var x,O;this.accessibilityManager.setDetails({offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0}})}return null}},{key:"componentDidUpdate",value:function(T){j0([xr(T.children,tn)],[xr(this.props.children,tn)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var T=xr(this.props.children,tn);if(T&&typeof T.props.shared=="boolean"){var A=T.props.shared?"axis":"item";return l.indexOf(A)>=0?A:a}return a}},{key:"getMouseInfo",value:function(T){if(!this.container)return null;var A=this.container,x=A.getBoundingClientRect(),O=gG(x),C={chartX:Math.round(T.pageX-O.left),chartY:Math.round(T.pageY-O.top)},N=x.width/A.offsetWidth||1,D=this.inRange(C.chartX,C.chartY,N);if(!D)return null;var B=this.state,U=B.xAxisMap,L=B.yAxisMap,j=this.getTooltipEventType(),X=uk(this.state,this.props.data,this.props.layout,D);if(j!=="axis"&&U&&L){var K=bo(U).scale,G=bo(L).scale,M=K&&K.invert?K.invert(C.chartX):null,V=G&&G.invert?G.invert(C.chartY):null;return ae(ae({},C),{},{xValue:M,yValue:V},X)}return X?ae(ae({},C),X):null}},{key:"inRange",value:function(T,A){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,O=this.props.layout,C=T/x,N=A/x;if(O==="horizontal"||O==="vertical"){var D=this.state.offset,B=C>=D.left&&C<=D.left+D.width&&N>=D.top&&N<=D.top+D.height;return B?{x:C,y:N}:null}var U=this.state,L=U.angleAxisMap,j=U.radiusAxisMap;if(L&&j){var X=bo(L);return CT({x:C,y:N},X)}return null}},{key:"parseEventsOfWrapper",value:function(){var T=this.props.children,A=this.getTooltipEventType(),x=xr(T,tn),O={};x&&A==="axis"&&(x.props.trigger==="click"?O={onClick:this.handleClick}:O={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var C=yf(this.props,this.handleOuterEvent);return ae(ae({},C),O)}},{key:"addListener",value:function(){Qy.on(Zy,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Qy.removeListener(Zy,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(T,A,x){for(var O=this.state.formattedGraphicalItems,C=0,N=O.length;C<N;C++){var D=O[C];if(D.item===T||D.props.key===T.key||A===ti(D.item.type)&&x===D.childIndex)return D}return null}},{key:"renderClipPath",value:function(){var T=this.clipPathId,A=this.state.offset,x=A.left,O=A.top,C=A.height,N=A.width;return Q.createElement("defs",null,Q.createElement("clipPath",{id:T},Q.createElement("rect",{x,y:O,height:C,width:N})))}},{key:"getXScales",value:function(){var T=this.state.xAxisMap;return T?Object.entries(T).reduce(function(A,x){var O=ak(x,2),C=O[0],N=O[1];return ae(ae({},A),{},Ne({},C,N.scale))},{}):null}},{key:"getYScales",value:function(){var T=this.state.yAxisMap;return T?Object.entries(T).reduce(function(A,x){var O=ak(x,2),C=O[0],N=O[1];return ae(ae({},A),{},Ne({},C,N.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(T){var A;return(A=this.state.xAxisMap)===null||A===void 0||(A=A[T])===null||A===void 0?void 0:A.scale}},{key:"getYScaleByAxisId",value:function(T){var A;return(A=this.state.yAxisMap)===null||A===void 0||(A=A[T])===null||A===void 0?void 0:A.scale}},{key:"getItemByXY",value:function(T){var A=this.state,x=A.formattedGraphicalItems,O=A.activeItem;if(x&&x.length)for(var C=0,N=x.length;C<N;C++){var D=x[C],B=D.props,U=D.item,L=U.type.defaultProps!==void 0?ae(ae({},U.type.defaultProps),U.props):U.props,j=ti(U.type);if(j==="Bar"){var X=(B.data||[]).find(function(V){return $H(T,V)});if(X)return{graphicalItem:D,payload:X}}else if(j==="RadialBar"){var K=(B.data||[]).find(function(V){return CT(T,V)});if(K)return{graphicalItem:D,payload:K}}else if(Gd(D,O)||Ud(D,O)||ll(D,O)){var G=T9({graphicalItem:D,activeTooltipItem:O,itemData:L.data}),M=L.activeIndex===void 0?G:L.activeIndex;return{graphicalItem:ae(ae({},D),{},{childIndex:M}),payload:ll(D,O)?L.data[G]:D.props.data[G]}}}return null}},{key:"render",value:function(){var T=this;if(!BE(this))return null;var A=this.props,x=A.children,O=A.className,C=A.width,N=A.height,D=A.style,B=A.compact,U=A.title,L=A.desc,j=ok(A,EK),X=Qe(j,!1);if(B)return Q.createElement(WC,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},Q.createElement(D0,So({},X,{width:C,height:N,title:U,desc:L}),this.renderClipPath(),GE(x,this.renderMap)));if(this.props.accessibilityLayer){var K,G;X.tabIndex=(K=this.props.tabIndex)!==null&&K!==void 0?K:0,X.role=(G=this.props.role)!==null&&G!==void 0?G:"application",X.onKeyDown=function(V){T.accessibilityManager.keyboardEvent(V)},X.onFocus=function(){T.accessibilityManager.focus()}}var M=this.parseEventsOfWrapper();return Q.createElement(WC,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},Q.createElement("div",So({className:Ve("recharts-wrapper",O),style:ae({position:"relative",cursor:"default",width:C,height:N},D)},M,{ref:function(J){T.container=J}}),Q.createElement(D0,So({},X,{width:C,height:N,title:U,desc:L,style:zK}),this.renderClipPath(),GE(x,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(I.Component);Ne(_,"displayName",r),Ne(_,"defaultProps",ae({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},h)),Ne(_,"getDerivedStateFromProps",function(b,E){var P=b.dataKey,T=b.data,A=b.children,x=b.width,O=b.height,C=b.layout,N=b.stackOffset,D=b.margin,B=E.dataStartIndex,U=E.dataEndIndex;if(E.updateId===void 0){var L=lk(b);return ae(ae(ae({},L),{},{updateId:0},g(ae(ae({props:b},L),{},{updateId:0}),E)),{},{prevDataKey:P,prevData:T,prevWidth:x,prevHeight:O,prevLayout:C,prevStackOffset:N,prevMargin:D,prevChildren:A})}if(P!==E.prevDataKey||T!==E.prevData||x!==E.prevWidth||O!==E.prevHeight||C!==E.prevLayout||N!==E.prevStackOffset||!_o(D,E.prevMargin)){var j=lk(b),X={chartX:E.chartX,chartY:E.chartY,isTooltipActive:E.isTooltipActive},K=ae(ae({},uk(E,T,C)),{},{updateId:E.updateId+1}),G=ae(ae(ae({},j),X),K);return ae(ae(ae({},G),g(ae({props:b},G),E)),{},{prevDataKey:P,prevData:T,prevWidth:x,prevHeight:O,prevLayout:C,prevStackOffset:N,prevMargin:D,prevChildren:A})}if(!j0(A,E.prevChildren)){var M,V,J,ee,F=xr(A,Qo),H=F&&(M=(V=F.props)===null||V===void 0?void 0:V.startIndex)!==null&&M!==void 0?M:B,te=F&&(J=(ee=F.props)===null||ee===void 0?void 0:ee.endIndex)!==null&&J!==void 0?J:U,we=H!==B||te!==U,xe=!Ke(T),De=xe&&!we?E.updateId:E.updateId+1;return ae(ae({updateId:De},g(ae(ae({props:b},E),{},{updateId:De,dataStartIndex:H,dataEndIndex:te}),E)),{},{prevChildren:A,dataStartIndex:H,dataEndIndex:te})}return null}),Ne(_,"renderActiveDot",function(b,E,P){var T;return I.isValidElement(b)?T=I.cloneElement(b,E):Ge(b)?T=b(E):T=Q.createElement(rN,E),Q.createElement($t,{className:"recharts-active-dot",key:P},T)});var w=I.forwardRef(function(E,P){return Q.createElement(_,So({},E,{ref:P}))});return w.displayName=_.displayName,w},fk=QK({chartName:"BarChart",GraphicalChild:ni,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:pl},{axisType:"yAxis",AxisComp:vl}],formatAxisMap:O7});function ZK(){var f,p;const t=kn(h=>h.workspace);console.log("[Dashboard] render workspace=",t);const{data:e,error:r,isLoading:n}=ln({queryKey:["status"],queryFn:FR}),{data:i,error:a,isLoading:s}=ln({queryKey:["telemetry",t],queryFn:()=>_F(t)});n&&console.log("[Dashboard] status loading..."),r&&console.error("[Dashboard] status error:",r),e&&console.log("[Dashboard] status:",e),s&&console.log("[Dashboard] telemetry loading..."),a&&console.error("[Dashboard] telemetry error:",a),i&&console.log("[Dashboard] telemetry:",i);const l=i!=null&&i.banditStats?Object.entries(i.banditStats).map(([h,m])=>(console.log("[Dashboard] bandit variant:",h,m),{variant:h,success:m.success,failure:m.failure})):[];console.log("[Dashboard] banditData:",l.length,"variants");const c=i!=null&&i.preferenceWeights?Object.entries(i.preferenceWeights).map(([h,m])=>(console.log("[Dashboard] preference:",h,"=",m),{category:h,weight:m})):[];return console.log("[Dashboard] weightData:",c.length,"categories"),R.jsxs("div",{className:"space-y-6",children:[R.jsxs("div",{children:[R.jsx("h1",{className:"text-2xl font-semibold",children:"System Dashboard"}),R.jsx("p",{className:"mt-1 text-sm text-[#8888a0]",children:"Live view of nano-brain health, indexing, and learning telemetry."})]}),R.jsxs("div",{className:"grid-cards",children:[R.jsxs("div",{className:"card p-4",children:[R.jsx("p",{className:"text-xs uppercase text-[#8888a0]",children:"Version"}),R.jsx("p",{className:"mt-2 text-2xl font-semibold",children:(e==null?void 0:e.version)??"—"})]}),R.jsxs("div",{className:"card p-4",children:[R.jsx("p",{className:"text-xs uppercase text-[#8888a0]",children:"Uptime"}),R.jsx("p",{className:"mt-2 text-2xl font-semibold",children:e?`${Math.floor(e.uptime/60)}m`:"—"})]}),R.jsxs("div",{className:"card p-4",children:[R.jsx("p",{className:"text-xs uppercase text-[#8888a0]",children:"Documents"}),R.jsx("p",{className:"mt-2 text-2xl font-semibold",children:(e==null?void 0:e.documents)??"—"})]}),R.jsxs("div",{className:"card p-4",children:[R.jsx("p",{className:"text-xs uppercase text-[#8888a0]",children:"Embeddings"}),R.jsx("p",{className:"mt-2 text-2xl font-semibold",children:(e==null?void 0:e.embeddings)??"—"})]})]}),R.jsxs("div",{className:"grid-dense",children:[R.jsxs("div",{className:"card col-span-7 p-4",children:[R.jsxs("div",{className:"flex items-center justify-between",children:[R.jsxs("div",{children:[R.jsx("h2",{className:"text-lg font-semibold",children:"Bandit Stats"}),R.jsx("p",{className:"text-xs text-[#8888a0]",children:"Success vs failure per variant."})]}),R.jsx("span",{className:"text-xs text-[#8888a0]",children:s?"loading":`${l.length} variants`})]}),R.jsx("div",{className:"mt-4 h-64",children:R.jsx(cP,{width:"100%",height:"100%",children:R.jsxs(fk,{data:l,margin:{top:10,right:10,left:-10,bottom:10},children:[R.jsx(pl,{dataKey:"variant",stroke:"#8888a0",fontSize:12}),R.jsx(vl,{stroke:"#8888a0",fontSize:12}),R.jsx(tn,{contentStyle:{background:"#111118",border:"1px solid #1f1f2c"}}),R.jsx(ni,{dataKey:"success",stackId:"a",fill:"#3b82f6",radius:[6,6,0,0]}),R.jsx(ni,{dataKey:"failure",stackId:"a",fill:"#f97316",radius:[6,6,0,0]})]})})})]}),R.jsxs("div",{className:"card col-span-5 p-4",children:[R.jsx("h2",{className:"text-lg font-semibold",children:"Expand Rate"}),R.jsx("p",{className:"text-xs text-[#8888a0]",children:"Queries that expanded into memory graph."}),R.jsxs("div",{className:"mt-6 flex items-end gap-3",children:[R.jsx("p",{className:"text-5xl font-semibold",children:i?`${Math.round(i.expandRate*100)}%`:"—"}),R.jsx("span",{className:"text-xs text-emerald-400",children:"+2.4% vs last window"})]}),R.jsxs("div",{className:"mt-6",children:[R.jsx("p",{className:"text-xs uppercase text-[#8888a0]",children:"Query volume"}),R.jsx("p",{className:"mt-1 text-xl font-semibold",children:(i==null?void 0:i.queryCount)??"—"})]}),R.jsxs("div",{className:"mt-4 grid grid-cols-2 gap-3 text-xs text-[#8888a0]",children:[R.jsxs("div",{children:[R.jsx("p",{children:"Importance mean"}),R.jsx("p",{className:"text-sm text-[#e4e4ed]",children:((f=i==null?void 0:i.importanceStats.mean)==null?void 0:f.toFixed(2))??"—"})]}),R.jsxs("div",{children:[R.jsx("p",{children:"Importance median"}),R.jsx("p",{className:"text-sm text-[#e4e4ed]",children:((p=i==null?void 0:i.importanceStats.median)==null?void 0:p.toFixed(2))??"—"})]})]})]})]}),R.jsxs("div",{className:"card p-4",children:[R.jsxs("div",{className:"flex items-center justify-between",children:[R.jsxs("div",{children:[R.jsx("h2",{className:"text-lg font-semibold",children:"Preference Weights"}),R.jsx("p",{className:"text-xs text-[#8888a0]",children:"Current category weighting in ranking model."})]}),R.jsxs("span",{className:"text-xs text-[#8888a0]",children:[c.length," categories"]})]}),R.jsx("div",{className:"mt-4 h-64",children:R.jsx(cP,{width:"100%",height:"100%",children:R.jsxs(fk,{data:c,layout:"vertical",margin:{top:10,right:10,left:60,bottom:10},children:[R.jsx(pl,{type:"number",stroke:"#8888a0",fontSize:12}),R.jsx(vl,{dataKey:"category",type:"category",stroke:"#8888a0",fontSize:12,width:120}),R.jsx(tn,{contentStyle:{background:"#111118",border:"1px solid #1f1f2c"}}),R.jsx(ni,{dataKey:"weight",fill:"#8b5cf6",radius:[0,6,6,0]})]})})})]})]})}var sf={exports:{}},dk;function JK(){if(dk)return sf.exports;dk=1;var t=typeof Reflect=="object"?Reflect:null,e=t&&typeof t.apply=="function"?t.apply:function(x,O,C){return Function.prototype.apply.call(x,O,C)},r;t&&typeof t.ownKeys=="function"?r=t.ownKeys:Object.getOwnPropertySymbols?r=function(x){return Object.getOwnPropertyNames(x).concat(Object.getOwnPropertySymbols(x))}:r=function(x){return Object.getOwnPropertyNames(x)};function n(A){console&&console.warn&&console.warn(A)}var i=Number.isNaN||function(x){return x!==x};function a(){a.init.call(this)}sf.exports=a,sf.exports.once=E,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function l(A){if(typeof A!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof A)}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(A){if(typeof A!="number"||A<0||i(A))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+A+".");s=A}}),a.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(x){if(typeof x!="number"||x<0||i(x))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+x+".");return this._maxListeners=x,this};function c(A){return A._maxListeners===void 0?a.defaultMaxListeners:A._maxListeners}a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(x){for(var O=[],C=1;C<arguments.length;C++)O.push(arguments[C]);var N=x==="error",D=this._events;if(D!==void 0)N=N&&D.error===void 0;else if(!N)return!1;if(N){var B;if(O.length>0&&(B=O[0]),B instanceof Error)throw B;var U=new Error("Unhandled error."+(B?" ("+B.message+")":""));throw U.context=B,U}var L=D[x];if(L===void 0)return!1;if(typeof L=="function")e(L,this,O);else for(var j=L.length,X=_(L,j),C=0;C<j;++C)e(X[C],this,O);return!0};function f(A,x,O,C){var N,D,B;if(l(O),D=A._events,D===void 0?(D=A._events=Object.create(null),A._eventsCount=0):(D.newListener!==void 0&&(A.emit("newListener",x,O.listener?O.listener:O),D=A._events),B=D[x]),B===void 0)B=D[x]=O,++A._eventsCount;else if(typeof B=="function"?B=D[x]=C?[O,B]:[B,O]:C?B.unshift(O):B.push(O),N=c(A),N>0&&B.length>N&&!B.warned){B.warned=!0;var U=new Error("Possible EventEmitter memory leak detected. "+B.length+" "+String(x)+" listeners added. Use emitter.setMaxListeners() to increase limit");U.name="MaxListenersExceededWarning",U.emitter=A,U.type=x,U.count=B.length,n(U)}return A}a.prototype.addListener=function(x,O){return f(this,x,O,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(x,O){return f(this,x,O,!0)};function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(A,x,O){var C={fired:!1,wrapFn:void 0,target:A,type:x,listener:O},N=p.bind(C);return N.listener=O,C.wrapFn=N,N}a.prototype.once=function(x,O){return l(O),this.on(x,h(this,x,O)),this},a.prototype.prependOnceListener=function(x,O){return l(O),this.prependListener(x,h(this,x,O)),this},a.prototype.removeListener=function(x,O){var C,N,D,B,U;if(l(O),N=this._events,N===void 0)return this;if(C=N[x],C===void 0)return this;if(C===O||C.listener===O)--this._eventsCount===0?this._events=Object.create(null):(delete N[x],N.removeListener&&this.emit("removeListener",x,C.listener||O));else if(typeof C!="function"){for(D=-1,B=C.length-1;B>=0;B--)if(C[B]===O||C[B].listener===O){U=C[B].listener,D=B;break}if(D<0)return this;D===0?C.shift():w(C,D),C.length===1&&(N[x]=C[0]),N.removeListener!==void 0&&this.emit("removeListener",x,U||O)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(x){var O,C,N;if(C=this._events,C===void 0)return this;if(C.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):C[x]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete C[x]),this;if(arguments.length===0){var D=Object.keys(C),B;for(N=0;N<D.length;++N)B=D[N],B!=="removeListener"&&this.removeAllListeners(B);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(O=C[x],typeof O=="function")this.removeListener(x,O);else if(O!==void 0)for(N=O.length-1;N>=0;N--)this.removeListener(x,O[N]);return this};function m(A,x,O){var C=A._events;if(C===void 0)return[];var N=C[x];return N===void 0?[]:typeof N=="function"?O?[N.listener||N]:[N]:O?b(N):_(N,N.length)}a.prototype.listeners=function(x){return m(this,x,!0)},a.prototype.rawListeners=function(x){return m(this,x,!1)},a.listenerCount=function(A,x){return typeof A.listenerCount=="function"?A.listenerCount(x):g.call(A,x)},a.prototype.listenerCount=g;function g(A){var x=this._events;if(x!==void 0){var O=x[A];if(typeof O=="function")return 1;if(O!==void 0)return O.length}return 0}a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]};function _(A,x){for(var O=new Array(x),C=0;C<x;++C)O[C]=A[C];return O}function w(A,x){for(;x+1<A.length;x++)A[x]=A[x+1];A.pop()}function b(A){for(var x=new Array(A.length),O=0;O<x.length;++O)x[O]=A[O].listener||A[O];return x}function E(A,x){return new Promise(function(O,C){function N(B){A.removeListener(x,D),C(B)}function D(){typeof A.removeListener=="function"&&A.removeListener("error",N),O([].slice.call(arguments))}T(A,x,D,{once:!0}),x!=="error"&&P(A,N,{once:!0})})}function P(A,x,O){typeof A.on=="function"&&T(A,"error",x,O)}function T(A,x,O,C){if(typeof A.on=="function")C.once?A.once(x,O):A.on(x,O);else if(typeof A.addEventListener=="function")A.addEventListener(x,function N(D){C.once&&A.removeEventListener(x,N),O(D)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof A)}return sf.exports}var WN=JK();function eX(){const t=arguments[0];for(let e=1,r=arguments.length;e<r;e++)if(arguments[e])for(const n in arguments[e])t[n]=arguments[e][n];return t}let Pt=eX;typeof Object.assign=="function"&&(Pt=Object.assign);function Fr(t,e,r,n){const i=t._nodes.get(e);let a=null;return i&&(n==="mixed"?a=i.out&&i.out[r]||i.undirected&&i.undirected[r]:n==="directed"?a=i.out&&i.out[r]:a=i.undirected&&i.undirected[r]),a}function Wt(t){return typeof t=="object"&&t!==null}function HN(t){let e;for(e in t)return!1;return!0}function Dr(t,e,r){Object.defineProperty(t,e,{enumerable:!1,configurable:!1,writable:!0,value:r})}function Zr(t,e,r){const n={enumerable:!0,configurable:!0};typeof r=="function"?n.get=r:(n.value=r,n.writable=!1),Object.defineProperty(t,e,n)}function hk(t){return!(!Wt(t)||t.attributes&&!Array.isArray(t.attributes))}function tX(){let t=Math.floor(Math.random()*256)&255;return()=>t++}function ii(){const t=arguments;let e=null,r=-1;return{[Symbol.iterator](){return this},next(){let n=null;do{if(e===null){if(r++,r>=t.length)return{done:!0};e=t[r][Symbol.iterator]()}if(n=e.next(),n.done){e=null;continue}break}while(!0);return n}}}function ys(){return{[Symbol.iterator](){return this},next(){return{done:!0}}}}class ux extends Error{constructor(e){super(),this.name="GraphError",this.message=e}}class ye extends ux{constructor(e){super(e),this.name="InvalidArgumentsGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ye.prototype.constructor)}}class he extends ux{constructor(e){super(e),this.name="NotFoundGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,he.prototype.constructor)}}class je extends ux{constructor(e){super(e),this.name="UsageGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,je.prototype.constructor)}}function VN(t,e){this.key=t,this.attributes=e,this.clear()}VN.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}};function KN(t,e){this.key=t,this.attributes=e,this.clear()}KN.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}};function XN(t,e){this.key=t,this.attributes=e,this.clear()}XN.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}};function bs(t,e,r,n,i){this.key=e,this.attributes=i,this.undirected=t,this.source=r,this.target=n}bs.prototype.attach=function(){let t="out",e="in";this.undirected&&(t=e="undirected");const r=this.source.key,n=this.target.key;this.source[t][n]=this,!(this.undirected&&r===n)&&(this.target[e][r]=this)};bs.prototype.attachMulti=function(){let t="out",e="in";const r=this.source.key,n=this.target.key;this.undirected&&(t=e="undirected");const i=this.source[t],a=i[n];if(typeof a>"u"){i[n]=this,this.undirected&&r===n||(this.target[e][r]=this);return}a.previous=this,this.next=a,i[n]=this,this.target[e][r]=this};bs.prototype.detach=function(){const t=this.source.key,e=this.target.key;let r="out",n="in";this.undirected&&(r=n="undirected"),delete this.source[r][e],delete this.target[n][t]};bs.prototype.detachMulti=function(){const t=this.source.key,e=this.target.key;let r="out",n="in";this.undirected&&(r=n="undirected"),this.previous===void 0?this.next===void 0?(delete this.source[r][e],delete this.target[n][t]):(this.next.previous=void 0,this.source[r][e]=this.next,this.target[n][t]=this.next):(this.previous.next=this.next,this.next!==void 0&&(this.next.previous=this.previous))};const YN=0,QN=1,rX=2,ZN=3;function hi(t,e,r,n,i,a,s){let l,c,f,p;if(n=""+n,r===YN){if(l=t._nodes.get(n),!l)throw new he(`Graph.${e}: could not find the "${n}" node in the graph.`);f=i,p=a}else if(r===ZN){if(i=""+i,c=t._edges.get(i),!c)throw new he(`Graph.${e}: could not find the "${i}" edge in the graph.`);const h=c.source.key,m=c.target.key;if(n===h)l=c.target;else if(n===m)l=c.source;else throw new he(`Graph.${e}: the "${n}" node is not attached to the "${i}" edge (${h}, ${m}).`);f=a,p=s}else{if(c=t._edges.get(n),!c)throw new he(`Graph.${e}: could not find the "${n}" edge in the graph.`);r===QN?l=c.source:l=c.target,f=i,p=a}return[l,f,p]}function nX(t,e,r){t.prototype[e]=function(n,i,a){const[s,l]=hi(this,e,r,n,i,a);return s.attributes[l]}}function iX(t,e,r){t.prototype[e]=function(n,i){const[a]=hi(this,e,r,n,i);return a.attributes}}function aX(t,e,r){t.prototype[e]=function(n,i,a){const[s,l]=hi(this,e,r,n,i,a);return s.attributes.hasOwnProperty(l)}}function oX(t,e,r){t.prototype[e]=function(n,i,a,s){const[l,c,f]=hi(this,e,r,n,i,a,s);return l.attributes[c]=f,this.emit("nodeAttributesUpdated",{key:l.key,type:"set",attributes:l.attributes,name:c}),this}}function sX(t,e,r){t.prototype[e]=function(n,i,a,s){const[l,c,f]=hi(this,e,r,n,i,a,s);if(typeof f!="function")throw new ye(`Graph.${e}: updater should be a function.`);const p=l.attributes,h=f(p[c]);return p[c]=h,this.emit("nodeAttributesUpdated",{key:l.key,type:"set",attributes:l.attributes,name:c}),this}}function uX(t,e,r){t.prototype[e]=function(n,i,a){const[s,l]=hi(this,e,r,n,i,a);return delete s.attributes[l],this.emit("nodeAttributesUpdated",{key:s.key,type:"remove",attributes:s.attributes,name:l}),this}}function lX(t,e,r){t.prototype[e]=function(n,i,a){const[s,l]=hi(this,e,r,n,i,a);if(!Wt(l))throw new ye(`Graph.${e}: provided attributes are not a plain object.`);return s.attributes=l,this.emit("nodeAttributesUpdated",{key:s.key,type:"replace",attributes:s.attributes}),this}}function cX(t,e,r){t.prototype[e]=function(n,i,a){const[s,l]=hi(this,e,r,n,i,a);if(!Wt(l))throw new ye(`Graph.${e}: provided attributes are not a plain object.`);return Pt(s.attributes,l),this.emit("nodeAttributesUpdated",{key:s.key,type:"merge",attributes:s.attributes,data:l}),this}}function fX(t,e,r){t.prototype[e]=function(n,i,a){const[s,l]=hi(this,e,r,n,i,a);if(typeof l!="function")throw new ye(`Graph.${e}: provided updater is not a function.`);return s.attributes=l(s.attributes),this.emit("nodeAttributesUpdated",{key:s.key,type:"update",attributes:s.attributes}),this}}const dX=[{name:t=>`get${t}Attribute`,attacher:nX},{name:t=>`get${t}Attributes`,attacher:iX},{name:t=>`has${t}Attribute`,attacher:aX},{name:t=>`set${t}Attribute`,attacher:oX},{name:t=>`update${t}Attribute`,attacher:sX},{name:t=>`remove${t}Attribute`,attacher:uX},{name:t=>`replace${t}Attributes`,attacher:lX},{name:t=>`merge${t}Attributes`,attacher:cX},{name:t=>`update${t}Attributes`,attacher:fX}];function hX(t){dX.forEach(function({name:e,attacher:r}){r(t,e("Node"),YN),r(t,e("Source"),QN),r(t,e("Target"),rX),r(t,e("Opposite"),ZN)})}function pX(t,e,r){t.prototype[e]=function(n,i){let a;if(this.type!=="mixed"&&r!=="mixed"&&r!==this.type)throw new je(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new je(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+n,l=""+i;if(i=arguments[2],a=Fr(this,s,l,r),!a)throw new he(`Graph.${e}: could not find an edge for the given path ("${s}" - "${l}").`)}else{if(r!=="mixed")throw new je(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(n=""+n,a=this._edges.get(n),!a)throw new he(`Graph.${e}: could not find the "${n}" edge in the graph.`)}return a.attributes[i]}}function vX(t,e,r){t.prototype[e]=function(n){let i;if(this.type!=="mixed"&&r!=="mixed"&&r!==this.type)throw new je(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>1){if(this.multi)throw new je(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const a=""+n,s=""+arguments[1];if(i=Fr(this,a,s,r),!i)throw new he(`Graph.${e}: could not find an edge for the given path ("${a}" - "${s}").`)}else{if(r!=="mixed")throw new je(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(n=""+n,i=this._edges.get(n),!i)throw new he(`Graph.${e}: could not find the "${n}" edge in the graph.`)}return i.attributes}}function mX(t,e,r){t.prototype[e]=function(n,i){let a;if(this.type!=="mixed"&&r!=="mixed"&&r!==this.type)throw new je(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new je(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+n,l=""+i;if(i=arguments[2],a=Fr(this,s,l,r),!a)throw new he(`Graph.${e}: could not find an edge for the given path ("${s}" - "${l}").`)}else{if(r!=="mixed")throw new je(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(n=""+n,a=this._edges.get(n),!a)throw new he(`Graph.${e}: could not find the "${n}" edge in the graph.`)}return a.attributes.hasOwnProperty(i)}}function gX(t,e,r){t.prototype[e]=function(n,i,a){let s;if(this.type!=="mixed"&&r!=="mixed"&&r!==this.type)throw new je(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new je(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const l=""+n,c=""+i;if(i=arguments[2],a=arguments[3],s=Fr(this,l,c,r),!s)throw new he(`Graph.${e}: could not find an edge for the given path ("${l}" - "${c}").`)}else{if(r!=="mixed")throw new je(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(n=""+n,s=this._edges.get(n),!s)throw new he(`Graph.${e}: could not find the "${n}" edge in the graph.`)}return s.attributes[i]=a,this.emit("edgeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:i}),this}}function yX(t,e,r){t.prototype[e]=function(n,i,a){let s;if(this.type!=="mixed"&&r!=="mixed"&&r!==this.type)throw new je(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new je(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const l=""+n,c=""+i;if(i=arguments[2],a=arguments[3],s=Fr(this,l,c,r),!s)throw new he(`Graph.${e}: could not find an edge for the given path ("${l}" - "${c}").`)}else{if(r!=="mixed")throw new je(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(n=""+n,s=this._edges.get(n),!s)throw new he(`Graph.${e}: could not find the "${n}" edge in the graph.`)}if(typeof a!="function")throw new ye(`Graph.${e}: updater should be a function.`);return s.attributes[i]=a(s.attributes[i]),this.emit("edgeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:i}),this}}function bX(t,e,r){t.prototype[e]=function(n,i){let a;if(this.type!=="mixed"&&r!=="mixed"&&r!==this.type)throw new je(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new je(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+n,l=""+i;if(i=arguments[2],a=Fr(this,s,l,r),!a)throw new he(`Graph.${e}: could not find an edge for the given path ("${s}" - "${l}").`)}else{if(r!=="mixed")throw new je(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(n=""+n,a=this._edges.get(n),!a)throw new he(`Graph.${e}: could not find the "${n}" edge in the graph.`)}return delete a.attributes[i],this.emit("edgeAttributesUpdated",{key:a.key,type:"remove",attributes:a.attributes,name:i}),this}}function wX(t,e,r){t.prototype[e]=function(n,i){let a;if(this.type!=="mixed"&&r!=="mixed"&&r!==this.type)throw new je(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new je(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+n,l=""+i;if(i=arguments[2],a=Fr(this,s,l,r),!a)throw new he(`Graph.${e}: could not find an edge for the given path ("${s}" - "${l}").`)}else{if(r!=="mixed")throw new je(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(n=""+n,a=this._edges.get(n),!a)throw new he(`Graph.${e}: could not find the "${n}" edge in the graph.`)}if(!Wt(i))throw new ye(`Graph.${e}: provided attributes are not a plain object.`);return a.attributes=i,this.emit("edgeAttributesUpdated",{key:a.key,type:"replace",attributes:a.attributes}),this}}function xX(t,e,r){t.prototype[e]=function(n,i){let a;if(this.type!=="mixed"&&r!=="mixed"&&r!==this.type)throw new je(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new je(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+n,l=""+i;if(i=arguments[2],a=Fr(this,s,l,r),!a)throw new he(`Graph.${e}: could not find an edge for the given path ("${s}" - "${l}").`)}else{if(r!=="mixed")throw new je(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(n=""+n,a=this._edges.get(n),!a)throw new he(`Graph.${e}: could not find the "${n}" edge in the graph.`)}if(!Wt(i))throw new ye(`Graph.${e}: provided attributes are not a plain object.`);return Pt(a.attributes,i),this.emit("edgeAttributesUpdated",{key:a.key,type:"merge",attributes:a.attributes,data:i}),this}}function SX(t,e,r){t.prototype[e]=function(n,i){let a;if(this.type!=="mixed"&&r!=="mixed"&&r!==this.type)throw new je(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new je(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+n,l=""+i;if(i=arguments[2],a=Fr(this,s,l,r),!a)throw new he(`Graph.${e}: could not find an edge for the given path ("${s}" - "${l}").`)}else{if(r!=="mixed")throw new je(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(n=""+n,a=this._edges.get(n),!a)throw new he(`Graph.${e}: could not find the "${n}" edge in the graph.`)}if(typeof i!="function")throw new ye(`Graph.${e}: provided updater is not a function.`);return a.attributes=i(a.attributes),this.emit("edgeAttributesUpdated",{key:a.key,type:"update",attributes:a.attributes}),this}}const _X=[{name:t=>`get${t}Attribute`,attacher:pX},{name:t=>`get${t}Attributes`,attacher:vX},{name:t=>`has${t}Attribute`,attacher:mX},{name:t=>`set${t}Attribute`,attacher:gX},{name:t=>`update${t}Attribute`,attacher:yX},{name:t=>`remove${t}Attribute`,attacher:bX},{name:t=>`replace${t}Attributes`,attacher:wX},{name:t=>`merge${t}Attributes`,attacher:xX},{name:t=>`update${t}Attributes`,attacher:SX}];function EX(t){_X.forEach(function({name:e,attacher:r}){r(t,e("Edge"),"mixed"),r(t,e("DirectedEdge"),"directed"),r(t,e("UndirectedEdge"),"undirected")})}const OX=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function AX(t,e,r,n){let i=!1;for(const a in e){if(a===n)continue;const s=e[a];if(i=r(s.key,s.attributes,s.source.key,s.target.key,s.source.attributes,s.target.attributes,s.undirected),t&&i)return s.key}}function PX(t,e,r,n){let i,a,s,l=!1;for(const c in e)if(c!==n){i=e[c];do{if(a=i.source,s=i.target,l=r(i.key,i.attributes,a.key,s.key,a.attributes,s.attributes,i.undirected),t&&l)return i.key;i=i.next}while(i!==void 0)}}function e0(t,e){const r=Object.keys(t),n=r.length;let i,a=0;return{[Symbol.iterator](){return this},next(){do if(i)i=i.next;else{if(a>=n)return{done:!0};const s=r[a++];if(s===e){i=void 0;continue}i=t[s]}while(!i);return{done:!1,value:{edge:i.key,attributes:i.attributes,source:i.source.key,target:i.target.key,sourceAttributes:i.source.attributes,targetAttributes:i.target.attributes,undirected:i.undirected}}}}}function TX(t,e,r,n){const i=e[r];if(!i)return;const a=i.source,s=i.target;if(n(i.key,i.attributes,a.key,s.key,a.attributes,s.attributes,i.undirected)&&t)return i.key}function CX(t,e,r,n){let i=e[r];if(!i)return;let a=!1;do{if(a=n(i.key,i.attributes,i.source.key,i.target.key,i.source.attributes,i.target.attributes,i.undirected),t&&a)return i.key;i=i.next}while(i!==void 0)}function t0(t,e){let r=t[e];if(r.next!==void 0)return{[Symbol.iterator](){return this},next(){if(!r)return{done:!0};const i={edge:r.key,attributes:r.attributes,source:r.source.key,target:r.target.key,sourceAttributes:r.source.attributes,targetAttributes:r.target.attributes,undirected:r.undirected};return r=r.next,{done:!1,value:i}}};let n=!1;return{[Symbol.iterator](){return this},next(){return n===!0?{done:!0}:(n=!0,{done:!1,value:{edge:r.key,attributes:r.attributes,source:r.source.key,target:r.target.key,sourceAttributes:r.source.attributes,targetAttributes:r.target.attributes,undirected:r.undirected}})}}}function kX(t,e){if(t.size===0)return[];if(e==="mixed"||e===t.type)return Array.from(t._edges.keys());const r=e==="undirected"?t.undirectedSize:t.directedSize,n=new Array(r),i=e==="undirected",a=t._edges.values();let s=0,l,c;for(;l=a.next(),l.done!==!0;)c=l.value,c.undirected===i&&(n[s++]=c.key);return n}function JN(t,e,r,n){if(e.size===0)return;const i=r!=="mixed"&&r!==e.type,a=r==="undirected";let s,l,c=!1;const f=e._edges.values();for(;s=f.next(),s.done!==!0;){if(l=s.value,i&&l.undirected!==a)continue;const{key:p,attributes:h,source:m,target:g}=l;if(c=n(p,h,m.key,g.key,m.attributes,g.attributes,l.undirected),t&&c)return p}}function RX(t,e){if(t.size===0)return ys();const r=e!=="mixed"&&e!==t.type,n=e==="undirected",i=t._edges.values();return{[Symbol.iterator](){return this},next(){let a,s;for(;;){if(a=i.next(),a.done)return a;if(s=a.value,!(r&&s.undirected!==n))break}return{value:{edge:s.key,attributes:s.attributes,source:s.source.key,target:s.target.key,sourceAttributes:s.source.attributes,targetAttributes:s.target.attributes,undirected:s.undirected},done:!1}}}}function lx(t,e,r,n,i,a){const s=e?PX:AX;let l;if(r!=="undirected"&&(n!=="out"&&(l=s(t,i.in,a),t&&l)||n!=="in"&&(l=s(t,i.out,a,n?void 0:i.key),t&&l))||r!=="directed"&&(l=s(t,i.undirected,a),t&&l))return l}function jX(t,e,r,n){const i=[];return lx(!1,t,e,r,n,function(a){i.push(a)}),i}function NX(t,e,r){let n=ys();return t!=="undirected"&&(e!=="out"&&typeof r.in<"u"&&(n=ii(n,e0(r.in))),e!=="in"&&typeof r.out<"u"&&(n=ii(n,e0(r.out,e?void 0:r.key)))),t!=="directed"&&typeof r.undirected<"u"&&(n=ii(n,e0(r.undirected))),n}function cx(t,e,r,n,i,a,s){const l=r?CX:TX;let c;if(e!=="undirected"&&(typeof i.in<"u"&&n!=="out"&&(c=l(t,i.in,a,s),t&&c)||typeof i.out<"u"&&n!=="in"&&(n||i.key!==a)&&(c=l(t,i.out,a,s),t&&c))||e!=="directed"&&typeof i.undirected<"u"&&(c=l(t,i.undirected,a,s),t&&c))return c}function DX(t,e,r,n,i){const a=[];return cx(!1,t,e,r,n,i,function(s){a.push(s)}),a}function IX(t,e,r,n){let i=ys();return t!=="undirected"&&(typeof r.in<"u"&&e!=="out"&&n in r.in&&(i=ii(i,t0(r.in,n))),typeof r.out<"u"&&e!=="in"&&n in r.out&&(e||r.key!==n)&&(i=ii(i,t0(r.out,n)))),t!=="directed"&&typeof r.undirected<"u"&&n in r.undirected&&(i=ii(i,t0(r.undirected,n))),i}function MX(t,e){const{name:r,type:n,direction:i}=e;t.prototype[r]=function(a,s){if(n!=="mixed"&&this.type!=="mixed"&&n!==this.type)return[];if(!arguments.length)return kX(this,n);if(arguments.length===1){a=""+a;const l=this._nodes.get(a);if(typeof l>"u")throw new he(`Graph.${r}: could not find the "${a}" node in the graph.`);return jX(this.multi,n==="mixed"?this.type:n,i,l)}if(arguments.length===2){a=""+a,s=""+s;const l=this._nodes.get(a);if(!l)throw new he(`Graph.${r}: could not find the "${a}" source node in the graph.`);if(!this._nodes.has(s))throw new he(`Graph.${r}: could not find the "${s}" target node in the graph.`);return DX(n,this.multi,i,l,s)}throw new ye(`Graph.${r}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function LX(t,e){const{name:r,type:n,direction:i}=e,a="forEach"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[a]=function(f,p,h){if(!(n!=="mixed"&&this.type!=="mixed"&&n!==this.type)){if(arguments.length===1)return h=f,JN(!1,this,n,h);if(arguments.length===2){f=""+f,h=p;const m=this._nodes.get(f);if(typeof m>"u")throw new he(`Graph.${a}: could not find the "${f}" node in the graph.`);return lx(!1,this.multi,n==="mixed"?this.type:n,i,m,h)}if(arguments.length===3){f=""+f,p=""+p;const m=this._nodes.get(f);if(!m)throw new he(`Graph.${a}: could not find the "${f}" source node in the graph.`);if(!this._nodes.has(p))throw new he(`Graph.${a}: could not find the "${p}" target node in the graph.`);return cx(!1,n,this.multi,i,m,p,h)}throw new ye(`Graph.${a}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)}};const s="map"+r[0].toUpperCase()+r.slice(1);t.prototype[s]=function(){const f=Array.prototype.slice.call(arguments),p=f.pop();let h;if(f.length===0){let m=0;n!=="directed"&&(m+=this.undirectedSize),n!=="undirected"&&(m+=this.directedSize),h=new Array(m);let g=0;f.push((_,w,b,E,P,T,A)=>{h[g++]=p(_,w,b,E,P,T,A)})}else h=[],f.push((m,g,_,w,b,E,P)=>{h.push(p(m,g,_,w,b,E,P))});return this[a].apply(this,f),h};const l="filter"+r[0].toUpperCase()+r.slice(1);t.prototype[l]=function(){const f=Array.prototype.slice.call(arguments),p=f.pop(),h=[];return f.push((m,g,_,w,b,E,P)=>{p(m,g,_,w,b,E,P)&&h.push(m)}),this[a].apply(this,f),h};const c="reduce"+r[0].toUpperCase()+r.slice(1);t.prototype[c]=function(){let f=Array.prototype.slice.call(arguments);if(f.length<2||f.length>4)throw new ye(`Graph.${c}: invalid number of arguments (expecting 2, 3 or 4 and got ${f.length}).`);if(typeof f[f.length-1]=="function"&&typeof f[f.length-2]!="function")throw new ye(`Graph.${c}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let p,h;f.length===2?(p=f[0],h=f[1],f=[]):f.length===3?(p=f[1],h=f[2],f=[f[0]]):f.length===4&&(p=f[2],h=f[3],f=[f[0],f[1]]);let m=h;return f.push((g,_,w,b,E,P,T)=>{m=p(m,g,_,w,b,E,P,T)}),this[a].apply(this,f),m}}function $X(t,e){const{name:r,type:n,direction:i}=e,a="find"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[a]=function(c,f,p){if(n!=="mixed"&&this.type!=="mixed"&&n!==this.type)return!1;if(arguments.length===1)return p=c,JN(!0,this,n,p);if(arguments.length===2){c=""+c,p=f;const h=this._nodes.get(c);if(typeof h>"u")throw new he(`Graph.${a}: could not find the "${c}" node in the graph.`);return lx(!0,this.multi,n==="mixed"?this.type:n,i,h,p)}if(arguments.length===3){c=""+c,f=""+f;const h=this._nodes.get(c);if(!h)throw new he(`Graph.${a}: could not find the "${c}" source node in the graph.`);if(!this._nodes.has(f))throw new he(`Graph.${a}: could not find the "${f}" target node in the graph.`);return cx(!0,n,this.multi,i,h,f,p)}throw new ye(`Graph.${a}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)};const s="some"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[s]=function(){const c=Array.prototype.slice.call(arguments),f=c.pop();return c.push((h,m,g,_,w,b,E)=>f(h,m,g,_,w,b,E)),!!this[a].apply(this,c)};const l="every"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[l]=function(){const c=Array.prototype.slice.call(arguments),f=c.pop();return c.push((h,m,g,_,w,b,E)=>!f(h,m,g,_,w,b,E)),!this[a].apply(this,c)}}function FX(t,e){const{name:r,type:n,direction:i}=e,a=r.slice(0,-1)+"Entries";t.prototype[a]=function(s,l){if(n!=="mixed"&&this.type!=="mixed"&&n!==this.type)return ys();if(!arguments.length)return RX(this,n);if(arguments.length===1){s=""+s;const c=this._nodes.get(s);if(!c)throw new he(`Graph.${a}: could not find the "${s}" node in the graph.`);return NX(n,i,c)}if(arguments.length===2){s=""+s,l=""+l;const c=this._nodes.get(s);if(!c)throw new he(`Graph.${a}: could not find the "${s}" source node in the graph.`);if(!this._nodes.has(l))throw new he(`Graph.${a}: could not find the "${l}" target node in the graph.`);return IX(n,i,c,l)}throw new ye(`Graph.${a}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function BX(t){OX.forEach(e=>{MX(t,e),LX(t,e),$X(t,e),FX(t,e)})}const zX=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function Qd(){this.A=null,this.B=null}Qd.prototype.wrap=function(t){this.A===null?this.A=t:this.B===null&&(this.B=t)};Qd.prototype.has=function(t){return this.A!==null&&t in this.A||this.B!==null&&t in this.B};function pu(t,e,r,n,i){for(const a in n){const s=n[a],l=s.source,c=s.target,f=l===r?c:l;if(e&&e.has(f.key))continue;const p=i(f.key,f.attributes);if(t&&p)return f.key}}function fx(t,e,r,n,i){if(e!=="mixed"){if(e==="undirected")return pu(t,null,n,n.undirected,i);if(typeof r=="string")return pu(t,null,n,n[r],i)}const a=new Qd;let s;if(e!=="undirected"){if(r!=="out"){if(s=pu(t,null,n,n.in,i),t&&s)return s;a.wrap(n.in)}if(r!=="in"){if(s=pu(t,a,n,n.out,i),t&&s)return s;a.wrap(n.out)}}if(e!=="directed"&&(s=pu(t,a,n,n.undirected,i),t&&s))return s}function GX(t,e,r){if(t!=="mixed"){if(t==="undirected")return Object.keys(r.undirected);if(typeof e=="string")return Object.keys(r[e])}const n=[];return fx(!1,t,e,r,function(i){n.push(i)}),n}function vu(t,e,r){const n=Object.keys(r),i=n.length;let a=0;return{[Symbol.iterator](){return this},next(){let s=null;do{if(a>=i)return t&&t.wrap(r),{done:!0};const l=r[n[a++]],c=l.source,f=l.target;if(s=c===e?f:c,t&&t.has(s.key)){s=null;continue}}while(s===null);return{done:!1,value:{neighbor:s.key,attributes:s.attributes}}}}}function UX(t,e,r){if(t!=="mixed"){if(t==="undirected")return vu(null,r,r.undirected);if(typeof e=="string")return vu(null,r,r[e])}let n=ys();const i=new Qd;return t!=="undirected"&&(e!=="out"&&(n=ii(n,vu(i,r,r.in))),e!=="in"&&(n=ii(n,vu(i,r,r.out)))),t!=="directed"&&(n=ii(n,vu(i,r,r.undirected))),n}function qX(t,e){const{name:r,type:n,direction:i}=e;t.prototype[r]=function(a){if(n!=="mixed"&&this.type!=="mixed"&&n!==this.type)return[];a=""+a;const s=this._nodes.get(a);if(typeof s>"u")throw new he(`Graph.${r}: could not find the "${a}" node in the graph.`);return GX(n==="mixed"?this.type:n,i,s)}}function WX(t,e){const{name:r,type:n,direction:i}=e,a="forEach"+r[0].toUpperCase()+r.slice(1,-1);t.prototype[a]=function(f,p){if(n!=="mixed"&&this.type!=="mixed"&&n!==this.type)return;f=""+f;const h=this._nodes.get(f);if(typeof h>"u")throw new he(`Graph.${a}: could not find the "${f}" node in the graph.`);fx(!1,n==="mixed"?this.type:n,i,h,p)};const s="map"+r[0].toUpperCase()+r.slice(1);t.prototype[s]=function(f,p){const h=[];return this[a](f,(m,g)=>{h.push(p(m,g))}),h};const l="filter"+r[0].toUpperCase()+r.slice(1);t.prototype[l]=function(f,p){const h=[];return this[a](f,(m,g)=>{p(m,g)&&h.push(m)}),h};const c="reduce"+r[0].toUpperCase()+r.slice(1);t.prototype[c]=function(f,p,h){if(arguments.length<3)throw new ye(`Graph.${c}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let m=h;return this[a](f,(g,_)=>{m=p(m,g,_)}),m}}function HX(t,e){const{name:r,type:n,direction:i}=e,a=r[0].toUpperCase()+r.slice(1,-1),s="find"+a;t.prototype[s]=function(f,p){if(n!=="mixed"&&this.type!=="mixed"&&n!==this.type)return;f=""+f;const h=this._nodes.get(f);if(typeof h>"u")throw new he(`Graph.${s}: could not find the "${f}" node in the graph.`);return fx(!0,n==="mixed"?this.type:n,i,h,p)};const l="some"+a;t.prototype[l]=function(f,p){return!!this[s](f,p)};const c="every"+a;t.prototype[c]=function(f,p){return!this[s](f,(m,g)=>!p(m,g))}}function VX(t,e){const{name:r,type:n,direction:i}=e,a=r.slice(0,-1)+"Entries";t.prototype[a]=function(s){if(n!=="mixed"&&this.type!=="mixed"&&n!==this.type)return ys();s=""+s;const l=this._nodes.get(s);if(typeof l>"u")throw new he(`Graph.${a}: could not find the "${s}" node in the graph.`);return UX(n==="mixed"?this.type:n,i,l)}}function KX(t){zX.forEach(e=>{qX(t,e),WX(t,e),HX(t,e),VX(t,e)})}function uf(t,e,r,n,i){const a=n._nodes.values(),s=n.type;let l,c,f,p,h,m;for(;l=a.next(),l.done!==!0;){let g=!1;if(c=l.value,s!=="undirected"){p=c.out;for(f in p){h=p[f];do m=h.target,g=!0,i(c.key,m.key,c.attributes,m.attributes,h.key,h.attributes,h.undirected),h=h.next;while(h)}}if(s!=="directed"){p=c.undirected;for(f in p)if(!(e&&c.key>f)){h=p[f];do m=h.target,m.key!==f&&(m=h.source),g=!0,i(c.key,m.key,c.attributes,m.attributes,h.key,h.attributes,h.undirected),h=h.next;while(h)}}r&&!g&&i(c.key,null,c.attributes,null,null,null,null)}}function XX(t,e){const r={key:t};return HN(e.attributes)||(r.attributes=Pt({},e.attributes)),r}function YX(t,e,r){const n={key:e,source:r.source.key,target:r.target.key};return HN(r.attributes)||(n.attributes=Pt({},r.attributes)),t==="mixed"&&r.undirected&&(n.undirected=!0),n}function QX(t){if(!Wt(t))throw new ye('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in t))throw new ye("Graph.import: serialized node is missing its key.");if("attributes"in t&&(!Wt(t.attributes)||t.attributes===null))throw new ye("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function ZX(t){if(!Wt(t))throw new ye('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in t))throw new ye("Graph.import: serialized edge is missing its source.");if(!("target"in t))throw new ye("Graph.import: serialized edge is missing its target.");if("attributes"in t&&(!Wt(t.attributes)||t.attributes===null))throw new ye("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in t&&typeof t.undirected!="boolean")throw new ye("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}const JX=tX(),eY=new Set(["directed","undirected","mixed"]),pk=new Set(["domain","_events","_eventsCount","_maxListeners"]),tY=[{name:t=>`${t}Edge`,generateKey:!0},{name:t=>`${t}DirectedEdge`,generateKey:!0,type:"directed"},{name:t=>`${t}UndirectedEdge`,generateKey:!0,type:"undirected"},{name:t=>`${t}EdgeWithKey`},{name:t=>`${t}DirectedEdgeWithKey`,type:"directed"},{name:t=>`${t}UndirectedEdgeWithKey`,type:"undirected"}],rY={allowSelfLoops:!0,multi:!1,type:"mixed"};function nY(t,e,r){if(r&&!Wt(r))throw new ye(`Graph.addNode: invalid attributes. Expecting an object but got "${r}"`);if(e=""+e,r=r||{},t._nodes.has(e))throw new je(`Graph.addNode: the "${e}" node already exist in the graph.`);const n=new t.NodeDataClass(e,r);return t._nodes.set(e,n),t.emit("nodeAdded",{key:e,attributes:r}),n}function vk(t,e,r){const n=new t.NodeDataClass(e,r);return t._nodes.set(e,n),t.emit("nodeAdded",{key:e,attributes:r}),n}function eD(t,e,r,n,i,a,s,l){if(!n&&t.type==="undirected")throw new je(`Graph.${e}: you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead.`);if(n&&t.type==="directed")throw new je(`Graph.${e}: you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead.`);if(l&&!Wt(l))throw new ye(`Graph.${e}: invalid attributes. Expecting an object but got "${l}"`);if(a=""+a,s=""+s,l=l||{},!t.allowSelfLoops&&a===s)throw new je(`Graph.${e}: source & target are the same ("${a}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);const c=t._nodes.get(a),f=t._nodes.get(s);if(!c)throw new he(`Graph.${e}: source node "${a}" not found.`);if(!f)throw new he(`Graph.${e}: target node "${s}" not found.`);const p={key:null,undirected:n,source:a,target:s,attributes:l};if(r)i=t._edgeKeyGenerator();else if(i=""+i,t._edges.has(i))throw new je(`Graph.${e}: the "${i}" edge already exists in the graph.`);if(!t.multi&&(n?typeof c.undirected[s]<"u":typeof c.out[s]<"u"))throw new je(`Graph.${e}: an edge linking "${a}" to "${s}" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option.`);const h=new bs(n,i,c,f,l);t._edges.set(i,h);const m=a===s;return n?(c.undirectedDegree++,f.undirectedDegree++,m&&(c.undirectedLoops++,t._undirectedSelfLoopCount++)):(c.outDegree++,f.inDegree++,m&&(c.directedLoops++,t._directedSelfLoopCount++)),t.multi?h.attachMulti():h.attach(),n?t._undirectedSize++:t._directedSize++,p.key=i,t.emit("edgeAdded",p),i}function iY(t,e,r,n,i,a,s,l,c){if(!n&&t.type==="undirected")throw new je(`Graph.${e}: you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead.`);if(n&&t.type==="directed")throw new je(`Graph.${e}: you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead.`);if(l){if(c){if(typeof l!="function")throw new ye(`Graph.${e}: invalid updater function. Expecting a function but got "${l}"`)}else if(!Wt(l))throw new ye(`Graph.${e}: invalid attributes. Expecting an object but got "${l}"`)}a=""+a,s=""+s;let f;if(c&&(f=l,l=void 0),!t.allowSelfLoops&&a===s)throw new je(`Graph.${e}: source & target are the same ("${a}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let p=t._nodes.get(a),h=t._nodes.get(s),m,g;if(!r&&(m=t._edges.get(i),m)){if((m.source.key!==a||m.target.key!==s)&&(!n||m.source.key!==s||m.target.key!==a))throw new je(`Graph.${e}: inconsistency detected when attempting to merge the "${i}" edge with "${a}" source & "${s}" target vs. ("${m.source.key}", "${m.target.key}").`);g=m}if(!g&&!t.multi&&p&&(g=n?p.undirected[s]:p.out[s]),g){const P=[g.key,!1,!1,!1];if(c?!f:!l)return P;if(c){const T=g.attributes;g.attributes=f(T),t.emit("edgeAttributesUpdated",{type:"replace",key:g.key,attributes:g.attributes})}else Pt(g.attributes,l),t.emit("edgeAttributesUpdated",{type:"merge",key:g.key,attributes:g.attributes,data:l});return P}l=l||{},c&&f&&(l=f(l));const _={key:null,undirected:n,source:a,target:s,attributes:l};if(r)i=t._edgeKeyGenerator();else if(i=""+i,t._edges.has(i))throw new je(`Graph.${e}: the "${i}" edge already exists in the graph.`);let w=!1,b=!1;p||(p=vk(t,a,{}),w=!0,a===s&&(h=p,b=!0)),h||(h=vk(t,s,{}),b=!0),m=new bs(n,i,p,h,l),t._edges.set(i,m);const E=a===s;return n?(p.undirectedDegree++,h.undirectedDegree++,E&&(p.undirectedLoops++,t._undirectedSelfLoopCount++)):(p.outDegree++,h.inDegree++,E&&(p.directedLoops++,t._directedSelfLoopCount++)),t.multi?m.attachMulti():m.attach(),n?t._undirectedSize++:t._directedSize++,_.key=i,t.emit("edgeAdded",_),[i,!0,w,b]}function yo(t,e){t._edges.delete(e.key);const{source:r,target:n,attributes:i}=e,a=e.undirected,s=r===n;a?(r.undirectedDegree--,n.undirectedDegree--,s&&(r.undirectedLoops--,t._undirectedSelfLoopCount--)):(r.outDegree--,n.inDegree--,s&&(r.directedLoops--,t._directedSelfLoopCount--)),t.multi?e.detachMulti():e.detach(),a?t._undirectedSize--:t._directedSize--,t.emit("edgeDropped",{key:e.key,attributes:i,source:r.key,target:n.key,undirected:a})}class He extends WN.EventEmitter{constructor(e){if(super(),e=Pt({},rY,e),typeof e.multi!="boolean")throw new ye(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${e.multi}".`);if(!eY.has(e.type))throw new ye(`Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${e.type}".`);if(typeof e.allowSelfLoops!="boolean")throw new ye(`Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got "${e.allowSelfLoops}".`);const r=e.type==="mixed"?VN:e.type==="directed"?KN:XN;Dr(this,"NodeDataClass",r);const n="geid_"+JX()+"_";let i=0;const a=()=>{let s;do s=n+i++;while(this._edges.has(s));return s};Dr(this,"_attributes",{}),Dr(this,"_nodes",new Map),Dr(this,"_edges",new Map),Dr(this,"_directedSize",0),Dr(this,"_undirectedSize",0),Dr(this,"_directedSelfLoopCount",0),Dr(this,"_undirectedSelfLoopCount",0),Dr(this,"_edgeKeyGenerator",a),Dr(this,"_options",e),pk.forEach(s=>Dr(this,s,this[s])),Zr(this,"order",()=>this._nodes.size),Zr(this,"size",()=>this._edges.size),Zr(this,"directedSize",()=>this._directedSize),Zr(this,"undirectedSize",()=>this._undirectedSize),Zr(this,"selfLoopCount",()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount),Zr(this,"directedSelfLoopCount",()=>this._directedSelfLoopCount),Zr(this,"undirectedSelfLoopCount",()=>this._undirectedSelfLoopCount),Zr(this,"multi",this._options.multi),Zr(this,"type",this._options.type),Zr(this,"allowSelfLoops",this._options.allowSelfLoops),Zr(this,"implementation",()=>"graphology")}_resetInstanceCounters(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0}hasNode(e){return this._nodes.has(""+e)}hasDirectedEdge(e,r){if(this.type==="undirected")return!1;if(arguments.length===1){const n=""+e,i=this._edges.get(n);return!!i&&!i.undirected}else if(arguments.length===2){e=""+e,r=""+r;const n=this._nodes.get(e);return n?n.out.hasOwnProperty(r):!1}throw new ye(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasUndirectedEdge(e,r){if(this.type==="directed")return!1;if(arguments.length===1){const n=""+e,i=this._edges.get(n);return!!i&&i.undirected}else if(arguments.length===2){e=""+e,r=""+r;const n=this._nodes.get(e);return n?n.undirected.hasOwnProperty(r):!1}throw new ye(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasEdge(e,r){if(arguments.length===1){const n=""+e;return this._edges.has(n)}else if(arguments.length===2){e=""+e,r=""+r;const n=this._nodes.get(e);return n?typeof n.out<"u"&&n.out.hasOwnProperty(r)||typeof n.undirected<"u"&&n.undirected.hasOwnProperty(r):!1}throw new ye(`Graph.hasEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}directedEdge(e,r){if(this.type==="undirected")return;if(e=""+e,r=""+r,this.multi)throw new je("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");const n=this._nodes.get(e);if(!n)throw new he(`Graph.directedEdge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(r))throw new he(`Graph.directedEdge: could not find the "${r}" target node in the graph.`);const i=n.out&&n.out[r]||void 0;if(i)return i.key}undirectedEdge(e,r){if(this.type==="directed")return;if(e=""+e,r=""+r,this.multi)throw new je("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");const n=this._nodes.get(e);if(!n)throw new he(`Graph.undirectedEdge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(r))throw new he(`Graph.undirectedEdge: could not find the "${r}" target node in the graph.`);const i=n.undirected&&n.undirected[r]||void 0;if(i)return i.key}edge(e,r){if(this.multi)throw new je("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");e=""+e,r=""+r;const n=this._nodes.get(e);if(!n)throw new he(`Graph.edge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(r))throw new he(`Graph.edge: could not find the "${r}" target node in the graph.`);const i=n.out&&n.out[r]||n.undirected&&n.undirected[r]||void 0;if(i)return i.key}areDirectedNeighbors(e,r){e=""+e,r=""+r;const n=this._nodes.get(e);if(!n)throw new he(`Graph.areDirectedNeighbors: could not find the "${e}" node in the graph.`);return this.type==="undirected"?!1:r in n.in||r in n.out}areOutNeighbors(e,r){e=""+e,r=""+r;const n=this._nodes.get(e);if(!n)throw new he(`Graph.areOutNeighbors: could not find the "${e}" node in the graph.`);return this.type==="undirected"?!1:r in n.out}areInNeighbors(e,r){e=""+e,r=""+r;const n=this._nodes.get(e);if(!n)throw new he(`Graph.areInNeighbors: could not find the "${e}" node in the graph.`);return this.type==="undirected"?!1:r in n.in}areUndirectedNeighbors(e,r){e=""+e,r=""+r;const n=this._nodes.get(e);if(!n)throw new he(`Graph.areUndirectedNeighbors: could not find the "${e}" node in the graph.`);return this.type==="directed"?!1:r in n.undirected}areNeighbors(e,r){e=""+e,r=""+r;const n=this._nodes.get(e);if(!n)throw new he(`Graph.areNeighbors: could not find the "${e}" node in the graph.`);return this.type!=="undirected"&&(r in n.in||r in n.out)||this.type!=="directed"&&r in n.undirected}areInboundNeighbors(e,r){e=""+e,r=""+r;const n=this._nodes.get(e);if(!n)throw new he(`Graph.areInboundNeighbors: could not find the "${e}" node in the graph.`);return this.type!=="undirected"&&r in n.in||this.type!=="directed"&&r in n.undirected}areOutboundNeighbors(e,r){e=""+e,r=""+r;const n=this._nodes.get(e);if(!n)throw new he(`Graph.areOutboundNeighbors: could not find the "${e}" node in the graph.`);return this.type!=="undirected"&&r in n.out||this.type!=="directed"&&r in n.undirected}inDegree(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new he(`Graph.inDegree: could not find the "${e}" node in the graph.`);return this.type==="undirected"?0:r.inDegree}outDegree(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new he(`Graph.outDegree: could not find the "${e}" node in the graph.`);return this.type==="undirected"?0:r.outDegree}directedDegree(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new he(`Graph.directedDegree: could not find the "${e}" node in the graph.`);return this.type==="undirected"?0:r.inDegree+r.outDegree}undirectedDegree(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new he(`Graph.undirectedDegree: could not find the "${e}" node in the graph.`);return this.type==="directed"?0:r.undirectedDegree}inboundDegree(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new he(`Graph.inboundDegree: could not find the "${e}" node in the graph.`);let n=0;return this.type!=="directed"&&(n+=r.undirectedDegree),this.type!=="undirected"&&(n+=r.inDegree),n}outboundDegree(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new he(`Graph.outboundDegree: could not find the "${e}" node in the graph.`);let n=0;return this.type!=="directed"&&(n+=r.undirectedDegree),this.type!=="undirected"&&(n+=r.outDegree),n}degree(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new he(`Graph.degree: could not find the "${e}" node in the graph.`);let n=0;return this.type!=="directed"&&(n+=r.undirectedDegree),this.type!=="undirected"&&(n+=r.inDegree+r.outDegree),n}inDegreeWithoutSelfLoops(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new he(`Graph.inDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type==="undirected"?0:r.inDegree-r.directedLoops}outDegreeWithoutSelfLoops(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new he(`Graph.outDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type==="undirected"?0:r.outDegree-r.directedLoops}directedDegreeWithoutSelfLoops(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new he(`Graph.directedDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type==="undirected"?0:r.inDegree+r.outDegree-r.directedLoops*2}undirectedDegreeWithoutSelfLoops(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new he(`Graph.undirectedDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type==="directed"?0:r.undirectedDegree-r.undirectedLoops*2}inboundDegreeWithoutSelfLoops(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new he(`Graph.inboundDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let n=0,i=0;return this.type!=="directed"&&(n+=r.undirectedDegree,i+=r.undirectedLoops*2),this.type!=="undirected"&&(n+=r.inDegree,i+=r.directedLoops),n-i}outboundDegreeWithoutSelfLoops(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new he(`Graph.outboundDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let n=0,i=0;return this.type!=="directed"&&(n+=r.undirectedDegree,i+=r.undirectedLoops*2),this.type!=="undirected"&&(n+=r.outDegree,i+=r.directedLoops),n-i}degreeWithoutSelfLoops(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new he(`Graph.degreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let n=0,i=0;return this.type!=="directed"&&(n+=r.undirectedDegree,i+=r.undirectedLoops*2),this.type!=="undirected"&&(n+=r.inDegree+r.outDegree,i+=r.directedLoops*2),n-i}source(e){e=""+e;const r=this._edges.get(e);if(!r)throw new he(`Graph.source: could not find the "${e}" edge in the graph.`);return r.source.key}target(e){e=""+e;const r=this._edges.get(e);if(!r)throw new he(`Graph.target: could not find the "${e}" edge in the graph.`);return r.target.key}extremities(e){e=""+e;const r=this._edges.get(e);if(!r)throw new he(`Graph.extremities: could not find the "${e}" edge in the graph.`);return[r.source.key,r.target.key]}opposite(e,r){e=""+e,r=""+r;const n=this._edges.get(r);if(!n)throw new he(`Graph.opposite: could not find the "${r}" edge in the graph.`);const i=n.source.key,a=n.target.key;if(e===i)return a;if(e===a)return i;throw new he(`Graph.opposite: the "${e}" node is not attached to the "${r}" edge (${i}, ${a}).`)}hasExtremity(e,r){e=""+e,r=""+r;const n=this._edges.get(e);if(!n)throw new he(`Graph.hasExtremity: could not find the "${e}" edge in the graph.`);return n.source.key===r||n.target.key===r}isUndirected(e){e=""+e;const r=this._edges.get(e);if(!r)throw new he(`Graph.isUndirected: could not find the "${e}" edge in the graph.`);return r.undirected}isDirected(e){e=""+e;const r=this._edges.get(e);if(!r)throw new he(`Graph.isDirected: could not find the "${e}" edge in the graph.`);return!r.undirected}isSelfLoop(e){e=""+e;const r=this._edges.get(e);if(!r)throw new he(`Graph.isSelfLoop: could not find the "${e}" edge in the graph.`);return r.source===r.target}addNode(e,r){return nY(this,e,r).key}mergeNode(e,r){if(r&&!Wt(r))throw new ye(`Graph.mergeNode: invalid attributes. Expecting an object but got "${r}"`);e=""+e,r=r||{};let n=this._nodes.get(e);return n?(r&&(Pt(n.attributes,r),this.emit("nodeAttributesUpdated",{type:"merge",key:e,attributes:n.attributes,data:r})),[e,!1]):(n=new this.NodeDataClass(e,r),this._nodes.set(e,n),this.emit("nodeAdded",{key:e,attributes:r}),[e,!0])}updateNode(e,r){if(r&&typeof r!="function")throw new ye(`Graph.updateNode: invalid updater function. Expecting a function but got "${r}"`);e=""+e;let n=this._nodes.get(e);if(n){if(r){const a=n.attributes;n.attributes=r(a),this.emit("nodeAttributesUpdated",{type:"replace",key:e,attributes:n.attributes})}return[e,!1]}const i=r?r({}):{};return n=new this.NodeDataClass(e,i),this._nodes.set(e,n),this.emit("nodeAdded",{key:e,attributes:i}),[e,!0]}dropNode(e){e=""+e;const r=this._nodes.get(e);if(!r)throw new he(`Graph.dropNode: could not find the "${e}" node in the graph.`);let n;if(this.type!=="undirected"){for(const i in r.out){n=r.out[i];do yo(this,n),n=n.next;while(n)}for(const i in r.in){n=r.in[i];do yo(this,n),n=n.next;while(n)}}if(this.type!=="directed")for(const i in r.undirected){n=r.undirected[i];do yo(this,n),n=n.next;while(n)}this._nodes.delete(e),this.emit("nodeDropped",{key:e,attributes:r.attributes})}dropEdge(e){let r;if(arguments.length>1){const n=""+arguments[0],i=""+arguments[1];if(r=Fr(this,n,i,this.type),!r)throw new he(`Graph.dropEdge: could not find the "${n}" -> "${i}" edge in the graph.`)}else if(e=""+e,r=this._edges.get(e),!r)throw new he(`Graph.dropEdge: could not find the "${e}" edge in the graph.`);return yo(this,r),this}dropDirectedEdge(e,r){if(arguments.length<2)throw new je("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new je("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");e=""+e,r=""+r;const n=Fr(this,e,r,"directed");if(!n)throw new he(`Graph.dropDirectedEdge: could not find a "${e}" -> "${r}" edge in the graph.`);return yo(this,n),this}dropUndirectedEdge(e,r){if(arguments.length<2)throw new je("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new je("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");const n=Fr(this,e,r,"undirected");if(!n)throw new he(`Graph.dropUndirectedEdge: could not find a "${e}" -> "${r}" edge in the graph.`);return yo(this,n),this}clear(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")}clearEdges(){const e=this._nodes.values();let r;for(;r=e.next(),r.done!==!0;)r.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")}getAttribute(e){return this._attributes[e]}getAttributes(){return this._attributes}hasAttribute(e){return this._attributes.hasOwnProperty(e)}setAttribute(e,r){return this._attributes[e]=r,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:e}),this}updateAttribute(e,r){if(typeof r!="function")throw new ye("Graph.updateAttribute: updater should be a function.");const n=this._attributes[e];return this._attributes[e]=r(n),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:e}),this}removeAttribute(e){return delete this._attributes[e],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:e}),this}replaceAttributes(e){if(!Wt(e))throw new ye("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=e,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this}mergeAttributes(e){if(!Wt(e))throw new ye("Graph.mergeAttributes: provided attributes are not a plain object.");return Pt(this._attributes,e),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:e}),this}updateAttributes(e){if(typeof e!="function")throw new ye("Graph.updateAttributes: provided updater is not a function.");return this._attributes=e(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this}updateEachNodeAttributes(e,r){if(typeof e!="function")throw new ye("Graph.updateEachNodeAttributes: expecting an updater function.");if(r&&!hk(r))throw new ye("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const n=this._nodes.values();let i,a;for(;i=n.next(),i.done!==!0;)a=i.value,a.attributes=e(a.key,a.attributes);this.emit("eachNodeAttributesUpdated",{hints:r||null})}updateEachEdgeAttributes(e,r){if(typeof e!="function")throw new ye("Graph.updateEachEdgeAttributes: expecting an updater function.");if(r&&!hk(r))throw new ye("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const n=this._edges.values();let i,a,s,l;for(;i=n.next(),i.done!==!0;)a=i.value,s=a.source,l=a.target,a.attributes=e(a.key,a.attributes,s.key,l.key,s.attributes,l.attributes,a.undirected);this.emit("eachEdgeAttributesUpdated",{hints:r||null})}forEachAdjacencyEntry(e){if(typeof e!="function")throw new ye("Graph.forEachAdjacencyEntry: expecting a callback.");uf(!1,!1,!1,this,e)}forEachAdjacencyEntryWithOrphans(e){if(typeof e!="function")throw new ye("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");uf(!1,!1,!0,this,e)}forEachAssymetricAdjacencyEntry(e){if(typeof e!="function")throw new ye("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");uf(!1,!0,!1,this,e)}forEachAssymetricAdjacencyEntryWithOrphans(e){if(typeof e!="function")throw new ye("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");uf(!1,!0,!0,this,e)}nodes(){return Array.from(this._nodes.keys())}forEachNode(e){if(typeof e!="function")throw new ye("Graph.forEachNode: expecting a callback.");const r=this._nodes.values();let n,i;for(;n=r.next(),n.done!==!0;)i=n.value,e(i.key,i.attributes)}findNode(e){if(typeof e!="function")throw new ye("Graph.findNode: expecting a callback.");const r=this._nodes.values();let n,i;for(;n=r.next(),n.done!==!0;)if(i=n.value,e(i.key,i.attributes))return i.key}mapNodes(e){if(typeof e!="function")throw new ye("Graph.mapNode: expecting a callback.");const r=this._nodes.values();let n,i;const a=new Array(this.order);let s=0;for(;n=r.next(),n.done!==!0;)i=n.value,a[s++]=e(i.key,i.attributes);return a}someNode(e){if(typeof e!="function")throw new ye("Graph.someNode: expecting a callback.");const r=this._nodes.values();let n,i;for(;n=r.next(),n.done!==!0;)if(i=n.value,e(i.key,i.attributes))return!0;return!1}everyNode(e){if(typeof e!="function")throw new ye("Graph.everyNode: expecting a callback.");const r=this._nodes.values();let n,i;for(;n=r.next(),n.done!==!0;)if(i=n.value,!e(i.key,i.attributes))return!1;return!0}filterNodes(e){if(typeof e!="function")throw new ye("Graph.filterNodes: expecting a callback.");const r=this._nodes.values();let n,i;const a=[];for(;n=r.next(),n.done!==!0;)i=n.value,e(i.key,i.attributes)&&a.push(i.key);return a}reduceNodes(e,r){if(typeof e!="function")throw new ye("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new ye("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");let n=r;const i=this._nodes.values();let a,s;for(;a=i.next(),a.done!==!0;)s=a.value,n=e(n,s.key,s.attributes);return n}nodeEntries(){const e=this._nodes.values();return{[Symbol.iterator](){return this},next(){const r=e.next();if(r.done)return r;const n=r.value;return{value:{node:n.key,attributes:n.attributes},done:!1}}}}export(){const e=new Array(this._nodes.size);let r=0;this._nodes.forEach((i,a)=>{e[r++]=XX(a,i)});const n=new Array(this._edges.size);return r=0,this._edges.forEach((i,a)=>{n[r++]=YX(this.type,a,i)}),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:e,edges:n}}import(e,r=!1){if(e instanceof He)return e.forEachNode((c,f)=>{r?this.mergeNode(c,f):this.addNode(c,f)}),e.forEachEdge((c,f,p,h,m,g,_)=>{r?_?this.mergeUndirectedEdgeWithKey(c,p,h,f):this.mergeDirectedEdgeWithKey(c,p,h,f):_?this.addUndirectedEdgeWithKey(c,p,h,f):this.addDirectedEdgeWithKey(c,p,h,f)}),this;if(!Wt(e))throw new ye("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(e.attributes){if(!Wt(e.attributes))throw new ye("Graph.import: invalid attributes. Expecting a plain object.");r?this.mergeAttributes(e.attributes):this.replaceAttributes(e.attributes)}let n,i,a,s,l;if(e.nodes){if(a=e.nodes,!Array.isArray(a))throw new ye("Graph.import: invalid nodes. Expecting an array.");for(n=0,i=a.length;n<i;n++){s=a[n],QX(s);const{key:c,attributes:f}=s;r?this.mergeNode(c,f):this.addNode(c,f)}}if(e.edges){let c=!1;if(this.type==="undirected"&&(c=!0),a=e.edges,!Array.isArray(a))throw new ye("Graph.import: invalid edges. Expecting an array.");for(n=0,i=a.length;n<i;n++){l=a[n],ZX(l);const{source:f,target:p,attributes:h,undirected:m=c}=l;let g;"key"in l?(g=r?m?this.mergeUndirectedEdgeWithKey:this.mergeDirectedEdgeWithKey:m?this.addUndirectedEdgeWithKey:this.addDirectedEdgeWithKey,g.call(this,l.key,f,p,h)):(g=r?m?this.mergeUndirectedEdge:this.mergeDirectedEdge:m?this.addUndirectedEdge:this.addDirectedEdge,g.call(this,f,p,h))}}return this}nullCopy(e){const r=new He(Pt({},this._options,e));return r.replaceAttributes(Pt({},this.getAttributes())),r}emptyCopy(e){const r=this.nullCopy(e);return this._nodes.forEach((n,i)=>{const a=Pt({},n.attributes);n=new r.NodeDataClass(i,a),r._nodes.set(i,n)}),r}copy(e){if(e=e||{},typeof e.type=="string"&&e.type!==this.type&&e.type!=="mixed")throw new je(`Graph.copy: cannot create an incompatible copy from "${this.type}" type to "${e.type}" because this would mean losing information about the current graph.`);if(typeof e.multi=="boolean"&&e.multi!==this.multi&&e.multi!==!0)throw new je("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if(typeof e.allowSelfLoops=="boolean"&&e.allowSelfLoops!==this.allowSelfLoops&&e.allowSelfLoops!==!0)throw new je("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");const r=this.emptyCopy(e),n=this._edges.values();let i,a;for(;i=n.next(),i.done!==!0;)a=i.value,eD(r,"copy",!1,a.undirected,a.key,a.source.key,a.target.key,Pt({},a.attributes));return r}toJSON(){return this.export()}toString(){return"[object Graph]"}inspect(){const e={};this._nodes.forEach((a,s)=>{e[s]=a.attributes});const r={},n={};this._edges.forEach((a,s)=>{const l=a.undirected?"--":"->";let c="",f=a.source.key,p=a.target.key,h;a.undirected&&f>p&&(h=f,f=p,p=h);const m=`(${f})${l}(${p})`;s.startsWith("geid_")?this.multi&&(typeof n[m]>"u"?n[m]=0:n[m]++,c+=`${n[m]}. `):c+=`[${s}]: `,c+=m,r[c]=a.attributes});const i={};for(const a in this)this.hasOwnProperty(a)&&!pk.has(a)&&typeof this[a]!="function"&&typeof a!="symbol"&&(i[a]=this[a]);return i.attributes=this._attributes,i.nodes=e,i.edges=r,Dr(i,"constructor",this.constructor),i}}typeof Symbol<"u"&&(He.prototype[Symbol.for("nodejs.util.inspect.custom")]=He.prototype.inspect);tY.forEach(t=>{["add","merge","update"].forEach(e=>{const r=t.name(e),n=e==="add"?eD:iY;t.generateKey?He.prototype[r]=function(i,a,s){return n(this,r,!0,(t.type||this.type)==="undirected",null,i,a,s,e==="update")}:He.prototype[r]=function(i,a,s,l){return n(this,r,!1,(t.type||this.type)==="undirected",i,a,s,l,e==="update")}})});hX(He);EX(He);BX(He);KX(He);class tD extends He{constructor(e){const r=Pt({type:"directed"},e);if("multi"in r&&r.multi!==!1)throw new ye("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(r.type!=="directed")throw new ye('DirectedGraph.from: inconsistent "'+r.type+'" type in given options!');super(r)}}class rD extends He{constructor(e){const r=Pt({type:"undirected"},e);if("multi"in r&&r.multi!==!1)throw new ye("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(r.type!=="undirected")throw new ye('UndirectedGraph.from: inconsistent "'+r.type+'" type in given options!');super(r)}}class nD extends He{constructor(e){const r=Pt({multi:!0},e);if("multi"in r&&r.multi!==!0)throw new ye("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");super(r)}}class iD extends He{constructor(e){const r=Pt({type:"directed",multi:!0},e);if("multi"in r&&r.multi!==!0)throw new ye("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(r.type!=="directed")throw new ye('MultiDirectedGraph.from: inconsistent "'+r.type+'" type in given options!');super(r)}}class aD extends He{constructor(e){const r=Pt({type:"undirected",multi:!0},e);if("multi"in r&&r.multi!==!0)throw new ye("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(r.type!=="undirected")throw new ye('MultiUndirectedGraph.from: inconsistent "'+r.type+'" type in given options!');super(r)}}function ws(t){t.from=function(e,r){const n=Pt({},e.options,r),i=new t(n);return i.import(e),i}}ws(He);ws(tD);ws(rD);ws(nD);ws(iD);ws(aD);He.Graph=He;He.DirectedGraph=tD;He.UndirectedGraph=rD;He.MultiGraph=nD;He.MultiDirectedGraph=iD;He.MultiUndirectedGraph=aD;He.InvalidArgumentsGraphError=ye;He.NotFoundGraphError=he;He.UsageGraphError=je;function aY(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function ku(t){var e=aY(t,"string");return typeof e=="symbol"?e:e+""}function er(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mk(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ku(n.key),n)}}function tr(t,e,r){return e&&mk(t.prototype,e),r&&mk(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function ss(t){return ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ss(t)}function oD(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(oD=function(){return!!t})()}function oY(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function sY(t,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oY(t)}function Gr(t,e,r){return e=ss(e),sY(t,oD()?Reflect.construct(e,r||[],ss(t).constructor):e.apply(t,r))}function Wb(t,e){return Wb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Wb(t,e)}function Ur(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wb(t,e)}function uY(t){if(Array.isArray(t))return t}function lY(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,l=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return l}}function Hb(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function sD(t,e){if(t){if(typeof t=="string")return Hb(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Hb(t,e):void 0}}function cY(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
199
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function us(t,e){return uY(t)||lY(t,e)||sD(t,e)||cY()}var r0={black:"#000000",silver:"#C0C0C0",gray:"#808080",grey:"#808080",white:"#FFFFFF",maroon:"#800000",red:"#FF0000",purple:"#800080",fuchsia:"#FF00FF",green:"#008000",lime:"#00FF00",olive:"#808000",yellow:"#FFFF00",navy:"#000080",blue:"#0000FF",teal:"#008080",aqua:"#00FFFF",darkblue:"#00008B",mediumblue:"#0000CD",darkgreen:"#006400",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",springgreen:"#00FF7F",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",rebeccapurple:"#663399",mediumaquamarine:"#66CDAA",dimgray:"#696969",dimgrey:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",slategrey:"#708090",lightslategray:"#778899",lightslategrey:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370DB",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",palevioletred:"#DB7093",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",lightyellow:"#FFFFE0",ivory:"#FFFFF0"},uD=new Int8Array(4),n0=new Int32Array(uD.buffer,0,1),fY=new Float32Array(uD.buffer,0,1),dY=/^\s*rgba?\s*\(/,hY=/^\s*rgba?\s*\(\s*([0-9]*)\s*,\s*([0-9]*)\s*,\s*([0-9]*)(?:\s*,\s*(.*)?)?\)\s*$/;function pY(t){var e=0,r=0,n=0,i=1;if(t[0]==="#")t.length===4?(e=parseInt(t.charAt(1)+t.charAt(1),16),r=parseInt(t.charAt(2)+t.charAt(2),16),n=parseInt(t.charAt(3)+t.charAt(3),16)):(e=parseInt(t.charAt(1)+t.charAt(2),16),r=parseInt(t.charAt(3)+t.charAt(4),16),n=parseInt(t.charAt(5)+t.charAt(6),16)),t.length===9&&(i=parseInt(t.charAt(7)+t.charAt(8),16)/255);else if(dY.test(t)){var a=t.match(hY);a&&(e=+a[1],r=+a[2],n=+a[3],a[4]&&(i=+a[4]))}return{r:e,g:r,b:n,a:i}}var Po={};for(var lf in r0)Po[lf]=Dl(r0[lf]),Po[r0[lf]]=Po[lf];function lD(t,e,r,n,i){return n0[0]=n<<24|r<<16|e<<8|t,n0[0]=n0[0]&4278190079,fY[0]}function Dl(t){if(t=t.toLowerCase(),typeof Po[t]<"u")return Po[t];var e=pY(t),r=e.r,n=e.g,i=e.b,a=e.a;a=a*255|0;var s=lD(r,n,i,a);return Po[t]=s,s}var i0={};function cD(t){if(typeof i0[t]<"u")return i0[t];var e=(t&16711680)>>>16,r=(t&65280)>>>8,n=t&255,i=255,a=lD(e,r,n,i);return i0[t]=a,a}function gk(t,e,r,n){return r+(e<<8)+(t<<16)}function yk(t,e,r,n,i,a){var s=Math.floor(r/a*i),l=Math.floor(t.drawingBufferHeight/a-n/a*i),c=new Uint8Array(4);t.bindFramebuffer(t.FRAMEBUFFER,e),t.readPixels(s,l,1,1,t.RGBA,t.UNSIGNED_BYTE,c);var f=us(c,4),p=f[0],h=f[1],m=f[2],g=f[3];return[p,h,m,g]}function se(t,e,r){return(e=ku(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function bk(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Pe(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?bk(Object(r),!0).forEach(function(n){se(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bk(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function vY(t,e){for(;!{}.hasOwnProperty.call(t,e)&&(t=ss(t))!==null;);return t}function Vb(){return Vb=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=vY(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},Vb.apply(null,arguments)}function fD(t,e,r,n){var i=Vb(ss(t.prototype),e,r);return typeof i=="function"?function(a){return i.apply(r,a)}:i}function mY(t){return t.normalized?1:t.size}function a0(t){var e=0;return t.forEach(function(r){return e+=mY(r)}),e}function dD(t,e,r){var n=t==="VERTEX"?e.VERTEX_SHADER:e.FRAGMENT_SHADER,i=e.createShader(n);if(i===null)throw new Error("loadShader: error while creating the shader");e.shaderSource(i,r),e.compileShader(i);var a=e.getShaderParameter(i,e.COMPILE_STATUS);if(!a){var s=e.getShaderInfoLog(i);throw e.deleteShader(i),new Error(`loadShader: error while compiling the shader:
200
+ `.concat(s,`
201
+ `).concat(r))}return i}function gY(t,e){return dD("VERTEX",t,e)}function yY(t,e){return dD("FRAGMENT",t,e)}function bY(t,e){var r=t.createProgram();if(r===null)throw new Error("loadProgram: error while creating the program.");var n,i;for(n=0,i=e.length;n<i;n++)t.attachShader(r,e[n]);t.linkProgram(r);var a=t.getProgramParameter(r,t.LINK_STATUS);if(!a)throw t.deleteProgram(r),new Error("loadProgram: error while linking the program.");return r}function wk(t){var e=t.gl,r=t.buffer,n=t.program,i=t.vertexShader,a=t.fragmentShader;e.deleteShader(i),e.deleteShader(a),e.deleteProgram(n),e.deleteBuffer(r)}var xk=`#define PICKING_MODE
202
+ `,wY=se(se(se(se(se(se(se(se({},WebGL2RenderingContext.BOOL,1),WebGL2RenderingContext.BYTE,1),WebGL2RenderingContext.UNSIGNED_BYTE,1),WebGL2RenderingContext.SHORT,2),WebGL2RenderingContext.UNSIGNED_SHORT,2),WebGL2RenderingContext.INT,4),WebGL2RenderingContext.UNSIGNED_INT,4),WebGL2RenderingContext.FLOAT,4),hD=(function(){function t(e,r,n){er(this,t),se(this,"array",new Float32Array),se(this,"constantArray",new Float32Array),se(this,"capacity",0),se(this,"verticesCount",0);var i=this.getDefinition();if(this.VERTICES=i.VERTICES,this.VERTEX_SHADER_SOURCE=i.VERTEX_SHADER_SOURCE,this.FRAGMENT_SHADER_SOURCE=i.FRAGMENT_SHADER_SOURCE,this.UNIFORMS=i.UNIFORMS,this.ATTRIBUTES=i.ATTRIBUTES,this.METHOD=i.METHOD,this.CONSTANT_ATTRIBUTES="CONSTANT_ATTRIBUTES"in i?i.CONSTANT_ATTRIBUTES:[],this.CONSTANT_DATA="CONSTANT_DATA"in i?i.CONSTANT_DATA:[],this.isInstanced="CONSTANT_ATTRIBUTES"in i,this.ATTRIBUTES_ITEMS_COUNT=a0(this.ATTRIBUTES),this.STRIDE=this.VERTICES*this.ATTRIBUTES_ITEMS_COUNT,this.renderer=n,this.normalProgram=this.getProgramInfo("normal",e,i.VERTEX_SHADER_SOURCE,i.FRAGMENT_SHADER_SOURCE,null),this.pickProgram=r?this.getProgramInfo("pick",e,xk+i.VERTEX_SHADER_SOURCE,xk+i.FRAGMENT_SHADER_SOURCE,r):null,this.isInstanced){var a=a0(this.CONSTANT_ATTRIBUTES);if(this.CONSTANT_DATA.length!==this.VERTICES)throw new Error("Program: error while getting constant data (expected ".concat(this.VERTICES," items, received ").concat(this.CONSTANT_DATA.length," instead)"));this.constantArray=new Float32Array(this.CONSTANT_DATA.length*a);for(var s=0;s<this.CONSTANT_DATA.length;s++){var l=this.CONSTANT_DATA[s];if(l.length!==a)throw new Error("Program: error while getting constant data (one vector has ".concat(l.length," items instead of ").concat(a,")"));for(var c=0;c<l.length;c++)this.constantArray[s*a+c]=l[c]}this.STRIDE=this.ATTRIBUTES_ITEMS_COUNT}}return tr(t,[{key:"kill",value:function(){wk(this.normalProgram),this.pickProgram&&(wk(this.pickProgram),this.pickProgram=null)}},{key:"getProgramInfo",value:function(r,n,i,a,s){var l=this.getDefinition(),c=n.createBuffer();if(c===null)throw new Error("Program: error while creating the WebGL buffer.");var f=gY(n,i),p=yY(n,a),h=bY(n,[f,p]),m={};l.UNIFORMS.forEach(function(w){var b=n.getUniformLocation(h,w);b&&(m[w]=b)});var g={};l.ATTRIBUTES.forEach(function(w){g[w.name]=n.getAttribLocation(h,w.name)});var _;if("CONSTANT_ATTRIBUTES"in l&&(l.CONSTANT_ATTRIBUTES.forEach(function(w){g[w.name]=n.getAttribLocation(h,w.name)}),_=n.createBuffer(),_===null))throw new Error("Program: error while creating the WebGL constant buffer.");return{name:r,program:h,gl:n,frameBuffer:s,buffer:c,constantBuffer:_||{},uniformLocations:m,attributeLocations:g,isPicking:r==="pick",vertexShader:f,fragmentShader:p}}},{key:"bindProgram",value:function(r){var n=this,i=0,a=r.gl,s=r.buffer;this.isInstanced?(a.bindBuffer(a.ARRAY_BUFFER,r.constantBuffer),i=0,this.CONSTANT_ATTRIBUTES.forEach(function(l){return i+=n.bindAttribute(l,r,i,!1)}),a.bufferData(a.ARRAY_BUFFER,this.constantArray,a.STATIC_DRAW),a.bindBuffer(a.ARRAY_BUFFER,r.buffer),i=0,this.ATTRIBUTES.forEach(function(l){return i+=n.bindAttribute(l,r,i,!0)}),a.bufferData(a.ARRAY_BUFFER,this.array,a.DYNAMIC_DRAW)):(a.bindBuffer(a.ARRAY_BUFFER,s),i=0,this.ATTRIBUTES.forEach(function(l){return i+=n.bindAttribute(l,r,i)}),a.bufferData(a.ARRAY_BUFFER,this.array,a.DYNAMIC_DRAW)),a.bindBuffer(a.ARRAY_BUFFER,null)}},{key:"unbindProgram",value:function(r){var n=this;this.isInstanced?(this.CONSTANT_ATTRIBUTES.forEach(function(i){return n.unbindAttribute(i,r,!1)}),this.ATTRIBUTES.forEach(function(i){return n.unbindAttribute(i,r,!0)})):this.ATTRIBUTES.forEach(function(i){return n.unbindAttribute(i,r)})}},{key:"bindAttribute",value:function(r,n,i,a){var s=wY[r.type];if(typeof s!="number")throw new Error('Program.bind: yet unsupported attribute type "'.concat(r.type,'"'));var l=n.attributeLocations[r.name],c=n.gl;if(l!==-1){c.enableVertexAttribArray(l);var f=this.isInstanced?(a?this.ATTRIBUTES_ITEMS_COUNT:a0(this.CONSTANT_ATTRIBUTES))*Float32Array.BYTES_PER_ELEMENT:this.ATTRIBUTES_ITEMS_COUNT*Float32Array.BYTES_PER_ELEMENT;if(c.vertexAttribPointer(l,r.size,r.type,r.normalized||!1,f,i),this.isInstanced&&a)if(c instanceof WebGL2RenderingContext)c.vertexAttribDivisor(l,1);else{var p=c.getExtension("ANGLE_instanced_arrays");p&&p.vertexAttribDivisorANGLE(l,1)}}return r.size*s}},{key:"unbindAttribute",value:function(r,n,i){var a=n.attributeLocations[r.name],s=n.gl;if(a!==-1&&(s.disableVertexAttribArray(a),this.isInstanced&&i))if(s instanceof WebGL2RenderingContext)s.vertexAttribDivisor(a,0);else{var l=s.getExtension("ANGLE_instanced_arrays");l&&l.vertexAttribDivisorANGLE(a,0)}}},{key:"reallocate",value:function(r){r!==this.capacity&&(this.capacity=r,this.verticesCount=this.VERTICES*r,this.array=new Float32Array(this.isInstanced?this.capacity*this.ATTRIBUTES_ITEMS_COUNT:this.verticesCount*this.ATTRIBUTES_ITEMS_COUNT))}},{key:"hasNothingToRender",value:function(){return this.verticesCount===0}},{key:"renderProgram",value:function(r,n){var i=n.gl,a=n.program;i.enable(i.BLEND),i.useProgram(a),this.setUniforms(r,n),this.drawWebGL(this.METHOD,n)}},{key:"render",value:function(r){this.hasNothingToRender()||(this.pickProgram&&(this.pickProgram.gl.viewport(0,0,r.width*r.pixelRatio/r.downSizingRatio,r.height*r.pixelRatio/r.downSizingRatio),this.bindProgram(this.pickProgram),this.renderProgram(Pe(Pe({},r),{},{pixelRatio:r.pixelRatio/r.downSizingRatio}),this.pickProgram),this.unbindProgram(this.pickProgram)),this.normalProgram.gl.viewport(0,0,r.width*r.pixelRatio,r.height*r.pixelRatio),this.bindProgram(this.normalProgram),this.renderProgram(r,this.normalProgram),this.unbindProgram(this.normalProgram))}},{key:"drawWebGL",value:function(r,n){var i=n.gl,a=n.frameBuffer;if(i.bindFramebuffer(i.FRAMEBUFFER,a),!this.isInstanced)i.drawArrays(r,0,this.verticesCount);else if(i instanceof WebGL2RenderingContext)i.drawArraysInstanced(r,0,this.VERTICES,this.capacity);else{var s=i.getExtension("ANGLE_instanced_arrays");s&&s.drawArraysInstancedANGLE(r,0,this.VERTICES,this.capacity)}}}])})(),xY=(function(t){function e(){return er(this,e),Gr(this,e,arguments)}return Ur(e,t),tr(e,[{key:"kill",value:function(){fD(e,"kill",this)([])}},{key:"process",value:function(n,i,a){var s=i*this.STRIDE;if(a.hidden){for(var l=s+this.STRIDE;s<l;s++)this.array[s]=0;return}return this.processVisibleItem(cD(n),s,a)}}])})(hD),dx=(function(t){function e(){var r;er(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=Gr(this,e,[].concat(i)),se(r,"drawLabel",void 0),r}return Ur(e,t),tr(e,[{key:"kill",value:function(){fD(e,"kill",this)([])}},{key:"process",value:function(n,i,a,s,l){var c=i*this.STRIDE;if(l.hidden||a.hidden||s.hidden){for(var f=c+this.STRIDE;c<f;c++)this.array[c]=0;return}return this.processVisibleItem(cD(n),c,a,s,l)}}])})(hD);function SY(t,e){return(function(){function r(n,i,a){er(this,r),se(this,"drawLabel",e),this.programs=t.map(function(s){return new s(n,i,a)})}return tr(r,[{key:"reallocate",value:function(i){this.programs.forEach(function(a){return a.reallocate(i)})}},{key:"process",value:function(i,a,s,l,c){this.programs.forEach(function(f){return f.process(i,a,s,l,c)})}},{key:"render",value:function(i){this.programs.forEach(function(a){return a.render(i)})}},{key:"kill",value:function(){this.programs.forEach(function(i){return i.kill()})}}])})()}function _Y(t,e,r,n,i){var a=i.edgeLabelSize,s=i.edgeLabelFont,l=i.edgeLabelWeight,c=i.edgeLabelColor.attribute?e[i.edgeLabelColor.attribute]||i.edgeLabelColor.color||"#000":i.edgeLabelColor.color,f=e.label;if(f){t.fillStyle=c,t.font="".concat(l," ").concat(a,"px ").concat(s);var p=r.size,h=n.size,m=r.x,g=r.y,_=n.x,w=n.y,b=(m+_)/2,E=(g+w)/2,P=_-m,T=w-g,A=Math.sqrt(P*P+T*T);if(!(A<p+h)){m+=P*p/A,g+=T*p/A,_-=P*h/A,w-=T*h/A,b=(m+_)/2,E=(g+w)/2,P=_-m,T=w-g,A=Math.sqrt(P*P+T*T);var x=t.measureText(f).width;if(x>A){var O="…";for(f=f+O,x=t.measureText(f).width;x>A&&f.length>1;)f=f.slice(0,-2)+O,x=t.measureText(f).width;if(f.length<4)return}var C;P>0?T>0?C=Math.acos(P/A):C=Math.asin(T/A):T>0?C=Math.acos(P/A)+Math.PI:C=Math.asin(P/A)+Math.PI/2,t.save(),t.translate(b,E),t.rotate(C),t.fillText(f,-x/2,e.size/2+a),t.restore()}}}function pD(t,e,r){if(e.label){var n=r.labelSize,i=r.labelFont,a=r.labelWeight,s=r.labelColor.attribute?e[r.labelColor.attribute]||r.labelColor.color||"#000":r.labelColor.color;t.fillStyle=s,t.font="".concat(a," ").concat(n,"px ").concat(i),t.fillText(e.label,e.x+e.size+3,e.y+n/3)}}function EY(t,e,r){var n=r.labelSize,i=r.labelFont,a=r.labelWeight;t.font="".concat(a," ").concat(n,"px ").concat(i),t.fillStyle="#FFF",t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowBlur=8,t.shadowColor="#000";var s=2;if(typeof e.label=="string"){var l=t.measureText(e.label).width,c=Math.round(l+5),f=Math.round(n+2*s),p=Math.max(e.size,n/2)+s,h=Math.asin(f/2/p),m=Math.sqrt(Math.abs(Math.pow(p,2)-Math.pow(f/2,2)));t.beginPath(),t.moveTo(e.x+m,e.y+f/2),t.lineTo(e.x+p+c,e.y+f/2),t.lineTo(e.x+p+c,e.y-f/2),t.lineTo(e.x+m,e.y-f/2),t.arc(e.x,e.y,p,h,-h),t.closePath(),t.fill()}else t.beginPath(),t.arc(e.x,e.y,e.size+s,0,Math.PI*2),t.closePath(),t.fill();t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowBlur=0,pD(t,e,r)}var OY=`
203
+ precision highp float;
204
+
205
+ varying vec4 v_color;
206
+ varying vec2 v_diffVector;
207
+ varying float v_radius;
208
+
209
+ uniform float u_correctionRatio;
210
+
211
+ const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);
212
+
213
+ void main(void) {
214
+ float border = u_correctionRatio * 2.0;
215
+ float dist = length(v_diffVector) - v_radius + border;
216
+
217
+ // No antialiasing for picking mode:
218
+ #ifdef PICKING_MODE
219
+ if (dist > border)
220
+ gl_FragColor = transparent;
221
+ else
222
+ gl_FragColor = v_color;
223
+
224
+ #else
225
+ float t = 0.0;
226
+ if (dist > border)
227
+ t = 1.0;
228
+ else if (dist > 0.0)
229
+ t = dist / border;
230
+
231
+ gl_FragColor = mix(v_color, transparent, t);
232
+ #endif
233
+ }
234
+ `,AY=OY,PY=`
235
+ attribute vec4 a_id;
236
+ attribute vec4 a_color;
237
+ attribute vec2 a_position;
238
+ attribute float a_size;
239
+ attribute float a_angle;
240
+
241
+ uniform mat3 u_matrix;
242
+ uniform float u_sizeRatio;
243
+ uniform float u_correctionRatio;
244
+
245
+ varying vec4 v_color;
246
+ varying vec2 v_diffVector;
247
+ varying float v_radius;
248
+ varying float v_border;
249
+
250
+ const float bias = 255.0 / 254.0;
251
+
252
+ void main() {
253
+ float size = a_size * u_correctionRatio / u_sizeRatio * 4.0;
254
+ vec2 diffVector = size * vec2(cos(a_angle), sin(a_angle));
255
+ vec2 position = a_position + diffVector;
256
+ gl_Position = vec4(
257
+ (u_matrix * vec3(position, 1)).xy,
258
+ 0,
259
+ 1
260
+ );
261
+
262
+ v_diffVector = diffVector;
263
+ v_radius = size / 2.0;
264
+
265
+ #ifdef PICKING_MODE
266
+ // For picking mode, we use the ID as the color:
267
+ v_color = a_id;
268
+ #else
269
+ // For normal mode, we use the color:
270
+ v_color = a_color;
271
+ #endif
272
+
273
+ v_color.a *= bias;
274
+ }
275
+ `,TY=PY,vD=WebGLRenderingContext,Sk=vD.UNSIGNED_BYTE,o0=vD.FLOAT,CY=["u_sizeRatio","u_correctionRatio","u_matrix"],Zd=(function(t){function e(){return er(this,e),Gr(this,e,arguments)}return Ur(e,t),tr(e,[{key:"getDefinition",value:function(){return{VERTICES:3,VERTEX_SHADER_SOURCE:TY,FRAGMENT_SHADER_SOURCE:AY,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:CY,ATTRIBUTES:[{name:"a_position",size:2,type:o0},{name:"a_size",size:1,type:o0},{name:"a_color",size:4,type:Sk,normalized:!0},{name:"a_id",size:4,type:Sk,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_angle",size:1,type:o0}],CONSTANT_DATA:[[e.ANGLE_1],[e.ANGLE_2],[e.ANGLE_3]]}}},{key:"processVisibleItem",value:function(n,i,a){var s=this.array,l=Dl(a.color);s[i++]=a.x,s[i++]=a.y,s[i++]=a.size,s[i++]=l,s[i++]=n}},{key:"setUniforms",value:function(n,i){var a=i.gl,s=i.uniformLocations,l=s.u_sizeRatio,c=s.u_correctionRatio,f=s.u_matrix;a.uniform1f(c,n.correctionRatio),a.uniform1f(l,n.sizeRatio),a.uniformMatrix3fv(f,!1,n.matrix)}}])})(xY);se(Zd,"ANGLE_1",0);se(Zd,"ANGLE_2",2*Math.PI/3);se(Zd,"ANGLE_3",4*Math.PI/3);var kY=`
276
+ precision mediump float;
277
+
278
+ varying vec4 v_color;
279
+
280
+ void main(void) {
281
+ gl_FragColor = v_color;
282
+ }
283
+ `,RY=kY,jY=`
284
+ attribute vec2 a_position;
285
+ attribute vec2 a_normal;
286
+ attribute float a_radius;
287
+ attribute vec3 a_barycentric;
288
+
289
+ #ifdef PICKING_MODE
290
+ attribute vec4 a_id;
291
+ #else
292
+ attribute vec4 a_color;
293
+ #endif
294
+
295
+ uniform mat3 u_matrix;
296
+ uniform float u_sizeRatio;
297
+ uniform float u_correctionRatio;
298
+ uniform float u_minEdgeThickness;
299
+ uniform float u_lengthToThicknessRatio;
300
+ uniform float u_widenessToThicknessRatio;
301
+
302
+ varying vec4 v_color;
303
+
304
+ const float bias = 255.0 / 254.0;
305
+
306
+ void main() {
307
+ float minThickness = u_minEdgeThickness;
308
+
309
+ float normalLength = length(a_normal);
310
+ vec2 unitNormal = a_normal / normalLength;
311
+
312
+ // These first computations are taken from edge.vert.glsl and
313
+ // edge.clamped.vert.glsl. Please read it to get better comments on what's
314
+ // happening:
315
+ float pixelsThickness = max(normalLength / u_sizeRatio, minThickness);
316
+ float webGLThickness = pixelsThickness * u_correctionRatio;
317
+ float webGLNodeRadius = a_radius * 2.0 * u_correctionRatio / u_sizeRatio;
318
+ float webGLArrowHeadLength = webGLThickness * u_lengthToThicknessRatio * 2.0;
319
+ float webGLArrowHeadThickness = webGLThickness * u_widenessToThicknessRatio;
320
+
321
+ float da = a_barycentric.x;
322
+ float db = a_barycentric.y;
323
+ float dc = a_barycentric.z;
324
+
325
+ vec2 delta = vec2(
326
+ da * (webGLNodeRadius * unitNormal.y)
327
+ + db * ((webGLNodeRadius + webGLArrowHeadLength) * unitNormal.y + webGLArrowHeadThickness * unitNormal.x)
328
+ + dc * ((webGLNodeRadius + webGLArrowHeadLength) * unitNormal.y - webGLArrowHeadThickness * unitNormal.x),
329
+
330
+ da * (-webGLNodeRadius * unitNormal.x)
331
+ + db * (-(webGLNodeRadius + webGLArrowHeadLength) * unitNormal.x + webGLArrowHeadThickness * unitNormal.y)
332
+ + dc * (-(webGLNodeRadius + webGLArrowHeadLength) * unitNormal.x - webGLArrowHeadThickness * unitNormal.y)
333
+ );
334
+
335
+ vec2 position = (u_matrix * vec3(a_position + delta, 1)).xy;
336
+
337
+ gl_Position = vec4(position, 0, 1);
338
+
339
+ #ifdef PICKING_MODE
340
+ // For picking mode, we use the ID as the color:
341
+ v_color = a_id;
342
+ #else
343
+ // For normal mode, we use the color:
344
+ v_color = a_color;
345
+ #endif
346
+
347
+ v_color.a *= bias;
348
+ }
349
+ `,NY=jY,mD=WebGLRenderingContext,_k=mD.UNSIGNED_BYTE,cf=mD.FLOAT,DY=["u_matrix","u_sizeRatio","u_correctionRatio","u_minEdgeThickness","u_lengthToThicknessRatio","u_widenessToThicknessRatio"],gD={extremity:"target",lengthToThicknessRatio:2.5,widenessToThicknessRatio:2};function yD(t){var e=Pe(Pe({},gD),{});return(function(r){function n(){return er(this,n),Gr(this,n,arguments)}return Ur(n,r),tr(n,[{key:"getDefinition",value:function(){return{VERTICES:3,VERTEX_SHADER_SOURCE:NY,FRAGMENT_SHADER_SOURCE:RY,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:DY,ATTRIBUTES:[{name:"a_position",size:2,type:cf},{name:"a_normal",size:2,type:cf},{name:"a_radius",size:1,type:cf},{name:"a_color",size:4,type:_k,normalized:!0},{name:"a_id",size:4,type:_k,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_barycentric",size:3,type:cf}],CONSTANT_DATA:[[1,0,0],[0,1,0],[0,0,1]]}}},{key:"processVisibleItem",value:function(a,s,l,c,f){if(e.extremity==="source"){var p=[c,l];l=p[0],c=p[1]}var h=f.size||1,m=c.size||1,g=l.x,_=l.y,w=c.x,b=c.y,E=Dl(f.color),P=w-g,T=b-_,A=P*P+T*T,x=0,O=0;A&&(A=1/Math.sqrt(A),x=-T*A*h,O=P*A*h);var C=this.array;C[s++]=w,C[s++]=b,C[s++]=-x,C[s++]=-O,C[s++]=m,C[s++]=E,C[s++]=a}},{key:"setUniforms",value:function(a,s){var l=s.gl,c=s.uniformLocations,f=c.u_matrix,p=c.u_sizeRatio,h=c.u_correctionRatio,m=c.u_minEdgeThickness,g=c.u_lengthToThicknessRatio,_=c.u_widenessToThicknessRatio;l.uniformMatrix3fv(f,!1,a.matrix),l.uniform1f(p,a.sizeRatio),l.uniform1f(h,a.correctionRatio),l.uniform1f(m,a.minEdgeThickness),l.uniform1f(g,e.lengthToThicknessRatio),l.uniform1f(_,e.widenessToThicknessRatio)}}])})(dx)}yD();var IY=`
350
+ precision mediump float;
351
+
352
+ varying vec4 v_color;
353
+ varying vec2 v_normal;
354
+ varying float v_thickness;
355
+ varying float v_feather;
356
+
357
+ const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);
358
+
359
+ void main(void) {
360
+ // We only handle antialiasing for normal mode:
361
+ #ifdef PICKING_MODE
362
+ gl_FragColor = v_color;
363
+ #else
364
+ float dist = length(v_normal) * v_thickness;
365
+
366
+ float t = smoothstep(
367
+ v_thickness - v_feather,
368
+ v_thickness,
369
+ dist
370
+ );
371
+
372
+ gl_FragColor = mix(v_color, transparent, t);
373
+ #endif
374
+ }
375
+ `,bD=IY,MY=`
376
+ attribute vec4 a_id;
377
+ attribute vec4 a_color;
378
+ attribute vec2 a_normal;
379
+ attribute float a_normalCoef;
380
+ attribute vec2 a_positionStart;
381
+ attribute vec2 a_positionEnd;
382
+ attribute float a_positionCoef;
383
+ attribute float a_radius;
384
+ attribute float a_radiusCoef;
385
+
386
+ uniform mat3 u_matrix;
387
+ uniform float u_zoomRatio;
388
+ uniform float u_sizeRatio;
389
+ uniform float u_pixelRatio;
390
+ uniform float u_correctionRatio;
391
+ uniform float u_minEdgeThickness;
392
+ uniform float u_lengthToThicknessRatio;
393
+ uniform float u_feather;
394
+
395
+ varying vec4 v_color;
396
+ varying vec2 v_normal;
397
+ varying float v_thickness;
398
+ varying float v_feather;
399
+
400
+ const float bias = 255.0 / 254.0;
401
+
402
+ void main() {
403
+ float minThickness = u_minEdgeThickness;
404
+
405
+ float radius = a_radius * a_radiusCoef;
406
+ vec2 normal = a_normal * a_normalCoef;
407
+ vec2 position = a_positionStart * (1.0 - a_positionCoef) + a_positionEnd * a_positionCoef;
408
+
409
+ float normalLength = length(normal);
410
+ vec2 unitNormal = normal / normalLength;
411
+
412
+ // These first computations are taken from edge.vert.glsl. Please read it to
413
+ // get better comments on what's happening:
414
+ float pixelsThickness = max(normalLength, minThickness * u_sizeRatio);
415
+ float webGLThickness = pixelsThickness * u_correctionRatio / u_sizeRatio;
416
+
417
+ // Here, we move the point to leave space for the arrow head:
418
+ float direction = sign(radius);
419
+ float webGLNodeRadius = direction * radius * 2.0 * u_correctionRatio / u_sizeRatio;
420
+ float webGLArrowHeadLength = webGLThickness * u_lengthToThicknessRatio * 2.0;
421
+
422
+ vec2 compensationVector = vec2(-direction * unitNormal.y, direction * unitNormal.x) * (webGLNodeRadius + webGLArrowHeadLength);
423
+
424
+ // Here is the proper position of the vertex
425
+ gl_Position = vec4((u_matrix * vec3(position + unitNormal * webGLThickness + compensationVector, 1)).xy, 0, 1);
426
+
427
+ v_thickness = webGLThickness / u_zoomRatio;
428
+
429
+ v_normal = unitNormal;
430
+
431
+ v_feather = u_feather * u_correctionRatio / u_zoomRatio / u_pixelRatio * 2.0;
432
+
433
+ #ifdef PICKING_MODE
434
+ // For picking mode, we use the ID as the color:
435
+ v_color = a_id;
436
+ #else
437
+ // For normal mode, we use the color:
438
+ v_color = a_color;
439
+ #endif
440
+
441
+ v_color.a *= bias;
442
+ }
443
+ `,LY=MY,wD=WebGLRenderingContext,Ek=wD.UNSIGNED_BYTE,va=wD.FLOAT,$Y=["u_matrix","u_zoomRatio","u_sizeRatio","u_correctionRatio","u_pixelRatio","u_feather","u_minEdgeThickness","u_lengthToThicknessRatio"],FY={lengthToThicknessRatio:gD.lengthToThicknessRatio};function xD(t){var e=Pe(Pe({},FY),{});return(function(r){function n(){return er(this,n),Gr(this,n,arguments)}return Ur(n,r),tr(n,[{key:"getDefinition",value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:LY,FRAGMENT_SHADER_SOURCE:bD,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:$Y,ATTRIBUTES:[{name:"a_positionStart",size:2,type:va},{name:"a_positionEnd",size:2,type:va},{name:"a_normal",size:2,type:va},{name:"a_color",size:4,type:Ek,normalized:!0},{name:"a_id",size:4,type:Ek,normalized:!0},{name:"a_radius",size:1,type:va}],CONSTANT_ATTRIBUTES:[{name:"a_positionCoef",size:1,type:va},{name:"a_normalCoef",size:1,type:va},{name:"a_radiusCoef",size:1,type:va}],CONSTANT_DATA:[[0,1,0],[0,-1,0],[1,1,1],[1,1,1],[0,-1,0],[1,-1,-1]]}}},{key:"processVisibleItem",value:function(a,s,l,c,f){var p=f.size||1,h=l.x,m=l.y,g=c.x,_=c.y,w=Dl(f.color),b=g-h,E=_-m,P=c.size||1,T=b*b+E*E,A=0,x=0;T&&(T=1/Math.sqrt(T),A=-E*T*p,x=b*T*p);var O=this.array;O[s++]=h,O[s++]=m,O[s++]=g,O[s++]=_,O[s++]=A,O[s++]=x,O[s++]=w,O[s++]=a,O[s++]=P}},{key:"setUniforms",value:function(a,s){var l=s.gl,c=s.uniformLocations,f=c.u_matrix,p=c.u_zoomRatio,h=c.u_feather,m=c.u_pixelRatio,g=c.u_correctionRatio,_=c.u_sizeRatio,w=c.u_minEdgeThickness,b=c.u_lengthToThicknessRatio;l.uniformMatrix3fv(f,!1,a.matrix),l.uniform1f(p,a.zoomRatio),l.uniform1f(_,a.sizeRatio),l.uniform1f(g,a.correctionRatio),l.uniform1f(m,a.pixelRatio),l.uniform1f(h,a.antiAliasingFeather),l.uniform1f(w,a.minEdgeThickness),l.uniform1f(b,e.lengthToThicknessRatio)}}])})(dx)}xD();function BY(t){return SY([xD(),yD()])}var zY=BY(),GY=zY,UY=`
444
+ attribute vec4 a_id;
445
+ attribute vec4 a_color;
446
+ attribute vec2 a_normal;
447
+ attribute float a_normalCoef;
448
+ attribute vec2 a_positionStart;
449
+ attribute vec2 a_positionEnd;
450
+ attribute float a_positionCoef;
451
+
452
+ uniform mat3 u_matrix;
453
+ uniform float u_sizeRatio;
454
+ uniform float u_zoomRatio;
455
+ uniform float u_pixelRatio;
456
+ uniform float u_correctionRatio;
457
+ uniform float u_minEdgeThickness;
458
+ uniform float u_feather;
459
+
460
+ varying vec4 v_color;
461
+ varying vec2 v_normal;
462
+ varying float v_thickness;
463
+ varying float v_feather;
464
+
465
+ const float bias = 255.0 / 254.0;
466
+
467
+ void main() {
468
+ float minThickness = u_minEdgeThickness;
469
+
470
+ vec2 normal = a_normal * a_normalCoef;
471
+ vec2 position = a_positionStart * (1.0 - a_positionCoef) + a_positionEnd * a_positionCoef;
472
+
473
+ float normalLength = length(normal);
474
+ vec2 unitNormal = normal / normalLength;
475
+
476
+ // We require edges to be at least "minThickness" pixels thick *on screen*
477
+ // (so we need to compensate the size ratio):
478
+ float pixelsThickness = max(normalLength, minThickness * u_sizeRatio);
479
+
480
+ // Then, we need to retrieve the normalized thickness of the edge in the WebGL
481
+ // referential (in a ([0, 1], [0, 1]) space), using our "magic" correction
482
+ // ratio:
483
+ float webGLThickness = pixelsThickness * u_correctionRatio / u_sizeRatio;
484
+
485
+ // Here is the proper position of the vertex
486
+ gl_Position = vec4((u_matrix * vec3(position + unitNormal * webGLThickness, 1)).xy, 0, 1);
487
+
488
+ // For the fragment shader though, we need a thickness that takes the "magic"
489
+ // correction ratio into account (as in webGLThickness), but so that the
490
+ // antialiasing effect does not depend on the zoom level. So here's yet
491
+ // another thickness version:
492
+ v_thickness = webGLThickness / u_zoomRatio;
493
+
494
+ v_normal = unitNormal;
495
+
496
+ v_feather = u_feather * u_correctionRatio / u_zoomRatio / u_pixelRatio * 2.0;
497
+
498
+ #ifdef PICKING_MODE
499
+ // For picking mode, we use the ID as the color:
500
+ v_color = a_id;
501
+ #else
502
+ // For normal mode, we use the color:
503
+ v_color = a_color;
504
+ #endif
505
+
506
+ v_color.a *= bias;
507
+ }
508
+ `,qY=UY,SD=WebGLRenderingContext,Ok=SD.UNSIGNED_BYTE,mu=SD.FLOAT,WY=["u_matrix","u_zoomRatio","u_sizeRatio","u_correctionRatio","u_pixelRatio","u_feather","u_minEdgeThickness"],HY=(function(t){function e(){return er(this,e),Gr(this,e,arguments)}return Ur(e,t),tr(e,[{key:"getDefinition",value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:qY,FRAGMENT_SHADER_SOURCE:bD,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:WY,ATTRIBUTES:[{name:"a_positionStart",size:2,type:mu},{name:"a_positionEnd",size:2,type:mu},{name:"a_normal",size:2,type:mu},{name:"a_color",size:4,type:Ok,normalized:!0},{name:"a_id",size:4,type:Ok,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_positionCoef",size:1,type:mu},{name:"a_normalCoef",size:1,type:mu}],CONSTANT_DATA:[[0,1],[0,-1],[1,1],[1,1],[0,-1],[1,-1]]}}},{key:"processVisibleItem",value:function(n,i,a,s,l){var c=l.size||1,f=a.x,p=a.y,h=s.x,m=s.y,g=Dl(l.color),_=h-f,w=m-p,b=_*_+w*w,E=0,P=0;b&&(b=1/Math.sqrt(b),E=-w*b*c,P=_*b*c);var T=this.array;T[i++]=f,T[i++]=p,T[i++]=h,T[i++]=m,T[i++]=E,T[i++]=P,T[i++]=g,T[i++]=n}},{key:"setUniforms",value:function(n,i){var a=i.gl,s=i.uniformLocations,l=s.u_matrix,c=s.u_zoomRatio,f=s.u_feather,p=s.u_pixelRatio,h=s.u_correctionRatio,m=s.u_sizeRatio,g=s.u_minEdgeThickness;a.uniformMatrix3fv(l,!1,n.matrix),a.uniform1f(c,n.zoomRatio),a.uniform1f(m,n.sizeRatio),a.uniform1f(h,n.correctionRatio),a.uniform1f(p,n.pixelRatio),a.uniform1f(f,n.antiAliasingFeather),a.uniform1f(g,n.minEdgeThickness)}}])})(dx),hx=(function(t){function e(){var r;return er(this,e),r=Gr(this,e),r.rawEmitter=r,r}return Ur(e,t),tr(e)})(WN.EventEmitter),s0,Ak;function _D(){return Ak||(Ak=1,s0=function(e){return e!==null&&typeof e=="object"&&typeof e.addUndirectedEdgeWithKey=="function"&&typeof e.dropNode=="function"&&typeof e.multi=="boolean"}),s0}var VY=_D();const KY=tt(VY);var XY=function(e){return e},YY=function(e){return e*e},QY=function(e){return e*(2-e)},ZY=function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},JY=function(e){return e*e*e},eQ=function(e){return--e*e*e+1},tQ=function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},rQ={linear:XY,quadraticIn:YY,quadraticOut:QY,quadraticInOut:ZY,cubicIn:JY,cubicOut:eQ,cubicInOut:tQ},nQ={easing:"quadraticInOut",duration:150};function Jr(){return Float32Array.of(1,0,0,0,1,0,0,0,1)}function ff(t,e,r){return t[0]=e,t[4]=typeof r=="number"?r:e,t}function Pk(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[3]=-r,t[4]=n,t}function Tk(t,e,r){return t[6]=e,t[7]=r,t}function Ni(t,e){var r=t[0],n=t[1],i=t[2],a=t[3],s=t[4],l=t[5],c=t[6],f=t[7],p=t[8],h=e[0],m=e[1],g=e[2],_=e[3],w=e[4],b=e[5],E=e[6],P=e[7],T=e[8];return t[0]=h*r+m*a+g*c,t[1]=h*n+m*s+g*f,t[2]=h*i+m*l+g*p,t[3]=_*r+w*a+b*c,t[4]=_*n+w*s+b*f,t[5]=_*i+w*l+b*p,t[6]=E*r+P*a+T*c,t[7]=E*n+P*s+T*f,t[8]=E*i+P*l+T*p,t}function Kb(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,n=t[0],i=t[1],a=t[3],s=t[4],l=t[6],c=t[7],f=e.x,p=e.y;return{x:f*n+p*a+l*r,y:f*i+p*s+c*r}}function iQ(t,e){var r=t.height/t.width,n=e.height/e.width;return r<1&&n>1||r>1&&n<1?1:Math.min(Math.max(n,1/n),Math.max(1/r,r))}function gu(t,e,r,n,i){var a=t.angle,s=t.ratio,l=t.x,c=t.y,f=e.width,p=e.height,h=Jr(),m=Math.min(f,p)-2*n,g=iQ(e,r);return i?(Ni(h,Tk(Jr(),l,c)),Ni(h,ff(Jr(),s)),Ni(h,Pk(Jr(),a)),Ni(h,ff(Jr(),f/m/2/g,p/m/2/g))):(Ni(h,ff(Jr(),2*(m/f)*g,2*(m/p)*g)),Ni(h,Pk(Jr(),-a)),Ni(h,ff(Jr(),1/s)),Ni(h,Tk(Jr(),-l,-c))),h}function aQ(t,e,r){var n=Kb(t,{x:Math.cos(e.angle),y:Math.sin(e.angle)},0),i=n.x,a=n.y;return 1/Math.sqrt(Math.pow(i,2)+Math.pow(a,2))/r.width}function oQ(t){if(!t.order)return{x:[0,1],y:[0,1]};var e=1/0,r=-1/0,n=1/0,i=-1/0;return t.forEachNode(function(a,s){var l=s.x,c=s.y;l<e&&(e=l),l>r&&(r=l),c<n&&(n=c),c>i&&(i=c)}),{x:[e,r],y:[n,i]}}function sQ(t){if(!KY(t))throw new Error("Sigma: invalid graph instance.");t.forEachNode(function(e,r){if(!Number.isFinite(r.x)||!Number.isFinite(r.y))throw new Error("Sigma: Coordinates of node ".concat(e," are invalid. A node must have a numeric 'x' and 'y' attribute."))})}function uQ(t,e,r){var n=document.createElement(t);if(e)for(var i in e)n.style[i]=e[i];if(r)for(var a in r)n.setAttribute(a,r[a]);return n}function Ck(){return typeof window.devicePixelRatio<"u"?window.devicePixelRatio:1}function kk(t,e,r){return r.sort(function(n,i){var a=e(n)||0,s=e(i)||0;return a<s?-1:a>s?1:0})}function Rk(t){var e=us(t.x,2),r=e[0],n=e[1],i=us(t.y,2),a=i[0],s=i[1],l=Math.max(n-r,s-a),c=(n+r)/2,f=(s+a)/2;(l===0||Math.abs(l)===1/0||isNaN(l))&&(l=1),isNaN(c)&&(c=0),isNaN(f)&&(f=0);var p=function(m){return{x:.5+(m.x-c)/l,y:.5+(m.y-f)/l}};return p.applyTo=function(h){h.x=.5+(h.x-c)/l,h.y=.5+(h.y-f)/l},p.inverse=function(h){return{x:c+l*(h.x-.5),y:f+l*(h.y-.5)}},p.ratio=l,p}function Xb(t){"@babel/helpers - typeof";return Xb=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},Xb(t)}function jk(t,e){var r=e.size;if(r!==0){var n=t.length;t.length+=r;var i=0;e.forEach(function(a){t[n+i]=a,i++})}}function u0(t){t=t||{};for(var e=0,r=arguments.length<=1?0:arguments.length-1;e<r;e++){var n=e+1<1||arguments.length<=e+1?void 0:arguments[e+1];n&&Object.assign(t,n)}return t}var px={hideEdgesOnMove:!1,hideLabelsOnMove:!1,renderLabels:!0,renderEdgeLabels:!1,enableEdgeEvents:!1,defaultNodeColor:"#999",defaultNodeType:"circle",defaultEdgeColor:"#ccc",defaultEdgeType:"line",labelFont:"Arial",labelSize:14,labelWeight:"normal",labelColor:{color:"#000"},edgeLabelFont:"Arial",edgeLabelSize:14,edgeLabelWeight:"normal",edgeLabelColor:{attribute:"color"},stagePadding:30,defaultDrawEdgeLabel:_Y,defaultDrawNodeLabel:pD,defaultDrawNodeHover:EY,minEdgeThickness:1.7,antiAliasingFeather:1,dragTimeout:100,draggedEventsTolerance:3,inertiaDuration:200,inertiaRatio:3,zoomDuration:250,zoomingRatio:1.7,doubleClickTimeout:300,doubleClickZoomingRatio:2.2,doubleClickZoomingDuration:200,tapMoveTolerance:10,zoomToSizeRatioFunction:Math.sqrt,itemSizesReference:"screen",autoRescale:!0,autoCenter:!0,labelDensity:1,labelGridCellSize:100,labelRenderedSizeThreshold:6,nodeReducer:null,edgeReducer:null,zIndex:!1,minCameraRatio:null,maxCameraRatio:null,enableCameraZooming:!0,enableCameraPanning:!0,enableCameraRotation:!0,cameraPanBoundaries:null,allowInvalidContainer:!1,nodeProgramClasses:{},nodeHoverProgramClasses:{},edgeProgramClasses:{}},lQ={circle:Zd},cQ={arrow:GY,line:HY};function l0(t){if(typeof t.labelDensity!="number"||t.labelDensity<0)throw new Error("Settings: invalid `labelDensity`. Expecting a positive number.");var e=t.minCameraRatio,r=t.maxCameraRatio;if(typeof e=="number"&&typeof r=="number"&&r<e)throw new Error("Settings: invalid camera ratio boundaries. Expecting `maxCameraRatio` to be greater than `minCameraRatio`.")}function fQ(t){var e=u0({},px,t);return e.nodeProgramClasses=u0({},lQ,e.nodeProgramClasses),e.edgeProgramClasses=u0({},cQ,e.edgeProgramClasses),e}var df=1.5,Nk=(function(t){function e(){var r;return er(this,e),r=Gr(this,e),se(r,"x",.5),se(r,"y",.5),se(r,"angle",0),se(r,"ratio",1),se(r,"minRatio",null),se(r,"maxRatio",null),se(r,"enabledZooming",!0),se(r,"enabledPanning",!0),se(r,"enabledRotation",!0),se(r,"clean",null),se(r,"nextFrame",null),se(r,"previousState",null),se(r,"enabled",!0),r.previousState=r.getState(),r}return Ur(e,t),tr(e,[{key:"enable",value:function(){return this.enabled=!0,this}},{key:"disable",value:function(){return this.enabled=!1,this}},{key:"getState",value:function(){return{x:this.x,y:this.y,angle:this.angle,ratio:this.ratio}}},{key:"hasState",value:function(n){return this.x===n.x&&this.y===n.y&&this.ratio===n.ratio&&this.angle===n.angle}},{key:"getPreviousState",value:function(){var n=this.previousState;return n?{x:n.x,y:n.y,angle:n.angle,ratio:n.ratio}:null}},{key:"getBoundedRatio",value:function(n){var i=n;return typeof this.minRatio=="number"&&(i=Math.max(i,this.minRatio)),typeof this.maxRatio=="number"&&(i=Math.min(i,this.maxRatio)),i}},{key:"validateState",value:function(n){var i={};return this.enabledPanning&&typeof n.x=="number"&&(i.x=n.x),this.enabledPanning&&typeof n.y=="number"&&(i.y=n.y),this.enabledZooming&&typeof n.ratio=="number"&&(i.ratio=this.getBoundedRatio(n.ratio)),this.enabledRotation&&typeof n.angle=="number"&&(i.angle=n.angle),this.clean?this.clean(Pe(Pe({},this.getState()),i)):i}},{key:"isAnimated",value:function(){return!!this.nextFrame}},{key:"setState",value:function(n){if(!this.enabled)return this;this.previousState=this.getState();var i=this.validateState(n);return typeof i.x=="number"&&(this.x=i.x),typeof i.y=="number"&&(this.y=i.y),typeof i.ratio=="number"&&(this.ratio=i.ratio),typeof i.angle=="number"&&(this.angle=i.angle),this.hasState(this.previousState)||this.emit("updated",this.getState()),this}},{key:"updateState",value:function(n){return this.setState(n(this.getState())),this}},{key:"animate",value:function(n){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2?arguments[2]:void 0;if(!s)return new Promise(function(g){return i.animate(n,a,g)});if(this.enabled){var l=Pe(Pe({},nQ),a),c=this.validateState(n),f=typeof l.easing=="function"?l.easing:rQ[l.easing],p=Date.now(),h=this.getState(),m=function(){var _=(Date.now()-p)/l.duration;if(_>=1){i.nextFrame=null,i.setState(c),i.animationCallback&&(i.animationCallback.call(null),i.animationCallback=void 0);return}var w=f(_),b={};typeof c.x=="number"&&(b.x=h.x+(c.x-h.x)*w),typeof c.y=="number"&&(b.y=h.y+(c.y-h.y)*w),i.enabledRotation&&typeof c.angle=="number"&&(b.angle=h.angle+(c.angle-h.angle)*w),typeof c.ratio=="number"&&(b.ratio=h.ratio+(c.ratio-h.ratio)*w),i.setState(b),i.nextFrame=requestAnimationFrame(m)};this.nextFrame?(cancelAnimationFrame(this.nextFrame),this.animationCallback&&this.animationCallback.call(null),this.nextFrame=requestAnimationFrame(m)):m(),this.animationCallback=s}}},{key:"animatedZoom",value:function(n){return n?typeof n=="number"?this.animate({ratio:this.ratio/n}):this.animate({ratio:this.ratio/(n.factor||df)},n):this.animate({ratio:this.ratio/df})}},{key:"animatedUnzoom",value:function(n){return n?typeof n=="number"?this.animate({ratio:this.ratio*n}):this.animate({ratio:this.ratio*(n.factor||df)},n):this.animate({ratio:this.ratio*df})}},{key:"animatedReset",value:function(n){return this.animate({x:.5,y:.5,ratio:1,angle:0},n)}},{key:"copy",value:function(){return e.from(this.getState())}}],[{key:"from",value:function(n){var i=new e;return i.setState(n)}}])})(hx);function an(t,e){var r=e.getBoundingClientRect();return{x:t.clientX-r.left,y:t.clientY-r.top}}function Xn(t,e){var r=Pe(Pe({},an(t,e)),{},{sigmaDefaultPrevented:!1,preventSigmaDefault:function(){r.sigmaDefaultPrevented=!0},original:t});return r}function yu(t){var e="x"in t?t:Pe(Pe({},t.touches[0]||t.previousTouches[0]),{},{original:t.original,sigmaDefaultPrevented:t.sigmaDefaultPrevented,preventSigmaDefault:function(){t.sigmaDefaultPrevented=!0,e.sigmaDefaultPrevented=!0}});return e}function dQ(t,e){return Pe(Pe({},Xn(t,e)),{},{delta:ED(t)})}var hQ=2;function vf(t){for(var e=[],r=0,n=Math.min(t.length,hQ);r<n;r++)e.push(t[r]);return e}function bu(t,e,r){var n={touches:vf(t.touches).map(function(i){return an(i,r)}),previousTouches:e.map(function(i){return an(i,r)}),sigmaDefaultPrevented:!1,preventSigmaDefault:function(){n.sigmaDefaultPrevented=!0},original:t};return n}function ED(t){if(typeof t.deltaY<"u")return t.deltaY*-3/360;if(typeof t.detail<"u")return t.detail/-9;throw new Error("Captor: could not extract delta from event.")}var OD=(function(t){function e(r,n){var i;return er(this,e),i=Gr(this,e),i.container=r,i.renderer=n,i}return Ur(e,t),tr(e)})(hx),pQ=["doubleClickTimeout","doubleClickZoomingDuration","doubleClickZoomingRatio","dragTimeout","draggedEventsTolerance","inertiaDuration","inertiaRatio","zoomDuration","zoomingRatio"],vQ=pQ.reduce(function(t,e){return Pe(Pe({},t),{},se({},e,px[e]))},{}),mQ=(function(t){function e(r,n){var i;return er(this,e),i=Gr(this,e,[r,n]),se(i,"enabled",!0),se(i,"draggedEvents",0),se(i,"downStartTime",null),se(i,"lastMouseX",null),se(i,"lastMouseY",null),se(i,"isMouseDown",!1),se(i,"isMoving",!1),se(i,"movingTimeout",null),se(i,"startCameraState",null),se(i,"clicks",0),se(i,"doubleClickTimeout",null),se(i,"currentWheelDirection",0),se(i,"settings",vQ),i.handleClick=i.handleClick.bind(i),i.handleRightClick=i.handleRightClick.bind(i),i.handleDown=i.handleDown.bind(i),i.handleUp=i.handleUp.bind(i),i.handleMove=i.handleMove.bind(i),i.handleWheel=i.handleWheel.bind(i),i.handleLeave=i.handleLeave.bind(i),i.handleEnter=i.handleEnter.bind(i),r.addEventListener("click",i.handleClick,{capture:!1}),r.addEventListener("contextmenu",i.handleRightClick,{capture:!1}),r.addEventListener("mousedown",i.handleDown,{capture:!1}),r.addEventListener("wheel",i.handleWheel,{capture:!1}),r.addEventListener("mouseleave",i.handleLeave,{capture:!1}),r.addEventListener("mouseenter",i.handleEnter,{capture:!1}),document.addEventListener("mousemove",i.handleMove,{capture:!1}),document.addEventListener("mouseup",i.handleUp,{capture:!1}),i}return Ur(e,t),tr(e,[{key:"kill",value:function(){var n=this.container;n.removeEventListener("click",this.handleClick),n.removeEventListener("contextmenu",this.handleRightClick),n.removeEventListener("mousedown",this.handleDown),n.removeEventListener("wheel",this.handleWheel),n.removeEventListener("mouseleave",this.handleLeave),n.removeEventListener("mouseenter",this.handleEnter),document.removeEventListener("mousemove",this.handleMove),document.removeEventListener("mouseup",this.handleUp)}},{key:"handleClick",value:function(n){var i=this;if(this.enabled){if(this.clicks++,this.clicks===2)return this.clicks=0,typeof this.doubleClickTimeout=="number"&&(clearTimeout(this.doubleClickTimeout),this.doubleClickTimeout=null),this.handleDoubleClick(n);setTimeout(function(){i.clicks=0,i.doubleClickTimeout=null},this.settings.doubleClickTimeout),this.draggedEvents<this.settings.draggedEventsTolerance&&this.emit("click",Xn(n,this.container))}}},{key:"handleRightClick",value:function(n){this.enabled&&this.emit("rightClick",Xn(n,this.container))}},{key:"handleDoubleClick",value:function(n){if(this.enabled){n.preventDefault(),n.stopPropagation();var i=Xn(n,this.container);if(this.emit("doubleClick",i),!i.sigmaDefaultPrevented){var a=this.renderer.getCamera(),s=a.getBoundedRatio(a.getState().ratio/this.settings.doubleClickZoomingRatio);a.animate(this.renderer.getViewportZoomedState(an(n,this.container),s),{easing:"quadraticInOut",duration:this.settings.doubleClickZoomingDuration})}}}},{key:"handleDown",value:function(n){if(this.enabled){if(n.button===0){this.startCameraState=this.renderer.getCamera().getState();var i=an(n,this.container),a=i.x,s=i.y;this.lastMouseX=a,this.lastMouseY=s,this.draggedEvents=0,this.downStartTime=Date.now(),this.isMouseDown=!0}this.emit("mousedown",Xn(n,this.container))}}},{key:"handleUp",value:function(n){var i=this;if(!(!this.enabled||!this.isMouseDown)){var a=this.renderer.getCamera();this.isMouseDown=!1,typeof this.movingTimeout=="number"&&(clearTimeout(this.movingTimeout),this.movingTimeout=null);var s=an(n,this.container),l=s.x,c=s.y,f=a.getState(),p=a.getPreviousState()||{x:0,y:0};this.isMoving?a.animate({x:f.x+this.settings.inertiaRatio*(f.x-p.x),y:f.y+this.settings.inertiaRatio*(f.y-p.y)},{duration:this.settings.inertiaDuration,easing:"quadraticOut"}):(this.lastMouseX!==l||this.lastMouseY!==c)&&a.setState({x:f.x,y:f.y}),this.isMoving=!1,setTimeout(function(){var h=i.draggedEvents>0;i.draggedEvents=0,h&&i.renderer.getSetting("hideEdgesOnMove")&&i.renderer.refresh()},0),this.emit("mouseup",Xn(n,this.container))}}},{key:"handleMove",value:function(n){var i=this;if(this.enabled){var a=Xn(n,this.container);if(this.emit("mousemovebody",a),(n.target===this.container||n.composedPath()[0]===this.container)&&this.emit("mousemove",a),!a.sigmaDefaultPrevented&&this.isMouseDown){this.isMoving=!0,this.draggedEvents++,typeof this.movingTimeout=="number"&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout(function(){i.movingTimeout=null,i.isMoving=!1},this.settings.dragTimeout);var s=this.renderer.getCamera(),l=an(n,this.container),c=l.x,f=l.y,p=this.renderer.viewportToFramedGraph({x:this.lastMouseX,y:this.lastMouseY}),h=this.renderer.viewportToFramedGraph({x:c,y:f}),m=p.x-h.x,g=p.y-h.y,_=s.getState(),w=_.x+m,b=_.y+g;s.setState({x:w,y:b}),this.lastMouseX=c,this.lastMouseY=f,n.preventDefault(),n.stopPropagation()}}}},{key:"handleLeave",value:function(n){this.emit("mouseleave",Xn(n,this.container))}},{key:"handleEnter",value:function(n){this.emit("mouseenter",Xn(n,this.container))}},{key:"handleWheel",value:function(n){var i=this,a=this.renderer.getCamera();if(!(!this.enabled||!a.enabledZooming)){var s=ED(n);if(s){var l=dQ(n,this.container);if(this.emit("wheel",l),l.sigmaDefaultPrevented){n.preventDefault(),n.stopPropagation();return}var c=a.getState().ratio,f=s>0?1/this.settings.zoomingRatio:this.settings.zoomingRatio,p=a.getBoundedRatio(c*f),h=s>0?1:-1,m=Date.now();c!==p&&(n.preventDefault(),n.stopPropagation(),!(this.currentWheelDirection===h&&this.lastWheelTriggerTime&&m-this.lastWheelTriggerTime<this.settings.zoomDuration/5)&&(a.animate(this.renderer.getViewportZoomedState(an(n,this.container),p),{easing:"quadraticOut",duration:this.settings.zoomDuration},function(){i.currentWheelDirection=0}),this.currentWheelDirection=h,this.lastWheelTriggerTime=m))}}}},{key:"setSettings",value:function(n){this.settings=n}}])})(OD),gQ=["dragTimeout","inertiaDuration","inertiaRatio","doubleClickTimeout","doubleClickZoomingRatio","doubleClickZoomingDuration","tapMoveTolerance"],yQ=gQ.reduce(function(t,e){return Pe(Pe({},t),{},se({},e,px[e]))},{}),bQ=(function(t){function e(r,n){var i;return er(this,e),i=Gr(this,e,[r,n]),se(i,"enabled",!0),se(i,"isMoving",!1),se(i,"hasMoved",!1),se(i,"touchMode",0),se(i,"startTouchesPositions",[]),se(i,"lastTouches",[]),se(i,"lastTap",null),se(i,"settings",yQ),i.handleStart=i.handleStart.bind(i),i.handleLeave=i.handleLeave.bind(i),i.handleMove=i.handleMove.bind(i),r.addEventListener("touchstart",i.handleStart,{capture:!1}),r.addEventListener("touchcancel",i.handleLeave,{capture:!1}),document.addEventListener("touchend",i.handleLeave,{capture:!1,passive:!1}),document.addEventListener("touchmove",i.handleMove,{capture:!1,passive:!1}),i}return Ur(e,t),tr(e,[{key:"kill",value:function(){var n=this.container;n.removeEventListener("touchstart",this.handleStart),n.removeEventListener("touchcancel",this.handleLeave),document.removeEventListener("touchend",this.handleLeave),document.removeEventListener("touchmove",this.handleMove)}},{key:"getDimensions",value:function(){return{width:this.container.offsetWidth,height:this.container.offsetHeight}}},{key:"handleStart",value:function(n){var i=this;if(this.enabled){n.preventDefault();var a=vf(n.touches);if(this.touchMode=a.length,this.startCameraState=this.renderer.getCamera().getState(),this.startTouchesPositions=a.map(function(g){return an(g,i.container)}),this.touchMode===2){var s=us(this.startTouchesPositions,2),l=s[0],c=l.x,f=l.y,p=s[1],h=p.x,m=p.y;this.startTouchesAngle=Math.atan2(m-f,h-c),this.startTouchesDistance=Math.sqrt(Math.pow(h-c,2)+Math.pow(m-f,2))}this.emit("touchdown",bu(n,this.lastTouches,this.container)),this.lastTouches=a,this.lastTouchesPositions=this.startTouchesPositions}}},{key:"handleLeave",value:function(n){if(!(!this.enabled||!this.startTouchesPositions.length)){switch(n.cancelable&&n.preventDefault(),this.movingTimeout&&(this.isMoving=!1,clearTimeout(this.movingTimeout)),this.touchMode){case 2:if(n.touches.length===1){this.handleStart(n),n.preventDefault();break}case 1:if(this.isMoving){var i=this.renderer.getCamera(),a=i.getState(),s=i.getPreviousState()||{x:0,y:0};i.animate({x:a.x+this.settings.inertiaRatio*(a.x-s.x),y:a.y+this.settings.inertiaRatio*(a.y-s.y)},{duration:this.settings.inertiaDuration,easing:"quadraticOut"})}this.hasMoved=!1,this.isMoving=!1,this.touchMode=0;break}if(this.emit("touchup",bu(n,this.lastTouches,this.container)),!n.touches.length){var l=an(this.lastTouches[0],this.container),c=this.startTouchesPositions[0],f=Math.pow(l.x-c.x,2)+Math.pow(l.y-c.y,2);if(!n.touches.length&&f<Math.pow(this.settings.tapMoveTolerance,2))if(this.lastTap&&Date.now()-this.lastTap.time<this.settings.doubleClickTimeout){var p=bu(n,this.lastTouches,this.container);if(this.emit("doubletap",p),this.lastTap=null,!p.sigmaDefaultPrevented){var h=this.renderer.getCamera(),m=h.getBoundedRatio(h.getState().ratio/this.settings.doubleClickZoomingRatio);h.animate(this.renderer.getViewportZoomedState(l,m),{easing:"quadraticInOut",duration:this.settings.doubleClickZoomingDuration})}}else{var g=bu(n,this.lastTouches,this.container);this.emit("tap",g),this.lastTap={time:Date.now(),position:g.touches[0]||g.previousTouches[0]}}}this.lastTouches=vf(n.touches),this.startTouchesPositions=[]}}},{key:"handleMove",value:function(n){var i=this;if(!(!this.enabled||!this.startTouchesPositions.length)){n.preventDefault();var a=vf(n.touches),s=a.map(function(F){return an(F,i.container)}),l=this.lastTouches;this.lastTouches=a,this.lastTouchesPositions=s;var c=bu(n,l,this.container);if(this.emit("touchmove",c),!c.sigmaDefaultPrevented&&(this.hasMoved||(this.hasMoved=s.some(function(F,H){var te=i.startTouchesPositions[H];return te&&(F.x!==te.x||F.y!==te.y)})),!!this.hasMoved)){this.isMoving=!0,this.movingTimeout&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout(function(){i.isMoving=!1},this.settings.dragTimeout);var f=this.renderer.getCamera(),p=this.startCameraState,h=this.renderer.getSetting("stagePadding");switch(this.touchMode){case 1:{var m=this.renderer.viewportToFramedGraph((this.startTouchesPositions||[])[0]),g=m.x,_=m.y,w=this.renderer.viewportToFramedGraph(s[0]),b=w.x,E=w.y;f.setState({x:p.x+g-b,y:p.y+_-E});break}case 2:{var P={x:.5,y:.5,angle:0,ratio:1},T=s[0],A=T.x,x=T.y,O=s[1],C=O.x,N=O.y,D=Math.atan2(N-x,C-A)-this.startTouchesAngle,B=Math.hypot(N-x,C-A)/this.startTouchesDistance,U=f.getBoundedRatio(p.ratio/B);P.ratio=U,P.angle=p.angle+D;var L=this.getDimensions(),j=this.renderer.viewportToFramedGraph((this.startTouchesPositions||[])[0],{cameraState:p}),X=Math.min(L.width,L.height)-2*h,K=X/L.width,G=X/L.height,M=U/X,V=A-X/2/K,J=x-X/2/G,ee=[V*Math.cos(-P.angle)-J*Math.sin(-P.angle),J*Math.cos(-P.angle)+V*Math.sin(-P.angle)];V=ee[0],J=ee[1],P.x=j.x-V*M,P.y=j.y+J*M,f.setState(P);break}}}}}},{key:"setSettings",value:function(n){this.settings=n}}])})(OD);function wQ(t){if(Array.isArray(t))return Hb(t)}function xQ(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function SQ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
509
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dk(t){return wQ(t)||xQ(t)||sD(t)||SQ()}function _Q(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}function c0(t,e){if(t==null)return{};var r,n,i=_Q(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}var Ik=(function(){function t(e,r){er(this,t),this.key=e,this.size=r}return tr(t,null,[{key:"compare",value:function(r,n){return r.size>n.size?-1:r.size<n.size||r.key>n.key?1:-1}}])})(),Mk=(function(){function t(){er(this,t),se(this,"width",0),se(this,"height",0),se(this,"cellSize",0),se(this,"columns",0),se(this,"rows",0),se(this,"cells",{})}return tr(t,[{key:"resizeAndClear",value:function(r,n){this.width=r.width,this.height=r.height,this.cellSize=n,this.columns=Math.ceil(r.width/n),this.rows=Math.ceil(r.height/n),this.cells={}}},{key:"getIndex",value:function(r){var n=Math.floor(r.x/this.cellSize),i=Math.floor(r.y/this.cellSize);return i*this.columns+n}},{key:"add",value:function(r,n,i){var a=new Ik(r,n),s=this.getIndex(i),l=this.cells[s];l||(l=[],this.cells[s]=l),l.push(a)}},{key:"organize",value:function(){for(var r in this.cells){var n=this.cells[r];n.sort(Ik.compare)}}},{key:"getLabelsToDisplay",value:function(r,n){var i=this.cellSize*this.cellSize,a=i/r/r,s=a*n/i,l=Math.ceil(s),c=[];for(var f in this.cells)for(var p=this.cells[f],h=0;h<Math.min(l,p.length);h++)c.push(p[h].key);return c}}])})();function EQ(t){var e=t.graph,r=t.hoveredNode,n=t.highlightedNodes,i=t.displayedNodeLabels,a=[];return e.forEachEdge(function(s,l,c,f){(c===r||f===r||n.has(c)||n.has(f)||i.has(c)&&i.has(f))&&a.push(s)}),a}var Lk=150,$k=50,Zn=Object.prototype.hasOwnProperty;function OQ(t,e,r){if(!Zn.call(r,"x")||!Zn.call(r,"y"))throw new Error('Sigma: could not find a valid position (x, y) for node "'.concat(e,'". All your nodes must have a number "x" and "y". Maybe your forgot to apply a layout or your "nodeReducer" is not returning the correct data?'));return r.color||(r.color=t.defaultNodeColor),!r.label&&r.label!==""&&(r.label=null),r.label!==void 0&&r.label!==null?r.label=""+r.label:r.label=null,r.size||(r.size=2),Zn.call(r,"hidden")||(r.hidden=!1),Zn.call(r,"highlighted")||(r.highlighted=!1),Zn.call(r,"forceLabel")||(r.forceLabel=!1),(!r.type||r.type==="")&&(r.type=t.defaultNodeType),r.zIndex||(r.zIndex=0),r}function AQ(t,e,r){return r.color||(r.color=t.defaultEdgeColor),r.label||(r.label=""),r.size||(r.size=.5),Zn.call(r,"hidden")||(r.hidden=!1),Zn.call(r,"forceLabel")||(r.forceLabel=!1),(!r.type||r.type==="")&&(r.type=t.defaultEdgeType),r.zIndex||(r.zIndex=0),r}var PQ=(function(t){function e(r,n){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(er(this,e),i=Gr(this,e),se(i,"elements",{}),se(i,"canvasContexts",{}),se(i,"webGLContexts",{}),se(i,"pickingLayers",new Set),se(i,"textures",{}),se(i,"frameBuffers",{}),se(i,"activeListeners",{}),se(i,"labelGrid",new Mk),se(i,"nodeDataCache",{}),se(i,"edgeDataCache",{}),se(i,"nodeProgramIndex",{}),se(i,"edgeProgramIndex",{}),se(i,"nodesWithForcedLabels",new Set),se(i,"edgesWithForcedLabels",new Set),se(i,"nodeExtent",{x:[0,1],y:[0,1]}),se(i,"nodeZExtent",[1/0,-1/0]),se(i,"edgeZExtent",[1/0,-1/0]),se(i,"matrix",Jr()),se(i,"invMatrix",Jr()),se(i,"correctionRatio",1),se(i,"customBBox",null),se(i,"normalizationFunction",Rk({x:[0,1],y:[0,1]})),se(i,"graphToViewportRatio",1),se(i,"itemIDsIndex",{}),se(i,"nodeIndices",{}),se(i,"edgeIndices",{}),se(i,"width",0),se(i,"height",0),se(i,"pixelRatio",Ck()),se(i,"pickingDownSizingRatio",2*i.pixelRatio),se(i,"displayedNodeLabels",new Set),se(i,"displayedEdgeLabels",new Set),se(i,"highlightedNodes",new Set),se(i,"hoveredNode",null),se(i,"hoveredEdge",null),se(i,"renderFrame",null),se(i,"renderHighlightedNodesFrame",null),se(i,"needToProcess",!1),se(i,"checkEdgesEventsFrame",null),se(i,"nodePrograms",{}),se(i,"nodeHoverPrograms",{}),se(i,"edgePrograms",{}),i.settings=fQ(a),l0(i.settings),sQ(r),!(n instanceof HTMLElement))throw new Error("Sigma: container should be an html element.");i.graph=r,i.container=n,i.createWebGLContext("edges",{picking:a.enableEdgeEvents}),i.createCanvasContext("edgeLabels"),i.createWebGLContext("nodes",{picking:!0}),i.createCanvasContext("labels"),i.createCanvasContext("hovers"),i.createWebGLContext("hoverNodes"),i.createCanvasContext("mouse",{style:{touchAction:"none",userSelect:"none"}}),i.resize();for(var s in i.settings.nodeProgramClasses)i.registerNodeProgram(s,i.settings.nodeProgramClasses[s],i.settings.nodeHoverProgramClasses[s]);for(var l in i.settings.edgeProgramClasses)i.registerEdgeProgram(l,i.settings.edgeProgramClasses[l]);return i.camera=new Nk,i.bindCameraHandlers(),i.mouseCaptor=new mQ(i.elements.mouse,i),i.mouseCaptor.setSettings(i.settings),i.touchCaptor=new bQ(i.elements.mouse,i),i.touchCaptor.setSettings(i.settings),i.bindEventHandlers(),i.bindGraphHandlers(),i.handleSettingsUpdate(),i.refresh(),i}return Ur(e,t),tr(e,[{key:"registerNodeProgram",value:function(n,i,a){return this.nodePrograms[n]&&this.nodePrograms[n].kill(),this.nodeHoverPrograms[n]&&this.nodeHoverPrograms[n].kill(),this.nodePrograms[n]=new i(this.webGLContexts.nodes,this.frameBuffers.nodes,this),this.nodeHoverPrograms[n]=new(a||i)(this.webGLContexts.hoverNodes,null,this),this}},{key:"registerEdgeProgram",value:function(n,i){return this.edgePrograms[n]&&this.edgePrograms[n].kill(),this.edgePrograms[n]=new i(this.webGLContexts.edges,this.frameBuffers.edges,this),this}},{key:"unregisterNodeProgram",value:function(n){if(this.nodePrograms[n]){var i=this.nodePrograms,a=i[n],s=c0(i,[n].map(ku));a.kill(),this.nodePrograms=s}if(this.nodeHoverPrograms[n]){var l=this.nodeHoverPrograms,c=l[n],f=c0(l,[n].map(ku));c.kill(),this.nodePrograms=f}return this}},{key:"unregisterEdgeProgram",value:function(n){if(this.edgePrograms[n]){var i=this.edgePrograms,a=i[n],s=c0(i,[n].map(ku));a.kill(),this.edgePrograms=s}return this}},{key:"resetWebGLTexture",value:function(n){var i=this.webGLContexts[n],a=this.frameBuffers[n],s=this.textures[n];s&&i.deleteTexture(s);var l=i.createTexture();return i.bindFramebuffer(i.FRAMEBUFFER,a),i.bindTexture(i.TEXTURE_2D,l),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,this.width,this.height,0,i.RGBA,i.UNSIGNED_BYTE,null),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,l,0),this.textures[n]=l,this}},{key:"bindCameraHandlers",value:function(){var n=this;return this.activeListeners.camera=function(){n.scheduleRender()},this.camera.on("updated",this.activeListeners.camera),this}},{key:"unbindCameraHandlers",value:function(){return this.camera.removeListener("updated",this.activeListeners.camera),this}},{key:"getNodeAtPosition",value:function(n){var i=n.x,a=n.y,s=yk(this.webGLContexts.nodes,this.frameBuffers.nodes,i,a,this.pixelRatio,this.pickingDownSizingRatio),l=gk.apply(void 0,Dk(s)),c=this.itemIDsIndex[l];return c&&c.type==="node"?c.id:null}},{key:"bindEventHandlers",value:function(){var n=this;this.activeListeners.handleResize=function(){n.scheduleRefresh()},window.addEventListener("resize",this.activeListeners.handleResize),this.activeListeners.handleMove=function(a){var s=yu(a),l={event:s,preventSigmaDefault:function(){s.preventSigmaDefault()}},c=n.getNodeAtPosition(s);if(c&&n.hoveredNode!==c&&!n.nodeDataCache[c].hidden){n.hoveredNode&&n.emit("leaveNode",Pe(Pe({},l),{},{node:n.hoveredNode})),n.hoveredNode=c,n.emit("enterNode",Pe(Pe({},l),{},{node:c})),n.scheduleHighlightedNodesRender();return}if(n.hoveredNode&&n.getNodeAtPosition(s)!==n.hoveredNode){var f=n.hoveredNode;n.hoveredNode=null,n.emit("leaveNode",Pe(Pe({},l),{},{node:f})),n.scheduleHighlightedNodesRender();return}if(n.settings.enableEdgeEvents){var p=n.hoveredNode?null:n.getEdgeAtPoint(l.event.x,l.event.y);p!==n.hoveredEdge&&(n.hoveredEdge&&n.emit("leaveEdge",Pe(Pe({},l),{},{edge:n.hoveredEdge})),p&&n.emit("enterEdge",Pe(Pe({},l),{},{edge:p})),n.hoveredEdge=p)}},this.activeListeners.handleMoveBody=function(a){var s=yu(a);n.emit("moveBody",{event:s,preventSigmaDefault:function(){s.preventSigmaDefault()}})},this.activeListeners.handleLeave=function(a){var s=yu(a),l={event:s,preventSigmaDefault:function(){s.preventSigmaDefault()}};n.hoveredNode&&(n.emit("leaveNode",Pe(Pe({},l),{},{node:n.hoveredNode})),n.scheduleHighlightedNodesRender()),n.settings.enableEdgeEvents&&n.hoveredEdge&&(n.emit("leaveEdge",Pe(Pe({},l),{},{edge:n.hoveredEdge})),n.scheduleHighlightedNodesRender()),n.emit("leaveStage",Pe({},l))},this.activeListeners.handleEnter=function(a){var s=yu(a),l={event:s,preventSigmaDefault:function(){s.preventSigmaDefault()}};n.emit("enterStage",Pe({},l))};var i=function(s){return function(l){var c=yu(l),f={event:c,preventSigmaDefault:function(){c.preventSigmaDefault()}},p=n.getNodeAtPosition(c);if(p)return n.emit("".concat(s,"Node"),Pe(Pe({},f),{},{node:p}));if(n.settings.enableEdgeEvents){var h=n.getEdgeAtPoint(c.x,c.y);if(h)return n.emit("".concat(s,"Edge"),Pe(Pe({},f),{},{edge:h}))}return n.emit("".concat(s,"Stage"),f)}};return this.activeListeners.handleClick=i("click"),this.activeListeners.handleRightClick=i("rightClick"),this.activeListeners.handleDoubleClick=i("doubleClick"),this.activeListeners.handleWheel=i("wheel"),this.activeListeners.handleDown=i("down"),this.activeListeners.handleUp=i("up"),this.mouseCaptor.on("mousemove",this.activeListeners.handleMove),this.mouseCaptor.on("mousemovebody",this.activeListeners.handleMoveBody),this.mouseCaptor.on("click",this.activeListeners.handleClick),this.mouseCaptor.on("rightClick",this.activeListeners.handleRightClick),this.mouseCaptor.on("doubleClick",this.activeListeners.handleDoubleClick),this.mouseCaptor.on("wheel",this.activeListeners.handleWheel),this.mouseCaptor.on("mousedown",this.activeListeners.handleDown),this.mouseCaptor.on("mouseup",this.activeListeners.handleUp),this.mouseCaptor.on("mouseleave",this.activeListeners.handleLeave),this.mouseCaptor.on("mouseenter",this.activeListeners.handleEnter),this.touchCaptor.on("touchdown",this.activeListeners.handleDown),this.touchCaptor.on("touchdown",this.activeListeners.handleMove),this.touchCaptor.on("touchup",this.activeListeners.handleUp),this.touchCaptor.on("touchmove",this.activeListeners.handleMove),this.touchCaptor.on("tap",this.activeListeners.handleClick),this.touchCaptor.on("doubletap",this.activeListeners.handleDoubleClick),this.touchCaptor.on("touchmove",this.activeListeners.handleMoveBody),this}},{key:"bindGraphHandlers",value:function(){var n=this,i=this.graph,a=new Set(["x","y","zIndex","type"]);return this.activeListeners.eachNodeAttributesUpdatedGraphUpdate=function(s){var l,c=(l=s.hints)===null||l===void 0?void 0:l.attributes;n.graph.forEachNode(function(p){return n.updateNode(p)});var f=!c||c.some(function(p){return a.has(p)});n.refresh({partialGraph:{nodes:i.nodes()},skipIndexation:!f,schedule:!0})},this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate=function(s){var l,c=(l=s.hints)===null||l===void 0?void 0:l.attributes;n.graph.forEachEdge(function(p){return n.updateEdge(p)});var f=c&&["zIndex","type"].some(function(p){return c==null?void 0:c.includes(p)});n.refresh({partialGraph:{edges:i.edges()},skipIndexation:!f,schedule:!0})},this.activeListeners.addNodeGraphUpdate=function(s){var l=s.key;n.addNode(l),n.refresh({partialGraph:{nodes:[l]},skipIndexation:!1,schedule:!0})},this.activeListeners.updateNodeGraphUpdate=function(s){var l=s.key;n.refresh({partialGraph:{nodes:[l]},skipIndexation:!1,schedule:!0})},this.activeListeners.dropNodeGraphUpdate=function(s){var l=s.key;n.removeNode(l),n.refresh({schedule:!0})},this.activeListeners.addEdgeGraphUpdate=function(s){var l=s.key;n.addEdge(l),n.refresh({partialGraph:{edges:[l]},schedule:!0})},this.activeListeners.updateEdgeGraphUpdate=function(s){var l=s.key;n.refresh({partialGraph:{edges:[l]},skipIndexation:!1,schedule:!0})},this.activeListeners.dropEdgeGraphUpdate=function(s){var l=s.key;n.removeEdge(l),n.refresh({schedule:!0})},this.activeListeners.clearEdgesGraphUpdate=function(){n.clearEdgeState(),n.clearEdgeIndices(),n.refresh({schedule:!0})},this.activeListeners.clearGraphUpdate=function(){n.clearEdgeState(),n.clearNodeState(),n.clearEdgeIndices(),n.clearNodeIndices(),n.refresh({schedule:!0})},i.on("nodeAdded",this.activeListeners.addNodeGraphUpdate),i.on("nodeDropped",this.activeListeners.dropNodeGraphUpdate),i.on("nodeAttributesUpdated",this.activeListeners.updateNodeGraphUpdate),i.on("eachNodeAttributesUpdated",this.activeListeners.eachNodeAttributesUpdatedGraphUpdate),i.on("edgeAdded",this.activeListeners.addEdgeGraphUpdate),i.on("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),i.on("edgeAttributesUpdated",this.activeListeners.updateEdgeGraphUpdate),i.on("eachEdgeAttributesUpdated",this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate),i.on("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),i.on("cleared",this.activeListeners.clearGraphUpdate),this}},{key:"unbindGraphHandlers",value:function(){var n=this.graph;n.removeListener("nodeAdded",this.activeListeners.addNodeGraphUpdate),n.removeListener("nodeDropped",this.activeListeners.dropNodeGraphUpdate),n.removeListener("nodeAttributesUpdated",this.activeListeners.updateNodeGraphUpdate),n.removeListener("eachNodeAttributesUpdated",this.activeListeners.eachNodeAttributesUpdatedGraphUpdate),n.removeListener("edgeAdded",this.activeListeners.addEdgeGraphUpdate),n.removeListener("edgeDropped",this.activeListeners.dropEdgeGraphUpdate),n.removeListener("edgeAttributesUpdated",this.activeListeners.updateEdgeGraphUpdate),n.removeListener("eachEdgeAttributesUpdated",this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate),n.removeListener("edgesCleared",this.activeListeners.clearEdgesGraphUpdate),n.removeListener("cleared",this.activeListeners.clearGraphUpdate)}},{key:"getEdgeAtPoint",value:function(n,i){var a=yk(this.webGLContexts.edges,this.frameBuffers.edges,n,i,this.pixelRatio,this.pickingDownSizingRatio),s=gk.apply(void 0,Dk(a)),l=this.itemIDsIndex[s];return l&&l.type==="edge"?l.id:null}},{key:"process",value:function(){var n=this;this.emit("beforeProcess");var i=this.graph,a=this.settings,s=this.getDimensions();if(this.nodeExtent=oQ(this.graph),!this.settings.autoRescale){var l=s.width,c=s.height,f=this.nodeExtent,p=f.x,h=f.y;this.nodeExtent={x:[(p[0]+p[1])/2-l/2,(p[0]+p[1])/2+l/2],y:[(h[0]+h[1])/2-c/2,(h[0]+h[1])/2+c/2]}}this.normalizationFunction=Rk(this.customBBox||this.nodeExtent);var m=new Nk,g=gu(m.getState(),s,this.getGraphDimensions(),this.getStagePadding());this.labelGrid.resizeAndClear(s,a.labelGridCellSize);for(var _={},w={},b={},E={},P=1,T=i.nodes(),A=0,x=T.length;A<x;A++){var O=T[A],C=this.nodeDataCache[O],N=i.getNodeAttributes(O);C.x=N.x,C.y=N.y,this.normalizationFunction.applyTo(C),typeof C.label=="string"&&!C.hidden&&this.labelGrid.add(O,C.size,this.framedGraphToViewport(C,{matrix:g})),_[C.type]=(_[C.type]||0)+1}this.labelGrid.organize();for(var D in this.nodePrograms){if(!Zn.call(this.nodePrograms,D))throw new Error('Sigma: could not find a suitable program for node type "'.concat(D,'"!'));this.nodePrograms[D].reallocate(_[D]||0),_[D]=0}this.settings.zIndex&&this.nodeZExtent[0]!==this.nodeZExtent[1]&&(T=kk(this.nodeZExtent,function(xe){return n.nodeDataCache[xe].zIndex},T));for(var B=0,U=T.length;B<U;B++){var L=T[B];w[L]=P,E[w[L]]={type:"node",id:L},P++;var j=this.nodeDataCache[L];this.addNodeToProgram(L,w[L],_[j.type]++)}for(var X={},K=i.edges(),G=0,M=K.length;G<M;G++){var V=K[G],J=this.edgeDataCache[V];X[J.type]=(X[J.type]||0)+1}this.settings.zIndex&&this.edgeZExtent[0]!==this.edgeZExtent[1]&&(K=kk(this.edgeZExtent,function(xe){return n.edgeDataCache[xe].zIndex},K));for(var ee in this.edgePrograms){if(!Zn.call(this.edgePrograms,ee))throw new Error('Sigma: could not find a suitable program for edge type "'.concat(ee,'"!'));this.edgePrograms[ee].reallocate(X[ee]||0),X[ee]=0}for(var F=0,H=K.length;F<H;F++){var te=K[F];b[te]=P,E[b[te]]={type:"edge",id:te},P++;var we=this.edgeDataCache[te];this.addEdgeToProgram(te,b[te],X[we.type]++)}return this.itemIDsIndex=E,this.nodeIndices=w,this.edgeIndices=b,this.emit("afterProcess"),this}},{key:"handleSettingsUpdate",value:function(n){var i=this,a=this.settings;if(this.camera.minRatio=a.minCameraRatio,this.camera.maxRatio=a.maxCameraRatio,this.camera.enabledZooming=a.enableCameraZooming,this.camera.enabledPanning=a.enableCameraPanning,this.camera.enabledRotation=a.enableCameraRotation,a.cameraPanBoundaries?this.camera.clean=function(p){return i.cleanCameraState(p,a.cameraPanBoundaries&&Xb(a.cameraPanBoundaries)==="object"?a.cameraPanBoundaries:{})}:this.camera.clean=null,this.camera.setState(this.camera.validateState(this.camera.getState())),n){if(n.edgeProgramClasses!==a.edgeProgramClasses){for(var s in a.edgeProgramClasses)a.edgeProgramClasses[s]!==n.edgeProgramClasses[s]&&this.registerEdgeProgram(s,a.edgeProgramClasses[s]);for(var l in n.edgeProgramClasses)a.edgeProgramClasses[l]||this.unregisterEdgeProgram(l)}if(n.nodeProgramClasses!==a.nodeProgramClasses||n.nodeHoverProgramClasses!==a.nodeHoverProgramClasses){for(var c in a.nodeProgramClasses)(a.nodeProgramClasses[c]!==n.nodeProgramClasses[c]||a.nodeHoverProgramClasses[c]!==n.nodeHoverProgramClasses[c])&&this.registerNodeProgram(c,a.nodeProgramClasses[c],a.nodeHoverProgramClasses[c]);for(var f in n.nodeProgramClasses)a.nodeProgramClasses[f]||this.unregisterNodeProgram(f)}}return this.mouseCaptor.setSettings(this.settings),this.touchCaptor.setSettings(this.settings),this}},{key:"cleanCameraState",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=i.tolerance,s=a===void 0?0:a,l=i.boundaries,c=Pe({},n),f=l||this.nodeExtent,p=us(f.x,2),h=p[0],m=p[1],g=us(f.y,2),_=g[0],w=g[1],b=[this.graphToViewport({x:h,y:_},{cameraState:n}),this.graphToViewport({x:m,y:_},{cameraState:n}),this.graphToViewport({x:h,y:w},{cameraState:n}),this.graphToViewport({x:m,y:w},{cameraState:n})],E=1/0,P=-1/0,T=1/0,A=-1/0;b.forEach(function(X){var K=X.x,G=X.y;E=Math.min(E,K),P=Math.max(P,K),T=Math.min(T,G),A=Math.max(A,G)});var x=P-E,O=A-T,C=this.getDimensions(),N=C.width,D=C.height,B=0,U=0;if(x>=N?P<N-s?B=P-(N-s):E>s&&(B=E-s):P>N+s?B=P-(N+s):E<-s&&(B=E+s),O>=D?A<D-s?U=A-(D-s):T>s&&(U=T-s):A>D+s?U=A-(D+s):T<-s&&(U=T+s),B||U){var L=this.viewportToFramedGraph({x:0,y:0},{cameraState:n}),j=this.viewportToFramedGraph({x:B,y:U},{cameraState:n});B=j.x-L.x,U=j.y-L.y,c.x+=B,c.y+=U}return c}},{key:"renderLabels",value:function(){if(!this.settings.renderLabels)return this;var n=this.camera.getState(),i=this.labelGrid.getLabelsToDisplay(n.ratio,this.settings.labelDensity);jk(i,this.nodesWithForcedLabels),this.displayedNodeLabels=new Set;for(var a=this.canvasContexts.labels,s=0,l=i.length;s<l;s++){var c=i[s],f=this.nodeDataCache[c];if(!this.displayedNodeLabels.has(c)&&!f.hidden){var p=this.framedGraphToViewport(f),h=p.x,m=p.y,g=this.scaleSize(f.size);if(!(!f.forceLabel&&g<this.settings.labelRenderedSizeThreshold)&&!(h<-Lk||h>this.width+Lk||m<-$k||m>this.height+$k)){this.displayedNodeLabels.add(c);var _=this.settings.defaultDrawNodeLabel,w=this.nodePrograms[f.type],b=(w==null?void 0:w.drawLabel)||_;b(a,Pe(Pe({key:c},f),{},{size:g,x:h,y:m}),this.settings)}}}return this}},{key:"renderEdgeLabels",value:function(){if(!this.settings.renderEdgeLabels)return this;var n=this.canvasContexts.edgeLabels;n.clearRect(0,0,this.width,this.height);var i=EQ({graph:this.graph,hoveredNode:this.hoveredNode,displayedNodeLabels:this.displayedNodeLabels,highlightedNodes:this.highlightedNodes});jk(i,this.edgesWithForcedLabels);for(var a=new Set,s=0,l=i.length;s<l;s++){var c=i[s],f=this.graph.extremities(c),p=this.nodeDataCache[f[0]],h=this.nodeDataCache[f[1]],m=this.edgeDataCache[c];if(!a.has(c)&&!(m.hidden||p.hidden||h.hidden)){var g=this.settings.defaultDrawEdgeLabel,_=this.edgePrograms[m.type],w=(_==null?void 0:_.drawLabel)||g;w(n,Pe(Pe({key:c},m),{},{size:this.scaleSize(m.size)}),Pe(Pe(Pe({key:f[0]},p),this.framedGraphToViewport(p)),{},{size:this.scaleSize(p.size)}),Pe(Pe(Pe({key:f[1]},h),this.framedGraphToViewport(h)),{},{size:this.scaleSize(h.size)}),this.settings),a.add(c)}}return this.displayedEdgeLabels=a,this}},{key:"renderHighlightedNodes",value:function(){var n=this,i=this.canvasContexts.hovers;i.clearRect(0,0,this.width,this.height);var a=function(g){var _=n.nodeDataCache[g],w=n.framedGraphToViewport(_),b=w.x,E=w.y,P=n.scaleSize(_.size),T=n.settings.defaultDrawNodeHover,A=n.nodePrograms[_.type],x=(A==null?void 0:A.drawHover)||T;x(i,Pe(Pe({key:g},_),{},{size:P,x:b,y:E}),n.settings)},s=[];this.hoveredNode&&!this.nodeDataCache[this.hoveredNode].hidden&&s.push(this.hoveredNode),this.highlightedNodes.forEach(function(m){m!==n.hoveredNode&&s.push(m)}),s.forEach(function(m){return a(m)});var l={};s.forEach(function(m){var g=n.nodeDataCache[m].type;l[g]=(l[g]||0)+1});for(var c in this.nodeHoverPrograms)this.nodeHoverPrograms[c].reallocate(l[c]||0),l[c]=0;s.forEach(function(m){var g=n.nodeDataCache[m];n.nodeHoverPrograms[g.type].process(0,l[g.type]++,g)}),this.webGLContexts.hoverNodes.clear(this.webGLContexts.hoverNodes.COLOR_BUFFER_BIT);var f=this.getRenderParams();for(var p in this.nodeHoverPrograms){var h=this.nodeHoverPrograms[p];h.render(f)}}},{key:"scheduleHighlightedNodesRender",value:function(){var n=this;this.renderHighlightedNodesFrame||this.renderFrame||(this.renderHighlightedNodesFrame=requestAnimationFrame(function(){n.renderHighlightedNodesFrame=null,n.renderHighlightedNodes(),n.renderEdgeLabels()}))}},{key:"render",value:function(){var n=this;this.emit("beforeRender");var i=function(){return n.emit("afterRender"),n};if(this.renderFrame&&(cancelAnimationFrame(this.renderFrame),this.renderFrame=null),this.resize(),this.needToProcess&&this.process(),this.needToProcess=!1,this.clear(),this.pickingLayers.forEach(function(b){return n.resetWebGLTexture(b)}),!this.graph.order)return i();var a=this.mouseCaptor,s=this.camera.isAnimated()||a.isMoving||a.draggedEvents||a.currentWheelDirection,l=this.camera.getState(),c=this.getDimensions(),f=this.getGraphDimensions(),p=this.getStagePadding();this.matrix=gu(l,c,f,p),this.invMatrix=gu(l,c,f,p,!0),this.correctionRatio=aQ(this.matrix,l,c),this.graphToViewportRatio=this.getGraphToViewportRatio();var h=this.getRenderParams();for(var m in this.nodePrograms){var g=this.nodePrograms[m];g.render(h)}if(!this.settings.hideEdgesOnMove||!s)for(var _ in this.edgePrograms){var w=this.edgePrograms[_];w.render(h)}return this.settings.hideLabelsOnMove&&s||(this.renderLabels(),this.renderEdgeLabels(),this.renderHighlightedNodes()),i()}},{key:"addNode",value:function(n){var i=Object.assign({},this.graph.getNodeAttributes(n));this.settings.nodeReducer&&(i=this.settings.nodeReducer(n,i));var a=OQ(this.settings,n,i);this.nodeDataCache[n]=a,this.nodesWithForcedLabels.delete(n),a.forceLabel&&!a.hidden&&this.nodesWithForcedLabels.add(n),this.highlightedNodes.delete(n),a.highlighted&&!a.hidden&&this.highlightedNodes.add(n),this.settings.zIndex&&(a.zIndex<this.nodeZExtent[0]&&(this.nodeZExtent[0]=a.zIndex),a.zIndex>this.nodeZExtent[1]&&(this.nodeZExtent[1]=a.zIndex))}},{key:"updateNode",value:function(n){this.addNode(n);var i=this.nodeDataCache[n];this.normalizationFunction.applyTo(i)}},{key:"removeNode",value:function(n){delete this.nodeDataCache[n],delete this.nodeProgramIndex[n],this.highlightedNodes.delete(n),this.hoveredNode===n&&(this.hoveredNode=null),this.nodesWithForcedLabels.delete(n)}},{key:"addEdge",value:function(n){var i=Object.assign({},this.graph.getEdgeAttributes(n));this.settings.edgeReducer&&(i=this.settings.edgeReducer(n,i));var a=AQ(this.settings,n,i);this.edgeDataCache[n]=a,this.edgesWithForcedLabels.delete(n),a.forceLabel&&!a.hidden&&this.edgesWithForcedLabels.add(n),this.settings.zIndex&&(a.zIndex<this.edgeZExtent[0]&&(this.edgeZExtent[0]=a.zIndex),a.zIndex>this.edgeZExtent[1]&&(this.edgeZExtent[1]=a.zIndex))}},{key:"updateEdge",value:function(n){this.addEdge(n)}},{key:"removeEdge",value:function(n){delete this.edgeDataCache[n],delete this.edgeProgramIndex[n],this.hoveredEdge===n&&(this.hoveredEdge=null),this.edgesWithForcedLabels.delete(n)}},{key:"clearNodeIndices",value:function(){this.labelGrid=new Mk,this.nodeExtent={x:[0,1],y:[0,1]},this.nodeDataCache={},this.edgeProgramIndex={},this.nodesWithForcedLabels=new Set,this.nodeZExtent=[1/0,-1/0],this.highlightedNodes=new Set}},{key:"clearEdgeIndices",value:function(){this.edgeDataCache={},this.edgeProgramIndex={},this.edgesWithForcedLabels=new Set,this.edgeZExtent=[1/0,-1/0]}},{key:"clearIndices",value:function(){this.clearEdgeIndices(),this.clearNodeIndices()}},{key:"clearNodeState",value:function(){this.displayedNodeLabels=new Set,this.highlightedNodes=new Set,this.hoveredNode=null}},{key:"clearEdgeState",value:function(){this.displayedEdgeLabels=new Set,this.highlightedNodes=new Set,this.hoveredEdge=null}},{key:"clearState",value:function(){this.clearEdgeState(),this.clearNodeState()}},{key:"addNodeToProgram",value:function(n,i,a){var s=this.nodeDataCache[n],l=this.nodePrograms[s.type];if(!l)throw new Error('Sigma: could not find a suitable program for node type "'.concat(s.type,'"!'));l.process(i,a,s),this.nodeProgramIndex[n]=a}},{key:"addEdgeToProgram",value:function(n,i,a){var s=this.edgeDataCache[n],l=this.edgePrograms[s.type];if(!l)throw new Error('Sigma: could not find a suitable program for edge type "'.concat(s.type,'"!'));var c=this.graph.extremities(n),f=this.nodeDataCache[c[0]],p=this.nodeDataCache[c[1]];l.process(i,a,f,p,s),this.edgeProgramIndex[n]=a}},{key:"getRenderParams",value:function(){return{matrix:this.matrix,invMatrix:this.invMatrix,width:this.width,height:this.height,pixelRatio:this.pixelRatio,zoomRatio:this.camera.ratio,cameraAngle:this.camera.angle,sizeRatio:1/this.scaleSize(),correctionRatio:this.correctionRatio,downSizingRatio:this.pickingDownSizingRatio,minEdgeThickness:this.settings.minEdgeThickness,antiAliasingFeather:this.settings.antiAliasingFeather}}},{key:"getStagePadding",value:function(){var n=this.settings,i=n.stagePadding,a=n.autoRescale;return a&&i||0}},{key:"createLayer",value:function(n,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.elements[n])throw new Error('Sigma: a layer named "'.concat(n,'" already exists'));var s=uQ(i,{position:"absolute"},{class:"sigma-".concat(n)});return a.style&&Object.assign(s.style,a.style),this.elements[n]=s,"beforeLayer"in a&&a.beforeLayer?this.elements[a.beforeLayer].before(s):"afterLayer"in a&&a.afterLayer?this.elements[a.afterLayer].after(s):this.container.appendChild(s),s}},{key:"createCanvas",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.createLayer(n,"canvas",i)}},{key:"createCanvasContext",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=this.createCanvas(n,i),s={preserveDrawingBuffer:!1,antialias:!1};return this.canvasContexts[n]=a.getContext("2d",s),this}},{key:"createWebGLContext",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=(i==null?void 0:i.canvas)||this.createCanvas(n,i);i.hidden&&a.remove();var s=Pe({preserveDrawingBuffer:!1,antialias:!1},i),l;l=a.getContext("webgl2",s),l||(l=a.getContext("webgl",s)),l||(l=a.getContext("experimental-webgl",s));var c=l;if(this.webGLContexts[n]=c,c.blendFunc(c.ONE,c.ONE_MINUS_SRC_ALPHA),i.picking){this.pickingLayers.add(n);var f=c.createFramebuffer();if(!f)throw new Error("Sigma: cannot create a new frame buffer for layer ".concat(n));this.frameBuffers[n]=f}return c}},{key:"killLayer",value:function(n){var i=this.elements[n];if(!i)throw new Error("Sigma: cannot kill layer ".concat(n,", which does not exist"));if(this.webGLContexts[n]){var a,s=this.webGLContexts[n];(a=s.getExtension("WEBGL_lose_context"))===null||a===void 0||a.loseContext(),delete this.webGLContexts[n]}else this.canvasContexts[n]&&delete this.canvasContexts[n];return i.remove(),delete this.elements[n],this}},{key:"getCamera",value:function(){return this.camera}},{key:"setCamera",value:function(n){this.unbindCameraHandlers(),this.camera=n,this.bindCameraHandlers()}},{key:"getContainer",value:function(){return this.container}},{key:"getGraph",value:function(){return this.graph}},{key:"setGraph",value:function(n){n!==this.graph&&(this.hoveredNode&&!n.hasNode(this.hoveredNode)&&(this.hoveredNode=null),this.hoveredEdge&&!n.hasEdge(this.hoveredEdge)&&(this.hoveredEdge=null),this.unbindGraphHandlers(),this.checkEdgesEventsFrame!==null&&(cancelAnimationFrame(this.checkEdgesEventsFrame),this.checkEdgesEventsFrame=null),this.graph=n,this.bindGraphHandlers(),this.refresh())}},{key:"getMouseCaptor",value:function(){return this.mouseCaptor}},{key:"getTouchCaptor",value:function(){return this.touchCaptor}},{key:"getDimensions",value:function(){return{width:this.width,height:this.height}}},{key:"getGraphDimensions",value:function(){var n=this.customBBox||this.nodeExtent;return{width:n.x[1]-n.x[0]||1,height:n.y[1]-n.y[0]||1}}},{key:"getNodeDisplayData",value:function(n){var i=this.nodeDataCache[n];return i?Object.assign({},i):void 0}},{key:"getEdgeDisplayData",value:function(n){var i=this.edgeDataCache[n];return i?Object.assign({},i):void 0}},{key:"getNodeDisplayedLabels",value:function(){return new Set(this.displayedNodeLabels)}},{key:"getEdgeDisplayedLabels",value:function(){return new Set(this.displayedEdgeLabels)}},{key:"getSettings",value:function(){return Pe({},this.settings)}},{key:"getSetting",value:function(n){return this.settings[n]}},{key:"setSetting",value:function(n,i){var a=Pe({},this.settings);return this.settings[n]=i,l0(this.settings),this.handleSettingsUpdate(a),this.scheduleRefresh(),this}},{key:"updateSetting",value:function(n,i){return this.setSetting(n,i(this.settings[n])),this}},{key:"setSettings",value:function(n){var i=Pe({},this.settings);return this.settings=Pe(Pe({},this.settings),n),l0(this.settings),this.handleSettingsUpdate(i),this.scheduleRefresh(),this}},{key:"resize",value:function(n){var i=this.width,a=this.height;if(this.width=this.container.offsetWidth,this.height=this.container.offsetHeight,this.pixelRatio=Ck(),this.width===0)if(this.settings.allowInvalidContainer)this.width=1;else throw new Error("Sigma: Container has no width. You can set the allowInvalidContainer setting to true to stop seeing this error.");if(this.height===0)if(this.settings.allowInvalidContainer)this.height=1;else throw new Error("Sigma: Container has no height. You can set the allowInvalidContainer setting to true to stop seeing this error.");if(!n&&i===this.width&&a===this.height)return this;for(var s in this.elements){var l=this.elements[s];l.style.width=this.width+"px",l.style.height=this.height+"px"}for(var c in this.canvasContexts)this.elements[c].setAttribute("width",this.width*this.pixelRatio+"px"),this.elements[c].setAttribute("height",this.height*this.pixelRatio+"px"),this.pixelRatio!==1&&this.canvasContexts[c].scale(this.pixelRatio,this.pixelRatio);for(var f in this.webGLContexts){this.elements[f].setAttribute("width",this.width*this.pixelRatio+"px"),this.elements[f].setAttribute("height",this.height*this.pixelRatio+"px");var p=this.webGLContexts[f];if(p.viewport(0,0,this.width*this.pixelRatio,this.height*this.pixelRatio),this.pickingLayers.has(f)){var h=this.textures[f];h&&p.deleteTexture(h)}}return this.emit("resize"),this}},{key:"clear",value:function(){return this.emit("beforeClear"),this.webGLContexts.nodes.bindFramebuffer(WebGLRenderingContext.FRAMEBUFFER,null),this.webGLContexts.nodes.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.webGLContexts.edges.bindFramebuffer(WebGLRenderingContext.FRAMEBUFFER,null),this.webGLContexts.edges.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.webGLContexts.hoverNodes.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.canvasContexts.labels.clearRect(0,0,this.width,this.height),this.canvasContexts.hovers.clearRect(0,0,this.width,this.height),this.canvasContexts.edgeLabels.clearRect(0,0,this.width,this.height),this.emit("afterClear"),this}},{key:"refresh",value:function(n){var i=this,a=(n==null?void 0:n.skipIndexation)!==void 0?n==null?void 0:n.skipIndexation:!1,s=(n==null?void 0:n.schedule)!==void 0?n.schedule:!1,l=!n||!n.partialGraph;if(l)this.clearEdgeIndices(),this.clearNodeIndices(),this.graph.forEachNode(function(A){return i.addNode(A)}),this.graph.forEachEdge(function(A){return i.addEdge(A)});else{for(var c,f,p=((c=n.partialGraph)===null||c===void 0?void 0:c.nodes)||[],h=0,m=(p==null?void 0:p.length)||0;h<m;h++){var g=p[h];if(this.updateNode(g),a){var _=this.nodeProgramIndex[g];if(_===void 0)throw new Error('Sigma: node "'.concat(g,`" can't be repaint`));this.addNodeToProgram(g,this.nodeIndices[g],_)}}for(var w=(n==null||(f=n.partialGraph)===null||f===void 0?void 0:f.edges)||[],b=0,E=w.length;b<E;b++){var P=w[b];if(this.updateEdge(P),a){var T=this.edgeProgramIndex[P];if(T===void 0)throw new Error('Sigma: edge "'.concat(P,`" can't be repaint`));this.addEdgeToProgram(P,this.edgeIndices[P],T)}}}return(l||!a)&&(this.needToProcess=!0),s?this.scheduleRender():this.render(),this}},{key:"scheduleRender",value:function(){var n=this;return this.renderFrame||(this.renderFrame=requestAnimationFrame(function(){n.render()})),this}},{key:"scheduleRefresh",value:function(n){return this.refresh(Pe(Pe({},n),{},{schedule:!0}))}},{key:"getViewportZoomedState",value:function(n,i){var a=this.camera.getState(),s=a.ratio,l=a.angle,c=a.x,f=a.y,p=this.settings,h=p.minCameraRatio,m=p.maxCameraRatio;typeof m=="number"&&(i=Math.min(i,m)),typeof h=="number"&&(i=Math.max(i,h));var g=i/s,_={x:this.width/2,y:this.height/2},w=this.viewportToFramedGraph(n),b=this.viewportToFramedGraph(_);return{angle:l,x:(w.x-b.x)*(1-g)+c,y:(w.y-b.y)*(1-g)+f,ratio:i}}},{key:"viewRectangle",value:function(){var n=this.viewportToFramedGraph({x:0,y:0}),i=this.viewportToFramedGraph({x:this.width,y:0}),a=this.viewportToFramedGraph({x:0,y:this.height});return{x1:n.x,y1:n.y,x2:i.x,y2:i.y,height:i.y-a.y}}},{key:"framedGraphToViewport",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=!!i.cameraState||!!i.viewportDimensions||!!i.graphDimensions,s=i.matrix?i.matrix:a?gu(i.cameraState||this.camera.getState(),i.viewportDimensions||this.getDimensions(),i.graphDimensions||this.getGraphDimensions(),i.padding||this.getStagePadding()):this.matrix,l=Kb(s,n);return{x:(1+l.x)*this.width/2,y:(1-l.y)*this.height/2}}},{key:"viewportToFramedGraph",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=!!i.cameraState||!!i.viewportDimensions||!i.graphDimensions,s=i.matrix?i.matrix:a?gu(i.cameraState||this.camera.getState(),i.viewportDimensions||this.getDimensions(),i.graphDimensions||this.getGraphDimensions(),i.padding||this.getStagePadding(),!0):this.invMatrix,l=Kb(s,{x:n.x/this.width*2-1,y:1-n.y/this.height*2});return isNaN(l.x)&&(l.x=0),isNaN(l.y)&&(l.y=0),l}},{key:"viewportToGraph",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.normalizationFunction.inverse(this.viewportToFramedGraph(n,i))}},{key:"graphToViewport",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.framedGraphToViewport(this.normalizationFunction(n),i)}},{key:"getGraphToViewportRatio",value:function(){var n={x:0,y:0},i={x:1,y:1},a=Math.sqrt(Math.pow(n.x-i.x,2)+Math.pow(n.y-i.y,2)),s=this.graphToViewport(n),l=this.graphToViewport(i),c=Math.sqrt(Math.pow(s.x-l.x,2)+Math.pow(s.y-l.y,2));return c/a}},{key:"getBBox",value:function(){return this.nodeExtent}},{key:"getCustomBBox",value:function(){return this.customBBox}},{key:"setCustomBBox",value:function(n){return this.customBBox=n,this.scheduleRender(),this}},{key:"kill",value:function(){this.emit("kill"),this.removeAllListeners(),this.unbindCameraHandlers(),window.removeEventListener("resize",this.activeListeners.handleResize),this.mouseCaptor.kill(),this.touchCaptor.kill(),this.unbindGraphHandlers(),this.clearIndices(),this.clearState(),this.nodeDataCache={},this.edgeDataCache={},this.highlightedNodes.clear(),this.renderFrame&&(cancelAnimationFrame(this.renderFrame),this.renderFrame=null),this.renderHighlightedNodesFrame&&(cancelAnimationFrame(this.renderHighlightedNodesFrame),this.renderHighlightedNodesFrame=null);for(var n=this.container;n.firstChild;)n.removeChild(n.firstChild);for(var i in this.nodePrograms)this.nodePrograms[i].kill();for(var a in this.nodeHoverPrograms)this.nodeHoverPrograms[a].kill();for(var s in this.edgePrograms)this.edgePrograms[s].kill();this.nodePrograms={},this.nodeHoverPrograms={},this.edgePrograms={};for(var l in this.elements)this.killLayer(l);this.canvasContexts={},this.webGLContexts={},this.elements={}}},{key:"scaleSize",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.camera.ratio;return n/this.settings.zoomToSizeRatioFunction(i)*(this.getSetting("itemSizesReference")==="positions"?i*this.graphToViewportRatio:1)}},{key:"getCanvases",value:function(){var n={};for(var i in this.elements)this.elements[i]instanceof HTMLCanvasElement&&(n[i]=this.elements[i]);return n}}])})(hx);const AD=I.createContext(null),TQ=AD.Provider;function PD(){const t=I.useContext(AD);if(t==null)throw new Error("No context provided: useSigmaContext() can only be used in a descendant of <SigmaContainer>");return t}function vx(){return PD().sigma}function CQ(){const{sigma:t}=PD();return I.useCallback((e=>{t&&Object.keys(e).forEach((r=>{t.setSetting(r,e[r])}))}),[t])}function Jd(t){return new Set(Object.keys(t))}const Fk=Jd({clickNode:!0,rightClickNode:!0,downNode:!0,enterNode:!0,leaveNode:!0,doubleClickNode:!0,wheelNode:!0,clickEdge:!0,rightClickEdge:!0,downEdge:!0,enterEdge:!0,leaveEdge:!0,doubleClickEdge:!0,wheelEdge:!0,clickStage:!0,rightClickStage:!0,downStage:!0,doubleClickStage:!0,wheelStage:!0,beforeRender:!0,afterRender:!0,kill:!0,upStage:!0,upEdge:!0,upNode:!0,enterStage:!0,leaveStage:!0,resize:!0,afterClear:!0,afterProcess:!0,beforeClear:!0,beforeProcess:!0,moveBody:!0}),Bk=Jd({click:!0,rightClick:!0,doubleClick:!0,mouseup:!0,mousedown:!0,mousemove:!0,mousemovebody:!0,mouseleave:!0,mouseenter:!0,wheel:!0}),zk=Jd({touchup:!0,touchdown:!0,touchmove:!0,touchmovebody:!0,tap:!0,doubletap:!0}),Gk=Jd({updated:!0});function kQ(){const t=vx(),e=CQ(),[r,n]=I.useState({});return I.useEffect((()=>{if(!t||!r)return;const i=r,a=Object.keys(i);return a.forEach((s=>{const l=i[s];Fk.has(s)&&t.on(s,l),Bk.has(s)&&t.getMouseCaptor().on(s,l),zk.has(s)&&t.getTouchCaptor().on(s,l),Gk.has(s)&&t.getCamera().on(s,l)})),()=>{t&&a.forEach((s=>{const l=i[s];Fk.has(s)&&t.off(s,l),Bk.has(s)&&t.getMouseCaptor().off(s,l),zk.has(s)&&t.getTouchCaptor().off(s,l),Gk.has(s)&&t.getCamera().off(s,l)}))}}),[t,r,e]),n}function RQ(){const t=vx();return I.useCallback(((e,r=!0)=>{t&&e&&(r&&t.getGraph().order>0&&t.getGraph().clear(),t.getGraph().import(e),t.refresh())}),[t])}function TD(t,e){if(t===e)return!0;if(typeof t=="object"&&t!=null&&typeof e=="object"&&e!=null){if(Object.keys(t).length!=Object.keys(e).length)return!1;for(const r in t)if(!Object.hasOwn(e,r)||!TD(t[r],e[r]))return!1;return!0}return!1}const jQ=I.forwardRef((({graph:t,id:e,className:r,style:n,settings:i={},children:a},s)=>{const l=I.useRef(null),c=I.useRef(null),f={className:`react-sigma ${r||""}`,id:e,style:n},[p,h]=I.useState(null),[m,g]=I.useState(i);I.useEffect((()=>{g((b=>TD(b,i)?b:i))}),[i]),I.useEffect((()=>{let b=null;if(c.current!==null){let E=new He;t&&(E=typeof t=="function"?new t:t),b=new PQ(E,c.current,m),h((P=>{let T=null;return P&&(T=P.getCamera().getState()),T&&b.getCamera().setState(T),b}))}return()=>{b&&b.kill()}}),[c,t,m]),I.useImperativeHandle(s,(()=>p),[p]);const _=I.useMemo((()=>p&&l.current?{sigma:p,container:l.current}:null),[p,l]),w=_!==null?Q.createElement(TQ,{value:_},a):null;return Q.createElement("div",Object.assign({},f,{ref:l}),Q.createElement("div",{className:"sigma-container",ref:c}),w)}));var wu={},Uk;function NQ(){if(Uk)return wu;Uk=1;function t(n){return typeof n!="number"||isNaN(n)?1:n}function e(n,i){var a={},s=function(f){return typeof f>"u"?i:f};typeof i=="function"&&(s=i);var l=function(f){return s(f[n])},c=function(){return s(void 0)};return typeof n=="string"?(a.fromAttributes=l,a.fromGraph=function(f,p){return l(f.getNodeAttributes(p))},a.fromEntry=function(f,p){return l(p)}):typeof n=="function"?(a.fromAttributes=function(){throw new Error("graphology-utils/getters/createNodeValueGetter: irrelevant usage.")},a.fromGraph=function(f,p){return s(n(p,f.getNodeAttributes(p)))},a.fromEntry=function(f,p){return s(n(f,p))}):(a.fromAttributes=c,a.fromGraph=c,a.fromEntry=c),a}function r(n,i){var a={},s=function(f){return typeof f>"u"?i:f};typeof i=="function"&&(s=i);var l=function(f){return s(f[n])},c=function(){return s(void 0)};return typeof n=="string"?(a.fromAttributes=l,a.fromGraph=function(f,p){return l(f.getEdgeAttributes(p))},a.fromEntry=function(f,p){return l(p)},a.fromPartialEntry=a.fromEntry,a.fromMinimalEntry=a.fromEntry):typeof n=="function"?(a.fromAttributes=function(){throw new Error("graphology-utils/getters/createEdgeValueGetter: irrelevant usage.")},a.fromGraph=function(f,p){var h=f.extremities(p);return s(n(p,f.getEdgeAttributes(p),h[0],h[1],f.getNodeAttributes(h[0]),f.getNodeAttributes(h[1]),f.isUndirected(p)))},a.fromEntry=function(f,p,h,m,g,_,w){return s(n(f,p,h,m,g,_,w))},a.fromPartialEntry=function(f,p,h,m){return s(n(f,p,h,m))},a.fromMinimalEntry=function(f,p){return s(n(f,p))}):(a.fromAttributes=c,a.fromGraph=c,a.fromEntry=c,a.fromMinimalEntry=c),a}return wu.createNodeValueGetter=e,wu.createEdgeValueGetter=r,wu.createEdgeWeightGetter=function(n){return r(n,t)},wu}var f0,qk;function DQ(){if(qk)return f0;qk=1;var t=0,e=1,r=2,n=3,i=4,a=5,s=6,l=7,c=8,f=9,p=0,h=1,m=2,g=0,_=1,w=2,b=3,E=4,P=5,T=6,A=7,x=8,O=3,C=10,N=3,D=9,B=10;return f0=function(L,j,X){var K,G,M,V,J,ee,F,H,te,we,xe=j.length,De=X.length,Le=L.adjustSizes,Me=L.barnesHutTheta*L.barnesHutTheta,le,pe,ve,ie,Fe,de,me,ne=[];for(M=0;M<xe;M+=C)j[M+i]=j[M+r],j[M+a]=j[M+n],j[M+r]=0,j[M+n]=0;if(L.outboundAttractionDistribution){for(le=0,M=0;M<xe;M+=C)le+=j[M+s];le/=xe/C}if(L.barnesHutOptimize){var it=1/0,kt=-1/0,Rt=1/0,Bt=-1/0,rt,jt,fn;for(M=0;M<xe;M+=C)it=Math.min(it,j[M+t]),kt=Math.max(kt,j[M+t]),Rt=Math.min(Rt,j[M+e]),Bt=Math.max(Bt,j[M+e]);var dn=kt-it,hn=Bt-Rt;for(dn>hn?(Rt-=(dn-hn)/2,Bt=Rt+dn):(it-=(hn-dn)/2,kt=it+hn),ne[0+g]=-1,ne[0+_]=(it+kt)/2,ne[0+w]=(Rt+Bt)/2,ne[0+b]=Math.max(kt-it,Bt-Rt),ne[0+E]=-1,ne[0+P]=-1,ne[0+T]=0,ne[0+A]=0,ne[0+x]=0,K=1,M=0;M<xe;M+=C)for(G=0,fn=O;;)if(ne[G+P]>=0){j[M+t]<ne[G+_]?j[M+e]<ne[G+w]?rt=ne[G+P]:rt=ne[G+P]+D:j[M+e]<ne[G+w]?rt=ne[G+P]+D*2:rt=ne[G+P]+D*3,ne[G+A]=(ne[G+A]*ne[G+T]+j[M+t]*j[M+s])/(ne[G+T]+j[M+s]),ne[G+x]=(ne[G+x]*ne[G+T]+j[M+e]*j[M+s])/(ne[G+T]+j[M+s]),ne[G+T]+=j[M+s],G=rt;continue}else if(ne[G+g]<0){ne[G+g]=M;break}else{if(ne[G+P]=K*D,H=ne[G+b]/2,te=ne[G+P],ne[te+g]=-1,ne[te+_]=ne[G+_]-H,ne[te+w]=ne[G+w]-H,ne[te+b]=H,ne[te+E]=te+D,ne[te+P]=-1,ne[te+T]=0,ne[te+A]=0,ne[te+x]=0,te+=D,ne[te+g]=-1,ne[te+_]=ne[G+_]-H,ne[te+w]=ne[G+w]+H,ne[te+b]=H,ne[te+E]=te+D,ne[te+P]=-1,ne[te+T]=0,ne[te+A]=0,ne[te+x]=0,te+=D,ne[te+g]=-1,ne[te+_]=ne[G+_]+H,ne[te+w]=ne[G+w]-H,ne[te+b]=H,ne[te+E]=te+D,ne[te+P]=-1,ne[te+T]=0,ne[te+A]=0,ne[te+x]=0,te+=D,ne[te+g]=-1,ne[te+_]=ne[G+_]+H,ne[te+w]=ne[G+w]+H,ne[te+b]=H,ne[te+E]=ne[G+E],ne[te+P]=-1,ne[te+T]=0,ne[te+A]=0,ne[te+x]=0,K+=4,j[ne[G+g]+t]<ne[G+_]?j[ne[G+g]+e]<ne[G+w]?rt=ne[G+P]:rt=ne[G+P]+D:j[ne[G+g]+e]<ne[G+w]?rt=ne[G+P]+D*2:rt=ne[G+P]+D*3,ne[G+T]=j[ne[G+g]+s],ne[G+A]=j[ne[G+g]+t],ne[G+x]=j[ne[G+g]+e],ne[rt+g]=ne[G+g],ne[G+g]=-1,j[M+t]<ne[G+_]?j[M+e]<ne[G+w]?jt=ne[G+P]:jt=ne[G+P]+D:j[M+e]<ne[G+w]?jt=ne[G+P]+D*2:jt=ne[G+P]+D*3,rt===jt)if(fn--){G=rt;continue}else{fn=O;break}ne[jt+g]=M;break}}if(L.barnesHutOptimize)for(pe=L.scalingRatio,M=0;M<xe;M+=C)for(G=0;;)if(ne[G+P]>=0)if(de=Math.pow(j[M+t]-ne[G+A],2)+Math.pow(j[M+e]-ne[G+x],2),we=ne[G+b],4*we*we/de<Me){if(ve=j[M+t]-ne[G+A],ie=j[M+e]-ne[G+x],Le===!0?de>0?(me=pe*j[M+s]*ne[G+T]/de,j[M+r]+=ve*me,j[M+n]+=ie*me):de<0&&(me=-pe*j[M+s]*ne[G+T]/Math.sqrt(de),j[M+r]+=ve*me,j[M+n]+=ie*me):de>0&&(me=pe*j[M+s]*ne[G+T]/de,j[M+r]+=ve*me,j[M+n]+=ie*me),G=ne[G+E],G<0)break;continue}else{G=ne[G+P];continue}else{if(ee=ne[G+g],ee>=0&&ee!==M&&(ve=j[M+t]-j[ee+t],ie=j[M+e]-j[ee+e],de=ve*ve+ie*ie,Le===!0?de>0?(me=pe*j[M+s]*j[ee+s]/de,j[M+r]+=ve*me,j[M+n]+=ie*me):de<0&&(me=-pe*j[M+s]*j[ee+s]/Math.sqrt(de),j[M+r]+=ve*me,j[M+n]+=ie*me):de>0&&(me=pe*j[M+s]*j[ee+s]/de,j[M+r]+=ve*me,j[M+n]+=ie*me)),G=ne[G+E],G<0)break;continue}else for(pe=L.scalingRatio,V=0;V<xe;V+=C)for(J=0;J<V;J+=C)ve=j[V+t]-j[J+t],ie=j[V+e]-j[J+e],Le===!0?(de=Math.sqrt(ve*ve+ie*ie)-j[V+c]-j[J+c],de>0?(me=pe*j[V+s]*j[J+s]/de/de,j[V+r]+=ve*me,j[V+n]+=ie*me,j[J+r]-=ve*me,j[J+n]-=ie*me):de<0&&(me=100*pe*j[V+s]*j[J+s],j[V+r]+=ve*me,j[V+n]+=ie*me,j[J+r]-=ve*me,j[J+n]-=ie*me)):(de=Math.sqrt(ve*ve+ie*ie),de>0&&(me=pe*j[V+s]*j[J+s]/de/de,j[V+r]+=ve*me,j[V+n]+=ie*me,j[J+r]-=ve*me,j[J+n]-=ie*me));for(te=L.gravity/L.scalingRatio,pe=L.scalingRatio,M=0;M<xe;M+=C)me=0,ve=j[M+t],ie=j[M+e],de=Math.sqrt(Math.pow(ve,2)+Math.pow(ie,2)),L.strongGravityMode?de>0&&(me=pe*j[M+s]*te):de>0&&(me=pe*j[M+s]*te/de),j[M+r]-=ve*me,j[M+n]-=ie*me;for(pe=1*(L.outboundAttractionDistribution?le:1),F=0;F<De;F+=N)V=X[F+p],J=X[F+h],H=X[F+m],Fe=Math.pow(H,L.edgeWeightInfluence),ve=j[V+t]-j[J+t],ie=j[V+e]-j[J+e],Le===!0?(de=Math.sqrt(ve*ve+ie*ie)-j[V+c]-j[J+c],L.linLogMode?L.outboundAttractionDistribution?de>0&&(me=-pe*Fe*Math.log(1+de)/de/j[V+s]):de>0&&(me=-pe*Fe*Math.log(1+de)/de):L.outboundAttractionDistribution?de>0&&(me=-pe*Fe/j[V+s]):de>0&&(me=-pe*Fe)):(de=Math.sqrt(Math.pow(ve,2)+Math.pow(ie,2)),L.linLogMode?L.outboundAttractionDistribution?de>0&&(me=-pe*Fe*Math.log(1+de)/de/j[V+s]):de>0&&(me=-pe*Fe*Math.log(1+de)/de):L.outboundAttractionDistribution?(de=1,me=-pe*Fe/j[V+s]):(de=1,me=-pe*Fe)),de>0&&(j[V+r]+=ve*me,j[V+n]+=ie*me,j[J+r]-=ve*me,j[J+n]-=ie*me);var ea,Mn,Ln,pn,vn,mn;if(Le===!0)for(M=0;M<xe;M+=C)j[M+f]!==1&&(ea=Math.sqrt(Math.pow(j[M+r],2)+Math.pow(j[M+n],2)),ea>B&&(j[M+r]=j[M+r]*B/ea,j[M+n]=j[M+n]*B/ea),Mn=j[M+s]*Math.sqrt((j[M+i]-j[M+r])*(j[M+i]-j[M+r])+(j[M+a]-j[M+n])*(j[M+a]-j[M+n])),Ln=Math.sqrt((j[M+i]+j[M+r])*(j[M+i]+j[M+r])+(j[M+a]+j[M+n])*(j[M+a]+j[M+n]))/2,pn=.1*Math.log(1+Ln)/(1+Math.sqrt(Mn)),vn=j[M+t]+j[M+r]*(pn/L.slowDown),j[M+t]=vn,mn=j[M+e]+j[M+n]*(pn/L.slowDown),j[M+e]=mn);else for(M=0;M<xe;M+=C)j[M+f]!==1&&(Mn=j[M+s]*Math.sqrt((j[M+i]-j[M+r])*(j[M+i]-j[M+r])+(j[M+a]-j[M+n])*(j[M+a]-j[M+n])),Ln=Math.sqrt((j[M+i]+j[M+r])*(j[M+i]+j[M+r])+(j[M+a]+j[M+n])*(j[M+a]+j[M+n]))/2,pn=j[M+l]*Math.log(1+Ln)/(1+Math.sqrt(Mn)),j[M+l]=Math.min(1,Math.sqrt(pn*(Math.pow(j[M+r],2)+Math.pow(j[M+n],2))/(1+Math.sqrt(Mn)))),vn=j[M+t]+j[M+r]*(pn/L.slowDown),j[M+t]=vn,mn=j[M+e]+j[M+n]*(pn/L.slowDown),j[M+e]=mn);return{}},f0}var Vn={},Wk;function IQ(){if(Wk)return Vn;Wk=1;var t=10,e=3;return Vn.assign=function(r){r=r||{};var n=Array.prototype.slice.call(arguments).slice(1),i,a,s;for(i=0,s=n.length;i<s;i++)if(n[i])for(a in n[i])r[a]=n[i][a];return r},Vn.validateSettings=function(r){return"linLogMode"in r&&typeof r.linLogMode!="boolean"?{message:"the `linLogMode` setting should be a boolean."}:"outboundAttractionDistribution"in r&&typeof r.outboundAttractionDistribution!="boolean"?{message:"the `outboundAttractionDistribution` setting should be a boolean."}:"adjustSizes"in r&&typeof r.adjustSizes!="boolean"?{message:"the `adjustSizes` setting should be a boolean."}:"edgeWeightInfluence"in r&&typeof r.edgeWeightInfluence!="number"?{message:"the `edgeWeightInfluence` setting should be a number."}:"scalingRatio"in r&&!(typeof r.scalingRatio=="number"&&r.scalingRatio>=0)?{message:"the `scalingRatio` setting should be a number >= 0."}:"strongGravityMode"in r&&typeof r.strongGravityMode!="boolean"?{message:"the `strongGravityMode` setting should be a boolean."}:"gravity"in r&&!(typeof r.gravity=="number"&&r.gravity>=0)?{message:"the `gravity` setting should be a number >= 0."}:"slowDown"in r&&!(typeof r.slowDown=="number"||r.slowDown>=0)?{message:"the `slowDown` setting should be a number >= 0."}:"barnesHutOptimize"in r&&typeof r.barnesHutOptimize!="boolean"?{message:"the `barnesHutOptimize` setting should be a boolean."}:"barnesHutTheta"in r&&!(typeof r.barnesHutTheta=="number"&&r.barnesHutTheta>=0)?{message:"the `barnesHutTheta` setting should be a number >= 0."}:null},Vn.graphToByteArrays=function(r,n){var i=r.order,a=r.size,s={},l,c=new Float32Array(i*t),f=new Float32Array(a*e);return l=0,r.forEachNode(function(p,h){s[p]=l,c[l]=h.x,c[l+1]=h.y,c[l+2]=0,c[l+3]=0,c[l+4]=0,c[l+5]=0,c[l+6]=1,c[l+7]=1,c[l+8]=h.size||1,c[l+9]=h.fixed?1:0,l+=t}),l=0,r.forEachEdge(function(p,h,m,g,_,w,b){var E=s[m],P=s[g],T=n(p,h,m,g,_,w,b);c[E+6]+=T,c[P+6]+=T,f[l]=E,f[l+1]=P,f[l+2]=T,l+=e}),{nodes:c,edges:f}},Vn.assignLayoutChanges=function(r,n,i){var a=0;r.updateEachNodeAttributes(function(s,l){return l.x=n[a],l.y=n[a+1],a+=t,i?i(s,l):l})},Vn.readGraphPositions=function(r,n){var i=0;r.forEachNode(function(a,s){n[i]=s.x,n[i+1]=s.y,i+=t})},Vn.collectLayoutChanges=function(r,n,i){for(var a=r.nodes(),s={},l=0,c=0,f=n.length;l<f;l+=t){if(i){var p=Object.assign({},r.getNodeAttributes(a[c]));p.x=n[l],p.y=n[l+1],p=i(a[c],p),s[a[c]]={x:p.x,y:p.y}}else s[a[c]]={x:n[l],y:n[l+1]};c++}return s},Vn.createWorker=function(n){var i=window.URL||window.webkitURL,a=n.toString(),s=i.createObjectURL(new Blob(["("+a+").call(this);"],{type:"text/javascript"})),l=new Worker(s);return i.revokeObjectURL(s),l},Vn}var d0,Hk;function MQ(){return Hk||(Hk=1,d0={linLogMode:!1,outboundAttractionDistribution:!1,adjustSizes:!1,edgeWeightInfluence:1,scalingRatio:1,strongGravityMode:!1,gravity:1,slowDown:1,barnesHutOptimize:!1,barnesHutTheta:.5}),d0}var h0,Vk;function LQ(){if(Vk)return h0;Vk=1;var t=_D(),e=NQ().createEdgeWeightGetter,r=DQ(),n=IQ(),i=MQ();function a(c,f,p){if(!t(f))throw new Error("graphology-layout-forceatlas2: the given graph is not a valid graphology instance.");typeof p=="number"&&(p={iterations:p});var h=p.iterations;if(typeof h!="number")throw new Error("graphology-layout-forceatlas2: invalid number of iterations.");if(h<=0)throw new Error("graphology-layout-forceatlas2: you should provide a positive number of iterations.");var m=e("getEdgeWeight"in p?p.getEdgeWeight:"weight").fromEntry,g=typeof p.outputReducer=="function"?p.outputReducer:null,_=n.assign({},i,p.settings),w=n.validateSettings(_);if(w)throw new Error("graphology-layout-forceatlas2: "+w.message);var b=n.graphToByteArrays(f,m),E;for(E=0;E<h;E++)r(_,b.nodes,b.edges);if(c){n.assignLayoutChanges(f,b.nodes,g);return}return n.collectLayoutChanges(f,b.nodes)}function s(c){var f=typeof c=="number"?c:c.order;return{barnesHutOptimize:f>2e3,strongGravityMode:!0,gravity:.05,scalingRatio:10,slowDown:1+Math.log(f)}}var l=a.bind(null,!1);return l.assign=a.bind(null,!0),l.inferSettings=s,h0=l,h0}var $Q=LQ();const Kk=tt($Q);function FQ({graph:t}){const e=RQ();return I.useEffect(()=>{e(t)},[t,e]),null}function BQ({onNodeClick:t,onNodeHover:e}){const r=vx(),n=kQ();return I.useEffect(()=>{n({clickNode:i=>t==null?void 0:t(i.node),enterNode:i=>e==null?void 0:e(i.node),leaveNode:()=>e==null?void 0:e(void 0)})},[n,t,e]),I.useEffect(()=>{r.setSetting("labelRenderedSizeThreshold",10),r.setSetting("labelFont","Space Grotesk"),r.setSetting("labelColor",{color:"#e4e4ed"}),r.setSetting("edgeLabelColor",{color:"#94a3b8"})},[r]),null}function zQ({graph:t}){return I.useEffect(()=>{if(!(t.order<2))try{const e=Kk.inferSettings(t);Kk.assign(t,{iterations:Math.min(120,Math.max(40,t.order)),settings:{...e??{},gravity:.6,scalingRatio:10,slowDown:10}})}catch{}},[t]),null}function eh({graph:t,onNodeClick:e,onNodeHover:r}){const[n,i]=I.useState(0);I.useEffect(()=>{i(s=>s+1)},[t]);const a=I.useMemo(()=>({renderEdgeLabels:!0,labelDensity:.5,zIndex:!0,defaultNodeColor:"#64748b",defaultEdgeColor:"rgba(148, 163, 184, 0.4)",labelColor:{color:"#e4e4ed"},labelFont:"Space Grotesk, system-ui, sans-serif",labelRenderedSizeThreshold:8}),[]);return R.jsxs(jQ,{settings:a,className:"h-full w-full",style:{background:"#0d0d14"},children:[R.jsx(FQ,{graph:t}),R.jsx(zQ,{graph:t}),R.jsx(BQ,{onNodeClick:e,onNodeHover:r})]},n)}function th({title:t,subtitle:e,meta:r=[],description:n}){return R.jsxs("div",{className:"card overflow-hidden p-4",children:[R.jsxs("div",{children:[R.jsx("p",{className:"text-sm uppercase tracking-[0.3em] text-[#8888a0]",children:"Selected"}),R.jsx("h3",{className:"mt-2 break-all text-lg font-semibold",children:t}),e&&R.jsx("p",{className:"mt-1 break-all text-xs text-[#8888a0]",children:e})]}),n&&R.jsx("p",{className:"mt-3 break-words text-sm text-[#c2c2d6]",children:n}),R.jsx("div",{className:"mt-4 grid gap-3 text-sm",children:r.map(i=>R.jsxs("div",{className:"flex items-center justify-between border-b border-[#1f1f2c] pb-2",children:[R.jsx("span",{className:"text-[#8888a0]",children:i.label}),R.jsx("span",{className:"text-right text-[#e4e4ed]",children:i.value??"—"})]},i.label))})]})}const GQ={tool:"#3b82f6",service:"#10b981",concept:"#8b5cf6",decision:"#f59e0b",person:"#ec4899",file:"#6366f1",library:"#14b8a6"},pd=["#38bdf8","#34d399","#f472b6","#facc15","#a78bfa","#f87171","#22d3ee","#c4b5fd","#fb7185","#4ade80"],Yb={function:"#3b82f6",method:"#06b6d4",class:"#10b981",interface:"#8b5cf6",type:"#a855f7",enum:"#f59e0b",variable:"#64748b",property:"#94a3b8"},UQ={CALLS:"rgba(148, 163, 184, 0.4)",INHERITS:"rgba(249, 115, 22, 0.6)",IMPLEMENTS:"rgba(20, 184, 166, 0.6)",REFERENCES:"rgba(100, 116, 139, 0.3)"},Ou={supports:"#10b981",contradicts:"#ef4444",extends:"#3b82f6",supersedes:"#f97316",related:"#64748b",caused_by:"#eab308",refines:"#8b5cf6",implements:"#14b8a6"},qQ={redis_key:"#ef4444",pubsub_channel:"#f97316",mysql_table:"#3b82f6",api_endpoint:"#10b981",http_call:"#8b5cf6",bull_queue:"#eab308"};function rh(t,e){t.forEachNode(r=>{t.setNodeAttribute(r,"x",(Math.random()-.5)*e),t.setNodeAttribute(r,"y",(Math.random()-.5)*e)})}function WQ(t){const e=new He,r=new Map;for(const n of t.edges)r.set(n.sourceId,(r.get(n.sourceId)||0)+1),r.set(n.targetId,(r.get(n.targetId)||0)+1);for(const n of t.nodes){const i=r.get(n.id)||0,a=Math.max(5,Math.min(25,5+i*1.2));e.addNode(String(n.id),{id:String(n.id),label:n.name,entityType:n.type,size:a,color:GQ[n.type]||"#64748b",description:n.description,firstLearnedAt:n.firstLearnedAt,lastConfirmedAt:n.lastConfirmedAt,contradictedAt:n.contradictedAt})}for(const n of t.edges){const i=String(n.sourceId),a=String(n.targetId);e.hasNode(i)&&e.hasNode(a)&&e.addEdgeWithKey(String(n.id),i,a,{label:n.edgeType,edgeType:n.edgeType,size:1,color:"rgba(148, 163, 184, 0.4)"})}return rh(e,800),e}function HQ(t,e,r){const n=new He;for(const i of t){const a=Math.max(4,Math.min(20,4+i.centrality*24)),s=i.clusterId!==null?r[i.clusterId]:"#64748b";n.addNode(i.path,{id:i.path,label:i.path.split("/").slice(-2).join("/"),fullPath:i.path,clusterId:i.clusterId,size:a,color:s})}for(const i of e)n.hasNode(i.source)&&n.hasNode(i.target)&&n.addEdge(i.source,i.target,{label:"imports",size:1,color:"rgba(148, 163, 184, 0.35)"});return rh(n,900),n}function VQ(t,e){const r=new He;if(e&&t.clusters.length>0){for(const a of t.clusters)r.addNode(`cluster-${a.cluster_id}`,{id:`cluster-${a.cluster_id}`,label:`Cluster ${a.cluster_id} (${a.member_count})`,entityType:"cluster",size:Math.max(10,Math.min(40,10+a.member_count*.5)),color:pd[a.cluster_id%pd.length]});for(const a of t.symbols)a.cluster_id===null&&r.addNode(String(a.id),{id:String(a.id),label:a.name,entityType:a.kind,size:6,color:Yb[a.kind]||"#64748b",filePath:a.file_path,startLine:a.start_line});const n=new Map,i=new Map(t.symbols.map(a=>[a.id,a]));for(const a of t.edges){const s=i.get(a.source_id),l=i.get(a.target_id);if((s==null?void 0:s.cluster_id)!==null&&(l==null?void 0:l.cluster_id)!==null&&(s==null?void 0:s.cluster_id)!==(l==null?void 0:l.cluster_id)){const c=`cluster-${s.cluster_id}->cluster-${l.cluster_id}`;n.set(c,(n.get(c)||0)+1)}}for(const[a,s]of n){const[l,c]=a.split("->");r.hasNode(l)&&r.hasNode(c)&&r.addEdge(l,c,{label:`${s} calls`,size:Math.min(5,1+s*.2),color:"rgba(148,163,184,0.4)"})}}else{for(const n of t.symbols)r.addNode(String(n.id),{id:String(n.id),label:n.name,entityType:n.kind,size:6,color:Yb[n.kind]||"#64748b",filePath:n.file_path,startLine:n.start_line,clusterId:n.cluster_id});for(const n of t.edges){const i=String(n.source_id),a=String(n.target_id);r.hasNode(i)&&r.hasNode(a)&&r.addEdge(i,a,{label:n.edge_type,edgeType:n.edge_type,size:1,color:UQ[n.edge_type]||"rgba(148, 163, 184, 0.3)"})}}return rh(r,1e3),r}function KQ(t){const e=new He,r=new Set;for(const n of t.connections){const i=String(n.from_doc_id),a=String(n.to_doc_id);r.has(i)||(r.add(i),e.addNode(i,{id:i,label:n.from_title||n.from_path.split("/").pop()||i,entityType:"document",size:8,color:"#3b82f6",fullPath:n.from_path})),r.has(a)||(r.add(a),e.addNode(a,{id:a,label:n.to_title||n.to_path.split("/").pop()||a,entityType:"document",size:8,color:"#3b82f6",fullPath:n.to_path})),e.addEdge(i,a,{label:n.relationship_type,edgeType:n.relationship_type,size:Math.max(1,Math.min(5,n.strength*5)),color:Ou[n.relationship_type]||"rgba(148,163,184,0.4)"})}return rh(e,800),e}function XQ(){const t=kn(c=>c.workspace);console.log("[GraphExplorer] render workspace=",t);const{data:e,isLoading:r,error:n}=ln({queryKey:["graph-entities",t],queryFn:()=>mF(t)}),[i,a]=I.useState(null);r&&console.log("[GraphExplorer] loading..."),n&&console.error("[GraphExplorer] error:",n),e&&console.log("[GraphExplorer] data: nodes=",e.nodes.length,"edges=",e.edges.length,"stats=",e.stats);const s=I.useMemo(()=>{if(!e)return console.log("[GraphExplorer] no data, skipping graph build"),null;console.log("[GraphExplorer] building graph from",e.nodes.length,"nodes",e.edges.length,"edges");try{const c=WQ(e);return console.log("[GraphExplorer] graph built: order=",c.order,"size=",c.size),c}catch(c){return console.error("[GraphExplorer] graph build FAILED:",c),null}},[e]),l=e==null?void 0:e.nodes.find(c=>String(c.id)===i);return i&&console.log("[GraphExplorer] selected:",i,l==null?void 0:l.name),R.jsxs("div",{className:"space-y-6",children:[R.jsxs("div",{className:"flex items-start justify-between",children:[R.jsxs("div",{children:[R.jsx("h1",{className:"text-2xl font-semibold",children:"Knowledge Graph"}),R.jsx("p",{className:"mt-1 text-sm text-[#8888a0]",children:"Explore memory entities and their relationships."})]}),R.jsxs("div",{className:"text-right text-xs text-[#8888a0]",children:[R.jsxs("p",{children:["Nodes: ",(e==null?void 0:e.stats.nodeCount)??"—"]}),R.jsxs("p",{children:["Edges: ",(e==null?void 0:e.stats.edgeCount)??"—"]})]})]}),R.jsxs("div",{className:"grid grid-cols-[1fr_320px] gap-6",children:[R.jsx("div",{className:"card graph-shell overflow-hidden",children:s?R.jsx(eh,{graph:s,onNodeClick:c=>a(c)}):R.jsx("div",{className:"flex h-full items-center justify-center text-sm text-[#8888a0]",children:r?"Loading graph...":"No graph data."})}),R.jsxs("div",{className:"space-y-4",children:[l?R.jsx(th,{title:l.name,subtitle:l.type,description:l.description,meta:[{label:"First learned",value:l.firstLearnedAt},{label:"Last confirmed",value:l.lastConfirmedAt},{label:"Contradicted",value:l.contradictedAt}]}):R.jsx("div",{className:"card p-4 text-sm text-[#8888a0]",children:"Select a node to inspect details."}),R.jsxs("div",{className:"card p-4",children:[R.jsx("h3",{className:"text-sm font-semibold",children:"Type distribution"}),R.jsx("div",{className:"mt-3 grid gap-2 text-xs text-[#8888a0]",children:e!=null&&e.stats.typeDistribution?Object.entries(e.stats.typeDistribution).map(([c,f])=>R.jsxs("div",{className:"flex items-center justify-between",children:[R.jsx("span",{children:c}),R.jsx("span",{className:"text-[#e4e4ed]",children:f})]},c)):"—"})]})]})]})]})}function YQ(){const t=kn(p=>p.workspace),{data:e,isLoading:r}=ln({queryKey:["code-deps",t],queryFn:()=>gF(t)}),[n,i]=I.useState(null),a=I.useMemo(()=>{const p=new Map;return e==null||e.files.forEach(h=>{if(h.clusterId===null||p.has(h.clusterId))return;const m=pd[p.size%pd.length];p.set(h.clusterId,m)}),Object.fromEntries(p.entries())},[e]),s=I.useMemo(()=>e?HQ(e.files,e.edges,a):null,[e,a]),l=e==null?void 0:e.files.find(p=>p.path===n),c=(e==null?void 0:e.edges.filter(p=>p.source===n).length)??0,f=(e==null?void 0:e.edges.filter(p=>p.target===n).length)??0;return R.jsxs("div",{className:"space-y-6",children:[R.jsxs("div",{className:"flex items-start justify-between",children:[R.jsxs("div",{children:[R.jsx("h1",{className:"text-2xl font-semibold",children:"Code Dependencies"}),R.jsx("p",{className:"mt-1 text-sm text-[#8888a0]",children:"File-level dependency graph with centrality sizing."})]}),R.jsxs("div",{className:"text-right text-xs text-[#8888a0]",children:[R.jsxs("p",{children:["Files: ",(e==null?void 0:e.files.length)??"—"]}),R.jsxs("p",{children:["Edges: ",(e==null?void 0:e.edges.length)??"—"]})]})]}),R.jsxs("div",{className:"grid grid-cols-[1fr_320px] gap-6",children:[R.jsx("div",{className:"card graph-shell overflow-hidden",children:s?R.jsx(eh,{graph:s,onNodeClick:p=>i(p)}):R.jsx("div",{className:"flex h-full items-center justify-center text-sm text-[#8888a0]",children:r?"Loading code graph...":"No dependency data."})}),R.jsxs("div",{className:"space-y-4",children:[l?R.jsx(th,{title:l.path.split("/").slice(-2).join("/"),subtitle:l.path,meta:[{label:"Centrality",value:l.centrality.toFixed(3)},{label:"Cluster",value:l.clusterId??"—"},{label:"Imports",value:c},{label:"Dependents",value:f}]}):R.jsx("div",{className:"card p-4 text-sm text-[#8888a0]",children:"Select a file to inspect details."}),R.jsxs("div",{className:"card p-4 text-sm text-[#8888a0]",children:[R.jsx("p",{className:"font-semibold text-[#e4e4ed]",children:"Cluster legend"}),R.jsx("div",{className:"mt-3 grid gap-2",children:Object.entries(a).map(([p,h])=>R.jsxs("div",{className:"flex items-center justify-between",children:[R.jsxs("span",{children:["Cluster ",p]}),R.jsx("span",{className:"h-3 w-6 rounded-full",style:{background:h}})]},p))})]})]})]})]})}function QQ(){const t=kn(g=>g.workspace),{data:e,isLoading:r}=ln({queryKey:["symbols",t],queryFn:()=>yF(t)}),[n,i]=I.useState(null),[a,s]=I.useState(!0),l=((e==null?void 0:e.symbols.length)??0)>500,c=a&&l,f=I.useMemo(()=>{if(!e)return null;try{return VQ(e,c)}catch{return null}},[e,c]),p=e==null?void 0:e.symbols.find(g=>String(g.id)===n),h=(e==null?void 0:e.edges.filter(g=>String(g.target_id)===n).length)??0,m=(e==null?void 0:e.edges.filter(g=>String(g.source_id)===n).length)??0;return R.jsxs("div",{className:"space-y-6",children:[R.jsxs("div",{className:"flex items-start justify-between",children:[R.jsxs("div",{children:[R.jsx("h1",{className:"text-2xl font-semibold",children:"Symbol Call Graph"}),R.jsx("p",{className:"mt-1 text-sm text-[#8888a0]",children:"Functions, classes, and their call relationships."})]}),R.jsxs("div",{className:"flex items-center gap-4 text-xs text-[#8888a0]",children:[l&&R.jsxs("label",{className:"flex items-center gap-2",children:[R.jsx("input",{type:"checkbox",checked:a,onChange:g=>s(g.target.checked),className:"accent-indigo-500"}),"Cluster view"]}),R.jsxs("div",{className:"text-right",children:[R.jsxs("p",{children:["Symbols: ",(e==null?void 0:e.symbols.length)??"—"]}),R.jsxs("p",{children:["Edges: ",(e==null?void 0:e.edges.length)??"—"]}),R.jsxs("p",{children:["Clusters: ",(e==null?void 0:e.clusters.length)??"—"]})]})]})]}),R.jsxs("div",{className:"grid grid-cols-[1fr_320px] gap-6",children:[R.jsx("div",{className:"card graph-shell overflow-hidden",children:f?R.jsx(eh,{graph:f,onNodeClick:g=>i(g)}):R.jsx("div",{className:"flex h-full items-center justify-center text-sm text-[#8888a0]",children:r?"Loading symbols...":"No symbol data."})}),R.jsxs("div",{className:"space-y-4",children:[p?R.jsx(th,{title:p.name,subtitle:`${p.kind} · ${p.file_path.split("/").pop()}:${p.start_line}`,description:p.file_path,meta:[{label:"Kind",value:p.kind},{label:"Exported",value:p.exported?"Yes":"No"},{label:"Cluster",value:p.cluster_id??"—"},{label:"Callers",value:h},{label:"Callees",value:m}]}):R.jsx("div",{className:"card p-4 text-sm text-[#8888a0]",children:"Select a symbol to inspect details."}),R.jsxs("div",{className:"card p-4",children:[R.jsx("h3",{className:"text-sm font-semibold",children:"Symbol kinds"}),R.jsx("div",{className:"mt-3 grid gap-2 text-xs text-[#8888a0]",children:Object.entries(Yb).map(([g,_])=>R.jsxs("div",{className:"flex items-center justify-between",children:[R.jsxs("div",{className:"flex items-center gap-2",children:[R.jsx("span",{className:"h-3 w-3 rounded-full",style:{background:_}}),R.jsx("span",{children:g})]}),R.jsx("span",{className:"text-[#e4e4ed]",children:(e==null?void 0:e.symbols.filter(w=>w.kind===g).length)??0})]},g))})]})]})]})]})}function ZQ(){const t=kn(m=>m.workspace),{data:e,isLoading:r}=ln({queryKey:["flows",t],queryFn:()=>bF(t)}),[n,i]=I.useState(null),[a,s]=I.useState("all"),[l,c]=I.useState(""),f=(e==null?void 0:e.flows)??[],p=f.filter(m=>!(a!=="all"&&m.flow_type!==a||l&&!m.label.toLowerCase().includes(l.toLowerCase()))),h=f.find(m=>m.id===n);return R.jsxs("div",{className:"space-y-6",children:[R.jsxs("div",{children:[R.jsx("h1",{className:"text-2xl font-semibold",children:"Execution Flows"}),R.jsx("p",{className:"mt-1 text-sm text-[#8888a0]",children:"Entry-to-terminal call chains detected from code analysis."})]}),R.jsxs("div",{className:"flex items-center gap-4",children:[R.jsxs("select",{className:"panel px-3 py-2 text-sm text-[#e4e4ed]",value:a,onChange:m=>s(m.target.value),children:[R.jsx("option",{value:"all",children:"All types"}),R.jsx("option",{value:"intra_community",children:"Intra-community"}),R.jsx("option",{value:"cross_community",children:"Cross-community"})]}),R.jsx("input",{className:"panel flex-1 px-3 py-2 text-sm text-[#e4e4ed] placeholder-[#8888a0]",placeholder:"Search by symbol name...",value:l,onChange:m=>c(m.target.value)}),R.jsx("span",{className:"text-xs text-[#8888a0]",children:r?"Loading...":`${p.length} of ${f.length} flows`})]}),R.jsxs("div",{className:"grid grid-cols-[1fr_1fr] gap-6",children:[R.jsxs("div",{className:"space-y-2 overflow-auto",style:{maxHeight:"calc(100vh - 260px)"},children:[p.length===0&&!r&&R.jsx("div",{className:"card p-4 text-sm text-[#8888a0]",children:"No flows found."}),p.map(m=>R.jsxs("div",{className:`card cursor-pointer px-4 py-3 transition hover:bg-[#1c1c27] ${n===m.id?"border-indigo-500/50 bg-[#1c1c27]":""}`,onClick:()=>i(m.id),children:[R.jsxs("div",{className:"flex items-center justify-between",children:[R.jsx("p",{className:"text-sm font-medium",children:m.label}),R.jsx("span",{className:`rounded-full px-2 py-0.5 text-xs ${m.flow_type==="intra_community"?"bg-blue-500/20 text-blue-400":"bg-orange-500/20 text-orange-400"}`,children:m.flow_type==="intra_community"?"intra":"cross"})]}),R.jsxs("p",{className:"mt-1 text-xs text-[#8888a0]",children:[m.step_count," steps · ",m.entry_file.split("/").pop()," → ",m.terminal_file.split("/").pop()]})]},m.id))]}),R.jsx("div",{children:h?R.jsxs("div",{className:"card p-4",children:[R.jsx("h2",{className:"text-lg font-semibold",children:h.label}),R.jsxs("p",{className:"mt-1 text-xs text-[#8888a0]",children:[h.flow_type," · ",h.step_count," steps"]}),R.jsx("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:h.steps.map((m,g)=>R.jsxs(I.Fragment,{children:[g>0&&R.jsx("span",{className:"text-lg text-[#8888a0]",children:"→"}),R.jsxs("div",{className:"shrink-0 rounded-lg border border-[#232331] bg-[#1c1c27] px-3 py-2",children:[R.jsx("p",{className:"text-sm font-medium",children:m.name}),R.jsxs("p",{className:"text-xs text-[#8888a0]",children:[m.kind," · ",m.file_path.split("/").pop(),":",m.start_line]})]})]},m.step_index))}),R.jsxs("div",{className:"mt-4 border-t border-[#1f1f2c] pt-3 text-xs text-[#8888a0]",children:[R.jsxs("p",{children:["Entry: ",h.entry_name," (",h.entry_file,")"]}),R.jsxs("p",{children:["Terminal: ",h.terminal_name," (",h.terminal_file,")"]})]})]}):R.jsx("div",{className:"card p-4 text-sm text-[#8888a0]",children:"Select a flow to see its call chain."})})]})]})}function JQ(){const t=kn(E=>E.workspace),{data:e,isLoading:r}=ln({queryKey:["connections",t],queryFn:()=>wF(t)}),[n,i]=I.useState(null),a=(e==null?void 0:e.connections)??[],s=500,l=I.useMemo(()=>{if(!a.length)return[];const E=new Set,P=[];for(const T of a){const A=String(T.from_doc_id),x=String(T.to_doc_id),O=E.has(A),C=E.has(x),N=E.size+(O?0:1)+(C?0:1),D=E.size<s&&N<=s;(O&&C||D)&&(E.add(A),E.add(x),P.push(T))}return P},[a]),c=I.useMemo(()=>l.length?KQ({connections:l}):null,[l]),f=n?l.filter(E=>String(E.from_doc_id)===n||String(E.to_doc_id)===n):[],p=I.useMemo(()=>{if(!n||!l.length)return null;const E=l.find(P=>String(P.from_doc_id)===n||String(P.to_doc_id)===n);return E?String(E.from_doc_id)===n?{title:E.from_title,path:E.from_path}:{title:E.to_title,path:E.to_path}:null},[n,l]),h=I.useMemo(()=>{const E=new Map;return l.forEach(P=>E.set(P.relationship_type,(E.get(P.relationship_type)||0)+1)),Object.fromEntries(E.entries())},[l]),m=I.useMemo(()=>n?f.map(E=>{const P=String(E.from_doc_id)===n;return{id:E.id,type:E.relationship_type,strength:E.strength,target:P?E.to_title||E.to_path.split("/").pop()||E.to_doc_id:E.from_title||E.from_path.split("/").pop()||E.from_doc_id,targetPath:P?E.to_path:E.from_path,direction:P?"to":"from"}}):[],[f,n]),g=I.useMemo(()=>Object.keys(Ou).map(E=>({type:E,color:Ou[E]})),[]),_=new Set;a.forEach(E=>{_.add(String(E.from_doc_id)),_.add(String(E.to_doc_id))});const w=_.size,b=w>s;return R.jsxs("div",{className:"space-y-6",children:[R.jsxs("div",{className:"flex items-start justify-between",children:[R.jsxs("div",{children:[R.jsx("h1",{className:"text-2xl font-semibold",children:"Document Connections"}),R.jsx("p",{className:"mt-1 text-sm text-[#8888a0]",children:"Memory relationships across documents."})]}),R.jsxs("div",{className:"text-right text-xs text-[#8888a0]",children:[R.jsxs("p",{children:["Connections: ",a.length||0]}),R.jsxs("p",{children:["Documents: ",w||0]}),b&&R.jsxs("p",{className:"text-[#f97316]",children:["Showing first ",s," documents"]})]})]}),R.jsxs("div",{className:"grid grid-cols-[1fr_320px] gap-6",children:[R.jsx("div",{className:"card graph-shell overflow-hidden",children:c?R.jsx(eh,{graph:c,onNodeClick:E=>i(E)}):R.jsx("div",{className:"flex h-full items-center justify-center text-sm text-[#8888a0]",children:r?"Loading connections...":"No connection data."})}),R.jsxs("div",{className:"space-y-4",children:[p?R.jsx(th,{title:p.title||"Untitled document",subtitle:p.path,meta:[{label:"Connections",value:f.length}]}):R.jsx("div",{className:"card p-4 text-sm text-[#8888a0]",children:"Select a document to inspect details."}),R.jsxs("div",{className:"card p-4",children:[R.jsx("h3",{className:"text-sm font-semibold",children:"Relationship distribution"}),R.jsx("div",{className:"mt-3 grid gap-2 text-xs text-[#8888a0]",children:Object.keys(h).length?Object.entries(h).map(([E,P])=>R.jsxs("div",{className:"flex items-center justify-between",children:[R.jsxs("div",{className:"flex items-center gap-2",children:[R.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:Ou[E]??"#64748b"}}),R.jsx("span",{children:E})]}),R.jsx("span",{className:"text-[#e4e4ed]",children:P})]},E)):"—"})]}),R.jsxs("div",{className:"card p-4",children:[R.jsx("h3",{className:"text-sm font-semibold",children:"Legend"}),R.jsx("div",{className:"mt-3 grid gap-2 text-xs text-[#8888a0]",children:g.map(E=>R.jsxs("div",{className:"flex items-center gap-2",children:[R.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:E.color}}),R.jsx("span",{children:E.type})]},E.type))})]}),R.jsxs("div",{className:"card p-4",children:[R.jsx("h3",{className:"text-sm font-semibold",children:"Selected connections"}),R.jsx("div",{className:"mt-3 grid gap-3 text-xs text-[#8888a0]",children:n?m.length?m.map(E=>R.jsxs("div",{className:"rounded-xl border border-[#1f1f2c] bg-[#111118] px-3 py-2",children:[R.jsxs("div",{className:"flex items-center justify-between",children:[R.jsx("span",{className:"text-[#e4e4ed]",children:E.target}),R.jsx("span",{className:"rounded-full bg-[#1c1c27] px-2 py-0.5 text-[11px]",children:E.direction})]}),R.jsxs("div",{className:"mt-2 flex items-center justify-between",children:[R.jsxs("div",{className:"flex items-center gap-2",children:[R.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:Ou[E.type]??"#64748b"}}),R.jsx("span",{children:E.type})]}),R.jsxs("span",{children:["Strength ",E.strength.toFixed(2)]})]}),R.jsx("p",{className:"mt-2 text-[11px] text-[#646478]",children:E.targetPath})]},E.id)):R.jsx("p",{children:"No connections for this document."}):R.jsx("p",{children:"Select a document to see connection list."})})]})]})]})]})}function eZ(){const t=kn(x=>x.workspace),{data:e,isLoading:r}=ln({queryKey:["infrastructure",t],queryFn:()=>xF(t)}),[n,i]=I.useState({}),[a,s]=I.useState({}),[l,c]=I.useState("all"),[f,p]=I.useState(""),[h,m]=I.useState("all"),g=(e==null?void 0:e.grouped)??{},_=(e==null?void 0:e.symbols)??[],w=Object.keys(g),b=I.useMemo(()=>{const x=new Set;return _.forEach(O=>x.add(O.repo)),Array.from(x.values()).sort()},[_]),E=I.useMemo(()=>{const x=new Set;return _.forEach(O=>x.add(O.operation)),Array.from(x.values()).sort()},[_]),P=I.useMemo(()=>{const x=f.trim().toLowerCase();return Object.entries(g).filter(([O])=>l==="all"||O===l).map(([O,C])=>{const N=C.filter(D=>{const B=!x||D.operations.some(L=>L.repo.toLowerCase().includes(x)),U=h==="all"||D.operations.some(L=>L.op===h);return B&&U});return[O,N]}).filter(([,O])=>O.length>0)},[g,l,f,h]),T=x=>{i(O=>({...O,[x]:!O[x]}))},A=x=>{s(O=>({...O,[x]:!O[x]}))};return R.jsxs("div",{className:"space-y-6",children:[R.jsxs("header",{children:[R.jsx("h1",{className:"text-2xl font-semibold",children:"Infrastructure Symbols"}),R.jsx("p",{className:"mt-1 text-sm text-[#8888a0]",children:"Cross-repo Redis, MySQL, API, and queue dependencies."}),R.jsxs("div",{className:"mt-4 grid gap-3 lg:grid-cols-3",children:[R.jsxs("label",{className:"text-xs uppercase text-[#8888a0]",children:["Type",R.jsxs("select",{className:"panel mt-2 w-full px-3 py-2 text-sm text-[#e4e4ed]",value:l,onChange:x=>c(x.target.value),children:[R.jsx("option",{value:"all",children:"All types"}),w.map(x=>R.jsx("option",{value:x,children:x},x))]})]}),R.jsxs("label",{className:"text-xs uppercase text-[#8888a0]",children:["Repository",R.jsx("input",{value:f,onChange:x=>p(x.target.value),placeholder:"Filter by repo...",list:"repo-options",className:"mt-2 w-full rounded-xl border border-[#26263a] bg-[#0f0f16] px-3 py-2 text-sm text-[#e4e4ed]"}),R.jsx("datalist",{id:"repo-options",children:b.map(x=>R.jsx("option",{value:x},x))})]}),R.jsxs("label",{className:"text-xs uppercase text-[#8888a0]",children:["Operation",R.jsxs("select",{className:"panel mt-2 w-full px-3 py-2 text-sm text-[#e4e4ed]",value:h,onChange:x=>m(x.target.value),children:[R.jsx("option",{value:"all",children:"All operations"}),E.map(x=>R.jsx("option",{value:x,children:x},x))]})]})]}),R.jsx("div",{className:"mt-3 text-xs text-[#8888a0]",children:r?"Loading symbols...":`${P.reduce((x,[,O])=>x+O.length,0)} patterns`})]}),P.length===0&&!r?R.jsx("div",{className:"card p-6 text-sm text-[#8888a0]",children:"No infrastructure symbols found."}):R.jsx("div",{className:"space-y-6",children:P.map(([x,O])=>{const C=n[x]??!0;return R.jsxs("div",{className:"card overflow-hidden",children:[R.jsxs("div",{className:"flex cursor-pointer items-center gap-3 p-4",onClick:()=>T(x),children:[R.jsx("span",{className:"h-3 w-3 rounded-full",style:{background:qQ[x]??"#64748b"}}),R.jsx("h2",{className:"text-sm font-semibold uppercase tracking-[0.2em]",children:x}),R.jsxs("span",{className:"text-xs text-[#8888a0]",children:[O.length," patterns"]}),R.jsx("span",{className:"ml-auto text-xs text-[#646478]",children:C?"Collapse":"Expand"})]}),C&&R.jsx("div",{className:"border-t border-[#232331]",children:O.map(N=>{const D=`${x}-${N.pattern}`,B=Array.from(new Set(N.operations.map(L=>L.op))),U=a[D]??!1;return R.jsxs("div",{className:"border-b border-[#1f1f2c] px-4 py-3",children:[R.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[R.jsxs("button",{type:"button",className:"flex items-center gap-2 text-left text-sm text-[#e4e4ed]",onClick:()=>A(D),children:[R.jsx("span",{className:"text-xs text-[#646478]",children:U?"v":">"}),R.jsx("code",{className:"text-sm text-[#e4e4ed]",children:N.pattern})]}),R.jsxs("div",{className:"flex flex-wrap gap-2",children:[B.map(L=>R.jsx("span",{className:"rounded-full bg-[#1c1c27] px-2 py-0.5 text-xs",children:L},L)),R.jsxs("span",{className:"rounded-full bg-[#151520] px-2 py-0.5 text-xs text-[#8888a0]",children:[new Set(N.operations.map(L=>L.repo)).size," repos"]})]})]}),U&&R.jsx("div",{className:"mt-3 space-y-1 text-xs text-[#8888a0]",children:N.operations.map((L,j)=>R.jsxs("div",{children:["[",L.op,"] ",L.repo,": ",L.file,":",L.line]},`${D}-${L.repo}-${j}`))})]},D)})})]},x)})})]})}function tZ({result:t,expanded:e,onToggle:r}){const n=Math.min(100,Math.max(5,t.score*100));return R.jsxs("button",{type:"button",onClick:r,className:"card w-full cursor-pointer p-4 text-left transition hover:border-[#2a2a38]",children:[R.jsxs("div",{className:"flex items-start justify-between gap-4",children:[R.jsxs("div",{children:[R.jsx("h3",{className:"text-base font-semibold",children:t.title||t.path}),R.jsx("p",{className:"mt-1 text-xs text-[#8888a0]",children:t.path})]}),R.jsxs("div",{className:"min-w-[120px]",children:[R.jsx("p",{className:"text-xs uppercase text-[#8888a0]",children:"Score"}),R.jsx("div",{className:"mt-1 h-2 w-full rounded-full bg-[#1f1f2c]",children:R.jsx("div",{className:"h-2 rounded-full bg-gradient-to-r from-sky-500 via-indigo-500 to-fuchsia-500",style:{width:`${n}%`}})})]})]}),R.jsx("p",{className:"mt-3 text-sm text-[#c2c2d6]",children:t.snippet}),R.jsxs("div",{className:"mt-3 flex flex-wrap gap-2 text-xs text-[#8888a0]",children:[R.jsx("span",{className:"rounded-full border border-[#2a2a38] px-2 py-1",children:t.collection}),R.jsxs("span",{className:"rounded-full border border-[#2a2a38] px-2 py-1",children:["doc: ",t.docid]})]}),e&&R.jsxs("div",{className:"mt-4 border-t border-[#1f1f2c] pt-3 text-sm text-[#e4e4ed]",children:[R.jsx("p",{className:"text-xs uppercase text-[#8888a0]",children:"Expanded"}),R.jsx("p",{className:"mt-2 text-sm text-[#c2c2d6]",children:t.snippet}),R.jsxs("div",{className:"mt-3 text-xs text-[#8888a0]",children:["Doc ID: ",t.docid]})]})]})}function rZ(){const t=kn(f=>f.workspace),[e,r]=I.useState(""),[n,i]=I.useState(""),[a,s]=I.useState(null);I.useEffect(()=>{const f=window.setTimeout(()=>i(e),300);return()=>window.clearTimeout(f)},[e]);const{data:l,isFetching:c}=ln({queryKey:["search",n,t],queryFn:()=>SF(n,20,t),enabled:n.trim().length>1});return R.jsxs("div",{className:"space-y-6",children:[R.jsxs("div",{children:[R.jsx("h1",{className:"text-2xl font-semibold",children:"Hybrid Search"}),R.jsx("p",{className:"mt-1 text-sm text-[#8888a0]",children:"BM25 + vector + knowledge graph reranking."})]}),R.jsxs("div",{className:"card p-4",children:[R.jsx("label",{className:"text-xs uppercase text-[#8888a0]",children:"Search query"}),R.jsx("input",{value:e,onChange:f=>r(f.target.value),placeholder:"Search docs, entities, code...",className:"mt-2 w-full rounded-xl border border-[#26263a] bg-[#0f0f16] px-3 py-2 text-sm text-[#e4e4ed]"}),R.jsxs("div",{className:"mt-3 flex items-center justify-between text-xs text-[#8888a0]",children:[R.jsx("span",{children:c?"Searching...":l?`${l.results.length} results`:"Idle"}),R.jsx("span",{children:l?`${l.executionMs} ms`:"—"})]})]}),R.jsxs("div",{className:"space-y-4",children:[l==null?void 0:l.results.map(f=>R.jsx(tZ,{result:f,expanded:a===f.id,onToggle:()=>s(a===f.id?null:f.id)},f.id)),l&&l.results.length===0&&R.jsx("div",{className:"card p-6 text-sm text-[#8888a0]",children:"No results found."}),n.trim().length<=1&&R.jsx("div",{className:"card p-6 text-sm text-[#8888a0]",children:"Type at least 2 characters to search."})]})]})}function nZ(){return R.jsx(kF,{children:R.jsxs(RL,{children:[R.jsx(Sn,{path:"/",element:R.jsx(CL,{to:"/dashboard",replace:!0})}),R.jsx(Sn,{path:"/dashboard",element:R.jsx(ZK,{})}),R.jsx(Sn,{path:"/graph",element:R.jsx(XQ,{})}),R.jsx(Sn,{path:"/code",element:R.jsx(YQ,{})}),R.jsx(Sn,{path:"/symbols",element:R.jsx(QQ,{})}),R.jsx(Sn,{path:"/flows",element:R.jsx(ZQ,{})}),R.jsx(Sn,{path:"/connections",element:R.jsx(JQ,{})}),R.jsx(Sn,{path:"/infrastructure",element:R.jsx(eZ,{})}),R.jsx(Sn,{path:"/search",element:R.jsx(rZ,{})})]})})}const iZ=new D$({defaultOptions:{queries:{staleTime:1e3*60*5,retry:1}}}),Xk=document.getElementById("root");Xk&&NM.createRoot(Xk).render(R.jsx(Q.StrictMode,{children:R.jsx(M$,{client:iZ,children:R.jsx(t$,{basename:"/web",children:R.jsx(nZ,{})})})}));