var V4=Object.defineProperty;var Y4=(e,t,r)=>t in e?V4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var rt=(e,t,r)=>Y4(e,typeof t!="symbol"?t+"":t,r);function X4(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.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 l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).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)}})();function Hr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Oy={exports:{}},yc={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var zO;function G4(){if(zO)return yc;zO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,i,a){var l=null;if(a!==void 0&&(l=""+a),i.key!==void 0&&(l=""+i.key),"key"in i){a={};for(var u in i)u!=="key"&&(a[u]=i[u])}else a=i;return i=a.ref,{$$typeof:e,type:n,key:l,ref:i!==void 0?i:null,props:a}}return yc.Fragment=t,yc.jsx=r,yc.jsxs=r,yc}var HO;function Z4(){return HO||(HO=1,Oy.exports=G4()),Oy.exports}var _e=Z4(),ky={exports:{}},Ne={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var FO;function Q4(){if(FO)return Ne;FO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),v=Symbol.iterator;function g(I){return I===null||typeof I!="object"?null:(I=v&&I[v]||I["@@iterator"],typeof I=="function"?I:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,x={};function C(I,Y,L){this.props=I,this.context=Y,this.refs=x,this.updater=L||S}C.prototype.isReactComponent={},C.prototype.setState=function(I,Y){if(typeof I!="object"&&typeof I!="function"&&I!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,I,Y,"setState")},C.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function A(){}A.prototype=C.prototype;function O(I,Y,L){this.props=I,this.context=Y,this.refs=x,this.updater=L||S}var P=O.prototype=new A;P.constructor=O,_(P,C.prototype),P.isPureReactComponent=!0;var D=Array.isArray;function k(){}var R={H:null,A:null,T:null,S:null},N=Object.prototype.hasOwnProperty;function $(I,Y,L){var ue=L.ref;return{$$typeof:e,type:I,key:Y,ref:ue!==void 0?ue:null,props:L}}function ee(I,Y){return $(I.type,Y,I.props)}function F(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function z(I){var Y={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(L){return Y[L]})}var j=/\/+/g;function K(I,Y){return typeof I=="object"&&I!==null&&I.key!=null?z(""+I.key):Y.toString(36)}function W(I){switch(I.status){case"fulfilled":return I.value;case"rejected":throw I.reason;default:switch(typeof I.status=="string"?I.then(k,k):(I.status="pending",I.then(function(Y){I.status==="pending"&&(I.status="fulfilled",I.value=Y)},function(Y){I.status==="pending"&&(I.status="rejected",I.reason=Y)})),I.status){case"fulfilled":return I.value;case"rejected":throw I.reason}}throw I}function B(I,Y,L,ue,fe){var pe=typeof I;(pe==="undefined"||pe==="boolean")&&(I=null);var Te=!1;if(I===null)Te=!0;else switch(pe){case"bigint":case"string":case"number":Te=!0;break;case"object":switch(I.$$typeof){case e:case t:Te=!0;break;case d:return Te=I._init,B(Te(I._payload),Y,L,ue,fe)}}if(Te)return fe=fe(I),Te=ue===""?"."+K(I,0):ue,D(fe)?(L="",Te!=null&&(L=Te.replace(j,"$&/")+"/"),B(fe,Y,L,"",function(Ee){return Ee})):fe!=null&&(F(fe)&&(fe=ee(fe,L+(fe.key==null||I&&I.key===fe.key?"":(""+fe.key).replace(j,"$&/")+"/")+Te)),Y.push(fe)),1;Te=0;var tt=ue===""?".":ue+":";if(D(I))for(var ie=0;ie<I.length;ie++)ue=I[ie],pe=tt+K(ue,ie),Te+=B(ue,Y,L,pe,fe);else if(ie=g(I),typeof ie=="function")for(I=ie.call(I),ie=0;!(ue=I.next()).done;)ue=ue.value,pe=tt+K(ue,ie++),Te+=B(ue,Y,L,pe,fe);else if(pe==="object"){if(typeof I.then=="function")return B(W(I),Y,L,ue,fe);throw Y=String(I),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return Te}function q(I,Y,L){if(I==null)return I;var ue=[],fe=0;return B(I,ue,"","",function(pe){return Y.call(L,pe,fe++)}),ue}function G(I){if(I._status===-1){var Y=I._result;Y=Y(),Y.then(function(L){(I._status===0||I._status===-1)&&(I._status=1,I._result=L)},function(L){(I._status===0||I._status===-1)&&(I._status=2,I._result=L)}),I._status===-1&&(I._status=0,I._result=Y)}if(I._status===1)return I._result.default;throw I._result}var ce=typeof reportError=="function"?reportError:function(I){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof I=="object"&&I!==null&&typeof I.message=="string"?String(I.message):String(I),error:I});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",I);return}console.error(I)},M={map:q,forEach:function(I,Y,L){q(I,function(){Y.apply(this,arguments)},L)},count:function(I){var Y=0;return q(I,function(){Y++}),Y},toArray:function(I){return q(I,function(Y){return Y})||[]},only:function(I){if(!F(I))throw Error("React.Children.only expected to receive a single React element child.");return I}};return Ne.Activity=m,Ne.Children=M,Ne.Component=C,Ne.Fragment=r,Ne.Profiler=i,Ne.PureComponent=O,Ne.StrictMode=n,Ne.Suspense=f,Ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,Ne.__COMPILER_RUNTIME={__proto__:null,c:function(I){return R.H.useMemoCache(I)}},Ne.cache=function(I){return function(){return I.apply(null,arguments)}},Ne.cacheSignal=function(){return null},Ne.cloneElement=function(I,Y,L){if(I==null)throw Error("The argument must be a React element, but you passed "+I+".");var ue=_({},I.props),fe=I.key;if(Y!=null)for(pe in Y.key!==void 0&&(fe=""+Y.key),Y)!N.call(Y,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&Y.ref===void 0||(ue[pe]=Y[pe]);var pe=arguments.length-2;if(pe===1)ue.children=L;else if(1<pe){for(var Te=Array(pe),tt=0;tt<pe;tt++)Te[tt]=arguments[tt+2];ue.children=Te}return $(I.type,fe,ue)},Ne.createContext=function(I){return I={$$typeof:l,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null},I.Provider=I,I.Consumer={$$typeof:a,_context:I},I},Ne.createElement=function(I,Y,L){var ue,fe={},pe=null;if(Y!=null)for(ue in Y.key!==void 0&&(pe=""+Y.key),Y)N.call(Y,ue)&&ue!=="key"&&ue!=="__self"&&ue!=="__source"&&(fe[ue]=Y[ue]);var Te=arguments.length-2;if(Te===1)fe.children=L;else if(1<Te){for(var tt=Array(Te),ie=0;ie<Te;ie++)tt[ie]=arguments[ie+2];fe.children=tt}if(I&&I.defaultProps)for(ue in Te=I.defaultProps,Te)fe[ue]===void 0&&(fe[ue]=Te[ue]);return $(I,pe,fe)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(I){return{$$typeof:u,render:I}},Ne.isValidElement=F,Ne.lazy=function(I){return{$$typeof:d,_payload:{_status:-1,_result:I},_init:G}},Ne.memo=function(I,Y){return{$$typeof:h,type:I,compare:Y===void 0?null:Y}},Ne.startTransition=function(I){var Y=R.T,L={};R.T=L;try{var ue=I(),fe=R.S;fe!==null&&fe(L,ue),typeof ue=="object"&&ue!==null&&typeof ue.then=="function"&&ue.then(k,ce)}catch(pe){ce(pe)}finally{Y!==null&&L.types!==null&&(Y.types=L.types),R.T=Y}},Ne.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},Ne.use=function(I){return R.H.use(I)},Ne.useActionState=function(I,Y,L){return R.H.useActionState(I,Y,L)},Ne.useCallback=function(I,Y){return R.H.useCallback(I,Y)},Ne.useContext=function(I){return R.H.useContext(I)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(I,Y){return R.H.useDeferredValue(I,Y)},Ne.useEffect=function(I,Y){return R.H.useEffect(I,Y)},Ne.useEffectEvent=function(I){return R.H.useEffectEvent(I)},Ne.useId=function(){return R.H.useId()},Ne.useImperativeHandle=function(I,Y,L){return R.H.useImperativeHandle(I,Y,L)},Ne.useInsertionEffect=function(I,Y){return R.H.useInsertionEffect(I,Y)},Ne.useLayoutEffect=function(I,Y){return R.H.useLayoutEffect(I,Y)},Ne.useMemo=function(I,Y){return R.H.useMemo(I,Y)},Ne.useOptimistic=function(I,Y){return R.H.useOptimistic(I,Y)},Ne.useReducer=function(I,Y,L){return R.H.useReducer(I,Y,L)},Ne.useRef=function(I){return R.H.useRef(I)},Ne.useState=function(I){return R.H.useState(I)},Ne.useSyncExternalStore=function(I,Y,L){return R.H.useSyncExternalStore(I,Y,L)},Ne.useTransition=function(){return R.H.useTransition()},Ne.version="19.2.0",Ne}var UO;function tu(){return UO||(UO=1,ky.exports=Q4()),ky.exports}var w=tu();const im=Hr(w),J4=X4({__proto__:null,default:im},[w]);var Py={exports:{}},_c={},Ty={exports:{}},Dy={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var $O;function e8(){return $O||($O=1,(function(e){function t(B,q){var G=B.length;B.push(q);e:for(;0<G;){var ce=G-1>>>1,M=B[ce];if(0<i(M,q))B[ce]=q,B[G]=M,G=ce;else break e}}function r(B){return B.length===0?null:B[0]}function n(B){if(B.length===0)return null;var q=B[0],G=B.pop();if(G!==q){B[0]=G;e:for(var ce=0,M=B.length,I=M>>>1;ce<I;){var Y=2*(ce+1)-1,L=B[Y],ue=Y+1,fe=B[ue];if(0>i(L,G))ue<M&&0>i(fe,L)?(B[ce]=fe,B[ue]=G,ce=ue):(B[ce]=L,B[Y]=G,ce=Y);else if(ue<M&&0>i(fe,G))B[ce]=fe,B[ue]=G,ce=ue;else break e}}return q}function i(B,q){var G=B.sortIndex-q.sortIndex;return G!==0?G:B.id-q.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var f=[],h=[],d=1,m=null,v=3,g=!1,S=!1,_=!1,x=!1,C=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function P(B){for(var q=r(h);q!==null;){if(q.callback===null)n(h);else if(q.startTime<=B)n(h),q.sortIndex=q.expirationTime,t(f,q);else break;q=r(h)}}function D(B){if(_=!1,P(B),!S)if(r(f)!==null)S=!0,k||(k=!0,z());else{var q=r(h);q!==null&&W(D,q.startTime-B)}}var k=!1,R=-1,N=5,$=-1;function ee(){return x?!0:!(e.unstable_now()-$<N)}function F(){if(x=!1,k){var B=e.unstable_now();$=B;var q=!0;try{e:{S=!1,_&&(_=!1,A(R),R=-1),g=!0;var G=v;try{t:{for(P(B),m=r(f);m!==null&&!(m.expirationTime>B&&ee());){var ce=m.callback;if(typeof ce=="function"){m.callback=null,v=m.priorityLevel;var M=ce(m.expirationTime<=B);if(B=e.unstable_now(),typeof M=="function"){m.callback=M,P(B),q=!0;break t}m===r(f)&&n(f),P(B)}else n(f);m=r(f)}if(m!==null)q=!0;else{var I=r(h);I!==null&&W(D,I.startTime-B),q=!1}}break e}finally{m=null,v=G,g=!1}q=void 0}}finally{q?z():k=!1}}}var z;if(typeof O=="function")z=function(){O(F)};else if(typeof MessageChannel<"u"){var j=new MessageChannel,K=j.port2;j.port1.onmessage=F,z=function(){K.postMessage(null)}}else z=function(){C(F,0)};function W(B,q){R=C(function(){B(e.unstable_now())},q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(B){switch(v){case 1:case 2:case 3:var q=3;break;default:q=v}var G=v;v=q;try{return B()}finally{v=G}},e.unstable_requestPaint=function(){x=!0},e.unstable_runWithPriority=function(B,q){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var G=v;v=B;try{return q()}finally{v=G}},e.unstable_scheduleCallback=function(B,q,G){var ce=e.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?ce+G:ce):G=ce,B){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=G+M,B={id:d++,callback:q,priorityLevel:B,startTime:G,expirationTime:M,sortIndex:-1},G>ce?(B.sortIndex=G,t(h,B),r(f)===null&&B===r(h)&&(_?(A(R),R=-1):_=!0,W(D,G-ce))):(B.sortIndex=M,t(f,B),S||g||(S=!0,k||(k=!0,z()))),B},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(B){var q=v;return function(){var G=v;v=q;try{return B.apply(this,arguments)}finally{v=G}}}})(Dy)),Dy}var KO;function t8(){return KO||(KO=1,Ty.exports=e8()),Ty.exports}var My={exports:{}},Fr={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var qO;function r8(){if(qO)return Fr;qO=1;var e=tu();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)h+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},i=Symbol.for("react.portal");function a(f,h,d){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:m==null?null:""+m,children:f,containerInfo:h,implementation:d}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Fr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,Fr.createPortal=function(f,h){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return a(f,h,null,d)},Fr.flushSync=function(f){var h=l.T,d=n.p;try{if(l.T=null,n.p=2,f)return f()}finally{l.T=h,n.p=d,n.d.f()}},Fr.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,n.d.C(f,h))},Fr.prefetchDNS=function(f){typeof f=="string"&&n.d.D(f)},Fr.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var d=h.as,m=u(d,h.crossOrigin),v=typeof h.integrity=="string"?h.integrity:void 0,g=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;d==="style"?n.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:m,integrity:v,fetchPriority:g}):d==="script"&&n.d.X(f,{crossOrigin:m,integrity:v,fetchPriority:g,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Fr.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var d=u(h.as,h.crossOrigin);n.d.M(f,{crossOrigin:d,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&n.d.M(f)},Fr.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var d=h.as,m=u(d,h.crossOrigin);n.d.L(f,d,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Fr.preloadModule=function(f,h){if(typeof f=="string")if(h){var d=u(h.as,h.crossOrigin);n.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:d,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else n.d.m(f)},Fr.requestFormReset=function(f){n.d.r(f)},Fr.unstable_batchedUpdates=function(f,h){return f(h)},Fr.useFormState=function(f,h,d){return l.H.useFormState(f,h,d)},Fr.useFormStatus=function(){return l.H.useHostTransitionStatus()},Fr.version="19.2.0",Fr}var WO;function JR(){if(WO)return My.exports;WO=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),My.exports=r8(),My.exports}/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var VO;function n8(){if(VO)return _c;VO=1;var e=t8(),t=tu(),r=JR();function n(s){var o="https://react.dev/errors/"+s;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)o+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+s+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function a(s){var o=s,c=s;if(s.alternate)for(;o.return;)o=o.return;else{s=o;do o=s,(o.flags&4098)!==0&&(c=o.return),s=o.return;while(s)}return o.tag===3?c:null}function l(s){if(s.tag===13){var o=s.memoizedState;if(o===null&&(s=s.alternate,s!==null&&(o=s.memoizedState)),o!==null)return o.dehydrated}return null}function u(s){if(s.tag===31){var o=s.memoizedState;if(o===null&&(s=s.alternate,s!==null&&(o=s.memoizedState)),o!==null)return o.dehydrated}return null}function f(s){if(a(s)!==s)throw Error(n(188))}function h(s){var o=s.alternate;if(!o){if(o=a(s),o===null)throw Error(n(188));return o!==s?null:s}for(var c=s,p=o;;){var y=c.return;if(y===null)break;var b=y.alternate;if(b===null){if(p=y.return,p!==null){c=p;continue}break}if(y.child===b.child){for(b=y.child;b;){if(b===c)return f(y),s;if(b===p)return f(y),o;b=b.sibling}throw Error(n(188))}if(c.return!==p.return)c=y,p=b;else{for(var E=!1,T=y.child;T;){if(T===c){E=!0,c=y,p=b;break}if(T===p){E=!0,p=y,c=b;break}T=T.sibling}if(!E){for(T=b.child;T;){if(T===c){E=!0,c=b,p=y;break}if(T===p){E=!0,p=b,c=y;break}T=T.sibling}if(!E)throw Error(n(189))}}if(c.alternate!==p)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?s:o}function d(s){var o=s.tag;if(o===5||o===26||o===27||o===6)return s;for(s=s.child;s!==null;){if(o=d(s),o!==null)return o;s=s.sibling}return null}var m=Object.assign,v=Symbol.for("react.element"),g=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),O=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),ee=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function z(s){return s===null||typeof s!="object"?null:(s=F&&s[F]||s["@@iterator"],typeof s=="function"?s:null)}var j=Symbol.for("react.client.reference");function K(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===j?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case _:return"Fragment";case C:return"Profiler";case x:return"StrictMode";case D:return"Suspense";case k:return"SuspenseList";case $:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case S:return"Portal";case O:return s.displayName||"Context";case A:return(s._context.displayName||"Context")+".Consumer";case P:var o=s.render;return s=s.displayName,s||(s=o.displayName||o.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case R:return o=s.displayName||null,o!==null?o:K(s.type)||"Memo";case N:o=s._payload,s=s._init;try{return K(s(o))}catch{}}return null}var W=Array.isArray,B=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G={pending:!1,data:null,method:null,action:null},ce=[],M=-1;function I(s){return{current:s}}function Y(s){0>M||(s.current=ce[M],ce[M]=null,M--)}function L(s,o){M++,ce[M]=s.current,s.current=o}var ue=I(null),fe=I(null),pe=I(null),Te=I(null);function tt(s,o){switch(L(pe,o),L(fe,s),L(ue,null),o.nodeType){case 9:case 11:s=(s=o.documentElement)&&(s=s.namespaceURI)?lO(s):0;break;default:if(s=o.tagName,o=o.namespaceURI)o=lO(o),s=uO(o,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}Y(ue),L(ue,s)}function ie(){Y(ue),Y(fe),Y(pe)}function Ee(s){s.memoizedState!==null&&L(Te,s);var o=ue.current,c=uO(o,s.type);o!==c&&(L(fe,s),L(ue,c))}function Oe(s){fe.current===s&&(Y(ue),Y(fe)),Te.current===s&&(Y(Te),pc._currentValue=G)}var le,ke;function Be(s){if(le===void 0)try{throw Error()}catch(c){var o=c.stack.trim().match(/\n( *(at )?)/);le=o&&o[1]||"",ke=-1<c.stack.indexOf(`
    at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
`+le+s+ke}var Xt=!1;function Gt(s,o){if(!s||Xt)return"";Xt=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(o){var se=function(){throw Error()};if(Object.defineProperty(se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(se,[])}catch(te){var J=te}Reflect.construct(s,[],se)}else{try{se.call()}catch(te){J=te}s.call(se.prototype)}}else{try{throw Error()}catch(te){J=te}(se=s())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(te){if(te&&J&&typeof te.stack=="string")return[te.stack,J.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=p.DetermineComponentFrameRoot(),E=b[0],T=b[1];if(E&&T){var H=E.split(`
`),Q=T.split(`
`);for(y=p=0;p<H.length&&!H[p].includes("DetermineComponentFrameRoot");)p++;for(;y<Q.length&&!Q[y].includes("DetermineComponentFrameRoot");)y++;if(p===H.length||y===Q.length)for(p=H.length-1,y=Q.length-1;1<=p&&0<=y&&H[p]!==Q[y];)y--;for(;1<=p&&0<=y;p--,y--)if(H[p]!==Q[y]){if(p!==1||y!==1)do if(p--,y--,0>y||H[p]!==Q[y]){var re=`
`+H[p].replace(" at new "," at ");return s.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",s.displayName)),re}while(1<=p&&0<=y);break}}}finally{Xt=!1,Error.prepareStackTrace=c}return(c=s?s.displayName||s.name:"")?Be(c):""}function jn(s,o){switch(s.tag){case 26:case 27:case 5:return Be(s.type);case 16:return Be("Lazy");case 13:return s.child!==o&&o!==null?Be("Suspense Fallback"):Be("Suspense");case 19:return Be("SuspenseList");case 0:case 15:return Gt(s.type,!1);case 11:return Gt(s.type.render,!1);case 1:return Gt(s.type,!0);case 31:return Be("Activity");default:return""}}function Is(s){try{var o="",c=null;do o+=jn(s,c),c=s,s=s.return;while(s);return o}catch(p){return`
Error generating stack: `+p.message+`
`+p.stack}}var Fo=Object.prototype.hasOwnProperty,Uo=e.unstable_scheduleCallback,Au=e.unstable_cancelCallback,fv=e.unstable_shouldYield,dv=e.unstable_requestPaint,Xr=e.unstable_now,pv=e.unstable_getCurrentPriorityLevel,ne=e.unstable_ImmediatePriority,ve=e.unstable_UserBlockingPriority,Re=e.unstable_NormalPriority,Ye=e.unstable_LowPriority,ut=e.unstable_IdlePriority,_n=e.log,Ki=e.unstable_setDisableYieldValue,Gr=null,sr=null;function nn(s){if(typeof _n=="function"&&Ki(s),sr&&typeof sr.setStrictMode=="function")try{sr.setStrictMode(Gr,s)}catch{}}var _t=Math.clz32?Math.clz32:R5,za=Math.log,pi=Math.LN2;function R5(s){return s>>>=0,s===0?32:31-(za(s)/pi|0)|0}var ef=256,tf=262144,rf=4194304;function js(s){var o=s&42;if(o!==0)return o;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function nf(s,o,c){var p=s.pendingLanes;if(p===0)return 0;var y=0,b=s.suspendedLanes,E=s.pingedLanes;s=s.warmLanes;var T=p&134217727;return T!==0?(p=T&~b,p!==0?y=js(p):(E&=T,E!==0?y=js(E):c||(c=T&~s,c!==0&&(y=js(c))))):(T=p&~b,T!==0?y=js(T):E!==0?y=js(E):c||(c=p&~s,c!==0&&(y=js(c)))),y===0?0:o!==0&&o!==y&&(o&b)===0&&(b=y&-y,c=o&-o,b>=c||b===32&&(c&4194048)!==0)?o:y}function Ou(s,o){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&o)===0}function L5(s,o){switch(s){case 1:case 2:case 4:case 8:case 64:return o+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function $x(){var s=rf;return rf<<=1,(rf&62914560)===0&&(rf=4194304),s}function mv(s){for(var o=[],c=0;31>c;c++)o.push(s);return o}function ku(s,o){s.pendingLanes|=o,o!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function B5(s,o,c,p,y,b){var E=s.pendingLanes;s.pendingLanes=c,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=c,s.entangledLanes&=c,s.errorRecoveryDisabledLanes&=c,s.shellSuspendCounter=0;var T=s.entanglements,H=s.expirationTimes,Q=s.hiddenUpdates;for(c=E&~c;0<c;){var re=31-_t(c),se=1<<re;T[re]=0,H[re]=-1;var J=Q[re];if(J!==null)for(Q[re]=null,re=0;re<J.length;re++){var te=J[re];te!==null&&(te.lane&=-536870913)}c&=~se}p!==0&&Kx(s,p,0),b!==0&&y===0&&s.tag!==0&&(s.suspendedLanes|=b&~(E&~o))}function Kx(s,o,c){s.pendingLanes|=o,s.suspendedLanes&=~o;var p=31-_t(o);s.entangledLanes|=o,s.entanglements[p]=s.entanglements[p]|1073741824|c&261930}function qx(s,o){var c=s.entangledLanes|=o;for(s=s.entanglements;c;){var p=31-_t(c),y=1<<p;y&o|s[p]&o&&(s[p]|=o),c&=~y}}function Wx(s,o){var c=o&-o;return c=(c&42)!==0?1:vv(c),(c&(s.suspendedLanes|o))!==0?0:c}function vv(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function gv(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function Vx(){var s=q.p;return s!==0?s:(s=window.event,s===void 0?32:MO(s.type))}function Yx(s,o){var c=q.p;try{return q.p=s,o()}finally{q.p=c}}var Ha=Math.random().toString(36).slice(2),Pr="__reactFiber$"+Ha,an="__reactProps$"+Ha,$o="__reactContainer$"+Ha,yv="__reactEvents$"+Ha,N5="__reactListeners$"+Ha,I5="__reactHandles$"+Ha,Xx="__reactResources$"+Ha,Pu="__reactMarker$"+Ha;function _v(s){delete s[Pr],delete s[an],delete s[yv],delete s[N5],delete s[I5]}function Ko(s){var o=s[Pr];if(o)return o;for(var c=s.parentNode;c;){if(o=c[$o]||c[Pr]){if(c=o.alternate,o.child!==null||c!==null&&c.child!==null)for(s=vO(s);s!==null;){if(c=s[Pr])return c;s=vO(s)}return o}s=c,c=s.parentNode}return null}function qo(s){if(s=s[Pr]||s[$o]){var o=s.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return s}return null}function Tu(s){var o=s.tag;if(o===5||o===26||o===27||o===6)return s.stateNode;throw Error(n(33))}function Wo(s){var o=s[Xx];return o||(o=s[Xx]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function mr(s){s[Pu]=!0}var Gx=new Set,Zx={};function zs(s,o){Vo(s,o),Vo(s+"Capture",o)}function Vo(s,o){for(Zx[s]=o,s=0;s<o.length;s++)Gx.add(o[s])}var j5=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Qx={},Jx={};function z5(s){return Fo.call(Jx,s)?!0:Fo.call(Qx,s)?!1:j5.test(s)?Jx[s]=!0:(Qx[s]=!0,!1)}function af(s,o,c){if(z5(o))if(c===null)s.removeAttribute(o);else{switch(typeof c){case"undefined":case"function":case"symbol":s.removeAttribute(o);return;case"boolean":var p=o.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){s.removeAttribute(o);return}}s.setAttribute(o,""+c)}}function sf(s,o,c){if(c===null)s.removeAttribute(o);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(o);return}s.setAttribute(o,""+c)}}function qi(s,o,c,p){if(p===null)s.removeAttribute(c);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(c);return}s.setAttributeNS(o,c,""+p)}}function zn(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function eC(s){var o=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function H5(s,o,c){var p=Object.getOwnPropertyDescriptor(s.constructor.prototype,o);if(!s.hasOwnProperty(o)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var y=p.get,b=p.set;return Object.defineProperty(s,o,{configurable:!0,get:function(){return y.call(this)},set:function(E){c=""+E,b.call(this,E)}}),Object.defineProperty(s,o,{enumerable:p.enumerable}),{getValue:function(){return c},setValue:function(E){c=""+E},stopTracking:function(){s._valueTracker=null,delete s[o]}}}}function bv(s){if(!s._valueTracker){var o=eC(s)?"checked":"value";s._valueTracker=H5(s,o,""+s[o])}}function tC(s){if(!s)return!1;var o=s._valueTracker;if(!o)return!0;var c=o.getValue(),p="";return s&&(p=eC(s)?s.checked?"true":"false":s.value),s=p,s!==c?(o.setValue(s),!0):!1}function of(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var F5=/[\n"\\]/g;function Hn(s){return s.replace(F5,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Sv(s,o,c,p,y,b,E,T){s.name="",E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?s.type=E:s.removeAttribute("type"),o!=null?E==="number"?(o===0&&s.value===""||s.value!=o)&&(s.value=""+zn(o)):s.value!==""+zn(o)&&(s.value=""+zn(o)):E!=="submit"&&E!=="reset"||s.removeAttribute("value"),o!=null?wv(s,E,zn(o)):c!=null?wv(s,E,zn(c)):p!=null&&s.removeAttribute("value"),y==null&&b!=null&&(s.defaultChecked=!!b),y!=null&&(s.checked=y&&typeof y!="function"&&typeof y!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?s.name=""+zn(T):s.removeAttribute("name")}function rC(s,o,c,p,y,b,E,T){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(s.type=b),o!=null||c!=null){if(!(b!=="submit"&&b!=="reset"||o!=null)){bv(s);return}c=c!=null?""+zn(c):"",o=o!=null?""+zn(o):c,T||o===s.value||(s.value=o),s.defaultValue=o}p=p??y,p=typeof p!="function"&&typeof p!="symbol"&&!!p,s.checked=T?s.checked:!!p,s.defaultChecked=!!p,E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(s.name=E),bv(s)}function wv(s,o,c){o==="number"&&of(s.ownerDocument)===s||s.defaultValue===""+c||(s.defaultValue=""+c)}function Yo(s,o,c,p){if(s=s.options,o){o={};for(var y=0;y<c.length;y++)o["$"+c[y]]=!0;for(c=0;c<s.length;c++)y=o.hasOwnProperty("$"+s[c].value),s[c].selected!==y&&(s[c].selected=y),y&&p&&(s[c].defaultSelected=!0)}else{for(c=""+zn(c),o=null,y=0;y<s.length;y++){if(s[y].value===c){s[y].selected=!0,p&&(s[y].defaultSelected=!0);return}o!==null||s[y].disabled||(o=s[y])}o!==null&&(o.selected=!0)}}function nC(s,o,c){if(o!=null&&(o=""+zn(o),o!==s.value&&(s.value=o),c==null)){s.defaultValue!==o&&(s.defaultValue=o);return}s.defaultValue=c!=null?""+zn(c):""}function iC(s,o,c,p){if(o==null){if(p!=null){if(c!=null)throw Error(n(92));if(W(p)){if(1<p.length)throw Error(n(93));p=p[0]}c=p}c==null&&(c=""),o=c}c=zn(o),s.defaultValue=c,p=s.textContent,p===c&&p!==""&&p!==null&&(s.value=p),bv(s)}function Xo(s,o){if(o){var c=s.firstChild;if(c&&c===s.lastChild&&c.nodeType===3){c.nodeValue=o;return}}s.textContent=o}var U5=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function aC(s,o,c){var p=o.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?p?s.setProperty(o,""):o==="float"?s.cssFloat="":s[o]="":p?s.setProperty(o,c):typeof c!="number"||c===0||U5.has(o)?o==="float"?s.cssFloat=c:s[o]=(""+c).trim():s[o]=c+"px"}function sC(s,o,c){if(o!=null&&typeof o!="object")throw Error(n(62));if(s=s.style,c!=null){for(var p in c)!c.hasOwnProperty(p)||o!=null&&o.hasOwnProperty(p)||(p.indexOf("--")===0?s.setProperty(p,""):p==="float"?s.cssFloat="":s[p]="");for(var y in o)p=o[y],o.hasOwnProperty(y)&&c[y]!==p&&aC(s,y,p)}else for(var b in o)o.hasOwnProperty(b)&&aC(s,b,o[b])}function xv(s){if(s.indexOf("-")===-1)return!1;switch(s){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 $5=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),K5=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function lf(s){return K5.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function Wi(){}var Cv=null;function Ev(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Go=null,Zo=null;function oC(s){var o=qo(s);if(o&&(s=o.stateNode)){var c=s[an]||null;e:switch(s=o.stateNode,o.type){case"input":if(Sv(s,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),o=c.name,c.type==="radio"&&o!=null){for(c=s;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+Hn(""+o)+'"][type="radio"]'),o=0;o<c.length;o++){var p=c[o];if(p!==s&&p.form===s.form){var y=p[an]||null;if(!y)throw Error(n(90));Sv(p,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(o=0;o<c.length;o++)p=c[o],p.form===s.form&&tC(p)}break e;case"textarea":nC(s,c.value,c.defaultValue);break e;case"select":o=c.value,o!=null&&Yo(s,!!c.multiple,o,!1)}}}var Av=!1;function lC(s,o,c){if(Av)return s(o,c);Av=!0;try{var p=s(o);return p}finally{if(Av=!1,(Go!==null||Zo!==null)&&(Xf(),Go&&(o=Go,s=Zo,Zo=Go=null,oC(o),s)))for(o=0;o<s.length;o++)oC(s[o])}}function Du(s,o){var c=s.stateNode;if(c===null)return null;var p=c[an]||null;if(p===null)return null;c=p[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(s=s.type,p=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!p;break e;default:s=!1}if(s)return null;if(c&&typeof c!="function")throw Error(n(231,o,typeof c));return c}var Vi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ov=!1;if(Vi)try{var Mu={};Object.defineProperty(Mu,"passive",{get:function(){Ov=!0}}),window.addEventListener("test",Mu,Mu),window.removeEventListener("test",Mu,Mu)}catch{Ov=!1}var Fa=null,kv=null,uf=null;function uC(){if(uf)return uf;var s,o=kv,c=o.length,p,y="value"in Fa?Fa.value:Fa.textContent,b=y.length;for(s=0;s<c&&o[s]===y[s];s++);var E=c-s;for(p=1;p<=E&&o[c-p]===y[b-p];p++);return uf=y.slice(s,1<p?1-p:void 0)}function cf(s){var o=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&o===13&&(s=13)):s=o,s===10&&(s=13),32<=s||s===13?s:0}function hf(){return!0}function cC(){return!1}function sn(s){function o(c,p,y,b,E){this._reactName=c,this._targetInst=y,this.type=p,this.nativeEvent=b,this.target=E,this.currentTarget=null;for(var T in s)s.hasOwnProperty(T)&&(c=s[T],this[T]=c?c(b):b[T]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?hf:cC,this.isPropagationStopped=cC,this}return m(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=hf)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=hf)},persist:function(){},isPersistent:hf}),o}var Hs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ff=sn(Hs),Ru=m({},Hs,{view:0,detail:0}),q5=sn(Ru),Pv,Tv,Lu,df=m({},Ru,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mv,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==Lu&&(Lu&&s.type==="mousemove"?(Pv=s.screenX-Lu.screenX,Tv=s.screenY-Lu.screenY):Tv=Pv=0,Lu=s),Pv)},movementY:function(s){return"movementY"in s?s.movementY:Tv}}),hC=sn(df),W5=m({},df,{dataTransfer:0}),V5=sn(W5),Y5=m({},Ru,{relatedTarget:0}),Dv=sn(Y5),X5=m({},Hs,{animationName:0,elapsedTime:0,pseudoElement:0}),G5=sn(X5),Z5=m({},Hs,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),Q5=sn(Z5),J5=m({},Hs,{data:0}),fC=sn(J5),e6={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},t6={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"},r6={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function n6(s){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(s):(s=r6[s])?!!o[s]:!1}function Mv(){return n6}var i6=m({},Ru,{key:function(s){if(s.key){var o=e6[s.key]||s.key;if(o!=="Unidentified")return o}return s.type==="keypress"?(s=cf(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?t6[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mv,charCode:function(s){return s.type==="keypress"?cf(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?cf(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),a6=sn(i6),s6=m({},df,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),dC=sn(s6),o6=m({},Ru,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mv}),l6=sn(o6),u6=m({},Hs,{propertyName:0,elapsedTime:0,pseudoElement:0}),c6=sn(u6),h6=m({},df,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),f6=sn(h6),d6=m({},Hs,{newState:0,oldState:0}),p6=sn(d6),m6=[9,13,27,32],Rv=Vi&&"CompositionEvent"in window,Bu=null;Vi&&"documentMode"in document&&(Bu=document.documentMode);var v6=Vi&&"TextEvent"in window&&!Bu,pC=Vi&&(!Rv||Bu&&8<Bu&&11>=Bu),mC=" ",vC=!1;function gC(s,o){switch(s){case"keyup":return m6.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yC(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Qo=!1;function g6(s,o){switch(s){case"compositionend":return yC(o);case"keypress":return o.which!==32?null:(vC=!0,mC);case"textInput":return s=o.data,s===mC&&vC?null:s;default:return null}}function y6(s,o){if(Qo)return s==="compositionend"||!Rv&&gC(s,o)?(s=uC(),uf=kv=Fa=null,Qo=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return pC&&o.locale!=="ko"?null:o.data;default:return null}}var _6={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 _C(s){var o=s&&s.nodeName&&s.nodeName.toLowerCase();return o==="input"?!!_6[s.type]:o==="textarea"}function bC(s,o,c,p){Go?Zo?Zo.push(p):Zo=[p]:Go=p,o=rd(o,"onChange"),0<o.length&&(c=new ff("onChange","change",null,c,p),s.push({event:c,listeners:o}))}var Nu=null,Iu=null;function b6(s){rO(s,0)}function pf(s){var o=Tu(s);if(tC(o))return s}function SC(s,o){if(s==="change")return o}var wC=!1;if(Vi){var Lv;if(Vi){var Bv="oninput"in document;if(!Bv){var xC=document.createElement("div");xC.setAttribute("oninput","return;"),Bv=typeof xC.oninput=="function"}Lv=Bv}else Lv=!1;wC=Lv&&(!document.documentMode||9<document.documentMode)}function CC(){Nu&&(Nu.detachEvent("onpropertychange",EC),Iu=Nu=null)}function EC(s){if(s.propertyName==="value"&&pf(Iu)){var o=[];bC(o,Iu,s,Ev(s)),lC(b6,o)}}function S6(s,o,c){s==="focusin"?(CC(),Nu=o,Iu=c,Nu.attachEvent("onpropertychange",EC)):s==="focusout"&&CC()}function w6(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return pf(Iu)}function x6(s,o){if(s==="click")return pf(o)}function C6(s,o){if(s==="input"||s==="change")return pf(o)}function E6(s,o){return s===o&&(s!==0||1/s===1/o)||s!==s&&o!==o}var bn=typeof Object.is=="function"?Object.is:E6;function ju(s,o){if(bn(s,o))return!0;if(typeof s!="object"||s===null||typeof o!="object"||o===null)return!1;var c=Object.keys(s),p=Object.keys(o);if(c.length!==p.length)return!1;for(p=0;p<c.length;p++){var y=c[p];if(!Fo.call(o,y)||!bn(s[y],o[y]))return!1}return!0}function AC(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function OC(s,o){var c=AC(s);s=0;for(var p;c;){if(c.nodeType===3){if(p=s+c.textContent.length,s<=o&&p>=o)return{node:c,offset:o-s};s=p}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=AC(c)}}function kC(s,o){return s&&o?s===o?!0:s&&s.nodeType===3?!1:o&&o.nodeType===3?kC(s,o.parentNode):"contains"in s?s.contains(o):s.compareDocumentPosition?!!(s.compareDocumentPosition(o)&16):!1:!1}function PC(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var o=of(s.document);o instanceof s.HTMLIFrameElement;){try{var c=typeof o.contentWindow.location.href=="string"}catch{c=!1}if(c)s=o.contentWindow;else break;o=of(s.document)}return o}function Nv(s){var o=s&&s.nodeName&&s.nodeName.toLowerCase();return o&&(o==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||o==="textarea"||s.contentEditable==="true")}var A6=Vi&&"documentMode"in document&&11>=document.documentMode,Jo=null,Iv=null,zu=null,jv=!1;function TC(s,o,c){var p=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;jv||Jo==null||Jo!==of(p)||(p=Jo,"selectionStart"in p&&Nv(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),zu&&ju(zu,p)||(zu=p,p=rd(Iv,"onSelect"),0<p.length&&(o=new ff("onSelect","select",null,o,c),s.push({event:o,listeners:p}),o.target=Jo)))}function Fs(s,o){var c={};return c[s.toLowerCase()]=o.toLowerCase(),c["Webkit"+s]="webkit"+o,c["Moz"+s]="moz"+o,c}var el={animationend:Fs("Animation","AnimationEnd"),animationiteration:Fs("Animation","AnimationIteration"),animationstart:Fs("Animation","AnimationStart"),transitionrun:Fs("Transition","TransitionRun"),transitionstart:Fs("Transition","TransitionStart"),transitioncancel:Fs("Transition","TransitionCancel"),transitionend:Fs("Transition","TransitionEnd")},zv={},DC={};Vi&&(DC=document.createElement("div").style,"AnimationEvent"in window||(delete el.animationend.animation,delete el.animationiteration.animation,delete el.animationstart.animation),"TransitionEvent"in window||delete el.transitionend.transition);function Us(s){if(zv[s])return zv[s];if(!el[s])return s;var o=el[s],c;for(c in o)if(o.hasOwnProperty(c)&&c in DC)return zv[s]=o[c];return s}var MC=Us("animationend"),RC=Us("animationiteration"),LC=Us("animationstart"),O6=Us("transitionrun"),k6=Us("transitionstart"),P6=Us("transitioncancel"),BC=Us("transitionend"),NC=new Map,Hv="abort auxClick beforeToggle 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(" ");Hv.push("scrollEnd");function mi(s,o){NC.set(s,o),zs(o,[s])}var mf=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},Fn=[],tl=0,Fv=0;function vf(){for(var s=tl,o=Fv=tl=0;o<s;){var c=Fn[o];Fn[o++]=null;var p=Fn[o];Fn[o++]=null;var y=Fn[o];Fn[o++]=null;var b=Fn[o];if(Fn[o++]=null,p!==null&&y!==null){var E=p.pending;E===null?y.next=y:(y.next=E.next,E.next=y),p.pending=y}b!==0&&IC(c,y,b)}}function gf(s,o,c,p){Fn[tl++]=s,Fn[tl++]=o,Fn[tl++]=c,Fn[tl++]=p,Fv|=p,s.lanes|=p,s=s.alternate,s!==null&&(s.lanes|=p)}function Uv(s,o,c,p){return gf(s,o,c,p),yf(s)}function $s(s,o){return gf(s,null,null,o),yf(s)}function IC(s,o,c){s.lanes|=c;var p=s.alternate;p!==null&&(p.lanes|=c);for(var y=!1,b=s.return;b!==null;)b.childLanes|=c,p=b.alternate,p!==null&&(p.childLanes|=c),b.tag===22&&(s=b.stateNode,s===null||s._visibility&1||(y=!0)),s=b,b=b.return;return s.tag===3?(b=s.stateNode,y&&o!==null&&(y=31-_t(c),s=b.hiddenUpdates,p=s[y],p===null?s[y]=[o]:p.push(o),o.lane=c|536870912),b):null}function yf(s){if(50<oc)throw oc=0,Zg=null,Error(n(185));for(var o=s.return;o!==null;)s=o,o=s.return;return s.tag===3?s.stateNode:null}var rl={};function T6(s,o,c,p){this.tag=s,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Sn(s,o,c,p){return new T6(s,o,c,p)}function $v(s){return s=s.prototype,!(!s||!s.isReactComponent)}function Yi(s,o){var c=s.alternate;return c===null?(c=Sn(s.tag,o,s.key,s.mode),c.elementType=s.elementType,c.type=s.type,c.stateNode=s.stateNode,c.alternate=s,s.alternate=c):(c.pendingProps=o,c.type=s.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=s.flags&65011712,c.childLanes=s.childLanes,c.lanes=s.lanes,c.child=s.child,c.memoizedProps=s.memoizedProps,c.memoizedState=s.memoizedState,c.updateQueue=s.updateQueue,o=s.dependencies,c.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},c.sibling=s.sibling,c.index=s.index,c.ref=s.ref,c.refCleanup=s.refCleanup,c}function jC(s,o){s.flags&=65011714;var c=s.alternate;return c===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=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,o=c.dependencies,s.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),s}function _f(s,o,c,p,y,b){var E=0;if(p=s,typeof s=="function")$v(s)&&(E=1);else if(typeof s=="string")E=B4(s,c,ue.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(s){case $:return s=Sn(31,c,o,y),s.elementType=$,s.lanes=b,s;case _:return Ks(c.children,y,b,o);case x:E=8,y|=24;break;case C:return s=Sn(12,c,o,y|2),s.elementType=C,s.lanes=b,s;case D:return s=Sn(13,c,o,y),s.elementType=D,s.lanes=b,s;case k:return s=Sn(19,c,o,y),s.elementType=k,s.lanes=b,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case O:E=10;break e;case A:E=9;break e;case P:E=11;break e;case R:E=14;break e;case N:E=16,p=null;break e}E=29,c=Error(n(130,s===null?"null":typeof s,"")),p=null}return o=Sn(E,c,o,y),o.elementType=s,o.type=p,o.lanes=b,o}function Ks(s,o,c,p){return s=Sn(7,s,p,o),s.lanes=c,s}function Kv(s,o,c){return s=Sn(6,s,null,o),s.lanes=c,s}function zC(s){var o=Sn(18,null,null,0);return o.stateNode=s,o}function qv(s,o,c){return o=Sn(4,s.children!==null?s.children:[],s.key,o),o.lanes=c,o.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},o}var HC=new WeakMap;function Un(s,o){if(typeof s=="object"&&s!==null){var c=HC.get(s);return c!==void 0?c:(o={value:s,source:o,stack:Is(o)},HC.set(s,o),o)}return{value:s,source:o,stack:Is(o)}}var nl=[],il=0,bf=null,Hu=0,$n=[],Kn=0,Ua=null,Ei=1,Ai="";function Xi(s,o){nl[il++]=Hu,nl[il++]=bf,bf=s,Hu=o}function FC(s,o,c){$n[Kn++]=Ei,$n[Kn++]=Ai,$n[Kn++]=Ua,Ua=s;var p=Ei;s=Ai;var y=32-_t(p)-1;p&=~(1<<y),c+=1;var b=32-_t(o)+y;if(30<b){var E=y-y%5;b=(p&(1<<E)-1).toString(32),p>>=E,y-=E,Ei=1<<32-_t(o)+y|c<<y|p,Ai=b+s}else Ei=1<<b|c<<y|p,Ai=s}function Wv(s){s.return!==null&&(Xi(s,1),FC(s,1,0))}function Vv(s){for(;s===bf;)bf=nl[--il],nl[il]=null,Hu=nl[--il],nl[il]=null;for(;s===Ua;)Ua=$n[--Kn],$n[Kn]=null,Ai=$n[--Kn],$n[Kn]=null,Ei=$n[--Kn],$n[Kn]=null}function UC(s,o){$n[Kn++]=Ei,$n[Kn++]=Ai,$n[Kn++]=Ua,Ei=o.id,Ai=o.overflow,Ua=s}var Tr=null,At=null,et=!1,$a=null,qn=!1,Yv=Error(n(519));function Ka(s){var o=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Fu(Un(o,s)),Yv}function $C(s){var o=s.stateNode,c=s.type,p=s.memoizedProps;switch(o[Pr]=s,o[an]=p,c){case"dialog":Ge("cancel",o),Ge("close",o);break;case"iframe":case"object":case"embed":Ge("load",o);break;case"video":case"audio":for(c=0;c<uc.length;c++)Ge(uc[c],o);break;case"source":Ge("error",o);break;case"img":case"image":case"link":Ge("error",o),Ge("load",o);break;case"details":Ge("toggle",o);break;case"input":Ge("invalid",o),rC(o,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":Ge("invalid",o);break;case"textarea":Ge("invalid",o),iC(o,p.value,p.defaultValue,p.children)}c=p.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||o.textContent===""+c||p.suppressHydrationWarning===!0||sO(o.textContent,c)?(p.popover!=null&&(Ge("beforetoggle",o),Ge("toggle",o)),p.onScroll!=null&&Ge("scroll",o),p.onScrollEnd!=null&&Ge("scrollend",o),p.onClick!=null&&(o.onclick=Wi),o=!0):o=!1,o||Ka(s,!0)}function KC(s){for(Tr=s.return;Tr;)switch(Tr.tag){case 5:case 31:case 13:qn=!1;return;case 27:case 3:qn=!0;return;default:Tr=Tr.return}}function al(s){if(s!==Tr)return!1;if(!et)return KC(s),et=!0,!1;var o=s.tag,c;if((c=o!==3&&o!==27)&&((c=o===5)&&(c=s.type,c=!(c!=="form"&&c!=="button")||fy(s.type,s.memoizedProps)),c=!c),c&&At&&Ka(s),KC(s),o===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));At=mO(s)}else if(o===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));At=mO(s)}else o===27?(o=At,is(s.type)?(s=gy,gy=null,At=s):At=o):At=Tr?Vn(s.stateNode.nextSibling):null;return!0}function qs(){At=Tr=null,et=!1}function Xv(){var s=$a;return s!==null&&(cn===null?cn=s:cn.push.apply(cn,s),$a=null),s}function Fu(s){$a===null?$a=[s]:$a.push(s)}var Gv=I(null),Ws=null,Gi=null;function qa(s,o,c){L(Gv,o._currentValue),o._currentValue=c}function Zi(s){s._currentValue=Gv.current,Y(Gv)}function Zv(s,o,c){for(;s!==null;){var p=s.alternate;if((s.childLanes&o)!==o?(s.childLanes|=o,p!==null&&(p.childLanes|=o)):p!==null&&(p.childLanes&o)!==o&&(p.childLanes|=o),s===c)break;s=s.return}}function Qv(s,o,c,p){var y=s.child;for(y!==null&&(y.return=s);y!==null;){var b=y.dependencies;if(b!==null){var E=y.child;b=b.firstContext;e:for(;b!==null;){var T=b;b=y;for(var H=0;H<o.length;H++)if(T.context===o[H]){b.lanes|=c,T=b.alternate,T!==null&&(T.lanes|=c),Zv(b.return,c,s),p||(E=null);break e}b=T.next}}else if(y.tag===18){if(E=y.return,E===null)throw Error(n(341));E.lanes|=c,b=E.alternate,b!==null&&(b.lanes|=c),Zv(E,c,s),E=null}else E=y.child;if(E!==null)E.return=y;else for(E=y;E!==null;){if(E===s){E=null;break}if(y=E.sibling,y!==null){y.return=E.return,E=y;break}E=E.return}y=E}}function sl(s,o,c,p){s=null;for(var y=o,b=!1;y!==null;){if(!b){if((y.flags&524288)!==0)b=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var E=y.alternate;if(E===null)throw Error(n(387));if(E=E.memoizedProps,E!==null){var T=y.type;bn(y.pendingProps.value,E.value)||(s!==null?s.push(T):s=[T])}}else if(y===Te.current){if(E=y.alternate,E===null)throw Error(n(387));E.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(s!==null?s.push(pc):s=[pc])}y=y.return}s!==null&&Qv(o,s,c,p),o.flags|=262144}function Sf(s){for(s=s.firstContext;s!==null;){if(!bn(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function Vs(s){Ws=s,Gi=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function Dr(s){return qC(Ws,s)}function wf(s,o){return Ws===null&&Vs(s),qC(s,o)}function qC(s,o){var c=o._currentValue;if(o={context:o,memoizedValue:c,next:null},Gi===null){if(s===null)throw Error(n(308));Gi=o,s.dependencies={lanes:0,firstContext:o},s.flags|=524288}else Gi=Gi.next=o;return c}var D6=typeof AbortController<"u"?AbortController:function(){var s=[],o=this.signal={aborted:!1,addEventListener:function(c,p){s.push(p)}};this.abort=function(){o.aborted=!0,s.forEach(function(c){return c()})}},M6=e.unstable_scheduleCallback,R6=e.unstable_NormalPriority,Zt={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Jv(){return{controller:new D6,data:new Map,refCount:0}}function Uu(s){s.refCount--,s.refCount===0&&M6(R6,function(){s.controller.abort()})}var $u=null,eg=0,ol=0,ll=null;function L6(s,o){if($u===null){var c=$u=[];eg=0,ol=ny(),ll={status:"pending",value:void 0,then:function(p){c.push(p)}}}return eg++,o.then(WC,WC),o}function WC(){if(--eg===0&&$u!==null){ll!==null&&(ll.status="fulfilled");var s=$u;$u=null,ol=0,ll=null;for(var o=0;o<s.length;o++)(0,s[o])()}}function B6(s,o){var c=[],p={status:"pending",value:null,reason:null,then:function(y){c.push(y)}};return s.then(function(){p.status="fulfilled",p.value=o;for(var y=0;y<c.length;y++)(0,c[y])(o)},function(y){for(p.status="rejected",p.reason=y,y=0;y<c.length;y++)(0,c[y])(void 0)}),p}var VC=B.S;B.S=function(s,o){TA=Xr(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&L6(s,o),VC!==null&&VC(s,o)};var Ys=I(null);function tg(){var s=Ys.current;return s!==null?s:bt.pooledCache}function xf(s,o){o===null?L(Ys,Ys.current):L(Ys,o.pool)}function YC(){var s=tg();return s===null?null:{parent:Zt._currentValue,pool:s}}var ul=Error(n(460)),rg=Error(n(474)),Cf=Error(n(542)),Ef={then:function(){}};function XC(s){return s=s.status,s==="fulfilled"||s==="rejected"}function GC(s,o,c){switch(c=s[c],c===void 0?s.push(o):c!==o&&(o.then(Wi,Wi),o=c),o.status){case"fulfilled":return o.value;case"rejected":throw s=o.reason,QC(s),s;default:if(typeof o.status=="string")o.then(Wi,Wi);else{if(s=bt,s!==null&&100<s.shellSuspendCounter)throw Error(n(482));s=o,s.status="pending",s.then(function(p){if(o.status==="pending"){var y=o;y.status="fulfilled",y.value=p}},function(p){if(o.status==="pending"){var y=o;y.status="rejected",y.reason=p}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw s=o.reason,QC(s),s}throw Gs=o,ul}}function Xs(s){try{var o=s._init;return o(s._payload)}catch(c){throw c!==null&&typeof c=="object"&&typeof c.then=="function"?(Gs=c,ul):c}}var Gs=null;function ZC(){if(Gs===null)throw Error(n(459));var s=Gs;return Gs=null,s}function QC(s){if(s===ul||s===Cf)throw Error(n(483))}var cl=null,Ku=0;function Af(s){var o=Ku;return Ku+=1,cl===null&&(cl=[]),GC(cl,s,o)}function qu(s,o){o=o.props.ref,s.ref=o!==void 0?o:null}function Of(s,o){throw o.$$typeof===v?Error(n(525)):(s=Object.prototype.toString.call(o),Error(n(31,s==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":s)))}function JC(s){function o(V,U){if(s){var Z=V.deletions;Z===null?(V.deletions=[U],V.flags|=16):Z.push(U)}}function c(V,U){if(!s)return null;for(;U!==null;)o(V,U),U=U.sibling;return null}function p(V){for(var U=new Map;V!==null;)V.key!==null?U.set(V.key,V):U.set(V.index,V),V=V.sibling;return U}function y(V,U){return V=Yi(V,U),V.index=0,V.sibling=null,V}function b(V,U,Z){return V.index=Z,s?(Z=V.alternate,Z!==null?(Z=Z.index,Z<U?(V.flags|=67108866,U):Z):(V.flags|=67108866,U)):(V.flags|=1048576,U)}function E(V){return s&&V.alternate===null&&(V.flags|=67108866),V}function T(V,U,Z,ae){return U===null||U.tag!==6?(U=Kv(Z,V.mode,ae),U.return=V,U):(U=y(U,Z),U.return=V,U)}function H(V,U,Z,ae){var Ae=Z.type;return Ae===_?re(V,U,Z.props.children,ae,Z.key):U!==null&&(U.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===N&&Xs(Ae)===U.type)?(U=y(U,Z.props),qu(U,Z),U.return=V,U):(U=_f(Z.type,Z.key,Z.props,null,V.mode,ae),qu(U,Z),U.return=V,U)}function Q(V,U,Z,ae){return U===null||U.tag!==4||U.stateNode.containerInfo!==Z.containerInfo||U.stateNode.implementation!==Z.implementation?(U=qv(Z,V.mode,ae),U.return=V,U):(U=y(U,Z.children||[]),U.return=V,U)}function re(V,U,Z,ae,Ae){return U===null||U.tag!==7?(U=Ks(Z,V.mode,ae,Ae),U.return=V,U):(U=y(U,Z),U.return=V,U)}function se(V,U,Z){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return U=Kv(""+U,V.mode,Z),U.return=V,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case g:return Z=_f(U.type,U.key,U.props,null,V.mode,Z),qu(Z,U),Z.return=V,Z;case S:return U=qv(U,V.mode,Z),U.return=V,U;case N:return U=Xs(U),se(V,U,Z)}if(W(U)||z(U))return U=Ks(U,V.mode,Z,null),U.return=V,U;if(typeof U.then=="function")return se(V,Af(U),Z);if(U.$$typeof===O)return se(V,wf(V,U),Z);Of(V,U)}return null}function J(V,U,Z,ae){var Ae=U!==null?U.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Ae!==null?null:T(V,U,""+Z,ae);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case g:return Z.key===Ae?H(V,U,Z,ae):null;case S:return Z.key===Ae?Q(V,U,Z,ae):null;case N:return Z=Xs(Z),J(V,U,Z,ae)}if(W(Z)||z(Z))return Ae!==null?null:re(V,U,Z,ae,null);if(typeof Z.then=="function")return J(V,U,Af(Z),ae);if(Z.$$typeof===O)return J(V,U,wf(V,Z),ae);Of(V,Z)}return null}function te(V,U,Z,ae,Ae){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return V=V.get(Z)||null,T(U,V,""+ae,Ae);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case g:return V=V.get(ae.key===null?Z:ae.key)||null,H(U,V,ae,Ae);case S:return V=V.get(ae.key===null?Z:ae.key)||null,Q(U,V,ae,Ae);case N:return ae=Xs(ae),te(V,U,Z,ae,Ae)}if(W(ae)||z(ae))return V=V.get(Z)||null,re(U,V,ae,Ae,null);if(typeof ae.then=="function")return te(V,U,Z,Af(ae),Ae);if(ae.$$typeof===O)return te(V,U,Z,wf(U,ae),Ae);Of(U,ae)}return null}function Se(V,U,Z,ae){for(var Ae=null,nt=null,Ce=U,ze=U=0,Qe=null;Ce!==null&&ze<Z.length;ze++){Ce.index>ze?(Qe=Ce,Ce=null):Qe=Ce.sibling;var it=J(V,Ce,Z[ze],ae);if(it===null){Ce===null&&(Ce=Qe);break}s&&Ce&&it.alternate===null&&o(V,Ce),U=b(it,U,ze),nt===null?Ae=it:nt.sibling=it,nt=it,Ce=Qe}if(ze===Z.length)return c(V,Ce),et&&Xi(V,ze),Ae;if(Ce===null){for(;ze<Z.length;ze++)Ce=se(V,Z[ze],ae),Ce!==null&&(U=b(Ce,U,ze),nt===null?Ae=Ce:nt.sibling=Ce,nt=Ce);return et&&Xi(V,ze),Ae}for(Ce=p(Ce);ze<Z.length;ze++)Qe=te(Ce,V,ze,Z[ze],ae),Qe!==null&&(s&&Qe.alternate!==null&&Ce.delete(Qe.key===null?ze:Qe.key),U=b(Qe,U,ze),nt===null?Ae=Qe:nt.sibling=Qe,nt=Qe);return s&&Ce.forEach(function(us){return o(V,us)}),et&&Xi(V,ze),Ae}function De(V,U,Z,ae){if(Z==null)throw Error(n(151));for(var Ae=null,nt=null,Ce=U,ze=U=0,Qe=null,it=Z.next();Ce!==null&&!it.done;ze++,it=Z.next()){Ce.index>ze?(Qe=Ce,Ce=null):Qe=Ce.sibling;var us=J(V,Ce,it.value,ae);if(us===null){Ce===null&&(Ce=Qe);break}s&&Ce&&us.alternate===null&&o(V,Ce),U=b(us,U,ze),nt===null?Ae=us:nt.sibling=us,nt=us,Ce=Qe}if(it.done)return c(V,Ce),et&&Xi(V,ze),Ae;if(Ce===null){for(;!it.done;ze++,it=Z.next())it=se(V,it.value,ae),it!==null&&(U=b(it,U,ze),nt===null?Ae=it:nt.sibling=it,nt=it);return et&&Xi(V,ze),Ae}for(Ce=p(Ce);!it.done;ze++,it=Z.next())it=te(Ce,V,ze,it.value,ae),it!==null&&(s&&it.alternate!==null&&Ce.delete(it.key===null?ze:it.key),U=b(it,U,ze),nt===null?Ae=it:nt.sibling=it,nt=it);return s&&Ce.forEach(function(W4){return o(V,W4)}),et&&Xi(V,ze),Ae}function vt(V,U,Z,ae){if(typeof Z=="object"&&Z!==null&&Z.type===_&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case g:e:{for(var Ae=Z.key;U!==null;){if(U.key===Ae){if(Ae=Z.type,Ae===_){if(U.tag===7){c(V,U.sibling),ae=y(U,Z.props.children),ae.return=V,V=ae;break e}}else if(U.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===N&&Xs(Ae)===U.type){c(V,U.sibling),ae=y(U,Z.props),qu(ae,Z),ae.return=V,V=ae;break e}c(V,U);break}else o(V,U);U=U.sibling}Z.type===_?(ae=Ks(Z.props.children,V.mode,ae,Z.key),ae.return=V,V=ae):(ae=_f(Z.type,Z.key,Z.props,null,V.mode,ae),qu(ae,Z),ae.return=V,V=ae)}return E(V);case S:e:{for(Ae=Z.key;U!==null;){if(U.key===Ae)if(U.tag===4&&U.stateNode.containerInfo===Z.containerInfo&&U.stateNode.implementation===Z.implementation){c(V,U.sibling),ae=y(U,Z.children||[]),ae.return=V,V=ae;break e}else{c(V,U);break}else o(V,U);U=U.sibling}ae=qv(Z,V.mode,ae),ae.return=V,V=ae}return E(V);case N:return Z=Xs(Z),vt(V,U,Z,ae)}if(W(Z))return Se(V,U,Z,ae);if(z(Z)){if(Ae=z(Z),typeof Ae!="function")throw Error(n(150));return Z=Ae.call(Z),De(V,U,Z,ae)}if(typeof Z.then=="function")return vt(V,U,Af(Z),ae);if(Z.$$typeof===O)return vt(V,U,wf(V,Z),ae);Of(V,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,U!==null&&U.tag===6?(c(V,U.sibling),ae=y(U,Z),ae.return=V,V=ae):(c(V,U),ae=Kv(Z,V.mode,ae),ae.return=V,V=ae),E(V)):c(V,U)}return function(V,U,Z,ae){try{Ku=0;var Ae=vt(V,U,Z,ae);return cl=null,Ae}catch(Ce){if(Ce===ul||Ce===Cf)throw Ce;var nt=Sn(29,Ce,null,V.mode);return nt.lanes=ae,nt.return=V,nt}finally{}}}var Zs=JC(!0),eE=JC(!1),Wa=!1;function ng(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ig(s,o){s=s.updateQueue,o.updateQueue===s&&(o.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Va(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Ya(s,o,c){var p=s.updateQueue;if(p===null)return null;if(p=p.shared,(ot&2)!==0){var y=p.pending;return y===null?o.next=o:(o.next=y.next,y.next=o),p.pending=o,o=yf(s),IC(s,null,c),o}return gf(s,p,o,c),yf(s)}function Wu(s,o,c){if(o=o.updateQueue,o!==null&&(o=o.shared,(c&4194048)!==0)){var p=o.lanes;p&=s.pendingLanes,c|=p,o.lanes=c,qx(s,c)}}function ag(s,o){var c=s.updateQueue,p=s.alternate;if(p!==null&&(p=p.updateQueue,c===p)){var y=null,b=null;if(c=c.firstBaseUpdate,c!==null){do{var E={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};b===null?y=b=E:b=b.next=E,c=c.next}while(c!==null);b===null?y=b=o:b=b.next=o}else y=b=o;c={baseState:p.baseState,firstBaseUpdate:y,lastBaseUpdate:b,shared:p.shared,callbacks:p.callbacks},s.updateQueue=c;return}s=c.lastBaseUpdate,s===null?c.firstBaseUpdate=o:s.next=o,c.lastBaseUpdate=o}var sg=!1;function Vu(){if(sg){var s=ll;if(s!==null)throw s}}function Yu(s,o,c,p){sg=!1;var y=s.updateQueue;Wa=!1;var b=y.firstBaseUpdate,E=y.lastBaseUpdate,T=y.shared.pending;if(T!==null){y.shared.pending=null;var H=T,Q=H.next;H.next=null,E===null?b=Q:E.next=Q,E=H;var re=s.alternate;re!==null&&(re=re.updateQueue,T=re.lastBaseUpdate,T!==E&&(T===null?re.firstBaseUpdate=Q:T.next=Q,re.lastBaseUpdate=H))}if(b!==null){var se=y.baseState;E=0,re=Q=H=null,T=b;do{var J=T.lane&-536870913,te=J!==T.lane;if(te?(Ze&J)===J:(p&J)===J){J!==0&&J===ol&&(sg=!0),re!==null&&(re=re.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var Se=s,De=T;J=o;var vt=c;switch(De.tag){case 1:if(Se=De.payload,typeof Se=="function"){se=Se.call(vt,se,J);break e}se=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=De.payload,J=typeof Se=="function"?Se.call(vt,se,J):Se,J==null)break e;se=m({},se,J);break e;case 2:Wa=!0}}J=T.callback,J!==null&&(s.flags|=64,te&&(s.flags|=8192),te=y.callbacks,te===null?y.callbacks=[J]:te.push(J))}else te={lane:J,tag:T.tag,payload:T.payload,callback:T.callback,next:null},re===null?(Q=re=te,H=se):re=re.next=te,E|=J;if(T=T.next,T===null){if(T=y.shared.pending,T===null)break;te=T,T=te.next,te.next=null,y.lastBaseUpdate=te,y.shared.pending=null}}while(!0);re===null&&(H=se),y.baseState=H,y.firstBaseUpdate=Q,y.lastBaseUpdate=re,b===null&&(y.shared.lanes=0),Ja|=E,s.lanes=E,s.memoizedState=se}}function tE(s,o){if(typeof s!="function")throw Error(n(191,s));s.call(o)}function rE(s,o){var c=s.callbacks;if(c!==null)for(s.callbacks=null,s=0;s<c.length;s++)tE(c[s],o)}var hl=I(null),kf=I(0);function nE(s,o){s=sa,L(kf,s),L(hl,o),sa=s|o.baseLanes}function og(){L(kf,sa),L(hl,hl.current)}function lg(){sa=kf.current,Y(hl),Y(kf)}var wn=I(null),Wn=null;function Xa(s){var o=s.alternate;L($t,$t.current&1),L(wn,s),Wn===null&&(o===null||hl.current!==null||o.memoizedState!==null)&&(Wn=s)}function ug(s){L($t,$t.current),L(wn,s),Wn===null&&(Wn=s)}function iE(s){s.tag===22?(L($t,$t.current),L(wn,s),Wn===null&&(Wn=s)):Ga()}function Ga(){L($t,$t.current),L(wn,wn.current)}function xn(s){Y(wn),Wn===s&&(Wn=null),Y($t)}var $t=I(0);function Pf(s){for(var o=s;o!==null;){if(o.tag===13){var c=o.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||my(c)||vy(c)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===s)break;for(;o.sibling===null;){if(o.return===null||o.return===s)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var Qi=0,Ie=null,pt=null,Qt=null,Tf=!1,fl=!1,Qs=!1,Df=0,Xu=0,dl=null,N6=0;function zt(){throw Error(n(321))}function cg(s,o){if(o===null)return!1;for(var c=0;c<o.length&&c<s.length;c++)if(!bn(s[c],o[c]))return!1;return!0}function hg(s,o,c,p,y,b){return Qi=b,Ie=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,B.H=s===null||s.memoizedState===null?FE:Ag,Qs=!1,b=c(p,y),Qs=!1,fl&&(b=sE(o,c,p,y)),aE(s),b}function aE(s){B.H=Qu;var o=pt!==null&&pt.next!==null;if(Qi=0,Qt=pt=Ie=null,Tf=!1,Xu=0,dl=null,o)throw Error(n(300));s===null||Jt||(s=s.dependencies,s!==null&&Sf(s)&&(Jt=!0))}function sE(s,o,c,p){Ie=s;var y=0;do{if(fl&&(dl=null),Xu=0,fl=!1,25<=y)throw Error(n(301));if(y+=1,Qt=pt=null,s.updateQueue!=null){var b=s.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}B.H=UE,b=o(c,p)}while(fl);return b}function I6(){var s=B.H,o=s.useState()[0];return o=typeof o.then=="function"?Gu(o):o,s=s.useState()[0],(pt!==null?pt.memoizedState:null)!==s&&(Ie.flags|=1024),o}function fg(){var s=Df!==0;return Df=0,s}function dg(s,o,c){o.updateQueue=s.updateQueue,o.flags&=-2053,s.lanes&=~c}function pg(s){if(Tf){for(s=s.memoizedState;s!==null;){var o=s.queue;o!==null&&(o.pending=null),s=s.next}Tf=!1}Qi=0,Qt=pt=Ie=null,fl=!1,Xu=Df=0,dl=null}function Zr(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qt===null?Ie.memoizedState=Qt=s:Qt=Qt.next=s,Qt}function Kt(){if(pt===null){var s=Ie.alternate;s=s!==null?s.memoizedState:null}else s=pt.next;var o=Qt===null?Ie.memoizedState:Qt.next;if(o!==null)Qt=o,pt=s;else{if(s===null)throw Ie.alternate===null?Error(n(467)):Error(n(310));pt=s,s={memoizedState:pt.memoizedState,baseState:pt.baseState,baseQueue:pt.baseQueue,queue:pt.queue,next:null},Qt===null?Ie.memoizedState=Qt=s:Qt=Qt.next=s}return Qt}function Mf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Gu(s){var o=Xu;return Xu+=1,dl===null&&(dl=[]),s=GC(dl,s,o),o=Ie,(Qt===null?o.memoizedState:Qt.next)===null&&(o=o.alternate,B.H=o===null||o.memoizedState===null?FE:Ag),s}function Rf(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return Gu(s);if(s.$$typeof===O)return Dr(s)}throw Error(n(438,String(s)))}function mg(s){var o=null,c=Ie.updateQueue;if(c!==null&&(o=c.memoCache),o==null){var p=Ie.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(o={data:p.data.map(function(y){return y.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),c===null&&(c=Mf(),Ie.updateQueue=c),c.memoCache=o,c=o.data[o.index],c===void 0)for(c=o.data[o.index]=Array(s),p=0;p<s;p++)c[p]=ee;return o.index++,c}function Ji(s,o){return typeof o=="function"?o(s):o}function Lf(s){var o=Kt();return vg(o,pt,s)}function vg(s,o,c){var p=s.queue;if(p===null)throw Error(n(311));p.lastRenderedReducer=c;var y=s.baseQueue,b=p.pending;if(b!==null){if(y!==null){var E=y.next;y.next=b.next,b.next=E}o.baseQueue=y=b,p.pending=null}if(b=s.baseState,y===null)s.memoizedState=b;else{o=y.next;var T=E=null,H=null,Q=o,re=!1;do{var se=Q.lane&-536870913;if(se!==Q.lane?(Ze&se)===se:(Qi&se)===se){var J=Q.revertLane;if(J===0)H!==null&&(H=H.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),se===ol&&(re=!0);else if((Qi&J)===J){Q=Q.next,J===ol&&(re=!0);continue}else se={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},H===null?(T=H=se,E=b):H=H.next=se,Ie.lanes|=J,Ja|=J;se=Q.action,Qs&&c(b,se),b=Q.hasEagerState?Q.eagerState:c(b,se)}else J={lane:se,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},H===null?(T=H=J,E=b):H=H.next=J,Ie.lanes|=se,Ja|=se;Q=Q.next}while(Q!==null&&Q!==o);if(H===null?E=b:H.next=T,!bn(b,s.memoizedState)&&(Jt=!0,re&&(c=ll,c!==null)))throw c;s.memoizedState=b,s.baseState=E,s.baseQueue=H,p.lastRenderedState=b}return y===null&&(p.lanes=0),[s.memoizedState,p.dispatch]}function gg(s){var o=Kt(),c=o.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=s;var p=c.dispatch,y=c.pending,b=o.memoizedState;if(y!==null){c.pending=null;var E=y=y.next;do b=s(b,E.action),E=E.next;while(E!==y);bn(b,o.memoizedState)||(Jt=!0),o.memoizedState=b,o.baseQueue===null&&(o.baseState=b),c.lastRenderedState=b}return[b,p]}function oE(s,o,c){var p=Ie,y=Kt(),b=et;if(b){if(c===void 0)throw Error(n(407));c=c()}else c=o();var E=!bn((pt||y).memoizedState,c);if(E&&(y.memoizedState=c,Jt=!0),y=y.queue,bg(cE.bind(null,p,y,s),[s]),y.getSnapshot!==o||E||Qt!==null&&Qt.memoizedState.tag&1){if(p.flags|=2048,pl(9,{destroy:void 0},uE.bind(null,p,y,c,o),null),bt===null)throw Error(n(349));b||(Qi&127)!==0||lE(p,o,c)}return c}function lE(s,o,c){s.flags|=16384,s={getSnapshot:o,value:c},o=Ie.updateQueue,o===null?(o=Mf(),Ie.updateQueue=o,o.stores=[s]):(c=o.stores,c===null?o.stores=[s]:c.push(s))}function uE(s,o,c,p){o.value=c,o.getSnapshot=p,hE(o)&&fE(s)}function cE(s,o,c){return c(function(){hE(o)&&fE(s)})}function hE(s){var o=s.getSnapshot;s=s.value;try{var c=o();return!bn(s,c)}catch{return!0}}function fE(s){var o=$s(s,2);o!==null&&hn(o,s,2)}function yg(s){var o=Zr();if(typeof s=="function"){var c=s;if(s=c(),Qs){nn(!0);try{c()}finally{nn(!1)}}}return o.memoizedState=o.baseState=s,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ji,lastRenderedState:s},o}function dE(s,o,c,p){return s.baseState=c,vg(s,pt,typeof p=="function"?p:Ji)}function j6(s,o,c,p,y){if(If(s))throw Error(n(485));if(s=o.action,s!==null){var b={payload:y,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(E){b.listeners.push(E)}};B.T!==null?c(!0):b.isTransition=!1,p(b),c=o.pending,c===null?(b.next=o.pending=b,pE(o,b)):(b.next=c.next,o.pending=c.next=b)}}function pE(s,o){var c=o.action,p=o.payload,y=s.state;if(o.isTransition){var b=B.T,E={};B.T=E;try{var T=c(y,p),H=B.S;H!==null&&H(E,T),mE(s,o,T)}catch(Q){_g(s,o,Q)}finally{b!==null&&E.types!==null&&(b.types=E.types),B.T=b}}else try{b=c(y,p),mE(s,o,b)}catch(Q){_g(s,o,Q)}}function mE(s,o,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(p){vE(s,o,p)},function(p){return _g(s,o,p)}):vE(s,o,c)}function vE(s,o,c){o.status="fulfilled",o.value=c,gE(o),s.state=c,o=s.pending,o!==null&&(c=o.next,c===o?s.pending=null:(c=c.next,o.next=c,pE(s,c)))}function _g(s,o,c){var p=s.pending;if(s.pending=null,p!==null){p=p.next;do o.status="rejected",o.reason=c,gE(o),o=o.next;while(o!==p)}s.action=null}function gE(s){s=s.listeners;for(var o=0;o<s.length;o++)(0,s[o])()}function yE(s,o){return o}function _E(s,o){if(et){var c=bt.formState;if(c!==null){e:{var p=Ie;if(et){if(At){t:{for(var y=At,b=qn;y.nodeType!==8;){if(!b){y=null;break t}if(y=Vn(y.nextSibling),y===null){y=null;break t}}b=y.data,y=b==="F!"||b==="F"?y:null}if(y){At=Vn(y.nextSibling),p=y.data==="F!";break e}}Ka(p)}p=!1}p&&(o=c[0])}}return c=Zr(),c.memoizedState=c.baseState=o,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:yE,lastRenderedState:o},c.queue=p,c=jE.bind(null,Ie,p),p.dispatch=c,p=yg(!1),b=Eg.bind(null,Ie,!1,p.queue),p=Zr(),y={state:o,dispatch:null,action:s,pending:null},p.queue=y,c=j6.bind(null,Ie,y,b,c),y.dispatch=c,p.memoizedState=s,[o,c,!1]}function bE(s){var o=Kt();return SE(o,pt,s)}function SE(s,o,c){if(o=vg(s,o,yE)[0],s=Lf(Ji)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var p=Gu(o)}catch(E){throw E===ul?Cf:E}else p=o;o=Kt();var y=o.queue,b=y.dispatch;return c!==o.memoizedState&&(Ie.flags|=2048,pl(9,{destroy:void 0},z6.bind(null,y,c),null)),[p,b,s]}function z6(s,o){s.action=o}function wE(s){var o=Kt(),c=pt;if(c!==null)return SE(o,c,s);Kt(),o=o.memoizedState,c=Kt();var p=c.queue.dispatch;return c.memoizedState=s,[o,p,!1]}function pl(s,o,c,p){return s={tag:s,create:c,deps:p,inst:o,next:null},o=Ie.updateQueue,o===null&&(o=Mf(),Ie.updateQueue=o),c=o.lastEffect,c===null?o.lastEffect=s.next=s:(p=c.next,c.next=s,s.next=p,o.lastEffect=s),s}function xE(){return Kt().memoizedState}function Bf(s,o,c,p){var y=Zr();Ie.flags|=s,y.memoizedState=pl(1|o,{destroy:void 0},c,p===void 0?null:p)}function Nf(s,o,c,p){var y=Kt();p=p===void 0?null:p;var b=y.memoizedState.inst;pt!==null&&p!==null&&cg(p,pt.memoizedState.deps)?y.memoizedState=pl(o,b,c,p):(Ie.flags|=s,y.memoizedState=pl(1|o,b,c,p))}function CE(s,o){Bf(8390656,8,s,o)}function bg(s,o){Nf(2048,8,s,o)}function H6(s){Ie.flags|=4;var o=Ie.updateQueue;if(o===null)o=Mf(),Ie.updateQueue=o,o.events=[s];else{var c=o.events;c===null?o.events=[s]:c.push(s)}}function EE(s){var o=Kt().memoizedState;return H6({ref:o,nextImpl:s}),function(){if((ot&2)!==0)throw Error(n(440));return o.impl.apply(void 0,arguments)}}function AE(s,o){return Nf(4,2,s,o)}function OE(s,o){return Nf(4,4,s,o)}function kE(s,o){if(typeof o=="function"){s=s();var c=o(s);return function(){typeof c=="function"?c():o(null)}}if(o!=null)return s=s(),o.current=s,function(){o.current=null}}function PE(s,o,c){c=c!=null?c.concat([s]):null,Nf(4,4,kE.bind(null,o,s),c)}function Sg(){}function TE(s,o){var c=Kt();o=o===void 0?null:o;var p=c.memoizedState;return o!==null&&cg(o,p[1])?p[0]:(c.memoizedState=[s,o],s)}function DE(s,o){var c=Kt();o=o===void 0?null:o;var p=c.memoizedState;if(o!==null&&cg(o,p[1]))return p[0];if(p=s(),Qs){nn(!0);try{s()}finally{nn(!1)}}return c.memoizedState=[p,o],p}function wg(s,o,c){return c===void 0||(Qi&1073741824)!==0&&(Ze&261930)===0?s.memoizedState=o:(s.memoizedState=c,s=MA(),Ie.lanes|=s,Ja|=s,c)}function ME(s,o,c,p){return bn(c,o)?c:hl.current!==null?(s=wg(s,c,p),bn(s,o)||(Jt=!0),s):(Qi&42)===0||(Qi&1073741824)!==0&&(Ze&261930)===0?(Jt=!0,s.memoizedState=c):(s=MA(),Ie.lanes|=s,Ja|=s,o)}function RE(s,o,c,p,y){var b=q.p;q.p=b!==0&&8>b?b:8;var E=B.T,T={};B.T=T,Eg(s,!1,o,c);try{var H=y(),Q=B.S;if(Q!==null&&Q(T,H),H!==null&&typeof H=="object"&&typeof H.then=="function"){var re=B6(H,p);Zu(s,o,re,An(s))}else Zu(s,o,p,An(s))}catch(se){Zu(s,o,{then:function(){},status:"rejected",reason:se},An())}finally{q.p=b,E!==null&&T.types!==null&&(E.types=T.types),B.T=E}}function F6(){}function xg(s,o,c,p){if(s.tag!==5)throw Error(n(476));var y=LE(s).queue;RE(s,y,o,G,c===null?F6:function(){return BE(s),c(p)})}function LE(s){var o=s.memoizedState;if(o!==null)return o;o={memoizedState:G,baseState:G,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ji,lastRenderedState:G},next:null};var c={};return o.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ji,lastRenderedState:c},next:null},s.memoizedState=o,s=s.alternate,s!==null&&(s.memoizedState=o),o}function BE(s){var o=LE(s);o.next===null&&(o=s.alternate.memoizedState),Zu(s,o.next.queue,{},An())}function Cg(){return Dr(pc)}function NE(){return Kt().memoizedState}function IE(){return Kt().memoizedState}function U6(s){for(var o=s.return;o!==null;){switch(o.tag){case 24:case 3:var c=An();s=Va(c);var p=Ya(o,s,c);p!==null&&(hn(p,o,c),Wu(p,o,c)),o={cache:Jv()},s.payload=o;return}o=o.return}}function $6(s,o,c){var p=An();c={lane:p,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},If(s)?zE(o,c):(c=Uv(s,o,c,p),c!==null&&(hn(c,s,p),HE(c,o,p)))}function jE(s,o,c){var p=An();Zu(s,o,c,p)}function Zu(s,o,c,p){var y={lane:p,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null};if(If(s))zE(o,y);else{var b=s.alternate;if(s.lanes===0&&(b===null||b.lanes===0)&&(b=o.lastRenderedReducer,b!==null))try{var E=o.lastRenderedState,T=b(E,c);if(y.hasEagerState=!0,y.eagerState=T,bn(T,E))return gf(s,o,y,0),bt===null&&vf(),!1}catch{}finally{}if(c=Uv(s,o,y,p),c!==null)return hn(c,s,p),HE(c,o,p),!0}return!1}function Eg(s,o,c,p){if(p={lane:2,revertLane:ny(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},If(s)){if(o)throw Error(n(479))}else o=Uv(s,c,p,2),o!==null&&hn(o,s,2)}function If(s){var o=s.alternate;return s===Ie||o!==null&&o===Ie}function zE(s,o){fl=Tf=!0;var c=s.pending;c===null?o.next=o:(o.next=c.next,c.next=o),s.pending=o}function HE(s,o,c){if((c&4194048)!==0){var p=o.lanes;p&=s.pendingLanes,c|=p,o.lanes=c,qx(s,c)}}var Qu={readContext:Dr,use:Rf,useCallback:zt,useContext:zt,useEffect:zt,useImperativeHandle:zt,useLayoutEffect:zt,useInsertionEffect:zt,useMemo:zt,useReducer:zt,useRef:zt,useState:zt,useDebugValue:zt,useDeferredValue:zt,useTransition:zt,useSyncExternalStore:zt,useId:zt,useHostTransitionStatus:zt,useFormState:zt,useActionState:zt,useOptimistic:zt,useMemoCache:zt,useCacheRefresh:zt};Qu.useEffectEvent=zt;var FE={readContext:Dr,use:Rf,useCallback:function(s,o){return Zr().memoizedState=[s,o===void 0?null:o],s},useContext:Dr,useEffect:CE,useImperativeHandle:function(s,o,c){c=c!=null?c.concat([s]):null,Bf(4194308,4,kE.bind(null,o,s),c)},useLayoutEffect:function(s,o){return Bf(4194308,4,s,o)},useInsertionEffect:function(s,o){Bf(4,2,s,o)},useMemo:function(s,o){var c=Zr();o=o===void 0?null:o;var p=s();if(Qs){nn(!0);try{s()}finally{nn(!1)}}return c.memoizedState=[p,o],p},useReducer:function(s,o,c){var p=Zr();if(c!==void 0){var y=c(o);if(Qs){nn(!0);try{c(o)}finally{nn(!1)}}}else y=o;return p.memoizedState=p.baseState=y,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:y},p.queue=s,s=s.dispatch=$6.bind(null,Ie,s),[p.memoizedState,s]},useRef:function(s){var o=Zr();return s={current:s},o.memoizedState=s},useState:function(s){s=yg(s);var o=s.queue,c=jE.bind(null,Ie,o);return o.dispatch=c,[s.memoizedState,c]},useDebugValue:Sg,useDeferredValue:function(s,o){var c=Zr();return wg(c,s,o)},useTransition:function(){var s=yg(!1);return s=RE.bind(null,Ie,s.queue,!0,!1),Zr().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,o,c){var p=Ie,y=Zr();if(et){if(c===void 0)throw Error(n(407));c=c()}else{if(c=o(),bt===null)throw Error(n(349));(Ze&127)!==0||lE(p,o,c)}y.memoizedState=c;var b={value:c,getSnapshot:o};return y.queue=b,CE(cE.bind(null,p,b,s),[s]),p.flags|=2048,pl(9,{destroy:void 0},uE.bind(null,p,b,c,o),null),c},useId:function(){var s=Zr(),o=bt.identifierPrefix;if(et){var c=Ai,p=Ei;c=(p&~(1<<32-_t(p)-1)).toString(32)+c,o="_"+o+"R_"+c,c=Df++,0<c&&(o+="H"+c.toString(32)),o+="_"}else c=N6++,o="_"+o+"r_"+c.toString(32)+"_";return s.memoizedState=o},useHostTransitionStatus:Cg,useFormState:_E,useActionState:_E,useOptimistic:function(s){var o=Zr();o.memoizedState=o.baseState=s;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=c,o=Eg.bind(null,Ie,!0,c),c.dispatch=o,[s,o]},useMemoCache:mg,useCacheRefresh:function(){return Zr().memoizedState=U6.bind(null,Ie)},useEffectEvent:function(s){var o=Zr(),c={impl:s};return o.memoizedState=c,function(){if((ot&2)!==0)throw Error(n(440));return c.impl.apply(void 0,arguments)}}},Ag={readContext:Dr,use:Rf,useCallback:TE,useContext:Dr,useEffect:bg,useImperativeHandle:PE,useInsertionEffect:AE,useLayoutEffect:OE,useMemo:DE,useReducer:Lf,useRef:xE,useState:function(){return Lf(Ji)},useDebugValue:Sg,useDeferredValue:function(s,o){var c=Kt();return ME(c,pt.memoizedState,s,o)},useTransition:function(){var s=Lf(Ji)[0],o=Kt().memoizedState;return[typeof s=="boolean"?s:Gu(s),o]},useSyncExternalStore:oE,useId:NE,useHostTransitionStatus:Cg,useFormState:bE,useActionState:bE,useOptimistic:function(s,o){var c=Kt();return dE(c,pt,s,o)},useMemoCache:mg,useCacheRefresh:IE};Ag.useEffectEvent=EE;var UE={readContext:Dr,use:Rf,useCallback:TE,useContext:Dr,useEffect:bg,useImperativeHandle:PE,useInsertionEffect:AE,useLayoutEffect:OE,useMemo:DE,useReducer:gg,useRef:xE,useState:function(){return gg(Ji)},useDebugValue:Sg,useDeferredValue:function(s,o){var c=Kt();return pt===null?wg(c,s,o):ME(c,pt.memoizedState,s,o)},useTransition:function(){var s=gg(Ji)[0],o=Kt().memoizedState;return[typeof s=="boolean"?s:Gu(s),o]},useSyncExternalStore:oE,useId:NE,useHostTransitionStatus:Cg,useFormState:wE,useActionState:wE,useOptimistic:function(s,o){var c=Kt();return pt!==null?dE(c,pt,s,o):(c.baseState=s,[s,c.queue.dispatch])},useMemoCache:mg,useCacheRefresh:IE};UE.useEffectEvent=EE;function Og(s,o,c,p){o=s.memoizedState,c=c(p,o),c=c==null?o:m({},o,c),s.memoizedState=c,s.lanes===0&&(s.updateQueue.baseState=c)}var kg={enqueueSetState:function(s,o,c){s=s._reactInternals;var p=An(),y=Va(p);y.payload=o,c!=null&&(y.callback=c),o=Ya(s,y,p),o!==null&&(hn(o,s,p),Wu(o,s,p))},enqueueReplaceState:function(s,o,c){s=s._reactInternals;var p=An(),y=Va(p);y.tag=1,y.payload=o,c!=null&&(y.callback=c),o=Ya(s,y,p),o!==null&&(hn(o,s,p),Wu(o,s,p))},enqueueForceUpdate:function(s,o){s=s._reactInternals;var c=An(),p=Va(c);p.tag=2,o!=null&&(p.callback=o),o=Ya(s,p,c),o!==null&&(hn(o,s,c),Wu(o,s,c))}};function $E(s,o,c,p,y,b,E){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(p,b,E):o.prototype&&o.prototype.isPureReactComponent?!ju(c,p)||!ju(y,b):!0}function KE(s,o,c,p){s=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(c,p),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(c,p),o.state!==s&&kg.enqueueReplaceState(o,o.state,null)}function Js(s,o){var c=o;if("ref"in o){c={};for(var p in o)p!=="ref"&&(c[p]=o[p])}if(s=s.defaultProps){c===o&&(c=m({},c));for(var y in s)c[y]===void 0&&(c[y]=s[y])}return c}function qE(s){mf(s)}function WE(s){console.error(s)}function VE(s){mf(s)}function jf(s,o){try{var c=s.onUncaughtError;c(o.value,{componentStack:o.stack})}catch(p){setTimeout(function(){throw p})}}function YE(s,o,c){try{var p=s.onCaughtError;p(c.value,{componentStack:c.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function Pg(s,o,c){return c=Va(c),c.tag=3,c.payload={element:null},c.callback=function(){jf(s,o)},c}function XE(s){return s=Va(s),s.tag=3,s}function GE(s,o,c,p){var y=c.type.getDerivedStateFromError;if(typeof y=="function"){var b=p.value;s.payload=function(){return y(b)},s.callback=function(){YE(o,c,p)}}var E=c.stateNode;E!==null&&typeof E.componentDidCatch=="function"&&(s.callback=function(){YE(o,c,p),typeof y!="function"&&(es===null?es=new Set([this]):es.add(this));var T=p.stack;this.componentDidCatch(p.value,{componentStack:T!==null?T:""})})}function K6(s,o,c,p,y){if(c.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(o=c.alternate,o!==null&&sl(o,c,y,!0),c=wn.current,c!==null){switch(c.tag){case 31:case 13:return Wn===null?Gf():c.alternate===null&&Ht===0&&(Ht=3),c.flags&=-257,c.flags|=65536,c.lanes=y,p===Ef?c.flags|=16384:(o=c.updateQueue,o===null?c.updateQueue=new Set([p]):o.add(p),ey(s,p,y)),!1;case 22:return c.flags|=65536,p===Ef?c.flags|=16384:(o=c.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([p])},c.updateQueue=o):(c=o.retryQueue,c===null?o.retryQueue=new Set([p]):c.add(p)),ey(s,p,y)),!1}throw Error(n(435,c.tag))}return ey(s,p,y),Gf(),!1}if(et)return o=wn.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=y,p!==Yv&&(s=Error(n(422),{cause:p}),Fu(Un(s,c)))):(p!==Yv&&(o=Error(n(423),{cause:p}),Fu(Un(o,c))),s=s.current.alternate,s.flags|=65536,y&=-y,s.lanes|=y,p=Un(p,c),y=Pg(s.stateNode,p,y),ag(s,y),Ht!==4&&(Ht=2)),!1;var b=Error(n(520),{cause:p});if(b=Un(b,c),sc===null?sc=[b]:sc.push(b),Ht!==4&&(Ht=2),o===null)return!0;p=Un(p,c),c=o;do{switch(c.tag){case 3:return c.flags|=65536,s=y&-y,c.lanes|=s,s=Pg(c.stateNode,p,s),ag(c,s),!1;case 1:if(o=c.type,b=c.stateNode,(c.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(es===null||!es.has(b))))return c.flags|=65536,y&=-y,c.lanes|=y,y=XE(y),GE(y,s,c,p),ag(c,y),!1}c=c.return}while(c!==null);return!1}var Tg=Error(n(461)),Jt=!1;function Mr(s,o,c,p){o.child=s===null?eE(o,null,c,p):Zs(o,s.child,c,p)}function ZE(s,o,c,p,y){c=c.render;var b=o.ref;if("ref"in p){var E={};for(var T in p)T!=="ref"&&(E[T]=p[T])}else E=p;return Vs(o),p=hg(s,o,c,E,b,y),T=fg(),s!==null&&!Jt?(dg(s,o,y),ea(s,o,y)):(et&&T&&Wv(o),o.flags|=1,Mr(s,o,p,y),o.child)}function QE(s,o,c,p,y){if(s===null){var b=c.type;return typeof b=="function"&&!$v(b)&&b.defaultProps===void 0&&c.compare===null?(o.tag=15,o.type=b,JE(s,o,b,p,y)):(s=_f(c.type,null,p,o,o.mode,y),s.ref=o.ref,s.return=o,o.child=s)}if(b=s.child,!jg(s,y)){var E=b.memoizedProps;if(c=c.compare,c=c!==null?c:ju,c(E,p)&&s.ref===o.ref)return ea(s,o,y)}return o.flags|=1,s=Yi(b,p),s.ref=o.ref,s.return=o,o.child=s}function JE(s,o,c,p,y){if(s!==null){var b=s.memoizedProps;if(ju(b,p)&&s.ref===o.ref)if(Jt=!1,o.pendingProps=p=b,jg(s,y))(s.flags&131072)!==0&&(Jt=!0);else return o.lanes=s.lanes,ea(s,o,y)}return Dg(s,o,c,p,y)}function eA(s,o,c,p){var y=p.children,b=s!==null?s.memoizedState:null;if(s===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((o.flags&128)!==0){if(b=b!==null?b.baseLanes|c:c,s!==null){for(p=o.child=s.child,y=0;p!==null;)y=y|p.lanes|p.childLanes,p=p.sibling;p=y&~b}else p=0,o.child=null;return tA(s,o,b,c,p)}if((c&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},s!==null&&xf(o,b!==null?b.cachePool:null),b!==null?nE(o,b):og(),iE(o);else return p=o.lanes=536870912,tA(s,o,b!==null?b.baseLanes|c:c,c,p)}else b!==null?(xf(o,b.cachePool),nE(o,b),Ga(),o.memoizedState=null):(s!==null&&xf(o,null),og(),Ga());return Mr(s,o,y,c),o.child}function Ju(s,o){return s!==null&&s.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function tA(s,o,c,p,y){var b=tg();return b=b===null?null:{parent:Zt._currentValue,pool:b},o.memoizedState={baseLanes:c,cachePool:b},s!==null&&xf(o,null),og(),iE(o),s!==null&&sl(s,o,p,!0),o.childLanes=y,null}function zf(s,o){return o=Ff({mode:o.mode,children:o.children},s.mode),o.ref=s.ref,s.child=o,o.return=s,o}function rA(s,o,c){return Zs(o,s.child,null,c),s=zf(o,o.pendingProps),s.flags|=2,xn(o),o.memoizedState=null,s}function q6(s,o,c){var p=o.pendingProps,y=(o.flags&128)!==0;if(o.flags&=-129,s===null){if(et){if(p.mode==="hidden")return s=zf(o,p),o.lanes=536870912,Ju(null,s);if(ug(o),(s=At)?(s=pO(s,qn),s=s!==null&&s.data==="&"?s:null,s!==null&&(o.memoizedState={dehydrated:s,treeContext:Ua!==null?{id:Ei,overflow:Ai}:null,retryLane:536870912,hydrationErrors:null},c=zC(s),c.return=o,o.child=c,Tr=o,At=null)):s=null,s===null)throw Ka(o);return o.lanes=536870912,null}return zf(o,p)}var b=s.memoizedState;if(b!==null){var E=b.dehydrated;if(ug(o),y)if(o.flags&256)o.flags&=-257,o=rA(s,o,c);else if(o.memoizedState!==null)o.child=s.child,o.flags|=128,o=null;else throw Error(n(558));else if(Jt||sl(s,o,c,!1),y=(c&s.childLanes)!==0,Jt||y){if(p=bt,p!==null&&(E=Wx(p,c),E!==0&&E!==b.retryLane))throw b.retryLane=E,$s(s,E),hn(p,s,E),Tg;Gf(),o=rA(s,o,c)}else s=b.treeContext,At=Vn(E.nextSibling),Tr=o,et=!0,$a=null,qn=!1,s!==null&&UC(o,s),o=zf(o,p),o.flags|=4096;return o}return s=Yi(s.child,{mode:p.mode,children:p.children}),s.ref=o.ref,o.child=s,s.return=o,s}function Hf(s,o){var c=o.ref;if(c===null)s!==null&&s.ref!==null&&(o.flags|=4194816);else{if(typeof c!="function"&&typeof c!="object")throw Error(n(284));(s===null||s.ref!==c)&&(o.flags|=4194816)}}function Dg(s,o,c,p,y){return Vs(o),c=hg(s,o,c,p,void 0,y),p=fg(),s!==null&&!Jt?(dg(s,o,y),ea(s,o,y)):(et&&p&&Wv(o),o.flags|=1,Mr(s,o,c,y),o.child)}function nA(s,o,c,p,y,b){return Vs(o),o.updateQueue=null,c=sE(o,p,c,y),aE(s),p=fg(),s!==null&&!Jt?(dg(s,o,b),ea(s,o,b)):(et&&p&&Wv(o),o.flags|=1,Mr(s,o,c,b),o.child)}function iA(s,o,c,p,y){if(Vs(o),o.stateNode===null){var b=rl,E=c.contextType;typeof E=="object"&&E!==null&&(b=Dr(E)),b=new c(p,b),o.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=kg,o.stateNode=b,b._reactInternals=o,b=o.stateNode,b.props=p,b.state=o.memoizedState,b.refs={},ng(o),E=c.contextType,b.context=typeof E=="object"&&E!==null?Dr(E):rl,b.state=o.memoizedState,E=c.getDerivedStateFromProps,typeof E=="function"&&(Og(o,c,E,p),b.state=o.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(E=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),E!==b.state&&kg.enqueueReplaceState(b,b.state,null),Yu(o,p,b,y),Vu(),b.state=o.memoizedState),typeof b.componentDidMount=="function"&&(o.flags|=4194308),p=!0}else if(s===null){b=o.stateNode;var T=o.memoizedProps,H=Js(c,T);b.props=H;var Q=b.context,re=c.contextType;E=rl,typeof re=="object"&&re!==null&&(E=Dr(re));var se=c.getDerivedStateFromProps;re=typeof se=="function"||typeof b.getSnapshotBeforeUpdate=="function",T=o.pendingProps!==T,re||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(T||Q!==E)&&KE(o,b,p,E),Wa=!1;var J=o.memoizedState;b.state=J,Yu(o,p,b,y),Vu(),Q=o.memoizedState,T||J!==Q||Wa?(typeof se=="function"&&(Og(o,c,se,p),Q=o.memoizedState),(H=Wa||$E(o,c,H,p,J,Q,E))?(re||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(o.flags|=4194308)):(typeof b.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=p,o.memoizedState=Q),b.props=p,b.state=Q,b.context=E,p=H):(typeof b.componentDidMount=="function"&&(o.flags|=4194308),p=!1)}else{b=o.stateNode,ig(s,o),E=o.memoizedProps,re=Js(c,E),b.props=re,se=o.pendingProps,J=b.context,Q=c.contextType,H=rl,typeof Q=="object"&&Q!==null&&(H=Dr(Q)),T=c.getDerivedStateFromProps,(Q=typeof T=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(E!==se||J!==H)&&KE(o,b,p,H),Wa=!1,J=o.memoizedState,b.state=J,Yu(o,p,b,y),Vu();var te=o.memoizedState;E!==se||J!==te||Wa||s!==null&&s.dependencies!==null&&Sf(s.dependencies)?(typeof T=="function"&&(Og(o,c,T,p),te=o.memoizedState),(re=Wa||$E(o,c,re,p,J,te,H)||s!==null&&s.dependencies!==null&&Sf(s.dependencies))?(Q||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(p,te,H),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(p,te,H)),typeof b.componentDidUpdate=="function"&&(o.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof b.componentDidUpdate!="function"||E===s.memoizedProps&&J===s.memoizedState||(o.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||E===s.memoizedProps&&J===s.memoizedState||(o.flags|=1024),o.memoizedProps=p,o.memoizedState=te),b.props=p,b.state=te,b.context=H,p=re):(typeof b.componentDidUpdate!="function"||E===s.memoizedProps&&J===s.memoizedState||(o.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||E===s.memoizedProps&&J===s.memoizedState||(o.flags|=1024),p=!1)}return b=p,Hf(s,o),p=(o.flags&128)!==0,b||p?(b=o.stateNode,c=p&&typeof c.getDerivedStateFromError!="function"?null:b.render(),o.flags|=1,s!==null&&p?(o.child=Zs(o,s.child,null,y),o.child=Zs(o,null,c,y)):Mr(s,o,c,y),o.memoizedState=b.state,s=o.child):s=ea(s,o,y),s}function aA(s,o,c,p){return qs(),o.flags|=256,Mr(s,o,c,p),o.child}var Mg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Rg(s){return{baseLanes:s,cachePool:YC()}}function Lg(s,o,c){return s=s!==null?s.childLanes&~c:0,o&&(s|=En),s}function sA(s,o,c){var p=o.pendingProps,y=!1,b=(o.flags&128)!==0,E;if((E=b)||(E=s!==null&&s.memoizedState===null?!1:($t.current&2)!==0),E&&(y=!0,o.flags&=-129),E=(o.flags&32)!==0,o.flags&=-33,s===null){if(et){if(y?Xa(o):Ga(),(s=At)?(s=pO(s,qn),s=s!==null&&s.data!=="&"?s:null,s!==null&&(o.memoizedState={dehydrated:s,treeContext:Ua!==null?{id:Ei,overflow:Ai}:null,retryLane:536870912,hydrationErrors:null},c=zC(s),c.return=o,o.child=c,Tr=o,At=null)):s=null,s===null)throw Ka(o);return vy(s)?o.lanes=32:o.lanes=536870912,null}var T=p.children;return p=p.fallback,y?(Ga(),y=o.mode,T=Ff({mode:"hidden",children:T},y),p=Ks(p,y,c,null),T.return=o,p.return=o,T.sibling=p,o.child=T,p=o.child,p.memoizedState=Rg(c),p.childLanes=Lg(s,E,c),o.memoizedState=Mg,Ju(null,p)):(Xa(o),Bg(o,T))}var H=s.memoizedState;if(H!==null&&(T=H.dehydrated,T!==null)){if(b)o.flags&256?(Xa(o),o.flags&=-257,o=Ng(s,o,c)):o.memoizedState!==null?(Ga(),o.child=s.child,o.flags|=128,o=null):(Ga(),T=p.fallback,y=o.mode,p=Ff({mode:"visible",children:p.children},y),T=Ks(T,y,c,null),T.flags|=2,p.return=o,T.return=o,p.sibling=T,o.child=p,Zs(o,s.child,null,c),p=o.child,p.memoizedState=Rg(c),p.childLanes=Lg(s,E,c),o.memoizedState=Mg,o=Ju(null,p));else if(Xa(o),vy(T)){if(E=T.nextSibling&&T.nextSibling.dataset,E)var Q=E.dgst;E=Q,p=Error(n(419)),p.stack="",p.digest=E,Fu({value:p,source:null,stack:null}),o=Ng(s,o,c)}else if(Jt||sl(s,o,c,!1),E=(c&s.childLanes)!==0,Jt||E){if(E=bt,E!==null&&(p=Wx(E,c),p!==0&&p!==H.retryLane))throw H.retryLane=p,$s(s,p),hn(E,s,p),Tg;my(T)||Gf(),o=Ng(s,o,c)}else my(T)?(o.flags|=192,o.child=s.child,o=null):(s=H.treeContext,At=Vn(T.nextSibling),Tr=o,et=!0,$a=null,qn=!1,s!==null&&UC(o,s),o=Bg(o,p.children),o.flags|=4096);return o}return y?(Ga(),T=p.fallback,y=o.mode,H=s.child,Q=H.sibling,p=Yi(H,{mode:"hidden",children:p.children}),p.subtreeFlags=H.subtreeFlags&65011712,Q!==null?T=Yi(Q,T):(T=Ks(T,y,c,null),T.flags|=2),T.return=o,p.return=o,p.sibling=T,o.child=p,Ju(null,p),p=o.child,T=s.child.memoizedState,T===null?T=Rg(c):(y=T.cachePool,y!==null?(H=Zt._currentValue,y=y.parent!==H?{parent:H,pool:H}:y):y=YC(),T={baseLanes:T.baseLanes|c,cachePool:y}),p.memoizedState=T,p.childLanes=Lg(s,E,c),o.memoizedState=Mg,Ju(s.child,p)):(Xa(o),c=s.child,s=c.sibling,c=Yi(c,{mode:"visible",children:p.children}),c.return=o,c.sibling=null,s!==null&&(E=o.deletions,E===null?(o.deletions=[s],o.flags|=16):E.push(s)),o.child=c,o.memoizedState=null,c)}function Bg(s,o){return o=Ff({mode:"visible",children:o},s.mode),o.return=s,s.child=o}function Ff(s,o){return s=Sn(22,s,null,o),s.lanes=0,s}function Ng(s,o,c){return Zs(o,s.child,null,c),s=Bg(o,o.pendingProps.children),s.flags|=2,o.memoizedState=null,s}function oA(s,o,c){s.lanes|=o;var p=s.alternate;p!==null&&(p.lanes|=o),Zv(s.return,o,c)}function Ig(s,o,c,p,y,b){var E=s.memoizedState;E===null?s.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:p,tail:c,tailMode:y,treeForkCount:b}:(E.isBackwards=o,E.rendering=null,E.renderingStartTime=0,E.last=p,E.tail=c,E.tailMode=y,E.treeForkCount=b)}function lA(s,o,c){var p=o.pendingProps,y=p.revealOrder,b=p.tail;p=p.children;var E=$t.current,T=(E&2)!==0;if(T?(E=E&1|2,o.flags|=128):E&=1,L($t,E),Mr(s,o,p,c),p=et?Hu:0,!T&&s!==null&&(s.flags&128)!==0)e:for(s=o.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&oA(s,c,o);else if(s.tag===19)oA(s,c,o);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===o)break e;for(;s.sibling===null;){if(s.return===null||s.return===o)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(y){case"forwards":for(c=o.child,y=null;c!==null;)s=c.alternate,s!==null&&Pf(s)===null&&(y=c),c=c.sibling;c=y,c===null?(y=o.child,o.child=null):(y=c.sibling,c.sibling=null),Ig(o,!1,y,c,b,p);break;case"backwards":case"unstable_legacy-backwards":for(c=null,y=o.child,o.child=null;y!==null;){if(s=y.alternate,s!==null&&Pf(s)===null){o.child=y;break}s=y.sibling,y.sibling=c,c=y,y=s}Ig(o,!0,c,null,b,p);break;case"together":Ig(o,!1,null,null,void 0,p);break;default:o.memoizedState=null}return o.child}function ea(s,o,c){if(s!==null&&(o.dependencies=s.dependencies),Ja|=o.lanes,(c&o.childLanes)===0)if(s!==null){if(sl(s,o,c,!1),(c&o.childLanes)===0)return null}else return null;if(s!==null&&o.child!==s.child)throw Error(n(153));if(o.child!==null){for(s=o.child,c=Yi(s,s.pendingProps),o.child=c,c.return=o;s.sibling!==null;)s=s.sibling,c=c.sibling=Yi(s,s.pendingProps),c.return=o;c.sibling=null}return o.child}function jg(s,o){return(s.lanes&o)!==0?!0:(s=s.dependencies,!!(s!==null&&Sf(s)))}function W6(s,o,c){switch(o.tag){case 3:tt(o,o.stateNode.containerInfo),qa(o,Zt,s.memoizedState.cache),qs();break;case 27:case 5:Ee(o);break;case 4:tt(o,o.stateNode.containerInfo);break;case 10:qa(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,ug(o),null;break;case 13:var p=o.memoizedState;if(p!==null)return p.dehydrated!==null?(Xa(o),o.flags|=128,null):(c&o.child.childLanes)!==0?sA(s,o,c):(Xa(o),s=ea(s,o,c),s!==null?s.sibling:null);Xa(o);break;case 19:var y=(s.flags&128)!==0;if(p=(c&o.childLanes)!==0,p||(sl(s,o,c,!1),p=(c&o.childLanes)!==0),y){if(p)return lA(s,o,c);o.flags|=128}if(y=o.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),L($t,$t.current),p)break;return null;case 22:return o.lanes=0,eA(s,o,c,o.pendingProps);case 24:qa(o,Zt,s.memoizedState.cache)}return ea(s,o,c)}function uA(s,o,c){if(s!==null)if(s.memoizedProps!==o.pendingProps)Jt=!0;else{if(!jg(s,c)&&(o.flags&128)===0)return Jt=!1,W6(s,o,c);Jt=(s.flags&131072)!==0}else Jt=!1,et&&(o.flags&1048576)!==0&&FC(o,Hu,o.index);switch(o.lanes=0,o.tag){case 16:e:{var p=o.pendingProps;if(s=Xs(o.elementType),o.type=s,typeof s=="function")$v(s)?(p=Js(s,p),o.tag=1,o=iA(null,o,s,p,c)):(o.tag=0,o=Dg(null,o,s,p,c));else{if(s!=null){var y=s.$$typeof;if(y===P){o.tag=11,o=ZE(null,o,s,p,c);break e}else if(y===R){o.tag=14,o=QE(null,o,s,p,c);break e}}throw o=K(s)||s,Error(n(306,o,""))}}return o;case 0:return Dg(s,o,o.type,o.pendingProps,c);case 1:return p=o.type,y=Js(p,o.pendingProps),iA(s,o,p,y,c);case 3:e:{if(tt(o,o.stateNode.containerInfo),s===null)throw Error(n(387));p=o.pendingProps;var b=o.memoizedState;y=b.element,ig(s,o),Yu(o,p,null,c);var E=o.memoizedState;if(p=E.cache,qa(o,Zt,p),p!==b.cache&&Qv(o,[Zt],c,!0),Vu(),p=E.element,b.isDehydrated)if(b={element:p,isDehydrated:!1,cache:E.cache},o.updateQueue.baseState=b,o.memoizedState=b,o.flags&256){o=aA(s,o,p,c);break e}else if(p!==y){y=Un(Error(n(424)),o),Fu(y),o=aA(s,o,p,c);break e}else{switch(s=o.stateNode.containerInfo,s.nodeType){case 9:s=s.body;break;default:s=s.nodeName==="HTML"?s.ownerDocument.body:s}for(At=Vn(s.firstChild),Tr=o,et=!0,$a=null,qn=!0,c=eE(o,null,p,c),o.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling}else{if(qs(),p===y){o=ea(s,o,c);break e}Mr(s,o,p,c)}o=o.child}return o;case 26:return Hf(s,o),s===null?(c=bO(o.type,null,o.pendingProps,null))?o.memoizedState=c:et||(c=o.type,s=o.pendingProps,p=nd(pe.current).createElement(c),p[Pr]=o,p[an]=s,Rr(p,c,s),mr(p),o.stateNode=p):o.memoizedState=bO(o.type,s.memoizedProps,o.pendingProps,s.memoizedState),null;case 27:return Ee(o),s===null&&et&&(p=o.stateNode=gO(o.type,o.pendingProps,pe.current),Tr=o,qn=!0,y=At,is(o.type)?(gy=y,At=Vn(p.firstChild)):At=y),Mr(s,o,o.pendingProps.children,c),Hf(s,o),s===null&&(o.flags|=4194304),o.child;case 5:return s===null&&et&&((y=p=At)&&(p=w4(p,o.type,o.pendingProps,qn),p!==null?(o.stateNode=p,Tr=o,At=Vn(p.firstChild),qn=!1,y=!0):y=!1),y||Ka(o)),Ee(o),y=o.type,b=o.pendingProps,E=s!==null?s.memoizedProps:null,p=b.children,fy(y,b)?p=null:E!==null&&fy(y,E)&&(o.flags|=32),o.memoizedState!==null&&(y=hg(s,o,I6,null,null,c),pc._currentValue=y),Hf(s,o),Mr(s,o,p,c),o.child;case 6:return s===null&&et&&((s=c=At)&&(c=x4(c,o.pendingProps,qn),c!==null?(o.stateNode=c,Tr=o,At=null,s=!0):s=!1),s||Ka(o)),null;case 13:return sA(s,o,c);case 4:return tt(o,o.stateNode.containerInfo),p=o.pendingProps,s===null?o.child=Zs(o,null,p,c):Mr(s,o,p,c),o.child;case 11:return ZE(s,o,o.type,o.pendingProps,c);case 7:return Mr(s,o,o.pendingProps,c),o.child;case 8:return Mr(s,o,o.pendingProps.children,c),o.child;case 12:return Mr(s,o,o.pendingProps.children,c),o.child;case 10:return p=o.pendingProps,qa(o,o.type,p.value),Mr(s,o,p.children,c),o.child;case 9:return y=o.type._context,p=o.pendingProps.children,Vs(o),y=Dr(y),p=p(y),o.flags|=1,Mr(s,o,p,c),o.child;case 14:return QE(s,o,o.type,o.pendingProps,c);case 15:return JE(s,o,o.type,o.pendingProps,c);case 19:return lA(s,o,c);case 31:return q6(s,o,c);case 22:return eA(s,o,c,o.pendingProps);case 24:return Vs(o),p=Dr(Zt),s===null?(y=tg(),y===null&&(y=bt,b=Jv(),y.pooledCache=b,b.refCount++,b!==null&&(y.pooledCacheLanes|=c),y=b),o.memoizedState={parent:p,cache:y},ng(o),qa(o,Zt,y)):((s.lanes&c)!==0&&(ig(s,o),Yu(o,null,null,c),Vu()),y=s.memoizedState,b=o.memoizedState,y.parent!==p?(y={parent:p,cache:p},o.memoizedState=y,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=y),qa(o,Zt,p)):(p=b.cache,qa(o,Zt,p),p!==y.cache&&Qv(o,[Zt],c,!0))),Mr(s,o,o.pendingProps.children,c),o.child;case 29:throw o.pendingProps}throw Error(n(156,o.tag))}function ta(s){s.flags|=4}function zg(s,o,c,p,y){if((o=(s.mode&32)!==0)&&(o=!1),o){if(s.flags|=16777216,(y&335544128)===y)if(s.stateNode.complete)s.flags|=8192;else if(NA())s.flags|=8192;else throw Gs=Ef,rg}else s.flags&=-16777217}function cA(s,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!EO(o))if(NA())s.flags|=8192;else throw Gs=Ef,rg}function Uf(s,o){o!==null&&(s.flags|=4),s.flags&16384&&(o=s.tag!==22?$x():536870912,s.lanes|=o,yl|=o)}function ec(s,o){if(!et)switch(s.tailMode){case"hidden":o=s.tail;for(var c=null;o!==null;)o.alternate!==null&&(c=o),o=o.sibling;c===null?s.tail=null:c.sibling=null;break;case"collapsed":c=s.tail;for(var p=null;c!==null;)c.alternate!==null&&(p=c),c=c.sibling;p===null?o||s.tail===null?s.tail=null:s.tail.sibling=null:p.sibling=null}}function Ot(s){var o=s.alternate!==null&&s.alternate.child===s.child,c=0,p=0;if(o)for(var y=s.child;y!==null;)c|=y.lanes|y.childLanes,p|=y.subtreeFlags&65011712,p|=y.flags&65011712,y.return=s,y=y.sibling;else for(y=s.child;y!==null;)c|=y.lanes|y.childLanes,p|=y.subtreeFlags,p|=y.flags,y.return=s,y=y.sibling;return s.subtreeFlags|=p,s.childLanes=c,o}function V6(s,o,c){var p=o.pendingProps;switch(Vv(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ot(o),null;case 1:return Ot(o),null;case 3:return c=o.stateNode,p=null,s!==null&&(p=s.memoizedState.cache),o.memoizedState.cache!==p&&(o.flags|=2048),Zi(Zt),ie(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(s===null||s.child===null)&&(al(o)?ta(o):s===null||s.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Xv())),Ot(o),null;case 26:var y=o.type,b=o.memoizedState;return s===null?(ta(o),b!==null?(Ot(o),cA(o,b)):(Ot(o),zg(o,y,null,p,c))):b?b!==s.memoizedState?(ta(o),Ot(o),cA(o,b)):(Ot(o),o.flags&=-16777217):(s=s.memoizedProps,s!==p&&ta(o),Ot(o),zg(o,y,s,p,c)),null;case 27:if(Oe(o),c=pe.current,y=o.type,s!==null&&o.stateNode!=null)s.memoizedProps!==p&&ta(o);else{if(!p){if(o.stateNode===null)throw Error(n(166));return Ot(o),null}s=ue.current,al(o)?$C(o):(s=gO(y,p,c),o.stateNode=s,ta(o))}return Ot(o),null;case 5:if(Oe(o),y=o.type,s!==null&&o.stateNode!=null)s.memoizedProps!==p&&ta(o);else{if(!p){if(o.stateNode===null)throw Error(n(166));return Ot(o),null}if(b=ue.current,al(o))$C(o);else{var E=nd(pe.current);switch(b){case 1:b=E.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:b=E.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":b=E.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":b=E.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":b=E.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof p.is=="string"?E.createElement("select",{is:p.is}):E.createElement("select"),p.multiple?b.multiple=!0:p.size&&(b.size=p.size);break;default:b=typeof p.is=="string"?E.createElement(y,{is:p.is}):E.createElement(y)}}b[Pr]=o,b[an]=p;e:for(E=o.child;E!==null;){if(E.tag===5||E.tag===6)b.appendChild(E.stateNode);else if(E.tag!==4&&E.tag!==27&&E.child!==null){E.child.return=E,E=E.child;continue}if(E===o)break e;for(;E.sibling===null;){if(E.return===null||E.return===o)break e;E=E.return}E.sibling.return=E.return,E=E.sibling}o.stateNode=b;e:switch(Rr(b,y,p),y){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&ta(o)}}return Ot(o),zg(o,o.type,s===null?null:s.memoizedProps,o.pendingProps,c),null;case 6:if(s&&o.stateNode!=null)s.memoizedProps!==p&&ta(o);else{if(typeof p!="string"&&o.stateNode===null)throw Error(n(166));if(s=pe.current,al(o)){if(s=o.stateNode,c=o.memoizedProps,p=null,y=Tr,y!==null)switch(y.tag){case 27:case 5:p=y.memoizedProps}s[Pr]=o,s=!!(s.nodeValue===c||p!==null&&p.suppressHydrationWarning===!0||sO(s.nodeValue,c)),s||Ka(o,!0)}else s=nd(s).createTextNode(p),s[Pr]=o,o.stateNode=s}return Ot(o),null;case 31:if(c=o.memoizedState,s===null||s.memoizedState!==null){if(p=al(o),c!==null){if(s===null){if(!p)throw Error(n(318));if(s=o.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(557));s[Pr]=o}else qs(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Ot(o),s=!1}else c=Xv(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=c),s=!0;if(!s)return o.flags&256?(xn(o),o):(xn(o),null);if((o.flags&128)!==0)throw Error(n(558))}return Ot(o),null;case 13:if(p=o.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(y=al(o),p!==null&&p.dehydrated!==null){if(s===null){if(!y)throw Error(n(318));if(y=o.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(n(317));y[Pr]=o}else qs(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Ot(o),y=!1}else y=Xv(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=y),y=!0;if(!y)return o.flags&256?(xn(o),o):(xn(o),null)}return xn(o),(o.flags&128)!==0?(o.lanes=c,o):(c=p!==null,s=s!==null&&s.memoizedState!==null,c&&(p=o.child,y=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(y=p.alternate.memoizedState.cachePool.pool),b=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(b=p.memoizedState.cachePool.pool),b!==y&&(p.flags|=2048)),c!==s&&c&&(o.child.flags|=8192),Uf(o,o.updateQueue),Ot(o),null);case 4:return ie(),s===null&&oy(o.stateNode.containerInfo),Ot(o),null;case 10:return Zi(o.type),Ot(o),null;case 19:if(Y($t),p=o.memoizedState,p===null)return Ot(o),null;if(y=(o.flags&128)!==0,b=p.rendering,b===null)if(y)ec(p,!1);else{if(Ht!==0||s!==null&&(s.flags&128)!==0)for(s=o.child;s!==null;){if(b=Pf(s),b!==null){for(o.flags|=128,ec(p,!1),s=b.updateQueue,o.updateQueue=s,Uf(o,s),o.subtreeFlags=0,s=c,c=o.child;c!==null;)jC(c,s),c=c.sibling;return L($t,$t.current&1|2),et&&Xi(o,p.treeForkCount),o.child}s=s.sibling}p.tail!==null&&Xr()>Vf&&(o.flags|=128,y=!0,ec(p,!1),o.lanes=4194304)}else{if(!y)if(s=Pf(b),s!==null){if(o.flags|=128,y=!0,s=s.updateQueue,o.updateQueue=s,Uf(o,s),ec(p,!0),p.tail===null&&p.tailMode==="hidden"&&!b.alternate&&!et)return Ot(o),null}else 2*Xr()-p.renderingStartTime>Vf&&c!==536870912&&(o.flags|=128,y=!0,ec(p,!1),o.lanes=4194304);p.isBackwards?(b.sibling=o.child,o.child=b):(s=p.last,s!==null?s.sibling=b:o.child=b,p.last=b)}return p.tail!==null?(s=p.tail,p.rendering=s,p.tail=s.sibling,p.renderingStartTime=Xr(),s.sibling=null,c=$t.current,L($t,y?c&1|2:c&1),et&&Xi(o,p.treeForkCount),s):(Ot(o),null);case 22:case 23:return xn(o),lg(),p=o.memoizedState!==null,s!==null?s.memoizedState!==null!==p&&(o.flags|=8192):p&&(o.flags|=8192),p?(c&536870912)!==0&&(o.flags&128)===0&&(Ot(o),o.subtreeFlags&6&&(o.flags|=8192)):Ot(o),c=o.updateQueue,c!==null&&Uf(o,c.retryQueue),c=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),p=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(p=o.memoizedState.cachePool.pool),p!==c&&(o.flags|=2048),s!==null&&Y(Ys),null;case 24:return c=null,s!==null&&(c=s.memoizedState.cache),o.memoizedState.cache!==c&&(o.flags|=2048),Zi(Zt),Ot(o),null;case 25:return null;case 30:return null}throw Error(n(156,o.tag))}function Y6(s,o){switch(Vv(o),o.tag){case 1:return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 3:return Zi(Zt),ie(),s=o.flags,(s&65536)!==0&&(s&128)===0?(o.flags=s&-65537|128,o):null;case 26:case 27:case 5:return Oe(o),null;case 31:if(o.memoizedState!==null){if(xn(o),o.alternate===null)throw Error(n(340));qs()}return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 13:if(xn(o),s=o.memoizedState,s!==null&&s.dehydrated!==null){if(o.alternate===null)throw Error(n(340));qs()}return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 19:return Y($t),null;case 4:return ie(),null;case 10:return Zi(o.type),null;case 22:case 23:return xn(o),lg(),s!==null&&Y(Ys),s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 24:return Zi(Zt),null;case 25:return null;default:return null}}function hA(s,o){switch(Vv(o),o.tag){case 3:Zi(Zt),ie();break;case 26:case 27:case 5:Oe(o);break;case 4:ie();break;case 31:o.memoizedState!==null&&xn(o);break;case 13:xn(o);break;case 19:Y($t);break;case 10:Zi(o.type);break;case 22:case 23:xn(o),lg(),s!==null&&Y(Ys);break;case 24:Zi(Zt)}}function tc(s,o){try{var c=o.updateQueue,p=c!==null?c.lastEffect:null;if(p!==null){var y=p.next;c=y;do{if((c.tag&s)===s){p=void 0;var b=c.create,E=c.inst;p=b(),E.destroy=p}c=c.next}while(c!==y)}}catch(T){ht(o,o.return,T)}}function Za(s,o,c){try{var p=o.updateQueue,y=p!==null?p.lastEffect:null;if(y!==null){var b=y.next;p=b;do{if((p.tag&s)===s){var E=p.inst,T=E.destroy;if(T!==void 0){E.destroy=void 0,y=o;var H=c,Q=T;try{Q()}catch(re){ht(y,H,re)}}}p=p.next}while(p!==b)}}catch(re){ht(o,o.return,re)}}function fA(s){var o=s.updateQueue;if(o!==null){var c=s.stateNode;try{rE(o,c)}catch(p){ht(s,s.return,p)}}}function dA(s,o,c){c.props=Js(s.type,s.memoizedProps),c.state=s.memoizedState;try{c.componentWillUnmount()}catch(p){ht(s,o,p)}}function rc(s,o){try{var c=s.ref;if(c!==null){switch(s.tag){case 26:case 27:case 5:var p=s.stateNode;break;case 30:p=s.stateNode;break;default:p=s.stateNode}typeof c=="function"?s.refCleanup=c(p):c.current=p}}catch(y){ht(s,o,y)}}function Oi(s,o){var c=s.ref,p=s.refCleanup;if(c!==null)if(typeof p=="function")try{p()}catch(y){ht(s,o,y)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(y){ht(s,o,y)}else c.current=null}function pA(s){var o=s.type,c=s.memoizedProps,p=s.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":c.autoFocus&&p.focus();break e;case"img":c.src?p.src=c.src:c.srcSet&&(p.srcset=c.srcSet)}}catch(y){ht(s,s.return,y)}}function Hg(s,o,c){try{var p=s.stateNode;v4(p,s.type,c,o),p[an]=o}catch(y){ht(s,s.return,y)}}function mA(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&is(s.type)||s.tag===4}function Fg(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||mA(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&is(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Ug(s,o,c){var p=s.tag;if(p===5||p===6)s=s.stateNode,o?(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c).insertBefore(s,o):(o=c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,o.appendChild(s),c=c._reactRootContainer,c!=null||o.onclick!==null||(o.onclick=Wi));else if(p!==4&&(p===27&&is(s.type)&&(c=s.stateNode,o=null),s=s.child,s!==null))for(Ug(s,o,c),s=s.sibling;s!==null;)Ug(s,o,c),s=s.sibling}function $f(s,o,c){var p=s.tag;if(p===5||p===6)s=s.stateNode,o?c.insertBefore(s,o):c.appendChild(s);else if(p!==4&&(p===27&&is(s.type)&&(c=s.stateNode),s=s.child,s!==null))for($f(s,o,c),s=s.sibling;s!==null;)$f(s,o,c),s=s.sibling}function vA(s){var o=s.stateNode,c=s.memoizedProps;try{for(var p=s.type,y=o.attributes;y.length;)o.removeAttributeNode(y[0]);Rr(o,p,c),o[Pr]=s,o[an]=c}catch(b){ht(s,s.return,b)}}var ra=!1,er=!1,$g=!1,gA=typeof WeakSet=="function"?WeakSet:Set,vr=null;function X6(s,o){if(s=s.containerInfo,cy=cd,s=PC(s),Nv(s)){if("selectionStart"in s)var c={start:s.selectionStart,end:s.selectionEnd};else e:{c=(c=s.ownerDocument)&&c.defaultView||window;var p=c.getSelection&&c.getSelection();if(p&&p.rangeCount!==0){c=p.anchorNode;var y=p.anchorOffset,b=p.focusNode;p=p.focusOffset;try{c.nodeType,b.nodeType}catch{c=null;break e}var E=0,T=-1,H=-1,Q=0,re=0,se=s,J=null;t:for(;;){for(var te;se!==c||y!==0&&se.nodeType!==3||(T=E+y),se!==b||p!==0&&se.nodeType!==3||(H=E+p),se.nodeType===3&&(E+=se.nodeValue.length),(te=se.firstChild)!==null;)J=se,se=te;for(;;){if(se===s)break t;if(J===c&&++Q===y&&(T=E),J===b&&++re===p&&(H=E),(te=se.nextSibling)!==null)break;se=J,J=se.parentNode}se=te}c=T===-1||H===-1?null:{start:T,end:H}}else c=null}c=c||{start:0,end:0}}else c=null;for(hy={focusedElem:s,selectionRange:c},cd=!1,vr=o;vr!==null;)if(o=vr,s=o.child,(o.subtreeFlags&1028)!==0&&s!==null)s.return=o,vr=s;else for(;vr!==null;){switch(o=vr,b=o.alternate,s=o.flags,o.tag){case 0:if((s&4)!==0&&(s=o.updateQueue,s=s!==null?s.events:null,s!==null))for(c=0;c<s.length;c++)y=s[c],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&b!==null){s=void 0,c=o,y=b.memoizedProps,b=b.memoizedState,p=c.stateNode;try{var Se=Js(c.type,y);s=p.getSnapshotBeforeUpdate(Se,b),p.__reactInternalSnapshotBeforeUpdate=s}catch(De){ht(c,c.return,De)}}break;case 3:if((s&1024)!==0){if(s=o.stateNode.containerInfo,c=s.nodeType,c===9)py(s);else if(c===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":py(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw Error(n(163))}if(s=o.sibling,s!==null){s.return=o.return,vr=s;break}vr=o.return}}function yA(s,o,c){var p=c.flags;switch(c.tag){case 0:case 11:case 15:ia(s,c),p&4&&tc(5,c);break;case 1:if(ia(s,c),p&4)if(s=c.stateNode,o===null)try{s.componentDidMount()}catch(E){ht(c,c.return,E)}else{var y=Js(c.type,o.memoizedProps);o=o.memoizedState;try{s.componentDidUpdate(y,o,s.__reactInternalSnapshotBeforeUpdate)}catch(E){ht(c,c.return,E)}}p&64&&fA(c),p&512&&rc(c,c.return);break;case 3:if(ia(s,c),p&64&&(s=c.updateQueue,s!==null)){if(o=null,c.child!==null)switch(c.child.tag){case 27:case 5:o=c.child.stateNode;break;case 1:o=c.child.stateNode}try{rE(s,o)}catch(E){ht(c,c.return,E)}}break;case 27:o===null&&p&4&&vA(c);case 26:case 5:ia(s,c),o===null&&p&4&&pA(c),p&512&&rc(c,c.return);break;case 12:ia(s,c);break;case 31:ia(s,c),p&4&&SA(s,c);break;case 13:ia(s,c),p&4&&wA(s,c),p&64&&(s=c.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(c=i4.bind(null,c),C4(s,c))));break;case 22:if(p=c.memoizedState!==null||ra,!p){o=o!==null&&o.memoizedState!==null||er,y=ra;var b=er;ra=p,(er=o)&&!b?aa(s,c,(c.subtreeFlags&8772)!==0):ia(s,c),ra=y,er=b}break;case 30:break;default:ia(s,c)}}function _A(s){var o=s.alternate;o!==null&&(s.alternate=null,_A(o)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(o=s.stateNode,o!==null&&_v(o)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}var Dt=null,on=!1;function na(s,o,c){for(c=c.child;c!==null;)bA(s,o,c),c=c.sibling}function bA(s,o,c){if(sr&&typeof sr.onCommitFiberUnmount=="function")try{sr.onCommitFiberUnmount(Gr,c)}catch{}switch(c.tag){case 26:er||Oi(c,o),na(s,o,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:er||Oi(c,o);var p=Dt,y=on;is(c.type)&&(Dt=c.stateNode,on=!1),na(s,o,c),hc(c.stateNode),Dt=p,on=y;break;case 5:er||Oi(c,o);case 6:if(p=Dt,y=on,Dt=null,na(s,o,c),Dt=p,on=y,Dt!==null)if(on)try{(Dt.nodeType===9?Dt.body:Dt.nodeName==="HTML"?Dt.ownerDocument.body:Dt).removeChild(c.stateNode)}catch(b){ht(c,o,b)}else try{Dt.removeChild(c.stateNode)}catch(b){ht(c,o,b)}break;case 18:Dt!==null&&(on?(s=Dt,fO(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,c.stateNode),Al(s)):fO(Dt,c.stateNode));break;case 4:p=Dt,y=on,Dt=c.stateNode.containerInfo,on=!0,na(s,o,c),Dt=p,on=y;break;case 0:case 11:case 14:case 15:Za(2,c,o),er||Za(4,c,o),na(s,o,c);break;case 1:er||(Oi(c,o),p=c.stateNode,typeof p.componentWillUnmount=="function"&&dA(c,o,p)),na(s,o,c);break;case 21:na(s,o,c);break;case 22:er=(p=er)||c.memoizedState!==null,na(s,o,c),er=p;break;default:na(s,o,c)}}function SA(s,o){if(o.memoizedState===null&&(s=o.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{Al(s)}catch(c){ht(o,o.return,c)}}}function wA(s,o){if(o.memoizedState===null&&(s=o.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{Al(s)}catch(c){ht(o,o.return,c)}}function G6(s){switch(s.tag){case 31:case 13:case 19:var o=s.stateNode;return o===null&&(o=s.stateNode=new gA),o;case 22:return s=s.stateNode,o=s._retryCache,o===null&&(o=s._retryCache=new gA),o;default:throw Error(n(435,s.tag))}}function Kf(s,o){var c=G6(s);o.forEach(function(p){if(!c.has(p)){c.add(p);var y=a4.bind(null,s,p);p.then(y,y)}})}function ln(s,o){var c=o.deletions;if(c!==null)for(var p=0;p<c.length;p++){var y=c[p],b=s,E=o,T=E;e:for(;T!==null;){switch(T.tag){case 27:if(is(T.type)){Dt=T.stateNode,on=!1;break e}break;case 5:Dt=T.stateNode,on=!1;break e;case 3:case 4:Dt=T.stateNode.containerInfo,on=!0;break e}T=T.return}if(Dt===null)throw Error(n(160));bA(b,E,y),Dt=null,on=!1,b=y.alternate,b!==null&&(b.return=null),y.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)xA(o,s),o=o.sibling}var vi=null;function xA(s,o){var c=s.alternate,p=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:ln(o,s),un(s),p&4&&(Za(3,s,s.return),tc(3,s),Za(5,s,s.return));break;case 1:ln(o,s),un(s),p&512&&(er||c===null||Oi(c,c.return)),p&64&&ra&&(s=s.updateQueue,s!==null&&(p=s.callbacks,p!==null&&(c=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=c===null?p:c.concat(p))));break;case 26:var y=vi;if(ln(o,s),un(s),p&512&&(er||c===null||Oi(c,c.return)),p&4){var b=c!==null?c.memoizedState:null;if(p=s.memoizedState,c===null)if(p===null)if(s.stateNode===null){e:{p=s.type,c=s.memoizedProps,y=y.ownerDocument||y;t:switch(p){case"title":b=y.getElementsByTagName("title")[0],(!b||b[Pu]||b[Pr]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=y.createElement(p),y.head.insertBefore(b,y.querySelector("head > title"))),Rr(b,p,c),b[Pr]=s,mr(b),p=b;break e;case"link":var E=xO("link","href",y).get(p+(c.href||""));if(E){for(var T=0;T<E.length;T++)if(b=E[T],b.getAttribute("href")===(c.href==null||c.href===""?null:c.href)&&b.getAttribute("rel")===(c.rel==null?null:c.rel)&&b.getAttribute("title")===(c.title==null?null:c.title)&&b.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){E.splice(T,1);break t}}b=y.createElement(p),Rr(b,p,c),y.head.appendChild(b);break;case"meta":if(E=xO("meta","content",y).get(p+(c.content||""))){for(T=0;T<E.length;T++)if(b=E[T],b.getAttribute("content")===(c.content==null?null:""+c.content)&&b.getAttribute("name")===(c.name==null?null:c.name)&&b.getAttribute("property")===(c.property==null?null:c.property)&&b.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&b.getAttribute("charset")===(c.charSet==null?null:c.charSet)){E.splice(T,1);break t}}b=y.createElement(p),Rr(b,p,c),y.head.appendChild(b);break;default:throw Error(n(468,p))}b[Pr]=s,mr(b),p=b}s.stateNode=p}else CO(y,s.type,s.stateNode);else s.stateNode=wO(y,p,s.memoizedProps);else b!==p?(b===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):b.count--,p===null?CO(y,s.type,s.stateNode):wO(y,p,s.memoizedProps)):p===null&&s.stateNode!==null&&Hg(s,s.memoizedProps,c.memoizedProps)}break;case 27:ln(o,s),un(s),p&512&&(er||c===null||Oi(c,c.return)),c!==null&&p&4&&Hg(s,s.memoizedProps,c.memoizedProps);break;case 5:if(ln(o,s),un(s),p&512&&(er||c===null||Oi(c,c.return)),s.flags&32){y=s.stateNode;try{Xo(y,"")}catch(Se){ht(s,s.return,Se)}}p&4&&s.stateNode!=null&&(y=s.memoizedProps,Hg(s,y,c!==null?c.memoizedProps:y)),p&1024&&($g=!0);break;case 6:if(ln(o,s),un(s),p&4){if(s.stateNode===null)throw Error(n(162));p=s.memoizedProps,c=s.stateNode;try{c.nodeValue=p}catch(Se){ht(s,s.return,Se)}}break;case 3:if(sd=null,y=vi,vi=id(o.containerInfo),ln(o,s),vi=y,un(s),p&4&&c!==null&&c.memoizedState.isDehydrated)try{Al(o.containerInfo)}catch(Se){ht(s,s.return,Se)}$g&&($g=!1,CA(s));break;case 4:p=vi,vi=id(s.stateNode.containerInfo),ln(o,s),un(s),vi=p;break;case 12:ln(o,s),un(s);break;case 31:ln(o,s),un(s),p&4&&(p=s.updateQueue,p!==null&&(s.updateQueue=null,Kf(s,p)));break;case 13:ln(o,s),un(s),s.child.flags&8192&&s.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(Wf=Xr()),p&4&&(p=s.updateQueue,p!==null&&(s.updateQueue=null,Kf(s,p)));break;case 22:y=s.memoizedState!==null;var H=c!==null&&c.memoizedState!==null,Q=ra,re=er;if(ra=Q||y,er=re||H,ln(o,s),er=re,ra=Q,un(s),p&8192)e:for(o=s.stateNode,o._visibility=y?o._visibility&-2:o._visibility|1,y&&(c===null||H||ra||er||eo(s)),c=null,o=s;;){if(o.tag===5||o.tag===26){if(c===null){H=c=o;try{if(b=H.stateNode,y)E=b.style,typeof E.setProperty=="function"?E.setProperty("display","none","important"):E.display="none";else{T=H.stateNode;var se=H.memoizedProps.style,J=se!=null&&se.hasOwnProperty("display")?se.display:null;T.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(Se){ht(H,H.return,Se)}}}else if(o.tag===6){if(c===null){H=o;try{H.stateNode.nodeValue=y?"":H.memoizedProps}catch(Se){ht(H,H.return,Se)}}}else if(o.tag===18){if(c===null){H=o;try{var te=H.stateNode;y?dO(te,!0):dO(H.stateNode,!1)}catch(Se){ht(H,H.return,Se)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===s)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===s)break e;for(;o.sibling===null;){if(o.return===null||o.return===s)break e;c===o&&(c=null),o=o.return}c===o&&(c=null),o.sibling.return=o.return,o=o.sibling}p&4&&(p=s.updateQueue,p!==null&&(c=p.retryQueue,c!==null&&(p.retryQueue=null,Kf(s,c))));break;case 19:ln(o,s),un(s),p&4&&(p=s.updateQueue,p!==null&&(s.updateQueue=null,Kf(s,p)));break;case 30:break;case 21:break;default:ln(o,s),un(s)}}function un(s){var o=s.flags;if(o&2){try{for(var c,p=s.return;p!==null;){if(mA(p)){c=p;break}p=p.return}if(c==null)throw Error(n(160));switch(c.tag){case 27:var y=c.stateNode,b=Fg(s);$f(s,b,y);break;case 5:var E=c.stateNode;c.flags&32&&(Xo(E,""),c.flags&=-33);var T=Fg(s);$f(s,T,E);break;case 3:case 4:var H=c.stateNode.containerInfo,Q=Fg(s);Ug(s,Q,H);break;default:throw Error(n(161))}}catch(re){ht(s,s.return,re)}s.flags&=-3}o&4096&&(s.flags&=-4097)}function CA(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var o=s;CA(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),s=s.sibling}}function ia(s,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)yA(s,o.alternate,o),o=o.sibling}function eo(s){for(s=s.child;s!==null;){var o=s;switch(o.tag){case 0:case 11:case 14:case 15:Za(4,o,o.return),eo(o);break;case 1:Oi(o,o.return);var c=o.stateNode;typeof c.componentWillUnmount=="function"&&dA(o,o.return,c),eo(o);break;case 27:hc(o.stateNode);case 26:case 5:Oi(o,o.return),eo(o);break;case 22:o.memoizedState===null&&eo(o);break;case 30:eo(o);break;default:eo(o)}s=s.sibling}}function aa(s,o,c){for(c=c&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var p=o.alternate,y=s,b=o,E=b.flags;switch(b.tag){case 0:case 11:case 15:aa(y,b,c),tc(4,b);break;case 1:if(aa(y,b,c),p=b,y=p.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(Q){ht(p,p.return,Q)}if(p=b,y=p.updateQueue,y!==null){var T=p.stateNode;try{var H=y.shared.hiddenCallbacks;if(H!==null)for(y.shared.hiddenCallbacks=null,y=0;y<H.length;y++)tE(H[y],T)}catch(Q){ht(p,p.return,Q)}}c&&E&64&&fA(b),rc(b,b.return);break;case 27:vA(b);case 26:case 5:aa(y,b,c),c&&p===null&&E&4&&pA(b),rc(b,b.return);break;case 12:aa(y,b,c);break;case 31:aa(y,b,c),c&&E&4&&SA(y,b);break;case 13:aa(y,b,c),c&&E&4&&wA(y,b);break;case 22:b.memoizedState===null&&aa(y,b,c),rc(b,b.return);break;case 30:break;default:aa(y,b,c)}o=o.sibling}}function Kg(s,o){var c=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),s=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(s=o.memoizedState.cachePool.pool),s!==c&&(s!=null&&s.refCount++,c!=null&&Uu(c))}function qg(s,o){s=null,o.alternate!==null&&(s=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==s&&(o.refCount++,s!=null&&Uu(s))}function gi(s,o,c,p){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)EA(s,o,c,p),o=o.sibling}function EA(s,o,c,p){var y=o.flags;switch(o.tag){case 0:case 11:case 15:gi(s,o,c,p),y&2048&&tc(9,o);break;case 1:gi(s,o,c,p);break;case 3:gi(s,o,c,p),y&2048&&(s=null,o.alternate!==null&&(s=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==s&&(o.refCount++,s!=null&&Uu(s)));break;case 12:if(y&2048){gi(s,o,c,p),s=o.stateNode;try{var b=o.memoizedProps,E=b.id,T=b.onPostCommit;typeof T=="function"&&T(E,o.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(H){ht(o,o.return,H)}}else gi(s,o,c,p);break;case 31:gi(s,o,c,p);break;case 13:gi(s,o,c,p);break;case 23:break;case 22:b=o.stateNode,E=o.alternate,o.memoizedState!==null?b._visibility&2?gi(s,o,c,p):nc(s,o):b._visibility&2?gi(s,o,c,p):(b._visibility|=2,ml(s,o,c,p,(o.subtreeFlags&10256)!==0||!1)),y&2048&&Kg(E,o);break;case 24:gi(s,o,c,p),y&2048&&qg(o.alternate,o);break;default:gi(s,o,c,p)}}function ml(s,o,c,p,y){for(y=y&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var b=s,E=o,T=c,H=p,Q=E.flags;switch(E.tag){case 0:case 11:case 15:ml(b,E,T,H,y),tc(8,E);break;case 23:break;case 22:var re=E.stateNode;E.memoizedState!==null?re._visibility&2?ml(b,E,T,H,y):nc(b,E):(re._visibility|=2,ml(b,E,T,H,y)),y&&Q&2048&&Kg(E.alternate,E);break;case 24:ml(b,E,T,H,y),y&&Q&2048&&qg(E.alternate,E);break;default:ml(b,E,T,H,y)}o=o.sibling}}function nc(s,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var c=s,p=o,y=p.flags;switch(p.tag){case 22:nc(c,p),y&2048&&Kg(p.alternate,p);break;case 24:nc(c,p),y&2048&&qg(p.alternate,p);break;default:nc(c,p)}o=o.sibling}}var ic=8192;function vl(s,o,c){if(s.subtreeFlags&ic)for(s=s.child;s!==null;)AA(s,o,c),s=s.sibling}function AA(s,o,c){switch(s.tag){case 26:vl(s,o,c),s.flags&ic&&s.memoizedState!==null&&N4(c,vi,s.memoizedState,s.memoizedProps);break;case 5:vl(s,o,c);break;case 3:case 4:var p=vi;vi=id(s.stateNode.containerInfo),vl(s,o,c),vi=p;break;case 22:s.memoizedState===null&&(p=s.alternate,p!==null&&p.memoizedState!==null?(p=ic,ic=16777216,vl(s,o,c),ic=p):vl(s,o,c));break;default:vl(s,o,c)}}function OA(s){var o=s.alternate;if(o!==null&&(s=o.child,s!==null)){o.child=null;do o=s.sibling,s.sibling=null,s=o;while(s!==null)}}function ac(s){var o=s.deletions;if((s.flags&16)!==0){if(o!==null)for(var c=0;c<o.length;c++){var p=o[c];vr=p,PA(p,s)}OA(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)kA(s),s=s.sibling}function kA(s){switch(s.tag){case 0:case 11:case 15:ac(s),s.flags&2048&&Za(9,s,s.return);break;case 3:ac(s);break;case 12:ac(s);break;case 22:var o=s.stateNode;s.memoizedState!==null&&o._visibility&2&&(s.return===null||s.return.tag!==13)?(o._visibility&=-3,qf(s)):ac(s);break;default:ac(s)}}function qf(s){var o=s.deletions;if((s.flags&16)!==0){if(o!==null)for(var c=0;c<o.length;c++){var p=o[c];vr=p,PA(p,s)}OA(s)}for(s=s.child;s!==null;){switch(o=s,o.tag){case 0:case 11:case 15:Za(8,o,o.return),qf(o);break;case 22:c=o.stateNode,c._visibility&2&&(c._visibility&=-3,qf(o));break;default:qf(o)}s=s.sibling}}function PA(s,o){for(;vr!==null;){var c=vr;switch(c.tag){case 0:case 11:case 15:Za(8,c,o);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var p=c.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:Uu(c.memoizedState.cache)}if(p=c.child,p!==null)p.return=c,vr=p;else e:for(c=s;vr!==null;){p=vr;var y=p.sibling,b=p.return;if(_A(p),p===c){vr=null;break e}if(y!==null){y.return=b,vr=y;break e}vr=b}}}var Z6={getCacheForType:function(s){var o=Dr(Zt),c=o.data.get(s);return c===void 0&&(c=s(),o.data.set(s,c)),c},cacheSignal:function(){return Dr(Zt).controller.signal}},Q6=typeof WeakMap=="function"?WeakMap:Map,ot=0,bt=null,Xe=null,Ze=0,ct=0,Cn=null,Qa=!1,gl=!1,Wg=!1,sa=0,Ht=0,Ja=0,to=0,Vg=0,En=0,yl=0,sc=null,cn=null,Yg=!1,Wf=0,TA=0,Vf=1/0,Yf=null,es=null,or=0,ts=null,_l=null,oa=0,Xg=0,Gg=null,DA=null,oc=0,Zg=null;function An(){return(ot&2)!==0&&Ze!==0?Ze&-Ze:B.T!==null?ny():Vx()}function MA(){if(En===0)if((Ze&536870912)===0||et){var s=tf;tf<<=1,(tf&3932160)===0&&(tf=262144),En=s}else En=536870912;return s=wn.current,s!==null&&(s.flags|=32),En}function hn(s,o,c){(s===bt&&(ct===2||ct===9)||s.cancelPendingCommit!==null)&&(bl(s,0),rs(s,Ze,En,!1)),ku(s,c),((ot&2)===0||s!==bt)&&(s===bt&&((ot&2)===0&&(to|=c),Ht===4&&rs(s,Ze,En,!1)),ki(s))}function RA(s,o,c){if((ot&6)!==0)throw Error(n(327));var p=!c&&(o&127)===0&&(o&s.expiredLanes)===0||Ou(s,o),y=p?t4(s,o):Jg(s,o,!0),b=p;do{if(y===0){gl&&!p&&rs(s,o,0,!1);break}else{if(c=s.current.alternate,b&&!J6(c)){y=Jg(s,o,!1),b=!1;continue}if(y===2){if(b=o,s.errorRecoveryDisabledLanes&b)var E=0;else E=s.pendingLanes&-536870913,E=E!==0?E:E&536870912?536870912:0;if(E!==0){o=E;e:{var T=s;y=sc;var H=T.current.memoizedState.isDehydrated;if(H&&(bl(T,E).flags|=256),E=Jg(T,E,!1),E!==2){if(Wg&&!H){T.errorRecoveryDisabledLanes|=b,to|=b,y=4;break e}b=cn,cn=y,b!==null&&(cn===null?cn=b:cn.push.apply(cn,b))}y=E}if(b=!1,y!==2)continue}}if(y===1){bl(s,0),rs(s,o,0,!0);break}e:{switch(p=s,b=y,b){case 0:case 1:throw Error(n(345));case 4:if((o&4194048)!==o)break;case 6:rs(p,o,En,!Qa);break e;case 2:cn=null;break;case 3:case 5:break;default:throw Error(n(329))}if((o&62914560)===o&&(y=Wf+300-Xr(),10<y)){if(rs(p,o,En,!Qa),nf(p,0,!0)!==0)break e;oa=o,p.timeoutHandle=cO(LA.bind(null,p,c,cn,Yf,Yg,o,En,to,yl,Qa,b,"Throttled",-0,0),y);break e}LA(p,c,cn,Yf,Yg,o,En,to,yl,Qa,b,null,-0,0)}}break}while(!0);ki(s)}function LA(s,o,c,p,y,b,E,T,H,Q,re,se,J,te){if(s.timeoutHandle=-1,se=o.subtreeFlags,se&8192||(se&16785408)===16785408){se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Wi},AA(o,b,se);var Se=(b&62914560)===b?Wf-Xr():(b&4194048)===b?TA-Xr():0;if(Se=I4(se,Se),Se!==null){oa=b,s.cancelPendingCommit=Se(UA.bind(null,s,o,b,c,p,y,E,T,H,re,se,null,J,te)),rs(s,b,E,!Q);return}}UA(s,o,b,c,p,y,E,T,H)}function J6(s){for(var o=s;;){var c=o.tag;if((c===0||c===11||c===15)&&o.flags&16384&&(c=o.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var p=0;p<c.length;p++){var y=c[p],b=y.getSnapshot;y=y.value;try{if(!bn(b(),y))return!1}catch{return!1}}if(c=o.child,o.subtreeFlags&16384&&c!==null)c.return=o,o=c;else{if(o===s)break;for(;o.sibling===null;){if(o.return===null||o.return===s)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function rs(s,o,c,p){o&=~Vg,o&=~to,s.suspendedLanes|=o,s.pingedLanes&=~o,p&&(s.warmLanes|=o),p=s.expirationTimes;for(var y=o;0<y;){var b=31-_t(y),E=1<<b;p[b]=-1,y&=~E}c!==0&&Kx(s,c,o)}function Xf(){return(ot&6)===0?(lc(0),!1):!0}function Qg(){if(Xe!==null){if(ct===0)var s=Xe.return;else s=Xe,Gi=Ws=null,pg(s),cl=null,Ku=0,s=Xe;for(;s!==null;)hA(s.alternate,s),s=s.return;Xe=null}}function bl(s,o){var c=s.timeoutHandle;c!==-1&&(s.timeoutHandle=-1,_4(c)),c=s.cancelPendingCommit,c!==null&&(s.cancelPendingCommit=null,c()),oa=0,Qg(),bt=s,Xe=c=Yi(s.current,null),Ze=o,ct=0,Cn=null,Qa=!1,gl=Ou(s,o),Wg=!1,yl=En=Vg=to=Ja=Ht=0,cn=sc=null,Yg=!1,(o&8)!==0&&(o|=o&32);var p=s.entangledLanes;if(p!==0)for(s=s.entanglements,p&=o;0<p;){var y=31-_t(p),b=1<<y;o|=s[y],p&=~b}return sa=o,vf(),c}function BA(s,o){Ie=null,B.H=Qu,o===ul||o===Cf?(o=ZC(),ct=3):o===rg?(o=ZC(),ct=4):ct=o===Tg?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,Cn=o,Xe===null&&(Ht=1,jf(s,Un(o,s.current)))}function NA(){var s=wn.current;return s===null?!0:(Ze&4194048)===Ze?Wn===null:(Ze&62914560)===Ze||(Ze&536870912)!==0?s===Wn:!1}function IA(){var s=B.H;return B.H=Qu,s===null?Qu:s}function jA(){var s=B.A;return B.A=Z6,s}function Gf(){Ht=4,Qa||(Ze&4194048)!==Ze&&wn.current!==null||(gl=!0),(Ja&134217727)===0&&(to&134217727)===0||bt===null||rs(bt,Ze,En,!1)}function Jg(s,o,c){var p=ot;ot|=2;var y=IA(),b=jA();(bt!==s||Ze!==o)&&(Yf=null,bl(s,o)),o=!1;var E=Ht;e:do try{if(ct!==0&&Xe!==null){var T=Xe,H=Cn;switch(ct){case 8:Qg(),E=6;break e;case 3:case 2:case 9:case 6:wn.current===null&&(o=!0);var Q=ct;if(ct=0,Cn=null,Sl(s,T,H,Q),c&&gl){E=0;break e}break;default:Q=ct,ct=0,Cn=null,Sl(s,T,H,Q)}}e4(),E=Ht;break}catch(re){BA(s,re)}while(!0);return o&&s.shellSuspendCounter++,Gi=Ws=null,ot=p,B.H=y,B.A=b,Xe===null&&(bt=null,Ze=0,vf()),E}function e4(){for(;Xe!==null;)zA(Xe)}function t4(s,o){var c=ot;ot|=2;var p=IA(),y=jA();bt!==s||Ze!==o?(Yf=null,Vf=Xr()+500,bl(s,o)):gl=Ou(s,o);e:do try{if(ct!==0&&Xe!==null){o=Xe;var b=Cn;t:switch(ct){case 1:ct=0,Cn=null,Sl(s,o,b,1);break;case 2:case 9:if(XC(b)){ct=0,Cn=null,HA(o);break}o=function(){ct!==2&&ct!==9||bt!==s||(ct=7),ki(s)},b.then(o,o);break e;case 3:ct=7;break e;case 4:ct=5;break e;case 7:XC(b)?(ct=0,Cn=null,HA(o)):(ct=0,Cn=null,Sl(s,o,b,7));break;case 5:var E=null;switch(Xe.tag){case 26:E=Xe.memoizedState;case 5:case 27:var T=Xe;if(E?EO(E):T.stateNode.complete){ct=0,Cn=null;var H=T.sibling;if(H!==null)Xe=H;else{var Q=T.return;Q!==null?(Xe=Q,Zf(Q)):Xe=null}break t}}ct=0,Cn=null,Sl(s,o,b,5);break;case 6:ct=0,Cn=null,Sl(s,o,b,6);break;case 8:Qg(),Ht=6;break e;default:throw Error(n(462))}}r4();break}catch(re){BA(s,re)}while(!0);return Gi=Ws=null,B.H=p,B.A=y,ot=c,Xe!==null?0:(bt=null,Ze=0,vf(),Ht)}function r4(){for(;Xe!==null&&!fv();)zA(Xe)}function zA(s){var o=uA(s.alternate,s,sa);s.memoizedProps=s.pendingProps,o===null?Zf(s):Xe=o}function HA(s){var o=s,c=o.alternate;switch(o.tag){case 15:case 0:o=nA(c,o,o.pendingProps,o.type,void 0,Ze);break;case 11:o=nA(c,o,o.pendingProps,o.type.render,o.ref,Ze);break;case 5:pg(o);default:hA(c,o),o=Xe=jC(o,sa),o=uA(c,o,sa)}s.memoizedProps=s.pendingProps,o===null?Zf(s):Xe=o}function Sl(s,o,c,p){Gi=Ws=null,pg(o),cl=null,Ku=0;var y=o.return;try{if(K6(s,y,o,c,Ze)){Ht=1,jf(s,Un(c,s.current)),Xe=null;return}}catch(b){if(y!==null)throw Xe=y,b;Ht=1,jf(s,Un(c,s.current)),Xe=null;return}o.flags&32768?(et||p===1?s=!0:gl||(Ze&536870912)!==0?s=!1:(Qa=s=!0,(p===2||p===9||p===3||p===6)&&(p=wn.current,p!==null&&p.tag===13&&(p.flags|=16384))),FA(o,s)):Zf(o)}function Zf(s){var o=s;do{if((o.flags&32768)!==0){FA(o,Qa);return}s=o.return;var c=V6(o.alternate,o,sa);if(c!==null){Xe=c;return}if(o=o.sibling,o!==null){Xe=o;return}Xe=o=s}while(o!==null);Ht===0&&(Ht=5)}function FA(s,o){do{var c=Y6(s.alternate,s);if(c!==null){c.flags&=32767,Xe=c;return}if(c=s.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!o&&(s=s.sibling,s!==null)){Xe=s;return}Xe=s=c}while(s!==null);Ht=6,Xe=null}function UA(s,o,c,p,y,b,E,T,H){s.cancelPendingCommit=null;do Qf();while(or!==0);if((ot&6)!==0)throw Error(n(327));if(o!==null){if(o===s.current)throw Error(n(177));if(b=o.lanes|o.childLanes,b|=Fv,B5(s,c,b,E,T,H),s===bt&&(Xe=bt=null,Ze=0),_l=o,ts=s,oa=c,Xg=b,Gg=y,DA=p,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,s4(Re,function(){return VA(),null})):(s.callbackNode=null,s.callbackPriority=0),p=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||p){p=B.T,B.T=null,y=q.p,q.p=2,E=ot,ot|=4;try{X6(s,o,c)}finally{ot=E,q.p=y,B.T=p}}or=1,$A(),KA(),qA()}}function $A(){if(or===1){or=0;var s=ts,o=_l,c=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||c){c=B.T,B.T=null;var p=q.p;q.p=2;var y=ot;ot|=4;try{xA(o,s);var b=hy,E=PC(s.containerInfo),T=b.focusedElem,H=b.selectionRange;if(E!==T&&T&&T.ownerDocument&&kC(T.ownerDocument.documentElement,T)){if(H!==null&&Nv(T)){var Q=H.start,re=H.end;if(re===void 0&&(re=Q),"selectionStart"in T)T.selectionStart=Q,T.selectionEnd=Math.min(re,T.value.length);else{var se=T.ownerDocument||document,J=se&&se.defaultView||window;if(J.getSelection){var te=J.getSelection(),Se=T.textContent.length,De=Math.min(H.start,Se),vt=H.end===void 0?De:Math.min(H.end,Se);!te.extend&&De>vt&&(E=vt,vt=De,De=E);var V=OC(T,De),U=OC(T,vt);if(V&&U&&(te.rangeCount!==1||te.anchorNode!==V.node||te.anchorOffset!==V.offset||te.focusNode!==U.node||te.focusOffset!==U.offset)){var Z=se.createRange();Z.setStart(V.node,V.offset),te.removeAllRanges(),De>vt?(te.addRange(Z),te.extend(U.node,U.offset)):(Z.setEnd(U.node,U.offset),te.addRange(Z))}}}}for(se=[],te=T;te=te.parentNode;)te.nodeType===1&&se.push({element:te,left:te.scrollLeft,top:te.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<se.length;T++){var ae=se[T];ae.element.scrollLeft=ae.left,ae.element.scrollTop=ae.top}}cd=!!cy,hy=cy=null}finally{ot=y,q.p=p,B.T=c}}s.current=o,or=2}}function KA(){if(or===2){or=0;var s=ts,o=_l,c=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||c){c=B.T,B.T=null;var p=q.p;q.p=2;var y=ot;ot|=4;try{yA(s,o.alternate,o)}finally{ot=y,q.p=p,B.T=c}}or=3}}function qA(){if(or===4||or===3){or=0,dv();var s=ts,o=_l,c=oa,p=DA;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?or=5:(or=0,_l=ts=null,WA(s,s.pendingLanes));var y=s.pendingLanes;if(y===0&&(es=null),gv(c),o=o.stateNode,sr&&typeof sr.onCommitFiberRoot=="function")try{sr.onCommitFiberRoot(Gr,o,void 0,(o.current.flags&128)===128)}catch{}if(p!==null){o=B.T,y=q.p,q.p=2,B.T=null;try{for(var b=s.onRecoverableError,E=0;E<p.length;E++){var T=p[E];b(T.value,{componentStack:T.stack})}}finally{B.T=o,q.p=y}}(oa&3)!==0&&Qf(),ki(s),y=s.pendingLanes,(c&261930)!==0&&(y&42)!==0?s===Zg?oc++:(oc=0,Zg=s):oc=0,lc(0)}}function WA(s,o){(s.pooledCacheLanes&=o)===0&&(o=s.pooledCache,o!=null&&(s.pooledCache=null,Uu(o)))}function Qf(){return $A(),KA(),qA(),VA()}function VA(){if(or!==5)return!1;var s=ts,o=Xg;Xg=0;var c=gv(oa),p=B.T,y=q.p;try{q.p=32>c?32:c,B.T=null,c=Gg,Gg=null;var b=ts,E=oa;if(or=0,_l=ts=null,oa=0,(ot&6)!==0)throw Error(n(331));var T=ot;if(ot|=4,kA(b.current),EA(b,b.current,E,c),ot=T,lc(0,!1),sr&&typeof sr.onPostCommitFiberRoot=="function")try{sr.onPostCommitFiberRoot(Gr,b)}catch{}return!0}finally{q.p=y,B.T=p,WA(s,o)}}function YA(s,o,c){o=Un(c,o),o=Pg(s.stateNode,o,2),s=Ya(s,o,2),s!==null&&(ku(s,2),ki(s))}function ht(s,o,c){if(s.tag===3)YA(s,s,c);else for(;o!==null;){if(o.tag===3){YA(o,s,c);break}else if(o.tag===1){var p=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(es===null||!es.has(p))){s=Un(c,s),c=XE(2),p=Ya(o,c,2),p!==null&&(GE(c,p,o,s),ku(p,2),ki(p));break}}o=o.return}}function ey(s,o,c){var p=s.pingCache;if(p===null){p=s.pingCache=new Q6;var y=new Set;p.set(o,y)}else y=p.get(o),y===void 0&&(y=new Set,p.set(o,y));y.has(c)||(Wg=!0,y.add(c),s=n4.bind(null,s,o,c),o.then(s,s))}function n4(s,o,c){var p=s.pingCache;p!==null&&p.delete(o),s.pingedLanes|=s.suspendedLanes&c,s.warmLanes&=~c,bt===s&&(Ze&c)===c&&(Ht===4||Ht===3&&(Ze&62914560)===Ze&&300>Xr()-Wf?(ot&2)===0&&bl(s,0):Vg|=c,yl===Ze&&(yl=0)),ki(s)}function XA(s,o){o===0&&(o=$x()),s=$s(s,o),s!==null&&(ku(s,o),ki(s))}function i4(s){var o=s.memoizedState,c=0;o!==null&&(c=o.retryLane),XA(s,c)}function a4(s,o){var c=0;switch(s.tag){case 31:case 13:var p=s.stateNode,y=s.memoizedState;y!==null&&(c=y.retryLane);break;case 19:p=s.stateNode;break;case 22:p=s.stateNode._retryCache;break;default:throw Error(n(314))}p!==null&&p.delete(o),XA(s,c)}function s4(s,o){return Uo(s,o)}var Jf=null,wl=null,ty=!1,ed=!1,ry=!1,ns=0;function ki(s){s!==wl&&s.next===null&&(wl===null?Jf=wl=s:wl=wl.next=s),ed=!0,ty||(ty=!0,l4())}function lc(s,o){if(!ry&&ed){ry=!0;do for(var c=!1,p=Jf;p!==null;){if(s!==0){var y=p.pendingLanes;if(y===0)var b=0;else{var E=p.suspendedLanes,T=p.pingedLanes;b=(1<<31-_t(42|s)+1)-1,b&=y&~(E&~T),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(c=!0,JA(p,b))}else b=Ze,b=nf(p,p===bt?b:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(b&3)===0||Ou(p,b)||(c=!0,JA(p,b));p=p.next}while(c);ry=!1}}function o4(){GA()}function GA(){ed=ty=!1;var s=0;ns!==0&&y4()&&(s=ns);for(var o=Xr(),c=null,p=Jf;p!==null;){var y=p.next,b=ZA(p,o);b===0?(p.next=null,c===null?Jf=y:c.next=y,y===null&&(wl=c)):(c=p,(s!==0||(b&3)!==0)&&(ed=!0)),p=y}or!==0&&or!==5||lc(s),ns!==0&&(ns=0)}function ZA(s,o){for(var c=s.suspendedLanes,p=s.pingedLanes,y=s.expirationTimes,b=s.pendingLanes&-62914561;0<b;){var E=31-_t(b),T=1<<E,H=y[E];H===-1?((T&c)===0||(T&p)!==0)&&(y[E]=L5(T,o)):H<=o&&(s.expiredLanes|=T),b&=~T}if(o=bt,c=Ze,c=nf(s,s===o?c:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),p=s.callbackNode,c===0||s===o&&(ct===2||ct===9)||s.cancelPendingCommit!==null)return p!==null&&p!==null&&Au(p),s.callbackNode=null,s.callbackPriority=0;if((c&3)===0||Ou(s,c)){if(o=c&-c,o===s.callbackPriority)return o;switch(p!==null&&Au(p),gv(c)){case 2:case 8:c=ve;break;case 32:c=Re;break;case 268435456:c=ut;break;default:c=Re}return p=QA.bind(null,s),c=Uo(c,p),s.callbackPriority=o,s.callbackNode=c,o}return p!==null&&p!==null&&Au(p),s.callbackPriority=2,s.callbackNode=null,2}function QA(s,o){if(or!==0&&or!==5)return s.callbackNode=null,s.callbackPriority=0,null;var c=s.callbackNode;if(Qf()&&s.callbackNode!==c)return null;var p=Ze;return p=nf(s,s===bt?p:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),p===0?null:(RA(s,p,o),ZA(s,Xr()),s.callbackNode!=null&&s.callbackNode===c?QA.bind(null,s):null)}function JA(s,o){if(Qf())return null;RA(s,o,!0)}function l4(){b4(function(){(ot&6)!==0?Uo(ne,o4):GA()})}function ny(){if(ns===0){var s=ol;s===0&&(s=ef,ef<<=1,(ef&261888)===0&&(ef=256)),ns=s}return ns}function eO(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:lf(""+s)}function tO(s,o){var c=o.ownerDocument.createElement("input");return c.name=o.name,c.value=o.value,s.id&&c.setAttribute("form",s.id),o.parentNode.insertBefore(c,o),s=new FormData(s),c.parentNode.removeChild(c),s}function u4(s,o,c,p,y){if(o==="submit"&&c&&c.stateNode===y){var b=eO((y[an]||null).action),E=p.submitter;E&&(o=(o=E[an]||null)?eO(o.formAction):E.getAttribute("formAction"),o!==null&&(b=o,E=null));var T=new ff("action","action",null,p,y);s.push({event:T,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(ns!==0){var H=E?tO(y,E):new FormData(y);xg(c,{pending:!0,data:H,method:y.method,action:b},null,H)}}else typeof b=="function"&&(T.preventDefault(),H=E?tO(y,E):new FormData(y),xg(c,{pending:!0,data:H,method:y.method,action:b},b,H))},currentTarget:y}]})}}for(var iy=0;iy<Hv.length;iy++){var ay=Hv[iy],c4=ay.toLowerCase(),h4=ay[0].toUpperCase()+ay.slice(1);mi(c4,"on"+h4)}mi(MC,"onAnimationEnd"),mi(RC,"onAnimationIteration"),mi(LC,"onAnimationStart"),mi("dblclick","onDoubleClick"),mi("focusin","onFocus"),mi("focusout","onBlur"),mi(O6,"onTransitionRun"),mi(k6,"onTransitionStart"),mi(P6,"onTransitionCancel"),mi(BC,"onTransitionEnd"),Vo("onMouseEnter",["mouseout","mouseover"]),Vo("onMouseLeave",["mouseout","mouseover"]),Vo("onPointerEnter",["pointerout","pointerover"]),Vo("onPointerLeave",["pointerout","pointerover"]),zs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),zs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),zs("onBeforeInput",["compositionend","keypress","textInput","paste"]),zs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),zs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),zs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var uc="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(" "),f4=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(uc));function rO(s,o){o=(o&4)!==0;for(var c=0;c<s.length;c++){var p=s[c],y=p.event;p=p.listeners;e:{var b=void 0;if(o)for(var E=p.length-1;0<=E;E--){var T=p[E],H=T.instance,Q=T.currentTarget;if(T=T.listener,H!==b&&y.isPropagationStopped())break e;b=T,y.currentTarget=Q;try{b(y)}catch(re){mf(re)}y.currentTarget=null,b=H}else for(E=0;E<p.length;E++){if(T=p[E],H=T.instance,Q=T.currentTarget,T=T.listener,H!==b&&y.isPropagationStopped())break e;b=T,y.currentTarget=Q;try{b(y)}catch(re){mf(re)}y.currentTarget=null,b=H}}}}function Ge(s,o){var c=o[yv];c===void 0&&(c=o[yv]=new Set);var p=s+"__bubble";c.has(p)||(nO(o,s,2,!1),c.add(p))}function sy(s,o,c){var p=0;o&&(p|=4),nO(c,s,p,o)}var td="_reactListening"+Math.random().toString(36).slice(2);function oy(s){if(!s[td]){s[td]=!0,Gx.forEach(function(c){c!=="selectionchange"&&(f4.has(c)||sy(c,!1,s),sy(c,!0,s))});var o=s.nodeType===9?s:s.ownerDocument;o===null||o[td]||(o[td]=!0,sy("selectionchange",!1,o))}}function nO(s,o,c,p){switch(MO(o)){case 2:var y=H4;break;case 8:y=F4;break;default:y=wy}c=y.bind(null,o,c,s),y=void 0,!Ov||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(y=!0),p?y!==void 0?s.addEventListener(o,c,{capture:!0,passive:y}):s.addEventListener(o,c,!0):y!==void 0?s.addEventListener(o,c,{passive:y}):s.addEventListener(o,c,!1)}function ly(s,o,c,p,y){var b=p;if((o&1)===0&&(o&2)===0&&p!==null)e:for(;;){if(p===null)return;var E=p.tag;if(E===3||E===4){var T=p.stateNode.containerInfo;if(T===y)break;if(E===4)for(E=p.return;E!==null;){var H=E.tag;if((H===3||H===4)&&E.stateNode.containerInfo===y)return;E=E.return}for(;T!==null;){if(E=Ko(T),E===null)return;if(H=E.tag,H===5||H===6||H===26||H===27){p=b=E;continue e}T=T.parentNode}}p=p.return}lC(function(){var Q=b,re=Ev(c),se=[];e:{var J=NC.get(s);if(J!==void 0){var te=ff,Se=s;switch(s){case"keypress":if(cf(c)===0)break e;case"keydown":case"keyup":te=a6;break;case"focusin":Se="focus",te=Dv;break;case"focusout":Se="blur",te=Dv;break;case"beforeblur":case"afterblur":te=Dv;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":te=hC;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=V5;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=l6;break;case MC:case RC:case LC:te=G5;break;case BC:te=c6;break;case"scroll":case"scrollend":te=q5;break;case"wheel":te=f6;break;case"copy":case"cut":case"paste":te=Q5;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=dC;break;case"toggle":case"beforetoggle":te=p6}var De=(o&4)!==0,vt=!De&&(s==="scroll"||s==="scrollend"),V=De?J!==null?J+"Capture":null:J;De=[];for(var U=Q,Z;U!==null;){var ae=U;if(Z=ae.stateNode,ae=ae.tag,ae!==5&&ae!==26&&ae!==27||Z===null||V===null||(ae=Du(U,V),ae!=null&&De.push(cc(U,ae,Z))),vt)break;U=U.return}0<De.length&&(J=new te(J,Se,null,c,re),se.push({event:J,listeners:De}))}}if((o&7)===0){e:{if(J=s==="mouseover"||s==="pointerover",te=s==="mouseout"||s==="pointerout",J&&c!==Cv&&(Se=c.relatedTarget||c.fromElement)&&(Ko(Se)||Se[$o]))break e;if((te||J)&&(J=re.window===re?re:(J=re.ownerDocument)?J.defaultView||J.parentWindow:window,te?(Se=c.relatedTarget||c.toElement,te=Q,Se=Se?Ko(Se):null,Se!==null&&(vt=a(Se),De=Se.tag,Se!==vt||De!==5&&De!==27&&De!==6)&&(Se=null)):(te=null,Se=Q),te!==Se)){if(De=hC,ae="onMouseLeave",V="onMouseEnter",U="mouse",(s==="pointerout"||s==="pointerover")&&(De=dC,ae="onPointerLeave",V="onPointerEnter",U="pointer"),vt=te==null?J:Tu(te),Z=Se==null?J:Tu(Se),J=new De(ae,U+"leave",te,c,re),J.target=vt,J.relatedTarget=Z,ae=null,Ko(re)===Q&&(De=new De(V,U+"enter",Se,c,re),De.target=Z,De.relatedTarget=vt,ae=De),vt=ae,te&&Se)t:{for(De=d4,V=te,U=Se,Z=0,ae=V;ae;ae=De(ae))Z++;ae=0;for(var Ae=U;Ae;Ae=De(Ae))ae++;for(;0<Z-ae;)V=De(V),Z--;for(;0<ae-Z;)U=De(U),ae--;for(;Z--;){if(V===U||U!==null&&V===U.alternate){De=V;break t}V=De(V),U=De(U)}De=null}else De=null;te!==null&&iO(se,J,te,De,!1),Se!==null&&vt!==null&&iO(se,vt,Se,De,!0)}}e:{if(J=Q?Tu(Q):window,te=J.nodeName&&J.nodeName.toLowerCase(),te==="select"||te==="input"&&J.type==="file")var nt=SC;else if(_C(J))if(wC)nt=C6;else{nt=w6;var Ce=S6}else te=J.nodeName,!te||te.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?Q&&xv(Q.elementType)&&(nt=SC):nt=x6;if(nt&&(nt=nt(s,Q))){bC(se,nt,c,re);break e}Ce&&Ce(s,J,Q),s==="focusout"&&Q&&J.type==="number"&&Q.memoizedProps.value!=null&&wv(J,"number",J.value)}switch(Ce=Q?Tu(Q):window,s){case"focusin":(_C(Ce)||Ce.contentEditable==="true")&&(Jo=Ce,Iv=Q,zu=null);break;case"focusout":zu=Iv=Jo=null;break;case"mousedown":jv=!0;break;case"contextmenu":case"mouseup":case"dragend":jv=!1,TC(se,c,re);break;case"selectionchange":if(A6)break;case"keydown":case"keyup":TC(se,c,re)}var ze;if(Rv)e:{switch(s){case"compositionstart":var Qe="onCompositionStart";break e;case"compositionend":Qe="onCompositionEnd";break e;case"compositionupdate":Qe="onCompositionUpdate";break e}Qe=void 0}else Qo?gC(s,c)&&(Qe="onCompositionEnd"):s==="keydown"&&c.keyCode===229&&(Qe="onCompositionStart");Qe&&(pC&&c.locale!=="ko"&&(Qo||Qe!=="onCompositionStart"?Qe==="onCompositionEnd"&&Qo&&(ze=uC()):(Fa=re,kv="value"in Fa?Fa.value:Fa.textContent,Qo=!0)),Ce=rd(Q,Qe),0<Ce.length&&(Qe=new fC(Qe,s,null,c,re),se.push({event:Qe,listeners:Ce}),ze?Qe.data=ze:(ze=yC(c),ze!==null&&(Qe.data=ze)))),(ze=v6?g6(s,c):y6(s,c))&&(Qe=rd(Q,"onBeforeInput"),0<Qe.length&&(Ce=new fC("onBeforeInput","beforeinput",null,c,re),se.push({event:Ce,listeners:Qe}),Ce.data=ze)),u4(se,s,Q,c,re)}rO(se,o)})}function cc(s,o,c){return{instance:s,listener:o,currentTarget:c}}function rd(s,o){for(var c=o+"Capture",p=[];s!==null;){var y=s,b=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||b===null||(y=Du(s,c),y!=null&&p.unshift(cc(s,y,b)),y=Du(s,o),y!=null&&p.push(cc(s,y,b))),s.tag===3)return p;s=s.return}return[]}function d4(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function iO(s,o,c,p,y){for(var b=o._reactName,E=[];c!==null&&c!==p;){var T=c,H=T.alternate,Q=T.stateNode;if(T=T.tag,H!==null&&H===p)break;T!==5&&T!==26&&T!==27||Q===null||(H=Q,y?(Q=Du(c,b),Q!=null&&E.unshift(cc(c,Q,H))):y||(Q=Du(c,b),Q!=null&&E.push(cc(c,Q,H)))),c=c.return}E.length!==0&&s.push({event:o,listeners:E})}var p4=/\r\n?/g,m4=/\u0000|\uFFFD/g;function aO(s){return(typeof s=="string"?s:""+s).replace(p4,`
`).replace(m4,"")}function sO(s,o){return o=aO(o),aO(s)===o}function mt(s,o,c,p,y,b){switch(c){case"children":typeof p=="string"?o==="body"||o==="textarea"&&p===""||Xo(s,p):(typeof p=="number"||typeof p=="bigint")&&o!=="body"&&Xo(s,""+p);break;case"className":sf(s,"class",p);break;case"tabIndex":sf(s,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":sf(s,c,p);break;case"style":sC(s,p,b);break;case"data":if(o!=="object"){sf(s,"data",p);break}case"src":case"href":if(p===""&&(o!=="a"||c!=="href")){s.removeAttribute(c);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){s.removeAttribute(c);break}p=lf(""+p),s.setAttribute(c,p);break;case"action":case"formAction":if(typeof p=="function"){s.setAttribute(c,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(c==="formAction"?(o!=="input"&&mt(s,o,"name",y.name,y,null),mt(s,o,"formEncType",y.formEncType,y,null),mt(s,o,"formMethod",y.formMethod,y,null),mt(s,o,"formTarget",y.formTarget,y,null)):(mt(s,o,"encType",y.encType,y,null),mt(s,o,"method",y.method,y,null),mt(s,o,"target",y.target,y,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){s.removeAttribute(c);break}p=lf(""+p),s.setAttribute(c,p);break;case"onClick":p!=null&&(s.onclick=Wi);break;case"onScroll":p!=null&&Ge("scroll",s);break;case"onScrollEnd":p!=null&&Ge("scrollend",s);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(n(61));if(c=p.__html,c!=null){if(y.children!=null)throw Error(n(60));s.innerHTML=c}}break;case"multiple":s.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":s.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){s.removeAttribute("xlink:href");break}c=lf(""+p),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":p!=null&&typeof p!="function"&&typeof p!="symbol"?s.setAttribute(c,""+p):s.removeAttribute(c);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":p&&typeof p!="function"&&typeof p!="symbol"?s.setAttribute(c,""):s.removeAttribute(c);break;case"capture":case"download":p===!0?s.setAttribute(c,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?s.setAttribute(c,p):s.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?s.setAttribute(c,p):s.removeAttribute(c);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?s.removeAttribute(c):s.setAttribute(c,p);break;case"popover":Ge("beforetoggle",s),Ge("toggle",s),af(s,"popover",p);break;case"xlinkActuate":qi(s,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":qi(s,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":qi(s,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":qi(s,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":qi(s,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":qi(s,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":qi(s,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":qi(s,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":qi(s,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":af(s,"is",p);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=$5.get(c)||c,af(s,c,p))}}function uy(s,o,c,p,y,b){switch(c){case"style":sC(s,p,b);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(n(61));if(c=p.__html,c!=null){if(y.children!=null)throw Error(n(60));s.innerHTML=c}}break;case"children":typeof p=="string"?Xo(s,p):(typeof p=="number"||typeof p=="bigint")&&Xo(s,""+p);break;case"onScroll":p!=null&&Ge("scroll",s);break;case"onScrollEnd":p!=null&&Ge("scrollend",s);break;case"onClick":p!=null&&(s.onclick=Wi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Zx.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(y=c.endsWith("Capture"),o=c.slice(2,y?c.length-7:void 0),b=s[an]||null,b=b!=null?b[c]:null,typeof b=="function"&&s.removeEventListener(o,b,y),typeof p=="function")){typeof b!="function"&&b!==null&&(c in s?s[c]=null:s.hasAttribute(c)&&s.removeAttribute(c)),s.addEventListener(o,p,y);break e}c in s?s[c]=p:p===!0?s.setAttribute(c,""):af(s,c,p)}}}function Rr(s,o,c){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ge("error",s),Ge("load",s);var p=!1,y=!1,b;for(b in c)if(c.hasOwnProperty(b)){var E=c[b];if(E!=null)switch(b){case"src":p=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,o));default:mt(s,o,b,E,c,null)}}y&&mt(s,o,"srcSet",c.srcSet,c,null),p&&mt(s,o,"src",c.src,c,null);return;case"input":Ge("invalid",s);var T=b=E=y=null,H=null,Q=null;for(p in c)if(c.hasOwnProperty(p)){var re=c[p];if(re!=null)switch(p){case"name":y=re;break;case"type":E=re;break;case"checked":H=re;break;case"defaultChecked":Q=re;break;case"value":b=re;break;case"defaultValue":T=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(n(137,o));break;default:mt(s,o,p,re,c,null)}}rC(s,b,T,H,Q,E,y,!1);return;case"select":Ge("invalid",s),p=E=b=null;for(y in c)if(c.hasOwnProperty(y)&&(T=c[y],T!=null))switch(y){case"value":b=T;break;case"defaultValue":E=T;break;case"multiple":p=T;default:mt(s,o,y,T,c,null)}o=b,c=E,s.multiple=!!p,o!=null?Yo(s,!!p,o,!1):c!=null&&Yo(s,!!p,c,!0);return;case"textarea":Ge("invalid",s),b=y=p=null;for(E in c)if(c.hasOwnProperty(E)&&(T=c[E],T!=null))switch(E){case"value":p=T;break;case"defaultValue":y=T;break;case"children":b=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(n(91));break;default:mt(s,o,E,T,c,null)}iC(s,p,y,b);return;case"option":for(H in c)if(c.hasOwnProperty(H)&&(p=c[H],p!=null))switch(H){case"selected":s.selected=p&&typeof p!="function"&&typeof p!="symbol";break;default:mt(s,o,H,p,c,null)}return;case"dialog":Ge("beforetoggle",s),Ge("toggle",s),Ge("cancel",s),Ge("close",s);break;case"iframe":case"object":Ge("load",s);break;case"video":case"audio":for(p=0;p<uc.length;p++)Ge(uc[p],s);break;case"image":Ge("error",s),Ge("load",s);break;case"details":Ge("toggle",s);break;case"embed":case"source":case"link":Ge("error",s),Ge("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Q in c)if(c.hasOwnProperty(Q)&&(p=c[Q],p!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,o));default:mt(s,o,Q,p,c,null)}return;default:if(xv(o)){for(re in c)c.hasOwnProperty(re)&&(p=c[re],p!==void 0&&uy(s,o,re,p,c,void 0));return}}for(T in c)c.hasOwnProperty(T)&&(p=c[T],p!=null&&mt(s,o,T,p,c,null))}function v4(s,o,c,p){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,b=null,E=null,T=null,H=null,Q=null,re=null;for(te in c){var se=c[te];if(c.hasOwnProperty(te)&&se!=null)switch(te){case"checked":break;case"value":break;case"defaultValue":H=se;default:p.hasOwnProperty(te)||mt(s,o,te,null,p,se)}}for(var J in p){var te=p[J];if(se=c[J],p.hasOwnProperty(J)&&(te!=null||se!=null))switch(J){case"type":b=te;break;case"name":y=te;break;case"checked":Q=te;break;case"defaultChecked":re=te;break;case"value":E=te;break;case"defaultValue":T=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(n(137,o));break;default:te!==se&&mt(s,o,J,te,p,se)}}Sv(s,E,T,H,Q,re,b,y);return;case"select":te=E=T=J=null;for(b in c)if(H=c[b],c.hasOwnProperty(b)&&H!=null)switch(b){case"value":break;case"multiple":te=H;default:p.hasOwnProperty(b)||mt(s,o,b,null,p,H)}for(y in p)if(b=p[y],H=c[y],p.hasOwnProperty(y)&&(b!=null||H!=null))switch(y){case"value":J=b;break;case"defaultValue":T=b;break;case"multiple":E=b;default:b!==H&&mt(s,o,y,b,p,H)}o=T,c=E,p=te,J!=null?Yo(s,!!c,J,!1):!!p!=!!c&&(o!=null?Yo(s,!!c,o,!0):Yo(s,!!c,c?[]:"",!1));return;case"textarea":te=J=null;for(T in c)if(y=c[T],c.hasOwnProperty(T)&&y!=null&&!p.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:mt(s,o,T,null,p,y)}for(E in p)if(y=p[E],b=c[E],p.hasOwnProperty(E)&&(y!=null||b!=null))switch(E){case"value":J=y;break;case"defaultValue":te=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(n(91));break;default:y!==b&&mt(s,o,E,y,p,b)}nC(s,J,te);return;case"option":for(var Se in c)if(J=c[Se],c.hasOwnProperty(Se)&&J!=null&&!p.hasOwnProperty(Se))switch(Se){case"selected":s.selected=!1;break;default:mt(s,o,Se,null,p,J)}for(H in p)if(J=p[H],te=c[H],p.hasOwnProperty(H)&&J!==te&&(J!=null||te!=null))switch(H){case"selected":s.selected=J&&typeof J!="function"&&typeof J!="symbol";break;default:mt(s,o,H,J,p,te)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var De in c)J=c[De],c.hasOwnProperty(De)&&J!=null&&!p.hasOwnProperty(De)&&mt(s,o,De,null,p,J);for(Q in p)if(J=p[Q],te=c[Q],p.hasOwnProperty(Q)&&J!==te&&(J!=null||te!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(n(137,o));break;default:mt(s,o,Q,J,p,te)}return;default:if(xv(o)){for(var vt in c)J=c[vt],c.hasOwnProperty(vt)&&J!==void 0&&!p.hasOwnProperty(vt)&&uy(s,o,vt,void 0,p,J);for(re in p)J=p[re],te=c[re],!p.hasOwnProperty(re)||J===te||J===void 0&&te===void 0||uy(s,o,re,J,p,te);return}}for(var V in c)J=c[V],c.hasOwnProperty(V)&&J!=null&&!p.hasOwnProperty(V)&&mt(s,o,V,null,p,J);for(se in p)J=p[se],te=c[se],!p.hasOwnProperty(se)||J===te||J==null&&te==null||mt(s,o,se,J,p,te)}function oO(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function g4(){if(typeof performance.getEntriesByType=="function"){for(var s=0,o=0,c=performance.getEntriesByType("resource"),p=0;p<c.length;p++){var y=c[p],b=y.transferSize,E=y.initiatorType,T=y.duration;if(b&&T&&oO(E)){for(E=0,T=y.responseEnd,p+=1;p<c.length;p++){var H=c[p],Q=H.startTime;if(Q>T)break;var re=H.transferSize,se=H.initiatorType;re&&oO(se)&&(H=H.responseEnd,E+=re*(H<T?1:(T-Q)/(H-Q)))}if(--p,o+=8*(b+E)/(y.duration/1e3),s++,10<s)break}}if(0<s)return o/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var cy=null,hy=null;function nd(s){return s.nodeType===9?s:s.ownerDocument}function lO(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function uO(s,o){if(s===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&o==="foreignObject"?0:s}function fy(s,o){return s==="textarea"||s==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var dy=null;function y4(){var s=window.event;return s&&s.type==="popstate"?s===dy?!1:(dy=s,!0):(dy=null,!1)}var cO=typeof setTimeout=="function"?setTimeout:void 0,_4=typeof clearTimeout=="function"?clearTimeout:void 0,hO=typeof Promise=="function"?Promise:void 0,b4=typeof queueMicrotask=="function"?queueMicrotask:typeof hO<"u"?function(s){return hO.resolve(null).then(s).catch(S4)}:cO;function S4(s){setTimeout(function(){throw s})}function is(s){return s==="head"}function fO(s,o){var c=o,p=0;do{var y=c.nextSibling;if(s.removeChild(c),y&&y.nodeType===8)if(c=y.data,c==="/$"||c==="/&"){if(p===0){s.removeChild(y),Al(o);return}p--}else if(c==="$"||c==="$?"||c==="$~"||c==="$!"||c==="&")p++;else if(c==="html")hc(s.ownerDocument.documentElement);else if(c==="head"){c=s.ownerDocument.head,hc(c);for(var b=c.firstChild;b;){var E=b.nextSibling,T=b.nodeName;b[Pu]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&b.rel.toLowerCase()==="stylesheet"||c.removeChild(b),b=E}}else c==="body"&&hc(s.ownerDocument.body);c=y}while(c);Al(o)}function dO(s,o){var c=s;s=0;do{var p=c.nextSibling;if(c.nodeType===1?o?(c._stashedDisplay=c.style.display,c.style.display="none"):(c.style.display=c._stashedDisplay||"",c.getAttribute("style")===""&&c.removeAttribute("style")):c.nodeType===3&&(o?(c._stashedText=c.nodeValue,c.nodeValue=""):c.nodeValue=c._stashedText||""),p&&p.nodeType===8)if(c=p.data,c==="/$"){if(s===0)break;s--}else c!=="$"&&c!=="$?"&&c!=="$~"&&c!=="$!"||s++;c=p}while(c)}function py(s){var o=s.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var c=o;switch(o=o.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":py(c),_v(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}s.removeChild(c)}}function w4(s,o,c,p){for(;s.nodeType===1;){var y=c;if(s.nodeName.toLowerCase()!==o.toLowerCase()){if(!p&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(p){if(!s[Pu])switch(o){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(b=s.getAttribute("rel"),b==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(b!==y.rel||s.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||s.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||s.getAttribute("title")!==(y.title==null?null:y.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(b=s.getAttribute("src"),(b!==(y.src==null?null:y.src)||s.getAttribute("type")!==(y.type==null?null:y.type)||s.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&b&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(o==="input"&&s.type==="hidden"){var b=y.name==null?null:""+y.name;if(y.type==="hidden"&&s.getAttribute("name")===b)return s}else return s;if(s=Vn(s.nextSibling),s===null)break}return null}function x4(s,o,c){if(o==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!c||(s=Vn(s.nextSibling),s===null))return null;return s}function pO(s,o){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!o||(s=Vn(s.nextSibling),s===null))return null;return s}function my(s){return s.data==="$?"||s.data==="$~"}function vy(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function C4(s,o){var c=s.ownerDocument;if(s.data==="$~")s._reactRetry=o;else if(s.data!=="$?"||c.readyState!=="loading")o();else{var p=function(){o(),c.removeEventListener("DOMContentLoaded",p)};c.addEventListener("DOMContentLoaded",p),s._reactRetry=p}}function Vn(s){for(;s!=null;s=s.nextSibling){var o=s.nodeType;if(o===1||o===3)break;if(o===8){if(o=s.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return s}var gy=null;function mO(s){s=s.nextSibling;for(var o=0;s;){if(s.nodeType===8){var c=s.data;if(c==="/$"||c==="/&"){if(o===0)return Vn(s.nextSibling);o--}else c!=="$"&&c!=="$!"&&c!=="$?"&&c!=="$~"&&c!=="&"||o++}s=s.nextSibling}return null}function vO(s){s=s.previousSibling;for(var o=0;s;){if(s.nodeType===8){var c=s.data;if(c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"){if(o===0)return s;o--}else c!=="/$"&&c!=="/&"||o++}s=s.previousSibling}return null}function gO(s,o,c){switch(o=nd(c),s){case"html":if(s=o.documentElement,!s)throw Error(n(452));return s;case"head":if(s=o.head,!s)throw Error(n(453));return s;case"body":if(s=o.body,!s)throw Error(n(454));return s;default:throw Error(n(451))}}function hc(s){for(var o=s.attributes;o.length;)s.removeAttributeNode(o[0]);_v(s)}var Yn=new Map,yO=new Set;function id(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var la=q.d;q.d={f:E4,r:A4,D:O4,C:k4,L:P4,m:T4,X:M4,S:D4,M:R4};function E4(){var s=la.f(),o=Xf();return s||o}function A4(s){var o=qo(s);o!==null&&o.tag===5&&o.type==="form"?BE(o):la.r(s)}var xl=typeof document>"u"?null:document;function _O(s,o,c){var p=xl;if(p&&typeof o=="string"&&o){var y=Hn(o);y='link[rel="'+s+'"][href="'+y+'"]',typeof c=="string"&&(y+='[crossorigin="'+c+'"]'),yO.has(y)||(yO.add(y),s={rel:s,crossOrigin:c,href:o},p.querySelector(y)===null&&(o=p.createElement("link"),Rr(o,"link",s),mr(o),p.head.appendChild(o)))}}function O4(s){la.D(s),_O("dns-prefetch",s,null)}function k4(s,o){la.C(s,o),_O("preconnect",s,o)}function P4(s,o,c){la.L(s,o,c);var p=xl;if(p&&s&&o){var y='link[rel="preload"][as="'+Hn(o)+'"]';o==="image"&&c&&c.imageSrcSet?(y+='[imagesrcset="'+Hn(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(y+='[imagesizes="'+Hn(c.imageSizes)+'"]')):y+='[href="'+Hn(s)+'"]';var b=y;switch(o){case"style":b=Cl(s);break;case"script":b=El(s)}Yn.has(b)||(s=m({rel:"preload",href:o==="image"&&c&&c.imageSrcSet?void 0:s,as:o},c),Yn.set(b,s),p.querySelector(y)!==null||o==="style"&&p.querySelector(fc(b))||o==="script"&&p.querySelector(dc(b))||(o=p.createElement("link"),Rr(o,"link",s),mr(o),p.head.appendChild(o)))}}function T4(s,o){la.m(s,o);var c=xl;if(c&&s){var p=o&&typeof o.as=="string"?o.as:"script",y='link[rel="modulepreload"][as="'+Hn(p)+'"][href="'+Hn(s)+'"]',b=y;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=El(s)}if(!Yn.has(b)&&(s=m({rel:"modulepreload",href:s},o),Yn.set(b,s),c.querySelector(y)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(dc(b)))return}p=c.createElement("link"),Rr(p,"link",s),mr(p),c.head.appendChild(p)}}}function D4(s,o,c){la.S(s,o,c);var p=xl;if(p&&s){var y=Wo(p).hoistableStyles,b=Cl(s);o=o||"default";var E=y.get(b);if(!E){var T={loading:0,preload:null};if(E=p.querySelector(fc(b)))T.loading=5;else{s=m({rel:"stylesheet",href:s,"data-precedence":o},c),(c=Yn.get(b))&&yy(s,c);var H=E=p.createElement("link");mr(H),Rr(H,"link",s),H._p=new Promise(function(Q,re){H.onload=Q,H.onerror=re}),H.addEventListener("load",function(){T.loading|=1}),H.addEventListener("error",function(){T.loading|=2}),T.loading|=4,ad(E,o,p)}E={type:"stylesheet",instance:E,count:1,state:T},y.set(b,E)}}}function M4(s,o){la.X(s,o);var c=xl;if(c&&s){var p=Wo(c).hoistableScripts,y=El(s),b=p.get(y);b||(b=c.querySelector(dc(y)),b||(s=m({src:s,async:!0},o),(o=Yn.get(y))&&_y(s,o),b=c.createElement("script"),mr(b),Rr(b,"link",s),c.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},p.set(y,b))}}function R4(s,o){la.M(s,o);var c=xl;if(c&&s){var p=Wo(c).hoistableScripts,y=El(s),b=p.get(y);b||(b=c.querySelector(dc(y)),b||(s=m({src:s,async:!0,type:"module"},o),(o=Yn.get(y))&&_y(s,o),b=c.createElement("script"),mr(b),Rr(b,"link",s),c.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},p.set(y,b))}}function bO(s,o,c,p){var y=(y=pe.current)?id(y):null;if(!y)throw Error(n(446));switch(s){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(o=Cl(c.href),c=Wo(y).hoistableStyles,p=c.get(o),p||(p={type:"style",instance:null,count:0,state:null},c.set(o,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){s=Cl(c.href);var b=Wo(y).hoistableStyles,E=b.get(s);if(E||(y=y.ownerDocument||y,E={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(s,E),(b=y.querySelector(fc(s)))&&!b._p&&(E.instance=b,E.state.loading=5),Yn.has(s)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},Yn.set(s,c),b||L4(y,s,c,E.state))),o&&p===null)throw Error(n(528,""));return E}if(o&&p!==null)throw Error(n(529,""));return null;case"script":return o=c.async,c=c.src,typeof c=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=El(c),c=Wo(y).hoistableScripts,p=c.get(o),p||(p={type:"script",instance:null,count:0,state:null},c.set(o,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,s))}}function Cl(s){return'href="'+Hn(s)+'"'}function fc(s){return'link[rel="stylesheet"]['+s+"]"}function SO(s){return m({},s,{"data-precedence":s.precedence,precedence:null})}function L4(s,o,c,p){s.querySelector('link[rel="preload"][as="style"]['+o+"]")?p.loading=1:(o=s.createElement("link"),p.preload=o,o.addEventListener("load",function(){return p.loading|=1}),o.addEventListener("error",function(){return p.loading|=2}),Rr(o,"link",c),mr(o),s.head.appendChild(o))}function El(s){return'[src="'+Hn(s)+'"]'}function dc(s){return"script[async]"+s}function wO(s,o,c){if(o.count++,o.instance===null)switch(o.type){case"style":var p=s.querySelector('style[data-href~="'+Hn(c.href)+'"]');if(p)return o.instance=p,mr(p),p;var y=m({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return p=(s.ownerDocument||s).createElement("style"),mr(p),Rr(p,"style",y),ad(p,c.precedence,s),o.instance=p;case"stylesheet":y=Cl(c.href);var b=s.querySelector(fc(y));if(b)return o.state.loading|=4,o.instance=b,mr(b),b;p=SO(c),(y=Yn.get(y))&&yy(p,y),b=(s.ownerDocument||s).createElement("link"),mr(b);var E=b;return E._p=new Promise(function(T,H){E.onload=T,E.onerror=H}),Rr(b,"link",p),o.state.loading|=4,ad(b,c.precedence,s),o.instance=b;case"script":return b=El(c.src),(y=s.querySelector(dc(b)))?(o.instance=y,mr(y),y):(p=c,(y=Yn.get(b))&&(p=m({},c),_y(p,y)),s=s.ownerDocument||s,y=s.createElement("script"),mr(y),Rr(y,"link",p),s.head.appendChild(y),o.instance=y);case"void":return null;default:throw Error(n(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(p=o.instance,o.state.loading|=4,ad(p,c.precedence,s));return o.instance}function ad(s,o,c){for(var p=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=p.length?p[p.length-1]:null,b=y,E=0;E<p.length;E++){var T=p[E];if(T.dataset.precedence===o)b=T;else if(b!==y)break}b?b.parentNode.insertBefore(s,b.nextSibling):(o=c.nodeType===9?c.head:c,o.insertBefore(s,o.firstChild))}function yy(s,o){s.crossOrigin==null&&(s.crossOrigin=o.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=o.referrerPolicy),s.title==null&&(s.title=o.title)}function _y(s,o){s.crossOrigin==null&&(s.crossOrigin=o.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=o.referrerPolicy),s.integrity==null&&(s.integrity=o.integrity)}var sd=null;function xO(s,o,c){if(sd===null){var p=new Map,y=sd=new Map;y.set(c,p)}else y=sd,p=y.get(c),p||(p=new Map,y.set(c,p));if(p.has(s))return p;for(p.set(s,null),c=c.getElementsByTagName(s),y=0;y<c.length;y++){var b=c[y];if(!(b[Pu]||b[Pr]||s==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var E=b.getAttribute(o)||"";E=s+E;var T=p.get(E);T?T.push(b):p.set(E,[b])}}return p}function CO(s,o,c){s=s.ownerDocument||s,s.head.insertBefore(c,o==="title"?s.querySelector("head > title"):null)}function B4(s,o,c){if(c===1||o.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;switch(o.rel){case"stylesheet":return s=o.disabled,typeof o.precedence=="string"&&s==null;default:return!0}case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function EO(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function N4(s,o,c,p){if(c.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(c.state.loading&4)===0){if(c.instance===null){var y=Cl(p.href),b=o.querySelector(fc(y));if(b){o=b._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(s.count++,s=od.bind(s),o.then(s,s)),c.state.loading|=4,c.instance=b,mr(b);return}b=o.ownerDocument||o,p=SO(p),(y=Yn.get(y))&&yy(p,y),b=b.createElement("link"),mr(b);var E=b;E._p=new Promise(function(T,H){E.onload=T,E.onerror=H}),Rr(b,"link",p),c.instance=b}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(c,o),(o=c.state.preload)&&(c.state.loading&3)===0&&(s.count++,c=od.bind(s),o.addEventListener("load",c),o.addEventListener("error",c))}}var by=0;function I4(s,o){return s.stylesheets&&s.count===0&&ud(s,s.stylesheets),0<s.count||0<s.imgCount?function(c){var p=setTimeout(function(){if(s.stylesheets&&ud(s,s.stylesheets),s.unsuspend){var b=s.unsuspend;s.unsuspend=null,b()}},6e4+o);0<s.imgBytes&&by===0&&(by=62500*g4());var y=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&ud(s,s.stylesheets),s.unsuspend)){var b=s.unsuspend;s.unsuspend=null,b()}},(s.imgBytes>by?50:800)+o);return s.unsuspend=c,function(){s.unsuspend=null,clearTimeout(p),clearTimeout(y)}}:null}function od(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ud(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var ld=null;function ud(s,o){s.stylesheets=null,s.unsuspend!==null&&(s.count++,ld=new Map,o.forEach(j4,s),ld=null,od.call(s))}function j4(s,o){if(!(o.state.loading&4)){var c=ld.get(s);if(c)var p=c.get(null);else{c=new Map,ld.set(s,c);for(var y=s.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<y.length;b++){var E=y[b];(E.nodeName==="LINK"||E.getAttribute("media")!=="not all")&&(c.set(E.dataset.precedence,E),p=E)}p&&c.set(null,p)}y=o.instance,E=y.getAttribute("data-precedence"),b=c.get(E)||p,b===p&&c.set(null,y),c.set(E,y),this.count++,p=od.bind(this),y.addEventListener("load",p),y.addEventListener("error",p),b?b.parentNode.insertBefore(y,b.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(y,s.firstChild)),o.state.loading|=4}}var pc={$$typeof:O,Provider:null,Consumer:null,_currentValue:G,_currentValue2:G,_threadCount:0};function z4(s,o,c,p,y,b,E,T,H){this.tag=1,this.containerInfo=s,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=mv(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mv(0),this.hiddenUpdates=mv(null),this.identifierPrefix=p,this.onUncaughtError=y,this.onCaughtError=b,this.onRecoverableError=E,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=H,this.incompleteTransitions=new Map}function AO(s,o,c,p,y,b,E,T,H,Q,re,se){return s=new z4(s,o,c,E,H,Q,re,se,T),o=1,b===!0&&(o|=24),b=Sn(3,null,null,o),s.current=b,b.stateNode=s,o=Jv(),o.refCount++,s.pooledCache=o,o.refCount++,b.memoizedState={element:p,isDehydrated:c,cache:o},ng(b),s}function OO(s){return s?(s=rl,s):rl}function kO(s,o,c,p,y,b){y=OO(y),p.context===null?p.context=y:p.pendingContext=y,p=Va(o),p.payload={element:c},b=b===void 0?null:b,b!==null&&(p.callback=b),c=Ya(s,p,o),c!==null&&(hn(c,s,o),Wu(c,s,o))}function PO(s,o){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var c=s.retryLane;s.retryLane=c!==0&&c<o?c:o}}function Sy(s,o){PO(s,o),(s=s.alternate)&&PO(s,o)}function TO(s){if(s.tag===13||s.tag===31){var o=$s(s,67108864);o!==null&&hn(o,s,67108864),Sy(s,67108864)}}function DO(s){if(s.tag===13||s.tag===31){var o=An();o=vv(o);var c=$s(s,o);c!==null&&hn(c,s,o),Sy(s,o)}}var cd=!0;function H4(s,o,c,p){var y=B.T;B.T=null;var b=q.p;try{q.p=2,wy(s,o,c,p)}finally{q.p=b,B.T=y}}function F4(s,o,c,p){var y=B.T;B.T=null;var b=q.p;try{q.p=8,wy(s,o,c,p)}finally{q.p=b,B.T=y}}function wy(s,o,c,p){if(cd){var y=xy(p);if(y===null)ly(s,o,p,hd,c),RO(s,p);else if($4(y,s,o,c,p))p.stopPropagation();else if(RO(s,p),o&4&&-1<U4.indexOf(s)){for(;y!==null;){var b=qo(y);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var E=js(b.pendingLanes);if(E!==0){var T=b;for(T.pendingLanes|=2,T.entangledLanes|=2;E;){var H=1<<31-_t(E);T.entanglements[1]|=H,E&=~H}ki(b),(ot&6)===0&&(Vf=Xr()+500,lc(0))}}break;case 31:case 13:T=$s(b,2),T!==null&&hn(T,b,2),Xf(),Sy(b,2)}if(b=xy(p),b===null&&ly(s,o,p,hd,c),b===y)break;y=b}y!==null&&p.stopPropagation()}else ly(s,o,p,null,c)}}function xy(s){return s=Ev(s),Cy(s)}var hd=null;function Cy(s){if(hd=null,s=Ko(s),s!==null){var o=a(s);if(o===null)s=null;else{var c=o.tag;if(c===13){if(s=l(o),s!==null)return s;s=null}else if(c===31){if(s=u(o),s!==null)return s;s=null}else if(c===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;s=null}else o!==s&&(s=null)}}return hd=s,null}function MO(s){switch(s){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(pv()){case ne:return 2;case ve:return 8;case Re:case Ye:return 32;case ut:return 268435456;default:return 32}default:return 32}}var Ey=!1,as=null,ss=null,os=null,mc=new Map,vc=new Map,ls=[],U4="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function RO(s,o){switch(s){case"focusin":case"focusout":as=null;break;case"dragenter":case"dragleave":ss=null;break;case"mouseover":case"mouseout":os=null;break;case"pointerover":case"pointerout":mc.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":vc.delete(o.pointerId)}}function gc(s,o,c,p,y,b){return s===null||s.nativeEvent!==b?(s={blockedOn:o,domEventName:c,eventSystemFlags:p,nativeEvent:b,targetContainers:[y]},o!==null&&(o=qo(o),o!==null&&TO(o)),s):(s.eventSystemFlags|=p,o=s.targetContainers,y!==null&&o.indexOf(y)===-1&&o.push(y),s)}function $4(s,o,c,p,y){switch(o){case"focusin":return as=gc(as,s,o,c,p,y),!0;case"dragenter":return ss=gc(ss,s,o,c,p,y),!0;case"mouseover":return os=gc(os,s,o,c,p,y),!0;case"pointerover":var b=y.pointerId;return mc.set(b,gc(mc.get(b)||null,s,o,c,p,y)),!0;case"gotpointercapture":return b=y.pointerId,vc.set(b,gc(vc.get(b)||null,s,o,c,p,y)),!0}return!1}function LO(s){var o=Ko(s.target);if(o!==null){var c=a(o);if(c!==null){if(o=c.tag,o===13){if(o=l(c),o!==null){s.blockedOn=o,Yx(s.priority,function(){DO(c)});return}}else if(o===31){if(o=u(c),o!==null){s.blockedOn=o,Yx(s.priority,function(){DO(c)});return}}else if(o===3&&c.stateNode.current.memoizedState.isDehydrated){s.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}s.blockedOn=null}function fd(s){if(s.blockedOn!==null)return!1;for(var o=s.targetContainers;0<o.length;){var c=xy(s.nativeEvent);if(c===null){c=s.nativeEvent;var p=new c.constructor(c.type,c);Cv=p,c.target.dispatchEvent(p),Cv=null}else return o=qo(c),o!==null&&TO(o),s.blockedOn=c,!1;o.shift()}return!0}function BO(s,o,c){fd(s)&&c.delete(o)}function K4(){Ey=!1,as!==null&&fd(as)&&(as=null),ss!==null&&fd(ss)&&(ss=null),os!==null&&fd(os)&&(os=null),mc.forEach(BO),vc.forEach(BO)}function dd(s,o){s.blockedOn===o&&(s.blockedOn=null,Ey||(Ey=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,K4)))}var pd=null;function NO(s){pd!==s&&(pd=s,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){pd===s&&(pd=null);for(var o=0;o<s.length;o+=3){var c=s[o],p=s[o+1],y=s[o+2];if(typeof p!="function"){if(Cy(p||c)===null)continue;break}var b=qo(c);b!==null&&(s.splice(o,3),o-=3,xg(b,{pending:!0,data:y,method:c.method,action:p},p,y))}}))}function Al(s){function o(H){return dd(H,s)}as!==null&&dd(as,s),ss!==null&&dd(ss,s),os!==null&&dd(os,s),mc.forEach(o),vc.forEach(o);for(var c=0;c<ls.length;c++){var p=ls[c];p.blockedOn===s&&(p.blockedOn=null)}for(;0<ls.length&&(c=ls[0],c.blockedOn===null);)LO(c),c.blockedOn===null&&ls.shift();if(c=(s.ownerDocument||s).$$reactFormReplay,c!=null)for(p=0;p<c.length;p+=3){var y=c[p],b=c[p+1],E=y[an]||null;if(typeof b=="function")E||NO(c);else if(E){var T=null;if(b&&b.hasAttribute("formAction")){if(y=b,E=b[an]||null)T=E.formAction;else if(Cy(y)!==null)continue}else T=E.action;typeof T=="function"?c[p+1]=T:(c.splice(p,3),p-=3),NO(c)}}}function IO(){function s(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(E){return y=E})},focusReset:"manual",scroll:"manual"})}function o(){y!==null&&(y(),y=null),p||setTimeout(c,20)}function c(){if(!p&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var p=!1,y=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(c,100),function(){p=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),y!==null&&(y(),y=null)}}}function Ay(s){this._internalRoot=s}md.prototype.render=Ay.prototype.render=function(s){var o=this._internalRoot;if(o===null)throw Error(n(409));var c=o.current,p=An();kO(c,p,s,o,null,null)},md.prototype.unmount=Ay.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var o=s.containerInfo;kO(s.current,2,null,s,null,null),Xf(),o[$o]=null}};function md(s){this._internalRoot=s}md.prototype.unstable_scheduleHydration=function(s){if(s){var o=Vx();s={blockedOn:null,target:s,priority:o};for(var c=0;c<ls.length&&o!==0&&o<ls[c].priority;c++);ls.splice(c,0,s),c===0&&LO(s)}};var jO=t.version;if(jO!=="19.2.0")throw Error(n(527,jO,"19.2.0"));q.findDOMNode=function(s){var o=s._reactInternals;if(o===void 0)throw typeof s.render=="function"?Error(n(188)):(s=Object.keys(s).join(","),Error(n(268,s)));return s=h(o),s=s!==null?d(s):null,s=s===null?null:s.stateNode,s};var q4={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vd.isDisabled&&vd.supportsFiber)try{Gr=vd.inject(q4),sr=vd}catch{}}return _c.createRoot=function(s,o){if(!i(s))throw Error(n(299));var c=!1,p="",y=qE,b=WE,E=VE;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onUncaughtError!==void 0&&(y=o.onUncaughtError),o.onCaughtError!==void 0&&(b=o.onCaughtError),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=AO(s,1,!1,null,null,c,p,null,y,b,E,IO),s[$o]=o.current,oy(s),new Ay(o)},_c.hydrateRoot=function(s,o,c){if(!i(s))throw Error(n(299));var p=!1,y="",b=qE,E=WE,T=VE,H=null;return c!=null&&(c.unstable_strictMode===!0&&(p=!0),c.identifierPrefix!==void 0&&(y=c.identifierPrefix),c.onUncaughtError!==void 0&&(b=c.onUncaughtError),c.onCaughtError!==void 0&&(E=c.onCaughtError),c.onRecoverableError!==void 0&&(T=c.onRecoverableError),c.formState!==void 0&&(H=c.formState)),o=AO(s,1,!0,o,c??null,p,y,H,b,E,T,IO),o.context=OO(null),c=o.current,p=An(),p=vv(p),y=Va(p),y.callback=null,Ya(c,y,p),c=p,o.current.lanes=c,ku(o,c),ki(o),s[$o]=o.current,oy(s),new md(o)},_c.version="19.2.0",_c}var YO;function i8(){if(YO)return Py.exports;YO=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Py.exports=n8(),Py.exports}var a8=i8();const s8=Hr(a8);var gd={exports:{}},Ry,XO;function o8(){if(XO)return Ry;XO=1;var e=1e3,t=e*60,r=t*60,n=r*24,i=n*7,a=n*365.25;Ry=function(d,m){m=m||{};var v=typeof d;if(v==="string"&&d.length>0)return l(d);if(v==="number"&&isFinite(d))return m.long?f(d):u(d);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(d))};function l(d){if(d=String(d),!(d.length>100)){var m=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(d);if(m){var v=parseFloat(m[1]),g=(m[2]||"ms").toLowerCase();switch(g){case"years":case"year":case"yrs":case"yr":case"y":return v*a;case"weeks":case"week":case"w":return v*i;case"days":case"day":case"d":return v*n;case"hours":case"hour":case"hrs":case"hr":case"h":return v*r;case"minutes":case"minute":case"mins":case"min":case"m":return v*t;case"seconds":case"second":case"secs":case"sec":case"s":return v*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return v;default:return}}}}function u(d){var m=Math.abs(d);return m>=n?Math.round(d/n)+"d":m>=r?Math.round(d/r)+"h":m>=t?Math.round(d/t)+"m":m>=e?Math.round(d/e)+"s":d+"ms"}function f(d){var m=Math.abs(d);return m>=n?h(d,m,n,"day"):m>=r?h(d,m,r,"hour"):m>=t?h(d,m,t,"minute"):m>=e?h(d,m,e,"second"):d+" ms"}function h(d,m,v,g){var S=m>=v*1.5;return Math.round(d/v)+" "+g+(S?"s":"")}return Ry}var Ly,GO;function l8(){if(GO)return Ly;GO=1;function e(t){n.debug=n,n.default=n,n.coerce=h,n.disable=u,n.enable=a,n.enabled=f,n.humanize=o8(),n.destroy=d,Object.keys(t).forEach(m=>{n[m]=t[m]}),n.names=[],n.skips=[],n.formatters={};function r(m){let v=0;for(let g=0;g<m.length;g++)v=(v<<5)-v+m.charCodeAt(g),v|=0;return n.colors[Math.abs(v)%n.colors.length]}n.selectColor=r;function n(m){let v,g=null,S,_;function x(...C){if(!x.enabled)return;const A=x,O=Number(new Date),P=O-(v||O);A.diff=P,A.prev=v,A.curr=O,v=O,C[0]=n.coerce(C[0]),typeof C[0]!="string"&&C.unshift("%O");let D=0;C[0]=C[0].replace(/%([a-zA-Z%])/g,(R,N)=>{if(R==="%%")return"%";D++;const $=n.formatters[N];if(typeof $=="function"){const ee=C[D];R=$.call(A,ee),C.splice(D,1),D--}return R}),n.formatArgs.call(A,C),(A.log||n.log).apply(A,C)}return x.namespace=m,x.useColors=n.useColors(),x.color=n.selectColor(m),x.extend=i,x.destroy=n.destroy,Object.defineProperty(x,"enabled",{enumerable:!0,configurable:!1,get:()=>g!==null?g:(S!==n.namespaces&&(S=n.namespaces,_=n.enabled(m)),_),set:C=>{g=C}}),typeof n.init=="function"&&n.init(x),x}function i(m,v){const g=n(this.namespace+(typeof v>"u"?":":v)+m);return g.log=this.log,g}function a(m){n.save(m),n.namespaces=m,n.names=[],n.skips=[];const v=(typeof m=="string"?m:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const g of v)g[0]==="-"?n.skips.push(g.slice(1)):n.names.push(g)}function l(m,v){let g=0,S=0,_=-1,x=0;for(;g<m.length;)if(S<v.length&&(v[S]===m[g]||v[S]==="*"))v[S]==="*"?(_=S,x=g,S++):(g++,S++);else if(_!==-1)S=_+1,x++,g=x;else return!1;for(;S<v.length&&v[S]==="*";)S++;return S===v.length}function u(){const m=[...n.names,...n.skips.map(v=>"-"+v)].join(",");return n.enable(""),m}function f(m){for(const v of n.skips)if(l(m,v))return!1;for(const v of n.names)if(l(m,v))return!0;return!1}function h(m){return m instanceof Error?m.stack||m.message:m}function d(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}return Ly=e,Ly}var ZO;function u8(){return ZO||(ZO=1,(function(e,t){var r={};t.formatArgs=i,t.save=a,t.load=l,t.useColors=n,t.storage=u(),t.destroy=(()=>{let h=!1;return()=>{h||(h=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let h;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(h=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(h[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function i(h){if(h[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+h[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const d="color: "+this.color;h.splice(1,0,d,"color: inherit");let m=0,v=0;h[0].replace(/%[a-zA-Z%]/g,g=>{g!=="%%"&&(m++,g==="%c"&&(v=m))}),h.splice(v,0,d)}t.log=console.debug||console.log||(()=>{});function a(h){try{h?t.storage.setItem("debug",h):t.storage.removeItem("debug")}catch{}}function l(){let h;try{h=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch{}return!h&&typeof process<"u"&&"env"in process&&(h=r.DEBUG),h}function u(){try{return localStorage}catch{}}e.exports=l8()(t);const{formatters:f}=e.exports;f.j=function(h){try{return JSON.stringify(h)}catch(d){return"[UnexpectedJSONParseError]: "+d.message}}})(gd,gd.exports)),gd.exports}var c8=u8();const eL=Hr(c8),Ul={};function tL(e,t){return e.unstable_is?e.unstable_is(t):t===e}function rL(e){return"init"in e}function c0(e){return!!e.write}function QO(e){return"v"in e||"e"in e}function np(e){if("e"in e)throw e.e;if((Ul?"production":void 0)!=="production"&&!("v"in e))throw new Error("[Bug] atom state is not initialized");return e.v}const ip=new WeakMap;function nL(e){var t;return ap(e)&&!!((t=ip.get(e))!=null&&t[0])}function h8(e){const t=ip.get(e);t!=null&&t[0]&&(t[0]=!1,t[1].forEach(r=>r()))}function h0(e,t){let r=ip.get(e);if(!r){r=[!0,new Set],ip.set(e,r);const n=()=>{r[0]=!1};e.then(n,n)}r[1].add(t)}function ap(e){return typeof(e==null?void 0:e.then)=="function"}function iL(e,t,r){if(!r.p.has(e)){r.p.add(e);const n=()=>r.p.delete(e);t.then(n,n)}}function aL(e,t,r){var n;const i=new Set;for(const a of((n=r.get(e))==null?void 0:n.t)||[])r.has(a)&&i.add(a);for(const a of t.p)i.add(a);return i}const f8=(e,t,...r)=>t.read(...r),d8=(e,t,...r)=>t.write(...r),p8=(e,t)=>{var r;return(r=t.unstable_onInit)==null?void 0:r.call(t,e)},m8=(e,t,r)=>{var n;return(n=t.onMount)==null?void 0:n.call(t,r)},v8=(e,t)=>{const r=Wr(e),n=r[0],i=r[9];if((Ul?"production":void 0)!=="production"&&!t)throw new Error("Atom is undefined or null");let a=n.get(t);return a||(a={d:new Map,p:new Set,n:0},n.set(t,a),i==null||i(e,t)),a},g8=e=>{const t=Wr(e),r=t[1],n=t[3],i=t[4],a=t[5],l=t[6],u=t[13],f=[],h=d=>{try{d()}catch(m){f.push(m)}};do{l.f&&h(l.f);const d=new Set,m=d.add.bind(d);n.forEach(v=>{var g;return(g=r.get(v))==null?void 0:g.l.forEach(m)}),n.clear(),a.forEach(m),a.clear(),i.forEach(m),i.clear(),d.forEach(h),n.size&&u(e)}while(n.size||a.size||i.size);if(f.length)throw new AggregateError(f)},y8=e=>{const t=Wr(e),r=t[1],n=t[2],i=t[3],a=t[11],l=t[14],u=t[17],f=[],h=new WeakSet,d=new WeakSet,m=Array.from(i);for(;m.length;){const v=m[m.length-1],g=a(e,v);if(d.has(v)){m.pop();continue}if(h.has(v)){if(n.get(v)===g.n)f.push([v,g]);else if((Ul?"production":void 0)!=="production"&&n.has(v))throw new Error("[Bug] invalidated atom exists");d.add(v),m.pop();continue}h.add(v);for(const S of aL(v,g,r))h.has(S)||m.push(S)}for(let v=f.length-1;v>=0;--v){const[g,S]=f[v];let _=!1;for(const x of S.d.keys())if(x!==g&&i.has(x)){_=!0;break}_&&(l(e,g),u(e,g)),n.delete(g)}},_8=(e,t)=>{var r;const n=Wr(e),i=n[1],a=n[2],l=n[3],u=n[6],f=n[7],h=n[11],d=n[12],m=n[13],v=n[14],g=n[16],S=n[17],_=h(e,t);if(QO(_)&&(i.has(t)&&a.get(t)!==_.n||Array.from(_.d).every(([R,N])=>v(e,R).n===N)))return _;_.d.clear();let x=!0;function C(){i.has(t)&&(S(e,t),m(e),d(e))}function A(R){var N;if(tL(t,R)){const ee=h(e,R);if(!QO(ee))if(rL(R))sp(e,R,R.init);else throw new Error("no atom init");return np(ee)}const $=v(e,R);try{return np($)}finally{_.d.set(R,$.n),nL(_.v)&&iL(t,_.v,$),(N=i.get(R))==null||N.t.add(t),x||C()}}let O,P;const D={get signal(){return O||(O=new AbortController),O.signal},get setSelf(){return(Ul?"production":void 0)!=="production"&&!c0(t)&&console.warn("setSelf function cannot be used with read-only atom"),!P&&c0(t)&&(P=(...R)=>{if((Ul?"production":void 0)!=="production"&&x&&console.warn("setSelf function cannot be called in sync"),!x)try{return g(e,t,...R)}finally{m(e),d(e)}}),P}},k=_.n;try{const R=f(e,t,A,D);return sp(e,t,R),ap(R)&&(h0(R,()=>O==null?void 0:O.abort()),R.then(C,C)),_}catch(R){return delete _.v,_.e=R,++_.n,_}finally{x=!1,k!==_.n&&a.get(t)===k&&(a.set(t,_.n),l.add(t),(r=u.c)==null||r.call(u,t))}},b8=(e,t)=>{const r=Wr(e),n=r[1],i=r[2],a=r[11],l=[t];for(;l.length;){const u=l.pop(),f=a(e,u);for(const h of aL(u,f,n)){const d=a(e,h);i.set(h,d.n),l.push(h)}}},sL=(e,t,...r)=>{const n=Wr(e),i=n[3],a=n[6],l=n[8],u=n[11],f=n[12],h=n[13],d=n[14],m=n[15],v=n[17];let g=!0;const S=x=>np(d(e,x)),_=(x,...C)=>{var A;const O=u(e,x);try{if(tL(t,x)){if(!rL(x))throw new Error("atom not writable");const P=O.n,D=C[0];sp(e,x,D),v(e,x),P!==O.n&&(i.add(x),(A=a.c)==null||A.call(a,x),m(e,x));return}else return sL(e,x,...C)}finally{g||(h(e),f(e))}};try{return l(e,t,S,_,...r)}finally{g=!1}},S8=(e,t)=>{var r;const n=Wr(e),i=n[1],a=n[3],l=n[6],u=n[11],f=n[15],h=n[18],d=n[19],m=u(e,t),v=i.get(t);if(v&&!nL(m.v)){for(const[g,S]of m.d)if(!v.d.has(g)){const _=u(e,g);h(e,g).t.add(t),v.d.add(g),S!==_.n&&(a.add(g),(r=l.c)==null||r.call(l,g),f(e,g))}for(const g of v.d||[])if(!m.d.has(g)){v.d.delete(g);const S=d(e,g);S==null||S.t.delete(t)}}},oL=(e,t)=>{var r;const n=Wr(e),i=n[1],a=n[4],l=n[6],u=n[10],f=n[11],h=n[12],d=n[13],m=n[14],v=n[16],g=f(e,t);let S=i.get(t);if(!S){m(e,t);for(const _ of g.d.keys())oL(e,_).t.add(t);if(S={l:new Set,d:new Set(g.d.keys()),t:new Set},i.set(t,S),(r=l.m)==null||r.call(l,t),c0(t)){const _=()=>{let x=!0;const C=(...A)=>{try{return v(e,t,...A)}finally{x||(d(e),h(e))}};try{const A=u(e,t,C);A&&(S.u=()=>{x=!0;try{A()}finally{x=!1}})}finally{x=!1}};a.add(_)}}return S},w8=(e,t)=>{var r;const n=Wr(e),i=n[1],a=n[5],l=n[6],u=n[11],f=n[19],h=u(e,t);let d=i.get(t);if(d&&!d.l.size&&!Array.from(d.t).some(m=>{var v;return(v=i.get(m))==null?void 0:v.d.has(t)})){d.u&&a.add(d.u),d=void 0,i.delete(t),(r=l.u)==null||r.call(l,t);for(const m of h.d.keys()){const v=f(e,m);v==null||v.t.delete(t)}return}return d},sp=(e,t,r)=>{const n=Wr(e)[11],i=n(e,t),a="v"in i,l=i.v;if(ap(r))for(const u of i.d.keys())iL(t,r,n(e,u));i.v=r,delete i.e,(!a||!Object.is(l,i.v))&&(++i.n,ap(l)&&h8(l))},x8=(e,t)=>{const r=Wr(e)[14];return np(r(e,t))},C8=(e,t,...r)=>{const n=Wr(e),i=n[12],a=n[13],l=n[16];try{return l(e,t,...r)}finally{a(e),i(e)}},E8=(e,t,r)=>{const n=Wr(e),i=n[12],a=n[18],l=n[19],f=a(e,t).l;return f.add(r),i(e),()=>{f.delete(r),l(e,t),i(e)}},lL=new WeakMap;function Wr(e){const t=lL.get(e);if((Ul?"production":void 0)!=="production"&&!t)throw new Error("Store must be created by buildStore to read its building blocks");return t}function A8(...e){const t={get(n){const i=Wr(t)[21];return i(t,n)},set(n,...i){const a=Wr(t)[22];return a(t,n,...i)},sub(n,i){const a=Wr(t)[23];return a(t,n,i)}},r=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},f8,d8,p8,m8,v8,g8,y8,_8,b8,sL,S8,oL,w8,sp,x8,C8,E8].map((n,i)=>e[i]||n);return lL.set(t,Object.freeze(r)),t}const uL={};let O8=0;function ro(e,t){const r=`atom${++O8}`,n={toString(){return(uL?"production":void 0)!=="production"&&this.debugLabel?r+":"+this.debugLabel:r}};return typeof e=="function"?n.read=e:(n.init=e,n.read=k8,n.write=P8),n}function k8(e){return e(this)}function P8(e,t,r){return t(this,typeof r=="function"?r(e(this)):r)}function T8(){return A8()}let bc;function Jn(){return bc||(bc=T8(),(uL?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=bc),globalThis.__JOTAI_DEFAULT_STORE__!==bc&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),bc}const D8=w.createContext(void 0);function M8(e){return w.useContext(D8)||Jn()}const f0=e=>typeof(e==null?void 0:e.then)=="function",d0=e=>{e.status||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}))},R8=im.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(d0(e),e)}),By=new WeakMap,JO=(e,t)=>{let r=By.get(e);return r||(r=new Promise((n,i)=>{let a=e;const l=h=>d=>{a===h&&n(d)},u=h=>d=>{a===h&&i(d)},f=()=>{try{const h=t();f0(h)?(By.set(h,r),a=h,h.then(l(h),u(h)),h0(h,f)):n(h)}catch(h){i(h)}};e.then(l(e),u(e)),h0(e,f)}),By.set(e,r)),r};function nh(e,t){const{delay:r,unstable_promiseStatus:n=!im.use}={},i=M8(),[[a,l,u],f]=w.useReducer(d=>{const m=i.get(e);return Object.is(d[0],m)&&d[1]===i&&d[2]===e?d:[m,i,e]},void 0,()=>[i.get(e),i,e]);let h=a;if((l!==i||u!==e)&&(f(),h=i.get(e)),w.useEffect(()=>{const d=i.sub(e,()=>{if(n)try{const m=i.get(e);f0(m)&&d0(JO(m,()=>i.get(e)))}catch{}if(typeof r=="number"){setTimeout(f,r);return}f()});return f(),d},[i,e,r,n]),w.useDebugValue(h),f0(h)){const d=JO(h,()=>i.get(e));return n&&d0(d),R8(d)}return h}var Sc={},ek;function L8(){if(ek)return Sc;ek=1,Sc.byteLength=u,Sc.toByteArray=h,Sc.fromByteArray=v;for(var e=[],t=[],r=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,a=n.length;i<a;++i)e[i]=n[i],t[n.charCodeAt(i)]=i;t[45]=62,t[95]=63;function l(g){var S=g.length;if(S%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var _=g.indexOf("=");_===-1&&(_=S);var x=_===S?0:4-_%4;return[_,x]}function u(g){var S=l(g),_=S[0],x=S[1];return(_+x)*3/4-x}function f(g,S,_){return(S+_)*3/4-_}function h(g){var S,_=l(g),x=_[0],C=_[1],A=new r(f(g,x,C)),O=0,P=C>0?x-4:x,D;for(D=0;D<P;D+=4)S=t[g.charCodeAt(D)]<<18|t[g.charCodeAt(D+1)]<<12|t[g.charCodeAt(D+2)]<<6|t[g.charCodeAt(D+3)],A[O++]=S>>16&255,A[O++]=S>>8&255,A[O++]=S&255;return C===2&&(S=t[g.charCodeAt(D)]<<2|t[g.charCodeAt(D+1)]>>4,A[O++]=S&255),C===1&&(S=t[g.charCodeAt(D)]<<10|t[g.charCodeAt(D+1)]<<4|t[g.charCodeAt(D+2)]>>2,A[O++]=S>>8&255,A[O++]=S&255),A}function d(g){return e[g>>18&63]+e[g>>12&63]+e[g>>6&63]+e[g&63]}function m(g,S,_){for(var x,C=[],A=S;A<_;A+=3)x=(g[A]<<16&16711680)+(g[A+1]<<8&65280)+(g[A+2]&255),C.push(d(x));return C.join("")}function v(g){for(var S,_=g.length,x=_%3,C=[],A=16383,O=0,P=_-x;O<P;O+=A)C.push(m(g,O,O+A>P?P:O+A));return x===1?(S=g[_-1],C.push(e[S>>2]+e[S<<4&63]+"==")):x===2&&(S=(g[_-2]<<8)+g[_-1],C.push(e[S>>10]+e[S>>4&63]+e[S<<2&63]+"=")),C.join("")}return Sc}var B8=L8();const cL=Hr(B8);function N8(e){const t=e.replace(/\s+/g,"");return cL.toByteArray(t)}function I8(e){const t=new Uint8Array(e);return cL.fromByteArray(t)}const tk="tsunami:clientid";function j8(){const t=new URLSearchParams(window.location.search).get("clientid");if(t)return t;let r=sessionStorage.getItem(tk);return r||(r=crypto.randomUUID(),sessionStorage.setItem(tk,r)),r}const z8=/c{(.*)}/,ow="key",hL="code";function H8(e){let t=e.match(z8);return t!=null&&t.length>1?{key:t[1],type:hL}:(t!=null&&console.log("error: regexMatch is not null yet there is no captured group: ",t,e),{key:e,type:ow})}function F8(e){let t={key:"",mods:{}},r=e.replace(/[()]/g,"").split(":");for(let n of r)if(n=="Cmd")t.mods.Meta=!0,t.mods.Cmd=!0;else if(n=="Shift")t.mods.Shift=!0;else if(n=="Ctrl")t.mods.Ctrl=!0;else if(n=="Option")t.mods.Alt=!0,t.mods.Option=!0;else if(n=="Alt")t.mods.Option=!0,t.mods.Alt=!0;else if(n=="Meta")t.mods.Cmd=!0,t.mods.Meta=!0;else{let{key:i,type:a}=H8(n);t.key=i,t.keyType=a,t.keyType==ow&&n.length==1&&(/[A-Z]/.test(n.charAt(0))?t.mods.Shift=!0:n==" "&&(t.key="Space"))}return t}function Ol(e,t){return e&&!t||t&&!e}function U8(e,t){let r=F8(t);if(Ol(r.mods.Option,e.option)||Ol(r.mods.Cmd,e.cmd)||Ol(r.mods.Shift,e.shift)||Ol(r.mods.Ctrl,e.control)||Ol(r.mods.Alt,e.alt)||Ol(r.mods.Meta,e.meta))return!1;let n="",i=r.key;return r.keyType==hL&&(n=e.code),r.keyType==ow&&(n=e.key,n!=null&&n.length==1&&/[A-Z]/.test(n.charAt(0))?(n=n.toLocaleLowerCase(),i=i.toLocaleLowerCase()):n==" "&&(n="Space")),i==n}function fL(e){let t={};return t.control=e.ctrlKey,t.shift=e.shiftKey,t.cmd=e.metaKey,t.option=e.altKey,t.meta=e.metaKey,t.alt=e.altKey,t.code=e.code,t.key=e.key,t.location=e.location,e.type=="keydown"||e.type=="keyup"||e.type=="keypress"?t.type=e.type:t.type="unknown",t.repeat=e.repeat,t}const dL="#text";function pL(e){return e.tag==dL?e.text:e.children?e.children.map(r=>pL(r)).join(""):null}function $8(e){if(!e.transferelems||!e.renderupdates)return;const t=new Map;e.transfertext&&e.transfertext.forEach(n=>{t.set(n.id,n.text)});const r=new Map;e.transferelems.forEach(n=>{n.waveid&&r.set(n.waveid,{waveid:n.waveid,tag:n.tag,props:n.props,children:[],text:n.text})}),e.transferelems.forEach(n=>{const i=r.get(n.waveid);!i||!n.children||n.children.length===0||(i.children=n.children.map(a=>{if(a.startsWith("t:")){const l=parseInt(a.slice(2)),u=t.get(l);return u!=null?{tag:dL,text:u}:null}return r.get(a)}).filter(a=>a!=null))}),e.renderupdates.forEach(n=>{n.vdomwaveid&&(n.vdom=r.get(n.vdomwaveid))})}function Ny(e){return e!=null&&typeof e.__termWrite=="function"}function rk(e,t){const{op:r,params:n}=t;if(r==="termwrite"){const i=n==null?void 0:n[0];typeof i=="string"&&i!==""&&e.__termWrite(i)}else r==="focus"&&e.__termFocus()}function K8(e,t,r){const n=e.getContext("2d");if(!n){console.error("Canvas 2D context not available.");return}let{op:i,params:a,outputref:l}=t;if(a==null&&(a=[]),i==null||i=="")return;const u=[];a.forEach(f=>{if(typeof f=="string"&&f.startsWith("#ref:")){const h=f.slice(5);u.push(r.get(h))}else if(typeof f=="string"&&f.startsWith("#spreadRef:")){const h=f.slice(11),d=r.get(h);Array.isArray(d)?u.push(...d):console.error(`Reference ${h} is not an array and cannot be spread.`)}else u.push(f)}),i==="dropRef"&&a.length>0&&typeof a[0]=="string"?r.delete(a[0]):i==="addRef"&&l?r.set(l,u[0]):typeof n[i]=="function"?n[i].apply(n,u):i in n?n[i]=u[0]:console.error(`Unsupported canvas operation: ${i}`)}const cs=eL("wave:vdom");function mL(e,t){if(e!=null&&(e.waveid!=null&&t.set(e.waveid,e),e.children!=null))for(let r of e.children)mL(r,t)}function nk(e){return e==null||e===""}async function ik(e,t){if(e.size>5242880)return{fieldname:t,name:e.name,size:e.size,type:e.type,error:"File size exceeds 5MB limit"};const n=await e.arrayBuffer(),i=I8(n);return{fieldname:t,name:e.name,size:e.size,type:e.type,data64:i}}function q8(e,t,r){var n,i;if(r!=null){if(t=="onChange"){const a=r;e.targetvalue=(n=a.target)==null?void 0:n.value,e.targetchecked=(i=a.target)==null?void 0:i.checked}if(t=="onClick"||t=="onMouseDown"||t=="onMouseUp"||t=="onDoubleClick"){const a=r;e.mousedata={button:a.button,buttons:a.buttons,alt:a.altKey,control:a.ctrlKey,shift:a.shiftKey,meta:a.metaKey,clientx:a.clientX,clienty:a.clientY,pagex:a.pageX,pagey:a.pageY,screenx:a.screenX,screeny:a.screenY,movementx:a.movementX,movementy:a.movementY},e.mousedata.cmd=e.mousedata.meta,e.mousedata.option=e.mousedata.alt}if(t=="onKeyDown"){const a=fL(r);e.keydata=a}}}async function W8(e,t,r){var n;if(t=="onSubmit"){const a=r.currentTarget;e.targetname=a.name,e.targetid=a.id;const l={method:(a.method||"get").toUpperCase(),enctype:a.enctype||"application/x-www-form-urlencoded",fields:{},files:{}};a.action&&(l.action=a.action),a.id&&(l.formid=a.id),a.name&&(l.formname=a.name);const u=new FormData(a);for(const[f,h]of u.entries())if(h instanceof File){if(!h.name&&h.size===0)continue;l.files[f]||(l.files[f]=[]),l.files[f].push(await ik(h,f))}else l.fields[f]||(l.fields[f]=[]),l.fields[f].push(h.toString());e.formdata=l}if(t=="onChange"){const i=r;if(((n=i.target)==null?void 0:n.type)==="file"&&i.target.files){e.targetname=i.target.name,e.targetid=i.target.id;const a=[],l=i.target.name||i.target.id||"file";for(let u=0;u<i.target.files.length;u++){const f=i.target.files[u];a.push(await ik(f,l))}e.targetfiles=a}}}class V8{constructor(){rt(this,"clientId");rt(this,"serverId");rt(this,"viewRef",{current:null});rt(this,"vdomRoot",ro());rt(this,"refs",new Map);rt(this,"batchedEvents",[]);rt(this,"messages",[]);rt(this,"needsResync",!0);rt(this,"vdomNodeVersion",new WeakMap);rt(this,"rootRefId",crypto.randomUUID());rt(this,"backendOpts");rt(this,"shouldDispose");rt(this,"disposed");rt(this,"hasPendingRequest");rt(this,"needsUpdate");rt(this,"maxNormalUpdateIntervalMs",100);rt(this,"needsImmediateUpdate");rt(this,"lastUpdateTs",0);rt(this,"queuedUpdate");rt(this,"contextActive");rt(this,"serverEventSource");rt(this,"refOutputStore",new Map);rt(this,"globalVersion",ro(0));rt(this,"hasBackendWork",!1);rt(this,"noPadding");rt(this,"cachedFaviconPath",null);rt(this,"cachedTitle",null);rt(this,"cachedShortDesc",null);rt(this,"reason",null);rt(this,"currentModal",ro(null));this.clientId=j8(),this.contextActive=ro(!1),this.reset(),this.noPadding=ro(!0),this.setupServerEventSource(),this.queueUpdate(!0,"initial")}dispose(){this.serverEventSource&&(this.serverEventSource.close(),this.serverEventSource=null)}setupServerEventSource(){this.serverEventSource&&this.serverEventSource.close();const t=`/api/updates?clientId=${encodeURIComponent(this.clientId)}`;this.serverEventSource=new EventSource(t),this.serverEventSource.addEventListener("asyncinitiation",r=>{cs("async-initiation SSE event received",r),this.queueUpdate(!0,"asyncinitiation")}),this.serverEventSource.addEventListener("showmodal",r=>{cs("showmodal SSE event received",r);try{const n=JSON.parse(r.data);Jn().set(this.currentModal,n)}catch(n){console.error("Failed to parse modal config:",n)}}),this.serverEventSource.addEventListener("termwrite",r=>{try{const n=JSON.parse(r.data);if((n==null?void 0:n.refid)==null||(n==null?void 0:n.data64)==null)return;const i={refid:n.refid,op:"termwrite",params:[n.data64]},a=this.getRefElem(i.refid);if(a==null)return;Ny(a)&&rk(a,i)}catch(n){console.error("Failed to parse termwrite event:",n)}}),this.serverEventSource.addEventListener("error",r=>{console.error("SSE connection error:",r)}),this.serverEventSource.addEventListener("open",r=>{cs("SSE connection opened",r)})}reset(){this.serverEventSource&&(this.serverEventSource.close(),this.serverEventSource=null),Jn().set(this.vdomRoot,null),this.refs.clear(),this.batchedEvents=[],this.messages=[],this.needsResync=!0,this.vdomNodeVersion=new WeakMap,this.rootRefId=crypto.randomUUID(),this.backendOpts={},this.shouldDispose=!1,this.disposed=!1,this.hasPendingRequest=!1,this.needsUpdate=!1,this.maxNormalUpdateIntervalMs=100,this.needsImmediateUpdate=!1,this.lastUpdateTs=0,this.queuedUpdate=null,this.refOutputStore.clear(),this.globalVersion=ro(0),this.hasBackendWork=!1,this.reason=null,this.cachedTitle=null,this.cachedShortDesc=null,Jn().set(this.contextActive,!1)}keyDownHandler(t){var r;return!((r=this.backendOpts)!=null&&r.globalkeyboardevents)||t.cmd||t.meta?!1:(this.batchedEvents.push({globaleventtype:"onKeyDown",waveid:null,eventtype:"onKeyDown",keydata:t}),this.queueUpdate(!1,"globalkeyboard"),!0)}hasRefUpdates(){for(let t of this.refs.values())if(t.updated)return!0;return!1}getRefUpdates(){let t=[];for(let r of this.refs.values())if(r.updated||r.vdomRef.trackposition&&r.elem!=null){const n={refid:r.vdomRef.refid,hascurrent:r.vdomRef.hascurrent};if(r.vdomRef.trackposition&&r.elem!=null&&(n.position={offsetheight:r.elem.offsetHeight,offsetwidth:r.elem.offsetWidth,scrollheight:r.elem.scrollHeight,scrollwidth:r.elem.scrollWidth,scrolltop:r.elem.scrollTop,boundingclientrect:r.elem.getBoundingClientRect()}),Ny(r.elem)){const i=r.elem.__termSize();i!=null&&(n.termsize=i)}t.push(n),r.updated=!1}return t}mergeReasons(t){if(!this.reason)return t;const r=this.reason.split(","),n=t.split(",");for(const i of n)r.includes(i)||r.push(i);return r.join(",")}queueUpdate(t=!1,r){if(this.disposed)return;r&&(this.reason=this.mergeReasons(r)),this.needsUpdate=!0;let n=10,i=Date.now();if(n>this.maxNormalUpdateIntervalMs&&(n=this.maxNormalUpdateIntervalMs),t){if(this.queuedUpdate){if(this.queuedUpdate.quick||this.queuedUpdate.ts<=i)return;clearTimeout(this.queuedUpdate.timeoutId),this.queuedUpdate=null}let f=setTimeout(()=>{this._sendRenderRequest(!0)},0);this.queuedUpdate={timeoutId:f,ts:i,quick:!0};return}if(this.queuedUpdate)return;let a=i-this.lastUpdateTs,l=null;a>=this.maxNormalUpdateIntervalMs?l=n:l=this.maxNormalUpdateIntervalMs-a,l<n&&(l=n);let u=setTimeout(()=>{this._sendRenderRequest(!1)},l);this.queuedUpdate={timeoutId:u,ts:i+l,quick:!1}}async _sendRenderRequest(t){if(this.queuedUpdate=null,!this.disposed){if(this.hasPendingRequest){t&&(this.needsImmediateUpdate=!0);return}if(!(!t&&!this.needsUpdate)){this.hasPendingRequest=!0,this.needsImmediateUpdate=!1;try{const r=this.createFeUpdate();cs("fe-update",r);const n=await fetch("/api/render",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok)throw new Error(`HTTP ${n.status}: ${n.statusText}`);this.serverEventSource&&this.serverEventSource.readyState===EventSource.CLOSED&&(cs("EventSource connection closed, reconnecting"),this.setupServerEventSource());const i=await n.json();i!==null&&($8(i),cs("be-update",i),this.handleBackendUpdate(i)),cs("update cycle done")}finally{this.lastUpdateTs=Date.now(),this.hasPendingRequest=!1}this.needsImmediateUpdate&&this.queueUpdate(!0,null)}}}getOrCreateRefContainer(t){let r=this.refs.get(t.refid);return r==null&&(r={refFn:n=>{r.elem=n;const i=n!=null;t.hascurrent!=i&&(r.updated=!0,t.hascurrent=i)},vdomRef:t,elem:null,updated:!1},this.refs.set(t.refid,r)),r}getVDomNodeVersionAtom(t){let r=this.vdomNodeVersion.get(t);return r==null&&(r=ro(0),this.vdomNodeVersion.set(t,r)),r}incVDomNodeVersion(t){if(t==null)return;const r=this.getVDomNodeVersionAtom(t);Jn().set(r,Jn().get(r)+1)}addErrorMessage(t){this.messages.push({messagetype:"error",message:t})}logTsunamiMeta(t){let r=!1;const n={};nk(t.title)||(t.title!==this.cachedTitle&&(r=!0,this.cachedTitle=t.title),n.title=t.title),nk(t.shortdesc)||(t.shortdesc!==this.cachedShortDesc&&(r=!0,this.cachedShortDesc=t.shortdesc),n.shortdesc=t.shortdesc),r&&console.log("TSUNAMI_META "+JSON.stringify(n))}handleRenderUpdates(t,r){if(t.renderupdates)for(let n of t.renderupdates){if(n.updatetype=="root"){Jn().set(this.vdomRoot,n.vdom);continue}if(n.updatetype=="append"){let i=r.get(n.waveid);if(i==null){this.addErrorMessage(`Could not find vdom with id ${n.waveid} (for renderupdates)`);continue}i.children==null&&(i.children=[]),i.children.push(n.vdom),this.incVDomNodeVersion(i);continue}if(n.updatetype=="replace"){let i=r.get(n.waveid);if(i==null){this.addErrorMessage(`Could not find vdom with id ${n.waveid} (for renderupdates)`);continue}if(n.index<0||i.children==null||i.children.length<=n.index){this.addErrorMessage(`Could not find child at index ${n.index} (for renderupdates)`);continue}i.children[n.index]=n.vdom,this.incVDomNodeVersion(i);continue}if(n.updatetype=="remove"){let i=r.get(n.waveid);if(i==null){this.addErrorMessage(`Could not find vdom with id ${n.waveid} (for renderupdates)`);continue}if(n.index<0||i.children==null||i.children.length<=n.index){this.addErrorMessage(`Could not find child at index ${n.index} (for renderupdates)`);continue}i.children.splice(n.index,1),this.incVDomNodeVersion(i);continue}if(n.updatetype=="insert"){let i=r.get(n.waveid);if(i==null){this.addErrorMessage(`Could not find vdom with id ${n.waveid} (for renderupdates)`);continue}if(i.children==null&&(i.children=[]),n.index<0||i.children.length<n.index){this.addErrorMessage(`Could not find child at index ${n.index} (for renderupdates)`);continue}i.children.splice(n.index,0,n.vdom),this.incVDomNodeVersion(i);continue}this.addErrorMessage(`Unknown updatetype ${n.updatetype}`)}}getRefElem(t){if(t==this.rootRefId)return this.viewRef.current;const r=this.refs.get(t);return r==null?void 0:r.elem}handleRefOperations(t,r){if(t.refoperations!=null)for(let n of t.refoperations){const i=this.getRefElem(n.refid);if(i==null){this.addErrorMessage(`Could not find ref with id ${n.refid}`);continue}if(i instanceof HTMLCanvasElement){K8(i,n,this.refOutputStore);continue}if(Ny(i)){rk(i,n);continue}if(n.op=="focus"){if(i==null){this.addErrorMessage(`Could not focus ref with id ${n.refid}: elem is null`);continue}try{i.focus()}catch(a){this.addErrorMessage(`Could not focus ref with id ${n.refid}: ${a.message}`)}}else this.addErrorMessage(`Unknown ref operation ${n.refid} ${n.op}`)}}updateFavicon(t){if(t===this.cachedFaviconPath)return;this.cachedFaviconPath=t;let r=document.querySelector('link[rel="icon"]');if(t)if(r)r.href=t;else{const n=document.createElement("link");n.rel="icon",n.href=t,document.head.appendChild(n)}else r&&r.remove()}handleBackendUpdate(t){if(t==null)return;this.serverId!=null&&this.serverId!==t.serverid&&(this.reset(),this.setupServerEventSource()),this.serverId=t.serverid,Jn().set(this.contextActive,!0);const r=new Map,n=Jn().get(this.vdomRoot);if(t.opts!=null&&(this.backendOpts=t.opts,t.opts.title&&t.opts.title.trim()!==""&&(document.title=t.opts.title),t.opts.faviconpath!==void 0&&this.updateFavicon(t.opts.faviconpath),this.logTsunamiMeta(t.opts)),mL(n,r),this.handleRenderUpdates(t,r),this.handleRefOperations(t,r),t.messages)for(let i of t.messages)console.log("vdom-message",i.messagetype,i.message),i.stacktrace&&console.log("vdom-message-stacktrace",i.stacktrace);Jn().set(this.globalVersion,Jn().get(this.globalVersion)+1),t.haswork&&(this.hasBackendWork=!0)}renderDone(t){cs("renderDone",t);let r=[],n=!1;this.hasRefUpdates()&&(r.push("refupdates"),n=!0),this.hasBackendWork&&(r.push("backendwork"),n=!0,this.hasBackendWork=!1),n&&this.queueUpdate(!0,r.join(","))}callVDomFunc(t,r,n,i){var u;const a={waveid:n,eventtype:i};t.globalevent&&(a.globaleventtype=t.globalevent),i=="onSubmit"||i=="onChange"&&((u=r.target)==null?void 0:u.type)==="file"?W8(a,i,r).then(()=>{this.batchedEvents.push(a),this.queueUpdate(!0,"event")}).catch(f=>{console.error("Error processing event:",f)}):(q8(a,i,r),this.batchedEvents.push(a),this.queueUpdate(!0,"event"))}createFeUpdate(){var i,a,l,u;const r={focused:document.hasFocus(),width:((a=(i=this.viewRef)==null?void 0:i.current)==null?void 0:a.offsetWidth)??0,height:((u=(l=this.viewRef)==null?void 0:l.current)==null?void 0:u.offsetHeight)??0,rootrefid:this.rootRefId,background:!1},n={type:"frontendupdate",ts:Date.now(),clientid:this.clientId,rendercontext:r,dispose:this.shouldDispose,resync:this.needsResync,events:this.batchedEvents,refupdates:this.getRefUpdates(),reason:this.reason};return this.needsResync=!1,this.batchedEvents=[],this.reason=null,this.shouldDispose&&(this.disposed=!0),n}async sendModalResult(t,r){const n={modalid:t,confirm:r};try{const i=await fetch("/api/modalresult",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});i.ok||console.error("Failed to send modal result:",i.statusText)}catch(i){console.error("Error sending modal result:",i)}Jn().set(this.currentModal,null)}}function vL(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=vL(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Me(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=vL(e))&&(n&&(n+=" "),n+=t);return n}const Y8=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},X8=(e,t)=>({classGroupId:e,validator:t}),gL=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),op="-",ak=[],G8="arbitrary..",Z8=e=>{const t=J8(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return Q8(l);const u=l.split(op),f=u[0]===""&&u.length>1?1:0;return yL(u,f,t)},getConflictingClassGroupIds:(l,u)=>{if(u){const f=n[l],h=r[l];return f?h?Y8(h,f):f:h||ak}return r[l]||ak}}},yL=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const i=e[t],a=r.nextPart.get(i);if(a){const h=yL(e,t+1,a);if(h)return h}const l=r.validators;if(l===null)return;const u=t===0?e.join(op):e.slice(t).join(op),f=l.length;for(let h=0;h<f;h++){const d=l[h];if(d.validator(u))return d.classGroupId}},Q8=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?G8+n:void 0})(),J8=e=>{const{theme:t,classGroups:r}=e;return eH(r,t)},eH=(e,t)=>{const r=gL();for(const n in e){const i=e[n];lw(i,r,n,t)}return r},lw=(e,t,r,n)=>{const i=e.length;for(let a=0;a<i;a++){const l=e[a];tH(l,t,r,n)}},tH=(e,t,r,n)=>{if(typeof e=="string"){rH(e,t,r);return}if(typeof e=="function"){nH(e,t,r,n);return}iH(e,t,r,n)},rH=(e,t,r)=>{const n=e===""?t:_L(t,e);n.classGroupId=r},nH=(e,t,r,n)=>{if(aH(e)){lw(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(X8(r,e))},iH=(e,t,r,n)=>{const i=Object.entries(e),a=i.length;for(let l=0;l<a;l++){const[u,f]=i[l];lw(f,_L(t,u),r,n)}},_L=(e,t)=>{let r=e;const n=t.split(op),i=n.length;for(let a=0;a<i;a++){const l=n[a];let u=r.nextPart.get(l);u||(u=gL(),r.nextPart.set(l,u)),r=u}return r},aH=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,sH=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const i=(a,l)=>{r[a]=l,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(a){let l=r[a];if(l!==void 0)return l;if((l=n[a])!==void 0)return i(a,l),l},set(a,l){a in r?r[a]=l:i(a,l)}}},p0="!",sk=":",oH=[],ok=(e,t,r,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),lH=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=i=>{const a=[];let l=0,u=0,f=0,h;const d=i.length;for(let _=0;_<d;_++){const x=i[_];if(l===0&&u===0){if(x===sk){a.push(i.slice(f,_)),f=_+1;continue}if(x==="/"){h=_;continue}}x==="["?l++:x==="]"?l--:x==="("?u++:x===")"&&u--}const m=a.length===0?i:i.slice(f);let v=m,g=!1;m.endsWith(p0)?(v=m.slice(0,-1),g=!0):m.startsWith(p0)&&(v=m.slice(1),g=!0);const S=h&&h>f?h-f:void 0;return ok(a,g,v,S)};if(t){const i=t+sk,a=n;n=l=>l.startsWith(i)?a(l.slice(i.length)):ok(oH,!1,l,void 0,!0)}if(r){const i=n;n=a=>r({className:a,parseClassName:i})}return n},uH=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let i=[];for(let a=0;a<r.length;a++){const l=r[a],u=l[0]==="[",f=t.has(l);u||f?(i.length>0&&(i.sort(),n.push(...i),i=[]),n.push(l)):i.push(l)}return i.length>0&&(i.sort(),n.push(...i)),n}},cH=e=>({cache:sH(e.cacheSize),parseClassName:lH(e),sortModifiers:uH(e),...Z8(e)}),hH=/\s+/,fH=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:a}=t,l=[],u=e.trim().split(hH);let f="";for(let h=u.length-1;h>=0;h-=1){const d=u[h],{isExternal:m,modifiers:v,hasImportantModifier:g,baseClassName:S,maybePostfixModifierPosition:_}=r(d);if(m){f=d+(f.length>0?" "+f:f);continue}let x=!!_,C=n(x?S.substring(0,_):S);if(!C){if(!x){f=d+(f.length>0?" "+f:f);continue}if(C=n(S),!C){f=d+(f.length>0?" "+f:f);continue}x=!1}const A=v.length===0?"":v.length===1?v[0]:a(v).join(":"),O=g?A+p0:A,P=O+C;if(l.indexOf(P)>-1)continue;l.push(P);const D=i(C,x);for(let k=0;k<D.length;++k){const R=D[k];l.push(O+R)}f=d+(f.length>0?" "+f:f)}return f},dH=(...e)=>{let t=0,r,n,i="";for(;t<e.length;)(r=e[t++])&&(n=bL(r))&&(i&&(i+=" "),i+=n);return i},bL=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=bL(e[n]))&&(r&&(r+=" "),r+=t);return r},pH=(e,...t)=>{let r,n,i,a;const l=f=>{const h=t.reduce((d,m)=>m(d),e());return r=cH(h),n=r.cache.get,i=r.cache.set,a=u,u(f)},u=f=>{const h=n(f);if(h)return h;const d=fH(f,r);return i(f,d),d};return a=l,(...f)=>a(dH(...f))},mH=[],lr=e=>{const t=r=>r[e]||mH;return t.isThemeGetter=!0,t},SL=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,wL=/^\((?:(\w[\w-]*):)?(.+)\)$/i,vH=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,gH=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,yH=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,_H=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,bH=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,SH=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,hs=e=>vH.test(e),qe=e=>!!e&&!Number.isNaN(Number(e)),fs=e=>!!e&&Number.isInteger(Number(e)),Iy=e=>e.endsWith("%")&&qe(e.slice(0,-1)),ua=e=>gH.test(e),xL=()=>!0,wH=e=>yH.test(e)&&!_H.test(e),uw=()=>!1,xH=e=>bH.test(e),CH=e=>SH.test(e),EH=e=>!we(e)&&!xe(e),AH=e=>Ps(e,AL,uw),we=e=>SL.test(e),no=e=>Ps(e,OL,wH),lk=e=>Ps(e,LH,qe),OH=e=>Ps(e,PL,xL),kH=e=>Ps(e,kL,uw),uk=e=>Ps(e,CL,uw),PH=e=>Ps(e,EL,CH),yd=e=>Ps(e,TL,xH),xe=e=>wL.test(e),wc=e=>Ro(e,OL),TH=e=>Ro(e,kL),ck=e=>Ro(e,CL),DH=e=>Ro(e,AL),MH=e=>Ro(e,EL),_d=e=>Ro(e,TL,!0),RH=e=>Ro(e,PL,!0),Ps=(e,t,r)=>{const n=SL.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Ro=(e,t,r=!1)=>{const n=wL.exec(e);return n?n[1]?t(n[1]):r:!1},CL=e=>e==="position"||e==="percentage",EL=e=>e==="image"||e==="url",AL=e=>e==="length"||e==="size"||e==="bg-size",OL=e=>e==="length",LH=e=>e==="number",kL=e=>e==="family-name",PL=e=>e==="number"||e==="weight",TL=e=>e==="shadow",BH=()=>{const e=lr("color"),t=lr("font"),r=lr("text"),n=lr("font-weight"),i=lr("tracking"),a=lr("leading"),l=lr("breakpoint"),u=lr("container"),f=lr("spacing"),h=lr("radius"),d=lr("shadow"),m=lr("inset-shadow"),v=lr("text-shadow"),g=lr("drop-shadow"),S=lr("blur"),_=lr("perspective"),x=lr("aspect"),C=lr("ease"),A=lr("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],D=()=>[...P(),xe,we],k=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],N=()=>[xe,we,f],$=()=>[hs,"full","auto",...N()],ee=()=>[fs,"none","subgrid",xe,we],F=()=>["auto",{span:["full",fs,xe,we]},fs,xe,we],z=()=>[fs,"auto",xe,we],j=()=>["auto","min","max","fr",xe,we],K=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...N()],q=()=>[hs,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],G=()=>[hs,"screen","full","dvw","lvw","svw","min","max","fit",...N()],ce=()=>[hs,"screen","full","lh","dvh","lvh","svh","min","max","fit",...N()],M=()=>[e,xe,we],I=()=>[...P(),ck,uk,{position:[xe,we]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],L=()=>["auto","cover","contain",DH,AH,{size:[xe,we]}],ue=()=>[Iy,wc,no],fe=()=>["","none","full",h,xe,we],pe=()=>["",qe,wc,no],Te=()=>["solid","dashed","dotted","double"],tt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ie=()=>[qe,Iy,ck,uk],Ee=()=>["","none",S,xe,we],Oe=()=>["none",qe,xe,we],le=()=>["none",qe,xe,we],ke=()=>[qe,xe,we],Be=()=>[hs,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ua],breakpoint:[ua],color:[xL],container:[ua],"drop-shadow":[ua],ease:["in","out","in-out"],font:[EH],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ua],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ua],shadow:[ua],spacing:["px",qe],text:[ua],"text-shadow":[ua],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",hs,we,xe,x]}],container:["container"],columns:[{columns:[qe,we,xe,u]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:D()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:$()}],"inset-x":[{"inset-x":$()}],"inset-y":[{"inset-y":$()}],start:[{"inset-s":$(),start:$()}],end:[{"inset-e":$(),end:$()}],"inset-bs":[{"inset-bs":$()}],"inset-be":[{"inset-be":$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[fs,"auto",xe,we]}],basis:[{basis:[hs,"full","auto",u,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,hs,"auto","initial","none",we]}],grow:[{grow:["",qe,xe,we]}],shrink:[{shrink:["",qe,xe,we]}],order:[{order:[fs,"first","last","none",xe,we]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":j()}],"auto-rows":[{"auto-rows":j()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...K(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...K()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":K()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pbs:[{pbs:N()}],pbe:[{pbe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mbs:[{mbs:B()}],mbe:[{mbe:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],"inline-size":[{inline:["auto",...G()]}],"min-inline-size":[{"min-inline":["auto",...G()]}],"max-inline-size":[{"max-inline":["none",...G()]}],"block-size":[{block:["auto",...ce()]}],"min-block-size":[{"min-block":["auto",...ce()]}],"max-block-size":[{"max-block":["none",...ce()]}],w:[{w:[u,"screen",...q()]}],"min-w":[{"min-w":[u,"screen","none",...q()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh",...q()]}],"font-size":[{text:["base",r,wc,no]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,RH,OH]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Iy,we]}],"font-family":[{font:[TH,kH,t]}],"font-features":[{"font-features":[we]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,xe,we]}],"line-clamp":[{"line-clamp":[qe,"none",xe,lk]}],leading:[{leading:[a,...N()]}],"list-image":[{"list-image":["none",xe,we]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",xe,we]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Te(),"wavy"]}],"text-decoration-thickness":[{decoration:[qe,"from-font","auto",xe,no]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[qe,"auto",xe,we]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",xe,we]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",xe,we]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:L()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},fs,xe,we],radial:["",xe,we],conic:[fs,xe,we]},MH,PH]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:ue()}],"gradient-via-pos":[{via:ue()}],"gradient-to-pos":[{to:ue()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:fe()}],"rounded-s":[{"rounded-s":fe()}],"rounded-e":[{"rounded-e":fe()}],"rounded-t":[{"rounded-t":fe()}],"rounded-r":[{"rounded-r":fe()}],"rounded-b":[{"rounded-b":fe()}],"rounded-l":[{"rounded-l":fe()}],"rounded-ss":[{"rounded-ss":fe()}],"rounded-se":[{"rounded-se":fe()}],"rounded-ee":[{"rounded-ee":fe()}],"rounded-es":[{"rounded-es":fe()}],"rounded-tl":[{"rounded-tl":fe()}],"rounded-tr":[{"rounded-tr":fe()}],"rounded-br":[{"rounded-br":fe()}],"rounded-bl":[{"rounded-bl":fe()}],"border-w":[{border:pe()}],"border-w-x":[{"border-x":pe()}],"border-w-y":[{"border-y":pe()}],"border-w-s":[{"border-s":pe()}],"border-w-e":[{"border-e":pe()}],"border-w-bs":[{"border-bs":pe()}],"border-w-be":[{"border-be":pe()}],"border-w-t":[{"border-t":pe()}],"border-w-r":[{"border-r":pe()}],"border-w-b":[{"border-b":pe()}],"border-w-l":[{"border-l":pe()}],"divide-x":[{"divide-x":pe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":pe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Te(),"hidden","none"]}],"divide-style":[{divide:[...Te(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-bs":[{"border-bs":M()}],"border-color-be":[{"border-be":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...Te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[qe,xe,we]}],"outline-w":[{outline:["",qe,wc,no]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",d,_d,yd]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",m,_d,yd]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[qe,no]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":pe()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",v,_d,yd]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[qe,xe,we]}],"mix-blend":[{"mix-blend":[...tt(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":tt()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":ie()}],"mask-image-linear-to-pos":[{"mask-linear-to":ie()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":ie()}],"mask-image-t-to-pos":[{"mask-t-to":ie()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":ie()}],"mask-image-r-to-pos":[{"mask-r-to":ie()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":ie()}],"mask-image-b-to-pos":[{"mask-b-to":ie()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":ie()}],"mask-image-l-to-pos":[{"mask-l-to":ie()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":ie()}],"mask-image-x-to-pos":[{"mask-x-to":ie()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":ie()}],"mask-image-y-to-pos":[{"mask-y-to":ie()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[xe,we]}],"mask-image-radial-from-pos":[{"mask-radial-from":ie()}],"mask-image-radial-to-pos":[{"mask-radial-to":ie()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":P()}],"mask-image-conic-pos":[{"mask-conic":[qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":ie()}],"mask-image-conic-to-pos":[{"mask-conic-to":ie()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:L()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",xe,we]}],filter:[{filter:["","none",xe,we]}],blur:[{blur:Ee()}],brightness:[{brightness:[qe,xe,we]}],contrast:[{contrast:[qe,xe,we]}],"drop-shadow":[{"drop-shadow":["","none",g,_d,yd]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",qe,xe,we]}],"hue-rotate":[{"hue-rotate":[qe,xe,we]}],invert:[{invert:["",qe,xe,we]}],saturate:[{saturate:[qe,xe,we]}],sepia:[{sepia:["",qe,xe,we]}],"backdrop-filter":[{"backdrop-filter":["","none",xe,we]}],"backdrop-blur":[{"backdrop-blur":Ee()}],"backdrop-brightness":[{"backdrop-brightness":[qe,xe,we]}],"backdrop-contrast":[{"backdrop-contrast":[qe,xe,we]}],"backdrop-grayscale":[{"backdrop-grayscale":["",qe,xe,we]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qe,xe,we]}],"backdrop-invert":[{"backdrop-invert":["",qe,xe,we]}],"backdrop-opacity":[{"backdrop-opacity":[qe,xe,we]}],"backdrop-saturate":[{"backdrop-saturate":[qe,xe,we]}],"backdrop-sepia":[{"backdrop-sepia":["",qe,xe,we]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",xe,we]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[qe,"initial",xe,we]}],ease:[{ease:["linear","initial",C,xe,we]}],delay:[{delay:[qe,xe,we]}],animate:[{animate:["none",A,xe,we]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,xe,we]}],"perspective-origin":[{"perspective-origin":D()}],rotate:[{rotate:Oe()}],"rotate-x":[{"rotate-x":Oe()}],"rotate-y":[{"rotate-y":Oe()}],"rotate-z":[{"rotate-z":Oe()}],scale:[{scale:le()}],"scale-x":[{"scale-x":le()}],"scale-y":[{"scale-y":le()}],"scale-z":[{"scale-z":le()}],"scale-3d":["scale-3d"],skew:[{skew:ke()}],"skew-x":[{"skew-x":ke()}],"skew-y":[{"skew-y":ke()}],transform:[{transform:[xe,we,"","none","gpu","cpu"]}],"transform-origin":[{origin:D()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Be()}],"translate-x":[{"translate-x":Be()}],"translate-y":[{"translate-y":Be()}],"translate-z":[{"translate-z":Be()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",xe,we]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mbs":[{"scroll-mbs":N()}],"scroll-mbe":[{"scroll-mbe":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pbs":[{"scroll-pbs":N()}],"scroll-pbe":[{"scroll-pbe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",xe,we]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[qe,wc,no,lk]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},DL=pH(BH);function NH(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const IH=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,jH=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,zH={};function hk(e,t){return(zH.jsx?jH:IH).test(e)}const HH=/[ \t\n\f\r]/g;function FH(e){return typeof e=="object"?e.type==="text"?fk(e.value):!1:fk(e)}function fk(e){return e.replace(HH,"")===""}class Sh{constructor(t,r,n){this.normal=r,this.property=t,n&&(this.space=n)}}Sh.prototype.normal={};Sh.prototype.property={};Sh.prototype.space=void 0;function ML(e,t){const r={},n={};for(const i of e)Object.assign(r,i.property),Object.assign(n,i.normal);return new Sh(r,n,t)}function m0(e){return e.toLowerCase()}class yn{constructor(t,r){this.attribute=r,this.property=t}}yn.prototype.attribute="";yn.prototype.booleanish=!1;yn.prototype.boolean=!1;yn.prototype.commaOrSpaceSeparated=!1;yn.prototype.commaSeparated=!1;yn.prototype.defined=!1;yn.prototype.mustUseProperty=!1;yn.prototype.number=!1;yn.prototype.overloadedBoolean=!1;yn.prototype.property="";yn.prototype.spaceSeparated=!1;yn.prototype.space=void 0;let UH=0;const He=Lo(),tr=Lo(),v0=Lo(),de=Lo(),xt=Lo(),Il=Lo(),Pn=Lo();function Lo(){return 2**++UH}const g0=Object.freeze(Object.defineProperty({__proto__:null,boolean:He,booleanish:tr,commaOrSpaceSeparated:Pn,commaSeparated:Il,number:de,overloadedBoolean:v0,spaceSeparated:xt},Symbol.toStringTag,{value:"Module"})),jy=Object.keys(g0);class cw extends yn{constructor(t,r,n,i){let a=-1;if(super(t,r),dk(this,"space",i),typeof n=="number")for(;++a<jy.length;){const l=jy[a];dk(this,jy[a],(n&g0[l])===g0[l])}}}cw.prototype.defined=!0;function dk(e,t,r){r&&(e[t]=r)}function ru(e){const t={},r={};for(const[n,i]of Object.entries(e.properties)){const a=new cw(n,e.transform(e.attributes||{},n),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(a.mustUseProperty=!0),t[n]=a,r[m0(n)]=n,r[m0(a.attribute)]=n}return new Sh(t,r,e.space)}const RL=ru({properties:{ariaActiveDescendant:null,ariaAtomic:tr,ariaAutoComplete:null,ariaBusy:tr,ariaChecked:tr,ariaColCount:de,ariaColIndex:de,ariaColSpan:de,ariaControls:xt,ariaCurrent:null,ariaDescribedBy:xt,ariaDetails:null,ariaDisabled:tr,ariaDropEffect:xt,ariaErrorMessage:null,ariaExpanded:tr,ariaFlowTo:xt,ariaGrabbed:tr,ariaHasPopup:null,ariaHidden:tr,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xt,ariaLevel:de,ariaLive:null,ariaModal:tr,ariaMultiLine:tr,ariaMultiSelectable:tr,ariaOrientation:null,ariaOwns:xt,ariaPlaceholder:null,ariaPosInSet:de,ariaPressed:tr,ariaReadOnly:tr,ariaRelevant:null,ariaRequired:tr,ariaRoleDescription:xt,ariaRowCount:de,ariaRowIndex:de,ariaRowSpan:de,ariaSelected:tr,ariaSetSize:de,ariaSort:null,ariaValueMax:de,ariaValueMin:de,ariaValueNow:de,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function LL(e,t){return t in e?e[t]:t}function BL(e,t){return LL(e,t.toLowerCase())}const $H=ru({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Il,acceptCharset:xt,accessKey:xt,action:null,allow:null,allowFullScreen:He,allowPaymentRequest:He,allowUserMedia:He,alt:null,as:null,async:He,autoCapitalize:null,autoComplete:xt,autoFocus:He,autoPlay:He,blocking:xt,capture:null,charSet:null,checked:He,cite:null,className:xt,cols:de,colSpan:null,content:null,contentEditable:tr,controls:He,controlsList:xt,coords:de|Il,crossOrigin:null,data:null,dateTime:null,decoding:null,default:He,defer:He,dir:null,dirName:null,disabled:He,download:v0,draggable:tr,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:He,formTarget:null,headers:xt,height:de,hidden:v0,high:de,href:null,hrefLang:null,htmlFor:xt,httpEquiv:xt,id:null,imageSizes:null,imageSrcSet:null,inert:He,inputMode:null,integrity:null,is:null,isMap:He,itemId:null,itemProp:xt,itemRef:xt,itemScope:He,itemType:xt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:He,low:de,manifest:null,max:null,maxLength:de,media:null,method:null,min:null,minLength:de,multiple:He,muted:He,name:null,nonce:null,noModule:He,noValidate:He,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:He,optimum:de,pattern:null,ping:xt,placeholder:null,playsInline:He,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:He,referrerPolicy:null,rel:xt,required:He,reversed:He,rows:de,rowSpan:de,sandbox:xt,scope:null,scoped:He,seamless:He,selected:He,shadowRootClonable:He,shadowRootDelegatesFocus:He,shadowRootMode:null,shape:null,size:de,sizes:null,slot:null,span:de,spellCheck:tr,src:null,srcDoc:null,srcLang:null,srcSet:null,start:de,step:null,style:null,tabIndex:de,target:null,title:null,translate:null,type:null,typeMustMatch:He,useMap:null,value:tr,width:de,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xt,axis:null,background:null,bgColor:null,border:de,borderColor:null,bottomMargin:de,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:He,declare:He,event:null,face:null,frame:null,frameBorder:null,hSpace:de,leftMargin:de,link:null,longDesc:null,lowSrc:null,marginHeight:de,marginWidth:de,noResize:He,noHref:He,noShade:He,noWrap:He,object:null,profile:null,prompt:null,rev:null,rightMargin:de,rules:null,scheme:null,scrolling:tr,standby:null,summary:null,text:null,topMargin:de,valueType:null,version:null,vAlign:null,vLink:null,vSpace:de,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:He,disableRemotePlayback:He,prefix:null,property:null,results:de,security:null,unselectable:null},space:"html",transform:BL}),KH=ru({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Pn,accentHeight:de,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:de,amplitude:de,arabicForm:null,ascent:de,attributeName:null,attributeType:null,azimuth:de,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:de,by:null,calcMode:null,capHeight:de,className:xt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:de,diffuseConstant:de,direction:null,display:null,dur:null,divisor:de,dominantBaseline:null,download:He,dx:null,dy:null,edgeMode:null,editable:null,elevation:de,enableBackground:null,end:null,event:null,exponent:de,externalResourcesRequired:null,fill:null,fillOpacity:de,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Il,g2:Il,glyphName:Il,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:de,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:de,horizOriginX:de,horizOriginY:de,id:null,ideographic:de,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:de,k:de,k1:de,k2:de,k3:de,k4:de,kernelMatrix:Pn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:de,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:de,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:de,overlineThickness:de,paintOrder:null,panose1:null,path:null,pathLength:de,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:de,pointsAtY:de,pointsAtZ:de,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Pn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Pn,rev:Pn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Pn,requiredFeatures:Pn,requiredFonts:Pn,requiredFormats:Pn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:de,specularExponent:de,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:de,strikethroughThickness:de,string:null,stroke:null,strokeDashArray:Pn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:de,strokeOpacity:de,strokeWidth:null,style:null,surfaceScale:de,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Pn,tabIndex:de,tableValues:null,target:null,targetX:de,targetY:de,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Pn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:de,underlineThickness:de,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:de,values:null,vAlphabetic:de,vMathematical:de,vectorEffect:null,vHanging:de,vIdeographic:de,version:null,vertAdvY:de,vertOriginX:de,vertOriginY:de,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:de,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:LL}),NL=ru({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),IL=ru({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:BL}),jL=ru({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),qH={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},WH=/[A-Z]/g,pk=/-[a-z]/g,VH=/^data[-\w.:]+$/i;function YH(e,t){const r=m0(t);let n=t,i=yn;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&VH.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(pk,GH);n="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!pk.test(a)){let l=a.replace(WH,XH);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=cw}return new i(n,t)}function XH(e){return"-"+e.toLowerCase()}function GH(e){return e.charAt(1).toUpperCase()}const ZH=ML([RL,$H,NL,IL,jL],"html"),hw=ML([RL,KH,NL,IL,jL],"svg");function QH(e){return e.join(" ").trim()}var kl={},zy,mk;function JH(){if(mk)return zy;mk=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,u=/^\s+|\s+$/g,f=`
`,h="/",d="*",m="",v="comment",g="declaration";zy=function(_,x){if(typeof _!="string")throw new TypeError("First argument must be a string");if(!_)return[];x=x||{};var C=1,A=1;function O(j){var K=j.match(t);K&&(C+=K.length);var W=j.lastIndexOf(f);A=~W?j.length-W:A+j.length}function P(){var j={line:C,column:A};return function(K){return K.position=new D(j),N(),K}}function D(j){this.start=j,this.end={line:C,column:A},this.source=x.source}D.prototype.content=_;function k(j){var K=new Error(x.source+":"+C+":"+A+": "+j);if(K.reason=j,K.filename=x.source,K.line=C,K.column=A,K.source=_,!x.silent)throw K}function R(j){var K=j.exec(_);if(K){var W=K[0];return O(W),_=_.slice(W.length),K}}function N(){R(r)}function $(j){var K;for(j=j||[];K=ee();)K!==!1&&j.push(K);return j}function ee(){var j=P();if(!(h!=_.charAt(0)||d!=_.charAt(1))){for(var K=2;m!=_.charAt(K)&&(d!=_.charAt(K)||h!=_.charAt(K+1));)++K;if(K+=2,m===_.charAt(K-1))return k("End of comment missing");var W=_.slice(2,K-2);return A+=2,O(W),_=_.slice(K),A+=2,j({type:v,comment:W})}}function F(){var j=P(),K=R(n);if(K){if(ee(),!R(i))return k("property missing ':'");var W=R(a),B=j({type:g,property:S(K[0].replace(e,m)),value:W?S(W[0].replace(e,m)):m});return R(l),B}}function z(){var j=[];$(j);for(var K;K=F();)K!==!1&&(j.push(K),$(j));return j}return N(),z()};function S(_){return _?_.replace(u,m):m}return zy}var vk;function eF(){if(vk)return kl;vk=1;var e=kl&&kl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(kl,"__esModule",{value:!0}),kl.default=r;var t=e(JH());function r(n,i){var a=null;if(!n||typeof n!="string")return a;var l=(0,t.default)(n),u=typeof i=="function";return l.forEach(function(f){if(f.type==="declaration"){var h=f.property,d=f.value;u?i(h,d,f):d&&(a=a||{},a[h]=d)}}),a}return kl}var xc={},gk;function tF(){if(gk)return xc;gk=1,Object.defineProperty(xc,"__esModule",{value:!0}),xc.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,n=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(h){return!h||r.test(h)||e.test(h)},l=function(h,d){return d.toUpperCase()},u=function(h,d){return"".concat(d,"-")},f=function(h,d){return d===void 0&&(d={}),a(h)?h:(h=h.toLowerCase(),d.reactCompat?h=h.replace(i,u):h=h.replace(n,u),h.replace(t,l))};return xc.camelCase=f,xc}var Cc,yk;function rF(){if(yk)return Cc;yk=1;var e=Cc&&Cc.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(eF()),r=tF();function n(i,a){var l={};return!i||typeof i!="string"||(0,t.default)(i,function(u,f){u&&f&&(l[(0,r.camelCase)(u,a)]=f)}),l}return n.default=n,Cc=n,Cc}var nF=rF();const iF=Hr(nF),zL=HL("end"),fw=HL("start");function HL(e){return t;function t(r){const n=r&&r.position&&r.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function aF(e){const t=fw(e),r=zL(e);if(t&&r)return{start:t,end:r}}function Xc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?_k(e.position):"start"in e||"end"in e?_k(e):"line"in e||"column"in e?y0(e):""}function y0(e){return bk(e&&e.line)+":"+bk(e&&e.column)}function _k(e){return y0(e&&e.start)+"-"+y0(e&&e.end)}function bk(e){return e&&typeof e=="number"?e:1}class Yr extends Error{constructor(t,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let i="",a={},l=!1;if(r&&("line"in r&&"column"in r?a={place:r}:"start"in r&&"end"in r?a={place:r}:"type"in r?a={ancestors:[r],place:r.position}:a={...r}),typeof t=="string"?i=t:!a.cause&&t&&(l=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof n=="string"){const f=n.indexOf(":");f===-1?a.ruleId=n:(a.source=n.slice(0,f),a.ruleId=n.slice(f+1))}if(!a.place&&a.ancestors&&a.ancestors){const f=a.ancestors[a.ancestors.length-1];f&&(a.place=f.position)}const u=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=Xc(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=l&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Yr.prototype.file="";Yr.prototype.name="";Yr.prototype.reason="";Yr.prototype.message="";Yr.prototype.stack="";Yr.prototype.column=void 0;Yr.prototype.line=void 0;Yr.prototype.ancestors=void 0;Yr.prototype.cause=void 0;Yr.prototype.fatal=void 0;Yr.prototype.place=void 0;Yr.prototype.ruleId=void 0;Yr.prototype.source=void 0;const dw={}.hasOwnProperty,sF=new Map,oF=/[A-Z]/g,lF=new Set(["table","tbody","thead","tfoot","tr"]),uF=new Set(["td","th"]),FL="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function cF(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=yF(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=gF(r,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?hw:ZH,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=UL(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function UL(e,t,r){if(t.type==="element")return hF(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return fF(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return pF(e,t,r);if(t.type==="mdxjsEsm")return dF(e,t);if(t.type==="root")return mF(e,t,r);if(t.type==="text")return vF(e,t)}function hF(e,t,r){const n=e.schema;let i=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(i=hw,e.schema=i),e.ancestors.push(t);const a=KL(e,t.tagName,!1),l=_F(e,t);let u=mw(e,t);return lF.has(t.tagName)&&(u=u.filter(function(f){return typeof f=="string"?!FH(f):!0})),$L(e,l,a,t),pw(l,u),e.ancestors.pop(),e.schema=n,e.create(t,a,l,r)}function fF(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}ih(e,t.position)}function dF(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ih(e,t.position)}function pF(e,t,r){const n=e.schema;let i=n;t.name==="svg"&&n.space==="html"&&(i=hw,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:KL(e,t.name,!0),l=bF(e,t),u=mw(e,t);return $L(e,l,a,t),pw(l,u),e.ancestors.pop(),e.schema=n,e.create(t,a,l,r)}function mF(e,t,r){const n={};return pw(n,mw(e,t)),e.create(t,e.Fragment,n,r)}function vF(e,t){return t.value}function $L(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function pw(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function gF(e,t,r){return n;function n(i,a,l,u){const h=Array.isArray(l.children)?r:t;return u?h(a,l,u):h(a,l)}}function yF(e,t){return r;function r(n,i,a,l){const u=Array.isArray(a.children),f=fw(n);return t(i,a,l,u,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function _F(e,t){const r={};let n,i;for(i in t.properties)if(i!=="children"&&dw.call(t.properties,i)){const a=SF(e,i,t.properties[i]);if(a){const[l,u]=a;e.tableCellAlignToStyle&&l==="align"&&typeof u=="string"&&uF.has(t.tagName)?n=u:r[l]=u}}if(n){const a=r.style||(r.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function bF(e,t){const r={};for(const n of t.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){const a=n.data.estree.body[0];a.type;const l=a.expression;l.type;const u=l.properties[0];u.type,Object.assign(r,e.evaluater.evaluateExpression(u.argument))}else ih(e,t.position);else{const i=n.name;let a;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){const u=n.value.data.estree.body[0];u.type,a=e.evaluater.evaluateExpression(u.expression)}else ih(e,t.position);else a=n.value===null?!0:n.value;r[i]=a}return r}function mw(e,t){const r=[];let n=-1;const i=e.passKeys?new Map:sF;for(;++n<t.children.length;){const a=t.children[n];let l;if(e.passKeys){const f=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(f){const h=i.get(f)||0;l=f+"-"+h,i.set(f,h+1)}}const u=UL(e,a,l);u!==void 0&&r.push(u)}return r}function SF(e,t,r){const n=YH(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?NH(r):QH(r)),n.property==="style"){let i=typeof r=="object"?r:wF(e,String(r));return e.stylePropertyNameCase==="css"&&(i=xF(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&n.space?qH[n.property]||n.property:n.attribute,r]}}function wF(e,t){try{return iF(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const n=r,i=new Yr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=FL+"#cannot-parse-style-attribute",i}}function KL(e,t,r){let n;if(!r)n={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,l;for(;++a<i.length;){const u=hk(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};l=l?{type:"MemberExpression",object:l,property:u,computed:!!(a&&u.type==="Literal"),optional:!1}:u}n=l}else n=hk(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(n.type==="Literal"){const i=n.value;return dw.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(n);ih(e)}function ih(e,t){const r=new Yr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=FL+"#cannot-handle-mdx-estrees-without-createevaluater",r}function xF(e){const t={};let r;for(r in e)dw.call(e,r)&&(t[CF(r)]=e[r]);return t}function CF(e){let t=e.replace(oF,EF);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function EF(e){return"-"+e.toLowerCase()}const Hy={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},AF={};function OF(e,t){const r=AF,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return qL(e,n,i)}function qL(e,t,r){if(kF(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Sk(e.children,t,r)}return Array.isArray(e)?Sk(e,t,r):""}function Sk(e,t,r){const n=[];let i=-1;for(;++i<e.length;)n[i]=qL(e[i],t,r);return n.join("")}function kF(e){return!!(e&&typeof e=="object")}const wk=document.createElement("i");function vw(e){const t="&"+e+";";wk.innerHTML=t;const r=wk.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function Fi(e,t,r,n){const i=e.length;let a=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,r=r>0?r:0,n.length<1e4)l=Array.from(n),l.unshift(t,r),e.splice(...l);else for(r&&e.splice(t,r);a<n.length;)l=n.slice(a,a+1e4),l.unshift(t,0),e.splice(...l),a+=1e4,t+=1e4}function ni(e,t){return e.length>0?(Fi(e,e.length,0,t),e):t}const xk={}.hasOwnProperty;function PF(e){const t={};let r=-1;for(;++r<e.length;)TF(t,e[r]);return t}function TF(e,t){let r;for(r in t){const i=(xk.call(e,r)?e[r]:void 0)||(e[r]={}),a=t[r];let l;if(a)for(l in a){xk.call(i,l)||(i[l]=[]);const u=a[l];DF(i[l],Array.isArray(u)?u:u?[u]:[])}}}function DF(e,t){let r=-1;const n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);Fi(e,0,0,n)}function WL(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function jl(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ck=MF(/[\dA-Za-z]/);function MF(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function nu(e){const t=[];let r=-1,n=0,i=0;for(;++r<e.length;){const a=e.charCodeAt(r);let l="";if(a===37&&Ck(e.charCodeAt(r+1))&&Ck(e.charCodeAt(r+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(l=String.fromCharCode(a));else if(a>55295&&a<57344){const u=e.charCodeAt(r+1);a<56320&&u>56319&&u<57344?(l=String.fromCharCode(a,u),i=1):l="�"}else l=String.fromCharCode(a);l&&(t.push(e.slice(n,r),encodeURIComponent(l)),n=r+i+1,l=""),i&&(r+=i,i=0)}return t.join("")+e.slice(n)}function gw(e){return e!==null&&e<-2}function Ek(e){return e===-2||e===-1||e===32}function yw(e,t,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let a=0;return l;function l(f){return Ek(f)?(e.enter(r),u(f)):t(f)}function u(f){return Ek(f)&&a++<i?(e.consume(f),u):(e.exit(r),t(f))}}const RF={tokenize:LF};function LF(e){const t=e.attempt(this.parser.constructs.contentInitial,n,i);let r;return t;function n(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),yw(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),a(u)}function a(u){const f=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=f),r=f,l(u)}function l(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return gw(u)?(e.consume(u),e.exit("chunkText"),a):(e.consume(u),l)}}const BF={tokenize:NF},Ak={tokenize:IF};function NF(e){const t=this,r=[];let n=0,i,a,l;return u;function u(O){if(n<r.length){const P=r[n];return t.containerState=P[1],e.attempt(P[0].continuation,f,h)(O)}return h(O)}function f(O){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&A();const P=t.events.length;let D=P,k;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){k=t.events[D][1].end;break}C(n);let R=P;for(;R<t.events.length;)t.events[R][1].end={...k},R++;return Fi(t.events,D+1,0,t.events.slice(P)),t.events.length=R,h(O)}return u(O)}function h(O){if(n===r.length){if(!i)return v(O);if(i.currentConstruct&&i.currentConstruct.concrete)return S(O);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ak,d,m)(O)}function d(O){return i&&A(),C(n),v(O)}function m(O){return t.parser.lazy[t.now().line]=n!==r.length,l=t.now().offset,S(O)}function v(O){return t.containerState={},e.attempt(Ak,g,S)(O)}function g(O){return n++,r.push([t.currentConstruct,t.containerState]),v(O)}function S(O){if(O===null){i&&A(),C(0),e.consume(O);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),_(O)}function _(O){if(O===null){x(e.exit("chunkFlow"),!0),C(0),e.consume(O);return}return gw(O)?(e.consume(O),x(e.exit("chunkFlow")),n=0,t.interrupt=void 0,u):(e.consume(O),_)}function x(O,P){const D=t.sliceStream(O);if(P&&D.push(null),O.previous=a,a&&(a.next=O),a=O,i.defineSkip(O.start),i.write(D),t.parser.lazy[O.start.line]){let k=i.events.length;for(;k--;)if(i.events[k][1].start.offset<l&&(!i.events[k][1].end||i.events[k][1].end.offset>l))return;const R=t.events.length;let N=R,$,ee;for(;N--;)if(t.events[N][0]==="exit"&&t.events[N][1].type==="chunkFlow"){if($){ee=t.events[N][1].end;break}$=!0}for(C(n),k=R;k<t.events.length;)t.events[k][1].end={...ee},k++;Fi(t.events,N+1,0,t.events.slice(R)),t.events.length=k}}function C(O){let P=r.length;for(;P-- >O;){const D=r[P];t.containerState=D[1],D[0].exit.call(t,e)}r.length=O}function A(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function IF(e,t,r){return yw(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function jF(e){return e!==null&&(e<0||e===32)}const zF=VL(new RegExp("\\p{P}|\\p{S}","u")),HF=VL(/\s/);function VL(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Ok(e){if(e===null||jF(e)||HF(e))return 1;if(zF(e))return 2}function _w(e,t,r){const n=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!n.includes(a)&&(t=a(t,r),n.push(a))}return t}const _0={name:"attention",resolveAll:FF,tokenize:UF};function FF(e,t){let r=-1,n,i,a,l,u,f,h,d;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(n=r;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;f=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const m={...e[n][1].end},v={...e[r][1].start};kk(m,-f),kk(v,f),l={type:f>1?"strongSequence":"emphasisSequence",start:m,end:{...e[n][1].end}},u={type:f>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:v},a={type:f>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[r][1].start}},i={type:f>1?"strong":"emphasis",start:{...l.start},end:{...u.end}},e[n][1].end={...l.start},e[r][1].start={...u.end},h=[],e[n][1].end.offset-e[n][1].start.offset&&(h=ni(h,[["enter",e[n][1],t],["exit",e[n][1],t]])),h=ni(h,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",a,t]]),h=ni(h,_w(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),h=ni(h,[["exit",a,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[r][1].end.offset-e[r][1].start.offset?(d=2,h=ni(h,[["enter",e[r][1],t],["exit",e[r][1],t]])):d=0,Fi(e,n-1,r-n+3,h),r=n+h.length-d-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function UF(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=Ok(n);let a;return l;function l(f){return a=f,e.enter("attentionSequence"),u(f)}function u(f){if(f===a)return e.consume(f),u;const h=e.exit("attentionSequence"),d=Ok(f),m=!d||d===2&&i||r.includes(f),v=!i||i===2&&d||r.includes(n);return h._open=!!(a===42?m:m&&(i||!v)),h._close=!!(a===42?v:v&&(d||!m)),t(f)}}function kk(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Ri=iu(/[A-Za-z]/),Si=iu(/[\dA-Za-z]/),$F=iu(/[#-'*+\--9=?A-Z^-~]/);function KF(e){return e!==null&&(e<32||e===127)}const b0=iu(/\d/),qF=iu(/[\dA-Fa-f]/),WF=iu(/[!-/:-@[-`{-~]/);function Ve(e){return e!==null&&e<-2}function si(e){return e!==null&&(e<0||e===32)}function dt(e){return e===-2||e===-1||e===32}function iu(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}const VF={name:"autolink",tokenize:YF};function YF(e,t,r){let n=0;return i;function i(g){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(g){return Ri(g)?(e.consume(g),l):g===64?r(g):h(g)}function l(g){return g===43||g===45||g===46||Si(g)?(n=1,u(g)):h(g)}function u(g){return g===58?(e.consume(g),n=0,f):(g===43||g===45||g===46||Si(g))&&n++<32?(e.consume(g),u):(n=0,h(g))}function f(g){return g===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):g===null||g===32||g===60||KF(g)?r(g):(e.consume(g),f)}function h(g){return g===64?(e.consume(g),d):$F(g)?(e.consume(g),h):r(g)}function d(g){return Si(g)?m(g):r(g)}function m(g){return g===46?(e.consume(g),n=0,d):g===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):v(g)}function v(g){if((g===45||Si(g))&&n++<63){const S=g===45?v:m;return e.consume(g),S}return r(g)}}function Vt(e,t,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let a=0;return l;function l(f){return dt(f)?(e.enter(r),u(f)):t(f)}function u(f){return dt(f)&&a++<i?(e.consume(f),u):(e.exit(r),t(f))}}const am={partial:!0,tokenize:XF};function XF(e,t,r){return n;function n(a){return dt(a)?Vt(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Ve(a)?t(a):r(a)}}const YL={continuation:{tokenize:ZF},exit:QF,name:"blockQuote",tokenize:GF};function GF(e,t,r){const n=this;return i;function i(l){if(l===62){const u=n.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),a}return r(l)}function a(l){return dt(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function ZF(e,t,r){const n=this;return i;function i(l){return dt(l)?Vt(e,a,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):a(l)}function a(l){return e.attempt(YL,t,r)(l)}}function QF(e){e.exit("blockQuote")}const XL={name:"characterEscape",tokenize:JF};function JF(e,t,r){return n;function n(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return WF(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}const GL={name:"characterReference",tokenize:eU};function eU(e,t,r){const n=this;let i=0,a,l;return u;function u(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),f}function f(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),a=31,l=Si,d(m))}function h(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=qF,d):(e.enter("characterReferenceValue"),a=7,l=b0,d(m))}function d(m){if(m===59&&i){const v=e.exit("characterReferenceValue");return l===Si&&!vw(n.sliceSerialize(v))?r(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(m)&&i++<a?(e.consume(m),d):r(m)}}const Pk={partial:!0,tokenize:rU},Tk={concrete:!0,name:"codeFenced",tokenize:tU};function tU(e,t,r){const n=this,i={partial:!0,tokenize:D};let a=0,l=0,u;return f;function f(k){return h(k)}function h(k){const R=n.events[n.events.length-1];return a=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,u=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(k)}function d(k){return k===u?(l++,e.consume(k),d):l<3?r(k):(e.exit("codeFencedFenceSequence"),dt(k)?Vt(e,m,"whitespace")(k):m(k))}function m(k){return k===null||Ve(k)?(e.exit("codeFencedFence"),n.interrupt?t(k):e.check(Pk,_,P)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(k))}function v(k){return k===null||Ve(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(k)):dt(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Vt(e,g,"whitespace")(k)):k===96&&k===u?r(k):(e.consume(k),v)}function g(k){return k===null||Ve(k)?m(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(k))}function S(k){return k===null||Ve(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(k)):k===96&&k===u?r(k):(e.consume(k),S)}function _(k){return e.attempt(i,P,x)(k)}function x(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),C}function C(k){return a>0&&dt(k)?Vt(e,A,"linePrefix",a+1)(k):A(k)}function A(k){return k===null||Ve(k)?e.check(Pk,_,P)(k):(e.enter("codeFlowValue"),O(k))}function O(k){return k===null||Ve(k)?(e.exit("codeFlowValue"),A(k)):(e.consume(k),O)}function P(k){return e.exit("codeFenced"),t(k)}function D(k,R,N){let $=0;return ee;function ee(W){return k.enter("lineEnding"),k.consume(W),k.exit("lineEnding"),F}function F(W){return k.enter("codeFencedFence"),dt(W)?Vt(k,z,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):z(W)}function z(W){return W===u?(k.enter("codeFencedFenceSequence"),j(W)):N(W)}function j(W){return W===u?($++,k.consume(W),j):$>=l?(k.exit("codeFencedFenceSequence"),dt(W)?Vt(k,K,"whitespace")(W):K(W)):N(W)}function K(W){return W===null||Ve(W)?(k.exit("codeFencedFence"),R(W)):N(W)}}}function rU(e,t,r){const n=this;return i;function i(l){return l===null?r(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a)}function a(l){return n.parser.lazy[n.now().line]?r(l):t(l)}}const Fy={name:"codeIndented",tokenize:iU},nU={partial:!0,tokenize:aU};function iU(e,t,r){const n=this;return i;function i(h){return e.enter("codeIndented"),Vt(e,a,"linePrefix",5)(h)}function a(h){const d=n.events[n.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?l(h):r(h)}function l(h){return h===null?f(h):Ve(h)?e.attempt(nU,l,f)(h):(e.enter("codeFlowValue"),u(h))}function u(h){return h===null||Ve(h)?(e.exit("codeFlowValue"),l(h)):(e.consume(h),u)}function f(h){return e.exit("codeIndented"),t(h)}}function aU(e,t,r){const n=this;return i;function i(l){return n.parser.lazy[n.now().line]?r(l):Ve(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):Vt(e,a,"linePrefix",5)(l)}function a(l){const u=n.events[n.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):Ve(l)?i(l):r(l)}}const sU={name:"codeText",previous:lU,resolve:oU,tokenize:uU};function oU(e){let t=e.length-4,r=3,n,i;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)i===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(i=n):(n===t||e[n][1].type==="lineEnding")&&(e[i][1].type="codeTextData",n!==i+2&&(e[i][1].end=e[n-1][1].end,e.splice(i+2,n-i-2),t-=n-i-2,n=i+2),i=void 0);return e}function lU(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function uU(e,t,r){let n=0,i,a;return l;function l(m){return e.enter("codeText"),e.enter("codeTextSequence"),u(m)}function u(m){return m===96?(e.consume(m),n++,u):(e.exit("codeTextSequence"),f(m))}function f(m){return m===null?r(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),f):m===96?(a=e.enter("codeTextSequence"),i=0,d(m)):Ve(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),f):(e.enter("codeTextData"),h(m))}function h(m){return m===null||m===32||m===96||Ve(m)?(e.exit("codeTextData"),f(m)):(e.consume(m),h)}function d(m){return m===96?(e.consume(m),i++,d):i===n?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",h(m))}}class cU{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){const n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(t,n):t>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,r,n){const i=r||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&Ec(this.left,n),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ec(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ec(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const r=this.left.splice(t,Number.POSITIVE_INFINITY);Ec(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ec(this.left,r.reverse())}}}function Ec(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function ZL(e){const t={};let r=-1,n,i,a,l,u,f,h;const d=new cU(e);for(;++r<d.length;){for(;r in t;)r=t[r];if(n=d.get(r),r&&n[1].type==="chunkFlow"&&d.get(r-1)[1].type==="listItemPrefix"&&(f=n[1]._tokenizer.events,a=0,a<f.length&&f[a][1].type==="lineEndingBlank"&&(a+=2),a<f.length&&f[a][1].type==="content"))for(;++a<f.length&&f[a][1].type!=="content";)f[a][1].type==="chunkText"&&(f[a][1]._isInFirstContentOfListItem=!0,a++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,hU(d,r)),r=t[r],h=!0);else if(n[1]._container){for(a=r,i=void 0;a--;)if(l=d.get(a),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=a);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(n[1].end={...d.get(i)[1].start},u=d.slice(i,r),u.unshift(n),d.splice(i,r-i+1,u))}}return Fi(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!h}function hU(e,t){const r=e.get(t)[1],n=e.get(t)[2];let i=t-1;const a=[];let l=r._tokenizer;l||(l=n.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const u=l.events,f=[],h={};let d,m,v=-1,g=r,S=0,_=0;const x=[_];for(;g;){for(;e.get(++i)[1]!==g;);a.push(i),g._tokenizer||(d=n.sliceStream(g),g.next||d.push(null),m&&l.defineSkip(g.start),g._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(d),g._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),m=g,g=g.next}for(g=r;++v<u.length;)u[v][0]==="exit"&&u[v-1][0]==="enter"&&u[v][1].type===u[v-1][1].type&&u[v][1].start.line!==u[v][1].end.line&&(_=v+1,x.push(_),g._tokenizer=void 0,g.previous=void 0,g=g.next);for(l.events=[],g?(g._tokenizer=void 0,g.previous=void 0):x.pop(),v=x.length;v--;){const C=u.slice(x[v],x[v+1]),A=a.pop();f.push([A,A+C.length-1]),e.splice(A,2,C)}for(f.reverse(),v=-1;++v<f.length;)h[S+f[v][0]]=S+f[v][1],S+=f[v][1]-f[v][0]-1;return h}const fU={resolve:pU,tokenize:mU},dU={partial:!0,tokenize:vU};function pU(e){return ZL(e),e}function mU(e,t){let r;return n;function n(u){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?a(u):Ve(u)?e.check(dU,l,a)(u):(e.consume(u),i)}function a(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function l(u){return e.consume(u),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,i}}function vU(e,t,r){const n=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Vt(e,a,"linePrefix")}function a(l){if(l===null||Ve(l))return r(l);const u=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):e.interrupt(n.parser.constructs.flow,r,t)(l)}}function Dk(e){return e!==null&&(e<32||e===127)}function gU(e){return e!==null&&e<-2}function yU(e){return e!==null&&(e<0||e===32)}function QL(e,t,r,n,i,a,l,u,f){const h=f||Number.POSITIVE_INFINITY;let d=0;return m;function m(C){return C===60?(e.enter(n),e.enter(i),e.enter(a),e.consume(C),e.exit(a),v):C===null||C===32||C===41||Dk(C)?r(C):(e.enter(n),e.enter(l),e.enter(u),e.enter("chunkString",{contentType:"string"}),_(C))}function v(C){return C===62?(e.enter(a),e.consume(C),e.exit(a),e.exit(i),e.exit(n),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),g(C))}function g(C){return C===62?(e.exit("chunkString"),e.exit(u),v(C)):C===null||C===60||gU(C)?r(C):(e.consume(C),C===92?S:g)}function S(C){return C===60||C===62||C===92?(e.consume(C),g):g(C)}function _(C){return!d&&(C===null||C===41||yU(C))?(e.exit("chunkString"),e.exit(u),e.exit(l),e.exit(n),t(C)):d<h&&C===40?(e.consume(C),d++,_):C===41?(e.consume(C),d--,_):C===null||C===32||C===40||Dk(C)?r(C):(e.consume(C),C===92?x:_)}function x(C){return C===40||C===41||C===92?(e.consume(C),_):_(C)}}function Mk(e){return e!==null&&e<-2}function _U(e){return e===-2||e===-1||e===32}function JL(e,t,r,n,i,a){const l=this;let u=0,f;return h;function h(g){return e.enter(n),e.enter(i),e.consume(g),e.exit(i),e.enter(a),d}function d(g){return u>999||g===null||g===91||g===93&&!f||g===94&&!u&&"_hiddenFootnoteSupport"in l.parser.constructs?r(g):g===93?(e.exit(a),e.enter(i),e.consume(g),e.exit(i),e.exit(n),t):Mk(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),m(g))}function m(g){return g===null||g===91||g===93||Mk(g)||u++>999?(e.exit("chunkString"),d(g)):(e.consume(g),f||(f=!_U(g)),g===92?v:m)}function v(g){return g===91||g===92||g===93?(e.consume(g),u++,m):m(g)}}function Rk(e){return e!==null&&e<-2}function Lk(e){return e===-2||e===-1||e===32}function bU(e,t,r,n){const i=Number.POSITIVE_INFINITY;let a=0;return l;function l(f){return Lk(f)?(e.enter(r),u(f)):t(f)}function u(f){return Lk(f)&&a++<i?(e.consume(f),u):(e.exit(r),t(f))}}function eB(e,t,r,n,i,a){let l;return u;function u(v){return v===34||v===39||v===40?(e.enter(n),e.enter(i),e.consume(v),e.exit(i),l=v===40?41:v,f):r(v)}function f(v){return v===l?(e.enter(i),e.consume(v),e.exit(i),e.exit(n),t):(e.enter(a),h(v))}function h(v){return v===l?(e.exit(a),f(l)):v===null?r(v):Rk(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),bU(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(v))}function d(v){return v===l||v===null||Rk(v)?(e.exit("chunkString"),h(v)):(e.consume(v),v===92?m:d)}function m(v){return v===l||v===92?(e.consume(v),d):d(v)}}function SU(e){return e!==null&&e<-2}function S0(e){return e===-2||e===-1||e===32}function wU(e,t,r,n){const i=Number.POSITIVE_INFINITY;let a=0;return l;function l(f){return S0(f)?(e.enter(r),u(f)):t(f)}function u(f){return S0(f)&&a++<i?(e.consume(f),u):(e.exit(r),t(f))}}function Gc(e,t){let r;return n;function n(i){return SU(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n):S0(i)?wU(e,n,r?"linePrefix":"lineSuffix")(i):t(i)}}const xU={name:"definition",tokenize:EU},CU={partial:!0,tokenize:AU};function EU(e,t,r){const n=this;let i;return a;function a(g){return e.enter("definition"),l(g)}function l(g){return JL.call(n,e,u,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function u(g){return i=jl(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),f):r(g)}function f(g){return si(g)?Gc(e,h)(g):h(g)}function h(g){return QL(e,d,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function d(g){return e.attempt(CU,m,m)(g)}function m(g){return dt(g)?Vt(e,v,"whitespace")(g):v(g)}function v(g){return g===null||Ve(g)?(e.exit("definition"),n.parser.defined.push(i),t(g)):r(g)}}function AU(e,t,r){return n;function n(u){return si(u)?Gc(e,i)(u):r(u)}function i(u){return eB(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return dt(u)?Vt(e,l,"whitespace")(u):l(u)}function l(u){return u===null||Ve(u)?t(u):r(u)}}const OU={name:"hardBreakEscape",tokenize:kU};function kU(e,t,r){return n;function n(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Ve(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}const PU={name:"headingAtx",resolve:TU,tokenize:DU};function TU(e,t){let r=e.length-2,n=3,i,a;return e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(i={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},a={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"},Fi(e,n,r-n+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function DU(e,t,r){let n=0;return i;function i(d){return e.enter("atxHeading"),a(d)}function a(d){return e.enter("atxHeadingSequence"),l(d)}function l(d){return d===35&&n++<6?(e.consume(d),l):d===null||si(d)?(e.exit("atxHeadingSequence"),u(d)):r(d)}function u(d){return d===35?(e.enter("atxHeadingSequence"),f(d)):d===null||Ve(d)?(e.exit("atxHeading"),t(d)):dt(d)?Vt(e,u,"whitespace")(d):(e.enter("atxHeadingText"),h(d))}function f(d){return d===35?(e.consume(d),f):(e.exit("atxHeadingSequence"),u(d))}function h(d){return d===null||d===35||si(d)?(e.exit("atxHeadingText"),u(d)):(e.consume(d),h)}}const MU=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Bk=["pre","script","style","textarea"],RU={concrete:!0,name:"htmlFlow",resolveTo:NU,tokenize:IU},LU={partial:!0,tokenize:zU},BU={partial:!0,tokenize:jU};function NU(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function IU(e,t,r){const n=this;let i,a,l,u,f;return h;function h(L){return d(L)}function d(L){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(L),m}function m(L){return L===33?(e.consume(L),v):L===47?(e.consume(L),a=!0,_):L===63?(e.consume(L),i=3,n.interrupt?t:M):Ri(L)?(e.consume(L),l=String.fromCharCode(L),x):r(L)}function v(L){return L===45?(e.consume(L),i=2,g):L===91?(e.consume(L),i=5,u=0,S):Ri(L)?(e.consume(L),i=4,n.interrupt?t:M):r(L)}function g(L){return L===45?(e.consume(L),n.interrupt?t:M):r(L)}function S(L){const ue="CDATA[";return L===ue.charCodeAt(u++)?(e.consume(L),u===ue.length?n.interrupt?t:z:S):r(L)}function _(L){return Ri(L)?(e.consume(L),l=String.fromCharCode(L),x):r(L)}function x(L){if(L===null||L===47||L===62||si(L)){const ue=L===47,fe=l.toLowerCase();return!ue&&!a&&Bk.includes(fe)?(i=1,n.interrupt?t(L):z(L)):MU.includes(l.toLowerCase())?(i=6,ue?(e.consume(L),C):n.interrupt?t(L):z(L)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(L):a?A(L):O(L))}return L===45||Si(L)?(e.consume(L),l+=String.fromCharCode(L),x):r(L)}function C(L){return L===62?(e.consume(L),n.interrupt?t:z):r(L)}function A(L){return dt(L)?(e.consume(L),A):ee(L)}function O(L){return L===47?(e.consume(L),ee):L===58||L===95||Ri(L)?(e.consume(L),P):dt(L)?(e.consume(L),O):ee(L)}function P(L){return L===45||L===46||L===58||L===95||Si(L)?(e.consume(L),P):D(L)}function D(L){return L===61?(e.consume(L),k):dt(L)?(e.consume(L),D):O(L)}function k(L){return L===null||L===60||L===61||L===62||L===96?r(L):L===34||L===39?(e.consume(L),f=L,R):dt(L)?(e.consume(L),k):N(L)}function R(L){return L===f?(e.consume(L),f=null,$):L===null||Ve(L)?r(L):(e.consume(L),R)}function N(L){return L===null||L===34||L===39||L===47||L===60||L===61||L===62||L===96||si(L)?D(L):(e.consume(L),N)}function $(L){return L===47||L===62||dt(L)?O(L):r(L)}function ee(L){return L===62?(e.consume(L),F):r(L)}function F(L){return L===null||Ve(L)?z(L):dt(L)?(e.consume(L),F):r(L)}function z(L){return L===45&&i===2?(e.consume(L),B):L===60&&i===1?(e.consume(L),q):L===62&&i===4?(e.consume(L),I):L===63&&i===3?(e.consume(L),M):L===93&&i===5?(e.consume(L),ce):Ve(L)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(LU,Y,j)(L)):L===null||Ve(L)?(e.exit("htmlFlowData"),j(L)):(e.consume(L),z)}function j(L){return e.check(BU,K,Y)(L)}function K(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),W}function W(L){return L===null||Ve(L)?j(L):(e.enter("htmlFlowData"),z(L))}function B(L){return L===45?(e.consume(L),M):z(L)}function q(L){return L===47?(e.consume(L),l="",G):z(L)}function G(L){if(L===62){const ue=l.toLowerCase();return Bk.includes(ue)?(e.consume(L),I):z(L)}return Ri(L)&&l.length<8?(e.consume(L),l+=String.fromCharCode(L),G):z(L)}function ce(L){return L===93?(e.consume(L),M):z(L)}function M(L){return L===62?(e.consume(L),I):L===45&&i===2?(e.consume(L),M):z(L)}function I(L){return L===null||Ve(L)?(e.exit("htmlFlowData"),Y(L)):(e.consume(L),I)}function Y(L){return e.exit("htmlFlow"),t(L)}}function jU(e,t,r){const n=this;return i;function i(l){return Ve(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):r(l)}function a(l){return n.parser.lazy[n.now().line]?r(l):t(l)}}function zU(e,t,r){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(am,t,r)}}const HU={name:"htmlText",tokenize:FU};function FU(e,t,r){const n=this;let i,a,l;return u;function u(M){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(M),f}function f(M){return M===33?(e.consume(M),h):M===47?(e.consume(M),D):M===63?(e.consume(M),O):Ri(M)?(e.consume(M),N):r(M)}function h(M){return M===45?(e.consume(M),d):M===91?(e.consume(M),a=0,S):Ri(M)?(e.consume(M),A):r(M)}function d(M){return M===45?(e.consume(M),g):r(M)}function m(M){return M===null?r(M):M===45?(e.consume(M),v):Ve(M)?(l=m,q(M)):(e.consume(M),m)}function v(M){return M===45?(e.consume(M),g):m(M)}function g(M){return M===62?B(M):M===45?v(M):m(M)}function S(M){const I="CDATA[";return M===I.charCodeAt(a++)?(e.consume(M),a===I.length?_:S):r(M)}function _(M){return M===null?r(M):M===93?(e.consume(M),x):Ve(M)?(l=_,q(M)):(e.consume(M),_)}function x(M){return M===93?(e.consume(M),C):_(M)}function C(M){return M===62?B(M):M===93?(e.consume(M),C):_(M)}function A(M){return M===null||M===62?B(M):Ve(M)?(l=A,q(M)):(e.consume(M),A)}function O(M){return M===null?r(M):M===63?(e.consume(M),P):Ve(M)?(l=O,q(M)):(e.consume(M),O)}function P(M){return M===62?B(M):O(M)}function D(M){return Ri(M)?(e.consume(M),k):r(M)}function k(M){return M===45||Si(M)?(e.consume(M),k):R(M)}function R(M){return Ve(M)?(l=R,q(M)):dt(M)?(e.consume(M),R):B(M)}function N(M){return M===45||Si(M)?(e.consume(M),N):M===47||M===62||si(M)?$(M):r(M)}function $(M){return M===47?(e.consume(M),B):M===58||M===95||Ri(M)?(e.consume(M),ee):Ve(M)?(l=$,q(M)):dt(M)?(e.consume(M),$):B(M)}function ee(M){return M===45||M===46||M===58||M===95||Si(M)?(e.consume(M),ee):F(M)}function F(M){return M===61?(e.consume(M),z):Ve(M)?(l=F,q(M)):dt(M)?(e.consume(M),F):$(M)}function z(M){return M===null||M===60||M===61||M===62||M===96?r(M):M===34||M===39?(e.consume(M),i=M,j):Ve(M)?(l=z,q(M)):dt(M)?(e.consume(M),z):(e.consume(M),K)}function j(M){return M===i?(e.consume(M),i=void 0,W):M===null?r(M):Ve(M)?(l=j,q(M)):(e.consume(M),j)}function K(M){return M===null||M===34||M===39||M===60||M===61||M===96?r(M):M===47||M===62||si(M)?$(M):(e.consume(M),K)}function W(M){return M===47||M===62||si(M)?$(M):r(M)}function B(M){return M===62?(e.consume(M),e.exit("htmlTextData"),e.exit("htmlText"),t):r(M)}function q(M){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),G}function G(M){return dt(M)?Vt(e,ce,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):ce(M)}function ce(M){return e.enter("htmlTextData"),l(M)}}const bw={name:"labelEnd",resolveAll:qU,resolveTo:WU,tokenize:VU},UU={tokenize:YU},$U={tokenize:XU},KU={tokenize:GU};function qU(e){let t=-1;const r=[];for(;++t<e.length;){const n=e[t][1];if(r.push(e[t]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){const i=n.type==="labelImage"?4:2;n.type="data",t+=i}}return e.length!==r.length&&Fi(e,0,e.length,r),e}function WU(e,t){let r=e.length,n=0,i,a,l,u;for(;r--;)if(i=e[r][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[r][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[r][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=r,i.type!=="labelLink")){n=2;break}}else i.type==="labelEnd"&&(l=r);const f={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[a][1].start},end:{...e[l][1].end}},d={type:"labelText",start:{...e[a+n+2][1].end},end:{...e[l-2][1].start}};return u=[["enter",f,t],["enter",h,t]],u=ni(u,e.slice(a+1,a+n+3)),u=ni(u,[["enter",d,t]]),u=ni(u,_w(t.parser.constructs.insideSpan.null,e.slice(a+n+4,l-3),t)),u=ni(u,[["exit",d,t],e[l-2],e[l-1],["exit",h,t]]),u=ni(u,e.slice(l+1)),u=ni(u,[["exit",f,t]]),Fi(e,a,e.length,u),e}function VU(e,t,r){const n=this;let i=n.events.length,a,l;for(;i--;)if((n.events[i][1].type==="labelImage"||n.events[i][1].type==="labelLink")&&!n.events[i][1]._balanced){a=n.events[i][1];break}return u;function u(v){return a?a._inactive?m(v):(l=n.parser.defined.includes(jl(n.sliceSerialize({start:a.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),f):r(v)}function f(v){return v===40?e.attempt(UU,d,l?d:m)(v):v===91?e.attempt($U,d,l?h:m)(v):l?d(v):m(v)}function h(v){return e.attempt(KU,d,m)(v)}function d(v){return t(v)}function m(v){return a._balanced=!0,r(v)}}function YU(e,t,r){return n;function n(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),i}function i(m){return si(m)?Gc(e,a)(m):a(m)}function a(m){return m===41?d(m):QL(e,l,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return si(m)?Gc(e,f)(m):d(m)}function u(m){return r(m)}function f(m){return m===34||m===39||m===40?eB(e,h,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):d(m)}function h(m){return si(m)?Gc(e,d)(m):d(m)}function d(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):r(m)}}function XU(e,t,r){const n=this;return i;function i(u){return JL.call(n,e,a,l,"reference","referenceMarker","referenceString")(u)}function a(u){return n.parser.defined.includes(jl(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(u):r(u)}function l(u){return r(u)}}function GU(e,t,r){return n;function n(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):r(a)}}const ZU={name:"labelStartImage",resolveAll:bw.resolveAll,tokenize:QU};function QU(e,t,r){const n=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),l):r(u)}function l(u){return u===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(u):t(u)}}const JU={name:"labelStartLink",resolveAll:bw.resolveAll,tokenize:e9};function e9(e,t,r){const n=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),a}function a(l){return l===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(l):t(l)}}const Uy={name:"lineEnding",tokenize:t9};function t9(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Vt(e,t,"linePrefix")}}const Vd={name:"thematicBreak",tokenize:r9};function r9(e,t,r){let n=0,i;return a;function a(h){return e.enter("thematicBreak"),l(h)}function l(h){return i=h,u(h)}function u(h){return h===i?(e.enter("thematicBreakSequence"),f(h)):n>=3&&(h===null||Ve(h))?(e.exit("thematicBreak"),t(h)):r(h)}function f(h){return h===i?(e.consume(h),n++,f):(e.exit("thematicBreakSequence"),dt(h)?Vt(e,u,"whitespace")(h):u(h))}}const dn={continuation:{tokenize:s9},exit:l9,name:"list",tokenize:a9},n9={partial:!0,tokenize:u9},i9={partial:!0,tokenize:o9};function a9(e,t,r){const n=this,i=n.events[n.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return u;function u(g){const S=n.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!n.containerState.marker||g===n.containerState.marker:b0(g)){if(n.containerState.type||(n.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(Vd,r,h)(g):h(g);if(!n.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(g)}return r(g)}function f(g){return b0(g)&&++l<10?(e.consume(g),f):(!n.interrupt||l<2)&&(n.containerState.marker?g===n.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),h(g)):r(g)}function h(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||g,e.check(am,n.interrupt?r:d,e.attempt(n9,v,m))}function d(g){return n.containerState.initialBlankLine=!0,a++,v(g)}function m(g){return dt(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),v):r(g)}function v(g){return n.containerState.size=a+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(g)}}function s9(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(am,i,a);function i(u){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Vt(e,t,"listItemIndent",n.containerState.size+1)(u)}function a(u){return n.containerState.furtherBlankLines||!dt(u)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,l(u)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(i9,t,l)(u))}function l(u){return n.containerState._closeFlow=!0,n.interrupt=void 0,Vt(e,e.attempt(dn,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function o9(e,t,r){const n=this;return Vt(e,i,"listItemIndent",n.containerState.size+1);function i(a){const l=n.events[n.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===n.containerState.size?t(a):r(a)}}function l9(e){e.exit(this.containerState.type)}function u9(e,t,r){const n=this;return Vt(e,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const l=n.events[n.events.length-1];return!dt(a)&&l&&l[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}const Nk={name:"setextUnderline",resolveTo:c9,tokenize:h9};function c9(e,t){let r=e.length,n,i,a;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){n=r;break}e[r][1].type==="paragraph"&&(i=r)}else e[r][1].type==="content"&&e.splice(r,1),!a&&e[r][1].type==="definition"&&(a=r);const l={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",l,t]),e.splice(a+1,0,["exit",e[n][1],t]),e[n][1].end={...e[a][1].end}):e[n][1]=l,e.push(["exit",l,t]),e}function h9(e,t,r){const n=this;let i;return a;function a(h){let d=n.events.length,m;for(;d--;)if(n.events[d][1].type!=="lineEnding"&&n.events[d][1].type!=="linePrefix"&&n.events[d][1].type!=="content"){m=n.events[d][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||m)?(e.enter("setextHeadingLine"),i=h,l(h)):r(h)}function l(h){return e.enter("setextHeadingLineSequence"),u(h)}function u(h){return h===i?(e.consume(h),u):(e.exit("setextHeadingLineSequence"),dt(h)?Vt(e,f,"lineSuffix")(h):f(h))}function f(h){return h===null||Ve(h)?(e.exit("setextHeadingLine"),t(h)):r(h)}}const f9={tokenize:d9};function d9(e){const t=this,r=e.attempt(am,n,e.attempt(this.parser.constructs.flowInitial,i,yw(e,e.attempt(this.parser.constructs.flow,i,e.attempt(fU,i)),"linePrefix")));return r;function n(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const p9={resolveAll:rB()},m9=tB("string"),v9=tB("text");function tB(e){return{resolveAll:rB(e==="text"?g9:void 0),tokenize:t};function t(r){const n=this,i=this.parser.constructs[e],a=r.attempt(i,l,u);return l;function l(d){return h(d)?a(d):u(d)}function u(d){if(d===null){r.consume(d);return}return r.enter("data"),r.consume(d),f}function f(d){return h(d)?(r.exit("data"),a(d)):(r.consume(d),f)}function h(d){if(d===null)return!0;const m=i[d];let v=-1;if(m)for(;++v<m.length;){const g=m[v];if(!g.previous||g.previous.call(n,n.previous))return!0}return!1}}}function rB(e){return t;function t(r,n){let i=-1,a;for(;++i<=r.length;)a===void 0?r[i]&&r[i][1].type==="data"&&(a=i,i++):(!r[i]||r[i][1].type!=="data")&&(i!==a+2&&(r[a][1].end=r[i-1][1].end,r.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(r,n):r}}function g9(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const n=e[r-1][1],i=t.sliceStream(n);let a=i.length,l=-1,u=0,f;for(;a--;){const h=i[a];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)u++,l--;if(l)break;l=-1}else if(h===-2)f=!0,u++;else if(h!==-1){a++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(u=0),u){const h={type:r===e.length||f||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:n.start._bufferIndex+l,_index:n.start._index+a,line:n.end.line,column:n.end.column-u,offset:n.end.offset-u},end:{...n.end}};n.end={...h.start},n.start.offset===n.end.offset?Object.assign(n,h):(e.splice(r,0,["enter",h,t],["exit",h,t]),r+=2)}r++}return e}const y9={42:dn,43:dn,45:dn,48:dn,49:dn,50:dn,51:dn,52:dn,53:dn,54:dn,55:dn,56:dn,57:dn,62:YL},_9={91:xU},b9={[-2]:Fy,[-1]:Fy,32:Fy},S9={35:PU,42:Vd,45:[Nk,Vd],60:RU,61:Nk,95:Vd,96:Tk,126:Tk},w9={38:GL,92:XL},x9={[-5]:Uy,[-4]:Uy,[-3]:Uy,33:ZU,38:GL,42:_0,60:[VF,HU],91:JU,92:[OU,XL],93:bw,95:_0,96:sU},C9={null:[_0,p9]},E9={null:[42,95]},A9={null:[]},O9=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:E9,contentInitial:_9,disable:A9,document:y9,flow:S9,flowInitial:b9,insideSpan:C9,string:w9,text:x9},Symbol.toStringTag,{value:"Module"}));function k9(e,t,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const i={},a=[];let l=[],u=[];const f={attempt:R(D),check:R(k),consume:A,enter:O,exit:P,interrupt:R(k,{interrupt:!0})},h={code:null,containerState:{},defineSkip:_,events:[],now:S,parser:e,previous:null,sliceSerialize:v,sliceStream:g,write:m};let d=t.tokenize.call(h,f);return t.resolveAll&&a.push(t),h;function m(F){return l=ni(l,F),x(),l[l.length-1]!==null?[]:(N(t,0),h.events=_w(a,h.events,h),h.events)}function v(F,z){return T9(g(F),z)}function g(F){return P9(l,F)}function S(){const{_bufferIndex:F,_index:z,line:j,column:K,offset:W}=n;return{_bufferIndex:F,_index:z,line:j,column:K,offset:W}}function _(F){i[F.line]=F.column,ee()}function x(){let F;for(;n._index<l.length;){const z=l[n._index];if(typeof z=="string")for(F=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===F&&n._bufferIndex<z.length;)C(z.charCodeAt(n._bufferIndex));else C(z)}}function C(F){d=d(F)}function A(F){gw(F)?(n.line++,n.column=1,n.offset+=F===-3?2:1,ee()):F!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===l[n._index].length&&(n._bufferIndex=-1,n._index++)),h.previous=F}function O(F,z){const j=z||{};return j.type=F,j.start=S(),h.events.push(["enter",j,h]),u.push(j),j}function P(F){const z=u.pop();return z.end=S(),h.events.push(["exit",z,h]),z}function D(F,z){N(F,z.from)}function k(F,z){z.restore()}function R(F,z){return j;function j(K,W,B){let q,G,ce,M;return Array.isArray(K)?Y(K):"tokenize"in K?Y([K]):I(K);function I(pe){return Te;function Te(tt){const ie=tt!==null&&pe[tt],Ee=tt!==null&&pe.null,Oe=[...Array.isArray(ie)?ie:ie?[ie]:[],...Array.isArray(Ee)?Ee:Ee?[Ee]:[]];return Y(Oe)(tt)}}function Y(pe){return q=pe,G=0,pe.length===0?B:L(pe[G])}function L(pe){return Te;function Te(tt){return M=$(),ce=pe,pe.partial||(h.currentConstruct=pe),pe.name&&h.parser.constructs.disable.null.includes(pe.name)?fe():pe.tokenize.call(z?Object.assign(Object.create(h),z):h,f,ue,fe)(tt)}}function ue(pe){return F(ce,M),W}function fe(pe){return M.restore(),++G<q.length?L(q[G]):B}}}function N(F,z){F.resolveAll&&!a.includes(F)&&a.push(F),F.resolve&&Fi(h.events,z,h.events.length-z,F.resolve(h.events.slice(z),h)),F.resolveTo&&(h.events=F.resolveTo(h.events,h))}function $(){const F=S(),z=h.previous,j=h.currentConstruct,K=h.events.length,W=Array.from(u);return{from:K,restore:B};function B(){n=F,h.previous=z,h.currentConstruct=j,h.events.length=K,u=W,ee()}}function ee(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}function P9(e,t){const r=t.start._index,n=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let l;if(r===i)l=[e[r].slice(n,a)];else{if(l=e.slice(r,i),n>-1){const u=l[0];typeof u=="string"?l[0]=u.slice(n):l.shift()}a>0&&l.push(e[i].slice(0,a))}return l}function T9(e,t){let r=-1;const n=[];let i;for(;++r<e.length;){const a=e[r];let l;if(typeof a=="string")l=a;else switch(a){case-5:{l="\r";break}case-4:{l=`
`;break}case-3:{l=`\r
`;break}case-2:{l=t?" ":"	";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(a)}i=a===-2,n.push(l)}return n.join("")}function D9(e){const n={constructs:PF([O9,...(e||{}).extensions||[]]),content:i(RF),defined:[],document:i(BF),flow:i(f9),lazy:{},string:i(m9),text:i(v9)};return n;function i(a){return l;function l(u){return k9(n,a,u)}}}function M9(e){for(;!ZL(e););return e}const Ik=/[\0\t\n\r]/g;function R9(){let e=1,t="",r=!0,n;return i;function i(a,l,u){const f=[];let h,d,m,v,g;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(l||void 0).decode(a)),m=0,t="",r&&(a.charCodeAt(0)===65279&&m++,r=void 0);m<a.length;){if(Ik.lastIndex=m,h=Ik.exec(a),v=h&&h.index!==void 0?h.index:a.length,g=a.charCodeAt(v),!h){t=a.slice(m);break}if(g===10&&m===v&&n)f.push(-3),n=void 0;else switch(n&&(f.push(-5),n=void 0),m<v&&(f.push(a.slice(m,v)),e+=v-m),g){case 0:{f.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,f.push(-2);e++<d;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:n=!0,e=1}m=v+1}return u&&(n&&f.push(-5),t&&f.push(t),f.push(null)),f}}const L9=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function B9(e){return e.replace(L9,N9)}function N9(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const i=r.charCodeAt(1),a=i===120||i===88;return WL(r.slice(a?2:1),a?16:10)}return vw(r)||e}const nB={}.hasOwnProperty;function I9(e,t,r){return typeof t!="string"&&(r=t,t=void 0),j9(r)(M9(D9(r).document().write(R9()(e,t,!0))))}function j9(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Fo),autolinkProtocol:$,autolinkEmail:$,atxHeading:a(Xt),blockQuote:a(Ee),characterEscape:$,characterReference:$,codeFenced:a(Oe),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(Oe,l),codeText:a(le,l),codeTextData:$,data:$,codeFlowValue:$,definition:a(ke),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(Be),hardBreakEscape:a(Gt),hardBreakTrailing:a(Gt),htmlFlow:a(jn,l),htmlFlowData:$,htmlText:a(jn,l),htmlTextData:$,image:a(Is),label:l,link:a(Fo),listItem:a(Au),listItemValue:v,listOrdered:a(Uo,m),listUnordered:a(Uo),paragraph:a(fv),reference:L,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(Xt),strong:a(dv),thematicBreak:a(pv)},exit:{atxHeading:f(),atxHeadingSequence:D,autolink:f(),autolinkEmail:ie,autolinkProtocol:tt,blockQuote:f(),characterEscapeValue:ee,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:pe,characterReference:Te,codeFenced:f(x),codeFencedFence:_,codeFencedFenceInfo:g,codeFencedFenceMeta:S,codeFlowValue:ee,codeIndented:f(C),codeText:f(W),codeTextData:ee,data:ee,definition:f(),definitionDestinationString:P,definitionLabelString:A,definitionTitleString:O,emphasis:f(),hardBreakEscape:f(z),hardBreakTrailing:f(z),htmlFlow:f(j),htmlFlowData:ee,htmlText:f(K),htmlTextData:ee,image:f(q),label:ce,labelText:G,lineEnding:F,link:f(B),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:ue,resourceDestinationString:M,resourceTitleString:I,resource:Y,setextHeading:f(N),setextHeadingLineSequence:R,setextHeadingText:k,strong:f(),thematicBreak:f()}};iB(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(ne){let ve={type:"root",children:[]};const Re={stack:[ve],tokenStack:[],config:t,enter:u,exit:h,buffer:l,resume:d,data:r},Ye=[];let ut=-1;for(;++ut<ne.length;)if(ne[ut][1].type==="listOrdered"||ne[ut][1].type==="listUnordered")if(ne[ut][0]==="enter")Ye.push(ut);else{const _n=Ye.pop();ut=i(ne,_n,ut)}for(ut=-1;++ut<ne.length;){const _n=t[ne[ut][0]];nB.call(_n,ne[ut][1].type)&&_n[ne[ut][1].type].call(Object.assign({sliceSerialize:ne[ut][2].sliceSerialize},Re),ne[ut][1])}if(Re.tokenStack.length>0){const _n=Re.tokenStack[Re.tokenStack.length-1];(_n[1]||jk).call(Re,void 0,_n[0])}for(ve.position={start:ds(ne.length>0?ne[0][1].start:{line:1,column:1,offset:0}),end:ds(ne.length>0?ne[ne.length-2][1].end:{line:1,column:1,offset:0})},ut=-1;++ut<t.transforms.length;)ve=t.transforms[ut](ve)||ve;return ve}function i(ne,ve,Re){let Ye=ve-1,ut=-1,_n=!1,Ki,Gr,sr,nn;for(;++Ye<=Re;){const _t=ne[Ye];switch(_t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{_t[0]==="enter"?ut++:ut--,nn=void 0;break}case"lineEndingBlank":{_t[0]==="enter"&&(Ki&&!nn&&!ut&&!sr&&(sr=Ye),nn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:nn=void 0}if(!ut&&_t[0]==="enter"&&_t[1].type==="listItemPrefix"||ut===-1&&_t[0]==="exit"&&(_t[1].type==="listUnordered"||_t[1].type==="listOrdered")){if(Ki){let za=Ye;for(Gr=void 0;za--;){const pi=ne[za];if(pi[1].type==="lineEnding"||pi[1].type==="lineEndingBlank"){if(pi[0]==="exit")continue;Gr&&(ne[Gr][1].type="lineEndingBlank",_n=!0),pi[1].type="lineEnding",Gr=za}else if(!(pi[1].type==="linePrefix"||pi[1].type==="blockQuotePrefix"||pi[1].type==="blockQuotePrefixWhitespace"||pi[1].type==="blockQuoteMarker"||pi[1].type==="listItemIndent"))break}sr&&(!Gr||sr<Gr)&&(Ki._spread=!0),Ki.end=Object.assign({},Gr?ne[Gr][1].start:_t[1].end),ne.splice(Gr||Ye,0,["exit",Ki,_t[2]]),Ye++,Re++}if(_t[1].type==="listItemPrefix"){const za={type:"listItem",_spread:!1,start:Object.assign({},_t[1].start),end:void 0};Ki=za,ne.splice(Ye,0,["enter",za,_t[2]]),Ye++,Re++,sr=void 0,nn=!0}}}return ne[ve][1]._spread=_n,Re}function a(ne,ve){return Re;function Re(Ye){u.call(this,ne(Ye),Ye),ve&&ve.call(this,Ye)}}function l(){this.stack.push({type:"fragment",children:[]})}function u(ne,ve,Re){this.stack[this.stack.length-1].children.push(ne),this.stack.push(ne),this.tokenStack.push([ve,Re||void 0]),ne.position={start:ds(ve.start),end:void 0}}function f(ne){return ve;function ve(Re){ne&&ne.call(this,Re),h.call(this,Re)}}function h(ne,ve){const Re=this.stack.pop(),Ye=this.tokenStack.pop();if(Ye)Ye[0].type!==ne.type&&(ve?ve.call(this,ne,Ye[0]):(Ye[1]||jk).call(this,ne,Ye[0]));else throw new Error("Cannot close `"+ne.type+"` ("+Xc({start:ne.start,end:ne.end})+"): it’s not open");Re.position.end=ds(ne.end)}function d(){return OF(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function v(ne){if(this.data.expectingFirstListItemValue){const ve=this.stack[this.stack.length-2];ve.start=Number.parseInt(this.sliceSerialize(ne),10),this.data.expectingFirstListItemValue=void 0}}function g(){const ne=this.resume(),ve=this.stack[this.stack.length-1];ve.lang=ne}function S(){const ne=this.resume(),ve=this.stack[this.stack.length-1];ve.meta=ne}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function x(){const ne=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ne.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const ne=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ne.replace(/(\r?\n|\r)$/g,"")}function A(ne){const ve=this.resume(),Re=this.stack[this.stack.length-1];Re.label=ve,Re.identifier=jl(this.sliceSerialize(ne)).toLowerCase()}function O(){const ne=this.resume(),ve=this.stack[this.stack.length-1];ve.title=ne}function P(){const ne=this.resume(),ve=this.stack[this.stack.length-1];ve.url=ne}function D(ne){const ve=this.stack[this.stack.length-1];if(!ve.depth){const Re=this.sliceSerialize(ne).length;ve.depth=Re}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function R(ne){const ve=this.stack[this.stack.length-1];ve.depth=this.sliceSerialize(ne).codePointAt(0)===61?1:2}function N(){this.data.setextHeadingSlurpLineEnding=void 0}function $(ne){const Re=this.stack[this.stack.length-1].children;let Ye=Re[Re.length-1];(!Ye||Ye.type!=="text")&&(Ye=Xr(),Ye.position={start:ds(ne.start),end:void 0},Re.push(Ye)),this.stack.push(Ye)}function ee(ne){const ve=this.stack.pop();ve.value+=this.sliceSerialize(ne),ve.position.end=ds(ne.end)}function F(ne){const ve=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Re=ve.children[ve.children.length-1];Re.position.end=ds(ne.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ve.type)&&($.call(this,ne),ee.call(this,ne))}function z(){this.data.atHardBreak=!0}function j(){const ne=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ne}function K(){const ne=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ne}function W(){const ne=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ne}function B(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=ve,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function q(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=ve,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function G(ne){const ve=this.sliceSerialize(ne),Re=this.stack[this.stack.length-2];Re.label=B9(ve),Re.identifier=jl(ve).toLowerCase()}function ce(){const ne=this.stack[this.stack.length-1],ve=this.resume(),Re=this.stack[this.stack.length-1];if(this.data.inReference=!0,Re.type==="link"){const Ye=ne.children;Re.children=Ye}else Re.alt=ve}function M(){const ne=this.resume(),ve=this.stack[this.stack.length-1];ve.url=ne}function I(){const ne=this.resume(),ve=this.stack[this.stack.length-1];ve.title=ne}function Y(){this.data.inReference=void 0}function L(){this.data.referenceType="collapsed"}function ue(ne){const ve=this.resume(),Re=this.stack[this.stack.length-1];Re.label=ve,Re.identifier=jl(this.sliceSerialize(ne)).toLowerCase(),this.data.referenceType="full"}function fe(ne){this.data.characterReferenceType=ne.type}function pe(ne){const ve=this.sliceSerialize(ne),Re=this.data.characterReferenceType;let Ye;Re?(Ye=WL(ve,Re==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ye=vw(ve);const ut=this.stack[this.stack.length-1];ut.value+=Ye}function Te(ne){const ve=this.stack.pop();ve.position.end=ds(ne.end)}function tt(ne){ee.call(this,ne);const ve=this.stack[this.stack.length-1];ve.url=this.sliceSerialize(ne)}function ie(ne){ee.call(this,ne);const ve=this.stack[this.stack.length-1];ve.url="mailto:"+this.sliceSerialize(ne)}function Ee(){return{type:"blockquote",children:[]}}function Oe(){return{type:"code",lang:null,meta:null,value:""}}function le(){return{type:"inlineCode",value:""}}function ke(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Be(){return{type:"emphasis",children:[]}}function Xt(){return{type:"heading",depth:0,children:[]}}function Gt(){return{type:"break"}}function jn(){return{type:"html",value:""}}function Is(){return{type:"image",title:null,url:"",alt:null}}function Fo(){return{type:"link",title:null,url:"",children:[]}}function Uo(ne){return{type:"list",ordered:ne.type==="listOrdered",start:null,spread:ne._spread,children:[]}}function Au(ne){return{type:"listItem",spread:ne._spread,checked:null,children:[]}}function fv(){return{type:"paragraph",children:[]}}function dv(){return{type:"strong",children:[]}}function Xr(){return{type:"text",value:""}}function pv(){return{type:"thematicBreak"}}}function ds(e){return{line:e.line,column:e.column,offset:e.offset}}function iB(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?iB(e,n):z9(e,n)}}function z9(e,t){let r;for(r in t)if(nB.call(t,r))switch(r){case"canContainEols":{const n=t[r];n&&e[r].push(...n);break}case"transforms":{const n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{const n=t[r];n&&Object.assign(e[r],n);break}}}function jk(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Xc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Xc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Xc({start:t.start,end:t.end})+") is still open")}function H9(e){const t=this;t.parser=r;function r(n){return I9(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function F9(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function U9(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
`}]}function $9(e,t){const r=t.value?t.value+`
`:"",n={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(n.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function K9(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function q9(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function W9(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),i=nu(n.toLowerCase()),a=e.footnoteOrder.indexOf(n);let l,u=e.footnoteCounts.get(n);u===void 0?(u=0,e.footnoteOrder.push(n),l=e.footnoteOrder.length):l=a+1,u+=1,e.footnoteCounts.set(n,u);const f={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+i,id:r+"fnref-"+i+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,f);const h={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,h),e.applyData(t,h)}function V9(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Y9(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function aB(e,t){const r=t.referenceType;let n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+n}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=n:i.push({type:"text",value:n}),i}function X9(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return aB(e,t);const i={src:nu(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function G9(e,t){const r={src:nu(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)}function Z9(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)}function Q9(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return aB(e,t);const i={href:nu(n.url||"")};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function J9(e,t){const r={href:nu(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function e7(e,t,r){const n=e.all(t),i=r?t7(r):sB(t),a={},l=[];if(typeof t.checked=="boolean"){const d=n[0];let m;d&&d.type==="element"&&d.tagName==="p"?m=d:(m={type:"element",tagName:"p",properties:{},children:[]},n.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let u=-1;for(;++u<n.length;){const d=n[u];(i||u!==0||d.type!=="element"||d.tagName!=="p")&&l.push({type:"text",value:`
`}),d.type==="element"&&d.tagName==="p"&&!i?l.push(...d.children):l.push(d)}const f=n[n.length-1];f&&(i||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
`});const h={type:"element",tagName:"li",properties:a,children:l};return e.patch(t,h),e.applyData(t,h)}function t7(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let n=-1;for(;!t&&++n<r.length;)t=sB(r[n])}return t}function sB(e){const t=e.spread;return t??e.children.length>1}function r7(e,t){const r={},n=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++i<n.length;){const l=n[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(n,!0)};return e.patch(t,a),e.applyData(t,a)}function n7(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function i7(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function a7(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function s7(e,t){const r=e.all(t),n=r.shift(),i=[];if(n){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([n],!0)};e.patch(t.children[0],l),i.push(l)}if(r.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},u=fw(t.children[1]),f=zL(t.children[t.children.length-1]);u&&f&&(l.position={start:u,end:f}),i.push(l)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function o7(e,t,r){const n=r?r.children:void 0,a=(n?n.indexOf(t):1)===0?"th":"td",l=r&&r.type==="table"?r.align:void 0,u=l?l.length:t.children.length;let f=-1;const h=[];for(;++f<u;){const m=t.children[f],v={},g=l?l[f]:void 0;g&&(v.align=g);let S={type:"element",tagName:a,properties:v,children:[]};m&&(S.children=e.all(m),e.patch(m,S),S=e.applyData(m,S)),h.push(S)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,d),e.applyData(t,d)}function l7(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const zk=9,Hk=32;function u7(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),i=0;const a=[];for(;n;)a.push(Fk(t.slice(i,n.index),i>0,!0),n[0]),i=n.index+n[0].length,n=r.exec(t);return a.push(Fk(t.slice(i),i>0,!1)),a.join("")}function Fk(e,t,r){let n=0,i=e.length;if(t){let a=e.codePointAt(n);for(;a===zk||a===Hk;)n++,a=e.codePointAt(n)}if(r){let a=e.codePointAt(i-1);for(;a===zk||a===Hk;)i--,a=e.codePointAt(i-1)}return i>n?e.slice(n,i):""}function c7(e,t){const r={type:"text",value:u7(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function h7(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const f7={blockquote:F9,break:U9,code:$9,delete:K9,emphasis:q9,footnoteReference:W9,heading:V9,html:Y9,imageReference:X9,image:G9,inlineCode:Z9,linkReference:Q9,link:J9,listItem:e7,list:r7,paragraph:n7,root:i7,strong:a7,table:s7,tableCell:l7,tableRow:o7,text:c7,thematicBreak:h7,toml:bd,yaml:bd,definition:bd,footnoteDefinition:bd};function bd(){}const oB=-1,sm=0,Zc=1,lp=2,Sw=3,ww=4,xw=5,Cw=6,lB=7,uB=8,Uk=typeof self=="object"?self:globalThis,d7=(e,t)=>{const r=(i,a)=>(e.set(a,i),i),n=i=>{if(e.has(i))return e.get(i);const[a,l]=t[i];switch(a){case sm:case oB:return r(l,i);case Zc:{const u=r([],i);for(const f of l)u.push(n(f));return u}case lp:{const u=r({},i);for(const[f,h]of l)u[n(f)]=n(h);return u}case Sw:return r(new Date(l),i);case ww:{const{source:u,flags:f}=l;return r(new RegExp(u,f),i)}case xw:{const u=r(new Map,i);for(const[f,h]of l)u.set(n(f),n(h));return u}case Cw:{const u=r(new Set,i);for(const f of l)u.add(n(f));return u}case lB:{const{name:u,message:f}=l;return r(new Uk[u](f),i)}case uB:return r(BigInt(l),i);case"BigInt":return r(Object(BigInt(l)),i);case"ArrayBuffer":return r(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:u}=new Uint8Array(l);return r(new DataView(u),l)}}return r(new Uk[a](l),i)};return n},$k=e=>d7(new Map,e)(0),Pl="",{toString:p7}={},{keys:m7}=Object,Ac=e=>{const t=typeof e;if(t!=="object"||!e)return[sm,t];const r=p7.call(e).slice(8,-1);switch(r){case"Array":return[Zc,Pl];case"Object":return[lp,Pl];case"Date":return[Sw,Pl];case"RegExp":return[ww,Pl];case"Map":return[xw,Pl];case"Set":return[Cw,Pl];case"DataView":return[Zc,r]}return r.includes("Array")?[Zc,r]:r.includes("Error")?[lB,r]:[lp,r]},Sd=([e,t])=>e===sm&&(t==="function"||t==="symbol"),v7=(e,t,r,n)=>{const i=(l,u)=>{const f=n.push(l)-1;return r.set(u,f),f},a=l=>{if(r.has(l))return r.get(l);let[u,f]=Ac(l);switch(u){case sm:{let d=l;switch(f){case"bigint":u=uB,d=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);d=null;break;case"undefined":return i([oB],l)}return i([u,d],l)}case Zc:{if(f){let v=l;return f==="DataView"?v=new Uint8Array(l.buffer):f==="ArrayBuffer"&&(v=new Uint8Array(l)),i([f,[...v]],l)}const d=[],m=i([u,d],l);for(const v of l)d.push(a(v));return m}case lp:{if(f)switch(f){case"BigInt":return i([f,l.toString()],l);case"Boolean":case"Number":case"String":return i([f,l.valueOf()],l)}if(t&&"toJSON"in l)return a(l.toJSON());const d=[],m=i([u,d],l);for(const v of m7(l))(e||!Sd(Ac(l[v])))&&d.push([a(v),a(l[v])]);return m}case Sw:return i([u,l.toISOString()],l);case ww:{const{source:d,flags:m}=l;return i([u,{source:d,flags:m}],l)}case xw:{const d=[],m=i([u,d],l);for(const[v,g]of l)(e||!(Sd(Ac(v))||Sd(Ac(g))))&&d.push([a(v),a(g)]);return m}case Cw:{const d=[],m=i([u,d],l);for(const v of l)(e||!Sd(Ac(v)))&&d.push(a(v));return m}}const{message:h}=l;return i([u,{name:f,message:h}],l)};return a},Kk=(e,{json:t,lossy:r}={})=>{const n=[];return v7(!(t||r),!!t,new Map,n)(e),n},up=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?$k(Kk(e,t)):structuredClone(e):(e,t)=>$k(Kk(e,t));function g7(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function y7(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function _7(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||g7,n=e.options.footnoteBackLabel||y7,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let f=-1;for(;++f<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[f]);if(!h)continue;const d=e.all(h),m=String(h.identifier).toUpperCase(),v=nu(m.toLowerCase());let g=0;const S=[],_=e.footnoteCounts.get(m);for(;_!==void 0&&++g<=_;){S.length>0&&S.push({type:"text",value:" "});let A=typeof r=="string"?r:r(f,g);typeof A=="string"&&(A={type:"text",value:A}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(f,g),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const x=d[d.length-1];if(x&&x.type==="element"&&x.tagName==="p"){const A=x.children[x.children.length-1];A&&A.type==="text"?A.value+=" ":x.children.push({type:"text",value:" "}),x.children.push(...S)}else d.push(...S);const C={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(d,!0)};e.patch(h,C),u.push(C)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...up(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
`}]}}const cB=(function(e){if(e==null)return x7;if(typeof e=="function")return om(e);if(typeof e=="object")return Array.isArray(e)?b7(e):S7(e);if(typeof e=="string")return w7(e);throw new Error("Expected function, string, or object as test")});function b7(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=cB(e[r]);return om(n);function n(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function S7(e){const t=e;return om(r);function r(n){const i=n;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function w7(e){return om(t);function t(r){return r&&r.type===e}}function om(e){return t;function t(r,n,i){return!!(C7(r)&&e.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function x7(){return!0}function C7(e){return e!==null&&typeof e=="object"&&"type"in e}const hB=[],E7=!0,qk=!1,A7="skip";function O7(e,t,r,n){let i;typeof t=="function"&&typeof r!="function"?(n=r,r=t):i=t;const a=cB(i),l=n?-1:1;u(e,void 0,[])();function u(f,h,d){const m=f&&typeof f=="object"?f:{};if(typeof m.type=="string"){const g=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(f.type+(g?"<"+g+">":""))+")"})}return v;function v(){let g=hB,S,_,x;if((!t||a(f,h,d[d.length-1]||void 0))&&(g=k7(r(f,d)),g[0]===qk))return g;if("children"in f&&f.children){const C=f;if(C.children&&g[0]!==A7)for(_=(n?C.children.length:-1)+l,x=d.concat(C);_>-1&&_<C.children.length;){const A=C.children[_];if(S=u(A,_,x)(),S[0]===qk)return S;_=typeof S[1]=="number"?S[1]:_+l}}return g}}}function k7(e){return Array.isArray(e)?e:typeof e=="number"?[E7,e]:e==null?hB:[e]}function fB(e,t,r,n){let i,a,l;typeof t=="function"&&typeof r!="function"?(a=void 0,l=t,i=r):(a=t,l=r,i=n),O7(e,a,u,i);function u(f,h){const d=h[h.length-1],m=d?d.children.indexOf(f):void 0;return l(f,m,d)}}const w0={}.hasOwnProperty,P7={};function T7(e,t){const r=t||P7,n=new Map,i=new Map,a=new Map,l={...f7,...r.handlers},u={all:h,applyData:M7,definitionById:n,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:l,one:f,options:r,patch:D7,wrap:L7};return fB(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const m=d.type==="definition"?n:i,v=String(d.identifier).toUpperCase();m.has(v)||m.set(v,d)}}),u;function f(d,m){const v=d.type,g=u.handlers[v];if(w0.call(u.handlers,v)&&g)return g(u,d,m);if(u.options.passThrough&&u.options.passThrough.includes(v)){if("children"in d){const{children:_,...x}=d,C=up(x);return C.children=u.all(d),C}return up(d)}return(u.options.unknownHandler||R7)(u,d,m)}function h(d){const m=[];if("children"in d){const v=d.children;let g=-1;for(;++g<v.length;){const S=u.one(v[g],d);if(S){if(g&&v[g-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=Wk(S.value)),!Array.isArray(S)&&S.type==="element")){const _=S.children[0];_&&_.type==="text"&&(_.value=Wk(_.value))}Array.isArray(S)?m.push(...S):m.push(S)}}}return m}}function D7(e,t){e.position&&(t.position=aF(e))}function M7(e,t){let r=t;if(e&&e.data){const n=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof n=="string")if(r.type==="element")r.tagName=n;else{const l="children"in r?r.children:[r];r={type:"element",tagName:n,properties:{},children:l}}r.type==="element"&&a&&Object.assign(r.properties,up(a)),"children"in r&&r.children&&i!==null&&i!==void 0&&(r.children=i)}return r}function R7(e,t){const r=t.data||{},n="value"in t&&!(w0.call(r,"hProperties")||w0.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function L7(e,t){const r=[];let n=-1;for(t&&r.push({type:"text",value:`
`});++n<e.length;)n&&r.push({type:"text",value:`
`}),r.push(e[n]);return t&&e.length>0&&r.push({type:"text",value:`
`}),r}function Wk(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function Vk(e,t){const r=T7(e,t),n=r.one(e,void 0),i=_7(r),a=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
`},i),a}function B7(e,t){return e&&"run"in e?async function(r,n){const i=Vk(r,{file:n,...t});await e.run(i,n)}:function(r,n){return Vk(r,{file:n,...e||t})}}function Yk(e){if(e)throw e}var $y,Xk;function N7(){if(Xk)return $y;Xk=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},a=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var d=e.call(h,"constructor"),m=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!d&&!m)return!1;var v;for(v in h);return typeof v>"u"||e.call(h,v)},l=function(h,d){r&&d.name==="__proto__"?r(h,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):h[d.name]=d.newValue},u=function(h,d){if(d==="__proto__")if(e.call(h,d)){if(n)return n(h,d).value}else return;return h[d]};return $y=function f(){var h,d,m,v,g,S,_=arguments[0],x=1,C=arguments.length,A=!1;for(typeof _=="boolean"&&(A=_,_=arguments[1]||{},x=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});x<C;++x)if(h=arguments[x],h!=null)for(d in h)m=u(_,d),v=u(h,d),_!==v&&(A&&v&&(a(v)||(g=i(v)))?(g?(g=!1,S=m&&i(m)?m:[]):S=m&&a(m)?m:{},l(_,{name:d,newValue:f(A,S,v)})):typeof v<"u"&&l(_,{name:d,newValue:v}));return _},$y}var I7=N7();const Ky=Hr(I7);function x0(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function j7(){const e=[],t={run:r,use:n};return t;function r(...i){let a=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);u(null,...i);function u(f,...h){const d=e[++a];let m=-1;if(f){l(f);return}for(;++m<i.length;)(h[m]===null||h[m]===void 0)&&(h[m]=i[m]);i=h,d?z7(d,u)(...h):l(null,...h)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function z7(e,t){let r;return n;function n(...l){const u=e.length>l.length;let f;u&&l.push(i);try{f=e.apply(this,l)}catch(h){const d=h;if(u&&r)throw d;return i(d)}u||(f&&f.then&&typeof f.then=="function"?f.then(a,i):f instanceof Error?i(f):a(f))}function i(l,...u){r||(r=!0,t(l,...u))}function a(l){i(null,l)}}const Mi={basename:H7,dirname:F7,extname:U7,join:$7,sep:"/"};function H7(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');wh(e);let r=0,n=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){r=i+1;break}}else n<0&&(a=!0,n=i+1);return n<0?"":e.slice(r,n)}if(t===e)return"";let l=-1,u=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){r=i+1;break}}else l<0&&(a=!0,l=i+1),u>-1&&(e.codePointAt(i)===t.codePointAt(u--)?u<0&&(n=i):(u=-1,n=l));return r===n?n=l:n<0&&(n=e.length),e.slice(r,n)}function F7(e){if(wh(e),e.length===0)return".";let t=-1,r=e.length,n;for(;--r;)if(e.codePointAt(r)===47){if(n){t=r;break}}else n||(n=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function U7(e){wh(e);let t=e.length,r=-1,n=0,i=-1,a=0,l;for(;t--;){const u=e.codePointAt(t);if(u===47){if(l){n=t+1;break}continue}r<0&&(l=!0,r=t+1),u===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||r<0||a===0||a===1&&i===r-1&&i===n+1?"":e.slice(i,r)}function $7(...e){let t=-1,r;for(;++t<e.length;)wh(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":K7(r)}function K7(e){wh(e);const t=e.codePointAt(0)===47;let r=q7(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function q7(e,t){let r="",n=0,i=-1,a=0,l=-1,u,f;for(;++l<=e.length;){if(l<e.length)u=e.codePointAt(l);else{if(u===47)break;u=47}if(u===47){if(!(i===l-1||a===1))if(i!==l-1&&a===2){if(r.length<2||n!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(f=r.lastIndexOf("/"),f!==r.length-1){f<0?(r="",n=0):(r=r.slice(0,f),n=r.length-1-r.lastIndexOf("/")),i=l,a=0;continue}}else if(r.length>0){r="",n=0,i=l,a=0;continue}}t&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+e.slice(i+1,l):r=e.slice(i+1,l),n=l-i-1;i=l,a=0}else u===46&&a>-1?a++:a=-1}return r}function wh(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const W7={cwd:V7};function V7(){return"/"}function C0(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Y7(e){if(typeof e=="string")e=new URL(e);else if(!C0(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return X7(e)}function X7(e){if(e.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const n=t.codePointAt(r+2);if(n===70||n===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const qy=["history","path","basename","stem","extname","dirname"];class dB{constructor(t){let r;t?C0(t)?r={path:t}:typeof t=="string"||G7(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":W7.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<qy.length;){const a=qy[n];a in r&&r[a]!==void 0&&r[a]!==null&&(this[a]=a==="history"?[...r[a]]:r[a])}let i;for(i in r)qy.includes(i)||(this[i]=r[i])}get basename(){return typeof this.path=="string"?Mi.basename(this.path):void 0}set basename(t){Vy(t,"basename"),Wy(t,"basename"),this.path=Mi.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Mi.dirname(this.path):void 0}set dirname(t){Gk(this.basename,"dirname"),this.path=Mi.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Mi.extname(this.path):void 0}set extname(t){if(Wy(t,"extname"),Gk(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Mi.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){C0(t)&&(t=Y7(t)),Vy(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Mi.basename(this.path,this.extname):void 0}set stem(t){Vy(t,"stem"),Wy(t,"stem"),this.path=Mi.join(this.dirname||"",t+(this.extname||""))}fail(t,r,n){const i=this.message(t,r,n);throw i.fatal=!0,i}info(t,r,n){const i=this.message(t,r,n);return i.fatal=void 0,i}message(t,r,n){const i=new Yr(t,r,n);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Wy(e,t){if(e&&e.includes(Mi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Mi.sep+"`")}function Vy(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Gk(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function G7(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Z7=(function(e){const n=this.constructor.prototype,i=n[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,n),a}),Q7={}.hasOwnProperty;class Ew extends Z7{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=j7()}copy(){const t=new Ew;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];t.use(...n)}return t.data(Ky(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(Gy("data",this.frozen),this.namespace[t]=r,this):Q7.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Gy("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);const i=r.call(t,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=wd(t),n=this.parser||this.Parser;return Yy("parse",n),n(String(r),r)}process(t,r){const n=this;return this.freeze(),Yy("process",this.parser||this.Parser),Xy("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(a,l){const u=wd(t),f=n.parse(u);n.run(f,u,function(d,m,v){if(d||!m||!v)return h(d);const g=m,S=n.stringify(g,v);t$(S)?v.value=S:v.result=S,h(d,v)});function h(d,m){d||!m?l(d):a?a(m):r(void 0,m)}}}processSync(t){let r=!1,n;return this.freeze(),Yy("processSync",this.parser||this.Parser),Xy("processSync",this.compiler||this.Compiler),this.process(t,i),Qk("processSync","process",r),n;function i(a,l){r=!0,Yk(a),n=l}}run(t,r,n){Zk(t),this.freeze();const i=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?a(void 0,n):new Promise(a);function a(l,u){const f=wd(r);i.run(t,f,h);function h(d,m,v){const g=m||t;d?u(d):l?l(g):n(void 0,g,v)}}}runSync(t,r){let n=!1,i;return this.run(t,r,a),Qk("runSync","run",n),i;function a(l,u){Yk(l),i=u,n=!0}}stringify(t,r){this.freeze();const n=wd(r),i=this.compiler||this.Compiler;return Xy("stringify",i),Zk(t),i(t,n)}use(t,...r){const n=this.attachers,i=this.namespace;if(Gy("use",this.frozen),t!=null)if(typeof t=="function")f(t,r);else if(typeof t=="object")Array.isArray(t)?u(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(h){if(typeof h=="function")f(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[d,...m]=h;f(d,m)}else l(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function l(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(h.plugins),h.settings&&(i.settings=Ky(!0,i.settings,h.settings))}function u(h){let d=-1;if(h!=null)if(Array.isArray(h))for(;++d<h.length;){const m=h[d];a(m)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function f(h,d){let m=-1,v=-1;for(;++m<n.length;)if(n[m][0]===h){v=m;break}if(v===-1)n.push([h,...d]);else if(d.length>0){let[g,...S]=d;const _=n[v][1];x0(_)&&x0(g)&&(g=Ky(!0,_,g)),n[v]=[h,g,...S]}}}}const J7=new Ew().freeze();function Yy(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Xy(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Gy(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Zk(e){if(!x0(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Qk(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function wd(e){return e$(e)?e:new dB(e)}function e$(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function t$(e){return typeof e=="string"||r$(e)}function r$(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const n$="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Jk=[],e2={allowDangerousHtml:!0},i$=/^(https?|ircs?|mailto|xmpp)$/i,a$=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function s$(e){const t=o$(e),r=l$(e);return u$(t.runSync(t.parse(r),r),e)}function o$(e){const t=e.rehypePlugins||Jk,r=e.remarkPlugins||Jk,n=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...e2}:e2;return J7().use(H9).use(r).use(B7,n).use(t)}function l$(e){const t=e.children||"",r=new dB;return typeof t=="string"&&(r.value=t),r}function u$(e,t){const r=t.allowedElements,n=t.allowElement,i=t.components,a=t.disallowedElements,l=t.skipHtml,u=t.unwrapDisallowed,f=t.urlTransform||c$;for(const d of a$)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+n$+d.id,void 0);return fB(e,h),cF(e,{Fragment:_e.Fragment,components:i,ignoreInvalidStyle:!0,jsx:_e.jsx,jsxs:_e.jsxs,passKeys:!0,passNode:!0});function h(d,m,v){if(d.type==="raw"&&v&&typeof m=="number")return l?v.children.splice(m,1):v.children[m]={type:"text",value:d.value},m;if(d.type==="element"){let g;for(g in Hy)if(Object.hasOwn(Hy,g)&&Object.hasOwn(d.properties,g)){const S=d.properties[g],_=Hy[g];(_===null||_.includes(d.tagName))&&(d.properties[g]=f(String(S||""),g,d))}}if(d.type==="element"){let g=r?!r.includes(d.tagName):a?a.includes(d.tagName):!1;if(!g&&n&&typeof m=="number"&&(g=!n(d,m,v)),g&&v&&typeof m=="number")return u&&d.children?v.children.splice(m,1,...d.children):v.children.splice(m,1),m}}}function c$(e){const t=e.indexOf(":"),r=e.indexOf("?"),n=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||r!==-1&&t>r||n!==-1&&t>n||i$.test(e.slice(0,t))?e:""}const h$={h1:({children:e})=>_e.jsx("h1",{className:"text-3xl font-bold mb-4 mt-6 text-foreground",children:e}),h2:({children:e})=>_e.jsx("h2",{className:"text-2xl font-bold mb-3 mt-5 text-foreground",children:e}),h3:({children:e})=>_e.jsx("h3",{className:"text-xl font-bold mb-3 mt-4 text-foreground",children:e}),h4:({children:e})=>_e.jsx("h4",{className:"text-lg font-bold mb-2 mt-3 text-foreground",children:e}),h5:({children:e})=>_e.jsx("h5",{className:"text-base font-bold mb-2 mt-3 text-foreground",children:e}),h6:({children:e})=>_e.jsx("h6",{className:"text-sm font-bold mb-2 mt-3 text-foreground",children:e}),p:({children:e})=>_e.jsx("p",{className:"mb-4 leading-relaxed text-secondary",children:e}),a:({href:e,children:t})=>_e.jsx("a",{href:e,className:"text-accent hover:underline",children:t}),ul:({children:e})=>_e.jsx("ul",{className:"list-disc list-inside mb-4 space-y-1 text-secondary",children:e}),ol:({children:e})=>_e.jsx("ol",{className:"list-decimal list-inside mb-4 space-y-1 text-secondary",children:e}),li:({children:e})=>_e.jsx("li",{className:"ml-4",children:e}),code:({className:e,children:t})=>e?_e.jsx("code",{className:e,children:t}):_e.jsx("code",{className:"bg-panel text-foreground px-1 py-0.5 rounded text-sm font-mono",children:t}),pre:({children:e})=>_e.jsx("pre",{className:"bg-panel text-foreground p-4 rounded-lg overflow-x-auto mb-4 text-sm font-mono",children:e}),blockquote:({children:e})=>_e.jsx("blockquote",{className:"border-l-4 border-border pl-4 italic mb-4 text-muted",children:e}),hr:()=>_e.jsx("hr",{className:"border-border my-6"}),table:({children:e})=>_e.jsx("div",{className:"overflow-x-auto mb-4",children:_e.jsx("table",{className:"min-w-full border-collapse border border-border",children:e})}),th:({children:e})=>_e.jsx("th",{className:"border border-border px-4 py-2 bg-panel font-bold text-left text-foreground",children:e}),td:({children:e})=>_e.jsx("td",{className:"border border-border px-4 py-2 text-secondary",children:e})};function f$({text:e,style:t,className:r,scrollable:n=!0}){const i=n?"overflow-auto":"";return _e.jsx("div",{className:DL("prose prose-sm max-w-none",i,r),style:t,children:_e.jsx(s$,{components:h$,children:e||""})})}function d$({config:e,onClose:t}){const r=()=>{t(!0)};return w.useEffect(()=>{const n=i=>{i.key==="Escape"&&t(!1)};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[t]),_e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:_e.jsx("div",{className:"bg-gray-800 rounded-lg shadow-xl max-w-md w-full mx-4 p-6 border border-gray-700",children:_e.jsxs("div",{className:"flex flex-col gap-4",children:[_e.jsxs("div",{className:"flex items-center gap-3",children:[e.icon&&_e.jsx("div",{className:"text-4xl",children:e.icon}),_e.jsx("h2",{className:"text-xl font-semibold text-white",children:e.title})]}),e.text&&_e.jsx("p",{className:"text-gray-300",children:e.text}),_e.jsx("div",{className:"flex justify-end gap-3 mt-2",children:_e.jsx("button",{onClick:r,className:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500",children:e.oktext||"OK"})})]})})})}function p$({config:e,onClose:t}){const r=()=>{t(!0)},n=()=>{t(!1)};return w.useEffect(()=>{const i=a=>{a.key==="Escape"&&t(!1)};return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[t]),_e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:_e.jsx("div",{className:"bg-gray-800 rounded-lg shadow-xl max-w-md w-full mx-4 p-6 border border-gray-700",children:_e.jsxs("div",{className:"flex flex-col gap-4",children:[_e.jsxs("div",{className:"flex items-center gap-3",children:[e.icon&&_e.jsx("div",{className:"text-4xl",children:e.icon}),_e.jsx("h2",{className:"text-xl font-semibold text-white",children:e.title})]}),e.text&&_e.jsx("p",{className:"text-gray-300",children:e.text}),_e.jsxs("div",{className:"flex justify-end gap-3 mt-2",children:[_e.jsx("button",{onClick:n,className:"px-4 py-2 bg-gray-600 text-white rounded hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-gray-500",children:e.canceltext||"Cancel"}),_e.jsx("button",{onClick:r,className:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500",children:e.oktext||"OK"})]})]})})})}/**
 * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
 * @license MIT
 *
 * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
 * @license MIT
 *
 * Originally forked from (with the author's permission):
 *   Fabrice Bellard's javascript vt100 for jslinux:
 *   http://bellard.org/jslinux/
 *   Copyright (c) 2011 Fabrice Bellard
 */var m$=2,v$=1,g$=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){var m;if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:((m=this._terminal.options.overviewRuler)==null?void 0:m.width)||14,r=window.getComputedStyle(this._terminal.element.parentElement),n=parseInt(r.getPropertyValue("height")),i=Math.max(0,parseInt(r.getPropertyValue("width"))),a=window.getComputedStyle(this._terminal.element),l={top:parseInt(a.getPropertyValue("padding-top")),bottom:parseInt(a.getPropertyValue("padding-bottom")),right:parseInt(a.getPropertyValue("padding-right")),left:parseInt(a.getPropertyValue("padding-left"))},u=l.top+l.bottom,f=l.right+l.left,h=n-u,d=i-f-t;return{cols:Math.max(m$,Math.floor(d/e.css.cell.width)),rows:Math.max(v$,Math.floor(h/e.css.cell.height))}}};/**
 * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
 * @license MIT
 *
 * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
 * @license MIT
 *
 * Originally forked from (with the author's permission):
 *   Fabrice Bellard's javascript vt100 for jslinux:
 *   http://bellard.org/jslinux/
 *   Copyright (c) 2011 Fabrice Bellard
 */var pB=Object.defineProperty,y$=Object.getOwnPropertyDescriptor,_$=(e,t)=>{for(var r in t)pB(e,r,{get:t[r],enumerable:!0})},Ut=(e,t,r,n)=>{for(var i=n>1?void 0:n?y$(t,r):t,a=e.length-1,l;a>=0;a--)(l=e[a])&&(i=(n?l(t,r,i):l(i))||i);return n&&i&&pB(t,r,i),i},ge=(e,t)=>(r,n)=>t(r,n,e),t2="Terminal input",E0={get:()=>t2,set:e=>t2=e},r2="Too much output to announce, navigate to rows manually to read",A0={get:()=>r2,set:e=>r2=e};function b$(e){return e.replace(/\r?\n/g,"\r")}function S$(e,t){return t?"\x1B[200~"+e+"\x1B[201~":e}function w$(e,t){e.clipboardData&&e.clipboardData.setData("text/plain",t.selectionText),e.preventDefault()}function x$(e,t,r,n){if(e.stopPropagation(),e.clipboardData){let i=e.clipboardData.getData("text/plain");mB(i,t,r,n)}}function mB(e,t,r,n){e=b$(e),e=S$(e,r.decPrivateModes.bracketedPasteMode&&n.rawOptions.ignoreBracketedPasteMode!==!0),r.triggerDataEvent(e,!0),t.value=""}function vB(e,t,r){let n=r.getBoundingClientRect(),i=e.clientX-n.left-10,a=e.clientY-n.top-10;t.style.width="20px",t.style.height="20px",t.style.left=`${i}px`,t.style.top=`${a}px`,t.style.zIndex="1000",t.focus()}function n2(e,t,r,n,i){vB(e,t,r),i&&n.rightClickSelect(e),t.value=n.selectionText,t.select()}function gs(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function lm(e,t=0,r=e.length){let n="";for(let i=t;i<r;++i){let a=e[i];a>65535?(a-=65536,n+=String.fromCharCode((a>>10)+55296)+String.fromCharCode(a%1024+56320)):n+=String.fromCharCode(a)}return n}var C$=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let r=e.length;if(!r)return 0;let n=0,i=0;if(this._interim){let a=e.charCodeAt(i++);56320<=a&&a<=57343?t[n++]=(this._interim-55296)*1024+a-56320+65536:(t[n++]=this._interim,t[n++]=a),this._interim=0}for(let a=i;a<r;++a){let l=e.charCodeAt(a);if(55296<=l&&l<=56319){if(++a>=r)return this._interim=l,n;let u=e.charCodeAt(a);56320<=u&&u<=57343?t[n++]=(l-55296)*1024+u-56320+65536:(t[n++]=l,t[n++]=u);continue}l!==65279&&(t[n++]=l)}return n}},E$=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let r=e.length;if(!r)return 0;let n=0,i,a,l,u,f=0,h=0;if(this.interim[0]){let v=!1,g=this.interim[0];g&=(g&224)===192?31:(g&240)===224?15:7;let S=0,_;for(;(_=this.interim[++S]&63)&&S<4;)g<<=6,g|=_;let x=(this.interim[0]&224)===192?2:(this.interim[0]&240)===224?3:4,C=x-S;for(;h<C;){if(h>=r)return 0;if(_=e[h++],(_&192)!==128){h--,v=!0;break}else this.interim[S++]=_,g<<=6,g|=_&63}v||(x===2?g<128?h--:t[n++]=g:x===3?g<2048||g>=55296&&g<=57343||g===65279||(t[n++]=g):g<65536||g>1114111||(t[n++]=g)),this.interim.fill(0)}let d=r-4,m=h;for(;m<r;){for(;m<d&&!((i=e[m])&128)&&!((a=e[m+1])&128)&&!((l=e[m+2])&128)&&!((u=e[m+3])&128);)t[n++]=i,t[n++]=a,t[n++]=l,t[n++]=u,m+=4;if(i=e[m++],i<128)t[n++]=i;else if((i&224)===192){if(m>=r)return this.interim[0]=i,n;if(a=e[m++],(a&192)!==128){m--;continue}if(f=(i&31)<<6|a&63,f<128){m--;continue}t[n++]=f}else if((i&240)===224){if(m>=r)return this.interim[0]=i,n;if(a=e[m++],(a&192)!==128){m--;continue}if(m>=r)return this.interim[0]=i,this.interim[1]=a,n;if(l=e[m++],(l&192)!==128){m--;continue}if(f=(i&15)<<12|(a&63)<<6|l&63,f<2048||f>=55296&&f<=57343||f===65279)continue;t[n++]=f}else if((i&248)===240){if(m>=r)return this.interim[0]=i,n;if(a=e[m++],(a&192)!==128){m--;continue}if(m>=r)return this.interim[0]=i,this.interim[1]=a,n;if(l=e[m++],(l&192)!==128){m--;continue}if(m>=r)return this.interim[0]=i,this.interim[1]=a,this.interim[2]=l,n;if(u=e[m++],(u&192)!==128){m--;continue}if(f=(i&7)<<18|(a&63)<<12|(l&63)<<6|u&63,f<65536||f>1114111)continue;t[n++]=f}}return n}},gB="",Ss=" ",xh=class yB{constructor(){this.fg=0,this.bg=0,this.extended=new cp}static toColorRGB(t){return[t>>>16&255,t>>>8&255,t&255]}static fromColorRGB(t){return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255}clone(){let t=new yB;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},cp=class _B{constructor(t=0,r=0){this._ext=0,this._urlId=0,this._ext=t,this._urlId=r}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(t){this._ext=t}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(t){this._ext&=-469762049,this._ext|=t<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(t){this._ext&=-67108864,this._ext|=t&67108863}get urlId(){return this._urlId}set urlId(t){this._urlId=t}get underlineVariantOffset(){let t=(this._ext&3758096384)>>29;return t<0?t^4294967288:t}set underlineVariantOffset(t){this._ext&=536870911,this._ext|=t<<29&3758096384}clone(){return new _B(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},oi=class bB extends xh{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new cp,this.combinedData=""}static fromCharData(t){let r=new bB;return r.setFromCharData(t),r}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?gs(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(t){this.fg=t[0],this.bg=0;let r=!1;if(t[1].length>2)r=!0;else if(t[1].length===2){let n=t[1].charCodeAt(0);if(55296<=n&&n<=56319){let i=t[1].charCodeAt(1);56320<=i&&i<=57343?this.content=(n-55296)*1024+i-56320+65536|t[2]<<22:r=!0}else r=!0}else this.content=t[1].charCodeAt(0)|t[2]<<22;r&&(this.combinedData=t[1],this.content=2097152|t[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},i2="di$target",O0="di$dependencies",Zy=new Map;function A$(e){return e[O0]||[]}function Ar(e){if(Zy.has(e))return Zy.get(e);let t=function(r,n,i){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");O$(t,r,i)};return t._id=e,Zy.set(e,t),t}function O$(e,t,r){t[i2]===t?t[O0].push({id:e,index:r}):(t[O0]=[{id:e,index:r}],t[i2]=t)}var tn=Ar("BufferService"),SB=Ar("CoreMouseService"),Bo=Ar("CoreService"),k$=Ar("CharsetService"),Aw=Ar("InstantiationService"),wB=Ar("LogService"),rn=Ar("OptionsService"),xB=Ar("OscLinkService"),P$=Ar("UnicodeService"),Ch=Ar("DecorationService"),k0=class{constructor(e,t,r){this._bufferService=e,this._optionsService=t,this._oscLinkService=r}provideLinks(e,t){var d;let r=this._bufferService.buffer.lines.get(e-1);if(!r){t(void 0);return}let n=[],i=this._optionsService.rawOptions.linkHandler,a=new oi,l=r.getTrimmedLength(),u=-1,f=-1,h=!1;for(let m=0;m<l;m++)if(!(f===-1&&!r.hasContent(m))){if(r.loadCell(m,a),a.hasExtendedAttrs()&&a.extended.urlId)if(f===-1){f=m,u=a.extended.urlId;continue}else h=a.extended.urlId!==u;else f!==-1&&(h=!0);if(h||f!==-1&&m===l-1){let v=(d=this._oscLinkService.getLinkData(u))==null?void 0:d.uri;if(v){let g={start:{x:f+1,y:e},end:{x:m+(!h&&m===l-1?1:0),y:e}},S=!1;if(!(i!=null&&i.allowNonHttpProtocols))try{let _=new URL(v);["http:","https:"].includes(_.protocol)||(S=!0)}catch{S=!0}S||n.push({text:v,range:g,activate:(_,x)=>i?i.activate(_,x,g):T$(_,x),hover:(_,x)=>{var C;return(C=i==null?void 0:i.hover)==null?void 0:C.call(i,_,x,g)},leave:(_,x)=>{var C;return(C=i==null?void 0:i.leave)==null?void 0:C.call(i,_,x,g)}})}h=!1,a.hasExtendedAttrs()&&a.extended.urlId?(f=m,u=a.extended.urlId):(f=-1,u=-1)}}t(n)}};k0=Ut([ge(0,tn),ge(1,rn),ge(2,xB)],k0);function T$(e,t){if(confirm(`Do you want to navigate to ${t}?

WARNING: This link could potentially be dangerous`)){let r=window.open();if(r){try{r.opener=null}catch{}r.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}}var um=Ar("CharSizeService"),ka=Ar("CoreBrowserService"),Ow=Ar("MouseService"),Pa=Ar("RenderService"),D$=Ar("SelectionService"),CB=Ar("CharacterJoinerService"),au=Ar("ThemeService"),EB=Ar("LinkProviderService"),M$=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?a2.isErrorNoTelemetry(e)?new a2(e.message+`

`+e.stack):new Error(e.message+`

`+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},R$=new M$;function Yd(e){L$(e)||R$.onUnexpectedError(e)}var P0="Canceled";function L$(e){return e instanceof B$?!0:e instanceof Error&&e.name===P0&&e.message===P0}var B$=class extends Error{constructor(){super(P0),this.name=this.message}};function N$(e){return new Error(`Illegal argument: ${e}`)}var a2=class T0 extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof T0)return t;let r=new T0;return r.message=t.message,r.stack=t.stack,r}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},D0=class AB extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,AB.prototype)}};function On(e,t=0){return e[e.length-(1+t)]}var I$;(e=>{function t(a){return a<0}e.isLessThan=t;function r(a){return a<=0}e.isLessThanOrEqual=r;function n(a){return a>0}e.isGreaterThan=n;function i(a){return a===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(I$||(I$={}));function j$(e,t){let r=this,n=!1,i;return function(){return n||(n=!0,t||(i=e.apply(r,arguments))),i}}var OB;(e=>{function t(P){return P&&typeof P=="object"&&typeof P[Symbol.iterator]=="function"}e.is=t;let r=Object.freeze([]);function n(){return r}e.empty=n;function*i(P){yield P}e.single=i;function a(P){return t(P)?P:i(P)}e.wrap=a;function l(P){return P||r}e.from=l;function*u(P){for(let D=P.length-1;D>=0;D--)yield P[D]}e.reverse=u;function f(P){return!P||P[Symbol.iterator]().next().done===!0}e.isEmpty=f;function h(P){return P[Symbol.iterator]().next().value}e.first=h;function d(P,D){let k=0;for(let R of P)if(D(R,k++))return!0;return!1}e.some=d;function m(P,D){for(let k of P)if(D(k))return k}e.find=m;function*v(P,D){for(let k of P)D(k)&&(yield k)}e.filter=v;function*g(P,D){let k=0;for(let R of P)yield D(R,k++)}e.map=g;function*S(P,D){let k=0;for(let R of P)yield*D(R,k++)}e.flatMap=S;function*_(...P){for(let D of P)yield*D}e.concat=_;function x(P,D,k){let R=k;for(let N of P)R=D(R,N);return R}e.reduce=x;function*C(P,D,k=P.length){for(D<0&&(D+=P.length),k<0?k+=P.length:k>P.length&&(k=P.length);D<k;D++)yield P[D]}e.slice=C;function A(P,D=Number.POSITIVE_INFINITY){let k=[];if(D===0)return[k,P];let R=P[Symbol.iterator]();for(let N=0;N<D;N++){let $=R.next();if($.done)return[k,e.empty()];k.push($.value)}return[k,{[Symbol.iterator](){return R}}]}e.consume=A;async function O(P){let D=[];for await(let k of P)D.push(k);return Promise.resolve(D)}e.asyncToArray=O})(OB||(OB={}));function Eo(e){if(OB.is(e)){let t=[];for(let r of e)if(r)try{r.dispose()}catch(n){t.push(n)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function z$(...e){return Bt(()=>Eo(e))}function Bt(e){return{dispose:j$(()=>{e()})}}var kB=class PB{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Eo(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?PB.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),void 0)}};kB.DISABLE_DISPOSED_WARNING=!1;var xs=kB,We=class{constructor(){this._store=new xs,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};We.None=Object.freeze({dispose(){}});var $l=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||((t=this._value)==null||t.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,(e=this._value)==null||e.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e}},da=typeof window=="object"?window:globalThis,M0=class R0{constructor(t){this.element=t,this.next=R0.Undefined,this.prev=R0.Undefined}};M0.Undefined=new M0(void 0);var Nt=M0,s2=class{constructor(){this._first=Nt.Undefined,this._last=Nt.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Nt.Undefined}clear(){let e=this._first;for(;e!==Nt.Undefined;){let t=e.next;e.prev=Nt.Undefined,e.next=Nt.Undefined,e=t}this._first=Nt.Undefined,this._last=Nt.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let r=new Nt(e);if(this._first===Nt.Undefined)this._first=r,this._last=r;else if(t){let i=this._last;this._last=r,r.prev=i,i.next=r}else{let i=this._first;this._first=r,r.next=i,i.prev=r}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(r))}}shift(){if(this._first!==Nt.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Nt.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Nt.Undefined&&e.next!==Nt.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Nt.Undefined&&e.next===Nt.Undefined?(this._first=Nt.Undefined,this._last=Nt.Undefined):e.next===Nt.Undefined?(this._last=this._last.prev,this._last.next=Nt.Undefined):e.prev===Nt.Undefined&&(this._first=this._first.next,this._first.prev=Nt.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Nt.Undefined;)yield e.element,e=e.next}},H$=globalThis.performance&&typeof globalThis.performance.now=="function",F$=class TB{static create(t){return new TB(t)}constructor(t){this._now=H$&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},Ir;(e=>{e.None=()=>We.None;function t(z,j){return m(z,()=>{},0,void 0,!0,void 0,j)}e.defer=t;function r(z){return(j,K=null,W)=>{let B=!1,q;return q=z(G=>{if(!B)return q?q.dispose():B=!0,j.call(K,G)},null,W),B&&q.dispose(),q}}e.once=r;function n(z,j,K){return h((W,B=null,q)=>z(G=>W.call(B,j(G)),null,q),K)}e.map=n;function i(z,j,K){return h((W,B=null,q)=>z(G=>{j(G),W.call(B,G)},null,q),K)}e.forEach=i;function a(z,j,K){return h((W,B=null,q)=>z(G=>j(G)&&W.call(B,G),null,q),K)}e.filter=a;function l(z){return z}e.signal=l;function u(...z){return(j,K=null,W)=>{let B=z$(...z.map(q=>q(G=>j.call(K,G))));return d(B,W)}}e.any=u;function f(z,j,K,W){let B=K;return n(z,q=>(B=j(B,q),B),W)}e.reduce=f;function h(z,j){let K,W={onWillAddFirstListener(){K=z(B.fire,B)},onDidRemoveLastListener(){K==null||K.dispose()}},B=new me(W);return j==null||j.add(B),B.event}function d(z,j){return j instanceof Array?j.push(z):j&&j.add(z),z}function m(z,j,K=100,W=!1,B=!1,q,G){let ce,M,I,Y=0,L,ue={leakWarningThreshold:q,onWillAddFirstListener(){ce=z(pe=>{Y++,M=j(M,pe),W&&!I&&(fe.fire(M),M=void 0),L=()=>{let Te=M;M=void 0,I=void 0,(!W||Y>1)&&fe.fire(Te),Y=0},typeof K=="number"?(clearTimeout(I),I=setTimeout(L,K)):I===void 0&&(I=0,queueMicrotask(L))})},onWillRemoveListener(){B&&Y>0&&(L==null||L())},onDidRemoveLastListener(){L=void 0,ce.dispose()}},fe=new me(ue);return G==null||G.add(fe),fe.event}e.debounce=m;function v(z,j=0,K){return e.debounce(z,(W,B)=>W?(W.push(B),W):[B],j,void 0,!0,void 0,K)}e.accumulate=v;function g(z,j=(W,B)=>W===B,K){let W=!0,B;return a(z,q=>{let G=W||!j(q,B);return W=!1,B=q,G},K)}e.latch=g;function S(z,j,K){return[e.filter(z,j,K),e.filter(z,W=>!j(W),K)]}e.split=S;function _(z,j=!1,K=[],W){let B=K.slice(),q=z(M=>{B?B.push(M):ce.fire(M)});W&&W.add(q);let G=()=>{B==null||B.forEach(M=>ce.fire(M)),B=null},ce=new me({onWillAddFirstListener(){q||(q=z(M=>ce.fire(M)),W&&W.add(q))},onDidAddFirstListener(){B&&(j?setTimeout(G):G())},onDidRemoveLastListener(){q&&q.dispose(),q=null}});return W&&W.add(ce),ce.event}e.buffer=_;function x(z,j){return(K,W,B)=>{let q=j(new A);return z(function(G){let ce=q.evaluate(G);ce!==C&&K.call(W,ce)},void 0,B)}}e.chain=x;let C=Symbol("HaltChainable");class A{constructor(){this.steps=[]}map(j){return this.steps.push(j),this}forEach(j){return this.steps.push(K=>(j(K),K)),this}filter(j){return this.steps.push(K=>j(K)?K:C),this}reduce(j,K){let W=K;return this.steps.push(B=>(W=j(W,B),W)),this}latch(j=(K,W)=>K===W){let K=!0,W;return this.steps.push(B=>{let q=K||!j(B,W);return K=!1,W=B,q?B:C}),this}evaluate(j){for(let K of this.steps)if(j=K(j),j===C)break;return j}}function O(z,j,K=W=>W){let W=(...ce)=>G.fire(K(...ce)),B=()=>z.on(j,W),q=()=>z.removeListener(j,W),G=new me({onWillAddFirstListener:B,onDidRemoveLastListener:q});return G.event}e.fromNodeEventEmitter=O;function P(z,j,K=W=>W){let W=(...ce)=>G.fire(K(...ce)),B=()=>z.addEventListener(j,W),q=()=>z.removeEventListener(j,W),G=new me({onWillAddFirstListener:B,onDidRemoveLastListener:q});return G.event}e.fromDOMEventEmitter=P;function D(z){return new Promise(j=>r(z)(j))}e.toPromise=D;function k(z){let j=new me;return z.then(K=>{j.fire(K)},()=>{j.fire(void 0)}).finally(()=>{j.dispose()}),j.event}e.fromPromise=k;function R(z,j){return z(K=>j.fire(K))}e.forward=R;function N(z,j,K){return j(K),z(W=>j(W))}e.runAndSubscribe=N;class ${constructor(j,K){this._observable=j,this._counter=0,this._hasChanged=!1;let W={onWillAddFirstListener:()=>{j.addObserver(this)},onDidRemoveLastListener:()=>{j.removeObserver(this)}};this.emitter=new me(W),K&&K.add(this.emitter)}beginUpdate(j){this._counter++}handlePossibleChange(j){}handleChange(j,K){this._hasChanged=!0}endUpdate(j){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function ee(z,j){return new $(z,j).emitter.event}e.fromObservable=ee;function F(z){return(j,K,W)=>{let B=0,q=!1,G={beginUpdate(){B++},endUpdate(){B--,B===0&&(z.reportChanges(),q&&(q=!1,j.call(K)))},handlePossibleChange(){},handleChange(){q=!0}};z.addObserver(G),z.reportChanges();let ce={dispose(){z.removeObserver(G)}};return W instanceof xs?W.add(ce):Array.isArray(W)&&W.push(ce),ce}}e.fromObservableLight=F})(Ir||(Ir={}));var L0=class B0{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${B0._idPool++}`,B0.all.add(this)}start(t){this._stopWatch=new F$,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};L0.all=new Set,L0._idPool=0;var U$=L0,$$=-1,DB=class MB{constructor(t,r,n=(MB._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=r,this.name=n,this._warnCountdown=0}dispose(){var t;(t=this._stacks)==null||t.clear()}check(t,r){let n=this.threshold;if(n<=0||r<n)return;this._stacks||(this._stacks=new Map);let i=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,i+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=n*.5;let[a,l]=this.getMostFrequentStack(),u=`[${this.name}] potential listener LEAK detected, having ${r} listeners already. MOST frequent listener (${l}):`;console.warn(u),console.warn(a);let f=new W$(u,a);this._errorHandler(f)}return()=>{let a=this._stacks.get(t.value)||0;this._stacks.set(t.value,a-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,r=0;for(let[n,i]of this._stacks)(!t||r<i)&&(t=[n,i],r=i);return t}};DB._idPool=1;var K$=DB,q$=class RB{constructor(t){this.value=t}static create(){let t=new Error;return new RB(t.stack??"")}print(){console.warn(this.value.split(`
`).slice(2).join(`
`))}},W$=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},V$=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},Y$=0,Qy=class{constructor(e){this.value=e,this.id=Y$++}},X$=2,G$,me=class{constructor(e){var t,r,n,i;this._size=0,this._options=e,this._leakageMon=(t=this._options)!=null&&t.leakWarningThreshold?new K$((e==null?void 0:e.onListenerError)??Yd,((r=this._options)==null?void 0:r.leakWarningThreshold)??$$):void 0,this._perfMon=(n=this._options)!=null&&n._profName?new U$(this._options._profName):void 0,this._deliveryQueue=(i=this._options)==null?void 0:i.deliveryQueue}dispose(){var e,t,r,n;this._disposed||(this._disposed=!0,((e=this._deliveryQueue)==null?void 0:e.current)===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),(r=(t=this._options)==null?void 0:t.onDidRemoveLastListener)==null||r.call(t),(n=this._leakageMon)==null||n.dispose())}get event(){return this._event??(this._event=(e,t,r)=>{var l,u,f,h,d;if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let m=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(m);let v=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],g=new V$(`${m}. HINT: Stack shows most frequent listener (${v[1]}-times)`,v[0]);return(((l=this._options)==null?void 0:l.onListenerError)||Yd)(g),We.None}if(this._disposed)return We.None;t&&(e=e.bind(t));let n=new Qy(e),i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(n.stack=q$.create(),i=this._leakageMon.check(n.stack,this._size+1)),this._listeners?this._listeners instanceof Qy?(this._deliveryQueue??(this._deliveryQueue=new Z$),this._listeners=[this._listeners,n]):this._listeners.push(n):((f=(u=this._options)==null?void 0:u.onWillAddFirstListener)==null||f.call(u,this),this._listeners=n,(d=(h=this._options)==null?void 0:h.onDidAddFirstListener)==null||d.call(h,this)),this._size++;let a=Bt(()=>{i==null||i(),this._removeListener(n)});return r instanceof xs?r.add(a):Array.isArray(r)&&r.push(a),a}),this._event}_removeListener(e){var i,a,l,u;if((a=(i=this._options)==null?void 0:i.onWillRemoveListener)==null||a.call(i,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(u=(l=this._options)==null?void 0:l.onDidRemoveLastListener)==null||u.call(l,this),this._size=0;return}let t=this._listeners,r=t.indexOf(e);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[r]=void 0;let n=this._deliveryQueue.current===this;if(this._size*X$<=t.length){let f=0;for(let h=0;h<t.length;h++)t[h]?t[f++]=t[h]:n&&(this._deliveryQueue.end--,f<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=f}}_deliver(e,t){var n;if(!e)return;let r=((n=this._options)==null?void 0:n.onListenerError)||Yd;if(!r){e.value(t);return}try{e.value(t)}catch(i){r(i)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){var t,r,n,i;if((t=this._deliveryQueue)!=null&&t.current&&(this._deliverQueue(this._deliveryQueue),(r=this._perfMon)==null||r.stop()),(n=this._perfMon)==null||n.start(this._size),this._listeners)if(this._listeners instanceof Qy)this._deliver(this._listeners,e);else{let a=this._deliveryQueue;a.enqueue(this,e,this._listeners.length),this._deliverQueue(a)}(i=this._perfMon)==null||i.stop()}hasListeners(){return this._size>0}},Z$=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,r){this.i=0,this.end=r,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},N0=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new me,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new me,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(t){return this.mapWindowIdToZoomLevel.get(this.getWindowId(t))??0}setZoomLevel(t,r){if(this.getZoomLevel(r)===t)return;let n=this.getWindowId(r);this.mapWindowIdToZoomLevel.set(n,t),this._onDidChangeZoomLevel.fire(n)}getZoomFactor(t){return this.mapWindowIdToZoomFactor.get(this.getWindowId(t))??1}setZoomFactor(t,r){this.mapWindowIdToZoomFactor.set(this.getWindowId(r),t)}setFullscreen(t,r){if(this.isFullscreen(r)===t)return;let n=this.getWindowId(r);this.mapWindowIdToFullScreen.set(n,t),this._onDidChangeFullscreen.fire(n)}isFullscreen(t){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(t))}getWindowId(t){return t.vscodeWindowId}};N0.INSTANCE=new N0;var kw=N0;function Q$(e,t,r){typeof t=="string"&&(t=e.matchMedia(t)),t.addEventListener("change",r)}kw.INSTANCE.onDidChangeZoomLevel;function J$(e){return kw.INSTANCE.getZoomFactor(e)}kw.INSTANCE.onDidChangeFullscreen;var su=typeof navigator=="object"?navigator.userAgent:"",I0=su.indexOf("Firefox")>=0,eK=su.indexOf("AppleWebKit")>=0,Pw=su.indexOf("Chrome")>=0,tK=!Pw&&su.indexOf("Safari")>=0;su.indexOf("Electron/")>=0;su.indexOf("Android")>=0;var Jy=!1;if(typeof da.matchMedia=="function"){let e=da.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=da.matchMedia("(display-mode: fullscreen)");Jy=e.matches,Q$(da,e,({matches:r})=>{Jy&&t.matches||(Jy=r)})}var Rl="en",j0=!1,z0=!1,Xd=!1,LB=!1,xd,Gd=Rl,o2=Rl,rK,yi,_o=globalThis,Br,GR;typeof _o.vscode<"u"&&typeof _o.vscode.process<"u"?Br=_o.vscode.process:typeof process<"u"&&typeof((GR=process==null?void 0:process.versions)==null?void 0:GR.node)=="string"&&(Br=process);var ZR,nK=typeof((ZR=Br==null?void 0:Br.versions)==null?void 0:ZR.electron)=="string",iK=nK&&(Br==null?void 0:Br.type)==="renderer",QR;if(typeof Br=="object"){j0=Br.platform==="win32",z0=Br.platform==="darwin",Xd=Br.platform==="linux",Xd&&Br.env.SNAP&&Br.env.SNAP_REVISION,Br.env.CI||Br.env.BUILD_ARTIFACTSTAGINGDIRECTORY,xd=Rl,Gd=Rl;let e=Br.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);xd=t.userLocale,o2=t.osLocale,Gd=t.resolvedLanguage||Rl,rK=(QR=t.languagePack)==null?void 0:QR.translationsConfigFile}catch{}LB=!0}else typeof navigator=="object"&&!iK?(yi=navigator.userAgent,j0=yi.indexOf("Windows")>=0,z0=yi.indexOf("Macintosh")>=0,(yi.indexOf("Macintosh")>=0||yi.indexOf("iPad")>=0||yi.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Xd=yi.indexOf("Linux")>=0,(yi==null?void 0:yi.indexOf("Mobi"))>=0,Gd=globalThis._VSCODE_NLS_LANGUAGE||Rl,xd=navigator.language.toLowerCase(),o2=xd):console.error("Unable to resolve platform.");var BB=j0,zi=z0,aK=Xd,l2=LB,Ui=yi,ps=Gd,sK;(e=>{function t(){return ps}e.value=t;function r(){return ps.length===2?ps==="en":ps.length>=3?ps[0]==="e"&&ps[1]==="n"&&ps[2]==="-":!1}e.isDefaultVariant=r;function n(){return ps==="en"}e.isDefault=n})(sK||(sK={}));var oK=typeof _o.postMessage=="function"&&!_o.importScripts;(()=>{if(oK){let e=[];_o.addEventListener("message",r=>{if(r.data&&r.data.vscodeScheduleAsyncWork)for(let n=0,i=e.length;n<i;n++){let a=e[n];if(a.id===r.data.vscodeScheduleAsyncWork){e.splice(n,1),a.callback();return}}});let t=0;return r=>{let n=++t;e.push({id:n,callback:r}),_o.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})();var lK=!!(Ui&&Ui.indexOf("Chrome")>=0);Ui&&Ui.indexOf("Firefox")>=0;!lK&&Ui&&Ui.indexOf("Safari")>=0;Ui&&Ui.indexOf("Edg/")>=0;Ui&&Ui.indexOf("Android")>=0;var Tl=typeof navigator=="object"?navigator:{};l2||document.queryCommandSupported&&document.queryCommandSupported("copy")||Tl&&Tl.clipboard&&Tl.clipboard.writeText,l2||Tl&&Tl.clipboard&&Tl.clipboard.readText;var Tw=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},e_=new Tw,u2=new Tw,c2=new Tw,uK=new Array(230),NB;(e=>{function t(u){return e_.keyCodeToStr(u)}e.toString=t;function r(u){return e_.strToKeyCode(u)}e.fromString=r;function n(u){return u2.keyCodeToStr(u)}e.toUserSettingsUS=n;function i(u){return c2.keyCodeToStr(u)}e.toUserSettingsGeneral=i;function a(u){return u2.strToKeyCode(u)||c2.strToKeyCode(u)}e.fromUserSettings=a;function l(u){if(u>=98&&u<=113)return null;switch(u){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return e_.keyCodeToStr(u)}e.toElectronAccelerator=l})(NB||(NB={}));var cK=class IB{constructor(t,r,n,i,a){this.ctrlKey=t,this.shiftKey=r,this.altKey=n,this.metaKey=i,this.keyCode=a}equals(t){return t instanceof IB&&this.ctrlKey===t.ctrlKey&&this.shiftKey===t.shiftKey&&this.altKey===t.altKey&&this.metaKey===t.metaKey&&this.keyCode===t.keyCode}getHashCode(){let t=this.ctrlKey?"1":"0",r=this.shiftKey?"1":"0",n=this.altKey?"1":"0",i=this.metaKey?"1":"0";return`K${t}${r}${n}${i}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toKeybinding(){return new hK([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}},hK=class{constructor(e){if(e.length===0)throw N$("chords");this.chords=e}getHashCode(){let e="";for(let t=0,r=this.chords.length;t<r;t++)t!==0&&(e+=";"),e+=this.chords[t].getHashCode();return e}equals(e){if(e===null||this.chords.length!==e.chords.length)return!1;for(let t=0;t<this.chords.length;t++)if(!this.chords[t].equals(e.chords[t]))return!1;return!0}};function fK(e){if(e.charCode){let r=String.fromCharCode(e.charCode).toUpperCase();return NB.fromString(r)}let t=e.keyCode;if(t===3)return 7;if(I0)switch(t){case 59:return 85;case 60:if(aK)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(zi)return 57;break}else if(eK&&(zi&&t===93||!zi&&t===92))return 57;return uK[t]||0}var dK=zi?256:2048,pK=512,mK=1024,vK=zi?2048:256,h2=class{constructor(e){var r;this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=(r=t.getModifierState)==null?void 0:r.call(t,"AltGraph"),this.keyCode=fK(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=dK),this.altKey&&(t|=pK),this.shiftKey&&(t|=mK),this.metaKey&&(t|=vK),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new cK(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}},f2=new WeakMap;function gK(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,r=e.parent.location;if(t.origin!=="null"&&r.origin!=="null"&&t.origin!==r.origin)return null}catch{return null}return e.parent}var yK=class{static getSameOriginWindowChain(e){let t=f2.get(e);if(!t){t=[],f2.set(e,t);let r=e,n;do n=gK(r),n?t.push({window:new WeakRef(r),iframeElement:r.frameElement||null}):t.push({window:new WeakRef(r),iframeElement:null}),r=n;while(r)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let r=0,n=0,i=this.getSameOriginWindowChain(e);for(let a of i){let l=a.window.deref();if(r+=(l==null?void 0:l.scrollY)??0,n+=(l==null?void 0:l.scrollX)??0,l===t||!a.iframeElement)break;let u=a.iframeElement.getBoundingClientRect();r+=u.top,n+=u.left}return{top:r,left:n}}},Cd=class{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=t.button===0,this.middleButton=t.button===1,this.rightButton=t.button===2,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,t.type==="dblclick"&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,typeof t.pageX=="number"?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);let r=yK.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=r.left,this.posy-=r.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},d2=class{constructor(e,t=0,r=0){var i;this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=r,this.deltaX=t;let n=!1;if(Pw){let a=navigator.userAgent.match(/Chrome\/(\d+)/);n=(a?parseInt(a[1]):123)<=122}if(e){let a=e,l=e,u=((i=e.view)==null?void 0:i.devicePixelRatio)||1;if(typeof a.wheelDeltaY<"u")n?this.deltaY=a.wheelDeltaY/(120*u):this.deltaY=a.wheelDeltaY/120;else if(typeof l.VERTICAL_AXIS<"u"&&l.axis===l.VERTICAL_AXIS)this.deltaY=-l.detail/3;else if(e.type==="wheel"){let f=e;f.deltaMode===f.DOM_DELTA_LINE?I0&&!zi?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof a.wheelDeltaX<"u")tK&&BB?this.deltaX=-(a.wheelDeltaX/120):n?this.deltaX=a.wheelDeltaX/(120*u):this.deltaX=a.wheelDeltaX/120;else if(typeof l.HORIZONTAL_AXIS<"u"&&l.axis===l.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){let f=e;f.deltaMode===f.DOM_DELTA_LINE?I0&&!zi?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(n?this.deltaY=e.wheelDelta/(120*u):this.deltaY=e.wheelDelta/120)}}preventDefault(){var e;(e=this.browserEvent)==null||e.preventDefault()}stopPropagation(){var e;(e=this.browserEvent)==null||e.stopPropagation()}},jB=Object.freeze(function(e,t){let r=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(r)}}}),_K;(e=>{function t(r){return r===e.None||r===e.Cancelled||r instanceof bK?!0:!r||typeof r!="object"?!1:typeof r.isCancellationRequested=="boolean"&&typeof r.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Ir.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:jB})})(_K||(_K={}));var bK=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?jB:(this._emitter||(this._emitter=new me),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},Dw=class{constructor(e,t){this._isDisposed=!1,this._token=-1,typeof e=="function"&&typeof t=="number"&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new D0("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){if(this._isDisposed)throw new D0("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}},SK=class{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){var t;(t=this.disposable)==null||t.dispose(),this.disposable=void 0}cancelAndSet(t,r,n=globalThis){if(this.isDisposed)throw new D0("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();let i=n.setInterval(()=>{t()},r);this.disposable=Bt(()=>{n.clearInterval(i),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}},wK;(e=>{async function t(n){let i,a=await Promise.all(n.map(l=>l.then(u=>u,u=>{i||(i=u)})));if(typeof i<"u")throw i;return a}e.settled=t;function r(n){return new Promise(async(i,a)=>{try{await n(i,a)}catch(l){a(l)}})}e.withAsyncBody=r})(wK||(wK={}));var p2=class ei{static fromArray(t){return new ei(r=>{r.emitMany(t)})}static fromPromise(t){return new ei(async r=>{r.emitMany(await t)})}static fromPromises(t){return new ei(async r=>{await Promise.all(t.map(async n=>r.emitOne(await n)))})}static merge(t){return new ei(async r=>{await Promise.all(t.map(async n=>{for await(let i of n)r.emitOne(i)}))})}constructor(t,r){this._state=0,this._results=[],this._error=null,this._onReturn=r,this._onStateChanged=new me,queueMicrotask(async()=>{let n={emitOne:i=>this.emitOne(i),emitMany:i=>this.emitMany(i),reject:i=>this.reject(i)};try{await Promise.resolve(t(n)),this.resolve()}catch(i){this.reject(i)}finally{n.emitOne=void 0,n.emitMany=void 0,n.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t<this._results.length)return{done:!1,value:this._results[t++]};if(this._state===1)return{done:!0,value:void 0};await Ir.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>{var r;return(r=this._onReturn)==null||r.call(this),{done:!0,value:void 0}}}}static map(t,r){return new ei(async n=>{for await(let i of t)n.emitOne(r(i))})}map(t){return ei.map(this,t)}static filter(t,r){return new ei(async n=>{for await(let i of t)r(i)&&n.emitOne(i)})}filter(t){return ei.filter(this,t)}static coalesce(t){return ei.filter(t,r=>!!r)}coalesce(){return ei.coalesce(this)}static async toPromise(t){let r=[];for await(let n of t)r.push(n);return r}toPromise(){return ei.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};p2.EMPTY=p2.fromArray([]);var{getWindow:Ni,getWindowId:xK,onDidRegisterWindow:CK}=(function(){let e=new Map,t={window:da,disposables:new xs};e.set(da.vscodeWindowId,t);let r=new me,n=new me,i=new me;function a(l,u){return(typeof l=="number"?e.get(l):void 0)??(u?t:void 0)}return{onDidRegisterWindow:r.event,onWillUnregisterWindow:i.event,onDidUnregisterWindow:n.event,registerWindow(l){if(e.has(l.vscodeWindowId))return We.None;let u=new xs,f={window:l,disposables:u.add(new xs)};return e.set(l.vscodeWindowId,f),u.add(Bt(()=>{e.delete(l.vscodeWindowId),n.fire(l)})),u.add(Le(l,gr.BEFORE_UNLOAD,()=>{i.fire(l)})),r.fire(f),u},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(l){return l.vscodeWindowId},hasWindow(l){return e.has(l)},getWindowById:a,getWindow(l){var h;let u=l;if((h=u==null?void 0:u.ownerDocument)!=null&&h.defaultView)return u.ownerDocument.defaultView.window;let f=l;return f!=null&&f.view?f.view.window:da},getDocument(l){return Ni(l).document}}})(),EK=class{constructor(e,t,r,n){this._node=e,this._type=t,this._handler=r,this._options=n||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};function Le(e,t,r,n){return new EK(e,t,r,n)}var m2=function(e,t,r,n){return Le(e,t,r,n)},Mw,AK=class extends SK{constructor(e){super(),this.defaultTarget=e&&Ni(e)}cancelAndSet(e,t,r){return super.cancelAndSet(e,t,r??this.defaultTarget)}},v2=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){Yd(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let e=new Map,t=new Map,r=new Map,n=new Map,i=a=>{r.set(a,!1);let l=e.get(a)??[];for(t.set(a,l),e.set(a,[]),n.set(a,!0);l.length>0;)l.sort(v2.sort),l.shift().execute();n.set(a,!1)};Mw=(a,l,u=0)=>{let f=xK(a),h=new v2(l,u),d=e.get(f);return d||(d=[],e.set(f,d)),d.push(h),r.get(f)||(r.set(f,!0),a.requestAnimationFrame(()=>i(f))),h}})();function OK(e){let t=e.getBoundingClientRect(),r=Ni(e);return{left:t.left+r.scrollX,top:t.top+r.scrollY,width:t.width,height:t.height}}var gr={CLICK:"click",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",KEY_DOWN:"keydown",KEY_UP:"keyup",BEFORE_UNLOAD:"beforeunload",CHANGE:"change",FOCUS:"focus",BLUR:"blur",INPUT:"input"},kK=class{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingTop="",this._paddingLeft="",this._paddingBottom="",this._paddingRight="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){let t=fn(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){let t=fn(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){let t=fn(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){let t=fn(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){let t=fn(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){let t=fn(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){let t=fn(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingTop(e){let t=fn(e);this._paddingTop!==t&&(this._paddingTop=t,this.domNode.style.paddingTop=this._paddingTop)}setPaddingLeft(e){let t=fn(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setPaddingBottom(e){let t=fn(e);this._paddingBottom!==t&&(this._paddingBottom=t,this.domNode.style.paddingBottom=this._paddingBottom)}setPaddingRight(e){let t=fn(e);this._paddingRight!==t&&(this._paddingRight=t,this.domNode.style.paddingRight=this._paddingRight)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){let t=fn(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){let t=fn(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){let t=fn(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}};function fn(e){return typeof e=="number"?`${e}px`:e}function Qc(e){return new kK(e)}var zB=class{constructor(){this._hooks=new xs,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let r=this._onStopCallback;this._onStopCallback=null,e&&r&&r(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,r,n,i){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=n,this._onStopCallback=i;let a=e;try{e.setPointerCapture(t),this._hooks.add(Bt(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{a=Ni(e)}this._hooks.add(Le(a,gr.POINTER_MOVE,l=>{if(l.buttons!==r){this.stopMonitoring(!0);return}l.preventDefault(),this._pointerMoveCallback(l)})),this._hooks.add(Le(a,gr.POINTER_UP,l=>this.stopMonitoring(!0)))}};function PK(e,t,r){let n=null,i=null;if(typeof r.value=="function"?(n="value",i=r.value,i.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof r.get=="function"&&(n="get",i=r.get),!i)throw new Error("not supported");let a=`$memoize$${t}`;r[n]=function(...l){return this.hasOwnProperty(a)||Object.defineProperty(this,a,{configurable:!1,enumerable:!1,writable:!1,value:i.apply(this,l)}),this[a]}}var Di;(e=>(e.Tap="-xterm-gesturetap",e.Change="-xterm-gesturechange",e.Start="-xterm-gesturestart",e.End="-xterm-gesturesend",e.Contextmenu="-xterm-gesturecontextmenu"))(Di||(Di={}));var Uc=class Ur extends We{constructor(){super(),this.dispatched=!1,this.targets=new s2,this.ignoreTargets=new s2,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(Ir.runAndSubscribe(CK,({window:t,disposables:r})=>{r.add(Le(t.document,"touchstart",n=>this.onTouchStart(n),{passive:!1})),r.add(Le(t.document,"touchend",n=>this.onTouchEnd(t,n))),r.add(Le(t.document,"touchmove",n=>this.onTouchMove(n),{passive:!1}))},{window:da,disposables:this._store}))}static addTarget(t){if(!Ur.isTouchDevice())return We.None;Ur.INSTANCE||(Ur.INSTANCE=new Ur);let r=Ur.INSTANCE.targets.push(t);return Bt(r)}static ignoreTarget(t){if(!Ur.isTouchDevice())return We.None;Ur.INSTANCE||(Ur.INSTANCE=new Ur);let r=Ur.INSTANCE.ignoreTargets.push(t);return Bt(r)}static isTouchDevice(){return"ontouchstart"in da||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(t){let r=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let n=0,i=t.targetTouches.length;n<i;n++){let a=t.targetTouches.item(n);this.activeTouches[a.identifier]={id:a.identifier,initialTarget:a.target,initialTimeStamp:r,initialPageX:a.pageX,initialPageY:a.pageY,rollingTimestamps:[r],rollingPageX:[a.pageX],rollingPageY:[a.pageY]};let l=this.newGestureEvent(Di.Start,a.target);l.pageX=a.pageX,l.pageY=a.pageY,this.dispatchEvent(l)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}onTouchEnd(t,r){let n=Date.now(),i=Object.keys(this.activeTouches).length;for(let a=0,l=r.changedTouches.length;a<l;a++){let u=r.changedTouches.item(a);if(!this.activeTouches.hasOwnProperty(String(u.identifier))){console.warn("move of an UNKNOWN touch",u);continue}let f=this.activeTouches[u.identifier],h=Date.now()-f.initialTimeStamp;if(h<Ur.HOLD_DELAY&&Math.abs(f.initialPageX-On(f.rollingPageX))<30&&Math.abs(f.initialPageY-On(f.rollingPageY))<30){let d=this.newGestureEvent(Di.Tap,f.initialTarget);d.pageX=On(f.rollingPageX),d.pageY=On(f.rollingPageY),this.dispatchEvent(d)}else if(h>=Ur.HOLD_DELAY&&Math.abs(f.initialPageX-On(f.rollingPageX))<30&&Math.abs(f.initialPageY-On(f.rollingPageY))<30){let d=this.newGestureEvent(Di.Contextmenu,f.initialTarget);d.pageX=On(f.rollingPageX),d.pageY=On(f.rollingPageY),this.dispatchEvent(d)}else if(i===1){let d=On(f.rollingPageX),m=On(f.rollingPageY),v=On(f.rollingTimestamps)-f.rollingTimestamps[0],g=d-f.rollingPageX[0],S=m-f.rollingPageY[0],_=[...this.targets].filter(x=>f.initialTarget instanceof Node&&x.contains(f.initialTarget));this.inertia(t,_,n,Math.abs(g)/v,g>0?1:-1,d,Math.abs(S)/v,S>0?1:-1,m)}this.dispatchEvent(this.newGestureEvent(Di.End,f.initialTarget)),delete this.activeTouches[u.identifier]}this.dispatched&&(r.preventDefault(),r.stopPropagation(),this.dispatched=!1)}newGestureEvent(t,r){let n=document.createEvent("CustomEvent");return n.initEvent(t,!1,!0),n.initialTarget=r,n.tapCount=0,n}dispatchEvent(t){if(t.type===Di.Tap){let r=new Date().getTime(),n=0;r-this._lastSetTapCountTime>Ur.CLEAR_TAP_COUNT_TIME?n=1:n=2,this._lastSetTapCountTime=r,t.tapCount=n}else(t.type===Di.Change||t.type===Di.Contextmenu)&&(this._lastSetTapCountTime=0);if(t.initialTarget instanceof Node){for(let n of this.ignoreTargets)if(n.contains(t.initialTarget))return;let r=[];for(let n of this.targets)if(n.contains(t.initialTarget)){let i=0,a=t.initialTarget;for(;a&&a!==n;)i++,a=a.parentElement;r.push([i,n])}r.sort((n,i)=>n[0]-i[0]);for(let[n,i]of r)i.dispatchEvent(t),this.dispatched=!0}}inertia(t,r,n,i,a,l,u,f,h){this.handle=Mw(t,()=>{let d=Date.now(),m=d-n,v=0,g=0,S=!0;i+=Ur.SCROLL_FRICTION*m,u+=Ur.SCROLL_FRICTION*m,i>0&&(S=!1,v=a*i*m),u>0&&(S=!1,g=f*u*m);let _=this.newGestureEvent(Di.Change);_.translationX=v,_.translationY=g,r.forEach(x=>x.dispatchEvent(_)),S||this.inertia(t,r,d,i,a,l+v,u,f,h+g)})}onTouchMove(t){let r=Date.now();for(let n=0,i=t.changedTouches.length;n<i;n++){let a=t.changedTouches.item(n);if(!this.activeTouches.hasOwnProperty(String(a.identifier))){console.warn("end of an UNKNOWN touch",a);continue}let l=this.activeTouches[a.identifier],u=this.newGestureEvent(Di.Change,l.initialTarget);u.translationX=a.pageX-On(l.rollingPageX),u.translationY=a.pageY-On(l.rollingPageY),u.pageX=a.pageX,u.pageY=a.pageY,this.dispatchEvent(u),l.rollingPageX.length>3&&(l.rollingPageX.shift(),l.rollingPageY.shift(),l.rollingTimestamps.shift()),l.rollingPageX.push(a.pageX),l.rollingPageY.push(a.pageY),l.rollingTimestamps.push(r)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}};Uc.SCROLL_FRICTION=-.005,Uc.HOLD_DELAY=700,Uc.CLEAR_TAP_COUNT_TIME=400,Ut([PK],Uc,"isTouchDevice",1);var TK=Uc,Rw=class extends We{onclick(e,t){this._register(Le(e,gr.CLICK,r=>t(new Cd(Ni(e),r))))}onmousedown(e,t){this._register(Le(e,gr.MOUSE_DOWN,r=>t(new Cd(Ni(e),r))))}onmouseover(e,t){this._register(Le(e,gr.MOUSE_OVER,r=>t(new Cd(Ni(e),r))))}onmouseleave(e,t){this._register(Le(e,gr.MOUSE_LEAVE,r=>t(new Cd(Ni(e),r))))}onkeydown(e,t){this._register(Le(e,gr.KEY_DOWN,r=>t(new h2(r))))}onkeyup(e,t){this._register(Le(e,gr.KEY_UP,r=>t(new h2(r))))}oninput(e,t){this._register(Le(e,gr.INPUT,t))}onblur(e,t){this._register(Le(e,gr.BLUR,t))}onfocus(e,t){this._register(Le(e,gr.FOCUS,t))}onchange(e,t){this._register(Le(e,gr.CHANGE,t))}ignoreGesture(e){return TK.ignoreTarget(e)}},g2=11,DK=class extends Rw{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.style.position="absolute",this.domNode.style.width=g2+"px",this.domNode.style.height=g2+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new zB),this._register(m2(this.bgDomNode,gr.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(m2(this.domNode,gr.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new AK),this._pointerdownScheduleRepeatTimer=this._register(new Dw)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,Ni(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}},MK=class H0{constructor(t,r,n,i,a,l,u){this._forceIntegerValues=t,this._scrollStateBrand=void 0,this._forceIntegerValues&&(r=r|0,n=n|0,i=i|0,a=a|0,l=l|0,u=u|0),this.rawScrollLeft=i,this.rawScrollTop=u,r<0&&(r=0),i+r>n&&(i=n-r),i<0&&(i=0),a<0&&(a=0),u+a>l&&(u=l-a),u<0&&(u=0),this.width=r,this.scrollWidth=n,this.scrollLeft=i,this.height=a,this.scrollHeight=l,this.scrollTop=u}equals(t){return this.rawScrollLeft===t.rawScrollLeft&&this.rawScrollTop===t.rawScrollTop&&this.width===t.width&&this.scrollWidth===t.scrollWidth&&this.scrollLeft===t.scrollLeft&&this.height===t.height&&this.scrollHeight===t.scrollHeight&&this.scrollTop===t.scrollTop}withScrollDimensions(t,r){return new H0(this._forceIntegerValues,typeof t.width<"u"?t.width:this.width,typeof t.scrollWidth<"u"?t.scrollWidth:this.scrollWidth,r?this.rawScrollLeft:this.scrollLeft,typeof t.height<"u"?t.height:this.height,typeof t.scrollHeight<"u"?t.scrollHeight:this.scrollHeight,r?this.rawScrollTop:this.scrollTop)}withScrollPosition(t){return new H0(this._forceIntegerValues,this.width,this.scrollWidth,typeof t.scrollLeft<"u"?t.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof t.scrollTop<"u"?t.scrollTop:this.rawScrollTop)}createScrollEvent(t,r){let n=this.width!==t.width,i=this.scrollWidth!==t.scrollWidth,a=this.scrollLeft!==t.scrollLeft,l=this.height!==t.height,u=this.scrollHeight!==t.scrollHeight,f=this.scrollTop!==t.scrollTop;return{inSmoothScrolling:r,oldWidth:t.width,oldScrollWidth:t.scrollWidth,oldScrollLeft:t.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:t.height,oldScrollHeight:t.scrollHeight,oldScrollTop:t.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:n,scrollWidthChanged:i,scrollLeftChanged:a,heightChanged:l,scrollHeightChanged:u,scrollTopChanged:f}}},RK=class extends We{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new me),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new MK(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){var n;let r=this._state.withScrollDimensions(e,t);this._setState(r,!!this._smoothScrolling),(n=this._smoothScrolling)==null||n.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};let r=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===r.scrollLeft&&this._smoothScrolling.to.scrollTop===r.scrollTop)return;let n;t?n=new _2(this._smoothScrolling.from,r,this._smoothScrolling.startTime,this._smoothScrolling.duration):n=this._smoothScrolling.combine(this._state,r,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{let r=this._state.withScrollPosition(e);this._smoothScrolling=_2.start(this._state,r,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let r=this._state;r.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(r,t)))}},y2=class{constructor(e,t,r){this.scrollLeft=e,this.scrollTop=t,this.isDone=r}};function t_(e,t){let r=t-e;return function(n){return e+r*NK(n)}}function LK(e,t,r){return function(n){return n<r?e(n/r):t((n-r)/(1-r))}}var _2=class F0{constructor(t,r,n,i){this.from=t,this.to=r,this.duration=i,this.startTime=n,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(t,r,n){if(Math.abs(t-r)>2.5*n){let i,a;return t<r?(i=t+.75*n,a=r-.75*n):(i=t-.75*n,a=r+.75*n),LK(t_(t,i),t_(a,r),.33)}return t_(t,r)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(t){this.to=t.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(t){let r=(t-this.startTime)/this.duration;if(r<1){let n=this.scrollLeft(r),i=this.scrollTop(r);return new y2(n,i,!1)}return new y2(this.to.scrollLeft,this.to.scrollTop,!0)}combine(t,r,n){return F0.start(t,r,n)}static start(t,r,n){n=n+10;let i=Date.now()-10;return new F0(t,r,i,n)}};function BK(e){return Math.pow(e,3)}function NK(e){return 1-BK(1-e)}var IK=class extends We{constructor(e,t,r){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=r,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new Dw)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){let e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{var e;(e=this._domNode)==null||e.setClassName(this._visibleClassName)},0))}_hide(e){var t;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,(t=this._domNode)==null||t.setClassName(this._invisibleClassName+(e?" fade":"")))}},jK=140,HB=class extends Rw{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new IK(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new zB),this._shouldRender=!0,this.domNode=Qc(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(Le(this.domNode.domNode,gr.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){let t=this._register(new DK(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,r,n){this.slider=Qc(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof r=="number"&&this.slider.setWidth(r),typeof n=="number"&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(Le(this.slider.domNode,gr.POINTER_DOWN,i=>{i.button===0&&(i.preventDefault(),this._sliderPointerDown(i))})),this.onclick(this.slider.domNode,i=>{i.leftButton&&i.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,r=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),i=this._sliderPointerPosition(e);r<=i&&i<=n?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,r;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,r=e.offsetY;else{let i=OK(this.domNode.domNode);t=e.pageX-i.left,r=e.pageY-i.top}let n=this._pointerDownRelativePosition(t,r);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),r=this._sliderOrthogonalPointerPosition(e),n=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,i=>{let a=this._sliderOrthogonalPointerPosition(i),l=Math.abs(a-r);if(BB&&l>jK){this._setDesiredScrollPositionNow(n.getScrollPosition());return}let u=this._sliderPointerPosition(i)-t;this._setDesiredScrollPositionNow(n.getDesiredScrollPositionFromDelta(u))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}},FB=class U0{constructor(t,r,n,i,a,l){this._scrollbarSize=Math.round(r),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(t),this._visibleSize=i,this._scrollSize=a,this._scrollPosition=l,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new U0(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(t){let r=Math.round(t);return this._visibleSize!==r?(this._visibleSize=r,this._refreshComputedValues(),!0):!1}setScrollSize(t){let r=Math.round(t);return this._scrollSize!==r?(this._scrollSize=r,this._refreshComputedValues(),!0):!1}setScrollPosition(t){let r=Math.round(t);return this._scrollPosition!==r?(this._scrollPosition=r,this._refreshComputedValues(),!0):!1}setScrollbarSize(t){this._scrollbarSize=Math.round(t)}setOppositeScrollbarSize(t){this._oppositeScrollbarSize=Math.round(t)}static _computeValues(t,r,n,i,a){let l=Math.max(0,n-t),u=Math.max(0,l-2*r),f=i>0&&i>n;if(!f)return{computedAvailableSize:Math.round(l),computedIsNeeded:f,computedSliderSize:Math.round(u),computedSliderRatio:0,computedSliderPosition:0};let h=Math.round(Math.max(20,Math.floor(n*u/i))),d=(u-h)/(i-n),m=a*d;return{computedAvailableSize:Math.round(l),computedIsNeeded:f,computedSliderSize:Math.round(h),computedSliderRatio:d,computedSliderPosition:Math.round(m)}}_refreshComputedValues(){let t=U0._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(t){if(!this._computedIsNeeded)return 0;let r=t-this._arrowSize-this._computedSliderSize/2;return Math.round(r/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(t){if(!this._computedIsNeeded)return 0;let r=t-this._arrowSize,n=this._scrollPosition;return r<this._computedSliderPosition?n-=this._visibleSize:n+=this._visibleSize,n}getDesiredScrollPositionFromDelta(t){if(!this._computedIsNeeded)return 0;let r=this._computedSliderPosition+t;return Math.round(r/this._computedSliderRatio)}},zK=class extends HB{constructor(e,t,r){let n=e.getScrollDimensions(),i=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:r,scrollbarState:new FB(t.horizontalHasArrows?t.arrowSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,n.width,n.scrollWidth,i.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}},HK=class extends HB{constructor(e,t,r){let n=e.getScrollDimensions(),i=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:r,scrollbarState:new FB(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,i.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}},FK=500,b2=50,UK=class{constructor(e,t,r){this.timestamp=e,this.deltaX=t,this.deltaY=r,this.score=0}},$0=class{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let t=1,r=0,n=1,i=this._rear;do{let a=i===this._front?t:Math.pow(2,-n);if(t-=a,r+=this._memory[i].score*a,i===this._front)break;i=(this._capacity+i-1)%this._capacity,n++}while(!0);return r<=.5}acceptStandardWheelEvent(t){if(Pw){let r=Ni(t.browserEvent),n=J$(r);this.accept(Date.now(),t.deltaX*n,t.deltaY*n)}else this.accept(Date.now(),t.deltaX,t.deltaY)}accept(t,r,n){let i=null,a=new UK(t,r,n);this._front===-1&&this._rear===-1?(this._memory[0]=a,this._front=0,this._rear=0):(i=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=a),a.score=this._computeScore(a,i)}_computeScore(t,r){if(Math.abs(t.deltaX)>0&&Math.abs(t.deltaY)>0)return 1;let n=.5;if((!this._isAlmostInt(t.deltaX)||!this._isAlmostInt(t.deltaY))&&(n+=.25),r){let i=Math.abs(t.deltaX),a=Math.abs(t.deltaY),l=Math.abs(r.deltaX),u=Math.abs(r.deltaY),f=Math.max(Math.min(i,l),1),h=Math.max(Math.min(a,u),1),d=Math.max(i,l),m=Math.max(a,u);d%f===0&&m%h===0&&(n-=.5)}return Math.min(Math.max(n,0),1)}_isAlmostInt(t){return Math.abs(Math.round(t)-t)<.01}};$0.INSTANCE=new $0;var $K=$0,KK=class extends Rw{constructor(e,t,r){super(),this._onScroll=this._register(new me),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new me),this.onWillScroll=this._onWillScroll.event,this._options=WK(t),this._scrollable=r,this._register(this._scrollable.onScroll(i=>{this._onWillScroll.fire(i),this._onDidScroll(i),this._onScroll.fire(i)}));let n={onMouseWheel:i=>this._onMouseWheel(i),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new HK(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new zK(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="xterm-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=Qc(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=Qc(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=Qc(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,i=>this._onMouseOver(i)),this.onmouseleave(this._listenOnDomNode,i=>this._onMouseLeave(i)),this._hideTimeout=this._register(new Dw),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=Eo(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,zi&&(this._options.className+=" mac"),this._domNode.className="xterm-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}setRevealOnScroll(e){this._revealOnScroll=e}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new d2(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=Eo(this._mouseWheelToDispose),e)){let t=r=>{this._onMouseWheel(new d2(r))};this._mouseWheelToDispose.push(Le(this._listenOnDomNode,gr.MOUSE_WHEEL,t,{passive:!1}))}}_onMouseWheel(e){var i;if((i=e.browserEvent)!=null&&i.defaultPrevented)return;let t=$K.INSTANCE;t.acceptStandardWheelEvent(e);let r=!1;if(e.deltaY||e.deltaX){let a=e.deltaY*this._options.mouseWheelScrollSensitivity,l=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&l+a===0?l=a=0:Math.abs(a)>=Math.abs(l)?l=0:a=0),this._options.flipAxes&&([a,l]=[l,a]);let u=!zi&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||u)&&!l&&(l=a,a=0),e.browserEvent&&e.browserEvent.altKey&&(l=l*this._options.fastScrollSensitivity,a=a*this._options.fastScrollSensitivity);let f=this._scrollable.getFutureScrollPosition(),h={};if(a){let d=b2*a,m=f.scrollTop-(d<0?Math.floor(d):Math.ceil(d));this._verticalScrollbar.writeScrollPosition(h,m)}if(l){let d=b2*l,m=f.scrollLeft-(d<0?Math.floor(d):Math.ceil(d));this._horizontalScrollbar.writeScrollPosition(h,m)}h=this._scrollable.validateScrollPosition(h),(f.scrollLeft!==h.scrollLeft||f.scrollTop!==h.scrollTop)&&(this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(h):this._scrollable.setScrollPositionNow(h),r=!0)}let n=r;!n&&this._options.alwaysConsumeMouseWheel&&(n=!0),!n&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(n=!0),n&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,r=e.scrollLeft>0,n=r?" left":"",i=t?" top":"",a=r||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${i}`),this._topLeftShadowDomNode.setClassName(`shadow${a}${i}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),FK)}},qK=class extends KK{constructor(e,t,r){super(e,t,r)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}};function WK(e){let t={lazyRender:typeof e.lazyRender<"u"?e.lazyRender:!1,className:typeof e.className<"u"?e.className:"",useShadows:typeof e.useShadows<"u"?e.useShadows:!0,handleMouseWheel:typeof e.handleMouseWheel<"u"?e.handleMouseWheel:!0,flipAxes:typeof e.flipAxes<"u"?e.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof e.consumeMouseWheelIfScrollbarIsNeeded<"u"?e.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof e.alwaysConsumeMouseWheel<"u"?e.alwaysConsumeMouseWheel:!1,scrollYToX:typeof e.scrollYToX<"u"?e.scrollYToX:!1,mouseWheelScrollSensitivity:typeof e.mouseWheelScrollSensitivity<"u"?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof e.fastScrollSensitivity<"u"?e.fastScrollSensitivity:5,scrollPredominantAxis:typeof e.scrollPredominantAxis<"u"?e.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof e.mouseWheelSmoothScroll<"u"?e.mouseWheelSmoothScroll:!0,arrowSize:typeof e.arrowSize<"u"?e.arrowSize:11,listenOnDomNode:typeof e.listenOnDomNode<"u"?e.listenOnDomNode:null,horizontal:typeof e.horizontal<"u"?e.horizontal:1,horizontalScrollbarSize:typeof e.horizontalScrollbarSize<"u"?e.horizontalScrollbarSize:10,horizontalSliderSize:typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:0,horizontalHasArrows:typeof e.horizontalHasArrows<"u"?e.horizontalHasArrows:!1,vertical:typeof e.vertical<"u"?e.vertical:1,verticalScrollbarSize:typeof e.verticalScrollbarSize<"u"?e.verticalScrollbarSize:10,verticalHasArrows:typeof e.verticalHasArrows<"u"?e.verticalHasArrows:!1,verticalSliderSize:typeof e.verticalSliderSize<"u"?e.verticalSliderSize:0,scrollByPage:typeof e.scrollByPage<"u"?e.scrollByPage:!1};return t.horizontalSliderSize=typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=typeof e.verticalSliderSize<"u"?e.verticalSliderSize:t.verticalScrollbarSize,zi&&(t.className+=" mac"),t}var K0=class extends We{constructor(e,t,r,n,i,a,l,u){super(),this._bufferService=r,this._optionsService=l,this._renderService=u,this._onRequestScrollLines=this._register(new me),this.onRequestScrollLines=this._onRequestScrollLines.event,this._isSyncing=!1,this._isHandlingScroll=!1,this._suppressOnScrollHandler=!1;let f=this._register(new RK({forceIntegerValues:!1,smoothScrollDuration:this._optionsService.rawOptions.smoothScrollDuration,scheduleAtNextAnimationFrame:h=>Mw(n.window,h)}));this._register(this._optionsService.onSpecificOptionChange("smoothScrollDuration",()=>{f.setSmoothScrollDuration(this._optionsService.rawOptions.smoothScrollDuration)})),this._scrollableElement=this._register(new qK(t,{vertical:1,horizontal:2,useShadows:!1,mouseWheelSmoothScroll:!0,...this._getChangeOptions()},f)),this._register(this._optionsService.onMultipleOptionChange(["scrollSensitivity","fastScrollSensitivity","overviewRuler"],()=>this._scrollableElement.updateOptions(this._getChangeOptions()))),this._register(i.onProtocolChange(h=>{this._scrollableElement.updateOptions({handleMouseWheel:!(h&16)})})),this._scrollableElement.setScrollDimensions({height:0,scrollHeight:0}),this._register(Ir.runAndSubscribe(a.onChangeColors,()=>{this._scrollableElement.getDomNode().style.backgroundColor=a.colors.background.css})),e.appendChild(this._scrollableElement.getDomNode()),this._register(Bt(()=>this._scrollableElement.getDomNode().remove())),this._styleElement=n.mainDocument.createElement("style"),t.appendChild(this._styleElement),this._register(Bt(()=>this._styleElement.remove())),this._register(Ir.runAndSubscribe(a.onChangeColors,()=>{this._styleElement.textContent=[".xterm .xterm-scrollable-element > .scrollbar > .slider {",`  background: ${a.colors.scrollbarSliderBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider:hover {",`  background: ${a.colors.scrollbarSliderHoverBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider.active {",`  background: ${a.colors.scrollbarSliderActiveBackground.css};`,"}"].join(`
`)})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._sync())),this._register(this._scrollableElement.onScroll(h=>this._handleScroll(h)))}scrollLines(e){let t=this._scrollableElement.getScrollPosition();this._scrollableElement.setScrollPosition({reuseAnimation:!0,scrollTop:t.scrollTop+e*this._renderService.dimensions.css.cell.height})}scrollToLine(e,t){t&&(this._latestYDisp=e),this._scrollableElement.setScrollPosition({reuseAnimation:!t,scrollTop:e*this._renderService.dimensions.css.cell.height})}_getChangeOptions(){var e;return{mouseWheelScrollSensitivity:this._optionsService.rawOptions.scrollSensitivity,fastScrollSensitivity:this._optionsService.rawOptions.fastScrollSensitivity,verticalScrollbarSize:((e=this._optionsService.rawOptions.overviewRuler)==null?void 0:e.width)||14}}queueSync(e){e!==void 0&&(this._latestYDisp=e),this._queuedAnimationFrame===void 0&&(this._queuedAnimationFrame=this._renderService.addRefreshCallback(()=>{this._queuedAnimationFrame=void 0,this._sync(this._latestYDisp)}))}_sync(e=this._bufferService.buffer.ydisp){!this._renderService||this._isSyncing||(this._isSyncing=!0,this._suppressOnScrollHandler=!0,this._scrollableElement.setScrollDimensions({height:this._renderService.dimensions.css.canvas.height,scrollHeight:this._renderService.dimensions.css.cell.height*this._bufferService.buffer.lines.length}),this._suppressOnScrollHandler=!1,e!==this._latestYDisp&&this._scrollableElement.setScrollPosition({scrollTop:e*this._renderService.dimensions.css.cell.height}),this._isSyncing=!1)}_handleScroll(e){if(!this._renderService||this._isHandlingScroll||this._suppressOnScrollHandler)return;this._isHandlingScroll=!0;let t=Math.round(e.scrollTop/this._renderService.dimensions.css.cell.height),r=t-this._bufferService.buffer.ydisp;r!==0&&(this._latestYDisp=t,this._onRequestScrollLines.fire(r)),this._isHandlingScroll=!1}};K0=Ut([ge(2,tn),ge(3,ka),ge(4,SB),ge(5,au),ge(6,rn),ge(7,Pa)],K0);var q0=class extends We{constructor(e,t,r,n,i){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=r,this._decorationService=n,this._renderService=i,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this._register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this._register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this._register(this._decorationService.onDecorationRemoved(a=>this._removeDecoration(a))),this._register(Bt(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){var n;let t=this._coreBrowserService.mainDocument.createElement("div");t.classList.add("xterm-decoration"),t.classList.toggle("xterm-decoration-top-layer",((n=e==null?void 0:e.options)==null?void 0:n.layer)==="top"),t.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,t.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,t.style.top=`${(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height}px`,t.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let r=e.options.x??0;return r&&r>this._bufferService.cols&&(t.style.display="none"),this._refreshXPosition(e,t),t}_refreshStyle(e){let t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display="none",e.onRenderEmitter.fire(e.element));else{let r=this._decorationElements.get(e);r||(r=this._createElement(e),e.element=r,this._decorationElements.set(e,r),this._container.appendChild(r),e.onDispose(()=>{this._decorationElements.delete(e),r.remove()})),r.style.display=this._altBufferIsActive?"none":"block",this._altBufferIsActive||(r.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,r.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,r.style.top=`${t*this._renderService.dimensions.css.cell.height}px`,r.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`),e.onRenderEmitter.fire(r)}}_refreshXPosition(e,t=e.element){if(!t)return;let r=e.options.x??0;(e.options.anchor||"left")==="right"?t.style.right=r?`${r*this._renderService.dimensions.css.cell.width}px`:"":t.style.left=r?`${r*this._renderService.dimensions.css.cell.width}px`:""}_removeDecoration(e){var t;(t=this._decorationElements.get(e))==null||t.remove(),this._decorationElements.delete(e),e.dispose()}};q0=Ut([ge(1,tn),ge(2,ka),ge(3,Ch),ge(4,Pa)],q0);var VK=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(e){if(e.options.overviewRulerOptions){for(let t of this._zones)if(t.color===e.options.overviewRulerOptions.color&&t.position===e.options.overviewRulerOptions.position){if(this._lineIntersectsZone(t,e.marker.line))return;if(this._lineAdjacentToZone(t,e.marker.line,e.options.overviewRulerOptions.position)){this._addLineToZone(t,e.marker.line);return}}if(this._zonePoolIndex<this._zonePool.length){this._zonePool[this._zonePoolIndex].color=e.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=e.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=e.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=e.marker.line,this._zones.push(this._zonePool[this._zonePoolIndex++]);return}this._zones.push({color:e.options.overviewRulerOptions.color,position:e.options.overviewRulerOptions.position,startBufferLine:e.marker.line,endBufferLine:e.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(e){this._linePadding=e}_lineIntersectsZone(e,t){return t>=e.startBufferLine&&t<=e.endBufferLine}_lineAdjacentToZone(e,t,r){return t>=e.startBufferLine-this._linePadding[r||"full"]&&t<=e.endBufferLine+this._linePadding[r||"full"]}_addLineToZone(e,t){e.startBufferLine=Math.min(e.startBufferLine,t),e.endBufferLine=Math.max(e.endBufferLine,t)}},Pi={full:0,left:0,center:0,right:0},ms={full:0,left:0,center:0,right:0},Oc={full:0,left:0,center:0,right:0},hp=class extends We{constructor(e,t,r,n,i,a,l,u){var h;super(),this._viewportElement=e,this._screenElement=t,this._bufferService=r,this._decorationService=n,this._renderService=i,this._optionsService=a,this._themeService=l,this._coreBrowserService=u,this._colorZoneStore=new VK,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(h=this._viewportElement.parentElement)==null||h.insertBefore(this._canvas,this._viewportElement),this._register(Bt(()=>{var d;return(d=this._canvas)==null?void 0:d.remove()}));let f=this._canvas.getContext("2d");if(f)this._ctx=f;else throw new Error("Ctx cannot be null");this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this._register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0))),this._register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"})),this._register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})),this._register(this._renderService.onRender(()=>{(!this._containerHeight||this._containerHeight!==this._screenElement.clientHeight)&&(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._register(this._optionsService.onSpecificOptionChange("overviewRuler",()=>this._queueRefresh(!0))),this._register(this._themeService.onChangeColors(()=>this._queueRefresh())),this._queueRefresh(!0)}get _width(){var e;return((e=this._optionsService.options.overviewRuler)==null?void 0:e.width)||0}_refreshDrawConstants(){let e=Math.floor((this._canvas.width-1)/3),t=Math.ceil((this._canvas.width-1)/3);ms.full=this._canvas.width,ms.left=e,ms.center=t,ms.right=e,this._refreshDrawHeightConstants(),Oc.full=1,Oc.left=1,Oc.center=1+ms.left,Oc.right=1+ms.left+ms.center}_refreshDrawHeightConstants(){Pi.full=Math.round(2*this._coreBrowserService.dpr);let e=this._canvas.height/this._bufferService.buffer.lines.length,t=Math.round(Math.max(Math.min(e,12),6)*this._coreBrowserService.dpr);Pi.left=t,Pi.center=t,Pi.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Pi.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Pi.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Pi.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Pi.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(let t of this._decorationService.decorations)this._colorZoneStore.addDecoration(t);this._ctx.lineWidth=1,this._renderRulerOutline();let e=this._colorZoneStore.zones;for(let t of e)t.position!=="full"&&this._renderColorZone(t);for(let t of e)t.position==="full"&&this._renderColorZone(t);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderRulerOutline(){this._ctx.fillStyle=this._themeService.colors.overviewRulerBorder.css,this._ctx.fillRect(0,0,1,this._canvas.height),this._optionsService.rawOptions.overviewRuler.showTopBorder&&this._ctx.fillRect(1,0,this._canvas.width-1,1),this._optionsService.rawOptions.overviewRuler.showBottomBorder&&this._ctx.fillRect(1,this._canvas.height-1,this._canvas.width-1,this._canvas.height)}_renderColorZone(e){this._ctx.fillStyle=e.color,this._ctx.fillRect(Oc[e.position||"full"],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-Pi[e.position||"full"]/2),ms[e.position||"full"],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+Pi[e.position||"full"]))}_queueRefresh(e,t){this._shouldUpdateDimensions=e||this._shouldUpdateDimensions,this._shouldUpdateAnchor=t||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};hp=Ut([ge(2,tn),ge(3,Ch),ge(4,Pa),ge(5,rn),ge(6,au),ge(7,ka)],hp);var oe;(e=>(e.NUL="\0",e.SOH="",e.STX="",e.ETX="",e.EOT="",e.ENQ="",e.ACK="",e.BEL="\x07",e.BS="\b",e.HT="	",e.LF=`
`,e.VT="\v",e.FF="\f",e.CR="\r",e.SO="",e.SI="",e.DLE="",e.DC1="",e.DC2="",e.DC3="",e.DC4="",e.NAK="",e.SYN="",e.ETB="",e.CAN="",e.EM="",e.SUB="",e.ESC="\x1B",e.FS="",e.GS="",e.RS="",e.US="",e.SP=" ",e.DEL=""))(oe||(oe={}));var Zd;(e=>(e.PAD="",e.HOP="",e.BPH="",e.NBH="",e.IND="",e.NEL="",e.SSA="",e.ESA="",e.HTS="",e.HTJ="",e.VTS="",e.PLD="",e.PLU="",e.RI="",e.SS2="",e.SS3="",e.DCS="",e.PU1="",e.PU2="",e.STS="",e.CCH="",e.MW="",e.SPA="",e.EPA="",e.SOS="",e.SGCI="",e.SCI="",e.CSI="",e.ST="",e.OSC="",e.PM="",e.APC=""))(Zd||(Zd={}));var UB;(e=>e.ST=`${oe.ESC}\\`)(UB||(UB={}));var W0=class{constructor(e,t,r,n,i,a){this._textarea=e,this._compositionView=t,this._bufferService=r,this._optionsService=n,this._coreService=i,this._renderService=a,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(e.keyCode===20||e.keyCode===229||e.keyCode===16||e.keyCode===17||e.keyCode===18)return!1;this._finalizeComposition(!1)}return e.keyCode===229?(this._handleAnyTextareaChanges(),!1):!0}_finalizeComposition(e){if(this._compositionView.classList.remove("active"),this._isComposing=!1,e){let t={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){this._isSendingComposition=!1;let r;t.start+=this._dataAlreadySent.length,this._isComposing?r=this._textarea.value.substring(t.start,this._compositionPosition.start):r=this._textarea.value.substring(t.start),r.length>0&&this._coreService.triggerDataEvent(r,!0)}},0)}else{this._isSendingComposition=!1;let t=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(t,!0)}}_handleAnyTextareaChanges(){let e=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let t=this._textarea.value,r=t.replace(e,"");this._dataAlreadySent=r,t.length>e.length?this._coreService.triggerDataEvent(r,!0):t.length<e.length?this._coreService.triggerDataEvent(`${oe.DEL}`,!0):t.length===e.length&&t!==e&&this._coreService.triggerDataEvent(t,!0)}},0)}updateCompositionElements(e){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){let t=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),r=this._renderService.dimensions.css.cell.height,n=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,i=t*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=i+"px",this._compositionView.style.top=n+"px",this._compositionView.style.height=r+"px",this._compositionView.style.lineHeight=r+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";let a=this._compositionView.getBoundingClientRect();this._textarea.style.left=i+"px",this._textarea.style.top=n+"px",this._textarea.style.width=Math.max(a.width,1)+"px",this._textarea.style.height=Math.max(a.height,1)+"px",this._textarea.style.lineHeight=a.height+"px"}e||setTimeout(()=>this.updateCompositionElements(!0),0)}}};W0=Ut([ge(2,tn),ge(3,rn),ge(4,Bo),ge(5,Pa)],W0);var _r=0,br=0,Sr=0,Ft=0,S2={css:"#00000000",rgba:0},nr;(e=>{function t(i,a,l,u){return u!==void 0?`#${io(i)}${io(a)}${io(l)}${io(u)}`:`#${io(i)}${io(a)}${io(l)}`}e.toCss=t;function r(i,a,l,u=255){return(i<<24|a<<16|l<<8|u)>>>0}e.toRgba=r;function n(i,a,l,u){return{css:e.toCss(i,a,l,u),rgba:e.toRgba(i,a,l,u)}}e.toColor=n})(nr||(nr={}));var kt;(e=>{function t(f,h){if(Ft=(h.rgba&255)/255,Ft===1)return{css:h.css,rgba:h.rgba};let d=h.rgba>>24&255,m=h.rgba>>16&255,v=h.rgba>>8&255,g=f.rgba>>24&255,S=f.rgba>>16&255,_=f.rgba>>8&255;_r=g+Math.round((d-g)*Ft),br=S+Math.round((m-S)*Ft),Sr=_+Math.round((v-_)*Ft);let x=nr.toCss(_r,br,Sr),C=nr.toRgba(_r,br,Sr);return{css:x,rgba:C}}e.blend=t;function r(f){return(f.rgba&255)===255}e.isOpaque=r;function n(f,h,d){let m=Qd.ensureContrastRatio(f.rgba,h.rgba,d);if(m)return nr.toColor(m>>24&255,m>>16&255,m>>8&255)}e.ensureContrastRatio=n;function i(f){let h=(f.rgba|255)>>>0;return[_r,br,Sr]=Qd.toChannels(h),{css:nr.toCss(_r,br,Sr),rgba:h}}e.opaque=i;function a(f,h){return Ft=Math.round(h*255),[_r,br,Sr]=Qd.toChannels(f.rgba),{css:nr.toCss(_r,br,Sr,Ft),rgba:nr.toRgba(_r,br,Sr,Ft)}}e.opacity=a;function l(f,h){return Ft=f.rgba&255,a(f,Ft*h/255)}e.multiplyOpacity=l;function u(f){return[f.rgba>>24&255,f.rgba>>16&255,f.rgba>>8&255]}e.toColorRGB=u})(kt||(kt={}));var It;(e=>{let t,r;try{let i=document.createElement("canvas");i.width=1,i.height=1;let a=i.getContext("2d",{willReadFrequently:!0});a&&(t=a,t.globalCompositeOperation="copy",r=t.createLinearGradient(0,0,1,1))}catch{}function n(i){if(i.match(/#[\da-f]{3,8}/i))switch(i.length){case 4:return _r=parseInt(i.slice(1,2).repeat(2),16),br=parseInt(i.slice(2,3).repeat(2),16),Sr=parseInt(i.slice(3,4).repeat(2),16),nr.toColor(_r,br,Sr);case 5:return _r=parseInt(i.slice(1,2).repeat(2),16),br=parseInt(i.slice(2,3).repeat(2),16),Sr=parseInt(i.slice(3,4).repeat(2),16),Ft=parseInt(i.slice(4,5).repeat(2),16),nr.toColor(_r,br,Sr,Ft);case 7:return{css:i,rgba:(parseInt(i.slice(1),16)<<8|255)>>>0};case 9:return{css:i,rgba:parseInt(i.slice(1),16)>>>0}}let a=i.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(a)return _r=parseInt(a[1]),br=parseInt(a[2]),Sr=parseInt(a[3]),Ft=Math.round((a[5]===void 0?1:parseFloat(a[5]))*255),nr.toColor(_r,br,Sr,Ft);if(!t||!r)throw new Error("css.toColor: Unsupported css format");if(t.fillStyle=r,t.fillStyle=i,typeof t.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(t.fillRect(0,0,1,1),[_r,br,Sr,Ft]=t.getImageData(0,0,1,1).data,Ft!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:nr.toRgba(_r,br,Sr,Ft),css:i}}e.toColor=n})(It||(It={}));var Qr;(e=>{function t(n){return r(n>>16&255,n>>8&255,n&255)}e.relativeLuminance=t;function r(n,i,a){let l=n/255,u=i/255,f=a/255,h=l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4),d=u<=.03928?u/12.92:Math.pow((u+.055)/1.055,2.4),m=f<=.03928?f/12.92:Math.pow((f+.055)/1.055,2.4);return h*.2126+d*.7152+m*.0722}e.relativeLuminance2=r})(Qr||(Qr={}));var Qd;(e=>{function t(l,u){if(Ft=(u&255)/255,Ft===1)return u;let f=u>>24&255,h=u>>16&255,d=u>>8&255,m=l>>24&255,v=l>>16&255,g=l>>8&255;return _r=m+Math.round((f-m)*Ft),br=v+Math.round((h-v)*Ft),Sr=g+Math.round((d-g)*Ft),nr.toRgba(_r,br,Sr)}e.blend=t;function r(l,u,f){let h=Qr.relativeLuminance(l>>8),d=Qr.relativeLuminance(u>>8);if(ca(h,d)<f){if(d<h){let g=n(l,u,f),S=ca(h,Qr.relativeLuminance(g>>8));if(S<f){let _=i(l,u,f),x=ca(h,Qr.relativeLuminance(_>>8));return S>x?g:_}return g}let m=i(l,u,f),v=ca(h,Qr.relativeLuminance(m>>8));if(v<f){let g=n(l,u,f),S=ca(h,Qr.relativeLuminance(g>>8));return v>S?m:g}return m}}e.ensureContrastRatio=r;function n(l,u,f){let h=l>>24&255,d=l>>16&255,m=l>>8&255,v=u>>24&255,g=u>>16&255,S=u>>8&255,_=ca(Qr.relativeLuminance2(v,g,S),Qr.relativeLuminance2(h,d,m));for(;_<f&&(v>0||g>0||S>0);)v-=Math.max(0,Math.ceil(v*.1)),g-=Math.max(0,Math.ceil(g*.1)),S-=Math.max(0,Math.ceil(S*.1)),_=ca(Qr.relativeLuminance2(v,g,S),Qr.relativeLuminance2(h,d,m));return(v<<24|g<<16|S<<8|255)>>>0}e.reduceLuminance=n;function i(l,u,f){let h=l>>24&255,d=l>>16&255,m=l>>8&255,v=u>>24&255,g=u>>16&255,S=u>>8&255,_=ca(Qr.relativeLuminance2(v,g,S),Qr.relativeLuminance2(h,d,m));for(;_<f&&(v<255||g<255||S<255);)v=Math.min(255,v+Math.ceil((255-v)*.1)),g=Math.min(255,g+Math.ceil((255-g)*.1)),S=Math.min(255,S+Math.ceil((255-S)*.1)),_=ca(Qr.relativeLuminance2(v,g,S),Qr.relativeLuminance2(h,d,m));return(v<<24|g<<16|S<<8|255)>>>0}e.increaseLuminance=i;function a(l){return[l>>24&255,l>>16&255,l>>8&255,l&255]}e.toChannels=a})(Qd||(Qd={}));function io(e){let t=e.toString(16);return t.length<2?"0"+t:t}function ca(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}var YK=class extends xh{constructor(e,t,r){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=r}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},fp=class{constructor(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new oi}register(e){let t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id}deregister(e){for(let t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1}getJoinedCharacters(e){if(this._characterJoiners.length===0)return[];let t=this._bufferService.buffer.lines.get(e);if(!t||t.length===0)return[];let r=[],n=t.translateToString(!0),i=0,a=0,l=0,u=t.getFg(0),f=t.getBg(0);for(let h=0;h<t.getTrimmedLength();h++)if(t.loadCell(h,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==u||this._workCell.bg!==f){if(h-i>1){let d=this._getJoinedRanges(n,l,a,t,i);for(let m=0;m<d.length;m++)r.push(d[m])}i=h,l=a,u=this._workCell.fg,f=this._workCell.bg}a+=this._workCell.getChars().length||Ss.length}if(this._bufferService.cols-i>1){let h=this._getJoinedRanges(n,l,a,t,i);for(let d=0;d<h.length;d++)r.push(h[d])}return r}_getJoinedRanges(e,t,r,n,i){let a=e.substring(t,r),l=[];try{l=this._characterJoiners[0].handler(a)}catch(u){console.error(u)}for(let u=1;u<this._characterJoiners.length;u++)try{let f=this._characterJoiners[u].handler(a);for(let h=0;h<f.length;h++)fp._mergeRanges(l,f[h])}catch(f){console.error(f)}return this._stringRangesToCellRanges(l,n,i),l}_stringRangesToCellRanges(e,t,r){let n=0,i=!1,a=0,l=e[n];if(l){for(let u=r;u<this._bufferService.cols;u++){let f=t.getWidth(u),h=t.getString(u).length||Ss.length;if(f!==0){if(!i&&l[0]<=a&&(l[0]=u,i=!0),l[1]<=a){if(l[1]=u,l=e[++n],!l)break;l[0]<=a?(l[0]=u,i=!0):i=!1}a+=h}}l&&(l[1]=this._bufferService.cols)}}static _mergeRanges(e,t){let r=!1;for(let n=0;n<e.length;n++){let i=e[n];if(r){if(t[1]<=i[0])return e[n-1][1]=t[1],e;if(t[1]<=i[1])return e[n-1][1]=Math.max(t[1],i[1]),e.splice(n,1),e;e.splice(n,1),n--}else{if(t[1]<=i[0])return e.splice(n,0,t),e;if(t[1]<=i[1])return i[0]=Math.min(t[0],i[0]),e;t[0]<i[1]&&(i[0]=Math.min(t[0],i[0]),r=!0);continue}}return r?e[e.length-1][1]=t[1]:e.push(t),e}};fp=Ut([ge(0,tn)],fp);function XK(e){return 57508<=e&&e<=57558}function GK(e){return 9472<=e&&e<=9631}function ZK(e){return XK(e)||GK(e)}function QK(){return{css:{canvas:Ed(),cell:Ed()},device:{canvas:Ed(),cell:Ed(),char:{width:0,height:0,left:0,top:0}}}}function Ed(){return{width:0,height:0}}var V0=class{constructor(e,t,r,n,i,a,l){this._document=e,this._characterJoinerService=t,this._optionsService=r,this._coreBrowserService=n,this._coreService=i,this._decorationService=a,this._themeService=l,this._workCell=new oi,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(e,t,r){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=r}createRow(e,t,r,n,i,a,l,u,f,h,d){let m=[],v=this._characterJoinerService.getJoinedCharacters(t),g=this._themeService.colors,S=e.getNoBgTrimmedLength();r&&S<a+1&&(S=a+1);let _,x=0,C="",A=0,O=0,P=0,D=0,k=!1,R=0,N=!1,$=0,ee=0,F=[],z=h!==-1&&d!==-1;for(let j=0;j<S;j++){e.loadCell(j,this._workCell);let K=this._workCell.getWidth();if(K===0)continue;let W=!1,B=j>=ee,q=j,G=this._workCell;if(v.length>0&&j===v[0][0]&&B){let ke=v.shift(),Be=this._isCellInSelection(ke[0],t);for(A=ke[0]+1;A<ke[1];A++)B&&(B=Be===this._isCellInSelection(A,t));B&&(B=!r||a<ke[0]||a>=ke[1]),B?(W=!0,G=new YK(this._workCell,e.translateToString(!0,ke[0],ke[1]),ke[1]-ke[0]),q=ke[1]-1,K=G.getWidth()):ee=ke[1]}let ce=this._isCellInSelection(j,t),M=r&&j===a,I=z&&j>=h&&j<=d,Y=!1;this._decorationService.forEachDecorationAtCell(j,t,void 0,ke=>{Y=!0});let L=G.getChars()||Ss;if(L===" "&&(G.isUnderline()||G.isOverline())&&(L=" "),$=K*u-f.get(L,G.isBold(),G.isItalic()),!_)_=this._document.createElement("span");else if(x&&(ce&&N||!ce&&!N&&G.bg===O)&&(ce&&N&&g.selectionForeground||G.fg===P)&&G.extended.ext===D&&I===k&&$===R&&!M&&!W&&!Y&&B){G.isInvisible()?C+=Ss:C+=L,x++;continue}else x&&(_.textContent=C),_=this._document.createElement("span"),x=0,C="";if(O=G.bg,P=G.fg,D=G.extended.ext,k=I,R=$,N=ce,W&&a>=j&&a<=q&&(a=j),!this._coreService.isCursorHidden&&M&&this._coreService.isCursorInitialized){if(F.push("xterm-cursor"),this._coreBrowserService.isFocused)l&&F.push("xterm-cursor-blink"),F.push(n==="bar"?"xterm-cursor-bar":n==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(i)switch(i){case"outline":F.push("xterm-cursor-outline");break;case"block":F.push("xterm-cursor-block");break;case"bar":F.push("xterm-cursor-bar");break;case"underline":F.push("xterm-cursor-underline");break}}if(G.isBold()&&F.push("xterm-bold"),G.isItalic()&&F.push("xterm-italic"),G.isDim()&&F.push("xterm-dim"),G.isInvisible()?C=Ss:C=G.getChars()||Ss,G.isUnderline()&&(F.push(`xterm-underline-${G.extended.underlineStyle}`),C===" "&&(C=" "),!G.isUnderlineColorDefault()))if(G.isUnderlineColorRGB())_.style.textDecorationColor=`rgb(${xh.toColorRGB(G.getUnderlineColor()).join(",")})`;else{let ke=G.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&G.isBold()&&ke<8&&(ke+=8),_.style.textDecorationColor=g.ansi[ke].css}G.isOverline()&&(F.push("xterm-overline"),C===" "&&(C=" ")),G.isStrikethrough()&&F.push("xterm-strikethrough"),I&&(_.style.textDecoration="underline");let ue=G.getFgColor(),fe=G.getFgColorMode(),pe=G.getBgColor(),Te=G.getBgColorMode(),tt=!!G.isInverse();if(tt){let ke=ue;ue=pe,pe=ke;let Be=fe;fe=Te,Te=Be}let ie,Ee,Oe=!1;this._decorationService.forEachDecorationAtCell(j,t,void 0,ke=>{ke.options.layer!=="top"&&Oe||(ke.backgroundColorRGB&&(Te=50331648,pe=ke.backgroundColorRGB.rgba>>8&16777215,ie=ke.backgroundColorRGB),ke.foregroundColorRGB&&(fe=50331648,ue=ke.foregroundColorRGB.rgba>>8&16777215,Ee=ke.foregroundColorRGB),Oe=ke.options.layer==="top")}),!Oe&&ce&&(ie=this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque,pe=ie.rgba>>8&16777215,Te=50331648,Oe=!0,g.selectionForeground&&(fe=50331648,ue=g.selectionForeground.rgba>>8&16777215,Ee=g.selectionForeground)),Oe&&F.push("xterm-decoration-top");let le;switch(Te){case 16777216:case 33554432:le=g.ansi[pe],F.push(`xterm-bg-${pe}`);break;case 50331648:le=nr.toColor(pe>>16,pe>>8&255,pe&255),this._addStyle(_,`background-color:#${w2((pe>>>0).toString(16),"0",6)}`);break;case 0:default:tt?(le=g.foreground,F.push("xterm-bg-257")):le=g.background}switch(ie||G.isDim()&&(ie=kt.multiplyOpacity(le,.5)),fe){case 16777216:case 33554432:G.isBold()&&ue<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ue+=8),this._applyMinimumContrast(_,le,g.ansi[ue],G,ie,void 0)||F.push(`xterm-fg-${ue}`);break;case 50331648:let ke=nr.toColor(ue>>16&255,ue>>8&255,ue&255);this._applyMinimumContrast(_,le,ke,G,ie,Ee)||this._addStyle(_,`color:#${w2(ue.toString(16),"0",6)}`);break;case 0:default:this._applyMinimumContrast(_,le,g.foreground,G,ie,Ee)||tt&&F.push("xterm-fg-257")}F.length&&(_.className=F.join(" "),F.length=0),!M&&!W&&!Y&&B?x++:_.textContent=C,$!==this.defaultSpacing&&(_.style.letterSpacing=`${$}px`),m.push(_),j=q}return _&&x&&(_.textContent=C),m}_applyMinimumContrast(e,t,r,n,i,a){if(this._optionsService.rawOptions.minimumContrastRatio===1||ZK(n.getCode()))return!1;let l=this._getContrastCache(n),u;if(!i&&!a&&(u=l.getColor(t.rgba,r.rgba)),u===void 0){let f=this._optionsService.rawOptions.minimumContrastRatio/(n.isDim()?2:1);u=kt.ensureContrastRatio(i||t,a||r,f),l.setColor((i||t).rgba,(a||r).rgba,u??null)}return u?(this._addStyle(e,`color:${u.css}`),!0):!1}_getContrastCache(e){return e.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(e,t){e.setAttribute("style",`${e.getAttribute("style")||""}${t};`)}_isCellInSelection(e,t){let r=this._selectionStart,n=this._selectionEnd;return!r||!n?!1:this._columnSelectMode?r[0]<=n[0]?e>=r[0]&&t>=r[1]&&e<n[0]&&t<=n[1]:e<r[0]&&t>=r[1]&&e>=n[0]&&t<=n[1]:t>r[1]&&t<n[1]||r[1]===n[1]&&t===r[1]&&e>=r[0]&&e<n[0]||r[1]<n[1]&&t===n[1]&&e<n[0]||r[1]<n[1]&&t===r[1]&&e>=r[0]}};V0=Ut([ge(1,CB),ge(2,rn),ge(3,ka),ge(4,Bo),ge(5,Ch),ge(6,au)],V0);function w2(e,t,r){for(;e.length<r;)e=t+e;return e}var JK=class{constructor(e,t){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=e.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";let r=e.createElement("span");r.classList.add("xterm-char-measure-element");let n=e.createElement("span");n.classList.add("xterm-char-measure-element"),n.style.fontWeight="bold";let i=e.createElement("span");i.classList.add("xterm-char-measure-element"),i.style.fontStyle="italic";let a=e.createElement("span");a.classList.add("xterm-char-measure-element"),a.style.fontWeight="bold",a.style.fontStyle="italic",this._measureElements=[r,n,i,a],this._container.appendChild(r),this._container.appendChild(n),this._container.appendChild(i),this._container.appendChild(a),t.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(e,t,r,n){e===this._font&&t===this._fontSize&&r===this._weight&&n===this._weightBold||(this._font=e,this._fontSize=t,this._weight=r,this._weightBold=n,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${r}`,this._measureElements[1].style.fontWeight=`${n}`,this._measureElements[2].style.fontWeight=`${r}`,this._measureElements[3].style.fontWeight=`${n}`,this.clear())}get(e,t,r){let n=0;if(!t&&!r&&e.length===1&&(n=e.charCodeAt(0))<256){if(this._flat[n]!==-9999)return this._flat[n];let l=this._measure(e,0);return l>0&&(this._flat[n]=l),l}let i=e;t&&(i+="B"),r&&(i+="I");let a=this._holey.get(i);if(a===void 0){let l=0;t&&(l|=1),r&&(l|=2),a=this._measure(e,l),a>0&&this._holey.set(i,a)}return a}_measure(e,t){let r=this._measureElements[t];return r.textContent=e.repeat(32),r.offsetWidth/32}},eq=class{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(e,t,r,n=!1){if(this.selectionStart=t,this.selectionEnd=r,!t||!r||t[0]===r[0]&&t[1]===r[1]){this.clear();return}let i=e.buffers.active.ydisp,a=t[1]-i,l=r[1]-i,u=Math.max(a,0),f=Math.min(l,e.rows-1);if(u>=e.rows||f<0){this.clear();return}this.hasSelection=!0,this.columnSelectMode=n,this.viewportStartRow=a,this.viewportEndRow=l,this.viewportCappedStartRow=u,this.viewportCappedEndRow=f,this.startCol=t[0],this.endCol=r[0]}isCellSelected(e,t,r){return this.hasSelection?(r-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&r>=this.viewportCappedStartRow&&t<this.endCol&&r<=this.viewportCappedEndRow:t<this.startCol&&r>=this.viewportCappedStartRow&&t>=this.endCol&&r<=this.viewportCappedEndRow:r>this.viewportStartRow&&r<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&r===this.viewportStartRow&&t>=this.startCol&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&r===this.viewportEndRow&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&r===this.viewportStartRow&&t>=this.startCol):!1}};function tq(){return new eq}var r_="xterm-dom-renderer-owner-",Xn="xterm-rows",Ad="xterm-fg-",x2="xterm-bg-",kc="xterm-focus",Od="xterm-selection",rq=1,Y0=class extends We{constructor(e,t,r,n,i,a,l,u,f,h,d,m,v,g){super(),this._terminal=e,this._document=t,this._element=r,this._screenElement=n,this._viewportElement=i,this._helperContainer=a,this._linkifier2=l,this._charSizeService=f,this._optionsService=h,this._bufferService=d,this._coreService=m,this._coreBrowserService=v,this._themeService=g,this._terminalClass=rq++,this._rowElements=[],this._selectionRenderModel=tq(),this.onRequestRedraw=this._register(new me).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(Xn),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(Od),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=QK(),this._updateDimensions(),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._themeService.onChangeColors(S=>this._injectCss(S))),this._injectCss(this._themeService.colors),this._rowFactory=u.createInstance(V0,document),this._element.classList.add(r_+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this._register(this._linkifier2.onShowLinkUnderline(S=>this._handleLinkHover(S))),this._register(this._linkifier2.onHideLinkUnderline(S=>this._handleLinkLeave(S))),this._register(Bt(()=>{this._element.classList.remove(r_+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new JK(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){let e=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*e,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*e),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/e),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/e),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(let r of this._rowElements)r.style.width=`${this.dimensions.css.canvas.width}px`,r.style.height=`${this.dimensions.css.cell.height}px`,r.style.lineHeight=`${this.dimensions.css.cell.height}px`,r.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));let t=`${this._terminalSelector} .${Xn} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=t,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(e){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let t=`${this._terminalSelector} .${Xn} { pointer-events: none; color: ${e.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;t+=`${this._terminalSelector} .${Xn} .xterm-dim { color: ${kt.multiplyOpacity(e.foreground,.5).css};}`,t+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;let r=`blink_underline_${this._terminalClass}`,n=`blink_bar_${this._terminalClass}`,i=`blink_block_${this._terminalClass}`;t+=`@keyframes ${r} { 50% {  border-bottom-style: hidden; }}`,t+=`@keyframes ${n} { 50% {  box-shadow: none; }}`,t+=`@keyframes ${i} { 0% {  background-color: ${e.cursor.css};  color: ${e.cursorAccent.css}; } 50% {  background-color: inherit;  color: ${e.cursor.css}; }}`,t+=`${this._terminalSelector} .${Xn}.${kc} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${r} 1s step-end infinite;}${this._terminalSelector} .${Xn}.${kc} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${n} 1s step-end infinite;}${this._terminalSelector} .${Xn}.${kc} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${i} 1s step-end infinite;}${this._terminalSelector} .${Xn} .xterm-cursor.xterm-cursor-block { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css};}${this._terminalSelector} .${Xn} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e.cursor.css} !important; color: ${e.cursorAccent.css} !important;}${this._terminalSelector} .${Xn} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${Xn} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}${this._terminalSelector} .${Xn} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,t+=`${this._terminalSelector} .${Od} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${Od} div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .${Od} div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;for(let[a,l]of e.ansi.entries())t+=`${this._terminalSelector} .${Ad}${a} { color: ${l.css}; }${this._terminalSelector} .${Ad}${a}.xterm-dim { color: ${kt.multiplyOpacity(l,.5).css}; }${this._terminalSelector} .${x2}${a} { background-color: ${l.css}; }`;t+=`${this._terminalSelector} .${Ad}257 { color: ${kt.opaque(e.background).css}; }${this._terminalSelector} .${Ad}257.xterm-dim { color: ${kt.multiplyOpacity(kt.opaque(e.background),.5).css}; }${this._terminalSelector} .${x2}257 { background-color: ${e.foreground.css}; }`,this._themeStyleElement.textContent=t}_setDefaultSpacing(){let e=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${e}px`,this._rowFactory.defaultSpacing=e}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(e,t){for(let r=this._rowElements.length;r<=t;r++){let n=this._document.createElement("div");this._rowContainer.appendChild(n),this._rowElements.push(n)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(e,t){this._refreshRowElements(e,t),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(kc),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(kc),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(e,t,r){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(e,t,r),this.renderRows(0,this._bufferService.rows-1),!e||!t||(this._selectionRenderModel.update(this._terminal,e,t,r),!this._selectionRenderModel.hasSelection))return;let n=this._selectionRenderModel.viewportStartRow,i=this._selectionRenderModel.viewportEndRow,a=this._selectionRenderModel.viewportCappedStartRow,l=this._selectionRenderModel.viewportCappedEndRow,u=this._document.createDocumentFragment();if(r){let f=e[0]>t[0];u.appendChild(this._createSelectionElement(a,f?t[0]:e[0],f?e[0]:t[0],l-a+1))}else{let f=n===a?e[0]:0,h=a===i?t[0]:this._bufferService.cols;u.appendChild(this._createSelectionElement(a,f,h));let d=l-a-1;if(u.appendChild(this._createSelectionElement(a+1,0,this._bufferService.cols,d)),a!==l){let m=i===l?t[0]:this._bufferService.cols;u.appendChild(this._createSelectionElement(l,0,m))}}this._selectionContainer.appendChild(u)}_createSelectionElement(e,t,r,n=1){let i=this._document.createElement("div"),a=t*this.dimensions.css.cell.width,l=this.dimensions.css.cell.width*(r-t);return a+l>this.dimensions.css.canvas.width&&(l=this.dimensions.css.canvas.width-a),i.style.height=`${n*this.dimensions.css.cell.height}px`,i.style.top=`${e*this.dimensions.css.cell.height}px`,i.style.left=`${a}px`,i.style.width=`${l}px`,i}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(let e of this._rowElements)e.replaceChildren()}renderRows(e,t){let r=this._bufferService.buffer,n=r.ybase+r.y,i=Math.min(r.x,this._bufferService.cols-1),a=this._coreService.decPrivateModes.cursorBlink??this._optionsService.rawOptions.cursorBlink,l=this._coreService.decPrivateModes.cursorStyle??this._optionsService.rawOptions.cursorStyle,u=this._optionsService.rawOptions.cursorInactiveStyle;for(let f=e;f<=t;f++){let h=f+r.ydisp,d=this._rowElements[f],m=r.lines.get(h);if(!d||!m)break;d.replaceChildren(...this._rowFactory.createRow(m,h,h===n,l,u,i,a,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${r_}${this._terminalClass}`}_handleLinkHover(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)}_handleLinkLeave(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)}_setCellUnderline(e,t,r,n,i,a){r<0&&(e=0),n<0&&(t=0);let l=this._bufferService.rows-1;r=Math.max(Math.min(r,l),0),n=Math.max(Math.min(n,l),0),i=Math.min(i,this._bufferService.cols);let u=this._bufferService.buffer,f=u.ybase+u.y,h=Math.min(u.x,i-1),d=this._optionsService.rawOptions.cursorBlink,m=this._optionsService.rawOptions.cursorStyle,v=this._optionsService.rawOptions.cursorInactiveStyle;for(let g=r;g<=n;++g){let S=g+u.ydisp,_=this._rowElements[g],x=u.lines.get(S);if(!_||!x)break;_.replaceChildren(...this._rowFactory.createRow(x,S,S===f,m,v,h,d,this.dimensions.css.cell.width,this._widthCache,a?g===r?e:0:-1,a?(g===n?t:i)-1:-1))}}};Y0=Ut([ge(7,Aw),ge(8,um),ge(9,rn),ge(10,tn),ge(11,Bo),ge(12,ka),ge(13,au)],Y0);var X0=class extends We{constructor(e,t,r){super(),this._optionsService=r,this.width=0,this.height=0,this._onCharSizeChange=this._register(new me),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this._register(new iq(this._optionsService))}catch{this._measureStrategy=this._register(new nq(e,t,this._optionsService))}this._register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}get hasValidSize(){return this.width>0&&this.height>0}measure(){let e=this._measureStrategy.measure();(e.width!==this.width||e.height!==this.height)&&(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())}};X0=Ut([ge(2,rn)],X0);var $B=class extends We{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(e,t){e!==void 0&&e>0&&t!==void 0&&t>0&&(this._result.width=e,this._result.height=t)}},nq=class extends $B{constructor(e,t,r){super(),this._document=e,this._parentElement=t,this._optionsService=r,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}},iq=class extends $B{constructor(e){super(),this._optionsService=e,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");let t=this._ctx.measureText("W");if(!("width"in t&&"fontBoundingBoxAscent"in t&&"fontBoundingBoxDescent"in t))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let e=this._ctx.measureText("W");return this._validateAndSet(e.width,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent),this._result}},aq=class extends We{constructor(e,t,r){super(),this._textarea=e,this._window=t,this.mainDocument=r,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=this._register(new sq(this._window)),this._onDprChange=this._register(new me),this.onDprChange=this._onDprChange.event,this._onWindowChange=this._register(new me),this.onWindowChange=this._onWindowChange.event,this._register(this.onWindowChange(n=>this._screenDprMonitor.setWindow(n))),this._register(Ir.forward(this._screenDprMonitor.onDprChange,this._onDprChange)),this._register(Le(this._textarea,"focus",()=>this._isFocused=!0)),this._register(Le(this._textarea,"blur",()=>this._isFocused=!1))}get window(){return this._window}set window(e){this._window!==e&&(this._window=e,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}},sq=class extends We{constructor(e){super(),this._parentWindow=e,this._windowResizeListener=this._register(new $l),this._onDprChange=this._register(new me),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this._register(Bt(()=>this.clearListener()))}setWindow(e){this._parentWindow=e,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=Le(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var e;this._outerListener&&((e=this._resolutionMediaMatchList)==null||e.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){!this._resolutionMediaMatchList||!this._outerListener||(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}},oq=class extends We{constructor(){super(),this.linkProviders=[],this._register(Bt(()=>this.linkProviders.length=0))}registerLinkProvider(e){return this.linkProviders.push(e),{dispose:()=>{let t=this.linkProviders.indexOf(e);t!==-1&&this.linkProviders.splice(t,1)}}}};function Lw(e,t,r){let n=r.getBoundingClientRect(),i=e.getComputedStyle(r),a=parseInt(i.getPropertyValue("padding-left")),l=parseInt(i.getPropertyValue("padding-top"));return[t.clientX-n.left-a,t.clientY-n.top-l]}function lq(e,t,r,n,i,a,l,u,f){if(!a)return;let h=Lw(e,t,r);if(h)return h[0]=Math.ceil((h[0]+(f?l/2:0))/l),h[1]=Math.ceil(h[1]/u),h[0]=Math.min(Math.max(h[0],1),n+(f?1:0)),h[1]=Math.min(Math.max(h[1],1),i),h}var G0=class{constructor(e,t){this._renderService=e,this._charSizeService=t}getCoords(e,t,r,n,i){return lq(window,e,t,r,n,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,i)}getMouseReportCoords(e,t){let r=Lw(window,e,t);if(this._charSizeService.hasValidSize)return r[0]=Math.min(Math.max(r[0],0),this._renderService.dimensions.css.canvas.width-1),r[1]=Math.min(Math.max(r[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(r[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(r[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(r[0]),y:Math.floor(r[1])}}};G0=Ut([ge(0,Pa),ge(1,um)],G0);var uq=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(e){return this._refreshCallbacks.push(e),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(e,t,r){this._rowCount=r,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t,!this._animationFrame&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0){this._runRefreshCallbacks();return}let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let e of this._refreshCallbacks)e(0);this._refreshCallbacks=[]}},KB={};_$(KB,{getSafariVersion:()=>hq,isChromeOS:()=>YB,isFirefox:()=>qB,isIpad:()=>fq,isIphone:()=>dq,isLegacyEdge:()=>cq,isLinux:()=>Bw,isMac:()=>dp,isNode:()=>cm,isSafari:()=>WB,isWindows:()=>VB});var cm=typeof process<"u"&&"title"in process,Eh=cm?"node":navigator.userAgent,Ah=cm?"node":navigator.platform,qB=Eh.includes("Firefox"),cq=Eh.includes("Edge"),WB=/^((?!chrome|android).)*safari/i.test(Eh);function hq(){if(!WB)return 0;let e=Eh.match(/Version\/(\d+)/);return e===null||e.length<2?0:parseInt(e[1])}var dp=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(Ah),fq=Ah==="iPad",dq=Ah==="iPhone",VB=["Windows","Win16","Win32","WinCE"].includes(Ah),Bw=Ah.indexOf("Linux")>=0,YB=/\bCrOS\b/.test(Eh),XB=class{constructor(){this._tasks=[],this._i=0}enqueue(e){this._tasks.push(e),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(e){this._idleCallback=void 0;let t=0,r=0,n=e.timeRemaining(),i=0;for(;this._i<this._tasks.length;){if(t=performance.now(),this._tasks[this._i]()||this._i++,t=Math.max(1,performance.now()-t),r=Math.max(t,r),i=e.timeRemaining(),r*1.5>i){n-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(n-t))}ms`),this._start();return}n=i}this.clear()}},pq=class extends XB{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){let t=performance.now()+e;return{timeRemaining:()=>Math.max(0,t-performance.now())}}},mq=class extends XB{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},pp=!cm&&"requestIdleCallback"in window?mq:pq,vq=class{constructor(){this._queue=new pp}set(e){this._queue.clear(),this._queue.enqueue(e)}flush(){this._queue.flush()}},Z0=class extends We{constructor(e,t,r,n,i,a,l,u,f){super(),this._rowCount=e,this._optionsService=r,this._charSizeService=n,this._coreService=i,this._coreBrowserService=u,this._renderer=this._register(new $l),this._pausedResizeTask=new vq,this._observerDisposable=this._register(new $l),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this._register(new me),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this._register(new me),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this._register(new me),this.onRender=this._onRender.event,this._onRefreshRequest=this._register(new me),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new uq((h,d)=>this._renderRows(h,d),this._coreBrowserService),this._register(this._renderDebouncer),this._syncOutputHandler=new gq(this._coreBrowserService,this._coreService,()=>this._fullRefresh()),this._register(Bt(()=>this._syncOutputHandler.dispose())),this._register(this._coreBrowserService.onDprChange(()=>this.handleDevicePixelRatioChange())),this._register(l.onResize(()=>this._fullRefresh())),this._register(l.buffers.onBufferActivate(()=>{var h;return(h=this._renderer.value)==null?void 0:h.clear()})),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this._register(a.onDecorationRegistered(()=>this._fullRefresh())),this._register(a.onDecorationRemoved(()=>this._fullRefresh())),this._register(this._optionsService.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(l.cols,l.rows),this._fullRefresh()})),this._register(this._optionsService.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(l.buffer.y,l.buffer.y,!0))),this._register(f.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(this._coreBrowserService.window,t),this._register(this._coreBrowserService.onWindowChange(h=>this._registerIntersectionObserver(h,t)))}get dimensions(){return this._renderer.value.dimensions}_registerIntersectionObserver(e,t){if("IntersectionObserver"in e){let r=new e.IntersectionObserver(n=>this._handleIntersectionChange(n[n.length-1]),{threshold:0});r.observe(t),this._observerDisposable.value=Bt(()=>r.disconnect())}}_handleIntersectionChange(e){this._isPaused=e.isIntersecting===void 0?e.intersectionRatio===0:!e.isIntersecting,!this._isPaused&&!this._charSizeService.hasValidSize&&this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(e,t,r=!1){if(this._isPaused){this._needsFullRefresh=!0;return}if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}let n=this._syncOutputHandler.flush();n&&(e=Math.min(e,n.start),t=Math.max(t,n.end)),r||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount)}_renderRows(e,t){if(this._renderer.value){if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}e=Math.min(e,this._rowCount-1),t=Math.min(t,this._rowCount-1),this._renderer.value.renderRows(e,t),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0}}resize(e,t){this._rowCount=t,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(e){this._renderer.value=e,this._renderer.value&&(this._renderer.value.onRequestRedraw(t=>this.refreshRows(t.start,t.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(e){return this._renderDebouncer.addRefreshCallback(e)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var e,t;this._renderer.value&&((t=(e=this._renderer.value).clearTextureAtlas)==null||t.call(e),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(e,t){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>{var r;return(r=this._renderer.value)==null?void 0:r.handleResize(e,t)}):this._renderer.value.handleResize(e,t),this._fullRefresh())}handleCharSizeChanged(){var e;(e=this._renderer.value)==null||e.handleCharSizeChanged()}handleBlur(){var e;(e=this._renderer.value)==null||e.handleBlur()}handleFocus(){var e;(e=this._renderer.value)==null||e.handleFocus()}handleSelectionChanged(e,t,r){var n;this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=r,(n=this._renderer.value)==null||n.handleSelectionChanged(e,t,r)}handleCursorMove(){var e;(e=this._renderer.value)==null||e.handleCursorMove()}clear(){var e;(e=this._renderer.value)==null||e.clear()}};Z0=Ut([ge(2,rn),ge(3,um),ge(4,Bo),ge(5,Ch),ge(6,tn),ge(7,ka),ge(8,au)],Z0);var gq=class{constructor(e,t,r){this._coreBrowserService=e,this._coreService=t,this._onTimeout=r,this._start=0,this._end=0,this._isBuffering=!1}bufferRows(e,t){this._isBuffering?(this._start=Math.min(this._start,e),this._end=Math.max(this._end,t)):(this._start=e,this._end=t,this._isBuffering=!0),this._timeout===void 0&&(this._timeout=this._coreBrowserService.window.setTimeout(()=>{this._timeout=void 0,this._coreService.decPrivateModes.synchronizedOutput=!1,this._onTimeout()},1e3))}flush(){if(this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0),!this._isBuffering)return;let e={start:this._start,end:this._end};return this._isBuffering=!1,e}dispose(){this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0)}};function yq(e,t,r,n){let i=r.buffer.x,a=r.buffer.y;if(!r.buffer.hasScrollback)return Sq(i,a,e,t,r,n)+hm(a,t,r,n)+wq(i,a,e,t,r,n);let l;if(a===t)return l=i>e?"D":"C",sh(Math.abs(i-e),ah(l,n));l=a>t?"D":"C";let u=Math.abs(a-t),f=bq(a>t?e:i,r)+(u-1)*r.cols+1+_q(a>t?i:e);return sh(f,ah(l,n))}function _q(e,t){return e-1}function bq(e,t){return t.cols-e}function Sq(e,t,r,n,i,a){return hm(t,n,i,a).length===0?"":sh(ZB(e,t,e,t-Ao(t,i),!1,i).length,ah("D",a))}function hm(e,t,r,n){let i=e-Ao(e,r),a=t-Ao(t,r),l=Math.abs(i-a)-xq(e,t,r);return sh(l,ah(GB(e,t),n))}function wq(e,t,r,n,i,a){let l;hm(t,n,i,a).length>0?l=n-Ao(n,i):l=t;let u=n,f=Cq(e,t,r,n,i,a);return sh(ZB(e,l,r,u,f==="C",i).length,ah(f,a))}function xq(e,t,r){var l;let n=0,i=e-Ao(e,r),a=t-Ao(t,r);for(let u=0;u<Math.abs(i-a);u++){let f=GB(e,t)==="A"?-1:1;(l=r.buffer.lines.get(i+f*u))!=null&&l.isWrapped&&n++}return n}function Ao(e,t){let r=0,n=t.buffer.lines.get(e),i=n==null?void 0:n.isWrapped;for(;i&&e>=0&&e<t.rows;)r++,n=t.buffer.lines.get(--e),i=n==null?void 0:n.isWrapped;return r}function Cq(e,t,r,n,i,a){let l;return hm(r,n,i,a).length>0?l=n-Ao(n,i):l=t,e<r&&l<=n||e>=r&&l<n?"C":"D"}function GB(e,t){return e>t?"A":"B"}function ZB(e,t,r,n,i,a){let l=e,u=t,f="";for(;(l!==r||u!==n)&&u>=0&&u<a.buffer.lines.length;)l+=i?1:-1,i&&l>a.cols-1?(f+=a.buffer.translateBufferLineToString(u,!1,e,l),l=0,e=0,u++):!i&&l<0&&(f+=a.buffer.translateBufferLineToString(u,!1,0,e+1),l=a.cols-1,e=l,u--);return f+a.buffer.translateBufferLineToString(u,!1,e,l)}function ah(e,t){let r=t?"O":"[";return oe.ESC+r+e}function sh(e,t){e=Math.floor(e);let r="";for(let n=0;n<e;n++)r+=t;return r}var Eq=class{constructor(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:!this.selectionEnd||!this.selectionStart?this.selectionStart:this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?e%this._bufferService.cols===0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let e=this.selectionStart,t=this.selectionEnd;return!e||!t?!1:e[1]>t[1]||e[1]===t[1]&&e[0]>t[0]}handleTrim(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}};function C2(e,t){if(e.start.y>e.end.y)throw new Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}var n_=50,Aq=15,Oq=50,kq=500,Pq=" ",Tq=new RegExp(Pq,"g"),Q0=class extends We{constructor(e,t,r,n,i,a,l,u,f){super(),this._element=e,this._screenElement=t,this._linkifier=r,this._bufferService=n,this._coreService=i,this._mouseService=a,this._optionsService=l,this._renderService=u,this._coreBrowserService=f,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new oi,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this._register(new me),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this._register(new me),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this._register(new me),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this._register(new me),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=h=>this._handleMouseMove(h),this._mouseUpListener=h=>this._handleMouseUp(h),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(h=>this._handleTrim(h)),this._register(this._bufferService.buffers.onBufferActivate(h=>this._handleBufferActivate(h))),this.enable(),this._model=new Eq(this._bufferService),this._activeSelectionMode=0,this._register(Bt(()=>{this._removeMouseDownListeners()})),this._register(this._bufferService.onResize(h=>{h.rowsChanged&&this.clearSelection()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!e||!t?!1:e[0]!==t[0]||e[1]!==t[1]}get selectionText(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return"";let r=this._bufferService.buffer,n=[];if(this._activeSelectionMode===3){if(e[0]===t[0])return"";let i=e[0]<t[0]?e[0]:t[0],a=e[0]<t[0]?t[0]:e[0];for(let l=e[1];l<=t[1];l++){let u=r.translateBufferLineToString(l,!0,i,a);n.push(u)}}else{let i=e[1]===t[1]?t[0]:void 0;n.push(r.translateBufferLineToString(e[1],!0,e[0],i));for(let a=e[1]+1;a<=t[1]-1;a++){let l=r.lines.get(a),u=r.translateBufferLineToString(a,!0);l!=null&&l.isWrapped?n[n.length-1]+=u:n.push(u)}if(e[1]!==t[1]){let a=r.lines.get(t[1]),l=r.translateBufferLineToString(t[1],!0,0,t[0]);a&&a.isWrapped?n[n.length-1]+=l:n.push(l)}}return n.map(i=>i.replace(Tq," ")).join(VB?`\r
`:`
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),Bw&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(e){let t=this._getMouseBufferCoords(e),r=this._model.finalSelectionStart,n=this._model.finalSelectionEnd;return!r||!n||!t?!1:this._areCoordsInSelection(t,r,n)}isCellInSelection(e,t){let r=this._model.finalSelectionStart,n=this._model.finalSelectionEnd;return!r||!n?!1:this._areCoordsInSelection([e,t],r,n)}_areCoordsInSelection(e,t,r){return e[1]>t[1]&&e[1]<r[1]||t[1]===r[1]&&e[1]===t[1]&&e[0]>=t[0]&&e[0]<r[0]||t[1]<r[1]&&e[1]===r[1]&&e[0]<r[0]||t[1]<r[1]&&e[1]===t[1]&&e[0]>=t[0]}_selectWordAtCursor(e,t){var i,a;let r=(a=(i=this._linkifier.currentLink)==null?void 0:i.link)==null?void 0:a.range;if(r)return this._model.selectionStart=[r.start.x-1,r.start.y-1],this._model.selectionStartLength=C2(r,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let n=this._getMouseBufferCoords(e);return n?(this._selectWordAt(n,t),this._model.selectionEnd=void 0,!0):!1}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){let t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=Lw(this._coreBrowserService.window,e,this._screenElement)[1],r=this._renderService.dimensions.css.canvas.height;return t>=0&&t<=r?0:(t>r&&(t-=r),t=Math.min(Math.max(t,-n_),n_),t/=n_,t/Math.abs(t)+Math.round(t*(Aq-1)))}shouldForceSelection(e){return dp?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,!(e.button===2&&this.hasSelection)&&e.button===0){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):e.detail===1?this._handleSingleClick(e):e.detail===2?this._handleDoubleClick(e):e.detail===3&&this._handleTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),Oq)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&t.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){let t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return e.altKey&&!(dp&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;let t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd){this.refresh(!0);return}this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(e),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let r=this._bufferService.buffer;if(this._model.selectionEnd[1]<r.lines.length){let n=r.lines.get(this._model.selectionEnd[1]);n&&n.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}(!t||t[0]!==this._model.selectionEnd[0]||t[1]!==this._model.selectionEnd[1])&&this.refresh(!0)}_dragScroll(){if(!(!this._model.selectionEnd||!this._model.selectionStart)&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});let e=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows,e.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}}_handleMouseUp(e){let t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&t<kq&&e.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){let r=this._mouseService.getCoords(e,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(r&&r[0]!==void 0&&r[1]!==void 0){let n=yq(r[0]-1,r[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(n,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd,r=!!e&&!!t&&(e[0]!==t[0]||e[1]!==t[1]);if(!r){this._oldHasSelection&&this._fireOnSelectionChange(e,t,r);return}!e||!t||(!this._oldSelectionStart||!this._oldSelectionEnd||e[0]!==this._oldSelectionStart[0]||e[1]!==this._oldSelectionStart[1]||t[0]!==this._oldSelectionEnd[0]||t[1]!==this._oldSelectionEnd[1])&&this._fireOnSelectionChange(e,t,r)}_fireOnSelectionChange(e,t,r){this._oldSelectionStart=e,this._oldSelectionEnd=t,this._oldHasSelection=r,this._onSelectionChange.fire()}_handleBufferActivate(e){this.clearSelection(),this._trimListener.dispose(),this._trimListener=e.activeBuffer.lines.onTrim(t=>this._handleTrim(t))}_convertViewportColToCharacterIndex(e,t){let r=t;for(let n=0;t>=n;n++){let i=e.loadCell(n,this._workCell).getChars().length;this._workCell.getWidth()===0?r--:i>1&&t!==n&&(r+=i-1)}return r}setSelection(e,t,r){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=r,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(e){this._isClickInSelection(e)||(this._selectWordAtCursor(e,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(e,t,r=!0,n=!0){if(e[0]>=this._bufferService.cols)return;let i=this._bufferService.buffer,a=i.lines.get(e[1]);if(!a)return;let l=i.translateBufferLineToString(e[1],!1),u=this._convertViewportColToCharacterIndex(a,e[0]),f=u,h=e[0]-u,d=0,m=0,v=0,g=0;if(l.charAt(u)===" "){for(;u>0&&l.charAt(u-1)===" ";)u--;for(;f<l.length&&l.charAt(f+1)===" ";)f++}else{let x=e[0],C=e[0];a.getWidth(x)===0&&(d++,x--),a.getWidth(C)===2&&(m++,C++);let A=a.getString(C).length;for(A>1&&(g+=A-1,f+=A-1);x>0&&u>0&&!this._isCharWordSeparator(a.loadCell(x-1,this._workCell));){a.loadCell(x-1,this._workCell);let O=this._workCell.getChars().length;this._workCell.getWidth()===0?(d++,x--):O>1&&(v+=O-1,u-=O-1),u--,x--}for(;C<a.length&&f+1<l.length&&!this._isCharWordSeparator(a.loadCell(C+1,this._workCell));){a.loadCell(C+1,this._workCell);let O=this._workCell.getChars().length;this._workCell.getWidth()===2?(m++,C++):O>1&&(g+=O-1,f+=O-1),f++,C++}}f++;let S=u+h-d+v,_=Math.min(this._bufferService.cols,f-u+d+m-v-g);if(!(!t&&l.slice(u,f).trim()==="")){if(r&&S===0&&a.getCodePoint(0)!==32){let x=i.lines.get(e[1]-1);if(x&&a.isWrapped&&x.getCodePoint(this._bufferService.cols-1)!==32){let C=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(C){let A=this._bufferService.cols-C.start;S-=A,_+=A}}}if(n&&S+_===this._bufferService.cols&&a.getCodePoint(this._bufferService.cols-1)!==32){let x=i.lines.get(e[1]+1);if(x!=null&&x.isWrapped&&x.getCodePoint(0)!==32){let C=this._getWordAt([0,e[1]+1],!1,!1,!0);C&&(_+=C.length)}}return{start:S,length:_}}}_selectWordAt(e,t){let r=this._getWordAt(e,t);if(r){for(;r.start<0;)r.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[r.start,e[1]],this._model.selectionStartLength=r.length}}_selectToWordAt(e){let t=this._getWordAt(e,!0);if(t){let r=e[1];for(;t.start<0;)t.start+=this._bufferService.cols,r--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,r++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,r]}}_isCharWordSeparator(e){return e.getWidth()===0?!1:this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars())>=0}_selectLineAt(e){let t=this._bufferService.buffer.getWrappedRangeForLine(e),r={start:{x:0,y:t.first},end:{x:this._bufferService.cols-1,y:t.last}};this._model.selectionStart=[0,t.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=C2(r,this._bufferService.cols)}};Q0=Ut([ge(3,tn),ge(4,Bo),ge(5,Ow),ge(6,rn),ge(7,Pa),ge(8,ka)],Q0);var E2=class{constructor(){this._data={}}set(e,t,r){this._data[e]||(this._data[e]={}),this._data[e][t]=r}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}},A2=class{constructor(){this._color=new E2,this._css=new E2}setCss(e,t,r){this._css.set(e,t,r)}getCss(e,t){return this._css.get(e,t)}setColor(e,t,r){this._color.set(e,t,r)}getColor(e,t){return this._color.get(e,t)}clear(){this._color.clear(),this._css.clear()}},ur=Object.freeze((()=>{let e=[It.toColor("#2e3436"),It.toColor("#cc0000"),It.toColor("#4e9a06"),It.toColor("#c4a000"),It.toColor("#3465a4"),It.toColor("#75507b"),It.toColor("#06989a"),It.toColor("#d3d7cf"),It.toColor("#555753"),It.toColor("#ef2929"),It.toColor("#8ae234"),It.toColor("#fce94f"),It.toColor("#729fcf"),It.toColor("#ad7fa8"),It.toColor("#34e2e2"),It.toColor("#eeeeec")],t=[0,95,135,175,215,255];for(let r=0;r<216;r++){let n=t[r/36%6|0],i=t[r/6%6|0],a=t[r%6];e.push({css:nr.toCss(n,i,a),rgba:nr.toRgba(n,i,a)})}for(let r=0;r<24;r++){let n=8+r*10;e.push({css:nr.toCss(n,n,n),rgba:nr.toRgba(n,n,n)})}return e})()),so=It.toColor("#ffffff"),$c=It.toColor("#000000"),O2=It.toColor("#ffffff"),k2=$c,Pc={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117},Dq=so,J0=class extends We{constructor(e){super(),this._optionsService=e,this._contrastCache=new A2,this._halfContrastCache=new A2,this._onChangeColors=this._register(new me),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:so,background:$c,cursor:O2,cursorAccent:k2,selectionForeground:void 0,selectionBackgroundTransparent:Pc,selectionBackgroundOpaque:kt.blend($c,Pc),selectionInactiveBackgroundTransparent:Pc,selectionInactiveBackgroundOpaque:kt.blend($c,Pc),scrollbarSliderBackground:kt.opacity(so,.2),scrollbarSliderHoverBackground:kt.opacity(so,.4),scrollbarSliderActiveBackground:kt.opacity(so,.5),overviewRulerBorder:so,ansi:ur.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this._register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this._register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}get colors(){return this._colors}_setTheme(e={}){let t=this._colors;if(t.foreground=gt(e.foreground,so),t.background=gt(e.background,$c),t.cursor=kt.blend(t.background,gt(e.cursor,O2)),t.cursorAccent=kt.blend(t.background,gt(e.cursorAccent,k2)),t.selectionBackgroundTransparent=gt(e.selectionBackground,Pc),t.selectionBackgroundOpaque=kt.blend(t.background,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundTransparent=gt(e.selectionInactiveBackground,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundOpaque=kt.blend(t.background,t.selectionInactiveBackgroundTransparent),t.selectionForeground=e.selectionForeground?gt(e.selectionForeground,S2):void 0,t.selectionForeground===S2&&(t.selectionForeground=void 0),kt.isOpaque(t.selectionBackgroundTransparent)&&(t.selectionBackgroundTransparent=kt.opacity(t.selectionBackgroundTransparent,.3)),kt.isOpaque(t.selectionInactiveBackgroundTransparent)&&(t.selectionInactiveBackgroundTransparent=kt.opacity(t.selectionInactiveBackgroundTransparent,.3)),t.scrollbarSliderBackground=gt(e.scrollbarSliderBackground,kt.opacity(t.foreground,.2)),t.scrollbarSliderHoverBackground=gt(e.scrollbarSliderHoverBackground,kt.opacity(t.foreground,.4)),t.scrollbarSliderActiveBackground=gt(e.scrollbarSliderActiveBackground,kt.opacity(t.foreground,.5)),t.overviewRulerBorder=gt(e.overviewRulerBorder,Dq),t.ansi=ur.slice(),t.ansi[0]=gt(e.black,ur[0]),t.ansi[1]=gt(e.red,ur[1]),t.ansi[2]=gt(e.green,ur[2]),t.ansi[3]=gt(e.yellow,ur[3]),t.ansi[4]=gt(e.blue,ur[4]),t.ansi[5]=gt(e.magenta,ur[5]),t.ansi[6]=gt(e.cyan,ur[6]),t.ansi[7]=gt(e.white,ur[7]),t.ansi[8]=gt(e.brightBlack,ur[8]),t.ansi[9]=gt(e.brightRed,ur[9]),t.ansi[10]=gt(e.brightGreen,ur[10]),t.ansi[11]=gt(e.brightYellow,ur[11]),t.ansi[12]=gt(e.brightBlue,ur[12]),t.ansi[13]=gt(e.brightMagenta,ur[13]),t.ansi[14]=gt(e.brightCyan,ur[14]),t.ansi[15]=gt(e.brightWhite,ur[15]),e.extendedAnsi){let r=Math.min(t.ansi.length-16,e.extendedAnsi.length);for(let n=0;n<r;n++)t.ansi[n+16]=gt(e.extendedAnsi[n],ur[n+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(e){this._restoreColor(e),this._onChangeColors.fire(this.colors)}_restoreColor(e){if(e===void 0){for(let t=0;t<this._restoreColors.ansi.length;++t)this._colors.ansi[t]=this._restoreColors.ansi[t];return}switch(e){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[e]=this._restoreColors.ansi[e]}}modifyColors(e){e(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};J0=Ut([ge(0,rn)],J0);function gt(e,t){if(e!==void 0)try{return It.toColor(e)}catch{}return t}var Mq=class{constructor(...e){this._entries=new Map;for(let[t,r]of e)this.set(t,r)}set(e,t){let r=this._entries.get(e);return this._entries.set(e,t),r}forEach(e){for(let[t,r]of this._entries.entries())e(t,r)}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}},Rq=class{constructor(){this._services=new Mq,this._services.set(Aw,this)}setService(t,r){this._services.set(t,r)}getService(t){return this._services.get(t)}createInstance(t,...r){let n=A$(t).sort((l,u)=>l.index-u.index),i=[];for(let l of n){let u=this._services.get(l.id);if(!u)throw new Error(`[createInstance] ${t.name} depends on UNKNOWN service ${l.id._id}.`);i.push(u)}let a=n.length>0?n[0].index:r.length;if(r.length!==a)throw new Error(`[createInstance] First service dependency of ${t.name} at position ${a+1} conflicts with ${r.length} static arguments`);return new t(...r,...i)}},Lq={trace:0,debug:1,info:2,warn:3,error:4,off:5},Bq="xterm.js: ",eS=class extends We{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel()))}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=Lq[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)typeof e[t]=="function"&&(e[t]=e[t]())}_log(e,t,r){this._evalLazyOptionalParams(r),e.call(console,(this._optionsService.options.logger?"":Bq)+t,...r)}trace(e,...t){var r;this._logLevel<=0&&this._log(((r=this._optionsService.options.logger)==null?void 0:r.trace.bind(this._optionsService.options.logger))??console.log,e,t)}debug(e,...t){var r;this._logLevel<=1&&this._log(((r=this._optionsService.options.logger)==null?void 0:r.debug.bind(this._optionsService.options.logger))??console.log,e,t)}info(e,...t){var r;this._logLevel<=2&&this._log(((r=this._optionsService.options.logger)==null?void 0:r.info.bind(this._optionsService.options.logger))??console.info,e,t)}warn(e,...t){var r;this._logLevel<=3&&this._log(((r=this._optionsService.options.logger)==null?void 0:r.warn.bind(this._optionsService.options.logger))??console.warn,e,t)}error(e,...t){var r;this._logLevel<=4&&this._log(((r=this._optionsService.options.logger)==null?void 0:r.error.bind(this._optionsService.options.logger))??console.error,e,t)}};eS=Ut([ge(0,rn)],eS);var P2=class extends We{constructor(e){super(),this._maxLength=e,this.onDeleteEmitter=this._register(new me),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this._register(new me),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this._register(new me),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(e){if(this._maxLength===e)return;let t=new Array(e);for(let r=0;r<Math.min(e,this.length);r++)t[r]=this._array[this._getCyclicIndex(r)];this._array=t,this._maxLength=e,this._startIndex=0}get length(){return this._length}set length(e){if(e>this._length)for(let t=this._length;t<e;t++)this._array[t]=void 0;this._length=e}get(e){return this._array[this._getCyclicIndex(e)]}set(e,t){this._array[this._getCyclicIndex(e)]=t}push(e){this._array[this._getCyclicIndex(this._length)]=e,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(e,t,...r){if(t){for(let n=e;n<this._length-t;n++)this._array[this._getCyclicIndex(n)]=this._array[this._getCyclicIndex(n+t)];this._length-=t,this.onDeleteEmitter.fire({index:e,amount:t})}for(let n=this._length-1;n>=e;n--)this._array[this._getCyclicIndex(n+r.length)]=this._array[this._getCyclicIndex(n)];for(let n=0;n<r.length;n++)this._array[this._getCyclicIndex(e+n)]=r[n];if(r.length&&this.onInsertEmitter.fire({index:e,amount:r.length}),this._length+r.length>this._maxLength){let n=this._length+r.length-this._maxLength;this._startIndex+=n,this._length=this._maxLength,this.onTrimEmitter.fire(n)}else this._length+=r.length}trimStart(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)}shiftElements(e,t,r){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+r<0)throw new Error("Cannot shift elements in list beyond index 0");if(r>0){for(let i=t-1;i>=0;i--)this.set(e+i+r,this.get(e+i));let n=e+t+r-this._length;if(n>0)for(this._length+=n;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let n=0;n<t;n++)this.set(e+n+r,this.get(e+n))}}_getCyclicIndex(e){return(this._startIndex+e)%this._maxLength}},Ke=3,rr=Object.freeze(new xh),kd=0,i_=2,Kc=class QB{constructor(t,r,n=!1){this.isWrapped=n,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(t*Ke);let i=r||oi.fromCharData([0,gB,1,0]);for(let a=0;a<t;++a)this.setCell(a,i);this.length=t}get(t){let r=this._data[t*Ke+0],n=r&2097151;return[this._data[t*Ke+1],r&2097152?this._combined[t]:n?gs(n):"",r>>22,r&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):n]}set(t,r){this._data[t*Ke+1]=r[0],r[1].length>1?(this._combined[t]=r[1],this._data[t*Ke+0]=t|2097152|r[2]<<22):this._data[t*Ke+0]=r[1].charCodeAt(0)|r[2]<<22}getWidth(t){return this._data[t*Ke+0]>>22}hasWidth(t){return this._data[t*Ke+0]&12582912}getFg(t){return this._data[t*Ke+1]}getBg(t){return this._data[t*Ke+2]}hasContent(t){return this._data[t*Ke+0]&4194303}getCodePoint(t){let r=this._data[t*Ke+0];return r&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):r&2097151}isCombined(t){return this._data[t*Ke+0]&2097152}getString(t){let r=this._data[t*Ke+0];return r&2097152?this._combined[t]:r&2097151?gs(r&2097151):""}isProtected(t){return this._data[t*Ke+2]&536870912}loadCell(t,r){return kd=t*Ke,r.content=this._data[kd+0],r.fg=this._data[kd+1],r.bg=this._data[kd+2],r.content&2097152&&(r.combinedData=this._combined[t]),r.bg&268435456&&(r.extended=this._extendedAttrs[t]),r}setCell(t,r){r.content&2097152&&(this._combined[t]=r.combinedData),r.bg&268435456&&(this._extendedAttrs[t]=r.extended),this._data[t*Ke+0]=r.content,this._data[t*Ke+1]=r.fg,this._data[t*Ke+2]=r.bg}setCellFromCodepoint(t,r,n,i){i.bg&268435456&&(this._extendedAttrs[t]=i.extended),this._data[t*Ke+0]=r|n<<22,this._data[t*Ke+1]=i.fg,this._data[t*Ke+2]=i.bg}addCodepointToCell(t,r,n){let i=this._data[t*Ke+0];i&2097152?this._combined[t]+=gs(r):i&2097151?(this._combined[t]=gs(i&2097151)+gs(r),i&=-2097152,i|=2097152):i=r|1<<22,n&&(i&=-12582913,i|=n<<22),this._data[t*Ke+0]=i}insertCells(t,r,n){if(t%=this.length,t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,n),r<this.length-t){let i=new oi;for(let a=this.length-t-r-1;a>=0;--a)this.setCell(t+r+a,this.loadCell(t+a,i));for(let a=0;a<r;++a)this.setCell(t+a,n)}else for(let i=t;i<this.length;++i)this.setCell(i,n);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,n)}deleteCells(t,r,n){if(t%=this.length,r<this.length-t){let i=new oi;for(let a=0;a<this.length-t-r;++a)this.setCell(t+a,this.loadCell(t+r+a,i));for(let a=this.length-r;a<this.length;++a)this.setCell(a,n)}else for(let i=t;i<this.length;++i)this.setCell(i,n);t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,n),this.getWidth(t)===0&&!this.hasContent(t)&&this.setCellFromCodepoint(t,0,1,n)}replaceCells(t,r,n,i=!1){if(i){for(t&&this.getWidth(t-1)===2&&!this.isProtected(t-1)&&this.setCellFromCodepoint(t-1,0,1,n),r<this.length&&this.getWidth(r-1)===2&&!this.isProtected(r)&&this.setCellFromCodepoint(r,0,1,n);t<r&&t<this.length;)this.isProtected(t)||this.setCell(t,n),t++;return}for(t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,n),r<this.length&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r,0,1,n);t<r&&t<this.length;)this.setCell(t++,n)}resize(t,r){if(t===this.length)return this._data.length*4*i_<this._data.buffer.byteLength;let n=t*Ke;if(t>this.length){if(this._data.buffer.byteLength>=n*4)this._data=new Uint32Array(this._data.buffer,0,n);else{let i=new Uint32Array(n);i.set(this._data),this._data=i}for(let i=this.length;i<t;++i)this.setCell(i,r)}else{this._data=this._data.subarray(0,n);let i=Object.keys(this._combined);for(let l=0;l<i.length;l++){let u=parseInt(i[l],10);u>=t&&delete this._combined[u]}let a=Object.keys(this._extendedAttrs);for(let l=0;l<a.length;l++){let u=parseInt(a[l],10);u>=t&&delete this._extendedAttrs[u]}}return this.length=t,n*4*i_<this._data.buffer.byteLength}cleanupMemory(){if(this._data.length*4*i_<this._data.buffer.byteLength){let t=new Uint32Array(this._data.length);return t.set(this._data),this._data=t,1}return 0}fill(t,r=!1){if(r){for(let n=0;n<this.length;++n)this.isProtected(n)||this.setCell(n,t);return}this._combined={},this._extendedAttrs={};for(let n=0;n<this.length;++n)this.setCell(n,t)}copyFrom(t){this.length!==t.length?this._data=new Uint32Array(t._data):this._data.set(t._data),this.length=t.length,this._combined={};for(let r in t._combined)this._combined[r]=t._combined[r];this._extendedAttrs={};for(let r in t._extendedAttrs)this._extendedAttrs[r]=t._extendedAttrs[r];this.isWrapped=t.isWrapped}clone(){let t=new QB(0);t._data=new Uint32Array(this._data),t.length=this.length;for(let r in this._combined)t._combined[r]=this._combined[r];for(let r in this._extendedAttrs)t._extendedAttrs[r]=this._extendedAttrs[r];return t.isWrapped=this.isWrapped,t}getTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*Ke+0]&4194303)return t+(this._data[t*Ke+0]>>22);return 0}getNoBgTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*Ke+0]&4194303||this._data[t*Ke+2]&50331648)return t+(this._data[t*Ke+0]>>22);return 0}copyCellsFrom(t,r,n,i,a){let l=t._data;if(a)for(let f=i-1;f>=0;f--){for(let h=0;h<Ke;h++)this._data[(n+f)*Ke+h]=l[(r+f)*Ke+h];l[(r+f)*Ke+2]&268435456&&(this._extendedAttrs[n+f]=t._extendedAttrs[r+f])}else for(let f=0;f<i;f++){for(let h=0;h<Ke;h++)this._data[(n+f)*Ke+h]=l[(r+f)*Ke+h];l[(r+f)*Ke+2]&268435456&&(this._extendedAttrs[n+f]=t._extendedAttrs[r+f])}let u=Object.keys(t._combined);for(let f=0;f<u.length;f++){let h=parseInt(u[f],10);h>=r&&(this._combined[h-r+n]=t._combined[h])}}translateToString(t,r,n,i){r=r??0,n=n??this.length,t&&(n=Math.min(n,this.getTrimmedLength())),i&&(i.length=0);let a="";for(;r<n;){let l=this._data[r*Ke+0],u=l&2097151,f=l&2097152?this._combined[r]:u?gs(u):Ss;if(a+=f,i)for(let h=0;h<f.length;++h)i.push(r);r+=l>>22||1}return i&&i.push(r),a}};function Nq(e,t,r,n,i,a){let l=[];for(let u=0;u<e.length-1;u++){let f=u,h=e.get(++f);if(!h.isWrapped)continue;let d=[e.get(u)];for(;f<e.length&&h.isWrapped;)d.push(h),h=e.get(++f);if(!a&&n>=u&&n<f){u+=d.length-1;continue}let m=0,v=oh(d,m,t),g=1,S=0;for(;g<d.length;){let x=oh(d,g,t),C=x-S,A=r-v,O=Math.min(C,A);d[m].copyCellsFrom(d[g],S,v,O,!1),v+=O,v===r&&(m++,v=0),S+=O,S===x&&(g++,S=0),v===0&&m!==0&&d[m-1].getWidth(r-1)===2&&(d[m].copyCellsFrom(d[m-1],r-1,v++,1,!1),d[m-1].setCell(r-1,i))}d[m].replaceCells(v,r,i);let _=0;for(let x=d.length-1;x>0&&(x>m||d[x].getTrimmedLength()===0);x--)_++;_>0&&(l.push(u+d.length-_),l.push(_)),u+=d.length-1}return l}function Iq(e,t){let r=[],n=0,i=t[n],a=0;for(let l=0;l<e.length;l++)if(i===l){let u=t[++n];e.onDeleteEmitter.fire({index:l-a,amount:u}),l+=u-1,a+=u,i=t[++n]}else r.push(l);return{layout:r,countRemoved:a}}function jq(e,t){let r=[];for(let n=0;n<t.length;n++)r.push(e.get(t[n]));for(let n=0;n<r.length;n++)e.set(n,r[n]);e.length=t.length}function zq(e,t,r){let n=[],i=e.map((f,h)=>oh(e,h,t)).reduce((f,h)=>f+h),a=0,l=0,u=0;for(;u<i;){if(i-u<r){n.push(i-u);break}a+=r;let f=oh(e,l,t);a>f&&(a-=f,l++);let h=e[l].getWidth(a-1)===2;h&&a--;let d=h?r-1:r;n.push(d),u+=d}return n}function oh(e,t,r){if(t===e.length-1)return e[t].getTrimmedLength();let n=!e[t].hasContent(r-1)&&e[t].getWidth(r-1)===1,i=e[t+1].getWidth(0)===2;return n&&i?r-1:r}var JB=class eN{constructor(t){this.line=t,this.isDisposed=!1,this._disposables=[],this._id=eN._nextId++,this._onDispose=this.register(new me),this.onDispose=this._onDispose.event}get id(){return this._id}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),Eo(this._disposables),this._disposables.length=0)}register(t){return this._disposables.push(t),t}};JB._nextId=1;var Hq=JB,fr={},oo=fr.B;fr[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"};fr.A={"#":"£"};fr.B=void 0;fr[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"};fr.C=fr[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"};fr.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"};fr.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"};fr.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"};fr.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"};fr.E=fr[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"};fr.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"};fr.H=fr[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"};fr["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"};var T2=4294967295,D2=class{constructor(e,t,r){this._hasScrollback=e,this._optionsService=t,this._bufferService=r,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=rr.clone(),this.savedCharset=oo,this.markers=[],this._nullCell=oi.fromCharData([0,gB,1,0]),this._whitespaceCell=oi.fromCharData([0,Ss,1,32]),this._isClearing=!1,this._memoryCleanupQueue=new pp,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new P2(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new cp),this._nullCell}getWhitespaceCell(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new cp),this._whitespaceCell}getBlankLine(e,t){return new Kc(this._bufferService.cols,this.getNullCell(e),t)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows}_getCorrectBufferLength(e){if(!this._hasScrollback)return e;let t=e+this._optionsService.rawOptions.scrollback;return t>T2?T2:t}fillViewportRows(e){if(this.lines.length===0){e===void 0&&(e=rr);let t=this._rows;for(;t--;)this.lines.push(this.getBlankLine(e))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new P2(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(e,t){let r=this.getNullCell(rr),n=0,i=this._getCorrectBufferLength(t);if(i>this.lines.maxLength&&(this.lines.maxLength=i),this.lines.length>0){if(this._cols<e)for(let l=0;l<this.lines.length;l++)n+=+this.lines.get(l).resize(e,r);let a=0;if(this._rows<t)for(let l=this._rows;l<t;l++)this.lines.length<t+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new Kc(e,r)):this.ybase>0&&this.lines.length<=this.ybase+this.y+a+1?(this.ybase--,a++,this.ydisp>0&&this.ydisp--):this.lines.push(new Kc(e,r)));else for(let l=this._rows;l>t;l--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(i<this.lines.maxLength){let l=this.lines.length-i;l>0&&(this.lines.trimStart(l),this.ybase=Math.max(this.ybase-l,0),this.ydisp=Math.max(this.ydisp-l,0),this.savedY=Math.max(this.savedY-l,0)),this.lines.maxLength=i}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),a&&(this.y+=a),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(let a=0;a<this.lines.length;a++)n+=+this.lines.get(a).resize(e,r);this._cols=e,this._rows=t,this._memoryCleanupQueue.clear(),n>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let e=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,e=!1);let t=0;for(;this._memoryCleanupPosition<this.lines.length;)if(t+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),t>100)return!0;return e}get _isReflowEnabled(){let e=this._optionsService.rawOptions.windowsPty;return e&&e.buildNumber?this._hasScrollback&&e.backend==="conpty"&&e.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))}_reflowLarger(e,t){let r=this._optionsService.rawOptions.reflowCursorLine,n=Nq(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(rr),r);if(n.length>0){let i=Iq(this.lines,n);jq(this.lines,i.layout),this._reflowLargerAdjustViewport(e,t,i.countRemoved)}}_reflowLargerAdjustViewport(e,t,r){let n=this.getNullCell(rr),i=r;for(;i-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<t&&this.lines.push(new Kc(e,n))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-r,0)}_reflowSmaller(e,t){let r=this._optionsService.rawOptions.reflowCursorLine,n=this.getNullCell(rr),i=[],a=0;for(let l=this.lines.length-1;l>=0;l--){let u=this.lines.get(l);if(!u||!u.isWrapped&&u.getTrimmedLength()<=e)continue;let f=[u];for(;u.isWrapped&&l>0;)u=this.lines.get(--l),f.unshift(u);if(!r){let O=this.ybase+this.y;if(O>=l&&O<l+f.length)continue}let h=f[f.length-1].getTrimmedLength(),d=zq(f,this._cols,e),m=d.length-f.length,v;this.ybase===0&&this.y!==this.lines.length-1?v=Math.max(0,this.y-this.lines.maxLength+m):v=Math.max(0,this.lines.length-this.lines.maxLength+m);let g=[];for(let O=0;O<m;O++){let P=this.getBlankLine(rr,!0);g.push(P)}g.length>0&&(i.push({start:l+f.length+a,newLines:g}),a+=g.length),f.push(...g);let S=d.length-1,_=d[S];_===0&&(S--,_=d[S]);let x=f.length-m-1,C=h;for(;x>=0;){let O=Math.min(C,_);if(f[S]===void 0)break;if(f[S].copyCellsFrom(f[x],C-O,_-O,O,!0),_-=O,_===0&&(S--,_=d[S]),C-=O,C===0){x--;let P=Math.max(x,0);C=oh(f,P,this._cols)}}for(let O=0;O<f.length;O++)d[O]<e&&f[O].setCell(d[O],n);let A=m-v;for(;A-- >0;)this.ybase===0?this.y<t-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+a)-t&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+m,this.ybase+t-1)}if(i.length>0){let l=[],u=[];for(let _=0;_<this.lines.length;_++)u.push(this.lines.get(_));let f=this.lines.length,h=f-1,d=0,m=i[d];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+a);let v=0;for(let _=Math.min(this.lines.maxLength-1,f+a-1);_>=0;_--)if(m&&m.start>h+v){for(let x=m.newLines.length-1;x>=0;x--)this.lines.set(_--,m.newLines[x]);_++,l.push({index:h+1,amount:m.newLines.length}),v+=m.newLines.length,m=i[++d]}else this.lines.set(_,u[h--]);let g=0;for(let _=l.length-1;_>=0;_--)l[_].index+=g,this.lines.onInsertEmitter.fire(l[_]),g+=l[_].amount;let S=Math.max(0,f+a-this.lines.maxLength);S>0&&this.lines.onTrimEmitter.fire(S)}}translateBufferLineToString(e,t,r=0,n){let i=this.lines.get(e);return i?i.translateToString(t,r,n):""}getWrappedRangeForLine(e){let t=e,r=e;for(;t>0&&this.lines.get(t).isWrapped;)t--;for(;r+1<this.lines.length&&this.lines.get(r+1).isWrapped;)r++;return{first:t,last:r}}setupTabStops(e){for(e!=null?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.rawOptions.tabStopWidth)this.tabs[e]=!0}prevStop(e){for(e==null&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e}nextStop(e){for(e==null&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e}clearMarkers(e){this._isClearing=!0;for(let t=0;t<this.markers.length;t++)this.markers[t].line===e&&(this.markers[t].dispose(),this.markers.splice(t--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let e=0;e<this.markers.length;e++)this.markers[e].dispose();this.markers.length=0,this._isClearing=!1}addMarker(e){let t=new Hq(e);return this.markers.push(t),t.register(this.lines.onTrim(r=>{t.line-=r,t.line<0&&t.dispose()})),t.register(this.lines.onInsert(r=>{t.line>=r.index&&(t.line+=r.amount)})),t.register(this.lines.onDelete(r=>{t.line>=r.index&&t.line<r.index+r.amount&&t.dispose(),t.line>r.index&&(t.line-=r.amount)})),t.register(t.onDispose(()=>this._removeMarker(t))),t}_removeMarker(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)}},Fq=class extends We{constructor(e,t){super(),this._optionsService=e,this._bufferService=t,this._onBufferActivate=this._register(new me),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this._register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this._register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new D2(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new D2(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(e,t){this._normal.resize(e,t),this._alt.resize(e,t),this.setupTabStops(e)}setupTabStops(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)}},tN=2,rN=1,tS=class extends We{constructor(e){super(),this.isUserScrolling=!1,this._onResize=this._register(new me),this.onResize=this._onResize.event,this._onScroll=this._register(new me),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,tN),this.rows=Math.max(e.rawOptions.rows||0,rN),this.buffers=this._register(new Fq(e,this)),this._register(this.buffers.onBufferActivate(t=>{this._onScroll.fire(t.activeBuffer.ydisp)}))}get buffer(){return this.buffers.active}resize(e,t){let r=this.cols!==e,n=this.rows!==t;this.cols=e,this.rows=t,this.buffers.resize(e,t),this._onResize.fire({cols:e,rows:t,colsChanged:r,rowsChanged:n})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e,t=!1){let r=this.buffer,n;n=this._cachedBlankLine,(!n||n.length!==this.cols||n.getFg(0)!==e.fg||n.getBg(0)!==e.bg)&&(n=r.getBlankLine(e,t),this._cachedBlankLine=n),n.isWrapped=t;let i=r.ybase+r.scrollTop,a=r.ybase+r.scrollBottom;if(r.scrollTop===0){let l=r.lines.isFull;a===r.lines.length-1?l?r.lines.recycle().copyFrom(n):r.lines.push(n.clone()):r.lines.splice(a+1,0,n.clone()),l?this.isUserScrolling&&(r.ydisp=Math.max(r.ydisp-1,0)):(r.ybase++,this.isUserScrolling||r.ydisp++)}else{let l=a-i+1;r.lines.shiftElements(i+1,l-1,-1),r.lines.set(a,n.clone())}this.isUserScrolling||(r.ydisp=r.ybase),this._onScroll.fire(r.ydisp)}scrollLines(e,t){let r=this.buffer;if(e<0){if(r.ydisp===0)return;this.isUserScrolling=!0}else e+r.ydisp>=r.ybase&&(this.isUserScrolling=!1);let n=r.ydisp;r.ydisp=Math.max(Math.min(r.ydisp+e,r.ybase),0),n!==r.ydisp&&(t||this._onScroll.fire(r.ydisp))}};tS=Ut([ge(0,rn)],tS);var Dl={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnEraseInDisplay:!1,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},reflowCursorLine:!1,rescaleOverlappingGlyphs:!1,rightClickSelectsWord:dp,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRuler:{}},Uq=["normal","bold","100","200","300","400","500","600","700","800","900"],$q=class extends We{constructor(e){super(),this._onOptionChange=this._register(new me),this.onOptionChange=this._onOptionChange.event;let t={...Dl};for(let r in e)if(r in t)try{let n=e[r];t[r]=this._sanitizeAndValidateOption(r,n)}catch(n){console.error(n)}this.rawOptions=t,this.options={...t},this._setupOptions(),this._register(Bt(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(e,t){return this.onOptionChange(r=>{r===e&&t(this.rawOptions[e])})}onMultipleOptionChange(e,t){return this.onOptionChange(r=>{e.indexOf(r)!==-1&&t()})}_setupOptions(){let e=r=>{if(!(r in Dl))throw new Error(`No option with key "${r}"`);return this.rawOptions[r]},t=(r,n)=>{if(!(r in Dl))throw new Error(`No option with key "${r}"`);n=this._sanitizeAndValidateOption(r,n),this.rawOptions[r]!==n&&(this.rawOptions[r]=n,this._onOptionChange.fire(r))};for(let r in this.rawOptions){let n={get:e.bind(this,r),set:t.bind(this,r)};Object.defineProperty(this.options,r,n)}}_sanitizeAndValidateOption(e,t){switch(e){case"cursorStyle":if(t||(t=Dl[e]),!Kq(t))throw new Error(`"${t}" is not a valid value for ${e}`);break;case"wordSeparator":t||(t=Dl[e]);break;case"fontWeight":case"fontWeightBold":if(typeof t=="number"&&1<=t&&t<=1e3)break;t=Uq.includes(t)?t:Dl[e];break;case"cursorWidth":t=Math.floor(t);case"lineHeight":case"tabStopWidth":if(t<1)throw new Error(`${e} cannot be less than 1, value: ${t}`);break;case"minimumContrastRatio":t=Math.max(1,Math.min(21,Math.round(t*10)/10));break;case"scrollback":if(t=Math.min(t,4294967295),t<0)throw new Error(`${e} cannot be less than 0, value: ${t}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(t<=0)throw new Error(`${e} cannot be less than or equal to 0, value: ${t}`);break;case"rows":case"cols":if(!t&&t!==0)throw new Error(`${e} must be numeric, value: ${t}`);break;case"windowsPty":t=t??{};break}return t}};function Kq(e){return e==="block"||e==="underline"||e==="bar"}function qc(e,t=5){if(typeof e!="object")return e;let r=Array.isArray(e)?[]:{};for(let n in e)r[n]=t<=1?e[n]:e[n]&&qc(e[n],t-1);return r}var M2=Object.freeze({insertMode:!1}),R2=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,cursorBlink:void 0,cursorStyle:void 0,origin:!1,reverseWraparound:!1,sendFocus:!1,synchronizedOutput:!1,wraparound:!0}),rS=class extends We{constructor(e,t,r){super(),this._bufferService=e,this._logService=t,this._optionsService=r,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this._register(new me),this.onData=this._onData.event,this._onUserInput=this._register(new me),this.onUserInput=this._onUserInput.event,this._onBinary=this._register(new me),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this._register(new me),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=qc(M2),this.decPrivateModes=qc(R2)}reset(){this.modes=qc(M2),this.decPrivateModes=qc(R2)}triggerDataEvent(e,t=!1){if(this._optionsService.rawOptions.disableStdin)return;let r=this._bufferService.buffer;t&&this._optionsService.rawOptions.scrollOnUserInput&&r.ybase!==r.ydisp&&this._onRequestScrollToBottom.fire(),t&&this._onUserInput.fire(),this._logService.debug(`sending data "${e}"`),this._logService.trace("sending data (codes)",()=>e.split("").map(n=>n.charCodeAt(0))),this._onData.fire(e)}triggerBinaryEvent(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${e}"`),this._logService.trace("sending binary (codes)",()=>e.split("").map(t=>t.charCodeAt(0))),this._onBinary.fire(e))}};rS=Ut([ge(0,tn),ge(1,wB),ge(2,rn)],rS);var L2={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:e=>e.button===4||e.action!==1?!1:(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)},VT200:{events:19,restrict:e=>e.action!==32},DRAG:{events:23,restrict:e=>!(e.action===32&&e.button===3)},ANY:{events:31,restrict:e=>!0}};function a_(e,t){let r=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return e.button===4?(r|=64,r|=e.action):(r|=e.button&3,e.button&4&&(r|=64),e.button&8&&(r|=128),e.action===32?r|=32:e.action===0&&!t&&(r|=3)),r}var s_=String.fromCharCode,B2={DEFAULT:e=>{let t=[a_(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?"":`\x1B[M${s_(t[0])}${s_(t[1])}${s_(t[2])}`},SGR:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${a_(e,!0)};${e.col};${e.row}${t}`},SGR_PIXELS:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${a_(e,!0)};${e.x};${e.y}${t}`}},nS=class extends We{constructor(e,t,r){super(),this._bufferService=e,this._coreService=t,this._optionsService=r,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._wheelPartialScroll=0,this._onProtocolChange=this._register(new me),this.onProtocolChange=this._onProtocolChange.event;for(let n of Object.keys(L2))this.addProtocol(n,L2[n]);for(let n of Object.keys(B2))this.addEncoding(n,B2[n]);this.reset()}addProtocol(e,t){this._protocols[e]=t}addEncoding(e,t){this._encodings[e]=t}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(e){if(!this._protocols[e])throw new Error(`unknown protocol "${e}"`);this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(e){if(!this._encodings[e])throw new Error(`unknown encoding "${e}"`);this._activeEncoding=e}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null,this._wheelPartialScroll=0}consumeWheelEvent(e,t,r){if(e.deltaY===0||e.shiftKey||t===void 0||r===void 0)return 0;let n=t/r,i=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(i/=n+0,Math.abs(e.deltaY)<50&&(i*=.3),this._wheelPartialScroll+=i,i=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(i*=this._bufferService.rows),i}_applyScrollModifier(e,t){return t.altKey||t.ctrlKey||t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity}triggerMouseEvent(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows||e.button===4&&e.action===32||e.button===3&&e.action!==32||e.button!==4&&(e.action===2||e.action===3)||(e.col++,e.row++,e.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,e,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(e))return!1;let t=this._encodings[this._activeEncoding](e);return t&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0}explainEvents(e){return{down:!!(e&1),up:!!(e&2),drag:!!(e&4),move:!!(e&8),wheel:!!(e&16)}}_equalEvents(e,t,r){if(r){if(e.x!==t.x||e.y!==t.y)return!1}else if(e.col!==t.col||e.row!==t.row)return!1;return!(e.button!==t.button||e.action!==t.action||e.ctrl!==t.ctrl||e.alt!==t.alt||e.shift!==t.shift)}};nS=Ut([ge(0,tn),ge(1,Bo),ge(2,rn)],nS);var o_=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],qq=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],cr;function Wq(e,t){let r=0,n=t.length-1,i;if(e<t[0][0]||e>t[n][1])return!1;for(;n>=r;)if(i=r+n>>1,e>t[i][1])r=i+1;else if(e<t[i][0])n=i-1;else return!0;return!1}var Vq=class{constructor(){if(this.version="6",!cr){cr=new Uint8Array(65536),cr.fill(1),cr[0]=0,cr.fill(0,1,32),cr.fill(0,127,160),cr.fill(2,4352,4448),cr[9001]=2,cr[9002]=2,cr.fill(2,11904,42192),cr[12351]=1,cr.fill(2,44032,55204),cr.fill(2,63744,64256),cr.fill(2,65040,65050),cr.fill(2,65072,65136),cr.fill(2,65280,65377),cr.fill(2,65504,65511);for(let e=0;e<o_.length;++e)cr.fill(0,o_[e][0],o_[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?cr[e]:Wq(e,qq)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let r=this.wcwidth(e),n=r===0&&t!==0;if(n){let i=fo.extractWidth(t);i===0?n=!1:i>r&&(r=i)}return fo.createPropertyValue(0,r,n)}},fo=class Jd{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new me,this.onChange=this._onChange.event;let t=new Vq;this.register(t),this._active=t.version,this._activeProvider=t}static extractShouldJoin(t){return(t&1)!==0}static extractWidth(t){return t>>1&3}static extractCharKind(t){return t>>3}static createPropertyValue(t,r,n=!1){return(t&16777215)<<3|(r&3)<<1|(n?1:0)}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(t){if(!this._providers[t])throw new Error(`unknown Unicode version "${t}"`);this._active=t,this._activeProvider=this._providers[t],this._onChange.fire(t)}register(t){this._providers[t.version]=t}wcwidth(t){return this._activeProvider.wcwidth(t)}getStringCellWidth(t){let r=0,n=0,i=t.length;for(let a=0;a<i;++a){let l=t.charCodeAt(a);if(55296<=l&&l<=56319){if(++a>=i)return r+this.wcwidth(l);let h=t.charCodeAt(a);56320<=h&&h<=57343?l=(l-55296)*1024+h-56320+65536:r+=this.wcwidth(h)}let u=this.charProperties(l,n),f=Jd.extractWidth(u);Jd.extractShouldJoin(u)&&(f-=Jd.extractWidth(n)),r+=f,n=u}return r}charProperties(t,r){return this._activeProvider.charProperties(t,r)}},Yq=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(e){this.glevel=e,this.charset=this._charsets[e]}setgCharset(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)}};function N2(e){var n;let t=(n=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1))==null?void 0:n.get(e.cols-1),r=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);r&&t&&(r.isWrapped=t[3]!==0&&t[3]!==32)}var Tc=2147483647,Xq=256,nN=class iS{constructor(t=32,r=32){if(this.maxLength=t,this.maxSubParamsLength=r,r>Xq)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(t),this.length=0,this._subParams=new Int32Array(r),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(t),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}static fromArray(t){let r=new iS;if(!t.length)return r;for(let n=Array.isArray(t[0])?1:0;n<t.length;++n){let i=t[n];if(Array.isArray(i))for(let a=0;a<i.length;++a)r.addSubParam(i[a]);else r.addParam(i)}return r}clone(){let t=new iS(this.maxLength,this.maxSubParamsLength);return t.params.set(this.params),t.length=this.length,t._subParams.set(this._subParams),t._subParamsLength=this._subParamsLength,t._subParamsIdx.set(this._subParamsIdx),t._rejectDigits=this._rejectDigits,t._rejectSubDigits=this._rejectSubDigits,t._digitIsSub=this._digitIsSub,t}toArray(){let t=[];for(let r=0;r<this.length;++r){t.push(this.params[r]);let n=this._subParamsIdx[r]>>8,i=this._subParamsIdx[r]&255;i-n>0&&t.push(Array.prototype.slice.call(this._subParams,n,i))}return t}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(t){if(this._digitIsSub=!1,this.length>=this.maxLength){this._rejectDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=t>Tc?Tc:t}addSubParam(t){if(this._digitIsSub=!0,!!this.length){if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength){this._rejectSubDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=t>Tc?Tc:t,this._subParamsIdx[this.length-1]++}}hasSubParams(t){return(this._subParamsIdx[t]&255)-(this._subParamsIdx[t]>>8)>0}getSubParams(t){let r=this._subParamsIdx[t]>>8,n=this._subParamsIdx[t]&255;return n-r>0?this._subParams.subarray(r,n):null}getSubParamsAll(){let t={};for(let r=0;r<this.length;++r){let n=this._subParamsIdx[r]>>8,i=this._subParamsIdx[r]&255;i-n>0&&(t[r]=this._subParams.slice(n,i))}return t}addDigit(t){let r;if(this._rejectDigits||!(r=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let n=this._digitIsSub?this._subParams:this.params,i=n[r-1];n[r-1]=~i?Math.min(i*10+t,Tc):t}},Dc=[],Gq=class{constructor(){this._state=0,this._active=Dc,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let r=this._handlers[e];return r.push(t),{dispose:()=>{let n=r.indexOf(t);n!==-1&&r.splice(n,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=Dc}reset(){if(this._state===2)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=Dc,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||Dc,!this._active.length)this._handlerFb(this._id,"START");else for(let e=this._active.length-1;e>=0;e--)this._active[e].start()}_put(e,t,r){if(!this._active.length)this._handlerFb(this._id,"PUT",lm(e,t,r));else for(let n=this._active.length-1;n>=0;n--)this._active[n].put(e,t,r)}start(){this.reset(),this._state=1}put(e,t,r){if(this._state!==3){if(this._state===1)for(;t<r;){let n=e[t++];if(n===59){this._state=2,this._start();break}if(n<48||57<n){this._state=3;return}this._id===-1&&(this._id=0),this._id=this._id*10+n-48}this._state===2&&r-t>0&&this._put(e,t,r)}}end(e,t=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),!this._active.length)this._handlerFb(this._id,"END",e);else{let r=!1,n=this._active.length-1,i=!1;if(this._stack.paused&&(n=this._stack.loopPosition-1,r=t,i=this._stack.fallThrough,this._stack.paused=!1),!i&&r===!1){for(;n>=0&&(r=this._active[n].end(e),r!==!0);n--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!1,r;n--}for(;n>=0;n--)if(r=this._active[n].end(!1),r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!0,r}this._active=Dc,this._id=-1,this._state=0}}},kn=class{constructor(e){this._handler=e,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(e,t,r){this._hitLimit||(this._data+=lm(e,t,r),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}end(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data),t instanceof Promise))return t.then(r=>(this._data="",this._hitLimit=!1,r));return this._data="",this._hitLimit=!1,t}},Mc=[],Zq=class{constructor(){this._handlers=Object.create(null),this._active=Mc,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=Mc}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let r=this._handlers[e];return r.push(t),{dispose:()=>{let n=r.indexOf(t);n!==-1&&r.splice(n,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}reset(){if(this._active.length)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].unhook(!1);this._stack.paused=!1,this._active=Mc,this._ident=0}hook(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||Mc,!this._active.length)this._handlerFb(this._ident,"HOOK",t);else for(let r=this._active.length-1;r>=0;r--)this._active[r].hook(t)}put(e,t,r){if(!this._active.length)this._handlerFb(this._ident,"PUT",lm(e,t,r));else for(let n=this._active.length-1;n>=0;n--)this._active[n].put(e,t,r)}unhook(e,t=!0){if(!this._active.length)this._handlerFb(this._ident,"UNHOOK",e);else{let r=!1,n=this._active.length-1,i=!1;if(this._stack.paused&&(n=this._stack.loopPosition-1,r=t,i=this._stack.fallThrough,this._stack.paused=!1),!i&&r===!1){for(;n>=0&&(r=this._active[n].unhook(e),r!==!0);n--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!1,r;n--}for(;n>=0;n--)if(r=this._active[n].unhook(!1),r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!0,r}this._active=Mc,this._ident=0}},Wc=new nN;Wc.addParam(0);var I2=class{constructor(e){this._handler=e,this._data="",this._params=Wc,this._hitLimit=!1}hook(e){this._params=e.length>1||e.params[0]?e.clone():Wc,this._data="",this._hitLimit=!1}put(e,t,r){this._hitLimit||(this._data+=lm(e,t,r),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}unhook(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data,this._params),t instanceof Promise))return t.then(r=>(this._params=Wc,this._data="",this._hitLimit=!1,r));return this._params=Wc,this._data="",this._hitLimit=!1,t}},Qq=class{constructor(e){this.table=new Uint8Array(e)}setDefault(e,t){this.table.fill(e<<4|t)}add(e,t,r,n){this.table[t<<8|e]=r<<4|n}addMany(e,t,r,n){for(let i=0;i<e.length;i++)this.table[t<<8|e[i]]=r<<4|n}},ri=160,Jq=(function(){let e=new Qq(4095),t=Array.apply(null,Array(256)).map((u,f)=>f),r=(u,f)=>t.slice(u,f),n=r(32,127),i=r(0,24);i.push(25),i.push.apply(i,r(28,32));let a=r(0,14),l;e.setDefault(1,0),e.addMany(n,0,2,0);for(l in a)e.addMany([24,26,153,154],l,3,0),e.addMany(r(128,144),l,3,0),e.addMany(r(144,152),l,3,0),e.add(156,l,0,0),e.add(27,l,11,1),e.add(157,l,4,8),e.addMany([152,158,159],l,0,7),e.add(155,l,11,3),e.add(144,l,11,9);return e.addMany(i,0,3,0),e.addMany(i,1,3,1),e.add(127,1,0,1),e.addMany(i,8,0,8),e.addMany(i,3,3,3),e.add(127,3,0,3),e.addMany(i,4,3,4),e.add(127,4,0,4),e.addMany(i,6,3,6),e.addMany(i,5,3,5),e.add(127,5,0,5),e.addMany(i,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(n,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(r(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(n,7,0,7),e.addMany(i,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(r(64,127),3,7,0),e.addMany(r(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(r(48,60),4,8,4),e.addMany(r(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(r(32,64),6,0,6),e.add(127,6,0,6),e.addMany(r(64,127),6,0,0),e.addMany(r(32,48),3,9,5),e.addMany(r(32,48),5,9,5),e.addMany(r(48,64),5,0,6),e.addMany(r(64,127),5,7,0),e.addMany(r(32,48),4,9,5),e.addMany(r(32,48),1,9,2),e.addMany(r(32,48),2,9,2),e.addMany(r(48,127),2,10,0),e.addMany(r(48,80),1,10,0),e.addMany(r(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(r(96,127),1,10,0),e.add(80,1,11,9),e.addMany(i,9,0,9),e.add(127,9,0,9),e.addMany(r(28,32),9,0,9),e.addMany(r(32,48),9,9,12),e.addMany(r(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(i,11,0,11),e.addMany(r(32,128),11,0,11),e.addMany(r(28,32),11,0,11),e.addMany(i,10,0,10),e.add(127,10,0,10),e.addMany(r(28,32),10,0,10),e.addMany(r(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(r(32,48),10,9,12),e.addMany(i,12,0,12),e.add(127,12,0,12),e.addMany(r(28,32),12,0,12),e.addMany(r(32,48),12,9,12),e.addMany(r(48,64),12,0,11),e.addMany(r(64,127),12,12,13),e.addMany(r(64,127),10,12,13),e.addMany(r(64,127),9,12,13),e.addMany(i,13,13,13),e.addMany(n,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(ri,0,2,0),e.add(ri,8,5,8),e.add(ri,6,0,6),e.add(ri,11,0,11),e.add(ri,13,13,13),e})(),eW=class extends We{constructor(e=Jq){super(),this._transitions=e,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new nN,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(t,r,n)=>{},this._executeHandlerFb=t=>{},this._csiHandlerFb=(t,r)=>{},this._escHandlerFb=t=>{},this._errorHandlerFb=t=>t,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this._register(Bt(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this._register(new Gq),this._dcsParser=this._register(new Zq),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(e,t=[64,126]){let r=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if(r=e.prefix.charCodeAt(0),r&&60>r||r>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(e.intermediates){if(e.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let i=0;i<e.intermediates.length;++i){let a=e.intermediates.charCodeAt(i);if(32>a||a>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");r<<=8,r|=a}}if(e.final.length!==1)throw new Error("final must be a single byte");let n=e.final.charCodeAt(0);if(t[0]>n||n>t[1])throw new Error(`final must be in range ${t[0]} .. ${t[1]}`);return r<<=8,r|=n,r}identToString(e){let t=[];for(;e;)t.push(String.fromCharCode(e&255)),e>>=8;return t.reverse().join("")}setPrintHandler(e){this._printHandler=e}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(e,t){let r=this._identifier(e,[48,126]);this._escHandlers[r]===void 0&&(this._escHandlers[r]=[]);let n=this._escHandlers[r];return n.push(t),{dispose:()=>{let i=n.indexOf(t);i!==-1&&n.splice(i,1)}}}clearEscHandler(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]}setEscHandlerFallback(e){this._escHandlerFb=e}setExecuteHandler(e,t){this._executeHandlers[e.charCodeAt(0)]=t}clearExecuteHandler(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]}setExecuteHandlerFallback(e){this._executeHandlerFb=e}registerCsiHandler(e,t){let r=this._identifier(e);this._csiHandlers[r]===void 0&&(this._csiHandlers[r]=[]);let n=this._csiHandlers[r];return n.push(t),{dispose:()=>{let i=n.indexOf(t);i!==-1&&n.splice(i,1)}}}clearCsiHandler(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]}setCsiHandlerFallback(e){this._csiHandlerFb=e}registerDcsHandler(e,t){return this._dcsParser.registerHandler(this._identifier(e),t)}clearDcsHandler(e){this._dcsParser.clearHandler(this._identifier(e))}setDcsHandlerFallback(e){this._dcsParser.setHandlerFallback(e)}registerOscHandler(e,t){return this._oscParser.registerHandler(e,t)}clearOscHandler(e){this._oscParser.clearHandler(e)}setOscHandlerFallback(e){this._oscParser.setHandlerFallback(e)}setErrorHandler(e){this._errorHandler=e}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(e,t,r,n,i){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=r,this._parseStack.transition=n,this._parseStack.chunkPos=i}parse(e,t,r){let n=0,i=0,a=0,l;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,a=this._parseStack.chunkPos+1;else{if(r===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");let u=this._parseStack.handlers,f=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(r===!1&&f>-1){for(;f>=0&&(l=u[f](this._params),l!==!0);f--)if(l instanceof Promise)return this._parseStack.handlerPos=f,l}this._parseStack.handlers=[];break;case 4:if(r===!1&&f>-1){for(;f>=0&&(l=u[f](),l!==!0);f--)if(l instanceof Promise)return this._parseStack.handlerPos=f,l}this._parseStack.handlers=[];break;case 6:if(n=e[this._parseStack.chunkPos],l=this._dcsParser.unhook(n!==24&&n!==26,r),l)return l;n===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(n=e[this._parseStack.chunkPos],l=this._oscParser.end(n!==24&&n!==26,r),l)return l;n===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break}this._parseStack.state=0,a=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=this._parseStack.transition&15}for(let u=a;u<t;++u){switch(n=e[u],i=this._transitions.table[this.currentState<<8|(n<160?n:ri)],i>>4){case 2:for(let v=u+1;;++v){if(v>=t||(n=e[v])<32||n>126&&n<ri){this._printHandler(e,u,v),u=v-1;break}if(++v>=t||(n=e[v])<32||n>126&&n<ri){this._printHandler(e,u,v),u=v-1;break}if(++v>=t||(n=e[v])<32||n>126&&n<ri){this._printHandler(e,u,v),u=v-1;break}if(++v>=t||(n=e[v])<32||n>126&&n<ri){this._printHandler(e,u,v),u=v-1;break}}break;case 3:this._executeHandlers[n]?this._executeHandlers[n]():this._executeHandlerFb(n),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:u,code:n,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:let f=this._csiHandlers[this._collect<<8|n],h=f?f.length-1:-1;for(;h>=0&&(l=f[h](this._params),l!==!0);h--)if(l instanceof Promise)return this._preserveStack(3,f,h,i,u),l;h<0&&this._csiHandlerFb(this._collect<<8|n,this._params),this.precedingJoinState=0;break;case 8:do switch(n){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(n-48)}while(++u<t&&(n=e[u])>47&&n<60);u--;break;case 9:this._collect<<=8,this._collect|=n;break;case 10:let d=this._escHandlers[this._collect<<8|n],m=d?d.length-1:-1;for(;m>=0&&(l=d[m](),l!==!0);m--)if(l instanceof Promise)return this._preserveStack(4,d,m,i,u),l;m<0&&this._escHandlerFb(this._collect<<8|n),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|n,this._params);break;case 13:for(let v=u+1;;++v)if(v>=t||(n=e[v])===24||n===26||n===27||n>127&&n<ri){this._dcsParser.put(e,u,v),u=v-1;break}break;case 14:if(l=this._dcsParser.unhook(n!==24&&n!==26),l)return this._preserveStack(6,[],0,i,u),l;n===27&&(i|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let v=u+1;;v++)if(v>=t||(n=e[v])<32||n>127&&n<ri){this._oscParser.put(e,u,v),u=v-1;break}break;case 6:if(l=this._oscParser.end(n!==24&&n!==26),l)return this._preserveStack(5,[],0,i,u),l;n===27&&(i|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break}this.currentState=i&15}}},tW=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,rW=/^[\da-f]+$/;function j2(e){if(!e)return;let t=e.toLowerCase();if(t.indexOf("rgb:")===0){t=t.slice(4);let r=tW.exec(t);if(r){let n=r[1]?15:r[4]?255:r[7]?4095:65535;return[Math.round(parseInt(r[1]||r[4]||r[7]||r[10],16)/n*255),Math.round(parseInt(r[2]||r[5]||r[8]||r[11],16)/n*255),Math.round(parseInt(r[3]||r[6]||r[9]||r[12],16)/n*255)]}}else if(t.indexOf("#")===0&&(t=t.slice(1),rW.exec(t)&&[3,6,9,12].includes(t.length))){let r=t.length/3,n=[0,0,0];for(let i=0;i<3;++i){let a=parseInt(t.slice(r*i,r*i+r),16);n[i]=r===1?a<<4:r===2?a:r===3?a>>4:a>>8}return n}}function l_(e,t){let r=e.toString(16),n=r.length<2?"0"+r:r;switch(t){case 4:return r[0];case 8:return n;case 12:return(n+n).slice(0,3);default:return n+n}}function nW(e,t=16){let[r,n,i]=e;return`rgb:${l_(r,t)}/${l_(n,t)}/${l_(i,t)}`}var iW={"(":0,")":1,"*":2,"+":3,"-":1,".":2},vs=131072,z2=10;function H2(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}var F2=5e3,U2=0,aW=class extends We{constructor(e,t,r,n,i,a,l,u,f=new eW){super(),this._bufferService=e,this._charsetService=t,this._coreService=r,this._logService=n,this._optionsService=i,this._oscLinkService=a,this._coreMouseService=l,this._unicodeService=u,this._parser=f,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new C$,this._utf8Decoder=new E$,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=rr.clone(),this._eraseAttrDataInternal=rr.clone(),this._onRequestBell=this._register(new me),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this._register(new me),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this._register(new me),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this._register(new me),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this._register(new me),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this._register(new me),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this._register(new me),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this._register(new me),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this._register(new me),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this._register(new me),this.onLineFeed=this._onLineFeed.event,this._onScroll=this._register(new me),this.onScroll=this._onScroll.event,this._onTitleChange=this._register(new me),this.onTitleChange=this._onTitleChange.event,this._onColor=this._register(new me),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this._register(this._parser),this._dirtyRowTracker=new aS(this._bufferService),this._activeBuffer=this._bufferService.buffer,this._register(this._bufferService.buffers.onBufferActivate(h=>this._activeBuffer=h.activeBuffer)),this._parser.setCsiHandlerFallback((h,d)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(h),params:d.toArray()})}),this._parser.setEscHandlerFallback(h=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(h)})}),this._parser.setExecuteHandlerFallback(h=>{this._logService.debug("Unknown EXECUTE code: ",{code:h})}),this._parser.setOscHandlerFallback((h,d,m)=>{this._logService.debug("Unknown OSC code: ",{identifier:h,action:d,data:m})}),this._parser.setDcsHandlerFallback((h,d,m)=>{d==="HOOK"&&(m=m.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(h),action:d,payload:m})}),this._parser.setPrintHandler((h,d,m)=>this.print(h,d,m)),this._parser.registerCsiHandler({final:"@"},h=>this.insertChars(h)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},h=>this.scrollLeft(h)),this._parser.registerCsiHandler({final:"A"},h=>this.cursorUp(h)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},h=>this.scrollRight(h)),this._parser.registerCsiHandler({final:"B"},h=>this.cursorDown(h)),this._parser.registerCsiHandler({final:"C"},h=>this.cursorForward(h)),this._parser.registerCsiHandler({final:"D"},h=>this.cursorBackward(h)),this._parser.registerCsiHandler({final:"E"},h=>this.cursorNextLine(h)),this._parser.registerCsiHandler({final:"F"},h=>this.cursorPrecedingLine(h)),this._parser.registerCsiHandler({final:"G"},h=>this.cursorCharAbsolute(h)),this._parser.registerCsiHandler({final:"H"},h=>this.cursorPosition(h)),this._parser.registerCsiHandler({final:"I"},h=>this.cursorForwardTab(h)),this._parser.registerCsiHandler({final:"J"},h=>this.eraseInDisplay(h,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},h=>this.eraseInDisplay(h,!0)),this._parser.registerCsiHandler({final:"K"},h=>this.eraseInLine(h,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},h=>this.eraseInLine(h,!0)),this._parser.registerCsiHandler({final:"L"},h=>this.insertLines(h)),this._parser.registerCsiHandler({final:"M"},h=>this.deleteLines(h)),this._parser.registerCsiHandler({final:"P"},h=>this.deleteChars(h)),this._parser.registerCsiHandler({final:"S"},h=>this.scrollUp(h)),this._parser.registerCsiHandler({final:"T"},h=>this.scrollDown(h)),this._parser.registerCsiHandler({final:"X"},h=>this.eraseChars(h)),this._parser.registerCsiHandler({final:"Z"},h=>this.cursorBackwardTab(h)),this._parser.registerCsiHandler({final:"`"},h=>this.charPosAbsolute(h)),this._parser.registerCsiHandler({final:"a"},h=>this.hPositionRelative(h)),this._parser.registerCsiHandler({final:"b"},h=>this.repeatPrecedingCharacter(h)),this._parser.registerCsiHandler({final:"c"},h=>this.sendDeviceAttributesPrimary(h)),this._parser.registerCsiHandler({prefix:">",final:"c"},h=>this.sendDeviceAttributesSecondary(h)),this._parser.registerCsiHandler({final:"d"},h=>this.linePosAbsolute(h)),this._parser.registerCsiHandler({final:"e"},h=>this.vPositionRelative(h)),this._parser.registerCsiHandler({final:"f"},h=>this.hVPosition(h)),this._parser.registerCsiHandler({final:"g"},h=>this.tabClear(h)),this._parser.registerCsiHandler({final:"h"},h=>this.setMode(h)),this._parser.registerCsiHandler({prefix:"?",final:"h"},h=>this.setModePrivate(h)),this._parser.registerCsiHandler({final:"l"},h=>this.resetMode(h)),this._parser.registerCsiHandler({prefix:"?",final:"l"},h=>this.resetModePrivate(h)),this._parser.registerCsiHandler({final:"m"},h=>this.charAttributes(h)),this._parser.registerCsiHandler({final:"n"},h=>this.deviceStatus(h)),this._parser.registerCsiHandler({prefix:"?",final:"n"},h=>this.deviceStatusPrivate(h)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},h=>this.softReset(h)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},h=>this.setCursorStyle(h)),this._parser.registerCsiHandler({final:"r"},h=>this.setScrollRegion(h)),this._parser.registerCsiHandler({final:"s"},h=>this.saveCursor(h)),this._parser.registerCsiHandler({final:"t"},h=>this.windowOptions(h)),this._parser.registerCsiHandler({final:"u"},h=>this.restoreCursor(h)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},h=>this.insertColumns(h)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},h=>this.deleteColumns(h)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},h=>this.selectProtected(h)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},h=>this.requestMode(h,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},h=>this.requestMode(h,!1)),this._parser.setExecuteHandler(oe.BEL,()=>this.bell()),this._parser.setExecuteHandler(oe.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(oe.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(oe.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(oe.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(oe.BS,()=>this.backspace()),this._parser.setExecuteHandler(oe.HT,()=>this.tab()),this._parser.setExecuteHandler(oe.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(oe.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(Zd.IND,()=>this.index()),this._parser.setExecuteHandler(Zd.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(Zd.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new kn(h=>(this.setTitle(h),this.setIconName(h),!0))),this._parser.registerOscHandler(1,new kn(h=>this.setIconName(h))),this._parser.registerOscHandler(2,new kn(h=>this.setTitle(h))),this._parser.registerOscHandler(4,new kn(h=>this.setOrReportIndexedColor(h))),this._parser.registerOscHandler(8,new kn(h=>this.setHyperlink(h))),this._parser.registerOscHandler(10,new kn(h=>this.setOrReportFgColor(h))),this._parser.registerOscHandler(11,new kn(h=>this.setOrReportBgColor(h))),this._parser.registerOscHandler(12,new kn(h=>this.setOrReportCursorColor(h))),this._parser.registerOscHandler(104,new kn(h=>this.restoreIndexedColor(h))),this._parser.registerOscHandler(110,new kn(h=>this.restoreFgColor(h))),this._parser.registerOscHandler(111,new kn(h=>this.restoreBgColor(h))),this._parser.registerOscHandler(112,new kn(h=>this.restoreCursorColor(h))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(let h in fr)this._parser.registerEscHandler({intermediates:"(",final:h},()=>this.selectCharset("("+h)),this._parser.registerEscHandler({intermediates:")",final:h},()=>this.selectCharset(")"+h)),this._parser.registerEscHandler({intermediates:"*",final:h},()=>this.selectCharset("*"+h)),this._parser.registerEscHandler({intermediates:"+",final:h},()=>this.selectCharset("+"+h)),this._parser.registerEscHandler({intermediates:"-",final:h},()=>this.selectCharset("-"+h)),this._parser.registerEscHandler({intermediates:".",final:h},()=>this.selectCharset("."+h)),this._parser.registerEscHandler({intermediates:"/",final:h},()=>this.selectCharset("/"+h));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(h=>(this._logService.error("Parsing error: ",h),h)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new I2((h,d)=>this.requestStatusString(h,d)))}getAttrData(){return this._curAttrData}_preserveStack(e,t,r,n){this._parseStack.paused=!0,this._parseStack.cursorStartX=e,this._parseStack.cursorStartY=t,this._parseStack.decodedLength=r,this._parseStack.position=n}_logSlowResolvingAsync(e){this._logService.logLevel<=3&&Promise.race([e,new Promise((t,r)=>setTimeout(()=>r("#SLOW_TIMEOUT"),F2))]).catch(t=>{if(t!=="#SLOW_TIMEOUT")throw t;console.warn(`async parser handler taking longer than ${F2} ms`)})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(e,t){let r,n=this._activeBuffer.x,i=this._activeBuffer.y,a=0,l=this._parseStack.paused;if(l){if(r=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(r),r;n=this._parseStack.cursorStartX,i=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>vs&&(a=this._parseStack.position+vs)}if(this._logService.logLevel<=1&&this._logService.debug(`parsing data ${typeof e=="string"?` "${e}"`:` "${Array.prototype.map.call(e,h=>String.fromCharCode(h)).join("")}"`}`),this._logService.logLevel===0&&this._logService.trace("parsing data (codes)",typeof e=="string"?e.split("").map(h=>h.charCodeAt(0)):e),this._parseBuffer.length<e.length&&this._parseBuffer.length<vs&&(this._parseBuffer=new Uint32Array(Math.min(e.length,vs))),l||this._dirtyRowTracker.clearRange(),e.length>vs)for(let h=a;h<e.length;h+=vs){let d=h+vs<e.length?h+vs:e.length,m=typeof e=="string"?this._stringDecoder.decode(e.substring(h,d),this._parseBuffer):this._utf8Decoder.decode(e.subarray(h,d),this._parseBuffer);if(r=this._parser.parse(this._parseBuffer,m))return this._preserveStack(n,i,m,h),this._logSlowResolvingAsync(r),r}else if(!l){let h=typeof e=="string"?this._stringDecoder.decode(e,this._parseBuffer):this._utf8Decoder.decode(e,this._parseBuffer);if(r=this._parser.parse(this._parseBuffer,h))return this._preserveStack(n,i,h,0),this._logSlowResolvingAsync(r),r}(this._activeBuffer.x!==n||this._activeBuffer.y!==i)&&this._onCursorMove.fire();let u=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),f=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);f<this._bufferService.rows&&this._onRequestRefreshRows.fire({start:Math.min(f,this._bufferService.rows-1),end:Math.min(u,this._bufferService.rows-1)})}print(e,t,r){let n,i,a=this._charsetService.charset,l=this._optionsService.rawOptions.screenReaderMode,u=this._bufferService.cols,f=this._coreService.decPrivateModes.wraparound,h=this._coreService.modes.insertMode,d=this._curAttrData,m=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&r-t>0&&m.getWidth(this._activeBuffer.x-1)===2&&m.setCellFromCodepoint(this._activeBuffer.x-1,0,1,d);let v=this._parser.precedingJoinState;for(let g=t;g<r;++g){if(n=e[g],n<127&&a){let C=a[String.fromCharCode(n)];C&&(n=C.charCodeAt(0))}let S=this._unicodeService.charProperties(n,v);i=fo.extractWidth(S);let _=fo.extractShouldJoin(S),x=_?fo.extractWidth(v):0;if(v=S,l&&this._onA11yChar.fire(gs(n)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+i-x>u){if(f){let C=m,A=this._activeBuffer.x-x;for(this._activeBuffer.x=x,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),m=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),x>0&&m instanceof Kc&&m.copyCellsFrom(C,A,0,x,!1);A<u;)C.setCellFromCodepoint(A++,0,1,d)}else if(this._activeBuffer.x=u-1,i===2)continue}if(_&&this._activeBuffer.x){let C=m.getWidth(this._activeBuffer.x-1)?1:2;m.addCodepointToCell(this._activeBuffer.x-C,n,i);for(let A=i-x;--A>=0;)m.setCellFromCodepoint(this._activeBuffer.x++,0,0,d);continue}if(h&&(m.insertCells(this._activeBuffer.x,i-x,this._activeBuffer.getNullCell(d)),m.getWidth(u-1)===2&&m.setCellFromCodepoint(u-1,0,1,d)),m.setCellFromCodepoint(this._activeBuffer.x++,n,i,d),i>0)for(;--i;)m.setCellFromCodepoint(this._activeBuffer.x++,0,0,d)}this._parser.precedingJoinState=v,this._activeBuffer.x<u&&r-t>0&&m.getWidth(this._activeBuffer.x)===0&&!m.hasContent(this._activeBuffer.x)&&m.setCellFromCodepoint(this._activeBuffer.x,0,1,d),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(e,t){return e.final==="t"&&!e.prefix&&!e.intermediates?this._parser.registerCsiHandler(e,r=>H2(r.params[0],this._optionsService.rawOptions.windowOptions)?t(r):!0):this._parser.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._parser.registerDcsHandler(e,new I2(t))}registerEscHandler(e,t){return this._parser.registerEscHandler(e,t)}registerOscHandler(e,t){return this._parser.registerOscHandler(e,new kn(t))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var e;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&e.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);t.hasWidth(this._activeBuffer.x)&&!t.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let e=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-e),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(e=this._bufferService.cols-1){this._activeBuffer.x=Math.min(e,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(e,t){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=e,this._activeBuffer.y=this._activeBuffer.scrollTop+t):(this._activeBuffer.x=e,this._activeBuffer.y=t),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(e,t){this._restrictCursor(),this._setCursor(this._activeBuffer.x+e,this._activeBuffer.y+t)}cursorUp(e){let t=this._activeBuffer.y-this._activeBuffer.scrollTop;return t>=0?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1)),!0}cursorDown(e){let t=this._activeBuffer.scrollBottom-this._activeBuffer.y;return t>=0?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1),!0}cursorForward(e){return this._moveCursor(e.params[0]||1,0),!0}cursorBackward(e){return this._moveCursor(-(e.params[0]||1),0),!0}cursorNextLine(e){return this.cursorDown(e),this._activeBuffer.x=0,!0}cursorPrecedingLine(e){return this.cursorUp(e),this._activeBuffer.x=0,!0}cursorCharAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(e){return this._setCursor(e.length>=2?(e.params[1]||1)-1:0,(e.params[0]||1)-1),!0}charPosAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(e){return this._moveCursor(e.params[0]||1,0),!0}linePosAbsolute(e){return this._setCursor(this._activeBuffer.x,(e.params[0]||1)-1),!0}vPositionRelative(e){return this._moveCursor(0,e.params[0]||1),!0}hVPosition(e){return this.cursorPosition(e),!0}tabClear(e){let t=e.params[0];return t===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:t===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(e){let t=e.params[0];return t===1&&(this._curAttrData.bg|=536870912),(t===2||t===0)&&(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(e,t,r,n=!1,i=!1){let a=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);a.replaceCells(t,r,this._activeBuffer.getNullCell(this._eraseAttrData()),i),n&&(a.isWrapped=!1)}_resetBufferLine(e,t=!1){let r=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);r&&(r.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),t),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+e),r.isWrapped=!1)}eraseInDisplay(e,t=!1){var n;this._restrictCursor(this._bufferService.cols);let r;switch(e.params[0]){case 0:for(r=this._activeBuffer.y,this._dirtyRowTracker.markDirty(r),this._eraseInBufferLine(r++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);r<this._bufferService.rows;r++)this._resetBufferLine(r,t);this._dirtyRowTracker.markDirty(r);break;case 1:for(r=this._activeBuffer.y,this._dirtyRowTracker.markDirty(r),this._eraseInBufferLine(r,0,this._activeBuffer.x+1,!0,t),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(r+1).isWrapped=!1);r--;)this._resetBufferLine(r,t);this._dirtyRowTracker.markDirty(0);break;case 2:if(this._optionsService.rawOptions.scrollOnEraseInDisplay){for(r=this._bufferService.rows,this._dirtyRowTracker.markRangeDirty(0,r-1);r--&&!((n=this._activeBuffer.lines.get(this._activeBuffer.ybase+r))!=null&&n.getTrimmedLength()););for(;r>=0;r--)this._bufferService.scroll(this._eraseAttrData())}else{for(r=this._bufferService.rows,this._dirtyRowTracker.markDirty(r-1);r--;)this._resetBufferLine(r,t);this._dirtyRowTracker.markDirty(0)}break;case 3:let i=this._activeBuffer.lines.length-this._bufferService.rows;i>0&&(this._activeBuffer.lines.trimStart(i),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-i,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-i,0),this._onScroll.fire(0));break}return!0}eraseInLine(e,t=!1){switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,t);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,t);break}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let r=this._activeBuffer.ybase+this._activeBuffer.y,n=this._bufferService.rows-1-this._activeBuffer.scrollBottom,i=this._bufferService.rows-1+this._activeBuffer.ybase-n+1;for(;t--;)this._activeBuffer.lines.splice(i-1,1),this._activeBuffer.lines.splice(r,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let r=this._activeBuffer.ybase+this._activeBuffer.y,n;for(n=this._bufferService.rows-1-this._activeBuffer.scrollBottom,n=this._bufferService.rows-1+this._activeBuffer.ybase-n;t--;)this._activeBuffer.lines.splice(r,1),this._activeBuffer.lines.splice(n,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.insertCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.deleteCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(rr));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);n.deleteCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);n.insertCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);n.insertCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);n.deleteCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(e.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(e){let t=this._parser.precedingJoinState;if(!t)return!0;let r=e.params[0]||1,n=fo.extractWidth(t),i=this._activeBuffer.x-n,a=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(i),l=new Uint32Array(a.length*r),u=0;for(let h=0;h<a.length;){let d=a.codePointAt(h)||0;l[u++]=d,h+=d>65535?2:1}let f=u;for(let h=1;h<r;++h)l.copyWithin(f,0,u),f+=u;return this.print(l,0,f),!0}sendDeviceAttributesPrimary(e){return e.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(oe.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(oe.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(e){return e.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(oe.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(oe.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(e.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(oe.ESC+"[>83;40003;0c")),!0}_is(e){return(this._optionsService.rawOptions.termName+"").indexOf(e)===0}setMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0;break}return!0}setModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,oo),this._charsetService.setgCharset(1,oo),this._charsetService.setgCharset(2,oo),this._charsetService.setgCharset(3,oo);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!0;break}return!0}resetMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1;break}return!0}resetModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),e.params[t]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!1,this._onRequestRefreshRows.fire(void 0);break}return!0}requestMode(e,t){(_=>(_[_.NOT_RECOGNIZED=0]="NOT_RECOGNIZED",_[_.SET=1]="SET",_[_.RESET=2]="RESET",_[_.PERMANENTLY_SET=3]="PERMANENTLY_SET",_[_.PERMANENTLY_RESET=4]="PERMANENTLY_RESET"))(void 0||(r={}));let n=this._coreService.decPrivateModes,{activeProtocol:i,activeEncoding:a}=this._coreMouseService,l=this._coreService,{buffers:u,cols:f}=this._bufferService,{active:h,alt:d}=u,m=this._optionsService.rawOptions,v=(_,x)=>(l.triggerDataEvent(`${oe.ESC}[${t?"":"?"}${_};${x}$y`),!0),g=_=>_?1:2,S=e.params[0];return t?S===2?v(S,4):S===4?v(S,g(l.modes.insertMode)):S===12?v(S,3):S===20?v(S,g(m.convertEol)):v(S,0):S===1?v(S,g(n.applicationCursorKeys)):S===3?v(S,m.windowOptions.setWinLines?f===80?2:f===132?1:0:0):S===6?v(S,g(n.origin)):S===7?v(S,g(n.wraparound)):S===8?v(S,3):S===9?v(S,g(i==="X10")):S===12?v(S,g(m.cursorBlink)):S===25?v(S,g(!l.isCursorHidden)):S===45?v(S,g(n.reverseWraparound)):S===66?v(S,g(n.applicationKeypad)):S===67?v(S,4):S===1e3?v(S,g(i==="VT200")):S===1002?v(S,g(i==="DRAG")):S===1003?v(S,g(i==="ANY")):S===1004?v(S,g(n.sendFocus)):S===1005?v(S,4):S===1006?v(S,g(a==="SGR")):S===1015?v(S,4):S===1016?v(S,g(a==="SGR_PIXELS")):S===1048?v(S,1):S===47||S===1047||S===1049?v(S,g(h===d)):S===2004?v(S,g(n.bracketedPasteMode)):S===2026?v(S,g(n.synchronizedOutput)):v(S,0)}_updateAttrColor(e,t,r,n,i){return t===2?(e|=50331648,e&=-16777216,e|=xh.fromColorRGB([r,n,i])):t===5&&(e&=-50331904,e|=33554432|r&255),e}_extractColor(e,t,r){let n=[0,0,-1,0,0,0],i=0,a=0;do{if(n[a+i]=e.params[t+a],e.hasSubParams(t+a)){let l=e.getSubParams(t+a),u=0;do n[1]===5&&(i=1),n[a+u+1+i]=l[u];while(++u<l.length&&u+a+1+i<n.length);break}if(n[1]===5&&a+i>=2||n[1]===2&&a+i>=5)break;n[1]&&(i=1)}while(++a+t<e.length&&a+i<n.length);for(let l=2;l<n.length;++l)n[l]===-1&&(n[l]=0);switch(n[0]){case 38:r.fg=this._updateAttrColor(r.fg,n[1],n[3],n[4],n[5]);break;case 48:r.bg=this._updateAttrColor(r.bg,n[1],n[3],n[4],n[5]);break;case 58:r.extended=r.extended.clone(),r.extended.underlineColor=this._updateAttrColor(r.extended.underlineColor,n[1],n[3],n[4],n[5])}return a}_processUnderline(e,t){t.extended=t.extended.clone(),(!~e||e>5)&&(e=1),t.extended.underlineStyle=e,t.fg|=268435456,e===0&&(t.fg&=-268435457),t.updateExtended()}_processSGR0(e){e.fg=rr.fg,e.bg=rr.bg,e.extended=e.extended.clone(),e.extended.underlineStyle=0,e.extended.underlineColor&=-67108864,e.updateExtended()}charAttributes(e){if(e.length===1&&e.params[0]===0)return this._processSGR0(this._curAttrData),!0;let t=e.length,r,n=this._curAttrData;for(let i=0;i<t;i++)r=e.params[i],r>=30&&r<=37?(n.fg&=-50331904,n.fg|=16777216|r-30):r>=40&&r<=47?(n.bg&=-50331904,n.bg|=16777216|r-40):r>=90&&r<=97?(n.fg&=-50331904,n.fg|=16777216|r-90|8):r>=100&&r<=107?(n.bg&=-50331904,n.bg|=16777216|r-100|8):r===0?this._processSGR0(n):r===1?n.fg|=134217728:r===3?n.bg|=67108864:r===4?(n.fg|=268435456,this._processUnderline(e.hasSubParams(i)?e.getSubParams(i)[0]:1,n)):r===5?n.fg|=536870912:r===7?n.fg|=67108864:r===8?n.fg|=1073741824:r===9?n.fg|=2147483648:r===2?n.bg|=134217728:r===21?this._processUnderline(2,n):r===22?(n.fg&=-134217729,n.bg&=-134217729):r===23?n.bg&=-67108865:r===24?(n.fg&=-268435457,this._processUnderline(0,n)):r===25?n.fg&=-536870913:r===27?n.fg&=-67108865:r===28?n.fg&=-1073741825:r===29?n.fg&=2147483647:r===39?(n.fg&=-67108864,n.fg|=rr.fg&16777215):r===49?(n.bg&=-67108864,n.bg|=rr.bg&16777215):r===38||r===48||r===58?i+=this._extractColor(e,i,n):r===53?n.bg|=1073741824:r===55?n.bg&=-1073741825:r===59?(n.extended=n.extended.clone(),n.extended.underlineColor=-1,n.updateExtended()):r===100?(n.fg&=-67108864,n.fg|=rr.fg&16777215,n.bg&=-67108864,n.bg|=rr.bg&16777215):this._logService.debug("Unknown SGR attribute: %d.",r);return!0}deviceStatus(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent(`${oe.ESC}[0n`);break;case 6:let t=this._activeBuffer.y+1,r=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${oe.ESC}[${t};${r}R`);break}return!0}deviceStatusPrivate(e){switch(e.params[0]){case 6:let t=this._activeBuffer.y+1,r=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${oe.ESC}[?${t};${r}R`);break}return!0}softReset(e){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=rr.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(e){let t=e.length===0?1:e.params[0];if(t===0)this._coreService.decPrivateModes.cursorStyle=void 0,this._coreService.decPrivateModes.cursorBlink=void 0;else{switch(t){case 1:case 2:this._coreService.decPrivateModes.cursorStyle="block";break;case 3:case 4:this._coreService.decPrivateModes.cursorStyle="underline";break;case 5:case 6:this._coreService.decPrivateModes.cursorStyle="bar";break}let r=t%2===1;this._coreService.decPrivateModes.cursorBlink=r}return!0}setScrollRegion(e){let t=e.params[0]||1,r;return(e.length<2||(r=e.params[1])>this._bufferService.rows||r===0)&&(r=this._bufferService.rows),r>t&&(this._activeBuffer.scrollTop=t-1,this._activeBuffer.scrollBottom=r-1,this._setCursor(0,0)),!0}windowOptions(e){if(!H2(e.params[0],this._optionsService.rawOptions.windowOptions))return!0;let t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:t!==2&&this._onRequestWindowsOptionsReport.fire(0);break;case 16:this._onRequestWindowsOptionsReport.fire(1);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${oe.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:(t===0||t===2)&&(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>z2&&this._windowTitleStack.shift()),(t===0||t===1)&&(this._iconNameStack.push(this._iconName),this._iconNameStack.length>z2&&this._iconNameStack.shift());break;case 23:(t===0||t===2)&&this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),(t===0||t===1)&&this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop());break}return!0}saveCursor(e){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(e){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(e){return this._windowTitle=e,this._onTitleChange.fire(e),!0}setIconName(e){return this._iconName=e,!0}setOrReportIndexedColor(e){let t=[],r=e.split(";");for(;r.length>1;){let n=r.shift(),i=r.shift();if(/^\d+$/.exec(n)){let a=parseInt(n);if($2(a))if(i==="?")t.push({type:0,index:a});else{let l=j2(i);l&&t.push({type:1,index:a,color:l})}}}return t.length&&this._onColor.fire(t),!0}setHyperlink(e){let t=e.indexOf(";");if(t===-1)return!0;let r=e.slice(0,t).trim(),n=e.slice(t+1);return n?this._createHyperlink(r,n):r.trim()?!1:this._finishHyperlink()}_createHyperlink(e,t){this._getCurrentLinkId()&&this._finishHyperlink();let r=e.split(":"),n,i=r.findIndex(a=>a.startsWith("id="));return i!==-1&&(n=r[i].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:n,uri:t}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(e,t){let r=e.split(";");for(let n=0;n<r.length&&!(t>=this._specialColors.length);++n,++t)if(r[n]==="?")this._onColor.fire([{type:0,index:this._specialColors[t]}]);else{let i=j2(r[n]);i&&this._onColor.fire([{type:1,index:this._specialColors[t],color:i}])}return!0}setOrReportFgColor(e){return this._setOrReportSpecialColor(e,0)}setOrReportBgColor(e){return this._setOrReportSpecialColor(e,1)}setOrReportCursorColor(e){return this._setOrReportSpecialColor(e,2)}restoreIndexedColor(e){if(!e)return this._onColor.fire([{type:2}]),!0;let t=[],r=e.split(";");for(let n=0;n<r.length;++n)if(/^\d+$/.exec(r[n])){let i=parseInt(r[n]);$2(i)&&t.push({type:2,index:i})}return t.length&&this._onColor.fire(t),!0}restoreFgColor(e){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(e){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(e){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,oo),!0}selectCharset(e){return e.length!==2?(this.selectDefaultCharset(),!0):(e[0]==="/"||this._charsetService.setgCharset(iW[e[0]],fr[e[1]]||oo),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){let e=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,e,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=rr.clone(),this._eraseAttrDataInternal=rr.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=this._curAttrData.bg&67108863,this._eraseAttrDataInternal}setgLevel(e){return this._charsetService.setgLevel(e),!0}screenAlignmentPattern(){let e=new oi;e.content=1<<22|69,e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg,this._setCursor(0,0);for(let t=0;t<this._bufferService.rows;++t){let r=this._activeBuffer.ybase+this._activeBuffer.y+t,n=this._activeBuffer.lines.get(r);n&&(n.fill(e),n.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(e,t){let r=l=>(this._coreService.triggerDataEvent(`${oe.ESC}${l}${oe.ESC}\\`),!0),n=this._bufferService.buffer,i=this._optionsService.rawOptions;return r(e==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:e==='"p'?'P1$r61;1"p':e==="r"?`P1$r${n.scrollTop+1};${n.scrollBottom+1}r`:e==="m"?"P1$r0m":e===" q"?`P1$r${{block:2,underline:4,bar:6}[i.cursorStyle]-(i.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(e,t){this._dirtyRowTracker.markRangeDirty(e,t)}},aS=class{constructor(e){this._bufferService=e,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(e){e<this.start?this.start=e:e>this.end&&(this.end=e)}markRangeDirty(e,t){e>t&&(U2=e,e=t,t=U2),e<this.start&&(this.start=e),t>this.end&&(this.end=t)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};aS=Ut([ge(0,tn)],aS);function $2(e){return 0<=e&&e<256}var sW=5e7,K2=12,oW=50,lW=class extends We{constructor(e){super(),this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this._register(new me),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(e,t){if(t!==void 0&&this._syncCalls>t){this._syncCalls=0;return}if(this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;this._isSyncWriting=!0;let r;for(;r=this._writeBuffer.shift();){this._action(r);let n=this._callbacks.shift();n&&n()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(e,t){if(this._pendingData>sW)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput){this._didUserInput=!1,this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t),this._innerWrite();return}setTimeout(()=>this._innerWrite())}this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)}_innerWrite(e=0,t=!0){let r=e||performance.now();for(;this._writeBuffer.length>this._bufferOffset;){let n=this._writeBuffer[this._bufferOffset],i=this._action(n,t);if(i){let l=u=>performance.now()-r>=K2?setTimeout(()=>this._innerWrite(0,u)):this._innerWrite(r,u);i.catch(u=>(queueMicrotask(()=>{throw u}),Promise.resolve(!1))).then(l);return}let a=this._callbacks[this._bufferOffset];if(a&&a(),this._bufferOffset++,this._pendingData-=n.length,performance.now()-r>=K2)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>oW&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}},sS=class{constructor(e){this._bufferService=e,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(e){let t=this._bufferService.buffer;if(e.id===void 0){let u=t.addMarker(t.ybase+t.y),f={data:e,id:this._nextId++,lines:[u]};return u.onDispose(()=>this._removeMarkerFromLink(f,u)),this._dataByLinkId.set(f.id,f),f.id}let r=e,n=this._getEntryIdKey(r),i=this._entriesWithId.get(n);if(i)return this.addLineToLink(i.id,t.ybase+t.y),i.id;let a=t.addMarker(t.ybase+t.y),l={id:this._nextId++,key:this._getEntryIdKey(r),data:r,lines:[a]};return a.onDispose(()=>this._removeMarkerFromLink(l,a)),this._entriesWithId.set(l.key,l),this._dataByLinkId.set(l.id,l),l.id}addLineToLink(e,t){let r=this._dataByLinkId.get(e);if(r&&r.lines.every(n=>n.line!==t)){let n=this._bufferService.buffer.addMarker(t);r.lines.push(n),n.onDispose(()=>this._removeMarkerFromLink(r,n))}}getLinkData(e){var t;return(t=this._dataByLinkId.get(e))==null?void 0:t.data}_getEntryIdKey(e){return`${e.id};;${e.uri}`}_removeMarkerFromLink(e,t){let r=e.lines.indexOf(t);r!==-1&&(e.lines.splice(r,1),e.lines.length===0&&(e.data.id!==void 0&&this._entriesWithId.delete(e.key),this._dataByLinkId.delete(e.id)))}};sS=Ut([ge(0,tn)],sS);var q2=!1,uW=class extends We{constructor(e){super(),this._windowsWrappingHeuristics=this._register(new $l),this._onBinary=this._register(new me),this.onBinary=this._onBinary.event,this._onData=this._register(new me),this.onData=this._onData.event,this._onLineFeed=this._register(new me),this.onLineFeed=this._onLineFeed.event,this._onResize=this._register(new me),this.onResize=this._onResize.event,this._onWriteParsed=this._register(new me),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this._register(new me),this._instantiationService=new Rq,this.optionsService=this._register(new $q(e)),this._instantiationService.setService(rn,this.optionsService),this._bufferService=this._register(this._instantiationService.createInstance(tS)),this._instantiationService.setService(tn,this._bufferService),this._logService=this._register(this._instantiationService.createInstance(eS)),this._instantiationService.setService(wB,this._logService),this.coreService=this._register(this._instantiationService.createInstance(rS)),this._instantiationService.setService(Bo,this.coreService),this.coreMouseService=this._register(this._instantiationService.createInstance(nS)),this._instantiationService.setService(SB,this.coreMouseService),this.unicodeService=this._register(this._instantiationService.createInstance(fo)),this._instantiationService.setService(P$,this.unicodeService),this._charsetService=this._instantiationService.createInstance(Yq),this._instantiationService.setService(k$,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(sS),this._instantiationService.setService(xB,this._oscLinkService),this._inputHandler=this._register(new aW(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this._register(Ir.forward(this._inputHandler.onLineFeed,this._onLineFeed)),this._register(this._inputHandler),this._register(Ir.forward(this._bufferService.onResize,this._onResize)),this._register(Ir.forward(this.coreService.onData,this._onData)),this._register(Ir.forward(this.coreService.onBinary,this._onBinary)),this._register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom(!0))),this._register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this._register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this._register(this._bufferService.onScroll(()=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this._register(new lW((t,r)=>this._inputHandler.parse(t,r))),this._register(Ir.forward(this._writeBuffer.onWriteParsed,this._onWriteParsed))}get onScroll(){return this._onScrollApi||(this._onScrollApi=this._register(new me),this._onScroll.event(e=>{var t;(t=this._onScrollApi)==null||t.fire(e.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(e){for(let t in e)this.optionsService.options[t]=e[t]}write(e,t){this._writeBuffer.write(e,t)}writeSync(e,t){this._logService.logLevel<=3&&!q2&&(this._logService.warn("writeSync is unreliable and will be removed soon."),q2=!0),this._writeBuffer.writeSync(e,t)}input(e,t=!0){this.coreService.triggerDataEvent(e,t)}resize(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,tN),t=Math.max(t,rN),this._bufferService.resize(e,t))}scroll(e,t=!1){this._bufferService.scroll(e,t)}scrollLines(e,t){this._bufferService.scrollLines(e,t)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}registerEscHandler(e,t){return this._inputHandler.registerEscHandler(e,t)}registerDcsHandler(e,t){return this._inputHandler.registerDcsHandler(e,t)}registerCsiHandler(e,t){return this._inputHandler.registerCsiHandler(e,t)}registerOscHandler(e,t){return this._inputHandler.registerOscHandler(e,t)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let e=!1,t=this.optionsService.rawOptions.windowsPty;t&&t.buildNumber!==void 0&&t.buildNumber!==void 0?e=t.backend==="conpty"&&t.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(e=!0),e?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let e=[];e.push(this.onLineFeed(N2.bind(null,this._bufferService))),e.push(this.registerCsiHandler({final:"H"},()=>(N2(this._bufferService),!1))),this._windowsWrappingHeuristics.value=Bt(()=>{for(let t of e)t.dispose()})}}},cW={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};function hW(e,t,r,n){var l;let i={type:0,cancel:!1,key:void 0},a=(e.shiftKey?1:0)|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:e.key==="UIKeyInputUpArrow"?t?i.key=oe.ESC+"OA":i.key=oe.ESC+"[A":e.key==="UIKeyInputLeftArrow"?t?i.key=oe.ESC+"OD":i.key=oe.ESC+"[D":e.key==="UIKeyInputRightArrow"?t?i.key=oe.ESC+"OC":i.key=oe.ESC+"[C":e.key==="UIKeyInputDownArrow"&&(t?i.key=oe.ESC+"OB":i.key=oe.ESC+"[B");break;case 8:i.key=e.ctrlKey?"\b":oe.DEL,e.altKey&&(i.key=oe.ESC+i.key);break;case 9:if(e.shiftKey){i.key=oe.ESC+"[Z";break}i.key=oe.HT,i.cancel=!0;break;case 13:i.key=e.altKey?oe.ESC+oe.CR:oe.CR,i.cancel=!0;break;case 27:i.key=oe.ESC,e.altKey&&(i.key=oe.ESC+oe.ESC),i.cancel=!0;break;case 37:if(e.metaKey)break;a?i.key=oe.ESC+"[1;"+(a+1)+"D":t?i.key=oe.ESC+"OD":i.key=oe.ESC+"[D";break;case 39:if(e.metaKey)break;a?i.key=oe.ESC+"[1;"+(a+1)+"C":t?i.key=oe.ESC+"OC":i.key=oe.ESC+"[C";break;case 38:if(e.metaKey)break;a?i.key=oe.ESC+"[1;"+(a+1)+"A":t?i.key=oe.ESC+"OA":i.key=oe.ESC+"[A";break;case 40:if(e.metaKey)break;a?i.key=oe.ESC+"[1;"+(a+1)+"B":t?i.key=oe.ESC+"OB":i.key=oe.ESC+"[B";break;case 45:!e.shiftKey&&!e.ctrlKey&&(i.key=oe.ESC+"[2~");break;case 46:a?i.key=oe.ESC+"[3;"+(a+1)+"~":i.key=oe.ESC+"[3~";break;case 36:a?i.key=oe.ESC+"[1;"+(a+1)+"H":t?i.key=oe.ESC+"OH":i.key=oe.ESC+"[H";break;case 35:a?i.key=oe.ESC+"[1;"+(a+1)+"F":t?i.key=oe.ESC+"OF":i.key=oe.ESC+"[F";break;case 33:e.shiftKey?i.type=2:e.ctrlKey?i.key=oe.ESC+"[5;"+(a+1)+"~":i.key=oe.ESC+"[5~";break;case 34:e.shiftKey?i.type=3:e.ctrlKey?i.key=oe.ESC+"[6;"+(a+1)+"~":i.key=oe.ESC+"[6~";break;case 112:a?i.key=oe.ESC+"[1;"+(a+1)+"P":i.key=oe.ESC+"OP";break;case 113:a?i.key=oe.ESC+"[1;"+(a+1)+"Q":i.key=oe.ESC+"OQ";break;case 114:a?i.key=oe.ESC+"[1;"+(a+1)+"R":i.key=oe.ESC+"OR";break;case 115:a?i.key=oe.ESC+"[1;"+(a+1)+"S":i.key=oe.ESC+"OS";break;case 116:a?i.key=oe.ESC+"[15;"+(a+1)+"~":i.key=oe.ESC+"[15~";break;case 117:a?i.key=oe.ESC+"[17;"+(a+1)+"~":i.key=oe.ESC+"[17~";break;case 118:a?i.key=oe.ESC+"[18;"+(a+1)+"~":i.key=oe.ESC+"[18~";break;case 119:a?i.key=oe.ESC+"[19;"+(a+1)+"~":i.key=oe.ESC+"[19~";break;case 120:a?i.key=oe.ESC+"[20;"+(a+1)+"~":i.key=oe.ESC+"[20~";break;case 121:a?i.key=oe.ESC+"[21;"+(a+1)+"~":i.key=oe.ESC+"[21~";break;case 122:a?i.key=oe.ESC+"[23;"+(a+1)+"~":i.key=oe.ESC+"[23~";break;case 123:a?i.key=oe.ESC+"[24;"+(a+1)+"~":i.key=oe.ESC+"[24~";break;default:if(e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey)e.keyCode>=65&&e.keyCode<=90?i.key=String.fromCharCode(e.keyCode-64):e.keyCode===32?i.key=oe.NUL:e.keyCode>=51&&e.keyCode<=55?i.key=String.fromCharCode(e.keyCode-51+27):e.keyCode===56?i.key=oe.DEL:e.keyCode===219?i.key=oe.ESC:e.keyCode===220?i.key=oe.FS:e.keyCode===221&&(i.key=oe.GS);else if((!r||n)&&e.altKey&&!e.metaKey){let u=(l=cW[e.keyCode])==null?void 0:l[e.shiftKey?1:0];if(u)i.key=oe.ESC+u;else if(e.keyCode>=65&&e.keyCode<=90){let f=e.ctrlKey?e.keyCode-64:e.keyCode+32,h=String.fromCharCode(f);e.shiftKey&&(h=h.toUpperCase()),i.key=oe.ESC+h}else if(e.keyCode===32)i.key=oe.ESC+(e.ctrlKey?oe.NUL:" ");else if(e.key==="Dead"&&e.code.startsWith("Key")){let f=e.code.slice(3,4);e.shiftKey||(f=f.toLowerCase()),i.key=oe.ESC+f,i.cancel=!0}}else r&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.metaKey?e.keyCode===65&&(i.type=1):e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&e.key.length===1?i.key=e.key:e.key&&e.ctrlKey&&(e.key==="_"&&(i.key=oe.US),e.key==="@"&&(i.key=oe.NUL));break}return i}var qt=0,fW=class{constructor(e){this._getKey=e,this._array=[],this._insertedValues=[],this._flushInsertedTask=new pp,this._isFlushingInserted=!1,this._deletedIndices=[],this._flushDeletedTask=new pp,this._isFlushingDeleted=!1}clear(){this._array.length=0,this._insertedValues.length=0,this._flushInsertedTask.clear(),this._isFlushingInserted=!1,this._deletedIndices.length=0,this._flushDeletedTask.clear(),this._isFlushingDeleted=!1}insert(e){this._flushCleanupDeleted(),this._insertedValues.length===0&&this._flushInsertedTask.enqueue(()=>this._flushInserted()),this._insertedValues.push(e)}_flushInserted(){let e=this._insertedValues.sort((i,a)=>this._getKey(i)-this._getKey(a)),t=0,r=0,n=new Array(this._array.length+this._insertedValues.length);for(let i=0;i<n.length;i++)r>=this._array.length||this._getKey(e[t])<=this._getKey(this._array[r])?(n[i]=e[t],t++):n[i]=this._array[r++];this._array=n,this._insertedValues.length=0}_flushCleanupInserted(){!this._isFlushingInserted&&this._insertedValues.length>0&&this._flushInsertedTask.flush()}delete(e){if(this._flushCleanupInserted(),this._array.length===0)return!1;let t=this._getKey(e);if(t===void 0||(qt=this._search(t),qt===-1)||this._getKey(this._array[qt])!==t)return!1;do if(this._array[qt]===e)return this._deletedIndices.length===0&&this._flushDeletedTask.enqueue(()=>this._flushDeleted()),this._deletedIndices.push(qt),!0;while(++qt<this._array.length&&this._getKey(this._array[qt])===t);return!1}_flushDeleted(){this._isFlushingDeleted=!0;let e=this._deletedIndices.sort((i,a)=>i-a),t=0,r=new Array(this._array.length-e.length),n=0;for(let i=0;i<this._array.length;i++)e[t]===i?t++:r[n++]=this._array[i];this._array=r,this._deletedIndices.length=0,this._isFlushingDeleted=!1}_flushCleanupDeleted(){!this._isFlushingDeleted&&this._deletedIndices.length>0&&this._flushDeletedTask.flush()}*getKeyIterator(e){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(qt=this._search(e),!(qt<0||qt>=this._array.length)&&this._getKey(this._array[qt])===e))do yield this._array[qt];while(++qt<this._array.length&&this._getKey(this._array[qt])===e)}forEachByKey(e,t){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(qt=this._search(e),!(qt<0||qt>=this._array.length)&&this._getKey(this._array[qt])===e))do t(this._array[qt]);while(++qt<this._array.length&&this._getKey(this._array[qt])===e)}values(){return this._flushCleanupInserted(),this._flushCleanupDeleted(),[...this._array].values()}_search(e){let t=0,r=this._array.length-1;for(;r>=t;){let n=t+r>>1,i=this._getKey(this._array[n]);if(i>e)r=n-1;else if(i<e)t=n+1;else{for(;n>0&&this._getKey(this._array[n-1])===e;)n--;return n}}return t}},u_=0,W2=0,dW=class extends We{constructor(){super(),this._decorations=new fW(e=>e==null?void 0:e.marker.line),this._onDecorationRegistered=this._register(new me),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this._register(new me),this.onDecorationRemoved=this._onDecorationRemoved.event,this._register(Bt(()=>this.reset()))}get decorations(){return this._decorations.values()}registerDecoration(e){if(e.marker.isDisposed)return;let t=new pW(e);if(t){let r=t.marker.onDispose(()=>t.dispose()),n=t.onDispose(()=>{n.dispose(),t&&(this._decorations.delete(t)&&this._onDecorationRemoved.fire(t),r.dispose())});this._decorations.insert(t),this._onDecorationRegistered.fire(t)}return t}reset(){for(let e of this._decorations.values())e.dispose();this._decorations.clear()}*getDecorationsAtCell(e,t,r){let n=0,i=0;for(let a of this._decorations.getKeyIterator(t))n=a.options.x??0,i=n+(a.options.width??1),e>=n&&e<i&&(!r||(a.options.layer??"bottom")===r)&&(yield a)}forEachDecorationAtCell(e,t,r,n){this._decorations.forEachByKey(t,i=>{u_=i.options.x??0,W2=u_+(i.options.width??1),e>=u_&&e<W2&&(!r||(i.options.layer??"bottom")===r)&&n(i)})}},pW=class extends xs{constructor(e){super(),this.options=e,this.onRenderEmitter=this.add(new me),this.onRender=this.onRenderEmitter.event,this._onDispose=this.add(new me),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=e.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=It.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=It.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}dispose(){this._onDispose.fire(),super.dispose()}},mW=1e3,vW=class{constructor(e,t=mW){this._renderCallback=e,this._debounceThresholdMS=t,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(e,t,r){this._rowCount=r,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t;let n=performance.now();if(n-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=n,this._innerRefresh();else if(!this._additionalRefreshRequested){let i=n-this._lastRefreshMs,a=this._debounceThresholdMS-i;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=performance.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},a)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}},V2=20,mp=class extends We{constructor(e,t,r,n){super(),this._terminal=e,this._coreBrowserService=r,this._renderService=n,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="";let i=this._coreBrowserService.mainDocument;this._accessibilityContainer=i.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=i.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let a=0;a<this._terminal.rows;a++)this._rowElements[a]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[a]);if(this._topBoundaryFocusListener=a=>this._handleBoundaryFocus(a,0),this._bottomBoundaryFocusListener=a=>this._handleBoundaryFocus(a,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=i.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this._register(new vW(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this._register(this._terminal.onResize(a=>this._handleResize(a.rows))),this._register(this._terminal.onRender(a=>this._refreshRows(a.start,a.end))),this._register(this._terminal.onScroll(()=>this._refreshRows())),this._register(this._terminal.onA11yChar(a=>this._handleChar(a))),this._register(this._terminal.onLineFeed(()=>this._handleChar(`
`))),this._register(this._terminal.onA11yTab(a=>this._handleTab(a))),this._register(this._terminal.onKey(a=>this._handleKey(a.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(Le(i,"selectionchange",()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(Bt(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<V2+1&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===V2+1&&(this._liveRegion.textContent+=A0.get())))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let r=this._terminal.buffer,n=r.lines.length.toString();for(let i=e;i<=t;i++){let a=r.lines.get(r.ydisp+i),l=[],u=(a==null?void 0:a.translateToString(!0,void 0,void 0,l))||"",f=(r.ydisp+i+1).toString(),h=this._rowElements[i];h&&(u.length===0?(h.textContent=" ",this._rowColumns.set(h,[0,1])):(h.textContent=u,this._rowColumns.set(h,l)),h.setAttribute("aria-posinset",f),h.setAttribute("aria-setsize",n),this._alignRowWidth(h))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,t){let r=e.target,n=this._rowElements[t===0?1:this._rowElements.length-2],i=r.getAttribute("aria-posinset"),a=t===0?"1":`${this._terminal.buffer.lines.length}`;if(i===a||e.relatedTarget!==n)return;let l,u;if(t===0?(l=r,u=this._rowElements.pop(),this._rowContainer.removeChild(u)):(l=this._rowElements.shift(),u=r,this._rowContainer.removeChild(l)),l.removeEventListener("focus",this._topBoundaryFocusListener),u.removeEventListener("focus",this._bottomBoundaryFocusListener),t===0){let f=this._createAccessibilityTreeNode();this._rowElements.unshift(f),this._rowContainer.insertAdjacentElement("afterbegin",f)}else{let f=this._createAccessibilityTreeNode();this._rowElements.push(f),this._rowContainer.appendChild(f)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){var u;if(this._rowElements.length===0)return;let e=this._coreBrowserService.mainDocument.getSelection();if(!e)return;if(e.isCollapsed){this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection();return}if(!e.anchorNode||!e.focusNode){console.error("anchorNode and/or focusNode are null");return}let t={node:e.anchorNode,offset:e.anchorOffset},r={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(r.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===r.node&&t.offset>r.offset)&&([t,r]=[r,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let n=this._rowElements.slice(-1)[0];if(r.node.compareDocumentPosition(n)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(r={node:n,offset:((u=n.textContent)==null?void 0:u.length)??0}),!this._rowContainer.contains(r.node))return;let i=({node:f,offset:h})=>{let d=f instanceof Text?f.parentNode:f,m=parseInt(d==null?void 0:d.getAttribute("aria-posinset"),10)-1;if(isNaN(m))return console.warn("row is invalid. Race condition?"),null;let v=this._rowColumns.get(d);if(!v)return console.warn("columns is null. Race condition?"),null;let g=h<v.length?v[h]:v.slice(-1)[0]+1;return g>=this._terminal.cols&&(++m,g=0),{row:m,column:g}},a=i(t),l=i(r);if(!(!a||!l)){if(a.row>l.row||a.row===l.row&&a.column>=l.column)throw new Error("invalid range");this._terminal.select(a.column,a.row,(l.row-a.row)*this._terminal.cols-a.column+l.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e]),this._alignRowWidth(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}_alignRowWidth(e){var i,a;e.style.transform="";let t=e.getBoundingClientRect().width,r=(a=(i=this._rowColumns.get(e))==null?void 0:i.slice(-1))==null?void 0:a[0];if(!r)return;let n=r*this._renderService.dimensions.css.cell.width;e.style.transform=`scaleX(${n/t})`}};mp=Ut([ge(1,Aw),ge(2,ka),ge(3,Pa)],mp);var oS=class extends We{constructor(e,t,r,n,i){super(),this._element=e,this._mouseService=t,this._renderService=r,this._bufferService=n,this._linkProviderService=i,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this._register(new me),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this._register(new me),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this._register(Bt(()=>{var a;Eo(this._linkCacheDisposables),this._linkCacheDisposables.length=0,this._lastMouseEvent=void 0,(a=this._activeProviderReplies)==null||a.clear()})),this._register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this._register(Le(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this._register(Le(this._element,"mousemove",this._handleMouseMove.bind(this))),this._register(Le(this._element,"mousedown",this._handleMouseDown.bind(this))),this._register(Le(this._element,"mouseup",this._handleMouseUp.bind(this)))}get currentLink(){return this._currentLink}_handleMouseMove(e){this._lastMouseEvent=e;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!t)return;this._isMouseOut=!1;let r=e.composedPath();for(let n=0;n<r.length;n++){let i=r[n];if(i.classList.contains("xterm"))break;if(i.classList.contains("xterm-hover"))return}(!this._lastBufferCell||t.x!==this._lastBufferCell.x||t.y!==this._lastBufferCell.y)&&(this._handleHover(t),this._lastBufferCell=t)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized){this._clearCurrentLink(),this._askForLink(e,!1),this._wasResized=!1;return}this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,t){var n,i;(!this._activeProviderReplies||!t)&&((n=this._activeProviderReplies)==null||n.forEach(a=>{a==null||a.forEach(l=>{l.link.dispose&&l.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let r=!1;for(let[a,l]of this._linkProviderService.linkProviders.entries())t?(i=this._activeProviderReplies)!=null&&i.get(a)&&(r=this._checkLinkProviderResult(a,e,r)):l.provideLinks(e.y,u=>{var h,d;if(this._isMouseOut)return;let f=u==null?void 0:u.map(m=>({link:m}));(h=this._activeProviderReplies)==null||h.set(a,f),r=this._checkLinkProviderResult(a,e,r),((d=this._activeProviderReplies)==null?void 0:d.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,t){let r=new Set;for(let n=0;n<t.size;n++){let i=t.get(n);if(i)for(let a=0;a<i.length;a++){let l=i[a],u=l.link.range.start.y<e?0:l.link.range.start.x,f=l.link.range.end.y>e?this._bufferService.cols:l.link.range.end.x;for(let h=u;h<=f;h++){if(r.has(h)){i.splice(a--,1);break}r.add(h)}}}}_checkLinkProviderResult(e,t,r){var a;if(!this._activeProviderReplies)return r;let n=this._activeProviderReplies.get(e),i=!1;for(let l=0;l<e;l++)(!this._activeProviderReplies.has(l)||this._activeProviderReplies.get(l))&&(i=!0);if(!i&&n){let l=n.find(u=>this._linkAtPosition(u.link,t));l&&(r=!0,this._handleNewLink(l))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!r)for(let l=0;l<this._activeProviderReplies.size;l++){let u=(a=this._activeProviderReplies.get(l))==null?void 0:a.find(f=>this._linkAtPosition(f.link,t));if(u){r=!0,this._handleNewLink(u);break}}return r}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._currentLink)return;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink&&gW(this._mouseDownLink.link,this._currentLink.link)&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){!this._currentLink||!this._lastMouseEvent||(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,Eo(this._linkCacheDisposables),this._linkCacheDisposables.length=0)}_handleNewLink(e){if(!this._lastMouseEvent)return;let t=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0?!0:e.link.decorations.underline,pointerCursor:e.link.decorations===void 0?!0:e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>{var r,n;return(n=(r=this._currentLink)==null?void 0:r.state)==null?void 0:n.decorations.pointerCursor},set:r=>{var n;(n=this._currentLink)!=null&&n.state&&this._currentLink.state.decorations.pointerCursor!==r&&(this._currentLink.state.decorations.pointerCursor=r,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",r))}},underline:{get:()=>{var r,n;return(n=(r=this._currentLink)==null?void 0:r.state)==null?void 0:n.decorations.underline},set:r=>{var n,i,a;(n=this._currentLink)!=null&&n.state&&((a=(i=this._currentLink)==null?void 0:i.state)==null?void 0:a.decorations.underline)!==r&&(this._currentLink.state.decorations.underline=r,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,r))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(r=>{if(!this._currentLink)return;let n=r.start===0?0:r.start+1+this._bufferService.buffer.ydisp,i=this._bufferService.buffer.ydisp+1+r.end;if(this._currentLink.link.range.start.y>=n&&this._currentLink.link.range.end.y<=i&&(this._clearCurrentLink(n,i),this._lastMouseEvent)){let a=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);a&&this._askForLink(a,!1)}})))}_linkHover(e,t,r){var n;(n=this._currentLink)!=null&&n.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),t.hover&&t.hover(r,t.text)}_fireUnderlineEvent(e,t){let r=e.range,n=this._bufferService.buffer.ydisp,i=this._createLinkUnderlineEvent(r.start.x-1,r.start.y-n-1,r.end.x,r.end.y-n-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(i)}_linkLeave(e,t,r){var n;(n=this._currentLink)!=null&&n.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),t.leave&&t.leave(r,t.text)}_linkAtPosition(e,t){let r=e.range.start.y*this._bufferService.cols+e.range.start.x,n=e.range.end.y*this._bufferService.cols+e.range.end.x,i=t.y*this._bufferService.cols+t.x;return r<=i&&i<=n}_positionFromMouseEvent(e,t,r){let n=r.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(n)return{x:n[0],y:n[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,r,n,i){return{x1:e,y1:t,x2:r,y2:n,cols:this._bufferService.cols,fg:i}}};oS=Ut([ge(1,Ow),ge(2,Pa),ge(3,tn),ge(4,EB)],oS);function gW(e,t){return e.text===t.text&&e.range.start.x===t.range.start.x&&e.range.start.y===t.range.start.y&&e.range.end.x===t.range.end.x&&e.range.end.y===t.range.end.y}var yW=class extends uW{constructor(e={}){super(e),this._linkifier=this._register(new $l),this.browser=KB,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this._register(new $l),this._onCursorMove=this._register(new me),this.onCursorMove=this._onCursorMove.event,this._onKey=this._register(new me),this.onKey=this._onKey.event,this._onRender=this._register(new me),this.onRender=this._onRender.event,this._onSelectionChange=this._register(new me),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this._register(new me),this.onTitleChange=this._onTitleChange.event,this._onBell=this._register(new me),this.onBell=this._onBell.event,this._onFocus=this._register(new me),this._onBlur=this._register(new me),this._onA11yCharEmitter=this._register(new me),this._onA11yTabEmitter=this._register(new me),this._onWillOpen=this._register(new me),this._setup(),this._decorationService=this._instantiationService.createInstance(dW),this._instantiationService.setService(Ch,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(oq),this._instantiationService.setService(EB,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(k0)),this._register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this._register(this._inputHandler.onRequestRefreshRows(t=>this.refresh((t==null?void 0:t.start)??0,(t==null?void 0:t.end)??this.rows-1))),this._register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this._register(this._inputHandler.onRequestReset(()=>this.reset())),this._register(this._inputHandler.onRequestWindowsOptionsReport(t=>this._reportWindowsOptions(t))),this._register(this._inputHandler.onColor(t=>this._handleColorEvent(t))),this._register(Ir.forward(this._inputHandler.onCursorMove,this._onCursorMove)),this._register(Ir.forward(this._inputHandler.onTitleChange,this._onTitleChange)),this._register(Ir.forward(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this._register(Ir.forward(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this._register(this._bufferService.onResize(t=>this._afterResize(t.cols,t.rows))),this._register(Bt(()=>{var t,r;this._customKeyEventHandler=void 0,(r=(t=this.element)==null?void 0:t.parentNode)==null||r.removeChild(this.element)}))}get linkifier(){return this._linkifier.value}get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}_handleColorEvent(e){if(this._themeService)for(let t of e){let r,n="";switch(t.index){case 256:r="foreground",n="10";break;case 257:r="background",n="11";break;case 258:r="cursor",n="12";break;default:r="ansi",n="4;"+t.index}switch(t.type){case 0:let i=kt.toColorRGB(r==="ansi"?this._themeService.colors.ansi[t.index]:this._themeService.colors[r]);this.coreService.triggerDataEvent(`${oe.ESC}]${n};${nW(i)}${UB.ST}`);break;case 1:if(r==="ansi")this._themeService.modifyColors(a=>a.ansi[t.index]=nr.toColor(...t.color));else{let a=r;this._themeService.modifyColors(l=>l[a]=nr.toColor(...t.color))}break;case 2:this._themeService.restoreColor(t.index);break}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(mp,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(oe.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var e;return(e=this.textarea)==null?void 0:e.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(oe.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;let r=Math.min(this.buffer.x,this.cols-1),n=this._renderService.dimensions.css.cell.height,i=t.getWidth(r),a=this._renderService.dimensions.css.cell.width*i,l=this.buffer.y*this._renderService.dimensions.css.cell.height,u=r*this._renderService.dimensions.css.cell.width;this.textarea.style.left=u+"px",this.textarea.style.top=l+"px",this.textarea.style.width=a+"px",this.textarea.style.height=n+"px",this.textarea.style.lineHeight=n+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this._register(Le(this.element,"copy",t=>{this.hasSelection()&&w$(t,this._selectionService)}));let e=t=>x$(t,this.textarea,this.coreService,this.optionsService);this._register(Le(this.textarea,"paste",e)),this._register(Le(this.element,"paste",e)),qB?this._register(Le(this.element,"mousedown",t=>{t.button===2&&n2(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this._register(Le(this.element,"contextmenu",t=>{n2(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),Bw&&this._register(Le(this.element,"auxclick",t=>{t.button===1&&vB(t,this.textarea,this.screenElement)}))}_bindKeys(){this._register(Le(this.textarea,"keyup",e=>this._keyUp(e),!0)),this._register(Le(this.textarea,"keydown",e=>this._keyDown(e),!0)),this._register(Le(this.textarea,"keypress",e=>this._keyPress(e),!0)),this._register(Le(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this._register(Le(this.textarea,"compositionupdate",e=>this._compositionHelper.compositionupdate(e))),this._register(Le(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this._register(Le(this.textarea,"input",e=>this._inputEvent(e),!0)),this._register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(e){var i;if(!e)throw new Error("Terminal requires a parent element.");if(e.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((i=this.element)==null?void 0:i.ownerDocument.defaultView)&&this._coreBrowserService){this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView);return}this._document=e.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),e.appendChild(this.element);let t=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),t.appendChild(this._viewportElement),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._register(Le(this.screenElement,"mousemove",a=>this.updateCursorStyle(a))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement);let r=this.textarea=this._document.createElement("textarea");this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",E0.get()),YB||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._register(this.optionsService.onSpecificOptionChange("disableStdin",()=>r.readOnly=this.optionsService.rawOptions.disableStdin)),this.textarea.readOnly=this.optionsService.rawOptions.disableStdin,this._coreBrowserService=this._register(this._instantiationService.createInstance(aq,this.textarea,e.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(ka,this._coreBrowserService),this._register(Le(this.textarea,"focus",a=>this._handleTextAreaFocus(a))),this._register(Le(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(X0,this._document,this._helperContainer),this._instantiationService.setService(um,this._charSizeService),this._themeService=this._instantiationService.createInstance(J0),this._instantiationService.setService(au,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(fp),this._instantiationService.setService(CB,this._characterJoinerService),this._renderService=this._register(this._instantiationService.createInstance(Z0,this.rows,this.screenElement)),this._instantiationService.setService(Pa,this._renderService),this._register(this._renderService.onRenderedViewportChange(a=>this._onRender.fire(a))),this.onResize(a=>this._renderService.resize(a.cols,a.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(W0,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(G0),this._instantiationService.setService(Ow,this._mouseService);let n=this._linkifier.value=this._register(this._instantiationService.createInstance(oS,this.screenElement));this.element.appendChild(t);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this._register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this._register(this.onBlur(()=>this._renderService.handleBlur())),this._register(this.onFocus(()=>this._renderService.handleFocus())),this._viewport=this._register(this._instantiationService.createInstance(K0,this.element,this.screenElement)),this._register(this._viewport.onRequestScrollLines(a=>{super.scrollLines(a,!1),this.refresh(0,this.rows-1)})),this._selectionService=this._register(this._instantiationService.createInstance(Q0,this.element,this.screenElement,n)),this._instantiationService.setService(D$,this._selectionService),this._register(this._selectionService.onRequestScrollLines(a=>this.scrollLines(a.amount,a.suppressScrollEvent))),this._register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this._register(this._selectionService.onRequestRedraw(a=>this._renderService.handleSelectionChanged(a.start,a.end,a.columnSelectMode))),this._register(this._selectionService.onLinuxMouseSelection(a=>{this.textarea.value=a,this.textarea.focus(),this.textarea.select()})),this._register(Ir.any(this._onScroll.event,this._inputHandler.onScroll)(()=>{var a;this._selectionService.refresh(),(a=this._viewport)==null||a.queueSync()})),this._register(this._instantiationService.createInstance(q0,this.screenElement)),this._register(Le(this.element,"mousedown",a=>this._selectionService.handleMouseDown(a))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(mp,this)),this._register(this.optionsService.onSpecificOptionChange("screenReaderMode",a=>this._handleScreenReaderModeOptionChange(a))),this.options.overviewRuler.width&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(hp,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRuler",a=>{!this._overviewRulerRenderer&&a&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(hp,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(Y0,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let e=this,t=this.element;function r(a){var h,d,m,v,g;let l=e._mouseService.getMouseReportCoords(a,e.screenElement);if(!l)return!1;let u,f;switch(a.overrideType||a.type){case"mousemove":f=32,a.buttons===void 0?(u=3,a.button!==void 0&&(u=a.button<3?a.button:3)):u=a.buttons&1?0:a.buttons&4?1:a.buttons&2?2:3;break;case"mouseup":f=0,u=a.button<3?a.button:3;break;case"mousedown":f=1,u=a.button<3?a.button:3;break;case"wheel":if(e._customWheelEventHandler&&e._customWheelEventHandler(a)===!1)return!1;let S=a.deltaY;if(S===0||e.coreMouseService.consumeWheelEvent(a,(v=(m=(d=(h=e._renderService)==null?void 0:h.dimensions)==null?void 0:d.device)==null?void 0:m.cell)==null?void 0:v.height,(g=e._coreBrowserService)==null?void 0:g.dpr)===0)return!1;f=S<0?0:1,u=4;break;default:return!1}return f===void 0||u===void 0||u>4?!1:e.coreMouseService.triggerMouseEvent({col:l.col,row:l.row,x:l.x,y:l.y,button:u,action:f,ctrl:a.ctrlKey,alt:a.altKey,shift:a.shiftKey})}let n={mouseup:null,wheel:null,mousedrag:null,mousemove:null},i={mouseup:a=>(r(a),a.buttons||(this._document.removeEventListener("mouseup",n.mouseup),n.mousedrag&&this._document.removeEventListener("mousemove",n.mousedrag)),this.cancel(a)),wheel:a=>(r(a),this.cancel(a,!0)),mousedrag:a=>{a.buttons&&r(a)},mousemove:a=>{a.buttons||r(a)}};this._register(this.coreMouseService.onProtocolChange(a=>{a?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(a)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),a&8?n.mousemove||(t.addEventListener("mousemove",i.mousemove),n.mousemove=i.mousemove):(t.removeEventListener("mousemove",n.mousemove),n.mousemove=null),a&16?n.wheel||(t.addEventListener("wheel",i.wheel,{passive:!1}),n.wheel=i.wheel):(t.removeEventListener("wheel",n.wheel),n.wheel=null),a&2?n.mouseup||(n.mouseup=i.mouseup):(this._document.removeEventListener("mouseup",n.mouseup),n.mouseup=null),a&4?n.mousedrag||(n.mousedrag=i.mousedrag):(this._document.removeEventListener("mousemove",n.mousedrag),n.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this._register(Le(t,"mousedown",a=>{if(a.preventDefault(),this.focus(),!(!this.coreMouseService.areMouseEventsActive||this._selectionService.shouldForceSelection(a)))return r(a),n.mouseup&&this._document.addEventListener("mouseup",n.mouseup),n.mousedrag&&this._document.addEventListener("mousemove",n.mousedrag),this.cancel(a)})),this._register(Le(t,"wheel",a=>{var l,u,f,h,d;if(!n.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(a)===!1)return!1;if(!this.buffer.hasScrollback){if(a.deltaY===0)return!1;if(e.coreMouseService.consumeWheelEvent(a,(h=(f=(u=(l=e._renderService)==null?void 0:l.dimensions)==null?void 0:u.device)==null?void 0:f.cell)==null?void 0:h.height,(d=e._coreBrowserService)==null?void 0:d.dpr)===0)return this.cancel(a,!0);let m=oe.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(a.deltaY<0?"A":"B");return this.coreService.triggerDataEvent(m,!0),this.cancel(a,!0)}}},{passive:!1}))}refresh(e,t){var r;(r=this._renderService)==null||r.refreshRows(e,t)}updateCursorStyle(e){var t;(t=this._selectionService)!=null&&t.shouldColumnSelect(e)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(e,t){this._viewport?this._viewport.scrollLines(e):super.scrollLines(e,t),this.refresh(0,this.rows-1)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){e&&this._viewport?this._viewport.scrollToLine(this.buffer.ybase,!0):this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}paste(e){mB(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this._customWheelEventHandler=e}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");let t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return this._selectionService?this._selectionService.hasSelection:!1}select(e,t,r){this._selectionService.setSelection(e,t,r)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(!(!this._selectionService||!this._selectionService.hasSelection))return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var e;(e=this._selectionService)==null||e.clearSelection()}selectAll(){var e;(e=this._selectionService)==null||e.selectAll()}selectLines(e,t){var r;(r=this._selectionService)==null||r.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;let t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(!0),!1;!t&&(e.key==="Dead"||e.key==="AltGraph")&&(this._unprocessedDeadKey=!0);let r=hW(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),r.type===3||r.type===2){let n=this.rows-1;return this.scrollLines(r.type===2?-n:n),this.cancel(e,!0)}if(r.type===1&&this.selectAll(),this._isThirdLevelShift(this.browser,e)||(r.cancel&&this.cancel(e,!0),!r.key)||e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.key.length===1&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)return!0;if(this._unprocessedDeadKey)return this._unprocessedDeadKey=!1,!0;if((r.key===oe.ETX||r.key===oe.CR)&&(this.textarea.value=""),this._onKey.fire({key:r.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(r.key,!0),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey)return this.cancel(e,!0);this._keyDownHandled=!0}_isThirdLevelShift(e,t){let r=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState("AltGraph");return t.type==="keypress"?r:r&&(!t.keyCode||t.keyCode>47)}_keyUp(e){this._keyDownSeen=!1,!(this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)&&(_W(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(e.which===null||e.which===void 0)t=e.keyCode;else if(e.which!==0&&e.charCode!==0)t=e.which;else return!1;return!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)?!1:(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,!0)}_inputEvent(e){if(e.data&&e.inputType==="insertText"&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1}resize(e,t){if(e===this.cols&&t===this.rows){this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure();return}super.resize(e,t)}_afterResize(e,t){var r;(r=this._charSizeService)==null||r.measure()}clear(){if(!(this.buffer.ybase===0&&this.buffer.y===0)){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine(rr));this._onScroll.fire({position:this.buffer.ydisp}),this.refresh(0,this.rows-1)}}reset(){var t;this.options.rows=this.rows,this.options.cols=this.cols;let e=this._customKeyEventHandler;this._setup(),super.reset(),(t=this._selectionService)==null||t.reset(),this._decorationService.reset(),this._customKeyEventHandler=e,this.refresh(0,this.rows-1)}clearTextureAtlas(){var e;(e=this._renderService)==null||e.clearTextureAtlas()}_reportFocus(){var e;(e=this.element)!=null&&e.classList.contains("focus")?this.coreService.triggerDataEvent(oe.ESC+"[I"):this.coreService.triggerDataEvent(oe.ESC+"[O")}_reportWindowsOptions(e){if(this._renderService)switch(e){case 0:let t=this._renderService.dimensions.css.canvas.width.toFixed(0),r=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${oe.ESC}[4;${r};${t}t`);break;case 1:let n=this._renderService.dimensions.css.cell.width.toFixed(0),i=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${oe.ESC}[6;${i};${n}t`);break}}cancel(e,t){if(!(!this.options.cancelEvents&&!t))return e.preventDefault(),e.stopPropagation(),!1}};function _W(e){return e.keyCode===16||e.keyCode===17||e.keyCode===18}var bW=class{constructor(){this._addons=[]}dispose(){for(let e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()}loadAddon(e,t){let r={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(r),t.dispose=()=>this._wrappedAddonDispose(r),t.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let t=-1;for(let r=0;r<this._addons.length;r++)if(this._addons[r]===e){t=r;break}if(t===-1)throw new Error("Could not dispose an addon that has not been loaded");e.isDisposed=!0,e.dispose.apply(e.instance),this._addons.splice(t,1)}},SW=class{constructor(e){this._line=e}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new oi)}translateToString(e,t,r){return this._line.translateToString(e,t,r)}},Y2=class{constructor(e,t){this._buffer=e,this.type=t}init(e){return this._buffer=e,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(e){let t=this._buffer.lines.get(e);if(t)return new SW(t)}getNullCell(){return new oi}},wW=class extends We{constructor(e){super(),this._core=e,this._onBufferChange=this._register(new me),this.onBufferChange=this._onBufferChange.event,this._normal=new Y2(this._core.buffers.normal,"normal"),this._alternate=new Y2(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}},xW=class{constructor(e){this._core=e}registerCsiHandler(e,t){return this._core.registerCsiHandler(e,r=>t(r.toArray()))}addCsiHandler(e,t){return this.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._core.registerDcsHandler(e,(r,n)=>t(r,n.toArray()))}addDcsHandler(e,t){return this.registerDcsHandler(e,t)}registerEscHandler(e,t){return this._core.registerEscHandler(e,t)}addEscHandler(e,t){return this.registerEscHandler(e,t)}registerOscHandler(e,t){return this._core.registerOscHandler(e,t)}addOscHandler(e,t){return this.registerOscHandler(e,t)}},CW=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}},EW=["cols","rows"],Ti=0,AW=class extends We{constructor(e){super(),this._core=this._register(new yW(e)),this._addonManager=this._register(new bW),this._publicOptions={...this._core.options};let t=n=>this._core.options[n],r=(n,i)=>{this._checkReadonlyOptions(n),this._core.options[n]=i};for(let n in this._core.options){let i={get:t.bind(this,n),set:r.bind(this,n)};Object.defineProperty(this._publicOptions,n,i)}}_checkReadonlyOptions(e){if(EW.includes(e))throw new Error(`Option "${e}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new xW(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new CW(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this._register(new wW(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let e=this._core.coreService.decPrivateModes,t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any";break}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,synchronizedOutputMode:e.synchronizedOutput,wraparoundMode:e.wraparound}}get options(){return this._publicOptions}set options(e){for(let t in e)this._publicOptions[t]=e[t]}blur(){this._core.blur()}focus(){this._core.focus()}input(e,t=!0){this._core.input(e,t)}resize(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}attachCustomWheelEventHandler(e){this._core.attachCustomWheelEventHandler(e)}registerLinkProvider(e){return this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)}registerMarker(e=0){return this._verifyIntegers(e),this._core.registerMarker(e)}registerDecoration(e){return this._checkProposedApi(),this._verifyPositiveIntegers(e.x??0,e.width??0,e.height??0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,t,r){this._verifyIntegers(e,t,r),this._core.select(e,t,r)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)}dispose(){super.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,t){this._core.write(e,t)}writeln(e,t){this._core.write(e),this._core.write(`\r
`,t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return{get promptLabel(){return E0.get()},set promptLabel(e){E0.set(e)},get tooMuchOutput(){return A0.get()},set tooMuchOutput(e){A0.set(e)}}}_verifyIntegers(...e){for(Ti of e)if(Ti===1/0||isNaN(Ti)||Ti%1!==0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...e){for(Ti of e)if(Ti&&(Ti===1/0||isNaN(Ti)||Ti%1!==0||Ti<0))throw new Error("This API only accepts positive integers")}};const OW=w.forwardRef(function(t,r){const{onData:n,termFontSize:i,termFontFamily:a,termScrollback:l,...u}=t,f=w.useRef(null),h=w.useRef(null),d=w.useRef(null),m=w.useRef(n);m.current=n;const v=w.useCallback(_=>{if(f.current=_,_!=null&&(_.__termWrite=x=>{var C;if(!(x==null||x===""))try{(C=d.current)==null||C.write(N8(x))}catch(A){console.error("Failed to write to terminal:",A)}},_.__termFocus=()=>{var x;(x=d.current)==null||x.focus()},_.__termSize=()=>{const x=d.current;return x==null?null:{rows:x.rows,cols:x.cols}}),typeof r=="function"){r(_);return}r!=null&&(r.current=_)},[r]);w.useEffect(()=>{if(h.current==null)return;const _=new AW({convertEol:!1,...i!=null?{fontSize:i}:{},...a!=null?{fontFamily:a}:{},...l!=null?{scrollback:l}:{}}),x=new g$;_.loadAddon(x),_.open(h.current),x.fit(),d.current=_;const C=_.onData(P=>{m.current!=null&&m.current(P,null)}),A=_.onResize(P=>{m.current!=null&&m.current(null,{rows:P.rows,cols:P.cols})});m.current!=null&&m.current(null,{rows:_.rows,cols:_.cols});const O=new ResizeObserver(()=>{x.fit()});return f.current!=null&&O.observe(f.current),()=>{O.disconnect(),A.dispose(),C.dispose(),_.dispose(),d.current=null}},[]),w.useEffect(()=>{const _=d.current;_!=null&&(i!=null&&(_.options.fontSize=i),a!=null&&(_.options.fontFamily=a),l!=null&&(_.options.scrollback=l))},[i,a,l]);const g=w.useCallback(_=>{var x,C;(x=d.current)==null||x.focus(),(C=u.onFocus)==null||C.call(u,_)},[u.onFocus]),S=w.useCallback(_=>{var x,C;(x=d.current)==null||x.blur(),(C=u.onBlur)==null||C.call(u,_)},[u.onBlur]);return _e.jsx("div",{...u,ref:v,onFocus:g,onBlur:S,children:_e.jsx("div",{ref:h,className:"w-full h-full"})})});var c_={},h_={},X2;function iN(){return X2||(X2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(h_)),h_}var f_={},G2;function fm(){return G2||(G2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){switch(typeof r){case"number":case"symbol":return!1;case"string":return r.includes(".")||r.includes("[")||r.includes("]")}}e.isDeepKey=t})(f_)),f_}var d_={},Z2;function dm(){return Z2||(Z2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){var n;return typeof r=="string"||typeof r=="symbol"?r:Object.is((n=r==null?void 0:r.valueOf)==null?void 0:n.call(r),-0)?"-0":String(r)}e.toKey=t})(d_)),d_}var p_={},m_={},Q2;function kW(){return Q2||(Q2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){if(r==null)return"";if(typeof r=="string")return r;if(Array.isArray(r))return r.map(t).join(",");const n=String(r);return n==="0"&&Object.is(Number(r),-0)?"-0":n}e.toString=t})(m_)),m_}var J2;function pm(){return J2||(J2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=kW(),r=dm();function n(i){if(Array.isArray(i))return i.map(r.toKey);if(typeof i=="symbol")return[i];i=t.toString(i);const a=[],l=i.length;if(l===0)return a;let u=0,f="",h="",d=!1;for(i.charCodeAt(0)===46&&(a.push(""),u++);u<l;){const m=i[u];h?m==="\\"&&u+1<l?(u++,f+=i[u]):m===h?h="":f+=m:d?m==='"'||m==="'"?h=m:m==="]"?(d=!1,a.push(f),f=""):f+=m:m==="["?(d=!0,f&&(a.push(f),f="")):m==="."?f&&(a.push(f),f=""):f+=m,u++}return f&&a.push(f),a}e.toPath=n})(p_)),p_}var eP;function mm(){return eP||(eP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=iN(),r=fm(),n=dm(),i=pm();function a(u,f,h){if(u==null)return h;switch(typeof f){case"string":{if(t.isUnsafeProperty(f))return h;const d=u[f];return d===void 0?r.isDeepKey(f)?a(u,i.toPath(f),h):h:d}case"number":case"symbol":{typeof f=="number"&&(f=n.toKey(f));const d=u[f];return d===void 0?h:d}default:{if(Array.isArray(f))return l(u,f,h);if(Object.is(f==null?void 0:f.valueOf(),-0)?f="-0":f=String(f),t.isUnsafeProperty(f))return h;const d=u[f];return d===void 0?h:d}}}function l(u,f,h){if(f.length===0)return h;let d=u;for(let m=0;m<f.length;m++){if(d==null||t.isUnsafeProperty(f[m]))return h;d=d[f[m]]}return d===void 0?h:d}e.get=a})(c_)),c_}var v_,tP;function PW(){return tP||(tP=1,v_=mm().get),v_}var TW=PW();const ba=Hr(TW);var g_={exports:{}},yt={};/**
 * @license React
 * react-is.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var rP;function DW(){if(rP)return yt;rP=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),v=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");function S(_){if(typeof _=="object"&&_!==null){var x=_.$$typeof;switch(x){case e:switch(_=_.type,_){case r:case i:case n:case f:case h:case v:return _;default:switch(_=_&&_.$$typeof,_){case l:case u:case m:case d:return _;case a:return _;default:return x}}case t:return x}}}return yt.ContextConsumer=a,yt.ContextProvider=l,yt.Element=e,yt.ForwardRef=u,yt.Fragment=r,yt.Lazy=m,yt.Memo=d,yt.Portal=t,yt.Profiler=i,yt.StrictMode=n,yt.Suspense=f,yt.SuspenseList=h,yt.isContextConsumer=function(_){return S(_)===a},yt.isContextProvider=function(_){return S(_)===l},yt.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===e},yt.isForwardRef=function(_){return S(_)===u},yt.isFragment=function(_){return S(_)===r},yt.isLazy=function(_){return S(_)===m},yt.isMemo=function(_){return S(_)===d},yt.isPortal=function(_){return S(_)===t},yt.isProfiler=function(_){return S(_)===i},yt.isStrictMode=function(_){return S(_)===n},yt.isSuspense=function(_){return S(_)===f},yt.isSuspenseList=function(_){return S(_)===h},yt.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===r||_===i||_===n||_===f||_===h||typeof _=="object"&&_!==null&&(_.$$typeof===m||_.$$typeof===d||_.$$typeof===l||_.$$typeof===a||_.$$typeof===u||_.$$typeof===g||_.getModuleId!==void 0)},yt.typeOf=S,yt}var nP;function MW(){return nP||(nP=1,g_.exports=DW()),g_.exports}var RW=MW(),xr=e=>e===0?0:e>0?1:-1,Er=e=>typeof e=="number"&&e!=+e,po=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,ye=e=>(typeof e=="number"||e instanceof Number)&&!Er(e),Cr=e=>ye(e)||typeof e=="string",LW=0,Kl=e=>{var t=++LW;return"".concat(e||"").concat(t)},Vr=function(t,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(!ye(t)&&typeof t!="string")return n;var a;if(po(t)){if(r==null)return n;var l=t.indexOf("%");a=r*parseFloat(t.slice(0,l))/100}else a=+t;return Er(a)&&(a=n),i&&r!=null&&a>r&&(a=r),a},aN=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[e[n]])r[e[n]]=!0;else return!0;return!1},Pd=(e,t)=>ye(e)&&ye(t)?r=>e+r*(t-e):()=>t;function je(e,t,r){return ye(e)&&ye(t)?e+r*(t-e):t}function sN(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):ba(n,t))===r)}var BW=e=>{if(!e||!e.length)return null;for(var t=e.length,r=0,n=0,i=0,a=0,l=1/0,u=-1/0,f=0,h=0,d=0;d<t;d++)f=e[d].cx||0,h=e[d].cy||0,r+=f,n+=h,i+=f*h,a+=f*f,l=Math.min(l,f),u=Math.max(u,f);var m=t*a!==r*r?(t*i-r*n)/(t*a-r*r):0;return{xmin:l,xmax:u,a:m,b:(n-m*r)/t}},at=e=>e===null||typeof e>"u",Oh=e=>at(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1)),NW=["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"];function Nw(e){if(typeof e!="string")return!1;var t=NW;return t.includes(e)}var IW=["viewBox","children"],iP=["points","pathLength"],y_={svg:IW,polygon:iP,polyline:iP},Iw=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(w.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{Nw(i)&&(n[i]=(a=>r[i](r,a)))}),n},jW=(e,t,r)=>n=>(e(t,r,n),null),Ta=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var a=e[i];Nw(i)&&typeof a=="function"&&(n||(n={}),n[i]=jW(a,t,r))}),n},zW=["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"];function oN(e){if(typeof e!="string")return!1;var t=zW;return t.includes(e)}function Et(e){var t=Object.entries(e).filter(r=>{var[n]=r;return oN(n)});return Object.fromEntries(t)}var aP=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",sP=null,__=null,lN=e=>{if(e===sP&&Array.isArray(__))return __;var t=[];return w.Children.forEach(e,r=>{at(r)||(RW.isFragment(r)?t=t.concat(lN(r.props.children)):t.push(r))}),__=t,sP=e,t};function kh(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(i=>aP(i)):n=[aP(t)],lN(e).forEach(i=>{var a=ba(i,"type.displayName")||ba(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}var vm=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,HW=(e,t,r,n)=>{var i;if(typeof t=="symbol"||typeof t=="number")return!0;var a=(i=n&&(y_==null?void 0:y_[n]))!==null&&i!==void 0?i:[],l=t.startsWith("data-"),u=typeof e!="function"&&(!!n&&a.includes(t)||oN(t)),f=!!r&&Nw(t);return l||u||f},Ue=(e,t,r)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(w.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var i={};return Object.keys(n).forEach(a=>{var l;HW((l=n)===null||l===void 0?void 0:l[a],a,t,r)&&(i[a]=n[a])}),i},FW=["children","width","height","viewBox","className","style","title","desc"];function lS(){return lS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lS.apply(null,arguments)}function UW(e,t){if(e==null)return{};var r,n,i=$W(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function $W(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var gm=w.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:a,className:l,style:u,title:f,desc:h}=e,d=UW(e,FW),m=a||{width:n,height:i,x:0,y:0},v=Me("recharts-surface",l);return w.createElement("svg",lS({},Ue(d,!0,"svg"),{className:v,width:n,height:i,style:u,viewBox:"".concat(m.x," ").concat(m.y," ").concat(m.width," ").concat(m.height),ref:t}),w.createElement("title",null,f),w.createElement("desc",null,h),r)}),KW=["children","className"];function uS(){return uS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},uS.apply(null,arguments)}function qW(e,t){if(e==null)return{};var r,n,i=WW(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function WW(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Pe=w.forwardRef((e,t)=>{var{children:r,className:n}=e,i=qW(e,KW),a=Me("recharts-layer",n);return w.createElement("g",uS({className:a},Ue(i,!0),{ref:t}),r)}),uN=JR(),cN=w.createContext(null),VW=()=>w.useContext(cN);function Ct(e){return function(){return e}}const hN=Math.cos,vp=Math.sin,xi=Math.sqrt,gp=Math.PI,ym=2*gp,cS=Math.PI,hS=2*cS,lo=1e-6,YW=hS-lo;function fN(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function XW(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return fN;const r=10**t;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 GW{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?fN:XW(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,l){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+l}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let l=this._x1,u=this._y1,f=n-t,h=i-r,d=l-t,m=u-r,v=d*d+m*m;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(v>lo)if(!(Math.abs(m*f-h*d)>lo)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let g=n-l,S=i-u,_=f*f+h*h,x=g*g+S*S,C=Math.sqrt(_),A=Math.sqrt(v),O=a*Math.tan((cS-Math.acos((_+v-x)/(2*C*A)))/2),P=O/A,D=O/C;Math.abs(P-1)>lo&&this._append`L${t+P*d},${r+P*m}`,this._append`A${a},${a},0,0,${+(m*g>d*S)},${this._x1=t+D*f},${this._y1=r+D*h}`}}arc(t,r,n,i,a,l){if(t=+t,r=+r,n=+n,l=!!l,n<0)throw new Error(`negative radius: ${n}`);let u=n*Math.cos(i),f=n*Math.sin(i),h=t+u,d=r+f,m=1^l,v=l?i-a:a-i;this._x1===null?this._append`M${h},${d}`:(Math.abs(this._x1-h)>lo||Math.abs(this._y1-d)>lo)&&this._append`L${h},${d}`,n&&(v<0&&(v=v%hS+hS),v>YW?this._append`A${n},${n},0,1,${m},${t-u},${r-f}A${n},${n},0,1,${m},${this._x1=h},${this._y1=d}`:v>lo&&this._append`A${n},${n},0,${+(v>=cS)},${m},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function jw(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new GW(t)}function zw(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function dN(e){this._context=e}dN.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function _m(e){return new dN(e)}function pN(e){return e[0]}function mN(e){return e[1]}function vN(e,t){var r=Ct(!0),n=null,i=_m,a=null,l=jw(u);e=typeof e=="function"?e:e===void 0?pN:Ct(e),t=typeof t=="function"?t:t===void 0?mN:Ct(t);function u(f){var h,d=(f=zw(f)).length,m,v=!1,g;for(n==null&&(a=i(g=l())),h=0;h<=d;++h)!(h<d&&r(m=f[h],h,f))===v&&((v=!v)?a.lineStart():a.lineEnd()),v&&a.point(+e(m,h,f),+t(m,h,f));if(g)return a=null,g+""||null}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:Ct(+f),u):e},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:Ct(+f),u):t},u.defined=function(f){return arguments.length?(r=typeof f=="function"?f:Ct(!!f),u):r},u.curve=function(f){return arguments.length?(i=f,n!=null&&(a=i(n)),u):i},u.context=function(f){return arguments.length?(f==null?n=a=null:a=i(n=f),u):n},u}function Td(e,t,r){var n=null,i=Ct(!0),a=null,l=_m,u=null,f=jw(h);e=typeof e=="function"?e:e===void 0?pN:Ct(+e),t=typeof t=="function"?t:Ct(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?mN:Ct(+r);function h(m){var v,g,S,_=(m=zw(m)).length,x,C=!1,A,O=new Array(_),P=new Array(_);for(a==null&&(u=l(A=f())),v=0;v<=_;++v){if(!(v<_&&i(x=m[v],v,m))===C)if(C=!C)g=v,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),S=v-1;S>=g;--S)u.point(O[S],P[S]);u.lineEnd(),u.areaEnd()}C&&(O[v]=+e(x,v,m),P[v]=+t(x,v,m),u.point(n?+n(x,v,m):O[v],r?+r(x,v,m):P[v]))}if(A)return u=null,A+""||null}function d(){return vN().defined(i).curve(l).context(a)}return h.x=function(m){return arguments.length?(e=typeof m=="function"?m:Ct(+m),n=null,h):e},h.x0=function(m){return arguments.length?(e=typeof m=="function"?m:Ct(+m),h):e},h.x1=function(m){return arguments.length?(n=m==null?null:typeof m=="function"?m:Ct(+m),h):n},h.y=function(m){return arguments.length?(t=typeof m=="function"?m:Ct(+m),r=null,h):t},h.y0=function(m){return arguments.length?(t=typeof m=="function"?m:Ct(+m),h):t},h.y1=function(m){return arguments.length?(r=m==null?null:typeof m=="function"?m:Ct(+m),h):r},h.lineX0=h.lineY0=function(){return d().x(e).y(t)},h.lineY1=function(){return d().x(e).y(r)},h.lineX1=function(){return d().x(n).y(t)},h.defined=function(m){return arguments.length?(i=typeof m=="function"?m:Ct(!!m),h):i},h.curve=function(m){return arguments.length?(l=m,a!=null&&(u=l(a)),h):l},h.context=function(m){return arguments.length?(m==null?a=u=null:u=l(a=m),h):a},h}class gN{constructor(t,r){this._context=t,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(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function ZW(e){return new gN(e,!0)}function QW(e){return new gN(e,!1)}const Hw={draw(e,t){const r=xi(t/gp);e.moveTo(r,0),e.arc(0,0,r,0,ym)}},JW={draw(e,t){const r=xi(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},yN=xi(1/3),eV=yN*2,tV={draw(e,t){const r=xi(t/eV),n=r*yN;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},rV={draw(e,t){const r=xi(t),n=-r/2;e.rect(n,n,r,r)}},nV=.8908130915292852,_N=vp(gp/10)/vp(7*gp/10),iV=vp(ym/10)*_N,aV=-hN(ym/10)*_N,sV={draw(e,t){const r=xi(t*nV),n=iV*r,i=aV*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const l=ym*a/5,u=hN(l),f=vp(l);e.lineTo(f*r,-u*r),e.lineTo(u*n-f*i,f*n+u*i)}e.closePath()}},b_=xi(3),oV={draw(e,t){const r=-xi(t/(b_*3));e.moveTo(0,r*2),e.lineTo(-b_*r,-r),e.lineTo(b_*r,-r),e.closePath()}},Gn=-.5,Zn=xi(3)/2,fS=1/xi(12),lV=(fS/2+1)*3,uV={draw(e,t){const r=xi(t/lV),n=r/2,i=r*fS,a=n,l=r*fS+r,u=-a,f=l;e.moveTo(n,i),e.lineTo(a,l),e.lineTo(u,f),e.lineTo(Gn*n-Zn*i,Zn*n+Gn*i),e.lineTo(Gn*a-Zn*l,Zn*a+Gn*l),e.lineTo(Gn*u-Zn*f,Zn*u+Gn*f),e.lineTo(Gn*n+Zn*i,Gn*i-Zn*n),e.lineTo(Gn*a+Zn*l,Gn*l-Zn*a),e.lineTo(Gn*u+Zn*f,Gn*f-Zn*u),e.closePath()}};function cV(e,t){let r=null,n=jw(i);e=typeof e=="function"?e:Ct(e||Hw),t=typeof t=="function"?t:Ct(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:Ct(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Ct(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function yp(){}function _p(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function bN(e){this._context=e}bN.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:_p(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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:_p(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function hV(e){return new bN(e)}function SN(e){this._context=e}SN.prototype={areaStart:yp,areaEnd:yp,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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:_p(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function fV(e){return new SN(e)}function wN(e){this._context=e}wN.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:_p(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function dV(e){return new wN(e)}function xN(e){this._context=e}xN.prototype={areaStart:yp,areaEnd:yp,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function pV(e){return new xN(e)}function oP(e){return e<0?-1:1}function lP(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),l=(r-e._y1)/(i||n<0&&-0),u=(a*i+l*n)/(n+i);return(oP(a)+oP(l))*Math.min(Math.abs(a),Math.abs(l),.5*Math.abs(u))||0}function uP(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function S_(e,t,r){var n=e._x0,i=e._y0,a=e._x1,l=e._y1,u=(a-n)/3;e._context.bezierCurveTo(n+u,i+u*t,a-u,l-u*r,a,l)}function bp(e){this._context=e}bp.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:S_(this,this._t0,uP(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,S_(this,uP(this,r=lP(this,e,t)),r);break;default:S_(this,this._t0,r=lP(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function CN(e){this._context=new EN(e)}(CN.prototype=Object.create(bp.prototype)).point=function(e,t){bp.prototype.point.call(this,t,e)};function EN(e){this._context=e}EN.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function mV(e){return new bp(e)}function vV(e){return new CN(e)}function AN(e){this._context=e}AN.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=cP(e),i=cP(t),a=0,l=1;l<r;++a,++l)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[l],t[l]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function cP(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),l=new Array(r);for(i[0]=0,a[0]=2,l[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,l[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,l[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,l[t]-=n*l[t-1];for(i[r-1]=l[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(l[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function gV(e){return new AN(e)}function bm(e,t){this._context=e,this._t=t}bm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function yV(e){return new bm(e,.5)}function _V(e){return new bm(e,0)}function bV(e){return new bm(e,1)}function ql(e,t){if((l=e.length)>1)for(var r=1,n,i,a=e[t[0]],l,u=a.length;r<l;++r)for(i=a,a=e[t[r]],n=0;n<u;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function dS(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function SV(e,t){return e[t]}function wV(e){const t=[];return t.key=e,t}function xV(){var e=Ct([]),t=dS,r=ql,n=SV;function i(a){var l=Array.from(e.apply(this,arguments),wV),u,f=l.length,h=-1,d;for(const m of a)for(u=0,++h;u<f;++u)(l[u][h]=[0,+n(m,l[u].key,h,a)]).data=m;for(u=0,d=zw(t(l));u<f;++u)l[d[u]].index=u;return r(l,d),l}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:Ct(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:Ct(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?dS:typeof a=="function"?a:Ct(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??ql,i):r},i}function CV(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,l;i<a;++i){for(l=r=0;r<n;++r)l+=e[r][i][1]||0;if(l)for(r=0;r<n;++r)e[r][i][1]/=l}ql(e,t)}}function EV(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var l=0,u=0;l<i;++l)u+=e[l][r][1]||0;n[r][1]+=n[r][0]=-u/2}ql(e,t)}}function AV(e,t){if(!(!((l=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,l;n<a;++n){for(var u=0,f=0,h=0;u<l;++u){for(var d=e[t[u]],m=d[n][1]||0,v=d[n-1][1]||0,g=(m-v)/2,S=0;S<u;++S){var _=e[t[S]],x=_[n][1]||0,C=_[n-1][1]||0;g+=x-C}f+=m,h+=g*m}i[n-1][1]+=i[n-1][0]=r,f&&(r-=h/f)}i[n-1][1]+=i[n-1][0]=r,ql(e,t)}}var OV=["type","size","sizeType"];function pS(){return pS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pS.apply(null,arguments)}function hP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hP(Object(r),!0).forEach(function(n){kV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kV(e,t,r){return(t=PV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PV(e){var t=TV(e,"string");return typeof t=="symbol"?t:t+""}function TV(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function DV(e,t){if(e==null)return{};var r,n,i=MV(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function MV(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var ON={symbolCircle:Hw,symbolCross:JW,symbolDiamond:tV,symbolSquare:rV,symbolStar:sV,symbolTriangle:oV,symbolWye:uV},RV=Math.PI/180,LV=e=>{var t="symbol".concat(Oh(e));return ON[t]||Hw},BV=(e,t,r)=>{if(t==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var n=18*RV;return 1.25*e*e*(Math.tan(n)-Math.tan(n*2)*Math.tan(n)**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}},NV=(e,t)=>{ON["symbol".concat(Oh(e))]=t},Sm=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=DV(e,OV),a=fP(fP({},i),{},{type:t,size:r,sizeType:n}),l="circle";typeof t=="string"&&(l=t);var u=()=>{var v=LV(l),g=cV().type(v).size(BV(r,n,l));return g()},{className:f,cx:h,cy:d}=a,m=Ue(a,!0);return h===+h&&d===+d&&r===+r?w.createElement("path",pS({},m,{className:Me("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(d,")"),d:u()})):null};Sm.registerSymbol=NV;function mS(){return mS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mS.apply(null,arguments)}function dP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function IV(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dP(Object(r),!0).forEach(function(n){Fw(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Fw(e,t,r){return(t=jV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jV(e){var t=zV(e,"string");return typeof t=="symbol"?t:t+""}function zV(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Qn=32;class Uw extends w.PureComponent{renderIcon(t,r){var{inactiveColor:n}=this.props,i=Qn/2,a=Qn/6,l=Qn/3,u=t.inactive?n:t.color,f=r??t.type;if(f==="none")return null;if(f==="plainline")return w.createElement("line",{strokeWidth:4,fill:"none",stroke:u,strokeDasharray:t.payload.strokeDasharray,x1:0,y1:i,x2:Qn,y2:i,className:"recharts-legend-icon"});if(f==="line")return w.createElement("path",{strokeWidth:4,fill:"none",stroke:u,d:"M0,".concat(i,"h").concat(l,`
            A`).concat(a,",").concat(a,",0,1,1,").concat(2*l,",").concat(i,`
            H`).concat(Qn,"M").concat(2*l,",").concat(i,`
            A`).concat(a,",").concat(a,",0,1,1,").concat(l,",").concat(i),className:"recharts-legend-icon"});if(f==="rect")return w.createElement("path",{stroke:"none",fill:u,d:"M0,".concat(Qn/8,"h").concat(Qn,"v").concat(Qn*3/4,"h").concat(-Qn,"z"),className:"recharts-legend-icon"});if(w.isValidElement(t.legendIcon)){var h=IV({},t);return delete h.legendIcon,w.cloneElement(t.legendIcon,h)}return w.createElement(Sm,{fill:u,cx:i,cy:i,size:Qn,sizeType:"diameter",type:f})}renderItems(){var{payload:t,iconSize:r,layout:n,formatter:i,inactiveColor:a,iconType:l}=this.props,u={x:0,y:0,width:Qn,height:Qn},f={display:n==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((d,m)=>{var v=d.formatter||i,g=Me({"recharts-legend-item":!0,["legend-item-".concat(m)]:!0,inactive:d.inactive});if(d.type==="none")return null;var S=d.inactive?a:d.color,_=v?v(d.value,d,m):d.value;return w.createElement("li",mS({className:g,style:f,key:"legend-item-".concat(m)},Ta(this.props,d,m)),w.createElement(gm,{width:r,height:r,viewBox:u,style:h,"aria-label":"".concat(_," legend icon")},this.renderIcon(d,l)),w.createElement("span",{className:"recharts-legend-item-text",style:{color:S}},_))})}render(){var{payload:t,layout:r,align:n}=this.props;if(!t||!t.length)return null;var i={padding:0,margin:0,textAlign:r==="horizontal"?n:"left"};return w.createElement("ul",{className:"recharts-default-legend",style:i},this.renderItems())}}Fw(Uw,"displayName","Legend");Fw(Uw,"defaultProps",{align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle"});var w_={},x_={},pP;function HV(){return pP||(pP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){const i=new Map;for(let a=0;a<r.length;a++){const l=r[a],u=n(l,a,r);i.has(u)||i.set(u,l)}return Array.from(i.values())}e.uniqBy=t})(x_)),x_}var C_={},mP;function FV(){return mP||(mP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return function(...i){return r.apply(this,i.slice(0,n))}}e.ary=t})(C_)),C_}var E_={},vP;function wm(){return vP||(vP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(E_)),E_}var A_={},O_={},k_={},gP;function UV(){return gP||(gP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(k_)),k_}var yP;function Ph(){return yP||(yP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=UV();function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(O_)),O_}var P_={},_P;function $V(){return _P||(_P=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(P_)),P_}var bP;function KV(){return bP||(bP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ph(),r=$V();function n(i){return r.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=n})(A_)),A_}var T_={},D_={},SP;function qV(){return SP||(SP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=mm();function r(n){return function(i){return t.get(i,n)}}e.property=r})(D_)),D_}var M_={},R_={},L_={},B_={},wP;function kN(){return wP||(wP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r!==null&&(typeof r=="object"||typeof r=="function")}e.isObject=t})(B_)),B_}var N_={},xP;function PN(){return xP||(xP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null||typeof r!="object"&&typeof r!="function"}e.isPrimitive=t})(N_)),N_}var I_={},CP;function TN(){return CP||(CP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return r===n||Number.isNaN(r)&&Number.isNaN(n)}e.isEqualsSameValueZero=t})(I_)),I_}var EP;function WV(){return EP||(EP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=kN(),r=PN(),n=TN();function i(d,m,v){return typeof v!="function"?i(d,m,()=>{}):a(d,m,function g(S,_,x,C,A,O){const P=v(S,_,x,C,A,O);return P!==void 0?!!P:a(S,_,g,O)},new Map)}function a(d,m,v,g){if(m===d)return!0;switch(typeof m){case"object":return l(d,m,v,g);case"function":return Object.keys(m).length>0?a(d,{...m},v,g):n.isEqualsSameValueZero(d,m);default:return t.isObject(d)?typeof m=="string"?m==="":!0:n.isEqualsSameValueZero(d,m)}}function l(d,m,v,g){if(m==null)return!0;if(Array.isArray(m))return f(d,m,v,g);if(m instanceof Map)return u(d,m,v,g);if(m instanceof Set)return h(d,m,v,g);const S=Object.keys(m);if(d==null||r.isPrimitive(d))return S.length===0;if(S.length===0)return!0;if(g!=null&&g.has(m))return g.get(m)===d;g==null||g.set(m,d);try{for(let _=0;_<S.length;_++){const x=S[_];if(!r.isPrimitive(d)&&!(x in d)||m[x]===void 0&&d[x]!==void 0||m[x]===null&&d[x]!==null||!v(d[x],m[x],x,d,m,g))return!1}return!0}finally{g==null||g.delete(m)}}function u(d,m,v,g){if(m.size===0)return!0;if(!(d instanceof Map))return!1;for(const[S,_]of m.entries()){const x=d.get(S);if(v(x,_,S,d,m,g)===!1)return!1}return!0}function f(d,m,v,g){if(m.length===0)return!0;if(!Array.isArray(d))return!1;const S=new Set;for(let _=0;_<m.length;_++){const x=m[_];let C=!1;for(let A=0;A<d.length;A++){if(S.has(A))continue;const O=d[A];let P=!1;if(v(O,x,_,d,m,g)&&(P=!0),P){S.add(A),C=!0;break}}if(!C)return!1}return!0}function h(d,m,v,g){return m.size===0?!0:d instanceof Set?f([...d],[...m],v,g):!1}e.isMatchWith=i,e.isSetMatch=h})(L_)),L_}var AP;function DN(){return AP||(AP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=WV();function r(n,i){return t.isMatchWith(n,i,()=>{})}e.isMatch=r})(R_)),R_}var j_={},z_={},H_={},OP;function MN(){return OP||(OP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Object.getOwnPropertySymbols(r).filter(n=>Object.prototype.propertyIsEnumerable.call(r,n))}e.getSymbols=t})(H_)),H_}var F_={},kP;function $w(){return kP||(kP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}e.getTag=t})(F_)),F_}var U_={},PP;function RN(){return PP||(PP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",r="[object String]",n="[object Number]",i="[object Boolean]",a="[object Arguments]",l="[object Symbol]",u="[object Date]",f="[object Map]",h="[object Set]",d="[object Array]",m="[object Function]",v="[object ArrayBuffer]",g="[object Object]",S="[object Error]",_="[object DataView]",x="[object Uint8Array]",C="[object Uint8ClampedArray]",A="[object Uint16Array]",O="[object Uint32Array]",P="[object BigUint64Array]",D="[object Int8Array]",k="[object Int16Array]",R="[object Int32Array]",N="[object BigInt64Array]",$="[object Float32Array]",ee="[object Float64Array]";e.argumentsTag=a,e.arrayBufferTag=v,e.arrayTag=d,e.bigInt64ArrayTag=N,e.bigUint64ArrayTag=P,e.booleanTag=i,e.dataViewTag=_,e.dateTag=u,e.errorTag=S,e.float32ArrayTag=$,e.float64ArrayTag=ee,e.functionTag=m,e.int16ArrayTag=k,e.int32ArrayTag=R,e.int8ArrayTag=D,e.mapTag=f,e.numberTag=n,e.objectTag=g,e.regexpTag=t,e.setTag=h,e.stringTag=r,e.symbolTag=l,e.uint16ArrayTag=A,e.uint32ArrayTag=O,e.uint8ArrayTag=x,e.uint8ClampedArrayTag=C})(U_)),U_}var $_={},TP;function LN(){return TP||(TP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})($_)),$_}var DP;function BN(){return DP||(DP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=MN(),r=$w(),n=RN(),i=PN(),a=LN();function l(d,m){return u(d,void 0,d,new Map,m)}function u(d,m,v,g=new Map,S=void 0){const _=S==null?void 0:S(d,m,v,g);if(_!==void 0)return _;if(i.isPrimitive(d))return d;if(g.has(d))return g.get(d);if(Array.isArray(d)){const x=new Array(d.length);g.set(d,x);for(let C=0;C<d.length;C++)x[C]=u(d[C],C,v,g,S);return Object.hasOwn(d,"index")&&(x.index=d.index),Object.hasOwn(d,"input")&&(x.input=d.input),x}if(d instanceof Date)return new Date(d.getTime());if(d instanceof RegExp){const x=new RegExp(d.source,d.flags);return x.lastIndex=d.lastIndex,x}if(d instanceof Map){const x=new Map;g.set(d,x);for(const[C,A]of d)x.set(C,u(A,C,v,g,S));return x}if(d instanceof Set){const x=new Set;g.set(d,x);for(const C of d)x.add(u(C,void 0,v,g,S));return x}if(typeof Buffer<"u"&&Buffer.isBuffer(d))return d.subarray();if(a.isTypedArray(d)){const x=new(Object.getPrototypeOf(d)).constructor(d.length);g.set(d,x);for(let C=0;C<d.length;C++)x[C]=u(d[C],C,v,g,S);return x}if(d instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&d instanceof SharedArrayBuffer)return d.slice(0);if(d instanceof DataView){const x=new DataView(d.buffer.slice(0),d.byteOffset,d.byteLength);return g.set(d,x),f(x,d,v,g,S),x}if(typeof File<"u"&&d instanceof File){const x=new File([d],d.name,{type:d.type});return g.set(d,x),f(x,d,v,g,S),x}if(typeof Blob<"u"&&d instanceof Blob){const x=new Blob([d],{type:d.type});return g.set(d,x),f(x,d,v,g,S),x}if(d instanceof Error){const x=structuredClone(d);return g.set(d,x),x.message=d.message,x.name=d.name,x.stack=d.stack,x.cause=d.cause,x.constructor=d.constructor,f(x,d,v,g,S),x}if(d instanceof Boolean){const x=new Boolean(d.valueOf());return g.set(d,x),f(x,d,v,g,S),x}if(d instanceof Number){const x=new Number(d.valueOf());return g.set(d,x),f(x,d,v,g,S),x}if(d instanceof String){const x=new String(d.valueOf());return g.set(d,x),f(x,d,v,g,S),x}if(typeof d=="object"&&h(d)){const x=Object.create(Object.getPrototypeOf(d));return g.set(d,x),f(x,d,v,g,S),x}return d}function f(d,m,v=d,g,S){const _=[...Object.keys(m),...t.getSymbols(m)];for(let x=0;x<_.length;x++){const C=_[x],A=Object.getOwnPropertyDescriptor(d,C);(A==null||A.writable)&&(d[C]=u(m[C],C,v,g,S))}}function h(d){switch(r.getTag(d)){case n.argumentsTag:case n.arrayTag:case n.arrayBufferTag:case n.dataViewTag:case n.booleanTag:case n.dateTag:case n.float32ArrayTag:case n.float64ArrayTag:case n.int8ArrayTag:case n.int16ArrayTag:case n.int32ArrayTag:case n.mapTag:case n.numberTag:case n.objectTag:case n.regexpTag:case n.setTag:case n.stringTag:case n.symbolTag:case n.uint8ArrayTag:case n.uint8ClampedArrayTag:case n.uint16ArrayTag:case n.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=l,e.cloneDeepWithImpl=u,e.copyProperties=f})(z_)),z_}var MP;function VV(){return MP||(MP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=BN();function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(j_)),j_}var RP;function YV(){return RP||(RP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=DN(),r=VV();function n(i){return i=r.cloneDeep(i),a=>t.isMatch(a,i)}e.matches=n})(M_)),M_}var K_={},q_={},W_={},LP;function NN(){return LP||(LP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=BN(),r=$w(),n=RN();function i(a,l){return t.cloneDeepWith(a,(u,f,h,d)=>{const m=l==null?void 0:l(u,f,h,d);if(m!==void 0)return m;if(typeof a=="object"){if(r.getTag(a)===n.objectTag&&typeof a.constructor!="function"){const v={};return d.set(a,v),t.copyProperties(v,a,h,d),v}switch(Object.prototype.toString.call(a)){case n.numberTag:case n.stringTag:case n.booleanTag:{const v=new a.constructor(a==null?void 0:a.valueOf());return t.copyProperties(v,a),v}case n.argumentsTag:{const v={};return t.copyProperties(v,a),v.length=a.length,v[Symbol.iterator]=a[Symbol.iterator],v}default:return}}})}e.cloneDeepWith=i})(W_)),W_}var BP;function XV(){return BP||(BP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=NN();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(q_)),q_}var V_={},Y_={},NP;function IN(){return NP||(NP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function r(n,i=Number.MAX_SAFE_INTEGER){switch(typeof n){case"number":return Number.isInteger(n)&&n>=0&&n<i;case"symbol":return!1;case"string":return t.test(n)}}e.isIndex=r})(Y_)),Y_}var X_={},IP;function GV(){return IP||(IP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$w();function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(X_)),X_}var jP;function ZV(){return jP||(jP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=fm(),r=IN(),n=GV(),i=pm();function a(l,u){let f;if(Array.isArray(u)?f=u:typeof u=="string"&&t.isDeepKey(u)&&(l==null?void 0:l[u])==null?f=i.toPath(u):f=[u],f.length===0)return!1;let h=l;for(let d=0;d<f.length;d++){const m=f[d];if((h==null||!Object.hasOwn(h,m))&&!((Array.isArray(h)||n.isArguments(h))&&r.isIndex(m)&&m<h.length))return!1;h=h[m]}return!0}e.has=a})(V_)),V_}var zP;function QV(){return zP||(zP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=DN(),r=dm(),n=XV(),i=mm(),a=ZV();function l(u,f){switch(typeof u){case"object":{Object.is(u==null?void 0:u.valueOf(),-0)&&(u="-0");break}case"number":{u=r.toKey(u);break}}return f=n.cloneDeep(f),function(h){const d=i.get(h,u);return d===void 0?a.has(h,u):f===void 0?d===void 0:t.isMatch(d,f)}}e.matchesProperty=l})(K_)),K_}var HP;function Kw(){return HP||(HP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=wm(),r=qV(),n=YV(),i=QV();function a(l){if(l==null)return t.identity;switch(typeof l){case"function":return l;case"object":return Array.isArray(l)&&l.length===2?i.matchesProperty(l[0],l[1]):n.matches(l);case"string":case"symbol":case"number":return r.property(l)}}e.iteratee=a})(T_)),T_}var FP;function JV(){return FP||(FP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=HV(),r=FV(),n=wm(),i=KV(),a=Kw();function l(u,f=n.identity){return i.isArrayLikeObject(u)?t.uniqBy(Array.from(u),r.ary(a.iteratee(f),1)):[]}e.uniqBy=l})(w_)),w_}var G_,UP;function eY(){return UP||(UP=1,G_=JV().uniqBy),G_}var tY=eY();const $P=Hr(tY);function jN(e,t,r){return t===!0?$P(e,r):typeof t=="function"?$P(e,t):e}var Z_={exports:{}},Q_={},J_={exports:{}},eb={};/**
 * @license React
 * use-sync-external-store-shim.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var KP;function rY(){if(KP)return eb;KP=1;var e=tu();function t(m,v){return m===v&&(m!==0||1/m===1/v)||m!==m&&v!==v}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,a=e.useLayoutEffect,l=e.useDebugValue;function u(m,v){var g=v(),S=n({inst:{value:g,getSnapshot:v}}),_=S[0].inst,x=S[1];return a(function(){_.value=g,_.getSnapshot=v,f(_)&&x({inst:_})},[m,g,v]),i(function(){return f(_)&&x({inst:_}),m(function(){f(_)&&x({inst:_})})},[m]),l(g),g}function f(m){var v=m.getSnapshot;m=m.value;try{var g=v();return!r(m,g)}catch{return!0}}function h(m,v){return v()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:u;return eb.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,eb}var qP;function nY(){return qP||(qP=1,J_.exports=rY()),J_.exports}/**
 * @license React
 * use-sync-external-store-shim/with-selector.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var WP;function iY(){if(WP)return Q_;WP=1;var e=tu(),t=nY();function r(h,d){return h===d&&(h!==0||1/h===1/d)||h!==h&&d!==d}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,a=e.useRef,l=e.useEffect,u=e.useMemo,f=e.useDebugValue;return Q_.useSyncExternalStoreWithSelector=function(h,d,m,v,g){var S=a(null);if(S.current===null){var _={hasValue:!1,value:null};S.current=_}else _=S.current;S=u(function(){function C(k){if(!A){if(A=!0,O=k,k=v(k),g!==void 0&&_.hasValue){var R=_.value;if(g(R,k))return P=R}return P=k}if(R=P,n(O,k))return R;var N=v(k);return g!==void 0&&g(R,N)?(O=k,R):(O=k,P=N)}var A=!1,O,P,D=m===void 0?null:m;return[function(){return C(d())},D===null?void 0:function(){return C(D())}]},[d,m,v,g]);var x=i(h,S[0],S[1]);return l(function(){_.hasValue=!0,_.value=x},[x]),f(x),x},Q_}var VP;function aY(){return VP||(VP=1,Z_.exports=iY()),Z_.exports}var sY=aY(),qw=w.createContext(null),oY=e=>e,Je=()=>{var e=w.useContext(qw);return e?e.store.dispatch:oY},ep=()=>{},lY=()=>ep,uY=(e,t)=>e===t;function he(e){var t=w.useContext(qw);return sY.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:lY,t?t.store.getState:ep,t?t.store.getState:ep,t?e:ep,uY)}function cY(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function hY(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function fY(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var YP=e=>Array.isArray(e)?e:[e];function dY(e){const t=Array.isArray(e[0])?e[0]:e;return fY(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function pY(e,t){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var mY=class{constructor(e){this.value=e}deref(){return this.value}},vY=typeof WeakRef<"u"?WeakRef:mY,gY=0,XP=1;function Dd(){return{s:gY,v:void 0,o:null,p:null}}function zN(e,t={}){let r=Dd();const{resultEqualityCheck:n}=t;let i,a=0;function l(){var m;let u=r;const{length:f}=arguments;for(let v=0,g=f;v<g;v++){const S=arguments[v];if(typeof S=="function"||typeof S=="object"&&S!==null){let _=u.o;_===null&&(u.o=_=new WeakMap);const x=_.get(S);x===void 0?(u=Dd(),_.set(S,u)):u=x}else{let _=u.p;_===null&&(u.p=_=new Map);const x=_.get(S);x===void 0?(u=Dd(),_.set(S,u)):u=x}}const h=u;let d;if(u.s===XP)d=u.v;else if(d=e.apply(null,arguments),a++,n){const v=((m=i==null?void 0:i.deref)==null?void 0:m.call(i))??i;v!=null&&n(v,d)&&(d=v,a!==0&&a--),i=typeof d=="object"&&d!==null||typeof d=="function"?new vY(d):d}return h.s=XP,h.v=d,d}return l.clearCache=()=>{r=Dd(),l.resetResultsCount()},l.resultsCount=()=>a,l.resetResultsCount=()=>{a=0},l}function yY(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let a=0,l=0,u,f={},h=i.pop();typeof h=="object"&&(f=h,h=i.pop()),cY(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const d={...r,...f},{memoize:m,memoizeOptions:v=[],argsMemoize:g=zN,argsMemoizeOptions:S=[]}=d,_=YP(v),x=YP(S),C=dY(i),A=m(function(){return a++,h.apply(null,arguments)},..._),O=g(function(){l++;const D=pY(C,arguments);return u=A.apply(null,D),u},...x);return Object.assign(O,{resultFunc:h,memoizedResultFunc:A,dependencies:C,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>u,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:m,argsMemoize:g})};return Object.assign(n,{withTypes:()=>n}),n}var X=yY(zN),_Y=Object.assign((e,t=X)=>{hY(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),n=r.map(a=>e[a]);return t(n,(...a)=>a.reduce((l,u,f)=>(l[r[f]]=u,l),{}))},{withTypes:()=>_Y}),tb={},rb={},nb={},GP;function bY(){return GP||(GP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"?1:n===null?2:n===void 0?3:n!==n?4:0}const r=(n,i,a)=>{if(n!==i){const l=t(n),u=t(i);if(l===u&&l===0){if(n<i)return a==="desc"?1:-1;if(n>i)return a==="desc"?-1:1}return a==="desc"?u-l:l-u}return 0};e.compareValues=r})(nb)),nb}var ib={},ab={},ZP;function HN(){return ZP||(ZP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(ab)),ab}var QP;function SY(){return QP||(QP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=HN(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,l){return Array.isArray(a)?!1:typeof a=="number"||typeof a=="boolean"||a==null||t.isSymbol(a)?!0:typeof a=="string"&&(n.test(a)||!r.test(a))||l!=null&&Object.hasOwn(l,a)}e.isKey=i})(ib)),ib}var JP;function wY(){return JP||(JP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=bY(),r=SY(),n=pm();function i(a,l,u,f){if(a==null)return[];u=f?void 0:u,Array.isArray(a)||(a=Object.values(a)),Array.isArray(l)||(l=l==null?[null]:[l]),l.length===0&&(l=[null]),Array.isArray(u)||(u=u==null?[]:[u]),u=u.map(g=>String(g));const h=(g,S)=>{let _=g;for(let x=0;x<S.length&&_!=null;++x)_=_[S[x]];return _},d=(g,S)=>S==null||g==null?S:typeof g=="object"&&"key"in g?Object.hasOwn(S,g.key)?S[g.key]:h(S,g.path):typeof g=="function"?g(S):Array.isArray(g)?h(S,g):typeof S=="object"?S[g]:S,m=l.map(g=>(Array.isArray(g)&&g.length===1&&(g=g[0]),g==null||typeof g=="function"||Array.isArray(g)||r.isKey(g)?g:{key:g,path:n.toPath(g)}));return a.map(g=>({original:g,criteria:m.map(S=>d(S,g))})).slice().sort((g,S)=>{for(let _=0;_<m.length;_++){const x=t.compareValues(g.criteria[_],S.criteria[_],u[_]);if(x!==0)return x}return 0}).map(g=>g.original)}e.orderBy=i})(rb)),rb}var sb={},eT;function xY(){return eT||(eT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n=1){const i=[],a=Math.floor(n),l=(u,f)=>{for(let h=0;h<u.length;h++){const d=u[h];Array.isArray(d)&&f<a?l(d,f+1):i.push(d)}};return l(r,0),i}e.flatten=t})(sb)),sb}var ob={},tT;function FN(){return tT||(tT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=IN(),r=Ph(),n=kN(),i=TN();function a(l,u,f){return n.isObject(f)&&(typeof u=="number"&&r.isArrayLike(f)&&t.isIndex(u)&&u<f.length||typeof u=="string"&&u in f)?i.isEqualsSameValueZero(f[u],l):!1}e.isIterateeCall=a})(ob)),ob}var rT;function CY(){return rT||(rT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=wY(),r=xY(),n=FN();function i(a,...l){const u=l.length;return u>1&&n.isIterateeCall(a,l[0],l[1])?l=[]:u>2&&n.isIterateeCall(l[0],l[1],l[2])&&(l=[l[0]]),t.orderBy(a,r.flatten(l),["asc"])}e.sortBy=i})(tb)),tb}var lb,nT;function EY(){return nT||(nT=1,lb=CY().sortBy),lb}var AY=EY();const xm=Hr(AY);var UN=e=>e.legend.settings,OY=e=>e.legend.size,kY=e=>e.legend.payload,PY=X([kY,UN],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?xm(n,r):n});function TY(){return he(PY)}var Md=1;function $N(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=w.useState({height:0,left:0,top:0,width:0}),n=w.useCallback(i=>{if(i!=null){var a=i.getBoundingClientRect(),l={height:a.height,left:a.left,top:a.top,width:a.width};(Math.abs(l.height-t.height)>Md||Math.abs(l.left-t.left)>Md||Math.abs(l.top-t.top)>Md||Math.abs(l.width-t.width)>Md)&&r({height:l.height,left:l.left,top:l.top,width:l.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,n]}function Lr(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var DY=typeof Symbol=="function"&&Symbol.observable||"@@observable",iT=DY,ub=()=>Math.random().toString(36).substring(7).split("").join("."),MY={INIT:`@@redux/INIT${ub()}`,REPLACE:`@@redux/REPLACE${ub()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ub()}`},Sp=MY;function Ww(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function KN(e,t,r){if(typeof e!="function")throw new Error(Lr(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Lr(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Lr(1));return r(KN)(e,t)}let n=e,i=t,a=new Map,l=a,u=0,f=!1;function h(){l===a&&(l=new Map,a.forEach((x,C)=>{l.set(C,x)}))}function d(){if(f)throw new Error(Lr(3));return i}function m(x){if(typeof x!="function")throw new Error(Lr(4));if(f)throw new Error(Lr(5));let C=!0;h();const A=u++;return l.set(A,x),function(){if(C){if(f)throw new Error(Lr(6));C=!1,h(),l.delete(A),a=null}}}function v(x){if(!Ww(x))throw new Error(Lr(7));if(typeof x.type>"u")throw new Error(Lr(8));if(typeof x.type!="string")throw new Error(Lr(17));if(f)throw new Error(Lr(9));try{f=!0,i=n(i,x)}finally{f=!1}return(a=l).forEach(A=>{A()}),x}function g(x){if(typeof x!="function")throw new Error(Lr(10));n=x,v({type:Sp.REPLACE})}function S(){const x=m;return{subscribe(C){if(typeof C!="object"||C===null)throw new Error(Lr(11));function A(){const P=C;P.next&&P.next(d())}return A(),{unsubscribe:x(A)}},[iT](){return this}}}return v({type:Sp.INIT}),{dispatch:v,subscribe:m,getState:d,replaceReducer:g,[iT]:S}}function RY(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:Sp.INIT})>"u")throw new Error(Lr(12));if(typeof r(void 0,{type:Sp.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Lr(13))})}function qN(e){const t=Object.keys(e),r={};for(let a=0;a<t.length;a++){const l=t[a];typeof e[l]=="function"&&(r[l]=e[l])}const n=Object.keys(r);let i;try{RY(r)}catch(a){i=a}return function(l={},u){if(i)throw i;let f=!1;const h={};for(let d=0;d<n.length;d++){const m=n[d],v=r[m],g=l[m],S=v(g,u);if(typeof S>"u")throw u&&u.type,new Error(Lr(14));h[m]=S,f=f||S!==g}return f=f||n.length!==Object.keys(l).length,f?h:l}}function wp(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function LY(...e){return t=>(r,n)=>{const i=t(r,n);let a=()=>{throw new Error(Lr(15))};const l={getState:i.getState,dispatch:(f,...h)=>a(f,...h)},u=e.map(f=>f(l));return a=wp(...u)(i.dispatch),{...i,dispatch:a}}}function WN(e){return Ww(e)&&"type"in e&&typeof e.type=="string"}var VN=Symbol.for("immer-nothing"),aT=Symbol.for("immer-draftable"),Bn=Symbol.for("immer-state");function _i(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Wl=Object.getPrototypeOf;function Oo(e){return!!e&&!!e[Bn]}function Sa(e){var t;return e?YN(e)||Array.isArray(e)||!!e[aT]||!!((t=e.constructor)!=null&&t[aT])||Th(e)||Em(e):!1}var BY=Object.prototype.constructor.toString();function YN(e){if(!e||typeof e!="object")return!1;const t=Wl(e);if(t===null)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===BY}function xp(e,t){Cm(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function Cm(e){const t=e[Bn];return t?t.type_:Array.isArray(e)?1:Th(e)?2:Em(e)?3:0}function vS(e,t){return Cm(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function XN(e,t,r){const n=Cm(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function NY(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Th(e){return e instanceof Map}function Em(e){return e instanceof Set}function uo(e){return e.copy_||e.base_}function gS(e,t){if(Th(e))return new Map(e);if(Em(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=YN(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[Bn];let i=Reflect.ownKeys(n);for(let a=0;a<i.length;a++){const l=i[a],u=n[l];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(n[l]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[l]})}return Object.create(Wl(e),n)}else{const n=Wl(e);if(n!==null&&r)return{...e};const i=Object.create(n);return Object.assign(i,e)}}function Vw(e,t=!1){return Am(e)||Oo(e)||!Sa(e)||(Cm(e)>1&&Object.defineProperties(e,{set:{value:Rd},add:{value:Rd},clear:{value:Rd},delete:{value:Rd}}),Object.freeze(e),t&&Object.values(e).forEach(r=>Vw(r,!0))),e}function Rd(){_i(2)}function Am(e){return Object.isFrozen(e)}var IY={};function ko(e){const t=IY[e];return t||_i(0,e),t}var lh;function GN(){return lh}function jY(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function sT(e,t){t&&(ko("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function yS(e){_S(e),e.drafts_.forEach(zY),e.drafts_=null}function _S(e){e===lh&&(lh=e.parent_)}function oT(e){return lh=jY(lh,e)}function zY(e){const t=e[Bn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function lT(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[Bn].modified_&&(yS(t),_i(4)),Sa(e)&&(e=Cp(t,e),t.parent_||Ep(t,e)),t.patches_&&ko("Patches").generateReplacementPatches_(r[Bn].base_,e,t.patches_,t.inversePatches_)):e=Cp(t,r,[]),yS(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==VN?e:void 0}function Cp(e,t,r){if(Am(t))return t;const n=t[Bn];if(!n)return xp(t,(i,a)=>uT(e,n,t,i,a,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return Ep(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const i=n.copy_;let a=i,l=!1;n.type_===3&&(a=new Set(i),i.clear(),l=!0),xp(a,(u,f)=>uT(e,n,i,u,f,r,l)),Ep(e,i,!1),r&&e.patches_&&ko("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function uT(e,t,r,n,i,a,l){if(Oo(i)){const u=a&&t&&t.type_!==3&&!vS(t.assigned_,n)?a.concat(n):void 0,f=Cp(e,i,u);if(XN(r,n,f),Oo(f))e.canAutoFreeze_=!1;else return}else l&&r.add(i);if(Sa(i)&&!Am(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Cp(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(Th(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Ep(e,i)}}function Ep(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Vw(t,r)}function HY(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:GN(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,a=Yw;r&&(i=[n],a=uh);const{revoke:l,proxy:u}=Proxy.revocable(i,a);return n.draft_=u,n.revoke_=l,u}var Yw={get(e,t){if(t===Bn)return e;const r=uo(e);if(!vS(r,t))return FY(e,r,t);const n=r[t];return e.finalized_||!Sa(n)?n:n===cb(e.base_,t)?(hb(e),e.copy_[t]=SS(n,e)):n},has(e,t){return t in uo(e)},ownKeys(e){return Reflect.ownKeys(uo(e))},set(e,t,r){const n=ZN(uo(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=cb(uo(e),t),a=i==null?void 0:i[Bn];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(NY(r,i)&&(r!==void 0||vS(e.base_,t)))return!0;hb(e),bS(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return cb(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,hb(e),bS(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=uo(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){_i(11)},getPrototypeOf(e){return Wl(e.base_)},setPrototypeOf(){_i(12)}},uh={};xp(Yw,(e,t)=>{uh[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});uh.deleteProperty=function(e,t){return uh.set.call(this,e,t,void 0)};uh.set=function(e,t,r){return Yw.set.call(this,e[0],t,r,e[0])};function cb(e,t){const r=e[Bn];return(r?uo(r):e)[t]}function FY(e,t,r){var i;const n=ZN(t,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function ZN(e,t){if(!(t in e))return;let r=Wl(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Wl(r)}}function bS(e){e.modified_||(e.modified_=!0,e.parent_&&bS(e.parent_))}function hb(e){e.copy_||(e.copy_=gS(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var UY=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const a=r;r=t;const l=this;return function(f=a,...h){return l.produce(f,d=>r.call(this,d,...h))}}typeof r!="function"&&_i(6),n!==void 0&&typeof n!="function"&&_i(7);let i;if(Sa(t)){const a=oT(this),l=SS(t,void 0);let u=!0;try{i=r(l),u=!1}finally{u?yS(a):_S(a)}return sT(a,n),lT(i,a)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===VN&&(i=void 0),this.autoFreeze_&&Vw(i,!0),n){const a=[],l=[];ko("Patches").generateReplacementPatches_(t,i,a,l),n(a,l)}return i}else _i(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(l,...u)=>this.produceWithPatches(l,f=>t(f,...u));let n,i;return[this.produce(t,r,(l,u)=>{n=l,i=u}),n,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Sa(e)||_i(8),Oo(e)&&(e=ga(e));const t=oT(this),r=SS(e,void 0);return r[Bn].isManual_=!0,_S(t),r}finishDraft(e,t){const r=e&&e[Bn];(!r||!r.isManual_)&&_i(9);const{scope_:n}=r;return sT(n,t),lT(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));const n=ko("Patches").applyPatches_;return Oo(e)?n(e,t):this.produce(e,i=>n(i,t))}};function SS(e,t){const r=Th(e)?ko("MapSet").proxyMap_(e,t):Em(e)?ko("MapSet").proxySet_(e,t):HY(e,t);return(t?t.scope_:GN()).drafts_.push(r),r}function ga(e){return Oo(e)||_i(10,e),QN(e)}function QN(e){if(!Sa(e)||Am(e))return e;const t=e[Bn];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=gS(e,t.scope_.immer_.useStrictShallowCopy_)}else r=gS(e,!0);return xp(r,(n,i)=>{XN(r,n,QN(i))}),t&&(t.finalized_=!1),r}var $Y=new UY,JN=$Y.produce;function e3(e){return({dispatch:r,getState:n})=>i=>a=>typeof a=="function"?a(r,n,e):i(a)}var KY=e3(),qY=e3,WY=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?wp:wp.apply(null,arguments)};function li(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(Ln(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>WN(n)&&n.type===e,r}var t3=class Vc extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Vc.prototype)}static get[Symbol.species](){return Vc}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Vc(...t[0].concat(this)):new Vc(...t.concat(this))}};function cT(e){return Sa(e)?JN(e,()=>{}):e}function Ld(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function VY(e){return typeof e=="boolean"}var YY=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=t??{};let l=new t3;return r&&(VY(r)?l.push(KY):l.push(qY(r.extraArgument))),l},XY="RTK_autoBatch",hT=e=>t=>{setTimeout(t,e)},GY=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,a=!1,l=!1;const u=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:hT(10):e.type==="callback"?e.queueNotification:hT(e.timeout),h=()=>{l=!1,a&&(a=!1,u.forEach(d=>d()))};return Object.assign({},n,{subscribe(d){const m=()=>i&&d(),v=n.subscribe(m);return u.add(d),()=>{v(),u.delete(d)}},dispatch(d){var m;try{return i=!((m=d==null?void 0:d.meta)!=null&&m[XY]),a=!i,a&&(l||(l=!0,f(h))),n.dispatch(d)}finally{i=!0}}})},ZY=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new t3(e);return n&&i.push(GY(typeof n=="object"?n:void 0)),i};function QY(e){const t=YY(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:a=void 0,enhancers:l=void 0}=e||{};let u;if(typeof r=="function")u=r;else if(Ww(r))u=qN(r);else throw new Error(Ln(1));let f;typeof n=="function"?f=n(t):f=t();let h=wp;i&&(h=WY({trace:!1,...typeof i=="object"&&i}));const d=LY(...f),m=ZY(d);let v=typeof l=="function"?l(m):m();const g=h(...v);return KN(u,a,g)}function r3(e){const t={},r=[];let n;const i={addCase(a,l){const u=typeof a=="string"?a:a.type;if(!u)throw new Error(Ln(28));if(u in t)throw new Error(Ln(29));return t[u]=l,i},addAsyncThunk(a,l){return l.pending&&(t[a.pending.type]=l.pending),l.rejected&&(t[a.rejected.type]=l.rejected),l.fulfilled&&(t[a.fulfilled.type]=l.fulfilled),l.settled&&r.push({matcher:a.settled,reducer:l.settled}),i},addMatcher(a,l){return r.push({matcher:a,reducer:l}),i},addDefaultCase(a){return n=a,i}};return e(i),[t,r,n]}function JY(e){return typeof e=="function"}function eX(e,t){let[r,n,i]=r3(t),a;if(JY(e))a=()=>cT(e());else{const u=cT(e);a=()=>u}function l(u=a(),f){let h=[r[f.type],...n.filter(({matcher:d})=>d(f)).map(({reducer:d})=>d)];return h.filter(d=>!!d).length===0&&(h=[i]),h.reduce((d,m)=>{if(m)if(Oo(d)){const g=m(d,f);return g===void 0?d:g}else{if(Sa(d))return JN(d,v=>m(v,f));{const v=m(d,f);if(v===void 0){if(d===null)return d;throw Error("A case reducer on a non-draftable value must not return undefined")}return v}}return d},u)}return l.getInitialState=a,l}var tX="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",rX=(e=21)=>{let t="",r=e;for(;r--;)t+=tX[Math.random()*64|0];return t},nX=Symbol.for("rtk-slice-createasyncthunk");function iX(e,t){return`${e}/${t}`}function aX({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[nX];return function(i){const{name:a,reducerPath:l=a}=i;if(!a)throw new Error(Ln(11));const u=(typeof i.reducers=="function"?i.reducers(oX()):i.reducers)||{},f=Object.keys(u),h={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(P,D){const k=typeof P=="string"?P:P.type;if(!k)throw new Error(Ln(12));if(k in h.sliceCaseReducersByType)throw new Error(Ln(13));return h.sliceCaseReducersByType[k]=D,d},addMatcher(P,D){return h.sliceMatchers.push({matcher:P,reducer:D}),d},exposeAction(P,D){return h.actionCreators[P]=D,d},exposeCaseReducer(P,D){return h.sliceCaseReducersByName[P]=D,d}};f.forEach(P=>{const D=u[P],k={reducerName:P,type:iX(a,P),createNotation:typeof i.reducers=="function"};uX(D)?hX(k,D,d,t):lX(k,D,d)});function m(){const[P={},D=[],k=void 0]=typeof i.extraReducers=="function"?r3(i.extraReducers):[i.extraReducers],R={...P,...h.sliceCaseReducersByType};return eX(i.initialState,N=>{for(let $ in R)N.addCase($,R[$]);for(let $ of h.sliceMatchers)N.addMatcher($.matcher,$.reducer);for(let $ of D)N.addMatcher($.matcher,$.reducer);k&&N.addDefaultCase(k)})}const v=P=>P,g=new Map,S=new WeakMap;let _;function x(P,D){return _||(_=m()),_(P,D)}function C(){return _||(_=m()),_.getInitialState()}function A(P,D=!1){function k(N){let $=N[P];return typeof $>"u"&&D&&($=Ld(S,k,C)),$}function R(N=v){const $=Ld(g,D,()=>new WeakMap);return Ld($,N,()=>{const ee={};for(const[F,z]of Object.entries(i.selectors??{}))ee[F]=sX(z,N,()=>Ld(S,N,C),D);return ee})}return{reducerPath:P,getSelectors:R,get selectors(){return R(k)},selectSlice:k}}const O={name:a,reducer:x,actions:h.actionCreators,caseReducers:h.sliceCaseReducersByName,getInitialState:C,...A(l),injectInto(P,{reducerPath:D,...k}={}){const R=D??l;return P.inject({reducerPath:R,reducer:x},k),{...O,...A(R,!0)}}};return O}}function sX(e,t,r,n){function i(a,...l){let u=t(a);return typeof u>"u"&&n&&(u=r()),e(u,...l)}return i.unwrapped=e,i}var In=aX();function oX(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function lX({type:e,reducerName:t,createNotation:r},n,i){let a,l;if("reducer"in n){if(r&&!cX(n))throw new Error(Ln(17));a=n.reducer,l=n.prepare}else a=n;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,l?li(e,l):li(e))}function uX(e){return e._reducerDefinitionType==="asyncThunk"}function cX(e){return e._reducerDefinitionType==="reducerWithPrepare"}function hX({type:e,reducerName:t},r,n,i){if(!i)throw new Error(Ln(18));const{payloadCreator:a,fulfilled:l,pending:u,rejected:f,settled:h,options:d}=r,m=i(e,a,d);n.exposeAction(t,m),l&&n.addCase(m.fulfilled,l),u&&n.addCase(m.pending,u),f&&n.addCase(m.rejected,f),h&&n.addMatcher(m.settled,h),n.exposeCaseReducer(t,{fulfilled:l||Bd,pending:u||Bd,rejected:f||Bd,settled:h||Bd})}function Bd(){}var fX="task",n3="listener",i3="completed",Xw="cancelled",dX=`task-${Xw}`,pX=`task-${i3}`,wS=`${n3}-${Xw}`,mX=`${n3}-${i3}`,Om=class{constructor(e){rt(this,"name","TaskAbortError");rt(this,"message");this.code=e,this.message=`${fX} ${Xw} (reason: ${e})`}},Gw=(e,t)=>{if(typeof e!="function")throw new TypeError(Ln(32))},Ap=()=>{},a3=(e,t=Ap)=>(e.catch(t),e),s3=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),bo=(e,t)=>{const r=e.signal;r.aborted||("reason"in r||Object.defineProperty(r,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},So=e=>{if(e.aborted){const{reason:t}=e;throw new Om(t)}};function o3(e,t){let r=Ap;return new Promise((n,i)=>{const a=()=>i(new Om(e.reason));if(e.aborted){a();return}r=s3(e,a),t.finally(()=>r()).then(n,i)}).finally(()=>{r=Ap})}var vX=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof Om?"cancelled":"rejected",error:r}}finally{t==null||t()}},Op=e=>t=>a3(o3(e,t).then(r=>(So(e),r))),l3=e=>{const t=Op(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:zl}=Object,fT={},km="listenerMiddleware",gX=(e,t)=>{const r=n=>s3(e,()=>bo(n,e.reason));return(n,i)=>{Gw(n);const a=new AbortController;r(a);const l=vX(async()=>{So(e),So(a.signal);const u=await n({pause:Op(a.signal),delay:l3(a.signal),signal:a.signal});return So(a.signal),u},()=>bo(a,pX));return i!=null&&i.autoJoin&&t.push(l.catch(Ap)),{result:Op(e)(l),cancel(){bo(a,dX)}}}},yX=(e,t)=>{const r=async(n,i)=>{So(t);let a=()=>{};const u=[new Promise((f,h)=>{let d=e({predicate:n,effect:(m,v)=>{v.unsubscribe(),f([m,v.getState(),v.getOriginalState()])}});a=()=>{d(),h()}})];i!=null&&u.push(new Promise(f=>setTimeout(f,i,null)));try{const f=await o3(t,Promise.race(u));return So(t),f}finally{a()}};return(n,i)=>a3(r(n,i))},u3=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:a}=e;if(t)i=li(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(Ln(21));return Gw(a),{predicate:i,type:t,effect:a}},c3=zl(e=>{const{type:t,predicate:r,effect:n}=u3(e);return{id:rX(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Ln(22))}}},{withTypes:()=>c3}),dT=(e,t)=>{const{type:r,effect:n,predicate:i}=u3(t);return Array.from(e.values()).find(a=>(typeof r=="string"?a.type===r:a.predicate===i)&&a.effect===n)},xS=e=>{e.pending.forEach(t=>{bo(t,wS)})},_X=e=>()=>{e.forEach(xS),e.clear()},pT=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},h3=zl(li(`${km}/add`),{withTypes:()=>h3}),bX=li(`${km}/removeAll`),f3=zl(li(`${km}/remove`),{withTypes:()=>f3}),SX=(...e)=>{console.error(`${km}/error`,...e)},Dh=(e={})=>{const t=new Map,{extra:r,onError:n=SX}=e;Gw(n);const i=d=>(d.unsubscribe=()=>t.delete(d.id),t.set(d.id,d),m=>{d.unsubscribe(),m!=null&&m.cancelActive&&xS(d)}),a=d=>{const m=dT(t,d)??c3(d);return i(m)};zl(a,{withTypes:()=>a});const l=d=>{const m=dT(t,d);return m&&(m.unsubscribe(),d.cancelActive&&xS(m)),!!m};zl(l,{withTypes:()=>l});const u=async(d,m,v,g)=>{const S=new AbortController,_=yX(a,S.signal),x=[];try{d.pending.add(S),await Promise.resolve(d.effect(m,zl({},v,{getOriginalState:g,condition:(C,A)=>_(C,A).then(Boolean),take:_,delay:l3(S.signal),pause:Op(S.signal),extra:r,signal:S.signal,fork:gX(S.signal,x),unsubscribe:d.unsubscribe,subscribe:()=>{t.set(d.id,d)},cancelActiveListeners:()=>{d.pending.forEach((C,A,O)=>{C!==S&&(bo(C,wS),O.delete(C))})},cancel:()=>{bo(S,wS),d.pending.delete(S)},throwIfCancelled:()=>{So(S.signal)}})))}catch(C){C instanceof Om||pT(n,C,{raisedBy:"effect"})}finally{await Promise.all(x),bo(S,mX),d.pending.delete(S)}},f=_X(t);return{middleware:d=>m=>v=>{if(!WN(v))return m(v);if(h3.match(v))return a(v.payload);if(bX.match(v)){f();return}if(f3.match(v))return l(v.payload);let g=d.getState();const S=()=>{if(g===fT)throw new Error(Ln(23));return g};let _;try{if(_=m(v),t.size>0){const x=d.getState(),C=Array.from(t.values());for(const A of C){let O=!1;try{O=A.predicate(v,x,g)}catch(P){O=!1,pT(n,P,{raisedBy:"predicate"})}O&&u(A,v,d,S)}}}finally{g=fT}return _},startListening:a,stopListening:l,clearListeners:f}};function Ln(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var wX={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},d3=In({name:"chartLayout",initialState:wX,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,i,a;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(a=t.payload.left)!==null&&a!==void 0?a:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:p3,setLayout:xX,setChartSize:m3,setScale:CX}=d3.actions,EX=d3.reducer;function mT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mT(Object(r),!0).forEach(function(n){AX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AX(e,t,r){return(t=OX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function OX(e){var t=kX(e,"string");return typeof t=="symbol"?t:t+""}function kX(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var kp=Math.PI/180,Pp=e=>e*Math.PI/180,PX=e=>e*180/Math.PI,lt=(e,t,r,n)=>({x:e+Math.cos(-kp*n)*r,y:t+Math.sin(-kp*n)*r}),v3=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},TX=(e,t)=>{var{x:r,y:n}=e,{x:i,y:a}=t;return Math.sqrt((r-i)**2+(n-a)**2)},DX=(e,t)=>{var{x:r,y:n}=e,{cx:i,cy:a}=t,l=TX({x:r,y:n},{x:i,y:a});if(l<=0)return{radius:l,angle:0};var u=(r-i)/l,f=Math.acos(u);return n>a&&(f=2*Math.PI-f),{radius:l,angle:PX(f),angleInRadian:f}},MX=e=>{var{startAngle:t,endAngle:r}=e,n=Math.floor(t/360),i=Math.floor(r/360),a=Math.min(n,i);return{startAngle:t-a*360,endAngle:r-a*360}},RX=(e,t)=>{var{startAngle:r,endAngle:n}=t,i=Math.floor(r/360),a=Math.floor(n/360),l=Math.min(i,a);return e+l*360},LX=(e,t)=>{var{x:r,y:n}=e,{radius:i,angle:a}=DX({x:r,y:n},t),{innerRadius:l,outerRadius:u}=t;if(i<l||i>u||i===0)return null;var{startAngle:f,endAngle:h}=MX(t),d=a,m;if(f<=h){for(;d>h;)d-=360;for(;d<f;)d+=360;m=d>=f&&d<=h}else{for(;d>f;)d-=360;for(;d<h;)d+=360;m=d>=h&&d<=f}return m?vT(vT({},t),{},{radius:i,angle:RX(d,t)}):null},g3=e=>!w.isValidElement(e)&&typeof e!="function"&&typeof e!="boolean"&&e!=null?e.className:"";function y3(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function gT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ii(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gT(Object(r),!0).forEach(function(n){BX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function BX(e,t,r){return(t=NX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NX(e){var t=IX(e,"string");return typeof t=="symbol"?t:t+""}function IX(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Fe(e,t,r){return at(e)||at(t)?r:Cr(t)?ba(e,t,r):typeof t=="function"?t(e):r}var jX=(e,t,r,n,i)=>{var a,l=-1,u=(a=t==null?void 0:t.length)!==null&&a!==void 0?a:0;if(u<=1||e==null)return 0;if(n==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var f=0;f<u;f++){var h=f>0?r[f-1].coordinate:r[u-1].coordinate,d=r[f].coordinate,m=f>=u-1?r[0].coordinate:r[f+1].coordinate,v=void 0;if(xr(d-h)!==xr(m-d)){var g=[];if(xr(m-d)===xr(i[1]-i[0])){v=m;var S=d+i[1]-i[0];g[0]=Math.min(S,(S+h)/2),g[1]=Math.max(S,(S+h)/2)}else{v=h;var _=m+i[1]-i[0];g[0]=Math.min(d,(_+d)/2),g[1]=Math.max(d,(_+d)/2)}var x=[Math.min(d,(v+d)/2),Math.max(d,(v+d)/2)];if(e>x[0]&&e<=x[1]||e>=g[0]&&e<=g[1]){({index:l}=r[f]);break}}else{var C=Math.min(h,m),A=Math.max(h,m);if(e>(C+d)/2&&e<=(A+d)/2){({index:l}=r[f]);break}}}else if(t){for(var O=0;O<u;O++)if(O===0&&e<=(t[O].coordinate+t[O+1].coordinate)/2||O>0&&O<u-1&&e>(t[O].coordinate+t[O-1].coordinate)/2&&e<=(t[O].coordinate+t[O+1].coordinate)/2||O===u-1&&e>(t[O].coordinate+t[O-1].coordinate)/2){({index:l}=t[O]);break}}return l},zX=(e,t,r)=>{if(t&&r){var{width:n,height:i}=r,{align:a,verticalAlign:l,layout:u}=t;if((u==="vertical"||u==="horizontal"&&l==="middle")&&a!=="center"&&ye(e[a]))return ii(ii({},e),{},{[a]:e[a]+(n||0)});if((u==="horizontal"||u==="vertical"&&a==="center")&&l!=="middle"&&ye(e[l]))return ii(ii({},e),{},{[l]:e[l]+(i||0)})}return e},Ci=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",_3=(e,t,r,n)=>{if(n)return e.map(u=>u.coordinate);var i,a,l=e.map(u=>(u.coordinate===t&&(i=!0),u.coordinate===r&&(a=!0),u.coordinate));return i||l.push(t),a||l.push(r),l},b3=(e,t,r)=>{if(!e)return null;var{duplicateDomain:n,type:i,range:a,scale:l,realScaleType:u,isCategorical:f,categoricalDomain:h,tickCount:d,ticks:m,niceTicks:v,axisType:g}=e;if(!l)return null;var S=u==="scaleBand"&&l.bandwidth?l.bandwidth()/2:2,_=i==="category"&&l.bandwidth?l.bandwidth()/S:0;if(_=g==="angleAxis"&&a&&a.length>=2?xr(a[0]-a[1])*2*_:_,m||v){var x=(m||v||[]).map((C,A)=>{var O=n?n.indexOf(C):C;return{coordinate:l(O)+_,value:C,offset:_,index:A}});return x.filter(C=>!Er(C.coordinate))}return f&&h?h.map((C,A)=>({coordinate:l(C)+_,value:C,index:A,offset:_})):l.ticks&&d!=null?l.ticks(d).map((C,A)=>({coordinate:l(C)+_,value:C,offset:_,index:A})):l.domain().map((C,A)=>({coordinate:l(C)+_,value:n?n[C]:C,index:A,offset:_}))},yT=1e-4,HX=e=>{var t=e.domain();if(!(!t||t.length<=2)){var r=t.length,n=e.range(),i=Math.min(n[0],n[1])-yT,a=Math.max(n[0],n[1])+yT,l=e(t[0]),u=e(t[r-1]);(l<i||l>a||u<i||u>a)&&e.domain([t[0],t[r-1]])}},FX=(e,t)=>{if(!t||t.length!==2||!ye(t[0])||!ye(t[1]))return e;var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!ye(e[0])||e[0]<r)&&(i[0]=r),(!ye(e[1])||e[1]>n)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]<r&&(i[1]=r),i},UX=e=>{var t=e.length;if(!(t<=0))for(var r=0,n=e[0].length;r<n;++r)for(var i=0,a=0,l=0;l<t;++l){var u=Er(e[l][r][1])?e[l][r][0]:e[l][r][1];u>=0?(e[l][r][0]=i,e[l][r][1]=i+u,i=e[l][r][1]):(e[l][r][0]=a,e[l][r][1]=a+u,a=e[l][r][1])}},$X=e=>{var t=e.length;if(!(t<=0))for(var r=0,n=e[0].length;r<n;++r)for(var i=0,a=0;a<t;++a){var l=Er(e[a][r][1])?e[a][r][0]:e[a][r][1];l>=0?(e[a][r][0]=i,e[a][r][1]=i+l,i=e[a][r][1]):(e[a][r][0]=0,e[a][r][1]=0)}},KX={sign:UX,expand:CV,none:ql,silhouette:EV,wiggle:AV,positive:$X},qX=(e,t,r)=>{var n=KX[r],i=xV().keys(t).value((a,l)=>+Fe(a,l,0)).order(dS).offset(n);return i(e)};function S3(e){return e==null?void 0:String(e)}function Vl(e){var{axis:t,ticks:r,bandSize:n,entry:i,index:a,dataKey:l}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!at(i[t.dataKey])){var u=sN(r,"value",i[t.dataKey]);if(u)return u.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var f=Fe(i,at(l)?t.dataKey:l);return at(f)?null:t.scale(f)}var _T=e=>{var{axis:t,ticks:r,offset:n,bandSize:i,entry:a,index:l}=e;if(t.type==="category")return r[l]?r[l].coordinate+n:null;var u=Fe(a,t.dataKey,t.scale.domain()[l]);return at(u)?null:t.scale(u)-i/2+n},WX=e=>{var{numericAxis:t}=e,r=t.scale.domain();if(t.type==="number"){var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return n<=0&&i>=0?0:i<0?i:n}return r[0]},VX=e=>{var t=e.flat(2).filter(ye);return[Math.min(...t),Math.max(...t)]},YX=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],XX=(e,t,r)=>{if(e!=null)return YX(Object.keys(e).reduce((n,i)=>{var a=e[i],{stackedData:l}=a,u=l.reduce((f,h)=>{var d=y3(h,t,r),m=VX(d);return[Math.min(f[0],m[0]),Math.max(f[1],m[1])]},[1/0,-1/0]);return[Math.min(u[0],n[0]),Math.max(u[1],n[1])]},[1/0,-1/0]))},bT=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,ST=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,wa=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=xm(t,d=>d.coordinate),a=1/0,l=1,u=i.length;l<u;l++){var f=i[l],h=i[l-1];a=Math.min((f.coordinate||0)-(h.coordinate||0),a)}return a===1/0?0:a}return r?void 0:0};function wT(e){var{tooltipEntrySettings:t,dataKey:r,payload:n,value:i,name:a}=e;return ii(ii({},t),{},{dataKey:r,payload:n,value:i,name:a})}function fi(e,t){if(e)return String(e);if(typeof t=="string")return t}function GX(e,t,r,n,i){if(r==="horizontal"||r==="vertical"){var a=e>=i.left&&e<=i.left+i.width&&t>=i.top&&t<=i.top+i.height;return a?{x:e,y:t}:null}return n?LX({x:e,y:t},n):null}var ZX=(e,t,r,n)=>{var i=t.find(h=>h&&h.index===r);if(i){if(e==="horizontal")return{x:i.coordinate,y:n.y};if(e==="vertical")return{x:n.x,y:i.coordinate};if(e==="centric"){var a=i.coordinate,{radius:l}=n;return ii(ii(ii({},n),lt(n.cx,n.cy,l,a)),{},{angle:a,radius:l})}var u=i.coordinate,{angle:f}=n;return ii(ii(ii({},n),lt(n.cx,n.cy,u,f)),{},{angle:f,radius:u})}return{x:0,y:0}},QX=(e,t)=>t==="horizontal"?e.x:t==="vertical"?e.y:t==="centric"?e.angle:e.radius,Da=e=>e.layout.width,Ma=e=>e.layout.height,JX=e=>e.layout.scale,w3=e=>e.layout.margin,Pm=X(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Tm=X(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),eG=["#1890FF","#66B5FF","#41D9C7","#2FC25B","#6EDB8F","#9AE65C","#FACC14","#E6965C","#57AD71","#223273","#738AE6","#7564CC","#8543E0","#A877ED","#5C8EE6","#13C2C2","#70E0E0","#5CA3E6","#3436C7","#8082FF","#DD81E6","#F04864","#FA7D92","#D598D9"],Zw="data-recharts-item-index",Qw="data-recharts-item-data-key",Mh=60;function xT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Nd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xT(Object(r),!0).forEach(function(n){tG(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tG(e,t,r){return(t=rG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rG(e){var t=nG(e,"string");return typeof t=="symbol"?t:t+""}function nG(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var iG=e=>e.brush.height;function aG(e){var t=Tm(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:Mh;return r+i}return r},0)}function sG(e){var t=Tm(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:Mh;return r+i}return r},0)}function oG(e){var t=Pm(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function lG(e){var t=Pm(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var ar=X([Da,Ma,w3,iG,aG,sG,oG,lG,UN,OY],(e,t,r,n,i,a,l,u,f,h)=>{var d={left:(r.left||0)+i,right:(r.right||0)+a},m={top:(r.top||0)+l,bottom:(r.bottom||0)+u},v=Nd(Nd({},m),d),g=v.bottom;v.bottom+=n,v=zX(v,f,h);var S=e-v.left-v.right,_=t-v.top-v.bottom;return Nd(Nd({brushBottom:g},v),{},{width:Math.max(S,0),height:Math.max(_,0)})}),uG=X(ar,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),Jw=X(Da,Ma,(e,t)=>({x:0,y:0,width:e,height:t})),x3=w.createContext(null),Tt=()=>w.useContext(x3)!=null,cG=e=>{var{children:t}=e;return w.createElement(x3.Provider,{value:!0},t)},Dm=e=>e.brush,Rh=X([Dm,ar,w3],(e,t,r)=>({height:e.height,x:ye(e.x)?e.x:t.left,y:ye(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:ye(e.width)?e.width:t.width})),Lh=()=>{var e,t=Tt(),r=he(uG),n=he(Rh),i=(e=he(Dm))===null||e===void 0?void 0:e.padding;return!t||!n||!i?r:{width:n.width-i.left-i.right,height:n.height-i.top-i.bottom,x:i.left,y:i.top}},hG={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},C3=()=>{var e;return(e=he(ar))!==null&&e!==void 0?e:hG},e1=()=>he(Da),t1=()=>he(Ma),fG=()=>he(e=>e.layout.margin),$e=e=>e.layout.layoutType,ou=()=>he($e),dG=e=>{var t=Je();return w.useEffect(()=>{t(m3(e))},[t,e]),null},pG=e=>{var{margin:t}=e,r=Je();return w.useEffect(()=>{r(p3(t))},[r,t]),null},mG={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},E3=In({name:"legend",initialState:mG,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload(e,t){e.payload.push(t.payload)},removeLegendPayload(e,t){var r=ga(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)}}}),{setLegendSize:CT,setLegendSettings:vG,addLegendPayload:A3,removeLegendPayload:O3}=E3.actions,gG=E3.reducer,yG=["contextPayload"];function CS(){return CS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},CS.apply(null,arguments)}function ET(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Yl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ET(Object(r),!0).forEach(function(n){r1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ET(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function r1(e,t,r){return(t=_G(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _G(e){var t=bG(e,"string");return typeof t=="symbol"?t:t+""}function bG(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function SG(e,t){if(e==null)return{};var r,n,i=wG(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function wG(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function xG(e){return e.value}function CG(e){var{contextPayload:t}=e,r=SG(e,yG),n=jN(t,e.payloadUniqBy,xG),i=Yl(Yl({},r),{},{payload:n});return w.isValidElement(e.content)?w.cloneElement(e.content,i):typeof e.content=="function"?w.createElement(e.content,i):w.createElement(Uw,i)}function EG(e,t,r,n,i,a){var{layout:l,align:u,verticalAlign:f}=t,h,d;return(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null))&&(u==="center"&&l==="vertical"?h={left:((n||0)-a.width)/2}:h=u==="right"?{right:r&&r.right||0}:{left:r&&r.left||0}),(!e||(e.top===void 0||e.top===null)&&(e.bottom===void 0||e.bottom===null))&&(f==="middle"?d={top:((i||0)-a.height)/2}:d=f==="bottom"?{bottom:r&&r.bottom||0}:{top:r&&r.top||0}),Yl(Yl({},h),d)}function AG(e){var t=Je();return w.useEffect(()=>{t(vG(e))},[t,e]),null}function OG(e){var t=Je();return w.useEffect(()=>(t(CT(e)),()=>{t(CT({width:0,height:0}))}),[t,e]),null}function kG(e){var t=TY(),r=VW(),n=fG(),{width:i,height:a,wrapperStyle:l,portal:u}=e,[f,h]=$N([t]),d=e1(),m=t1();if(d==null||m==null)return null;var v=d-(n.left||0)-(n.right||0),g=Mm.getWidthOrHeight(e.layout,a,i,v),S=u?l:Yl(Yl({position:"absolute",width:(g==null?void 0:g.width)||i||"auto",height:(g==null?void 0:g.height)||a||"auto"},EG(l,e,n,d,m,f)),l),_=u??r;if(_==null)return null;var x=w.createElement("div",{className:"recharts-legend-wrapper",style:S,ref:h},w.createElement(AG,{layout:e.layout,align:e.align,verticalAlign:e.verticalAlign,itemSorter:e.itemSorter}),w.createElement(OG,{width:f.width,height:f.height}),w.createElement(CG,CS({},e,g,{margin:n,chartWidth:d,chartHeight:m,contextPayload:t})));return uN.createPortal(x,_)}class Mm extends w.PureComponent{static getWidthOrHeight(t,r,n,i){return t==="vertical"&&ye(r)?{height:r}:t==="horizontal"?{width:n||i}:null}render(){return w.createElement(kG,this.props)}}r1(Mm,"displayName","Legend");r1(Mm,"defaultProps",{align:"center",iconSize:14,itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"});function ES(){return ES=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ES.apply(null,arguments)}function AT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?AT(Object(r),!0).forEach(function(n){PG(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):AT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function PG(e,t,r){return(t=TG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TG(e){var t=DG(e,"string");return typeof t=="symbol"?t:t+""}function DG(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function MG(e){return Array.isArray(e)&&Cr(e[0])&&Cr(e[1])?e.join(" ~ "):e}var RG=e=>{var{separator:t=" : ",contentStyle:r={},itemStyle:n={},labelStyle:i={},payload:a,formatter:l,itemSorter:u,wrapperClassName:f,labelClassName:h,label:d,labelFormatter:m,accessibilityLayer:v=!1}=e,g=()=>{if(a&&a.length){var D={padding:0,margin:0},k=(u?xm(a,u):a).map((R,N)=>{if(R.type==="none")return null;var $=R.formatter||l||MG,{value:ee,name:F}=R,z=ee,j=F;if($){var K=$(ee,F,R,N,a);if(Array.isArray(K))[z,j]=K;else if(K!=null)z=K;else return null}var W=fb({display:"block",paddingTop:4,paddingBottom:4,color:R.color||"#000"},n);return w.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(N),style:W},Cr(j)?w.createElement("span",{className:"recharts-tooltip-item-name"},j):null,Cr(j)?w.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,w.createElement("span",{className:"recharts-tooltip-item-value"},z),w.createElement("span",{className:"recharts-tooltip-item-unit"},R.unit||""))});return w.createElement("ul",{className:"recharts-tooltip-item-list",style:D},k)}return null},S=fb({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},r),_=fb({margin:0},i),x=!at(d),C=x?d:"",A=Me("recharts-default-tooltip",f),O=Me("recharts-tooltip-label",h);x&&m&&a!==void 0&&a!==null&&(C=m(d,a));var P=v?{role:"status","aria-live":"assertive"}:{};return w.createElement("div",ES({className:A,style:S},P),w.createElement("p",{className:O,style:_},w.isValidElement(C)?C:"".concat(C)),g())},Rc="recharts-tooltip-wrapper",LG={visibility:"hidden"};function BG(e){var{coordinate:t,translateX:r,translateY:n}=e;return Me(Rc,{["".concat(Rc,"-right")]:ye(r)&&t&&ye(t.x)&&r>=t.x,["".concat(Rc,"-left")]:ye(r)&&t&&ye(t.x)&&r<t.x,["".concat(Rc,"-bottom")]:ye(n)&&t&&ye(t.y)&&n>=t.y,["".concat(Rc,"-top")]:ye(n)&&t&&ye(t.y)&&n<t.y})}function OT(e){var{allowEscapeViewBox:t,coordinate:r,key:n,offsetTopLeft:i,position:a,reverseDirection:l,tooltipDimension:u,viewBox:f,viewBoxDimension:h}=e;if(a&&ye(a[n]))return a[n];var d=r[n]-u-(i>0?i:0),m=r[n]+i;if(t[n])return l[n]?d:m;var v=f[n];if(v==null)return 0;if(l[n]){var g=d,S=v;return g<S?Math.max(m,v):Math.max(d,v)}if(h==null)return 0;var _=m+u,x=v+h;return _>x?Math.max(d,v):Math.max(m,v)}function NG(e){var{translateX:t,translateY:r,useTranslate3d:n}=e;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function IG(e){var{allowEscapeViewBox:t,coordinate:r,offsetTopLeft:n,position:i,reverseDirection:a,tooltipBox:l,useTranslate3d:u,viewBox:f}=e,h,d,m;return l.height>0&&l.width>0&&r?(d=OT({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:l.width,viewBox:f,viewBoxDimension:f.width}),m=OT({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:l.height,viewBox:f,viewBoxDimension:f.height}),h=NG({translateX:d,translateY:m,useTranslate3d:u})):h=LG,{cssProperties:h,cssClasses:BG({translateX:d,translateY:m,coordinate:r})}}function kT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Id(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kT(Object(r),!0).forEach(function(n){AS(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AS(e,t,r){return(t=jG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jG(e){var t=zG(e,"string");return typeof t=="symbol"?t:t+""}function zG(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class HG extends w.PureComponent{constructor(){super(...arguments),AS(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),AS(this,"handleKeyDown",t=>{if(t.key==="Escape"){var r,n,i,a;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(r=(n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==null&&r!==void 0?r:0,y:(i=(a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var t,r;this.state.dismissed&&(((t=this.props.coordinate)===null||t===void 0?void 0:t.x)!==this.state.dismissedAtCoordinate.x||((r=this.props.coordinate)===null||r===void 0?void 0:r.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}render(){var{active:t,allowEscapeViewBox:r,animationDuration:n,animationEasing:i,children:a,coordinate:l,hasPayload:u,isAnimationActive:f,offset:h,position:d,reverseDirection:m,useTranslate3d:v,viewBox:g,wrapperStyle:S,lastBoundingBox:_,innerRef:x,hasPortalFromProps:C}=this.props,{cssClasses:A,cssProperties:O}=IG({allowEscapeViewBox:r,coordinate:l,offsetTopLeft:h,position:d,reverseDirection:m,tooltipBox:{height:_.height,width:_.width},useTranslate3d:v,viewBox:g}),P=C?{}:Id(Id({transition:f&&t?"transform ".concat(n,"ms ").concat(i):void 0},O),{},{pointerEvents:"none",visibility:!this.state.dismissed&&t&&u?"visible":"hidden",position:"absolute",top:0,left:0}),D=Id(Id({},P),{},{visibility:!this.state.dismissed&&t&&u?"visible":"hidden"},S);return w.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:A,style:D,ref:x},a)}}var FG=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Nn={isSsr:FG()},k3=()=>he(e=>e.rootProps.accessibilityLayer);function zr(e){return Number.isFinite(e)}function Es(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function OS(){return OS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},OS.apply(null,arguments)}function PT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function TT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?PT(Object(r),!0).forEach(function(n){UG(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function UG(e,t,r){return(t=$G(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $G(e){var t=KG(e,"string");return typeof t=="symbol"?t:t+""}function KG(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var DT={curveBasisClosed:fV,curveBasisOpen:dV,curveBasis:hV,curveBumpX:ZW,curveBumpY:QW,curveLinearClosed:pV,curveLinear:_m,curveMonotoneX:mV,curveMonotoneY:vV,curveNatural:gV,curveStep:yV,curveStepAfter:bV,curveStepBefore:_V},jd=e=>zr(e.x)&&zr(e.y),Lc=e=>e.x,Bc=e=>e.y,qG=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(Oh(e));return(r==="curveMonotone"||r==="curveBump")&&t?DT["".concat(r).concat(t==="vertical"?"Y":"X")]:DT[r]||_m},WG=e=>{var{type:t="linear",points:r=[],baseLine:n,layout:i,connectNulls:a=!1}=e,l=qG(t,i),u=a?r.filter(jd):r,f;if(Array.isArray(n)){var h=a?n.filter(m=>jd(m)):n,d=u.map((m,v)=>TT(TT({},m),{},{base:h[v]}));return i==="vertical"?f=Td().y(Bc).x1(Lc).x0(m=>m.base.x):f=Td().x(Lc).y1(Bc).y0(m=>m.base.y),f.defined(jd).curve(l),f(d)}return i==="vertical"&&ye(n)?f=Td().y(Bc).x1(Lc).x0(n):ye(n)?f=Td().x(Lc).y1(Bc).y0(n):f=vN().x(Lc).y(Bc),f.defined(jd).curve(l),f(u)},wo=e=>{var{className:t,points:r,path:n,pathRef:i}=e;if((!r||!r.length)&&!n)return null;var a=r&&r.length?WG(e):n;return w.createElement("path",OS({},Et(e),Iw(e),{className:Me("recharts-curve",t),d:a===null?void 0:a,ref:i}))},VG=["x","y","top","left","width","height","className"];function kS(){return kS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},kS.apply(null,arguments)}function MT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function YG(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?MT(Object(r),!0).forEach(function(n){XG(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function XG(e,t,r){return(t=GG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GG(e){var t=ZG(e,"string");return typeof t=="symbol"?t:t+""}function ZG(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function QG(e,t){if(e==null)return{};var r,n,i=JG(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function JG(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var eZ=(e,t,r,n,i,a)=>"M".concat(e,",").concat(i,"v").concat(n,"M").concat(a,",").concat(t,"h").concat(r),tZ=e=>{var{x:t=0,y:r=0,top:n=0,left:i=0,width:a=0,height:l=0,className:u}=e,f=QG(e,VG),h=YG({x:t,y:r,top:n,left:i,width:a,height:l},f);return!ye(t)||!ye(r)||!ye(a)||!ye(l)||!ye(n)||!ye(i)?null:w.createElement("path",kS({},Ue(h,!0),{className:Me("recharts-cross",u),d:eZ(t,r,a,l,n,i)}))};function rZ(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function RT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nZ(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RT(Object(r),!0).forEach(function(n){iZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function iZ(e,t,r){return(t=aZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aZ(e){var t=sZ(e,"string");return typeof t=="symbol"?t:t+""}function sZ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jt(e,t){var r=nZ({},e),n=t,i=Object.keys(t),a=i.reduce((l,u)=>(l[u]===void 0&&n[u]!==void 0&&(l[u]=n[u]),l),r);return a}function P3(){}function LT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function BT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LT(Object(r),!0).forEach(function(n){oZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oZ(e,t,r){return(t=lZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lZ(e){var t=uZ(e,"string");return typeof t=="symbol"?t:t+""}function uZ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cZ=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),n1=(e,t,r)=>e.map(n=>"".concat(cZ(n)," ").concat(t,"ms ").concat(r)).join(","),hZ=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((r,n)=>r.filter(i=>n.includes(i))),ch=(e,t)=>Object.keys(t).reduce((r,n)=>BT(BT({},r),{},{[n]:e(n,t[n])}),{});function NT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Nr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?NT(Object(r),!0).forEach(function(n){fZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):NT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fZ(e,t,r){return(t=dZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dZ(e){var t=pZ(e,"string");return typeof t=="symbol"?t:t+""}function pZ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Tp=(e,t,r)=>e+(t-e)*r,PS=e=>{var{from:t,to:r}=e;return t!==r},T3=(e,t,r)=>{var n=ch((i,a)=>{if(PS(a)){var[l,u]=e(a.from,a.to,a.velocity);return Nr(Nr({},a),{},{from:l,velocity:u})}return a},t);return r<1?ch((i,a)=>PS(a)?Nr(Nr({},a),{},{velocity:Tp(a.velocity,n[i].velocity,r),from:Tp(a.from,n[i].from,r)}):a,t):T3(e,n,r-1)};function mZ(e,t,r,n,i,a){var l,u=n.reduce((v,g)=>Nr(Nr({},v),{},{[g]:{from:e[g],velocity:0,to:t[g]}}),{}),f=()=>ch((v,g)=>g.from,u),h=()=>!Object.values(u).filter(PS).length,d=null,m=v=>{l||(l=v);var g=v-l,S=g/r.dt;u=T3(r,u,S),i(Nr(Nr(Nr({},e),t),f())),l=v,h()||(d=a.setTimeout(m))};return()=>(d=a.setTimeout(m),()=>{d()})}function vZ(e,t,r,n,i,a,l){var u=null,f=i.reduce((m,v)=>Nr(Nr({},m),{},{[v]:[e[v],t[v]]}),{}),h,d=m=>{h||(h=m);var v=(m-h)/n,g=ch((_,x)=>Tp(...x,r(v)),f);if(a(Nr(Nr(Nr({},e),t),g)),v<1)u=l.setTimeout(d);else{var S=ch((_,x)=>Tp(...x,r(1)),f);a(Nr(Nr(Nr({},e),t),S))}};return()=>(u=l.setTimeout(d),()=>{u()})}const gZ=(e,t,r,n,i,a)=>{var l=hZ(e,t);return r.isStepper===!0?mZ(e,t,r,l,i,a):vZ(e,t,r,n,l,i,a)};var Dp=1e-4,D3=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],M3=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),IT=(e,t)=>r=>{var n=D3(e,t);return M3(n,r)},yZ=(e,t)=>r=>{var n=D3(e,t),i=[...n.map((a,l)=>a*l).slice(1),0];return M3(i,r)},jT=function(){for(var t,r,n,i,a=arguments.length,l=new Array(a),u=0;u<a;u++)l[u]=arguments[u];if(l.length===1)switch(l[0]){case"linear":[t,n,r,i]=[0,0,1,1];break;case"ease":[t,n,r,i]=[.25,.1,.25,1];break;case"ease-in":[t,n,r,i]=[.42,0,1,1];break;case"ease-out":[t,n,r,i]=[.42,0,.58,1];break;case"ease-in-out":[t,n,r,i]=[0,0,.58,1];break;default:{var f=l[0].split("(");f[0]==="cubic-bezier"&&f[1].split(")")[0].split(",").length===4&&([t,n,r,i]=f[1].split(")")[0].split(",").map(S=>parseFloat(S)))}}else l.length===4&&([t,n,r,i]=l);var h=IT(t,r),d=IT(n,i),m=yZ(t,r),v=S=>S>1?1:S<0?0:S,g=S=>{for(var _=S>1?1:S,x=_,C=0;C<8;++C){var A=h(x)-_,O=m(x);if(Math.abs(A-_)<Dp||O<Dp)return d(x);x=v(x-A/O)}return d(x)};return g.isStepper=!1,g},_Z=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:r=100,damping:n=8,dt:i=17}=t,a=(l,u,f)=>{var h=-(l-u)*r,d=f*n,m=f+(h-d)*i/1e3,v=f*i/1e3+l;return Math.abs(v-u)<Dp&&Math.abs(m)<Dp?[u,0]:[v,m]};return a.isStepper=!0,a.dt=i,a},bZ=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return jT(e);case"spring":return _Z();default:if(e.split("(")[0]==="cubic-bezier")return jT(e)}return typeof e=="function"?e:null};function SZ(e){var t,r=()=>null,n=!1,i=null,a=l=>{if(!n){if(Array.isArray(l)){if(!l.length)return;var u=l,[f,...h]=u;if(typeof f=="number"){i=e.setTimeout(a.bind(null,h),f);return}a(f),i=e.setTimeout(a.bind(null,h));return}typeof l=="string"&&(t=l,r(t)),typeof l=="object"&&(t=l,r(t)),typeof l=="function"&&l()}};return{stop:()=>{n=!0},start:l=>{n=!1,i&&(i(),i=null),a(l)},subscribe:l=>(r=l,()=>{r=()=>null}),getTimeoutController:()=>e}}class wZ{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),i=null,a=l=>{l-n>=r?t(l):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(a))};return i=requestAnimationFrame(a),()=>{cancelAnimationFrame(i)}}}function xZ(){return SZ(new wZ)}var CZ=w.createContext(xZ);function R3(e,t){var r=w.useContext(CZ);return w.useMemo(()=>t??r(e),[e,t,r])}var EZ={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},zT={t:0},db={t:1};function Ra(e){var t=jt(e,EZ),{isActive:r,canBegin:n,duration:i,easing:a,begin:l,onAnimationEnd:u,onAnimationStart:f,children:h}=t,d=R3(t.animationId,t.animationManager),[m,v]=w.useState(r?zT:db),g=w.useRef(null);return w.useEffect(()=>{r||v(db)},[r]),w.useEffect(()=>{if(!r||!n)return P3;var S=gZ(zT,db,bZ(a),i,v,d.getTimeoutController()),_=()=>{g.current=S()};return d.start([f,l,_,i,u]),()=>{d.stop(),g.current&&g.current(),u()}},[r,n,i,a,l,f,u,d]),h(m.t)}function La(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=w.useRef(Kl(t)),n=w.useRef(e);return n.current!==e&&(r.current=Kl(t),n.current=e),r.current}function HT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function FT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?HT(Object(r),!0).forEach(function(n){AZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AZ(e,t,r){return(t=OZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function OZ(e){var t=kZ(e,"string");return typeof t=="symbol"?t:t+""}function kZ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mp(){return Mp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Mp.apply(null,arguments)}var UT=(e,t,r,n,i)=>{var a=Math.min(Math.abs(r)/2,Math.abs(n)/2),l=n>=0?1:-1,u=r>=0?1:-1,f=n>=0&&r>=0||n<0&&r<0?1:0,h;if(a>0&&i instanceof Array){for(var d=[0,0,0,0],m=0,v=4;m<v;m++)d[m]=i[m]>a?a:i[m];h="M".concat(e,",").concat(t+l*d[0]),d[0]>0&&(h+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(f,",").concat(e+u*d[0],",").concat(t)),h+="L ".concat(e+r-u*d[1],",").concat(t),d[1]>0&&(h+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(f,`,
        `).concat(e+r,",").concat(t+l*d[1])),h+="L ".concat(e+r,",").concat(t+n-l*d[2]),d[2]>0&&(h+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(f,`,
        `).concat(e+r-u*d[2],",").concat(t+n)),h+="L ".concat(e+u*d[3],",").concat(t+n),d[3]>0&&(h+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(f,`,
        `).concat(e,",").concat(t+n-l*d[3])),h+="Z"}else if(a>0&&i===+i&&i>0){var g=Math.min(a,i);h="M ".concat(e,",").concat(t+l*g,`
            A `).concat(g,",").concat(g,",0,0,").concat(f,",").concat(e+u*g,",").concat(t,`
            L `).concat(e+r-u*g,",").concat(t,`
            A `).concat(g,",").concat(g,",0,0,").concat(f,",").concat(e+r,",").concat(t+l*g,`
            L `).concat(e+r,",").concat(t+n-l*g,`
            A `).concat(g,",").concat(g,",0,0,").concat(f,",").concat(e+r-u*g,",").concat(t+n,`
            L `).concat(e+u*g,",").concat(t+n,`
            A `).concat(g,",").concat(g,",0,0,").concat(f,",").concat(e,",").concat(t+n-l*g," Z")}else h="M ".concat(e,",").concat(t," h ").concat(r," v ").concat(n," h ").concat(-r," Z");return h},PZ={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Rm=e=>{var t=jt(e,PZ),r=w.useRef(null),[n,i]=w.useState(-1);w.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var K=r.current.getTotalLength();K&&i(K)}catch{}},[]);var{x:a,y:l,width:u,height:f,radius:h,className:d}=t,{animationEasing:m,animationDuration:v,animationBegin:g,isAnimationActive:S,isUpdateAnimationActive:_}=t,x=w.useRef(u),C=w.useRef(f),A=w.useRef(a),O=w.useRef(l),P=w.useMemo(()=>({x:a,y:l,width:u,height:f,radius:h}),[a,l,u,f,h]),D=La(P,"rectangle-");if(a!==+a||l!==+l||u!==+u||f!==+f||u===0||f===0)return null;var k=Me("recharts-rectangle",d);if(!_)return w.createElement("path",Mp({},Ue(t,!0),{className:k,d:UT(a,l,u,f,h)}));var R=x.current,N=C.current,$=A.current,ee=O.current,F="0px ".concat(n===-1?1:n,"px"),z="".concat(n,"px 0px"),j=n1(["strokeDasharray"],v,typeof m=="string"?m:void 0);return w.createElement(Ra,{animationId:D,key:D,canBegin:n>0,duration:v,easing:m,isActive:_,begin:g},K=>{var W=je(R,u,K),B=je(N,f,K),q=je($,a,K),G=je(ee,l,K);r.current&&(x.current=W,C.current=B,A.current=q,O.current=G);var ce;return S?K>0?ce={transition:j,strokeDasharray:z}:ce={strokeDasharray:F}:ce={strokeDasharray:z},w.createElement("path",Mp({},Ue(t,!0),{className:k,d:UT(q,G,W,B,h),ref:r,style:FT(FT({},ce),t.style)}))})};function L3(e){var{cx:t,cy:r,radius:n,startAngle:i,endAngle:a}=e,l=lt(t,r,n,i),u=lt(t,r,n,a);return{points:[l,u],cx:t,cy:r,radius:n,startAngle:i,endAngle:a}}function TS(){return TS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},TS.apply(null,arguments)}var TZ=(e,t)=>{var r=xr(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},zd=e=>{var{cx:t,cy:r,radius:n,angle:i,sign:a,isExternal:l,cornerRadius:u,cornerIsExternal:f}=e,h=u*(l?1:-1)+n,d=Math.asin(u/h)/kp,m=f?i:i+a*d,v=lt(t,r,h,m),g=lt(t,r,n,m),S=f?i-a*d:i,_=lt(t,r,h*Math.cos(d*kp),S);return{center:v,circleTangency:g,lineTangency:_,theta:d}},B3=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:a,endAngle:l}=e,u=TZ(a,l),f=a+u,h=lt(t,r,i,a),d=lt(t,r,i,f),m="M ".concat(h.x,",").concat(h.y,`
    A `).concat(i,",").concat(i,`,0,
    `).concat(+(Math.abs(u)>180),",").concat(+(a>f),`,
    `).concat(d.x,",").concat(d.y,`
  `);if(n>0){var v=lt(t,r,n,a),g=lt(t,r,n,f);m+="L ".concat(g.x,",").concat(g.y,`
            A `).concat(n,",").concat(n,`,0,
            `).concat(+(Math.abs(u)>180),",").concat(+(a<=f),`,
            `).concat(v.x,",").concat(v.y," Z")}else m+="L ".concat(t,",").concat(r," Z");return m},DZ=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,cornerRadius:a,forceCornerRadius:l,cornerIsExternal:u,startAngle:f,endAngle:h}=e,d=xr(h-f),{circleTangency:m,lineTangency:v,theta:g}=zd({cx:t,cy:r,radius:i,angle:f,sign:d,cornerRadius:a,cornerIsExternal:u}),{circleTangency:S,lineTangency:_,theta:x}=zd({cx:t,cy:r,radius:i,angle:h,sign:-d,cornerRadius:a,cornerIsExternal:u}),C=u?Math.abs(f-h):Math.abs(f-h)-g-x;if(C<0)return l?"M ".concat(v.x,",").concat(v.y,`
        a`).concat(a,",").concat(a,",0,0,1,").concat(a*2,`,0
        a`).concat(a,",").concat(a,",0,0,1,").concat(-a*2,`,0
      `):B3({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:f,endAngle:h});var A="M ".concat(v.x,",").concat(v.y,`
    A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(m.x,",").concat(m.y,`
    A`).concat(i,",").concat(i,",0,").concat(+(C>180),",").concat(+(d<0),",").concat(S.x,",").concat(S.y,`
    A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(_.x,",").concat(_.y,`
  `);if(n>0){var{circleTangency:O,lineTangency:P,theta:D}=zd({cx:t,cy:r,radius:n,angle:f,sign:d,isExternal:!0,cornerRadius:a,cornerIsExternal:u}),{circleTangency:k,lineTangency:R,theta:N}=zd({cx:t,cy:r,radius:n,angle:h,sign:-d,isExternal:!0,cornerRadius:a,cornerIsExternal:u}),$=u?Math.abs(f-h):Math.abs(f-h)-D-N;if($<0&&a===0)return"".concat(A,"L").concat(t,",").concat(r,"Z");A+="L".concat(R.x,",").concat(R.y,`
      A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(k.x,",").concat(k.y,`
      A`).concat(n,",").concat(n,",0,").concat(+($>180),",").concat(+(d>0),",").concat(O.x,",").concat(O.y,`
      A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(P.x,",").concat(P.y,"Z")}else A+="L".concat(t,",").concat(r,"Z");return A},MZ={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},N3=e=>{var t=jt(e,MZ),{cx:r,cy:n,innerRadius:i,outerRadius:a,cornerRadius:l,forceCornerRadius:u,cornerIsExternal:f,startAngle:h,endAngle:d,className:m}=t;if(a<i||h===d)return null;var v=Me("recharts-sector",m),g=a-i,S=Vr(l,g,0,!0),_;return S>0&&Math.abs(h-d)<360?_=DZ({cx:r,cy:n,innerRadius:i,outerRadius:a,cornerRadius:Math.min(S,g/2),forceCornerRadius:u,cornerIsExternal:f,startAngle:h,endAngle:d}):_=B3({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:h,endAngle:d}),w.createElement("path",TS({},Ue(t,!0),{className:v,d:_}))};function RZ(e,t,r){var n,i,a,l;if(e==="horizontal")n=t.x,a=n,i=r.top,l=r.top+r.height;else if(e==="vertical")i=t.y,l=i,n=r.left,a=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var{cx:u,cy:f,innerRadius:h,outerRadius:d,angle:m}=t,v=lt(u,f,h,m),g=lt(u,f,d,m);n=v.x,i=v.y,a=g.x,l=g.y}else return L3(t);return[{x:n,y:i},{x:a,y:l}]}var pb={},mb={},vb={},$T;function LZ(){return $T||($T=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=HN();function r(n){return t.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(vb)),vb}var KT;function I3(){return KT||(KT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=LZ();function r(n){return n?(n=t.toNumber(n),n===1/0||n===-1/0?(n<0?-1:1)*Number.MAX_VALUE:n===n?n:0):n===0?n:0}e.toFinite=r})(mb)),mb}var qT;function BZ(){return qT||(qT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=FN(),r=I3();function n(i,a,l){l&&typeof l!="number"&&t.isIterateeCall(i,a,l)&&(a=l=void 0),i=r.toFinite(i),a===void 0?(a=i,i=0):a=r.toFinite(a),l=l===void 0?i<a?1:-1:r.toFinite(l);const u=Math.max(Math.ceil((a-i)/(l||1)),0),f=new Array(u);for(let h=0;h<u;h++)f[h]=i,i+=l;return f}e.range=n})(pb)),pb}var gb,WT;function NZ(){return WT||(WT=1,gb=BZ().range),gb}var IZ=NZ();const i1=Hr(IZ);function Cs(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function jZ(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function a1(e){let t,r,n;e.length!==2?(t=Cs,r=(u,f)=>Cs(e(u),f),n=(u,f)=>e(u)-f):(t=e===Cs||e===jZ?e:zZ,r=e,n=e);function i(u,f,h=0,d=u.length){if(h<d){if(t(f,f)!==0)return d;do{const m=h+d>>>1;r(u[m],f)<0?h=m+1:d=m}while(h<d)}return h}function a(u,f,h=0,d=u.length){if(h<d){if(t(f,f)!==0)return d;do{const m=h+d>>>1;r(u[m],f)<=0?h=m+1:d=m}while(h<d)}return h}function l(u,f,h=0,d=u.length){const m=i(u,f,h,d-1);return m>h&&n(u[m-1],f)>-n(u[m],f)?m-1:m}return{left:i,center:l,right:a}}function zZ(){return 0}function j3(e){return e===null?NaN:+e}function*HZ(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const FZ=a1(Cs),Bh=FZ.right;a1(j3).center;class VT extends Map{constructor(t,r=KZ){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(YT(this,t))}has(t){return super.has(YT(this,t))}set(t,r){return super.set(UZ(this,t),r)}delete(t){return super.delete($Z(this,t))}}function YT({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function UZ({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function $Z({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function KZ(e){return e!==null&&typeof e=="object"?e.valueOf():e}function qZ(e=Cs){if(e===Cs)return z3;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function z3(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const WZ=Math.sqrt(50),VZ=Math.sqrt(10),YZ=Math.sqrt(2);function Rp(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),l=a>=WZ?10:a>=VZ?5:a>=YZ?2:1;let u,f,h;return i<0?(h=Math.pow(10,-i)/l,u=Math.round(e*h),f=Math.round(t*h),u/h<e&&++u,f/h>t&&--f,h=-h):(h=Math.pow(10,i)*l,u=Math.round(e/h),f=Math.round(t/h),u*h<e&&++u,f*h>t&&--f),f<u&&.5<=r&&r<2?Rp(e,t,r*2):[u,f,h]}function DS(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,a,l]=n?Rp(t,e,r):Rp(e,t,r);if(!(a>=i))return[];const u=a-i+1,f=new Array(u);if(n)if(l<0)for(let h=0;h<u;++h)f[h]=(a-h)/-l;else for(let h=0;h<u;++h)f[h]=(a-h)*l;else if(l<0)for(let h=0;h<u;++h)f[h]=(i+h)/-l;else for(let h=0;h<u;++h)f[h]=(i+h)*l;return f}function MS(e,t,r){return t=+t,e=+e,r=+r,Rp(e,t,r)[2]}function RS(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?MS(t,e,r):MS(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function XT(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function GT(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function H3(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?z3:qZ(i);n>r;){if(n-r>600){const f=n-r+1,h=t-r+1,d=Math.log(f),m=.5*Math.exp(2*d/3),v=.5*Math.sqrt(d*m*(f-m)/f)*(h-f/2<0?-1:1),g=Math.max(r,Math.floor(t-h*m/f+v)),S=Math.min(n,Math.floor(t+(f-h)*m/f+v));H3(e,t,g,S,i)}const a=e[t];let l=r,u=n;for(Nc(e,r,t),i(e[n],a)>0&&Nc(e,r,n);l<u;){for(Nc(e,l,u),++l,--u;i(e[l],a)<0;)++l;for(;i(e[u],a)>0;)--u}i(e[r],a)===0?Nc(e,r,u):(++u,Nc(e,u,n)),u<=t&&(r=u+1),t<=u&&(n=u-1)}return e}function Nc(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function XZ(e,t,r){if(e=Float64Array.from(HZ(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return GT(e);if(t>=1)return XT(e);var n,i=(n-1)*t,a=Math.floor(i),l=XT(H3(e,a).subarray(0,a+1)),u=GT(e.subarray(a+1));return l+(u-l)*(i-a)}}function GZ(e,t,r=j3){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),l=+r(e[a],a,e),u=+r(e[a+1],a+1,e);return l+(u-l)*(i-a)}}function ZZ(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n<i;)a[n]=e+n*r;return a}function di(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Ba(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const LS=Symbol("implicit");function s1(){var e=new VT,t=[],r=[],n=LS;function i(a){let l=e.get(a);if(l===void 0){if(n!==LS)return n;e.set(a,l=t.push(a)-1)}return r[l%r.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new VT;for(const l of a)e.has(l)||e.set(l,t.push(l)-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 s1(t,r).unknown(n)},di.apply(i,arguments),i}function o1(){var e=s1().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,l,u=!1,f=0,h=0,d=.5;delete e.unknown;function m(){var v=t().length,g=i<n,S=g?i:n,_=g?n:i;a=(_-S)/Math.max(1,v-f+h*2),u&&(a=Math.floor(a)),S+=(_-S-a*(v-f))*d,l=a*(1-f),u&&(S=Math.round(S),l=Math.round(l));var x=ZZ(v).map(function(C){return S+a*C});return r(g?x.reverse():x)}return e.domain=function(v){return arguments.length?(t(v),m()):t()},e.range=function(v){return arguments.length?([n,i]=v,n=+n,i=+i,m()):[n,i]},e.rangeRound=function(v){return[n,i]=v,n=+n,i=+i,u=!0,m()},e.bandwidth=function(){return l},e.step=function(){return a},e.round=function(v){return arguments.length?(u=!!v,m()):u},e.padding=function(v){return arguments.length?(f=Math.min(1,h=+v),m()):f},e.paddingInner=function(v){return arguments.length?(f=Math.min(1,v),m()):f},e.paddingOuter=function(v){return arguments.length?(h=+v,m()):h},e.align=function(v){return arguments.length?(d=Math.max(0,Math.min(1,v)),m()):d},e.copy=function(){return o1(t(),[n,i]).round(u).paddingInner(f).paddingOuter(h).align(d)},di.apply(m(),arguments)}function F3(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return F3(t())},e}function U3(){return F3(o1.apply(null,arguments).paddingInner(1))}function l1(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function $3(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Nh(){}var hh=.7,Lp=1/hh,Hl="\\s*([+-]?\\d+)\\s*",fh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Hi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",QZ=/^#([0-9a-f]{3,8})$/,JZ=new RegExp(`^rgb\\(${Hl},${Hl},${Hl}\\)$`),eQ=new RegExp(`^rgb\\(${Hi},${Hi},${Hi}\\)$`),tQ=new RegExp(`^rgba\\(${Hl},${Hl},${Hl},${fh}\\)$`),rQ=new RegExp(`^rgba\\(${Hi},${Hi},${Hi},${fh}\\)$`),nQ=new RegExp(`^hsl\\(${fh},${Hi},${Hi}\\)$`),iQ=new RegExp(`^hsla\\(${fh},${Hi},${Hi},${fh}\\)$`),ZT={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};l1(Nh,dh,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:QT,formatHex:QT,formatHex8:aQ,formatHsl:sQ,formatRgb:JT,toString:JT});function QT(){return this.rgb().formatHex()}function aQ(){return this.rgb().formatHex8()}function sQ(){return K3(this).formatHsl()}function JT(){return this.rgb().formatRgb()}function dh(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=QZ.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?eD(t):r===3?new vn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Hd(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Hd(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=JZ.exec(e))?new vn(t[1],t[2],t[3],1):(t=eQ.exec(e))?new vn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=tQ.exec(e))?Hd(t[1],t[2],t[3],t[4]):(t=rQ.exec(e))?Hd(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=nQ.exec(e))?nD(t[1],t[2]/100,t[3]/100,1):(t=iQ.exec(e))?nD(t[1],t[2]/100,t[3]/100,t[4]):ZT.hasOwnProperty(e)?eD(ZT[e]):e==="transparent"?new vn(NaN,NaN,NaN,0):null}function eD(e){return new vn(e>>16&255,e>>8&255,e&255,1)}function Hd(e,t,r,n){return n<=0&&(e=t=r=NaN),new vn(e,t,r,n)}function oQ(e){return e instanceof Nh||(e=dh(e)),e?(e=e.rgb(),new vn(e.r,e.g,e.b,e.opacity)):new vn}function BS(e,t,r,n){return arguments.length===1?oQ(e):new vn(e,t,r,n??1)}function vn(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}l1(vn,BS,$3(Nh,{brighter(e){return e=e==null?Lp:Math.pow(Lp,e),new vn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?hh:Math.pow(hh,e),new vn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new vn(xo(this.r),xo(this.g),xo(this.b),Bp(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:tD,formatHex:tD,formatHex8:lQ,formatRgb:rD,toString:rD}));function tD(){return`#${mo(this.r)}${mo(this.g)}${mo(this.b)}`}function lQ(){return`#${mo(this.r)}${mo(this.g)}${mo(this.b)}${mo((isNaN(this.opacity)?1:this.opacity)*255)}`}function rD(){const e=Bp(this.opacity);return`${e===1?"rgb(":"rgba("}${xo(this.r)}, ${xo(this.g)}, ${xo(this.b)}${e===1?")":`, ${e})`}`}function Bp(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function xo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function mo(e){return e=xo(e),(e<16?"0":"")+e.toString(16)}function nD(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new bi(e,t,r,n)}function K3(e){if(e instanceof bi)return new bi(e.h,e.s,e.l,e.opacity);if(e instanceof Nh||(e=dh(e)),!e)return new bi;if(e instanceof bi)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),l=NaN,u=a-i,f=(a+i)/2;return u?(t===a?l=(r-n)/u+(r<n)*6:r===a?l=(n-t)/u+2:l=(t-r)/u+4,u/=f<.5?a+i:2-a-i,l*=60):u=f>0&&f<1?0:l,new bi(l,u,f,e.opacity)}function uQ(e,t,r,n){return arguments.length===1?K3(e):new bi(e,t,r,n??1)}function bi(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}l1(bi,uQ,$3(Nh,{brighter(e){return e=e==null?Lp:Math.pow(Lp,e),new bi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?hh:Math.pow(hh,e),new bi(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new vn(yb(e>=240?e-240:e+120,i,n),yb(e,i,n),yb(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new bi(iD(this.h),Fd(this.s),Fd(this.l),Bp(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 e=Bp(this.opacity);return`${e===1?"hsl(":"hsla("}${iD(this.h)}, ${Fd(this.s)*100}%, ${Fd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function iD(e){return e=(e||0)%360,e<0?e+360:e}function Fd(e){return Math.max(0,Math.min(1,e||0))}function yb(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const u1=e=>()=>e;function cQ(e,t){return function(r){return e+r*t}}function hQ(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function fQ(e){return(e=+e)==1?q3:function(t,r){return r-t?hQ(t,r,e):u1(isNaN(t)?r:t)}}function q3(e,t){var r=t-e;return r?cQ(e,r):u1(isNaN(e)?t:e)}const aD=(function e(t){var r=fQ(t);function n(i,a){var l=r((i=BS(i)).r,(a=BS(a)).r),u=r(i.g,a.g),f=r(i.b,a.b),h=q3(i.opacity,a.opacity);return function(d){return i.r=l(d),i.g=u(d),i.b=f(d),i.opacity=h(d),i+""}}return n.gamma=e,n})(1);function dQ(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=e[i]*(1-a)+t[i]*a;return n}}function pQ(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function mQ(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),l;for(l=0;l<n;++l)i[l]=lu(e[l],t[l]);for(;l<r;++l)a[l]=t[l];return function(u){for(l=0;l<n;++l)a[l]=i[l](u);return a}}function vQ(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Np(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function gQ(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=lu(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var NS=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,_b=new RegExp(NS.source,"g");function yQ(e){return function(){return e}}function _Q(e){return function(t){return e(t)+""}}function bQ(e,t){var r=NS.lastIndex=_b.lastIndex=0,n,i,a,l=-1,u=[],f=[];for(e=e+"",t=t+"";(n=NS.exec(e))&&(i=_b.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),u[l]?u[l]+=a:u[++l]=a),(n=n[0])===(i=i[0])?u[l]?u[l]+=i:u[++l]=i:(u[++l]=null,f.push({i:l,x:Np(n,i)})),r=_b.lastIndex;return r<t.length&&(a=t.slice(r),u[l]?u[l]+=a:u[++l]=a),u.length<2?f[0]?_Q(f[0].x):yQ(t):(t=f.length,function(h){for(var d=0,m;d<t;++d)u[(m=f[d]).i]=m.x(h);return u.join("")})}function lu(e,t){var r=typeof t,n;return t==null||r==="boolean"?u1(t):(r==="number"?Np:r==="string"?(n=dh(t))?(t=n,aD):bQ:t instanceof dh?aD:t instanceof Date?vQ:pQ(t)?dQ:Array.isArray(t)?mQ:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?gQ:Np)(e,t)}function c1(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function SQ(e,t){t===void 0&&(t=e,e=lu);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(l){var u=Math.max(0,Math.min(n-1,Math.floor(l*=n)));return a[u](l-u)}}function wQ(e){return function(){return e}}function Ip(e){return+e}var sD=[0,1];function en(e){return e}function IS(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:wQ(isNaN(t)?NaN:.5)}function xQ(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function CQ(e,t,r){var n=e[0],i=e[1],a=t[0],l=t[1];return i<n?(n=IS(i,n),a=r(l,a)):(n=IS(n,i),a=r(a,l)),function(u){return a(n(u))}}function EQ(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),a=new Array(n),l=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++l<n;)i[l]=IS(e[l],e[l+1]),a[l]=r(t[l],t[l+1]);return function(u){var f=Bh(e,u,1,n)-1;return a[f](i[f](u))}}function Ih(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Lm(){var e=sD,t=sD,r=lu,n,i,a,l=en,u,f,h;function d(){var v=Math.min(e.length,t.length);return l!==en&&(l=xQ(e[0],e[v-1])),u=v>2?EQ:CQ,f=h=null,m}function m(v){return v==null||isNaN(v=+v)?a:(f||(f=u(e.map(n),t,r)))(n(l(v)))}return m.invert=function(v){return l(i((h||(h=u(t,e.map(n),Np)))(v)))},m.domain=function(v){return arguments.length?(e=Array.from(v,Ip),d()):e.slice()},m.range=function(v){return arguments.length?(t=Array.from(v),d()):t.slice()},m.rangeRound=function(v){return t=Array.from(v),r=c1,d()},m.clamp=function(v){return arguments.length?(l=v?!0:en,d()):l!==en},m.interpolate=function(v){return arguments.length?(r=v,d()):r},m.unknown=function(v){return arguments.length?(a=v,m):a},function(v,g){return n=v,i=g,d()}}function h1(){return Lm()(en,en)}function AQ(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function jp(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Xl(e){return e=jp(Math.abs(e)),e?e[1]:NaN}function OQ(e,t){return function(r,n){for(var i=r.length,a=[],l=0,u=e[0],f=0;i>0&&u>0&&(f+u+1>n&&(u=Math.max(1,n-f)),a.push(r.substring(i-=u,i+u)),!((f+=u+1)>n));)u=e[l=(l+1)%e.length];return a.reverse().join(t)}}function kQ(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var PQ=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ph(e){if(!(t=PQ.exec(e)))throw new Error("invalid format: "+e);var t;return new f1({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}ph.prototype=f1.prototype;function f1(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}f1.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 TQ(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var W3;function DQ(e,t){var r=jp(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(W3=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,l=n.length;return a===l?n:a>l?n+new Array(a-l+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+jp(e,Math.max(0,t+a-1))[0]}function oD(e,t){var r=jp(e,t);if(!r)return e+"";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 lD={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:AQ,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>oD(e*100,t),r:oD,s:DQ,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function uD(e){return e}var cD=Array.prototype.map,hD=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function MQ(e){var t=e.grouping===void 0||e.thousands===void 0?uD:OQ(cD.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?uD:kQ(cD.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function h(m){m=ph(m);var v=m.fill,g=m.align,S=m.sign,_=m.symbol,x=m.zero,C=m.width,A=m.comma,O=m.precision,P=m.trim,D=m.type;D==="n"?(A=!0,D="g"):lD[D]||(O===void 0&&(O=12),P=!0,D="g"),(x||v==="0"&&g==="=")&&(x=!0,v="0",g="=");var k=_==="$"?r:_==="#"&&/[boxX]/.test(D)?"0"+D.toLowerCase():"",R=_==="$"?n:/[%p]/.test(D)?l:"",N=lD[D],$=/[defgprs%]/.test(D);O=O===void 0?6:/[gprs]/.test(D)?Math.max(1,Math.min(21,O)):Math.max(0,Math.min(20,O));function ee(F){var z=k,j=R,K,W,B;if(D==="c")j=N(F)+j,F="";else{F=+F;var q=F<0||1/F<0;if(F=isNaN(F)?f:N(Math.abs(F),O),P&&(F=TQ(F)),q&&+F==0&&S!=="+"&&(q=!1),z=(q?S==="("?S:u:S==="-"||S==="("?"":S)+z,j=(D==="s"?hD[8+W3/3]:"")+j+(q&&S==="("?")":""),$){for(K=-1,W=F.length;++K<W;)if(B=F.charCodeAt(K),48>B||B>57){j=(B===46?i+F.slice(K+1):F.slice(K))+j,F=F.slice(0,K);break}}}A&&!x&&(F=t(F,1/0));var G=z.length+F.length+j.length,ce=G<C?new Array(C-G+1).join(v):"";switch(A&&x&&(F=t(ce+F,ce.length?C-j.length:1/0),ce=""),g){case"<":F=z+F+j+ce;break;case"=":F=z+ce+F+j;break;case"^":F=ce.slice(0,G=ce.length>>1)+z+F+j+ce.slice(G);break;default:F=ce+z+F+j;break}return a(F)}return ee.toString=function(){return m+""},ee}function d(m,v){var g=h((m=ph(m),m.type="f",m)),S=Math.max(-8,Math.min(8,Math.floor(Xl(v)/3)))*3,_=Math.pow(10,-S),x=hD[8+S/3];return function(C){return g(_*C)+x}}return{format:h,formatPrefix:d}}var Ud,d1,V3;RQ({thousands:",",grouping:[3],currency:["$",""]});function RQ(e){return Ud=MQ(e),d1=Ud.format,V3=Ud.formatPrefix,Ud}function LQ(e){return Math.max(0,-Xl(Math.abs(e)))}function BQ(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Xl(t)/3)))*3-Xl(Math.abs(e)))}function NQ(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Xl(t)-Xl(e))+1}function Y3(e,t,r,n){var i=RS(e,t,r),a;switch(n=ph(n??",f"),n.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=BQ(i,l))&&(n.precision=a),V3(n,l)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=NQ(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=LQ(i))&&(n.precision=a-(n.type==="%")*2);break}}return d1(n)}function Ts(e){var t=e.domain;return e.ticks=function(r){var n=t();return DS(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return Y3(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,l=n[i],u=n[a],f,h,d=10;for(u<l&&(h=l,l=u,u=h,h=i,i=a,a=h);d-- >0;){if(h=MS(l,u,r),h===f)return n[i]=l,n[a]=u,t(n);if(h>0)l=Math.floor(l/h)*h,u=Math.ceil(u/h)*h;else if(h<0)l=Math.ceil(l*h)/h,u=Math.floor(u*h)/h;else break;f=h}return e},e}function X3(){var e=h1();return e.copy=function(){return Ih(e,X3())},di.apply(e,arguments),Ts(e)}function G3(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Ip),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return G3(e).unknown(t)},e=arguments.length?Array.from(e,Ip):[0,1],Ts(r)}function Z3(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],l;return a<i&&(l=r,r=n,n=l,l=i,i=a,a=l),e[r]=t.floor(i),e[n]=t.ceil(a),e}function fD(e){return Math.log(e)}function dD(e){return Math.exp(e)}function IQ(e){return-Math.log(-e)}function jQ(e){return-Math.exp(-e)}function zQ(e){return isFinite(e)?+("1e"+e):e<0?0:e}function HQ(e){return e===10?zQ:e===Math.E?Math.exp:t=>Math.pow(e,t)}function FQ(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function pD(e){return(t,r)=>-e(-t,r)}function p1(e){const t=e(fD,dD),r=t.domain;let n=10,i,a;function l(){return i=FQ(n),a=HQ(n),r()[0]<0?(i=pD(i),a=pD(a),e(IQ,jQ)):e(fD,dD),t}return t.base=function(u){return arguments.length?(n=+u,l()):n},t.domain=function(u){return arguments.length?(r(u),l()):r()},t.ticks=u=>{const f=r();let h=f[0],d=f[f.length-1];const m=d<h;m&&([h,d]=[d,h]);let v=i(h),g=i(d),S,_;const x=u==null?10:+u;let C=[];if(!(n%1)&&g-v<x){if(v=Math.floor(v),g=Math.ceil(g),h>0){for(;v<=g;++v)for(S=1;S<n;++S)if(_=v<0?S/a(-v):S*a(v),!(_<h)){if(_>d)break;C.push(_)}}else for(;v<=g;++v)for(S=n-1;S>=1;--S)if(_=v>0?S/a(-v):S*a(v),!(_<h)){if(_>d)break;C.push(_)}C.length*2<x&&(C=DS(h,d,x))}else C=DS(v,g,Math.min(g-v,x)).map(a);return m?C.reverse():C},t.tickFormat=(u,f)=>{if(u==null&&(u=10),f==null&&(f=n===10?"s":","),typeof f!="function"&&(!(n%1)&&(f=ph(f)).precision==null&&(f.trim=!0),f=d1(f)),u===1/0)return f;const h=Math.max(1,n*u/t.ticks().length);return d=>{let m=d/a(Math.round(i(d)));return m*n<n-.5&&(m*=n),m<=h?f(d):""}},t.nice=()=>r(Z3(r(),{floor:u=>a(Math.floor(i(u))),ceil:u=>a(Math.ceil(i(u)))})),t}function Q3(){const e=p1(Lm()).domain([1,10]);return e.copy=()=>Ih(e,Q3()).base(e.base()),di.apply(e,arguments),e}function mD(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function vD(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function m1(e){var t=1,r=e(mD(t),vD(t));return r.constant=function(n){return arguments.length?e(mD(t=+n),vD(t)):t},Ts(r)}function J3(){var e=m1(Lm());return e.copy=function(){return Ih(e,J3()).constant(e.constant())},di.apply(e,arguments)}function gD(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function UQ(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function $Q(e){return e<0?-e*e:e*e}function v1(e){var t=e(en,en),r=1;function n(){return r===1?e(en,en):r===.5?e(UQ,$Q):e(gD(r),gD(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},Ts(t)}function g1(){var e=v1(Lm());return e.copy=function(){return Ih(e,g1()).exponent(e.exponent())},di.apply(e,arguments),e}function KQ(){return g1.apply(null,arguments).exponent(.5)}function yD(e){return Math.sign(e)*e*e}function qQ(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function eI(){var e=h1(),t=[0,1],r=!1,n;function i(a){var l=qQ(e(a));return isNaN(l)?n:r?Math.round(l):l}return i.invert=function(a){return e.invert(yD(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,Ip)).map(yD)),i):t.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?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return eI(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},di.apply(i,arguments),Ts(i)}function tI(){var e=[],t=[],r=[],n;function i(){var l=0,u=Math.max(1,t.length);for(r=new Array(u-1);++l<u;)r[l-1]=GZ(e,l/u);return a}function a(l){return l==null||isNaN(l=+l)?n:t[Bh(r,l)]}return a.invertExtent=function(l){var u=t.indexOf(l);return u<0?[NaN,NaN]:[u>0?r[u-1]:e[0],u<r.length?r[u]:e[e.length-1]]},a.domain=function(l){if(!arguments.length)return e.slice();e=[];for(let u of l)u!=null&&!isNaN(u=+u)&&e.push(u);return e.sort(Cs),i()},a.range=function(l){return arguments.length?(t=Array.from(l),i()):t.slice()},a.unknown=function(l){return arguments.length?(n=l,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return tI().domain(e).range(t).unknown(n)},di.apply(a,arguments)}function rI(){var e=0,t=1,r=1,n=[.5],i=[0,1],a;function l(f){return f!=null&&f<=f?i[Bh(n,f,0,r)]:a}function u(){var f=-1;for(n=new Array(r);++f<r;)n[f]=((f+1)*t-(f-r)*e)/(r+1);return l}return l.domain=function(f){return arguments.length?([e,t]=f,e=+e,t=+t,u()):[e,t]},l.range=function(f){return arguments.length?(r=(i=Array.from(f)).length-1,u()):i.slice()},l.invertExtent=function(f){var h=i.indexOf(f);return h<0?[NaN,NaN]:h<1?[e,n[0]]:h>=r?[n[r-1],t]:[n[h-1],n[h]]},l.unknown=function(f){return arguments.length&&(a=f),l},l.thresholds=function(){return n.slice()},l.copy=function(){return rI().domain([e,t]).range(i).unknown(a)},di.apply(Ts(l),arguments)}function nI(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[Bh(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var l=t.indexOf(a);return[e[l-1],e[l]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return nI().domain(e).range(t).unknown(r)},di.apply(i,arguments)}const bb=new Date,Sb=new Date;function dr(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const l=i(a),u=i.ceil(a);return a-l<u-a?l:u},i.offset=(a,l)=>(t(a=new Date(+a),l==null?1:Math.floor(l)),a),i.range=(a,l,u)=>{const f=[];if(a=i.ceil(a),u=u==null?1:Math.floor(u),!(a<l)||!(u>0))return f;let h;do f.push(h=new Date(+a)),t(a,u),e(a);while(h<a&&a<l);return f},i.filter=a=>dr(l=>{if(l>=l)for(;e(l),!a(l);)l.setTime(l-1)},(l,u)=>{if(l>=l)if(u<0)for(;++u<=0;)for(;t(l,-1),!a(l););else for(;--u>=0;)for(;t(l,1),!a(l););}),r&&(i.count=(a,l)=>(bb.setTime(+a),Sb.setTime(+l),e(bb),e(Sb),Math.floor(r(bb,Sb))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?l=>n(l)%a===0:l=>i.count(0,l)%a===0):i)),i}const zp=dr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);zp.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?dr(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):zp);zp.range;const pa=1e3,ai=pa*60,ma=ai*60,xa=ma*24,y1=xa*7,_D=xa*30,wb=xa*365,vo=dr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*pa)},(e,t)=>(t-e)/pa,e=>e.getUTCSeconds());vo.range;const _1=dr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*pa)},(e,t)=>{e.setTime(+e+t*ai)},(e,t)=>(t-e)/ai,e=>e.getMinutes());_1.range;const b1=dr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ai)},(e,t)=>(t-e)/ai,e=>e.getUTCMinutes());b1.range;const S1=dr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*pa-e.getMinutes()*ai)},(e,t)=>{e.setTime(+e+t*ma)},(e,t)=>(t-e)/ma,e=>e.getHours());S1.range;const w1=dr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ma)},(e,t)=>(t-e)/ma,e=>e.getUTCHours());w1.range;const jh=dr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ai)/xa,e=>e.getDate()-1);jh.range;const Bm=dr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/xa,e=>e.getUTCDate()-1);Bm.range;const iI=dr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/xa,e=>Math.floor(e/xa));iI.range;function No(e){return dr(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*ai)/y1)}const Nm=No(0),Hp=No(1),WQ=No(2),VQ=No(3),Gl=No(4),YQ=No(5),XQ=No(6);Nm.range;Hp.range;WQ.range;VQ.range;Gl.range;YQ.range;XQ.range;function Io(e){return dr(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/y1)}const Im=Io(0),Fp=Io(1),GQ=Io(2),ZQ=Io(3),Zl=Io(4),QQ=Io(5),JQ=Io(6);Im.range;Fp.range;GQ.range;ZQ.range;Zl.range;QQ.range;JQ.range;const x1=dr(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());x1.range;const C1=dr(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());C1.range;const Ca=dr(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Ca.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:dr(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Ca.range;const Ea=dr(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Ea.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:dr(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Ea.range;function aI(e,t,r,n,i,a){const l=[[vo,1,pa],[vo,5,5*pa],[vo,15,15*pa],[vo,30,30*pa],[a,1,ai],[a,5,5*ai],[a,15,15*ai],[a,30,30*ai],[i,1,ma],[i,3,3*ma],[i,6,6*ma],[i,12,12*ma],[n,1,xa],[n,2,2*xa],[r,1,y1],[t,1,_D],[t,3,3*_D],[e,1,wb]];function u(h,d,m){const v=d<h;v&&([h,d]=[d,h]);const g=m&&typeof m.range=="function"?m:f(h,d,m),S=g?g.range(h,+d+1):[];return v?S.reverse():S}function f(h,d,m){const v=Math.abs(d-h)/m,g=a1(([,,x])=>x).right(l,v);if(g===l.length)return e.every(RS(h/wb,d/wb,m));if(g===0)return zp.every(Math.max(RS(h,d,m),1));const[S,_]=l[v/l[g-1][2]<l[g][2]/v?g-1:g];return S.every(_)}return[u,f]}const[eJ,tJ]=aI(Ea,C1,Im,iI,w1,b1),[rJ,nJ]=aI(Ca,x1,Nm,jh,S1,_1);function xb(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Cb(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Ic(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function iJ(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,l=e.shortDays,u=e.months,f=e.shortMonths,h=jc(i),d=zc(i),m=jc(a),v=zc(a),g=jc(l),S=zc(l),_=jc(u),x=zc(u),C=jc(f),A=zc(f),O={a:q,A:G,b:ce,B:M,c:null,d:ED,e:ED,f:OJ,g:IJ,G:zJ,H:CJ,I:EJ,j:AJ,L:sI,m:kJ,M:PJ,p:I,q:Y,Q:kD,s:PD,S:TJ,u:DJ,U:MJ,V:RJ,w:LJ,W:BJ,x:null,X:null,y:NJ,Y:jJ,Z:HJ,"%":OD},P={a:L,A:ue,b:fe,B:pe,c:null,d:AD,e:AD,f:KJ,g:eee,G:ree,H:FJ,I:UJ,j:$J,L:lI,m:qJ,M:WJ,p:Te,q:tt,Q:kD,s:PD,S:VJ,u:YJ,U:XJ,V:GJ,w:ZJ,W:QJ,x:null,X:null,y:JJ,Y:tee,Z:nee,"%":OD},D={a:ee,A:F,b:z,B:j,c:K,d:xD,e:xD,f:bJ,g:wD,G:SD,H:CD,I:CD,j:vJ,L:_J,m:mJ,M:gJ,p:$,q:pJ,Q:wJ,s:xJ,S:yJ,u:uJ,U:cJ,V:hJ,w:lJ,W:fJ,x:W,X:B,y:wD,Y:SD,Z:dJ,"%":SJ};O.x=k(r,O),O.X=k(n,O),O.c=k(t,O),P.x=k(r,P),P.X=k(n,P),P.c=k(t,P);function k(ie,Ee){return function(Oe){var le=[],ke=-1,Be=0,Xt=ie.length,Gt,jn,Is;for(Oe instanceof Date||(Oe=new Date(+Oe));++ke<Xt;)ie.charCodeAt(ke)===37&&(le.push(ie.slice(Be,ke)),(jn=bD[Gt=ie.charAt(++ke)])!=null?Gt=ie.charAt(++ke):jn=Gt==="e"?" ":"0",(Is=Ee[Gt])&&(Gt=Is(Oe,jn)),le.push(Gt),Be=ke+1);return le.push(ie.slice(Be,ke)),le.join("")}}function R(ie,Ee){return function(Oe){var le=Ic(1900,void 0,1),ke=N(le,ie,Oe+="",0),Be,Xt;if(ke!=Oe.length)return null;if("Q"in le)return new Date(le.Q);if("s"in le)return new Date(le.s*1e3+("L"in le?le.L:0));if(Ee&&!("Z"in le)&&(le.Z=0),"p"in le&&(le.H=le.H%12+le.p*12),le.m===void 0&&(le.m="q"in le?le.q:0),"V"in le){if(le.V<1||le.V>53)return null;"w"in le||(le.w=1),"Z"in le?(Be=Cb(Ic(le.y,0,1)),Xt=Be.getUTCDay(),Be=Xt>4||Xt===0?Fp.ceil(Be):Fp(Be),Be=Bm.offset(Be,(le.V-1)*7),le.y=Be.getUTCFullYear(),le.m=Be.getUTCMonth(),le.d=Be.getUTCDate()+(le.w+6)%7):(Be=xb(Ic(le.y,0,1)),Xt=Be.getDay(),Be=Xt>4||Xt===0?Hp.ceil(Be):Hp(Be),Be=jh.offset(Be,(le.V-1)*7),le.y=Be.getFullYear(),le.m=Be.getMonth(),le.d=Be.getDate()+(le.w+6)%7)}else("W"in le||"U"in le)&&("w"in le||(le.w="u"in le?le.u%7:"W"in le?1:0),Xt="Z"in le?Cb(Ic(le.y,0,1)).getUTCDay():xb(Ic(le.y,0,1)).getDay(),le.m=0,le.d="W"in le?(le.w+6)%7+le.W*7-(Xt+5)%7:le.w+le.U*7-(Xt+6)%7);return"Z"in le?(le.H+=le.Z/100|0,le.M+=le.Z%100,Cb(le)):xb(le)}}function N(ie,Ee,Oe,le){for(var ke=0,Be=Ee.length,Xt=Oe.length,Gt,jn;ke<Be;){if(le>=Xt)return-1;if(Gt=Ee.charCodeAt(ke++),Gt===37){if(Gt=Ee.charAt(ke++),jn=D[Gt in bD?Ee.charAt(ke++):Gt],!jn||(le=jn(ie,Oe,le))<0)return-1}else if(Gt!=Oe.charCodeAt(le++))return-1}return le}function $(ie,Ee,Oe){var le=h.exec(Ee.slice(Oe));return le?(ie.p=d.get(le[0].toLowerCase()),Oe+le[0].length):-1}function ee(ie,Ee,Oe){var le=g.exec(Ee.slice(Oe));return le?(ie.w=S.get(le[0].toLowerCase()),Oe+le[0].length):-1}function F(ie,Ee,Oe){var le=m.exec(Ee.slice(Oe));return le?(ie.w=v.get(le[0].toLowerCase()),Oe+le[0].length):-1}function z(ie,Ee,Oe){var le=C.exec(Ee.slice(Oe));return le?(ie.m=A.get(le[0].toLowerCase()),Oe+le[0].length):-1}function j(ie,Ee,Oe){var le=_.exec(Ee.slice(Oe));return le?(ie.m=x.get(le[0].toLowerCase()),Oe+le[0].length):-1}function K(ie,Ee,Oe){return N(ie,t,Ee,Oe)}function W(ie,Ee,Oe){return N(ie,r,Ee,Oe)}function B(ie,Ee,Oe){return N(ie,n,Ee,Oe)}function q(ie){return l[ie.getDay()]}function G(ie){return a[ie.getDay()]}function ce(ie){return f[ie.getMonth()]}function M(ie){return u[ie.getMonth()]}function I(ie){return i[+(ie.getHours()>=12)]}function Y(ie){return 1+~~(ie.getMonth()/3)}function L(ie){return l[ie.getUTCDay()]}function ue(ie){return a[ie.getUTCDay()]}function fe(ie){return f[ie.getUTCMonth()]}function pe(ie){return u[ie.getUTCMonth()]}function Te(ie){return i[+(ie.getUTCHours()>=12)]}function tt(ie){return 1+~~(ie.getUTCMonth()/3)}return{format:function(ie){var Ee=k(ie+="",O);return Ee.toString=function(){return ie},Ee},parse:function(ie){var Ee=R(ie+="",!1);return Ee.toString=function(){return ie},Ee},utcFormat:function(ie){var Ee=k(ie+="",P);return Ee.toString=function(){return ie},Ee},utcParse:function(ie){var Ee=R(ie+="",!0);return Ee.toString=function(){return ie},Ee}}}var bD={"-":"",_:" ",0:"0"},Or=/^\s*\d+/,aJ=/^%/,sJ=/[\\^$*+?|[\]().{}]/g;function st(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(t)+i:i)}function oJ(e){return e.replace(sJ,"\\$&")}function jc(e){return new RegExp("^(?:"+e.map(oJ).join("|")+")","i")}function zc(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function lJ(e,t,r){var n=Or.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function uJ(e,t,r){var n=Or.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function cJ(e,t,r){var n=Or.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function hJ(e,t,r){var n=Or.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function fJ(e,t,r){var n=Or.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function SD(e,t,r){var n=Or.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function wD(e,t,r){var n=Or.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function dJ(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function pJ(e,t,r){var n=Or.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function mJ(e,t,r){var n=Or.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function xD(e,t,r){var n=Or.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function vJ(e,t,r){var n=Or.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function CD(e,t,r){var n=Or.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function gJ(e,t,r){var n=Or.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function yJ(e,t,r){var n=Or.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function _J(e,t,r){var n=Or.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function bJ(e,t,r){var n=Or.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function SJ(e,t,r){var n=aJ.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function wJ(e,t,r){var n=Or.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function xJ(e,t,r){var n=Or.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function ED(e,t){return st(e.getDate(),t,2)}function CJ(e,t){return st(e.getHours(),t,2)}function EJ(e,t){return st(e.getHours()%12||12,t,2)}function AJ(e,t){return st(1+jh.count(Ca(e),e),t,3)}function sI(e,t){return st(e.getMilliseconds(),t,3)}function OJ(e,t){return sI(e,t)+"000"}function kJ(e,t){return st(e.getMonth()+1,t,2)}function PJ(e,t){return st(e.getMinutes(),t,2)}function TJ(e,t){return st(e.getSeconds(),t,2)}function DJ(e){var t=e.getDay();return t===0?7:t}function MJ(e,t){return st(Nm.count(Ca(e)-1,e),t,2)}function oI(e){var t=e.getDay();return t>=4||t===0?Gl(e):Gl.ceil(e)}function RJ(e,t){return e=oI(e),st(Gl.count(Ca(e),e)+(Ca(e).getDay()===4),t,2)}function LJ(e){return e.getDay()}function BJ(e,t){return st(Hp.count(Ca(e)-1,e),t,2)}function NJ(e,t){return st(e.getFullYear()%100,t,2)}function IJ(e,t){return e=oI(e),st(e.getFullYear()%100,t,2)}function jJ(e,t){return st(e.getFullYear()%1e4,t,4)}function zJ(e,t){var r=e.getDay();return e=r>=4||r===0?Gl(e):Gl.ceil(e),st(e.getFullYear()%1e4,t,4)}function HJ(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+st(t/60|0,"0",2)+st(t%60,"0",2)}function AD(e,t){return st(e.getUTCDate(),t,2)}function FJ(e,t){return st(e.getUTCHours(),t,2)}function UJ(e,t){return st(e.getUTCHours()%12||12,t,2)}function $J(e,t){return st(1+Bm.count(Ea(e),e),t,3)}function lI(e,t){return st(e.getUTCMilliseconds(),t,3)}function KJ(e,t){return lI(e,t)+"000"}function qJ(e,t){return st(e.getUTCMonth()+1,t,2)}function WJ(e,t){return st(e.getUTCMinutes(),t,2)}function VJ(e,t){return st(e.getUTCSeconds(),t,2)}function YJ(e){var t=e.getUTCDay();return t===0?7:t}function XJ(e,t){return st(Im.count(Ea(e)-1,e),t,2)}function uI(e){var t=e.getUTCDay();return t>=4||t===0?Zl(e):Zl.ceil(e)}function GJ(e,t){return e=uI(e),st(Zl.count(Ea(e),e)+(Ea(e).getUTCDay()===4),t,2)}function ZJ(e){return e.getUTCDay()}function QJ(e,t){return st(Fp.count(Ea(e)-1,e),t,2)}function JJ(e,t){return st(e.getUTCFullYear()%100,t,2)}function eee(e,t){return e=uI(e),st(e.getUTCFullYear()%100,t,2)}function tee(e,t){return st(e.getUTCFullYear()%1e4,t,4)}function ree(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Zl(e):Zl.ceil(e),st(e.getUTCFullYear()%1e4,t,4)}function nee(){return"+0000"}function OD(){return"%"}function kD(e){return+e}function PD(e){return Math.floor(+e/1e3)}var Ml,cI,hI;iee({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 iee(e){return Ml=iJ(e),cI=Ml.format,Ml.parse,hI=Ml.utcFormat,Ml.utcParse,Ml}function aee(e){return new Date(e)}function see(e){return e instanceof Date?+e:+new Date(+e)}function E1(e,t,r,n,i,a,l,u,f,h){var d=h1(),m=d.invert,v=d.domain,g=h(".%L"),S=h(":%S"),_=h("%I:%M"),x=h("%I %p"),C=h("%a %d"),A=h("%b %d"),O=h("%B"),P=h("%Y");function D(k){return(f(k)<k?g:u(k)<k?S:l(k)<k?_:a(k)<k?x:n(k)<k?i(k)<k?C:A:r(k)<k?O:P)(k)}return d.invert=function(k){return new Date(m(k))},d.domain=function(k){return arguments.length?v(Array.from(k,see)):v().map(aee)},d.ticks=function(k){var R=v();return e(R[0],R[R.length-1],k??10)},d.tickFormat=function(k,R){return R==null?D:h(R)},d.nice=function(k){var R=v();return(!k||typeof k.range!="function")&&(k=t(R[0],R[R.length-1],k??10)),k?v(Z3(R,k)):d},d.copy=function(){return Ih(d,E1(e,t,r,n,i,a,l,u,f,h))},d}function oee(){return di.apply(E1(rJ,nJ,Ca,x1,Nm,jh,S1,_1,vo,cI).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function lee(){return di.apply(E1(eJ,tJ,Ea,C1,Im,Bm,w1,b1,vo,hI).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function jm(){var e=0,t=1,r,n,i,a,l=en,u=!1,f;function h(m){return m==null||isNaN(m=+m)?f:l(i===0?.5:(m=(a(m)-r)*i,u?Math.max(0,Math.min(1,m)):m))}h.domain=function(m){return arguments.length?([e,t]=m,r=a(e=+e),n=a(t=+t),i=r===n?0:1/(n-r),h):[e,t]},h.clamp=function(m){return arguments.length?(u=!!m,h):u},h.interpolator=function(m){return arguments.length?(l=m,h):l};function d(m){return function(v){var g,S;return arguments.length?([g,S]=v,l=m(g,S),h):[l(0),l(1)]}}return h.range=d(lu),h.rangeRound=d(c1),h.unknown=function(m){return arguments.length?(f=m,h):f},function(m){return a=m,r=m(e),n=m(t),i=r===n?0:1/(n-r),h}}function Ds(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function fI(){var e=Ts(jm()(en));return e.copy=function(){return Ds(e,fI())},Ba.apply(e,arguments)}function dI(){var e=p1(jm()).domain([1,10]);return e.copy=function(){return Ds(e,dI()).base(e.base())},Ba.apply(e,arguments)}function pI(){var e=m1(jm());return e.copy=function(){return Ds(e,pI()).constant(e.constant())},Ba.apply(e,arguments)}function A1(){var e=v1(jm());return e.copy=function(){return Ds(e,A1()).exponent(e.exponent())},Ba.apply(e,arguments)}function uee(){return A1.apply(null,arguments).exponent(.5)}function mI(){var e=[],t=en;function r(n){if(n!=null&&!isNaN(n=+n))return t((Bh(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Cs),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>XZ(e,a/n))},r.copy=function(){return mI(t).domain(e)},Ba.apply(r,arguments)}function zm(){var e=0,t=.5,r=1,n=1,i,a,l,u,f,h=en,d,m=!1,v;function g(_){return isNaN(_=+_)?v:(_=.5+((_=+d(_))-a)*(n*_<n*a?u:f),h(m?Math.max(0,Math.min(1,_)):_))}g.domain=function(_){return arguments.length?([e,t,r]=_,i=d(e=+e),a=d(t=+t),l=d(r=+r),u=i===a?0:.5/(a-i),f=a===l?0:.5/(l-a),n=a<i?-1:1,g):[e,t,r]},g.clamp=function(_){return arguments.length?(m=!!_,g):m},g.interpolator=function(_){return arguments.length?(h=_,g):h};function S(_){return function(x){var C,A,O;return arguments.length?([C,A,O]=x,h=SQ(_,[C,A,O]),g):[h(0),h(.5),h(1)]}}return g.range=S(lu),g.rangeRound=S(c1),g.unknown=function(_){return arguments.length?(v=_,g):v},function(_){return d=_,i=_(e),a=_(t),l=_(r),u=i===a?0:.5/(a-i),f=a===l?0:.5/(l-a),n=a<i?-1:1,g}}function vI(){var e=Ts(zm()(en));return e.copy=function(){return Ds(e,vI())},Ba.apply(e,arguments)}function gI(){var e=p1(zm()).domain([.1,1,10]);return e.copy=function(){return Ds(e,gI()).base(e.base())},Ba.apply(e,arguments)}function yI(){var e=m1(zm());return e.copy=function(){return Ds(e,yI()).constant(e.constant())},Ba.apply(e,arguments)}function O1(){var e=v1(zm());return e.copy=function(){return Ds(e,O1()).exponent(e.exponent())},Ba.apply(e,arguments)}function cee(){return O1.apply(null,arguments).exponent(.5)}const Yc=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:o1,scaleDiverging:vI,scaleDivergingLog:gI,scaleDivergingPow:O1,scaleDivergingSqrt:cee,scaleDivergingSymlog:yI,scaleIdentity:G3,scaleImplicit:LS,scaleLinear:X3,scaleLog:Q3,scaleOrdinal:s1,scalePoint:U3,scalePow:g1,scaleQuantile:tI,scaleQuantize:rI,scaleRadial:eI,scaleSequential:fI,scaleSequentialLog:dI,scaleSequentialPow:A1,scaleSequentialQuantile:mI,scaleSequentialSqrt:uee,scaleSequentialSymlog:pI,scaleSqrt:KQ,scaleSymlog:J3,scaleThreshold:nI,scaleTime:oee,scaleUtc:lee,tickFormat:Y3},Symbol.toStringTag,{value:"Module"}));var Ms=e=>e.chartData,zh=X([Ms],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),uu=(e,t,r,n)=>n?zh(e):Ms(e);function Ql(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(zr(t)&&zr(r))return!0}return!1}function TD(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function hee(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,n]=e,i,a;if(zr(r))i=r;else if(typeof r=="function")return;if(zr(n))a=n;else if(typeof n=="function")return;var l=[i,a];if(Ql(l))return l}}function fee(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(Ql(n))return TD(n,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var[i,a]=e,l,u;if(i==="auto")t!=null&&(l=Math.min(...t));else if(ye(i))l=i;else if(typeof i=="function")try{t!=null&&(l=i(t==null?void 0:t[0]))}catch{}else if(typeof i=="string"&&bT.test(i)){var f=bT.exec(i);if(f==null||t==null)l=void 0;else{var h=+f[1];l=t[0]-h}}else l=t==null?void 0:t[0];if(a==="auto")t!=null&&(u=Math.max(...t));else if(ye(a))u=a;else if(typeof a=="function")try{t!=null&&(u=a(t==null?void 0:t[1]))}catch{}else if(typeof a=="string"&&ST.test(a)){var d=ST.exec(a);if(d==null||t==null)u=void 0;else{var m=+d[1];u=t[1]+m}}else u=t==null?void 0:t[1];var v=[l,u];if(Ql(v))return t==null?v:TD(v,t,r)}}}var cu=1e9,dee={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},P1,Lt=!0,ui="[DecimalError] ",Co=ui+"Invalid argument: ",k1=ui+"Exponent out of range: ",hu=Math.floor,co=Math.pow,pee=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Rn,yr=1e7,Pt=7,_I=9007199254740991,Up=hu(_I/Pt),be={};be.absoluteValue=be.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};be.comparedTo=be.cmp=function(e){var t,r,n,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};be.decimalPlaces=be.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Pt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};be.dividedBy=be.div=function(e){return ya(this,new this.constructor(e))};be.dividedToIntegerBy=be.idiv=function(e){var t=this,r=t.constructor;return St(ya(t,new r(e),0,1),r.precision)};be.equals=be.eq=function(e){return!this.cmp(e)};be.exponent=function(){return ir(this)};be.greaterThan=be.gt=function(e){return this.cmp(e)>0};be.greaterThanOrEqualTo=be.gte=function(e){return this.cmp(e)>=0};be.isInteger=be.isint=function(){return this.e>this.d.length-2};be.isNegative=be.isneg=function(){return this.s<0};be.isPositive=be.ispos=function(){return this.s>0};be.isZero=function(){return this.s===0};be.lessThan=be.lt=function(e){return this.cmp(e)<0};be.lessThanOrEqualTo=be.lte=function(e){return this.cmp(e)<1};be.logarithm=be.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Rn))throw Error(ui+"NaN");if(r.s<1)throw Error(ui+(r.s?"NaN":"-Infinity"));return r.eq(Rn)?new n(0):(Lt=!1,t=ya(mh(r,a),mh(e,a),a),Lt=!0,St(t,i))};be.minus=be.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?wI(t,e):bI(t,(e.s=-e.s,e))};be.modulo=be.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(ui+"NaN");return r.s?(Lt=!1,t=ya(r,e,0,1).times(e),Lt=!0,r.minus(t)):St(new n(r),i)};be.naturalExponential=be.exp=function(){return SI(this)};be.naturalLogarithm=be.ln=function(){return mh(this)};be.negated=be.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};be.plus=be.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?bI(t,e):wI(t,(e.s=-e.s,e))};be.precision=be.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Co+e);if(t=ir(i)+1,n=i.d.length-1,r=n*Pt+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};be.squareRoot=be.sqrt=function(){var e,t,r,n,i,a,l,u=this,f=u.constructor;if(u.s<1){if(!u.s)return new f(0);throw Error(ui+"NaN")}for(e=ir(u),Lt=!1,i=Math.sqrt(+u),i==0||i==1/0?(t=Ii(u.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=hu((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t)):n=new f(i.toString()),r=f.precision,i=l=r+3;;)if(a=n,n=a.plus(ya(u,a,l+2)).times(.5),Ii(a.d).slice(0,l)===(t=Ii(n.d)).slice(0,l)){if(t=t.slice(l-3,l+1),i==l&&t=="4999"){if(St(a,r+1,0),a.times(a).eq(u)){n=a;break}}else if(t!="9999")break;l+=4}return Lt=!0,St(n,r)};be.times=be.mul=function(e){var t,r,n,i,a,l,u,f,h,d=this,m=d.constructor,v=d.d,g=(e=new m(e)).d;if(!d.s||!e.s)return new m(0);for(e.s*=d.s,r=d.e+e.e,f=v.length,h=g.length,f<h&&(a=v,v=g,g=a,l=f,f=h,h=l),a=[],l=f+h,n=l;n--;)a.push(0);for(n=h;--n>=0;){for(t=0,i=f+n;i>n;)u=a[i]+g[n]*v[i-n-1]+t,a[i--]=u%yr|0,t=u/yr|0;a[i]=(a[i]+t)%yr|0}for(;!a[--l];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,Lt?St(e,m.precision):e};be.toDecimalPlaces=be.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:($i(e,0,cu),t===void 0?t=n.rounding:$i(t,0,8),St(r,e+ir(r)+1,t))};be.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Po(n,!0):($i(e,0,cu),t===void 0?t=i.rounding:$i(t,0,8),n=St(new i(n),e+1,t),r=Po(n,!0,e+1)),r};be.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?Po(i):($i(e,0,cu),t===void 0?t=a.rounding:$i(t,0,8),n=St(new a(i),e+ir(i)+1,t),r=Po(n.abs(),!1,e+ir(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};be.toInteger=be.toint=function(){var e=this,t=e.constructor;return St(new t(e),ir(e)+1,t.rounding)};be.toNumber=function(){return+this};be.toPower=be.pow=function(e){var t,r,n,i,a,l,u=this,f=u.constructor,h=12,d=+(e=new f(e));if(!e.s)return new f(Rn);if(u=new f(u),!u.s){if(e.s<1)throw Error(ui+"Infinity");return u}if(u.eq(Rn))return u;if(n=f.precision,e.eq(Rn))return St(u,n);if(t=e.e,r=e.d.length-1,l=t>=r,a=u.s,l){if((r=d<0?-d:d)<=_I){for(i=new f(Rn),t=Math.ceil(n/Pt+4),Lt=!1;r%2&&(i=i.times(u),MD(i.d,t)),r=hu(r/2),r!==0;)u=u.times(u),MD(u.d,t);return Lt=!0,e.s<0?new f(Rn).div(i):St(i,n)}}else if(a<0)throw Error(ui+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,u.s=1,Lt=!1,i=e.times(mh(u,n+h)),Lt=!0,i=SI(i),i.s=a,i};be.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=ir(i),n=Po(i,r<=a.toExpNeg||r>=a.toExpPos)):($i(e,1,cu),t===void 0?t=a.rounding:$i(t,0,8),i=St(new a(i),e,t),r=ir(i),n=Po(i,e<=r||r<=a.toExpNeg,e)),n};be.toSignificantDigits=be.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):($i(e,1,cu),t===void 0?t=n.rounding:$i(t,0,8)),St(new n(r),e,t)};be.toString=be.valueOf=be.val=be.toJSON=be[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=ir(e),r=e.constructor;return Po(e,t<=r.toExpNeg||t>=r.toExpPos)};function bI(e,t){var r,n,i,a,l,u,f,h,d=e.constructor,m=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),Lt?St(t,m):t;if(f=e.d,h=t.d,l=e.e,i=t.e,f=f.slice(),a=l-i,a){for(a<0?(n=f,a=-a,u=h.length):(n=h,i=l,u=f.length),l=Math.ceil(m/Pt),u=l>u?l+1:u+1,a>u&&(a=u,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(u=f.length,a=h.length,u-a<0&&(a=u,n=h,h=f,f=n),r=0;a;)r=(f[--a]=f[a]+h[a]+r)/yr|0,f[a]%=yr;for(r&&(f.unshift(r),++i),u=f.length;f[--u]==0;)f.pop();return t.d=f,t.e=i,Lt?St(t,m):t}function $i(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Co+e)}function Ii(e){var t,r,n,i=e.length-1,a="",l=e[0];if(i>0){for(a+=l,t=1;t<i;t++)n=e[t]+"",r=Pt-n.length,r&&(a+=ys(r)),a+=n;l=e[t],n=l+"",r=Pt-n.length,r&&(a+=ys(r))}else if(l===0)return"0";for(;l%10===0;)l/=10;return a+l}var ya=(function(){function e(n,i){var a,l=0,u=n.length;for(n=n.slice();u--;)a=n[u]*i+l,n[u]=a%yr|0,l=a/yr|0;return l&&n.unshift(l),n}function t(n,i,a,l){var u,f;if(a!=l)f=a>l?1:-1;else for(u=f=0;u<a;u++)if(n[u]!=i[u]){f=n[u]>i[u]?1:-1;break}return f}function r(n,i,a){for(var l=0;a--;)n[a]-=l,l=n[a]<i[a]?1:0,n[a]=l*yr+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,l){var u,f,h,d,m,v,g,S,_,x,C,A,O,P,D,k,R,N,$=n.constructor,ee=n.s==i.s?1:-1,F=n.d,z=i.d;if(!n.s)return new $(n);if(!i.s)throw Error(ui+"Division by zero");for(f=n.e-i.e,R=z.length,D=F.length,g=new $(ee),S=g.d=[],h=0;z[h]==(F[h]||0);)++h;if(z[h]>(F[h]||0)&&--f,a==null?A=a=$.precision:l?A=a+(ir(n)-ir(i))+1:A=a,A<0)return new $(0);if(A=A/Pt+2|0,h=0,R==1)for(d=0,z=z[0],A++;(h<D||d)&&A--;h++)O=d*yr+(F[h]||0),S[h]=O/z|0,d=O%z|0;else{for(d=yr/(z[0]+1)|0,d>1&&(z=e(z,d),F=e(F,d),R=z.length,D=F.length),P=R,_=F.slice(0,R),x=_.length;x<R;)_[x++]=0;N=z.slice(),N.unshift(0),k=z[0],z[1]>=yr/2&&++k;do d=0,u=t(z,_,R,x),u<0?(C=_[0],R!=x&&(C=C*yr+(_[1]||0)),d=C/k|0,d>1?(d>=yr&&(d=yr-1),m=e(z,d),v=m.length,x=_.length,u=t(m,_,v,x),u==1&&(d--,r(m,R<v?N:z,v))):(d==0&&(u=d=1),m=z.slice()),v=m.length,v<x&&m.unshift(0),r(_,m,x),u==-1&&(x=_.length,u=t(z,_,R,x),u<1&&(d++,r(_,R<x?N:z,x))),x=_.length):u===0&&(d++,_=[0]),S[h++]=d,u&&_[0]?_[x++]=F[P]||0:(_=[F[P]],x=1);while((P++<D||_[0]!==void 0)&&A--)}return S[0]||S.shift(),g.e=f,St(g,l?a+ir(g)+1:a)}})();function SI(e,t){var r,n,i,a,l,u,f=0,h=0,d=e.constructor,m=d.precision;if(ir(e)>16)throw Error(k1+ir(e));if(!e.s)return new d(Rn);for(Lt=!1,u=m,l=new d(.03125);e.abs().gte(.1);)e=e.times(l),h+=5;for(n=Math.log(co(2,h))/Math.LN10*2+5|0,u+=n,r=i=a=new d(Rn),d.precision=u;;){if(i=St(i.times(e),u),r=r.times(++f),l=a.plus(ya(i,r,u)),Ii(l.d).slice(0,u)===Ii(a.d).slice(0,u)){for(;h--;)a=St(a.times(a),u);return d.precision=m,t==null?(Lt=!0,St(a,m)):a}a=l}}function ir(e){for(var t=e.e*Pt,r=e.d[0];r>=10;r/=10)t++;return t}function Eb(e,t,r){if(t>e.LN10.sd())throw Lt=!0,r&&(e.precision=r),Error(ui+"LN10 precision limit exceeded");return St(new e(e.LN10),t)}function ys(e){for(var t="";e--;)t+="0";return t}function mh(e,t){var r,n,i,a,l,u,f,h,d,m=1,v=10,g=e,S=g.d,_=g.constructor,x=_.precision;if(g.s<1)throw Error(ui+(g.s?"NaN":"-Infinity"));if(g.eq(Rn))return new _(0);if(t==null?(Lt=!1,h=x):h=t,g.eq(10))return t==null&&(Lt=!0),Eb(_,h);if(h+=v,_.precision=h,r=Ii(S),n=r.charAt(0),a=ir(g),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)g=g.times(e),r=Ii(g.d),n=r.charAt(0),m++;a=ir(g),n>1?(g=new _("0."+r),a++):g=new _(n+"."+r.slice(1))}else return f=Eb(_,h+2,x).times(a+""),g=mh(new _(n+"."+r.slice(1)),h-v).plus(f),_.precision=x,t==null?(Lt=!0,St(g,x)):g;for(u=l=g=ya(g.minus(Rn),g.plus(Rn),h),d=St(g.times(g),h),i=3;;){if(l=St(l.times(d),h),f=u.plus(ya(l,new _(i),h)),Ii(f.d).slice(0,h)===Ii(u.d).slice(0,h))return u=u.times(2),a!==0&&(u=u.plus(Eb(_,h+2,x).times(a+""))),u=ya(u,new _(m),h),_.precision=x,t==null?(Lt=!0,St(u,x)):u;u=f,i+=2}}function DD(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=hu(r/Pt),e.d=[],n=(r+1)%Pt,r<0&&(n+=Pt),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=Pt;n<i;)e.d.push(+t.slice(n,n+=Pt));t=t.slice(n),n=Pt-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),Lt&&(e.e>Up||e.e<-Up))throw Error(k1+r)}else e.s=0,e.e=0,e.d=[0];return e}function St(e,t,r){var n,i,a,l,u,f,h,d,m=e.d;for(l=1,a=m[0];a>=10;a/=10)l++;if(n=t-l,n<0)n+=Pt,i=t,h=m[d=0];else{if(d=Math.ceil((n+1)/Pt),a=m.length,d>=a)return e;for(h=a=m[d],l=1;a>=10;a/=10)l++;n%=Pt,i=n-Pt+l}if(r!==void 0&&(a=co(10,l-i-1),u=h/a%10|0,f=t<0||m[d+1]!==void 0||h%a,f=r<4?(u||f)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||f||r==6&&(n>0?i>0?h/co(10,l-i):0:m[d-1])%10&1||r==(e.s<0?8:7))),t<1||!m[0])return f?(a=ir(e),m.length=1,t=t-a-1,m[0]=co(10,(Pt-t%Pt)%Pt),e.e=hu(-t/Pt)||0):(m.length=1,m[0]=e.e=e.s=0),e;if(n==0?(m.length=d,a=1,d--):(m.length=d+1,a=co(10,Pt-n),m[d]=i>0?(h/co(10,l-i)%co(10,i)|0)*a:0),f)for(;;)if(d==0){(m[0]+=a)==yr&&(m[0]=1,++e.e);break}else{if(m[d]+=a,m[d]!=yr)break;m[d--]=0,a=1}for(n=m.length;m[--n]===0;)m.pop();if(Lt&&(e.e>Up||e.e<-Up))throw Error(k1+ir(e));return e}function wI(e,t){var r,n,i,a,l,u,f,h,d,m,v=e.constructor,g=v.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new v(e),Lt?St(t,g):t;if(f=e.d,m=t.d,n=t.e,h=e.e,f=f.slice(),l=h-n,l){for(d=l<0,d?(r=f,l=-l,u=m.length):(r=m,n=h,u=f.length),i=Math.max(Math.ceil(g/Pt),u)+2,l>i&&(l=i,r.length=1),r.reverse(),i=l;i--;)r.push(0);r.reverse()}else{for(i=f.length,u=m.length,d=i<u,d&&(u=i),i=0;i<u;i++)if(f[i]!=m[i]){d=f[i]<m[i];break}l=0}for(d&&(r=f,f=m,m=r,t.s=-t.s),u=f.length,i=m.length-u;i>0;--i)f[u++]=0;for(i=m.length;i>l;){if(f[--i]<m[i]){for(a=i;a&&f[--a]===0;)f[a]=yr-1;--f[a],f[i]+=yr}f[i]-=m[i]}for(;f[--u]===0;)f.pop();for(;f[0]===0;f.shift())--n;return f[0]?(t.d=f,t.e=n,Lt?St(t,g):t):new v(0)}function Po(e,t,r){var n,i=ir(e),a=Ii(e.d),l=a.length;return t?(r&&(n=r-l)>0?a=a.charAt(0)+"."+a.slice(1)+ys(n):l>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+ys(-i-1)+a,r&&(n=r-l)>0&&(a+=ys(n))):i>=l?(a+=ys(i+1-l),r&&(n=r-i-1)>0&&(a=a+"."+ys(n))):((n=i+1)<l&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-l)>0&&(i+1===l&&(a+="."),a+=ys(n))),e.s<0?"-"+a:a}function MD(e,t){if(e.length>t)return e.length=t,!0}function xI(e){var t,r,n;function i(a){var l=this;if(!(l instanceof i))return new i(a);if(l.constructor=i,a instanceof i){l.s=a.s,l.e=a.e,l.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Co+a);if(a>0)l.s=1;else if(a<0)a=-a,l.s=-1;else{l.s=0,l.e=0,l.d=[0];return}if(a===~~a&&a<1e7){l.e=0,l.d=[a];return}return DD(l,a.toString())}else if(typeof a!="string")throw Error(Co+a);if(a.charCodeAt(0)===45?(a=a.slice(1),l.s=-1):l.s=1,pee.test(a))DD(l,a);else throw Error(Co+a)}if(i.prototype=be,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=xI,i.config=i.set=mee,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function mee(e){if(!e||typeof e!="object")throw Error(ui+"Object expected");var t,r,n,i=["precision",1,cu,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(hu(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Co+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Co+r+": "+n);return this}var P1=xI(dee);Rn=new P1(1);const ft=P1;var vee=e=>e,CI={},EI=e=>e===CI,RD=e=>function t(){return arguments.length===0||arguments.length===1&&EI(arguments.length<=0?void 0:arguments[0])?t:e(...arguments)},AI=(e,t)=>e===1?t:RD(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var a=n.filter(l=>l!==CI).length;return a>=e?t(...n):AI(e-a,RD(function(){for(var l=arguments.length,u=new Array(l),f=0;f<l;f++)u[f]=arguments[f];var h=n.map(d=>EI(d)?u.shift():d);return t(...h,...u)}))}),Hm=e=>AI(e.length,e),jS=(e,t)=>{for(var r=[],n=e;n<t;++n)r[n-e]=n;return r},gee=Hm((e,t)=>Array.isArray(t)?t.map(e):Object.keys(t).map(r=>t[r]).map(e)),yee=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return vee;var i=r.reverse(),a=i[0],l=i.slice(1);return function(){return l.reduce((u,f)=>f(u),a(...arguments))}},zS=e=>Array.isArray(e)?e.reverse():e.split("").reverse().join(""),OI=e=>{var t=null,r=null;return function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return t&&i.every((l,u)=>{var f;return l===((f=t)===null||f===void 0?void 0:f[u])})||(t=i,r=e(...i)),r}};function kI(e){var t;return e===0?t=1:t=Math.floor(new ft(e).abs().log(10).toNumber())+1,t}function PI(e,t,r){for(var n=new ft(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}Hm((e,t,r)=>{var n=+e,i=+t;return n+r*(i-n)});Hm((e,t,r)=>{var n=t-+e;return n=n||1/0,(r-e)/n});Hm((e,t,r)=>{var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});var TI=e=>{var[t,r]=e,[n,i]=[t,r];return t>r&&([n,i]=[r,t]),[n,i]},DI=(e,t,r)=>{if(e.lte(0))return new ft(0);var n=kI(e.toNumber()),i=new ft(10).pow(n),a=e.div(i),l=n!==1?.05:.1,u=new ft(Math.ceil(a.div(l).toNumber())).add(r).mul(l),f=u.mul(i);return t?new ft(f.toNumber()):new ft(Math.ceil(f.toNumber()))},_ee=(e,t,r)=>{var n=new ft(1),i=new ft(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new ft(10).pow(kI(e)-1),i=new ft(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new ft(Math.floor(e)))}else e===0?i=new ft(Math.floor((t-1)/2)):r||(i=new ft(Math.floor(e)));var l=Math.floor((t-1)/2),u=yee(gee(f=>i.add(new ft(f-l).mul(n)).toNumber()),jS);return u(0,t)},MI=function(t,r,n,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((r-t)/(n-1)))return{step:new ft(0),tickMin:new ft(0),tickMax:new ft(0)};var l=DI(new ft(r).sub(t).div(n-1),i,a),u;t<=0&&r>=0?u=new ft(0):(u=new ft(t).add(r).div(2),u=u.sub(new ft(u).mod(l)));var f=Math.ceil(u.sub(t).div(l).toNumber()),h=Math.ceil(new ft(r).sub(u).div(l).toNumber()),d=f+h+1;return d>n?MI(t,r,n,i,a+1):(d<n&&(h=r>0?h+(n-d):h,f=r>0?f:f+(n-d)),{step:l,tickMin:u.sub(new ft(f).mul(l)),tickMax:u.add(new ft(h).mul(l))})};function bee(e){var[t,r]=e,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(n,2),[l,u]=TI([t,r]);if(l===-1/0||u===1/0){var f=u===1/0?[l,...jS(0,n-1).map(()=>1/0)]:[...jS(0,n-1).map(()=>-1/0),u];return t>r?zS(f):f}if(l===u)return _ee(l,n,i);var{step:h,tickMin:d,tickMax:m}=MI(l,u,a,i,0),v=PI(d,m.add(new ft(.1).mul(h)),h);return t>r?zS(v):v}function See(e,t){var[r,n]=e,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[a,l]=TI([r,n]);if(a===-1/0||l===1/0)return[r,n];if(a===l)return[a];var u=Math.max(t,2),f=DI(new ft(l).sub(a).div(u-1),i,0),h=[...PI(new ft(a),new ft(l),f),l];return i===!1&&(h=h.map(d=>Math.round(d))),r>n?zS(h):h}var wee=OI(bee),xee=OI(See),RI=e=>e.rootProps.maxBarSize,Cee=e=>e.rootProps.barGap,LI=e=>e.rootProps.barCategoryGap,Eee=e=>e.rootProps.barSize,Hh=e=>e.rootProps.stackOffset,T1=e=>e.options.chartName,Fm=e=>e.rootProps.syncId,BI=e=>e.rootProps.syncMethod,Um=e=>e.options.eventEmitter,Li={allowDuplicatedCategory:!0,angleAxisId:0,axisLine:!0,cx:0,cy:0,orientation:"outer",reversed:!1,scale:"auto",tick:!0,tickLine:!0,tickSize:8,type:"category"},mn={allowDataOverflow:!1,allowDuplicatedCategory:!0,angle:0,axisLine:!0,cx:0,cy:0,orientation:"right",radiusAxisId:0,scale:"auto",stroke:"#ccc",tick:!0,tickCount:5,type:"number"},$m=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t},Aee={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Li.angleAxisId,includeHidden:!1,name:void 0,reversed:Li.reversed,scale:Li.scale,tick:Li.tick,tickCount:void 0,ticks:void 0,type:Li.type,unit:void 0},Oee={allowDataOverflow:mn.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:mn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:mn.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:mn.scale,tick:mn.tick,tickCount:mn.tickCount,ticks:void 0,type:mn.type,unit:void 0},kee={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:Li.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Li.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:Li.scale,tick:Li.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},Pee={allowDataOverflow:mn.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:mn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:mn.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:mn.scale,tick:mn.tick,tickCount:mn.tickCount,ticks:void 0,type:"category",unit:void 0},fu=(e,t)=>e.polarAxis.angleAxis[t]!=null?e.polarAxis.angleAxis[t]:e.layout.layoutType==="radial"?kee:Aee,Fh=(e,t)=>e.polarAxis.radiusAxis[t]!=null?e.polarAxis.radiusAxis[t]:e.layout.layoutType==="radial"?Pee:Oee,Km=e=>e.polarOptions,D1=X([Da,Ma,ar],v3),NI=X([Km,D1],(e,t)=>{if(e!=null)return Vr(e.innerRadius,t,0)}),II=X([Km,D1],(e,t)=>{if(e!=null)return Vr(e.outerRadius,t,t*.8)}),Tee=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},jI=X([Km],Tee),Dee=X([fu,jI],$m),zI=X([D1,NI,II],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]}),Mee=X([Fh,zI],$m),du=X([$e,Km,NI,II,Da,Ma],(e,t,r,n,i,a)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var{cx:l,cy:u,startAngle:f,endAngle:h}=t;return{cx:Vr(l,i,i/2),cy:Vr(u,a,a/2),innerRadius:r,outerRadius:n,startAngle:f,endAngle:h,clockWise:!1}}}),wt=(e,t)=>t,Uh=(e,t,r)=>r;function qm(e){return e==null?void 0:e.id}var pr=e=>{var t=$e(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},pu=e=>e.tooltip.settings.axisId,kr=e=>{var t=pr(e),r=pu(e);return mu(e,t,r)},HI=X([kr],e=>e==null?void 0:e.dataKey);function FI(e,t,r){var{chartData:n=[]}=t,{allowDuplicatedCategory:i,dataKey:a}=r,l=new Map;return e.forEach(u=>{var f,h=(f=u.data)!==null&&f!==void 0?f:n;if(!(h==null||h.length===0)){var d=qm(u);h.forEach((m,v)=>{var g=a==null||i?v:String(Fe(m,a,null)),S=Fe(m,u.dataKey,0),_;l.has(g)?_=l.get(g):_={},Object.assign(_,{[d]:S}),l.set(g,_)})}}),Array.from(l.values())}function Wm(e){return e.stackId!=null&&e.dataKey!=null}function LD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $p(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LD(Object(r),!0).forEach(function(n){Ree(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ree(e,t,r){return(t=Lee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lee(e){var t=Bee(e,"string");return typeof t=="symbol"?t:t+""}function Bee(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var HS=[0,"auto"],Tn={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0},UI=(e,t)=>e.cartesianAxis.xAxis[t],Na=(e,t)=>{var r=UI(e,t);return r??Tn},Dn={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:HS,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:Mh},$I=(e,t)=>e.cartesianAxis.yAxis[t],Ia=(e,t)=>{var r=$I(e,t);return r??Dn},ws={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},M1=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??ws},Yt=(e,t,r)=>{switch(t){case"xAxis":return Na(e,r);case"yAxis":return Ia(e,r);case"zAxis":return M1(e,r);case"angleAxis":return fu(e,r);case"radiusAxis":return Fh(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},Nee=(e,t,r)=>{switch(t){case"xAxis":return Na(e,r);case"yAxis":return Ia(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},mu=(e,t,r)=>{switch(t){case"xAxis":return Na(e,r);case"yAxis":return Ia(e,r);case"angleAxis":return fu(e,r);case"radiusAxis":return Fh(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},KI=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function R1(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var vu=e=>e.graphicalItems.cartesianItems,Iee=X([wt,Uh],R1),L1=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),$h=X([vu,Yt,Iee],L1),qI=X([$h],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Wm)),WI=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),VI=X([$h],WI),B1=e=>e.map(t=>t.data).filter(Boolean).flat(1),jee=X([$h],B1),N1=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:i}=t;return e.length>0?e:r.slice(n,i+1)},I1=X([jee,uu],N1),j1=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:Fe(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(i=>({value:Fe(i,n)}))):e.map(n=>({value:n})),Vm=X([I1,Yt,$h],j1);function YI(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function jo(e){return e.filter(t=>Cr(t)||t instanceof Date).map(Number).filter(t=>Er(t)===!1)}function zee(e,t,r){return!r||typeof t!="number"||Er(t)?[]:r.length?jo(r.flatMap(n=>{var i=Fe(e,n.dataKey),a,l;if(Array.isArray(i)?[a,l]=i:a=l=i,!(!zr(a)||!zr(l)))return[t-a,t+l]})):[]}var Hee=X([qI,uu,kr],FI),XI=(e,t,r)=>{var n={},i=t.reduce((a,l)=>(l.stackId==null||(a[l.stackId]==null&&(a[l.stackId]=[]),a[l.stackId].push(l)),a),n);return Object.fromEntries(Object.entries(i).map(a=>{var[l,u]=a,f=u.map(qm);return[l,{stackedData:qX(e,f,r),graphicalItems:u}]}))},vh=X([Hee,qI,Hh],XI),GI=(e,t,r)=>{var{dataStartIndex:n,dataEndIndex:i}=t;if(r!=="zAxis"){var a=XX(e,n,i);if(!(a!=null&&a[0]===0&&a[1]===0))return a}},Fee=X([vh,Ms,wt],GI),ZI=(e,t,r,n,i)=>r.length>0?e.flatMap(a=>r.flatMap(l=>{var u,f,h=(u=n[l.id])===null||u===void 0?void 0:u.filter(m=>YI(i,m)),d=Fe(a,(f=t.dataKey)!==null&&f!==void 0?f:l.dataKey);return{value:d,errorDomain:zee(a,d,h)}})).filter(Boolean):(t==null?void 0:t.dataKey)!=null?e.map(a=>({value:Fe(a,t.dataKey),errorDomain:[]})):e.map(a=>({value:a,errorDomain:[]})),Ym=e=>e.errorBars,QI=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>YI(r,n));X([VI,Ym,wt],QI);var Uee=X([I1,Yt,VI,Ym,wt],ZI);function $ee(e){var{value:t}=e;if(Cr(t)||t instanceof Date)return t}var BD=e=>{var t=e.flatMap(n=>[n.value,n.errorDomain]).flat(1),r=jo(t);if(r.length!==0)return[Math.min(...r),Math.max(...r)]},Kee=(e,t,r)=>{var n=e.map($ee).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&aN(n))?i1(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},z1=e=>{var t;if(e==null||!("domain"in e))return HS;if(e.domain!=null)return e.domain;if(e.ticks!=null){if(e.type==="number"){var r=jo(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:HS},Kp=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r.filter(Boolean);if(i.length!==0){var a=i.flat(),l=Math.min(...a),u=Math.max(...a);return[l,u]}},JI=e=>e.referenceElements.dots,gu=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),qee=X([JI,wt,Uh],gu),ej=e=>e.referenceElements.areas,Wee=X([ej,wt,Uh],gu),tj=e=>e.referenceElements.lines,Vee=X([tj,wt,Uh],gu),rj=(e,t)=>{var r=jo(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},Yee=X(qee,wt,rj),nj=(e,t)=>{var r=jo(e.flatMap(n=>[t==="xAxis"?n.x1:n.y1,t==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},Xee=X([Wee,wt],nj),ij=(e,t)=>{var r=jo(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},Gee=X(Vee,wt,ij),Zee=X(Yee,Gee,Xee,(e,t,r)=>Kp(e,r,t)),aj=X([Yt],z1),H1=(e,t,r,n,i,a,l)=>{var u=hee(t,e.allowDataOverflow);if(u!=null)return u;var f=a==="vertical"&&l==="xAxis"||a==="horizontal"&&l==="yAxis",h=f?Kp(r,i,BD(n)):Kp(i,BD(n));return fee(t,h,e.allowDataOverflow)},Qee=X([Yt,aj,Fee,Uee,Zee,$e,wt],H1),Jee=[0,1],F1=(e,t,r,n,i,a,l)=>{if(!((e==null||r==null||r.length===0)&&l===void 0)){var{dataKey:u,type:f}=e,h=Ci(t,a);return h&&u==null?i1(0,r.length):f==="category"?Kee(n,e,h):i==="expand"?Jee:l}},U1=X([Yt,$e,I1,Vm,Hh,wt,Qee],F1),sj=(e,t,r,n,i)=>{if(e!=null){var{scale:a,type:l}=e;if(a==="auto")return t==="radial"&&i==="radiusAxis"?"band":t==="radial"&&i==="angleAxis"?"linear":l==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?"point":l==="category"?"band":"linear";if(typeof a=="string"){var u="scale".concat(Oh(a));return u in Yc?u:"point"}}},Rs=X([Yt,$e,KI,T1,wt],sj);function ete(e){if(e!=null){if(e in Yc)return Yc[e]();var t="scale".concat(Oh(e));if(t in Yc)return Yc[t]()}}function Xm(e,t,r,n){if(!(r==null||n==null)){if(typeof e.scale=="function")return e.scale.copy().domain(r).range(n);var i=ete(t);if(i!=null){var a=i.domain(r).range(n);return HX(a),a}}}var $1=(e,t,r)=>{var n=z1(t);if(!(r!=="auto"&&r!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(n)&&(n[0]==="auto"||n[1]==="auto")&&Ql(e))return wee(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&Ql(e))return xee(e,t.tickCount,t.allowDecimals)}},K1=X([U1,mu,Rs],$1),q1=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&Ql(t)&&Array.isArray(r)&&r.length>0){var i=t[0],a=r[0],l=t[1],u=r[r.length-1];return[Math.min(i,a),Math.max(l,u)]}return t},tte=X([Yt,U1,K1,wt],q1),rte=X(Vm,Yt,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(jo(e.map(u=>u.value))).sort((u,f)=>u-f);if(n.length<2)return 1/0;var i=n[n.length-1]-n[0];if(i===0)return 1/0;for(var a=0;a<n.length-1;a++){var l=n[a+1]-n[a];r=Math.min(r,l)}return r/i}}),oj=X(rte,$e,LI,ar,(e,t,r,n)=>n,(e,t,r,n,i)=>{if(!zr(e))return 0;var a=t==="vertical"?n.height:n.width;if(i==="gap")return e*a/2;if(i==="no-gap"){var l=Vr(r,e*a),u=e*a/2;return u-l-(u-l)/a*l}return 0}),nte=(e,t)=>{var r=Na(e,t);return r==null||typeof r.padding!="string"?0:oj(e,"xAxis",t,r.padding)},ite=(e,t)=>{var r=Ia(e,t);return r==null||typeof r.padding!="string"?0:oj(e,"yAxis",t,r.padding)},ate=X(Na,nte,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((r=i.left)!==null&&r!==void 0?r:0)+t,right:((n=i.right)!==null&&n!==void 0?n:0)+t}}),ste=X(Ia,ite,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((r=i.top)!==null&&r!==void 0?r:0)+t,bottom:((n=i.bottom)!==null&&n!==void 0?n:0)+t}}),ote=X([ar,ate,Rh,Dm,(e,t,r)=>r],(e,t,r,n,i)=>{var{padding:a}=n;return i?[a.left,r.width-a.right]:[e.left+t.left,e.left+e.width-t.right]}),lte=X([ar,$e,ste,Rh,Dm,(e,t,r)=>r],(e,t,r,n,i,a)=>{var{padding:l}=i;return a?[n.height-l.bottom,l.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),Kh=(e,t,r,n)=>{var i;switch(t){case"xAxis":return ote(e,r,n);case"yAxis":return lte(e,r,n);case"zAxis":return(i=M1(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return jI(e);case"radiusAxis":return zI(e,r);default:return}},lj=X([Yt,Kh],$m),ci=X([Yt,Rs,tte,lj],Xm);X([$h,Ym,wt],QI);function uj(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Gm=(e,t)=>t,Zm=(e,t,r)=>r,ute=X(Pm,Gm,Zm,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(uj)),cte=X(Tm,Gm,Zm,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(uj)),cj=(e,t)=>({width:e.width,height:t.height}),hte=(e,t)=>{var r=typeof t.width=="number"?t.width:Mh;return{width:r,height:e.height}},hj=X(ar,Na,cj),fte=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},dte=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},pte=X(Ma,ar,ute,Gm,Zm,(e,t,r,n,i)=>{var a={},l;return r.forEach(u=>{var f=cj(t,u);l==null&&(l=fte(t,n,e));var h=n==="top"&&!i||n==="bottom"&&i;a[u.id]=l-Number(h)*f.height,l+=(h?-1:1)*f.height}),a}),mte=X(Da,ar,cte,Gm,Zm,(e,t,r,n,i)=>{var a={},l;return r.forEach(u=>{var f=hte(t,u);l==null&&(l=dte(t,n,e));var h=n==="left"&&!i||n==="right"&&i;a[u.id]=l-Number(h)*f.width,l+=(h?-1:1)*f.width}),a}),vte=(e,t)=>{var r=ar(e),n=Na(e,t);if(n!=null){var i=pte(e,n.orientation,n.mirror),a=i[t];return a==null?{x:r.left,y:0}:{x:r.left,y:a}}},gte=(e,t)=>{var r=ar(e),n=Ia(e,t);if(n!=null){var i=mte(e,n.orientation,n.mirror),a=i[t];return a==null?{x:0,y:r.top}:{x:a,y:r.top}}},fj=X(ar,Ia,(e,t)=>{var r=typeof t.width=="number"?t.width:Mh;return{width:r,height:e.height}}),ND=(e,t,r)=>{switch(t){case"xAxis":return hj(e,r).width;case"yAxis":return fj(e,r).height;default:return}},dj=(e,t,r,n)=>{if(r!=null){var{allowDuplicatedCategory:i,type:a,dataKey:l}=r,u=Ci(e,n),f=t.map(h=>h.value);if(l&&u&&a==="category"&&i&&aN(f))return f}},qh=X([$e,Vm,Yt,wt],dj),W1=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:i,scale:a}=r,l=Ci(e,n);if(l&&(i==="number"||a!=="auto"))return t.map(u=>u.value)}},V1=X([$e,Vm,mu,wt],W1),ID=X([$e,Nee,Rs,ci,qh,V1,Kh,K1,wt],(e,t,r,n,i,a,l,u,f)=>{if(t==null)return null;var h=Ci(e,f);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:f,categoricalDomain:a,duplicateDomain:i,isCategorical:h,niceTicks:u,range:l,realScaleType:r,scale:n}}),pj=(e,t,r,n,i,a,l,u,f)=>{if(!(t==null||n==null)){var h=Ci(e,f),{type:d,ticks:m,tickCount:v}=t,g=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,S=d==="category"&&n.bandwidth?n.bandwidth()/g:0;S=f==="angleAxis"&&a!=null&&a.length>=2?xr(a[0]-a[1])*2*S:S;var _=m||i;if(_){var x=_.map((C,A)=>{var O=l?l.indexOf(C):C;return{index:A,coordinate:n(O)+S,value:C,offset:S}});return x.filter(C=>!Er(C.coordinate))}return h&&u?u.map((C,A)=>({coordinate:n(C)+S,value:C,index:A,offset:S})):n.ticks?n.ticks(v).map(C=>({coordinate:n(C)+S,value:C,offset:S})):n.domain().map((C,A)=>({coordinate:n(C)+S,value:l?l[C]:C,index:A,offset:S}))}},mj=X([$e,mu,Rs,ci,K1,Kh,qh,V1,wt],pj),vj=(e,t,r,n,i,a,l)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var u=Ci(e,l),{tickCount:f}=t,h=0;return h=l==="angleAxis"&&(n==null?void 0:n.length)>=2?xr(n[0]-n[1])*2*h:h,u&&a?a.map((d,m)=>({coordinate:r(d)+h,value:d,index:m,offset:h})):r.ticks?r.ticks(f).map(d=>({coordinate:r(d)+h,value:d,offset:h})):r.domain().map((d,m)=>({coordinate:r(d)+h,value:i?i[d]:d,index:m,offset:h}))}},hi=X([$e,mu,ci,Kh,qh,V1,wt],vj),gn=X(Yt,ci,(e,t)=>{if(!(e==null||t==null))return $p($p({},e),{},{scale:t})}),yte=X([Yt,Rs,U1,lj],Xm),_te=X((e,t,r)=>M1(e,r),yte,(e,t)=>{if(!(e==null||t==null))return $p($p({},e),{},{scale:t})}),bte=X([$e,Pm,Tm],(e,t,r)=>{switch(e){case"horizontal":return t.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),gj=e=>e.options.defaultTooltipEventType,yj=e=>e.options.validateTooltipEventTypes;function _j(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function Y1(e,t){var r=gj(e),n=yj(e);return _j(t,r,n)}function Ste(e){return he(t=>Y1(t,e))}var bj=(e,t)=>{var r,n=Number(t);if(!(Er(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},wte=e=>e.tooltip.settings,bs={active:!1,index:null,dataKey:void 0,coordinate:void 0},xte={itemInteraction:{click:bs,hover:bs},axisInteraction:{click:bs,hover:bs},keyboardInteraction:bs,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},Sj=In({name:"tooltip",initialState:xte,reducers:{addTooltipEntrySettings(e,t){e.tooltipItemPayloads.push(t.payload)},removeTooltipEntrySettings(e,t){var r=ga(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate,e.keyboardInteraction.dataKey=t.payload.activeDataKey}}}),{addTooltipEntrySettings:Cte,removeTooltipEntrySettings:Ete,setTooltipSettingsState:Ate,setActiveMouseOverItemIndex:Qm,mouseLeaveItem:Ote,mouseLeaveChart:wj,setActiveClickItemIndex:xj,setMouseOverAxisIndex:Cj,setMouseClickAxisIndex:kte,setSyncInteraction:FS,setKeyboardInteraction:US}=Sj.actions,Pte=Sj.reducer;function jD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $d(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jD(Object(r),!0).forEach(function(n){Tte(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Tte(e,t,r){return(t=Dte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dte(e){var t=Mte(e,"string");return typeof t=="symbol"?t:t+""}function Mte(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rte(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function Lte(e){return e.index!=null}var Ej=(e,t,r,n)=>{if(t==null)return bs;var i=Rte(e,t,r);if(i==null)return bs;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var a=e.settings.active===!0;if(Lte(i)){if(a)return $d($d({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n};return $d($d({},bs),{},{coordinate:i.coordinate})},X1=(e,t)=>{var r=e==null?void 0:e.index;if(r==null)return null;var n=Number(r);if(!zr(n))return r;var i=0,a=1/0;return t.length>0&&(a=t.length-1),String(Math.max(i,Math.min(n,a)))},Aj=(e,t,r,n,i,a,l,u)=>{if(!(a==null||u==null)){var f=l[0],h=f==null?void 0:u(f.positions,a);if(h!=null)return h;var d=i==null?void 0:i[Number(a)];if(d)switch(r){case"horizontal":return{x:d.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:d.coordinate}}}},Oj=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;return r==="hover"?i=e.itemInteraction.hover.dataKey:i=e.itemInteraction.click.dataKey,i==null&&n!=null?[e.tooltipItemPayloads[0]]:e.tooltipItemPayloads.filter(a=>{var l;return((l=a.settings)===null||l===void 0?void 0:l.dataKey)===i})},Wh=e=>e.options.tooltipPayloadSearcher,yu=e=>e.tooltip;function zD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function HD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zD(Object(r),!0).forEach(function(n){Bte(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bte(e,t,r){return(t=Nte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Nte(e){var t=Ite(e,"string");return typeof t=="symbol"?t:t+""}function Ite(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jte(e,t){return e??t}var kj=(e,t,r,n,i,a,l)=>{if(!(t==null||a==null)){var{chartData:u,computedData:f,dataStartIndex:h,dataEndIndex:d}=r,m=[];return e.reduce((v,g)=>{var S,{dataDefinedOnItem:_,settings:x}=g,C=jte(_,u),A=Array.isArray(C)?y3(C,h,d):C,O=(S=x==null?void 0:x.dataKey)!==null&&S!==void 0?S:n,P=x==null?void 0:x.nameKey,D;if(n&&Array.isArray(A)&&!Array.isArray(A[0])&&l==="axis"?D=sN(A,n,i):D=a(A,t,f,P),Array.isArray(D))D.forEach(R=>{var N=HD(HD({},x),{},{name:R.name,unit:R.unit,color:void 0,fill:void 0});v.push(wT({tooltipEntrySettings:N,dataKey:R.dataKey,payload:R.payload,value:Fe(R.payload,R.dataKey),name:R.name}))});else{var k;v.push(wT({tooltipEntrySettings:x,dataKey:O,payload:D,value:Fe(D,O),name:(k=Fe(D,P))!==null&&k!==void 0?k:x==null?void 0:x.name}))}return v},m)}},G1=X([kr,$e,KI,T1,pr],sj),zte=X([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),Hte=X([pr,pu],R1),Vh=X([zte,kr,Hte],L1),Fte=X([Vh],e=>e.filter(Wm)),Ute=X([Vh],B1),_u=X([Ute,Ms],N1),$te=X([Fte,Ms,kr],FI),Z1=X([_u,kr,Vh],j1),Kte=X([kr],z1),qte=X([Vh],e=>e.filter(Wm)),Wte=X([$te,qte,Hh],XI),Vte=X([Wte,Ms,pr],GI),Yte=X([Vh],WI),Xte=X([_u,kr,Yte,Ym,pr],ZI),Gte=X([JI,pr,pu],gu),Zte=X([Gte,pr],rj),Qte=X([ej,pr,pu],gu),Jte=X([Qte,pr],nj),ere=X([tj,pr,pu],gu),tre=X([ere,pr],ij),rre=X([Zte,tre,Jte],Kp),nre=X([kr,Kte,Vte,Xte,rre,$e,pr],H1),Pj=X([kr,$e,_u,Z1,Hh,pr,nre],F1),ire=X([Pj,kr,G1],$1),are=X([kr,Pj,ire,pr],q1),Tj=e=>{var t=pr(e),r=pu(e),n=!1;return Kh(e,t,r,n)},Dj=X([kr,Tj],$m),Mj=X([kr,G1,are,Dj],Xm),sre=X([$e,Z1,kr,pr],dj),ore=X([$e,Z1,kr,pr],W1),lre=(e,t,r,n,i,a,l,u)=>{if(t){var{type:f}=t,h=Ci(e,u);if(n){var d=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,m=f==="category"&&n.bandwidth?n.bandwidth()/d:0;return m=u==="angleAxis"&&i!=null&&(i==null?void 0:i.length)>=2?xr(i[0]-i[1])*2*m:m,h&&l?l.map((v,g)=>({coordinate:n(v)+m,value:v,index:g,offset:m})):n.domain().map((v,g)=>({coordinate:n(v)+m,value:a?a[v]:v,index:g,offset:m}))}}},ja=X([$e,kr,G1,Mj,Tj,sre,ore,pr],lre),Q1=X([gj,yj,wte],(e,t,r)=>_j(r.shared,e,t)),Rj=e=>e.tooltip.settings.trigger,J1=e=>e.tooltip.settings.defaultIndex,Jm=X([yu,Q1,Rj,J1],Ej),Aa=X([Jm,_u],X1),Lj=X([ja,Aa],bj),Bj=X([Jm],e=>{if(e)return e.dataKey}),Nj=X([yu,Q1,Rj,J1],Oj),ure=X([Da,Ma,$e,ar,ja,J1,Nj,Wh],Aj),cre=X([Jm,ure],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),hre=X([Jm],e=>e.active),fre=X([Nj,Aa,Ms,HI,Lj,Wh,Q1],kj),dre=X([fre],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function FD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function UD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FD(Object(r),!0).forEach(function(n){pre(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pre(e,t,r){return(t=mre(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mre(e){var t=vre(e,"string");return typeof t=="symbol"?t:t+""}function vre(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gre=()=>he(kr),yre=()=>{var e=gre(),t=he(ja),r=he(Mj);return wa(UD(UD({},e),{},{scale:r}),t)},Ij=()=>he(T1),ex=(e,t)=>t,jj=(e,t,r)=>r,tx=(e,t,r,n)=>n,_re=X(ja,e=>xm(e,t=>t.coordinate)),rx=X([yu,ex,jj,tx],Ej),nx=X([rx,_u],X1),bre=(e,t,r)=>{if(t!=null){var n=yu(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},zj=X([yu,ex,jj,tx],Oj),qp=X([Da,Ma,$e,ar,ja,tx,zj,Wh],Aj),Sre=X([rx,qp],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),Hj=X(ja,nx,bj),wre=X([zj,nx,Ms,HI,Hj,Wh,ex],kj),xre=X([rx],e=>({isActive:e.active,activeIndex:e.index})),Cre=(e,t,r,n,i,a,l,u)=>{if(!(!e||!t||!n||!i||!a)){var f=GX(e.chartX,e.chartY,t,r,u);if(f){var h=QX(f,t),d=jX(h,l,a,n,i),m=ZX(t,a,d,f);return{activeIndex:String(d),activeCoordinate:m}}}};function $S(){return $S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$S.apply(null,arguments)}function $D(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Kd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$D(Object(r),!0).forEach(function(n){Ere(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$D(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ere(e,t,r){return(t=Are(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Are(e){var t=Ore(e,"string");return typeof t=="symbol"?t:t+""}function Ore(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kre(e){var{coordinate:t,payload:r,index:n,offset:i,tooltipAxisBandSize:a,layout:l,cursor:u,tooltipEventType:f,chartName:h}=e,d=t,m=r,v=n;if(!u||!d||h!=="ScatterChart"&&f!=="axis")return null;var g,S;if(h==="ScatterChart")g=d,S=tZ;else if(h==="BarChart")g=rZ(l,d,i,a),S=Rm;else if(l==="radial"){var{cx:_,cy:x,radius:C,startAngle:A,endAngle:O}=L3(d);g={cx:_,cy:x,startAngle:A,endAngle:O,innerRadius:C,outerRadius:C},S=N3}else g={points:RZ(l,d,i)},S=wo;var P=typeof u=="object"&&"className"in u?u.className:void 0,D=Kd(Kd(Kd(Kd({stroke:"#ccc",pointerEvents:"none"},i),g),Ue(u,!1)),{},{payload:m,payloadIndex:v,className:Me("recharts-tooltip-cursor",P)});return w.isValidElement(u)?w.cloneElement(u,D):w.createElement(S,D)}function Pre(e){var t=yre(),r=C3(),n=ou(),i=Ij();return w.createElement(kre,$S({},e,{coordinate:e.coordinate,index:e.index,payload:e.payload,offset:r,layout:n,tooltipAxisBandSize:t,chartName:i}))}var ix=w.createContext(null),Tre=()=>w.useContext(ix),Ab={exports:{}},KD;function Dre(){return KD||(KD=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(f,h,d){this.fn=f,this.context=h,this.once=d||!1}function a(f,h,d,m,v){if(typeof d!="function")throw new TypeError("The listener must be a function");var g=new i(d,m||f,v),S=r?r+h:h;return f._events[S]?f._events[S].fn?f._events[S]=[f._events[S],g]:f._events[S].push(g):(f._events[S]=g,f._eventsCount++),f}function l(f,h){--f._eventsCount===0?f._events=new n:delete f._events[h]}function u(){this._events=new n,this._eventsCount=0}u.prototype.eventNames=function(){var h=[],d,m;if(this._eventsCount===0)return h;for(m in d=this._events)t.call(d,m)&&h.push(r?m.slice(1):m);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(d)):h},u.prototype.listeners=function(h){var d=r?r+h:h,m=this._events[d];if(!m)return[];if(m.fn)return[m.fn];for(var v=0,g=m.length,S=new Array(g);v<g;v++)S[v]=m[v].fn;return S},u.prototype.listenerCount=function(h){var d=r?r+h:h,m=this._events[d];return m?m.fn?1:m.length:0},u.prototype.emit=function(h,d,m,v,g,S){var _=r?r+h:h;if(!this._events[_])return!1;var x=this._events[_],C=arguments.length,A,O;if(x.fn){switch(x.once&&this.removeListener(h,x.fn,void 0,!0),C){case 1:return x.fn.call(x.context),!0;case 2:return x.fn.call(x.context,d),!0;case 3:return x.fn.call(x.context,d,m),!0;case 4:return x.fn.call(x.context,d,m,v),!0;case 5:return x.fn.call(x.context,d,m,v,g),!0;case 6:return x.fn.call(x.context,d,m,v,g,S),!0}for(O=1,A=new Array(C-1);O<C;O++)A[O-1]=arguments[O];x.fn.apply(x.context,A)}else{var P=x.length,D;for(O=0;O<P;O++)switch(x[O].once&&this.removeListener(h,x[O].fn,void 0,!0),C){case 1:x[O].fn.call(x[O].context);break;case 2:x[O].fn.call(x[O].context,d);break;case 3:x[O].fn.call(x[O].context,d,m);break;case 4:x[O].fn.call(x[O].context,d,m,v);break;default:if(!A)for(D=1,A=new Array(C-1);D<C;D++)A[D-1]=arguments[D];x[O].fn.apply(x[O].context,A)}}return!0},u.prototype.on=function(h,d,m){return a(this,h,d,m,!1)},u.prototype.once=function(h,d,m){return a(this,h,d,m,!0)},u.prototype.removeListener=function(h,d,m,v){var g=r?r+h:h;if(!this._events[g])return this;if(!d)return l(this,g),this;var S=this._events[g];if(S.fn)S.fn===d&&(!v||S.once)&&(!m||S.context===m)&&l(this,g);else{for(var _=0,x=[],C=S.length;_<C;_++)(S[_].fn!==d||v&&!S[_].once||m&&S[_].context!==m)&&x.push(S[_]);x.length?this._events[g]=x.length===1?x[0]:x:l(this,g)}return this},u.prototype.removeAllListeners=function(h){var d;return h?(d=r?r+h:h,this._events[d]&&l(this,d)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=r,u.EventEmitter=u,e.exports=u})(Ab)),Ab.exports}var Mre=Dre();const Rre=Hr(Mre);var Jl=new Rre,KS="recharts.syncEvent.tooltip",qS="recharts.syncEvent.brush";function Ls(e,t){if(t){var r=Number.parseInt(t,10);if(!Er(r))return e==null?void 0:e[r]}}var Lre={chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},Fj=In({name:"options",initialState:Lre,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),Bre=Fj.reducer,{createEventEmitter:Nre}=Fj.actions;function Ire(e){return e.tooltip.syncInteraction}var jre={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},Uj=In({name:"chartData",initialState:jre,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:r,endIndex:n}=t.payload;r!=null&&(e.dataStartIndex=r),n!=null&&(e.dataEndIndex=n)}}}),{setChartData:qD,setDataStartEndIndexes:WS,setComputedData:pme}=Uj.actions,zre=Uj.reducer,Hre=["x","y"];function WD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ao(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?WD(Object(r),!0).forEach(function(n){Fre(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):WD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Fre(e,t,r){return(t=Ure(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ure(e){var t=$re(e,"string");return typeof t=="symbol"?t:t+""}function $re(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Kre(e,t){if(e==null)return{};var r,n,i=qre(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function qre(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var $j=()=>{};function Wre(){var e=he(Fm),t=he(Um),r=Je(),n=he(BI),i=he(ja),a=ou(),l=Lh(),u=he(f=>f.rootProps.className);w.useEffect(()=>{if(e==null)return $j;var f=(h,d,m)=>{if(t!==m&&e===h){if(n==="index"){var v;if(l&&d!==null&&d!==void 0&&(v=d.payload)!==null&&v!==void 0&&v.coordinate){var g=d.payload.coordinate,{x:S,y:_}=g,x=Kre(g,Hre),C=ao(ao(ao({},x),typeof S=="number"&&{x:Math.max(l.x,Math.min(S,l.x+l.width))}),typeof _=="number"&&{y:Math.max(l.y,Math.min(_,l.y+l.height))}),A=ao(ao({},d),{},{payload:ao(ao({},d.payload),{},{coordinate:C})});r(A)}else r(d);return}if(i!=null){var O;if(typeof n=="function"){var P={activeTooltipIndex:d.payload.index==null?void 0:Number(d.payload.index),isTooltipActive:d.payload.active,activeIndex:d.payload.index==null?void 0:Number(d.payload.index),activeLabel:d.payload.label,activeDataKey:d.payload.dataKey,activeCoordinate:d.payload.coordinate},D=n(i,P);O=i[D]}else n==="value"&&(O=i.find(j=>String(j.value)===d.payload.label));var{coordinate:k}=d.payload;if(O==null||d.payload.active===!1||k==null||l==null){r(FS({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0}));return}var{x:R,y:N}=k,$=Math.min(R,l.x+l.width),ee=Math.min(N,l.y+l.height),F={x:a==="horizontal"?O.coordinate:$,y:a==="horizontal"?ee:O.coordinate},z=FS({active:d.payload.active,coordinate:F,dataKey:d.payload.dataKey,index:String(O.index),label:d.payload.label});r(z)}}};return Jl.on(KS,f),()=>{Jl.off(KS,f)}},[u,r,t,e,n,i,a,l])}function Vre(){var e=he(Fm),t=he(Um),r=Je();w.useEffect(()=>{if(e==null)return $j;var n=(i,a,l)=>{t!==l&&e===i&&r(WS(a))};return Jl.on(qS,n),()=>{Jl.off(qS,n)}},[r,t,e])}function Yre(){var e=Je();w.useEffect(()=>{e(Nre())},[e]),Wre(),Vre()}function Xre(e,t,r,n,i,a){var l=he(v=>bre(v,e,t)),u=he(Um),f=he(Fm),h=he(BI),d=he(Ire),m=d==null?void 0:d.active;w.useEffect(()=>{if(!m&&f!=null&&u!=null){var v=FS({active:a,coordinate:r,dataKey:l,index:i,label:typeof n=="number"?String(n):n});Jl.emit(KS,f,v,u)}},[m,r,l,i,n,u,f,h,a])}function Gre(){var e=he(Fm),t=he(Um),r=he(i=>i.chartData.dataStartIndex),n=he(i=>i.chartData.dataEndIndex);w.useEffect(()=>{if(!(e==null||r==null||n==null||t==null)){var i={startIndex:r,endIndex:n};Jl.emit(qS,e,i,t)}},[n,r,t,e])}function VD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function YD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VD(Object(r),!0).forEach(function(n){Zre(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Zre(e,t,r){return(t=Qre(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qre(e){var t=Jre(e,"string");return typeof t=="symbol"?t:t+""}function Jre(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ene(e){return e.dataKey}function tne(e,t){return w.isValidElement(e)?w.cloneElement(e,t):typeof e=="function"?w.createElement(e,t):w.createElement(RG,t)}var XD=[],rne={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:!Nn.isSsr,itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function nne(e){var t=jt(e,rne),{active:r,allowEscapeViewBox:n,animationDuration:i,animationEasing:a,content:l,filterNull:u,isAnimationActive:f,offset:h,payloadUniqBy:d,position:m,reverseDirection:v,useTranslate3d:g,wrapperStyle:S,cursor:_,shared:x,trigger:C,defaultIndex:A,portal:O,axisId:P}=t,D=Je(),k=typeof A=="number"?String(A):A;w.useEffect(()=>{D(Ate({shared:x,trigger:C,axisId:P,active:r,defaultIndex:k}))},[D,x,C,P,r,k]);var R=Lh(),N=k3(),$=Ste(x),{activeIndex:ee,isActive:F}=he(fe=>xre(fe,$,C,k)),z=he(fe=>wre(fe,$,C,k)),j=he(fe=>Hj(fe,$,C,k)),K=he(fe=>Sre(fe,$,C,k)),W=z,B=Tre(),q=r??F,[G,ce]=$N([W,q]),M=$==="axis"?j:void 0;Xre($,C,K,M,ee,q);var I=O??B;if(I==null)return null;var Y=W??XD;q||(Y=XD),u&&Y.length&&(Y=jN(W.filter(fe=>fe.value!=null&&(fe.hide!==!0||t.includeHidden)),d,ene));var L=Y.length>0,ue=w.createElement(HG,{allowEscapeViewBox:n,animationDuration:i,animationEasing:a,isAnimationActive:f,active:q,coordinate:K,hasPayload:L,offset:h,position:m,reverseDirection:v,useTranslate3d:g,viewBox:R,wrapperStyle:S,lastBoundingBox:G,innerRef:ce,hasPortalFromProps:!!O},tne(l,YD(YD({},t),{},{payload:Y,label:M,active:q,coordinate:K,accessibilityLayer:N})));return w.createElement(w.Fragment,null,uN.createPortal(ue,I),q&&w.createElement(Pre,{cursor:_,tooltipEventType:$,coordinate:K,payload:W,index:ee}))}var Ob={},kb={},Pb={},GD;function ine(){return GD||(GD=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n,{signal:i,edges:a}={}){let l,u=null;const f=a!=null&&a.includes("leading"),h=a==null||a.includes("trailing"),d=()=>{u!==null&&(r.apply(l,u),l=void 0,u=null)},m=()=>{h&&d(),_()};let v=null;const g=()=>{v!=null&&clearTimeout(v),v=setTimeout(()=>{v=null,m()},n)},S=()=>{v!==null&&(clearTimeout(v),v=null)},_=()=>{S(),l=void 0,u=null},x=()=>{d()},C=function(...A){if(i!=null&&i.aborted)return;l=this,u=A;const O=v==null;g(),f&&O&&d()};return C.schedule=g,C.cancel=_,C.flush=x,i==null||i.addEventListener("abort",_,{once:!0}),C}e.debounce=t})(Pb)),Pb}var ZD;function ane(){return ZD||(ZD=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ine();function r(n,i=0,a={}){typeof a!="object"&&(a={});const{leading:l=!1,trailing:u=!0,maxWait:f}=a,h=Array(2);l&&(h[0]="leading"),u&&(h[1]="trailing");let d,m=null;const v=t.debounce(function(..._){d=n.apply(this,_),m=null},i,{edges:h}),g=function(..._){return f!=null&&(m===null&&(m=Date.now()),Date.now()-m>=f)?(d=n.apply(this,_),m=Date.now(),v.cancel(),v.schedule(),d):(v.apply(this,_),d)},S=()=>(v.flush(),d);return g.cancel=v.cancel,g.flush=S,g}e.debounce=r})(kb)),kb}var QD;function sne(){return QD||(QD=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ane();function r(n,i=0,a={}){const{leading:l=!0,trailing:u=!0}=a;return t.debounce(n,i,{leading:l,maxWait:i,trailing:u})}e.throttle=r})(Ob)),Ob}var Tb,JD;function one(){return JD||(JD=1,Tb=sne().throttle),Tb}var lne=one();const une=Hr(lne);var Jc=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a]};function eM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Db(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eM(Object(r),!0).forEach(function(n){cne(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cne(e,t,r){return(t=hne(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hne(e){var t=fne(e,"string");return typeof t=="symbol"?t:t+""}function fne(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dne=w.forwardRef((e,t)=>{var{aspect:r,initialDimension:n={width:-1,height:-1},width:i="100%",height:a="100%",minWidth:l=0,minHeight:u,maxHeight:f,children:h,debounce:d=0,id:m,className:v,onResize:g,style:S={}}=e,_=w.useRef(null),x=w.useRef();x.current=g,w.useImperativeHandle(t,()=>_.current);var[C,A]=w.useState({containerWidth:n.width,containerHeight:n.height}),O=w.useCallback((D,k)=>{A(R=>{var N=Math.round(D),$=Math.round(k);return R.containerWidth===N&&R.containerHeight===$?R:{containerWidth:N,containerHeight:$}})},[]);w.useEffect(()=>{var D=$=>{var ee,{width:F,height:z}=$[0].contentRect;O(F,z),(ee=x.current)===null||ee===void 0||ee.call(x,F,z)};d>0&&(D=une(D,d,{trailing:!0,leading:!1}));var k=new ResizeObserver(D),{width:R,height:N}=_.current.getBoundingClientRect();return O(R,N),k.observe(_.current),()=>{k.disconnect()}},[O,d]);var P=w.useMemo(()=>{var{containerWidth:D,containerHeight:k}=C;if(D<0||k<0)return null;Jc(po(i)||po(a),`The width(%s) and height(%s) are both fixed numbers,
       maybe you don't need to use a ResponsiveContainer.`,i,a),Jc(!r||r>0,"The aspect(%s) must be greater than zero.",r);var R=po(i)?D:i,N=po(a)?k:a;return r&&r>0&&(R?N=R/r:N&&(R=N*r),f&&N>f&&(N=f)),Jc(R>0||N>0,`The width(%s) and height(%s) of chart should be greater than 0,
       please check the style of container, or the props width(%s) and height(%s),
       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
       height and width.`,R,N,i,a,l,u,r),w.Children.map(h,$=>w.cloneElement($,{width:R,height:N,style:Db({width:R,height:N},$.props.style)}))},[r,h,a,f,u,l,C,i]);return w.createElement("div",{id:m?"".concat(m):void 0,className:Me("recharts-responsive-container",v),style:Db(Db({},S),{},{width:i,height:a,minWidth:l,minHeight:u,maxHeight:f}),ref:_},w.createElement("div",{style:{width:0,height:0,overflow:"visible"}},P))}),zo=e=>null;zo.displayName="Cell";function pne(e,t,r){return(t=mne(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mne(e){var t=vne(e,"string");return typeof t=="symbol"?t:t+""}function vne(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class gne{constructor(t){pne(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;this.cache.delete(n)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function tM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tM(Object(r),!0).forEach(function(n){_ne(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _ne(e,t,r){return(t=bne(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bne(e){var t=Sne(e,"string");return typeof t=="symbol"?t:t+""}function Sne(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wne={cacheSize:2e3,enableCache:!0},Kj=yne({},wne),rM=new gne(Kj.cacheSize),xne={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},nM="recharts_measurement_span";function Cne(e,t){var r=t.fontSize||"",n=t.fontFamily||"",i=t.fontWeight||"",a=t.fontStyle||"",l=t.letterSpacing||"",u=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(n,"|").concat(i,"|").concat(a,"|").concat(l,"|").concat(u)}var iM=(e,t)=>{try{var r=document.getElementById(nM);r||(r=document.createElement("span"),r.setAttribute("id",nM),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,xne,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},Fl=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Nn.isSsr)return{width:0,height:0};if(!Kj.enableCache)return iM(t,r);var n=Cne(t,r),i=rM.get(n);if(i)return i;var a=iM(t,r);return rM.set(n,a),a},aM=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,sM=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Ene=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Ane=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,qj={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},One=Object.keys(qj),Ll="NaN";function kne(e,t){return e*qj[t]}class pn{static parse(t){var r,[,n,i]=(r=Ane.exec(t))!==null&&r!==void 0?r:[];return new pn(parseFloat(n),i??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,Er(t)&&(this.unit=""),r!==""&&!Ene.test(r)&&(this.num=NaN,this.unit=""),One.includes(r)&&(this.num=kne(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new pn(NaN,""):new pn(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new pn(NaN,""):new pn(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new pn(NaN,""):new pn(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new pn(NaN,""):new pn(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Er(this.num)}}function Wj(e){if(e.includes(Ll))return Ll;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,i,a]=(r=aM.exec(t))!==null&&r!==void 0?r:[],l=pn.parse(n??""),u=pn.parse(a??""),f=i==="*"?l.multiply(u):l.divide(u);if(f.isNaN())return Ll;t=t.replace(aM,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var h,[,d,m,v]=(h=sM.exec(t))!==null&&h!==void 0?h:[],g=pn.parse(d??""),S=pn.parse(v??""),_=m==="+"?g.add(S):g.subtract(S);if(_.isNaN())return Ll;t=t.replace(sM,_.toString())}return t}var oM=/\(([^()]*)\)/;function Pne(e){for(var t=e,r;(r=oM.exec(t))!=null;){var[,n]=r;t=t.replace(oM,Wj(n))}return t}function Tne(e){var t=e.replace(/\s+/g,"");return t=Pne(t),t=Wj(t),t}function Dne(e){try{return Tne(e)}catch{return Ll}}function Mb(e){var t=Dne(e.slice(5,-1));return t===Ll?"":t}var Mne=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],Rne=["dx","dy","angle","className","breakAll"];function VS(){return VS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},VS.apply(null,arguments)}function lM(e,t){if(e==null)return{};var r,n,i=Lne(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Lne(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Vj=/[ \f\n\r\t\v\u2028\u2029]+/,Yj=e=>{var{children:t,breakAll:r,style:n}=e;try{var i=[];at(t)||(r?i=t.toString().split(""):i=t.toString().split(Vj));var a=i.map(u=>({word:u,width:Fl(u,n).width})),l=r?0:Fl(" ",n).width;return{wordsWithComputedWidth:a,spaceWidth:l}}catch{return null}},Bne=(e,t,r,n,i)=>{var{maxLines:a,children:l,style:u,breakAll:f}=e,h=ye(a),d=l,m=function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return F.reduce((z,j)=>{var{word:K,width:W}=j,B=z[z.length-1];if(B&&(n==null||i||B.width+W+r<Number(n)))B.words.push(K),B.width+=W+r;else{var q={words:[K],width:W};z.push(q)}return z},[])},v=m(t),g=ee=>ee.reduce((F,z)=>F.width>z.width?F:z);if(!h||i)return v;var S=v.length>a||g(v).width>Number(n);if(!S)return v;for(var _="…",x=ee=>{var F=d.slice(0,ee),z=Yj({breakAll:f,style:u,children:F+_}).wordsWithComputedWidth,j=m(z),K=j.length>a||g(j).width>Number(n);return[K,j]},C=0,A=d.length-1,O=0,P;C<=A&&O<=d.length-1;){var D=Math.floor((C+A)/2),k=D-1,[R,N]=x(k),[$]=x(D);if(!R&&!$&&(C=D+1),R&&$&&(A=D-1),!R&&$){P=N;break}O++}return P||v},uM=e=>{var t=at(e)?[]:e.toString().split(Vj);return[{words:t}]},Nne=e=>{var{width:t,scaleToFit:r,children:n,style:i,breakAll:a,maxLines:l}=e;if((t||r)&&!Nn.isSsr){var u,f,h=Yj({breakAll:a,children:n,style:i});if(h){var{wordsWithComputedWidth:d,spaceWidth:m}=h;u=d,f=m}else return uM(n);return Bne({breakAll:a,children:n,maxLines:l,style:i},u,f,t,r)}return uM(n)},cM="#808080",As=w.forwardRef((e,t)=>{var{x:r=0,y:n=0,lineHeight:i="1em",capHeight:a="0.71em",scaleToFit:l=!1,textAnchor:u="start",verticalAnchor:f="end",fill:h=cM}=e,d=lM(e,Mne),m=w.useMemo(()=>Nne({breakAll:d.breakAll,children:d.children,maxLines:d.maxLines,scaleToFit:l,style:d.style,width:d.width}),[d.breakAll,d.children,d.maxLines,l,d.style,d.width]),{dx:v,dy:g,angle:S,className:_,breakAll:x}=d,C=lM(d,Rne);if(!Cr(r)||!Cr(n)||m.length===0)return null;var A=r+(ye(v)?v:0),O=n+(ye(g)?g:0),P;switch(f){case"start":P=Mb("calc(".concat(a,")"));break;case"middle":P=Mb("calc(".concat((m.length-1)/2," * -").concat(i," + (").concat(a," / 2))"));break;default:P=Mb("calc(".concat(m.length-1," * -").concat(i,")"));break}var D=[];if(l){var k=m[0].width,{width:R}=d;D.push("scale(".concat(ye(R)?R/k:1,")"))}return S&&D.push("rotate(".concat(S,", ").concat(A,", ").concat(O,")")),D.length&&(C.transform=D.join(" ")),w.createElement("text",VS({},Ue(C,!0),{ref:t,x:A,y:O,className:Me("recharts-text",_),textAnchor:u,fill:h.includes("url")?cM:h}),m.map((N,$)=>{var ee=N.words.join(x?"":" ");return w.createElement("tspan",{x:A,dy:$===0?P:i,key:"".concat(ee,"-").concat($)},ee)}))});As.displayName="Text";var Ine=["labelRef"];function jne(e,t){if(e==null)return{};var r,n,i=zne(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function zne(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function hM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Wt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hM(Object(r),!0).forEach(function(n){Hne(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hne(e,t,r){return(t=Fne(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fne(e){var t=Une(e,"string");return typeof t=="symbol"?t:t+""}function Une(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fa(){return fa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fa.apply(null,arguments)}var Xj=w.createContext(null),ev=e=>{var{x:t,y:r,width:n,height:i,children:a}=e,l=w.useMemo(()=>({x:t,y:r,width:n,height:i}),[t,r,n,i]);return w.createElement(Xj.Provider,{value:l},a)},Gj=()=>{var e=w.useContext(Xj),t=Lh();return e||t},Zj=w.createContext(null),$ne=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:a,endAngle:l,clockWise:u,children:f}=e,h=w.useMemo(()=>({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:a,endAngle:l,clockWise:u}),[t,r,n,i,a,l,u]);return w.createElement(Zj.Provider,{value:h},f)},Qj=()=>{var e=w.useContext(Zj),t=he(du);return e||t},Kne=e=>{var{value:t,formatter:r}=e,n=at(e.children)?t:e.children;return typeof r=="function"?r(n):n},ax=e=>e!=null&&typeof e=="function",qne=(e,t)=>{var r=xr(t-e),n=Math.min(Math.abs(t-e),360);return r*n},Wne=(e,t,r,n,i)=>{var{offset:a,className:l}=e,{cx:u,cy:f,innerRadius:h,outerRadius:d,startAngle:m,endAngle:v,clockWise:g}=i,S=(h+d)/2,_=qne(m,v),x=_>=0?1:-1,C,A;switch(t){case"insideStart":C=m+x*a,A=g;break;case"insideEnd":C=v-x*a,A=!g;break;case"end":C=v+x*a,A=g;break;default:throw new Error("Unsupported position ".concat(t))}A=_<=0?A:!A;var O=lt(u,f,S,C),P=lt(u,f,S,C+(A?1:-1)*359),D="M".concat(O.x,",").concat(O.y,`
    A`).concat(S,",").concat(S,",0,1,").concat(A?0:1,`,
    `).concat(P.x,",").concat(P.y),k=at(e.id)?Kl("recharts-radial-line-"):e.id;return w.createElement("text",fa({},n,{dominantBaseline:"central",className:Me("recharts-radial-bar-label",l)}),w.createElement("defs",null,w.createElement("path",{id:k,d:D})),w.createElement("textPath",{xlinkHref:"#".concat(k)},r))},Vne=(e,t,r)=>{var{cx:n,cy:i,innerRadius:a,outerRadius:l,startAngle:u,endAngle:f}=e,h=(u+f)/2;if(r==="outside"){var{x:d,y:m}=lt(n,i,l+t,h);return{x:d,y:m,textAnchor:d>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"end"};var v=(a+l)/2,{x:g,y:S}=lt(n,i,v,h);return{x:g,y:S,textAnchor:"middle",verticalAnchor:"middle"}},Jj=e=>"cx"in e&&ye(e.cx),Yne=(e,t)=>{var{parentViewBox:r,offset:n,position:i}=e,a;r!=null&&!Jj(r)&&(a=r);var{x:l,y:u,width:f,height:h}=t,d=h>=0?1:-1,m=d*n,v=d>0?"end":"start",g=d>0?"start":"end",S=f>=0?1:-1,_=S*n,x=S>0?"end":"start",C=S>0?"start":"end";if(i==="top"){var A={x:l+f/2,y:u-d*n,textAnchor:"middle",verticalAnchor:v};return Wt(Wt({},A),a?{height:Math.max(u-a.y,0),width:f}:{})}if(i==="bottom"){var O={x:l+f/2,y:u+h+m,textAnchor:"middle",verticalAnchor:g};return Wt(Wt({},O),a?{height:Math.max(a.y+a.height-(u+h),0),width:f}:{})}if(i==="left"){var P={x:l-_,y:u+h/2,textAnchor:x,verticalAnchor:"middle"};return Wt(Wt({},P),a?{width:Math.max(P.x-a.x,0),height:h}:{})}if(i==="right"){var D={x:l+f+_,y:u+h/2,textAnchor:C,verticalAnchor:"middle"};return Wt(Wt({},D),a?{width:Math.max(a.x+a.width-D.x,0),height:h}:{})}var k=a?{width:f,height:h}:{};return i==="insideLeft"?Wt({x:l+_,y:u+h/2,textAnchor:C,verticalAnchor:"middle"},k):i==="insideRight"?Wt({x:l+f-_,y:u+h/2,textAnchor:x,verticalAnchor:"middle"},k):i==="insideTop"?Wt({x:l+f/2,y:u+m,textAnchor:"middle",verticalAnchor:g},k):i==="insideBottom"?Wt({x:l+f/2,y:u+h-m,textAnchor:"middle",verticalAnchor:v},k):i==="insideTopLeft"?Wt({x:l+_,y:u+m,textAnchor:C,verticalAnchor:g},k):i==="insideTopRight"?Wt({x:l+f-_,y:u+m,textAnchor:x,verticalAnchor:g},k):i==="insideBottomLeft"?Wt({x:l+_,y:u+h-m,textAnchor:C,verticalAnchor:v},k):i==="insideBottomRight"?Wt({x:l+f-_,y:u+h-m,textAnchor:x,verticalAnchor:v},k):i&&typeof i=="object"&&(ye(i.x)||po(i.x))&&(ye(i.y)||po(i.y))?Wt({x:l+Vr(i.x,f),y:u+Vr(i.y,h),textAnchor:"end",verticalAnchor:"end"},k):Wt({x:l+f/2,y:u+h/2,textAnchor:"middle",verticalAnchor:"middle"},k)},Xne={offset:5};function _s(e){var t=jt(e,Xne),{viewBox:r,position:n,value:i,children:a,content:l,className:u="",textBreakAll:f,labelRef:h}=t,d=Qj(),m=Gj(),v=n==="center"?m:d??m,g=r||v;if(!g||at(i)&&at(a)&&!w.isValidElement(l)&&typeof l!="function")return null;var S=Wt(Wt({},t),{},{viewBox:g});if(w.isValidElement(l)){var{labelRef:_}=S,x=jne(S,Ine);return w.cloneElement(l,x)}var C;if(typeof l=="function"){if(C=w.createElement(l,S),w.isValidElement(C))return C}else C=Kne(t);var A=Jj(g),O=Ue(t,!0);if(A&&(n==="insideStart"||n==="insideEnd"||n==="end"))return Wne(t,n,C,O,g);var P=A?Vne(g,t.offset,t.position):Yne(t,g);return w.createElement(As,fa({ref:h,className:Me("recharts-label",u)},O,P,{breakAll:f}),C)}_s.displayName="Label";var ez=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?w.createElement(_s,fa({key:"label-implicit"},n)):Cr(e)?w.createElement(_s,fa({key:"label-implicit",value:e},n)):w.isValidElement(e)?e.type===_s?w.cloneElement(e,Wt({key:"label-implicit"},n)):w.createElement(_s,fa({key:"label-implicit",content:e},n)):ax(e)?w.createElement(_s,fa({key:"label-implicit",content:e},n)):e&&typeof e=="object"?w.createElement(_s,fa({},e,{key:"label-implicit"},n)):null};function tv(e){var{label:t}=e,r=Gj();return ez(t,r)||null}function Gne(e){var{label:t}=e,r=Qj();return ez(t,r)||null}var Rb={},Lb={},fM;function Zne(){return fM||(fM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r[r.length-1]}e.last=t})(Lb)),Lb}var Bb={},dM;function Qne(){return dM||(dM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Array.isArray(r)?r:Array.from(r)}e.toArray=t})(Bb)),Bb}var pM;function Jne(){return pM||(pM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Zne(),r=Qne(),n=Ph();function i(a){if(n.isArrayLike(a))return t.last(r.toArray(a))}e.last=i})(Rb)),Rb}var Nb,mM;function eie(){return mM||(mM=1,Nb=Jne().last),Nb}var tie=eie();const tz=Hr(tie);var rie=["valueAccessor"],nie=["dataKey","clockWise","id","textBreakAll"];function Wp(){return Wp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wp.apply(null,arguments)}function vM(e,t){if(e==null)return{};var r,n,i=iie(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function iie(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var aie=e=>Array.isArray(e.value)?tz(e.value):e.value,rz=w.createContext(void 0),bu=rz.Provider,nz=w.createContext(void 0),sie=nz.Provider;function oie(){return w.useContext(rz)}function lie(){return w.useContext(nz)}function eh(e){var{valueAccessor:t=aie}=e,r=vM(e,rie),{dataKey:n,clockWise:i,id:a,textBreakAll:l}=r,u=vM(r,nie),f=oie(),h=lie(),d=f||h;return!d||!d.length?null:w.createElement(Pe,{className:"recharts-label-list"},d.map((m,v)=>{var g,S=at(n)?t(m,v):Fe(m&&m.payload,n),_=at(a)?{}:{id:"".concat(a,"-").concat(v)};return w.createElement(_s,Wp({},Ue(m,!0),u,_,{fill:(g=r.fill)!==null&&g!==void 0?g:m.fill,parentViewBox:m.parentViewBox,value:S,textBreakAll:l,viewBox:m.viewBox,key:"label-".concat(v),index:v}))}))}eh.displayName="LabelList";function Ho(e){var{label:t}=e;return t?t===!0?w.createElement(eh,{key:"labelList-implicit"}):w.isValidElement(t)||ax(t)?w.createElement(eh,{key:"labelList-implicit",content:t}):typeof t=="object"?w.createElement(eh,Wp({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}var uie=["points","className","baseLinePoints","connectNulls"];function Bl(){return Bl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bl.apply(null,arguments)}function cie(e,t){if(e==null)return{};var r,n,i=hie(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function hie(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var gM=e=>e&&e.x===+e.x&&e.y===+e.y,fie=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(n=>{gM(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),gM(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},th=(e,t)=>{var r=fie(e);t&&(r=[r.reduce((i,a)=>[...i,...a],[])]);var n=r.map(i=>i.reduce((a,l,u)=>"".concat(a).concat(u===0?"M":"L").concat(l.x,",").concat(l.y),"")).join("");return r.length===1?"".concat(n,"Z"):n},die=(e,t,r)=>{var n=th(e,r);return"".concat(n.slice(-1)==="Z"?n.slice(0,-1):n,"L").concat(th(Array.from(t).reverse(),r).slice(1))},sx=e=>{var{points:t,className:r,baseLinePoints:n,connectNulls:i}=e,a=cie(e,uie);if(!t||!t.length)return null;var l=Me("recharts-polygon",r);if(n&&n.length){var u=a.stroke&&a.stroke!=="none",f=die(t,n,i);return w.createElement("g",{className:l},w.createElement("path",Bl({},Ue(a,!0),{fill:f.slice(-1)==="Z"?a.fill:"none",stroke:"none",d:f})),u?w.createElement("path",Bl({},Ue(a,!0),{fill:"none",d:th(t,i)})):null,u?w.createElement("path",Bl({},Ue(a,!0),{fill:"none",d:th(n,i)})):null)}var h=th(t,i);return w.createElement("path",Bl({},Ue(a,!0),{fill:h.slice(-1)==="Z"?a.fill:"none",className:l,d:h}))};function YS(){return YS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},YS.apply(null,arguments)}var Su=e=>{var{cx:t,cy:r,r:n,className:i}=e,a=Me("recharts-dot",i);return t===+t&&r===+r&&n===+n?w.createElement("circle",YS({},Et(e),Iw(e),{className:a,cx:t,cy:r,r:n})):null},ox=e=>e.graphicalItems.polarItems,pie=X([wt,Uh],R1),lx=X([ox,Yt,pie],L1),mie=X([lx],B1),ux=X([mie,zh],N1),iz=X([ux,Yt,lx],j1),vie=X([ux,Yt,lx],(e,t,r)=>r.length>0?e.flatMap(n=>r.flatMap(i=>{var a,l=Fe(n,(a=t.dataKey)!==null&&a!==void 0?a:i.dataKey);return{value:l,errorDomain:[]}})).filter(Boolean):(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:Fe(n,t.dataKey),errorDomain:[]})):e.map(n=>({value:n,errorDomain:[]}))),yM=()=>{},gie=X([Yt,aj,yM,vie,yM,$e,wt],H1),az=X([Yt,$e,ux,iz,Hh,wt,gie],F1),sz=X([az,Yt,Rs],$1),yie=X([Yt,az,sz,wt],q1),cx=(e,t,r)=>{switch(t){case"angleAxis":return fu(e,r);case"radiusAxis":return Fh(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},hx=(e,t,r)=>{switch(t){case"angleAxis":return Dee(e,r);case"radiusAxis":return Mee(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},wu=X([cx,Rs,yie,hx],Xm),oz=X([$e,iz,mu,wt],W1),xu=X([$e,cx,Rs,wu,sz,hx,qh,oz,wt],pj);X([$e,cx,wu,hx,qh,oz,wt],vj);var _ie=(e,t)=>xu(e,"angleAxis",t,!1),bie=X([_ie],e=>{if(e)return e.map(t=>t.coordinate)}),Sie=(e,t)=>xu(e,"radiusAxis",t,!1),wie=X([Sie],e=>{if(e)return e.map(t=>t.coordinate)}),xie=["gridType","radialLines","angleAxisId","radiusAxisId","cx","cy","innerRadius","outerRadius"];function Cie(e,t){if(e==null)return{};var r,n,i=Eie(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Eie(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function wi(){return wi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wi.apply(null,arguments)}function _M(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function rv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_M(Object(r),!0).forEach(function(n){Aie(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_M(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Aie(e,t,r){return(t=Oie(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Oie(e){var t=kie(e,"string");return typeof t=="symbol"?t:t+""}function kie(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Pie=(e,t,r,n)=>{var i="";return n.forEach((a,l)=>{var u=lt(t,r,e,a);l?i+="L ".concat(u.x,",").concat(u.y):i+="M ".concat(u.x,",").concat(u.y)}),i+="Z",i},Tie=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,polarAngles:a,radialLines:l}=e;if(!a||!a.length||!l)return null;var u=rv({stroke:"#ccc"},Et(e));return w.createElement("g",{className:"recharts-polar-grid-angle"},a.map(f=>{var h=lt(t,r,n,f),d=lt(t,r,i,f);return w.createElement("line",wi({},u,{key:"line-".concat(f),x1:h.x,y1:h.y,x2:d.x,y2:d.y}))}))},bM=e=>{var{cx:t,cy:r,radius:n}=e,i=rv({stroke:"#ccc",fill:"none"},Et(e));return w.createElement("circle",wi({},i,{className:Me("recharts-polar-grid-concentric-circle",e.className),cx:t,cy:r,r:n}))},SM=e=>{var{radius:t}=e,r=rv({stroke:"#ccc",fill:"none"},Et(e));return w.createElement("path",wi({},r,{className:Me("recharts-polar-grid-concentric-polygon",e.className),d:Pie(t,e.cx,e.cy,e.polarAngles)}))},Die=e=>{var{polarRadius:t,gridType:r}=e;if(!t||!t.length)return null;var n=Math.max(...t),i=e.fill&&e.fill!=="none";return w.createElement("g",{className:"recharts-polar-grid-concentric"},i&&r==="circle"&&w.createElement(bM,wi({},e,{radius:n})),i&&r!=="circle"&&w.createElement(SM,wi({},e,{radius:n})),t.map((a,l)=>{var u=l;return r==="circle"?w.createElement(bM,wi({key:u},e,{fill:"none",radius:a})):w.createElement(SM,wi({key:u},e,{fill:"none",radius:a}))}))},lz=e=>{var t,r,n,i,a,l,u,f,{gridType:h="polygon",radialLines:d=!0,angleAxisId:m=0,radiusAxisId:v=0,cx:g,cy:S,innerRadius:_,outerRadius:x}=e,C=Cie(e,xie),A=he(du),O=rv({cx:(t=(r=A==null?void 0:A.cx)!==null&&r!==void 0?r:g)!==null&&t!==void 0?t:0,cy:(n=(i=A==null?void 0:A.cy)!==null&&i!==void 0?i:S)!==null&&n!==void 0?n:0,innerRadius:(a=(l=A==null?void 0:A.innerRadius)!==null&&l!==void 0?l:_)!==null&&a!==void 0?a:0,outerRadius:(u=(f=A==null?void 0:A.outerRadius)!==null&&f!==void 0?f:x)!==null&&u!==void 0?u:0},C),{polarAngles:P,polarRadius:D,outerRadius:k}=O,R=he(F=>bie(F,m)),N=he(F=>wie(F,v)),$=Array.isArray(P)?P:R,ee=Array.isArray(D)?D:N;return k<=0||$==null||ee==null?null:w.createElement("g",{className:"recharts-polar-grid"},w.createElement(Die,wi({gridType:h,radialLines:d},O,{polarAngles:$,polarRadius:ee})),w.createElement(Tie,wi({gridType:h,radialLines:d},O,{polarAngles:$,polarRadius:ee})))};lz.displayName="PolarGrid";var Ib={},jb={},wM;function Mie(){return wM||(wM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){if(r.length===0)return;let i=r[0],a=n(i,0,r);for(let l=1;l<r.length;l++){const u=r[l],f=n(u,l,r);f>a&&(a=f,i=u)}return i}e.maxBy=t})(jb)),jb}var xM;function Rie(){return xM||(xM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Mie(),r=wm(),n=Kw();function i(a,l){if(a!=null)return t.maxBy(Array.from(a),n.iteratee(l??r.identity))}e.maxBy=i})(Ib)),Ib}var zb,CM;function Lie(){return CM||(CM=1,zb=Rie().maxBy),zb}var Bie=Lie();const Nie=Hr(Bie);var Hb={},Fb={},EM;function Iie(){return EM||(EM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){if(r.length===0)return;let i=r[0],a=n(i,0,r);for(let l=1;l<r.length;l++){const u=r[l],f=n(u,l,r);f<a&&(a=f,i=u)}return i}e.minBy=t})(Fb)),Fb}var AM;function jie(){return AM||(AM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Iie(),r=wm(),n=Kw();function i(a,l){if(a!=null)return t.minBy(Array.from(a),n.iteratee(l??r.identity))}e.minBy=i})(Hb)),Hb}var Ub,OM;function zie(){return OM||(OM=1,Ub=jie().minBy),Ub}var Hie=zie();const Fie=Hr(Hie);var Uie={radiusAxis:{},angleAxis:{}},uz=In({name:"polarAxis",initialState:Uie,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:$ie,removeRadiusAxis:Kie,addAngleAxis:qie,removeAngleAxis:Wie}=uz.actions,Vie=uz.reducer,Yie=["cx","cy","angle","axisLine"],Xie=["angle","tickFormatter","stroke","tick"];function gh(){return gh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gh.apply(null,arguments)}function kM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ji(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kM(Object(r),!0).forEach(function(n){nv(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nv(e,t,r){return(t=Gie(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gie(e){var t=Zie(e,"string");return typeof t=="symbol"?t:t+""}function Zie(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cz(e,t){if(e==null)return{};var r,n,i=Qie(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Qie(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var hz="radiusAxis";function Jie(e){var t=Je();return w.useEffect(()=>(t($ie(e)),()=>{t(Kie(e))})),null}var eae=(e,t,r,n)=>{var{coordinate:i}=e;return lt(r,n,i,t)},tae=e=>{var t;switch(e){case"left":t="end";break;case"right":t="start";break;default:t="middle";break}return t},rae=(e,t,r,n)=>{var i=Nie(n,l=>l.coordinate||0),a=Fie(n,l=>l.coordinate||0);return{cx:t,cy:r,startAngle:e,endAngle:e,innerRadius:a.coordinate||0,outerRadius:i.coordinate||0,clockWise:!1}},nae=(e,t)=>{var{cx:r,cy:n,angle:i,axisLine:a}=e,l=cz(e,Yie),u=t.reduce((m,v)=>[Math.min(m[0],v.coordinate),Math.max(m[1],v.coordinate)],[1/0,-1/0]),f=lt(r,n,u[0],i),h=lt(r,n,u[1],i),d=ji(ji(ji({},Et(l)),{},{fill:"none"},Ue(a,!1)),{},{x1:f.x,y1:f.y,x2:h.x,y2:h.y});return w.createElement("line",gh({className:"recharts-polar-radius-axis-line"},d))},iae=(e,t,r)=>{var n;return w.isValidElement(e)?n=w.cloneElement(e,t):typeof e=="function"?n=e(t):n=w.createElement(As,gh({},t,{className:"recharts-polar-radius-axis-tick-value"}),r),n},aae=(e,t)=>{var{angle:r,tickFormatter:n,stroke:i,tick:a}=e,l=cz(e,Xie),u=tae(e.orientation),f=Et(l),h=Ue(a,!1),d=t.map((m,v)=>{var g=eae(m,e.angle,e.cx,e.cy),S=ji(ji(ji(ji({textAnchor:u,transform:"rotate(".concat(90-r,", ").concat(g.x,", ").concat(g.y,")")},f),{},{stroke:"none",fill:i},h),{},{index:v},g),{},{payload:m});return w.createElement(Pe,gh({className:Me("recharts-polar-radius-axis-tick",g3(a)),key:"tick-".concat(m.coordinate)},Ta(e,m,v)),iae(a,S,n?n(m.value,v):m.value))});return w.createElement(Pe,{className:"recharts-polar-radius-axis-ticks"},d)},sae=e=>{var{radiusAxisId:t}=e,r=he(du),n=he(f=>wu(f,"radiusAxis",t)),i=he(f=>xu(f,"radiusAxis",t,!1));if(r==null||!i||!i.length)return null;var a=ji(ji(ji({},e),{},{scale:n},r),{},{radius:r.outerRadius}),{tick:l,axisLine:u}=a;return w.createElement(Pe,{className:Me("recharts-polar-radius-axis",hz,a.className)},u&&nae(a,i),l&&aae(a,i),w.createElement($ne,rae(a.angle,a.cx,a.cy,i),w.createElement(Gne,{label:a.label}),a.children))};class iv extends w.PureComponent{render(){return w.createElement(w.Fragment,null,w.createElement(Jie,{domain:this.props.domain,id:this.props.radiusAxisId,scale:this.props.scale,type:this.props.type,dataKey:this.props.dataKey,unit:void 0,name:this.props.name,allowDuplicatedCategory:this.props.allowDuplicatedCategory,allowDataOverflow:this.props.allowDataOverflow,reversed:this.props.reversed,includeHidden:this.props.includeHidden,allowDecimals:this.props.allowDecimals,tickCount:this.props.tickCount,ticks:this.props.ticks,tick:this.props.tick}),w.createElement(sae,this.props))}}nv(iv,"displayName","PolarRadiusAxis");nv(iv,"axisType",hz);nv(iv,"defaultProps",mn);var oae=["children"];function Oa(){return Oa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Oa.apply(null,arguments)}function PM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Bi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?PM(Object(r),!0).forEach(function(n){av(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function av(e,t,r){return(t=lae(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lae(e){var t=uae(e,"string");return typeof t=="symbol"?t:t+""}function uae(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cae(e,t){if(e==null)return{};var r,n,i=hae(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function hae(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var TM=1e-5,fae=Math.cos(Pp(45)),fz="angleAxis";function dae(e){var t=Je(),r=w.useMemo(()=>{var{children:a}=e,l=cae(e,oae);return l},[e]),n=he(a=>fu(a,r.id)),i=r===n;return w.useEffect(()=>(t(qie(r)),()=>{t(Wie(r))}),[t,r]),i?e.children:null}var pae=(e,t)=>{var{cx:r,cy:n,radius:i,orientation:a,tickSize:l}=t,u=l||8,f=lt(r,n,i,e.coordinate),h=lt(r,n,i+(a==="inner"?-1:1)*u,e.coordinate);return{x1:f.x,y1:f.y,x2:h.x,y2:h.y}},mae=(e,t)=>{var r=Math.cos(Pp(-e.coordinate));return r>TM?t==="outer"?"start":"end":r<-TM?t==="outer"?"end":"start":"middle"},vae=e=>{var t=Math.cos(Pp(-e.coordinate)),r=Math.sin(Pp(-e.coordinate));return Math.abs(t)<=fae?r>0?"start":"end":"middle"},gae=e=>{var{cx:t,cy:r,radius:n,axisLineType:i,axisLine:a,ticks:l}=e;if(!a)return null;var u=Bi(Bi({},Et(e)),{},{fill:"none"},Ue(a,!1));if(i==="circle")return w.createElement(Su,Oa({className:"recharts-polar-angle-axis-line"},u,{cx:t,cy:r,r:n}));var f=l.map(h=>lt(t,r,n,h.coordinate));return w.createElement(sx,Oa({className:"recharts-polar-angle-axis-line"},u,{points:f}))},yae=e=>{var{tick:t,tickProps:r,value:n}=e;return t?w.isValidElement(t)?w.cloneElement(t,r):typeof t=="function"?t(r):w.createElement(As,Oa({},r,{className:"recharts-polar-angle-axis-tick-value"}),n):null},_ae=e=>{var{tick:t,tickLine:r,tickFormatter:n,stroke:i,ticks:a}=e,l=Et(e),u=Ue(t,!1),f=Bi(Bi({},l),{},{fill:"none"},Ue(r,!1)),h=a.map((d,m)=>{var v=pae(d,e),g=mae(d,e.orientation),S=vae(d),_=Bi(Bi(Bi({},l),{},{textAnchor:g,verticalAnchor:S,stroke:"none",fill:i},u),{},{index:m,payload:d,x:v.x2,y:v.y2});return w.createElement(Pe,Oa({className:Me("recharts-polar-angle-axis-tick",g3(t)),key:"tick-".concat(d.coordinate)},Ta(e,d,m)),r&&w.createElement("line",Oa({className:"recharts-polar-angle-axis-tick-line"},f,v)),w.createElement(yae,{tick:t,tickProps:_,value:n?n(d.value,m):d.value}))});return w.createElement(Pe,{className:"recharts-polar-angle-axis-ticks"},h)},bae=e=>{var{angleAxisId:t}=e,r=he(du),n=he(u=>wu(u,"angleAxis",t)),i=Tt(),a=he(u=>xu(u,"angleAxis",t,i));if(r==null||!a||!a.length)return null;var l=Bi(Bi(Bi({},e),{},{scale:n},r),{},{radius:r.outerRadius});return w.createElement(Pe,{className:Me("recharts-polar-angle-axis",fz,l.className)},w.createElement(gae,Oa({},l,{ticks:a})),w.createElement(_ae,Oa({},l,{ticks:a})))};class sv extends w.PureComponent{render(){return this.props.radius<=0?null:w.createElement(dae,{id:this.props.angleAxisId,scale:this.props.scale,type:this.props.type,dataKey:this.props.dataKey,unit:void 0,name:this.props.name,allowDuplicatedCategory:!1,allowDataOverflow:!1,reversed:this.props.reversed,includeHidden:!1,allowDecimals:this.props.allowDecimals,tickCount:this.props.tickCount,ticks:this.props.ticks,tick:this.props.tick,domain:this.props.domain},w.createElement(bae,this.props))}}av(sv,"displayName","PolarAngleAxis");av(sv,"axisType",fz);av(sv,"defaultProps",Li);function DM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function MM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?DM(Object(r),!0).forEach(function(n){Sae(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Sae(e,t,r){return(t=wae(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wae(e){var t=xae(e,"string");return typeof t=="symbol"?t:t+""}function xae(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Cae=(e,t)=>t,fx=X([ox,Cae],(e,t)=>e.filter(r=>r.type==="pie").find(r=>r.id===t)),Eae=[],dx=(e,t,r)=>(r==null?void 0:r.length)===0?Eae:r,dz=X([zh,fx,dx],(e,t,r)=>{var{chartData:n}=e;if(t!=null){var i;if((t==null?void 0:t.data)!=null&&t.data.length>0?i=t.data:i=n,(!i||!i.length)&&r!=null&&(i=r.map(a=>MM(MM({},t.presentationProps),a.props))),i!=null)return i}}),Aae=X([dz,fx,dx],(e,t,r)=>{if(!(e==null||t==null))return e.map((n,i)=>{var a,l=Fe(n,t.nameKey,t.name),u;return r!=null&&(a=r[i])!==null&&a!==void 0&&(a=a.props)!==null&&a!==void 0&&a.fill?u=r[i].props.fill:typeof n=="object"&&n!=null&&"fill"in n?u=n.fill:u=t.fill,{value:fi(l,t.dataKey),color:u,payload:n,type:t.legendType}})}),Oae=X([dz,fx,dx,ar],(e,t,r,n)=>{if(!(t==null||e==null))return bse({offset:n,pieSettings:t,displayedData:e,cells:r})}),$b={},RM;function pz(){return RM||(RM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){var i;if(typeof r!="object"||r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){const a=r[Symbol.toStringTag];return a==null||!((i=Object.getOwnPropertyDescriptor(r,Symbol.toStringTag))!=null&&i.writable)?!1:r.toString()===`[object ${a}]`}let n=r;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(r)===n}e.isPlainObject=t})($b)),$b}var Kb,LM;function kae(){return LM||(LM=1,Kb=pz().isPlainObject),Kb}var Pae=kae();const Tae=Hr(Pae);function BM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function NM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BM(Object(r),!0).forEach(function(n){Dae(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Dae(e,t,r){return(t=Mae(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mae(e){var t=Rae(e,"string");return typeof t=="symbol"?t:t+""}function Rae(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vp(){return Vp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vp.apply(null,arguments)}var IM=(e,t,r,n,i)=>{var a=r-n,l;return l="M ".concat(e,",").concat(t),l+="L ".concat(e+r,",").concat(t),l+="L ".concat(e+r-a/2,",").concat(t+i),l+="L ".concat(e+r-a/2-n,",").concat(t+i),l+="L ".concat(e,",").concat(t," Z"),l},Lae={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Bae=e=>{var t=jt(e,Lae),{x:r,y:n,upperWidth:i,lowerWidth:a,height:l,className:u}=t,{animationEasing:f,animationDuration:h,animationBegin:d,isUpdateAnimationActive:m}=t,v=w.useRef(),[g,S]=w.useState(-1),_=w.useRef(i),x=w.useRef(a),C=w.useRef(l),A=w.useRef(r),O=w.useRef(n),P=La(e,"trapezoid-");if(w.useEffect(()=>{if(v.current&&v.current.getTotalLength)try{var K=v.current.getTotalLength();K&&S(K)}catch{}},[]),r!==+r||n!==+n||i!==+i||a!==+a||l!==+l||i===0&&a===0||l===0)return null;var D=Me("recharts-trapezoid",u);if(!m)return w.createElement("g",null,w.createElement("path",Vp({},Ue(t,!0),{className:D,d:IM(r,n,i,a,l)})));var k=_.current,R=x.current,N=C.current,$=A.current,ee=O.current,F="0px ".concat(g===-1?1:g,"px"),z="".concat(g,"px 0px"),j=n1(["strokeDasharray"],h,f);return w.createElement(Ra,{animationId:P,key:P,canBegin:g>0,duration:h,easing:f,isActive:m,begin:d},K=>{var W=je(k,i,K),B=je(R,a,K),q=je(N,l,K),G=je($,r,K),ce=je(ee,n,K);v.current&&(_.current=W,x.current=B,C.current=q,A.current=G,O.current=ce);var M=K>0?{transition:j,strokeDasharray:z}:{strokeDasharray:F};return w.createElement("path",Vp({},Ue(t,!0),{className:D,d:IM(G,ce,W,B,q),ref:v,style:NM(NM({},M),t.style)}))})},Nae=["option","shapeType","propTransformer","activeClassName","isActive"];function Iae(e,t){if(e==null)return{};var r,n,i=jae(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function jae(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function jM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Yp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jM(Object(r),!0).forEach(function(n){zae(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zae(e,t,r){return(t=Hae(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hae(e){var t=Fae(e,"string");return typeof t=="symbol"?t:t+""}function Fae(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Uae(e,t){return Yp(Yp({},t),e)}function $ae(e,t){return e==="symbols"}function zM(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return w.createElement(Rm,r);case"trapezoid":return w.createElement(Bae,r);case"sector":return w.createElement(N3,r);case"symbols":if($ae(t))return w.createElement(Sm,r);break;default:return null}}function mz(e){return w.isValidElement(e)?e.props:e}function yh(e){var{option:t,shapeType:r,propTransformer:n=Uae,activeClassName:i="recharts-active-shape",isActive:a}=e,l=Iae(e,Nae),u;if(w.isValidElement(t))u=w.cloneElement(t,Yp(Yp({},l),mz(t)));else if(typeof t=="function")u=t(l);else if(Tae(t)&&typeof t!="boolean"){var f=n(t,l);u=w.createElement(zM,{shapeType:r,elementProps:f})}else{var h=l;u=w.createElement(zM,{shapeType:r,elementProps:h})}return a?w.createElement(Pe,{className:i},u):u}var Yh=(e,t)=>{var r=Je();return(n,i)=>a=>{e==null||e(n,i,a),r(Qm({activeIndex:String(i),activeDataKey:t,activeCoordinate:n.tooltipPosition}))}},Xh=e=>{var t=Je();return(r,n)=>i=>{e==null||e(r,n,i),t(Ote())}},Gh=(e,t)=>{var r=Je();return(n,i)=>a=>{e==null||e(n,i,a),r(xj({activeIndex:String(i),activeDataKey:t,activeCoordinate:n.tooltipPosition}))}};function Bs(e){var{fn:t,args:r}=e,n=Je(),i=Tt();return w.useEffect(()=>{if(!i){var a=t(r);return n(Cte(a)),()=>{n(Ete(a))}}},[t,r,n,i]),null}var vz=()=>{};function ov(e){var{legendPayload:t}=e,r=Je(),n=Tt();return w.useEffect(()=>n?vz:(r(A3(t)),()=>{r(O3(t))}),[r,n,t]),null}function gz(e){var{legendPayload:t}=e,r=Je(),n=he($e);return w.useEffect(()=>n!=="centric"&&n!=="radial"?vz:(r(A3(t)),()=>{r(O3(t))}),[r,n,t]),null}var qb,Kae=()=>{var[e]=w.useState(()=>Kl("uid-"));return e},qae=(qb=J4.useId)!==null&&qb!==void 0?qb:Kae;function Wae(e,t){var r=qae();return t||(e?"".concat(e,"-").concat(r):r)}var yz=w.createContext(void 0),Cu=e=>{var{id:t,type:r,children:n}=e,i=Wae("recharts-".concat(r),t);return w.createElement(yz.Provider,{value:i},n(i))};function Vae(){return w.useContext(yz)}var Yae={cartesianItems:[],polarItems:[]},_z=In({name:"graphicalItems",initialState:Yae,reducers:{addCartesianGraphicalItem(e,t){e.cartesianItems.push(t.payload)},replaceCartesianGraphicalItem(e,t){var{prev:r,next:n}=t.payload,i=ga(e).cartesianItems.indexOf(r);i>-1&&(e.cartesianItems[i]=n)},removeCartesianGraphicalItem(e,t){var r=ga(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},addPolarGraphicalItem(e,t){e.polarItems.push(t.payload)},removePolarGraphicalItem(e,t){var r=ga(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)}}}),{addCartesianGraphicalItem:Xae,replaceCartesianGraphicalItem:Gae,removeCartesianGraphicalItem:Zae,addPolarGraphicalItem:Qae,removePolarGraphicalItem:Jae}=_z.actions,ese=_z.reducer;function lv(e){var t=Je(),r=w.useRef(null);return w.useEffect(()=>{r.current===null?t(Xae(e)):r.current!==e&&t(Gae({prev:r.current,next:e})),r.current=e},[t,e]),w.useEffect(()=>()=>{r.current&&(t(Zae(r.current)),r.current=null)},[t]),null}function bz(e){var t=Je();return w.useEffect(()=>(t(Qae(e)),()=>{t(Jae(e))}),[t,e]),null}var tse=["onMouseEnter","onClick","onMouseLeave"],rse=["id"],nse=["id"];function px(e,t){if(e==null)return{};var r,n,i=ise(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ise(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function HM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?HM(Object(r),!0).forEach(function(n){ase(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ase(e,t,r){return(t=sse(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sse(e){var t=ose(e,"string");return typeof t=="symbol"?t:t+""}function ose(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Os(){return Os=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Os.apply(null,arguments)}function lse(e){var t=w.useMemo(()=>kh(e.children,zo),[e.children]),r=he(n=>Aae(n,e.id,t));return r==null?null:w.createElement(gz,{legendPayload:r})}function use(e){var{dataKey:t,nameKey:r,sectors:n,stroke:i,strokeWidth:a,fill:l,name:u,hide:f,tooltipType:h}=e;return{dataDefinedOnItem:n.map(d=>d.tooltipPayload),positions:n.map(d=>d.tooltipPosition),settings:{stroke:i,strokeWidth:a,fill:l,dataKey:t,nameKey:r,name:fi(u,t),hide:f,type:h,color:l,unit:""}}}var cse=(e,t)=>e>t?"start":e<t?"end":"middle",hse=(e,t,r)=>Vr(typeof t=="function"?t(e):t,r,r*.8),fse=(e,t,r)=>{var{top:n,left:i,width:a,height:l}=t,u=v3(a,l),f=i+Vr(e.cx,a,a/2),h=n+Vr(e.cy,l,l/2),d=Vr(e.innerRadius,u,0),m=hse(r,e.outerRadius,u),v=e.maxRadius||Math.sqrt(a*a+l*l)/2;return{cx:f,cy:h,innerRadius:d,outerRadius:m,maxRadius:v}},dse=(e,t)=>{var r=xr(t-e),n=Math.min(Math.abs(t-e),360);return r*n};function pse(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var mse=(e,t)=>{if(w.isValidElement(e))return w.cloneElement(e,t);if(typeof e=="function")return e(t);var r=Me("recharts-pie-label-line",typeof e!="boolean"?e.className:"");return w.createElement(wo,Os({},t,{type:"linear",className:r}))},vse=(e,t,r)=>{if(w.isValidElement(e))return w.cloneElement(e,t);var n=r;if(typeof e=="function"&&(n=e(t),w.isValidElement(n)))return n;var i=Me("recharts-pie-label-text",pse(e));return w.createElement(As,Os({},t,{alignmentBaseline:"middle",className:i}),n)};function gse(e){var{sectors:t,props:r,showLabels:n}=e,{label:i,labelLine:a,dataKey:l}=r;if(!n||!i||!t)return null;var u=Et(r),f=Ue(i,!1),h=Ue(a,!1),d=typeof i=="object"&&"offsetRadius"in i&&typeof i.offsetRadius=="number"&&i.offsetRadius||20,m=t.map((v,g)=>{var S=(v.startAngle+v.endAngle)/2,_=lt(v.cx,v.cy,v.outerRadius+d,S),x=Rt(Rt(Rt(Rt({},u),v),{},{stroke:"none"},f),{},{index:g,textAnchor:cse(_.x,v.cx)},_),C=Rt(Rt(Rt(Rt({},u),v),{},{fill:"none",stroke:v.fill},h),{},{index:g,points:[lt(v.cx,v.cy,v.outerRadius,S),_],key:"line"});return w.createElement(Pe,{key:"label-".concat(v.startAngle,"-").concat(v.endAngle,"-").concat(v.midAngle,"-").concat(g)},a&&mse(a,C),vse(i,x,Fe(v,l)))});return w.createElement(Pe,{className:"recharts-pie-labels"},m)}function yse(e){var{sectors:t,props:r,showLabels:n}=e,{label:i}=r;return typeof i=="object"&&i!=null&&"position"in i?w.createElement(Ho,{label:r.label}):w.createElement(gse,{sectors:t,props:r,showLabels:n})}function _se(e){var{sectors:t,activeShape:r,inactiveShape:n,allOtherPieProps:i}=e,a=he(Aa),{onMouseEnter:l,onClick:u,onMouseLeave:f}=i,h=px(i,tse),d=Yh(l,i.dataKey),m=Xh(f),v=Gh(u,i.dataKey);return t==null||t.length===0?null:w.createElement(w.Fragment,null,t.map((g,S)=>{if((g==null?void 0:g.startAngle)===0&&(g==null?void 0:g.endAngle)===0&&t.length!==1)return null;var _=r&&String(S)===a,x=a?n:null,C=_?r:x,A=Rt(Rt({},g),{},{stroke:g.stroke,tabIndex:-1,[Zw]:S,[Qw]:i.dataKey});return w.createElement(Pe,Os({tabIndex:-1,className:"recharts-pie-sector"},Ta(h,g,S),{onMouseEnter:d(g,S),onMouseLeave:m(g,S),onClick:v(g,S),key:"sector-".concat(g==null?void 0:g.startAngle,"-").concat(g==null?void 0:g.endAngle,"-").concat(g.midAngle,"-").concat(S)}),w.createElement(yh,Os({option:C,isActive:_,shapeType:"sector"},A)))}))}function bse(e){var t,{pieSettings:r,displayedData:n,cells:i,offset:a}=e,{cornerRadius:l,startAngle:u,endAngle:f,dataKey:h,nameKey:d,tooltipType:m}=r,v=Math.abs(r.minAngle),g=dse(u,f),S=Math.abs(g),_=n.length<=1?0:(t=r.paddingAngle)!==null&&t!==void 0?t:0,x=n.filter(k=>Fe(k,h,0)!==0).length,C=(S>=360?x:x-1)*_,A=S-x*v-C,O=n.reduce((k,R)=>{var N=Fe(R,h,0);return k+(ye(N)?N:0)},0),P;if(O>0){var D;P=n.map((k,R)=>{var N=Fe(k,h,0),$=Fe(k,d,R),ee=fse(r,a,k),F=(ye(N)?N:0)/O,z,j=Rt(Rt({},k),i&&i[R]&&i[R].props);R?z=D.endAngle+xr(g)*_*(N!==0?1:0):z=u;var K=z+xr(g)*((N!==0?v:0)+F*A),W=(z+K)/2,B=(ee.innerRadius+ee.outerRadius)/2,q=[{name:$,value:N,payload:j,dataKey:h,type:m}],G=lt(ee.cx,ee.cy,B,W);return D=Rt(Rt(Rt(Rt({},r.presentationProps),{},{percent:F,cornerRadius:l,name:$,tooltipPayload:q,midAngle:W,middleRadius:B,tooltipPosition:G},j),ee),{},{value:Fe(k,h),startAngle:z,endAngle:K,payload:j,paddingAngle:xr(g)*_}),D})}return P}function Sse(e){var{showLabels:t,sectors:r,children:n}=e,i=w.useMemo(()=>!t||!r?[]:r.map(a=>({value:a.value,payload:a.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:a.cx,cy:a.cy,innerRadius:a.innerRadius,outerRadius:a.outerRadius,startAngle:a.startAngle,endAngle:a.endAngle,clockWise:!1},fill:a.fill})),[r,t]);return w.createElement(sie,{value:t?i:void 0},n)}function wse(e){var{props:t,previousSectorsRef:r}=e,{sectors:n,isAnimationActive:i,animationBegin:a,animationDuration:l,animationEasing:u,activeShape:f,inactiveShape:h,onAnimationStart:d,onAnimationEnd:m}=t,v=La(t,"recharts-pie-"),g=r.current,[S,_]=w.useState(!1),x=w.useCallback(()=>{typeof m=="function"&&m(),_(!1)},[m]),C=w.useCallback(()=>{typeof d=="function"&&d(),_(!0)},[d]);return w.createElement(Sse,{showLabels:!S,sectors:n},w.createElement(Ra,{animationId:v,begin:a,duration:l,isActive:i,easing:u,onAnimationStart:C,onAnimationEnd:x,key:v},A=>{var O=[],P=n&&n[0],D=P==null?void 0:P.startAngle;return n==null||n.forEach((k,R)=>{var N=g&&g[R],$=R>0?ba(k,"paddingAngle",0):0;if(N){var ee=je(N.endAngle-N.startAngle,k.endAngle-k.startAngle,A),F=Rt(Rt({},k),{},{startAngle:D+$,endAngle:D+ee+$});O.push(F),D=F.endAngle}else{var{endAngle:z,startAngle:j}=k,K=je(0,z-j,A),W=Rt(Rt({},k),{},{startAngle:D+$,endAngle:D+K+$});O.push(W),D=W.endAngle}}),r.current=O,w.createElement(Pe,null,w.createElement(_se,{sectors:O,activeShape:f,inactiveShape:h,allOtherPieProps:t}))}),w.createElement(yse,{showLabels:!S,sectors:n,props:t}),t.children)}var xse={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:!Nn.isSsr,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff"};function Cse(e){var{id:t}=e,r=px(e,rse),{hide:n,className:i,rootTabIndex:a}=e,l=w.useMemo(()=>kh(e.children,zo),[e.children]),u=he(d=>Oae(d,t,l)),f=w.useRef(null),h=Me("recharts-pie",i);return n||u==null?(f.current=null,w.createElement(Pe,{tabIndex:a,className:h})):w.createElement(w.Fragment,null,w.createElement(Bs,{fn:use,args:Rt(Rt({},e),{},{sectors:u})}),w.createElement(Pe,{tabIndex:a,className:h},w.createElement(wse,{props:Rt(Rt({},r),{},{sectors:u}),previousSectorsRef:f})))}function Sz(e){var t=jt(e,xse),{id:r}=t,n=px(t,nse),i=Et(n);return w.createElement(Cu,{id:r,type:"pie"},a=>w.createElement(w.Fragment,null,w.createElement(bz,{type:"pie",id:a,data:n.data,dataKey:n.dataKey,hide:n.hide,angleAxisId:0,radiusAxisId:0,name:n.name,nameKey:n.nameKey,tooltipType:n.tooltipType,legendType:n.legendType,fill:n.fill,cx:n.cx,cy:n.cy,startAngle:n.startAngle,endAngle:n.endAngle,paddingAngle:n.paddingAngle,minAngle:n.minAngle,innerRadius:n.innerRadius,outerRadius:n.outerRadius,cornerRadius:n.cornerRadius,presentationProps:i}),w.createElement(lse,Os({},n,{id:a})),w.createElement(Cse,Os({},n,{id:a}))))}Sz.displayName="Pie";function FM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function UM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FM(Object(r),!0).forEach(function(n){Ese(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ese(e,t,r){return(t=Ase(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ase(e){var t=Ose(e,"string");return typeof t=="symbol"?t:t+""}function Ose(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var kse={xAxis:{},yAxis:{},zAxis:{}},wz=In({name:"cartesianAxis",initialState:kse,reducers:{addXAxis(e,t){e.xAxis[t.payload.id]=t.payload},removeXAxis(e,t){delete e.xAxis[t.payload.id]},addYAxis(e,t){e.yAxis[t.payload.id]=t.payload},removeYAxis(e,t){delete e.yAxis[t.payload.id]},addZAxis(e,t){e.zAxis[t.payload.id]=t.payload},removeZAxis(e,t){delete e.zAxis[t.payload.id]},updateYAxisWidth(e,t){var{id:r,width:n}=t.payload;e.yAxis[r]&&(e.yAxis[r]=UM(UM({},e.yAxis[r]),{},{width:n}))}}}),{addXAxis:Pse,removeXAxis:Tse,addYAxis:Dse,removeYAxis:Mse,addZAxis:Rse,removeZAxis:Lse,updateYAxisWidth:Bse}=wz.actions,Nse=wz.reducer,Ise=X([ar],e=>{if(e)return{top:e.top,bottom:e.bottom,left:e.left,right:e.right}}),jse=X([Ise,Da,Ma],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),zse=e=>{var t=Tt();return he(r=>gn(r,"xAxis",e,t))},Hse=e=>{var t=Tt();return he(r=>gn(r,"yAxis",e,t))},Zh=()=>he(jse),Fse=()=>he(dre);function $M(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function KM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$M(Object(r),!0).forEach(function(n){Use(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$M(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Use(e,t,r){return(t=$se(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $se(e){var t=Kse(e,"string");return typeof t=="symbol"?t:t+""}function Kse(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qse=e=>{var{point:t,childIndex:r,mainColor:n,activeDot:i,dataKey:a}=e;if(i===!1||t.x==null||t.y==null)return null;var l=KM(KM({index:r,dataKey:a,cx:t.x,cy:t.y,r:4,fill:n??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},Ue(i,!1)),Iw(i)),u;return w.isValidElement(i)?u=w.cloneElement(i,l):typeof i=="function"?u=i(l):u=w.createElement(Su,l),w.createElement(Pe,{className:"recharts-active-dot"},u)};function Xp(e){var{points:t,mainColor:r,activeDot:n,itemDataKey:i}=e,a=he(Aa),l=Fse();if(t==null||l==null)return null;var u=t.find(f=>l.includes(f.payload));return at(u)?null:qse({point:u,childIndex:Number(a),mainColor:r,dataKey:i,activeDot:n})}function qM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Gp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qM(Object(r),!0).forEach(function(n){Wse(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Wse(e,t,r){return(t=Vse(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vse(e){var t=Yse(e,"string");return typeof t=="symbol"?t:t+""}function Yse(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xz=(e,t)=>wu(e,"radiusAxis",t),Xse=X([xz],e=>{if(e!=null)return{scale:e}}),Gse=X([Fh,xz],(e,t)=>{if(!(e==null||t==null))return Gp(Gp({},e),{},{scale:t})}),Zse=(e,t,r,n)=>xu(e,"radiusAxis",t,n),Cz=(e,t,r)=>fu(e,r),Ez=(e,t,r)=>wu(e,"angleAxis",r),Qse=X([Cz,Ez],(e,t)=>{if(!(e==null||t==null))return Gp(Gp({},e),{},{scale:t})}),Jse=(e,t,r,n)=>xu(e,"angleAxis",r,n),eoe=X([Cz,Ez,du],(e,t,r)=>{if(!(r==null||t==null))return{scale:t,type:e.type,dataKey:e.dataKey,cx:r.cx,cy:r.cy}}),toe=(e,t,r,n,i)=>i,roe=X([$e,Gse,Zse,Qse,Jse],(e,t,r,n,i)=>Ci(e,"radiusAxis")?wa(t,r,!1):wa(n,i,!1)),noe=X([ox,toe],(e,t)=>{if(e!=null){var r=e.find(n=>n.type==="radar"&&t===n.id);return r==null?void 0:r.dataKey}}),ioe=X([Xse,eoe,zh,noe,roe],(e,t,r,n,i)=>{var{chartData:a,dataStartIndex:l,dataEndIndex:u}=r;if(!(e==null||t==null||a==null||i==null||n==null)){var f=a.slice(l,u+1);return doe({radiusAxis:e,angleAxis:t,displayedData:f,dataKey:n,bandSize:i})}}),aoe=["id"];function soe(e,t){if(e==null)return{};var r,n,i=ooe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ooe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function WM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function jr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?WM(Object(r),!0).forEach(function(n){mx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):WM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mx(e,t,r){return(t=loe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function loe(e){var t=uoe(e,"string");return typeof t=="symbol"?t:t+""}function uoe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eu(){return eu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},eu.apply(null,arguments)}function vx(e,t){return e&&e!=="none"?e:t}var coe=e=>{var{dataKey:t,name:r,stroke:n,fill:i,legendType:a,hide:l}=e;return[{inactive:l,dataKey:t,type:a,color:vx(n,i),value:fi(r,t),payload:e}]};function hoe(e){var{dataKey:t,stroke:r,strokeWidth:n,fill:i,name:a,hide:l,tooltipType:u}=e;return{dataDefinedOnItem:void 0,positions:void 0,settings:{stroke:r,strokeWidth:n,fill:i,nameKey:void 0,dataKey:t,name:fi(a,t),hide:l,type:u,color:vx(r,i),unit:""}}}function foe(e,t){var r;return w.isValidElement(e)?r=w.cloneElement(e,t):typeof e=="function"?r=e(t):r=w.createElement(Su,eu({},t,{className:Me("recharts-radar-dot",typeof e!="boolean"?e.className:"")})),r}function doe(e){var{radiusAxis:t,angleAxis:r,displayedData:n,dataKey:i,bandSize:a}=e,{cx:l,cy:u}=r,f=!1,h=[],d=r.type!=="number"?a??0:0;n.forEach((v,g)=>{var S=Fe(v,r.dataKey,g),_=Fe(v,i),x=r.scale(S)+d,C=Array.isArray(_)?tz(_):_,A=at(C)?void 0:t.scale(C);Array.isArray(_)&&_.length>=2&&(f=!0),h.push(jr(jr({},lt(l,u,A,x)),{},{name:S,value:_,cx:l,cy:u,radius:A,angle:x,payload:v}))});var m=[];return f&&h.forEach(v=>{if(Array.isArray(v.value)){var g=v.value[0],S=at(g)?void 0:t.scale(g);m.push(jr(jr({},v),{},{radius:S},lt(l,u,S,v.angle)))}else m.push(v)}),{points:h,isRange:f,baseLinePoints:m}}function poe(e){var{points:t,props:r}=e,{dot:n,dataKey:i}=r;if(!n)return null;var{id:a}=r,l=soe(r,aoe),u=Et(l),f=Ue(n,!0),h=t.map((d,m)=>{var v=jr(jr(jr({key:"dot-".concat(m),r:3},u),f),{},{dataKey:i,cx:d.x,cy:d.y,index:m,payload:d});return foe(n,v)});return w.createElement(Pe,{className:"recharts-radar-dots"},h)}function moe(e){var{showLabels:t,points:r,children:n}=e,i=r.map(a=>{var l={x:a.x,y:a.y,width:0,height:0};return jr(jr({},l),{},{value:a.value,payload:a.payload,parentViewBox:void 0,viewBox:l,fill:void 0})});return w.createElement(bu,{value:t?i:null},n)}function voe(e){var{points:t,baseLinePoints:r,props:n}=e;if(t==null)return null;var{shape:i,isRange:a,connectNulls:l}=n,u=d=>{var{onMouseEnter:m}=n;m&&m(n,d)},f=d=>{var{onMouseLeave:m}=n;m&&m(n,d)},h;return w.isValidElement(i)?h=w.cloneElement(i,jr(jr({},n),{},{points:t})):typeof i=="function"?h=i(jr(jr({},n),{},{points:t})):h=w.createElement(sx,eu({},Ue(n,!0),{onMouseEnter:u,onMouseLeave:f,points:t,baseLinePoints:a?r:null,connectNulls:l})),w.createElement(Pe,{className:"recharts-radar-polygon"},h,w.createElement(poe,{props:n,points:t}))}var VM=(e,t,r)=>(n,i)=>{var a=e&&e[Math.floor(i*t)];return a?jr(jr({},n),{},{x:je(a.x,n.x,r),y:je(a.y,n.y,r)}):jr(jr({},n),{},{x:je(n.cx,n.x,r),y:je(n.cy,n.y,r)})};function goe(e){var{props:t,previousPointsRef:r,previousBaseLinePointsRef:n}=e,{points:i,baseLinePoints:a,isAnimationActive:l,animationBegin:u,animationDuration:f,animationEasing:h,onAnimationEnd:d,onAnimationStart:m}=t,v=r.current,g=n.current,S=v&&v.length/i.length,_=g&&g.length/a.length,x=La(t,"recharts-radar-"),[C,A]=w.useState(!1),O=!C,P=w.useCallback(()=>{typeof d=="function"&&d(),A(!1)},[d]),D=w.useCallback(()=>{typeof m=="function"&&m(),A(!0)},[m]);return w.createElement(moe,{showLabels:O,points:i},w.createElement(Ra,{animationId:x,begin:u,duration:f,isActive:l,easing:h,key:"radar-".concat(x),onAnimationEnd:P,onAnimationStart:D},k=>{var R=k===1?i:i.map(VM(v,S,k)),N=k===1?a:a==null?void 0:a.map(VM(g,_,k));return k>0&&(r.current=R,n.current=N),w.createElement(voe,{points:R,baseLinePoints:N,props:t})}),w.createElement(Ho,{label:t.label}),t.children)}function yoe(e){var t=w.useRef(void 0),r=w.useRef(void 0);return w.createElement(goe,{props:e,previousPointsRef:t,previousBaseLinePointsRef:r})}var _oe={angleAxisId:0,radiusAxisId:0,hide:!1,activeDot:!0,dot:!1,legendType:"rect",isAnimationActive:!Nn.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"};class boe extends w.PureComponent{render(){var{hide:t,className:r,points:n}=this.props;if(t||n==null)return null;var i=Me("recharts-radar",r);return w.createElement(w.Fragment,null,w.createElement(Pe,{className:i},w.createElement(yoe,this.props)),w.createElement(Xp,{points:n,mainColor:vx(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot}))}}function Soe(e){var t=Tt(),r=he(n=>ioe(n,e.radiusAxisId,e.angleAxisId,t,e.id));return w.createElement(boe,eu({},e,{points:r==null?void 0:r.points,baseLinePoints:r==null?void 0:r.baseLinePoints,isRange:r==null?void 0:r.isRange}))}class gx extends w.PureComponent{render(){return w.createElement(Cu,{id:this.props.id,type:"radar"},t=>w.createElement(w.Fragment,null,w.createElement(bz,{type:"radar",id:t,data:void 0,dataKey:this.props.dataKey,hide:this.props.hide,angleAxisId:this.props.angleAxisId,radiusAxisId:this.props.radiusAxisId}),w.createElement(gz,{legendPayload:coe(this.props)}),w.createElement(Bs,{fn:hoe,args:this.props}),w.createElement(Soe,eu({},this.props,{id:t}))))}}mx(gx,"displayName","Radar");mx(gx,"defaultProps",_oe);var woe="Invariant failed";function xoe(e,t){throw new Error(woe)}var Coe=["x","y"];function XS(){return XS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},XS.apply(null,arguments)}function YM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Hc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?YM(Object(r),!0).forEach(function(n){Eoe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Eoe(e,t,r){return(t=Aoe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Aoe(e){var t=Ooe(e,"string");return typeof t=="symbol"?t:t+""}function Ooe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function koe(e,t){if(e==null)return{};var r,n,i=Poe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Poe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Toe(e,t){var{x:r,y:n}=e,i=koe(e,Coe),a="".concat(r),l=parseInt(a,10),u="".concat(n),f=parseInt(u,10),h="".concat(t.height||i.height),d=parseInt(h,10),m="".concat(t.width||i.width),v=parseInt(m,10);return Hc(Hc(Hc(Hc(Hc({},t),i),l?{x:l}:{}),f?{y:f}:{}),{},{height:d,width:v,name:t.name,radius:t.radius})}function yx(e){return w.createElement(yh,XS({shapeType:"rectangle",propTransformer:Toe,activeClassName:"recharts-active-bar"},e))}var Doe=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(n,i)=>{if(ye(t))return t;var a=ye(n)||at(n);return a?t(n,i):(a||xoe(),r)}},Moe={},Az=In({name:"errorBars",initialState:Moe,reducers:{addErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]||(e[r]=[]),e[r].push(n)},replaceErrorBar:(e,t)=>{var{itemId:r,prev:n,next:i}=t.payload;e[r]&&(e[r]=e[r].map(a=>a.dataKey===n.dataKey&&a.direction===n.direction?i:a))},removeErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]&&(e[r]=e[r].filter(i=>i.dataKey!==n.dataKey||i.direction!==n.direction))}}}),{addErrorBar:Roe,replaceErrorBar:Loe,removeErrorBar:Boe}=Az.actions,Noe=Az.reducer,Ioe=["children"];function joe(e,t){if(e==null)return{};var r,n,i=zoe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function zoe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Hoe={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},Oz=w.createContext(Hoe);function _x(e){var{children:t}=e,r=joe(e,Ioe);return w.createElement(Oz.Provider,{value:r},t)}var Foe=()=>w.useContext(Oz);function Uoe(e){var t=Je(),r=Vae(),n=w.useRef(null);return w.useEffect(()=>{r!=null&&(n.current===null?t(Roe({itemId:r,errorBar:e})):n.current!==e&&t(Loe({itemId:r,prev:n.current,next:e})),n.current=e)},[t,r,e]),w.useEffect(()=>()=>{n.current!=null&&(t(Boe({itemId:r,errorBar:n.current})),n.current=null)},[t,r]),null}function Qh(e,t){var r,n,i=he(h=>Na(h,e)),a=he(h=>Ia(h,t)),l=(r=i==null?void 0:i.allowDataOverflow)!==null&&r!==void 0?r:Tn.allowDataOverflow,u=(n=a==null?void 0:a.allowDataOverflow)!==null&&n!==void 0?n:Dn.allowDataOverflow,f=l||u;return{needClip:f,needClipX:l,needClipY:u}}function uv(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,i=Zh(),{needClipX:a,needClipY:l,needClip:u}=Qh(t,r);if(!u)return null;var{x:f,y:h,width:d,height:m}=i;return w.createElement("clipPath",{id:"clipPath-".concat(n)},w.createElement("rect",{x:a?f:f-d/2,y:l?h:h-m/2,width:a?d:d*2,height:l?m:m*2}))}var $oe=["onMouseEnter","onMouseLeave","onClick"],Koe=["value","background","tooltipPosition"],qoe=["id"],Woe=["onMouseEnter","onClick","onMouseLeave"];function ks(){return ks=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ks.apply(null,arguments)}function XM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Jr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?XM(Object(r),!0).forEach(function(n){Voe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Voe(e,t,r){return(t=Yoe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yoe(e){var t=Xoe(e,"string");return typeof t=="symbol"?t:t+""}function Xoe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Zp(e,t){if(e==null)return{};var r,n,i=Goe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Goe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Zoe=e=>{var{dataKey:t,name:r,fill:n,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:n,value:fi(r,t),payload:e}]};function Qoe(e){var{dataKey:t,stroke:r,strokeWidth:n,fill:i,name:a,hide:l,unit:u}=e;return{dataDefinedOnItem:void 0,positions:void 0,settings:{stroke:r,strokeWidth:n,fill:i,dataKey:t,nameKey:void 0,name:fi(a,t),hide:l,type:e.tooltipType,color:e.fill,unit:u}}}function Joe(e){var t=he(Aa),{data:r,dataKey:n,background:i,allOtherBarProps:a}=e,{onMouseEnter:l,onMouseLeave:u,onClick:f}=a,h=Zp(a,$oe),d=Yh(l,n),m=Xh(u),v=Gh(f,n);if(!i||r==null)return null;var g=Ue(i,!1);return w.createElement(w.Fragment,null,r.map((S,_)=>{var{value:x,background:C,tooltipPosition:A}=S,O=Zp(S,Koe);if(!C)return null;var P=d(S,_),D=m(S,_),k=v(S,_),R=Jr(Jr(Jr(Jr(Jr({option:i,isActive:String(_)===t},O),{},{fill:"#eee"},C),g),Ta(h,S,_)),{},{onMouseEnter:P,onMouseLeave:D,onClick:k,dataKey:n,index:_,className:"recharts-bar-background-rectangle"});return w.createElement(yx,ks({key:"background-bar-".concat(_)},R))}))}function ele(e){var{showLabels:t,children:r,rects:n}=e,i=n==null?void 0:n.map(a=>{var l={x:a.x,y:a.y,width:a.width,height:a.height};return Jr(Jr({},l),{},{value:a.value,payload:a.payload,parentViewBox:a.parentViewBox,viewBox:l,fill:a.fill})});return w.createElement(bu,{value:t?i:void 0},r)}function tle(e){var{shape:t,activeBar:r,baseProps:n,entry:i,index:a,dataKey:l}=e,u=he(Aa),f=he(Bj),h=r&&String(a)===u&&(f==null||l===f),d=h?r:t;return w.createElement(yx,ks({},n,i,{isActive:h,option:d,index:a,dataKey:l}))}function rle(e){var{shape:t,baseProps:r,entry:n,index:i,dataKey:a}=e;return w.createElement(yx,ks({},r,n,{isActive:!1,option:t,index:i,dataKey:a}))}function nle(e){var{data:t,props:r}=e,n=Et(r),{id:i}=n,a=Zp(n,qoe),{shape:l,dataKey:u,activeBar:f}=r,{onMouseEnter:h,onClick:d,onMouseLeave:m}=r,v=Zp(r,Woe),g=Yh(h,u),S=Xh(m),_=Gh(d,u);return t?w.createElement(w.Fragment,null,t.map((x,C)=>w.createElement(Pe,ks({className:"recharts-bar-rectangle"},Ta(v,x,C),{onMouseEnter:g(x,C),onMouseLeave:S(x,C),onClick:_(x,C),key:"rectangle-".concat(x==null?void 0:x.x,"-").concat(x==null?void 0:x.y,"-").concat(x==null?void 0:x.value,"-").concat(C)}),f?w.createElement(tle,{shape:l,activeBar:f,baseProps:a,entry:x,index:C,dataKey:u}):w.createElement(rle,{shape:l,baseProps:a,entry:x,index:C,dataKey:u})))):null}function ile(e){var{props:t,previousRectanglesRef:r}=e,{data:n,layout:i,isAnimationActive:a,animationBegin:l,animationDuration:u,animationEasing:f,onAnimationEnd:h,onAnimationStart:d}=t,m=r.current,v=La(t,"recharts-bar-"),[g,S]=w.useState(!1),_=!g,x=w.useCallback(()=>{typeof h=="function"&&h(),S(!1)},[h]),C=w.useCallback(()=>{typeof d=="function"&&d(),S(!0)},[d]);return w.createElement(ele,{showLabels:_,rects:n},w.createElement(Ra,{animationId:v,begin:l,duration:u,isActive:a,easing:f,onAnimationEnd:x,onAnimationStart:C,key:v},A=>{var O=A===1?n:n==null?void 0:n.map((P,D)=>{var k=m&&m[D];if(k)return Jr(Jr({},P),{},{x:je(k.x,P.x,A),y:je(k.y,P.y,A),width:je(k.width,P.width,A),height:je(k.height,P.height,A)});if(i==="horizontal"){var R=je(0,P.height,A);return Jr(Jr({},P),{},{y:P.y+P.height-R,height:R})}var N=je(0,P.width,A);return Jr(Jr({},P),{},{width:N})});return A>0&&(r.current=O??null),O==null?null:w.createElement(Pe,null,w.createElement(nle,{props:t,data:O}))}),w.createElement(Ho,{label:t.label}),t.children)}function ale(e){var t=w.useRef(null);return w.createElement(ile,{previousRectanglesRef:t,props:e})}var kz=0,sle=(e,t)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:Fe(e,t)}};class ole extends w.PureComponent{render(){var{hide:t,data:r,dataKey:n,className:i,xAxisId:a,yAxisId:l,needClip:u,background:f,id:h}=this.props;if(t||r==null)return null;var d=Me("recharts-bar",i),m=h;return w.createElement(Pe,{className:d,id:h},u&&w.createElement("defs",null,w.createElement(uv,{clipPathId:m,xAxisId:a,yAxisId:l})),w.createElement(Pe,{className:"recharts-bar-rectangles",clipPath:u?"url(#clipPath-".concat(m,")"):void 0},w.createElement(Joe,{data:r,dataKey:n,background:f,allOtherBarProps:this.props}),w.createElement(ale,this.props)))}}var lle={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",hide:!1,isAnimationActive:!Nn.isSsr,legendType:"rect",minPointSize:kz,xAxisId:0,yAxisId:0};function ule(e){var{xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:a,activeBar:l,animationBegin:u,animationDuration:f,animationEasing:h,isAnimationActive:d}=e,{needClip:m}=Qh(t,r),v=ou(),g=Tt(),S=kh(e.children,zo),_=he(A=>Nle(A,t,r,g,e.id,S));if(v!=="vertical"&&v!=="horizontal")return null;var x,C=_==null?void 0:_[0];return C==null||C.height==null||C.width==null?x=0:x=v==="vertical"?C.height/2:C.width/2,w.createElement(_x,{xAxisId:t,yAxisId:r,data:_,dataPointFormatter:sle,errorBarOffset:x},w.createElement(ole,ks({},e,{layout:v,needClip:m,data:_,xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:a,activeBar:l,animationBegin:u,animationDuration:f,animationEasing:h,isAnimationActive:d})))}function cle(e){var{layout:t,barSettings:{dataKey:r,minPointSize:n},pos:i,bandSize:a,xAxis:l,yAxis:u,xAxisTicks:f,yAxisTicks:h,stackedData:d,displayedData:m,offset:v,cells:g,parentViewBox:S}=e,_=t==="horizontal"?u:l,x=d?_.scale.domain():null,C=WX({numericAxis:_});return m.map((A,O)=>{var P,D,k,R,N,$;d?P=FX(d[O],x):(P=Fe(A,r),Array.isArray(P)||(P=[C,P]));var ee=Doe(n,kz)(P[1],O);if(t==="horizontal"){var F,[z,j]=[u.scale(P[0]),u.scale(P[1])];D=_T({axis:l,ticks:f,bandSize:a,offset:i.offset,entry:A,index:O}),k=(F=j??z)!==null&&F!==void 0?F:void 0,R=i.size;var K=z-j;if(N=Er(K)?0:K,$={x:D,y:v.top,width:R,height:v.height},Math.abs(ee)>0&&Math.abs(N)<Math.abs(ee)){var W=xr(N||ee)*(Math.abs(ee)-Math.abs(N));k-=W,N+=W}}else{var[B,q]=[l.scale(P[0]),l.scale(P[1])];if(D=B,k=_T({axis:u,ticks:h,bandSize:a,offset:i.offset,entry:A,index:O}),R=q-B,N=i.size,$={x:v.left,y:k,width:v.width,height:N},Math.abs(ee)>0&&Math.abs(R)<Math.abs(ee)){var G=xr(R||ee)*(Math.abs(ee)-Math.abs(R));R+=G}}if(D==null||k==null||R==null||N==null)return null;var ce=Jr(Jr({},A),{},{x:D,y:k,width:R,height:N,value:d?P:P[1],payload:A,background:$,tooltipPosition:{x:D+R/2,y:k+N/2},parentViewBox:S},g&&g[O]&&g[O].props);return ce}).filter(Boolean)}function Pz(e){var t=jt(e,lle),r=Tt();return w.createElement(Cu,{id:t.id,type:"bar"},n=>w.createElement(w.Fragment,null,w.createElement(ov,{legendPayload:Zoe(t)}),w.createElement(Bs,{fn:Qoe,args:t}),w.createElement(lv,{type:"bar",id:n,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:S3(t.stackId),hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:r}),w.createElement(ule,ks({},t,{id:n}))))}Pz.displayName="Bar";function GM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GM(Object(r),!0).forEach(function(n){hle(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hle(e,t,r){return(t=fle(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fle(e){var t=dle(e,"string");return typeof t=="symbol"?t:t+""}function dle(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ple=(e,t)=>t,mle=(e,t,r)=>r,vle=(e,t,r,n)=>n,gle=(e,t,r,n,i)=>i,Jh=X([vu,gle],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),yle=X([Jh],e=>e==null?void 0:e.maxBarSize),_le=(e,t,r,n,i,a)=>a,ZM=(e,t,r)=>{var n=r??e;if(!at(n))return Vr(n,t,0)},ble=X([$e,vu,ple,mle,vle],(e,t,r,n,i)=>t.filter(a=>e==="horizontal"?a.xAxisId===r:a.yAxisId===n).filter(a=>a.isPanorama===i).filter(a=>a.hide===!1).filter(a=>a.type==="bar")),Sle=(e,t,r,n)=>{var i=$e(e);return i==="horizontal"?vh(e,"yAxis",r,n):vh(e,"xAxis",t,n)},wle=(e,t,r)=>{var n=$e(e);return n==="horizontal"?ND(e,"xAxis",t):ND(e,"yAxis",r)},xle=(e,t,r)=>{var n={},i=e.filter(Wm),a=e.filter(h=>h.stackId==null),l=i.reduce((h,d)=>(h[d.stackId]||(h[d.stackId]=[]),h[d.stackId].push(d),h),n),u=Object.entries(l).map(h=>{var[d,m]=h,v=m.map(S=>S.dataKey),g=ZM(t,r,m[0].barSize);return{stackId:d,dataKeys:v,barSize:g}}),f=a.map(h=>{var d=[h.dataKey].filter(v=>v!=null),m=ZM(t,r,h.barSize);return{stackId:void 0,dataKeys:d,barSize:m}});return[...u,...f]},Cle=X([ble,Eee,wle],xle),Ele=(e,t,r,n,i)=>{var a,l,u=Jh(e,t,r,n,i);if(u!=null){var f=$e(e),h=RI(e),{maxBarSize:d}=u,m=at(d)?h:d,v,g;return f==="horizontal"?(v=gn(e,"xAxis",t,n),g=hi(e,"xAxis",t,n)):(v=gn(e,"yAxis",r,n),g=hi(e,"yAxis",r,n)),(a=(l=wa(v,g,!0))!==null&&l!==void 0?l:m)!==null&&a!==void 0?a:0}},Tz=(e,t,r,n)=>{var i=$e(e),a,l;return i==="horizontal"?(a=gn(e,"xAxis",t,n),l=hi(e,"xAxis",t,n)):(a=gn(e,"yAxis",r,n),l=hi(e,"yAxis",r,n)),wa(a,l)};function Ale(e,t,r,n,i){var a=n.length;if(!(a<1)){var l=Vr(e,r,0,!0),u,f=[];if(zr(n[0].barSize)){var h=!1,d=r/a,m=n.reduce((C,A)=>C+(A.barSize||0),0);m+=(a-1)*l,m>=r&&(m-=(a-1)*l,l=0),m>=r&&d>0&&(h=!0,d*=.9,m=a*d);var v=(r-m)/2>>0,g={offset:v-l,size:0};u=n.reduce((C,A)=>{var O,P={stackId:A.stackId,dataKeys:A.dataKeys,position:{offset:g.offset+g.size+l,size:h?d:(O=A.barSize)!==null&&O!==void 0?O:0}},D=[...C,P];return g=D[D.length-1].position,D},f)}else{var S=Vr(t,r,0,!0);r-2*S-(a-1)*l<=0&&(l=0);var _=(r-2*S-(a-1)*l)/a;_>1&&(_>>=0);var x=zr(i)?Math.min(_,i):_;u=n.reduce((C,A,O)=>[...C,{stackId:A.stackId,dataKeys:A.dataKeys,position:{offset:S+(_+l)*O+(_-x)/2,size:x}}],f)}return u}}var Ole=(e,t,r,n,i,a,l)=>{var u=at(l)?t:l,f=Ale(r,n,i!==a?i:a,e,u);return i!==a&&f!=null&&(f=f.map(h=>qd(qd({},h),{},{position:qd(qd({},h.position),{},{offset:h.position.offset-i/2})}))),f},kle=X([Cle,RI,Cee,LI,Ele,Tz,yle],Ole),Ple=(e,t,r,n)=>gn(e,"xAxis",t,n),Tle=(e,t,r,n)=>gn(e,"yAxis",r,n),Dle=(e,t,r,n)=>hi(e,"xAxis",t,n),Mle=(e,t,r,n)=>hi(e,"yAxis",r,n),Rle=X([kle,Jh],(e,t)=>{if(!(e==null||t==null)){var r=e.find(n=>n.stackId===t.stackId&&t.dataKey!=null&&n.dataKeys.includes(t.dataKey));if(r!=null)return r.position}}),Lle=(e,t)=>{var r=qm(t);if(!(!e||r==null||t==null)){var{stackId:n}=t;if(n!=null){var i=e[n];if(i){var{stackedData:a}=i;if(a)return a.find(l=>l.key===r)}}}},Ble=X([Sle,Jh],Lle),Nle=X([ar,Jw,Ple,Tle,Dle,Mle,Rle,$e,uu,Tz,Ble,Jh,_le],(e,t,r,n,i,a,l,u,f,h,d,m,v)=>{var{chartData:g,dataStartIndex:S,dataEndIndex:_}=f;if(!(m==null||l==null||t==null||u!=="horizontal"&&u!=="vertical"||r==null||n==null||i==null||a==null||h==null)){var{data:x}=m,C;if(x!=null&&x.length>0?C=x:C=g==null?void 0:g.slice(S,_+1),C!=null)return cle({layout:u,barSettings:m,pos:l,parentViewBox:t,bandSize:h,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:a,stackedData:d,displayedData:C,offset:e,cells:v})}});function QM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function JM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?QM(Object(r),!0).forEach(function(n){Ile(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ile(e,t,r){return(t=jle(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jle(e){var t=zle(e,"string");return typeof t=="symbol"?t:t+""}function zle(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Hle=["Webkit","Moz","O","ms"],Fle=(e,t)=>{var r=e.replace(/(\w)/,i=>i.toUpperCase()),n=Hle.reduce((i,a)=>JM(JM({},i),{},{[a+r]:t}),{});return n[e]=t,n},Dz=e=>{var{chartData:t}=e,r=Je(),n=Tt();return w.useEffect(()=>n?()=>{}:(r(qD(t)),()=>{r(qD(void 0))}),[t,r,n]),null},Ule=e=>e.chartData.chartData,$le=()=>he(Ule),Kle=e=>{var{dataStartIndex:t,dataEndIndex:r}=e.chartData;return{startIndex:t,endIndex:r}},qle=()=>he(Kle),Wle=w.createContext(()=>{}),eR={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},Mz=In({name:"brush",initialState:eR,reducers:{setBrushSettings(e,t){return t.payload==null?eR:t.payload}}}),{setBrushSettings:tR}=Mz.actions,Vle=Mz.reducer;function _h(){return _h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_h.apply(null,arguments)}function rR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ho(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rR(Object(r),!0).forEach(function(n){ha(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ha(e,t,r){return(t=Yle(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yle(e){var t=Xle(e,"string");return typeof t=="symbol"?t:t+""}function Xle(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gle(e){var{x:t,y:r,width:n,height:i,stroke:a}=e,l=Math.floor(r+i/2)-1;return w.createElement(w.Fragment,null,w.createElement("rect",{x:t,y:r,width:n,height:i,fill:a,stroke:"none"}),w.createElement("line",{x1:t+1,y1:l,x2:t+n-1,y2:l,fill:"none",stroke:"#fff"}),w.createElement("line",{x1:t+1,y1:l+2,x2:t+n-1,y2:l+2,fill:"none",stroke:"#fff"}))}function Zle(e){var{travellerProps:t,travellerType:r}=e;return w.isValidElement(r)?w.cloneElement(r,t):typeof r=="function"?r(t):w.createElement(Gle,t)}function nR(e){var t,r,{otherProps:n,travellerX:i,id:a,onMouseEnter:l,onMouseLeave:u,onMouseDown:f,onTouchStart:h,onTravellerMoveKeyboard:d,onFocus:m,onBlur:v}=e,{y:g,x:S,travellerWidth:_,height:x,traveller:C,ariaLabel:A,data:O,startIndex:P,endIndex:D}=n,k=Math.max(i,S),R=ho(ho({},Et(n)),{},{x:k,y:g,width:_,height:x}),N=A||"Min value: ".concat((t=O[P])===null||t===void 0?void 0:t.name,", Max value: ").concat((r=O[D])===null||r===void 0?void 0:r.name);return w.createElement(Pe,{tabIndex:0,role:"slider","aria-label":N,"aria-valuenow":i,className:"recharts-brush-traveller",onMouseEnter:l,onMouseLeave:u,onMouseDown:f,onTouchStart:h,onKeyDown:$=>{["ArrowLeft","ArrowRight"].includes($.key)&&($.preventDefault(),$.stopPropagation(),d($.key==="ArrowRight"?1:-1,a))},onFocus:m,onBlur:v,style:{cursor:"col-resize"}},w.createElement(Zle,{travellerType:C,travellerProps:R}))}function iR(e){var{index:t,data:r,tickFormatter:n,dataKey:i}=e,a=Fe(r[t],i,t);return typeof n=="function"?n(a,t):a}function aR(e,t){for(var r=e.length,n=0,i=r-1;i-n>1;){var a=Math.floor((n+i)/2);e[a]>t?i=a:n=a}return t>=e[i]?i:n}function Wb(e){var{startX:t,endX:r,scaleValues:n,gap:i,data:a}=e,l=a.length-1,u=Math.min(t,r),f=Math.max(t,r),h=aR(n,u),d=aR(n,f);return{startIndex:h-h%i,endIndex:d===l?l:d-d%i}}function Qle(e){var{x:t,y:r,width:n,height:i,fill:a,stroke:l}=e;return w.createElement("rect",{stroke:l,fill:a,x:t,y:r,width:n,height:i})}function Jle(e){var{startIndex:t,endIndex:r,y:n,height:i,travellerWidth:a,stroke:l,tickFormatter:u,dataKey:f,data:h,startX:d,endX:m}=e,v=5,g={pointerEvents:"none",fill:l};return w.createElement(Pe,{className:"recharts-brush-texts"},w.createElement(As,_h({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,m)-v,y:n+i/2},g),iR({index:t,tickFormatter:u,dataKey:f,data:h})),w.createElement(As,_h({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,m)+a+v,y:n+i/2},g),iR({index:r,tickFormatter:u,dataKey:f,data:h})))}function eue(e){var{y:t,height:r,stroke:n,travellerWidth:i,startX:a,endX:l,onMouseEnter:u,onMouseLeave:f,onMouseDown:h,onTouchStart:d}=e,m=Math.min(a,l)+i,v=Math.max(Math.abs(l-a)-i,0);return w.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:u,onMouseLeave:f,onMouseDown:h,onTouchStart:d,style:{cursor:"move"},stroke:"none",fill:n,fillOpacity:.2,x:m,y:t,width:v,height:r})}function tue(e){var{x:t,y:r,width:n,height:i,data:a,children:l,padding:u}=e,f=w.Children.count(l)===1;if(!f)return null;var h=w.Children.only(l);return h?w.cloneElement(h,{x:t,y:r,width:n,height:i,margin:u,compact:!0,data:a}):null}var rue=e=>{var{data:t,startIndex:r,endIndex:n,x:i,width:a,travellerWidth:l}=e;if(!t||!t.length)return{};var u=t.length,f=U3().domain(i1(0,u)).range([i,i+a-l]),h=f.domain().map(d=>f(d));return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:f(r),endX:f(n),scale:f,scaleValues:h}},sR=e=>e.changedTouches&&!!e.changedTouches.length;class nue extends w.PureComponent{constructor(t){super(t),ha(this,"handleDrag",r=>{this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.state.isTravellerMoving?this.handleTravellerMove(r):this.state.isSlideMoving&&this.handleSlideDrag(r)}),ha(this,"handleTouchMove",r=>{r.changedTouches!=null&&r.changedTouches.length>0&&this.handleDrag(r.changedTouches[0])}),ha(this,"handleDragEnd",()=>{this.setState({isTravellerMoving:!1,isSlideMoving:!1},()=>{var{endIndex:r,onDragEnd:n,startIndex:i}=this.props;n==null||n({endIndex:r,startIndex:i})}),this.detachDragEndListener()}),ha(this,"handleLeaveWrapper",()=>{(this.state.isTravellerMoving||this.state.isSlideMoving)&&(this.leaveTimer=window.setTimeout(this.handleDragEnd,this.props.leaveTimeOut))}),ha(this,"handleEnterSlideOrTraveller",()=>{this.setState({isTextActive:!0})}),ha(this,"handleLeaveSlideOrTraveller",()=>{this.setState({isTextActive:!1})}),ha(this,"handleSlideDragStart",r=>{var n=sR(r)?r.changedTouches[0]:r;this.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:n.pageX}),this.attachDragEndListener()}),ha(this,"handleTravellerMoveKeyboard",(r,n)=>{var{data:i,gap:a,startIndex:l,endIndex:u}=this.props,{scaleValues:f,startX:h,endX:d}=this.state;if(f!=null){var m=-1;if(n==="startX"?m=l:n==="endX"&&(m=u),!(m<0||m>=i.length)){var v=m+r;if(!(v===-1||v>=f.length)){var g=f[v];n==="startX"&&g>=d||n==="endX"&&g<=h||this.setState({[n]:g},()=>{this.props.onChange(Wb({startX:this.state.startX,endX:this.state.endX,data:i,gap:a,scaleValues:f}))})}}}}),this.travellerDragStartHandlers={startX:this.handleTravellerDragStart.bind(this,"startX"),endX:this.handleTravellerDragStart.bind(this,"endX")},this.state={brushMoveStartX:0,movingTravellerId:void 0,endX:0,startX:0,slideMoveStartX:0}}static getDerivedStateFromProps(t,r){var{data:n,width:i,x:a,travellerWidth:l,startIndex:u,endIndex:f,startIndexControlledFromProps:h,endIndexControlledFromProps:d}=t;if(n!==r.prevData)return ho({prevData:n,prevTravellerWidth:l,prevX:a,prevWidth:i},n&&n.length?rue({data:n,width:i,x:a,travellerWidth:l,startIndex:u,endIndex:f}):{scale:void 0,scaleValues:void 0});var m=r.scale;if(m&&(i!==r.prevWidth||a!==r.prevX||l!==r.prevTravellerWidth)){m.range([a,a+i-l]);var v=m.domain().map(g=>m(g)).filter(Boolean);return{prevData:n,prevTravellerWidth:l,prevX:a,prevWidth:i,startX:m(t.startIndex),endX:m(t.endIndex),scaleValues:v}}if(r.scale&&!r.isSlideMoving&&!r.isTravellerMoving&&!r.isTravellerFocused&&!r.isTextActive){if(h!=null&&r.prevStartIndexControlledFromProps!==h)return{startX:r.scale(h),prevStartIndexControlledFromProps:h};if(d!=null&&r.prevEndIndexControlledFromProps!==d)return{endX:r.scale(d),prevEndIndexControlledFromProps:d}}return null}componentWillUnmount(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}attachDragEndListener(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}detachDragEndListener(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}handleSlideDrag(t){var{slideMoveStartX:r,startX:n,endX:i,scaleValues:a}=this.state;if(a!=null){var{x:l,width:u,travellerWidth:f,startIndex:h,endIndex:d,onChange:m,data:v,gap:g}=this.props,S=t.pageX-r;S>0?S=Math.min(S,l+u-f-i,l+u-f-n):S<0&&(S=Math.max(S,l-n,l-i));var _=Wb({startX:n+S,endX:i+S,data:v,gap:g,scaleValues:a});(_.startIndex!==h||_.endIndex!==d)&&m&&m(_),this.setState({startX:n+S,endX:i+S,slideMoveStartX:t.pageX})}}handleTravellerDragStart(t,r){var n=sR(r)?r.changedTouches[0]:r;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:t,brushMoveStartX:n.pageX}),this.attachDragEndListener()}handleTravellerMove(t){var{brushMoveStartX:r,movingTravellerId:n,endX:i,startX:a,scaleValues:l}=this.state;if(n!=null){var u=this.state[n],{x:f,width:h,travellerWidth:d,onChange:m,gap:v,data:g}=this.props,S={startX:this.state.startX,endX:this.state.endX,data:g,gap:v,scaleValues:l},_=t.pageX-r;_>0?_=Math.min(_,f+h-d-u):_<0&&(_=Math.max(_,f-u)),S[n]=u+_;var x=Wb(S),{startIndex:C,endIndex:A}=x,O=()=>{var P=g.length-1;return n==="startX"&&(i>a?C%v===0:A%v===0)||i<a&&A===P||n==="endX"&&(i>a?A%v===0:C%v===0)||i>a&&A===P};this.setState({[n]:u+_,brushMoveStartX:t.pageX},()=>{m&&O()&&m(x)})}}render(){var{data:t,className:r,children:n,x:i,y:a,dy:l,width:u,height:f,alwaysShowText:h,fill:d,stroke:m,startIndex:v,endIndex:g,travellerWidth:S,tickFormatter:_,dataKey:x,padding:C}=this.props,{startX:A,endX:O,isTextActive:P,isSlideMoving:D,isTravellerMoving:k,isTravellerFocused:R}=this.state;if(!t||!t.length||!ye(i)||!ye(a)||!ye(u)||!ye(f)||u<=0||f<=0)return null;var N=Me("recharts-brush",r),$=Fle("userSelect","none"),ee=a+(l??0);return w.createElement(Pe,{className:N,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:$},w.createElement(Qle,{x:i,y:ee,width:u,height:f,fill:d,stroke:m}),w.createElement(cG,null,w.createElement(tue,{x:i,y:ee,width:u,height:f,data:t,padding:C},n)),w.createElement(eue,{y:ee,height:f,stroke:m,travellerWidth:S,startX:A,endX:O,onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart}),w.createElement(nR,{travellerX:A,id:"startX",otherProps:ho(ho({},this.props),{},{y:ee}),onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers.startX,onTouchStart:this.travellerDragStartHandlers.startX,onTravellerMoveKeyboard:this.handleTravellerMoveKeyboard,onFocus:()=>{this.setState({isTravellerFocused:!0})},onBlur:()=>{this.setState({isTravellerFocused:!1})}}),w.createElement(nR,{travellerX:O,id:"endX",otherProps:ho(ho({},this.props),{},{y:ee}),onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers.endX,onTouchStart:this.travellerDragStartHandlers.endX,onTravellerMoveKeyboard:this.handleTravellerMoveKeyboard,onFocus:()=>{this.setState({isTravellerFocused:!0})},onBlur:()=>{this.setState({isTravellerFocused:!1})}}),(P||D||k||R||h)&&w.createElement(Jle,{startIndex:v,endIndex:g,y:ee,height:f,travellerWidth:S,stroke:m,tickFormatter:_,dataKey:x,data:t,startX:A,endX:O}))}}function iue(e){var t=Je(),r=$le(),n=qle(),i=w.useContext(Wle),a=e.onChange,{startIndex:l,endIndex:u}=e;w.useEffect(()=>{t(WS({startIndex:l,endIndex:u}))},[t,u,l]),Gre();var f=w.useCallback(x=>{if(n!=null){var{startIndex:C,endIndex:A}=n;(x.startIndex!==C||x.endIndex!==A)&&(i==null||i(x),a==null||a(x),t(WS(x)))}},[a,i,t,n]),h=he(Rh);if(h==null||n==null||r==null||!r.length)return null;var{startIndex:d,endIndex:m}=n,{x:v,y:g,width:S}=h,_={data:r,x:v,y:g,width:S,startIndex:d,endIndex:m,onChange:f};return w.createElement(nue,_h({},e,_,{startIndexControlledFromProps:l??void 0,endIndexControlledFromProps:u??void 0}))}function aue(e){var t=Je();return w.useEffect(()=>(t(tR(e)),()=>{t(tR(null))}),[t,e]),null}var sue={height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1};function Rz(e){var t=jt(e,sue);return w.createElement(w.Fragment,null,w.createElement(aue,{height:t.height,x:t.x,y:t.y,width:t.width,padding:t.padding}),w.createElement(iue,t))}Rz.displayName="Brush";function oR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Wd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oR(Object(r),!0).forEach(function(n){Lz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lz(e,t,r){return(t=oue(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oue(e){var t=lue(e,"string");return typeof t=="symbol"?t:t+""}function lue(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Bz=(e,t)=>{var{x:r,y:n}=e,{x:i,y:a}=t;return{x:Math.min(r,i),y:Math.min(n,a),width:Math.abs(i-r),height:Math.abs(a-n)}},uue=e=>{var{x1:t,y1:r,x2:n,y2:i}=e;return Bz({x:t,y:r},{x:n,y:i})};class cv{static create(t){return new cv(t)}constructor(t){this.scale=t}get domain(){return this.scale.domain}get range(){return this.scale.range}get rangeMin(){return this.range()[0]}get rangeMax(){return this.range()[1]}get bandwidth(){return this.scale.bandwidth}apply(t){var{bandAware:r,position:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t!==void 0){if(n)switch(n){case"start":return this.scale(t);case"middle":{var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+i}case"end":{var a=this.bandwidth?this.bandwidth():0;return this.scale(t)+a}default:return this.scale(t)}if(r){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+l}return this.scale(t)}}isInRange(t){var r=this.range(),n=r[0],i=r[r.length-1];return n<=i?t>=n&&t<=i:t>=i&&t<=n}}Lz(cv,"EPS",1e-4);var bx=e=>{var t=Object.keys(e).reduce((r,n)=>Wd(Wd({},r),{},{[n]:cv.create(e[n])}),{});return Wd(Wd({},t),{},{apply(r){var{bandAware:n,position:i}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.fromEntries(Object.entries(r).map(a=>{var[l,u]=a;return[l,t[l].apply(u,{bandAware:n,position:i})]}))},isInRange(r){return Object.keys(r).every(n=>t[n].isInRange(r[n]))}})};function cue(e){return(e%180+180)%180}var hue=function(t){var{width:r,height:n}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=cue(i),l=a*Math.PI/180,u=Math.atan(n/r),f=l>u&&l<Math.PI-u?n/Math.sin(l):r/Math.cos(l);return Math.abs(f)},fue={dots:[],areas:[],lines:[]},Nz=In({name:"referenceElements",initialState:fue,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=ga(e).dots.findIndex(n=>n===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=ga(e).areas.findIndex(n=>n===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=ga(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),{addDot:due,removeDot:pue,addArea:mue,removeArea:vue,addLine:gue,removeLine:yue}=Nz.actions,_ue=Nz.reducer,Iz=w.createContext(void 0),bue=e=>{var{children:t}=e,[r]=w.useState("".concat(Kl("recharts"),"-clip")),n=Zh();if(n==null)return null;var{x:i,y:a,width:l,height:u}=n;return w.createElement(Iz.Provider,{value:r},w.createElement("defs",null,w.createElement("clipPath",{id:r},w.createElement("rect",{x:i,y:a,height:u,width:l}))),t)},Sx=()=>w.useContext(Iz);function lR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function uR(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lR(Object(r),!0).forEach(function(n){wx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wx(e,t,r){return(t=Sue(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sue(e){var t=wue(e,"string");return typeof t=="symbol"?t:t+""}function wue(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function GS(){return GS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},GS.apply(null,arguments)}var xue=(e,t)=>{var r;return w.isValidElement(e)?r=w.cloneElement(e,t):typeof e=="function"?r=e(t):r=w.createElement("line",GS({},t,{className:"recharts-reference-line-line"})),r},Cue=(e,t,r,n,i,a,l,u,f)=>{var{x:h,y:d,width:m,height:v}=i;if(r){var{y:g}=f,S=e.y.apply(g,{position:a});if(Er(S)||f.ifOverflow==="discard"&&!e.y.isInRange(S))return null;var _=[{x:h+m,y:S},{x:h,y:S}];return u==="left"?_.reverse():_}if(t){var{x}=f,C=e.x.apply(x,{position:a});if(Er(C)||f.ifOverflow==="discard"&&!e.x.isInRange(C))return null;var A=[{x:C,y:d+v},{x:C,y:d}];return l==="top"?A.reverse():A}if(n){var{segment:O}=f,P=O.map(D=>e.apply(D,{position:a}));return f.ifOverflow==="discard"&&P.some(D=>!e.isInRange(D))?null:P}return null};function Eue(e){var t=Je();return w.useEffect(()=>(t(gue(e)),()=>{t(yue(e))})),null}function Aue(e){var{x:t,y:r,segment:n,xAxisId:i,yAxisId:a,shape:l,className:u,ifOverflow:f}=e,h=Tt(),d=Sx(),m=he(F=>Na(F,i)),v=he(F=>Ia(F,a)),g=he(F=>ci(F,"xAxis",i,h)),S=he(F=>ci(F,"yAxis",a,h)),_=Lh(),x=Cr(t),C=Cr(r);if(!d||!_||m==null||v==null||g==null||S==null)return null;var A=bx({x:g,y:S}),O=n&&n.length===2,P=Cue(A,x,C,O,_,e.position,m.orientation,v.orientation,e);if(!P)return null;var[{x:D,y:k},{x:R,y:N}]=P,$=f==="hidden"?"url(#".concat(d,")"):void 0,ee=uR(uR({clipPath:$},Ue(e,!0)),{},{x1:D,y1:k,x2:R,y2:N});return w.createElement(Pe,{className:Me("recharts-reference-line",u)},xue(l,ee),w.createElement(ev,uue({x1:D,y1:k,x2:R,y2:N}),w.createElement(tv,{label:e.label}),e.children))}function Oue(e){return w.createElement(w.Fragment,null,w.createElement(Eue,{yAxisId:e.yAxisId,xAxisId:e.xAxisId,ifOverflow:e.ifOverflow,x:e.x,y:e.y}),w.createElement(Aue,e))}class xx extends w.Component{render(){return w.createElement(Oue,this.props)}}wx(xx,"displayName","ReferenceLine");wx(xx,"defaultProps",{ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function cR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function hR(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cR(Object(r),!0).forEach(function(n){Cx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Cx(e,t,r){return(t=kue(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kue(e){var t=Pue(e,"string");return typeof t=="symbol"?t:t+""}function Pue(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ZS(){return ZS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ZS.apply(null,arguments)}var Tue=(e,t,r,n,i)=>{var a=Cr(e),l=Cr(t),u=Tt(),f=he(v=>ci(v,"xAxis",r,u)),h=he(v=>ci(v,"yAxis",n,u));if(!a||!l||f==null||h==null)return null;var d=bx({x:f,y:h}),m=d.apply({x:e,y:t},{bandAware:!0});return i==="discard"&&!d.isInRange(m)?null:m};function Due(e){var t=Je();return w.useEffect(()=>(t(due(e)),()=>{t(pue(e))})),null}var Mue=(e,t)=>{var r;return w.isValidElement(e)?r=w.cloneElement(e,t):typeof e=="function"?r=e(t):r=w.createElement(Su,ZS({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r};function Rue(e){var{x:t,y:r,r:n}=e,i=Sx(),a=Tue(t,r,e.xAxisId,e.yAxisId,e.ifOverflow);if(!a)return null;var{x:l,y:u}=a,{shape:f,className:h,ifOverflow:d}=e,m=d==="hidden"?"url(#".concat(i,")"):void 0,v=hR(hR({clipPath:m},Ue(e,!0)),{},{cx:l,cy:u});return w.createElement(Pe,{className:Me("recharts-reference-dot",h)},Mue(f,v),w.createElement(ev,{x:l-n,y:u-n,width:2*n,height:2*n},w.createElement(tv,{label:e.label}),e.children))}function Lue(e){var{x:t,y:r,r:n,ifOverflow:i,yAxisId:a,xAxisId:l}=e;return w.createElement(w.Fragment,null,w.createElement(Due,{y:r,x:t,r:n,yAxisId:a,xAxisId:l,ifOverflow:i}),w.createElement(Rue,e))}class Ex extends w.Component{render(){return w.createElement(Lue,this.props)}}Cx(Ex,"displayName","ReferenceDot");Cx(Ex,"defaultProps",{ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});function fR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function dR(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fR(Object(r),!0).forEach(function(n){Ax(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ax(e,t,r){return(t=Bue(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bue(e){var t=Nue(e,"string");return typeof t=="symbol"?t:t+""}function Nue(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function QS(){return QS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},QS.apply(null,arguments)}var Iue=(e,t,r,n,i,a,l)=>{var{x1:u,x2:f,y1:h,y2:d}=l;if(i==null||a==null)return null;var m=bx({x:i,y:a}),v={x:e?m.x.apply(u,{position:"start"}):m.x.rangeMin,y:r?m.y.apply(h,{position:"start"}):m.y.rangeMin},g={x:t?m.x.apply(f,{position:"end"}):m.x.rangeMax,y:n?m.y.apply(d,{position:"end"}):m.y.rangeMax};return l.ifOverflow==="discard"&&(!m.isInRange(v)||!m.isInRange(g))?null:Bz(v,g)},jue=(e,t)=>{var r;return w.isValidElement(e)?r=w.cloneElement(e,t):typeof e=="function"?r=e(t):r=w.createElement(Rm,QS({},t,{className:"recharts-reference-area-rect"})),r};function zue(e){var t=Je();return w.useEffect(()=>(t(mue(e)),()=>{t(vue(e))})),null}function Hue(e){var{x1:t,x2:r,y1:n,y2:i,className:a,shape:l,xAxisId:u,yAxisId:f}=e,h=Sx(),d=Tt(),m=he(P=>ci(P,"xAxis",u,d)),v=he(P=>ci(P,"yAxis",f,d));if(m==null||!v==null)return null;var g=Cr(t),S=Cr(r),_=Cr(n),x=Cr(i);if(!g&&!S&&!_&&!x&&!l)return null;var C=Iue(g,S,_,x,m,v,e);if(!C&&!l)return null;var A=e.ifOverflow==="hidden",O=A?"url(#".concat(h,")"):void 0;return w.createElement(Pe,{className:Me("recharts-reference-area",a)},jue(l,dR(dR({clipPath:O},Ue(e,!0)),C)),w.createElement(ev,C,w.createElement(tv,{label:e.label}),e.children))}function Fue(e){return w.createElement(w.Fragment,null,w.createElement(zue,{yAxisId:e.yAxisId,xAxisId:e.xAxisId,ifOverflow:e.ifOverflow,x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2}),w.createElement(Hue,e))}class Ox extends w.Component{render(){return w.createElement(Fue,this.props)}}Ax(Ox,"displayName","ReferenceArea");Ax(Ox,"defaultProps",{ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});function Vb(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function jz(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],i=0;i<e.length;i+=t)n.push(e[i]);return n}function Uue(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return hue(n,r)}function $ue(e,t,r){var n=r==="width",{x:i,y:a,width:l,height:u}=e;return t===1?{start:n?i:a,end:n?i+l:a+u}:{start:n?i+l:a+u,end:n?i:a}}function Qp(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function Kue(e,t){return jz(e,t+1)}function que(e,t,r,n,i){for(var a=(n||[]).slice(),{start:l,end:u}=t,f=0,h=1,d=l,m=function(){var S=n==null?void 0:n[f];if(S===void 0)return{v:jz(n,h)};var _=f,x,C=()=>(x===void 0&&(x=r(S,_)),x),A=S.coordinate,O=f===0||Qp(e,A,C,d,u);O||(f=0,d=l,h+=1),O&&(d=A+e*(C()/2+i),f+=h)},v;h<=a.length;)if(v=m(),v)return v.v;return[]}function pR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $r(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pR(Object(r),!0).forEach(function(n){Wue(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Wue(e,t,r){return(t=Vue(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vue(e){var t=Yue(e,"string");return typeof t=="symbol"?t:t+""}function Yue(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xue(e,t,r,n,i){for(var a=(n||[]).slice(),l=a.length,{start:u}=t,{end:f}=t,h=function(v){var g=a[v],S,_=()=>(S===void 0&&(S=r(g,v)),S);if(v===l-1){var x=e*(g.coordinate+e*_()/2-f);a[v]=g=$r($r({},g),{},{tickCoord:x>0?g.coordinate-x*e:g.coordinate})}else a[v]=g=$r($r({},g),{},{tickCoord:g.coordinate});var C=Qp(e,g.tickCoord,_,u,f);C&&(f=g.tickCoord-e*(_()/2+i),a[v]=$r($r({},g),{},{isShow:!0}))},d=l-1;d>=0;d--)h(d);return a}function Gue(e,t,r,n,i,a){var l=(n||[]).slice(),u=l.length,{start:f,end:h}=t;if(a){var d=n[u-1],m=r(d,u-1),v=e*(d.coordinate+e*m/2-h);l[u-1]=d=$r($r({},d),{},{tickCoord:v>0?d.coordinate-v*e:d.coordinate});var g=Qp(e,d.tickCoord,()=>m,f,h);g&&(h=d.tickCoord-e*(m/2+i),l[u-1]=$r($r({},d),{},{isShow:!0}))}for(var S=a?u-1:u,_=function(A){var O=l[A],P,D=()=>(P===void 0&&(P=r(O,A)),P);if(A===0){var k=e*(O.coordinate-e*D()/2-f);l[A]=O=$r($r({},O),{},{tickCoord:k<0?O.coordinate-k*e:O.coordinate})}else l[A]=O=$r($r({},O),{},{tickCoord:O.coordinate});var R=Qp(e,O.tickCoord,D,f,h);R&&(f=O.tickCoord+e*(D()/2+i),l[A]=$r($r({},O),{},{isShow:!0}))},x=0;x<S;x++)_(x);return l}function kx(e,t,r){var{tick:n,ticks:i,viewBox:a,minTickGap:l,orientation:u,interval:f,tickFormatter:h,unit:d,angle:m}=e;if(!i||!i.length||!n)return[];if(ye(f)||Nn.isSsr){var v;return(v=Kue(i,ye(f)?f:0))!==null&&v!==void 0?v:[]}var g=[],S=u==="top"||u==="bottom"?"width":"height",_=d&&S==="width"?Fl(d,{fontSize:t,letterSpacing:r}):{width:0,height:0},x=(O,P)=>{var D=typeof h=="function"?h(O.value,P):O.value;return S==="width"?Uue(Fl(D,{fontSize:t,letterSpacing:r}),_,m):Fl(D,{fontSize:t,letterSpacing:r})[S]},C=i.length>=2?xr(i[1].coordinate-i[0].coordinate):1,A=$ue(a,C,S);return f==="equidistantPreserveStart"?que(C,A,x,i,l):(f==="preserveStart"||f==="preserveStartEnd"?g=Gue(C,A,x,i,l,f==="preserveStartEnd"):g=Xue(C,A,x,i,l),g.filter(O=>O.isShow))}var Zue=["viewBox"],Que=["viewBox"];function Nl(){return Nl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Nl.apply(null,arguments)}function mR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function hr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mR(Object(r),!0).forEach(function(n){Px(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vR(e,t){if(e==null)return{};var r,n,i=Jue(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Jue(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Px(e,t,r){return(t=ece(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ece(e){var t=tce(e,"string");return typeof t=="symbol"?t:t+""}function tce(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class Ns extends w.Component{constructor(t){super(t),this.tickRefs=w.createRef(),this.tickRefs.current=[],this.state={fontSize:"",letterSpacing:""}}shouldComponentUpdate(t,r){var{viewBox:n}=t,i=vR(t,Zue),a=this.props,{viewBox:l}=a,u=vR(a,Que);return!Vb(n,l)||!Vb(i,u)||!Vb(r,this.state)}getTickLineCoord(t){var{x:r,y:n,width:i,height:a,orientation:l,tickSize:u,mirror:f,tickMargin:h}=this.props,d,m,v,g,S,_,x=f?-1:1,C=t.tickSize||u,A=ye(t.tickCoord)?t.tickCoord:t.coordinate;switch(l){case"top":d=m=t.coordinate,g=n+ +!f*a,v=g-x*C,_=v-x*h,S=A;break;case"left":v=g=t.coordinate,m=r+ +!f*i,d=m-x*C,S=d-x*h,_=A;break;case"right":v=g=t.coordinate,m=r+ +f*i,d=m+x*C,S=d+x*h,_=A;break;default:d=m=t.coordinate,g=n+ +f*a,v=g+x*C,_=v+x*h,S=A;break}return{line:{x1:d,y1:v,x2:m,y2:g},tick:{x:S,y:_}}}getTickTextAnchor(){var{orientation:t,mirror:r}=this.props;switch(t){case"left":return r?"start":"end";case"right":return r?"end":"start";default:return"middle"}}getTickVerticalAnchor(){var{orientation:t,mirror:r}=this.props;switch(t){case"left":case"right":return"middle";case"top":return r?"start":"end";default:return r?"end":"start"}}renderAxisLine(){var{x:t,y:r,width:n,height:i,orientation:a,mirror:l,axisLine:u}=this.props,f=hr(hr(hr({},Ue(this.props,!1)),Ue(u,!1)),{},{fill:"none"});if(a==="top"||a==="bottom"){var h=+(a==="top"&&!l||a==="bottom"&&l);f=hr(hr({},f),{},{x1:t,y1:r+h*i,x2:t+n,y2:r+h*i})}else{var d=+(a==="left"&&!l||a==="right"&&l);f=hr(hr({},f),{},{x1:t+d*n,y1:r,x2:t+d*n,y2:r+i})}return w.createElement("line",Nl({},f,{className:Me("recharts-cartesian-axis-line",ba(u,"className"))}))}static renderTickItem(t,r,n){var i,a=Me(r.className,"recharts-cartesian-axis-tick-value");if(w.isValidElement(t))i=w.cloneElement(t,hr(hr({},r),{},{className:a}));else if(typeof t=="function")i=t(hr(hr({},r),{},{className:a}));else{var l="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(l=Me(l,t.className)),i=w.createElement(As,Nl({},r,{className:l}),n)}return i}renderTicks(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],{tickLine:i,stroke:a,tick:l,tickFormatter:u,unit:f,padding:h,tickTextProps:d}=this.props,m=kx(hr(hr({},this.props),{},{ticks:n}),t,r),v=this.getTickTextAnchor(),g=this.getTickVerticalAnchor(),S=Et(this.props),_=Ue(l,!1),x=hr(hr({},S),{},{fill:"none"},Ue(i,!1)),C=m.map((A,O)=>{var{line:P,tick:D}=this.getTickLineCoord(A),k=hr(hr(hr(hr({textAnchor:v,verticalAnchor:g},S),{},{stroke:"none",fill:a},_),D),{},{index:O,payload:A,visibleTicksCount:m.length,tickFormatter:u,padding:h},d);return w.createElement(Pe,Nl({className:"recharts-cartesian-axis-tick",key:"tick-".concat(A.value,"-").concat(A.coordinate,"-").concat(A.tickCoord)},Ta(this.props,A,O)),i&&w.createElement("line",Nl({},x,P,{className:Me("recharts-cartesian-axis-tick-line",ba(i,"className"))})),l&&Ns.renderTickItem(l,k,"".concat(typeof u=="function"?u(A.value,O):A.value).concat(f||"")))});return C.length>0?w.createElement("g",{className:"recharts-cartesian-axis-ticks"},C):null}render(){var{axisLine:t,width:r,height:n,className:i,hide:a}=this.props;if(a)return null;var{ticks:l}=this.props;return r!=null&&r<=0||n!=null&&n<=0?null:w.createElement(Pe,{className:Me("recharts-cartesian-axis",i),ref:u=>{if(u){var f=u.getElementsByClassName("recharts-cartesian-axis-tick-value");this.tickRefs.current=Array.from(f);var h=f[0];if(h){var d=window.getComputedStyle(h).fontSize,m=window.getComputedStyle(h).letterSpacing;(d!==this.state.fontSize||m!==this.state.letterSpacing)&&this.setState({fontSize:window.getComputedStyle(h).fontSize,letterSpacing:window.getComputedStyle(h).letterSpacing})}}}},t&&this.renderAxisLine(),this.renderTicks(this.state.fontSize,this.state.letterSpacing,l),w.createElement(ev,{x:this.props.x,y:this.props.y,width:this.props.width,height:this.props.height},w.createElement(tv,{label:this.props.label}),this.props.children))}}Px(Ns,"displayName","CartesianAxis");Px(Ns,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var rce=["x1","y1","x2","y2","key"],nce=["offset"],ice=["xAxisId","yAxisId"],ace=["xAxisId","yAxisId"];function gR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Kr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gR(Object(r),!0).forEach(function(n){sce(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sce(e,t,r){return(t=oce(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oce(e){var t=lce(e,"string");return typeof t=="symbol"?t:t+""}function lce(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function go(){return go=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},go.apply(null,arguments)}function Jp(e,t){if(e==null)return{};var r,n,i=uce(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function uce(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var cce=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:r,x:n,y:i,width:a,height:l,ry:u}=e;return w.createElement("rect",{x:n,y:i,ry:u,width:a,height:l,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function zz(e,t){var r;if(w.isValidElement(e))r=w.cloneElement(e,t);else if(typeof e=="function")r=e(t);else{var{x1:n,y1:i,x2:a,y2:l,key:u}=t,f=Jp(t,rce),h=Et(f),{offset:d}=h,m=Jp(h,nce);r=w.createElement("line",go({},m,{x1:n,y1:i,x2:a,y2:l,fill:"none",key:u}))}return r}function hce(e){var{x:t,width:r,horizontal:n=!0,horizontalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:a,yAxisId:l}=e,u=Jp(e,ice),f=i.map((h,d)=>{var m=Kr(Kr({},u),{},{x1:t,y1:h,x2:t+r,y2:h,key:"line-".concat(d),index:d});return zz(n,m)});return w.createElement("g",{className:"recharts-cartesian-grid-horizontal"},f)}function fce(e){var{y:t,height:r,vertical:n=!0,verticalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:a,yAxisId:l}=e,u=Jp(e,ace),f=i.map((h,d)=>{var m=Kr(Kr({},u),{},{x1:h,y1:t,x2:h,y2:t+r,key:"line-".concat(d),index:d});return zz(n,m)});return w.createElement("g",{className:"recharts-cartesian-grid-vertical"},f)}function dce(e){var{horizontalFill:t,fillOpacity:r,x:n,y:i,width:a,height:l,horizontalPoints:u,horizontal:f=!0}=e;if(!f||!t||!t.length)return null;var h=u.map(m=>Math.round(m+i-i)).sort((m,v)=>m-v);i!==h[0]&&h.unshift(0);var d=h.map((m,v)=>{var g=!h[v+1],S=g?i+l-m:h[v+1]-m;if(S<=0)return null;var _=v%t.length;return w.createElement("rect",{key:"react-".concat(v),y:m,x:n,height:S,width:a,stroke:"none",fill:t[_],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return w.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function pce(e){var{vertical:t=!0,verticalFill:r,fillOpacity:n,x:i,y:a,width:l,height:u,verticalPoints:f}=e;if(!t||!r||!r.length)return null;var h=f.map(m=>Math.round(m+i-i)).sort((m,v)=>m-v);i!==h[0]&&h.unshift(0);var d=h.map((m,v)=>{var g=!h[v+1],S=g?i+l-m:h[v+1]-m;if(S<=0)return null;var _=v%r.length;return w.createElement("rect",{key:"react-".concat(v),x:m,y:a,width:S,height:u,stroke:"none",fill:r[_],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return w.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var mce=(e,t)=>{var{xAxis:r,width:n,height:i,offset:a}=e;return _3(kx(Kr(Kr(Kr({},Ns.defaultProps),r),{},{ticks:b3(r),viewBox:{x:0,y:0,width:n,height:i}})),a.left,a.left+a.width,t)},vce=(e,t)=>{var{yAxis:r,width:n,height:i,offset:a}=e;return _3(kx(Kr(Kr(Kr({},Ns.defaultProps),r),{},{ticks:b3(r),viewBox:{x:0,y:0,width:n,height:i}})),a.top,a.top+a.height,t)},gce={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0};function Hz(e){var t=e1(),r=t1(),n=C3(),i=Kr(Kr({},jt(e,gce)),{},{x:ye(e.x)?e.x:n.left,y:ye(e.y)?e.y:n.top,width:ye(e.width)?e.width:n.width,height:ye(e.height)?e.height:n.height}),{xAxisId:a,yAxisId:l,x:u,y:f,width:h,height:d,syncWithTicks:m,horizontalValues:v,verticalValues:g}=i,S=Tt(),_=he($=>ID($,"xAxis",a,S)),x=he($=>ID($,"yAxis",l,S));if(!ye(h)||h<=0||!ye(d)||d<=0||!ye(u)||u!==+u||!ye(f)||f!==+f)return null;var C=i.verticalCoordinatesGenerator||mce,A=i.horizontalCoordinatesGenerator||vce,{horizontalPoints:O,verticalPoints:P}=i;if((!O||!O.length)&&typeof A=="function"){var D=v&&v.length,k=A({yAxis:x?Kr(Kr({},x),{},{ticks:D?v:x.ticks}):void 0,width:t,height:r,offset:n},D?!0:m);Jc(Array.isArray(k),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof k,"]")),Array.isArray(k)&&(O=k)}if((!P||!P.length)&&typeof C=="function"){var R=g&&g.length,N=C({xAxis:_?Kr(Kr({},_),{},{ticks:R?g:_.ticks}):void 0,width:t,height:r,offset:n},R?!0:m);Jc(Array.isArray(N),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof N,"]")),Array.isArray(N)&&(P=N)}return w.createElement("g",{className:"recharts-cartesian-grid"},w.createElement(cce,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),w.createElement(dce,go({},i,{horizontalPoints:O})),w.createElement(pce,go({},i,{verticalPoints:P})),w.createElement(hce,go({},i,{offset:n,horizontalPoints:O,xAxis:_,yAxis:x})),w.createElement(fce,go({},i,{offset:n,verticalPoints:P,xAxis:_,yAxis:x})))}Hz.displayName="CartesianGrid";var Fz=(e,t,r,n)=>gn(e,"xAxis",t,n),Uz=(e,t,r,n)=>hi(e,"xAxis",t,n),$z=(e,t,r,n)=>gn(e,"yAxis",r,n),Kz=(e,t,r,n)=>hi(e,"yAxis",r,n),yce=X([$e,Fz,$z,Uz,Kz],(e,t,r,n,i)=>Ci(e,"xAxis")?wa(t,n,!1):wa(r,i,!1)),_ce=(e,t,r,n,i)=>i;function bce(e){return e.type==="line"}var Sce=X([vu,_ce],(e,t)=>e.filter(bce).find(r=>r.id===t)),wce=X([$e,Fz,$z,Uz,Kz,Sce,yce,uu],(e,t,r,n,i,a,l,u)=>{var{chartData:f,dataStartIndex:h,dataEndIndex:d}=u;if(!(a==null||t==null||r==null||n==null||i==null||n.length===0||i.length===0||l==null)){var{dataKey:m,data:v}=a,g;if(v!=null&&v.length>0?g=v:g=f==null?void 0:f.slice(h,d+1),g!=null)return Kce({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataKey:m,bandSize:l,displayedData:g})}}),xce=["id"],Cce=["type","layout","connectNulls","needClip"],Ece=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function yR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yR(Object(r),!0).forEach(function(n){Ace(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ace(e,t,r){return(t=Oce(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Oce(e){var t=kce(e,"string");return typeof t=="symbol"?t:t+""}function kce(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Tx(e,t){if(e==null)return{};var r,n,i=Pce(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Pce(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function To(){return To=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},To.apply(null,arguments)}var Tce=e=>{var{dataKey:t,name:r,stroke:n,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:n,value:fi(r,t),payload:e}]};function Dce(e){var{dataKey:t,data:r,stroke:n,strokeWidth:i,fill:a,name:l,hide:u,unit:f}=e;return{dataDefinedOnItem:r,positions:void 0,settings:{stroke:n,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:fi(l,t),hide:u,type:e.tooltipType,color:e.stroke,unit:f}}}var qz=(e,t)=>"".concat(t,"px ").concat(e-t,"px");function Mce(e,t){for(var r=e.length%2!==0?[...e,0]:e,n=[],i=0;i<t;++i)n=[...n,...r];return n}var Rce=(e,t,r)=>{var n=r.reduce((m,v)=>m+v);if(!n)return qz(t,e);for(var i=Math.floor(e/n),a=e%n,l=t-e,u=[],f=0,h=0;f<r.length;h+=r[f],++f)if(h+r[f]>a){u=[...r.slice(0,f),a-h];break}var d=u.length%2===0?[0,l]:[l];return[...Mce(r,i),...u,...d].map(m=>"".concat(m,"px")).join(", ")};function Lce(e,t){var r;if(w.isValidElement(e))r=w.cloneElement(e,t);else if(typeof e=="function")r=e(t);else{var n=Me("recharts-line-dot",typeof e!="boolean"?e.className:"");r=w.createElement(Su,To({},t,{className:n}))}return r}function Bce(e,t){return e==null?!1:t?!0:e.length===1}function Nce(e){var{clipPathId:t,points:r,props:n}=e,{dot:i,dataKey:a,needClip:l}=n;if(!Bce(r,i))return null;var{id:u}=n,f=Tx(n,xce),h=vm(i),d=Et(f),m=Ue(i,!0),v=r.map((S,_)=>{var x=Mn(Mn(Mn({key:"dot-".concat(_),r:3},d),m),{},{index:_,cx:S.x,cy:S.y,dataKey:a,value:S.value,payload:S.payload,points:r});return Lce(i,x)}),g={clipPath:l?"url(#clipPath-".concat(h?"":"dots-").concat(t,")"):void 0};return w.createElement(Pe,To({className:"recharts-line-dots",key:"dots"},g),v)}function Ice(e){var{showLabels:t,children:r,points:n}=e,i=w.useMemo(()=>n==null?void 0:n.map(a=>{var l={x:a.x,y:a.y,width:0,height:0};return Mn(Mn({},l),{},{value:a.value,payload:a.payload,viewBox:l,parentViewBox:void 0,fill:void 0})}),[n]);return w.createElement(bu,{value:t?i:null},r)}function _R(e){var{clipPathId:t,pathRef:r,points:n,strokeDasharray:i,props:a}=e,{type:l,layout:u,connectNulls:f,needClip:h}=a,d=Tx(a,Cce),m=Mn(Mn({},Ue(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:h?"url(#clipPath-".concat(t,")"):void 0,points:n,type:l,layout:u,connectNulls:f,strokeDasharray:i??a.strokeDasharray});return w.createElement(w.Fragment,null,(n==null?void 0:n.length)>1&&w.createElement(wo,To({},m,{pathRef:r})),w.createElement(Nce,{points:n,clipPathId:t,props:a}))}function jce(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function zce(e){var{clipPathId:t,props:r,pathRef:n,previousPointsRef:i,longestAnimatedLengthRef:a}=e,{points:l,strokeDasharray:u,isAnimationActive:f,animationBegin:h,animationDuration:d,animationEasing:m,animateNewValues:v,width:g,height:S,onAnimationEnd:_,onAnimationStart:x}=r,C=i.current,A=La(r,"recharts-line-"),[O,P]=w.useState(!1),D=!O,k=w.useCallback(()=>{typeof _=="function"&&_(),P(!1)},[_]),R=w.useCallback(()=>{typeof x=="function"&&x(),P(!0)},[x]),N=jce(n.current),$=a.current;return w.createElement(Ice,{points:l,showLabels:D},r.children,w.createElement(Ra,{animationId:A,begin:h,duration:d,isActive:f,easing:m,onAnimationEnd:k,onAnimationStart:R,key:A},ee=>{var F=je($,N+$,ee),z=Math.min(F,N),j;if(f)if(u){var K="".concat(u).split(/[,\s]+/gim).map(q=>parseFloat(q));j=Rce(z,N,K)}else j=qz(N,z);else j=u==null?void 0:String(u);if(C){var W=C.length/l.length,B=ee===1?l:l.map((q,G)=>{var ce=Math.floor(G*W);if(C[ce]){var M=C[ce];return Mn(Mn({},q),{},{x:je(M.x,q.x,ee),y:je(M.y,q.y,ee)})}return v?Mn(Mn({},q),{},{x:je(g*2,q.x,ee),y:je(S/2,q.y,ee)}):Mn(Mn({},q),{},{x:q.x,y:q.y})});return i.current=B,w.createElement(_R,{props:r,points:B,clipPathId:t,pathRef:n,strokeDasharray:j})}return ee>0&&N>0&&(i.current=l,a.current=z),w.createElement(_R,{props:r,points:l,clipPathId:t,pathRef:n,strokeDasharray:j})}),w.createElement(Ho,{label:r.label}))}function Hce(e){var{clipPathId:t,props:r}=e,n=w.useRef(null),i=w.useRef(0),a=w.useRef(null);return w.createElement(zce,{props:r,clipPathId:t,previousPointsRef:n,longestAnimatedLengthRef:i,pathRef:a})}var Fce=(e,t)=>({x:e.x,y:e.y,value:e.value,errorVal:Fe(e.payload,t)});class Uce extends w.Component{render(){var t,{hide:r,dot:n,points:i,className:a,xAxisId:l,yAxisId:u,top:f,left:h,width:d,height:m,id:v,needClip:g}=this.props;if(r)return null;var S=Me("recharts-line",a),_=v,{r:x=3,strokeWidth:C=2}=(t=Ue(n,!1))!==null&&t!==void 0?t:{r:3,strokeWidth:2},A=vm(n),O=x*2+C;return w.createElement(w.Fragment,null,w.createElement(Pe,{className:S},g&&w.createElement("defs",null,w.createElement(uv,{clipPathId:_,xAxisId:l,yAxisId:u}),!A&&w.createElement("clipPath",{id:"clipPath-dots-".concat(_)},w.createElement("rect",{x:h-O/2,y:f-O/2,width:d+O,height:m+O}))),w.createElement(_x,{xAxisId:l,yAxisId:u,data:i,dataPointFormatter:Fce,errorBarOffset:0},w.createElement(Hce,{props:this.props,clipPathId:_}))),w.createElement(Xp,{activeDot:this.props.activeDot,points:i,mainColor:this.props.stroke,itemDataKey:this.props.dataKey}))}}var Wz={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:!Nn.isSsr,label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0};function $ce(e){var t=jt(e,Wz),{activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:a,animationEasing:l,connectNulls:u,dot:f,hide:h,isAnimationActive:d,label:m,legendType:v,xAxisId:g,yAxisId:S,id:_}=t,x=Tx(t,Ece),{needClip:C}=Qh(g,S),A=Zh(),O=ou(),P=Tt(),D=he(ee=>wce(ee,g,S,P,_));if(O!=="horizontal"&&O!=="vertical"||D==null||A==null)return null;var{height:k,width:R,x:N,y:$}=A;return w.createElement(Uce,To({},x,{id:_,connectNulls:u,dot:f,activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:a,animationEasing:l,isAnimationActive:d,hide:h,label:m,legendType:v,xAxisId:g,yAxisId:S,points:D,layout:O,height:k,width:R,left:N,top:$,needClip:C}))}function Kce(e){var{layout:t,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:a,dataKey:l,bandSize:u,displayedData:f}=e;return f.map((h,d)=>{var m=Fe(h,l);if(t==="horizontal"){var v=Vl({axis:r,ticks:i,bandSize:u,entry:h,index:d}),g=at(m)?null:n.scale(m);return{x:v,y:g,value:m,payload:h}}var S=at(m)?null:r.scale(m),_=Vl({axis:n,ticks:a,bandSize:u,entry:h,index:d});return S==null||_==null?null:{x:S,y:_,value:m,payload:h}}).filter(Boolean)}function Vz(e){var t=jt(e,Wz),r=Tt();return w.createElement(Cu,{id:t.id,type:"line"},n=>w.createElement(w.Fragment,null,w.createElement(ov,{legendPayload:Tce(t)}),w.createElement(Bs,{fn:Dce,args:t}),w.createElement(lv,{type:"line",id:n,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:r}),w.createElement($ce,To({},t,{id:n}))))}Vz.displayName="Line";var Yz=(e,t,r,n)=>gn(e,"xAxis",t,n),Xz=(e,t,r,n)=>hi(e,"xAxis",t,n),Gz=(e,t,r,n)=>gn(e,"yAxis",r,n),Zz=(e,t,r,n)=>hi(e,"yAxis",r,n),qce=X([$e,Yz,Gz,Xz,Zz],(e,t,r,n,i)=>Ci(e,"xAxis")?wa(t,n,!1):wa(r,i,!1)),Wce=(e,t,r,n,i)=>i,Qz=X([vu,Wce],(e,t)=>e.filter(r=>r.type==="area").find(r=>r.id===t)),Vce=(e,t,r,n,i)=>{var a,l=Qz(e,t,r,n,i);if(l!=null){var u=$e(e),f=Ci(u,"xAxis"),h;if(f?h=vh(e,"yAxis",r,n):h=vh(e,"xAxis",t,n),h!=null){var{stackId:d}=l,m=qm(l);if(!(d==null||m==null)){var v=(a=h[d])===null||a===void 0?void 0:a.stackedData;return v==null?void 0:v.find(g=>g.key===m)}}}},Yce=X([$e,Yz,Gz,Xz,Zz,Vce,uu,qce,Qz],(e,t,r,n,i,a,l,u,f)=>{var{chartData:h,dataStartIndex:d,dataEndIndex:m}=l;if(!(f==null||e!=="horizontal"&&e!=="vertical"||t==null||r==null||n==null||i==null||n.length===0||i.length===0||u==null)){var{data:v}=f,g;if(v&&v.length>0?g=v:g=h==null?void 0:h.slice(d,m+1),g!=null){var S=void 0;return mhe({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataStartIndex:d,areaSettings:f,stackedData:a,displayedData:g,chartBaseValue:S,bandSize:u})}}}),Xce=["id"],Gce=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function Jz(e,t){if(e==null)return{};var r,n,i=Zce(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Zce(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function bR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function va(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bR(Object(r),!0).forEach(function(n){Qce(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Qce(e,t,r){return(t=Jce(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jce(e){var t=ehe(e,"string");return typeof t=="symbol"?t:t+""}function ehe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _a(){return _a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_a.apply(null,arguments)}function em(e,t){return e&&e!=="none"?e:t}var the=e=>{var{dataKey:t,name:r,stroke:n,fill:i,legendType:a,hide:l}=e;return[{inactive:l,dataKey:t,type:a,color:em(n,i),value:fi(r,t),payload:e}]};function rhe(e){var{dataKey:t,data:r,stroke:n,strokeWidth:i,fill:a,name:l,hide:u,unit:f}=e;return{dataDefinedOnItem:r,positions:void 0,settings:{stroke:n,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:fi(l,t),hide:u,type:e.tooltipType,color:em(n,a),unit:f}}}var nhe=(e,t)=>{var r;if(w.isValidElement(e))r=w.cloneElement(e,t);else if(typeof e=="function")r=e(t);else{var n=Me("recharts-area-dot",typeof e!="boolean"?e.className:"");r=w.createElement(Su,_a({},t,{className:n}))}return r};function ihe(e,t){return e==null?!1:t?!0:e.length===1}function ahe(e){var{clipPathId:t,points:r,props:n}=e,{needClip:i,dot:a,dataKey:l}=n;if(!ihe(r,a))return null;var u=vm(a),f=Et(n),h=Ue(a,!0),d=r.map((v,g)=>{var S=va(va(va({key:"dot-".concat(g),r:3},f),h),{},{index:g,cx:v.x,cy:v.y,dataKey:l,value:v.value,payload:v.payload,points:r});return nhe(a,S)}),m={clipPath:i?"url(#clipPath-".concat(u?"":"dots-").concat(t,")"):void 0};return w.createElement(Pe,_a({className:"recharts-area-dots"},m),d)}function she(e){var{showLabels:t,children:r,points:n}=e,i=n.map(a=>{var l={x:a.x,y:a.y,width:0,height:0};return va(va({},l),{},{value:a.value,payload:a.payload,parentViewBox:void 0,viewBox:l,fill:void 0})});return w.createElement(bu,{value:t?i:null},r)}function SR(e){var{points:t,baseLine:r,needClip:n,clipPathId:i,props:a}=e,{layout:l,type:u,stroke:f,connectNulls:h,isRange:d}=a,{id:m}=a,v=Jz(a,Xce),g=Et(v);return w.createElement(w.Fragment,null,(t==null?void 0:t.length)>1&&w.createElement(Pe,{clipPath:n?"url(#clipPath-".concat(i,")"):void 0},w.createElement(wo,_a({},g,{id:m,points:t,connectNulls:h,type:u,baseLine:r,layout:l,stroke:"none",className:"recharts-area-area"})),f!=="none"&&w.createElement(wo,_a({},g,{className:"recharts-area-curve",layout:l,type:u,connectNulls:h,fill:"none",points:t})),f!=="none"&&d&&w.createElement(wo,_a({},g,{className:"recharts-area-curve",layout:l,type:u,connectNulls:h,fill:"none",points:r}))),w.createElement(ahe,{points:t,props:v,clipPathId:i}))}function ohe(e){var{alpha:t,baseLine:r,points:n,strokeWidth:i}=e,a=n[0].y,l=n[n.length-1].y;if(!zr(a)||!zr(l))return null;var u=t*Math.abs(a-l),f=Math.max(...n.map(h=>h.x||0));return ye(r)?f=Math.max(r,f):r&&Array.isArray(r)&&r.length&&(f=Math.max(...r.map(h=>h.x||0),f)),ye(f)?w.createElement("rect",{x:0,y:a<l?a:a-u,width:f+(i?parseInt("".concat(i),10):1),height:Math.floor(u)}):null}function lhe(e){var{alpha:t,baseLine:r,points:n,strokeWidth:i}=e,a=n[0].x,l=n[n.length-1].x;if(!zr(a)||!zr(l))return null;var u=t*Math.abs(a-l),f=Math.max(...n.map(h=>h.y||0));return ye(r)?f=Math.max(r,f):r&&Array.isArray(r)&&r.length&&(f=Math.max(...r.map(h=>h.y||0),f)),ye(f)?w.createElement("rect",{x:a<l?a:a-u,y:0,width:u,height:Math.floor(f+(i?parseInt("".concat(i),10):1))}):null}function uhe(e){var{alpha:t,layout:r,points:n,baseLine:i,strokeWidth:a}=e;return r==="vertical"?w.createElement(ohe,{alpha:t,points:n,baseLine:i,strokeWidth:a}):w.createElement(lhe,{alpha:t,points:n,baseLine:i,strokeWidth:a})}function che(e){var{needClip:t,clipPathId:r,props:n,previousPointsRef:i,previousBaselineRef:a}=e,{points:l,baseLine:u,isAnimationActive:f,animationBegin:h,animationDuration:d,animationEasing:m,onAnimationStart:v,onAnimationEnd:g}=n,S=La(n,"recharts-area-"),[_,x]=w.useState(!1),C=!_,A=w.useCallback(()=>{typeof g=="function"&&g(),x(!1)},[g]),O=w.useCallback(()=>{typeof v=="function"&&v(),x(!0)},[v]),P=i.current,D=a.current;return w.createElement(she,{showLabels:C,points:l},n.children,w.createElement(Ra,{animationId:S,begin:h,duration:d,isActive:f,easing:m,onAnimationEnd:A,onAnimationStart:O,key:S},k=>{if(P){var R=P.length/l.length,N=k===1?l:l.map((ee,F)=>{var z=Math.floor(F*R);if(P[z]){var j=P[z];return va(va({},ee),{},{x:je(j.x,ee.x,k),y:je(j.y,ee.y,k)})}return ee}),$;return ye(u)?$=je(D,u,k):at(u)||Er(u)?$=je(D,0,k):$=u.map((ee,F)=>{var z=Math.floor(F*R);if(Array.isArray(D)&&D[z]){var j=D[z];return va(va({},ee),{},{x:je(j.x,ee.x,k),y:je(j.y,ee.y,k)})}return ee}),k>0&&(i.current=N,a.current=$),w.createElement(SR,{points:N,baseLine:$,needClip:t,clipPathId:r,props:n})}return k>0&&(i.current=l,a.current=u),w.createElement(Pe,null,f&&w.createElement("defs",null,w.createElement("clipPath",{id:"animationClipPath-".concat(r)},w.createElement(uhe,{alpha:k,points:l,baseLine:u,layout:n.layout,strokeWidth:n.strokeWidth}))),w.createElement(Pe,{clipPath:"url(#animationClipPath-".concat(r,")")},w.createElement(SR,{points:l,baseLine:u,needClip:t,clipPathId:r,props:n})))}),w.createElement(Ho,{label:n.label}))}function hhe(e){var{needClip:t,clipPathId:r,props:n}=e,i=w.useRef(null),a=w.useRef();return w.createElement(che,{needClip:t,clipPathId:r,props:n,previousPointsRef:i,previousBaselineRef:a})}class fhe extends w.PureComponent{render(){var t,{hide:r,dot:n,points:i,className:a,top:l,left:u,needClip:f,xAxisId:h,yAxisId:d,width:m,height:v,id:g,baseLine:S}=this.props;if(r)return null;var _=Me("recharts-area",a),x=g,{r:C=3,strokeWidth:A=2}=(t=Ue(n,!1))!==null&&t!==void 0?t:{r:3,strokeWidth:2},O=vm(n),P=C*2+A;return w.createElement(w.Fragment,null,w.createElement(Pe,{className:_},f&&w.createElement("defs",null,w.createElement(uv,{clipPathId:x,xAxisId:h,yAxisId:d}),!O&&w.createElement("clipPath",{id:"clipPath-dots-".concat(x)},w.createElement("rect",{x:u-P/2,y:l-P/2,width:m+P,height:v+P}))),w.createElement(hhe,{needClip:f,clipPathId:x,props:this.props})),w.createElement(Xp,{points:i,mainColor:em(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot}),this.props.isRange&&Array.isArray(S)&&w.createElement(Xp,{points:S,mainColor:em(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot}))}}var e5={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:!Nn.isSsr,legendType:"line",stroke:"#3182bd",xAxisId:0,yAxisId:0};function dhe(e){var t,r=jt(e,e5),{activeDot:n,animationBegin:i,animationDuration:a,animationEasing:l,connectNulls:u,dot:f,fill:h,fillOpacity:d,hide:m,isAnimationActive:v,legendType:g,stroke:S,xAxisId:_,yAxisId:x}=r,C=Jz(r,Gce),A=ou(),O=Ij(),{needClip:P}=Qh(_,x),D=Tt(),{points:k,isRange:R,baseLine:N}=(t=he(K=>Yce(K,_,x,D,e.id)))!==null&&t!==void 0?t:{},$=Zh();if(A!=="horizontal"&&A!=="vertical"||$==null||O!=="AreaChart"&&O!=="ComposedChart")return null;var{height:ee,width:F,x:z,y:j}=$;return!k||!k.length?null:w.createElement(fhe,_a({},C,{activeDot:n,animationBegin:i,animationDuration:a,animationEasing:l,baseLine:N,connectNulls:u,dot:f,fill:h,fillOpacity:d,height:ee,hide:m,layout:A,isAnimationActive:v,isRange:R,legendType:g,needClip:P,points:k,stroke:S,width:F,left:z,top:j,xAxisId:_,yAxisId:x}))}var phe=(e,t,r,n,i)=>{var a=r??t;if(ye(a))return a;var l=e==="horizontal"?i:n,u=l.scale.domain();if(l.type==="number"){var f=Math.max(u[0],u[1]),h=Math.min(u[0],u[1]);return a==="dataMin"?h:a==="dataMax"||f<0?f:Math.max(Math.min(u[0],u[1]),0)}return a==="dataMin"?u[0]:a==="dataMax"?u[1]:u[0]};function mhe(e){var{areaSettings:{connectNulls:t,baseValue:r,dataKey:n},stackedData:i,layout:a,chartBaseValue:l,xAxis:u,yAxis:f,displayedData:h,dataStartIndex:d,xAxisTicks:m,yAxisTicks:v,bandSize:g}=e,S=i&&i.length,_=phe(a,l,r,u,f),x=a==="horizontal",C=!1,A=h.map((P,D)=>{var k;S?k=i[d+D]:(k=Fe(P,n),Array.isArray(k)?C=!0:k=[_,k]);var R=k[1]==null||S&&!t&&Fe(P,n)==null;return x?{x:Vl({axis:u,ticks:m,bandSize:g,entry:P,index:D}),y:R?null:f.scale(k[1]),value:k,payload:P}:{x:R?null:u.scale(k[1]),y:Vl({axis:f,ticks:v,bandSize:g,entry:P,index:D}),value:k,payload:P}}),O;return S||C?O=A.map(P=>{var D=Array.isArray(P.value)?P.value[0]:null;return x?{x:P.x,y:D!=null&&P.y!=null?f.scale(D):null,payload:P.payload}:{x:D!=null?u.scale(D):null,y:P.y,payload:P.payload}}):O=x?f.scale(_):u.scale(_),{points:A,baseLine:O,isRange:C}}function t5(e){var t=jt(e,e5),r=Tt();return w.createElement(Cu,{id:t.id,type:"area"},n=>w.createElement(w.Fragment,null,w.createElement(ov,{legendPayload:the(t)}),w.createElement(Bs,{fn:rhe,args:t}),w.createElement(lv,{type:"area",id:n,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:S3(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:r,connectNulls:t.connectNulls}),w.createElement(dhe,_a({},t,{id:n}))))}t5.displayName="Area";function r5(e,t,r){return(t=vhe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vhe(e){var t=ghe(e,"string");return typeof t=="symbol"?t:t+""}function ghe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yhe(e){var t=Je();return w.useEffect(()=>(t(Rse(e)),()=>{t(Lse(e))}),[e,t]),null}class hv extends w.Component{render(){return w.createElement(yhe,{domain:this.props.domain,id:this.props.zAxisId,dataKey:this.props.dataKey,name:this.props.name,unit:this.props.unit,range:this.props.range,scale:this.props.scale,type:this.props.type,allowDuplicatedCategory:ws.allowDuplicatedCategory,allowDataOverflow:ws.allowDataOverflow,reversed:ws.reversed,includeHidden:ws.includeHidden})}}r5(hv,"displayName","ZAxis");r5(hv,"defaultProps",{zAxisId:0,range:ws.range,scale:ws.scale,type:ws.type});var _he=["option","isActive"];function rh(){return rh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rh.apply(null,arguments)}function bhe(e,t){if(e==null)return{};var r,n,i=She(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function She(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function whe(e){var{option:t,isActive:r}=e,n=bhe(e,_he);return typeof t=="string"?w.createElement(yh,rh({option:w.createElement(Sm,rh({type:t},n)),isActive:r,shapeType:"symbols"},n)):w.createElement(yh,rh({option:t,isActive:r,shapeType:"symbols"},n))}var xhe=(e,t,r,n,i,a,l)=>gn(e,"xAxis",t,l),Che=(e,t,r,n,i,a,l)=>hi(e,"xAxis",t,l),Ehe=(e,t,r,n,i,a,l)=>gn(e,"yAxis",r,l),Ahe=(e,t,r,n,i,a,l)=>hi(e,"yAxis",r,l),Ohe=(e,t,r,n)=>_te(e,"zAxis",n,!1),khe=(e,t,r,n,i)=>i,Phe=(e,t,r,n,i,a)=>a,The=(e,t,r,n,i,a,l)=>uu(e,t,r,l),Dhe=X([vu,khe],(e,t)=>e.filter(r=>r.type==="scatter").find(r=>r.id===t)),Mhe=X([The,xhe,Che,Ehe,Ahe,Ohe,Dhe,Phe],(e,t,r,n,i,a,l,u)=>{var{chartData:f,dataStartIndex:h,dataEndIndex:d}=e;if(l!=null){var m;if((l==null?void 0:l.data)!=null&&l.data.length>0?m=l.data:m=f==null?void 0:f.slice(h,d+1),!(m==null||t==null||n==null||r==null||i==null||(r==null?void 0:r.length)===0||(i==null?void 0:i.length)===0))return Whe({displayedData:m,xAxis:t,yAxis:n,zAxis:a,scatterSettings:l,xAxisTicks:r,yAxisTicks:i,cells:u})}}),Rhe=["onMouseEnter","onClick","onMouseLeave"],Lhe=["id"],Bhe=["animationBegin","animationDuration","animationEasing","hide","isAnimationActive","legendType","lineJointType","lineType","shape","xAxisId","yAxisId","zAxisId"];function JS(e,t){if(e==null)return{};var r,n,i=Nhe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Nhe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Do(){return Do=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Do.apply(null,arguments)}function wR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wR(Object(r),!0).forEach(function(n){Ihe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ihe(e,t,r){return(t=jhe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jhe(e){var t=zhe(e,"string");return typeof t=="symbol"?t:t+""}function zhe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Hhe=e=>{var{dataKey:t,name:r,fill:n,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:n,value:fi(r,t),payload:e}]};function Fhe(e){var{points:t,props:r}=e,{line:n,lineType:i,lineJointType:a}=r;if(!n)return null;var l=Et(r),u=Ue(n,!1),f,h;if(i==="joint")f=t.map(x=>({x:x.cx,y:x.cy}));else if(i==="fitting"){var{xmin:d,xmax:m,a:v,b:g}=BW(t),S=x=>v*x+g;f=[{x:d,y:S(d)},{x:m,y:S(m)}]}var _=qr(qr(qr({},l),{},{fill:"none",stroke:l&&l.fill},u),{},{points:f});return w.isValidElement(n)?h=w.cloneElement(n,_):typeof n=="function"?h=n(_):h=w.createElement(wo,Do({},_,{type:a})),w.createElement(Pe,{className:"recharts-scatter-line",key:"recharts-scatter-line"},h)}function Uhe(e){var{showLabels:t,points:r,children:n}=e,i=Lh(),a=w.useMemo(()=>r==null?void 0:r.map(l=>{var u={x:l.x,y:l.y,width:l.width,height:l.height};return qr(qr({},u),{},{value:void 0,payload:l.payload,viewBox:u,parentViewBox:i,fill:void 0})}),[i,r]);return w.createElement(bu,{value:t?a:null},n)}function $he(e){var{points:t,allOtherScatterProps:r}=e,{shape:n,activeShape:i,dataKey:a}=r,l=he(Aa),{onMouseEnter:u,onClick:f,onMouseLeave:h}=r,d=JS(r,Rhe),m=Yh(u,r.dataKey),v=Xh(h),g=Gh(f,r.dataKey);if(t==null)return null;var{id:S}=r,_=JS(r,Lhe),x=Et(_);return w.createElement(w.Fragment,null,w.createElement(Fhe,{points:t,props:_}),t.map((C,A)=>{var O=i&&l===String(A),P=O?i:n,D=qr(qr(qr({key:"symbol-".concat(A)},x),C),{},{[Zw]:A,[Qw]:String(a)});return w.createElement(Pe,Do({className:"recharts-scatter-symbol"},Ta(d,C,A),{onMouseEnter:m(C,A),onMouseLeave:v(C,A),onClick:g(C,A),key:"symbol-".concat(C==null?void 0:C.cx,"-").concat(C==null?void 0:C.cy,"-").concat(C==null?void 0:C.size,"-").concat(A)}),w.createElement(whe,Do({option:P,isActive:O},D)))}))}function Khe(e){var{previousPointsRef:t,props:r}=e,{points:n,isAnimationActive:i,animationBegin:a,animationDuration:l,animationEasing:u}=r,f=t.current,h=La(r,"recharts-scatter-"),[d,m]=w.useState(!1),v=w.useCallback(()=>{m(!1)},[]),g=w.useCallback(()=>{m(!0)},[]),S=!d;return w.createElement(Uhe,{showLabels:S,points:n},r.children,w.createElement(Ra,{animationId:h,begin:a,duration:l,isActive:i,easing:u,onAnimationEnd:v,onAnimationStart:g,key:h},_=>{var x=_===1?n:n==null?void 0:n.map((C,A)=>{var O=f&&f[A];if(O){var P=Pd(O.cx,C.cx),D=Pd(O.cy,C.cy),k=Pd(O.size,C.size);return qr(qr({},C),{},{cx:P(_),cy:D(_),size:k(_)})}var R=Pd(0,C.size);return qr(qr({},C),{},{size:R(_)})});return _>0&&(t.current=x),w.createElement(Pe,null,w.createElement($he,{points:x,allOtherScatterProps:r,showLabels:S}))}),w.createElement(Ho,{label:r.label}))}function qhe(e){var{dataKey:t,points:r,stroke:n,strokeWidth:i,fill:a,name:l,hide:u,tooltipType:f}=e;return{dataDefinedOnItem:r==null?void 0:r.map(h=>h.tooltipPayload),positions:r==null?void 0:r.map(h=>h.tooltipPosition),settings:{stroke:n,strokeWidth:i,fill:a,nameKey:void 0,dataKey:t,name:fi(l,t),hide:u,type:f,color:a,unit:""}}}function Whe(e){var{displayedData:t,xAxis:r,yAxis:n,zAxis:i,scatterSettings:a,xAxisTicks:l,yAxisTicks:u,cells:f}=e,h=at(r.dataKey)?a.dataKey:r.dataKey,d=at(n.dataKey)?a.dataKey:n.dataKey,m=i&&i.dataKey,v=i?i.range:hv.defaultProps.range,g=v&&v[0],S=r.scale.bandwidth?r.scale.bandwidth():0,_=n.scale.bandwidth?n.scale.bandwidth():0;return t.map((x,C)=>{var A=Fe(x,h),O=Fe(x,d),P=!at(m)&&Fe(x,m)||"-",D=[{name:at(r.dataKey)?a.name:r.name||r.dataKey,unit:r.unit||"",value:A,payload:x,dataKey:h,type:a.tooltipType},{name:at(n.dataKey)?a.name:n.name||n.dataKey,unit:n.unit||"",value:O,payload:x,dataKey:d,type:a.tooltipType}];P!=="-"&&D.push({name:i.name||i.dataKey,unit:i.unit||"",value:P,payload:x,dataKey:m,type:a.tooltipType});var k=Vl({axis:r,ticks:l,bandSize:S,entry:x,index:C,dataKey:h}),R=Vl({axis:n,ticks:u,bandSize:_,entry:x,index:C,dataKey:d}),N=P!=="-"?i.scale(P):g,$=Math.sqrt(Math.max(N,0)/Math.PI);return qr(qr({},x),{},{cx:k,cy:R,x:k-$,y:R-$,width:2*$,height:2*$,size:N,node:{x:A,y:O,z:P},tooltipPayload:D,tooltipPosition:{x:k,y:R},payload:x},f&&f[C]&&f[C].props)})}var Vhe=(e,t,r)=>({x:e.cx,y:e.cy,value:r==="x"?+e.node.x:+e.node.y,errorVal:Fe(e,t)});function Yhe(e){var{hide:t,points:r,className:n,needClip:i,xAxisId:a,yAxisId:l,id:u}=e,f=w.useRef(null);if(t)return null;var h=Me("recharts-scatter",n),d=u;return w.createElement(Pe,{className:h,clipPath:i?"url(#clipPath-".concat(d,")"):null,id:u},i&&w.createElement("defs",null,w.createElement(uv,{clipPathId:d,xAxisId:a,yAxisId:l})),w.createElement(_x,{xAxisId:a,yAxisId:l,data:r,dataPointFormatter:Vhe,errorBarOffset:0},w.createElement(Pe,{key:"recharts-scatter-symbols"},w.createElement(Khe,{props:e,previousPointsRef:f}))))}var n5={xAxisId:0,yAxisId:0,zAxisId:0,legendType:"circle",lineType:"joint",lineJointType:"linear",data:[],shape:"circle",hide:!1,isAnimationActive:!Nn.isSsr,animationBegin:0,animationDuration:400,animationEasing:"linear"};function Xhe(e){var t=jt(e,n5),{animationBegin:r,animationDuration:n,animationEasing:i,hide:a,isAnimationActive:l,legendType:u,lineJointType:f,lineType:h,shape:d,xAxisId:m,yAxisId:v,zAxisId:g}=t,S=JS(t,Bhe),{needClip:_}=Qh(m,v),x=w.useMemo(()=>kh(e.children,zo),[e.children]),C=Tt(),A=he(O=>Mhe(O,m,v,g,e.id,x,C));return _==null||A==null?null:w.createElement(w.Fragment,null,w.createElement(Bs,{fn:qhe,args:qr(qr({},e),{},{points:A})}),w.createElement(Yhe,Do({},S,{xAxisId:m,yAxisId:v,zAxisId:g,lineType:h,lineJointType:f,legendType:u,shape:d,hide:a,isAnimationActive:l,animationBegin:r,animationDuration:n,animationEasing:i,points:A,needClip:_})))}function i5(e){var t=jt(e,n5),r=Tt();return w.createElement(Cu,{id:t.id,type:"scatter"},n=>w.createElement(w.Fragment,null,w.createElement(ov,{legendPayload:Hhe(t)}),w.createElement(lv,{type:"scatter",id:n,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:t.zAxisId,dataKey:t.dataKey,hide:t.hide,name:t.name,tooltipType:t.tooltipType,isPanorama:r}),w.createElement(Xhe,Do({},t,{id:n}))))}i5.displayName="Scatter";var Ghe=["children"],Zhe=["dangerouslySetInnerHTML","ticks"],Qhe=["id"];function a5(e,t,r){return(t=Jhe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jhe(e){var t=efe(e,"string");return typeof t=="symbol"?t:t+""}function efe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ew(){return ew=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ew.apply(null,arguments)}function tw(e,t){if(e==null)return{};var r,n,i=tfe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function tfe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function rfe(e){var t=Je(),r=w.useMemo(()=>{var{children:n}=e,i=tw(e,Ghe);return i},[e]);return w.useEffect(()=>(t(Pse(r)),()=>{t(Tse(r))}),[r,t]),e.children}var nfe=e=>{var{xAxisId:t,className:r}=e,n=he(Jw),i=Tt(),a="xAxis",l=he(x=>ci(x,a,t,i)),u=he(x=>mj(x,a,t,i)),f=he(x=>hj(x,t)),h=he(x=>vte(x,t)),d=he(x=>UI(x,t));if(f==null||h==null||d==null)return null;var{dangerouslySetInnerHTML:m,ticks:v}=e,g=tw(e,Zhe),{id:S}=d,_=tw(d,Qhe);return w.createElement(Ns,ew({},g,_,{scale:l,x:h.x,y:h.y,width:f.width,height:f.height,className:Me("recharts-".concat(a," ").concat(a),r),viewBox:n,ticks:u}))},ife=e=>{var t,r,n,i,a;return w.createElement(rfe,{interval:(t=e.interval)!==null&&t!==void 0?t:"preserveEnd",id:e.xAxisId,scale:e.scale,type:e.type,padding:e.padding,allowDataOverflow:e.allowDataOverflow,domain:e.domain,dataKey:e.dataKey,allowDuplicatedCategory:e.allowDuplicatedCategory,allowDecimals:e.allowDecimals,tickCount:e.tickCount,includeHidden:(r=e.includeHidden)!==null&&r!==void 0?r:!1,reversed:e.reversed,ticks:e.ticks,height:e.height,orientation:e.orientation,mirror:e.mirror,hide:e.hide,unit:e.unit,name:e.name,angle:(n=e.angle)!==null&&n!==void 0?n:0,minTickGap:(i=e.minTickGap)!==null&&i!==void 0?i:5,tick:(a=e.tick)!==null&&a!==void 0?a:!0,tickFormatter:e.tickFormatter},w.createElement(nfe,e))};class Dx extends w.Component{render(){return w.createElement(ife,this.props)}}a5(Dx,"displayName","XAxis");a5(Dx,"defaultProps",{allowDataOverflow:Tn.allowDataOverflow,allowDecimals:Tn.allowDecimals,allowDuplicatedCategory:Tn.allowDuplicatedCategory,height:Tn.height,hide:!1,mirror:Tn.mirror,orientation:Tn.orientation,padding:Tn.padding,reversed:Tn.reversed,scale:Tn.scale,tickCount:Tn.tickCount,type:Tn.type,xAxisId:0});var afe=e=>{var{ticks:t,label:r,labelGapWithTick:n=5,tickSize:i=0,tickMargin:a=0}=e,l=0;if(t){t.forEach(d=>{if(d){var m=d.getBoundingClientRect();m.width>l&&(l=m.width)}});var u=r?r.getBoundingClientRect().width:0,f=i+a,h=l+f+u+(r?n:0);return Math.round(h)}return 0},sfe=["dangerouslySetInnerHTML","ticks"],ofe=["id"];function s5(e,t,r){return(t=lfe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lfe(e){var t=ufe(e,"string");return typeof t=="symbol"?t:t+""}function ufe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rw(){return rw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rw.apply(null,arguments)}function xR(e,t){if(e==null)return{};var r,n,i=cfe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function cfe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function hfe(e){var t=Je();return w.useEffect(()=>(t(Dse(e)),()=>{t(Mse(e))}),[e,t]),null}var ffe=e=>{var t,{yAxisId:r,className:n,width:i,label:a}=e,l=w.useRef(null),u=w.useRef(null),f=he(Jw),h=Tt(),d=Je(),m="yAxis",v=he(k=>ci(k,m,r,h)),g=he(k=>fj(k,r)),S=he(k=>gte(k,r)),_=he(k=>mj(k,m,r,h)),x=he(k=>$I(k,r));if(w.useLayoutEffect(()=>{var k;if(!(i!=="auto"||!g||ax(a)||w.isValidElement(a)||x==null)){var R=l.current,N=R==null||(k=R.tickRefs)===null||k===void 0?void 0:k.current,{tickSize:$,tickMargin:ee}=R.props,F=afe({ticks:N,label:u.current,labelGapWithTick:5,tickSize:$,tickMargin:ee});Math.round(g.width)!==Math.round(F)&&d(Bse({id:r,width:F}))}},[l,l==null||(t=l.current)===null||t===void 0||(t=t.tickRefs)===null||t===void 0?void 0:t.current,g==null?void 0:g.width,g,d,a,r,i]),g==null||S==null||x==null)return null;var{dangerouslySetInnerHTML:C,ticks:A}=e,O=xR(e,sfe),{id:P}=x,D=xR(x,ofe);return w.createElement(Ns,rw({},O,D,{ref:l,labelRef:u,scale:v,x:S.x,y:S.y,tickTextProps:i==="auto"?{width:void 0}:{width:i},width:g.width,height:g.height,className:Me("recharts-".concat(m," ").concat(m),n),viewBox:f,ticks:_}))},dfe=e=>{var t,r,n,i,a;return w.createElement(w.Fragment,null,w.createElement(hfe,{interval:(t=e.interval)!==null&&t!==void 0?t:"preserveEnd",id:e.yAxisId,scale:e.scale,type:e.type,domain:e.domain,allowDataOverflow:e.allowDataOverflow,dataKey:e.dataKey,allowDuplicatedCategory:e.allowDuplicatedCategory,allowDecimals:e.allowDecimals,tickCount:e.tickCount,padding:e.padding,includeHidden:(r=e.includeHidden)!==null&&r!==void 0?r:!1,reversed:e.reversed,ticks:e.ticks,width:e.width,orientation:e.orientation,mirror:e.mirror,hide:e.hide,unit:e.unit,name:e.name,angle:(n=e.angle)!==null&&n!==void 0?n:0,minTickGap:(i=e.minTickGap)!==null&&i!==void 0?i:5,tick:(a=e.tick)!==null&&a!==void 0?a:!0,tickFormatter:e.tickFormatter}),w.createElement(ffe,e))},pfe={allowDataOverflow:Dn.allowDataOverflow,allowDecimals:Dn.allowDecimals,allowDuplicatedCategory:Dn.allowDuplicatedCategory,hide:!1,mirror:Dn.mirror,orientation:Dn.orientation,padding:Dn.padding,reversed:Dn.reversed,scale:Dn.scale,tickCount:Dn.tickCount,type:Dn.type,width:Dn.width,yAxisId:0};class Mx extends w.Component{render(){return w.createElement(dfe,this.props)}}s5(Mx,"displayName","YAxis");s5(Mx,"defaultProps",pfe);var mfe={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}};function o5(e){var t=jt(e,mfe),{animationId:r,from:n,to:i,attributeName:a,isActive:l,canBegin:u,duration:f,easing:h,begin:d,onAnimationEnd:m,onAnimationStart:v,children:g}=t,S=R3(r+a,t.animationManager),[_,x]=w.useState(()=>l?n:i),C=w.useRef(!1),A=w.useCallback(()=>{x(n),v()},[n,v]);if(w.useEffect(()=>{if(!l||!u)return P3;C.current=!0;var P=S.subscribe(x);return S.start([A,d,i,f,m]),()=>{S.stop(),P&&P(),m()}},[l,u,f,h,d,A,m,S,i,n]),!l)return g({[a]:i});if(!u)return g({[a]:n});if(C.current){var O=n1([a],f,h);return g({transition:O,[a]:_})}return g({[a]:n})}var vfe=["direction","width","dataKey","isAnimationActive","animationBegin","animationDuration","animationEasing"];function bh(){return bh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bh.apply(null,arguments)}function CR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ER(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CR(Object(r),!0).forEach(function(n){Rx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Rx(e,t,r){return(t=gfe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gfe(e){var t=yfe(e,"string");return typeof t=="symbol"?t:t+""}function yfe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _fe(e,t){if(e==null)return{};var r,n,i=bfe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function bfe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Sfe(e){var{direction:t,width:r,dataKey:n,isAnimationActive:i,animationBegin:a,animationDuration:l,animationEasing:u}=e,f=_fe(e,vfe),h=Et(f),{data:d,dataPointFormatter:m,xAxisId:v,yAxisId:g,errorBarOffset:S}=Foe(),_=zse(v),x=Hse(g);if((_==null?void 0:_.scale)==null||(x==null?void 0:x.scale)==null||d==null||t==="x"&&_.type!=="number")return null;var C=d.map(A=>{var{x:O,y:P,value:D,errorVal:k}=m(A,n,t);if(!k||O==null||P==null)return null;var R=[],N,$;if(Array.isArray(k)?[N,$]=k:N=$=k,t==="x"){var{scale:ee}=_,F=P+S,z=F+r,j=F-r,K=ee(D-N),W=ee(D+$);R.push({x1:W,y1:z,x2:W,y2:j}),R.push({x1:K,y1:F,x2:W,y2:F}),R.push({x1:K,y1:z,x2:K,y2:j})}else if(t==="y"){var{scale:B}=x,q=O+S,G=q-r,ce=q+r,M=B(D-N),I=B(D+$);R.push({x1:G,y1:I,x2:ce,y2:I}),R.push({x1:q,y1:M,x2:q,y2:I}),R.push({x1:G,y1:M,x2:ce,y2:M})}var Y=t==="x"?"scaleX":"scaleY",L="".concat(O+S,"px ").concat(P+S,"px");return w.createElement(Pe,bh({className:"recharts-errorBar",key:"bar-".concat(R.map(ue=>"".concat(ue.x1,"-").concat(ue.x2,"-").concat(ue.y1,"-").concat(ue.y2)))},h),R.map(ue=>{var fe=i?{transformOrigin:L}:void 0;return w.createElement(o5,{animationId:"error-bar-".concat(t),from:"".concat(Y,"(0)"),to:"".concat(Y,"(1)"),attributeName:"transform",begin:a,easing:u,isActive:i,duration:l,key:"errorbar-".concat(ue.x1,"-").concat(ue.x2,"-").concat(ue.y1,"-").concat(ue.y2)},pe=>w.createElement("line",bh({},ue,{style:ER(ER({},fe),pe)})))}))});return w.createElement(Pe,{className:"recharts-errorBars"},C)}function wfe(e){var t=ou();return e??(t!=null&&t==="horizontal"?"y":"x")}var l5={stroke:"black",strokeWidth:1.5,width:5,offset:0,isAnimationActive:!0,animationBegin:0,animationDuration:400,animationEasing:"ease-in-out"};function xfe(e){var t=wfe(e.direction),{width:r,isAnimationActive:n,animationBegin:i,animationDuration:a,animationEasing:l}=jt(e,l5);return w.createElement(w.Fragment,null,w.createElement(Uoe,{dataKey:e.dataKey,direction:t}),w.createElement(Sfe,bh({},e,{direction:t,width:r,isAnimationActive:n,animationBegin:i,animationDuration:a,animationEasing:l})))}class Lx extends w.Component{render(){return w.createElement(xfe,this.props)}}Rx(Lx,"defaultProps",l5);Rx(Lx,"displayName","ErrorBar");var Yb={exports:{}},Xb={};/**
 * @license React
 * use-sync-external-store-with-selector.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var AR;function Cfe(){if(AR)return Xb;AR=1;var e=tu();function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,i=e.useRef,a=e.useEffect,l=e.useMemo,u=e.useDebugValue;return Xb.useSyncExternalStoreWithSelector=function(f,h,d,m,v){var g=i(null);if(g.current===null){var S={hasValue:!1,value:null};g.current=S}else S=g.current;g=l(function(){function x(D){if(!C){if(C=!0,A=D,D=m(D),v!==void 0&&S.hasValue){var k=S.value;if(v(k,D))return O=k}return O=D}if(k=O,r(A,D))return k;var R=m(D);return v!==void 0&&v(k,R)?(A=D,k):(A=D,O=R)}var C=!1,A,O,P=d===void 0?null:d;return[function(){return x(h())},P===null?void 0:function(){return x(P())}]},[h,d,m,v]);var _=n(f,g[0],g[1]);return a(function(){S.hasValue=!0,S.value=_},[_]),u(_),_},Xb}var OR;function Efe(){return OR||(OR=1,Yb.exports=Cfe()),Yb.exports}Efe();function Afe(e){e()}function Ofe(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Afe(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const i=t={callback:r,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!n||e===null||(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var kR={notify(){},get:()=>[]};function kfe(e,t){let r,n=kR,i=0,a=!1;function l(_){d();const x=n.subscribe(_);let C=!1;return()=>{C||(C=!0,x(),m())}}function u(){n.notify()}function f(){S.onStateChange&&S.onStateChange()}function h(){return a}function d(){i++,r||(r=e.subscribe(f),n=Ofe())}function m(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=kR)}function v(){a||(a=!0,d())}function g(){a&&(a=!1,m())}const S={addNestedSub:l,notifyNestedSubs:u,handleChangeWrapper:f,isSubscribed:h,trySubscribe:v,tryUnsubscribe:g,getListeners:()=>n};return S}var Pfe=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Tfe=Pfe(),Dfe=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Mfe=Dfe(),Rfe=()=>Tfe||Mfe?w.useLayoutEffect:w.useEffect,Lfe=Rfe(),Gb=Symbol.for("react-redux-context"),Zb=typeof globalThis<"u"?globalThis:{};function Bfe(){if(!w.createContext)return{};const e=Zb[Gb]??(Zb[Gb]=new Map);let t=e.get(w.createContext);return t||(t=w.createContext(null),e.set(w.createContext,t)),t}var Nfe=Bfe();function Ife(e){const{children:t,context:r,serverState:n,store:i}=e,a=w.useMemo(()=>{const f=kfe(i);return{store:i,subscription:f,getServerState:n?()=>n:void 0}},[i,n]),l=w.useMemo(()=>i.getState(),[i]);Lfe(()=>{const{subscription:f}=a;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),l!==i.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[a,l]);const u=r||Nfe;return w.createElement(u.Provider,{value:a},t)}var jfe=Ife,zfe=(e,t)=>t,Bx=X([zfe,$e,du,pr,Dj,ja,_re,ar],Cre),Nx=e=>{var t=e.currentTarget.getBoundingClientRect(),r=t.width/e.currentTarget.offsetWidth,n=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/r),chartY:Math.round((e.clientY-t.top)/n)}},u5=li("mouseClick"),c5=Dh();c5.startListening({actionCreator:u5,effect:(e,t)=>{var r=e.payload,n=Bx(t.getState(),Nx(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(kte({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var nw=li("mouseMove"),h5=Dh();h5.startListening({actionCreator:nw,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=Y1(n,n.tooltip.settings.shared),a=Bx(n,Nx(r));i==="axis"&&((a==null?void 0:a.activeIndex)!=null?t.dispatch(Cj({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate})):t.dispatch(wj()))}});function Hfe(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":t}var PR={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},f5=In({name:"rootProps",initialState:PR,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:PR.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className}}}),Ffe=f5.reducer,{updateOptions:Ufe}=f5.actions,d5=In({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:$fe}=d5.actions,Kfe=d5.reducer,p5=li("keyDown"),m5=li("focus"),Ix=Dh();Ix.startListening({actionCreator:p5,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip,a=e.payload;if(!(a!=="ArrowRight"&&a!=="ArrowLeft"&&a!=="Enter")){var l=Number(X1(i,_u(r))),u=ja(r);if(a==="Enter"){var f=qp(r,"axis","hover",String(i.index));t.dispatch(US({active:!i.active,activeIndex:i.index,activeDataKey:i.dataKey,activeCoordinate:f}));return}var h=bte(r),d=h==="left-to-right"?1:-1,m=a==="ArrowRight"?1:-1,v=l+m*d;if(!(u==null||v>=u.length||v<0)){var g=qp(r,"axis","hover",String(v));t.dispatch(US({active:!0,activeIndex:v.toString(),activeDataKey:void 0,activeCoordinate:g}))}}}}});Ix.startListening({actionCreator:m5,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;if(!i.active&&i.index==null){var a="0",l=qp(r,"axis","hover",String(a));t.dispatch(US({activeDataKey:void 0,active:!0,activeIndex:a,activeCoordinate:l}))}}}});var ti=li("externalEvent"),v5=Dh();v5.startListening({actionCreator:ti,effect:(e,t)=>{if(e.payload.handler!=null){var r=t.getState(),n={activeCoordinate:cre(r),activeDataKey:Bj(r),activeIndex:Aa(r),activeLabel:Lj(r),activeTooltipIndex:Aa(r),isTooltipActive:hre(r)};e.payload.handler(n,e.payload.reactEvent)}}});var qfe=X([yu],e=>e.tooltipItemPayloads),Wfe=X([qfe,Wh,(e,t,r)=>t,(e,t,r)=>r],(e,t,r,n)=>{var i=e.find(u=>u.settings.dataKey===n);if(i!=null){var{positions:a}=i;if(a!=null){var l=t(a,r);return l}}}),g5=li("touchMove"),y5=Dh();y5.startListening({actionCreator:g5,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=Y1(n,n.tooltip.settings.shared);if(i==="axis"){var a=Bx(n,Nx({clientX:r.touches[0].clientX,clientY:r.touches[0].clientY,currentTarget:r.currentTarget}));(a==null?void 0:a.activeIndex)!=null&&t.dispatch(Cj({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate}))}else if(i==="item"){var l,u=r.touches[0],f=document.elementFromPoint(u.clientX,u.clientY);if(!f||!f.getAttribute)return;var h=f.getAttribute(Zw),d=(l=f.getAttribute(Qw))!==null&&l!==void 0?l:void 0,m=Wfe(t.getState(),h,d);t.dispatch(Qm({activeDataKey:d,activeIndex:h,activeCoordinate:m}))}}});var Vfe=qN({brush:Vle,cartesianAxis:Nse,chartData:zre,errorBars:Noe,graphicalItems:ese,layout:EX,legend:gG,options:Bre,polarAxis:Vie,polarOptions:Kfe,referenceElements:_ue,rootProps:Ffe,tooltip:Pte}),Yfe=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return QY({reducer:Vfe,preloadedState:t,middleware:n=>n({serializableCheck:!1}).concat([c5.middleware,h5.middleware,Ix.middleware,v5.middleware,y5.middleware]),devTools:!!window.RECHARTS_DEV_TOOLS_ENABLED&&{serialize:{replacer:Hfe},name:"recharts-".concat(r)}})};function jx(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,i=Tt(),a=w.useRef(null);if(i)return r;a.current==null&&(a.current=Yfe(t,n));var l=qw;return w.createElement(jfe,{context:l,store:a.current},r)}function _5(e){var{layout:t,width:r,height:n,margin:i}=e,a=Je(),l=Tt();return w.useEffect(()=>{l||(a(xX(t)),a(m3({width:r,height:n})),a(p3(i)))},[a,l,t,r,n,i]),null}function b5(e){var t=Je();return w.useEffect(()=>{t(Ufe(e))},[t,e]),null}var Xfe=["children"];function Gfe(e,t){if(e==null)return{};var r,n,i=Zfe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Zfe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function tm(){return tm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tm.apply(null,arguments)}var Qfe={width:"100%",height:"100%"},Jfe=w.forwardRef((e,t)=>{var r=e1(),n=t1(),i=k3();if(!Es(r)||!Es(n))return null;var{children:a,otherAttributes:l,title:u,desc:f}=e,h,d;return typeof l.tabIndex=="number"?h=l.tabIndex:h=i?0:void 0,typeof l.role=="string"?d=l.role:d=i?"application":void 0,w.createElement(gm,tm({},l,{title:u,desc:f,role:d,tabIndex:h,width:r,height:n,style:Qfe,ref:t}),a)}),ede=e=>{var{children:t}=e,r=he(Rh);if(!r)return null;var{width:n,height:i,y:a,x:l}=r;return w.createElement(gm,{width:n,height:i,x:l,y:a},t)},TR=w.forwardRef((e,t)=>{var{children:r}=e,n=Gfe(e,Xfe),i=Tt();return i?w.createElement(ede,null,r):w.createElement(Jfe,tm({ref:t},n),r)});function tde(){var e=Je(),[t,r]=w.useState(null),n=he(JX);return w.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),a=i.width/t.offsetWidth;zr(a)&&a!==n&&e(CX(a))}},[t,e,n]),r}function DR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function rde(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?DR(Object(r),!0).forEach(function(n){nde(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nde(e,t,r){return(t=ide(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ide(e){var t=ade(e,"string");return typeof t=="symbol"?t:t+""}function ade(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var S5=w.forwardRef((e,t)=>{var{children:r,className:n,height:i,onClick:a,onContextMenu:l,onDoubleClick:u,onMouseDown:f,onMouseEnter:h,onMouseLeave:d,onMouseMove:m,onMouseUp:v,onTouchEnd:g,onTouchMove:S,onTouchStart:_,style:x,width:C}=e,A=Je(),[O,P]=w.useState(null),[D,k]=w.useState(null);Yre();var R=tde(),N=w.useCallback(Y=>{R(Y),typeof t=="function"&&t(Y),P(Y),k(Y)},[R,t,P,k]),$=w.useCallback(Y=>{A(u5(Y)),A(ti({handler:a,reactEvent:Y}))},[A,a]),ee=w.useCallback(Y=>{A(nw(Y)),A(ti({handler:h,reactEvent:Y}))},[A,h]),F=w.useCallback(Y=>{A(wj()),A(ti({handler:d,reactEvent:Y}))},[A,d]),z=w.useCallback(Y=>{A(nw(Y)),A(ti({handler:m,reactEvent:Y}))},[A,m]),j=w.useCallback(()=>{A(m5())},[A]),K=w.useCallback(Y=>{A(p5(Y.key))},[A]),W=w.useCallback(Y=>{A(ti({handler:l,reactEvent:Y}))},[A,l]),B=w.useCallback(Y=>{A(ti({handler:u,reactEvent:Y}))},[A,u]),q=w.useCallback(Y=>{A(ti({handler:f,reactEvent:Y}))},[A,f]),G=w.useCallback(Y=>{A(ti({handler:v,reactEvent:Y}))},[A,v]),ce=w.useCallback(Y=>{A(ti({handler:_,reactEvent:Y}))},[A,_]),M=w.useCallback(Y=>{A(g5(Y)),A(ti({handler:S,reactEvent:Y}))},[A,S]),I=w.useCallback(Y=>{A(ti({handler:g,reactEvent:Y}))},[A,g]);return w.createElement(ix.Provider,{value:O},w.createElement(cN.Provider,{value:D},w.createElement("div",{className:Me("recharts-wrapper",n),style:rde({position:"relative",cursor:"default",width:C,height:i},x),onClick:$,onContextMenu:W,onDoubleClick:B,onFocus:j,onKeyDown:K,onMouseDown:q,onMouseEnter:ee,onMouseLeave:F,onMouseMove:z,onMouseUp:G,onTouchEnd:I,onTouchMove:M,onTouchStart:ce,ref:N},r)))}),sde=["children","className","width","height","style","compact","title","desc"];function ode(e,t){if(e==null)return{};var r,n,i=lde(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function lde(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var w5=w.forwardRef((e,t)=>{var{children:r,className:n,width:i,height:a,style:l,compact:u,title:f,desc:h}=e,d=ode(e,sde),m=Et(d);return u?w.createElement(TR,{otherAttributes:m,title:f,desc:h},r):w.createElement(S5,{className:n,style:l,width:i,height:a,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},w.createElement(TR,{otherAttributes:m,title:f,desc:h,ref:t},w.createElement(bue,null,r)))}),ude=["width","height"];function iw(){return iw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},iw.apply(null,arguments)}function cde(e,t){if(e==null)return{};var r,n,i=hde(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function hde(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var fde={top:5,right:5,bottom:5,left:5},dde={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:fde,reverseStackOrder:!1,syncMethod:"index"},Eu=w.forwardRef(function(t,r){var n,i=jt(t.categoricalChartProps,dde),{width:a,height:l}=i,u=cde(i,ude);if(!Es(a)||!Es(l))return null;var{chartName:f,defaultTooltipEventType:h,validateTooltipEventTypes:d,tooltipPayloadSearcher:m,categoricalChartProps:v}=t,g={chartName:f,defaultTooltipEventType:h,validateTooltipEventTypes:d,tooltipPayloadSearcher:m,eventEmitter:void 0};return w.createElement(jx,{preloadedState:{options:g},reduxStoreName:(n=v.id)!==null&&n!==void 0?n:f},w.createElement(Dz,{chartData:v.data}),w.createElement(_5,{width:a,height:l,layout:i.layout,margin:i.margin}),w.createElement(b5,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),w.createElement(w5,iw({},u,{width:a,height:l,ref:r})))}),pde=["axis"],mde=w.forwardRef((e,t)=>w.createElement(Eu,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:pde,tooltipPayloadSearcher:Ls,categoricalChartProps:e,ref:t})),vde=["axis","item"],gde=w.forwardRef((e,t)=>w.createElement(Eu,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:vde,tooltipPayloadSearcher:Ls,categoricalChartProps:e,ref:t}));function yde(e){var t=Je();return w.useEffect(()=>{t($fe(e))},[t,e]),null}var _de=["width","height","layout"];function aw(){return aw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},aw.apply(null,arguments)}function bde(e,t){if(e==null)return{};var r,n,i=Sde(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Sde(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var wde={top:5,right:5,bottom:5,left:5},xde={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:wde,reverseStackOrder:!1,syncMethod:"index",layout:"radial"},x5=w.forwardRef(function(t,r){var n,i=jt(t.categoricalChartProps,xde),{width:a,height:l,layout:u}=i,f=bde(i,_de);if(!Es(a)||!Es(l))return null;var{chartName:h,defaultTooltipEventType:d,validateTooltipEventTypes:m,tooltipPayloadSearcher:v}=t,g={chartName:h,defaultTooltipEventType:d,validateTooltipEventTypes:m,tooltipPayloadSearcher:v,eventEmitter:void 0};return w.createElement(jx,{preloadedState:{options:g},reduxStoreName:(n=i.id)!==null&&n!==void 0?n:h},w.createElement(Dz,{chartData:i.data}),w.createElement(_5,{width:a,height:l,layout:u,margin:i.margin}),w.createElement(b5,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),w.createElement(yde,{cx:i.cx,cy:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius}),w.createElement(w5,aw({width:a,height:l},f,{ref:r})))}),Cde=["item"],Ede={layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},Ade=w.forwardRef((e,t)=>{var r=jt(e,Ede);return w.createElement(x5,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:Cde,tooltipPayloadSearcher:Ls,categoricalChartProps:r,ref:t})}),Qb={},Jb={},e0={},MR;function Ode(){return MR||(MR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof Buffer<"u"&&Buffer.isBuffer(r)}e.isBuffer=t})(e0)),e0}var t0={},RR;function kde(){return RR||(RR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){const n=r==null?void 0:r.constructor,i=typeof n=="function"?n.prototype:Object.prototype;return r===i}e.isPrototype=t})(t0)),t0}var r0={},LR;function Pde(){return LR||(LR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=LN();function r(n){return t.isTypedArray(n)}e.isTypedArray=r})(r0)),r0}var n0={},i0={},BR;function Tde(){return BR||(BR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=I3();function r(n){const i=t.toFinite(n),a=i%1;return a?i-a:i}e.toInteger=r})(i0)),i0}var NR;function Dde(){return NR||(NR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Tde();function r(n,i){if(n=t.toInteger(n),n<1||!Number.isSafeInteger(n))return[];const a=new Array(n);for(let l=0;l<n;l++)a[l]=typeof i=="function"?i(l):l;return a}e.times=r})(n0)),n0}var IR;function Mde(){return IR||(IR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ode(),r=kde(),n=Ph(),i=Pde(),a=Dde();function l(d){if(d==null)return[];switch(typeof d){case"object":case"function":return n.isArrayLike(d)?h(d):r.isPrototype(d)?f(d):u(d);default:return u(Object(d))}}function u(d){const m=[];for(const v in d)m.push(v);return m}function f(d){return u(d).filter(v=>v!=="constructor")}function h(d){const m=a.times(d.length,S=>`${S}`),v=new Set(m);t.isBuffer(d)&&(v.add("offset"),v.add("parent")),i.isTypedArray(d)&&(v.add("buffer"),v.add("byteLength"),v.add("byteOffset"));const g=u(d).filter(S=>!v.has(S));return Array.isArray(d)?[...m,...g]:[...m.filter(S=>Object.hasOwn(d,S)),...g]}e.keysIn=l})(Jb)),Jb}var a0={},jR;function Rde(){return jR||(jR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=mm(),r=iN(),n=fm(),i=dm(),a=pm();function l(f,h){if(f==null)return!0;switch(typeof h){case"symbol":case"number":case"object":{if(Array.isArray(h))return u(f,h);if(typeof h=="number"?h=i.toKey(h):typeof h=="object"&&(Object.is(h==null?void 0:h.valueOf(),-0)?h="-0":h=String(h)),r.isUnsafeProperty(h))return!1;if((f==null?void 0:f[h])===void 0)return!0;try{return delete f[h],!0}catch{return!1}}case"string":{if((f==null?void 0:f[h])===void 0&&n.isDeepKey(h))return u(f,a.toPath(h));if(r.isUnsafeProperty(h))return!1;try{return delete f[h],!0}catch{return!1}}}}function u(f,h){const d=h.length===1?f:t.get(f,h.slice(0,-1)),m=h[h.length-1];if((d==null?void 0:d[m])===void 0)return!0;if(r.isUnsafeProperty(m))return!1;try{return delete d[m],!0}catch{return!1}}e.unset=l})(a0)),a0}var s0={},zR;function Lde(){return zR||(zR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=MN();function r(n){const i=[];for(;n;)i.push(...t.getSymbols(n)),n=Object.getPrototypeOf(n);return i}e.getSymbolsIn=r})(s0)),s0}var o0={},HR;function Bde(){return HR||(HR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ph();function r(n,i=1){const a=[],l=Math.floor(i);if(!t.isArrayLike(n))return a;const u=(f,h)=>{for(let d=0;d<f.length;d++){const m=f[d];h<l&&(Array.isArray(m)||m!=null&&m[Symbol.isConcatSpreadable]||m!==null&&typeof m=="object"&&Object.prototype.toString.call(m)==="[object Arguments]")?Array.isArray(m)?u(m,h+1):u(Array.from(m),h+1):a.push(m)}};return u(Array.from(n),0),a}e.flatten=r})(o0)),o0}var FR;function Nde(){return FR||(FR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=NN(),r=Mde(),n=Rde(),i=Lde(),a=fm(),l=Bde(),u=pz();function f(v,...g){if(v==null)return{};g=l.flatten(g);const S=h(v,g);for(let _=0;_<g.length;_++){let x=g[_];switch(typeof x){case"object":{Array.isArray(x)||(x=Array.from(x));for(let C=0;C<x.length;C++){const A=x[C];n.unset(S,A)}break}case"string":case"symbol":case"number":{n.unset(S,x);break}}}return S}function h(v,g){return g.some(_=>Array.isArray(_)||a.isDeepKey(_))?m(v):d(v)}function d(v){const g={},S=[...r.keysIn(v),...i.getSymbolsIn(v)];for(let _=0;_<S.length;_++){const x=S[_];g[x]=v[x]}return g}function m(v){const g={},S=[...r.keysIn(v),...i.getSymbolsIn(v)];for(let _=0;_<S.length;_++){const x=S[_];g[x]=t.cloneDeepWith(v[x],C=>{if(!u.isPlainObject(C))return C})}return g}e.omit=f})(Qb)),Qb}var l0,UR;function Ide(){return UR||(UR=1,l0=Nde().omit),l0}var jde=Ide();const C5=Hr(jde);var zde=["width","height","className","style","children","type"];function Hde(e,t){if(e==null)return{};var r,n,i=Fde(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Fde(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Mo(){return Mo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Mo.apply(null,arguments)}function $R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$R(Object(r),!0).forEach(function(n){yo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$R(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yo(e,t,r){return(t=Ude(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ude(e){var t=$de(e,"string");return typeof t=="symbol"?t:t+""}function $de(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rm="value",E5=(e,t)=>ba(e,t),Kde=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"".concat(r,"children[").concat(t,"]")},qde={chartName:"Treemap",defaultTooltipEventType:"item",validateTooltipEventTypes:["item"],tooltipPayloadSearcher:E5,eventEmitter:void 0},tp=e=>{var{depth:t,node:r,index:n,dataKey:i,nameKey:a,nestedActiveTooltipIndex:l}=e,u=t===0?"":Kde(n,l),{children:f}=r,h=t+1,d=f&&f.length?f.map((v,g)=>tp({depth:h,node:v,index:g,dataKey:i,nameKey:a,nestedActiveTooltipIndex:u})):null,m;return f&&f.length?m=d.reduce((v,g)=>v+g[rm],0):m=Er(r[i])||r[i]<=0?0:r[i],Mt(Mt({},r),{},{children:d,name:Fe(r,a,""),[rm]:m,depth:t,index:n,tooltipIndex:u})},Wde=e=>({x:e.x,y:e.y,width:e.width,height:e.height}),Vde=(e,t)=>{var r=t<0?0:t;return e.map(n=>{var i=n[rm]*r;return Mt(Mt({},n),{},{area:Er(i)||i<=0?0:i})})},Yde=(e,t,r)=>{var n=t*t,i=e.area*e.area,{min:a,max:l}=e.reduce((u,f)=>({min:Math.min(u.min,f.area),max:Math.max(u.max,f.area)}),{min:1/0,max:0});return i?Math.max(n*l*r/i,i/(n*a*r)):1/0},Xde=(e,t,r,n)=>{var i=t?Math.round(e.area/t):0;(n||i>r.height)&&(i=r.height);for(var a=r.x,l,u=0,f=e.length;u<f;u++)l=e[u],l.x=a,l.y=r.y,l.height=i,l.width=Math.min(i?Math.round(l.area/i):0,r.x+r.width-a),a+=l.width;return l.width+=r.x+r.width-a,Mt(Mt({},r),{},{y:r.y+i,height:r.height-i})},Gde=(e,t,r,n)=>{var i=t?Math.round(e.area/t):0;(n||i>r.width)&&(i=r.width);for(var a=r.y,l,u=0,f=e.length;u<f;u++)l=e[u],l.x=r.x,l.y=a,l.width=i,l.height=Math.min(i?Math.round(l.area/i):0,r.y+r.height-a),a+=l.height;return l&&(l.height+=r.y+r.height-a),Mt(Mt({},r),{},{x:r.x+i,width:r.width-i})},KR=(e,t,r,n)=>t===r.width?Xde(e,t,r,n):Gde(e,t,r,n),rp=(e,t)=>{var{children:r}=e;if(r&&r.length){var n=Wde(e),i=[],a=1/0,l,u,f=Math.min(n.width,n.height),h=Vde(r,n.width*n.height/e[rm]),d=h.slice();for(i.area=0;d.length>0;)i.push(l=d[0]),i.area+=l.area,u=Yde(i,f,t),u<=a?(d.shift(),a=u):(i.area-=i.pop().area,n=KR(i,f,n,!1),f=Math.min(n.width,n.height),i.length=i.area=0,a=1/0);return i.length&&(n=KR(i,f,n,!0),i.length=i.area=0),Mt(Mt({},e),{},{children:h.map(m=>rp(m,t))})}return e},Zde={isAnimationFinished:!1,formatRoot:null,currentRoot:null,nestIndex:[]};function Qde(e){var{content:t,nodeProps:r,type:n,colorPanel:i,onMouseEnter:a,onMouseLeave:l,onClick:u}=e;if(w.isValidElement(t))return w.createElement(Pe,{onMouseEnter:a,onMouseLeave:l,onClick:u},w.cloneElement(t,r));if(typeof t=="function")return w.createElement(Pe,{onMouseEnter:a,onMouseLeave:l,onClick:u},t(r));var{x:f,y:h,width:d,height:m,index:v}=r,g=null;d>10&&m>10&&r.children&&n==="nest"&&(g=w.createElement(sx,{points:[{x:f+2,y:h+m/2},{x:f+6,y:h+m/2+3},{x:f+2,y:h+m/2+6}]}));var S=null,_=Fl(r.name);d>20&&m>20&&_.width<d&&_.height<m&&(S=w.createElement("text",{x:f+8,y:h+m/2+7,fontSize:14},r.name));var x=i||eG;return w.createElement("g",null,w.createElement(Rm,Mo({fill:r.depth<2?x[v%x.length]:"rgba(255,255,255,0)",stroke:"#fff"},C5(r,["children"]),{onMouseEnter:a,onMouseLeave:l,onClick:u,"data-recharts-item-index":r.tooltipIndex})),g,S)}function qR(e){var t=Je(),r=e.nodeProps?{x:e.nodeProps.x+e.nodeProps.width/2,y:e.nodeProps.y+e.nodeProps.height/2}:null,n=()=>{t(Qm({activeIndex:e.nodeProps.tooltipIndex,activeDataKey:e.dataKey,activeCoordinate:r}))},i=()=>{},a=()=>{t(xj({activeIndex:e.nodeProps.tooltipIndex,activeDataKey:e.dataKey,activeCoordinate:r}))};return w.createElement(Qde,Mo({},e,{onMouseEnter:n,onMouseLeave:i,onClick:a}))}function Jde(e){var{props:t,currentRoot:r}=e,{dataKey:n,nameKey:i,stroke:a,fill:l}=t;return{dataDefinedOnItem:r,positions:void 0,settings:{stroke:a,strokeWidth:void 0,fill:l,dataKey:n,nameKey:i,name:void 0,hide:!1,type:void 0,color:l,unit:""}}}var epe={top:0,right:0,bottom:0,left:0};class zx extends w.PureComponent{constructor(){super(...arguments),yo(this,"state",Mt({},Zde)),yo(this,"handleAnimationEnd",()=>{var{onAnimationEnd:t}=this.props;this.setState({isAnimationFinished:!0}),typeof t=="function"&&t()}),yo(this,"handleAnimationStart",()=>{var{onAnimationStart:t}=this.props;this.setState({isAnimationFinished:!1}),typeof t=="function"&&t()}),yo(this,"handleTouchMove",(t,r)=>{var n=r.touches[0],i=document.elementFromPoint(n.clientX,n.clientY);if(!(!i||!i.getAttribute)){var a=i.getAttribute("data-recharts-item-index"),l=E5(this.state.formatRoot,a);if(l){var{dataKey:u,dispatch:f}=this.props,h={x:l.x+l.width/2,y:l.y+l.height/2};f(Qm({activeIndex:a,activeDataKey:u,activeCoordinate:h}))}}})}static getDerivedStateFromProps(t,r){if(t.data!==r.prevData||t.type!==r.prevType||t.width!==r.prevWidth||t.height!==r.prevHeight||t.dataKey!==r.prevDataKey||t.aspectRatio!==r.prevAspectRatio){var n=tp({depth:0,node:{children:t.data,x:0,y:0,width:t.width,height:t.height},index:0,dataKey:t.dataKey,nameKey:t.nameKey}),i=rp(n,t.aspectRatio);return Mt(Mt({},r),{},{formatRoot:i,currentRoot:n,nestIndex:[n],prevAspectRatio:t.aspectRatio,prevData:t.data,prevWidth:t.width,prevHeight:t.height,prevDataKey:t.dataKey,prevType:t.type})}return null}handleMouseEnter(t,r){r.persist();var{onMouseEnter:n}=this.props;n&&n(t,r)}handleMouseLeave(t,r){r.persist();var{onMouseLeave:n}=this.props;n&&n(t,r)}handleClick(t){var{onClick:r,type:n}=this.props;if(n==="nest"&&t.children){var{width:i,height:a,dataKey:l,nameKey:u,aspectRatio:f}=this.props,h=tp({depth:0,node:Mt(Mt({},t),{},{x:0,y:0,width:i,height:a}),index:0,dataKey:l,nameKey:u,nestedActiveTooltipIndex:t.tooltipIndex}),d=rp(h,f),{nestIndex:m}=this.state;m.push(t),this.setState({formatRoot:d,currentRoot:h,nestIndex:m})}r&&r(t)}handleNestIndex(t,r){var{nestIndex:n}=this.state,{width:i,height:a,dataKey:l,nameKey:u,aspectRatio:f}=this.props,h=tp({depth:0,node:Mt(Mt({},t),{},{x:0,y:0,width:i,height:a}),index:0,dataKey:l,nameKey:u,nestedActiveTooltipIndex:t.tooltipIndex}),d=rp(h,f);n=n.slice(0,r+1),this.setState({formatRoot:d,currentRoot:t,nestIndex:n})}renderItem(t,r,n){var{isAnimationActive:i,animationBegin:a,animationDuration:l,animationEasing:u,isUpdateAnimationActive:f,type:h,colorPanel:d,dataKey:m}=this.props,{isAnimationFinished:v}=this.state,{width:g,height:S,x:_,y:x,depth:C}=r,A=parseInt("".concat((Math.random()*2-1)*g),10),O={};return(n||h==="nest")&&(O={onMouseEnter:this.handleMouseEnter.bind(this,r),onMouseLeave:this.handleMouseLeave.bind(this,r),onClick:this.handleClick.bind(this,r)}),i?w.createElement(o5,{animationId:"treemap-".concat(r.tooltipIndex),from:"translate(".concat(A,"px, ").concat(A,"px)"),to:"translate(0, 0)",attributeName:"transform",begin:a,easing:u,isActive:i,duration:l,onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},P=>w.createElement(Pe,Mo({},O,{style:P}),C>2&&!v?null:w.createElement(qR,{content:t,dataKey:m,nodeProps:Mt(Mt({},r),{},{isAnimationActive:i,isUpdateAnimationActive:!f,width:g,height:S,x:_,y:x}),type:h,colorPanel:d}))):w.createElement(Pe,O,w.createElement(qR,{content:t,dataKey:m,nodeProps:Mt(Mt({},r),{},{isAnimationActive:!1,isUpdateAnimationActive:!1,width:g,height:S,x:_,y:x}),type:h,colorPanel:d}))}renderNode(t,r){var{content:n,type:i}=this.props,a=Mt(Mt(Mt({},Et(this.props)),r),{},{root:t}),l=!r.children||!r.children.length,{currentRoot:u}=this.state,f=(u.children||[]).filter(h=>h.depth===r.depth&&h.name===r.name);return!f.length&&t.depth&&i==="nest"?null:w.createElement(Pe,{key:"recharts-treemap-node-".concat(a.x,"-").concat(a.y,"-").concat(a.name),className:"recharts-treemap-depth-".concat(r.depth)},this.renderItem(n,a,l),r.children&&r.children.length?r.children.map(h=>this.renderNode(r,h)):null)}renderAllNodes(){var{formatRoot:t}=this.state;return t?this.renderNode(t,t):null}renderNestIndex(){var{nameKey:t,nestIndexContent:r}=this.props,{nestIndex:n}=this.state;return w.createElement("div",{className:"recharts-treemap-nest-index-wrapper",style:{marginTop:"8px",textAlign:"center"}},n.map((i,a)=>{var l=ba(i,t,"root"),u=null;return w.isValidElement(r)&&(u=w.cloneElement(r,i,a)),typeof r=="function"?u=r(i,a):u=l,w.createElement("div",{onClick:this.handleNestIndex.bind(this,i,a),key:"nest-index-".concat(Kl()),className:"recharts-treemap-nest-index-box",style:{cursor:"pointer",display:"inline-block",padding:"0 7px",background:"#000",color:"#fff",marginRight:"3px"}},u)}))}render(){var t=this.props,{width:r,height:n,className:i,style:a,children:l,type:u}=t,f=Hde(t,zde),h=Et(f);return w.createElement(ix.Provider,{value:this.state.tooltipPortal},w.createElement(Bs,{fn:Jde,args:{props:this.props,currentRoot:this.state.currentRoot}}),w.createElement(S5,{className:i,style:a,width:r,height:n,ref:d=>{this.state.tooltipPortal==null&&this.setState({tooltipPortal:d})},onMouseEnter:void 0,onMouseLeave:void 0,onClick:void 0,onMouseMove:void 0,onMouseDown:void 0,onMouseUp:void 0,onContextMenu:void 0,onDoubleClick:void 0,onTouchStart:void 0,onTouchMove:this.handleTouchMove,onTouchEnd:void 0},w.createElement(gm,Mo({},h,{width:r,height:u==="nest"?n-30:n}),this.renderAllNodes(),l),u==="nest"&&this.renderNestIndex()))}}yo(zx,"displayName","Treemap");yo(zx,"defaultProps",{aspectRatio:.5*(1+Math.sqrt(5)),dataKey:"value",nameKey:"name",type:"flat",isAnimationActive:!Nn.isSsr,isUpdateAnimationActive:!Nn.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"linear"});function tpe(e){var t=Je();return w.createElement(zx,Mo({},e,{dispatch:t}))}function rpe(e){var t,{width:r,height:n}=e;return!Es(r)||!Es(n)?null:w.createElement(jx,{preloadedState:{options:qde},reduxStoreName:(t=e.className)!==null&&t!==void 0?t:"Treemap"},w.createElement(dG,{width:r,height:n}),w.createElement(pG,{margin:epe}),w.createElement(tpe,e))}var npe=["axis"],ipe={layout:"centric",startAngle:90,endAngle:-270,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},ape=w.forwardRef((e,t)=>{var r=jt(e,ipe);return w.createElement(x5,{chartName:"RadarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:npe,tooltipPayloadSearcher:Ls,categoricalChartProps:r,ref:t})}),spe=["item"],ope=w.forwardRef((e,t)=>w.createElement(Eu,{chartName:"ScatterChart",defaultTooltipEventType:"item",validateTooltipEventTypes:spe,tooltipPayloadSearcher:Ls,categoricalChartProps:e,ref:t})),lpe=["axis"],upe=w.forwardRef((e,t)=>w.createElement(Eu,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:lpe,tooltipPayloadSearcher:Ls,categoricalChartProps:e,ref:t})),cpe=["axis"],hpe=w.forwardRef((e,t)=>w.createElement(Eu,{chartName:"ComposedChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:cpe,tooltipPayloadSearcher:Ls,categoricalChartProps:e,ref:t}));function sw(){return sw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},sw.apply(null,arguments)}function WR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function u0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?WR(Object(r),!0).forEach(function(n){fpe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):WR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fpe(e,t,r){return(t=dpe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dpe(e){var t=ppe(e,"string");return typeof t=="symbol"?t:t+""}function ppe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mpe(e,t){var r="".concat(t.x||e.x),n=parseInt(r,10),i="".concat(t.y||e.y),a=parseInt(i,10),l="".concat((t==null?void 0:t.height)||(e==null?void 0:e.height)),u=parseInt(l,10);return u0(u0(u0({},t),mz(e)),{},{height:u,x:n,y:a})}function vpe(e){return w.createElement(yh,sw({shapeType:"trapezoid",propTransformer:mpe},e))}function VR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Fc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VR(Object(r),!0).forEach(function(n){gpe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gpe(e,t,r){return(t=ype(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ype(e){var t=_pe(e,"string");return typeof t=="symbol"?t:t+""}function _pe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bpe=(e,t)=>t,Spe=X([ar,bpe,zh],(e,t,r)=>{var{data:n,dataKey:i,nameKey:a,tooltipType:l,lastShapeType:u,reversed:f,customWidth:h,cells:d,presentationProps:m}=t,{chartData:v}=r,g;if(n!=null&&n.length>0?g=n:v!=null&&v.length>0&&(g=v),g&&g.length)g=g.map((S,_)=>Fc(Fc(Fc({payload:S},m),S),d&&d[_]&&d[_].props));else if(d&&d.length)g=d.map(S=>Fc(Fc({},m),S.props));else return[];return Bpe({dataKey:i,nameKey:a,displayedData:g,tooltipType:l,lastShapeType:u,reversed:f,offset:e,customWidth:h})}),wpe=["onMouseEnter","onClick","onMouseLeave","shape","activeShape"],xpe=["stroke","fill","legendType","hide","isAnimationActive","animationBegin","animationDuration","animationEasing","nameKey","lastShapeType"];function nm(){return nm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},nm.apply(null,arguments)}function A5(e,t){if(e==null)return{};var r,n,i=Cpe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Cpe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function YR(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function wr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?YR(Object(r),!0).forEach(function(n){Hx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YR(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hx(e,t,r){return(t=Epe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Epe(e){var t=Ape(e,"string");return typeof t=="symbol"?t:t+""}function Ape(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ope(e){var{dataKey:t,nameKey:r,stroke:n,strokeWidth:i,fill:a,name:l,hide:u,tooltipType:f,data:h}=e;return{dataDefinedOnItem:h,positions:e.trapezoids.map(d=>{var{tooltipPosition:m}=d;return m}),settings:{stroke:n,strokeWidth:i,fill:a,dataKey:t,name:l,nameKey:r,hide:u,type:f,color:a,unit:""}}}function kpe(e){var{showLabels:t,trapezoids:r,children:n}=e,i=w.useMemo(()=>{if(t)return r==null?void 0:r.map(a=>{var l={x:a.x,y:a.y,width:a.upperWidth,height:a.height};return wr(wr({},l),{},{value:a.name,payload:a.payload,parentViewBox:void 0,viewBox:l,fill:a.fill})})},[t,r]);return w.createElement(bu,{value:i},n)}function Ppe(e){var{trapezoids:t,allOtherFunnelProps:r}=e,n=he(g=>nx(g,"item",g.tooltip.settings.trigger,void 0)),{onMouseEnter:i,onClick:a,onMouseLeave:l,shape:u,activeShape:f}=r,h=A5(r,wpe),d=Yh(i,r.dataKey),m=Xh(l),v=Gh(a,r.dataKey);return w.createElement(w.Fragment,null,t.map((g,S)=>{var _=!!f&&n===String(S),x=_?f:u,C=wr(wr({},g),{},{option:x,isActive:_,stroke:g.stroke});return w.createElement(Pe,nm({className:"recharts-funnel-trapezoid"},Ta(h,g,S),{onMouseEnter:d(g,S),onMouseLeave:m(g,S),onClick:v(g,S),key:"trapezoid-".concat(g==null?void 0:g.x,"-").concat(g==null?void 0:g.y,"-").concat(g==null?void 0:g.name,"-").concat(g==null?void 0:g.value)}),w.createElement(vpe,C))}))}function Tpe(e){var{previousTrapezoidsRef:t,props:r}=e,{trapezoids:n,isAnimationActive:i,animationBegin:a,animationDuration:l,animationEasing:u,onAnimationEnd:f,onAnimationStart:h}=r,d=t.current,[m,v]=w.useState(!1),g=!m,S=La(n,"recharts-funnel-"),_=w.useCallback(()=>{typeof f=="function"&&f(),v(!1)},[f]),x=w.useCallback(()=>{typeof h=="function"&&h(),v(!0)},[h]);return w.createElement(kpe,{showLabels:g,trapezoids:n},w.createElement(Ra,{animationId:S,begin:a,duration:l,isActive:i,easing:u,key:S,onAnimationStart:x,onAnimationEnd:_},C=>{var A=C===1?n:n.map((O,P)=>{var D=d&&d[P];return D?wr(wr({},O),{},{x:je(D.x,O.x,C),y:je(D.y,O.y,C),upperWidth:je(D.upperWidth,O.upperWidth,C),lowerWidth:je(D.lowerWidth,O.lowerWidth,C),height:je(D.height,O.height,C)}):wr(wr({},O),{},{x:je(O.x+O.upperWidth/2,O.x,C),y:je(O.y+O.height/2,O.y,C),upperWidth:je(0,O.upperWidth,C),lowerWidth:je(0,O.lowerWidth,C),height:je(0,O.height,C)})});return C>0&&(t.current=A),w.createElement(Pe,null,w.createElement(Ppe,{trapezoids:A,allOtherFunnelProps:r}))}),w.createElement(Ho,{label:r.label}),r.children)}function Dpe(e){var t=w.useRef(void 0);return w.createElement(Tpe,{props:e,previousTrapezoidsRef:t})}var Mpe=(e,t)=>{var{width:r,height:n,left:i,right:a,top:l,bottom:u}=t,f=n,h=r;return ye(e)?h=e:typeof e=="string"&&(h=h*parseFloat(e)/100),{realWidth:h-i-a-50,realHeight:f-u-l,offsetX:(r-h)/2,offsetY:(n-f)/2}};class Rpe extends w.PureComponent{render(){var{className:t}=this.props,r=Me("recharts-trapezoids",t);return w.createElement(Pe,{className:r},w.createElement(Dpe,this.props))}}var O5={stroke:"#fff",fill:"#808080",legendType:"rect",hide:!1,isAnimationActive:!Nn.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",lastShapeType:"triangle"};function Lpe(e){var t=Zh(),r=jt(e,O5),{stroke:n,fill:i,legendType:a,hide:l,isAnimationActive:u,animationBegin:f,animationDuration:h,animationEasing:d,nameKey:m,lastShapeType:v}=r,g=A5(r,xpe),S=Et(e),_=kh(e.children,zo),x=w.useMemo(()=>({dataKey:e.dataKey,nameKey:m,data:e.data,tooltipType:e.tooltipType,lastShapeType:v,reversed:e.reversed,customWidth:e.width,cells:_,presentationProps:S}),[e.dataKey,m,e.data,e.tooltipType,v,e.reversed,e.width,_,S]),C=he(P=>Spe(P,x));if(l||!C||!C.length||!t)return null;var{height:A,width:O}=t;return w.createElement(w.Fragment,null,w.createElement(Bs,{fn:Ope,args:wr(wr({},e),{},{trapezoids:C})}),w.createElement(Rpe,nm({},g,{stroke:n,fill:i,nameKey:m,lastShapeType:v,animationBegin:f,animationDuration:h,animationEasing:d,isAnimationActive:u,hide:l,legendType:a,height:A,width:O,trapezoids:C})))}function Bpe(e){var{dataKey:t,nameKey:r,displayedData:n,tooltipType:i,lastShapeType:a,reversed:l,offset:u,customWidth:f}=e,{left:h,top:d}=u,{realHeight:m,realWidth:v,offsetX:g,offsetY:S}=Mpe(f,u),_=Math.max.apply(null,n.map(P=>Fe(P,t,0))),x=n.length,C=m/x,A={x:u.left,y:u.top,width:u.width,height:u.height},O=n.map((P,D)=>{var k=Fe(P,t,0),R=Fe(P,r,D),N=k,$;D!==x-1?($=Fe(n[D+1],t,0),$ instanceof Array&&([$]=$)):k instanceof Array&&k.length===2?[N,$]=k:a==="rectangle"?$=N:$=0;var ee=(_-N)*v/(2*_)+d+25+g,F=C*D+h+S,z=N/_*v,j=$/_*v,K=[{name:R,value:N,payload:P,dataKey:t,type:i}],W={x:ee+z/2,y:F+C/2};return wr(wr({x:ee,y:F,width:Math.max(z,j),upperWidth:z,lowerWidth:j,height:C,name:R,val:N,tooltipPayload:K,tooltipPosition:W},C5(P,["width"])),{},{payload:P,parentViewBox:A,labelViewBox:{x:ee+(z-j)/4,y:F,width:Math.abs(z-j)/2+Math.min(z,j),height:C}})});return l&&(O=O.map((P,D)=>{var k=P.y-D*C+(x-1-D)*C;return wr(wr({},P),{},{upperWidth:P.lowerWidth,lowerWidth:P.upperWidth,x:P.x-(P.lowerWidth-P.upperWidth)/2,y:P.y-D*C+(x-1-D)*C,tooltipPosition:wr(wr({},P.tooltipPosition),{},{y:k+C/2}),labelViewBox:wr(wr({},P.labelViewBox),{},{y:k})})})),O}class Fx extends w.PureComponent{render(){return w.createElement(Lpe,this.props)}}Hx(Fx,"displayName","Funnel");Hx(Fx,"defaultProps",O5);var Npe=["item"],Ipe=w.forwardRef((e,t)=>w.createElement(Eu,{chartName:"FunnelChart",defaultTooltipEventType:"item",validateTooltipEventTypes:Npe,tooltipPayloadSearcher:Ls,categoricalChartProps:e,ref:t}));const k5={LineChart:mde,AreaChart:upe,BarChart:gde,PieChart:Ade,ScatterChart:ope,RadarChart:ape,ComposedChart:hpe,CartesianGrid:Hz,XAxis:Dx,YAxis:Mx,ZAxis:hv,Tooltip:nne,Legend:Mm,Line:Vz,Area:t5,Bar:Pz,Pie:Sz,Cell:zo,Scatter:i5,Radar:gx,PolarGrid:lz,PolarAngleAxis:sv,PolarRadiusAxis:iv,ResponsiveContainer:dne,ReferenceLine:xx,ReferenceArea:Ox,ReferenceDot:Ex,Brush:Rz,ErrorBar:Lx,LabelList:eh,FunnelChart:Ipe,Funnel:Fx,Treemap:rpe};function jpe({elem:e,model:t}){const r=P5(t,e),n=e.tag.replace("recharts:",""),i=k5[n];if(!i)return _e.jsx("div",{children:"Invalid Recharts Component <"+e.tag+">"});const a=T5(e,t);return r.key="recharts-"+e.waveid,w.createElement(i,r,a)}function P5(e,t){if(!t.props)return{};const r={};for(const[n,i]of Object.entries(t.props))i!=null&&(r[n]=i);return r}function T5(e,t){var n;if(!e.children||e.children.length===0)return null;const r=[];for(const i of e.children)if(i){if(i.tag==="#text"){r.push(i.text??"");continue}if((n=i.tag)!=null&&n.startsWith("recharts:")){const a=i.tag.replace("recharts:",""),l=k5[a];if(l){const u=P5(t,i);u.key="recharts-"+i.waveid;const f=T5(i,t);r.push(w.createElement(l,u,f))}continue}}return r.length>0?r:null}function zpe({value:e,onChange:t,onInput:r,ttlMs:n=100,ref:i,_tagName:a,...l}){const[u,f]=w.useState(null),h=w.useRef(void 0),d=w.useCallback(()=>{h.current&&clearTimeout(h.current),h.current=window.setTimeout(()=>{f(null)},n)},[n]),m=g=>{var _;if((_=g.nativeEvent)!=null&&_.isComposing)return;if(e===void 0){t==null||t(g),r==null||r(g);return}if(l.disabled||l.readOnly){t==null||t(g),r==null||r(g);return}const S=g.currentTarget.value;f(S),d(),t==null||t(g),r==null||r(g)};w.useLayoutEffect(()=>{u!==null&&u===e&&(f(null),h.current&&clearTimeout(h.current))},[e,u]),w.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const v=e===void 0?void 0:u??e??"";return a==="textarea"?_e.jsx("textarea",{ref:i,value:v,onChange:m,...l}):_e.jsx("input",{ref:i,value:v,onChange:m,...l})}const Hpe="#text",Fpe="#fragment",Upe="wave:text",$pe="wave:null",Kpe="style",qpe="ref",Wpe="func",D5=eL("wave:vdom"),Vpe={"wave:markdown":Jpe,"wave:term":tme},Ype={div:!0,b:!0,i:!0,p:!0,s:!0,span:!0,a:!0,img:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,ul:!0,ol:!0,li:!0,input:!0,button:!0,textarea:!0,select:!0,option:!0,form:!0,label:!0,table:!0,thead:!0,tbody:!0,tr:!0,th:!0,td:!0,hr:!0,br:!0,pre:!0,code:!0,canvas:!0,strong:!0,em:!0,small:!0,sub:!0,sup:!0,u:!0,mark:!0,blockquote:!0,section:!0,article:!0,header:!0,footer:!0,main:!0,nav:!0,dl:!0,dt:!0,dd:!0,video:!0,audio:!0,picture:!0,source:!0,figure:!0,figcaption:!0,details:!0,summary:!0,fieldset:!0,legend:!0,progress:!0,meter:!0},Xpe={svg:!0,circle:!0,ellipse:!0,line:!0,path:!0,polygon:!0,polyline:!0,rect:!0,g:!0,text:!0,tspan:!0,textPath:!0,use:!0,defs:!0,linearGradient:!0,radialGradient:!0,stop:!0,clipPath:!0,mask:!0,pattern:!0,image:!0,marker:!0,symbol:!0,filter:!0,feBlend:!0,feColorMatrix:!0,feComponentTransfer:!0,feComposite:!0,feConvolveMatrix:!0,feDiffuseLighting:!0,feDisplacementMap:!0,feFlood:!0,feGaussianBlur:!0,feImage:!0,feMerge:!0,feMorphology:!0,feOffset:!0,feSpecularLighting:!0,feTile:!0,feTurbulence:!0};function Gpe(e,t,r,n){return i=>{if((n=="onKeyDown"||n=="onKeyDownCapture")&&t.keys){D5("key event",t,i);let a=fL(i);for(let l of t.keys||[])if(U8(a,l)){i.preventDefault(),i.stopPropagation(),e.callVDomFunc(t,i,r,n);return}return}t.preventdefault&&i.preventDefault(),t.stoppropagation&&i.stopPropagation(),e.callVDomFunc(t,i,r,n)}}function M5(e,t){return e==null?null:e.tag==Hpe?e.text:w.createElement(nme,{key:e.waveid,elem:e,model:t})}function XR(e){return e!=null&&!Array.isArray(e)&&typeof e=="object"}function Zpe(e,t){let r={};if(e.props==null)return r;for(let n in e.props){let i=e.props[n];if(i!=null){if(n=="ref"){if(i==null)continue;if(XR(i)&&i.type==qpe){const a=i,l=t.getOrCreateRefContainer(a);r[n]=l.refFn}continue}if(n=="className"&&typeof i=="string"){r[n]=DL(i);continue}if(XR(i)&&i.type==Wpe){const a=i;r[n]=Gpe(t,a,e.waveid,n);continue}r[n]=i}}return r}function Qpe(e,t){if(e.children==null||e.children.length==0)return null;let r=[];for(let n of e.children)n!=null&&r.push(M5(n,t));return r.length==0?null:r}function Ux(e,t){return nh(e.getVDomNodeVersionAtom(t)),Zpe(t,e)}function Jpe({elem:e,model:t}){const r=Ux(t,e);return _e.jsx(f$,{text:r==null?void 0:r.text,style:r==null?void 0:r.style,className:r==null?void 0:r.className,scrollable:r==null?void 0:r.scrollable})}async function eme(e){const t=await fetch("/api/terminput",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`terminal input request failed: ${t.status} ${t.statusText}`)}function tme({elem:e,model:t}){const r=Ux(t,e),n=r.onData!=null,i=w.useCallback((l,u)=>{const f={};l!=null&&(f.data=l),u!=null&&(f.termsize=u);const h={waveid:e.waveid,eventtype:"onData",terminput:f};eme(h).catch(d=>{console.error("Failed to send terminal input:",d)})},[e.waveid]),a={...r,onData:n?i:void 0};return _e.jsx(OW,{...a})}function rme({elem:e,model:t}){const r=pL(e);return r==null?null:_e.jsx("style",{children:r})}function nme({elem:e,model:t}){const r=Ux(t,e);if(e.tag==$pe)return null;if(e.tag==Upe)return r.text;if(e.tag.startsWith("recharts:"))return _e.jsx(jpe,{elem:e,model:t});const n=Vpe[e.tag];if(n)return n({elem:e,model:t});if(e.tag==Kpe)return _e.jsx(rme,{elem:e,model:t});if(!Ype[e.tag]&&!Xpe[e.tag])return _e.jsx("div",{children:"Invalid Tag <"+e.tag+">"});let i=Qpe(e,t);if(e.tag==Fpe)return i;if(e.tag==="input"||e.tag==="textarea"){r.key="e-"+e.waveid;const a={...r,_tagName:e.tag};return w.createElement(zpe,a,i)}return r.key="e-"+e.waveid,w.createElement(e.tag,r,i)}function ime({model:e}){let t=nh(e.globalVersion),r=nh(e.vdomRoot);if(w.useEffect(()=>{e.renderDone(t)},[t]),e.viewRef.current==null||r==null)return null;D5("render",t,r);let n=M5(r,e);return _e.jsx("div",{className:"vdom",children:n})}function ame({model:e}){let[t,r]=w.useState(!1);const n=()=>{r(!0)};return _e.jsxs(_e.Fragment,{children:[_e.jsx("link",{rel:"stylesheet",href:`/static/tw.css?x=${e.serverId}`,onLoad:n}),t?_e.jsx(ime,{model:e}):null]})}function sme({model:e}){let t=w.useRef(null),r=nh(e.contextActive),n=nh(e.currentModal);e.viewRef=t;const i=w.useCallback(a=>{n&&e.sendModalResult(n.modalid,a)},[e,n]);return _e.jsxs("div",{className:Me("overflow-auto w-full min-h-full"),ref:t,children:[r?_e.jsx(ame,{model:e}):null,n&&n.modaltype==="alert"&&_e.jsx(d$,{config:n,onClose:i}),n&&n.modaltype==="confirm"&&_e.jsx(p$,{config:n,onClose:i})]})}const ome=new V8;function lme(){return _e.jsx("div",{className:"min-h-screen bg-background text-foreground",children:_e.jsx(sme,{model:ome})})}s8.createRoot(document.getElementById("root")).render(_e.jsx(im.StrictMode,{children:_e.jsx(lme,{})}));
